B-XAIC Dataset: Benchmarking Explainable AI for Graph Neural Networks Using Chemical Data
Authors: Magdalena Proszewska, Tomasz Danel, Antoni Antoszek, Dawid Rymarczyk
Organizations: University of Edinburgh · Jagiellonian University, Faculty of Mathematics and Computer Science · Jagiellonian University, Faculty of Chemistry · Ardigen SA
Understanding the reasoning behind deep learning model predictions is crucial in cheminformatics and drug discovery, where molecular design determines their properties. However, current evaluation frameworks for Explainable AI (XAI) in this domain often rely on artificial datasets or simplified tasks, employing data-derived metrics that fail to capture the complexity of real-world scenarios and lack a direct link to explanation faithfulness. To address this, we introduce B-XAIC, a novel benchmark constructed from real-world molecular data and diverse tasks with known ground-truth rationales for assigned labels. Through a comprehensive evaluation using B-XAIC, we reveal limitations of existing XAI methods for Graph Neural Networks (GNNs) in the molecular domain. This benchmark provides a valuable resource for gaining deeper insights into the faithfulness of XAI, facilitating the development of more reliable and interpretable models.
Figures & tables
Figure 1: Schematic of our B-XAIC dataset and benchmark; (a) the dataset preparation steps include compound labeling, filtering, and sampling to the training, validation, and testing subsets; (b) for each positive example, atom and bond labels are provided to assess model explanations; (c) the patterns for the halogen and indole tasks are presented, as well as four example PAINS patterns.
Feature
MUTAG
Benzene
Flu.-Carb.
Alk.-Carb.
BA-2Mot.
ShapeGGen
B-XAIC
Size
0.2K
12K
8.7K
1.1K
1K
config.
50K
Tasks
1
1
1
1
1
1
7
Real mol.
Yes
Yes
Yes
Yes
No
No
Yes
NE eval
No
No
No
No
No
No
Yes
Multi-pat.
No
No
No
No
No
No
Yes
Edge+Node
No
Yes
Yes
Yes
Varies
Varies
Yes
Table 1: Comparison of XAI evaluation benchmarks for GNNs in chemistry. Size : number of graphs; Tasks : number of distinct prediction tasks; Real mol. : built from real molecules; NE eval : supports null-explanation (empty ground truth) evaluation; Multi-pat. : tasks with multiple admissible patterns; Edge+Node : provides both node- and edge-level ground truth. B-XAIC is the largest and most diverse, and the only one to support null-explanation evaluation on molecular data.
Figure 2: Histogram of pairwise Tanimoto similarities between molecules in B-XAIC; lower values indicate greater diversity.
task
% of graphs with pos. label
% of graphs with NE
% of nodes in SE
% of edges in SE
B
2.23
97.77
4.1 ± 2.1
—
P
13.22
86.78
4.3 ± 2.4
—
X
55.87
44.13
6.0 ± 4.0
—
indole
36.81
63.19
31.3 ± 12.1
31.4 ± 12.1
PAINS
32.89
67.11
34.1 ± 14.3
31.4 ± 14.7
rings-count
30.12
1.34
64.0 ± 16.0
61.8 ± 14.8
Table 2: Summary of B-XAIC statistics. SE denotes relevant subgraphs in positive instances, while NE denotes negative instances without explanations.
nodes
edges
Class
Explainer
NE
SE
avg
NE
SE
avg
GB
Saliency
0.51 ± 0.12
0.85 ± 0.12
0.68
0.31 ± 0.15
0.67 ± 0.06
0.49
Deconvolution
0.79 ± 0.10
0.81 ± 0.09
0.80
0.38 ± 0.20
0.69 ± 0.04
0.53
InputXGradient
0.54 ± 0.14
0.83 ± 0.14
0.68
0.37 ± 0.14
0.65 ± 0.05
0.51
GuidedBackprop
0.41 ± 0.12
0.87 ± 0.09
0.64
0.30 ± 0.08
0.70 ± 0.10
0.50
IntegratedGradients
0.39 ± 0.26
0.85 ± 0.13
0.62
0.32 ± 0.18
0.70 ± 0.06
0.51
Table 4: Evaluation of the node and edge explanations for the GIN model. Explainers are grouped as gradient-based (GB), graph-specific (GS), perturbation-based (PB), and surrogate (SU). Bold marks the best score and those not significantly worse (one-sided Wilcoxon test). Avg is the mean of NE and SE; uncertainty is reported for NE and SE.
Figure 3: Evaluation of node-level explanations for GIN. Null explanation results are shown in green, and subgraph explanation in orange. Average scores for each method are displayed below.
Figure 4: Evaluation of edge-level explanations for GIN. Null explanation results are shown in green, and subgraph explanation in orange. Average scores for each method are displayed below.
Figure 5: Node-level NE and SE score distributions across explainers, aggregated by model, highlighting that some models are inherently harder to explain.
Figure 6: Node-level explanations for graphs from both classes in the PAINS task using GIN. Top: input graphs and ground-truth explanations; below: explainer outputs (all explainers in Appendix A.12 ). Red/blue: included/excluded nodes; intermediate colors with explainer scores. PGMExplainer and SubgraphX perform best on the negative example; gradient-based methods on the positive one.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Task
5K Samples
10K Samples
25K Samples
50K Samples
100K Samples
B
99.92
99.92
99.96
99.96
99.94
P
99.97
99.99
99.98
99.98
100.00
X
99.77
99.85
99.94
99.94
99.96
indole
94.11
95.54
97.65
98.32
98.24
PAINS
82.79
85.81
91.91
92.90
93.20
rings-count
86.86
93.14
99.64
99.62
99.94
Appendix
Table 8: Model performance across different dataset scales
Explainer
1.0× IQR
1.5× IQR
2.0× IQR
3.0× IQR
PGMExplainer
0.918±0.066
0.979±0.020
0.989±0.016
0.997±0.007
Deconvolution
0.519±0.069
0.788±0.100
0.888±0.092
0.956±0.066
FlowX
0.389±0.103
0.720±0.127
0.873±0.097
0.969±0.044
GNNExplainer
0.363±0.150
0.683±0.116
0.874±0.028
0.980±0.016
GraphMaskExplainer
0.266±0.048
0.656±0.027
0.855±0.017
0.987±0.005
InputXGradient
0.273±0.125
0.536±0.137
0.713±0.118
0.894±0.074
Appendix
Table 10: Node-level NE scores (mean ± standard deviation) across seven tasks for different Tukey fence multipliers. Ordered based on 1.5×IQR scores.
Explainer
1.0× IQR
1.5× IQR
2.0× IQR
3.0× IQR
GNNExplainer
0.263±0.257
0.561±0.113
0.837±0.127
0.952±0.087
FlowX
0.181±0.041
0.550±0.071
0.807±0.063
0.951±0.010
Deconvolution
0.163±0.125
0.387±0.150
0.527±0.149
0.863±0.127
InputXGradient
0.152±0.084
0.369±0.171
0.580±0.106
0.880±0.058
GraphMaskExplainer
0.308±0.043
0.345±0.039
0.362±0.047
0.365±0.047
IntegratedGradients
0.157±0.112
0.317±0.183
0.525±0.211
0.769±0.224
Appendix
Table 11: Edge-level NE scores (mean ± standard deviation) across four tasks for different Tukey fence multipliers. Ordered based on 1.5×IQR scores.
Node
Edge
Multiplier
ρ
τ
ρ
τ
1.0× IQR
0.952
0.867
0.855
0.778
2.0× IQR
0.952
0.867
0.867
0.778
3.0× IQR
0.867
0.689
0.818
0.644
Appendix
Table 12: Rank stability relative to the 1.5× IQR setting, measured by Spearman’s ρ and Kendall’s τ .
Table 14
Task
Node
Edge
B
0.048
—
P
-0.128
—
X
0.199
—
indole
0.800
0.020
PAINS
0.504
-0.269
rings-count
0.932
0.925
Appendix
Table 17: Pearson correlations between F1 and mean explanation score, (SE+NE)/2 .
Figure 7: Boxplots showing the distribution of null explanation (NE) and subgraph explanation (SE) scores across different explainers for each model. Results are aggregated per model, highlighting that some models are inherently more difficult to explain than others.
Intrinsic interaction order
Task
# positive
min
median
mean
max
B
1,116
1
1
1.0
5
P
6,612
1
1
1.5
29
X
27,934
1
1
1.8
20
indole
18,403
9
9
10.3
108
PAINS
16,446
2
9
9.7
90
Appendix
Table 20: Full-dataset (50K molecules) intrinsic interaction order of the analytical game ν . On all molecules ν(V) matches the published label.
Task
GIN F1
# mols
intrinsic order
atom-recovery AUROC (mean / min)
model-error ∥⋅∥
λ=2 trunc. ∥⋅∥
B
1.00
87
1
1.00 / 1.00
2.07
1.61
P
1.00
100
1
1.00 / 1.00
2.42
1.96
X
1.00
100
1
1.00 / 0.91
1.52
0.98
indole
0.98
78
9
0.98 / 0.82
1.81
1.64
PAINS
0.93
100
2–12
0.77 / 0.10
3.41
3.12
rings-max
0.92
22
7
0.76 / 0.54
1.84
1.47
Appendix
Table 21: Exact Shapley/Möbius evaluation of the trained GIN against the analytical reference ν (node-deletion masking; small-molecule subset so 2n is exact). Norms are over the interaction vector.
Figure 8: Evaluation of node explanations for all model-explainer combinations. Null explanation results are shown in green, and subgraph explanation results in orange. Overall average scores for each method are displayed in the center.
Figure 9: Evaluation of edge explanations for all model-explainer combinations. Null explanation results are shown in green, and subgraph explanation results in orange. Overall average scores for each method are displayed in the center.
Figure 10: Node-level explanation examples on graphs from different classes in the B task, using the GIN model and different explanation methods.
Figure 11: Node-level explanation examples on graphs from different classes in the P task, using the GIN model and different explanation methods.
Figure 12: Node-level explanation examples on graphs from different classes in the X task, using the GIN model and different explanation methods.
Figure 13: Node-level explanation examples on graphs from different classes in the indole task, using the GIN model and different explanation methods.
Figure 14: Node-level explanation examples on graphs from different classes in the PAINS task, using the GIN model and different explanation methods.
Figure 15: Node-level explanation examples on graphs from different classes in the rings-count task, using the GIN model and different explanation methods.
Figure 16: Node-level explanation examples on graphs from different classes in the rings-max task, using the GIN model and different explanation methods.
Jagiellonian University, Faculty of Mathematics and Computer Science · Jagiellonian University, Doctoral School of Exact and Natural Sciences · Jagiellonian University, Jagiellonian Center for Artificial Intelligence +2