RelShap: Relationally Consistent Shapley Explanations

Seungeun Lee, Joao Fonseca, Julia Stoyanovich
8/11/2026
cs.LG

Official code: duneag2/relshap (0 stars, Python, last commit 2026-06-17).

Abstract

Machine learning pipelines commonly flatten relational data into single-table representations, discarding structural constraints. Widely used Shapley value-based feature attributions then rely on feature independence, evaluating the model on combinations that could never arise in the underlying data, producing misleading explanations.

Show full abstract

We propose RelShap, a framework that incorporates relational constraints and data provenance into Shapley value computation, restricting both background data and coalition evaluation to relationally valid configurations. The framework is estimator-agnostic and composes with Kernel SHAP, Monte Carlo, and Leverage SHAP without altering their sampling or weighting properties. Functional dependencies further induce equivalence classes over feature coalitions, which RelShap exploits to reduce runtime without changing Shapley values; we provide a combinatorial characterization of the expected speedup. Experiments across multiple datasets, models, and estimators show that RelShap produces explanations that are more faithful to the data-generating process, correctly identifying the dominant feature in controlled settings where existing methods, including Conditional SHAP and ManifoldShap, do not. Our code is available at: https://github.com/duneag2/relshap.

View on arXivView PDF

Code Implementations(1)

duneag2/relshapOfficial100%
00Python, ShellFeb 9, 20265 months ago

Similar Papers

Cite this paper

@article{lee2026relshap,
  title  = {RelShap: Relationally Consistent Shapley Explanations},
  author = {Seungeun Lee and Joao Fonseca and Julia Stoyanovich},
  year   = {2026},
  eprint = {2608.11508},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.11508v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.11508.svg)](https://codeofpaper.com/paper/2608.11508)

Discussion