GenLayer: AI Reliability for Blockchain Transactions

Reliability and consistency are of greatest importance in blockchain technology. Traditional blockchains have successfully eliminated the need for intermediaries, ensuring that “code is law.”  But now that we can integrate AI into the mix new challenges arise.

Can we consistently trust the outputs of a single AI model given their probabilistic nature? This question becomes even more critical in high-stakes decentralized applications where reliability is a must.

While integrating AI into blockchains opens up new possibilities, it also opens new reliability issues. One way to employ the power of AI models on the chain is with Machine Learning Verifiable Proofs (like zkML or HTML). Those verify the inference of a single AI model on-chain. But: Because of these models’ inherent probabilistic nature, relying on a single output can be risky. This is where GenLayer’s multi-validator approach comes in.

Please help, what does this mean?

Two paths to choose
What is the better solution?

Because machine learning verifiable proofs are gaining importance and traction in Web3, we will also focus on a comparison to GenLayer in this article.  

Let’s dive deep!

Reliability through Control Mechanisms

First, let’s revisit how GenLayer’s consensus mechanism works, as it is fundamental to understanding the comparison explained below. In a nutshell, Optimistic Democracy works like this: instead of relying on a single AI model, GenLayer utilizes multiple LLM-connected validators.

When a user submits a transaction, a randomly selected lead validator proposes a decision, and the other validators agree or disagree based on their own AI models’ outputs. If the lead validator’s proposal reaches a majority consensus, the transaction is executed.

Comparison to Machine Learning Verifiable Proofs

ZkML or opML are cryptographic protocols that provide proof that one AI model generated a certain output with a given input, also known as inference. For example, “I ran A input on Llama to generate B output.” GenLayer’s approach integrating AI into the blockchain ecosystem is fundamentally different. The magic of zkML comes from the fact that the prover can prove these statements while keeping certain elements (e.g., “Llama”) hidden from verifiers.

These technologies essentially provide a verification of an AI model’s inference on the blockchain.

Example zkML or opML Functioning

It doesn’t stop at zk- and op-proofs, technological advancements are rapidly streaming into the space. The fundamental approach is the same: All of these technologies provide “only” proof of the inference. Which also makes them akin to adversarial inputs.  

Taking it to the High Court

Let’s consider an example to illustrate this process: Suppose a user submits a transaction to GenLayer to cash out from a parametric insurance policy because their house was affected by a flood. GenLayer’s intelligent contract would scrap the web for relevant data. Then a lead validator (which is connected to a LLM) would check a reputable source like bbc.com to verify the claim’s validity. The other validators would verify the leader’s proposed result (whether or not the user’s transaction is correct) and vote on it. If the leader’s proposed result reaches a majority, the transaction gets executed.

The user or any other interested party can appeal the result within the finality window, which leads to more validators verifying and voting on the proposed result so that they could potentially overturn the previous result or transaction.

Appeal Process GenLayer

GenLayer achieves reliability through a system similar to a court’s appeal process. In this system, multiple validators verify each transaction, ensuring that decisions are not reliant on a single AI model’s output. This method not only mitigates the risks associated with probabilistic outputs but also ensures a higher degree of reliability and consistency.

Imagine if all legal cases were decided by a single judge with no option for appeal. The risk of incorrect judgments would be high. Similarly, GenLayer’s multi-validator system allows for appeals and re-evaluations, ensuring a fair and unbiased process in transaction validation.

Large Language Models as Probabilistic Systems

Due to the probabilistic nature of LLMs it can be problematic to rely on one model. LLMs like GPT-4 generate responses based on probabilistic patterns learned from extensive training data. When asked “Give me a number between 1 and 2,” the model predicts a likely answer from its learned context, such as “1.5,” rather than generating a purely random value.

Relying on a single model’s output without additional validators hence is a dangerous gamble, especially for high-stakes transactions or decisions. What if the probability for the number 1 in the above example is exactly 51 percent?

GenLayer’s use of multiple AI-connected validators within the Optimistic Consensus mechanism mitigates these risks by requiring agreement among all those involved validators before a decision is finalized. The chances for all participating validators to be “probabilistically wrong” are very low. The probability shifts in GenLayer’s favor!  

Also, each model contains within it an inherent set of biases, just like a person. Running a transaction through multiple models and aggregating the results with appeals improves reliability for high-stakes applications. It also mitigates risks like prompt injection attacks, which could compromise a single model but are exponentially harder to pull off against a diverse set of unknown models.

Machine Learning proofs, such as zkML provide strong integrity guarantees for the execution of a specific model, but that model itself could be probabilistically wrong.

GenLayer instead takes the approach of aggregating the intelligence of multiple different LLM-based validators which are incentivized to provide the most correct outputs, creating a system that is more resilient to attacks and hallucinations, self-improving as validators fine-tune their operations and integrate newer LLMs, and can access other off-chain sources and seamlessly integrate multi-modal models in the future using the same consensus mechanism which enables multiple validators to agree about non-deterministic data, whatever that may be.

GenLayer’s Optimistic Democracy allows for the integration of newer, more advanced AI models as they become available. Validators are incentivized to continually improve their AI setups to provide the most accurate and reliable results. This self-improving aspect ensures that GenLayer remains at the forefront of AI technology while maintaining the security and reliability inherent in a decentralized system.

Conclusion

While zkML and opML technologies offer solid proofs for single AI model outputs, they fall short in applications demanding high accuracy and reliability. GenLayer’s Optimistic Democracy with its multi-validator approach, ensures that decisions are made based on collective intelligence.

By leveraging multiple AI validators and a resilient consensus mechanism, GenLayer offers a better solution for integrating AI into the blockchain ecosystem. With GenLayer, you can be confident that your transactions are handled by a decentralized system that seamlessly combines the best of AI and blockchain technology.

Join us on our mission!

Website | Blog | Discord | X (prev. Twitter) | Telegram | Simulator | Docs | Whitepaper