On GNN explanability with activation rules

Luca Veyrin-Forrer, Ataollah Kamal, Stefan Duffner, Marc Plantevit, Céline RobardetarXiv 2024 · DOI

Abstract

Graph Neural Networks (GNNs) have become the standard for processing relational data, yet their internal decision-making processes remain largely opaque. Traditional explainability methods rely on input perturbation, which often fails to capture the model's internal logic. We present INSIDE-GNN, a framework that explains GNNs by mining "activation rules" directly from hidden layers. By leveraging information theory to identify discriminant neuron patterns and translating them into human-readable graph properties, INSIDE-GNN provides up to a 200% improvement in explanation fidelity over state-of-the-art methods.

Introduction

While GNNs excel at tasks like molecular property prediction and social network analysis, they are notoriously difficult to interpret. Most existing "explainers," such as GNNExplainer or PGExplainer, operate as black-box tools that perturb input graphs to observe output changes. This approach has two major drawbacks: it can be unreliable, labeling features as important even if they don't drive the classification, and it suffers from "internal blindness," ignoring how the model builds hierarchical representations across its layers.

The INSIDE-GNN Framework

INSIDE-GNN shifts the focus from input masks to activation rules. An activation rule is a specific configuration of "on" neurons in a hidden layer that is highly discriminant for a particular output label.

The INSIDE-GNN workflow: from graph input and GNN activation extraction to rule mining and redescription.

The framework operates through several key stages:

  1. Activation Extraction: Continuous neuron values from ReLU layers are converted into a binary activation matrix (1 if active, 0 otherwise).
  2. Subjective Interestingness: To avoid redundant rules, the system uses the FORSIED framework. It maintains a "background model" of known information and iteratively mines for rules that provide the most new information.
  3. INSIDE-SI Algorithm: A branch-and-bound algorithm efficiently searches the massive space of possible neuron combinations to find the most informative rules.

Rule Mining and Redescription

A core innovation of INSIDE-GNN is its ability to "translate" abstract neuron patterns into human-readable terms. Once a discriminant activation pattern is found, the authors use two pattern languages to describe it: Numerical Subgroups (topological properties like node degree or centrality) and Graph Subgroups (identifying common motifs).

Example of node-level activations across different graphs, showing how specific components correlate with output classes.

As shown in the figure above, specific nodes (highlighted in red) trigger distinct activation components that correlate with the model's final classification. This allows the framework to bridge the gap between high-dimensional latent spaces and domain-specific knowledge.

Experimental Evaluation

The method was evaluated on six benchmarks, including synthetic datasets (BA2) and real-world molecular datasets (Aids, BBBP, Mutagen, DD, Proteins).

Key Results

  • Superior Fidelity: INSIDE-GNN outperformed SOTA methods across almost all datasets, showing up to a 200% improvement in fidelity—the degree to which the explanation accurately reflects the model's actual logic.
  • Mimicry Accuracy: Simple decision trees trained solely on the mined activation rules could mimic the complex GNN's decisions with high accuracy (e.g., 0.98 on BA2, 0.96 on Aids).
  • Domain Relevance: In the Mutagen dataset, the framework successfully identified known "toxicophores" (chemical groups that cause mutations), such as aromatic nitro groups, validating its real-world utility.

Discussion and Conclusion

INSIDE-GNN demonstrates that the internal state of a GNN contains rich, interpretable information that perturbation methods miss. The framework reveals a layer-wise evolution of logic: early layers capture local neighborhood features, while deeper layers aggregate these into complex, discriminant representations.

While the current branch-and-bound approach is computationally intensive—sometimes requiring days for complex datasets—it provides a level of faithfulness to the model's "worldview" that was previously unattainable. Future work will focus on optimizing search heuristics and extending the framework to multi-class and regression tasks.

Summary updated

BibTeX
@misc{veyrinforrer2024gnn,
  author = {Luca Veyrin-Forrer and Ataollah Kamal and Stefan Duffner and Marc Plantevit and Céline Robardet},
  title = {{On GNN explanability with activation rules}},
  year = {2024},
  eprint = {2406.11594},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11594},
}
Figure