Pith. sign in

REVIEW 3 major objections 5 minor 15 references

Reproducibility review of "Why Not Other Classes": Towards Class-Contrastive Back-Propagation Explanations

T0 review · 3 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash

Pith's one-line read This reproducibility study re-implements Wang & Wang's class-contrastive back-propagation explanations and finds the quantitative results hold — perturbation experiments and blurring/masking tables match — while the published heatmaps…

desk verdict A solid, transparent reproduction study that fixes real errors in the original and ships code; the Eq. 4 objection in the stress-test is a false alarm. read the letter →

arxiv 2501.11096 v1 pith:PSJPE55G submitted 2025-01-19 cs.CV cs.LG

classification cs.CVcs.LG
keywords class-contrastiveexplanationsback-propagationweightedcontrastsoftmaxexplainableAIVisionTransformersreproducibilitystudyGradCAM
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper re-implements the class-contrastive back-propagation explanations proposed by Wang & Wang (2022) and checks three claims: that perturbing pixels selected by weighted contrast tracks softmax probability and accuracy, that the method highlights decisive regions when several classes compete, and that it transfers to other back-propagation methods. The author's reproductions match the original paper's quantitative results on the tested models and datasets, and the method generalizes to XGradCAM, FullGrad, and Vision Transformers with modest modifications. The one unresolved piece is the heatmap visualization, which could not be made to look like the published figures because the original paper lacks code, fine-tuning details, and contains an erroneous perturbation equation. The value of the review is a corrected recipe, an open-source implementation, and a concrete diagnosis of where the original paper's reproducibility fails.

What carries the argument

The load-bearing object is the weighted-contrast identity: for any back-propagation explanation $\varphi^t$ computed from logits, the contrastive explanation is $\varphi^t_{\text{weighted}} = \varphi^t - \sum_{s\neq t} \alpha_s \varphi^s$ where $\alpha_s = \exp(y_s)/\sum_{k\neq t} \exp(y_k)$. For gradient-based methods this equals, up to a scale, the gradient of the softmax output $p_t$ with respect to the explained layer. The paper makes the identity operative by back-propagating from the $p_t$ neuron, and uses corrected clamped update equations for the perturbation experiments. This identity is what lets the method transfer across architectures and explanation methods.

What would settle it

Obtain the original authors' fine-tuned VGG-16 weights and their exact heatmap normalization, interpolation, and overlay code; if the reproduced weighted-contrast heatmaps then match the published figures, the mismatch is an artifact of this review's assumptions, and if they still differ, the published visualizations are not reproducible from the paper's own description.

Watch

Extended reading notes

Core claim

The central discovery, stated on the paper's own terms, is that the weighted-contrast explanation $\varphi^t_{\text{weighted}} = \varphi^t - \sum_{s\neq t} \alpha_s \varphi^s$, with $\alpha_s$ the softmax weight over non-target logits, is realized for gradient-based methods simply by back-propagating from the target softmax neuron $p_t$ rather than the logit $y_t$. This reproduction confirms that the perturbation and blurring/masking results of the original paper hold for the reconstructed setup, and that the recipe extends to XGradCAM, FullGrad, and Vision Transformers when ReLU is removed or normalization is applied. The heatmaps, however, do not reproduce, and the paper attributes that gap to missing documentation, an unstated epsilon of $3\times 10^{-3}$ (not $10^{-3}$), and errors in the clamped gradient-sign update in the original paper.

Load-bearing premise

The whole reproduction assumes the reconstructed method — corrected epsilon and equations, VGG-16 with batch normalization, and the chosen fine-tuning hyperparameters — is what the original authors actually ran, since the original paper provides no code or training details.

Editorial extensions

If this is right

  • Weighted contrast can be implemented by switching the back-propagation target from logit $y_t$ to softmax output $p_t$, making the method a one-line change for many existing explanation libraries.
  • The recipe carries over to ViTs and to XGradCAM and FullGrad, so class-contrastive explanations are not restricted to the original CNN/GradCAM setting.
  • The corrected perturbation equations and $\epsilon = 3\times 10^{-3}$ are needed to reproduce the original paper's Figure 3; using the printed $\epsilon = 10^{-3}$ changes the curves.
  • The author's open-source repository supplies the missing fine-tuning and implementation details, so future reproductions can be checked against deterministic code rather than reconstructed from prose.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The paper's observation that explanation weight grows with logit strength suggests that normalizing each class's explanation before the weighted subtraction would sharpen contrast on near-tie images; this is a testable extension the authors themselves gesture at.
  • Because the collapse of the weighted method for $p_2 < 0.1$ is explained by softmax gradient vanishing, contrastive methods are most informative exactly where the model is indecisive — a regime that misclassification debugging targets, so the boundary is a feature rather than a bug.
  • The same softmax-backprop trick may also apply to generative or language models whenever a probability distribution over mutually exclusive outputs replaces the logit, though the paper does not test this.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. This manuscript is a reproducibility study of Wang & Wang (2022), 'Why Not Other Classes?': Towards Class-Contrastive Back-Propagation Explanations. The authors re-implement the original experiments on ImageNet and CUB-200, verify Claims 1 and 2 quantitatively, and extend the method to XGradCAM, FullGrad, and Vision Transformers (ViT). They report that the original paper's quantitative findings are broadly reproduced, while the heatmap visualizations differ substantially; they attribute this to undocumented visualization details and an erroneous equation in the original paper. The paper releases an open-source repository containing all code used for the study.

Significance. The study is a valuable contribution to the reproducibility literature: it provides an independent implementation, identifies concrete errors and omissions in the original paper (wrong perturbation limit, incorrect sign perturbation equations, missing fine-tuning details), and tests generalization of the contrastive back-propagation idea beyond the original scope. The code is released under an open license, which facilitates further verification. I specifically checked the key theoretical step in Eq. (4): the chain-rule expansion of the softmax Jacobian gives ∂p_t/∂y_t = p_t(1-p_t) and ∂p_t/∂y_s = -p_t p_s for s≠t, which yields a common factor p_t(1-p_t) multiplying the weighted contrast in Eq. (1); the claimed proportionality is therefore exact, contrary to a concern raised in the review process. The main caveat is that the reproduction relies on author communication and an unofficial repository for crucial hyperparameters, which introduces uncertainty about whether the reconstructed method exactly matches the published one; the authors acknowledge this limitation transparently.

major comments (3)
  1. [Section 3.2.2, Table 1] The blurring/masking protocol uses equal-area perturbations, which differs from the original paper's protocol. While the authors justify this change to avoid bias, the quantitative comparison to the original Table 1 is therefore not a direct reproduction. The paper should either also report results under the original protocol or provide a sensitivity analysis to show how this deviation affects the 'similar results' conclusion.
  2. [Sections 3.4 and 3.5] The generalization claim is only partially successful. For ViT with GradCAM, the authors report 'qualitatively worse results' and 'nonsense' explanations, with only rare good cases; positive evidence comes mainly from gradient-weighted attention rollout. The abstract's statement that 'generalization seems to be generally good' is therefore overstated and should be revised to reflect the method- and architecture-dependent success.
  3. [Section 4.1] The paper is transparent about the missing details in the original paper, but it should also discuss the sensitivity of the reproduced results to the assumptions made, such as the choice of VGG-16 with batch normalization from the unofficial repository, the exact optimizer settings, and the corrected epsilon. A brief statement about which results are robust to these choices would strengthen the reproducibility verdict.
minor comments (5)
  1. [Section 2.2] The phrase 'GradCAM and and Gradient-weighted attention rollout' contains a duplicated 'and'.
  2. [Appendix A] The word 'calculateing' should be 'calculating'.
  3. [Throughout] The notation for the softmax probability is inconsistent ('pt' and 'pT'); please use a uniform notation.
  4. [Figure 6] The x-axis label is unclear; specify whether 'logit value' refers to the raw logit or the input to the softmax.
  5. [Abstract] The phrase 'the only difference being the visualization of heatmaps' is too strong given that the quantitative results are described as 'similar but not identical'; suggest rewording to 'the most salient difference'.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the review's reproductions are compared against external data and published figures, and its own acknowledged p_t-metric limitation is flagged as a critique, not used as a hidden derivation.

full rationale

This is a reproducibility study rather than a derivation: it reconstructs the original method from public information plus author communication (the epsilon correction to 3e-3 and the corrected clamping/indexing equations), runs the method on public datasets (ILSVRC2012, CUB-200, Food-101), and compares the outputs against the original paper's published figures. The corrected parameters and equations are external inputs, not fitted to the target results, so the conclusion that 'the reproductions show similar results as the original paper' is not forced by construction. The extensions to XGradCAM, FullGrad, and Vision Transformers are empirical and are evaluated qualitatively and quantitatively without tuning to a predetermined conclusion. The one self-referential element is the paper's own Section 4.2 admission that relying on p_t as the metric makes the weighted method's advantage 'obvious' and 'very expected'; however, the review explicitly flags this as a limitation of the original paper's evaluation rather than using it as a hidden derivation, so it does not constitute circularity in this review. The arithmetically incorrect proportionality in Eq. 4 is a correctness or validity concern about whether the tested weighted variants match the Eq. 1/2 formula, not a circular step.

