Back to all papers

Explanations or Attacks? Beyond Adversarial Edits in Visual Counterfactual Explanations

December 2, 2026arxiv logopreprint

Authors

Jan Masłowski,Mário A. T. Figueiredo,Marek Śmieja

Abstract

Counterfactual explanations and adversarial examples address a similar question: what is the smallest change to an input that flips a classifier's decision? However, a key difference is that a useful explanation must convey a meaningful change recognizable beyond the explained classifier; otherwise, even a visually plausible counterfactual may be little more than an adversarial perturbation. To check if a counterfactual behaves like an adversarial edit, we introduce an evaluation protocol based on simple diagnostics, independent oracles, and robustness to image transformations, including diffusion purification. Our analysis shows that several state-of-the-art counterfactual methods behave more like adversarial attacks than useful explanations. We address this problem by proposing SeeShift, a method that learns to shift the semantic latent code of a diffusion autoencoder without directly optimizing pixels based on classifier gradients. The resulting edit is transferred to the original image as a localized residual, preserving content outside the edited region. Experiments on human (CelebA-HQ) and animal (AFHQ) faces, and on chest radiographs (NIH ChestX-ray14) show that SeeShift achieves higher oracle validity and robustness to image transformations than competing methods, while maintaining visual similarity to the input images. A blinded study with physicians further shows that SeeShift depicts the intended clinical changes more frequently and is preferred over competing explanations. Our findings demonstrate that classifier flips and pixel proximity alone are insufficient to establish the explanatory value of a counterfactual.

Topics

cs.CV

Ready to Sharpen Your Edge?

Subscribe to join 11k+ peers who rely on RadAISlice. Get the essential weekly briefing that empowers you to navigate the future of radiology.

We respect your privacy. Unsubscribe at any time.