Tuesday, March 24, 2015

Machine Learning - Inventing the Singularity

Machine Learning

Inventing the Singularity

Recently, the dangers of Artificial Intelligence(AI), have been raised by more than a few eminent thinkers of current times. Elon Musk even went as far as calling it inventing the Devil. Too dramatic, you might say? I have also heard from many bright minds in the middle of this Artificial Intelligence research and revolution, the people developing these machine learning technologies, people who defend the technology and dismiss the concerns being raised, claim that Elon Musk and Bill Gates don't understand the state of AI and have no idea what they are talking about.

I stand clearly and convincingly on the side that Artificial intelligence has the "potential" to be Evil, to become the devil, the singularity that consumes everything else. More powerful than the invention of the atom bomb.  I might sound like an alarmist at this point. But my conviction comes from an understanding of the nature, direction and potential of the current class of Machine Learning technology. So, let me explain.

Let me be very clear from the very beginning, I think machine learning has a huge potential to do good, be a force for good, do great things.  And we should continue to make great strides in all these areas.

But, as they say with great power comes great responsibility. It applies to machine learning. Its potential is limitless, and so are its dangers. And the dangers are even higher if we are completely oblivious to it. The following is just some insight towards, what makes it powerful, what makes it risky and unpredictable, recognizing its risks and dangers.

I have a background in artificial intelligence since my early days of engineering college, some 25 years ago. Though my day job is in all things Networking, I work for Cisco Inc, developing networking software that makes the internet do what it does, I have continued to pursue my passion for Machine Learning as a hobby throughout my adult life. So I have some insight about what I am saying below.

Very early incarnations of Artificial Intelligence were explicitly rule based, implemented in languages like PROLOG and LISP. You created rules of behavior to simulate intelligence. Then came the concept of learning these rules from raw data, hence the term Machine Learning. You would implement a generic learning algorithm that would feed on lots and lots of data and build rules from the data and then apply these rules on new and potentially unseen data. These were rigid systems that made black and white decisions.

But as we know, the real world is never truly black and white, its a million shades of grey, not just 50. Sorry. Couldn't resist that one.

Then came the statistical and probabilistic Machine Learning algorithms. People tried to develop mathematical models of the neurons in your brain and the network of neurons in your brain, also referred to as Neural Networks. These machines learned statistical and probabilistic rules and relationships from raw data and interactions with the world.

It is this new class of Learning Machines that I refer to, when I warn about the potential to be evil, the potential to be the singularity.

The current generation of these machines have become very proficient at things like recognizing speech, language, vision, etc. Self driving cars, that will be safer than humans, is already here. Its not science fiction anymore.

Ok. Machine Learning is becoming smarter by the day. And in some specific areas like vision, even smarter than humans.

But it is still a huge stretch to go from there to Evil, the Devil, the Singularity. Or is it?

Let me explain a bit more.

My conviction comes from a few key traits of this new class of machine learning algorithms.

  1. They are probabilistic decision engines.
  2. They learn their probabilistic rules from looking at large quantities of data and interacting with the real world. 
  3. Their over all decision making and interactions with the world are made from the collective decision making of millions of simple probabilistic rule nodes called neurons. 
  4. It is computationally infeasible to understand or test every potential input, interaction or decision that can be made by the collective decision making of these millions of individual probabilistic neurons.
  5. The recurrent version of these machines, are still in its infancy. These learn to make probabilistic  decisions, based not only from the current inputs, but also based on its own past probabilistic decisions and internal state. This makes these machines infinitely more complex, powerful and hard to understand what they have learnt.
  6. Larger these learning machines, larger its capacity to learn. And larger the sources of data the more they can learn from and the more complex to understand what it has learnt. 

The importance of the last 3 points above should not be under estimated and is the key to why I believe as I do.

Indulge me a for bit more. Let me elaborate on these points.

These new statistical and probabilistic machine learning algorithms don't learn explicit rules of interaction. They are NOT a collection of deterministic rules like, if this, do that. They are a huge collection of tiny probabilistic decision making neuron models that learn to make probabilistic decisions. And the intelligence of the whole machine comes from the probabilistic learning and decision making of these millions of these little nodes. 

Put it in relatively simple terms, imagine a crowd of a billion "simple", not so smart people, each voting "probabilistically", based on what they directly see or hear from the real world or from their neighbors, to collectively make every decision they make together. Ring a bell? Can you really understand the decisions they will make? Can you really know how they will decide under every condition, input or interaction? Can you really say with any certainty they the will not be evil or make catastrophic decisions. Think of every war, genocide or man made catastrophe in history before answering that question.

