Abstract
Graph Neural Networks (GNNs) have demonstrated remarkable success in various graph-based tasks but often operate as "black boxes," lacking transparency in their internal representations. This paper introduces a novel framework for representation-level explainable graph learning (XGL). Unlike traditional instance-level or model-level explanations, our approach focuses on understanding the structural information captured within a graph embedding. By decomposing graph representations into a learnable, weighted ensemble of fundamental patterns—such as paths, trees, and graphlets—we provide a mechanism to interpret the latent space while achieving state-of-the-art performance in graph classification and clustering.
Introduction
While existing Explainable AI (XAI) for graphs typically addresses why a specific prediction was made (instance-level) or how a model behaves globally (model-level), a significant gap remains at the representation level. When a GNN maps a complex graph into a high-dimensional vector, the specific structural features—such as the presence of cycles, cliques, or long-range paths—that contribute to that vector are often obscured. Understanding the "content" of these representations is critical for high-stakes domains like drug discovery and social network analysis, where specific motifs carry significant domain meaning.
Methodology: Pattern-based XGL
We propose two primary strategies to bridge the gap between performance and interpretability, inspired by classical graph kernels that compare graphs based on substructure counts.
1. PXGL-EGK (Ensemble Graph Kernel)
This method constructs a learnable ensemble of diverse graph kernels (e.g., random walk kernels for paths, subtree kernels for trees). It learns a weight vector $\lambda$ that quantifies the relative importance of each kernel type for a specific dataset.
2. PXGL-GNN (Pattern-based XGL with GNNs)
The PXGL-GNN framework integrates these concepts into a deep learning pipeline:
- Pattern Sampling: Subgraphs are sampled from the input graph according to predefined families: paths, trees, graphlets, cycles, cliques, wheels, and stars.
- Pattern Representation: Each sampled subgraph is processed through a GNN to generate pattern-specific embeddings.
- Weighted Ensemble: The final graph representation $g$ is computed as a weighted sum of these embeddings: $g = \sum_{m=1}^M \lambda_m z^{(m)}$, where $\lambda_m$ are learnable weights.
Theoretical Robustness and Generalization
Beyond empirical performance, we provide theoretical foundations for the PXGL framework. We derive bounds for robustness (the sensitivity of the representation to graph perturbations) and generalization (performance on unseen data). Notably, we prove that the representation becomes more robust as the minimum node degree of the graph increases, providing a mathematical basis for the model's stability.
Experimental Results
The framework was evaluated on the TUdataset benchmark, spanning bioinformatics (MUTAG, PROTEINS, NCI1) and social networks (COLLAB, IMDB-B, REDDIT).
Performance
PXGL-GNN consistently outperformed standard GNN architectures (e.g., GIN, GraphSAGE) and specialized subgraph-based methods. For instance, on the PROTEINS dataset, PXGL-GNN achieved an accuracy of 78.23%, significantly higher than the best baseline (S2GAE at 76.47%).
Interpretability and Visualization
The learned weights $\lambda$ provide a global explanation of the model's priorities. In the PROTEINS dataset, "paths" were identified as the most critical pattern, aligning with biological knowledge regarding protein folding pathways. In social networks like COLLAB, "cliques" and "paths" dominated, reflecting the importance of tight-knit communities and connection chains.
As shown in the t-SNE visualizations, while individual patterns can achieve some degree of clustering, the weighted ensemble provides the cleanest separation between classes, validating the "ensemble superiority" of our approach.
Conclusion
The PXGL framework demonstrates that interpretability does not have to come at the cost of performance. By building representations from known graph primitives, we create models that are explainable by design. Future work will explore the automatic discovery of optimal patterns to further enhance the flexibility and domain-specificity of the framework.
Summary updated