Difference between Artificial Intelligence, Machine Learning and Deep Learning.

Deep Learning is a subset of Machine Learning,which itself a subset of Artificial Intelligence.

Artificial Intelligence (AI):
Any algorithm or technique that allows computing devices to make decisions or solve problems that previously required humans to perform them manually can be called an AI algorithm or technique. An AI can be either a huge stack of simple if-else statements or a very complex algorithm.

If you have studied Artificial Intelligence in your school or college,you would read something titled “Rule Based Systems”, which is nothing but a collection of IF THEN statements,to perform a task. An example of a Rule based system is MYCIN,which is developed to identify bacteria causing severe infections and to recommend antibiotics by Stanford,which has basically nothing but IF THEN statements.

Screenshot from MYCIN Paper

In the 80s AI began to grow from just a Rule based systems to more and more complex algorithms which gave birth to a new field called Machine Learning.

Machine Learning (ML):
Machine Learning is something that makes sense to be actually called as “Artificial Intelligence” rather the other older Rule based systems.

So what is Machine Learning?

Machine Learning is any algorithm that takes data (be it text, image, audio, video or anything that can be called as data) as the input, understands the pattern that underlies in the data and uses the understood pattern to predict the outcome of the new data.

So how does Machine Learning differ from the previous systems?

Previously humans need to hardcode IF and THEN statements for every possible input and output of a problem in order to make a AI program, but if the output relies on many features instead of few it becomes a tedious task for humans to write a code to make a program that works fine. Consider an example,where we use IF THEN statements to predict the price of a house given its size as an input.Obviously,the price of the house doesn’t only depend on its size,it depends on many features like no. of bathrooms it has, How old the house is?,Has a swimming pool or not?, etc. For a human to understand how each these features affect the price if the house and write something like 10000 lines of code is such a pain and would take months to complete it.

So in order to solve complex problems like this, Intelligent minds across the world have invented various algorithm like Decision Trees, Support Vector Machines, Linear Regressions, etc.

Each of those algorithms work differently, and some does a better job than others in some task and the other does a better job in some other tasks. The job of the human here is to find which algorithm does better on which data.

If you used Kinect it’s good to know that it uses an ML algorithm called Random Forest to determine your position.

Sample illustration

One of those such algorithms is called Artificial Neural Network(ANN) inspired from how human minds work, even though it is inspired from the working of human brain it doesn’t come close to how our brains actually work, Some of the AI experts even think ANN is a wrong name provided to this algorithm.

But anyway the birth of ANN also created a new subfield of AI,a subfield of Machine Learning called Deep Learning.

Deep Learning (DL):
You may think that, we already have other Machine Learning algorithms that can solve various problems,so why the invention of ANN is a big deal?

The answer is, ANN can solve any problem with astonishing accuracy levels if we have enough data. ANN is also referred to as the universal function approximator which simply means ANN is one algorithm to rule them all!

The ANN was invented back in the 80s but it remained dead for a decade because nobody back in 80s had a huge amount of data and computing power to run those algorithm in a computer, even now without the power of GPUs may take months to understand the pattern in the data. As Time passes the ANN algorithm were tweaked to create new algorithms called Convolution neural network(CNN), Recurrent Neural Network(RNN), Generative adversarial networks(GANs) etc.

You would have probably these without knowing they are the one being used.
CNN is usually used to recognize images, Facebook uses it to Tag people automatically.
RNN is used to process sequence data,Google uses it in Google Translate.
GANs are usually used to generate data,Prisma uses it to apply styles of paintings to your photo.

All things apart,Why Deep Learning is called “Deep” Learning not something else?
A ANN looks like this if you have to visualize:

Two Layer Neural Network (The Input Layer not counted as a Layer)

As you can see the above Neural Network has an Input Layer, Hidden Layer and an Output Layer. Whenever you count the no. of layers in the network just ignore counting the input layer, So the above image represents a Two layer Neural Network. Every Neural Network has at least 2 layers, An Input and an output layer, One to receive the input and one to predict the output. The no. of hidden layers to be used and the no. of neurons(the nodes in each layer) is our choice depending upon the complexity of the problem to be solved.

So as we need solutions for complex problems we either increase the number of neurons(inefficient in many cases) used or increase the number of hidden layer in the network.As we increase the number of hidden layers the network becomes Deep, that resulted in the name “Deep Learning”.

Deep Neural Network


Artificial Intelligence is a general term, that includes Machine Learning in which we provide data as an input to an algorithm and get the predictions as output. One such algorithm is the “Neural Network” which unlocked the possibility to solve much complex problems if we have huge amount of data and processing power,the more hidden layer we use the deeper the neural network gets hence the name Deep Learning. The term AI is often used interchangeably with both Machine Learning and Deep Learning, even though using the term AI instead of ML or DL is not a crime, I still feel calling a ML algorithm “AI” will only mislead non-tech people.