It is not possible to understand in real concrete terms all the rules that have been learnt by this huge collection of tiny learning machines and predict all possible outcomes that might be generated by them. Ok, its possible, but only theoretically. The computational requirement to completely understand a very large machine learning model with billions of these neurons would be exponentially higher.

This is true for the simple feed forward learning models which is the predominant machine learning technology now. Once you step into the recurrent version of these models, it becomes a dynamical system that is far more powerful and complex. They have historically been far more complex and difficult to train or understand what it has learnt. Its an area of Machine Learning that is still in its infancy, but progress is being made every year, and they are getting more powerful with time.

Their power and complexity comes from the fact that these probabilistic units or neurons not only make their decisions based on data inputs from the real world and/or the decisions of other neurons at the current time, but take into consideration the probabilistic decisions and state of its neurons from earlier times. This means many things, each good and bad depending on the scenario. Now, not only can they make good or bad decisions, they can continue to make these good or bad decisions long after the stimulus or input has ceased to exist.  A bad decision doesn't just affect the current choice, but can continue to affect future decisions. Continue to improve on a good decision or worsen a bad decision. Learn from good examples just as well from bad examples. Make choices based on learnt probabilities of choices, learnt probabilities of right and wrong, learnt probabilities of good and bad.

A recurrent machine learning model, is one step closer to self conscious thought and decision making.

This might might sound more more like how we humans think. And you will be absolutely right. It is. That is exactly what current generation machine learning is trying to model. But the size and complexity of current generation neural networks is similar to that of the brain of a fly. But its growing and evolving every day. Now imagine something the size of a 1000 human brains, that can learn from every piece of data available to it from all across the world. And what it learns is based on what its taught, what data it sees and the conclusions it gleans from it. This is not a matter of if, any more, but when.

It took 16000 interconnected machines to recognize cats in a video, in an experiment by Google.  A year later it took 16 machines with GPU(graphics processing units) that are way smarter at arithmetic. So computing is not the barrier. The algorithms keep improving every year, learning machines officially have supervision i.e. they smarter than humans at least in some limited vision tasks and will be driving cars soon. In the machine learning world, if computing and the algorithm is the rocket, the data needed for them to learn from, is the rocket fuel, as one eminent machine learning scientist, Andrew Ng, put it in last weeks GPU Technology conference. And data is now available everywhere in spades, petabytes of it and growing exponentially.

In a such dynamic, probabilistic model, its learning driven by huge amounts of data, its decisions governed by a potentially long history of inputs and previous decisions, its learning potential and consciousness is limited only by the amount of computing power and data we throw at it.  For these systems, any choice or decision, even a murderous, destructive or even catastrophic one, does not have a zero probability, it just might have a very low probability.

And even that, we can't be sure of, because we truly can't understand what rules it has learnt, what their probability is or the exact sequence of events that could trigger that decision. That is truly what makes it both powerful and dangerous. You understand and control a nuclear reaction. But how do you control and risk manage something that is just as powerful, but you truly can't understand.

To summarize the big points of concerns to watch for

  1. Recurrent Learning Machines are closer to inventing self conscious intelligent thought than anything invented so far, and at this point we don't really even understand how close.
  2. Their level of intelligence is only limited by the amount of computing and data we throw at it. They certainly have the potential to surpass humans.
  3. It is theoretically not possible to understand all the rules it has learnt and how the rules translates to events in real life. Trying to understand the probability of every outcome for every possible sequence of events can be exponentially more complex. So this creates an inherent level of uncertainty and hence risk to the decisions that they make.
  4. The universal nature of this technology means that it can be applied to learn from a wide range of data and solve many problems. This means that it can eventually control very vitals parts of society and make decisions that are life or death. A technology that can become an integral part of life.
There isn't another technology in history that really compares to AI in these aspects and is pretty unique.

And let me be clear, the potential for a AI singularity is just the final big ticket catastrophic risk. There are many other intermediate risks and uncertainty, strewn all along that path as mine fields, that needs careful thought and consideration to navigate. They get riskier as the system gets more intelligent and intertwined with every aspect of our life.   

Now are we there yet, clearly and most definitely, not yet. None of the machine learning algorithms that exist today can do, what I claim they can do eventually. The technology is still in its infancy and its not clear how close we are to machines of such intelligence. We could be decades away or just a simple algorithm tweak away. But the key attributes I list about these learning machines all exist and are currently evolving. The direction they are evolving is clearly headed there.

So when truly smart people like Elon Musk and Bill Gates sound a warning, everyone should listen. Not to shut down research in this area all together.
But to start thinking about its dangers, and the needed checks and balances.

Make sure we recognize Pandora's Box from a mile away, let alone trying to open it. But have no doubt in your mind, that it truly has the potential to be Pandora's Box.