AI & Machine Learning · Paper 01 / 05

ImageNet Classification with Deep Convolutional Neural Networks

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton

2012 · NeurIPS · ~12 min read

Read the original paper

Computer vision had plateaued on hand-designed features. A deep network trained on two gaming GPUs beat the field by a margin nobody expected, and the modern era began.

The problem: computers could not see, and progress had stalled

In 2011 the best way to recognise objects in photographs was a pipeline designed by hand. Engineers wrote detectors for edges, corners and colour patches (SIFT, HOG and their relatives), pooled them into a fixed-length description of the image, and trained a classifier on top. It worked, slowly, and it had hit a ceiling: on ImageNet, a benchmark with 1.2 million photographs in a thousand categories, the error rate improved by a point or two a year. Neural networks that learned their own features had existed since the 1980s and were widely considered a dead end for anything but small problems, because they were slow to train and overfit badly.

before 2012imageSIFT / HOG featuresencode, poolSVM“cat” 74%designed by people, fixedAlexNetimage5 convolutional layers + 3 fully connected · 60 million weights, all learned from the pixels“cat” 84%
Two pipelines. The old one chose its features by hand and learned only the last step. AlexNet learned every step from the pixels, including what to look for.

The idea: a deep network, trained on the whole dataset, on graphics cards

Krizhevsky, Sutskever and Hinton did not invent the convolutional network; LeCun had read cheques with one in the 1990s. What they did was make one large enough to be worth it and find the handful of engineering decisions that let it train: eight learned layers and sixty million weights, fed by a dataset big enough to need them, on two consumer GPUs programmed to do the arithmetic quickly. The ingredients were individually known. The combination won the 2012 ImageNet competition with a top-5 error of 15.3 per cent against 26.2 per cent for the runner-up, a gap larger than the previous several years of progress combined.

224×224×3conv 11×11conv 5×5conv 3×3conv 3×3conv 3×3fc 4096fc 4096softmax 1000top half: GPU 1bottom half: GPU 23 GB each; they talk at two layersearly layers see edges and colours; later layers see parts and objects
The architecture. Five convolutional layers find edges, then textures, then parts, then objects; three fully connected layers decide between a thousand classes. The network was split across two 3 GB GPUs because it did not fit on one.

How it works

A convolutional layer slides a small filter across the image and records how strongly each patch matches it; a layer has many filters, so it produces a stack of feature maps, and the next layer slides its filters across those. Early layers end up detecting edges and colour blobs, as the hand-designed features did, except that these were learned from the data and the later layers learn combinations of them that no engineer would have written. Pooling layers shrink the maps between stages so later filters see a wider field.

Try itPaint an image, slide a filter over it

Click pixels to toggle them. The output is the filter's response at each position: a feature map. A deep network stacks dozens of these, each layer reading the maps of the one below.

input · 8 × 8 (click to paint)
3 × 3 filter
-1
0
1
-2
0
2
-1
0
1
responds where brightness changes left to right
feature map · 6 × 6
positive response in teal, negative in red
ImageNet top-5 error of the winning entry, by year
01020302010201220142016yeartop-5 error, %

Before 2012 the winners used features designed by hand (edges, corners, colour histograms) and the error fell a point or two a year. AlexNet learned its filters from the pixels and cut the error from 25.8% to 16.4% in one step. Every winner since has been a deeper network of the same kind, and the 2015 entry passed the estimated human error of about 5%.

Four decisions made it trainable. The ReLU activation, max(0, x), replaced the smooth sigmoids of older networks and trained several times faster because its gradient does not vanish. Dropout randomly silenced half the neurons in the large fully connected layers during training, which forced redundancy and cut overfitting dramatically. Data augmentation, random crops and flips and colour shifts, multiplied the effective dataset by thousands. And the GPU implementation, written by Krizhevsky himself, made a week of training feasible instead of a year. Each of these is now a default setting; in 2012 each was a discovery.

What it changed

AlexNet is the start of the deep-learning era by common agreement. Within a year every serious entry to ImageNet was a deep convolutional network; within three, networks were deeper than a hundred layers and better than people at the benchmark. The techniques spread from vision to speech, then to language, and the demand for GPU compute that the paper kicked off reshaped an industry. The three authors’ later work (Sutskever at OpenAI, Hinton’s lab, Krizhevsky at Google) traces a direct line from this paper to the models of the 2020s.

Where you meet it today

  • Every image model, from a phone’s face unlock to medical imaging, is a descendant; convolutions remain in use even where Transformers have taken the top layers.
  • ReLU, dropout and augmentation are default options in every deep-learning framework.
  • GPUs as the unit of ML compute. The paper is the reason NVIDIA is an AI company.
  • Transfer learning. Reusing a network trained on ImageNet as the starting point for another task began with AlexNet’s features.