Abstract
Graph neural networks (GNNs) are powerful tools for conducting inference on graph data but are often seen as “black boxes" due to difficulty in extracting meaningful subnetworks driving predictive performance. Many interpretable GNN methods exist, but they cannot quantify uncertainty in edge weights and suffer in predictive accuracy when applied to challenging graph structures. In this work, we proposed BetaExplainer which addresses these issues by using a sparsity-inducing prior to mask unimportant edges during model training. To evaluate our approach, we examine various simulated data sets with diverse real-world characteristics. Not only does this implementation provide a notion of edge importance uncertainty, it also improves upon evaluation metrics for challenging datasets compared to state-of-the art explainer methods.
Introduction
Graph Neural Networks (GNNs) have become the standard for analyzing relational data across various domains, such as molecular biology and social network analysis. Despite their predictive power, GNNs are often criticized for their lack of interpretability. While a GNN might accurately predict a property, identifying the specific subnetwork or set of edges responsible for that prediction remains a significant challenge.
Existing explainer tools, such as GNNExplainer and SubgraphX, attempt to identify these influential edges. However, they often struggle with "challenging" graph structures, such as heterophilic graphs (where connected nodes belong to different classes) or extremely sparse datasets. Furthermore, these methods typically provide a point estimate of edge importance without quantifying the associated uncertainty—a critical requirement in high-stakes applications like drug discovery.
Methodology: The BetaExplainer Framework
BetaExplainer addresses these limitations by reframing the explanation task as a Bayesian inference problem. Instead of assigning a fixed importance score to each edge, the framework treats the edge mask as a random variable following a Beta distribution.
The core of the method involves three primary steps:
- Initialization: The process begins with a trained GNN, the original graph, and initial $\alpha, \beta$ parameters for the Beta distribution.
- Variational Training: The model learns the distribution parameters by maximizing the Evidence Lower Bound (ELBO). It seeks a masked version of the graph that minimizes the Kullback-Leibler (KL) divergence between the original GNN output and the output from the masked graph, while simultaneously enforcing sparsity.
- Edge Mask Generation: The final output is a probabilistic edge mask where each edge is assigned a probability of importance.
The choice of the Beta distribution is strategic; as a conjugate prior to the Bernoulli distribution, it is mathematically well-suited for "shrinking" the weights of unimportant edges toward zero, effectively inducing sparsity.
Experimental Setup and Datasets
To evaluate BetaExplainer, the authors utilized a combination of synthetic and real-world datasets designed to test specific structural challenges:
- ShapeGGen Simulator: Used to create synthetic graphs with "house-shaped" motifs, including heterophilic and biased feature variants.
- SERGIO Simulator: Mimics gene expression data with varying levels of random sparsity (25% and 50%) to simulate noisy biological data.
- Texas Dataset: A real-world heterophilic graph representing university website links.
Results and Discussion
BetaExplainer demonstrated superior performance over state-of-the-art baselines like GNNExplainer and SubgraphX.
Performance and Robustness
BetaExplainer outperformed baselines on 5 out of 7 simulated datasets in terms of Jaccard Index and F1 Score. Notably, it maintained high performance on the SERGIO datasets even at 50% sparsity, where SubgraphX often failed to identify any edges. On the real-world Texas dataset, BetaExplainer achieved an unfaithfulness score of 0.5629, significantly outperforming baselines that were unable to provide meaningful explanations.
Uncertainty Quantification
A key advantage of BetaExplainer is its ability to quantify uncertainty. By providing a distribution rather than a single score, it allows researchers to assess the confidence of an explanation. A narrow, high-probability distribution indicates high certainty, while a wider distribution suggests the model is less sure about an edge's role.
Faithfulness
The method consistently showed lower "unfaithfulness" (a metric measuring the change in GNN output when supposedly unimportant edges are removed). This indicates that BetaExplainer's identified subgraphs more accurately reflect the internal logic of the underlying GNN.
Conclusion
BetaExplainer represents a significant step forward in GNN interpretability by providing accurate, sparse, and uncertainty-aware explanations. While the method is more computationally intensive than simpler gradient-based approaches due to the variational inference process, its robustness in challenging and sparse data environments makes it a valuable tool for scientific discovery. Future work will focus on extending the framework to provide simultaneous node-level explanations and improving computational efficiency.
Summary updated