Machine Learning and Blockchains
I’ve been a data scientist for ~5 years now. And I’ve worked in cryptocurrencies for about 6 months now. Naturally, I’ve been curious about how the two spaces can intersect.
Surprisingly, my daily work at Coinbase doesn’t do a huge amount when it comes to working with on-chain data. Being at a centralized exchange does provide a biased view on an industry that focuses on decentralized technologies.
Blockchains, by definition, are distributed transaction records whose entries are validated cryptographically for millions of users. In other words, blockchains are databases. And where there’s databases that big, there’s potential for data science.
Benefits
Of course, I don’t want to combine two technical buzzwords just for the sake of making something new. There has to be a good reason for combining these concepts other than creating a digital Frankenstein.
I attended a talk at a crypto conference that focused on applications of AI directly on the blockchain. Some of the ideas include interactive NFT’s that tailor themselves to their owner. Or intelligent stablecoins that can learn from market conditions in order to adapt themselves. Though this idea might be hard to digest given the recent collapse of UST, one of the most prominent algorithmic stablecoins.
There’s a few other applications that come to mind:
Transparency:
One major issue with machine learning and AI models is a lack of transparency; there’s no way to know what’s going on under the hood. There’s no way of knowing how exactly how the data is used. And it’s hard to trust a prediction if you know nothing about where it came from.
All data on a blockchain, as well as all code that’s executed on it, is publicly recorded and accessible. That provides an opportunity for more transparency, and thus more trust, in any models built and executed on it.
Automation:
Blockchains are notorious for having issues with transaction speeds, scalability, and fraud. AI integrations could provide an opportunity to automate some of the more cumbersome parts of the transaction process. Also, applying fraud detection techniques directly at the transaction layer could go a long layer towards protecting users from the scams that run rampant in the cryptocurrency space.
Consensus:
Consensus mechanisms, in short, are the ways in which computers that process and track crypto transactions can collectively agree on which transactions occurred and were valid.
A paper I found suggested using machine learning as part of a consensus mechanism called Proof-of-Learning. Similar to the Proof-of-Work that Bitcoin operates on, it involves having computers solve a Kaggle-style machine learning problem in order to mine the corresponding coin. The main value being that the problems solved to create consensus are of meaningful value.
One of the biggest critiques of cryptocurrencies is that the computation put into Proof-of-Work problems consumes and wastes a lot of energy on computation. This could create a blockchain where the computation energy goes towards beneficial applications beyond just validating transactions.
Technical Challenges
AI algorithms are expensive to run. On a blockchain with smart contracts, computation literally costs money. So to train large scale AI on a blockchain can easily become expensive.
Also, any data and code on a blockchain is immutable. And machine learning models require constant maintenance and retraining as data evolves over time. So how do we change ML models on a system that is by design, unchangeable?
Last but not least, cryptocurrencies are inherently volatile; it’s not easy to make predictions around them. While crypto trading bots have seen some success, it’s a hard market to predict consistently. If it were, then why work a full time job?
Parting Thoughts
At the end of the day, data is data. AI is a powerful discipline in that it has applications across a wide variety of fields. And similar principles can be applied across multiple industries, whether that’s materials, or gaming, or cryptocurrencies.