Abstract
Graph Neural Networks (GNNs) are versatile, powerful machine learning methods that enable graph structure and feature representation learning, and have applications across many domains. For applications critically requiring interpretation, attention-based GNNs have been leveraged. However, these approaches either rely on specific model architectures or lack a joint consideration of graph structure and node features in their interpretation. Here we present a model-agnostic framework for interpreting important graph structure and node features, Graph neural networks Including SparSe inTerpretability (GISST). With any GNN model, GISST combines an attention mechanism and sparsity regularization to yield an important subgraph and node feature subset related to any graph-based task. Through a single self-attention layer, a GISST model learns an importance probability for each node feature and edge in the input graph. By including these importance probabilities in the model loss function, the probabilities are optimized end-to-end and tied to the task-specific performance. Furthermore, GISST sparsifies these importance probabilities with entropy and L1 regularization to reduce noise in the input graph topology and node features. Our GISST models achieve superior node feature and edge explanation precision in synthetic datasets, as compared to alternative interpretation approaches. Moreover, our GISST models are able to identify important graph structure in real-world datasets. We demonstrate in theory that edge feature importance and multiple edge types can be considered by incorporating them into the GISST edge probability computation. By jointly accounting for topology, node features, and edge features, GISST inherently provides simple and relevant interpretations for any GNN models and tasks.
Introduction
Graph Neural Networks (GNNs) have become the gold standard for learning from relational data, such as molecular structures or social networks. However, they are often "black boxes." For high-stakes fields like drug discovery or healthcare, simply getting a prediction is insufficient; researchers must understand the underlying structural and feature-level signals driving that prediction.
Existing interpretability methods for GNNs face three main hurdles: they are often post-hoc and computationally expensive, they are frequently tied to specific architectures (like Graph Attention Networks), and they rarely analyze graph structure and node features simultaneously in a unified optimization framework.
The GISST Framework
The GISST framework treats interpretability as an intrinsic part of the learning process. It acts as a model-agnostic wrapper that can be applied to almost any GNN architecture, including GCNs, GATs, and Gated GNNs.
Core Components
- Importance Probabilities: GISST learns two sets of probabilities: one for edges ($P_{A_s}$) and one for node features ($P_{X_s}$). These act as "masks" applied to the input graph via a Hadamard product.
- Self-Attention Layer: A lightweight self-attention layer calculates these importance scores. Crucially, node features are adjusted by their importance before edge importance is calculated, ensuring that noisy features do not corrupt the structural explanation.
- Sparsity-Inducing Loss: To ensure explanations are human-readable and "sharp," two regularization terms are added to the standard cross-entropy loss: L1 Regularization, which pushes unimportant probabilities toward zero, and Entropy Regularization, which forces the model to be "decisive," pushing probabilities toward either 0 or 1.
Experimental Evaluation
The researchers evaluated GISST using both synthetic and real-world benchmarks. Synthetic "noisy" graphs (like BA-House and Tree-Cycle) were modified by adding noise features to test the model's ability to distinguish signal from noise. Real-world tests included the Mutagenicity dataset (chemical molecules) and REDDIT-BINARY (social interaction graphs).
Key Results
GISST demonstrated superior performance in identifying relevant graph components without sacrificing classification accuracy. On synthetic datasets, GISST achieved an average edge explanation precision of 0.772, significantly outperforming GNNExplainer and standard GAT attention weights.
In noisy feature tests, GISST reached a node feature explanation precision of up to 0.925. Qualitatively, on the Mutagenicity dataset, GISST successfully identified complete mutagenic functional groups like aromatic nitro ($NO_2$) and amine ($NH_2$) groups, whereas competing methods often provided fragmented or incomplete explanations.
Discussion and Conclusion
A key insight of this work is that interpretability can be treated as an optimization objective. By including importance probabilities in the loss function, the model is forced to find the most efficient subgraph that maintains high performance. This approach effectively filters out noise that often degrades GNN performance. While GISST is a significant step forward, future work could focus on automatically learning the optimal size of the explanatory subgraph, which currently requires user definition. By jointly accounting for topology and features, GISST provides a robust path toward inherently interpretable GNNs.
Summary updated