FW-Shapley: Real-time Estimation of Weighted Shapley Values

Pranoy Panda, Siddharth Tandon, Vineeth N BalasubramanianarXiv 2025 · DOI

TL;DR

FW-Shapley introduces a real-time, amortized framework to estimate weighted Shapley values for feature attribution and data valuation tasks. By deriving a novel weighted least squares characterization, the authors train a neural network estimator without needing expensive ground-truth labels, achieving a 14x speedup over state-of-the-art data valuation methods and a 27% improvement in feature attribution accuracy.

What Problem Does This Paper Address?

Shapley values are a cornerstone of cooperative game theory, widely used in machine learning to fairly assign credit to features (feature attribution) or training samples (data valuation). However, standard Shapley values suffer from two major limitations:

  1. Uniform Weighting: They assign equal weight to all subset sizes (cardinalities). In many ML tasks, this is counterintuitive; for instance, very small or very large subsets might be more informative. Weighted Shapley values (or Beta-Shapley) solve this by allowing flexible weights across cardinalities.
  2. Exponential Computational Cost: Computing both standard and weighted Shapley values requires evaluating an exponential number of feature/sample subsets, making them completely impractical for high-dimensional real-world datasets.

While previous work introduced FastSHAP to estimate standard Shapley values in real-time using a learned neural network, no such optimization-based, amortized framework existed for the more flexible weighted Shapley values.

Methods

The authors introduce FW-Shapley (Fast Weighted Shapley), which tackles the computational bottleneck through two key steps:

  1. Weighted Least Squares Characterization: The authors mathematically prove that weighted Shapley values can be formulated as the solution to a weighted least squares optimization problem. This provides the foundational objective function needed to train a neural network model.
  2. Amortized Estimatation: Instead of computing values from scratch for every new instance, FW-Shapley trains a parameterized estimator (a neural network) to predict the weighted Shapley values in a single forward pass.
  3. For feature attribution, they use a UNet architecture to map image pixels to attribution values.
  4. For data valuation, they introduce an attention-based architecture capable of handling large, varying numbers of training samples.

Crucially, the training is entirely unsupervised. The network minimizes the derived least-squares loss directly, meaning it does not require expensive, pre-computed ground-truth weighted Shapley values for training. The authors provide theoretical justification showing that minimizing this loss directly minimizes the true estimation error.

Datasets

The framework was evaluated on three popular image datasets:

  • CIFAR10
  • SVHN (Street View House Numbers)
  • FMNIST (Fashion MNIST)

Key Insights and Ideas

  • Bridging the Optimization Gap: The core "aha moment" is extending the weighted least squares formulation—previously only known for standard Shapley values—to the weighted/Beta-Shapley domain. This unlocks the ability to use gradient descent for value estimation.
  • Validating the Asymptotic Assumptions: The mathematical formulation relies on the assumption that the number of players (features or data points) is much larger than the weighting hyperparameters ($\alpha, \beta$). The authors numerically demonstrate that as the number of players $n$ approaches realistic numbers (like 500 or 1000), the weight functions smooth out and perfectly match the theoretical requirements.

Key Results

Feature Attribution

FW-Shapley significantly outperforms the standard-weight baseline, FastSHAP, by 27% on average in terms of Inclusion AUC (a metric measuring how effectively an explanation identifies informative image regions).

For example, on the CIFAR10 dataset, FW-Shapley achieves an Inclusion AUC of 0.44 compared to FastSHAP's 0.38:

Inclusion Curve on CIFAR10 showing FW-Shapley outperforming baselines

Similarly, on the SVHN dataset, FW-Shapley achieves an Inclusion AUC of 0.43 compared to FastSHAP's 0.31:

Inclusion Curve on SVHN dataset

Data Valuation (Noisy Label Detection)

In data valuation tasks, FW-Shapley matches the accuracy of the state-of-the-art KNN-Shapley method while delivering a massive 14x speedup (reducing runtime on the SVHN test set from 456 minutes down to just 1.3 minutes, including training time).

Limitations and Future Work

While FW-Shapley represents a major step forward, some limitations and areas for future exploration remain:

  • Feasible Set Restrictions: The hyperparameters $\alpha$ and $\beta$ must currently be selected from a predefined feasible set to ensure stable weight distributions and avoid extreme skewness.
  • Surrogate Model Dependency: For feature attribution, the method relies on a surrogate model to handle missing features, meaning the quality of the explanations is inherently bounded by the quality of this surrogate.

Summary updated

BibTeX
@misc{panda2025fw,
  author = {Pranoy Panda and Siddharth Tandon and Vineeth N Balasubramanian},
  title = {{FW-Shapley: Real-time Estimation of Weighted Shapley Values}},
  year = {2025},
  eprint = {2503.06602},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.06602},
}
Figure