← Lab /Security & privacy

SHAP explanations for malware detection are unreliable as standalone tools

SHAP does not reliably reflect true malware behavior in detection models

Security & privacy arXiv 4 Sep 2026 Measurement Prototype evidence

Published as “Why Is SHAP Not a Reliable Standalone Explanation Framework for Malware Detection?”

Why it matters

Analysts should not rely on SHAP alone to justify malware detections; explanations must be complemented with explicit data-distribution validation and domain knowledge.

Summary

SHAP explanations for static PE malware detectors are unreliable as standalone evidence because conditional SHAP dilutes a model-used feature's credit by a factor of 1/m, attributes importance to features the model never uses, and can flip attribution signs across data distributions, while interventional SHAP evaluates the model on synthetic, off-manifold coalitions that never occur in real executables. The paper proves these failure modes mathematically (Lemmas 1-4) and confirms them empirically on three public malware benchmarks (EMBER-2018, EMBER-2024, BODMAS) with fixed LightGBM and XGBoost detectors. The evidence is strong, combining formal theorems with controlled experiments that isolate the explanation process from model performance.

What they found 3

  1. Interventional SHAP evaluates the classifier on synthetic coalitions that do not follow the real data distribution.

    “Therefore, interventional SHAP can evaluate the malware classifier on synthetic group coalitions that are not distributed like real malware or benign PE feature vectors.”

  2. Conditional SHAP assigns nonzero attribution to features the classifier never uses and dilutes the used feature’s credit by 1/m when redundant proxies are present.

    “Therefore, Conditional SHAP assigns nonzero attribution to features Rj and j ≥2, which the classifier does not use, and the attribution of the used feature R1 is reduced by a factor of 1/m.”

  3. Conditional SHAP can attribute importance to a feature solely because it is statistically informative about a used feature.

    “Conditional SHAP can assign attribution to a feature solely because it is statistically informative about another feature used by the model.”

Caveats 2

  • For a fixed value function and simplified input mapping, its attributions are formally valid and satisfy local accuracy, missingness, and consistency;
  • We limited the feature space to static PE features that are common and meaningful for malware analysis.

What’s new here 4

  • Provides formal lemmas (1-4) that quantify how feature dependence in PE data breaks both interventional and conditional SHAP.
  • Empirically demonstrates the 1/m attribution dilution predicted by theory on real malware datasets.
  • Shows that interventional SHAP creates off-manifold feature coalitions due to statistical dependence among PE feature groups.
  • Identifies proxy attribution and sign-instability failures specific to static PE feature representations.