Shapley Explanation Networks

Rui Wang, Xiaoqian Wang, David I. Inouye

Overview

Shapley Explanation Networks (SHAPNETs) integrate Shapley values directly into the neural network architecture as latent representations. This shift from "post-hoc" to "intrinsic" explanation allows for fast, layer-wise feature attribution and the unique ability to regularize a model's explanations during the training process.

The Problem with Post-Hoc Explanations

In the world of "black-box" AI, Shapley values are the gold standard for feature attribution—telling us exactly how much each input feature contributed to a prediction. However, traditional methods suffer from two major flaws:

  1. Computational Cost: Calculating exact Shapley values has exponential time complexity, making them notoriously slow to compute after a model is trained (post-hoc).
  2. Passive Nature: Because post-hoc explanations happen after training, they cannot influence the learning process. We can't easily tell a standard model to "be less sensitive to this specific feature" or "ensure your explanation is sparse."

The authors address these gaps by proposing a model class where the internal representations are the Shapley values, making the explanation a fundamental part of the forward pass.

Methods: Operationalizing Game Theory

The core innovation of this paper is the Shapley Transform, which translates game-theoretic concepts into modular neural network components.

Architecture of Shapley Modules, Shallow SHAPNETs, and Deep SHAPNETs.
  • Shapley Modules: These are small wrappers around arbitrary functions that compute local Shapley values for a tiny "active set" of features (usually 2–4). By keeping the active set small, the exponential math remains manageable.
  • Shallow SHAPNETs: By composing these modules, the network computes exact Shapley values for the entire input.
  • Deep SHAPNETs: These cascade multiple Shapley transforms. While they don't compute the "exact" global Shapley value, they are mathematically proven to maintain critical properties like missingness (missing features get zero credit) and local accuracy (the sum of attributions equals the output).
  • Butterfly Connections: To allow features to interact across deep layers efficiently, the authors use a "butterfly" connectivity pattern (similar to the Fast Fourier Transform), enabling complex dependencies without a massive computational explosion.
  • Explanation Regularization: Since the explanations are latent variables, the authors can add penalty terms (like $\ell_1$ or $\ell_\infty$ norms) to the explanations themselves during training. This forces the model to learn specific types of interpretability, such as sparsity or smoothness.

Key Insights and Ideas

  • Explanations for "Free": Because the explanation is the latent representation, you don't need a separate, slow post-hoc step. The explanation is produced simultaneously with the prediction.
  • Layer-wise Transparency: Unlike post-hoc methods that usually look at the input-to-output relationship, SHAPNETs allow you to probe the "importance" of features at every single layer of the deep network.
Layer-wise Shapley values for an image classification task under different regularization schemes.
  • "Right for the Right Reasons": By regularizing the explanations, the authors show you can improve model robustness. For example, $\ell_\infty$ regularization spreads importance across many pixels, making the model less sensitive to attacks on individual sensors or pixels.
  • Dynamic Pruning: The authors discovered a "missingness" corollary: if a feature's importance hits zero at one layer, it stays zero for all subsequent layers. This allows for conditional dynamic pruning, where the model can skip computations for unimportant features on the fly.

Key Results

The authors validated SHAPNETs across synthetic, tabular (Yeast, Breast Cancer Wisconsin), and image datasets (MNIST, FashionMNIST, CIFAR-10).

  • Accuracy: SHAPNETs perform comparably to standard Deep Neural Networks (DNNs) and CNNs. While there is a slight performance trade-off for the added interpretability, they remain highly competitive (e.g., achieving 99.5% accuracy on MNIST).
  • Speed: SHAPNETs are significantly faster than post-hoc methods. In one experiment, SHAPNET computed explanations in ~20 seconds, while the standard Kernel SHAP took nearly 600 seconds.
  • Explanation Quality: In "digit flipping" experiments (removing the most important pixels to see how fast the prediction changes), SHAPNETs outperformed several popular post-hoc baselines like Integrated Gradients and DeepLIFT.
  • Efficiency: Using $\ell_1$ regularization allowed the authors to prune a large percentage of the network's computations during inference with minimal loss in accuracy.

Limitations and Future Work

  • Computational Overhead: While faster than post-hoc methods during inference, the "Shapley Module" structure is still roughly 4x more computationally expensive than a vanilla DNN of the same size during the training phase.
  • Architecture Constraints: The current implementation relies on specific connectivity patterns (like the butterfly connection). It remains to be seen how easily this scales to more exotic architectures like Transformers.
  • SOTA Gap: On more complex image datasets like CIFAR-10, there is still a noticeable accuracy gap between SHAPNETs and state-of-the-art non-interpretable models. Closing this gap while maintaining "intrinsic" interpretability is a key direction for future research.

Summary updated

BibTeX
@inproceedings{wang2021shapley,
  author = {Rui Wang and Xiaoqian Wang and David I. Inouye},
  title = {{Shapley Explanation Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure