Table of Contents
Fetching ...

LLMExplainer: Large Language Model based Bayesian Inference for Graph Explanation Generation

Jiaxing Zhang, Jiayi Liu, Dongsheng Luo, Jennifer Neville, Hua Wei

TL;DR

This work introduces LLMExplainer, a framework that embeds a Large Language Model as a Bayesian prior within a graph information bottleneck explainer to mitigate learning bias in GNN explanations arising from scarce ground-truth annotations. By coupling Bayesian variational inference with an LLM-based grading mechanism, the method generates explanation subgraphs via a BI-enhanced generator and updates them using a scoring signal from the LLM, ensuring stable convergence and improved fidelity. The approach is evaluated on five datasets (two synthetic, three real-world) against strong baselines, with consistent AUC improvements and evidence that the LLM score effectively reflects and guides explanation quality. The results suggest significant potential for LLM-guided Bayesian explanations to enhance interpretability and reliability of GNN explanations in practical, data-scarce settings, with broader implications for explainable AI in graph domains.

Abstract

Recent studies seek to provide Graph Neural Network (GNN) interpretability via multiple unsupervised learning models. Due to the scarcity of datasets, current methods easily suffer from learning bias. To solve this problem, we embed a Large Language Model (LLM) as knowledge into the GNN explanation network to avoid the learning bias problem. We inject LLM as a Bayesian Inference (BI) module to mitigate learning bias. The efficacy of the BI module has been proven both theoretically and experimentally. We conduct experiments on both synthetic and real-world datasets. The innovation of our work lies in two parts: 1. We provide a novel view of the possibility of an LLM functioning as a Bayesian inference to improve the performance of existing algorithms; 2. We are the first to discuss the learning bias issues in the GNN explanation problem.

LLMExplainer: Large Language Model based Bayesian Inference for Graph Explanation Generation

TL;DR

This work introduces LLMExplainer, a framework that embeds a Large Language Model as a Bayesian prior within a graph information bottleneck explainer to mitigate learning bias in GNN explanations arising from scarce ground-truth annotations. By coupling Bayesian variational inference with an LLM-based grading mechanism, the method generates explanation subgraphs via a BI-enhanced generator and updates them using a scoring signal from the LLM, ensuring stable convergence and improved fidelity. The approach is evaluated on five datasets (two synthetic, three real-world) against strong baselines, with consistent AUC improvements and evidence that the LLM score effectively reflects and guides explanation quality. The results suggest significant potential for LLM-guided Bayesian explanations to enhance interpretability and reliability of GNN explanations in practical, data-scarce settings, with broader implications for explainable AI in graph domains.

Abstract

Recent studies seek to provide Graph Neural Network (GNN) interpretability via multiple unsupervised learning models. Due to the scarcity of datasets, current methods easily suffer from learning bias. To solve this problem, we embed a Large Language Model (LLM) as knowledge into the GNN explanation network to avoid the learning bias problem. We inject LLM as a Bayesian Inference (BI) module to mitigate learning bias. The efficacy of the BI module has been proven both theoretically and experimentally. We conduct experiments on both synthetic and real-world datasets. The innovation of our work lies in two parts: 1. We provide a novel view of the possibility of an LLM functioning as a Bayesian inference to improve the performance of existing algorithms; 2. We are the first to discuss the learning bias issues in the GNN explanation problem.
Paper Structure (23 sections, 1 theorem, 12 equations, 4 figures, 3 tables, 1 algorithm)

This paper contains 23 sections, 1 theorem, 12 equations, 4 figures, 3 tables, 1 algorithm.

Key Result

Theorem 1

When we reach the optimum $\hat{G}=G^*$, we will have the gradient $\Delta = \frac{\partial F}{\partial \hat{G^*}} \approx 0$, trapping $G^*$ at the optimum point to avoid learning bias.

Figures (4)

  • Figure 1: Intuitive visualization of learning bias.
  • Figure 2: The architecture of our proposed framework for graph explaining and Bayesian inference on one graph sample in one epoch. $\hat{G}_0$ is the sub-graph explanation candidate before Bayesian inference and $\hat{Y}_0 = f(\hat{G}_0)$ is the prediction label for $\hat{G}_0$. The explaining procedure in existing works on the left part optimizes the sub-graph explanation by minimizing the size constraint $I(G, \hat{G}_0)$ and maximizing the mutual information $I(Y, \hat{Y}_0)$, which would face the learning bias problem after epochs. We introduced the Bayesian inference together with the LLM, which serves as a human expert to produce the embedded graph $\hat{G}$ and replace $I(Y, \hat{Y}_0)$ with $I(Y, \hat{Y})$in the objective function, where $\hat{Y} = f(\hat{G})$ is the prediction label for $\hat{G}$. The detailed illustration of prompting is shown in Fig. (\ref{['fig:prompt']}).
  • Figure 3: The prompt construction of LLMExplainer in Bayesian Variational Inference Process. For an original graph $G$ and sub-graph explanation candidate $\hat{G}$, namely 'G' and 'Ge' in text, Large Language Models could tackle and reason the graph tasks with commonsense and expert knowledge, then grade the explanation candidate sub-graph. The placeholders would be replaced with the full text during prompting. Their usage is shown in the table.
  • Figure 4: Visualization of AUC, LLM Score, and Training Loss curve by training epochs. We choose one seed for each explainer on each dataset.

Theorems & Definitions (3)

  • Definition 4.1
  • Theorem 1
  • proof