Machine Learning: What is that?

Introduction

The last few years have seen a couple of major buzzword that almost everyone is talking about - AI, Cloud and Blockchain. Of the lot, AI seems to be grabbing everyone's mind with surprise, wonder and also some fear. What is all this about? AI comes along with a chunk of other terms - Machine Learning, Neural Networks, Deep Learning, Bots. We have all seen some amazing products like Alexa, Siri, Google Assistant, Cortana. And we can see that some more ones Self driven cars, personal friends like Samantha are out there on the horizon. Along with this, we are all grabbed by fear of a revolution that machines can soon conquer the earth and enslave us. This article gives an overview of what is AI, covering all these aspects and much more. I have made all attempts to stay away from all technical jargon.

Where did this start?

Since ages unknown, man has been trying to offload tasks to others, in order to simplify his daily life. For example, before the advent of the stone age, people used their own hands to break fruits and nuts. Sure it hurt them; but they had no option. Some genius then came up with the idea of using stones instead. Everyone around must have opposed him, claiming that he is inviting dependence on those stones. But over time, everyone came to accept the benefits and started using stones. What they essentially did was to offload a painful task to an external tool, called the stone. Since then people have come up with various ways of offloading their own difficult tasks to external tools. That has been the driving factor behind most inventions - from stones to computers and mobiles.
We began with physical tasks and around a century ago, we had reached a point of time where almost all physical tasks could be performed by external machines. Though we had machines to take care of most physical actions, we had to help these machines with the decision of what needs to be done. We were burdened with the job of deciding which action is appropriate for now, and then getting the machine to do it. That is when mankind moved into the world of computing and later into Artificial Intelligence - to externalise the intellectual load. To help us with the task of taking routine decisions.
Any such decision can come from various aspects of our thought process.

Calculation

We calculate based on specific parameters, and decide on an action that would lead to the desired result. For example, knowing well the equations of profit and loss, and with the information about availability of products, a trader can decides on the strategy that can maximize the profit. This calculation does not need anything more than the equations and the information about the current status of things. These calculations can increase in complexity, but they are feasible with these limited inputs. This is calculation based on information.

Learning

Over the years, we have learnt a lot from surroundings. These lessons may or may not be conscious. They may be based on experience or explicit teachings. But, over the years we have all accumulated "lessons" that impact the way we think. These may or may not add positive value to our decisions, but we use what we have learnt to analyse the current situation. Based on this analysis, we try to predict which action could lead to the desired result. Thus, our decisions are affected by what we have learnt. Such learning is hazy. We may not be sure about details about precise source of each lesson. But we have gathered them, and we use them as an input to our calculations.

Emotions

Emotions are the major factors in our decisions. Emotions make us feel good or bad about events and make us attempt to choose based on this 'feeling'. It often happens that a particular action may not be the best as per what we know and what we calculate. Yet we do it because "I like it". We do it because it makes us feel happy. This is often the more appropriate approach than the above two. Such emotions play a major role in our decision. In fact, the influence of emotions is often much stronger than the previous two.

Intuition

And there are times when we overlook all the above, and do something entirely different - just out of a gut feeling, or intuition. Such actions may not be justified under any of the above. Yet we intuitively feel that this is right, and it turns out to be so. Such intuitions have been an important source of most innovations. They have been instrumental in the progress of mankind. This is the fourth source of our decisions.
These are just a few of the several aspects of our mental effort, the effort in deciding which action is appropriate for this moment. Anyone familiar with Roger Sperry's theory of Right Brain and Left Brain analysis can easily make out that each is based on the left brain as well as the the right brain - with increasing tilt to the right brain. The whole of AI is an attempt to extract and isolate the explicit, analytical activity out of each of these, and then get a machine to do. Thus, allowing you to focus further on the creative aspects of your work.

Machine Learning

