TL;DR
This survey paper provides a comprehensive taxonomy of explainability techniques for Transformer-based Large Language Models (LLMs). It categorizes the field into traditional fine-tuning and modern prompting paradigms, detailing how researchers extract local and global explanations, evaluate their reliability, and leverage them to debug and improve model performance.
What Problem Does This Paper Address?
As LLMs are increasingly deployed in commercial products, their complex, "black-box" nature poses significant risks, including hallucinations, embedded biases, and the generation of harmful content. Understanding the inner workings of these models is crucial for building user trust and ensuring safety.
However, explaining modern LLMs introduces a massive challenge: traditional feature attribution methods (like gradient-based techniques or SHAP values) require immense computational power when scaled to billions of parameters. Furthermore, emergent abilities like in-context learning and chain-of-thought prompting require entirely new explanatory frameworks. This paper addresses this gap by structuring the fragmented landscape of LLM interpretability research.
Methods
The authors introduce a structured taxonomy that divides LLM explainability into two dominant training paradigms:
- Traditional Fine-Tuning Paradigm (e.g., BERT, RoBERTa): Explanations here focus on how self-supervised pre-training captures language fundamentals and how fine-tuning adapts them to downstream tasks. This is split into:
- Local Explanations: Feature attribution (perturbation, gradients, surrogate models, decomposition), attention-weight visualizations, example-based explanations (adversarial/counterfactual), and natural language explanations.
- Global Explanations: Probing-based classifiers, neuron activation analysis, concept-based explanations (e.g., TCAV), and mechanistic interpretability (mapping circuits).
- Prompting Paradigm (e.g., GPT-3.5/4, LLaMA): This focuses on massive models (>1B parameters) and is split by development stage:
- Base Models: Explaining how models leverage pre-trained knowledge via in-context learning, chain-of-thought (CoT) prompting, and representation engineering.
- Assistant Models: Investigating the role of alignment (instruction tuning and RLHF), analyzing hallucinations, and quantifying model uncertainty.
The overall taxonomy of these methods is illustrated in Figure 1.
Datasets
While this is a survey paper and does not introduce a new dataset, it highlights several key benchmarks used across the literature to evaluate explainability:
- GLUE Benchmark (SST-2, MNLI, QQP): Used extensively to evaluate local explanations in fine-tuned models.
- ERASER: A benchmark designed to evaluate rationalized NLP models based on human-annotated rationales.
- IMDB Sensitivity Dataset: Utilized for testing concept-based explanations (like Testing with Concept Activation Vectors, or TCAV).
- BigBench Hard: Used to benchmark complex zero-shot reasoning capabilities during explanation tuning.
Key Insights and Ideas
- Pre-training vs. Alignment: Evidence suggests that almost all factual knowledge is acquired during unsupervised pre-training. Supervised fine-tuning and RLHF (the pipeline shown in Figure 2) primarily teach the model the style and format required to interact as an assistant, effectively "activating" pre-existing knowledge.
- Unfaithful Chain-of-Thought: CoT explanations can be systematically unfaithful. When models are fed biased prompts (e.g., reordering multiple-choice options so the answer is always "A"), they will alter their predictions based on the bias but completely omit this influence from their generated text explanations.
- The Reversal Curse: LLMs suffer from severe logical deduction limitations. If a model is trained on "A is B," it fails to automatically infer that "B is A," proving that surface-level memorization often overrides robust reasoning.
- Mechanistic "Induction Heads": In smaller attention-only models, researchers identified specific two-layer circuits called "induction heads" that handle pattern replication, which is hypothesized to be the primary driver behind in-context learning.
Key Results
- Performance Gains via Explanations: Aligning machine rationales with human feedback using explanation regularization frameworks (like XMD) improves out-of-distribution (OOD) generalization on text classification tasks by up to 18%.
- Prompt Compression: Ablation analysis reveals that up to 60% of task instruction tokens can be safely removed (leaving only label-relevant information) without degrading the performance of models like T5-XL.
- Adversarial Vulnerability: Advanced token-level perturbation frameworks (like SemAttack) can successfully manipulate embedding spaces, dropping BERT's accuracy from 70.6% to 2.4% by changing just 5% of the words.
- Automated Neuron Labeling: Using GPT-4 to automatically synthesize natural language descriptions for neurons in GPT-2 XL successfully mapped over 1,000 neurons to distinct, high-level concepts (e.g., identifying a specific neuron that activates for movie references).
Limitations and Future Work
- Explanation without Ground Truths: A major bottleneck is the lack of gold-standard benchmark datasets to validate global explanations of individual LLM components, making it difficult to verify if an explanation is truly faithful to the model's internal logic.
- Attention Redundancy: Multiple studies show massive attention redundancy in both BERT and OPT-66B, meaning many attention heads can be pruned with zero performance loss. This opens up significant opportunities for model compression.
- Shifting to Temporal Analysis: Most current interpretability research provides a static "snapshot" of fully trained models. The authors emphasize an emerging trend toward temporal analysis—evaluating checkpoints across the training timeline to understand exactly when and how specific capabilities or biases develop.
Summary updated