Introducing smart contracts for federated learning: How does Flock reshape AI production relations?

This article is machine translated
Show original
In the future, FLock also plans to launch a more user-friendly task initiation mechanism to realize the vision of "everyone can participate in AI".

Author: LINDABELL

In the previous round of decentralized AI hype, star projects such as Bittensor, io.net, and Olas quickly became industry leaders with their innovative technologies and forward-looking layouts. However, as the valuations of these established projects have been rising, the participation threshold for ordinary investors has also become higher and higher. So, in the face of the current round of sector rotation, are there still new participation opportunities?

Flock: Decentralized AI Training and Verification Network

Flock is a decentralized AI model training and application platform that combines federated learning and blockchain technology to provide users with a secure model training and management environment, while protecting data privacy and fair community participation. The word "Flock" first entered the public eye in 2022, and its founding team co-published an academic paper titled "FLock: Defending malicious behaviors in federated learning with blockchain", proposing the idea of introducing blockchain into federated learning to prevent malicious behavior. The paper elaborates on how to strengthen data security and privacy protection in the model training process through decentralized mechanisms, and also reveals the application potential of this new architecture in distributed computing.

After the initial concept verification, Flock launched the decentralized multi-Agent AI network Flock Research in 2023. In Flock Research, each Agent is a large language model (LLM) optimized for a specific domain, and they can collaborate to provide users with insights in different fields. Subsequently, in mid-May 2024, Flock officially opened the testnet of its decentralized AI training platform, where users can participate in model training and fine-tuning using the test token FML and receive rewards. As of September 30, 2024, the number of daily active AI engineers on the Flock platform has exceeded 300, and the cumulative number of submitted models has reached over 15,000.

With the continuous development of the project, Flock has also attracted the attention of the capital market. In March this year, Flock completed a $6 million financing round led by Lightspeed Faction and Tagus Capital, with participation from DCG, OKX Ventures, Inception Capital, and Volt Capital. It is worth noting that Flock is the only AI infrastructure project that received a grant in the 2024 Ethereum Foundation academic funding round.

The Cornerstone of Reshaping AI Production Relations: Introducing Smart Contracts into Federated Learning

Federated Learning is a machine learning method that allows multiple entities (often referred to as clients) to jointly train a model while ensuring local data storage. Unlike traditional machine learning, Federated Learning avoids uploading all data to a central server, but instead protects user privacy through local computation. Currently, Federated Learning has already been applied in various real-world scenarios, such as Google incorporating Federated Learning into its Gboard input method since 2017 to optimize input suggestions and text prediction while ensuring user input data is not uploaded. Tesla has also applied similar technology in its autonomous driving system to improve the vehicle's environmental perception capabilities locally, reducing the need for massive video data transmission.

However, these applications still have some issues, especially in terms of privacy and security. First, users need to trust the centralized third party, and secondly, in the process of model parameter transmission and aggregation, there is a need to prevent malicious nodes from uploading false data or malicious parameters, causing deviations in the overall model performance or even output incorrect prediction results. According to research published by the FLock team in an IEEE journal, the accuracy of traditional Federated Learning models drops to 96.3% when there are 10% malicious nodes, and further declines to 80.1% and 70.9% when the proportion of malicious nodes increases to 30% and 40% respectively.

To solve these problems, Flock has introduced blockchain-based smart contracts as a "trust engine" in its Federated Learning architecture. As a trust engine, smart contracts can achieve automated parameter collection and verification in a decentralized environment, and publish model results in an unbiased manner, effectively preventing malicious nodes from tampering with data. Compared to traditional Federated Learning solutions, even with 40% of nodes being malicious, the model accuracy of FLock can still be maintained above 95.5%.

Positioning as the AI Execution Layer, Analyzing Flock's Three-Layer Architecture

A major pain point in the current AI field is that the resources for AI model training and data usage are still highly concentrated in the hands of a few large companies, making it difficult for ordinary developers and users to effectively utilize these resources. As a result, users can only use pre-built standardized models and cannot customize them according to their own needs. This mismatch between supply and demand also means that even if the market has abundant computing power and data reserves, they cannot be transformed into actual usable models and applications.

To address this issue, Flock aims to become an effective system for coordinating demand, resources, computing power, and data. Flock positions itself as the "execution layer" by borrowing from the Web3 technology stack, as its core function is to allocate users' customized AI needs to various decentralized nodes for training, and to schedule these tasks to run on nodes around the world through smart contracts.

At the same time, to ensure the fairness and efficiency of the entire ecosystem, the Flock system is also responsible for "settlement" and "consensus". Settlement refers to the incentivization and management of participants' contributions, rewarding and penalizing based on task completion. Consensus is responsible for evaluating and optimizing the quality of training results, ensuring that the final generated model represents the global optimum.

Flock's overall product architecture consists of three main modules: AI Arena, FL Alliance, and AI Marketplace. Among them, AI Arena is responsible for decentralized model basic training, FL Alliance is responsible for model fine-tuning under the smart contract mechanism, and AI Marketplace is the final model application marketplace.

AI Arena: Localized Model Training and Verification Incentives

AI Arena is Flock's decentralized AI training platform, where users can participate by staking the Flock testnet token FML and receive corresponding staking rewards. After the user defines the required model and submits the task, the training nodes in the AI Arena will use the given initial model architecture to train the model locally, without the need to directly upload the data to a centralized server. After each node completes the training, there will be validators responsible for evaluating the work of the training nodes, checking the quality of the models and scoring them. If users do not want to participate in the verification process, they can also choose to delegate their tokens to the validators to receive rewards.

In the AI Arena, the reward mechanism for all roles depends on two core factors: the staking amount and the task quality. The staking amount represents the "commitment" of the participants, while the task quality measures their contribution. For example, the rewards for training nodes depend on the staking amount and the quality ranking of the submitted models, while the rewards for validators depend on the consistency of the voting results and consensus, the staking token amount, and the number and success rate of participations in the verification. The returns for delegators depend on the validators they choose and the staking amount.

AI Arena supports traditional machine learning model training modes, and users can choose to train on their own devices using local data or public data to maximize the performance of the final model. Currently, the AI Arena public testnet has 496 active training nodes, 871 validation nodes, and 72 delegating users. The current platform staking ratio is 97.74%, with an average monthly return of 40.57% for training nodes and 24.70% for validation nodes.

FL Alliance: A Microtuning Platform Managed by Smart Contracts

The model with the highest score on the AI Arena will be selected as the "consensus model" and will be assigned to the FL Alliance for further microtuning. The microtuning will go through multiple rounds of operation. At the beginning of each round, the system will automatically create an FL smart contract related to the task, which will automatically manage the task execution and rewards. Similarly, each participant needs to pledge a certain amount of FML tokens. Participants will be randomly assigned as proposers or voters, where the proposers will use their local datasets to train the model and upload the trained model parameters or weights to other participants. The voters will then summarize and vote on the model updates proposed by the proposers. Subsequently, all results will be submitted to the smart contract, which will compare the score of each round with the previous round to evaluate the progress or decline in model performance. If the performance score improves, the system will enter the next stage of training; if the performance score declines, the model verified in the previous round will be used to start another round of training, summarization, and evaluation.

FL Alliance, by combining federated learning and smart contract mechanisms, has achieved the goal of multiple participants jointly training a global model while ensuring data sovereignty. Moreover, by integrating different data and aggregating weights, it can build a global model with better performance and stronger capabilities. In addition, participants demonstrate their participation commitment by staking tokens, and they receive rewards based on model quality and consensus results, forming a fair and transparent ecosystem mechanism.

AI Marketplace: How to Provide Personalized AI Services?

The models that have been trained in the AI Arena and microtuned in the FL Alliance will be finally deployed to the AI Marketplace for use by other applications. Unlike traditional "model marketplaces", the AI Marketplace not only provides ready-made models, but also allows users to further modify the models and integrate new data sources to cater to different application scenarios. In addition, the AI Marketplace also integrates Retrieval-Augmented Generation (RAG) technology to enhance the accuracy of models in specific domains. RAG is a method of enhancing large language models by retrieving relevant information from external knowledge bases when generating responses, ensuring that the model's responses are more accurate and personalized.

Currently, the AI Marketplace has launched many customized GPT models based on different application scenarios, including BTC GPT, Farcaster GPT, Scroll GPT, Ethereum GPT, and more. We can use the example of BTC GPT to understand the difference between customized models and general models.

In December 2023, when asked "What is ARC20?" simultaneously to BTC GPT and ChatGPT:

  • BTC GPT's response: "The ARC20 protocol is a protocol built on the Bitcoin network that allows users to create, transfer, and upgrade digital items, such as Non-Fungible Tokens (NFTs) and fungible tokens. Through the ARC20 protocol, non-fungible NFTs and fungible tokens can be generated on the Bitcoin network. The main token of the ARC20 protocol is ATOM, which is used for various purposes within the protocol."

  • ChatGPT's response: "As of my last data update in January 2022, there was no widely recognized standard or technology called ARC20 in common technical, financial, or other domains. It's possible a new technology or standard called ARC20 has emerged since then, but I don't have any information about it."

From the responses of the two, we can see the importance and advantages of customized GPT models. Unlike general language models, customized GPT models can be trained on domain-specific data, providing more accurate answers.

What are the Similarities and Differences Between Flock and Bittensor, Both Supported by DCG?

With the recovery of the AI sector, one of the representatives of decentralized AI projects, Bittensor, has seen its token price surge by over 93.7% in the past 30 days, with the price once approaching its historical high and the total market value exceeding $4 billion again. It is worth noting that Flock's investor DCG is also one of the largest validators and miners in the Bittensor ecosystem. According to informed sources, DCG holds about $100 million in TAO, and in an article in "Business Insider" in 2021, DCG investor Matthew Beck recommended Bittensor as one of the 53 most promising crypto startups.

Although both projects are supported by DCG, Flock and Bittensor have different focuses. In terms of specific positioning, Bittensor's goal is to build a decentralized AI internet, using "subnets" as the basic unit, where each subnet is essentially a decentralized market, and participants can join as "miners" or "validators". Currently, the Bittensor ecosystem has 49 subnets, covering areas such as text-to-speech, content generation, and large language model microtuning.

Since last year, Bittensor has been a focus of market attention. On the one hand, it is due to the rapid rise of its token price, from $80 in October 2023 to a high of $730 this year. On the other hand, there have been various doubts, including whether its model of attracting developers through token incentives can be sustainable. Furthermore, in the Bittensor ecosystem, the top three validators (Opentensor Foundation, Taostats & Corcel, Foundry) have a combined TAO stake of nearly 40%, which has also raised users' concerns about its degree of decentralization.

In contrast to Bittensor, Flock aims to provide personalized AI services by integrating blockchain into federated learning. Flock positions itself as the "Uber of the AI field", where Flock acts as a "decentralized scheduling system" to match AI demand with developers. Through on-chain smart contracts, Flock automatically manages task allocation, result verification, and reward settlement, ensuring that each participant can fairly participate in the distribution based on their contributions. But similar to Bittensor, in addition to becoming a training node and validator, Flock also provides users with the option to delegate participation.

Specifically:

  • Training nodes: Participate in the training competition of AI tasks by staking tokens, suitable for users with computing power and AI development experience.

  • Validators: Also need to stake tokens to participate in the network, responsible for verifying the model quality of miners and influencing the reward distribution through their verification scores.

  • Delegators: Delegate tokens to miner and validator nodes to increase the weight of the nodes in task allocation, while sharing the reward earnings of the delegated nodes. In this way, even users without technical capabilities to train or verify tasks can participate in the network and earn rewards.

Flock.io has officially opened the delegator participation function, and any user can obtain rewards by staking FML tokens, and can choose the optimal node based on the expected annualized staking rewards to maximize their staking earnings. Flock also stated that the staking and related operations during the testnet phase will affect the potential airdrop rewards after the mainnet launch.

In the future, Flock also plans to introduce a more user-friendly task initiation mechanism, allowing individual users without AI expertise to easily participate in the creation and training of AI models, realizing the vision of "everyone can participate in AI". At the same time, Flock is actively pursuing various collaborations, such as working with Request Finance to develop on-chain credit scoring models, and collaborating with Morpheus and Ritual to build trading bot models, providing easy-to-deploy training node templates to allow developers to easily launch and run model training on Akash. In addition, Flock has also trained a Move language programming assistant for Aptos developers.

Overall, although Bittensor and Flock have differences in market positioning, both are trying to redefine the production relations in the AI ecosystem through different decentralized technology architectures. Their common goal is to break the monopoly of centralized giants over AI resources and build a more open and fair AI ecosystem, which is also what the current market urgently needs.

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments