Reimagining Anomalies: What If Anomalies Were Normal?
Philipp Liznerski, Saurabh Varshneya, Ece Calikus, Puyu Wang, Alexander Bartscher, Sebastian Josef Vollmer, Sophie Fellenz, Marius Kloft
TL;DR
The paper tackles the opacity of deep image anomaly detectors by introducing a semantic counterfactual explanation framework that generates multiple, disentangled alternatives for each anomaly. By training a generator (via GANs or diffusion models) to produce counterfactuals with target anomaly scores while preserving realism and minimal edits, it provides high-level, what-if explanations of the detector's decisions. Theoretical analysis characterizes the training dynamics and shows when CEs align with the data distribution or reveal the influence of the anomaly-score loss. Extensive experiments across MNIST, CIFAR-10, GTSDB, ImageNet-Neighbors, and related datasets demonstrate that the proposed CEs are normal, realistic, semantically disentangled, and minimally invasive, while also exposing detector biases and outperforming traditional feature-attribution methods in providing meaningful semantic insight.
Abstract
Deep learning-based methods have achieved a breakthrough in image anomaly detection, but their complexity introduces a considerable challenge to understanding why an instance is predicted to be anomalous. We introduce a novel explanation method that generates multiple alternative modifications for each anomaly, capturing diverse concepts of anomalousness. Each modification is trained to be perceived as normal by the anomaly detector. The method provides a semantic explanation of the mechanism that triggered the detector, allowing users to explore ``what-if scenarios.'' Qualitative and quantitative analyses across various image datasets demonstrate that applying this method to state-of-the-art detectors provides high-quality semantic explanations.
