Skip to main content
QUICK REVIEW

[Paper Review] LMExplainer: Grounding Knowledge and Explaining Language Models

Zichen Chen, Ambuj K. Singh|arXiv (Cornell University)|Mar 29, 2023
Explainable Artificial Intelligence (XAI)Computer Science7 citations
TL;DR

LMExplainer uses a knowledge graph and graph neural networks to extract reason-elements and generate natural language explanations for LM predictions, achieving state-of-the-art results on CommonsenseQA and competitive results on OpenBookQA while providing interpretable why-choose and why-not-choose explanations.

ABSTRACT

Language models (LMs) like GPT-4 are important in AI applications, but their opaque decision-making process reduces user trust, especially in safety-critical areas. We introduce LMExplainer, a novel knowledge-grounded explainer that clarifies the reasoning process of LMs through intuitive, human-understandable explanations. By leveraging a graph attention network (GAT) with a large-scale knowledge graph (KG), LMExplainer not only precisely narrows the reasoning space to focus on the most relevant knowledge but also grounds its reasoning in structured, verifiable knowledge to reduce hallucinations and enhance interpretability. LMExplainer effectively generates human-understandable explanations to enhance transparency and streamline the decision-making process. Additionally, by incorporating debugging into the explanation, it offers expertise suggestions that improve LMs from a developmental perspective. Thus, LMExplainer stands as an enhancement in making LMs more accessible and understandable to users. We evaluate LMExplainer on benchmark datasets such as CommonsenseQA and OpenBookQA, demonstrating that it outperforms most existing methods. By comparing the explanations generated by LMExplainer with those of other models, we show that our approach offers more comprehensive and clearer explanations of the reasoning process. LMExplainer provides a deeper understanding of the inner workings of LMs, advancing towards more reliable, transparent, and equitable AI.

Motivation & Objective

  • Motivate the need for interpretable explanations for large language models (LLMs) beyond attention-based methods.
  • Propose LMExplainer to ground LM reasoning in a knowledge graph and graph neural network framework.
  • Enable generation of human-understandable explanations that reflect the model's reasoning process.

Proposed method

  • Extract key elements from input and retrieved KG to build an element-graph G_e.
  • Use a graph attention network (GAT) over G_e to identify reason-elements behind predictions.
  • Compute attention-driven influence signals to both guide prediction and generate explanations.
  • Generate why-choose and why-not-choose explanations via an instruction-based generator (GPT-3.5-turbo) using extracted components.
  • Train with cross-entropy loss using LM and interpretation embeddings to predict the correct answer.
Figure 1: The LMExplainer architecture. Given a question context $z$ (which includes question $q$ and the set $\mathcal{A}$ of answers), we first generate language embeddings using a pre-trained LM. Simultaneously, it retrieves relevant knowledge from a KG to construct a subgraph (Section 4.1 ). The
Figure 1: The LMExplainer architecture. Given a question context $z$ (which includes question $q$ and the set $\mathcal{A}$ of answers), we first generate language embeddings using a pre-trained LM. Simultaneously, it retrieves relevant knowledge from a KG to construct a subgraph (Section 4.1 ). The

Experimental results

Research questions

  • RQ1How can we provide interpretable and natural explanations for the decision-making process of LMs?
  • RQ2Does providing explanations impact the performance of language models on QA tasks?
  • RQ3Can a knowledge-grounded graph approach yield faithful and useful explanations for LM predictions?

Key findings

  • LMExplainer outperforms state-of-the-art LM+KG methods on CommonsenseQA (77.31% IHtest vs. 71.08% best non-LM-Explainer baselines).
  • LMExplainer achieves competitive performance on OpenBookQA (68.00% Test-Acc vs. 70.80% for GreaseLM).
  • In ablations, incorporating external knowledge and the interpreting component significantly improves accuracy, with the interpreting component showing a strong impact on performance.
  • Explanations include ranked reason-elements and both why-choose and why-not-choose narratives that offer human-understandable insight into the model’s reasoning.
  • Compared to PathReasoner and ECQA, LMExplainer provides a complete reasoning path plus justification for the chosen answer.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.