MAGE: Model-Level Graph Neural Networks Explanations via Motif-based Graph Generation
Authors: Zhaoning Yu
Hongyang Gao
Venue: ICLR 2025 Poster (2025)
Keywords: Model-level explanation
Graph Neural Networks
Motif
Primary area: interpretability and explainable AI
TL;DR: We proposed a motif-based model level graph neural networks explainer that generate explanations based on class-specific motifs.

Abstract: Graph Neural Networks (GNNs) have shown remarkable success in molecular tasks, yet their interpretability remains challenging. Traditional model-level explanation methods like XGNN and GNNInterpreter often fail to identify valid substructures like rings, leading to questionable interpretability. This limitation stems from XGNN's atom-by-atom approach and GNNInterpreter's reliance on average graph embeddings, which overlook the essential structural elements crucial for molecules. To address these gaps, we introduce an innovative **M**otif-b**A**sed **G**NN **E**xplainer (MAGE) that uses motifs as fundamental units for generating explanations. Our approach begins with extracting potential motifs through a motif decomposition technique. Then, we utilize an attention-based learning method to identify class-specific motifs. Finally, we employ a motif-based graph generator for each class to create molecular graph explanations based on these class-specific motifs. This novel method not only incorporates critical substructures into the explanations but also guarantees their validity, yielding results that are human-understandable. Our proposed method's effectiveness is demonstrated through quantitative and qualitative assessments conducted on six real-world molecular datasets.

Published as a conference paper at ICLR 2025
MAGE: MODEL-LEVEL GRAPH NEURAL NETWORKS EXPLANATIONS VIA MOTIF-BASED GRAPH GENERA- TION
Zhaoning Yu
Hongyang Gao
Department of Computer Science lowa State University
Department of Computer Science Iowa State University
Ames, IA 50010, USA znyu aelv@iastate.ed.
Ames, IA 50010, USA hygaol iataate
ABSTRACT
Graph Neural Networks (GNNs) have shown remarkable success in molecular tasks, yet their interpretability remains challenging. Traditional model-level explanation methods like XGNN and GNNInterpreter often fail to identify valid substructures like rings, leading to questionable interpretability. This limitation stems from XGNN's atom-br booo-by-ttom approach and GNNInterpreter's reliance on average graph embeddings. which overlook the essential structural elements crucial for molecules. To address these gaps, we introduce an innovative Motif-bAsed GNN Explainer (MAGE) that uses motifs as fundamental units for generating explanations. Our approach begins with extracting potential motifs through a motif decomposition technique. Then, we utilize attention -based learning method to identify class- specific motifs. Finally, we employ a motif-based graph generator for each class to create molecular graph explanations based on these class-specific motifs. This novel method not only incorporates critical substructures into the explanations but also guarantees their validity, yielding results that human- unmranndnndstt...blee. Our pro- posed method's i effectiveness is demonstrated through quantitative and qualitative assessments conducted on six real-world molecular datasets. The implementation of our method can be found at https//giinub.oom/hhnnnnng (ww1199999MAG.
INTRODUCTION
Graph Neural Networks (GNNs) ( (Kipf & Welling 2016 Xu et al. 2018 Gao et al. 2018 Rong et al.
2020; Sun et al. 2022 Wang et al. 2023) have become increasingly popular tools for modeling data
in the molecule held. As an effective method for learning representations from molecule data, GNNs have attained state-of- -fte-----heeeaeee art results in tasks like molecular representation learning (Gao & Ji 2019
Yu & Gao 2022a| Fang al.) [022] Zang et al., (023), and molecule generation (Bongini al.
2021 Lai et al. 2021). Despite their growing popularity, questions arise about the trustworthiness and decision-making processes of GNNs.
Explaining GNNs has become a major area of interest in recent years and existing methods can be broadly categorized into instance-level explanations and model-level explanations. Instance-level
explanations (Ying et al. 2019 Baldassarre & Azizpour 2019 Pope et al. [019 HHang et al. 2020
Vu & Thai
2020 Schnake et al. [2020] Luo et al. [2200] Funke al. [2200] Zhang al. 202 la
Shan et al. 2021 Wang et al. al.] 2021] Yuan et al. 2021] Wang et al. 2022; Yu & Gao 2022b) aim
to pinpoint specific nodes, edges, or subgraphs crucial for GNN model's 's predictions on one data
instance. Model-level explanations (Yuan et al., 2020 Wang & Shen, 2022) seek to demystify the overall behavior the GNN model by identifying patterns that generally lead to certain predictions. While instance-level methods offer detailed insights, they require extensive analysis across numerous examples to be reliable. In addition, for instance-level explainer, there is no requirement for an explanation to be valid (e.g., chemically valid molecular graph). Conversely, model-level methods provide more high-level and broader insights explanations that require less intensive human oversight.
Model-level explanation methods have two main categories: concept-based methods and generation- based methods. Concept- based explanation methods focus on identifying higher-level concepts that significantly influence the model's predictions (Azzolin et al.] 2022 Xuanyuan al. 2023). Also,

---

Published as a conference paper at ICLR 2025
these methods establish rules to illustrate how these concepts interconnected. like using logical formulas (Azzolin et al. 2022). Generation- based models try to learn a generative model that can generate synthetic graphs that optimized to maximize the behavior of the target GNN Yuan et al., 2020 Wang & Shen, 2022). Instead of defining the relationships between important concepts with formulas, generation- based models can generate novel graph structures that are optimized for specific properties. This capability is particularly crucial in the field of molecular learning.
Despite the notable benefits of generation-based model-level explanation methods for GNNs, they have received relatively low attention. Presently, the available generation- based model-level explain- ers for GNNs are somewhat limited in their appli- cation, especially in molecular graphs. For exam- ple, XGNN (Yuan al., 2020) explains models by building an explanation atom-by-atom and sets maximum degree for each atom to maintain the ex- planation's 's validity. On the other hand, GNNInter- preter (Wang& & Shen, (202)) adopts a more flexible approach by learning a generative explanation graph distribution. However, it ensures the validity of ex- planations by maximizing the similarity between the explanation graph embedding and the average embed- ding of all graphs, which is not particularly effective for molecular graphs. These existing methods often fail to consider the unique aspects of molecular structures. This oversight makes it challenging for these methods to include crucial substructures in their explanation graphs. It compromises the validity and reliability of the model-level explanations they provide for molecular graphs In Figure TT the explanations produced by both XGNN and GNNInterpreter exhibit low validity, making them ineffective for further analysis. Consequently. there's 's a clear need for more advanced and specialized model-level explanation methods that can effectively handle the unique characteristics of molecular graphs and provide meaningful insights into how GNNs interpret and process molecular data.
Validity of Explanations on Mutagenicity
GNNinterppnter
0.30
0.25
0.19
0.05
0.00
Label
Label
Figure I: Validity of explanations generated
by XGNN and GNNInterpreter on Mutagenic- ity dataset
This paper introduces motif-based approach for model-level explanations, MAGE, specifically tailored for GNNs in molecular representation learning tasks. The method begins by identifying all possible motifs from the molecular data. Following this, our method focuses pinpointing particularly significant motifs for a specific class. This is achieved through a novel attention- based motif learning process, which aids selecting these key motifs. Once these important motifs are identified, we employ a motif-based graph generator trained to produce explanations based on these motifs. Our experimental results show that our method reliably produces explanations featuring complex molecular structures, achieving complete validity across various molecular datasets. Furthermore, both quantitative and qualitative evaluations demonstrate that the explanation molecules created by our method are more representative and human-underrsanddabe than those generated by baseline methods.
The main contribution of our paper can be summarized as below:
1. We propose a novel framework for model-level explanations of GNNs that produces chemical valid explanations on molecular graphs
2. We develop an attention based mechanism to extract class-specifie motifs, allowing MAGE to provide tailored model-level explanations aligned with the predictive behavior of the target GNNs for each class.
3. We employ motifs foundational building blocks for model-level explanations generation, offering interpretable and structurally coherent insights into GNN behavior.
4. We demonstrate MAGE's superiority over existing methods through quantitative and quali- tative evaluations on multiple molecular datasets.
2 PRELIMINARY
Notations. A molecular dataset can be depicted as g = (G,, G2.... Ge..., G, }. where each molecular graph within this set is denoted by G; (V, F). The label of each graph will be assigned
2

---

Published as a conference paper at ICLR 2025
1945 Dunstes
Attentio
Louning
01)
Target GNN
7 Target Classifier
G
8:5 3.38
0.54 0.004
0.942
0.004
13
1.0
0322
8.58
31 3.50
3:3
5.0%
Filter
Mag [mi]5 M]
3.5
1006 3.225
0.353
0260
Scree Stare
Elenent-iise Multipliction
Figure 2: An illustration of the proposed MAGE framework. Given a dataset, motif extraction algorithm is initially employed to identify all potential motifs. Each motif's feature encoding is derived from the output encoding produced by the target model, which uses the motif graph as its input. A single-layer attention operator is employed to learn the optimal motif combination, maximizing the likelihood that the target classifier will classify both the reconstructed and original molecular encodings identically. To get score matrix, the method performs dot product between the attention coefficient matrix and the prediction probability matrix. This score matrix then normalized using a degree matrix. Finally, motifs whose corresponding scores exceed specific threshold are selected.
by 4 E L - t In this representation, constitutes a set of atoms, each treated as a node, while E' comprises the bonds, represented edges connecting these nodes. The structural information of each graph G; is encoded in several matrices. The adjacency matrix E [0.1] N represents the connections between atoms, where '1' indicates the presence of bond between a pair of atoms, a '0' signifies no bond, and N represents the total number of atoms the graph. Additionally, atom feature matrix X NxD captures the features of each atom, with D being the number of features characterizing each atom. Similarly, bond feature matrix Z E IR [ D. is used to describe the attributes of the bonds, where |E| represents the number of edges and Db denotes the number of features describing each bond.
Graph Neural Networks. Graph Neural Networks (GNNs) leverage adjacency matrix, node feature matrix, and edge feature matrix to learn node features. Despite the existence of various GNN variants like Graph Convolutional Networks (GCNs), Graph Attention Networks (GATs), and Graph Isomorphism Networks (GINs), they generally follow a message-passing mechanism. In this process, each GNN layer aggregates information from a node's ' neighbors to refine its representation. For a given hidden layer the message passing operation can be formulated as h; = f(h,-1, A, Z), where ho = X. Here, h4 E IR X is the node representation output from layer i, and D is the dimension of the output features. The function ff involves computing messages based on the previous layer's node embeddings (1; aggregating these messages from neighboring nodes, and updating the hidden representation h, for each node using the aggregated messages.
Motif. A motif is essentially recurring subgraph within a graph, closely associated with the graph's 's property, which has been thoroughly researched across various domains, including biochemistry, ecology, neurobiology, and engineering (Milo et al. 2002 Shen-Orr et al. 2002 Alon 2007 2019) and has been demonstrated to be of significant importance. GSN (Bouritsas et al. (2022) introduces motif information into node features to improve the learning of GNNs. HMGNN (Yu & Gao 2022a) generates a heterogeneous motif graph to enhance the molecular representation learning. MotifExplainer (Yu & Gao. 2022b) applies motifs to learn instance-level explanation for GNNs.
3

---

Published as a conference paper at ICLR 2025
3 MOTIF-BASED MODEL-LEVEL GNN EXPLAINER
This work introduces a Motif-bAsed GNN Explainer (MAGE), novel approach for model-level GNN explanations. This method uses motifs fundamental elements for interpreting the overarching behavior of a trained GNN for molecular graph classification at the model level. Instead of generating a graph the atomic level, using motifs allows the generator to assemble graphs from these predefined blocks. This method prevents the creation of potentially invalid intermediate substructures and speeds up the generation process. It achieves this by reducing the number configurations the generator must consider, focusing solely on the arrangement of motifs rather than the specific placement of each atom and bond.
Given dataset, denoted G with [g] molecules and C' classes, objective is to generate model- level explanations for a target GNN, which comprises feature extractor <(-) and a classifier f()). <(+) takes molecular graph or subgraph as input and outputs its feature representation. f()) utilizes this representation to predict the classification of a molecule.
MAGE begins with identifying all potential motifs within M. Following this, an attention-driven motif learning phase is employed to identify the most significant motifs for each class using Φ(-) and f()) Finally, graph generator uses the identified motifs to explain each class.
3.1 MOTIF EXTRACTION
There are mainly four methods for motif extraction. It's important to note that these motif extraction methods be integrated into our MAGE explanation method, demonstrating its versatility.
1) Ring and bonded pairs (R&B). Methods (Jin et al. 2018 Yu & Gao 2022a Bouritsas et al. 2022) in this category recognize simple rings and bonded pairs motif'. 2) Molecule decomposition. In this category, methods recognize motifs through molecule breakdown. These methods initially establish a catalog of target bonds, either through domain-specific knowledge, such the "breakable bonds"
used by RECAP (Lewell et al., 1998 Zhang et al. (021b) and BRICS (Degen et al.] 20088 Zang
al. 2023 Jiang al. 2023). or through hand-crafted rules, like "bridge bonds" (Jin et al. 2020).
The algorithms remove these target bonds from the molecules and use the consequent molecular fragments as motifs. 3) Molecule tokenization. Certain methods (Fang et al.) [203]] Kuenneth Ramprasad 2023) leverage the string representations of molecules, such SMILES, and directly apply the WordPiece algorithm from the NLP domain. The resulting strings within the constructed vocabulary are regarded as motifs. 4) Data-driven method. MotifPiece (Yu & Gao 2023) statistically identifies underlying structural or functional patterns specific to a given molecular data.
3.2 FLASS-WISE MOTIF IDENTIFICATION
With extracted significant motifs from the previous section, this section introduces an attention-based motif identification approach for each classification class.
Stage 1: molecule-motif relation score calculation.
Given the absence of a direct linkage between classification categories and motifs, we propose bridging them through molecules. To this end, we employ an attention operator to learn motif- molccule relation scores using the trained feature extractor o(-) and a classifier f()).
For given molecule graph G; and its associated motif set M,, use attention operator to identify a combination of motifs that can accurately reconstruct the representations of the molecule graph. The learned attention scores between G; and motifs in M, are interpreted as their relation scores. The initial step involves obtaining feature encoding for the molecule and motif graphs. This is done by feeding molecule graph motif graph into o(-). and the output encoding serves the molecule or motif:
G, hm, d(m.); for all m, M.
Next, an attention operator is used to aggregate the motif encoding using hg. as query and h,, 8 as keys and values. The resulting encoding, denoted h'g,- is the aggregated molecular encoding by
4

---

