Skip to main content
QUICK REVIEW

[Paper Review] Shapley Values of Reconstruction Errors of PCA for Explaining Anomaly Detection

Naoya Takeishi|arXiv (Cornell University)|Sep 8, 2019
Anomaly Detection Techniques and ApplicationsComputer Science29 references5 citations
TL;DR

This paper proposes a method to compute Shapley values of reconstruction errors in PCA-based anomaly detection, using the probabilistic model of PCA to accurately account for feature correlations. The approach provides more reliable explanations of anomalous features than raw reconstruction errors, with empirical results showing improved localization of anomalies in benchmark datasets.

ABSTRACT

We present a method to compute the Shapley values of reconstruction errors of principal component analysis (PCA), which is particularly useful in explaining the results of anomaly detection based on PCA. Because features are usually correlated when PCA-based anomaly detection is applied, care must be taken in computing a value function for the Shapley values. We utilize the probabilistic view of PCA, particularly its conditional distribution, to exactly compute a value function for the Shapely values. We also present numerical examples, which imply that the Shapley values are advantageous for explaining detected anomalies than raw reconstruction errors of each feature.

Motivation & Objective

  • To address the limitation of raw reconstruction errors in explaining anomalies when features are correlated.
  • To develop a method that fairly attributes contribution to reconstruction error using Shapley values.
  • To leverage the probabilistic formulation of PCA to compute exact value functions for Shapley values.
  • To demonstrate through numerical examples that Shapley values provide more accurate anomaly explanations than reconstruction errors alone.

Proposed method

  • Use the probabilistic view of PCA to derive the conditional distribution of features given the latent variables.
  • Define a value function for Shapley values based on the expected reconstruction error reduction when a feature is added to a coalition.
  • Compute exact Shapley values for each feature using the derived value function, accounting for feature dependencies.
  • Apply the method to PCA-based anomaly detection, where reconstruction error is the anomaly score.
  • Use kernel SHAP as a baseline for comparison in numerical experiments.
  • Validate the method on real-world datasets with known anomalies, comparing Shapley values to raw reconstruction errors.

Experimental results

Research questions

  • RQ1Can Shapley values provide a more accurate explanation of which features contribute most to the reconstruction error in PCA-based anomaly detection than raw reconstruction errors?
  • RQ2How does accounting for feature correlations via the probabilistic PCA model improve the interpretability of anomaly explanations?
  • RQ3To what extent do Shapley values correlate with human-identified anomalous features in real-world datasets?
  • RQ4How do Shapley values compare to kernel SHAP in explaining reconstruction errors, especially under feature dependence?
  • RQ5Can the proposed method consistently outperform reconstruction errors in localizing anomalies across diverse datasets?

Key findings

  • Shapley values significantly outperform raw reconstruction errors in localizing anomalies, with Hits@1 and Hits@3 scores increasing from 0.316 to 0.484 and 0.605 to 0.801 in the Max case, respectively.
  • In the Min case, Hits@1 and Hits@3 improved from 0.271 and 0.471 to 0.484 and 0.710, indicating stronger anomaly localization.
  • The correlation between reconstruction errors and Shapley values is high (median r_all = 0.866) across datasets, but varies significantly in normal (r_good) and anomalous (r_bad) subsets, indicating context-dependent performance.
  • For the Mammography dataset, the correlation in the normal subset is low (r_good = 0.268), suggesting Shapley values better isolate anomalies when features are correlated.
  • The method achieves high correlation (r_all > 0.9) between reconstruction errors and Shapley values in 7 out of 10 datasets, including Ionosphere (r_all = 0.984) and Wine (r_all = 0.817).
  • The results suggest that Shapley values are more reliable than raw reconstruction errors for explaining anomalies, particularly when feature dependencies exist.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.