After offloading physical efforts to machines, we have also started offloading some of these mental efforts. We have successfully offloaded all possible calculations and information. Today, very few of us waste our effort of calculating and remembering stuff. We have computers and mobile phones that easily take care of this job. The next we are attempting is the ability to learn from surroundings, and use the learnt information to analyse events and take decisions based on what we have learnt. Machine learning deals with this aspect of artificial intelligence. This is not a new branch of computing. It has been several decades since we have worked on this science. But now, it has gained a lot of momentum because we have seen a lot of commercial value of its application.
Essentially, machine learning is the field of study that gives computers the ability to learn without being explicitly programmed. In more formal terms, a computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.
It's not as complex as it sounds! In order to understand machine learning, we should try to understand how humans learn. The most commonly quoted example - probably the most important learning we went through is standing up. A child is not able to stand up on its feet. There are hundreds of muscles in the body. He has no idea about which muscle leads to a given action. All that he knows is that everyone around him is able to stand up and walk. So he tries to do it, and falls several times. Subconsciously, his mind observes each such event. It notes the events and actions through all his attempts to stand up. The child subconsciously makes a note of how a particular muscle in the legs seems to impact his position while he stands. Each attempt to stand up gives a fresh set of observations to the mind - on events that kept him standing and events that led to a fall; and the effect of various muscular movements on either. Based on this, the mind builds up a map of muscular movements against its effect on the position of the body.
The mind just "learns" from a generalisation based on several consecutive observations. The process matures as this set of observations build up and one day, he is able to stand up, walk and run... None of these observations used any kind of calculations or measurements. The child does not need any knowledge of mechanical engineering to define the stability of the body. No knowledge of anatomy is required to identify which muscle in the body impacts a particular joint. Everything is just "learnt" from data gathered from observations over several events. Each such observation adds to what was learnt.
Now consider the state when the same person gets into a roller coaster. His observations are entirely different. The same fall is simulated again and again. The jerky motion tosses his body around. At this time, the machine moves in in various directions, in high speed - forcing him to use his muscles to hold on. The mind again tries to learn from these events. But, this gives an entirely different set of observations. These are quite different from the ones that the mind had gathered while it was learning to stand up. This confuses the mind. Because it is forced to rework what it had learnt. And, when the person gets off the roller coaster, he is not able to stand still - what the mind had learnt years ago is now disturbed by the recent observations. This confusion remains for a few minutes and as the mind continues to observe, it realises that what it had learnt before continues to hold. Then it just pushes aside the recent set of observations as an exception - possibly specific to the roller coaster - and carries on. If he is a regular at the roller coaster, very soon he is pretty stable on the ride as well as on coming down. The mind soon identifies two different sets of observations - specific to the ground and the roller coaster.
Machine learning is attempting to replicate, in a very limited scope, this behavior of the mind - the mind's ability to classify and learn from events.

AI, Machine Learning, Neural Networks, Bots...

There are many terms associated with AI. What exactly do these mean? AI - Artificial Intelligence - is the most generic term. It is the branch of science that attempts to externalise intelligence - the ability to take decisions. Machine Learning is one particular implementation of AI - the only implementation so far. Machine Learning helps machines learn from the environment and use this information gathered by learning. Neural Networks is a particular algorithm used in Machine Learning. The concept of Neural Networks was inspired by the way neurons are laid out in the brain. Hence the name. NLP or Natural Language Processing is a branch of Machine Learning - mostly implemented using Neural Networks. NLP helps machine learn and work with natural languages.
Bots are a product developed for implementation on the field - using NLP. Bots are capable of accepting user input in form of a human language and respond in form of a human language.

Facts and Fictions

Will I lose my job?

Yes. Artificial Intelligence is going to topple the entire social and economic structure across the globe. If you are doing what a machine can do, nobody will need you once the machine is in action. The first to lose their jobs would be the people managers. If machines do all the work, there is no need for a people manager. You would need Engineers to manage these machines!!
On a serious note, if you do what a machine cannot do, there is no way a machine can replace you. If you are only using what you have learnt from measurable facts, a machine will definitely learn it and do your job much faster and much more efficiently, than you can even attempt to.
But if you are using skills beyond that, there is no way a machine can replace you. If you are innovating; if you are using your personal skills; if you have an understanding of non-measurable parameters; if you have the knack of hitting the bulls eye without explicit analysis, a machine can never ever replace you. In simple words, if your job demands only your left brain, be assured you have lost your job. If you need the right brain, no machine can replace you.

