Introduction
Anomaly detectors are highly effective at identifying unusual data points, yet they often function as "black boxes," failing to explain the underlying reasons for their classifications. This lack of transparency is a significant hurdle for human operators who need to understand why a specific instance was flagged. AR-Pro addresses this challenge by generating "repaired" counterfactuals—versions of the data that show what it should have looked like if it were normal—using a diffusion model guided by formal mathematical properties.
Problem Statement
While modern detectors can pinpoint anomalies, such as a defective pixel or a sensor spike, they struggle to articulate the "why." A counterfactual explanation answers the question: "What should a non-anomalous version look like?" However, generating these is difficult; standard generative models may alter the entire context or fail to address the specific anomalous region. AR-Pro aims to mathematically guarantee that a generated repair serves as a high-quality, interpretable explanation.
Methodology: Property-Guided Diffusion
The core of AR-Pro is the observation that many anomaly detectors (e.g., reconstruction-based models, normalizing flows, and LLMs) are linearly decomposable. This means the total anomaly score is a sum of feature-wise scores and a regularizer. Leveraging this, the authors define four formal properties for a valid repair:
- Overall Improvement: The total anomaly score must decrease.
- Similarity: Non-anomalous regions must remain similar to the original data.
- Localized Improvement: The score of the specific anomalous region must decrease.
- Non-degradation: Scores in normal regions should not significantly increase.
To enforce these, AR-Pro utilizes Property-guided Diffusion. These properties are translated into loss functions that provide a guidance term during the reverse diffusion (denoising) process. Masked in-filling is also used to ensure that known "normal" parts of the input remain untouched.
Evaluation and Results
AR-Pro was evaluated across two distinct domains to prove its domain-independence:
- Vision (Industrial Manufacturing): MVTec-AD and VisA datasets.
- Time-Series (Cyber-physical systems): SWaT, WADI, and HAI sensor data.
The results demonstrate that standard diffusion is often insufficient, as it may erase labels or flip orientations. In contrast, AR-Pro's guidance preserves semantics. Quantitatively, AR-Pro showed an 84.27% average improvement in vision and 60.03% in time-series over unguided baselines. Notably, 99.26% of repairs were classified as non-anomalous by the detector (True Negative Rate), compared to just 2.67% for unguided baselines in time-series data.
Conclusion
AR-Pro provides a robust, domain-independent framework for anomaly explainability. While the computational cost of calculating guidance terms increases inference time (e.g., 236s vs 126s for vision), the resulting repairs are semantically meaningful and rigorously grounded in formal properties. Future work will focus on optimizing inference speed and extending this property-guided approach to other generative architectures beyond diffusion models.
Summary updated