The Graph as AI Infrastructure

Hamburg, 16 September 2024 - In a recently released white paper titled The Graph as AI InfrastructureSemiotic Labs unveils two AI services: Inference and Agent. This launch represents a significant milestone in the ongoing growth of data services within The Graph ecosystem. With the integration of AI services, it is expected that some Graph Indexers become world-class experts in serving AI models. In this article we will review the white paper.

The Graph introduces two AI-enhanced blockchain interfaces: Agentc and AutoAgora. These tools bring together AI and blockchain to improve data accessibility and optimization within The Graph ecosystem.

Agentc and AutoAgora

This tool leverages AI to translate natural language into SQL (Structured Query Language) for seamless interaction with blockchain data. It is built on The Graph’s Uniswap data and allows users to query blockchain information in a more intuitive way. It was initially launched as a two-week demo to showcase the potential of The Graph as an AI-powered infrastructure, giving users the ability to explore blockchain data and visualize the impact of AI.

Designed to automate and optimize dynamic pricing for The Graph’s queries, AutoAgora is a powerful tool for improving query efficiency. The Graph’s queries serve as key inputs for neural networks, such as large language models (LLMs) or chatbots. These neural networks, akin to large mathematical systems, process the data and make decisions in a manner similar to the human brain.

Furthermore, The Graph has unveiled two AI services Inference Service and Agent Service; to provide a censorship-resistant and reliable platform for running AI models. These services open up new possibilities for decentralized applications (dApps) to integrate AI, marking a new chapter in bringing AI into the web3 ecosystem.

 

Inference Service

The Inference Service enables AI-driven functionality for dApps (decentralized applications) built on The Graph’s decentralized infrastructure using web3 data. It supports the deployment and querying of AI models with a wide range of use cases. For example, developers can integrate ChatGPT-like features into their frontends, or use AI to synthesize research and analyze Subgraph data.

Subgraphs in The Graph are open APIs (Application Programming Interfaces) that developers create and publish to facilitate querying blockchain data. By leveraging the Inference Service, developers gain streamlined access to AI technologies while mitigating centralization risks, such as censorship and service instability.

A web3-native AI dApp is a decentralized application that utilizes neural networks served via a decentralized infrastructure. To build such a dApp, developers can utilize The Graph’s Subgraphs to retrieve relevant information, train a neural network to generate predictions, and deploy the model through The Graph’s Inference Service.

 

AI Inference verification methods

M-of-N Consensus: In this approach, a developer requests that N indexers run an inference service, and then checks if at least M out of the N results match. If M results are consistent, the inference is verified as correct. However, if there is a mismatch, it indicates an issue with the inference process.

Fraud Proofs: Blockchains like ArbitrumCelestia, and Mantle use fraud proofs as part of their dispute resolution mechanisms. This concept can also be applied to verify AI inferences. In this system, a single honest participant can raise a dispute, which is then verified on-chain. While this method is slower than other AI inference verification approaches, it offers the highest level of security.

zk-SNARK: Short for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge, zk-SNARK is a cryptographic method where an indexer (the prover) performs a computation and generates both a result and a proof of its correctness. This proof is then submitted to a verifier. While zk-SNARKs are computationally expensive, their key advantage is that they can be verified directly on-chain, ensuring a high level of trust.

 

Agent Service

The Agent Service is built on top of the Inference Service and empowers developers to create AI-driven decentralized applications (dApps) within the Graph ecosystem, facilitating complex operations in blockchain environments. It integrates advanced functionalities like natural language processing (NLP) and NFT market analysis, enabling, for instance, the prediction of price trends for popular NFT collections such as the Bored Ape Yacht Club over the next three months.

In addition, the Agent Service can support DeFi Trading Assistants, an AI-powered tool that automates trade execution based on user-defined strategies and market conditions. For example, users can instruct the system to “buy $1,000 worth of ETH if the price drops below $2,000.” When the condition is met, the agent prepares a transaction, leveraging smart contracts and decentralized exchanges (DEXes). The draft is presented to the user for review and approval before execution.

The decision-making capabilities of the Agent Service are further enhanced through the integration of Knowledge Graph-enabled Large Language Models (KGLLMs). These models combine verified data from Knowledge Graphs with the capabilities of large language models, resulting in more accurate and data-driven AI insights. Several companies, such as Playground Analytics and Dapplooker, offer solutions that support the Agent Service.

 

Agents

