Anomaly detection is widely used for identifying critical errors and suspicious behaviors, but current methods lack interpretability. We leverage common properties of existing methods and recent advances in generative models to introduce counterfactual explanations for anomaly detection. Given an input, we generate its counterfactual as a diffusion-based repair that shows what a non-anomalous version should have looked like. A key advantage of this approach is that it enables a domain-independent formal specification of explainability desiderata, offering a unified framework for generating and evaluating explanations. We demonstrate the effectiveness of our anomaly explainability framework, AR-Pro, on vision (MVTec, VisA) and time-series (SWaT, WADI, HAI) anomaly datasets. The code used for the experiments is accessible at: https://github.com/xjiae/arpro.
翻译:异常检测广泛应用于识别关键错误和可疑行为,但现有方法缺乏可解释性。我们结合现有方法的共性特征与生成模型的最新进展,为异常检测引入反事实解释。给定输入样本,我们通过基于扩散的修复生成其反事实版本,展示非异常样本应有的形态。该方法的关键优势在于能够实现与领域无关的可解释性需求形式化规约,为生成和评估解释提供统一框架。我们在视觉(MVTec、VisA)与时间序列(SWaT、WADI、HAI)异常检测数据集上验证了异常可解释性框架AR-Pro的有效性。实验所用代码可通过以下链接获取:https://github.com/xjiae/arpro。