TL;DR
This paper introduces PxGNN, a novel framework for self-explainable Graph Neural Networks (GNNs). PxGNN learns "prototype graphs" that represent typical patterns of each class, enabling both accurate predictions and interpretable explanations for graph classification and node classification tasks. This approach moves beyond post-hoc explanations by integrating interpretability directly into the GNN architecture.
What Problem Does This Paper Address?
Graph Neural Networks (GNNs) have become powerful tools for analyzing graph-structured data, but they often operate as "black boxes." This lack of interpretability limits their trustworthiness and adoption in critical applications where understanding why a prediction is made is crucial. While some methods exist to explain GNN predictions, they often rely on separate "explainer" modules that may not accurately reflect the GNN's internal reasoning. This paper addresses the need for self-explainable GNNs that can generate accurate predictions and provide explanations directly from their learned representations. Specifically, they focus on learning "prototype graphs" that serve as archetypes for each class, offering both class-level and instance-level interpretability.
Methods
The core of the proposed framework, PxGNN, lies in its ability to learn prototype graphs. This is achieved through a three-component architecture:
- Prototype Generator ($f_G$): This component takes learnable prototype embeddings and generates prototype graphs. It's designed to produce both node features and graph topology.
- Encoder ($f_E$): This component learns embeddings for input graphs, capturing their features and topology. It's trained using a GNN.
- Prototype-Based Classifier ($f_C$): This component uses the graph embeddings from $f_E$ to predict the class label by comparing them to the learned prototype graphs.
Key novelties in their approach include:
- Prototype Graph Learning: PxGNN uses a combination of self-supervision (graph reconstruction loss) and a novel classification loss to train the prototype generator and encoder. This ensures that generated prototypes are realistic and representative of their respective classes.
- Initialization Strategy: Prototype embeddings are initialized by pre-training the encoder and then clustering graph embeddings from the labeled dataset. Representative graphs from these clusters are used to initialize prototype embeddings, guiding the learning process.
- Self-Explainable Prediction: For a given test graph, PxGNN calculates similarity scores between its embedding and all prototype graphs. The predicted class is determined by the most similar prototypes, and the instance-level explanation is derived from these matching prototypes.
Datasets
The paper evaluates PxGNN on a mix of real-world and synthetic datasets:
- Real-World Datasets:
- Node Classification: Cora, Pubmed (citation networks).
- Graph Classification: MUTAG (molecule graphs), Graph-SST2 (sentiment graphs).
- Synthetic Datasets:
- BA-Shapes: A single graph with a base graph and "house"-structured motifs, used for node classification with ground-truth prototypes.
- Syn-SST: Synthesized graphs based on motifs from Graph-SST2, designed for graph classification with ground-truth prototypes.
Key Insights and Ideas
- Prototype Graphs as Archetypes: The central idea is that learning representative "prototype graphs" for each class can simultaneously drive accurate predictions and provide intuitive explanations. These prototypes act as visual anchors for understanding class characteristics.
- Bridging Prediction and Explanation: PxGNN integrates explanation generation directly into the model's architecture, moving away from potentially unreliable post-hoc methods. This self-explainability is crucial for building trust in GNNs.
- Leveraging Graph Reconstruction for Realism: The use of graph reconstruction loss helps ensure that the generated prototype graphs are not just abstract representations but also adhere to realistic graph structures and attribute distributions.
- Implicit Supervision from Labels: The classification loss cleverly uses labeled data to ensure that graphs are more similar to prototypes of their correct class, indirectly guiding the learning of both accurate predictions and meaningful explanations.
Key Results
- Prediction Accuracy: PxGNN consistently outperforms baseline GNNs (GCN, GIN) and achieves comparable or superior results to other self-explainable GNNs (SE-GNN, ProtGNN) on both node and graph classification tasks across real-world datasets. For instance, on Cora, PxGNN achieved 82.0±0.5% accuracy, outperforming GCN (80.8±1.2%) and GIN (79.4±1.2%).
- Prototype Quality: Evaluated using confidence scores and Silhouette scores, PxGNN's learned prototypes demonstrate significantly higher quality (more representative and diverse) compared to prototypes generated by post-hoc explainers (GNNExplainer, PGExplainer, SubgraphX) and ProtGNN. For example, PxGNN achieved a confidence score of 98.4±1.9% on Cora, compared to 89.4±17.4% for GNNExplainer.
- Synthetic Dataset Performance: On synthetic datasets with ground-truth prototypes, PxGNN's learned prototypes showed a much better match to the ground truth compared to baseline methods, as measured by distance metrics.
- Visualization: Qualitative results show that PxGNN successfully learns prototypes that visually resemble the ground-truth motifs (e.g., "house" structures in BA-Shapes, chemical groups in MUTAG), while baseline methods sometimes miss key structural elements.
Limitations and Future Work
- Prototype Size Selection: The paper investigates the impact of the number of prototypes per class, finding that there's an optimal range where both prediction accuracy and prototype quality are maximized. Overly small or large numbers can degrade performance.
- Hyperparameter Sensitivity: The study shows that hyperparameters controlling self-supervision and prototype embedding regularization (α and β) are important. Optimal ranges were identified (e.g., α ∈ [1, 10], β ∈ [1, 3]) for achieving good performance.
- Future Directions: The authors suggest extending PxGNN to handle heterogeneous graphs and exploring its utility for achieving robustness and fairness in GNN models.
Summary updated