Written byMichael Zargham.
The Emergence of Decentralized Artificially Intelligent Networks
Decentralized Artificially Intelligent Networks exist; if somewhat by happenstance, we have already created them. In this century, it is self evident that one cannot draw clear distinctions between technology, culture and society; one might argue, it was never possible, but the technologies of past centuries are taken for granted today. The changes to society and culture caused by shifts in technology frequently occur and are only afterward remarked upon. Blockchains and Smart Contracts in consort with quite modest artificially intelligent bots are active members of today’s “crypto-economy.”
AI tools from rules engines to statistical and machine learned models have long since infiltrated the financial industry with many more trades executed algorithmically than those executed by human traders.¹ The rise of crypto-currency investing has made algorithmic trading (as well as fundamental trading) more available to a large body of amateur quants; though it is hard to comment on their talent as we’ve experienced periods of extreme growth in which all participants made huge gains, as well as correction cycles which were scarcely possible to avoid without simply exiting crypto altogether.
This article steps beyond trading to arbitrary programatic economic activity enabled via blockchain networks. For a detailed example of programmatic economic activity please see the two part series on CryptoKitties by Markus Buhatem Koch which characterizes the economic activity and profitability of bots fulfilling a critical function in the game economy.²
I consider the CryptoKitties game to be an Engineered Economic System in the sense that the designers of the game included a role for external agents and provided rewards to incentivize fulfillment of that role. The practice of designing these incentives is called Token Engineering and is practiced by applying tools from optimization theory and mechanism design. An interested reader is directed to the three part series by Trent McConaghy.³
Meaningful token engineering is distinguished from simply arguing that one’s ICO token will grow in value by formal attention to the token’s role in driving the network towards a shared optimization objective associated with the network’s function, rather than the tokens value on a secondary market.
Setting aside jokes about ShitCoin(TM), this article is about AI and Blockchain, and the perspective that systems engineering gives us regarding the implications of combining these technologies. Before going further, it is necessary to set the record straight regarding what constitutes Artificial Intelligence (AI) because the most common association is with machine learning (ML) which is itself only a branch of AI.
Artificial intelligence includes:
- Control Engineering
- Signal Processing
- Machine Learning
- Any automated heuristics and other forms of mathematical engineering
Similarly, a generalized definition of a blockchain network is required in order to consider the combination of AI and Blockchain properly.
Generalized Definition of a Blockchain Network:
- A data structure: the “ledger” in crypto jargon. For the Ethereum network, the data structure is the state of the EVM. The network maintains the history of all changes to data structure, and thus the current state of the data structure.
- A set of methods which operate on the data structure. In the simplest case this is a transaction sending tokens from one address to another, but more generally defines the set of legal changes to the data structure.
- A consensus protocol: a set of rules for agreeing on the true state of the data structure, based on verifying the validity of transactions or more generally that the methods above were applied appropriately.
- A community: the set of agents (human or machine) which are participating in the network. Lightweight clients may broadcast transactions but full nodes are required to participate in validation process (consensus protocol).
Please note that this definition covers more than just Bitcoin and Ethereum, but rather a broad class of models for coordinating to agree on changes to the state of a data structure. This characterization still assumes prioritization of consistency over performance and availability in the sense of the CAP theorem.⁴ For more on the inherent trade-offs in decentralized systems, the reader should see Trent McConaghy’s article regarding his work on BigChainDB.⁵
There are a great many intelligent people working hard to solve computation and transaction rate scalability challenges in blockchain networks. Some projects aim to create new networks while others build on the success of existing frameworks. For the purpose of this article, I will step past the technical challenges in order to examine the economic networks that are emerging within the infrastructure that already exists.
Since blockchain nodes are effectively bots running autonomously, I prefer to characterize the blockchain infrastructure as a robotic network and to examine the system. To further delve into the relationship between blockchains and system models, the reader is directed to material on state machines.⁶ If one considers the blockchain network to be the plant of a robotic network, then an important property emerges immediately:
Agents within the system make local decisions with global information.
To put this in context, I did my PhD work on relatively general decentralized optimization and control problems and the fundamental barrier to finding globally optimal solutions with local actions is not that actions are local, but rather the missing information.⁷ To be fair, more information isn’t always better when those signals are deceptive or if the decision maker is irrational.
However, in our case the signals are coming from high fidelity sensors, the cryptographically secured blockchain data structure, and the decision making will be an optimization algorithm of some kind, engineered to make use of this sensor data. So, in this case I will assert that global information is strictly better than local information.
With this in mind, it is possible to define a blockchain-enabled artificially intelligent economic network:
- Sensors — the blockchain data structure, APIs to market data feeds and other sources
- Decoders — ETL software that accesses, sub-selects and restructures blockchain data for use
- Filters/Estimators — processes that remove noise and fuse signals to create useful signals
- Controllers — software that computes decision variables from signals available, including state feedback
- Actuators — smart contract code which defines the decision space and carries out decisions made by agents in the network
- Actions — the actions that are taken by agents; the loop is closed as these actions appear in the Blockchain data structure making them observable
Historically, economic systems are open loop systems, meaning that they do not have the capacity for state feedback, fundamentally limiting the levels of complexity that can be engineered effectively. The system defined above is closed loop. This means that it can be defined dynamically using state feedback to achieve stability around desirable patterns of behavior.
In physical systems, actuators have limitations defined by physics, often power limits or energy consumption requirements. This is also true in our blockchain networks: using smart contracts requires financial power and has computational limits. Using computation in a blockchain network costs gas fees (in the vernacular of the Ethereum network) even when the actions themselves have no financial costs associated with them. So much like in physical robotic networks there is an implicit energy optimization problem, but in the case of blockchains this is simply measured in the native cryptocurrency used for driving smart contracts.
In the figure above, the off-chain components labeled in blue are local to a node or agent in the network and kept private from the rest of the network. Some simpler closed loop systems could be entirely implemented on chain, but computation limits make this infeasible as the default configuration.
Since these bots are acting with financial power they have the potential to waste money by making bad decisions. Furthermore, security becomes an immediate concern as control hacking any part of this closed loop process could result in the theft of cryptocurrency by a bad actor tricking the controller into automatically taking actions that are against the interests of the human account holder.
Strictly speaking, any data feed used to make a decision to be executed in a blockchain network, as well as any decision system, is an attack vector. The cryptographically secure moniker does not extend to software systems operating outside of a network’s validation scheme. It is the responsibility of network participants to secure their private infrastructure in order to enhance their nodes with artificially intelligent closed loop systems. For cases where these closed loop systems are part of public services, scalability projects like the Truebit Protocol⁹ are paving the way for extending security guarantees to complex computations using verification games.
Closed loop systems are in the mathematical DNA of the natural world and are engineered properties of our most fantastical machinations. The necessity of human decision making (in the loop) has long been a limiting factor on economic networks. Algorithmic trading marks the entry of AI into financial systems, but it is a rather limited case, constrained by the centrality of the exchanges that facilitate those trades.
Our future will include intelligent agents that act on our behalf in economic networks. Some may lease our excess computational and storage resources; others may serve us targeted advertisements without disclosing our private data. I believe that we have done the economic equivalent of quantifying electricity and that we are as ill-equipped to imagine the future as Ampère was equipped to imagine an integrated-circuit motor-controller.
Feedback appreciated (pun intended); this is a working draft in an ongoing series exploring my thoughts and findings from applying systems engineering to the design, analysis and tuning of Blockchain-Enabled economic networks.
+ Opportunities and Perils in Emerging CryptoEconomic Networks
+ Case Studies on Economic Systems and Token Engineering
- https://medium.com/block-science/exploring-cryptokitties-part-1-data-extraction-1b1e35921f85 / https://medium.com/block-science/exploring-cryptokitties-part-2-the-cryptomidwives-a0df37eb35a6
BlockScience® is a complex systems engineering, R&D, and analytics firm. Our goal is to combine academic-grade research with advanced mathematical and computational engineering to design safe and resilient socio-technical systems. We provide engineering, design, and analytics services to a wide range of clients, including for-profit, non-profit, academic, and government organizations, and contribute to open-source research and software development.