TL;DR
ViaSHAP is a novel machine learning framework that flips the traditional explainable AI workflow on its head: instead of generating explanations post-hoc for a trained black-box model, it trains a network to directly predict Shapley values first, from which the final prediction is computed via simple summation. By leveraging Kolmogorov-Arnold Networks (KANs), ViaSHAP achieves predictive accuracy on par with state-of-the-art tree ensembles while delivering highly accurate feature attributions at zero additional computational cost during inference.
What Problem Does This Paper Address?
Shapley values are widely considered the gold standard for local feature attribution in machine learning because they uniquely satisfy desirable theoretical properties like local accuracy, missingness, and consistency. However, computing them exactly is an NP-hard problem, requiring $2^n$ model evaluations for $n$ features.
Existing solutions like KernelSHAP approximate these values but must be rerun from scratch for every single new prediction, introducing massive latency at inference time. Amortized explainers like FastSHAP train a secondary "explainer" model post-hoc to predict Shapley values, but this requires extra data, separate training pipelines, and can suffer from poor fidelity to the original black box.
The authors address a fundamental question: Why treat explanations as a secondary, post-hoc byproduct? Can we build a model that computes Shapley values as its primary internal representation to form predictions directly?
Methods
The authors introduce ViaSHAP (Prediction via Shapley Value Regression). Instead of mapping inputs directly to a prediction ($X \to Y$), the core model $\phi^{Via}$ maps inputs to an $n \times d$ matrix of feature attributions (where $n$ is the number of features and $d$ is the output dimensionality). The final prediction $\hat{y}$ is derived simply by summing these values column-wise.
To ensure that the internal matrix actually represents true Shapley values, ViaSHAP is trained using a dual-objective loss function:
- Prediction Loss: Standard task-specific loss (e.g., cross-entropy or MSE) evaluating the final summed prediction against the true target.
- Shapley Loss: A weighted least-squares loss that enforces the game-theoretic properties of Shapley values by sampling feature coalitions during training, ensuring that marginalized features are attributed a value of zero and that sub-coalitions sum up correctly.
The authors explore two architectural backbones for ViaSHAP: standard Multi-Layer Perceptrons (MLPs) and the recently proposed Kolmogorov-Arnold Networks (KANs), which replace fixed activation functions on nodes with learnable univariate spline functions on edges.
Datasets
The method was comprehensively evaluated across:
- 25 Tabular Datasets: Sourced from OpenML, covering a wide variety of domains, sizes, and feature dimensions (e.g., Adult, Abalone, Higgs, Heloc, Indian Pines).
- Image Dataset: CIFAR-10 was utilized to evaluate ViaSHAP's performance on computer vision tasks using ResNet18, ResNet50, and U-Net backbones.
Key Insights and Ideas
- Explanation as a Prior: Forcing the network to structure its predictions as a sum of feature attributions acts as a powerful regularizer.
- The Synergy with KANs: While MLP variants of ViaSHAP underperformed, KAN-based implementations ($KAN^{Via}$) excelled. Because KANs inherently decompose multivariate continuous functions into sums of univariate functions, they are mathematically predisposed to learning additive feature attribution properties like Shapley values.
- Link Function Trade-offs: Removing the final link function (like sigmoid or softmax) from the explanation layer drastically improves the mathematical accuracy of the predicted Shapley values relative to the ground truth, without harming the model's overall classification or regression accuracy.
Key Results
- Predictive Performance: On tabular data, $KAN^{Via}$ achieved the highest average rank in area under the ROC curve (AUC) across all 25 datasets, performing on par with top-tier tree ensemble methods like XGBoost and Random Forests, and significantly outperforming standard MLPs and TabNet.
- Inference Speedup: ViaSHAP eliminates explanation latency entirely. Generating explanations for 1,000 instances on the Adult dataset took just 0.0026 seconds with $KAN^{Via}$, compared to 56.92 seconds using KernelSHAP—a speedup of over four orders of magnitude.
- Explanation Accuracy: ViaSHAP's predicted attributions showed significantly higher cosine similarity and Spearman rank correlation to ground-truth Shapley values (calculated via expensive, fully-converged KernelSHAP) than FastSHAP on both tabular data and images.
Limitations and Future Work
- Differentiability Requirement: ViaSHAP relies entirely on backpropagation to optimize its dual-objective loss. Consequently, it cannot natively incorporate non-differentiable base architectures like standard decision trees.
- Value Function Sensitivity: The framework performs exceptionally well with the "baseline removal" approach for masking features, but its accuracy degrades significantly when using "marginal expectations," a limitation the authors note requires deeper theoretical investigation.
- Scalability to Massive Feature Spaces: While highly efficient at inference time, the coalition sampling required during the training phase scales with feature dimensionality, which could bottleneck training on datasets with tens of thousands of features.
Summary updated