Stop hand-designing features. Learn them from pixels.
To recognize thousands of objects in the wild, a model needs an enormous learning capacity — and that, in turn, needs an enormous amount of labeled data. ImageNet supplied the fuel: a subset of 1.2 million labeled, high-resolution images across 1000 classes.
The authors' bet: rather than hand-engineering features like SIFT and bolting on a shallow classifier, train one large, deep convolutional neural network end-to-end, straight from raw pixels. A CNN bakes in the right assumptions about images — locality (nearby pixels belong together) and translation invariance (a cat is a cat wherever it sits) — so it needs far fewer connections than a comparable fully-connected net and is easier to train. The one missing ingredient was compute, and the GPU supplied it.
“To learn about thousands of objects from millions of images, we need a model with a large learning capacity.” — Krizhevsky, Sutskever & Hinton
The machine from orbit
What is this thing, what's it for, and what shape is it?
Step 1 · The black box & the moment
A box that names what it sees — and 2012 was the moment it stopped guessing.
Here is the whole story in one picture. A photo goes in, a single word comes out. We'll keep this one photo — a leopard — on the worksheet the whole way down, so every part you meet is shown doing something to this exact image:
In 2012 this box entered the ImageNet challenge and made 15.3% top-5 error — while the second-best entry made 26.2%. An eleven-point gap, in a contest usually decided by fractions of a percent. That gap is what convinced the whole field to go deep.
Why was it a shock? Before it, recognition ran on hand-engineered features — recipes like SIFT that experts designed by hand to spot corners and textures — fed into a shallow classifier. AlexNet threw that out: it learned its own features, end to end, straight from pixels. The rest of this page opens the box, one layer of wrapping at a time.
From the abstract: “We trained a large, deep convolutional neural network … and achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry.”
Step 2 · The task, made concrete
1000 boxes, one of them right — and a tidy 224×224×3 tensor to decide it from.
You've seen the box name our leopard. Before opening it, pin down exactly what it was asked to do — and what the leopard looks like by the time it reaches the first layer.
ImageNet is a giant labeled photo collection — roughly 15 million images across ~22,000 categories. The contest, ILSVRC, uses a 1000-class slice: ~1.2M training images, 50,000 for validation, 150,000 for test. The job: put each photo in exactly one of those 1000 boxes.
Two scores grade it. Top-1 error is the fraction of photos where the model's single best guess is wrong. Top-5 error is gentler — wrong only if the true label isn't among the model's five best guesses. (For a leopard, “my top guess was jaguar but leopard was second” still counts as a top-5 hit.)
Step 3 · The shape of the machine
Eight learned layers, narrowing a 224² image down to 1000 numbers.
You know the input tensor. Here's the map the rest of the page zooms into — the whole machine as one left-to-right pipeline, before we magnify any single piece.
AlexNet has 8 learned layers: 5 convolutional layers (the part that looks at the image) followed by 3 fully-connected layers (the part that decides). Data flows one way, left to right, each layer feeding the next, until a final softmax turns the last 1000 numbers into class probabilities.
The whole net holds 60 million parameters and 650,000 neurons, and depth is not decoration: removing any single middle convolutional layer — about 1% of the parameters — costs roughly 2% of top-1 accuracy. The 8 layers earn their keep.
Conv specs: C1 = 96 kernels 11×11×3 stride 4 · C2 = 256 kernels 5×5 · C3 = 384 kernels 3×3 · C4 = 384 kernels 3×3 · C5 = 256 kernels 3×3. ReLU follows every conv and FC layer; pooling and normalization sit between some of them (Steps 6–7).
How a convnet sees
Convolution by hand · ReLU · pooling · normalization · two GPUs
Step 4 · What a convolution actually does
A tiny grid of weights, slid across the image, lights up where it finds its pattern.
You have the floor plan; now we zoom all the way into the first convolutional layer — the heart of how the machine sees. Before any real sizes, do one by hand.
A convolution takes a small grid of learned numbers — a kernel (also called a filter) — and slides it over the image. At each stop it multiplies the kernel against the patch beneath it, adds up the products, and writes that one number into an output grid called a feature map. The stride is how many pixels it jumps between stops.
Our toy: a 5×5 grayscale patch with a vertical light/dark edge (bright on the left, dark on the right), and a 3×3 vertical-edge kernel. Slide it with stride 1 and watch where it fires.
Move the window — or press ← ↑ → ↓ — and watch the output
5×5 patch · brighter = higher
3×3 kernel K
3×3 feature map (output)
After ReLU
The kernel “lights up” exactly where the image goes bright → dark. At the edge the output is +27; deep in the dark region it's 0. A dark→bright edge would give −27 — which ReLU (next step) clips to 0. That's a learned edge detector, by hand.
See the dot product for the top-left placement
window covers rows 0–2, cols 0–2 → pixels [9, 9, 0] in every row.
= 1·9 + 0·9 + (−1)·0 (row 0)
+ 1·9 + 0·9 + (−1)·0 (row 1)
+ 1·9 + 0·9 + (−1)·0 (row 2)
= 9 + 9 + 9 = 27.
The bright column (left, weight +1) wins; the dark column (right, weight −1) contributes nothing. Slide one step right and you still straddle the edge, so it's 27 again. Slide once more into the all-dark region and it drops to 0.
Now zoom back out. The real conv1 doesn't run one kernel — it runs 96 of them, each 11×11×3, sliding across the 224×224×3 leopard with stride 4. Out come 96 feature maps, each about 55×55. And what did those 96 kernels learn? Almost exactly what you'd hope: edge and orientation detectors, plus coloured blobs.
Here's the part that trips people up: the 55×55 numbers in a feature map aren't 55×55 neurons that each learned their own weights — it's the same 11×11×3 kernel slid everywhere, so an edge detector found in one corner works in every corner. That weight-sharing is why a convnet needs far fewer parameters than wiring every pixel to every neuron would. Next: the nonlinearity that made all of this trainable — ReLU.
Step 5 · ReLU — why it trained at all
Negatives die, positives pass straight through — and learning never stalls.
Your hand-convolution produced a −27 for the wrong-way edge. What happens to negative responses? They meet ReLU — and ReLU is the quiet reason a net this big could be trained in 2012.
ReLU (rectified linear unit) is the simplest nonlinearity
imaginable: f(x) = max(0, x). It's a
non-saturating function — for large
positive inputs it keeps growing, so its slope never flattens. The
old choices, tanh and sigmoid, are saturating: push them hard
and they flatten toward ±1.
This is the one spot worth slowing down for, because the reason saturation hurts is easy to state wrong. It isn't the flat output that stalls learning — it's the flat slope. Learning flows backward through each layer by multiplying by that layer's slope; where tanh has gone flat that slope is nearly 0, so the correction meant for the early weights gets multiplied down to almost nothing, layer after layer. ReLU's slope is exactly 1 for every positive input, so the signal passes through undiminished. Drag the input below and watch the slope, not just the height:
Drag the input x — watch both outputs respond
ReLU = max(0, x)
ReLU(x) = 0.00
tanh(x) — saturating
tanh(x) = −0.96
Push x far positive. ReLU keeps rising — its slope stays 1, so the gradient never flattens and learning doesn't stall. tanh saturates near +1, its slope collapses to ~0, and a deep stack of those grinds to a halt.
The saturating alternatives, for the record: sigmoid f(x) = (1 + e⁻ˣ)⁻¹ and tanh f(x) = tanh(x). Both flatten at the extremes; ReLU's max(0, x) keeps a live gradient for every positive input.
Step 6 · Pooling — shrink, keep the gist
Take the strongest response in each little neighbourhood; throw the rest away.
After conv + ReLU, a feature map is large and a little jittery. The next move shrinks it while keeping what matters — a step called pooling.
Max-pooling is downsampling by summary: tile the feature map into small windows and keep only the largest value in each. That halves the map's size and gives translation tolerance — nudge the object a pixel or two and the strongest response usually survives. Here's a 4×4 map pooled into 2×2:
4×4 activation map · four 2×2 windows
2×2 result · the four maxima
AlexNet let the windows overlap: stride s = 2 but
window z = 3, so neighbours share pixels (vs the usual
s = z = 2 above). That small change shaved 0.4% /
0.3% off top-1 / top-5 error and made the model slightly harder
to overfit.
Step 7 · Local response normalization
A loud neuron quiets its neighbours, so the strongest signal stands out.
Convolution finds features, ReLU keeps the strong ones, pooling shrinks the map. One more touch sat between some of those layers in 2012: a normalization borrowed from how real neurons behave.
Local response normalization (LRN) is a form of lateral inhibition — a loud neuron damps the neurons at the same spot in neighbouring feature maps, so the single strongest response stands out instead of many mushy ones. The paper calls it “brightness normalization.” The formula divides each activation by a term built from its neighbours' squared activations:
bix,y = aix,y (k + α · Σj (ajx,y)²)β
sum over n = 5 adjacent kernel maps at the same (x, y) · k = 2 · α = 10⁻⁴ · β = 0.75
In words: if a feature map fires hard at some pixel, the same pixel in the maps next to it gets pushed down. The bigger a neuron's own activation, the more it suppresses its neighbours — competition that sharpens the response. It bought 1.4% / 1.2% off top-1 / top-5 error.
Honest footnote (editorial, not a paper claim): local response normalization later fell out of favour and was largely superseded by batch normalization (2015). It's here because it was part of the winning 2012 recipe — but you won't find it in most modern nets.
Step 8 · Two GPUs — splitting the brain
The net was too big for one 3GB card, so they sawed it in half down the middle.
You now understand each layer's job. There's one constraint that shaped the whole architecture — and it wasn't about accuracy, it was about memory.
A single GTX 580 in 2012 had only 3GB of memory — too small to hold the whole network. So AlexNet was split across two GPUs: roughly half the kernels live on each card, and the cards read and write each other's memory directly. To keep that cross-talk cheap, the GPUs only communicate at certain layers. Conv3 reads from all conv2 maps across both cards; but conv4 reads only from the same-GPU conv3 maps.
The lovely payoff: because the two halves rarely talk, they specialized on their own — and the same split shows up on every training run. GPU 1's first-layer kernels came out largely colour-agnostic (grayscale edge detectors); GPU 2's came out largely colour-specific (coloured blobs). The legend chips below carry the only two functional colours on this page:
GPU 1 — grayscale edge / orientation kernels
GPU 2 — coloured blob kernels
Stylized after Figure 3 / §6.1. The colour-vs-grayscale specialization “occurs regardless of the particular random weight initialization” — the network rediscovers it every time it's trained.
Making it generalize, and the result
Fighting overfitting · how it learned · did it work?
Step 9 · 60 million parameters want to memorize
Two weapons against a net big enough to memorize its training set.
The architecture is complete: it sees (Steps 4–8). But a model with 60M parameters and only 1.2M images has a dangerous temptation — and the paper spends a whole section fighting it.
Overfitting is when a model memorizes the training photos instead of learning the general idea of “leopard” — it aces what it's seen and flops on anything new. With each of 1000 labels giving only ~10 bits of constraint, AlexNet was wide open to it. Two defenses, side by side.
Resample — each click thins the network differently
Weapon B · Dropout (p = 0.5)
8 of 16 neurons kept this step.
Each training step zeros each hidden neuron with probability 0.5, so every step trains a different thinned sub-network — forcing robust features instead of fragile co-adaptations. Used in the first two FC layers. At test time all neurons are used, with outputs halved. Roughly doubles iterations to converge.
Both weapons make the net robust without new data: augmentation shows it more views of the leopard it already has; dropout stops any clique of neurons from co-adapting. Together they were the difference between a net that generalizes and one that “overfits substantially.”
Step 10 · How it learned
SGD with momentum, ~90 passes over 1.2M images, 5–6 days on two cards.
The architecture sees and resists memorizing. The last piece is training — turning 60M random numbers into a leopard recognizer.
It learned by stochastic gradient descent (SGD): show a batch of images, measure the error, nudge every weight a little to reduce it, repeat. Batch size 128, momentum 0.9 (keep rolling in the direction you've been heading), and a small weight decay of 0.0005 — which, unusually, reduced training error here rather than acting purely as a regularizer.
vi+1 = 0.9·vi − 0.0005·ε·wi − ε·⟨∂L/∂w⟩ ; wi+1 = wi + vi+1
momentum 0.9 · weight decay 0.0005 · learning rate ε
Random start
Weights from a zero-mean Gaussian σ = 0.01. Biases set to 1 in conv2, 4, 5 and the FC layers (so ReLUs get positive inputs early), 0 elsewhere.
Learning rate, ÷10
Same rate for all layers, starting at 0.01; divided by 10 whenever validation error stopped improving — three times in total.
~90 epochs
An epoch = one full pass through all 1.2M training images. About 90 of them — 5 to 6 days on two NVIDIA GTX 580 3GB GPUs.
That's the entire training recipe: SGD + momentum + a hand-tuned step-decay schedule, on hardware you could buy at a shop. No exotic optimizer — the heavy lifting is the architecture of Parts A and B.
Step 11 · Did it work? + recap
15.3% vs 26.2% — and the leopard's only rivals were other cats.
The machine is fully assembled: it sees (Steps 4–8), resists memorizing (Step 9), and was trained (Step 10). Final question — did attention to all those details actually pay off?
First, the leopard. The last fully-connected layer produces 1000 raw scores called logits; softmax turns them into probabilities that sum to 1. Top-1 = the tallest bar; top-5 = is the true label among the five tallest? Here are toy softmax outputs for our leopard:
The model's other guesses were all cats. Even when it isn't certain, it's sensibly uncertain — leopard, jaguar, cheetah, snow leopard, Egyptian cat. (Probabilities are toy values for our running example; the qualitative pattern is from Figure 4.)
And the headline numbers. The report card stacks AlexNet against the best prior systems — error bars, so shorter is better:
Report card · ImageNet top-5 test error (shorter = better)
AlexNet · ILSVRC-2012 (7 CNNs)
2nd-best entry · ILSVRC-2012
AlexNet · ILSVRC-2010
SIFT + Fisher vectors · 2010
0%top-5 error →~46%
Five questions to test the wiring. Try each one from memory, then open it to check — the answers run a line each, and they retrace the same path the leopard took, from raw pixels to a label.
Why did ReLU matter so much?
ReLU = max(0, x) is non-saturating: its gradient stays alive for positive inputs, so a deep stack keeps learning. Saturating units (tanh, sigmoid) flatten out and stall. Figure 1 showed ReLU reaching 25% training error ~6× faster — a net this big wouldn't have trained without it.
Why split across two GPUs?
A single GTX 580 had only 3GB — too little for the whole model. Splitting the kernels across two cards (talking only at conv3 and the FC layers) fit it in memory, cut top-1/top-5 by 1.7%/1.2% versus a half-size one-GPU net, and trained a bit faster.
What were dropout and the crop/reflection trick fighting?
Overfitting — 60M parameters memorizing 1.2M images. Dropout (p = 0.5 in the first two FC layers) trains a different thinned network each step; random crops + reflections (and PCA colour jitter) multiply the effective data ×2048. Both add robustness without new images.
What's the difference between top-1 and top-5 error?
Top-1 error counts a photo wrong if the model's single best guess isn't the true label. Top-5 error is gentler: wrong only if the true label isn't among the model's five most-probable guesses. AlexNet's famous 15.3% is a top-5 number.
Why is depth (all 8 layers) necessary?
The layers build features hierarchically — edges, then textures, then parts, then objects. The paper found that removing any single middle convolutional layer (about 1% of the parameters) cost roughly 2% of top-1 accuracy. Depth is doing the work, not sheer parameter count.
What happened next — AlexNet's win is widely seen as the spark of the modern deep-learning era in computer vision. It made the recipe — GPUs + large labeled datasets + deep CNNs — the new standard, and was followed by VGG, GoogLeNet and ResNet. ReLU and dropout became ubiquitous; local response normalization quietly faded, replaced by batch normalization.
“We trained a large, deep convolutional neural network … and achieved a winning top-5 test error rate of 15.3%, compared to 26.2% achieved by the second-best entry.” — the abstract, Krizhevsky, Sutskever & Hinton, 2012
Today's deep learning still runs on the fire it lit.
AlexNet's win on ImageNet is widely seen as the spark of the modern deep-learning era. What it proved — that a deep network trained on a GPU could beat decades of hand-engineering — set the recipe everything since has followed.
VGG · GoogLeNet · ResNet
Convolutional nets grew deeper year over year, pushing AlexNet's paradigm to its limit and becoming the default backbone of computer vision.
ReLU · Dropout
Both are now near-standard in almost every neural network, carried from CNNs all the way through to Transformers and large language models.
GPU training
Training large models on GPUs became deep learning's basic infrastructure — opening the era of trading scale for performance.
One contest entry — and the field's default recipe changed for good.