AI vs ML vs deep learning

AI is the goal, machine learning is learning it from data, and deep learning is machine learning with many-layer neural networks that learn their own features.

7 min read666 wordscore3 viewsupdated 2026-10-09

Definition

AI, ML and deep learning are nested sets, not three competing technologies. Artificial intelligence is the goal: machines that do tasks we would call intelligent. Machine learning is one way to get there, where the behaviour is fitted from data instead of written by hand. Deep learning is the kind of machine learning that uses neural networks with many layers, and those layers learn the features as well as the final mapping.

Three ways to build the same program

Take one task: decide whether a photo contains a cat. The three families differ in which parts of the program a human writes and which parts are fitted to data.

Rule-based AI. An expert writes the logic directly, for example "if there are two pointy ears above two eyes and whiskers, say cat". This is AI with no learning at all. Expert systems, chess search and route planners all work this way. It breaks down when the rules are too many or too fuzzy to write down, and pixels are about as fuzzy as inputs get.

Classical machine learning. A human still designs the features: numbers computed from the raw input that are likely to matter, such as histograms of edge directions (HOG) or colour statistics. A learning algorithm (logistic regression, an SVM, boosted trees) then fits the mapping from features to label. The model can only be as good as the features it is given.

Deep learning. The network gets raw pixels and learns a stack of transformations. Trained vision networks consistently show early layers detecting edges and colour blobs, middle layers responding to textures and parts, and late layers responding to whole objects. Nobody programs that hierarchy; gradient descent finds it because it lowers the loss. This is representation learning, and it is what "deep" buys you.

y^=gθ(ϕ(x))⏟classical MLvsy^=fθL(L)∘⋯∘fθ2(2)∘fθ1(1)(x)⏟deep learning\underbrace{\hat y = g_\theta\big(\phi(x)\big)}_{\text{classical ML}}\qquad\text{vs}\qquad \underbrace{\hat y = f^{(L)}_{\theta_L}\circ\cdots\circ f^{(2)}_{\theta_2}\circ f^{(1)}_{\theta_1}(x)}_{\text{deep learning}}
xx
raw input (pixels, audio samples, token ids)
ϕ\phi
hand-designed feature extractor, fixed before training
gθg_\theta
learned model with parameters θ, applied to the features
fθℓ(ℓ)f^{(\ell)}_{\theta_\ell}
layer ℓ of the network, with its own learned parameters
LL
number of layers (the depth)

In classical ML only θ\theta is learned and ϕ\phi is frozen. In deep learning every θℓ\theta_\ell is learned jointly from one loss, so the features are shaped by the task itself. That is what end-to-end training means.

click a ring:
AIMLDLlinear models, trees, SVMs, k-NNClassical MLtask: is there a cat in this photo?pixelsraw photohand-crafted featuresedge histograms (HOG), colour statshand-designedlearned classifierSVM / logistic regression / treeslearnedcat / not cathuman designs: the featureslearned from data: the mapping features → labeltypical data: hundreds to ~100k labelled examples
fig.Tab 1: click AI, ML or DL in the nested diagram. The pipeline on the right shows which stages a human hand-designs (orange) and which are learned from data (blue). Tab 2: drag the slider for training-set size. On perceptual data the leader changes from classical ML (from about 80 examples) to a small network (from about 25k) to a large network (from about 400k). Switch to tabular and classical ML stays on top the whole way. The curves are schematic shapes, not measurements.

When deep learning wins, and when it does not

Learning the features costs data and compute. A network with millions of free parameters has to discover structure that a human could have handed to a classical model for free. With little data, the hand-designed features win.

As data grows, hand-designed features become the ceiling: a classical model's accuracy plateaus at what its features allow. A large network keeps improving, because more data lets it learn better features. This is why deep learning took over images, audio and text, where raw inputs are high-dimensional and good features are hard to write down.

On tabular data (rows of meaningful columns such as age, income or number of purchases), the columns already are good features. Gradient-boosted trees remain the default there and often beat neural networks on medium-sized datasets (Grinsztajn et al., NeurIPS 2022).

ModelWhat a human designsLearned parameters
Rule-based digit readerevery rule0
HOG features + linear SVM (pedestrian detector, 64×128 window)the 3,780 HOG features3,781 (one weight per feature + bias)
Logistic regression on pixelsnothing; pixels go straight in784⋅10+10=7,850784\cdot10+10 = 7{,}850
MLP 784 → 256 → 10layer sizes only784⋅256+256+256⋅10+10=203,530784\cdot256+256+256\cdot10+10 = 203{,}530
AlexNet (ImageNet, 2012)architecture and lossabout 60 million
How much of the model is learned. The pixel models use 28×28 digit images (784 pixels, 10 classes). Logistic regression has no hidden layer, so it cannot build features of its own; the MLP's 256 hidden units are features it learns.

A short history

YearEventFamily
1956Dartmouth workshop coins "artificial intelligence"AI
1958Rosenblatt's perceptron: a single trainable neuronML / neural
1959Samuel's self-improving checkers program; he coins "machine learning"ML
1969Minsky & Papert show a single-layer perceptron cannot compute XORneural
1970s–80sExpert systems (e.g. MYCIN): hand-written rules dominateAI
1986Rumelhart, Hinton & Williams popularize backpropagation for multilayer netsneural
1989–1998LeCun's convolutional networks read handwritten digits (LeNet-5, 1998)DL
1995–2001SVMs (1995) and random forests (2001): the classical-ML golden ageML
2006Hinton et al. train deep belief nets layer by layer; "deep learning" takes off as a nameDL
2012AlexNet wins ImageNet: 15.3% top-5 error vs 26.2% for the runner-upDL
2017The transformer ("Attention Is All You Need")DL
2020sLarge language models trained on trillions of tokensDL

The neural-network idea is as old as the field. What changed around 2012 was scale: large labelled datasets (ImageNet has 1.2 million training images), GPUs that made training tens of times faster, and a few practical fixes such as ReLU activations and dropout.

The same task, two ways

python
1# Classical ML: a human chooses the features, the model learns the rest
2from skimage.feature import hog
3from sklearn.svm import LinearSVC
4
5feats = [hog(img) for img in images] # phi(x): fixed, hand-designed
6clf = LinearSVC().fit(feats, labels) # g_theta: learned
7
8# Deep learning: raw pixels in, every layer learned from one loss
9import torch.nn as nn
10
11net = nn.Sequential(
12 nn.Conv2d(1, 16, 3), nn.ReLU(), # learns edge-like filters
13 nn.Conv2d(16, 32, 3), nn.ReLU(), # learns combinations of edges
14 nn.Flatten(), nn.LazyLinear(10), # learns the classifier
15)

Check yourself

A chess engine that searches the game tree with a hand-tuned evaluation function is…

Check yourself

What most precisely separates deep learning from classical machine learning?

Remember

  • ✓AI ⊃ ML ⊃ DL: a goal, a method, and one family of that method.
  • ✓Rule-based: a human writes everything. Classical ML: a human writes the features. DL: a human writes only the architecture and the loss.
  • ✓Deep learning learns a hierarchy of features end to end from one loss.
  • ✓DL wins with large, high-dimensional, perceptual data. Gradient-boosted trees still win on most small-to-medium tabular data.
  • ✓The ideas date from the 1950s–80s; data, GPUs and a few training tricks made them work around 2012.
← back to Deep Learning roadmap