Paper commentary
Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps
Gradient-based visualisation shows what a classification ConvNet learns per class
- Problem Earlier visualisation methods were built for unsupervised networks or for convolutional layers, so they did not show what supervised ImageNet classifiers learn about each class. Researchers needed a way to probe those class notions directly.
- Method The authors optimise an input image by gradient ascent to raise one class score. Unlike earlier reconstruction methods, the gradient works on any layer and yields class images and saliency maps.
- Results The weakly supervised pipeline scored 46.4% top-5 error on ILSVRC-2013, compared to 29.9% for the challenge winner.
Why ConvNet decisions are hard to see
Deep ConvNets are now the usual choice for large-scale image recognition, yet what they learn about each class stays hidden inside their weights. Earlier work probed deep models by searching for an input that maximises a neuron through gradient ascent, but that work targeted unsupervised networks. Zeiler and Fergus's DeconvNet instead reconstructs each layer's input from its output, but its reconstruction was designed for convolutional layers.
The gap this paper targets is the visualisation of supervised image classification ConvNets trained on ImageNet. The authors say they are the first to apply the gradient method of reference [5] to ImageNet classification ConvNets. Supervision matters here because the labels tell you which output neuron stands for each class.
The ConvNet being visualised
All visualisation experiments use a single deep ConvNet trained on ILSVRC-2013, which has 1.2M training images in 1000 classes. The network is close to the architecture of reference [8], built on the cuda-convnet toolbox, but it is narrower and uses extra jittering that zeroes random parts of an image.
On the ILSVRC-2013 validation set, the network scored 39.7% top-1 and 17.7% top-5 classification error. The authors call this slightly better than the 40.7% and 18.2% reported in reference [8] for a single ConvNet. Because training is supervised, each class has a known output neuron, and the next section relies on that.
Turning a class score into an image
The key idea is to search pixel space for an image that makes one class score as high as possible while the weights stay fixed. The search is run by back-propagation with respect to the input image, which differs from training only in what gets updated. The resulting image is meant to show what the network associates with that class.
The L2 term penalises the squared norm of the image, so the score can rise only as far as the penalty allows. The search starts from the zero image, since the network was trained on zero-centred data, and the training set mean image is added to the result afterwards.
The optimisation works on the unnormalised class scores rather than on the soft-max posterior \( P_c \). The authors argue that a higher posterior can come from lowering the scores of other classes, which would pull the search away from class c. They also tried optimising the posterior, and the resulting images were not visually prominent.
Generated images appear for classes such as dumbbell, cup, dalmatian, goose and husky. One image can capture several aspects of a class's appearance at once.
Finding the pixels behind one class score
The key quantity is the derivative of the class score with respect to the input pixels, and the authors read its magnitude as pixel influence. In a linear score model this reading is direct, because the weight magnitudes give each pixel's importance.
A deep ConvNet's score is highly non-linear in the image, so the authors approximate it near the image I0 with a first-order Taylor expansion.
The derivative w comes from one back-propagation pass, and its elements are rearranged into an m by n map. For each pixel the map takes the maximum absolute derivative across colour channels, \( M_{ij} = \max_c |w_{h(i,j,c)}| \). Because the classifier is trained only on labels, computing the map needs no boxes or masks.
Following the classifier's test procedure, the authors compute 10 maps on the cropped and reflected sub-images and average them. Reference [1] used a similar derivative idea in Bayesian classification.
From saliency maps to object boxes
The thresholded map seeds colour models, and GraphCut then spreads those labels across the object by colour continuity.
Both colour models are Gaussian Mixture Models, and GraphCut assigns each pixel to foreground or background. The mask is the largest connected foreground component, and its bounding box is the predicted box for each of the top-5 classes.
On the ILSVRC-2013 test set the pipeline reached 46.4% top-5 error, compared to 29.9% for the challenge winner. The winner was not weakly supervised, whereas this pipeline used image labels only. The authors stress that the localisation task played no part in training.
That earlier entry used a fully-supervised system built on part-based models and Fisher vector encoding.
Gradients as DeconvNet reconstruction
The authors show that DeconvNet reconstruction matches gradient back-propagation through a ConvNet, except at RELU layers. This makes the gradient method a generalisation of DeconvNet rather than a separate technique.
For a convolutional layer, the gradient is the upstream gradient convolved with the flipped kernel, \[ \frac{\partial f}{\partial X_n} = \frac{\partial f}{\partial X_{n+1}} \star \hat{K}_n \] This is the same operation as the DeconvNet reconstruction \( R_n = R_{n+1} \star \hat{K}_n \).
For a RELU layer the gradient multiplies by the indicator \( \mathbf{1}(X_n > 0) \) of the layer input. DeconvNet instead applies the indicator to the reconstruction \( R_{n+1} \), so the two differ at this layer.
For max-pooling, the gradient flows only to the position that attains the maximum, which plays the role of DeconvNet's switch. So apart from the RELU layer, DeconvNet's feature reconstruction is equivalent to back-propagating the derivative.
Because the gradient method applies to any layer, it extends DeconvNet, which was defined for convolutional layers. The saliency maps are image-specific and relate to DeconvNet's image-specific convolutional visualisations, but here the neuron sits in a fully connected layer.
Limitations
All visualisation experiments use one ConvNet, so the generated images are shown for that network only. The class images are judged by their appearance, and the posterior variant was set aside on that basis.
The localisation pipeline reached 46.4% top-5 error on the test set, still above the 29.9% of the challenge winner. Saliency thresholding alone may recover only the most discriminative part of an object, which is why colour segmentation is added. The localisation results come from ILSVRC-2013 alone.
Paper info
- Authors
- Karen Simonyan, Andrea Vedaldi, Andrew Zisserman
- Venue
- arXiv · Preprint
- First published
- 2013-12-20
- Added
- 2026-11-11
- Updated
- 2014-4-19
- Version
- v2
- arXiv
- 1312.6034
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Karen Simonyan, Andrea Vedaldi, Andrew Zisserman (2013). Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. arXiv:1312.6034v2. https://arxiv.org/abs/1312.6034v2
BibTeX
@misc{simonyan2013deep,
title = {{Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps}},
author = {Karen Simonyan and Andrea Vedaldi and Andrew Zisserman},
year = {2013},
eprint = {1312.6034},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1312.6034v2}
}