paint-brush
How ICP's Chain Fusion Technology Enhances Decentralized AI Modelsby@ileolami
396 reads
396 reads

How ICP's Chain Fusion Technology Enhances Decentralized AI Models

by IleolamiSeptember 25th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Chain Fusion technology enables the ICP’s smart contract(canister) to connect with multiple blockchains in a decentralized way, removing the need for a single trusted intermediary like a bridge. This is achieved through decentralized bi-directional communication between the Internet Computer and other chains, and the ability of ICP smart contracts to sign and submit transactions to other chains.
featured image - How ICP's Chain Fusion Technology Enhances Decentralized AI Models
Ileolami HackerNoon profile picture


It is audible to the deaf and visible to the blind that we are in the era of Artificial Intelligence (AI). You might have noticed this even when you were young, thanks to movies from as far back as the 1900s, such as the Terminator series and The Matrix, etc.


Recently, there has been a rapid rise and widespread adoption of AI in our daily lives. This adoption spans various fields such as programming, finance, education, health, and so forth. It is fascinating to see the different features these AI models offer.


To show how powerful and innovative these AIs are, some people have started feeling threatened. Some are worried that AI is coming for their jobs. Is that true? Let me know in the comments section.


No matter how good something is, there is always a fault. These AI models are mostly centralized which means they rely on a single point of control or a limited number of nodes to function and the utilization of users’s data in training these AI models are not transparent and prone to attack. These limitations led to the innovation of Decentralized AI(DeAI).


Are you curious to know what DeAIs are, how they are trained, and the role of ICP’s Chain Fusion technology in enhancing these DeAI models? This article is the answer to that question.

Understanding Decentralized AI Models

Decentralized AI, or DeAI, refers to a type of artificial intelligence (AI) system that uses blockchain technology to distribute, process, and store data across a network of nodes. In a decentralized AI system, users can use pre-trained AI models on their local devices, allowing them to benefit from AI-generated insights without giving up control of their data to a centralized authority.


DeAI comprises two technologies, which are:

  • Artificial Intelligence (AI) allows machines and computers to imitate human thinking and decision-making processes.

  • Blockchain technology is a distributed and immutable ledger that securely stores data and information in a decentralized and reliable manner.


The idea behind DeAI is that AI is too powerful to be controlled by a small group of people. It should be more transparent, accountable, and fair.


In a traditional AI setup, training a model is like a conductor controlling an orchestra to create beautiful music. The Conductor, or central server, processes vast amounts of data, requiring immense computational power. This is similar to how companies like OpenAI train massive models on large, centralized servers.


However, in the Internet Computer protocol(ICP), the training of an AI model is different. Instead of one central conductor controlling the process, each participant acts as both a conductor and a musician, working together in harmony. This means every individual or machine in the network contributes to the training, decision-making, and execution of the AI model.

Benefits of Decentralized AI Models on ICP over Centralized AI Models

  • Trust and Transparency: The DeAI on ICP are fully on-chain model, which lies on its immutability and openness feature. Users don't have to blindly trust centralized servers; they can verify the model's training and inference process. This addresses a significant concern with centralized AI, where users often lack insight into data usage and model behaviour.


  • Data Security and Control: ICP's ability to securely access data from various blockchains using Chain Fusion(learn about this later). This suggests a potential benefit in terms of data security and control. Users could potentially retain ownership of their data while allowing DeAI models to access and learn from it, unlike centralized AI systems where data is often aggregated and controlled by a single entity.


  • Censorship Resistance: Running AI models on ICP could offer resistance to censorship. Centralized AI models are subject to control and potential manipulation by their operators. In contrast, DeAI on ICP could provide a more open and censorship-resistant platform for AI development and deployment.


  • Scalability: ICP’s DeAI offers better scalability than traditional AI systems. DeAI can adapt and expand as needed by using a network of connected nodes, processing tasks in parallel to increase overall capacity while maintaining high security and performance.


  • Inclusivity: ICP provides permissionless and composable access, promoting inclusivity and fairness. Individuals and small companies can also participate in AI development and decision-making, fostering innovation and collaboration.

How ICP’s Run DeAI Models

The Internet Computer (ICP) utilizes a combination of powerful hardware features and software applications to run AI models on-chain through:

  • WebAssembly Virtual Machine: The ICP leverages the WebAssembly virtual machine, which provides near-native performance for executing code, including AI models.


  • Deterministic Time Slicing: To handle long-running computations often required by AI models, ICP employs deterministic time slicing. This mechanism automatically divides the computation into smaller chunks and spreads them across multiple blocks, preventing blockchain performance disruption.


  • Powerful Node Hardware: The ICP network consists of nodes with impressive hardware specifications: 32-core CPUs, 512GiB RAM, and 30TB NVMe storage. This powerful hardware is designed to handle the demands of running AI models directly on the blockchain.

Overview of ICP's Chain Fusion Technology

According to Samuel Burri, the VP of Engineering DFINITY FoundationChain Fusion refers to the capability of smart contracts on the Internet Computer(ICP) to sign transactions and interact seamlessly with other blockchain networks, without depending on any single point of trust.

Chain Fusion technology enables the ICP’s smart contract(canister) to connect with multiple blockchains in a decentralized way, removing the need for a single trusted intermediary like a bridge. This is achieved through decentralized bi-directional communication between the Internet Computer and other chains, and the ability of ICP smart contracts to sign and submit transactions to other chains.

