Machine Learning vs Deep Learning vs AI: Three Nested Sets
4 min read · updated August 3, 2026
Artificial intelligence, machine learning and deep learning are used interchangeably in marketing and are not interchangeable at all. They are three circles, each strictly inside the last, and the boundaries are drawn by facts about a system that you can check.
The three sets
Artificial intelligence is defined by its goal: getting a machine to do something that, done by a person, we would call intelligent. That is a statement about ambition, not method, which is why the term has covered wildly different technologies since 1956. A chess engine doing minimax search is AI. A route planner running A* is AI. Neither of them learns anything.
Machine learning is defined by its method: the system’s behaviour comes from parameters fitted to data rather than from rules a person wrote. Somebody still writes the model family and the objective; what they do not write is the numbers. Linear regression is machine learning. So is a random forest, so is k-means, so is a 400-billion-parameter transformer.
Deep learning is a subset of machine learning where the fitted function is a stack of layers, each transforming the output of the last, trained end to end by gradient descent. The word “deep” is doing real work: it means the representation the final layer sees was itself learned, rather than being handed over by a person.
The line between ML and deep learning
The dividing line is not size and it is not neural networks. It is who wrote the features.
Take spam filtering. The classical machine-learning version needs a human to decide what the model gets to look at: how many times “free” appears, whether the sender domain is younger than thirty days, the ratio of links to words, whether the reply-to address differs from the from address. A person invents those columns; the algorithm fits a weight to each. If the useful signal is something nobody thought to measure, the model cannot see it, no matter how much data you give it.
The deep-learning version is handed the raw text. The early layers construct their own intermediate quantities — no one names them, no one designs them, and inspecting them afterwards is its own research field. That is the whole trade: you stop needing domain experts to invent columns, and you start needing far more data and far more compute, because the features have to be paid for out of the same gradient signal as everything else.
The scale gap is worth seeing concretely. The hand-built spam model above has five features and therefore six parameters, and it will fit on a laptop in a second. LeNet-5, the small convolutional network from 1998 that is usually the first deep model anyone meets, has on the order of sixty thousand. Current language models are ten thousand times larger again. The parameters bought the features.
Two questions that classify anything
- Are any of its numbers fitted from data? No: it is not machine learning. It may still be AI — a rule engine, a constraint solver, a planner. Yes: it is machine learning, and everything in this cluster applies to it.
- Were the input features learned or written? Written by a person: classical machine learning. Learned by the model from raw input: deep learning.
These two questions dispose of most of the confusion in the wild. A SQL query that flags transactions over a threshold is not machine learning; calling it AI is a stretch but not a lie, and calling it “our AI model” is. A gradient-boosted tree on forty hand-built columns is machine learning and not deep learning, and it is probably the right answer for that problem — see why tree ensembles still win on tables.
Where a language model sits
Inside all three circles, at the innermost point. It is AI by ambition, machine learning because every one of its parameters was fitted, and deep learning because it is a stack of layers that build their own representation of the text. It adds one more property that is not implied by any of those words: its training labels came from the data itself rather than from annotators, which is what self-supervised learning means and why the training set could be the size it was.
The reverse containment is worth remembering too. Plenty of shipping AI has no learning in it. Your calendar’s scheduling assistant is probably a constraint solver. The chess engine that beats you is mostly search. Neither is worse for it, and neither needs a training set, a validation split or an eval harness.
Why the distinction is worth keeping
Because the failure modes are different, and so is the fix. A rule system fails by being wrong in a way you can read: someone typed the wrong threshold, and you can find it. A fitted model fails statistically — it is right on the data it saw and wrong on a slice that was rare, and you find that by measuring, not by reading. A deep model adds a third mode: it can be right for a reason nobody can state, which is fine until somebody has to justify a decision to a regulator or a customer.
Choosing between them is therefore not a question of which is more advanced. It is a question of which failure you can afford and which you can debug, and the honest answer is often the simplest one on the list.