Learnt Sparsification for Interpretable Graph Neural Networks

Mandeep Rathee, Zijian Zhang, Thorben Funke, Megha Khosla, Avishek AnandarXiv 2021

Abstract

Graph Neural Networks (GNNs) are highly effective for modeling relational data but suffer from a lack of interpretability and the "over-smoothing" problem in deep architectures. We introduce KEdge, a "plug-and-play" module designed to enhance GNN interpretability by learning to prune unnecessary edges. By employing a differentiable "Hard Kumaraswamy" distribution to generate binary edge masks, KEdge can remove over 80% of a graph's edges with minimal impact on accuracy. Our results demonstrate that KEdge not only provides "interpretability by design" but also mitigates over-smoothing, allowing for deeper and more robust GNNs.

Introduction

Graph Neural Networks aggregate information from a node's entire neighborhood, making it difficult to discern which specific connections drive a model's predictions. While post-hoc interpretability methods exist, they often provide inaccurate reflections of the model's underlying logic.

This paper argues for interpretability by design: building models that are inherently sparse. By explicitly removing "noisy" or task-irrelevant edges, the model becomes more transparent and efficient. Furthermore, this sparsification addresses the common issue of over-smoothing, where node features become indistinguishable as the network depth increases.

Conceptual overview of KEdge sparsification, where task-irrelevant edges are masked to improve interpretability and performance.

Methods

The core of the proposed approach is the Adjacency Matrix Generator (AMG). Instead of operating on the full input graph, the AMG learns to generate a mask ($Z$) that selectively "turns off" specific edges based on their relevance to the task.

The Hard Kumaraswamy Distribution

A significant technical challenge in learning edge masks is that the decision to keep or drop an edge is discrete (binary), which typically breaks gradient-based optimization. To overcome this, the authors utilize the Hard Kumaraswamy (HardKuma) distribution.

HardKuma allows for "stretched" samples that can produce exact zeros and ones while remaining differentiable via the re-parameterization trick. This enables the model to learn optimal pruning strategies using standard backpropagation.

The Adjacency Matrix Generator (AMG) utilizes the Hard Kumaraswamy distribution to produce differentiable binary edge masks $Z_{ij}$.

Implementation Variants

The authors propose two primary versions of the module:

  1. KEdge: Sparsifies the input graph once before any GNN layers are applied.
  2. KEdge-layerwise: Learns a unique sparse neighborhood for every individual layer of the GNN, providing finer control over information flow.

Additionally, KEdge supports asymmetric relationships, recognizing that the importance of Node A to Node B may not be reciprocal.

Experimental Evaluation

The approach was evaluated on three standard citation network benchmarks: Cora, Citeseer, and PubMed. These datasets represent documents as nodes and citations as edges, with the goal of document classification.

Key Results

  • Extreme Pruning: On the PubMed dataset using a Simple Graph Convolution (SGC) model, KEdge successfully removed 83% to 92% of edges while maintaining test accuracy within a 2-4% margin of the original dense model.
  • Performance Gains: In some cases, KEdge actually improved accuracy (e.g., a 2.8% boost on Citeseer) by acting as a denoising mechanism that removes misleading connections.
  • Robustness to Depth: In an 8-layer GCN on the Cora dataset, the baseline model's accuracy dropped to ~35% due to over-smoothing. In contrast, KEdge-layerwise maintained an accuracy of ~60% by dynamically increasing the pruning rate in deeper layers.

Discussion and Conclusion

The findings suggest that standard graph datasets contain significant redundancy, with node features often carrying more weight than the full graph structure. KEdge leverages this redundancy to provide a more interpretable and efficient model.

While KEdge offers significant benefits, it does introduce computational overhead during the training phase due to the additional parameters required for mask generation. Future work will focus on scaling this approach to larger graphs and exploring its utility in diverse domains such as molecular modeling and web ranking.

Summary updated

BibTeX
@misc{rathee2021learnt,
  author = {Mandeep Rathee and Zijian Zhang and Thorben Funke and Megha Khosla and Avishek Anand},
  title = {{Learnt Sparsification for Interpretable Graph Neural Networks}},
  year = {2021},
  eprint = {2106.12920},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.12920},
}
Figure