Kaijing Ma

Paper Notes

ImageNet Classification with Deep Convolutional Neural Networks

Paper Notes

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton

Advances in Neural Information Processing Systems 25 (NIPS 2012) · Full nine page proceedings PDF, 2012

Official full proceedings paper · Author code

The problem: enough capacity, enough structure

A result produced by a system

The paper asks whether a large convolutional network can learn useful visual representations directly from labelled images. Its answer depends on several parts working together. Convolution limits the hypothesis space. GPUs make a larger model trainable. ReLUs make fitting faster. Augmentation and dropout limit overfitting. The benchmark result measures this combined system. It does not isolate one universal cause.

The full conference PDF is the source for this note. Its abstract reports 37.5% top 1 error, 17.0% top 5 error and about 650,000 neurons. The proceedings landing page instead lists 39.7%, 18.9% and 500,000 neurons. These records differ, so the complete PDF governs the analysis and tables here. The often quoted 15.3% result belongs to the ILSVRC 2012 competition ensemble. It is a different evaluation setting.

The data define the question

Dataset context from Section 2, p. 2. Counts are reported approximations.
Source contextImages and labelsRole
ImageNet overallOver 15 million images; about 22,000 categoriesLarger collection, not the standard competition split
ILSVRC trainingAbout 1.2 million images; 1,000 classesSupervised fitting
ILSVRC validation50,000 imagesModel choices and reported validation errors
ILSVRC test150,000 imagesHeld out evaluation; availability differs by year

A large collection does not remove the need for assumptions. The authors motivate convolution through local pixel dependencies and approximately stationary image statistics. A filter can reuse one local feature at many positions. This reduces the number of unrelated decisions that learning must infer from the finite dataset. It does not make object recognition invariant to every viewpoint or background.

A metric is a precise event

err_top1 = (1/M) Σ_i 1[argmax_c pθ(c|x_i) ≠ y_i]; err_top5 = (1/M) Σ_i 1[y_i ∉ Top5(pθ(·|x_i))]

Top 5 error asks whether the correct class is absent from the five highest ranked labels. It is not the mean error across five predictions. The metric also does not measure localization, calibration or robustness. A lower competition error therefore answers a narrower question than general visual understanding.

The boundary of the reading

The complete nine page PDF was read, including its notes and references. All four source figures were visually checked. This note reproduces the architecture and activation plots because they support direct technical discussion. It does not independently reread every cited work or establish the reader’s completion of any reading pass.

1 / 8Full nine page proceedings PDF, 2012

The architecture: connectivity before a layer list

Source Figure 2 · p. 5。 Krizhevsky, Sutskever and Hinton, NIPS 2012, full proceedings PDF. The upper and lower streams reside on different GPUs. Cross connections at selected layers make this one connected network. The 224 input label and the first 55 spatial grid are retained as printed. Their reproduction ambiguity is discussed below.

Eight learned layers

The network contains five convolutional layers and three fully connected layers. Normalization and pooling add operations but not additional learned weight layers in this count. ReLUs supply hidden nonlinearities. The final classifier produces a distribution over 1,000 classes through softmax. Section 3.5 describes the connections; Figure 2 displays their division across devices.

Architecture from Sections 3.2 and 3.5, pp. 3 to 5. Filter depth already reflects restricted connectivity.
LayerFilter or widthInput connectivityFollowing operations
Conv 196 × (11 × 11 × 3), stride 4All 3 RGB channelsReLU; response normalization; max pooling
Conv 2256 × (5 × 5 × 48)Previous maps on the same GPUReLU; response normalization; max pooling
Conv 3384 × (3 × 3 × 256)All previous maps across both GPUsReLU
Conv 4384 × (3 × 3 × 192)Previous maps on the same GPUReLU
Conv 5256 × (3 × 3 × 192)Previous maps on the same GPUReLU; max pooling
FC 64,096 outputsAll previous activationsReLU; dropout
FC 74,096 outputsAll previous activationsReLU; dropout
FC 81,000 outputsAll previous activationsClass probabilities from softmax

A GPU split changes the graph

Layers 2, 4 and 5 only see the preceding maps on their own GPU. Layer 3 sees both groups. Fully connected layers also connect across the preceding representation. The two streams therefore exchange information, rather than train as independent classifiers. Restricted connections reduce communication and parameters at selected layers. They are part of the architecture as well as its implementation.

The printed shapes do not fully specify padding

H_out = floor((H_in + 2P − K)/S) + 1; floor((224 − 11)/4) + 1 = 54; 55 × 55 × 96 = 290,400

This ordinary convolution shape rule assumes symmetric padding and no dilation. The text and Figure 2 label the input as 224 × 224 × 3. The figure also labels the first convolutional grid as 55 × 55. With a kernel of 11 and stride of 4, an unpadded input of 224 produces 54 positions. Padding can change the result, but the PDF does not resolve the exact boundary convention. Silently replacing 224 by 227 would change the source record.

The Figure 2 caption gives 253,440 first layer neurons. That does not equal the product of its drawn 55 × 55 × 96 shape. The abstract’s approximately 650,000 neurons is consequently a scale description here. It is not treated as a fully reconciled exact sum. The subsequent arithmetic states its shape assumptions explicitly.

A local operator with shared weights

z[o,u,v] = b[o] + Σ_(c∈G(o)) Σ_a Σ_b W[o,c,a,b] x[c,Su+a−P,Sv+b−P]

The input channel set G(o) depends on the output group. A spatial location changes which input patch is read. It does not select a different kernel. This distinction explains why the same layer can have relatively few parameters while applying those parameters many times.

2 / 8Full nine page proceedings PDF, 2012

Fitting speed and local competition

ReLU changes a local derivative

ReLU(z) = max(0,z); d ReLU(z)/dz = 1 for z > 0, and 0 for z < 0; d tanh(z)/dz = 1 − tanh²(z)

A positive ReLU has derivative one. A tanh unit has a small derivative when its magnitude is near saturation. This local mechanism can make gradient based fitting faster. It does not prevent a negative ReLU from receiving zero local sensitivity. It also does not by itself prove a test error improvement. The paper separates faster fitting from regularization.

Source Figure 1 · p. 3。 Krizhevsky, Sutskever and Hinton, NIPS 2012, full proceedings PDF. The solid ReLU curve reaches 25% training error about six times faster than the dashed tanh curve. This is a four layer CIFAR 10 experiment with separately chosen learning rates and no regularization. It is not a measured sixfold speedup of the full ImageNet system.

Response normalization acts across channels

bᵢ_(x,y) = aᵢ_(x,y) / (k + α Σ_(j=max(0,i−⌊n/2⌋))^(min(N−1,i+⌊n/2⌋)) (aʲ_(x,y))²)^β; k = 2; n = 5; α = 10⁻⁴; β = 0.75

Here a is the activation after ReLU. The denominator combines neighboring channel maps at the same spatial location. Large nearby responses suppress the normalized response. The map order is arbitrary but fixed before learning. The source uses α times the sum, without division by n. A library implementation that instead scales by α/n needs a corresponding parameter conversion.

This operation follows convolutional layers 1 and 2. It does not subtract a local mean. It is therefore different from mean centered contrast normalization and from normalization over a minibatch. Its relevance is empirical in this architecture. The paper reports improvements, rather than a general requirement for every ReLU network.

Pooling changes which local responses survive

p[c,u,v] = max_(0≤a<3, 0≤b<3) h[c,2u+a,2v+b]

The network uses a pooling window of 3 × 3 with stride 2. Adjacent windows overlap. The comparison uses a 2 × 2 window with stride 2 and equivalent output dimensions in the authors’ setup. The reported benefit concerns this comparison. Pooling can discard exact position information, so it does not produce cost free invariance.

The individual reports are not one factorial experiment

Selected reports from Sections 3, 4.1 and 7, pp. 3, 4, 6 and 8. Error differences are expressed as percentage points.
ChangeSource comparisonReported effect
Two GPU networkOne GPU network with fewer early filtersTop 1 error lower by 1.7 percentage points; top 5 by 1.2
Response normalizationWithout this normalizationTop 1 error lower by 1.4 percentage points; top 5 by 1.2
Overlapping poolingWindow 3, stride 2 versus window 2, stride 2Top 1 error lower by 0.4 percentage points; top 5 by 0.3
RGB PCA augmentationWithout the RGB perturbationTop 1 error lower by over 1 percentage point
Removing a middle convolutional layerFull depth networkTop 1 performance worse by about 2 percentage points

The paper does not provide a joint ablation matrix with all interactions. The rows cannot be added to reconstruct a single baseline.

The GPU comparison also changes capacity and connectivity. Footnote 2 says that the one GPU baseline keeps the final convolutional layer and the fully connected layers at their original size. It is not literally half of the full model. The result therefore cannot isolate a hardware only speed or accuracy effect.

3 / 8Full nine page proceedings PDF, 2012

Data augmentation: the invariances are chosen

Preprocessing establishes a fixed input

The shorter side of each image is resized to 256 pixels. A central 256 × 256 region is then retained. The training set mean is subtracted from pixel values. The network receives RGB values rather than a handcrafted feature descriptor. This pipeline still makes a spatial selection before the learned model sees the image.

A crop is an observation, not a new independent image

Training draws random 224 × 224 patches and applies horizontal reflection. The authors describe a 2,048 fold expansion in possible training views. These views share an original photograph and label, so their statistical information is strongly dependent. The number does not establish 2,048 times as many independent examples.

The intended assumption is that modest translation and horizontal reflection usually preserve the category. This is an approximation about the selected dataset. A crop can remove an object, and a transformation can alter meaning in another task. The augmentation policy is consequently part of the learning problem.

Prediction averages ten probabilities

p̄(c|x) = (1/10) Σ_(t=1)^10 pθ(c|T_t(x))

The test views are the four corners and center, together with their reflections. The network averages softmax probabilities across these ten patches. This is additional inference computation. It is not a ten model parameter ensemble, and it is not an average of logits before softmax.

PCA perturbation acts on the image as a whole

ΔI = [p₁,p₂,p₃] [α₁λ₁, α₂λ₂, α₃λ₃]ᵀ; α_i ∼ Normal(0,0.1²); I′_(x,y) = I_(x,y) + ΔI

The vectors p and values λ are eigenvectors and eigenvalues of the RGB pixel covariance over the training set. Each α is sampled once per image presentation and shared by every pixel in that image. It is resampled when that image is used again. The PDF multiplies by λ, not its square root.

This low dimensional perturbation approximates changes in illumination intensity and color. It differs from independent pixel noise because the same RGB shift is applied everywhere. Section 4.1 reports a top 1 error reduction of more than one percentage point. The augmentation runs on the CPU while the GPU processes the preceding batch, which hides much of its cost in this implementation.

4 / 8Full nine page proceedings PDF, 2012

Optimization and dropout: what actually changes

The objective rewards the correct label

pθ(c|x) = exp(z_c)/Σ_(j=1)^1000 exp(z_j); L_B(θ) = −(1/|B|) Σ_(i∈B) log pθ(y_i|x_i)

Section 3.5 maximizes the average log probability of the correct label. Minimizing the negative form above is equivalent. The class labels supply supervision to all learned layers through backpropagation. A lower training objective alone does not establish lower held out error, which is why the regularization and evaluation details matter.

The original dropout convention

m_j ∼ Bernoulli(0.5); h̃_j = m_j h_j during training; h̃_j = 0.5 h_j at test time

Dropout is applied to the first two fully connected layers. Each presentation samples a mask and shares the underlying weights with all other masks. Dropped activations contribute neither their forward values nor their local backward path. This discourages reliance on one fixed set of companion features. It does not train each sampled subnetwork independently.

At test time the paper retains all units and multiplies their outputs by 0.5. Many later implementations instead divide surviving activations by the keep probability during training and use no test scaling. Mixing these conventions changes the computation. The paper calls deterministic test scaling an approximation to model combination, rather than an exact identity for this nonlinear network.

The authors report substantial overfitting without dropout. They also report roughly twice as many iterations to convergence with it. This exchanges additional optimization work for better generalization in their setting. It is separate from averaging several fully trained CNNs at competition time.

SGD includes coupled weight decay

g_i = (1/|D_i|) Σ_(x,y∈D_i) ∂ℓ(x,y;w_i)/∂w; v_(i+1) = 0.9v_i − 0.0005εw_i − εg_i; w_(i+1) = w_i + v_(i+1)

The batch contains 128 examples. Momentum is 0.9 and weight decay is 0.0005. The decay term enters the velocity update with the learning rate ε. It is not a statement about a modern decoupled decay optimizer. The authors also observe lower training error from this small decay, so its reported effect is broader than suppressing a train to test gap.

Initialization and schedule

Learning details from Section 5, pp. 6 and 7.
QuantitySource setting
WeightsNormal distribution, mean 0, standard deviation 0.01
Biases in Conv 2, Conv 4, Conv 5, FC 6 and FC 71
Other biases0
Initial learning rate0.01, shared across layers
Learning rate changesLearning rate divided by 10 after validation improvement stalls; 3 reductions
Training durationAbout 90 epochs; 5 to 6 days on 2 GTX 580 GPUs, 3 GB each

Positive biases in selected hidden layers make positive ReLU inputs more likely early in training. The learning rate schedule is adjusted manually from validation behavior. The paper gives these values but does not provide a complete run by run optimization log. Exact reproduction requires more than these scalar hyperparameters.

5 / 8Full nine page proceedings PDF, 2012

The evidence: two competitions, several model sets

ILSVRC 2010 has public test labels

Source Table 1 · p. 7 · ILSVRC 2010 test set. All values are error rates.
ModelTop 1 test errorTop 5 test error
Sparse coding [2]47.1%28.2%
SIFT + FVs [24]45.7%25.7%
CNN37.5%17.0%

The sparse coding and Fisher vector results are the historical baselines cited in the source. They are not new replications.

The CNN improves top 5 error by 8.7 percentage points relative to 25.7%. The relative error reduction is about 33.9%. These are two different ways to express the same table difference. Neither is an 8.7% relative change. Footnote 5 also reports 39.0% top 1 and 18.3% top 5 error without averaging ten patches.

25.7 − 17.0 = 8.7 percentage points; (25.7 − 17.0)/25.7 ≈ 33.9%; 18.3 − 17.0 = 1.3 percentage points

ILSVRC 2012 separates validation and test

Source Table 2 · p. 7 · ILSVRC 2012. Missing cells remain unreported.
ModelTop 1 validationTop 5 validationTop 5 test
SIFT + FVs [7]Not reportedNot reported26.2%
1 CNN40.7%18.2%Not reported
5 CNNs38.1%16.4%16.4%
1 CNN*39.0%16.6%Not reported
7 CNNs*36.7%15.4%15.3%

An asterisk marks a model set involving supervised pretraining on the ImageNet Fall 2011 release. The seven model ensemble contains two pretrained models and the five other CNNs.

The standard single CNN has 18.2% top 5 validation error. Averaging five similar CNNs gives 16.4% on validation and test. A larger model with a sixth convolutional layer is first trained on 15 million images in 22,000 categories and then fine tuned on the competition data. Its top 5 validation error is 16.6%. This pretraining uses labels. It is distinct from the unsupervised pretraining that the discussion says was not used.

The winning seven model ensemble combines two of those pretrained networks with five other CNNs. Its validation error is 15.4% and test error is 15.3%. The second placed competition entry has 26.2% top 5 test error. A single network result, a multi view prediction and a multiple network ensemble are different units of comparison.

The authors say validation and test differed by at most about 0.1 percentage points in their experience. That observation does not make an unreported test cell available. The table keeps the original split labels. It also keeps extra data and model combination visible beside the headline result.

The larger dataset result has another protocol

On the ImageNet Fall 2009 collection, the paper reports 8.9 million images and 10,184 categories. Half the images are used for training and half for testing. The extra convolutional layer model obtains 67.4% top 1 and 40.9% top 5 error, compared with cited values of 78.1% and 60.9%. The exact split differs from earlier work, so this is not the standard ILSVRC test protocol.

Qualitative images suggest a representation

Figure 3 shows orientation selective and color sensitive first layer filters. Section 6.1 reports specialization between the restricted GPU groups. Figure 4 shows plausible alternative labels and neighbors in the final 4,096 dimensional hidden representation. These examples illustrate learned structure. They do not quantify retrieval accuracy or prove that every hidden coordinate has one human semantic meaning.

6 / 8Full nine page proceedings PDF, 2012

Cost: parameters, arithmetic and elapsed time

A parameter can be used more than once

Parameters_conv = C_out(K²C_in/group + 1); MACs_conv = H_outW_outK²(C_in/group)C_out; Parameters_dense = D_inD_out + D_out

The following calculation is an original accounting exercise. It uses the printed grouped channel connections, the figure’s spatial grids of 55, 27 and 13, and a 6 × 6 final pooled grid from a valid 3 × 3 pooling window with stride 2. Biases count as parameters but not as multiply accumulate operations. This is one explicit interpretation of the printed architecture, not a claim that the unresolved input padding has been reproduced.

Original arithmetic under the stated shapes. MAC means one multiply and its accumulation. This is not a measured profiler trace.
LayerParameters including biasesMACs per crop
Conv 134,944105,415,200
Conv 2307,456223,948,800
Conv 3885,120149,520,384
Conv 4663,936112,140,288
Conv 5442,62474,760,192
FC 637,752,83237,748,736
FC 716,781,31216,777,216
FC 84,097,0004,096,000
Total60,965,224724,406,816

The operation count omits ReLU, normalization, pooling, softmax, biases, memory movement and backward propagation.

About 96.2% of these parameters belong to the fully connected layers. Most multiply accumulate work instead occurs in convolution. This explains why a layer can be cheap in parameter storage yet expensive to evaluate. It also explains why removing a convolutional layer can matter even when parameter count changes little.

A scale estimate is different from a measurement

60,965,224 × 4 bytes ≈ 243.9 MB; 724,406,816 × 10 ≈ 7.244 × 10⁹ MACs per image; 90 × 1.2 × 10⁶ / 128 ≈ 843,750 updates

The storage estimate assumes four bytes per parameter and uses decimal megabytes. Gradients, momentum, activations and temporary buffers add storage. The ten view estimate repeats the single crop arithmetic without sharing work. The update estimate uses approximate dataset size and epoch count. None of these estimates is a measured latency, a complete memory budget or a training FLOP total.

The actual hardware report

Section 5 reports about five to six days on two NVIDIA GTX 580 GPUs with 3 GB each. That is roughly ten to twelve GPU days for one training run. It is not the total research cost of architecture selection, failed runs, pretraining and ensembles. The paper does not provide enough timings to reconstruct those totals or the exact inference cost of every competition entry.

The main constraint is a coupled one. A larger network needs storage and time, while regularization can require more iterations. A second GPU can permit a different model, rather than merely execute the same model faster. Resource accounting therefore needs a fixed model and stopping rule before it supports a clean speed comparison.

7 / 8Full nine page proceedings PDF, 2012

Interpretation: what the paper establishes

The change is in learned features and feasible scale

The comparison to SIFT plus Fisher vectors changes the representation pipeline. A supervised objective now adjusts the image feature extractor together with the classifier. Earlier convolutional networks already supplied locality and sharing. This paper combines those ideas with a scale of labelled data, computation and regularization that produces a large competition improvement. The source does not support attributing the whole result to inventing convolution or ReLU here.

Depth has evidence, but the mechanism is not isolated

Removing a middle convolutional layer worsens top 1 performance by about two percentage points in the authors’ report. This supports the usefulness of the tested depth. It does not provide a matched comparison that holds receptive fields, optimization, connectivity and computation fixed. The removal changes several properties at once.

Several tempting conclusions remain unsupported

Interpretation boundaries. These statements separate source reports from broader claims.
ClaimWhat the source actually supports
15.3% belongs to one standard CNNIt belongs to a 7 model ensemble with extra supervised pretraining
ReLU makes ImageNet training 6 times fasterFigure 1 reports a 6 times threshold speed difference on a smaller CIFAR 10 network
The two GPU baseline is half the networkThe final convolutional and fully connected sizes are preserved in the one GPU comparison
All useful implementation details are determinedThe 224 input, 55 grid and caption neuron count leave unresolved source ambiguities
A learned nearest neighbor is a calibrated retrieval systemFigure 4 gives qualitative examples without a retrieval benchmark

Questions that follow from the evidence

A modern replication could separate capacity from communication by fixing parameter count, model connections and training budget. It could compare activation choices at equal validation quality and measure both examples processed and elapsed time. These are proposed tests motivated by the confounds above. They are not experiments performed in this note.

The durable argument is that representation learning becomes effective when statistical assumptions, optimization, regularization and computation fit the task together. The numerical evidence is specific to the reported datasets and protocols. The paper’s expectations about unsupervised learning and video are future directions in its 2012 discussion, rather than outcomes established by these tables. The author code link points to the archived historical project. This reading did not execute that code or verify a complete working environment.

8 / 8Full nine page proceedings PDF, 2012

Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.