Understanding Individual Decisions of CNNs via Contrastive Backpropagation

Jindong Gu, Yinchong Yang, Volker Tresp

Introduction

Deep Convolutional Neural Networks (CNNs) have achieved remarkable success in computer vision, yet they remain largely "black boxes." As these models are increasingly deployed in critical domains, the need to understand the rationale behind their specific decisions becomes paramount. Backpropagation-based explainability methods, such as Layer-wise Relevance Propagation (LRP), have emerged as popular tools to generate saliency maps that highlight pixels contributing to a model's prediction. However, as this research demonstrates, these methods often fail a fundamental test: class-discriminativeness.

The Challenge of Class-Discriminative Explanations

A truly useful explanation for a multi-class classifier should be able to distinguish between different objects in an image. For instance, if an image contains both a dog and a cat, an explanation for the "dog" class should highlight the dog, while an explanation for the "cat" class should highlight the cat.

The authors identify a critical flaw in standard LRP: it tends to produce saliency maps that are dominated by the "instance-specific structure information" of the input image. This information—determined by ReLU activation masks and max-pooling switches during the forward pass—effectively turns the explanation into a generic foreground detector. Consequently, the resulting maps look nearly identical regardless of which class is being queried.

Standard LRP explanations across different architectures and target classes.

As shown in the figure above, whether querying for "alp," "ski," or even a random set of classes, the LRP output remains static. This lack of sensitivity to the target class undermines the utility of LRP for understanding specific model decisions in complex scenes.

Proposed Solution: Contrastive Layer-wise Relevance Propagation (CLRP)

To overcome this limitation, the authors propose Contrastive Layer-wise Relevance Propagation (CLRP). The intuition behind CLRP is that the non-discriminative "noise" or structural information is shared across all class queries. By subtracting the relevance of an "opposite" or "dual" concept from the target class's relevance map, this shared background can be cancelled out, leaving only the pixels unique to the target class.

The authors introduce two variants for modeling this dual concept:

  1. CLRP1: The target class's activation is distributed uniformly among all other possible classes. This aggregate signal is then backpropagated to create a "not-target" map.
  2. CLRP2: The weights in the final fully-connected layer for the target class are negated. This effectively creates a virtual neuron that responds to everything except the target class.

The final CLRP saliency map is calculated by subtracting the dual map from the original LRP map and clamping any resulting negative values to zero. This process effectively filters out the class-agnostic structural edges and highlights the class-specific features.

Evaluation and Results

The researchers evaluated CLRP using pre-trained AlexNet, VGG16, and GoogLeNet models on the ImageNet (ILSVRC2012) validation set. Their findings confirm that CLRP significantly improves the quality of neural network explanations.

Qualitative and Quantitative Superiority

Qualitatively, CLRP successfully isolates specific objects in multi-object images, a task where standard LRP fails. Quantitatively, the method was tested using the "Pointing Game," which measures how often the most salient pixel resides within the ground-truth bounding box of the target object. CLRP1 and CLRP2 consistently outperformed LRP across various energy thresholds.

Furthermore, an ablation study demonstrated that the pixels identified by CLRP are more mathematically relevant to the model's decision. When the most discriminative 9x9 pixel patches identified by CLRP were masked out, the target class's activation score dropped more significantly compared to patches identified by standard LRP. For example, on VGG16, masking CLRP2 patches led to a 0.3913 drop in confidence, compared to 0.3713 for LRP.

Computational Efficiency

Beyond theoretical improvements, the authors addressed the practical bottleneck of generating explanations. By implementing LRP and CLRP on GPUs using PyTorch, they achieved a massive speedup—reducing the time per explanation from approximately 30 seconds on a CPU to just 0.18 seconds. This efficiency makes large-scale quantitative evaluation and real-time application of these methods feasible.

Conclusion

Contrastive Layer-wise Relevance Propagation (CLRP) addresses a significant gap in the interpretability of deep learning models. By recognizing and filtering out shared structural information through a contrastive approach, CLRP provides the class-discriminative insights that standard backpropagation methods lack. While challenges remain in distinguishing between highly similar intra-class variations, CLRP represents a substantial step toward making the "black box" of CNNs more transparent and accountable.

Summary updated

BibTeX
@inproceedings{gu2018understanding,
  author = {Jindong Gu and Yinchong Yang and Volker Tresp},
  title = {{Understanding Individual Decisions of CNNs via Contrastive Backpropagation}},
  booktitle = {ACCV},
  year = {2018},
  url = {https://openreview.net/forum?id=d0VbkWv_xx7},
}
Figure