Artificial intelligence and blockchain
Looking at the advances in technology over the past few years, it’s hard to name two more breakthrough technologies than artificial intelligence and blockchain. The former opened up entirely new possibilities in the fields of data analysis, predictions and robotics. The later one elevated decentralization, transparency and security as a result of the immutability built into the blockchain. Both technologies are still in a fairly early stage of adaptation, but the decade that begins may be a period of full bloom for them. The new economy based on data, artificial intelligence and decentralized systems is a promise both tempting and giving rise to certain concerns. Can artificial intelligence and blockchain cross their paths permanently? Can their cooperation bring a synergy effect, or will their further development be more silo, with only few points of contact? What are the fields for potential collaboration and what are the benefits of using both technologies simultaneously?
Artificial intelligence – technology of the (near) future
Paradoxically, AI is a pretty old science – its origins date back to the 1950s. The field has gone through many difficult times, mainly for two reasons: too little data and insufficient computing power. In the meantime, it managed to develop many methods that relied heavily on statistics and mathematical models – everyone heard about machine learning, right? However, more advanced AI has flourished in recent years. First, huge amounts of data have emerged, mainly collected by corporations and state organizations in the US and China. Second, the availability of high computing power is at its highest ever. We can even get it for free, for non-commercial and scientific use, or buy it in any quantity in the cloud.
Finally, the idea of Deep Learning emerged. Using neural networks powered by huge amounts of data,
processed in highly efficient environments, Deep Learning allowed to obtain amazing results in many fields where human dominance had been unquestionable so far: chess, GO, computer games, image recognition, speech processing, data analytics, medical diagnosis, production of new drugs – the list could be much longer. Interestingly, deep neural networks partially resolved one of the fundamental problems of machine learning, which was the laborious process of human describing data before presenting it to an algorithm. Neural networks do it largely by themselves during the learning process (so-called feature extraction).
Artificial intelligence is currently in a phase of narrow practical applications – the so-called narrow AI. This means that the practical applications of artificial intelligence are perfect for narrow areas, some of which I mentioned above. However, let’s face it, in the privacy of well-guarded corporate and government laboratories, work is underway to create a general AI that will have the autonomy and ability to generalize problems and abstract them to higher levels, similar to that of humans. This will completely change the balance of power and the nature of the global economic order to a much greater extent than covid-19 did, although the pace of implementing this change will be much slower and more controllable. This transformation is probably inevitable and is of great concern to most of us. After all, as a species, we have been used to overwhelming intellectual domination over the rest of the species on earth for millennia. The prospect of a creature that can surpass us intellectually is deeply disturbing.
If you want to learn more about AI and some basic concepts related to it, please read one of my previous posts.
Blockchain? Wait, what’s that?
When someone starts talking about blockchain, one of the first associations is likely to be cryptocurrencies, especially bitcoin. This is understandable, because the blockchain was first used in practice on a massive scale by Satoshi Nakamoto (according to many, this pseudonym was used by the now-deceased Hal Finney – but the question of Nakamoto’s identity, as well as the question of whether anyone has access to his wallet’s private key 😉 is a topic for a completely separate post). Satoshi created the first independent, decentralized and fully electronic currency. Blockchain technology is easy to explain using the example of bitcoin, but if someone thinks that blockchain equals cryptocurrencies, you have to tell them: not so fast!
The foundations of blockchain technology are cryptography, peer-to-peer network and the so-called Ditributed Ledger Technology (DLT), i.e. a distributed database, managed by many participants, without one distinguished coordinator. But let’s start from the beginning: where did this name even come from? Blockchain is one way to store information. As in traditional databases, this information is grouped into blocks – hence the phrase “block”. These blocks are, in turn, bound together in a serial chain by the cryptographic hash function – hence the phrase “chain”. To put it simply: mining a block is calculating the hash for its content (bitcoin uses SHA-256) and writing the hash value to the next block, where this value will be one of the components to calculate the hash for this new block. And so the chain goes forward. Currently (October 2020), the bitcoin blockchain stores approximately 580 million transactions, and the total blockchain size for bitcoin is approximately 300 GB.
Bitcoin has been operating since 2009 and during this time no one has successfully carried out any attack that would change the data of even a single transaction. Why? Because the hash for each block should meet certain specific criterias, e.g. contain N zeros at the beginning. To get the correct hash, miners change the content of the block by randomly modifying the dedicated nonce field, or if none of the nonce values yield the desired hash, by slightly changing the content of the block in some other acceptable way – more about the practice of bitcoin block mining can be found here. As a result, mining a single bitcoin block is computationally very expensive. If someone wanted to change a transaction in the bitcoin blockchain that was registered several blocks ago, he would have to change the content of this particular block (to change the transaction), recalculate the hash for it, and due to the referential binding of subsequent blocks with previous hashes, also calculate new hashes for subsequent blocks! And all of this while the network is constantly producing new blocks. Theoretically, such an attack is possible, but in practice it is technically impossible and economically unjustified.
Bitcoin’s resistance to attacks is a confirmation of one of the most important features of blockchain technology – the guarantee of the immutability of entries in DLT. This is of great importance, obviously for financial transactions, but also for all other potential applications where the certainty that we see true and unchanged data is crucial, e.g. medical test results, voting results, the content of the land and mortgage register of the real estate that we plan to purchase, forensic evidence, data analysis on the basis of which the company’s management makes key decisions, etc.
When discussing the most important features of blockchain technology, it is also worth noting that:
- The public blockchain is a fully distributed and independent structure in the sense that it does not depend on any central organization (central bank, government, corporation), so these organizations cannot influence DLT records in any way. This does not mean, of course, that governments, central banks and corporations cannot use this technology. They are using it now and the prospects for using it are becoming more and more far-reaching. The dispersion of the blockchain network also provides resistance to failure and potentially too much influence of a single network participant on its operation.
- All transactions in the public blockchain are public and available to everyone. This does not mean that everyone can look into our wallet, unless they know its address. There are actually blockchains available that ensure that some data is hidden in the block, which significantly increases privacy.
- All transactions are not only immutable, but also indisputably time-stamped – this is due to the nature of the blockchain, which is a structure that only adds further entries. Archival records cannot be modified.
The above is only a modest part of the entire ecosystem of blockchain technology, and discussing the properties of this technology in detail is beyond the scope of this article. For those interested in deepening their knowledge about bitcoin in particular, I recommend this article, in which the author managed to explain the basics of this technology in an very accessible and consistent way.
As an interesting fact, I would like to add that the content of my blog is protected by the WordProof plugin, which uses blockchain technology to protect intellectual property.
Artificial intelligence and blockchain – how to combine it?
Let’s take a moment to consider how the two technologies fit together in terms of key features.
One of the main uses of AI is to predict the future. Assessing the situation on the road of an autonomous car, predicting the next move of a chess player, or forecasting economic behavior. Blockchain, meanwhile, focuses its attention on a permanent record of the past – entries in DLT, once agreed by the network, will remain unchanged until the end of its existence.
AI is an extreme data consumer. To be effective, it needs data just like people need oxygen to live. Data in huge amount. Blockchain is basically a database whose main task is to record data and serve them in a decentralized and transparent manner. The amount of data consumed by blockchain is relatively small.
Artificial intelligence is extremely dynamic in the sense that it adapts its operation and the results it generates to the changing environment. It is largely based on statistics and probability. Blockchain is rather static. Could be even described as deterministic or predictable.
The feature that definitely binds both technologies is their huge appetite for more and more computing power.
I don’t know how about you, but it seems to me that artificial intelligence and blockchain have features that can perfectly complement each other. Their skillful use in one solution can give a strong synergistic effect. You may say that artificial intelligence and blockchain are like fire and water. Although, in my opinion, hydrogen and oxygen will be a more accurate comparison. The first is dynamic and highly explosive. The latter itself supports the chemical reactions. Combined together, they make water – a substance necessary for life.
However, abandoning the philosophical and chemical refelctions, let us consider in which areas you can count on the greatest synergy.
Is centralization good for the development of artificial intelligence?
Let me start with the most important area in my opinion – the need for greater decentralization and democratization of AI. The current state, when most of the revolutionary AI solutions are created by the largest corporations and few governments can lead to nothing good. At best, it will further increase social inequality and accumulate most of the world’s wealth in the hands of a small percentage of the total population. Social inequalities are inevitable in a capitalist economy, but over-exaggeration generally leads to social unrest, populist governments, and sometimes revolution.
The risk of AI centralization comes from the concentration of data, computing power, and the most fertile minds in the hands of the largest corporations and few governments. As a result, solutions will be created that will serve those governments (for control) and those corporations (for further capital accumulation). Do we want AI development to go in this direction? Or would we prefer AI development to be more democratized?
One of the proponents of decentralized AI, Ben Goretzel, humorously noted that a few years ago, people were convinced that artificial intelligence would kill us as soon as it surpassed the intellectual level of its creators. Partially it was the aftermath of movies like The Matrix or Terminator. Nowadays, people are more worried about AI taking their jobs. This interesting shift in perceptions of AI may mean that humans have come to terms with the vision of AI destroying our species, but they just wouldn’t like to be unemployed in those last few years. 😉 I recommend watching Ben Goertzel’s speech on TEDx.
Goertzel and others like him promote the ideas of solutions based on AI and blockchain in search of decentralized artificial intelligence and ultimately Artificial General Intelligence (AGI) – a creature with a level of thinking equal to human beings. Such developed artificial intelligence will not be controlled by one organization, but could be managed and developed in a democratic and decentralized manner.
On the basis of these beliefs, many projects have been created, out of which I have selected two that should be briefly mentioned. The first is the DAIA foundation, which brings together organizations working on decentralized artificial intelligence using blockchain. This is intended to counteract the concentration of AI power in one place. If someone is looking for information about Decentralized Artificial Intelligence projects, DAIA may be a good place to start. One of the assumptions of its founders is the conviction that AGI can be achieved not through one network, but through many distributed networks, communicating with each other and sharing data. And these possibilities can obviously be provided by blockchain technology. This assumption is also adopted by the second project – SingularityNET. One of its goals is to provide a decentralized exchange of artificial intelligence solutions to which you can upload an AI model and announce it in a decentralized network so that the company that needs such a service can easily, quickly and safely use it.
While these projects appear to be somewhat underinvested and attract little attention at present, they are extremely important in terms of democratizing AI and the impact of the wider social group on the shape and form of further AI development. If it could be compared to something, it might be (to some extent) to the open-source movement in its early stages of development and the later impact it had on the democratization and demonopolization of many IT solutions.
How to protect your data and their privacy while making money on them?
Artificial intelligence feeds on data. In today’s economy data can be more valuable than gold. Especially the data that is scarce, contains sensitive data, and is well prepared for use in machine learning. Why? One can risk a statement that in machine learning projects between 30% and 60% of the time and costs are spent on the initial data collection, initial analysis, business discussion, checking whether data meets various criteria (e.g. related to the protection of sensitive data), then data cleaning, quality assurance and transformation to the desired form.
What if we have a properly developed set of rare medical data that we would like to share, so that other scientists can use them in their research? What if we would like to sell such a dataset? Will a dataset be copied or changed in an unauthorized way? How will unauthorized changes affect results of research by other teams? Several projects in the field of artificial intelligence and blockchain have addressed the above problems. One of such projects is the Ocean Protocol. In a nutshell, using the exchange provided by Ocean Protocol, you can create something like an AI asset on it. Such an asset may be a properly prepared dataset, but it may also be an already trained model, ready for use. After publishing it in Ocean Protocol, assets are registered in a blockchain and receive an unique identifier. All assets have metadata describing them and the owner obviously receives a private key confirming ownership. Ocean Protocol also provides resources to store AI assets. Interestingly, in order to protect privacy, the model can be processed in the Ocean Protocol infrastructure without disclosing the data to any third party, which is especially important for sensitive and private data.
Unused computing power
As I mentioned above, artificial intelligence and blockchain certainly share one trait – the greedy consumption of computing power. One of the potential fields for cooperation seems to be the sharing of unused computational power. Currently, most of the AI computation takes place in centralized data centers. They have a specific performance limits, and corporations that provide computing power regulate access to it with pricing mechanisms. This can severely restrict innovation outside the world of wealthy organizations, especially among academics and businessmen in countries with currencies with lower purchasing power. And the demand for computing power related to artificial intelligence is growing more than linearly every year. Blockchain could naturally democratize access to computing power based on the fact that the vast majority of blockchains act as computationally powerful peer-to-peer networks.
Testing smart contracts
In the area of cryptocurrencies, 2020 will be remembered as the year of decentralized financial solutions. This movement is known as Decentralized Finance or DeFI for short. It is an interesting technological branch as it democratizes one of the basic needs of modern man – financial management. By democratization, I mean independence from a single central institution that supervises and controls all financial operations. This control is multi-level, because the banks are governed by supervisory institutions and central banks. This, of course, has huge advantages, but also considerable disadvantages. Going into the pros & cons of DeFI is beyond the scope of this article. It is important from our point of view that DeFI, like many other blockchain-based applications, bases its operation on the so-called smart contracts, i.e. applications published on the blockchain, the task of which is to automatically execute transactions of a specific type. They are saved in the blockchain, and thus do not require supervision of a trusted third party. DeFI in 2020 are at a very early stage of development. Solutions are popping up everywhere, and quite frequent implementation errors are costly for developers and for so far mainly speculative investors. There are currently many hacker attacks in the sector based on either backdoors or deliberately or unintentionally hidden vulnerabilities, often ending in so-called rug pull or exit scam. Nevertheless, the DeFI market is booming and more and more money is flowing into it. Some projects can attract millions of dollars in speculative investments in a short time. This is where AI can enter the scene, opening up opportunities in two areas. Firstly, fast and automated testing of new solutions. Especially that those solutions seem to be heavily underinvested in terms of quality assurance. Testing with artificial intelligence can rely on machine-assisted formal verification or the support of automated testing. A second area where AI can work great for applications published on the blockchain is actively monitoring the behavior of smart contracts to detect threats and data leaks in real time. Of course, no AI can replace human testing for now, but the implementation of such tools may mean that at least we will not have to deal with total testing in production.
Artificial intelligence and blockchain – the future is at hand
In this article, I tried to introduce the nature of AI and blockchain technology, point out the similarities and differences and give examples of fields for potential cooperation. Both artificial intelligence and blockchain are still in early stages of business use. The degree of their joint use in practical solutions is in its infancy. This stage can be compared to the internet in the early 90s, when it was still a technological curiosity and only a small part of companies and organizations tried to use the internet for business purposes. Currently, nobody questions the role of the internet in the democratization of knowledge. And the largest companies base their power on the internet. Will this also happen with artificial intelligence and blockchain? I think so. Will it be the result of close cooperation of both technologies in the area of Decentralized Artificial Intelligence – time will tell.
Did you like the post? I’d be grateful if you could recommend it and/or share it.
If you want to be informed about new articles on my blog, please follow my Twitter account.