PredDiff: Explanations and interactions from conditional expectations

Stefan Blücher, Johanna Vielhaben, Nils Strodthoff · DOI

TL;DR

This paper revitalizes Prediction Difference Analysis (PredDiff) as a powerful, model-agnostic tool for Explainable AI (XAI), extending it with a mathematically rigorous way to measure interactions between features. Unlike popular Shapley value-based methods that suffer from exponential computational scaling, PredDiff scales linearly, making it feasible to extract rich, interactive explanations even for complex, high-dimensional image classifiers.

What Problem Does This Paper Address?

In the Explainable AI (XAI) community, most feature attribution methods (like SHAP or Integrated Gradients) summarize a model's behavior by assigning a single "importance" score to each input feature (e.g., a single pixel in an image or a single lab value in a health record). However, this paints a misleadingly simple picture. In reality, machine learning models rely heavily on complex, non-linear interactions between features—like how age and biological sex might jointly aggravate a medical risk, or how two distinct curves form a specific digit.

While some methods (like the Shapley Interaction Index) attempt to measure these joint effects, they are computationally explosive, scaling exponentially with the number of features ($\mathcal{O}(N!)$). Furthermore, the authors identify a theoretical gap: existing interaction frameworks often treat regression and classification tasks identically, which leads to mathematical inconsistencies when dealing with the probabilities inherent to classification.

Methods

The authors build on PredDiff, a probabilistically sound method that measures a feature's relevance by "marginalizing" (hiding/imputing) it and observing how the model's prediction changes.

To tackle interactions, they introduce a novel anchored functional decomposition. This allows them to break down a model's prediction into "main effects" (the isolated impact of a feature) and "joint effects" (the super-additive or interactive impact of two or more features combined).

Key methodological innovations include:

  • Linear Scaling: Because PredDiff isolates feature attributions directly rather than correlating all possible feature coalitions (like Shapley does), calculating interactions scales linearly with the number of feature pairs you want to test.
  • Logarithmic Differences for Classification: The authors mathematically prove that for classification tasks, attribution measures must use logarithmic differences (information difference) rather than raw probability differences. This ensures the method satisfies the "no-interaction property"—meaning if a model doesn't actually use two features interactively, the interaction score will correctly be zero.

Datasets

The authors evaluated their approach across a mix of theoretical and real-world datasets:

  • Synthetic Regression Datasets: Custom continuous functions and logic gates (AND, OR, XOR) to test mathematical ground truths.
  • NHANES: A real-world healthcare dataset predicting mortality risk based on 79 demographic and clinical features.
  • MNIST: The classic handwritten digit dataset, used to visualize interaction heatmaps between image superpixels.
  • CUB-200-2011 Birds: A high-resolution, fine-grained image classification dataset used to prove PredDiff can handle large-scale, real-world computer vision tasks.

Key Insights and Ideas

  • The "Completeness Axiom" Trade-off: Shapley values force the sum of all feature importances to equal the model's total prediction. Enforcing this axiom is exactly what causes Shapley's exponential computational cost. PredDiff drops this axiom at the single-feature level, but beautifully recovers it if you sum up all higher-order interactions. This allows users to intentionally stop at 2nd-order interactions, saving massive amounts of compute while still getting highly accurate insights.
  • Single-Feature Attributions Can Lie: In an XOR logic problem, looking at a single feature's importance yields a score of zero (because feature A is useless without knowing feature B). PredDiff's interaction metric resolves this paradox by correctly identifying that the predictive power lies entirely in the joint effect.
  • Classification is Fundamentally Different: In classification, the model's output probabilities and the underlying data distribution are implicitly tied together. Using standard regression-based XAI math on classifiers leads to entangled, inaccurate attributions.

Key Results

  • Massive Speedups: PredDiff achieves optimal linear scaling. In convergence tests, PredDiff reached a high-fidelity attribution baseline in fewer than 50 model calls. In contrast, Shapley values remained noisy and failed to fully converge even after 1,200 model calls.
  • Ground-Truth Recovery: On synthetic white-box models where the true interactions are known, PredDiff consistently outperformed Shapley values in identifying the correct interacting feature pairs (e.g., achieving an Average Precision of 0.311 vs Shapley's 0.087 at 600 model calls).
  • Meaningful Visual Explanations: On the CUB Birds dataset, PredDiff successfully generated sparse, highly interpretable interaction heatmaps. It revealed that the model makes predictions by jointly looking at distinct, spatially separated semantic parts of the bird (e.g., the beak and the wing), an insight completely invisible to standard single-pixel heatmaps.

Limitations and Future Work

  • Imputer Dependence: Like all perturbation-based XAI methods, PredDiff requires an "imputer" to fill in hidden features. The choice of imputer (e.g., marginal vs. conditional) impacts the results. The authors note that a systematic study of how imputer choice affects interaction scores on massive datasets like ImageNet is needed.
  • Identifying Which Features to Test: While PredDiff scales linearly for a given pair of features, testing all possible pairs in a massive feature set is still $\mathcal{O}(N^2)$. The authors currently use heuristics (like only testing interactions between the top-5 most relevant individual features). Developing automated, hierarchical ways to identify interacting feature sets is a promising direction for future work.

Summary updated

BibTeX
@article{blucher2022preddiff,
  author = {Stefan Blücher and Johanna Vielhaben and Nils Strodthoff},
  title = {{PredDiff: Explanations and interactions from conditional expectations}},
  journal = {Artificial Intelligence},
  year = {2022},
  doi = {10.1016/j.artint.2022.103774},
}
Figure