Assumptions & free parameters 2 free parameters · 4 assumptions · 0 invented entities

The central claims rest on standard calculus, on the assumption that the original paper's method has been reconstructed correctly from sparse documentation and author contact, and on the assumption that explanation methods can be targeted at softmax outputs. No new physical or conceptual entities are introduced. The epsilon and p2-threshold values are design choices inherited from the original study and author communication, not fitted parameters.

free parameters (2)
  • Perturbation limit epsilon = 3e-3
    Not fitted; obtained by contacting the original authors after the published paper stated 1e-3. The reproduction uses 3e-3 for the main figure and 1e-3 in Appendix B.
  • Second-class probability threshold p2 = 0.1
    Chosen, inherited from the original paper, to select images with two dominant classes for blurring, masking, and visualization experiments.
assumptions (4)
  • domain assumption Back-propagation explanation methods can be applied to the softmax neuron p_t as a differentiable target, and the resulting map is a valid explanation.
    Used throughout Sections 2 and 3 to define contrastive explanations from softmax gradients.
  • standard math The softmax Jacobian identity d(p_t)/d(y_s) = p_t(delta_ts - p_s) and the chain rule are valid background results.
    Invoked in Eq 4 of Section 2.1; the reproduction's proof omits the (1 - p_t) factor in the negative term, so the claimed proportionality is not generally exact.
  • domain assumption GradCAM can be applied to Vision Transformer attention blocks by assuming multi-head attention outputs are spatially coherent nodes with 16x16 layout.
    Section 3.4; this is stated explicitly and is the load-bearing assumption for the ViT GradCAM extension.
  • domain assumption The original paper's method is correctly described by the equations in this reproduction, including the corrected perturbation equations and epsilon = 3e-3.
    Sections 3.1 and 4.1; the authors rely on author communication and an unofficial repository to fill gaps in the original.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Reproducibility review of "Why Not Other Classes": Towards Class-Contrastive Back-Propagation Explanations." pith.science (2026). https://pith.science/paper/PSJPE55G

@misc{pith2026250111096,
  author       = {Pith},
  title        = {Pith review of: Reproducibility review of "Why Not Other Classes": Towards Class-Contrastive Back-Propagation Explanations},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/PSJPE55G}},
  note         = {Machine review of arXiv:2501.11096}
}
read the original abstract

"Why Not Other Classes?": Towards Class-Contrastive Back-Propagation Explanations (Wang & Wang, 2022) provides a method for contrastively explaining why a certain class in a neural network image classifier is chosen above others. This method consists of using back-propagation-based explanation methods from after the softmax layer rather than before. Our work consists of reproducing the work in the original paper. We also provide extensions to the paper by evaluating the method on XGradCAM, FullGrad, and Vision Transformers to evaluate its generalization capabilities. The reproductions show similar results as the original paper, with the only difference being the visualization of heatmaps which could not be reproduced to look similar. The generalization seems to be generally good, with implementations working for Vision Transformers and alternative back-propagation methods. We also show that the original paper suffers from issues such as a lack of detail in the method and an erroneous equation which makes reproducibility difficult. To remedy this we provide an open-source repository containing all code used for this project.

Figures

Figures reproduced from arXiv: 2501.11096 by the authors.

