The Fact Machine II : Machine Learning isn’t Cryptography

Bitcoins coolest trick is its voting mechanism, it incentivizes playing according to the rules and creates trust. We should reinvent the principle for smart Machine Learning Algorithms. This will allow us to introduce ‘facts’ about the real world into our Systems

In the 1st part, I described how Bitcoin organizes Miners to ensure they are playing by the rules such that they deliver a Blockchain with ordered Transactions that cannot be changed. Blockchains are blind to facts of the real world, but Neural Networks can simulate in important aspects, how humans categorize the world.

A neural network can detect a car, many neural networks with the right incentives will establish the fact there really is a car. Then we record the fact into the Blockchain and our smart Contracts rewards a false parking ticket.

‘So we want to somehow organize Algorithms from the field of Machine Learning like we organize Bitcoin Miners, because somehow we might be able establishing facts this way? But these are entirely different disciplines. That sounds pretty strange, and on top of that, there are some smart folks in the ethereum space, which gave a serious thought how to get data into smart Contracts. Did you think about all that?’

So Neural Network are not Cryptography at all

Granted, but whatever: that is the Challenge, stupid! The question is if we can organize Neural Networks in a similar fashion to miners, so that they vote and establish a fact: converge against what humans would consider the truth (‘foul!’). Of course, mathematically these are entirely different areas. I am not looking for an alternative mining puzzle, I do not try to generate the security attributes of the Bitcoin Blockchain by using an Algorithm like one of the amazing Machine Learning Algorithms, that could have some useful effects instead of burning as much Energy as Bitcoin does.

Let’s have a short comparison, maybe (always!) we can learn from Bitcoin.

Bitcoin hashing puzzle, those SHA 256 algorithms, are carefully chosen to achieve just what we want: the Bitcoin Blockchain security feature ‘immutability’ and eventually avoid you double spending your bitcoin. ‘Double spending’ is btw another concept you should look up, if you are not familiar with it. The original white paper is actually pretty easy to read, so read Satoshi if you haven’t, but 1st finish this blog.

Bitcoin difficulty targets represent a mathematical challenge, which cannot be answered by googling or looking into the outside world. This is not like when we ask, who was the roman emperor in the year 40 A.D. or how the weather is today in Amsterdam. Also, you can very easily adjust the difficulty of the ‘Bitcoin question’: you just adjust the difficulty target and statistically you can have a good guess, when on average a miner in the network will solve the puzzle. That currently happens around every 10 minutes. Check out hash functions if that all sounds martian to you.

Real life problems are different: You answer them by looking around you (‘was that a foul?’) or looking things up (‘when did emperor Nero live again?’). Sometimes they are fuzzy and difficult to answer (‘how was the mood today in town?’) and sometimes have very clear answers (‘what is your phone number?’). You and others will learn and your performance improve. Different with hashing, there we have crystal clear answers and the miners performance doesn’t improve just by doing things all over again 24/7. ‘Real life questions’ is the kind of questions Artificial Intelligence tries to help with. They are messy to deal with but the results are so much more useful than finding the right nonce to meet some difficulty target.

In Bitcoin, once someone found a solution that meets the difficulty target, it is easy to check that is the ‘correct solution’ — hard to find, easy to verify. That feature has an important function in the Mechanics of Proof of Work. The Miners’ race for the Bitcoin reward stops as soon as one Miner distributes the block with the right solution and everyone can verify that easily.

If we would organize a race between Neural Networks to determine, if someone played a foul or, there is no such clear end point. There is no clear verification step. There is no mathematically objective ‘this was a foul or not’ in the sense we can verify the Bitcoin Miner found the right nonce. Of course, we could get a master referee defining, what actually happened- but you see where it is going. This solution reintroduces the middleman, the central authority. We could just as well ask that guy immediately and forget about our race.

