AI basics
AI vs machine learning vs deep learning: what's the difference?
AI is the big goal, machine learning is one way to reach it, and deep learning is one kind of machine learning. A plain-English guide with everyday examples, including where generative AI fits.
Short answer
(AI) is the broad goal of making computers do things that normally need human intelligence. Machine learning is one way to get there: systems that learn patterns from data instead of following hand-written rules. Deep learning is a kind of machine learning that uses with many layers. Each one sits inside the one before, and generative AI, like ChatGPT, is built with deep learning.
Think of three circles, one inside the other
Picture a big circle labelled AI. Inside it sits a smaller circle, machine learning. Inside that sits a smaller one again, deep learning. Everything that is deep learning is also machine learning, and everything that is machine learning is also AI, but not the other way round.
- Artificial intelligence: any technique that lets a computer do something we'd call intelligent, like planning, recognising speech or playing chess.
- Machine learning: AI that learns from data. Show it examples and it finds the patterns itself.
- Deep learning: machine learning with large neural networks made of many layers, good at messy data like images, sound and language.
Artificial intelligence: the big goal
The term "artificial intelligence" was coined for a 1956 summer workshop at Dartmouth College. For decades, much AI was built by hand: experts wrote thousands of if-then rules. These expert systems could diagnose some infections or configure computers, but they broke when the world didn't match the rules.
A chess program that searches through possible moves is AI, even with no learning at all. So is the route planner in a sat-nav. The history of AI lesson tells the story from those early days to today.
Machine learning: learning from examples
Writing rules for everything is impossible. How would you write rules to spot every spam email? Machine learning flips the job around: you give the computer thousands of emails labelled "spam" or "not spam", and it learns the patterns that tell them apart.
There are three main styles, covered in three ways machines learn:
- Supervised learning: learning from labelled examples, like spam filters or house-price predictions.
- Unsupervised learning: finding structure in unlabelled data, like grouping customers with similar habits.
- Reinforcement learning: learning by trial and error with rewards, like a program that learns to play a game.
Many useful machine learning models are not deep at all. Decision trees and linear regression are still used everywhere because they are fast and easy to explain.
Deep learning: neural networks with many layers
Deep learning uses neural networks: layers of simple maths units loosely inspired by brain cells. "Deep" just means many layers. Early layers pick up simple patterns, like edges in a photo; later layers combine them into ears, faces and whole scenes.
Neural networks are old, but they needed lots of data and computing power. Around 2012, a network called AlexNet, trained on graphics chips, won the ImageNet image-recognition contest by a wide margin. Since then deep learning has driven most AI breakthroughs: speech recognition, translation, self-driving research and .
Where generative AI and ChatGPT fit
Generative AI is AI that creates new text, images, audio or video. Today it is almost all deep learning. ChatGPT, Claude and Gemini are large language models, very large deep learning models trained on text. So ChatGPT is AI, it is machine learning, and it is deep learning, all at once.
Side by side
- Rules or learning? AI can use either. Machine learning and deep learning learn from data.
- How much data? Classic machine learning can work with hundreds or thousands of examples. Deep learning usually wants far more.
- Explainable? Rules and small models are easy to inspect. Deep networks are harder to explain, which is what interpretability research tries to fix.
- Typical examples: a chess engine (AI), a spam filter (machine learning), face unlock and ChatGPT (deep learning).
Key takeaways
- AI is the whole field; machine learning is a subset; deep learning is a subset of machine learning.
- Older AI followed rules people wrote. Machine learning learns the rules from examples.
- Deep learning took off around 2012 thanks to big datasets and fast graphics chips.
- Generative AI and large language models are uses of deep learning.
Learn it properly, free
- What is AI, really?Beginner · 5 min
- How machines learnBeginner · 5 min
- Three ways to learnBeginner · 5 min
- Neural networks, gentlyBeginner · 6 min
- A short history of AIBeginner · 6 min
Terms in this post
Questions
Is machine learning the same as AI?
No. Machine learning is one part of AI. All machine learning is AI, but some AI, like a rule-based expert system or a chess engine that only searches moves, doesn't learn from data at all.
Is ChatGPT machine learning or deep learning?
Both. ChatGPT is a large language model, which is a deep learning model, and deep learning is a kind of machine learning. It is also, more broadly, AI.
Should I learn machine learning before deep learning?
It helps. Ideas like training data, loss, overfitting and gradient descent come from machine learning and carry straight over to deep learning. Many people learn the basics of both together.
What is the difference between AI and data science?
Data science is about getting insight from data, using statistics, visualisation and sometimes machine learning. AI is about building systems that act intelligently. They overlap in machine learning, which both fields use.
Sources and further reading
- Elements of AI · University of Helsinki · Free course
- Machine Learning Crash Course · Google · Free course
- Neural networks · 3Blue1Brown · Free videos