LM-Debugger: An Interactive Tool for Inspection and Intervention in Transformer-Based Language Models
Not on the map. Why?
Abstract (arXiv)
The opaque nature and unexplained behavior of transformer-based language models (LMs) have spurred a wide interest in interpreting their predictions. However, current interpretation methods mostly focus on probing models from outside, executing behavioral tests, and analyzing salience input features, while the internal prediction construction process is largely not understood. In this work, we introduce LM-Debugger, an interactive debugger tool for transformer-based LMs, which provides a fine-grained interpretation of the model's internal prediction process, as well as a powerful framework for intervening in LM behavior. For its backbone, LM-Debugger relies on a recent method that interprets the inner token representations and their updates by the feed-forward layers in the vocabulary space. We demonstrate the utility of LM-Debugger for single-prediction debugging, by inspecting the internal disambiguation process done by GPT2. Moreover, we show how easily LM-Debugger allows to shift model behavior in a direction of the user's choice, by identifying a few vectors in the network and inducing effective interventions to the prediction process. We release LM-Debugger as an open-source tool and a demo over GPT2 models.
Key facts. Cited by 28 papers in the map (data through 14 Oct 2026). Builds on 19 of its 35 references that are in the map. First posted on arXiv 26 Apr 2022.
Builds on
19 of 35 references.
References · 19
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
- 2019Bias in Bios: A Case Study of Semantic Representation Bias in a High-Stakes Settingcited by 349
- 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
- 2020The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for NLP Modelscited by 125
7 more
- 2016Yelp Dataset Challenge: Review Rating Predictioncited by 84
- 2020The Radicalization Risks of GPT-3 and Advanced Neural Language Modelscited by 76
- 2019AllenNLP Interpret: A Framework for Explaining Predictions of NLP Modelscited by 74
- 2019exBERT: A Visual Analysis Tool to Explore Learned Representations in Transformers Modelscited by 33
- 2018NeuroX: A Toolkit for Analyzing Individual Neurons in Neural Networkscited by 31
- 2021Putting Words in BERT's Mouth: Navigating Contextualized Vector Spaces with Pseudowordscited by 9
- 2022Interpretation of Black Box NLP Models: A Surveycited by 9
Built on by
Citing papers per year: 2022: 6; 2023: 12; 2024: 6; 2025: 3; 2026: 1.
28 papers.
Sort:
By area:
- 2022Editing Models with Task Arithmeticcited by 1,120
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
- 2023Transformer-Patcher: One Mistake worth One Neuroncited by 197
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 156
- 2022Analyzing Transformers in Embedding Spacecited by 132
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 129
- 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Modelscited by 125
- 2023Self-contradictory Hallucinations of Large Language Models: Evaluation, Detection and Mitigationcited by 124
- 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden Statecited by 121
- 2023Multimodal Neurons in Pretrained Text-Only Transformerscited by 49
- 2024Answer, Assemble, Ace: Understanding How LMs Answer Multiple Choice Questionscited by 35
16 more
- 2024Implicit Multimodal Alignment: On the Generalization of Frozen LLMs to Multimodal Inputscited by 23
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Taskscited by 22
- 2024Position: Towards Bidirectional Human-AI Alignmentcited by 18
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Modelscited by 16
- 2023Robust Weight Signatures: Gaining Robustness as Easy as Patching Weights?cited by 13
- 2022Convexifying Transformers: Improving optimization and understanding of transformer networkscited by 12
- 2025Emergence of Linear Truth Encodings in Language Modelscited by 12
- 2023NeuroX Library for Neuron Analysis of Deep NLP Modelscited by 11
- 2024Report Cards: Qualitative Evaluation of Language Models Using Natural Language Summariescited by 6
- 2022An Interpretability Evaluation Benchmark for Pre-trained Language Modelscited by 4
- 2022Understanding Text Classification Data and Models Using Aggregated Input Saliencecited by 2
- 2023Towards Learning and Explaining Indirect Causal Effects in Neural Networkscited by 2
- 2023Visual Analytics for Generative Transformer Modelscited by 2
- 2025The Rise of Parameter Specialization for Knowledge Storage in Large Language Modelscited by 1
- 2025EnchTable: Unified Safety Alignment Transfer in Fine-tuned Large Language Modelscited by 0
- 2026Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanismscited by 0
- 2026Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms17 Apr 2026
- 2025EnchTable: Unified Safety Alignment Transfer in Fine-tuned Large Language Models13 Nov 2025
- 2025Emergence of Linear Truth Encodings in Language Models17 Oct 2025
- 2025The Rise of Parameter Specialization for Knowledge Storage in Large Language Models22 May 2025
- 2024Report Cards: Qualitative Evaluation of Language Models Using Natural Language Summaries1 Sep 2024
- 2024Answer, Assemble, Ace: Understanding How LMs Answer Multiple Choice Questions21 Jul 2024
- 2024Position: Towards Bidirectional Human-AI Alignment13 Jun 2024
- 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Models27 May 2024
- 2024Implicit Multimodal Alignment: On the Generalization of Frozen LLMs to Multimodal Inputs26 May 2024
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models11 Jan 2024
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Tasks21 Nov 2023
- 2023Visual Analytics for Generative Transformer Models21 Nov 2023
16 more
- 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden State8 Nov 2023
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Models4 Oct 2023
- 2023Multimodal Neurons in Pretrained Text-Only Transformers3 Aug 2023
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computations28 Jul 2023
- 2023NeuroX Library for Neuron Analysis of Deep NLP Models26 May 2023
- 2023Self-contradictory Hallucinations of Large Language Models: Evaluation, Detection and Mitigation25 May 2023
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Models28 Apr 2023
- 2023Towards Learning and Explaining Indirect Causal Effects in Neural Networks24 Mar 2023
- 2023Robust Weight Signatures: Gaining Robustness as Easy as Patching Weights?24 Feb 2023
- 2023Transformer-Patcher: One Mistake worth One Neuron24 Jan 2023
- 2022Editing Models with Task Arithmetic8 Dec 2022
- 2022Convexifying Transformers: Improving optimization and understanding of transformer networks20 Nov 2022
- 2022Understanding Text Classification Data and Models Using Aggregated Input Salience10 Nov 2022
- 2022Analyzing Transformers in Embedding Space6 Sep 2022
- 2022An Interpretability Evaluation Benchmark for Pre-trained Language Models28 Jul 2022
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networks27 Jul 2022
- 2022Editing Models with Task Arithmeticcited by 1,120
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2023Transformer-Patcher: One Mistake worth One Neuroncited by 197
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 156
- 2022Analyzing Transformers in Embedding Spacecited by 132
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 129
- 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Modelscited by 125
- 2023Self-contradictory Hallucinations of Large Language Models: Evaluation, Detection and Mitigationcited by 124
- 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden Statecited by 121
- 2023Multimodal Neurons in Pretrained Text-Only Transformerscited by 49
- 2024Answer, Assemble, Ace: Understanding How LMs Answer Multiple Choice Questionscited by 35
- 2024Implicit Multimodal Alignment: On the Generalization of Frozen LLMs to Multimodal Inputscited by 23
12 most cited of 24 All 24 (JSON)
- 2025Emergence of Linear Truth Encodings in Language Models17 Oct 2025
- 2025The Rise of Parameter Specialization for Knowledge Storage in Large Language Models22 May 2025
- 2024Report Cards: Qualitative Evaluation of Language Models Using Natural Language Summaries1 Sep 2024
- 2024Answer, Assemble, Ace: Understanding How LMs Answer Multiple Choice Questions21 Jul 2024
- 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Models27 May 2024
- 2024Implicit Multimodal Alignment: On the Generalization of Frozen LLMs to Multimodal Inputs26 May 2024
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Tasks21 Nov 2023
- 2023Visual Analytics for Generative Transformer Models21 Nov 2023
- 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden State8 Nov 2023
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Models4 Oct 2023
- 2023Multimodal Neurons in Pretrained Text-Only Transformers3 Aug 2023
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computations28 Jul 2023
12 newest of 24 All 24 (JSON)