Will Machines Conquer the Earth?

Never. It is possible, and almost certain that humans will create machines that are capable of destroying the earth. Many scientists including Stephen Hawkins have warned us that the way things are moving is not healthy. Just as nuclear physics led to the nuclear bombs, machine learning can lead to a machine that can be taught to destroy the earth. In fact, the defence research institutions around the world have already done most of that job. But just like any other machine, these machines will remain a slave of the operator.
As we discussed before, machines can only calculate and adopt measurable facts, to repeat what was done before. This so called intelligence and emotions in the machines is only an effect that we conceive. On the ground level, the AI algorithms can only map a binary input to a binary output. The machine has no idea of this source of the input or the target of the output. It has no idea if the output results in an automated surgery or a driverless car or a nuclear missile destroying the world. The dumb machine only knows of the electrons flowing from the input port to the output port.
Any amount of development in these algorithms will not lead to intuition, the ability to innovate, emotions or desires or ego. Any amount of development will never create a machine that will naturally develop the urge to defeat humans and conquer the earth. The Terminators will remain a fiction.

The Facebook Hoax

Some time back, the world was shocked by the sensational news that Chat Bots in Facebook started communicating with each other in language apart from English, and hence had to be terminated. It sounded as if Facebook just sacrificed their servers to save humanity from an invasion by the machines - they had created machines that were capable of conquering the world... Pure nonsense! Well, they did not lie. All that they said is that they killed the bots because they were communicating in a language other than English. That is only because the machines could not learn English correctly.
Don't worry, the world is safe!

Basic Concepts

Having seen what is machine learning, lets try to see a glimpse of the implementations and applications.
Any application that anyone has developed, essentially takes an input to generates an output. It started with basic binary operations like AND, OR, NAND... Over the years, the relation and correlation between the input and output has evolved to be more and more complicated. Input is now a huge chunk of information accumulated over a long duration, from a variety of sources. Also the output now manifests as various expressions of the information over a variety of devices, over a duration of time. There are several intermediate steps in this relation of input and output. But, essentially any application continues to generate an output for a given input.
For a long time, developers went through the trouble of identifying this relation in English, and then translating it into code that uses several features of the programming language to implement the logic required. This was fine so long as the relation between input and output was simple enough to be understood and expressed in a human language. Reusing code in form of libraries and by partitioning the application into modules and layers, people managed to implement more and more complicated logic. But there was an end to this.
I can implement the logic only if I understand it precisely. Over time, the complication of our applications has grown beyond our own capacity to identify this logic. Consider for example, the problem of identifying a person from the photograph. We know roughly how this should be done. But, it takes a huge amount of analysis and effort to identify the precise relation in form of a formal logic.
This is where Machine Learning helps us. Instead of implementing identifying and implement the precise logic for each and every problem of this kind, it is a lot more easier to implement the logic that can learn such a complicated relation. Machine Learning is the process of letting the machine identify the relation between input and output and implement it by itself.
There are three main types of Machine Learning:

Supervised Learning

When you learn under supervision, you have someone to lead you to the answer and correct you if you are going wrong. That is exactly what supervised learning does. This algorithm works on defining a target variable which is to be predicted from a given set of input variables. Using the set of input and output variables, we generate a function that map inputs to desired outputs. The training process continues until the model achieves a desired level of accuracy on the training data.

Unsupervised Learning

Unsupervised learning does not have any supervision, to monitor if the learning is correct or in the right direction. There are no targets to be achieved - that can drive the application. Unsupervised learning is based on analyzing the input and identifying the inputs, clustering them based on their properties and expecting similarities between a cluster. It is widely used for segmenting customers in different groups for specific intervention.

Reinforcement Learning

Here, the machine is trained to make specific decisions. The machine trains itself continually using trial and error. This machine learns from past experience and tries to capture the best possible knowledge to make accurate business decisions.
This seems to be similar to supervised learning. Many experts consider it to be just a special case of learning. The only difference here is on the focus on the end to end process rather than individual parts. Supervised learning has a concept of increasing and decreasing error that can be optimized. But in Reinforcement Learning, is required when the outcome is only right or wrong

Comments