Source-linked AI summary

Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps

Karen Simonyan, Andrea Vedaldi, Andrew Zisserman

arXiv:1312.6034v2cs.CV

TL;DR

Understanding what visual appearance deep ConvNets capture is difficult. This paper introduces gradient-based class visualizations and saliency maps, showing that saliency maps support weakly supervised localization while generalizing DeconvNet reconstruction.

  • Problem

    The paper addresses how to understand the visual appearance captured inside deep ConvNet image-classification models.

  • Method

    It optimizes input images for class scores, computes image-specific saliency maps from score gradients, and relates both techniques to DeconvNet reconstruction.

  • Results

    46.4% top-5 error was achieved on ILSVRC-2013 localization using weak supervision, while gradient-based visualization generalized DeconvNet reconstruction beyond convolutional layers.

  • Takeaways & Limitations

    Class saliency maps can support object localization and GraphCut-based segmentation without additional object annotations or dedicated segmentation and detection models.

Abstract

from arXiv · show

This paper addresses the visualisation of image classification models, learnt using deep Convolutional Networks (ConvNets). We consider two visualisation techniques, based on computing the gradient of the class score with respect to the input image. The first one generates an image, which maximises the class score [Erhan et al., 2009], thus visualising the notion of the class, captured by a ConvNet. The second technique computes a class saliency map, specific to a given image and class. We show that such maps can be employed for weakly supervised object segmentation using classification ConvNets. Finally, we establish the connection between the gradient-based ConvNet visualisation methods and deconvolutional networks [Zeiler et al., 2013].

1 Introduction

The paper investigates how visual appearance is represented inside deep ConvNets for large-scale image recognition. It presents gradient-based visualisations of supervised ImageNet classification models and evaluates them using a deep ConvNet trained on ILSVRC-2013.

  • Motivation: The study targets understanding visual appearance captured inside deep ConvNets, which had become the architecture of choice for large-scale image recognition.
  • Contributions: The paper demonstrates that numerical optimisation of the input image can produce understandable visualisations of supervised ConvNet classification models.The approach visualises class-related model representations by optimising the input image.
  • Experimental setup: The experiments use a single deep ConvNet trained on the ILSVRC-2013 dataset, containing 1.2M training images across 1000 labelled classes.
  • Experimental setup: 39.7%/17.7% top-1/top-5 classification error was achieved on the ILSVRC-2013 validation set, compared with 40.7%/18.2%.The reported configuration uses convolutional layers followed by fully connected layers with 4096, 4096, and 1000 outputs.

2 Class Model Visualisation

Class model visualisation numerically generates an image representative of a chosen class under a trained ConvNet’s scoring model. The method optimises the fixed network with respect to the input image, using class scores rather than posteriors to focus on the target class.

  • Class model visualisation: The method generates an image that is representative of a chosen class according to a trained classification ConvNet’s class-scoring model.The procedure takes a learnt ConvNet and a class of interest as input.
  • Class model visualisation: The objective is to find an L2-regularised image with a high target-class score Sc(I).λ denotes the regularisation parameter.
  • Class model visualisation: Back-propagation finds a locally optimal image by updating the input image while keeping the trained ConvNet weights fixed.The optimisation is analogous to network training, but its variables are the input pixels rather than the layer weights; optimisation starts from the zero image.
  • Class model visualisation: The method optimises the unnormalised class score Sc rather than the soft-max posterior Pc.Maximising Pc can reduce other class scores, whereas optimising Sc concentrates the optimisation on the specified class; posterior optimisation produced visually unimpressive results.

3 Image-Specific Class Saliency Visualisation

This section defines image-specific class saliency by differentiating a ConvNet’s class score with respect to the input image, then rearranging the derivatives into a saliency map. These weakly supervised maps support object localisation without additional annotations, achieving 46.4% top-5 error on ILSVRC-2013.

  • Saliency formulation: For an image I0 and class c, pixel importance is ranked by the influence of each pixel on the class score Sc(I0).The method queries a classification ConvNet about the spatial support of a particular class in a given image.
  • Saliency formulation: Because Sc(I) is highly non-linear, the method approximates it near I0 with a first-order Taylor expansion whose coefficient is the derivative with respect to I.This local linearisation provides the image-specific class saliency signal.
  • Saliency computation: The saliency map is computed by back-propagating the derivative and rearranging its elements spatially; for grayscale images, Mij = |wh(i,j)|.Here, h(i, j) indexes the derivative element corresponding to the pixel at row i and column j.
  • Saliency computation: Classification ConvNets trained only on image labels produce these maps without bounding boxes or segmentation masks, and each single-class map requires one back-propagation pass.The computation is described as extremely quick.
  • Weakly supervised localisation: 46.4% top-5 error was achieved on the ILSVRC-2013 localisation test set using GraphCut colour segmentation applied to saliency maps, versus the weakly supervised method’s 29.9% challenge-winner comparison.Bounding boxes were obtained from segmentation masks, and localisation was repeated for each of the top-5 predicted classes.

4 Relation to Deconvolutional Networks

The paper establishes that DeconvNet reconstruction is equivalent or similar to gradient back-propagation through a ConvNet. Apart from the RELU layer, DeconvNet feature reconstruction is equivalent to the derivatives used in the proposed visualisation algorithms, which generalise to activities in any layer.

  • Connection between methods: DeconvNet reconstruction of a layer input is equivalent or similar to computing the gradient of a visualised neuron’s activity with respect to that input.Thus, DeconvNet effectively corresponds to gradient back-propagation through a ConvNet.
  • Convolutional layers: For convolutional layers, back-propagation convolves the gradient with a flipped kernel, exactly matching DeconvNet’s corresponding layer reconstruction.The relations are ∂f/∂X_n = ∂f/∂X_n+1 ⋆ cK_n and R_n = R_n+1 ⋆ cK_n.
  • RELU layers: For RELU layers, the methods differ because back-propagation gates using X_n > 0, whereas DeconvNet gates using the reconstruction R_n+1 > 0.The gradient uses ∂f/∂X_n = ∂f/∂X_n+1 1(X_n > 0), while DeconvNet uses R_n = R_n+1 1(R_n+1 > 0).
  • Max-pooling layers: For max-pooling layers, the gradient uses the input location attaining the maximum, corresponding to DeconvNet’s max-pooling switch.The sub-gradient selects s = arg max_q∈Ω(p) X_n(q).
  • Implication: Apart from RELU, DeconvNet reconstruction is equivalent to back-propagation, while gradient-based visualisation generalises DeconvNet by visualising activities in any layer.DeconvNet-based visualisation is limited to a convolutional layer, whereas the gradient-based techniques can be applied to any layer.

5 Conclusion

The paper presents two gradient-based visualisation techniques for deep classification ConvNets: class-representative image generation and image-specific class saliency mapping. It also shows that saliency maps can initialise GraphCut-based object segmentation without dedicated segmentation or detection models.

  • The first technique generates an artificial image representative of a class of interest.
  • The second technique computes an image-specific class saliency map highlighting regions discriminative for the given class.
  • Saliency maps can initialise GraphCut-based object segmentation without training dedicated segmentation or detection models.
Loading 1312.6034v2…