Creation and Motivation

Creation and Motivation

Rakis was created to bring Verifiable Inference for any Smart Contract on any Chain. Ultimately, Rakis seeks to expand the capabilities of smart contracts by introducing a new instruction set: the ability to leverage AI models and natural language processing. This opens up a world of possibilities for creating more sophisticated and intelligent smart contracts.

Some Observations

If an AI model that plays a key role in a mechanism is closed, you can't verify its inner workings, and so it's no better than a centralized application.

Vitalik Buterin

The inspiration for Rakis stemmed from several observations:

  1. Centralization of AI Services: Despite the cambrian explosion of AI products and services, the majority of the state of the art are controlled by a handful of large tech companies, which, in isolation can lead to issues around privacy, fairness, and accessibility.

  2. Limitations of On-Chain AI: While blockchains offer decentralization and transparency, the computational constraints and deterministic nature of smart contracts pose significant challenges for running complex AI models entirely on-chain.

  3. Lack of Decentralized Oracles for AI: Integrating AI capabilities with decentralized applications (dApps) and smart contracts often relies on centralized oracles, which can undermine the trustless nature of these systems.

Development Journey

The direction Rakis takes attempts to address these challenges with a decentralized network for AI inference that could run entirely in the browser.

Step 1

The first step was to explore the feasibility of running AI models in the browser using WebAssembly and other technologies like WebGPU. This involved experimenting with various AI frameworks and libraries, as well as optimizing the models for efficient execution in a web environment.

Step 2

With the ability to run AI models in the browser established, the next challenge was to create a peer-to-peer network that could facilitate the distribution and coordination of inference tasks across a decentralized network of nodes.

This involved investigating various peer-to-peer protocols, such as WebRTC, GunDB, and NoStr, and developing mechanisms for peer discovery, message routing, and consensus-building.

⚠️

One of the primary challenges faced was the non-deterministic nature of AI models, which made it difficult to achieve consensus across the decentralized network.

To address this, a novel consensus mechanism based on embeddings and adjustable security bindings is developed, allowing for flexible trade-offs between security and performance based on the specific idiosyncratic requirements of the application.

Challenges Faced

Throughout the development process, several challenges were encountered, including:

  1. Performance Optimization: Running AI models in the browser required optimizations to ensure acceptable performance levels, especially on resource-constrained devices.

  2. Network Stability and Robustness: Building a reliable and fault-tolerant peer-to-peer network that could handle node churn, network partitions, and adversarial behavior.

  3. Incentive Mechanisms: Designing incentive mechanisms to encourage participation and discourage malicious behavior in a decentralized network without relying on traditional blockchain-based incentives.

  4. Developer Experience: Providing a smoth and clean developer and user experience for interacting with the decentralized AI network.

We believe the development of Rakis has yielded a promising and novel approach to decentralized verifiable inference, paving the way for new applications and use cases that leverage the power of AI in a trustless and permissionless manner.

Rakis in some meaningful sense, is a celebration of the modern day web browsers, and their capabilities.

In the next section, Intended Uses and Goals, we'll explore the envisioned applications and medium-ish term goals of the Rakis project.