From Nodes to Narratives: Explaining Graph Neural Networks with LLMs and Graph Context

Peyman Baghershahi, Gregoire Fournier, Pranav Nyati, Sourav Medya

Main figure for From Nodes to Narratives: Explaining Graph Neural Networks with LLMs and Graph Context

Abstract

Graph Neural Networks (GNNs) have emerged as powerful tools for learning over structured data, including text-attributed graphs (TAGs), which are common in domains such as citation networks, social platforms, and knowledge graphs. GNNs are not inherently interpretable and thus, many explanation methods have been proposed. However, existing explanation methods often struggle to generate interpretable, fine-grained rationales, especially when node attributes include rich natural language. In this work, we introduce Gspell, a lightweight, post-hoc framework that uses large language models (LLMs) to generate faithful and interpretable explanations for GNN predictions. Gspell projects GNN node embeddings into the LLM embedding space and constructs hybrid prompts that interleave soft prompts with textual inputs from the graph structure. This enables the LLM to reason about GNN internal representations and to produce natural-language explanations, along with concise explanation subgraphs. Our experiments across real-world TAG datasets demonstrate that Gspell achieves a favorable trade-off between fidelity and sparsity, while improving human-centric metrics such as insightfulness. Gspell sets a new direction for LLM-based explainability in graph learning by aligning GNN internals with human reasoning.

Proposed method: Gspell+

Benchmark Results

Tested on 2 datasets Non-standard metric on 2 datasets

Tables show presented results in global context (best 3 papers + GCN + MLP).

Classic

WikiCS

Global leaderboard →
Non-default metric. This paper reports Fidelity; the dataset default is Accuracy. Values below use Fidelity only.

Sorted by Fidelity. Highlighted rows are from other papers.

#ModelFidelity ↑Paper
1
GNNExplainer
0.9900
This paper
2
Random
0.9330
This paper
3
LLM
0.9140 ±0.0100
This paper
4
PGExplainer
0.9060
This paper
5
Gspell+
0.8650
This paper
6
TAGExplainer
0.7640 ±0.0110
This paper
7
Node
0.7230
This paper

Other Graph Benchmarks

Amazon2M

Global leaderboard →
Non-default metric. This paper reports Fidelity; the dataset default is Accuracy. Values below use Fidelity only.

Sorted by Fidelity. Highlighted rows are from other papers.

#ModelFidelity ↑Paper
1
GNNExplainer
0.9450 ±0.0150
This paper
2
Gspell+
0.9200 ±0.0180
This paper
3
Random
0.9100 ±0.0110
This paper
4
LLM
0.8600 ±0.0120
This paper
5
PGExplainer
0.7380 ±0.0560
This paper
6
Node
0.6780 ±0.0270
This paper
7
TAGExplainer
0.6510 ±0.0440
This paper
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper)