Table of Contents
Fetching ...

MAGE: Model-Level Graph Neural Networks Explanations via Motif-based Graph Generation

Zhaoning Yu, Hongyang Gao

TL;DR

This work tackles the interpretability of GNNs in molecular tasks by addressing the validity gaps of prior model-level explainers, which often produce chemically invalid substructures. It introduces MAGE, a motif-based explainer that first extracts a diverse set of motifs, then uses a one-layer attention mechanism to identify class-specific motifs, and finally generates explanations by assembling motifs through a junction-tree–based, VAE-inspired graph generator. The method demonstrates complete validity across six real-world molecular datasets and yields higher average class probabilities than baselines, supported by qualitative analyses showing meaningful ring-containing substructures. The approach advances practical, human-understandable explanations for molecular GNNs and offers faster sampling post-training, underscoring the importance of exploiting molecular topology for reliable explanations.

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 \textbf{M}otif-b\textbf{A}sed \textbf{G}NN \textbf{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.

MAGE: Model-Level Graph Neural Networks Explanations via Motif-based Graph Generation

TL;DR

This work tackles the interpretability of GNNs in molecular tasks by addressing the validity gaps of prior model-level explainers, which often produce chemically invalid substructures. It introduces MAGE, a motif-based explainer that first extracts a diverse set of motifs, then uses a one-layer attention mechanism to identify class-specific motifs, and finally generates explanations by assembling motifs through a junction-tree–based, VAE-inspired graph generator. The method demonstrates complete validity across six real-world molecular datasets and yields higher average class probabilities than baselines, supported by qualitative analyses showing meaningful ring-containing substructures. The approach advances practical, human-understandable explanations for molecular GNNs and offers faster sampling post-training, underscoring the importance of exploiting molecular topology for reliable explanations.

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 \textbf{M}otif-b\textbf{A}sed \textbf{G}NN \textbf{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.
Paper Structure (29 sections, 13 equations, 4 figures, 11 tables, 1 algorithm)

This paper contains 29 sections, 13 equations, 4 figures, 11 tables, 1 algorithm.

Figures (4)

  • Figure 1: Validity of explanations generated by XGNN and GNNInterpreter on Mutagenicity dataset
  • Figure 2: An illustration of the proposed MAGE framework. Given a dataset, a 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 a score matrix, the method performs a dot product between the attention coefficient matrix and the prediction probability matrix. This score matrix is then normalized using a degree matrix. Finally, motifs whose corresponding scores exceed a specific threshold are selected.
  • Figure 3: Class-wise motif-based graph generation. Starting with a molecular graph, we first construct a junction tree. Next, a tree encoder is applied to obtain a tree encoding, which is then decoded by a tree decoder to reconstruct the junction tree. Finally, a graph decoder uses the predicted junction tree to reproduce the molecular graph.
  • Figure 4: An illustration of the explanation sampling process.