Learn AI · Level 1 · Foundations · step 2 of 13
AI vs machine learning vs deep learning: how they fit together
AI, machine learning, deep learning, generative AI: people use these words as if they mean the same thing. They don't, but they're closely related. Think of four circles, one inside the other. Here's what each one means, how a computer actually learns (you can try it below), and where ChatGPT fits.
Artificial intelligence
The whole field: computers doing things we would call intelligent, such as playing chess, planning a route or understanding speech. It includes old-style programs that follow rules people wrote by hand.
IBM's Deep Blue, the chess computer that beat world champion Garry Kasparov in 1997
Machine learning
A kind of AI that learns from examples instead of following rules a programmer wrote. Show it enough past cases and it finds the patterns itself.
Gmail's spam filter, which learned what spam looks like from emails people marked as spam
Deep learning
A kind of machine learning that uses neural networks with many layers. It shines with messy, real-world data: photos, sound and language.
Face ID, which recognises your face to unlock an iPhone
Generative AI
Deep learning models that create something new: text, images, music, video or code. Chatbots like ChatGPT are built on large language models, one type of generative AI.
ChatGPT, Claude and Gemini writing text; Midjourney making pictures
Think of nesting dolls. Each circle sits inside the one around it. All deep learning is machine learning, and all machine learning is AI, but not the other way round. ChatGPT is all four at once.
Old AI follows rules. Machine learning learns them.
Take a spam filter. There are two ways to build one.
Machine learning wins when the rules are too many, too fuzzy or keep changing: spotting spam, recognising faces, understanding speech. Rules still win when they're simple and must never bend, like a tax calculation.
How a machine learns, in five steps
- 1. ExamplesCollect past cases with the right answers.
- 2. GuessStart with a rough, often random, guess.
- 3. Measure the missCheck how far off each guess is.
- 4. Adjust a littleNudge the settings to miss by less.
- 5. RepeatThousands or millions of times.
Try it: teach a computer to guess rent
Each dot is a flat: its size and its monthly rent. The line is the computer's guess for any size. The red lines show how far each guess misses. Drag the slider to make a better guess, or let the computer learn on its own.
The first guess, $10 per m², is far too low: most dots sit well above the line.
Made-up numbers, for illustration. Real models do exactly this, but adjust millions or billions of settings at once instead of one.
Three ways machines learn
Supervised learning
Learning with an answer key
Every example comes with the right answer, like flashcards. The machine learns to give the right answer for new cases.
Gmail learned from emails marked spam or not spam. Google says it blocks spam and phishing with over 99.9% accuracy. Source: workspace.google.com
Unsupervised learning
Finding groups on its own
No answers are given. The machine looks for patterns and groups things that are alike, without being told what the groups are.
An online shop sorting millions of customers into groups with similar buying habits, so it can tailor its offers.
Reinforcement learning
Learning by trial and error
The machine tries things, gets points for good moves and loses them for bad ones, and slowly works out what wins.
DeepMind's AlphaGo played thousands of games against versions of itself, then beat Go champion Lee Sedol 4–1 in 2016. Source: deepmind.google
Chatbots use all three: they learn language from huge piles of text, then are fine-tuned with good example answers and with people rating which replies are better.
What makes deep learning "deep"
A neural network is made of layers of tiny maths units. "Deep" just means many layers stacked up, each building on the one before. Here's roughly what happens to a photo of a cat.
- The photoTo the computer, just a grid of numbers: one per pixel.
- Layer 1: edgesSpots lines, edges and patches of colour.
- Layer 2: shapesCombines edges into curves, corners and textures.
- Layer 3: partsCombines shapes into parts: eyes, ears, whiskers.
- The answerWeighs up the parts: "cat", 97% sure.
Nobody tells the network to look for ears or whiskers: it discovers these steps itself during training. Researchers who looked inside such networks found exactly this build-up, from edges to whole objects (Zeiler and Fergus, 2013). The catch: deep learning needs huge amounts of data and computing power, which is why AI runs on powerful chips in data centres.
So where does ChatGPT fit?
- Artificial intelligence
- Machine learning
- Deep learning
- Generative AI
- ChatGPT, Claude, Gemini
In the very middle. Chatbots are built on a large language model: a huge deep neural network that learned from vast amounts of text to predict the next word. Do that well enough and it can write, summarise, translate and answer questions. That's generative AI.
It also explains their weak spot. They produce what sounds most likely, not what they've checked, so they sometimes make things up. One fix is to let them look things up first: see RAG explained.
From a room-sized machine to ChatGPT

- 1956Artificial intelligence"Artificial intelligence" gets its nameA summer workshop at Dartmouth College, organised by John McCarthy, launches AI as a field of research.Source: home.dartmouth.edu
- 1958Machine learningThe Perceptron learns by doingFrank Rosenblatt's Perceptron, an early neural network, teaches itself to tell cards marked on the left from cards marked on the right, after 50 tries.Source: news.cornell.edu
- 1997Artificial intelligenceDeep Blue beats KasparovAI without learning: IBM's chess computer won by brute force, checking 200 million positions a second.Source: ibm.com
- 2012Deep learningDeep learning takes offA deep neural network later known as AlexNet wins the ImageNet photo-recognition contest, missing 15% of photos against 26% for the next-best team.Source: image-net.org
- 2016Deep learningAlphaGo beats a Go championDeep learning plus trial and error masters a game long thought too hard for computers.Source: deepmind.google
- 2022Generative AIChatGPT launchesGenerative AI reaches everyone: a chatbot that writes, explains and answers in plain language.Source: openai.com
Quiz: which circle is it?
Pick the smallest circle each one fits in. Some aren't AI at all.
1 A thermostat that switches the heating on when the room drops below 20°C
Show the answer
Not AI It follows one fixed rule and never learns or adapts. Plenty of "smart" gadgets work like this.
2 IBM's Deep Blue beating the world chess champion in 1997
Show the answer
Artificial intelligence AI, but not machine learning. IBM says it won through brute-force computing power, checking 200 million positions a second, rather than by learning from examples. Source: ibm.com
3 Gmail's spam filter
Show the answer
Machine learning Nobody wrote a rule for every scam; it learned the patterns from huge numbers of emails that people marked as spam. Source: workspace.google.com
4 Face ID unlocking an iPhone
Show the answer
Deep learning Apple says Face ID uses machine learning, with neural networks that spot masks and other tricks. Faces are exactly the messy kind of data deep learning handles well. Source: support.apple.com
5 Google Maps predicting when you will arrive
Show the answer
Deep learning DeepMind's neural networks made Google Maps' arrival times up to 50% more accurate in cities such as Berlin, Jakarta and Tokyo. Source: deepmind.google
6 ChatGPT writing a birthday message
Show the answer
Generative AI It's also deep learning, machine learning and AI: every inner circle belongs to all the circles around it.
Short versions in the glossary: artificial intelligence, machine learning, deep learning, neural network and generative AI.
Go further
Five free picks, from easiest to most hands-on:
- Elements of AI: the best first course. A free online course from the University of Helsinki and MinnaLearn that over 2 million people have signed up for. No maths or programming needed, and you go at your own pace.
- Teachable Machine: train your own machine learning model in five minutes. This free Google tool learns to recognise pictures, sounds or poses from your webcam or microphone, with no coding. It’s supervised learning, which you met above, that you can try for yourself.
- But what is a neural network?: the clearest visual explanation of deep learning, from 3Blue1Brown, as a video or text. The next chapter, on gradient descent, is the “guess, measure, adjust” loop from our rent demo, done with millions of settings.
- TensorFlow Playground: watch a real neural network learn in your browser. Add layers, press play and see the patterns form.
- Google’s Machine Learning Crash Course: the next step if you want to build things. Videos, interactive charts and exercises; some maths and a little Python help.
Prefer reading? See our pick of the best AI books, from easy reads to textbooks.
How we put this guide together
The definitions follow how researchers and the big AI companies use these words. Facts come from primary sources, linked next to each one: Dartmouth College and Cornell University on the field’s early history, the official ImageNet 2012 results, IBM on Deep Blue, DeepMind on AlphaGo and Google Maps, Apple on Face ID and Google on Gmail. The layer-by-layer picture of a neural network is simplified from Zeiler and Fergus’s 2013 research paper, and the rent demo uses made-up numbers. We review this page every quarter. Spotted a mistake? Tell us.