TopoSHAP: Shapley for Explainable and Efficient Topological Deep Learning
Authors: Mathilde Papillon, Nina Miolane
Organizations: Department of Physics, University of California, Santa Barbara · Department of Electrical and Computer Engineering, University of California, Santa Barbara
Topological deep learning (TDL) extends learning on graphs, such as molecules or social networks, to higher-order structures, such as rings in a molecule or groups in a social network. Explaining which of these structures drive a model's predictions, and which architectural components matter most for its performance, remains challenging. We introduce TopoSHAP, an efficient and general explanation framework that addresses both questions across topological domains and model architectures. TopoSHAP-cell assigns Shapley values to topological data cells and extracts compact explanations. These explanations match or outperform graph-based counterparts on GraphXAI benchmark data while running up to 112× faster. They also reveal advantageous topological feature design, leading to measured improvements in explanation recovery and predictive accuracy. On the architecture side, TopoSHAP-neighbor explains how neighborhoods contribute to model performance, and turns these evaluations into a backward-elimination search that identifies smaller, competitive architectures early in training. This is up to 11.3× cheaper than traditional TDL training sweeps.
Figures & tables
Figure 1: TopoSHAP explains a Topological Neural Network’s predictions and performance. A. TopoSHAP-cell considers the cells of the input combinatorial complex as players (1). Given certain coalitions Si of those players (2), it evaluates the model’s predictions (3). Averaging marginal contributions over coalitions outputs one Shapley value per cell and a sub-complex best preserving the prediction (4). B. TopoSHAP-neighbor manipulates the neighborhoods that contribute to feature updates in the TNN (1). It briefly trains a model with all neighborhoods, then masks coalitions of them (2) to measure neighborhood impact on test performance (3). Averaging marginal contributions over coalitions outputs one attribution value per neighborhood and a subset of that preserves model performance (4).
Benzene
FluorideCarbonyl
Mutagenicity
AlkaneCarbonyl
s / inst.
TopoSHAP (attribution)
0.859 ± 0.009
0.507 ± 0.047
0.798 ± 0.124
0.500 ± 0.081
3.3–4.0
TopoSHAP (explanation)
0.969 ± 0.009
0.340 ± 0.010
0.480 ± 0.135
0.354 ± 0.125
0.33–0.67
SubgraphX
0.796 ± 0.029
0.439 ± 0.107
0.344 ± 0.036
0.296 ± 0.010
21–52
PGExplainer
0.642 ± 0.044
0.555 ± 0.067
0.290 ± 0.102
0.205 ± 0.160
< 0.01 †
GNNExplainer
0.443 ± 0.054
0.210 ± 0.014
0.158 ± 0.023
0.162 ± 0.049
0.80–0.82
Random
0.250 ± 0.000
0.219 ± 0.000
0.132 ± 0.000
0.173 ± 0.000
< 0.01
Table 1: Explanation accuracy on graphs. GEA on parameter-matched GNN models; per method the better of GCN/GIN is shown (both in Section C.1 ). Last column: measured seconds per instance; † plus one-time training (142–1501 s per dataset). Bold is best and gray is within ≤1σ .
Benzene
FluorideCarbonyl
Mutagenicity
AlkaneCarbonyl
attribution, structural lifting
0.471 ± 0.018
0.491 ± 0.035
0.326 ± 0.065
0.333 ± 0.097
attribution, standard lifting
0.459 ± 0.192
0.516 ± 0.089
0.257 ± 0.077
0.348 ± 0.043
explanation, structural lifting
0.725 ± 0.105
0.426 ± 0.027
0.436 ± 0.081
0.362 ± 0.130
explanation, standard lifting
0.509 ± 0.188
0.372 ± 0.004
0.289 ± 0.117
0.364 ± 0.053
model accuracy, structural lifting
0.942 ± 0.005
0.947 ± 0.003
0.976 ± 0.002
0.967 ± 0.006
model accuracy, standard lifting
0.928 ± 0.003
0.936 ± 0.003
0.969 ± 0.009
0.971 ± 0.005
Table 2: Explanation accuracy on lifted complexes. Node-projected GEA for both TopoSHAP outputs of the GCCN with all eleven neighborhoods under the two liftings; the lower block gives each model’s test accuracy and its share of candidates with Δ>0 . Bold is best and gray is within ≤1σ .
Figure 2: Architecture selection: accuracy versus total compute. Dark markers denote TopoSHAP-neighbor; pale markers denote each family’s validation-selected sweep winner, charged for the full sweep. Error bars show standard deviation over five seeds for GCCN B=2 and three otherwise. Due to its practical costs, HOPSE sweeps are limited to complex-level datasets and we avoid training any HOPSE models on Pubmed. MANTRA uses balanced test accuracy.
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Train
Val
Test
Cells r0
r1
r2
Classes
GraphXAI benchmarks (lifted to cellular complexes)
Benzene
8400
1800
1800
21
22
2
2
Fluoride-Carbonyl
6069
1300
1302
21
23
2
2
Alkane-Carbonyl
787
168
170
21
23
2
2
Mutagenicity
1237
265
266
29
30
2
2
Graph benchmarks (lifted to cellular complexes)
Appendix
Table 3: Dataset statistics after preprocessing. Cells per rank are means over complexes (rank 0 nodes, rank 1 edges, rank 2 2-cells; MANTRA is natively simplicial). Node-level datasets are one complex whose splits partition the nodes (transductive, random 50/25/25 split, split seed 0); their split columns count nodes.
GCN models
Benzene
Fluoride
Mutagenicity
Alkane
TopoSHAP (attribution)
0.467 ± 0.078
0.398 ± 0.040
0.723 ± 0.074
0.411 ± 0.058
TopoSHAP (explanation)
0.377 ± 0.012
0.289 ± 0.094
0.317 ± 0.062
0.318 ± 0.074
TopoSHAP (explanation, zero-fill)
0.648 ± 0.055
0.244 ± 0.034
0.561 ± 0.062
0.378 ± 0.075
SubgraphX
0.664 ± 0.027
0.226 ± 0.024
0.344 ± 0.036
0.276 ± 0.013
PGExplainer
0.642 ± 0.044
0.429 ± 0.092
0.290 ± 0.102
0.203 ± 0.137
GNNExplainer
0.443 ± 0.054
0.210 ± 0.014
0.152 ± 0.033
0.066 ± 0.050
Appendix
Table 4: Explanation accuracy by model type. Node-level GEA (mean ± sd, 3 seeds) for each parameter-matched model type, one panel per type. The zero-fill row runs our explanation search with feature zero-filling in place of detachment. Bold: column best; gray: within one sd.
Method
Benzene
Fluoride
Mutagenicity
Alkane
TopoSHAP (attribution)
3.3 ± 0.9
3.3 ± 0.8
4.0 ± 3.1
3.3 ± 0.8
TopoSHAP (explanation)
0.33 ± 0.11
0.35 ± 0.11
0.67 ± 1.05
0.36 ± 0.11
SubgraphX
21.1 ± 16.1
34.3 ± 28.9
51.6 ± 79.4
40.4 ± 28.8
PGExplainer †
0.002 ± 0.000
0.002 ± 0.000
0.002 ± 0.000
0.002 ± 0.000
GNNExplainer
0.81 ± 0.08
0.80 ± 0.08
0.80 ± 0.07
0.82 ± 0.08
Random
0.001 ± 0.001
0.003 ± 0.010
0.001 ± 0.001
0.002 ± 0.003
Appendix
Table 5: Per-instance explanation cost. Measured wall-clock seconds per explained instance (mean ± sd over both model types and 3 seeds), on one NVIDIA H200 per run. † PGExplainer’s per-instance entry is inference only; the last row is its one-time training.
Face retention
Boundary recall
GEA, recomputed feat.
Dataset
standard
structure-only
standard
structure-only
(standard lifting)
Benzene
0.84 ± 0.14
0.95 ± 0.05
0.40 ± 0.14
0.86 ± 0.06
0.56 ± 0.09
Fluoride-Carbonyl
0.00 ± 0.00
0.00 ± 0.00
0.16 ± 0.06
0.53 ± 0.04
0.28 ± 0.02
Mutagenicity
0.05 ± 0.04
0.13 ± 0.15
0.08 ± 0.04
0.30 ± 0.04
0.18 ± 0.02
Alkane-Carbonyl
0.02 ± 0.03
0.03 ± 0.05
0.07 ± 0.13
0.50 ± 0.24
0.25 ± 0.17
Appendix
Table 6: Lifting diagnostics for the explanation output. Face retention: fraction of instances whose selected coalition contains at least one rank-2 cell. Boundary recall: mean recall of the annotated motif’s rank-1 cells. Both are computed on the full ground-truth-positive test populations (mean ± sd over three training seeds). The last column rescores the standard lifting with its summed features recomputed on every masked complex instead of held fixed (node-projected GEA); its structural-lifting counterpart is in Table 2 .
NCI1
NCI109
MUTAG
PROTEINS
TopoSHAP
0.218 ± 0.005
0.203 ± 0.044
0.175 ± 0.043
0.338 ± 0.067
Occlusion
0.254 ± 0.021
0.240 ± 0.038
0.231 ± 0.006
0.431 ± 0.065
Gradient × Input
0.552 ± 0.016
0.507 ± 0.049
0.499 ± 0.073
0.638 ± 0.047
Random
0.545 ± 0.004
0.491 ± 0.035
0.481 ± 0.014
0.666 ± 0.058
Appendix
Table 7: Faithfulness without ground truth. Deletion-AUC (lower is better; a fixed draw of 50 test complexes per dataset, except MUTAG, which uses its whole 47-complex test split). Subjects are GCCNs with all eleven neighborhoods under the structure-only lifting; explanations target the model’s own prediction.
Figure 3: MANTRA attributions on a count-matched pair. One orientable torus and one non-orientable Klein-bottle-family surface with identical cell counts (9 nodes, 27 edges, 18 triangles), drawn from the smallest count group containing both classes: per-cell contribution to the orientable-class logit margin for the three models of Section 5.3 (published-architecture baseline; the GCCN selected by TopoSHAP-neighbor at B=2 ; the sweep-best HOPSE). Panel headers give each model’s overall and count-conditional test AUROC. HOPSE is drawn on its own y -scale, stated on the axis. Per-cell values are single sampled-game estimates at T=512 orderings ( Section A.1 ); no aggregation, hence no error bars.
Model / input features
Balanced test acc.
Runs
Logistic regression on cell counts
0.505
1 fit
Structural features only
0.541
3 seeds (means only)
GCCN, selected ( B=2 , plain-accuracy selection)
0.641 ± 0.123
5 seeds
GCCN + Hodge Laplacian eigenvectors
0.876
3 seeds (means only)
HOPSE, selected ( B=2 )
0.771 ± 0.017
3 seeds
HOPSE, sweep best
0.792 ± 0.009
3 seeds
Appendix
Table 8: MANTRA orientability: feature and model comparison. Balanced test accuracy. The count-only row is a single logistic regression fit; the structural-features and eigenvector rows are means over three training seeds whose per-seed values were not exported, so no sd is shown. The feature study trains its own GCCN configuration, distinct from the selected models, so rows compare feature sets across configurations. Selection rows report mean ± sd over seeds.
GCCN family
Dataset
B=1
B=2
sweep
gap
Benzene
0.925 ± 0.007 ( × 1.0)
0.926 ± 0.004 ( × 2.0)
0.926 ± 0.002 ( × 22.7)
+0.000
Fluoride-Carb.
0.901 ± 0.057 ( × 1.0)
0.939 ± 0.006 ( × 1.9)
0.938 ± 0.004 ( × 20.6)
+0.001
Mutagenicity
0.967 ± 0.011 ( × 1.0)
0.975 ± 0.010 ( × 2.0)
0.964 ± 0.014 ( × 15.4)
+0.012
Alkane-Carb.
0.965 ± 0.006 ( × 1.0)
0.962 ± 0.005 ( × 2.4)
0.975 ± 0.003 ( × 16.2)
-0.012
NCI1
0.764 ± 0.011 ( × 1.0)
0.758 ± 0.010 ( × 2.8)
0.759 ± 0.022 ( × 15.0)
-0.000
Appendix
Table 9: Architecture selection: full results by model family. Test accuracy (mean ± sd; GCCN B=2 uses five seeds 42–46, all other columns the shared seeds 42–44; b balanced test accuracy on MANTRA) and, in parentheses, total training FLOPs as a multiple of that dataset’s B=1 run ( Section D.1 ); sweeps are charged their full grid. Gap = selection B=2 minus that family’s sweep; sweeps use per-seed validation-best configurations. —: not run. Pubmed carries no HOPSE runs ( Section B.1 ).
Dataset
TopoSHAP-neighbor B=2
Random B=2
Full default
Benzene
0.927 ± 0.000
0.925 ± 0.013
0.927 ± 0.003
Fluoride-Carbonyl
0.939 ± 0.007
0.929 ± 0.002
0.938 ± 0.003
Mutagenicity
0.976 ± 0.012
0.932 ± 0.061
0.972 ± 0.015
Alkane-Carbonyl
0.965 ± 0.006
0.973 ± 0.003
0.955 ± 0.007
NCI1
0.757 ± 0.013
0.755 ± 0.026
0.766 ± 0.005
MUTAG
0.915 ± 0.021
0.879 ± 0.025
0.879 ± 0.012
Appendix
Table 10: Shortlist baselines with shared initialization and training settings. Test accuracy (mean ± sd, shared seeds 42–44; b balanced on MANTRA). All three columns share the five-epoch initial model and standard continuation; random B=2 replaces backward elimination with two uniformly random architectures, and the full-model default trains all 11 neighborhoods with no search.
Figure 4: Wall-clock variant of Figure 2 . The same four marker groups as Figure 2 (selected GCCN, selected HOPSE, and each family’s sweep), with the horizontal axis showing measured wall-clock seconds (one NVIDIA H200 GPU per run) instead of FLOPs. Wall-clock time includes HOPSE’s preprocessing.
Brief-run epochs
Benzene
NCI1
MUTAG
3
0.926 ± 0.008
0.763 ± 0.006
0.879 ± 0.033
5 (protocol)
0.927 ± 0.000
0.757 ± 0.013
0.915 ± 0.021
10
0.925 ± 0.006
0.769 ± 0.008
0.887 ± 0.033
Appendix
Table 11: Sensitivity to the brief-run epoch count. Test accuracy of the B=2 selection (mean ± sd, 3 seeds) with the initial model trained for 3, 5 (default), or 10 epochs.
Figure 5: Backward-elimination traces on all eleven datasets. Masked validation accuracy along the GCCN elimination path, from eleven neighborhoods to one, for training seeds 42–46. Markers identify the stop candidate selected before the first removal whose accuracy loss exceeds τ ; elimination continues after this candidate is marked. All panels share one y -axis span, positioned per panel. MANTRA uses ordinary validation accuracy in this experiment.
Dataset
Agreement ρ (logit)
(accuracy)
Per-seed ρ (stability)
MUTAG
-0.37
+0.89
-0.16 ± 0.74
NCI1
-0.31
+0.14
-0.12 ± 0.95
NCI109
+0.09
+0.09
+0.20 ± 0.70
ZINC-subset (fixed recipe)
-0.09
-0.09
+0.14 ± 0.29
ZINC-subset (strong)
-0.31
-0.31
-0.45 ± 0.14
Alkane-Carbonyl
+0.49
+0.49
+0.50 ± 0.36
Appendix
Table 12: Attribution agreement with retraining. Spearman correlation between masked-game and retraining-game Shapley profiles over the six neighborhoods (masked: logit-scored, validation split; retraining: test metric). Agreement: correlation between seed-averaged attribution profiles. Stability: per-seed correlation, mean ± sd (seeds 42–44). Pooled row: 95% CI in brackets.
Setting
Status
Empty
Full
Best ( k )
Path best ( k )
Regret
Benzene
development
0.739
0.921
0.925 (3)
0.925 (3)
+0.0000
Mutagenicity
development
0.821
0.956
0.957 (5)
0.957 (5)
+0.0000
Alkane-Carbonyl
held-out
0.967
0.967
0.984 (4)
0.984 (4)
+0.0000
Fluoride-Carbonyl
development
0.822
0.935
0.943 (4)
0.943 (4)
+0.0000
MUTAG
held-out
0.723
0.901
0.922 (5)
0.922 (5)
+0.0000
NCI1
development
0.667
0.759
0.768 (3)
0.768 (5)
+0.0000
Appendix
Table 13: Oracle evaluation of candidate generation on the exhaustive benchmark. Backward elimination is rerun with each removal scored by the separately trained coalitions’ seed-averaged test values (three seeds); ties break toward the first neighborhood in the order of Section A.2 . Because it consults test scores, this is a diagnostic of the candidate generator, not a deployable selection. Empty = trained model with node features only; Full = all six neighborhoods; Best = best of all 64 subsets, with its size; Path best = best subset on the greedy elimination path; Regret = Best − Path best. ZINC values are negative test MAE (higher is better).
SHAP (SHapley Additive exPlanations) feature attribution assigns model predictions to input features using Shapley values from cooperative game theory.