Published as a conference paper at ICLR 2025
combining motifs in Mc- eG,m; = 9 h W ) O.G;m EMEMM exp(EGmm.)
exp(eG,m.)
liG:
aGGm; hmma m.EM,
Σ
where g() is an attention operator, and W is weight matrix. The target classifier f(-) then uses aggregated encoding to generate predictions. The training process is designed to minimize the cross-entropy loss between the predicted probabilities of the aggregated molecular encoding and those the original molecular encoding:
=
The attention operator is trained to identify important motifs to represent the molecule. This leads to the molecule-moti relation score aGm,m and the probabilities associated with label predictions Ú = ((,,,
Stage 2: class-motif relation score calculation.
We repeat the process of Stage to compute the molecule-motif scores for each molecular graph. After that, we create a molecule-motif score matrix 5mm E RV and a molecule-class probability matrix IR. x Here, 5mm represents the molecule-motif relation score between molecule Syam
and motif p. If the motif does not appear in the molecule j. we Sig 0. Element Pkr denotes the probability that molecule k is associated with label r.
Subsequently, we perform a matrix multiplication between 5tm and P to get class-motif relation score matrix Sem.
G
S = Smm P, Sem
S Pkr
which represents the relationship between motif p and class Then, we normalize Sem by dividing each column, corresponding to motif, by the number of molecules it appears.
Stage 3: class-wise motif filtering. We filter motif's for each class using class-wise motif scores from the previous stage. The motif set for the class C,
Mc. {m, > 0, siiisv)
where 0 is a hyper-ppare pper-parameter control the size of the important motif vocabulary. An illustration of our class-wise motif identification is provided in Figure
Mileastar Groy
Inaction
3.3 CLASS-WISE MOTIF-BASED GRAPH GENERATION
Section 3.2 identifies motifs of high relevance for each class. Build- ing this, our methodology employs motif-based generative model to construct model-level explanations tailored to each class. The motif-based molecular generation method can be divided into VAE-based (Jin et al., 2018 2020) and RL-based methods (Yang) et al. 2021). In approach, employ VAE-based method a generator. However, our approach can easily adapt to RL-based methods. The graph generation process is illustrated in Figure
Gopa facdd
Enwede
Tax Dasdl
Sinph Dacode
3.3.1 TREE DECOMPOSITION
Figure 3: Class-wise motif- based graph generation. Start- ing with molecular graph, we first construct junction tree. Next, tree encoder is applied to obtain a tree encod- ing, which is then decoded by a tree decoder to reconstruct the junction tree. Finally, graph decoder uses the pre- dieted junction duce the molecular graph.
Given target class r, set of important motifs Mc, associated with the class r, and the set of molecules G, whose predicted class by trained GNN is For each molecular graph G; Gr. we first iden- tify the motifs in Mc, from G,; M M, n Mc. Subsequently, we pinpoint every edge in G; that does not belong any motif in M,. We treat each motif in M." and each non-motif edge as a cluster node. Then, construct cluster graph by connecting clusters with intersections. Finally, a spanning tree T is selected from this cluster graph, defined as the motif junction tree for G;,
repro-
5

---

Published as a conference paper at ICLR 2025
3.3.2 GRAPH ENCODER
We encode the latent representation of G (A, X) by the target GNN feature extractor <(-): ha = oAA, X). The mean μc and log variance log GG of the variational posterior approximation are computed from hg with two separate affine layers. 2g is sampled from Gaussian distribution N (HG. In the variational posterior approximation, we use two different affine layers to compute the mean, represented as MG, and the log variance, denoted as log oG from hg. Then, we sample Zg from a Gaussian distribution N (HG, GG).
3.3.3 TREE ENCODER
We employ a graph neural network to encode the junction tree T=(AA XT), where every node i's feature z; is initially encoded by feeding its corresponding motif graph to o(-). Formally, the node embedding and tree embedding are updated as follows:
H GNN AT, XT), ht AGG(HT).
where GNN(-) is graph neural network, and AGG(.) is aggregation function. zy is sampled similarly as in the graph encoder, where zT is a tree encoding.
3.3.4 TREE DECODER
tree decoder is used to decode a junction tree from tree encoding 27. The decoder builds the tree in top-down approach, where nodes are created sequentially, one after the other. The node under consideration first obtains its embedding by inputting the existing tree into the tree encoder, and the resulting output is then used the node embedding. The node embedding is utilized for two predictions: determining whether the node has a child and identifying the child's label if child exists. Formally, for node
H' = GNN(A', X'), P. PRED(COMB(27) H,)), q. PRED (COED'C (ZT. (H),H;))
where A' and X' are the existing tree's adjacent matrix and node features, respectively. C-MB(.) and COMB' (-) are combination functions, and PRED(.) and PRED'() (.) are predictors. When the current node does not have new child, the decoder will go to the next node in the existing tree.
3.3.5 GRAPH DECODER
The final step is reproducing the molecular graph from the predicted junction tree T. Let G(T) be set of graphs whose junction tree is T. The decoder aims to find & as
G arg max f (G'). G'E9(T)
In our approach, we aim to ensure that the reproduced molecule maintains the characteristics of the target GNN. So we design the score function as fo (G,) f()(G.))lr,, where r the target label.
3.3.6 Loss FUNCTION
The loss function for graph generation comprises two components: the reconstruction loss and the property loss. The reconstruction loss ensures the generated graph matches the distribution of the original dataset. The property loss ensures the behavior of the generated graph aligns with the target GNN.
The reconstruction loss can be formally defined below:
LR Σ Lehild Σ Liabel
where Lehald corresponds to predicting whether node has a child, while Ltabel represents the loss associated with predicting the label of the newly added child. We perform teacher forcing for the reconstruction loss to make the information get the correct history each step.
The property loss is like below:
Cp Σ MSE(hG, hT) + > (CE((((TT),))
(4)

---

Published as a conference paper at ICLR 2025
Table 1: Validity results on six real-world datasets. OOM refers to out of memory.
Datasets
Models
Label
Label
Average
XGNN
0.34
0.25
0.295
Mutagenicity
GNNinterpreter
0.11
0.21
0.16
Ours
1.00
1.00
1.00
XGNN
0.70
0.21
0.45
PTC.MR
GNNInterprete
0.10
0,05
0.07
Ours
1.00
1.00
1.00
XGNN
0.49
0,56
0.51
PTC MM
GNNInterpreter
0.15
0,20
0.17
Ours
1.00
1.00
1.00
XGNN
0.48
0.37
0.42
PTC FM
GNNInterpreter
0.13
0.08
0.10
Ours
1.00
1.00
1.00
XGNN
0.92
0.71
0.81
AIDS
GNNInterpreter
0.08
0.08
Ours
1.00
1.00
1.00
XGNN
OOM
OOM
OOM
NCI-H23
GNNInterpreter
0.59
0.62
0.60
Ours
1.00
1.00
1.00
where hy is the embedding of the generated tree, T represents the predicted motif-node tree, hG is the corresponding graph embedding, G refers to the generated molecular graph, f(-) is the target classifier, and is the target label. The final loss function
== LR + Lx
(5)
3.3.7 EXPLANATION GENERATION AT SAMPLING TIME
During the sampling process, the method begins by randomly sampling encoding ž7, This encoding then passed through a tree decoder to reconstruct junction tree T. Subsequently, a graph decoder generates the explanation based the predicted junction T. The whole process shown in Figure 3.3.7
Tree Decode
Graph Decode
Zz
Figure 4: An illustration of the explanation sampling process.
4 EXPERIMENT
We conduct qualitative and quantitative experiments on six real-world datasets to evaluate the effectiveness of our proposed methods.
4.1 DATASET AND EXPERIMENTAL SETUP
We evaluate the proposed methods using molecule classification tasks on six real-world datasets: Mutagenicity, PTC.MR, MMC PTC.FM AIDS, and NCI-H23. The details of six datasets and experimental settings are represented in Appendix B and C
Baselines. We compare our MAGE model with two state-of-the-art baselines: XGNN and GNNIn- terpreter. Noted that all methods are tested using official implementation and compared in fair setting. We extract motif's by identifying "bridge bonds". We build a variant that uses the same motif' extraction and graph generation processes but without attention-based bassdd motif identification step. This variant is to demonstrate the effectiveness of our class-wise motif identification process. The details of this variant will be discussed in section 4.2
Evaluation metrics. Our quantitative evaluation uses two distinct metrics to assess performance: Validity and Average Probability.
7

---

Published as a conference paper at ICLR 2025
Table 2: Quantitative results for different explanation methods. We highlight the average class probability (higher is better) for six datasets. The best performances on each dataset are shown in bold. OOM refers to out of memory.
Datasets
Models
Label
Label
Average
XGNN
0.8992 0.0835
0.9831 0.0514
0.9411
GNNInterpreter
0.8542 0.3198
0.9938 0.0191
0.9240
Mutagenicity
Variant
0.9897 0.0754
0.9888 0.0302
0.9892
Ours
0.9977 +: 0.0032
0.9941 1 0.0240
0.9959
XGNN
0.9906 0.0718
0.9698 0.0417
0.9802
GNNnnterprerrr
0,9067 +: 0.1728
0,9697 1: 0,0211
0,9382
PTC_MR
Variant
0,9902 +: 0.0480
0.9641 +: 0.1
0,9771
Ours
0.9961 0.0375
0.9918 0.0621
0,9939
XGNN
0.9899 0.0994
0.9266 0.1059
0,9582
GNNinterpreter
0.9601 0.0638
0.9541 0.0207
0,9571
PTC_MM
Variant
0.9784 0.0475
0.9693 0.0279
0,9738
Ours
0.9914 + 0.0342
0.9833 + 0.0019
0,9873
XGNN
0.9967 0.0309
0.9380 0.0991
0,9673
GNNnnterpreter
0,9945 +: 0,0147
0,9460 + 0.0295
0,9702
PTC.FM
Variant
0.9882 1 0.0024
0.9790 1 0.0024
0,9836
Ours
0.9979 0.0024
0.9890 0.0024
0,9934
XGNN
0.9259 0.1861
0.9977 0.0225
0.9618
GNNInterpreter
0.4600 0,4983
0.9973 0.0116
0.7286
AIDS
Variant
0,9802 0.1112
0.9939 0.0564
0,9870
Ours
0.9883 + 0.0663
0,9903 + 0.0539
0.9893
XGNN
OOM 0,9883 + 0.0711 0.9874 + 0.0685 0.9936 0.0329
OOM
OOM
GNNnnterpreter
0.9997 + 0.0015
0,9940
NCI-H23
Variant
0.9863 + 0.01069 0.9934 0.0422
0.9868
Ours
0.9935
Validity. This metric defined as the proportion of chemically valid molecules out of the total number of generated molecules (Bilodeau et al. 2022).
# valid molecules
Validity
# generated molecules
This metric serves critical indicator of the practical applicability of our method, ensuring that the generated molecules not only align with the intended class but also adhere to fundamental chemical validity criteria.
Average Probability. Following the GNNInterpreter (Wang Shen 2022). this metric calculates the average class probability and the standard deviation of these probabilities across 1000 explanation graphs for each class within all six datasets.
Σ class probability
Average Probability
generated molecules'
This approach provides comprehensive measure of the consistency and reliability of the explanation graphs in representing different classes.
Together, these metrics offer robust framework for evaluating the effectiveness of our approach from both the accuracy and applicability perspectives. Considering XGNN's limitation in generating explanation graphs with edge features, we assign the default bond type from the RDKit library as the default edge feature for explanations produced by XGNN. We also report the training time and sampling time of different models in appendix F
4.2 QUANTITATIVE RESULTS
Table I details the Validity results for various models across six datasets. A notable observation from these results that our method consistently produces valid molecular explanation graphs for both classes in all cases. This reliability stems from method's 's of valid substructures foundational elements, effectively overcoming the limitation seen in atom-by-atom generation methods, which often compel the model to create chemically invalid intermediate structures.
8

---

Published as a conference paper at ICLR 2025
Table 3: The qualitative results for Mutagenicity dataset. The first class row of the table displays the explanation graphs corresponding to the Nonmutagen label, while the second class row presents the explanation graphs for the Mutagen label. The final column in the table provides examples of actual graphs. The different colors in the nodes represent different values in the node feature
Generated Model-L Lvell Explanation Graphs for Mutagenicity Dataset
Class
XGNN
GNNInterpreter
Ours
Example
Nonmutagen
Mutagen
Additionally, the data reveals that XGNN exhibits better validity than GNNInterpreter. The reason for this difference lies in the design of the algorithms: XGNN incorporates manual constraint the maximum atom degree, which aids in maintaining chemical validity. In contrast, GNNInterpreter align the embedding of its generated explanations with the average embedding of the dataset, which does not inherently ensure chemical validity and leads to more invalid generated molecules.
These findings from the validity experiment highlight principle: maximizing the inductive biases inherent in the molecular graph structure is important. It enables models to achieve higher levels of validity in the outputs, demonstrating that careful consideration of the structural characteristics of molecules can significantly enhance the performance and reliability of these models.
Table[]shove the average probability of four models on six real-world datasets. Our method outper- forms the baseline methods in ten out of twelve experiments, clearly highlighting its effectiveness. Additionally, our method consistently delivers strong results across both classes each dataset. This contrasts XGNN and GNNInterpreter, which tend to excel in one class but fall short in the other. We attribute this success of our method to its unique strategy of generating explanations in a motiff way, effectively reducing the influence of extrancous noise atoms in the data.
Furthermore, we conducted a comparative analysis between our method and variant model. This variant model operates by first identifying all potential motifs within the dataset. Once these motifs are extracted, it assesses them by putting each motif as an input to the target model. The evaluation of each motif is based the output probability associated with particular class, which is assigned as the motif's score. Following this scoring process, the method ranks all motifs in order of their scores. Only motifs whose scores exceed 0.9 are chosen to refine the selection.
The outcomes of our study indicate that our method outperforms the variant model across all classes. This significant improvement underscores the efficiency of our attention-based motif learning module. Unlike the variant model, which solely focuses on the individual motifs without considering their functional roles within the molecules, our method learns and understands the interplay between motifs and molecules. This enables our approach to effectively identify and select motifs relevant to the specific molecular context while simultaneously filtering out motifs that do not contribute meaningfully, often called noise motifs.
4.3 QUALITATIVE RESULTS
Table presents the qualitative assessment of three different methods applied to the two classes of the Mutagenicity dataset. The table also includes actual graph examples from the dataset for

---

Published as a conference paper at ICLR 2025
reference. Our analysis reveals that our method can consistently produce human-understnn understanddbble and valid explanation graphs, which XGNN and GNNInterpreter seem to lack. More qualitative results can be found in Appendix
We observed a trend in GNNInterpreter to produce explanations that are disconnected. This is likely due to its approach of aligning explanation embeddings with the dataset's average embedding, resulting in a focus on node features rather than structural details. XGNN, on the other hand, tends to create explanations with invalid ring structures. Although XGNN imposes constraints on the degree of each atom, its siom-by-aton generation approach makes it challenging to form valid ring structures. Our method can generate explanations with meaningful substructures like rings.
This inability of XGNN and GNNInterpreter to effectively identify complex molecular structures may contribute to their lower validity in explanation generation. Our method, in contrast, successfully nav- igates these complexities, offering more meaningful, accurate and structurally coherent explanations. This difference highlights the importance of considering both node features and molecular structures in the generation of explanation graphs, a balance that our approach seems to strike effectively.
4.4
ABLATION STUDY: Loss FUCTION
Table 4: Comparison of different components of the loss function on Mutagenicity dataset.
Loss function
Label 0
Label
CR
0.9827 1 0.0580
0.9892 1 0.0482
CP
0.9881 + 0.0518
0.9805 + 0.0589
LR + Lp
0.9977 + 0.0032
0.9941 + 0.0240
In this section, we evaluate performance on Mutagenicity dataset when using each loss component independently. Table[]shows the results. From the table, we observe that using only the reconstruction loss results in high accuracy, though it is slightly lower than configurations that include property alignment. This indicates that, while the reconstruction loss is proficient at preserving input structure, it may lack aligmment with target-specific characteristics. The table also shows that using only the property loss results in slightly lower performance than the combined loss. This suggests that, without the reconstruction loss, the model may lose some structural accuracy, leading minor decrease in overall performance.
5 RELATED WORK
Model-level explanation methods in the field currently rederreescarched, with only few studies addressing this issue. These methods can be divided into two categories. The first category is concept- based methods. GCExplainer (Magister al. GNN explanations, using the k-Means clustering algorithm on GNN embeddings to identify clusters, each representing a concept. PAGE (Shin et al. 2022) provides clustering on the embedding space to discover propotypes as explanations. GLGExplaine (Azzolin et al. (022) adopts prototype learning identify data prototypes and then uses these in an E-LEN model to create Boolean formula that replicates the GNN's s behavior. GCNeuron (Xuanyuan et al., 2023), on the other hand, employs numan-defined rule in natural language and considers graphs with certain masked nodes as concepts, using compositional concepts with the highest scores for global explanations. The second category comprises generation-base based methods. XGNN (Yuan et al., 2020) uses deep reinforcement learning to generate explanation graphs node by node. GNNInterpreter (Wang & Shen (022). alternatively, learns a probabilistic model that identifies the most discriminative graph patterns for explanations.
2021) introduced the incorporation of concepts into
6 CONCLUSION
This work proposes a novel motif-based model-level explanation method for Graph Neural Networks, specifically applied to molecular datasets. Initially, the method employs a motif extraction technique to identify all potential motifs. Following this, a one-layer attention mechanism is used to evaluate the relevance of each motif, filtering out those that are not pertinent. Finally, a graph generator is trained to produce explanations based on the chosen motifs. Compared to two baseline methods, XGNN and GNNInterpreter, our proposed method offers explanations that are more human human-understn understanddalle, accurate, and structurally consistent.
10

---

Published as a conference paper at ICLR 2025
REFERENCES
Uri Alon. Network motifs: theory and experimental approaches. Nature Reviews Genetics, 8(6): 450-461 2007.
Uri Alon. An introduction to systems biology: design principles of biological circuits. CRC press, 2019.
Steve Azzolin, Antonio Longa, Pietro Barbiero, Pietro Liò, and Andrea Passerini. Global explain- ability of gnns via logic combination of learned concepts. arXiv preprint arXlv:2210.07147, 2022.
Federico Baldassarre and Hossein Azizpour. Explainability techniques for graph convolutional networks. arXiv preprint arXiv: 13686, 2019.
Camille Bilodeau, Wengong Jin, Tommi Jaakkola, Regina Barzilay, and Klavs F Jensen. Generative models for molecular discovery: Recent advances and challenges. Wiley Interdisciplinary Reviews: Computational Molecular Science, 12(5)ee1608 2022.
Pietro Bongini, Monica Bianchini, and Franco Scarselli. Molecular generative graph neural networks for drug discovery. Neurocomputing, 450:242-252, 2021.
Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, and Michael M Bronstein. Improving graph neural network expressivity via subgraph isomorphism counting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(1):657-6688 2022.
Jörg Degen, Christof WeegsheiddGGrlaan Andrea Zaliani, and Matthias Rarey. On the art of compiling and using' dike- chemical fragment spaces. ChemMedChemn: Chemistry Enabling Drug Discovery, 3 3(10):1503-153 2008.
Lei Fang, Junren Li, Ming Zhao, Li Tan, and Jian-Guang Lou. Single-step retrosynthesis prediction by leveraging commonly preserved substructures. Nature Communicutions, 14(1):2446, 2023.
Xiaomin Fang, Lihang Liu, Jieqiong Lei, Donglong He, Shanzhuo Zhang, Jingbo Zhou, Fan Wang, Hua Wu, and Haifeng Wang. Geometry-enhanced molecular representation learning for property prediction. Nature Machine Intelligence. 1(2):127-134, 2022.
Thorben Funke, Megha Khosla, and Avishek Anand. Hard masking for explaining graph neural networks. 2020.
Hongyang Gao and Shuiwang Ji. Graph u-nets. In international conference machine learning, pp- 2083-2092 PMLR, 2019.
Hongyang Gao, Zhengyang Wang, and Shuiwang Ji. Large-scale learnable graph convolutional networks. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1416-1424, 2018.
Qiang Huang, Makoto Yamada, Yuan Tian, Dinesh Singh, Dawei Yin, and Yi Chang. Graphlime: Lo- cal interpretable model explanations for graph neural networks, arXiv preprint 6rX1v:2001.06216. 2020.
Yinghui Jiang, Shuting Jin, Xurui Jin, Xianglu Xiao, Wenfan Wu, Xiangrong Liu, Qiang Zhang, Xiangxiang Zeng, Guang Yang, and Zhangming Niu. Pharmacophoric-constaai heterogeneous graph transformer model for molecular property prediction. Communications Chemistry, 6( 6(1):60, 2023.
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International conference on machine learning, pp. 2323-2332. PMLR, 2018
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Hierarchical generation of molecular graphs using structural motifs. In International conference on machine learning, pp. 1889-4849, PMLR, 2020.
11

---

Published as a conference paper at ICLR 2025
Jeroen Kazius, Ross McGuire, and Roberta Bursi.
Derivation and validation of toxicophores for mutagenicity prediction. Journal of medicinal chemistry, 48(1):312 320, 2005.
Thomas Kipf and Max Welling. Semi-supervinn classification with graph convolutional networks. arXiv preprint arXiv: 1609.02977 2016.
Christopher Kuenneth and Rampi Ramprasad, polybert: chemical language model to enable fully machine-driven ultrafast polymer informatics. Nature Communications, 14(1):4099, 2023.
Xin Lai, Peisong Yang, Kunfeng Wang, Qingyuan Yang. and Duli Yu. Mgran: Structure generation of molecules based on graph recurrent neural networks. Molecular informatics, 40(10))210009,, 2021.
Xiao Qing Lewell, Duncan B Judd, Stephen P Watson, and Michael M Hann. Recap retrosynthetic combinatorial analysis procedure: a powerful new technique for identifying privileged molecular fragments with useful applications in combinatorial chemistry. Journal of chemical information and computer sciences, 38(3):111-52,, 1998.
Wanyu Lin, Hao Lan, and Baochun Li. Generative causal explanations for graph neural networks. In International Conference on Machine Learning, pp. 6666-6677 PMLR, 2021.
Dongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu, Bo Zong, Haifeng Chen, and Xiang Zhang. Parameterized explainer for graph neural network. arXiv preprini arXiv:2011.000 1,04573, 2020.
Lucie Charlotte Magister, Dmitry Kazhdan, Vikash Singh, and Pietro Liò. Gcexplainer: Human-in- the-loop concept-based basee explanations for graph neural networks. arXiv preprint arXiv:2107.1188) 2021.
Ron Milo, Shai Shen-Orr, Shalev Itzkovitz, Nadav Kashtan, Dmitri Chklovskii, and Uri Alon. Network motifs: simple building blocks of complex networks. Science, 298(5594);824-827,, 2002.
Christopher Morris, Nils M Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Marion Neumann. Tudataset: A collection of benchmark datasets for learning with graphs. arXiv preprint arXiv:2007.08663, 2020.
Phillip E Pope, Soheil Kolouri, Mohammad Rostami, Charles E Martin, and Heiko Hoffmann. Explainability methods for graph convolutional neural networks. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 10772-10781, 2019.
Kaspar Riesen and Horst Bunke. Iam graph database repository for graph based pattern recognition and machine learning. In Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition (SPR) and Structural and Syntactic Pattern Recognition (SSPR), pp. 287-297. Springer, 2008.
Yu Rong, Yatao Bian, Tingyang Xu, Weiyang Xie, Ying Wei, Wenbing Huang, and Junzhou Huang. Self-supervised graph transformer on large-scale molecular data. Advances Neural Information Processing Systems, 13:12599-12551 2020.
Thomas Schnake, Oliver Eberle, Jonas Lederer, Shinichi Nakajima, Kristof T Schütt, Müller, and Grégoire Montavon. Higher-order explanations of graph neural networks via relevant walks. arXiv preprint arXiv: 2rXhv:2006.03589, 2020.
Caihua Shan, Yifei Shen, Yao Zhang, Xiang Li, and Dongsheng Li. Reinforcement learning enhanced explainer for graph neural networks. Advances in Neural Information Processing Systems, 34: 2021.
Shai S Shen-Orr, Orr, Ron Milo, Shmoolik Mangan, and Uri Alon. Network motifs in the transcriptional regulation network of escherichia coli. Nature genetics, 31(1):64 68, 2002.
Yong-Min Shin, Sun-Woo Kim, and Won- Yong Shin. Page: Prototype- model-level explanation for graph neural networks. arXiv preprint arXiv:2210.17159) 2022.
Ruoxi Sun, Hanjun Dai, and Adams Wei Yu. Does gnn pretraining help molecular representation? Advances in Neural Information Processing Systems, 15:1299-12109, 2022.
12

---

Published as a conference paper at ICLR 2025
Minh N Vu and My T Thai. Pgm-explainer: Probabilistic graphical model explanations for graph neural networks. arXiv preprint arXiv:2010.05788, 2020.
Xiang Wang, Yingxin Wu, An Zhang, Xiangnan He, and Tat-Seng Chua. Towards multi-grained explainability for graph neural networks, Advances in Neural Information Processing Systems, 34, 2021.
Xiang Wang. Yingxin Wu, An Zhang, Fuli Feng, Xiangnan He, and Tat-Seng Chua. Reinforced causal explainer for graph neural networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.
Xiaoqi Wang and Han-Wa Wei Shen. Gnninterpreter: A probabilistic generative model-level explanation for graph neural networks. arXiv preprint arXiv:2209.07924, 2022.
Yuyang Wang, Zijie Li, and Amir Barati Farimani. Graph neural networks for molecules. In Machine Learning Molecular Sciences, pp. 21-66. Springer, 2023.
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint 1rXiv:1810.00822 2018.
Han Xuanyuan, Pietro Barbiero, Dobrik Georgiev, Lucie Charlotte Magister, and Pietro Liò. Global concept- based interpretability for graph neural networks via neuron analysis. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 10675 10675-10683, 2023.
Soojung Yang, Doyeong Hwang, Seul Lee, Seongok Ryu, and Sung Ju Hwang. Hit and lead discovery with explorative rl and fragment-based molecule generation. Advances in Neural Information Processing Systems, 34:7924-7999 -936, 2021.
Rex Ying. Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. Gnnexplainer: Generating explanations for graph neural networks. Advances in neural information processing systems, 32:9240, 2019.
Zhaoning Yu and Hongyang Gao. Molecular representation learning via heterogeneous motif graph neural networks. In International Conference on Machine Learning, pp. 25581-255944 PMLR, 2022a.
Zhaoning Yu and Hongyang Gao. Motifexplainer: a motif-based graph neural network explainer. arXiv preprint 2000002002.0011, 2022b.
Zhaoning Yu and Hongyang Gao. Motifpiece: A data-driven approach for effective motif extraction and molecular representation learning. arXiv preprint arXiv:2312.15387. 2023.
Hao Yuan, Jiliang Tang, Xia Hu, and Shuiwang Ji. Xgmn: Towards model-level explanations of graph neural networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 430-438, 2020.
Hao Yuan, Haiyang Yu, Jie Wang, Kang Li, and Shuiwang Ji. On explainability of graph neural networks via subgraph explorations. In International conference on machine learning, pp. 12241- 12252. PMLR, 2021.
Xuan Zang, Xianbing Zhao, and Buzhou Tang. Hierarchical molecular graph self-supervised learning for property prediction. Communications Chemistry, 6(1):34, 2023.
Yue Zhang, David Defazio, and Arti Ramesh. Relex: A model-agnostic relational model explainer. In Proceedings of the 2021 AAAI/ACM Conference on AI, Ethics, and Society, pp. 1042-1049, 2021a. la.
Zaixi Zhang, Qi Liu, Hao Wang, Chengqiang Lu, and Chee-Kong Lee. botef-based graph self- supervised learning for molecular property prediction. Advances in Neural Information Processing Systems, 34:15870-15888 2021b.
13

---

Published as a conference paper at ICLR 2025
A DETAILS OF DECODE A VALID MOLECULE EXPLANATION
To decode a valid molecule explanation from a tree structure, we have the following steps:
1. Start with a decoded Tree: represents the hierarchical structure of motifs.
The decoding process begins with a decoded tree T, which
2. Enumerate motif Combinations: For each motif node in the tree and its neighboring motifs, we enumerate different combinations to find feasible arrangements. Certain combinations lead chemically infeasible molecules, and are discarded from further consideration.
3. Rank and Combine combined subgraphs: each node, we rank the combined subgraphs based
target GNN, ensuring that the final graph is following the same distribution of our target class.
4. The final graph decoded by putting together all the predicted subgraphs.
Algorithm Decoding a Molecule from a Tree Structure
Require: Decoded tree T representing the hierarchical structure of motifs.
Ensure: Final molecular graph G.
1: Initialization: Set the final graph G to an empty graph.
2: for each motif node in the tree T do
3: Identify neighboring motifs of m in T.
4: Enumerate all feasible combinations of with its neighboring motifs.
5: Discard combinations that lead to chemically infeasible molecules.
6: Rank the remaining combined subgraphs using the target GNN model assess alignment
with the target class distribution.
7: Select the top-ranked combined subgraph.
8: Integrate the selected subgraph into the final graph G.
9: end for
10: Output: The final molecular graph G' obtained by assembling all predicted subgraphs.
Algorithm shows the details of our graph decoder.
B DETAILS OF DATASETS
Table Statistics and properties of four real-world molecule datasets.
Mutag
PTC.MR
PTC.MM
PTC.FN
AIDS
NCI-H23
# Nodes (avg)
30.32
14.29
14.32
14.48
15.69
26.07
# Edges (avg)
30.77
14.69
13.97
14.11
16.20
28.10
Graphs
4337
344
336
349
2000
40353
# Classes
2
2
2
The statistics and properties of four datasets summarized in Table 5
Mutagenicity (Kazius et al. 2005 Riesen & Bunke 20088 a chemical compound dataset containing 4.337 molecule graphs. Each of these graphs is classified into either mutagen non-mutagen cate- gories, signifying their mutagenic impact on the Gram-negative bacterium Salmonella typhimurium.
MRC PTC MM, and PTC.FM (Morris al. 2020) three collections of chemical compounds, each respectively documenting carcinogenic effects on male rats (MR), male mice (MM), and female mice (FM).
AIDS MMrris et al. 2020) comprises 2,000 graphs that represent molecular compounds, all which derived from the AIDS Antiviral Screen Database of Active Compounds.
14

---

Published as a conference paper at ICLR 2025
NCI-H23 (Morris et al. 2020) is collection of 40353 molecular compounds to evaluate the efficacy against lung cancer cells.
C EXPERIMENTAL SETTINGS
By following baseline approaches, our experiments adopt simple GCN model and focus explana- tion results. For the target GNN, we use a 3-layer GCN as a feature extractor and a 2-layer MLP as classifier on all datasets. The model is pre-trained and achieves reasonable performances datasets. Following the (Xu et al. 2018). the hidden dimension is selected from {16, 64). We employ mean-pooling the readout function and ReLU the activation function. We use Adam optimizer for training. The target model is trained for 100 epochs, and the learning rate is set to 0.01. The CPU in our setup is AMD Ryzen Threadripper 2990WX, accompanied by 256 GB of memory, and the GPU is an RTX 4090. For training an explainer, the number of epochs is selected from (50, 100), the learning rate is selected from {0.01, 0.0001, 0.0005), the batch size is selected from {32, 320].
all
D STUDY OF MOTIF EXTRACTION TIME
In this section, we study the motif extraction time for all six datasets.
Average Number of Nodes
Motif Extraction Time (ms/graph)
Mutagenicity
30.23
0.799
PTC.MR
14.29
0.428
PTC.MM
13.97
0.415
PTC FM
14.11
0.444
AIDS
15.69
0.457
NCI-H23
26.07
0.877
The table demonstrates that the bridge bond cut-off method achieves decomposition times in the millisecond range. This approach allows us to process large datasets with minimal computational cost.
E STUDY OF TRAINING AND INFERENCE TIME
We also present detailed comparison of the training and sampling times between method and other baseline approaches in table 6 Here, sampling time is the average time to generate single explanation. Compared the two baselines. key distinction of our method lies in its requirement for an initial training phase for the explanation graph generator. This phase confers significant benefit: the ability to efficiently sample explanations. Our experimental data underscores this advantage. Following the completion of the training phase for the explanation generator, our method demonstrated the capacity to generate large number of explanations rapidly. Specifically, could sample 1000 explanations in matter of seconds. This starkly contrasts other baseline methods, which required at least 3.3 hours to produce the same number of examples. This dramatic reduction in sampling time not only highlights the efficiency of our method but also suggests its practical applicability in scenarios where quick generation explanations is crucial. Due to the space limit, put the study of hyper-parameter in Appendix
F STUDY OF HYPERPARAMETER
Table 7 shows the study of hyperparameter 6, we found that as 9 increases, the number of motifs selected for the Mutagen class decreases. The average probability rises until 0 reaches 0.10, where peak performance is observed, after which starts to decline. This trend occurs because when is low, some irrelevant motifs included in the explanations. As 0 increases, these 'noise' motifs
15

---

Published as a conference paper at ICLR 2025
Table 6: Training and inference time for different explanation methods. XGNN and GNNInterpreter do not have training time because they only have sampling process.
Datasets
Models
Training Time
Sampling Time
XGNN
54s
GNNInterpreter
29s
Mutagenicity
Variant
528s
0.0015s
Ours
539s
0.0029s
XGNN
62s
GNNInterpreter
27s
PTC.MR
Variant
338s
0.0005s
Ours
368s
0.0006s
XGNN
46s
GNNInterpreter
17s
PTC_MM
Variant
303s
0.0023s
Ours
367s
0.0002s
XGNN
47s
GNNInterpreter
12s
PTC_FM
Variant
307s
0.0027s
Ours
386s
0.0018s
XGNN
19s
GNNInterpreter
32s
AIDS
Variant Ours
468s
0,0065s
513s
0.0076s
XGNN
OOM
GNNInterpreter
21s
NCI-H23
Variant
10189s
0.01
Ours
13657s
0.0126s
Table 7: Study of Hyperparameter 0 on Mutagen class of Mutagenicity dataset
0.01
0= 0.05
0.10
0 0.20
# Selected Motifs
1591
1328
1206
1073
Average Probability
0.9621 0.1151
0.9850 + 0.0784 0.9977
0.0032
0.9753 1 0.0981
are filtered out, enhancing performance. However, if is set too high, the resulting small number of selected motifs is insufficient for forming comprehensive explanation.
G STUDY OF COMPARISON BETWEEN INSTANCE-LEVEL EXPLAINERS AND MODEL-LEVEL EXPLAINER
In this section, we compare instance-level explanation methods with our proposed method on Mutagenicity dataset. To address this, we performed an experiment where we computed the Average Probability of two local explainers, GNNExplainer (Ying et al., 2019) and GEM (Lin et al. (021), by averaging their probability outputs across various instances, as per your suggestion. The results for GNNExplainer were obtained using the PyTorch Geometric library, while GEM results were produced with its official implementation. The table below presents the findings.
From the results, it is evident that our MAGE approach outperforms the instance-level explainers significantly. This demonstrates the advantage of generating explanations from a global (model-level) perspective opposed to relying local (instance-level) perspective. Model-level explanations generate insights leveraging global patterns and the overall model behavior, whereas instance-level explanations focus generating explanations for individual data points molecules. This distinction
16

---

Published as a conference paper at ICLR 2025
Table 8: Comparison of instance-level explaann and MAGE
Methods
Label 0
Label 1
GNNExplainer
0.8339 + 0.1404
0.8250 + 0.1402
GEM
0.8739 + 0.1428
0.8887 + 0.1306
MAGE(Ours)
0.9977 = 0.0032
0.9941 0.0240
allows model-level explanations like MAGE to capture broader, more generalizable patterns within the dataset, which can provide more holistic understanding of the model's decision-making process. Conversely, instance-level methods such GNNExplainer and GEM may provide more localized and specific insights, but often at the expense of lacking global context.
H STUDY OF NOVELTY OF OUR GENERATED EXPLANATION
To further validate that our explainer does not simply memorize the training set, we tested the outputs of our explainer using the novelty metric, which is widely used in the graph generation field. The novelty metric measures the percentage of generated graphs that do not overlap with the training set, providing effective way to assess whether the generator is simply reproducing seen examples.
Table 9: Study of novelty of generated explanations all six datasets
Datasets
Novelty of Label
Novelty of Label
Mutagenicity
1.0
1.0
PTC.MR
1.0
1.0
PTC_MM
1.0
1.0
PTC FM
1.0
1.0
AIDS
1.0
1.0
NCI-H23
1.0
1.0
Our results in the table demonstrate that our method achieves 100% novelty score across all six datasets, indicating that the generated explanations are not merely memorized training examples but reflect the learned properties of the target GNN.
These findings further support that our framework generates meaningful and novel explanations aligned with the target GNN, rather than relying on trivial reproduction of training data, We have added this part in Appendix in our revised paper.
17

---

Published as a conference paper at ICLR 2025
1 MORE QUALITATIVE RESULTS
Table T0 and table 11 are additional qualitative results of explanations on Mutagenicity dataset. Each samples are randomly selected from the generated molecular graphs
Table 10: More qualitative results for Nonmutagen class Mutagenicity dataset.
Class
XGNN
GNNInterpreter
Ours
Example
Nonmutagen
18

---

Published as a conference paper at ICLR 2025
Table 11: More qualitative results for Mutagen class on Mutagenicity dataset.
Class
XGNN
GNNInterpreter
Ours
Example
Mutagen
19


Reviews:
[{"review_id": "VthXXVZ6JM", "reviewer": "Reviewer_MX2W", "summary": "The paper proposes MAGE, a motif-based explanation method for GNNs in molecular tasks, which identifies significant motifs for each class using an attention-based learning approach. The method creates model-level explanations including critical molecular structures to the predictions. Experimental results show that MAGE provides valid, human-understandable explanations, outperforming SOTA baseline methods.", "questions": "I do not have a major concern about the novelty of the paper. However, I have small but critical concerns about the paper's reproducibility and some experiment results. I'm willing to increase my score once my concerns are cleared.\n\n1) Could you share the code to reproduce the experimental results?\n2) Why does the baseline only include model-level explainers? Could local explainers be adapted to the same metrics? If not, can you explain the reasoning?\n3) How does each component of the loss function impact the results?\n4) How were example graphs, such as those in Table 3, selected? Is there any potential selection bias?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 3, "strengths": "1) The paper is well-written, and its structure is easy to follow.\n2) The central idea is clear and effectively delivered.\n3) SOTA methods for model-level explainability are provided and compared in the experiments, enhancing the paper's credibility and impact.\n4) The method generates valid molecules, which is not well-studied and essentially missing in the literature of GNN explainability. So I find this direction of research critical.", "weaknesses": "1) The code is not shared, which reduces the paper's reliability, especially given the extensive experiments presented.\n2) The paper focuses only on model-level explainability baselines; however, local explainers (especially inductive ones) could potentially be adapted to the authors' chosen metric. Some local explainer baselines can be found in benchmarking study at ICLR 2024 [1].\n3) The loss function comprises two main components, but the effectiveness of each part is not analyzed.\n4) The examples from qualitative study is not well explained and confusing. It is hard to understand how are the examples selected.\n\nSmall: \n- Line 244, typo: Figure 3.3.\n\n[1] Kosan, M., Verma, S., Armgaan, B., Pahwa, K., Singh, A., Medya, S., & Ranu, S. GNNX-BENCH: Unravelling the Utility of Perturbation-based GNN Explainers through In-depth Benchmarking. In The Twelfth International Conference on Learning Representations.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "O0yvNGkL5o", "reviewer": "Reviewer_KGJQ", "summary": "This paper introduces MAGE, a motif-based approach to explain GNNs, specifically focused on molecular datasets. The approach addresses limitations in previous GNN explanation methods by employing molecular substructures—as foundational motifs in model explanations. MAGE utilizes a combination of motif extraction, attention-based motif learning, and a motif-based graph generation method to yield structurally valid and interpretable explanations at the model level. Experimental results on six molecular datasets show that MAGE achieves high validity and interpretability, outperforming baselines in providing explanations that are more representative.", "questions": "1.\tThe paper emphasizes the practicality of model-level explanations over instance-level ones, yet in many real-world applications, users often seek to understand individual predictions. Could the authors elaborate on why a model-level approach would be more practical in such contexts and how it aligns with the needs of end-users who focus on instance-level interpretability? \n\n2. How does this paper differentiate itself from MotifExplainer (Yu & Gao 2022), except for the \"model-level\" vs. \"instance-level\" difference that I am not convinced to believe is significant? MotifExplainer also utilizes motifs in GNN explanations. Can the authors clarify any unique aspects of MAGE, such as scope, or improvements in interpretability, validity, or computational efficiency?\n\t\n3. MAGE’s approach begins by identifying all possible motifs in the dataset, which is a computationally intensive and challenging task, especially for large graphs or datasets due to the combinatorial explosion of possible motifs. However, MAGE does not contribute to addressing this fundamental challenge, as it relies on existing motif extraction methods without proposing any improvements to make motif identification more scalable. Addressing this limitation is more crucial to me, as the scalability of motif extraction represents a significant bottleneck for applying MAGE to larger datasets. Can the authors elaborate on the computational complexity of motif extraction and its impact on scalability to larger datasets?\n\n5. Including a human evaluation would strengthen the claim by demonstrating that experts or users in the field find these explanations interpretable and meaningful. Any human evaluation to provide insights into the practical interpretability and further validate the effectiveness of MAGE in real-world applications?\n\n6. Would MAGE be adaptable to non-molecular datasets, or are there constraints due to the specific nature of molecular motifs?", "limitations": "", "rating": 5, "confidence": 3, "soundness": 1, "presentation": 2, "contribution": 1, "strengths": "- This paper is about a highly relevant topic in ML interpretability, particularly in the context of GNNs for molecular data. With the growing importance of explainable AI in sensitive domains, especially AI4Science domains like drug discovery and materials science, providing valid, interpretable explanations is well-aligned with current research trends and practical needs.\n\n- The use of motifs as the basis for explanations addresses the limitations of atom-level generation methods.\n\n- The paper is clear, especially regarding the MAGE’s workflow, from motif extraction to class-wise motif generation.", "weaknesses": "- The practical contribution of model-level GNN explanation, and its pros and cons compared to relevant works, say Q1 & Q2 below.\n\n- No contribution to the computationally intensive and challenging motif extraction task.\n\n- No human evaluation. Although the paper claims that the generated motifs and explanations are human-understandable, this claim is not supported by any human evaluation.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "zxtA2QRIqx", "reviewer": "Reviewer_jJYJ", "summary": "This work proposes a novel method for generating model-level explanations by decomposing molecules into motifs and employing tree-constrained generators. To address issues of invalidity resulting from disregarding structural information, the method decomposes molecules into motif sets and uses attention-based motif identification to select key motifs for each class. A tree-constrained encoder-decoder generator and a specific loss function are introduced to ensure that the generated molecules conform to the class distribution, enhancing their validity. Experiments on six real-world datasets demonstrate that the proposed method outperforms the baselines in both effectiveness and efficiency. Qualitative results further highlight the importance of incorporating both node features and molecular structures in explanations.", "questions": "1) Why is the bond feature defined as $N \\times D_b$? The number of edges in a graph may not correspond to the number of nodes. How does this definition account for that discrepancy?\n\n2) What distinguishes tree-constrained methods from non-constrained methods in molecular generation?\n\n3) In the definition $T = (A_{\\tau}, X_{\\tau} )$, what does $A_{\\tau}$  and $X_{\\tau}$ represent? Additionally, what does $Z_{\\tau}$ signify? \n\n4) How is  $Z_{\\tau}$ sampled from the graph encoder? What is the process involved?\n\n5) What does  $f^a$ refer to in Section 3.3.5? \n\n6) Why does XGNN experience out-of-memory (OOM) issues? Can the authors provide intuitive explanations based on experimental observations?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 3, "contribution": 4, "strengths": "1. This work clearly defines the problems faced by current model-level explanation methods and proposes a novel motif-based method to address them. This work conducts extensive experiments and analysis to support the claims, which are very solid and lay a good foundation for future studies in model-level molecular explanation.\n\n2. By treating functional groups as building blocks, this method ensures that the explanations align more closely with scientifically meaningful interpretations. By considering both node features and molecular structures, the paper effectively addresses the limitations of atom-based methods.\n\n3. The paper presents a novel approach that introduces an attention-based learning method to calculate the motif-class relationship. \n\n4. The paper proposes using tree-constrained generators to produce more valid explanations. The carefully and explicitly designed tree decomposition and encoder-decoder structures ensure that the model generates more valid in-class molecules.\n\n5. The evaluation metrics used to assess explanation performance in relation to molecules are better aligned with the chemical domain. The provided explanations are user-friendly and easy to understand.\n\n6. The authors conduct experiments on six real-world datasets, and the results clearly demonstrate that the proposed method outperforms the baselines.\n\n7. Comprehensive experimental settings are provided to ensure the quality and reproducibility of the results, and sufficient visualizations support the findings of the work.", "weaknesses": "1. There is a typo in lines 95 and 96 : there should be full stops at the end of the sentence. \n\n2. In line 104, “adjacency” should be revised to “adjacency matrix.”\n\n3. In line 168, “three methods” should be changed to “four methods.”\n\n4. It would be beneficial to clearly state the limitations of current approaches and provide insights on how to address these limitations to better facilitate the development of this area within the community. \n\n5. Additionally, summarizing and highlighting the main contributions and novelties of the proposed work would enhance clarity.\n\n6. Furthermore, it would improve the presentation to arrange the notation used in the paper more effectively.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "z2r8EVDN8F", "reviewer": "Reviewer_9aZJ", "summary": "This paper introduces MAGE (Motif-bAsed GNN Explainer), which improves interpretability by using motifs as core units in explanations. MAGE identifies class-specific motifs through decomposition and attention-based learning, creating clearer molecular graph explanations. This approach, validated on six datasets, provides more human-understandable results. However, there are some issues in this article that need clarification.", "questions": "1. How to a construct graph from subgraphs?  Do the subgraphs share some nodes?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 1, "contribution": 2, "strengths": "1. This paper introduces a new method, MAGE, to generate motif-based graph explanations.\n2. This paper is well-organized, it is easy to follow the main idea.\n3. This paper conducts lots of experiments to verify the effectiveness of this method.", "weaknesses": "1. Some symbols are confusing, such as $\\mathcal{L}_T$,$\\mathcal{L}_L$. It seems a trivial solution exists that the $G$ is the same as the $\\mathcal{T}$ from the loss function.\n2. The figures are not well expressed. For example, in Figure 3, there are two graph decoders. However, from the paper, I can only find one graph decoder.\n3. It is confusing how to construct a new graph from different subgraphs. It's better to give the algorithm instructions on how to construct a new graph from subgraphs and how they share nodes.\n\nSome minor suggestions. \n1. Notations are inconsistent.  $\\mathbf{A}$ and $A$ are used interchangablelly. \n2.  It is confusing to use mathbf{} to denote matrix (A) and set (V)\n3.  $N$ is used with different meanings. \"N represents the total number of atoms in the graph\" & \"Given a dataset, denoted as G with N molecules and C classes\"\n4.  Line 271, z_T is not defined.\n5. Format issue, cite should be \\citep{}", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)