Table of Contents
Fetching ...

AR-Pro: Counterfactual Explanations for Anomaly Repair with Formal Properties

Xiayan Ji, Anton Xue, Eric Wong, Oleg Sokolsky, Insup Lee

TL;DR

This work uses common properties of existing methods and recent advances in generative models to introduce counterfactual explanations for anomaly detection, and demonstrates the effectiveness of the anomaly explainability framework, AR-Pro, on vision and time-series anomalies.

Abstract

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.

AR-Pro: Counterfactual Explanations for Anomaly Repair with Formal Properties

TL;DR

This work uses common properties of existing methods and recent advances in generative models to introduce counterfactual explanations for anomaly detection, and demonstrates the effectiveness of the anomaly explainability framework, AR-Pro, on vision and time-series anomalies.

Abstract

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.

Paper Structure

This paper contains 19 sections, 17 equations, 14 figures, 7 tables.

Figures (14)

  • Figure 1: Overview of the AR-Pro framework. We first identify an input's anomalous region and then use property-guided diffusion to repair it. This repair is the counterfactual anomaly explanation, where the following properties are defined with respect to a linearly decomposable anomaly detector (AD). (Overall Improvement) The repair has a lower anomaly score. (Similarity) The repair should resemble the original. (Localized Improvement) The score over the repaired region should improve. (Non-degradation) The score over the non-anomalous region should not significantly worsen.
  • Figure 2: Reconstruction-based anomaly detection exemplifies linear decomposition. The anomalous input $x \in \mathbb{R}^{n}$ is first reconstructed into $\hat{x} \in \mathbb{R}^{n}$, and the feature-wise anomaly scores are given by $\alpha_i(x) = \lvert\hat{x}_i - x_i\rvert^2 \in \mathbb{R}^{n}$ for $i = 1, \ldots, n$. Then, the standard $\ell^2$ reconstruction-based anomaly score is a linear combination of the feature scores: $s(x) = \alpha_1(x) + \cdots + \alpha_n (x)$.
  • Figure 3: We run property-guided diffusion with masked in-filling.
  • Figure 4: The original input and ground truth anomaly mask are displayed in the first two columns. The baseline method fails to preserve close similarity to the input PCB boards, as highlighted in the third column. Guided vision repair examples in the fourth column address these deficiencies.
  • Figure 5: MVTec repairs with AR-Pro; better resemble the original compared to the baseline.
  • ...and 9 more figures

Theorems & Definitions (4)

  • Definition 2.1: Linear Decomposition
  • Example 2.2
  • Example 2.3
  • Example 2.4