Machine Learning vs Deep Learning vs AI
AI is the goal, machine learning is one way to reach it, and deep learning is a kind of machine learning. How the three relate, with examples and a table.
Artificial intelligence (AI) is the broad goal of making machines do tasks that seem to require intelligence. Machine learning (ML) is one way to get there: instead of writing rules by hand, you let software learn patterns from data. Deep learning is one kind of machine learning that uses neural networks with many layers. So every deep learning system is machine learning, and every machine learning system is AI, but not the other way around.
The standard way to picture it is a set of nested circles. The authors of the textbook Deep Learning draw exactly that: deep learning is a kind of representation learning, "which is in turn a kind of machine learning, which is used for many but not all approaches to AI" [2].
The nested circles, from outside in
Layer | What it means | How it gets its knowledge | Example from the textbook's diagram [2] |
|---|---|---|---|
AI | Any machine system that produces intelligent-seeming outputs | Hand-written rules, search, logic, or learning | Knowledge bases |
Machine learning | Systems that learn patterns from data | Training on examples | Logistic regression |
Representation learning | ML that also learns which features to look at | Training discovers useful features | Shallow autoencoders |
Deep learning | Representation learning with many stacked layers | Training builds features from simpler ones | Multilayer perceptrons (MLPs) |
If you read only one row, read the last column. Each example is a real technique that sits in that ring but not the ring inside it.
Artificial intelligence: the umbrella
There is no single agreed definition of AI, but U.S. federal guidance gives a practical one. NIST's AI Risk Management Framework describes an AI system as "an engineered or machine-based system that can, for a given set of objectives, generate outputs such as predictions, recommendations, or decisions influencing real or virtual environments" [1]. Notice that the definition says nothing about learning.
That's because a lot of AI doesn't learn. Early AI research often tried to hard-code knowledge about the world in formal languages and reason over it with logical rules, an approach the Deep Learning authors call the knowledge base approach [2]. They point to Cyc, a long-running project with a database of statements entered by human staff, as a famous example, and note that "none of these projects has led to a major success" [2]. The problem: people "struggle to devise formal rules with enough complexity to accurately describe the world" [2].
Rule-based systems are still everywhere, in tax software logic, game opponents and fraud rules. They count as AI under broad definitions but aren't machine learning. For the full history and scope, see our complete guide to artificial intelligence.
Machine learning: learning from examples
Google's developer course defines machine learning as "the process of training a piece of software, called a model, to make useful predictions" or generate content from data [3]. Rather than a programmer writing "if the email contains X, mark it spam," an ML system sees thousands of labeled emails and learns which patterns predict spam.
Training works by repeatedly adjusting the model's internal numbers to shrink its errors. Google's course walks through the basic method, gradient descent: compute the error (the loss), work out which direction to nudge each parameter to reduce it, take a small step, and repeat until the loss stops improving [4]. Our guide to AI training vs inference explains what happens after training ends.
The main types of machine learning
Google groups ML systems by how they learn [3]:
- Supervised learning: the training data includes the correct answers (labels), such as photos tagged "cat" or "dog."
- Unsupervised learning: no labels; the model finds structure on its own, often by clustering similar items.
- Reinforcement learning: the model learns by taking actions in an environment and receiving rewards or penalties. For a recent industry example, see our coverage of Microsoft's Agent Lightning reinforcement learning framework for AI agents.
- Generative AI: models that create new content such as text, images, audio or video from user input. See generative AI explained.
The catch: features
Classic machine learning depends heavily on how the data is represented. Someone has to decide which measurable properties (features) the model should look at: word counts, pixel statistics, a customer's purchase frequency. The Deep Learning authors note that manually designing features for a complex task "requires a great deal of human time and effort; it can take decades for an entire community of researchers" [2].
That bottleneck is what representation learning, and then deep learning, set out to remove. Learned representations, they write, "often result in much better performance than can be obtained with hand-designed representations" [2].
Deep learning: many layers, learned features
Deep learning uses artificial neural networks with many layers stacked on top of each other. Each layer transforms its input into a slightly more abstract representation and passes it on.
The textbook's description is the clearest one available. Deep learning lets "the computer build complex concepts out of simpler concepts" [2]. To recognize a person in a photo, the network can represent simple concepts such as edges, combine edges into corners and contours, and build on those to represent the whole image of a person [2]. Draw that hierarchy as a graph and it is deep, with many layers. "For this reason," the authors write, "we call this approach to AI deep learning" [2].
The key difference from classic ML: nobody tells a deep network to look for edges. It learns which features matter as part of training.
Why deep learning took off
Neural networks are decades old, but three things came together around 2012:
- Data. Large labeled datasets such as ImageNet gave networks enough examples.
- Compute. GPUs, designed to run thousands of threads in parallel [8], turned out to suit neural network math. See our guide to AI chips, CPUs, GPUs and TPUs.
- A landmark result. In 2012, Krizhevsky, Sutskever and Hinton trained a deep convolutional network with 60 million parameters on 1.2 million ImageNet images across 1,000 classes, using two GPUs. A variant of the model won the ILSVRC-2012 competition with a top-5 test error rate of 15.3%, compared with 26.2% for the second-best entry [5].
Later architectures pushed further. The Transformer, introduced in 2017, is a deep learning architecture "based solely on attention mechanisms" [6] and now underlies most large language models; see how Transformer models work and how large language models work. Research has also shown that Transformer language models improve predictably as model size, data and training compute grow [7], which encouraged ever-larger deep learning systems.
Machine learning vs deep learning: side by side
Classic machine learning | Deep learning | |
|---|---|---|
Features | Usually designed by people | Learned automatically from raw data [2] |
Typical models | Linear and logistic regression, decision trees, clustering | Multi-layer neural networks: convolutional networks, Transformers |
Data needs | Can work with modest datasets | Tends to need large datasets |
Compute | Often runs on a laptop CPU | Training usually needs GPUs or other accelerators |
Best at | Structured, tabular data with meaningful columns | Unstructured data: images, audio, text, video |
Interpretability | Often easier to explain | Often hard to explain why a given output was produced |
The "tends to" and "often" in that table are deliberate. These are general tendencies, not rules. Small neural networks exist, and some classic methods handle big data well.
Real-world examples, sorted
- Rules-based AI (not ML): a tax program applying the written tax code; a knowledge-base expert system [2].
- Classic machine learning: a credit model built with logistic regression on a few dozen applicant features; clustering customers into segments [3].
- Deep learning: image recognition [5], speech recognition, machine translation and chatbots built on large language models [6].
Limitations to keep in mind
Every layer of the nesting has trade-offs.
- Rules don't scale to messy reality. Hand-written knowledge struggles with the ambiguity of the real world, as the knowledge-base projects showed [2].
- Machine learning inherits its data. A model is only as good as its training examples. Biased or outdated data produces biased or outdated predictions.
- Deep learning is powerful but uneven. Stanford HAI's 2026 AI Index reports that frontier models now match or beat humans on some expert-level tests while still struggling with tasks such as learning from video, telling time and multi-step planning [9]. Generative deep learning models can also state false things confidently; see AI hallucinations.
- Cost. Large deep learning models require significant compute and energy; the same AI Index highlights growing environmental costs [9].
How to decide which you need
- Can you write the rules down and are they stable? Use conventional software or a rules engine. It's cheaper, faster and easier to audit.
- Do you have structured data with clear columns and a prediction target? Start with classic machine learning. It's often a strong baseline and easier to explain.
- Is your input unstructured (images, audio, free text) or are hand-built features failing? Deep learning is the natural choice.
- Do you need to generate language or answer open-ended questions? That's deep learning in the form of large language models, usually used through an API rather than trained from scratch. Our upcoming explainer on AI models vs machine learning models goes further.
Frequently asked questions
Is deep learning the same as AI?
No. Deep learning is a subset of machine learning, which is a subset of AI [2]. Plenty of AI, such as rule-based expert systems, uses no learning at all, and plenty of machine learning, such as logistic regression, isn't deep.
Is ChatGPT machine learning or deep learning?
Both. Chatbots like ChatGPT run on large language models, which are deep neural networks; modern LLMs are built on the Transformer architecture [6]. See how large language models work. Because deep learning is a kind of machine learning, and machine learning is a kind of AI, all three labels apply.
What makes deep learning "deep"?
The number of layers. A deep network stacks many layers, each building more abstract features from the layer below, so the graph of concepts it learns is deep [2].
Do I need deep learning for my project?
Not necessarily. For structured, tabular data, classic machine learning is usually a good place to start and is easier to interpret. Deep learning tends to earn its extra cost on images, audio, text and other unstructured data.
Where do neural networks fit in?
Neural networks are a family of machine learning models loosely inspired by the brain. Deep learning means using neural networks with many layers [2]. Our upcoming explainer on neural networks covers how they work.
Sources
- Artificial Intelligence Risk Management Framework (AI RMF 1.0), NIST AI 100-1, NIST, January 2023.
- Deep Learning, Chapter 1: Introduction, Ian Goodfellow, Yoshua Bengio and Aaron Courville (online edition).
- What is Machine Learning?, Google for Developers.
- Linear regression: Gradient descent, Google Machine Learning Crash Course.
- ImageNet Classification with Deep Convolutional Neural Networks, Krizhevsky, Sutskever, Hinton, NeurIPS 2012.
- Attention Is All You Need, Vaswani et al., arXiv, 2017.
- Scaling Laws for Neural Language Models, Kaplan et al., arXiv, 2020.
- CUDA Programming Guide: 1.1 Introduction, NVIDIA.
- Inside the AI Index: 12 Takeaways from the 2026 Report, Stanford HAI, April 13, 2026.