Core Components and Mechanisms of Chain Fusion Technology

From the explanation above, you can notice two components: Canister and Decentralized Bi-directional Communication.


  1. Decentralized Bi-directional Communication: this is a communication protocol that enables ICP to communicate with other blockchains in a decentralized and yet seamless manner.


  2. Canister: These are ICP smart contracts written in programming languages like Rust, Typescript, Motoko etc. They possess the ability to:

    • Sign and Submit Transactions: Canisters can directly sign and submit transactions to other blockchains. This enables ICP dApps to interact with other chains

    • User Experience: ICP's low cost, fast finality, and reverse gas model offer a user experience similar to traditional web services. Users can interact with non-ICP smart contracts via ICP using a standard browser, eliminating the need for crypto wallets or reliance on single points of trust.

    • High Performance: ICP smart contracts can support various web services, from social networks to AI models, offering enhanced power to dApps.

    • Vast On-Chain Storage: A single ICP smart contract provides up to 400GiB of storage, enabling application data storage on-chain and making decentralized storage accessible to non-ICP dApps.

    • Autonomous Operation: ICP smart contracts can schedule messages for themselves at any interval, allowing for autonomous operation without user input or arbitrage. Chain Fusion extends this autonomy to non-ICP smart contracts while maintaining decentralization.

    • Web2 Interoperability: ICP's HTTPS outcall feature allows canisters to interact with any web service in a replicated manner with deterministic responses. This brings Web2-Web3 interoperability to non-ICP dApps.


Flowchart depicting interactions facilitated by the Internet Computer Protocol (ICP).

Explanation:

a. The flowchart starts with Chain Fusion Technology as the central enabler.

b. ICP interacts with multiple blockchains (Bitcoin, Ethereum, Solana) through Chain Fusion.

c. Each blockchain executes its smart contracts, leading to a unified data flow back to ICP.

  1. Chain Key Cryptography: Chain Fusion leverages threshold signing which means private keys for signing transactions are securely distributed among a group of nodes, preventing any single point of compromise.


  2. Chain Fusion's security model relies on the honesty of a supermajority of subnet nodes. These nodes are operated by identifiable and DAO-approved providers in globally distributed data centres. Users place their trust in the decentralized nature of ICP and the consensus mechanism that ensures the integrity of the network.

How Chain Fusion Technology Enhances Decentralized AI Models

By now, you should have an understanding and ideas on how to incorporate Chain Fusion in the training of decentralized AI models.

One way Chain Fusion enhances DeAI models is through interoperability. For example, imagine you have a DeAI running on ICP that analyzes real market data from Ethereum and then uses this insight to target actions on a DEX built on Bitcoin. This ensures the data is true, verifiable, and transparent, unlike traditional AI, which cannot guarantee accurate data.


The blockchain trilemma remains a major challenge for every blockchain, often requiring a trade-off between security, scalability, and decentralization. What ICP does differently is ensure the capacity to facilitate faster training of DeAI models while guaranteeing maximum security through the use of threshold signing and access to real-time data.


For better understanding, Dominic Williams the founder of DFINITY Foundation shared more light on this and also shared a DeAI that recognize images based on the image provided:

Tools and Frameworks that enhance these DeAI model

These tools and frameworks provide developers with the resources to build, deploy, and run DeAI models on the ICP, leveraging its unique capabilities for decentralized and secure AI applications.


  1. Sonos Tract is an open-source AI inference engine supporting ONNX, TensorFlow, and PyTorch models. It is written in Rust and compiles to WebAssembly, making it suitable for integration into ICP canisters for on-chain inference12.


  2. Rust-Connect-Py-AI-to-IC is an open-source tool that facilitates deploying and running Python AI models on-chain, leveraging Sonos Tract2.


  3. Burn is another open-source deep learning framework written in Rust that supports ONNX and PyTorch models, also compiling to WebAssembly for on-chain execution on ICP. The MNIST example demonstrates its integration into a canister2.


  4. Candle is a minimalist ML framework for Rust, compiling to WebAssembly. An AI chatbot example shows how to run a Qwen 0.5B model in an ICP canister2.


  5. MotokoLearn is a Motoko package specifically designed for on-chain machine learning within the ICP ecosystem3.


  6. Rust: A systems programming language known for its performance and safety. Rust is commonly used for writing high-performance canisters on the ICP.


  7. Motoko: A language specifically designed for the Internet Computer by the DFINITY Foundation. Motoko is tailored to the needs of canister development, offering features that simplify the creation of secure and efficient smart contracts.


  8. Typescript: A statically typed superset of JavaScript that compiles to plain JavaScript. It is used for front-end development and can also be used in conjunction with ICP canisters.


Here is a graphical illustration of how chain fusion enhances DeAI Modesl:

Conclusion

Basically, Chain Fusion enhancesd reliability of DeAI models since they are highly programmed with canister and decentralised Bi-directional communication. You can rest assured that they are truly accurate. However, ICP DeAI is still in its primitive state, so you can be sure that more improvements and capacity are on the accuracy an the way.

References

Decentralized AI Models: Merging AI with Blockchain

How Decentralized AI Revolutionizes the Industry | Interexy

What Is Chain Fusion Technology and How Does It Transform Blockchain Tech

ICP