Agents are autonomous decision-makers that perform actions based on user requests or intent. They serve as the interface between users and underlying systems, whether through a graphical user interface (GUI), a database that logs conversations, or external APIs that facilitate interaction between humans and applications. Agents can be powered by a combination of hard-coded rules and Large Language Models (LLMs), enabling them to interpret and act upon user inputs in a dynamic and intelligent way.

The data used by the Agent Service is verified through GEO, a Web3 browser that organizes real-world data into a format that is easily accessible and usable by the Agent Service. GEO ensures the reliability of the data by backing claims with arguments linked to primary sources, further supported by blockchain-based timestamps and community voting. This decentralized verification system ensures that the information powering agents is trustworthy, transparent, and secure.

 

The Graph’s Foundation Model

Foundation Models are advanced AI models trained on vast datasets to perform a wide range of tasks. These models can be either closed, like GPT-4, or open, such as SDXL and LLaMA. GPT-4 is one of the most well-known foundation models, while LLaMA is part of Meta’s family of large language models.

Imagine you have a dataset of all the books by your favorite author. Putting copyright issues aside, you could fine-tune a foundation model to mimic their writing style. Similarly, developers use The Graph to extract time-series data on liquidity and trading volumes from platforms like Uniswap. This data is processed through Substreams and exported into Pandas DataFrames, a standard format for training neural networks. Fine-tuning AI models in this way enables them to generate text, images, videos, or even specialized apps.

By combining AI with The Graph’s blockchain historical data — such as token pair trading volumes and liquidity shifts — developers can forecast future demand spikes or liquidity shortages. One key advantage of training AI models using The Graph is the accuracy of the data, supported by public and open-source schemas, as well as the traceability of queries.

Some AI models are “open,” meaning their weights (parameters) are available for developers to use and study, though the training data and code may not be provided. Open-source models, on the other hand, offer full access to their training data, code, and resulting weights, fostering greater collaboration and innovation among developers.

Fine-tuning foundation models for The Graph happens outside its ecosystem, as a different software stack is required beyond the Inference Service. However, once these fine-tuned models are made accessible via The Graph’s Inference Service, developers can benefit from cryptoeconomic incentives. Query fees will be shared between the model creator and the Indexer who served the model, making this system both collaborative and rewarding.

 

Conclusion

The Inference and Agent Services will be launched using a curated set of Indexers to serve AI models to ship an MVP as quickly as possible to learn from the behaviors of Indexers, what works, and what needs improvement. these new services will extend The Graph into a foundational infrastructure for AI-powered web3 dapps and applications.

The Graph and coinIX

The Graph is the source of data and information for the decentralized internet. As the original decentralized data marketplace that introduced and standardized subgraphs, The Graph has become web3’s method of indexing and accessing blockchain data. Since its launch in 2018, tens of thousands of developers have built subgraphs for dapps across 70+ blockchains — including Ethereum, Arbitrum, OptimismBasePolygonCeloFantomGnosis, and Avalanche.

The Graph is one of our success stories at coinIX. We invested 46k EUR in the Graph back in 2020 in the form of a SAFT or simple agreement for future tokens and it reached 1,5M EUR.

 

About coinIX Capital GmbH

Since 2017, coinIX Capital GmbH, headquartered in Hamburg, has been at the forefront of analyzing blockchain projects and cryptocurrencies, facilitating investments in this dynamic sector. Comprising specialists with extensive experience in asset management, venture capital, and cutting-edge technology analysis, the coinIX team manages a portfolio boasting over 20 investments in blockchain startups alongside crypto assets. Shares of coinIX GmbH & Co. KGaA are listed on the free market of the Düsseldorf Stock Exchange and are also traded on the Berlin and Munich stock exchanges.

 

About coinIX COINVEST SCI1

Launched in June 2022, coinIX COINVEST SCI1 is an open domestic special AIF under the KAGB. As a sub-portfolio of coinIX COINVEST Investment Stock Corporation with variable capital, its assets are managed by coinIX Capital GmbH, acting as a registered capital management company. Available for subscription by professional or semi-professional investors, the fund has the flexibility to invest up to 100% of its capital in crypto assets, aiming for a diversified portfolio of digital assets actively managed through ongoing selection processes. Additional income streams are generated through staking and other blockchain-native mechanisms. With the ISIN DE000A408Q55, subscriptions to the fund are only available directly through the investment company, with private investor acquisition prohibited.