Leveraging blockchain to make machine learning models more accessible

Significant advances are being made in artificial intelligence, but accessing and taking advantage of the machine learning systems making these developments possible can be challenging, especially for those with limited resources. These systems tend to be highly centralized, their predictions are often sold on a per-query basis, and the datasets required to train them are generally proprietary and expensive to create on their own. Additionally, published models run the risk of becoming outdated if new data isn’t regularly provided to retrain them.
We envision a slightly different paradigm, one in which people will be able to easily and cost-effectively run machine learning models with technology they already have, such as browsers and apps on their phones and other devices. In the spirit of democratizing AI, we’re introducing Decentralized & Collaborative AI on Blockchain.
Through this new framework, participants can collaboratively and continually train and maintain models, as well as build datasets, on public blockchains, where models are generally free to use for evaluating predictions. The framework is ideal for AI-assisted scenarios people encounter daily, such as interacting with personal assistants, playing games, or using recommender systems. An open-source implementation for the Ethereum blockchain is available on GitHub, and our paper “Decentralized & Collaborative AI on Blockchain”—co-authored by myself and Bo Waggoner, a postdoc researcher with Microsoft at the time of the work—will be presented at the second IEEE International Conference on Blockchain July 14–17.
Leveraging blockchain technology allows us to do two things that are integral to the success of the framework: offer participants a level of trust and security and reliably execute an incentive-based system to encourage participants to contribute data that will help improve a model’s performance.
With current web services, even if code is open source, people can’t be 100 percent sure of what they’re interacting with, and running the models generally requires specialized cloud services. In our solution, we put these public models into smart contracts, code on a blockchain that helps ensure the specifications of agreed upon terms are upheld. In our framework, models can be updated on-chain, meaning within the blockchain environment, for a small transaction fee or used for inference off-chain, locally on the individual’s device, with no transaction costs.
Smart contracts are unmodifiable and evaluated by many machines, helping to ensure the model does what it specifies it will do. The immutable nature and permanent record of smart contracts also allows us to reliably compute and deliver rewards for good data contributions. Trust is important when processing payments, especially in a system like ours that seeks to encourage positive participation via incentives (more to come on that later). Additionally, blockchains such as Ethereum have thousands of decentralized machines all over the world, making it less likely a smart contract will become completely unavailable or taken offline.
Hosting a model on a public blockchain requires an initial one-time fee for deployment, usually a few dollars, based on the computational cost to the blockchain network. From that point, anyone contributing data to train the model, whether that be the individual who deployed it or another participant, will have to pay a small fee, usually a few cents, again proportional to the amount of computation being done.
Using our framework, we set up a Perceptron model capable of classifying the sentiment, positive or negative, of a movie review.


