Papers
Topics
Authors
Recent
Search
2000 character limit reached

Statistical Analysis of using the Shapley Value for Sensor Anomaly Localization with Accurate Classifiers

Published 30 May 2026 in stat.ML, cs.LG, and eess.SP | (2606.00867v1)

Abstract: Recent publications have suggested using the Shap- ley value for sensor anomaly/attack localization. We study the performance of such an approach by using mathematically de- fined optimum binary classifiers in the Shapley value calculation. To judge localization performance, we study the ability of the Shapley value of a given sensor observation to determine if that observation is anomalous. First, we prove that for cases with independent sensor observations, an optimized anomaly test using the Shapley value is equivalent to an optimized lower-complexity anomaly test using a single term in the Shapley value calculation, yielding the exact same probability of error. For some popular dependent observation cases involving two sensors, including correlated bivariate Gaussian/Laplacian probability density functions and constant/Gaussian at- tacks/anomalies, we prove that these two tests are fundamentally different, yielding different decision regions and error probabil- ities. Further, we prove that the Shapley value test is sometimes strictly inferior to the other (single term in Shapley calculation) test in certain statistically dependent bivariate Gaussian scenarios with large correlation magnitude and additive attacks/anomalies, while it is strictly superior in others, depending on the sign of the correlation. One can combine these two approaches to obtain a strictly better approach in these cases. These results, which provide the first theoretical statistical analysis of Shapley-based localization, seem very interesting based on the wide acceptance of the Shapley value by many researchers and should encourage further research on this topic. Numerical results are provided which illustrate our findings.

Authors (2)

Summary

  • The paper establishes that for independent sensors, the Shapley value is equivalent to using the marginal classifier score, yielding identical error probabilities.
  • It rigorously derives analytical proofs for independent and dependent sensor scenarios, demonstrating how sensor correlation alters decision boundaries.
  • Empirical simulations validate the theory and suggest an adaptive hybrid approach combining both methods for enhanced performance in correlated settings.

Statistical Analysis of Shapley Value for Sensor Anomaly Localization with Accurate Classifiers

Introduction and Motivation

This paper provides a rigorous statistical investigation into the efficacy of the Shapley value as a feature attribution mechanism for sensor anomaly localization, under the realistic and practically meaningful assumption that optimal (Bayes-optimal) binary classifiers are used in the Shapley value calculation. Although the Shapley value is widely adopted in ML explainability and recent works have advocated its use in the context of anomaly localization, its theoretical statistical performance—particularly in comparison to using a single classifier output directly—lacks in-depth study. This work addresses that gap, providing both mathematical proofs and empirical results across independent and dependent observation regimes.

Problem Formulation

Consider NN sensors each providing a scalar observation x1,...,xNx_1, ..., x_N. The task is to localize which sensor(s) are anomalous or under attack. The Shapley value for each sensor is computed using a set function v(⋅)v(\cdot) representing the output of a soft classifier, engineered here as the log-likelihood ratio (i.e., the Bayes-optimal classifier). Sensor ii’s Shapley value is then computed via a summation over all subsets SS not containing ii, giving a computational complexity that is exponential in NN. The alternative is simply to use v(i)v(i), i.e., the optimal anomaly score for xix_i marginally.

Analytical Results: Independent Sensors

The central result for independent observations is that the Shapley value and the marginal classifier test are provably identical in separation power. Theorem III.1 formalizes this: the decision regions for Ï•(xi)\phi(x_i) and x1,...,xNx_1, ..., x_N0 thresholds are equivalent, implying identical error probabilities.

This result has significant practical implications: Shapley value, despite its popularity and theoretical appeal, adds no additional localization power over using x1,...,xNx_1, ..., x_N1 for independent sensors—but requires exponentially more computation.

Analytical Results: Dependent Sensors

When sensor observations are not independent, the analytical results are substantially different. The paper demonstrates (Theorems III.3–III.5) that for several widely encountered dependent distribution scenarios—specifically, bivariate Gaussian and bivariate Laplacian settings with additive and Gaussian attack models—the Shapley value test and the marginal classifier test yield distinct decision regions and error probabilities.

These results are proven by showing that the two test statistics, as functions of the sensor observations, have fundamentally different dependencies in the joint observation space. For example, the Shapley statistic x1,...,xNx_1, ..., x_N2 in the bivariate Gaussian setting depends on both x1,...,xNx_1, ..., x_N3 and x1,...,xNx_1, ..., x_N4 due to the correlation x1,...,xNx_1, ..., x_N5, whereas x1,...,xNx_1, ..., x_N6 depends only on x1,...,xNx_1, ..., x_N7. As a result, their decision boundaries diverge except in the independent case (x1,...,xNx_1, ..., x_N8). Figure 1

Figure 1: Statistical error probabilities for the binary hypothesis test discussed in Theorem III.6, illustrating decision boundaries for the considered tests and highlighting their divergence under dependency.

Moreover, Theorem III.6 establishes that the relative performance of the Shapley test versus the marginal classifier test depends on the sign and magnitude of the correlation:

  • For high positive correlation (x1,...,xNx_1, ..., x_N9 close to v(â‹…)v(\cdot)0), the Shapley value can outperform the marginal test.
  • For high negative correlation (v(â‹…)v(\cdot)1 close to v(â‹…)v(\cdot)2), the Shapley value is strictly inferior.

Empirically, combining both test statistics based on a learned sign of v(â‹…)v(\cdot)3 achieves strictly better results than either alone in those extreme regimes.

Numerical Results

Extensive Monte Carlo simulations corroborate the theoretical findings:

  • For independent observation scenarios (various anomaly models and different noise/anomaly parameters), the error rates v(â‹…)v(\cdot)4 and v(â‹…)v(\cdot)5 are numerically indistinguishable, validating the equivalence theorem.
  • For correlated bivariate Gaussian and Laplacian settings, the simulation results confirm that the minimum achievable error rates can both favor and disfavor the Shapley statistic, depending on the correlation. Figure 2

    Figure 2: Plots of v(â‹…)v(\cdot)6 as defined in Equation (25), depicting the explicit dependency of the test statistic on both components and the impact of v(â‹…)v(\cdot)7 on the decision region.

Detailed error probabilities for numerous settings (see tables in the original text) underscore the claim that neither method is universally superior in the dependent case.

Implications and Future Directions

The findings have several direct consequences:

  • Practical efficiency: For independent sensors, practitioners should use the marginal likelihood ratio v(â‹…)v(\cdot)8 for anomaly localization since it is simpler and incurs much lower computational cost.
  • Caution with dependence: In correlated settings, the use of the Shapley value must be justified by the specifics of the sensor distribution; uncritical adoption can yield suboptimal outcomes.
  • Hybrid testing: An adaptive method that switches between statistics based on learned or estimated correlation structure can outperform either classical approach.

Theoretically, this work underlines the need for further research into feature attribution and localization statistics under dependency, a critically under-explored area in explainable AI and signal processing. There is potential for designing new statistics that combine strengths of both Shapley-based and marginal approaches for general dependency models.

Conclusion

This study delivers a comprehensive mathematical and empirical assessment of the Shapley value in the context of sensor anomaly localization with optimal classifiers. While the Shapley value offers no advantage in independent data regimes and incurs significant computational burden, its performance is not uniformly superior, nor inferior, in dependent regimes. The results highlight the necessity of tailored statistical analysis before employing complex attribution measures and motivate further work on adaptive and hybrid strategies for robust sensor anomaly localization.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 6 likes about this paper.