Figure 1
Figure 1. Reproducing of Figure 3 in the original paper with [PITH_FULL_IMAGE:figures/full_fig_p005_1.png] view at source ↗
Figure 2
Figure 2. Reproduction of Figure 4 in the original paper. Comparison between the back-propagation from [PITH_FULL_IMAGE:figures/full_fig_p006_2.png] view at source ↗
Figure 3
Figure 3. Comparison between the back-propagation from logits [PITH_FULL_IMAGE:figures/full_fig_p007_3.png] view at source ↗
Figures from the paper (5 more)
Figure 4
Figure 4. Figure 4: Reproduction of Figure 5 in the original paper. Comparison between mean, max, and weighted [PITH_FULL_IMAGE:figures/full_fig_p008_4.png]
Figure 5
Figure 5. Figure 5: Comparison between proposed explanations. In (a) a comparison between GradCAM, GradCAM [PITH_FULL_IMAGE:figures/full_fig_p010_5.png]
Figure 6
Figure 6. Figure 6: Relationship between the explanation weight [PITH_FULL_IMAGE:figures/full_fig_p011_6.png]
Figure 7
Figure 7. Figure 7: Reproducing of Figure 3 in the original paper with [PITH_FULL_IMAGE:figures/full_fig_p015_7.png]
Figure 8
Figure 8. Figure 8: Comparison between proposed ViT explanations for a pre-trained ImageNet model. In (a) a [PITH_FULL_IMAGE:figures/full_fig_p016_8.png]

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

15 extracted references · 5 canonical work pages

  1. [1]

    Quantifying Attention Flow in Transformers

    Samira Abnar and Willem Zuidema. Quantifying Attention Flow in Transformers . arXiv, May 2020. doi:10.48550/arXiv.2005.00928

  2. [2]

    Food-101 -- mining discriminative components with random forests

    Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101 -- mining discriminative components with random forests. In European Conference on Computer Vision, 2014

  3. [3]

    Transformer Interpretability Beyond Attention Visualization

    Hila Chefer, Shir Gur, and Lior Wolf. Transformer Interpretability Beyond Attention Visualization . arXiv, December 2020. doi:10.48550/arXiv.2012.09838

  4. [4]

    ImageNet: A large-scale hierarchical image database

    Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database . In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp.\ 248--255, 2009. doi:10.1109/CVPR.2009.5206848

  5. [5]

    An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale

    Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale . arXiv, October 2020. doi:10.48550/arXiv.2010.11929

  6. [6]

    Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs

    Ruigang Fu, Qingyong Hu, Xiaohu Dong, Yulan Guo, Yinghui Gao, and Biao Li. Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs . ArXiv, abs/2008.02312, 2020. URL https://api.semanticscholar.org/CorpusID:221006223

  7. [7]

    Exploring Explainability for Vision Transformers , December 2020

    Jacob Gildenblat. Exploring Explainability for Vision Transformers , December 2020. URL https://jacobgil.github.io/deeplearning/vision-transformer-explainability#gradient-attention-rollout-for-class-specific-explainability. [Online; accessed 15. Dec. 2023]

  8. [8]

    PyTorch library for CAM methods

    Jacob Gildenblat and contributors. PyTorch library for CAM methods . https://github.com/jacobgil/pytorch-grad-cam, 2021

Show all 15 references
  1. [9]

    Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra

    Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad- CAM : Visual explanations from deep networks via gradient-based localization. International Journal of Computer Vision, 128 0 (2): 0 336--359, oct 2019. doi:10.1...

  2. [10]

    Very Deep Convolutional Networks for Large-Scale Image Recognition

    Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition . CoRR, abs/1409.1556, 2014. URL https://api.semanticscholar.org/CorpusID:14124313

  3. [11]

    Full-gradient representation for neural network visualization

    Suraj Srinivas and Fran c ois Fleuret. Full-gradient representation for neural network visualization. In Proceedings of the 33rd International Conference on Neural Information Processing Systems , number 371, pp.\ 4124--4133. Curran Associates Inc., Red Hook, NY, USA, December 2019

  4. [12]

    Visualizing the Impact of Feature Attribution Baselines

    Pascal Sturmfels, Scott Lundberg, and Su-In Lee. Visualizing the Impact of Feature Attribution Baselines . Distill, 5, 01 2020. doi:10.23915/distill.00022

  5. [13]

    The Caltech-UCSD Birds-200-2011 Dataset

    Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Jul 2011

  6. [14]

    Why Not Other Classes? : Towards Class-Contrastive Back-Propagation Explanations

    Yipei Wang and Xiaoqian Wang. Why Not Other Classes? : Towards Class-Contrastive Back-Propagation Explanations . In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/foru...

  7. [15]

    write newline

    " write newline "" before.all 'output.state := FUNCTION n.dashify 't := "" t empty not t #1 #1 substring "-" = t #1 #2 substring "--" = not "--" * t #2 global.max substring 't := t #1 #1 substring "-" = "-" * t #2 global.max substring 't := while if t #1 #1 substring * t #2 gl...

Pith tools

Reviewed August 10, 2026 · model on record in the stance chip above.