GraphNarrator: Generating Textual Explanations for Graph Neural Networks

Bo Pan, Zhen Xiong, Guanchen Wu, Zheng Zhang, Yifei Zhang, Yuntong Hu, Liang ZhaoACL 2025

Introduction

Graph Neural Networks (GNNs) have become the standard for analyzing data with complex relational structures, such as social networks, molecular graphs, and citation networks. However, GNNs are often "black boxes," making it difficult to understand the reasoning behind their predictions. This lack of transparency is particularly problematic in Text-Attributed Graphs (TAGs), where nodes contain rich textual information.

Existing explainability tools typically rely on saliency maps that highlight important nodes or words. While technically useful, these maps are often fragmented, redundant, and difficult for non-experts to interpret. There is a significant gap between a heatmap of highlighted tokens and a coherent, human-readable explanation.

Comparison between traditional saliency-based explanations and GraphNarrator's natural language explanations.

GraphNarrator bridges this gap by transforming GNN decision logic into concise natural language stories, providing explanations that are both faithful to the model and easily understood by humans.

Methodology: The GraphNarrator Pipeline

The primary challenge in generating natural language explanations for GNNs is the lack of large-scale "ground truth" datasets. GraphNarrator addresses this through a three-stage pipeline involving saliency verbalization, expert iteration, and knowledge distillation.

The GraphNarrator framework: from saliency-based explanation generation to expert iteration and final model distillation.

1. Saliency Verbalization

The process begins by using standard explainers (e.g., LIME or SHAP) to identify influential nodes and words. These are then organized into a "Saliency Paragraph"—a structured text document created using a Breadth-First Search (BFS) traversal of the graph. This format allows a Large Language Model (LLM) to process the graph's hierarchical structure as a narrative.

2. Expert Iteration (Self-Improvement Loop)

To refine the quality of explanations, GraphNarrator employs an iterative "Expert Iteration" process. A pseudo-label generator LLM produces multiple candidate explanations, which are then ranked based on three key metrics:

  • Faithfulness to Input: Ensuring the explanation includes the most important features identified by saliency scores.
  • Faithfulness to Prediction (Simulatability): Measuring whether the explanation allows a reader to correctly infer the GNN's original prediction.
  • Brevity: Penalizing verbosity to ensure the output remains concise and readable.

3. Knowledge Distillation

The highest-quality explanations generated during the iteration phase serve as "pseudo-labels" to fine-tune a specialized "Explainer LLM" (based on LLaMA-3.1 8B). This distilled model can generate high-quality explanations end-to-end without the need for the computationally expensive iterative loop during inference.

Evaluation and Results

The framework was evaluated on three real-world TAG datasets: Cora (CS citation network), DBLP (broad CS citation network), and Book-History (Amazon co-purchase network).

GraphNarrator consistently outperformed general-purpose LLMs like GPT-4o and LLaMA-3.1 across several dimensions:

  • Simulatability: The model achieved an average 8.2% improvement in how well the explanation represented the underlying GNN logic compared to the next best method.
  • Human Preference: In blind evaluations, human annotators rated GraphNarrator’s explanations significantly higher for being "insightful." Notably, it achieved a 33.7% boost in structural informativeness over GPT-4o, demonstrating its superior ability to synthesize information across graph nodes.
  • Brevity-Faithfulness Tradeoff: Analysis revealed that enforcing brevity often improved faithfulness by forcing the model to focus on the most critical features, eliminating redundant "noise."

Conclusion and Future Work

GraphNarrator demonstrates that graph structures can be effectively serialized into narratives, allowing LLMs to provide intuitive justifications for GNN predictions. By moving beyond simple highlighting to synthesized natural language, it makes complex graph models more accessible.

Future research will focus on reducing the computational overhead of LLM-based explanation generation and extending the framework to handle dynamic or multi-modal graphs that include images alongside text.

Summary updated

BibTeX
@inproceedings{pan2025graphnarrator,
  author = {Bo Pan and Zhen Xiong and Guanchen Wu and Zheng Zhang and Yifei Zhang and Yuntong Hu and Liang Zhao},
  title = {{GraphNarrator: Generating Textual Explanations for Graph Neural Networks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure