AI, ML, Deep Learning and Neural Networks
Four words that get mixed up
Open any tech news site and you will see these four words everywhere: AI, machine learning, deep learning and neural networks. Often in the same sentence. Often used as if they mean the same thing.
They do not mean the same thing. But they are not four separate things either. They sit inside each other, like a gift that someone wrapped four times.
By the end of this lesson you will know where each one sits, and you will be able to look at any "AI" product and say which of the four it really is.
The picture to keep in your head
Artificial Intelligence
The goal: computers doing things that normally need human intelligence.
Machine Learning
One way to reach that goal: learn from examples instead of hand-written rules.
Deep Learning
Machine learning with many-layered neural networks. Best at images, audio and text.
Neural Networks
Layers of simple maths units. What deep learning is built from.
AI is the biggest box. Machine learning is one way of doing AI. Deep learning is one kind of machine learning. Neural networks are what deep learning is built out of.
Now let us open each box one at a time, starting from the outside.
AI: the big goal
Artificial Intelligence (AI) is the goal of getting computers to do things that normally need a human brain. Understanding speech. Recognising a face. Playing chess. Suggesting a movie you will probably like.
Notice what that definition leaves out. It says what the computer should do, but not how. And for a long time, the "how" was simply people writing rules by hand.
Deep Blue, the IBM computer that beat world chess champion Garry Kasparov in 1997, mostly ran on search and rules that people designed. It learned very little on its own. It was still called AI, because playing chess at that level takes intelligence.
Tip:So when someone says "AI", they are telling you the goal. They are not telling you how the computer gets there.
Machine learning: learning from examples
Writing rules by hand works for chess, where the rules of the game never change. It falls apart for messier problems. Try writing rules to catch spam SMS.
Block anything with the word "free"? Your mobile operator uses that word too. Block anything with a link? Then half your delivery updates disappear. And the moment you block one trick, spammers switch to a new one. You would be writing rules forever.
Machine learning (ML) flips the problem around. Instead of writing the rules, you collect thousands of messages that are already marked "spam" or "not spam". The computer studies them and works out the pattern by itself.
Traditional programming
You write the rules
Works when you can spell the rules out. Try doing that for every kind of spam SMS.
Machine learning
The computer finds the rules
You bring examples that already have answers. What the computer learns from them is called a model.
That learned pattern is called a model. You will hear that word in every lesson from here on, and lesson 1.6 is all about what it really means.
Key Points
- Your email app moving spam out of your inbox.
- Your bank sending a fraud alert when a UPI payment looks unusual.
- A food delivery app estimating that your order will arrive in 32 minutes.
- A shopping app showing "customers also bought" under a product.
All of these are machine learning. In each one, nobody wrote the exact rule. The system learned it from past examples.
Deep learning: machine learning with many layers
Classic machine learning is great when your data fits in a neat table. Rows of flats, with columns for size, location and rent. Rows of students, with columns for attendance, study hours and marks.
But a lot of real data is not a neat table. A photo is millions of tiny coloured dots called pixels. No single pixel tells you "this is a cat". The "cat-ness" only appears when you look at how thousands of pixels are arranged together.
Deep learning (DL) handles this by learning in layers. The first layer spots simple things like edges. The next combines edges into shapes. The next combines shapes into eyes, ears and whiskers. The last layer puts it all together and says "cat".
That is all "deep" means here: many layers stacked on top of each other. It has nothing to do with the model thinking deeply.
Key Points
- Face unlock on your phone.
- Voice typing in WhatsApp or Google Keyboard.
- Google Lens reading text from a photo.
- Chatbots like ChatGPT.
Tip:Deep learning needs a lot of data and a lot of computing power. For a table of a few thousand rows, classic machine learning is usually faster, cheaper and just as accurate. Deep learning is not automatically "better".
Neural networks: what deep learning is made of
A neural network is a set of very simple units connected in layers. Each unit does one small job: it takes in a few numbers, decides how much each one matters, adds them up, and passes the result to the next layer.
On its own, one unit is almost useless. Connect thousands of them in many layers, and together they can recognise faces or translate languages.
The name comes from the brain, because the first idea back in the 1950s was loosely inspired by how brain cells pass signals. But do not let the name scare you. A neural network is much closer to a big pile of simple maths than to an actual brain.
When a neural network has many layers, we call it a deep neural network. Training those is what deep learning means.
One example, all four boxes
Take face unlock on your phone and walk it through the boxes.
Key Points
- AI: the goal is to recognise that the face in front of the camera is yours. That needs intelligence.
- Machine learning: nobody wrote rules like "the owner's nose is 3.2 cm long". The system learned your face from examples.
- Deep learning: the input is a camera image, which is exactly the kind of data that needs many layers.
- Neural network: the thing actually running on your phone when you look at it.
Not everything goes all the way in. An old chess program built on hand-written rules is AI but not machine learning. An app that predicts flat rents from a table of past rents is machine learning, but it usually does not need deep learning.
Where people get confused
Key Points
- "AI and ML are the same thing." ML is one way of doing AI. Every ML system is AI, but not every AI system uses ML.
- "Deep learning is always better." It shines on images, audio and text. On normal table data, classic ML often wins and trains in seconds instead of hours.
- "ChatGPT is something different from all this." It is deep learning: a very large neural network trained on a huge amount of text.
- "Neural networks work like the human brain." They borrowed the name and a loose idea. How they actually work is maths.
Why this course starts with classic ML
Most of this course is about classic machine learning, not deep learning. That is on purpose.
The big ideas, like how a model learns, how to tell if it is any good, and why it sometimes fails, are much easier to see in a simple model. Once they click, they carry straight over to deep learning. People who skip ahead to deep learning usually end up coming back for them.
Quick check
An old chess program follows rules written by grandmasters. Is it AI? Is it machine learning?
It is AI, because playing chess well takes intelligence. It is not machine learning, because nobody trained it on examples. People wrote its rules.
Is all deep learning also machine learning?
Yes. Deep learning is one kind of machine learning. The reverse is not true: plenty of machine learning uses no neural networks at all.
You have a spreadsheet of 3,000 students with attendance, study hours and final marks. You want to predict marks. Deep learning or classic ML?
Start with classic ML. It is a small table of numbers, which is exactly where classic ML is strong. Deep learning would need far more data and would probably not do any better.
Recap
Key Points
- AI is the goal: computers doing things that need intelligence. It does not say how.
- Machine learning is one way to reach that goal: learning patterns from examples instead of writing rules.
- Deep learning is machine learning with many-layered neural networks. It is strongest on images, audio and text.
- Neural networks are layers of simple maths units. They are what deep learning is built from.
- All deep learning is ML, and all ML is AI. It does not work the other way round.
Next up: how a machine actually learns. When it is just a computer and a pile of numbers, what does "learning" even mean?
Theia
Can you explain this concept?
Practise AI, ML, Deep Learning and Neural Networks with realistic interview questions. Choose spoken or typed answers, get feedback on your reasoning, then return to the material that needs work.
Sign in to practise this conceptThe session stays focused on this lesson. Your selected interview level sets the bar.