- Introduced by
- Krizhevsky, A.; Sutskever, I.; Hinton, G. E.
- Year
- 2012
- Type
- Deep Convolutional Neural Network (CNN)
What does it do?
AlexNet is a deep convolutional neural network (CNN) introduced by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton in 2012.
It won the ImageNet Large Scale Visual Recognition Challenge (ILSVRC 2012) with a top-5 error rate of 15.3%, compared with 26.2% for the runner-up. The result drew wide attention to deep networks trained end-to-end on images, and the architecture popularised ReLU activations, dropout regularisation, and GPU-based training, which were widely adopted afterwards.
The intuition behind the method
Before AlexNet, most image classifiers depended on hand-crafted features designed by researchers. AlexNet stacked several convolutional layers and trained them directly on pixels, so the network learned its own features. In general, early layers respond to simple edges and colours, while deeper layers combine these into more complex parts and object categories. Two practical choices made this trainable. ReLU activations pass positive values unchanged, avoiding the gradient saturation that slowed training with sigmoid units. Dropout randomly silences neurons during training, so the network cannot rely on any single unit, which helps it generalise. Training also relied on data augmentation, which enlarges the effective training set by transforming existing images, for example by cropping and reflecting them.
History
AlexNet was entered in the ImageNet Large Scale Visual Recognition Challenge in 2012 by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton at the University of Toronto. It reached a top-5 error of 15.3%, against 26.2% for the second-placed entry. The margin was large enough that it is often cited as a turning point for deep learning in computer vision. Deeper networks followed, including VGGNet and GoogLeNet (both 2014) and ResNet (2015), which further reduced ImageNet error. The paper appeared in the Advances in Neural Information Processing Systems proceedings in 2012 and was republished in Communications of the ACM in 2017.
When to use it
Choose AlexNet mainly for teaching, for reproducing the 2012 architecture, or as a small baseline when computing resources are very limited. For a new image classification project, the usual starting point is a more recent architecture, typically with pretrained weights, because AlexNet is less accurate and its fully connected layers hold most of its roughly 60 million parameters. Training it from scratch requires a labelled image dataset large enough that the model does not overfit. When labelled data are scarce, transfer learning from pretrained weights is the more reliable route. The principles it established (stacked convolutions, ReLU, dropout, and GPU training) remain part of nearly all modern CNN designs, so it is a useful reference point even when it is not used directly.
Limitations and considerations
- The fully connected layers hold most of the roughly 60 million parameters, which makes the model memory-heavy and prone to overfitting on small datasets.
- Later architectures such as VGGNet, GoogLeNet, ResNet, and EfficientNet achieve higher accuracy on ImageNet-style classification.
- Local Response Normalisation has largely been replaced by batch normalisation, which is now standard in deep networks.
- The fully connected layers require a fixed input size, so images must be resized or cropped to match the architecture. This limits direct handling of arbitrary image sizes and multi-scale recognition.
- Training from scratch needs a GPU and a large labelled dataset.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- On ILSVRC 2012 it reached a top-5 error of 15.3%, against 26.2% for the second-placed entry, which showed that deep CNNs trained on raw pixels could outperform hand-crafted pipelines on a large benchmark.
- ReLU units avoid the saturation of sigmoid units for positive inputs, which made a network of this depth considerably easier to train.
- Dropout in the fully connected layers reduced overfitting in a model with roughly 60 million parameters.
- A very efficient GPU implementation of the convolution operation made training a network of this size practical in 2012.
- Its simple, sequential structure makes it a clear teaching model for the basic components of deep CNNs.
Applications
- Image classification on large labelled datasets such as ImageNet.
- Transfer learning: features learned on ImageNet are commonly reused as a starting point for other image domains, such as medical or satellite imagery, usually after fine-tuning.
- Backbone feature extraction for object recognition and scene understanding, although newer backbones are usually preferred.
- Teaching and benchmarking: a standard entry point for learning deep CNN design and for comparing architectures over time.
How it works
How it works
The network takes a fixed 224×224×3 colour image as input and applies five convolutional layers, each followed by a Rectified Linear Unit (ReLU), which computes max(0, x). The first convolutional layer uses 96 filters of size 11×11×3 with stride 4. The second uses 5×5 filters with 256 filters, and the third, fourth and fifth layers use 3×3 filters with 384, 384 and 256 filters respectively. Compared with sigmoid units, ReLU does not saturate for positive inputs, which reduces the vanishing-gradient problem in deep stacks and speeds up training. Each filter bank slides across the spatial dimensions of its input to detect local patterns.
Formula
h^{(l)} = \max\!\left(0,\; W^{(l)} * h^{(l-1)} + b^{(l)}\right)The network has three max-pooling layers, placed among the convolutional layers. Max-pooling keeps only the strongest activation in each local neighbourhood. This reduces the spatial resolution of the feature maps and gives a degree of tolerance to small shifts in position, while lowering the number of values passed to later layers.
Formula
p_{i,j} = \max_{(r,c)\in\mathcal{N}(i,j)} h^{(l)}_{r,c}Local Response Normalisation was applied after the first two convolutional layers. Each activation is divided by a term built from the squared activations of neighbouring feature maps at the same spatial location, a form of lateral inhibition loosely inspired by neuroscience. In the formula, k is an additive bias constant, n is the number of neighbouring feature maps summed over, α is a scaling factor and β is an exponent. Later designs largely replaced it with batch normalisation, so it is now mainly of historical interest.
Formula
b^i_{x,y} = a^i_{x,y} \Big/ \left(k + \alpha \sum_{j=\max(0,\,i-n/2)}^{\min(N-1,\,i+n/2)} \left(a^j_{x,y}\right)^2\right)^{\beta}In the large fully connected layers, dropout was applied during training with a drop probability of 0.5. Each neuron is set to zero independently on each forward pass, so the network cannot rely on specific co-active units and in effect averages over many thinned subnetworks. The mask in the formula is written as Bernoulli(p), where p is the probability of retaining a unit, so the drop and retention conventions must be kept distinct when implementing it. At test time all neurons are active, and their outputs are rescaled to match the expectation seen in training.
Formula
\tilde{h}_j = r_j \cdot h_j, \quad r_j \sim \operatorname{Bernoulli}(p)The final fully connected layer produces one score per ImageNet class (1000 in the ILSVRC setting). A softmax converts these scores into a probability distribution over the classes, and the predicted class is the one with the highest probability.
Formula
\hat{y}_k = \frac{\exp(z_k)}{\sum_{j=1}^{K} \exp(z_j)}Training minimises the cross-entropy between the predicted distribution and the one-hot ground-truth label. The loss is averaged over the examples in the mini-batch, as the 1/N factor in the formula indicates. Gradients are propagated back through all layers, and parameters are updated with stochastic gradient descent using momentum and weight decay.
Formula
\mathcal{L} = -\frac{1}{N}\sum_{i=1}^{N} \sum_{k=1}^{K} y_{ik}\log\hat{y}_{ik}Common pitfalls
- Training from scratch on a small labelled dataset without transfer learning or data augmentation usually overfits badly, because of the large fully connected layers.
- Using AlexNet as a production model when pretrained, more accurate networks such as ResNet or EfficientNet are available.
- Reporting only top-1 accuracy. The original benchmark result is a top-5 error, so comparisons with the 15.3% figure require the same metric.
- Citing the wrong version: the 2012 proceedings paper and the 2017 Communications of the ACM republication both exist. The DOI 10.1145/3065386 is the DOI of the 2017 republication, so state which version you read.
- Ignoring learning-rate scheduling. With a fixed learning rate, training a network this deep can stall or become unstable, so the rate should be tuned or reduced during training.
Frequently asked questions
Why did AlexNet have such a large impact in 2012?
The gap between its 15.3% top-5 error and the runner-up's 26.2% on ILSVRC 2012 was large for a single benchmark year. It showed that deep networks trained on raw pixels, with large labelled datasets and GPU compute, could outperform the feature pipelines that dominated computer vision. One benchmark does not establish general superiority, but the result shifted research priorities.
What is the difference between AlexNet and a standard CNN?
AlexNet was an unusually deep CNN for its time, with eight learnable layers. Its gains came from a combination of choices: ReLU activations, dropout in the fully connected layers, local response normalisation, and GPU training. The convolutional structure alone was not the distinguishing factor.
Should I use AlexNet for a new image classification task today?
For most practical tasks, no. Newer architectures such as ResNet and EfficientNet are usually more accurate, and fine-tuning their pretrained weights typically outperforms training AlexNet from scratch. AlexNet remains useful for teaching and as a small baseline.
How does dropout in AlexNet prevent overfitting?
During training, each neuron in the large fully connected layers is set to zero independently with probability 0.5 on each forward pass. This stops units from relying on specific partners, so the network is pushed toward features that work across many sub-networks. At test time all neurons are active and their outputs are rescaled to match the training expectation. The formula's Bernoulli parameter is a retention probability, so check the convention when implementing it.
Related methods
Sources
Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). ImageNet Classification with Deep Convolutional Neural Networks. Advances in Neural Information Processing Systems, 25, 1097–1105. (Republished: Communications of the ACM, 60(6), 84–90, 2017.)
Open DOI referenceGoodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning (Ch. 9: Convolutional Networks). MIT Press.
ISBN: 978-0-262-03561-3LeCun, Y., Bengio, Y., & Hinton, G. E. (2015). Deep Learning. Nature, 521, 436–444.
Open DOI reference2018_Book_NeuralNetworksAndDeepLearning, p. 342