XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Models

Erik Cambria, Lorenzo Malandri, Fabio Mercorio, Navid Nobani, Andrea SevesoarXiv 2024

Abstract

In this survey, we address the key challenges in Large Language Models (LLM) research, focusing on the importance of interpretability. Driven by increasing interest from AI and business sectors, we highlight the need for transparency in LLMs. We examine the dual paths in current LLM research and eXplainable Artificial Intelligence (XAI): enhancing performance through XAI and the emerging focus on model interpretability. Our paper advocates for a balanced approach that values interpretability equally with functional advancements. Recognizing the rapid development in LLM research, our survey includes both peer-reviewed and preprint (arXiv) papers, offering a comprehensive overview of XAI's role in LLM research. We conclude by urging the research community to advance both LLM and XAI fields together.

Introduction

As Large Language Models (LLMs) become deeply integrated into critical sectors like medicine and finance, their "black-box" nature creates significant risks. While these models are incredibly versatile, their inner workings remain opaque, leading to issues with bias, misinformation, and a lack of accountability. This survey addresses the fragmented landscape of current research, where the rush for higher performance often eclipses the need for transparency. By conducting a systematic mapping study, the authors aim to answer how XAI techniques are being integrated with LLMs and identify the gaps that prevent these models from being truly "trustworthy."

Methodology

The authors employed a Systematic Mapping Study (SMS), a rigorous three-phase approach (planning, conducting, and reporting) designed to provide a broad overview of the research field.

The systematic process used for paper retrieval and classification

Key aspects of the methodology include a custom search strategy across ArXiv, DBLP, and Scopus databases to capture both peer-reviewed and the latest preprint research. The literature was then divided into two macro-categories:

  1. Application Papers: Research that generates or uses explanations, further split into "To Explain" (mechanistic interpretability) and "As Feature" (using rationales to improve tasks).
  2. Discussion Papers: Research addressing theoretical issues, ethical concerns, and benchmarks.

Categorizing the Landscape and Key Insights

A major trend identified in the field is the use of LLMs to generate "explanations" (like Chain-of-Thought rationales) not for human understanding, but as a mechanism to improve the model's own accuracy. The authors warn that this "interpretability as a byproduct" approach doesn't necessarily make the model more transparent.

Conversely, emerging research in Mechanistic Interpretability (e.g., TransformerLens, ACDC) is moving toward "reverse-engineering" LLMs to identify specific sub-graphs or "circuits" within the neural network that correspond to specific linguistic behaviors.

A synthesis of recent application papers, showing their targets and primary goals

Despite these advancements, "causal hallucinations" remain a significant hurdle. Even when LLMs are used as explainers, they may provide a plausible-sounding explanation that does not actually reflect the model's internal logic—a phenomenon distinguishing "faithful" from "unfaithful" explanations.

Key Results and Benchmarks

The survey synthesized 35 core papers from an initial pool of over 1,000. Key findings include:

  • Interpretability Tools: Tools like BertViz and TransformerLens are essential for visualizing attention mechanisms and identifying how individual neurons contribute to model behavior.
  • Performance Gains: Training smaller models on explanations generated by larger LLMs can significantly enhance the smaller models' reasoning capabilities.
  • Trust Gaps: Current LLMs often fail to meet the transparency requirements of stringent regulations like the EU's GDPR.

To evaluate these capabilities, the survey highlights several critical benchmarks:

  • WHOOPS!: Tests visual commonsense reasoning using images that defy common sense.
  • SCIENCEQA: Evaluates how well models generate explanations to justify answers in science.
  • ROSCOE: A suite of metrics designed to score step-by-step reasoning paths.

Limitations and Future Work

The authors identify several critical limitations in the current state of XAI for LLMs. Most current explanations are designed for AI researchers, not the end-users who actually need to trust the system. Furthermore, there is a lack of research directly tackling how XAI can mitigate specific LLM failures, such as the propagation of misinformation. The paper concludes with a call to action, urging the community to make explainability a "must-have" requirement in the LLM development lifecycle and to focus on creating explanations accessible to non-technical audiences.

Summary updated

BibTeX
@misc{cambria2024xai,
  author = {Erik Cambria and Lorenzo Malandri and Fabio Mercorio and Navid Nobani and Andrea Seveso},
  title = {{XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Models}},
  year = {2024},
  eprint = {2407.15248},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.15248},
}
Figure