If you want to have a decentralized pattern, you could set up an artificial threshold. You will wait some minutes and / or for a minimum amount of votes from Networks. You could also check the results they deliver against previous races you ran, if you choose to store these results. In fact, in the interest of correct results you would give these networks access to fouls that were classified before, so they can learn. There would be a lot to investigate here to have a reliable and performant mechanism. Calling that an ‘Implementation Detail’ seems understating the importance and complexity of the task. But there doesn’t seem a reason why we would not be able setting up such an algorithm. Eventually, those who were part of the majority vote (the longest chain in Bitcoin terms) would win.

And then what: receive a prize?

Or they qualify for the next round of the Competition: Proof of Work or Proof of Stake or whatever other Mechanism you choose to create immutability. Because after you establish a fact you want to record it once and for all and allow the smart contracts to leverage them. Now your ‘referee smart contract’ could say ‘foul in the box implies penalty’.

I don’t mean to mix the Neural Network and Cryptography race, they have different means and different goals. One is to establish facts, you try to extract these from game theory and features of Artificial Intelligence Algorithms. The other one is to record the fact, immutably. We use game theory and cryptographic algorithms to achieve this.

No mix, a combination. You reuse the ‘Bitcoin trick’ for a different question and combine the two to first establish a fact and then record it.

Facts, not Oracles should feed smart Contracts

What is the more fundamental problem: facts or what judges do with them? Without facts, referees are a as good as a lottery at best or at worst they are an easy subject of coercion and corrupt. Smart contracts without facts are often blind and useless software machines. For digital assets like cryptocurrencies you can make some interesting smart contracts, but whenever your digital asset represents a real life asset you need this connection.

If you have a digital referee in a FIFA world cup game and you have two humans playing against each other on a console, things are beautiful: the computer can follow every step, it knows exactly what happens and gets the game represented in data structures and columns of 1s and 0s. The actors are part of the digital world -not so in a real football game. You need that connection to the outside world, your digital referee can just follow the same rules the FIFA game referee follows, but it needs to know things about the outside world.

Smart people writing smart Contracts know that, come on ! The topic in the ethereum space is often discussed under the header ‘Oracle’s’. A typical approach is to give a smart contract a connection to an outside data source, basically an API call. That could for example be a data source like Bloomberg. So essentially these platforms (for example oraclize, realitykeys, smartcontract, gnosis or oracul and I am sure there others out there) offer API calls from platforms to outside data sources, some also try to work with prediction markets. There are differences how to make the calls, how to prove there were not tampered with. One can come up with schemes to have several data sources confirm one fact to have things a little less centralized. One can dream up elaborate prediction markets to help with the facts. But these approaches so far and as far as I can see are not very decentralized. These services are also limited because you can really just check the facts that Bloomberg or the prediction market would offer.

Built in your fact engine in a Consensus Mechanism is what I propose, do it like Satoshi. Facts are so fundamental, it’s worth it. Only after you established the facts, an unstoppable and uncorrupted smart contract can be a useful device. It would do what the referee does: we know someone hit someone’s foot before hitting the ball in the box. The rule now says: this calls for a penalty. Referees can make mistakes and they can be corrupt. Smart Contracts can hardly get corrupted, in such contexts Smart Contracts promise to be useful.

Next part, I wrap it up. I gonna ask the question who is the ‘real’ spiritual heir of Satoshi, which is of course a ridiculous questions. We don’t even know, who the guy was. But its a good moment to have a look how the Blockchain Industry, Ethereum and Hyperledger draw their Inspiration from Satoshi and see where I suggest a different focus. And I will clarify, what I am actually trying to say here, because we are really just saying (spoiler — alarm): Combining Machine Learning with Distributed Consensus Mechanisms like Bitcoins Proof of Work Principle is an interesting area to investigate because it can help us to establish and represent facts in digital Systems like Blockchains. But actually Blockchains and Smart Contracts don’t really matter that much and that I explain in the next part.

More by benedikt.herudek

Topics of interest

More Related Stories