Detecting and Understanding Vulnerabilities in Language Models via Mechanistic Interpretability
On the map: Mechanistic interpretability → Steering and probing for LLM safety
Abstract (arXiv)
Large Language Models (LLMs), characterized by being trained on broad amounts of data in a self-supervised manner, have shown impressive performance across a wide range of tasks. Indeed, their generative abilities have aroused interest on the application of LLMs across a wide range of contexts. However, neural networks in general, and LLMs in particular, are known to be vulnerable to adversarial attacks, where an imperceptible change to the input can mislead the output of the model. This is a serious concern that impedes the use of LLMs on high-stakes applications, such as healthcare, where a wrong prediction can imply serious consequences. Even though there are many efforts on making LLMs more robust to adversarial attacks, there are almost no works that study how and where these vulnerabilities that make LLMs prone to adversarial attacks happen. Motivated by these facts, we explore how to localize and understand vulnerabilities, and propose a method, based on Mechanistic Interpretability (MI) techniques, to guide this process. Specifically, this method enables us to detect vulnerabilities related to a concrete task by (i) obtaining the subset of the model that is responsible for that task, (ii) generating adversarial samples for that task, and (iii) using MI techniques together with the previous samples to discover and understand the possible vulnerabilities. We showcase our method on a pretrained GPT-2 Small model carrying out the task of predicting 3-letter acronyms to demonstrate its effectiveness on locating and understanding concrete vulnerabilities of the model.
Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Placed in Steering and probing for LLM safety, one of 13 directions in Mechanistic interpretability. Builds on 19 of its 29 references that are in the map. First posted on arXiv 29 Jul 2024.
Builds on
19 of 29 references.
References · 19
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2014Explaining and Harnessing Adversarial Examplescited by 7,364
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
- 2016Layer Normalizationcited by 5,669
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2022Toy Models of Superpositioncited by 971
- 2022In-context Learning and Induction Headscited by 964
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
7 more
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 202
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 194
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 156
- 2020Adversarial Training for Large Neural Language Modelscited by 111
- 2019Improving Neural Language Modeling via Adversarial Trainingcited by 49
- 2024How does GPT-2 Predict Acronyms? Extracting and Understanding a Circuit via Mechanistic Interpretabilitycited by 14
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 8.
13 papers.
Sort:
By area:
- 2024Attention Heads of Large Language Models: A Surveycited by 67
- 2024Correcting Negative Bias in Large Language Models through Negative Attention Score Alignmentcited by 12
- 2026Subspace-Aware Sparse Autoencoders for Effective Mechanistic Interpretabilitycited by 4
- 2025SymLoc: Symbolic Localization of Hallucination across HaluEval and TruthfulQAcited by 1
- 2025Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errorscited by 0
- 2025Towards Inclusive Toxic Content Moderation: Addressing Vulnerabilities to Adversarial Attacks in Toxicity Classifiers Tackling LLM-generated Contentcited by 0
- 2026Explaining the Explainer: Understanding the Inner Workings of Transformer-based Symbolic Regression Modelscited by 0
- 2026Why Do Large Language Models Generate Harmful Content?cited by 0
- 2026Inherited Circuits, Learned Semantics: How Fine-Tuning Creates Evasion Vulnerabilities Invisible to Standard Evaluationcited by 0
- 2026Transcoders for Investigating Deception in Language Modelscited by 0
- 2026Hallucinations in LLMs: A Lifecycle-Based Survey of Causes, Detection, Mitigation, and Preventioncited by 0
- 2026S^3martCirc: Self-supervised Smart Circuit Discoverycited by 0
- 2026Representational Simplicity and Circuit Size Dissociate in a Threshold-Dependent Way: A Controlled Test via Adversarial Training27 Sep 2026
- 2026S^3martCirc: Self-supervised Smart Circuit Discovery1 Sep 2026
- 2026Hallucinations in LLMs: A Lifecycle-Based Survey of Causes, Detection, Mitigation, and Prevention20 Jul 2026
- 2026Transcoders for Investigating Deception in Language Models16 Jul 2026
- 2026Inherited Circuits, Learned Semantics: How Fine-Tuning Creates Evasion Vulnerabilities Invisible to Standard Evaluation25 Jun 2026
- 2026Subspace-Aware Sparse Autoencoders for Effective Mechanistic Interpretability4 Jun 2026
- 2026Why Do Large Language Models Generate Harmful Content?13 Apr 2026
- 2026Explaining the Explainer: Understanding the Inner Workings of Transformer-based Symbolic Regression Models3 Feb 2026
- 2025SymLoc: Symbolic Localization of Hallucination across HaluEval and TruthfulQA18 Nov 2025
- 2025Towards Inclusive Toxic Content Moderation: Addressing Vulnerabilities to Adversarial Attacks in Toxicity Classifiers Tackling LLM-generated Content16 Sep 2025
- 2025Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors27 Feb 2025
- 2024Attention Heads of Large Language Models: A Survey5 Sep 2024
- 2026Subspace-Aware Sparse Autoencoders for Effective Mechanistic Interpretabilitycited by 4
- 2026Explaining the Explainer: Understanding the Inner Workings of Transformer-based Symbolic Regression Modelscited by 0
- 2026Transcoders for Investigating Deception in Language Modelscited by 0
- 2026S^3martCirc: Self-supervised Smart Circuit Discoverycited by 0
- 2026Representational Simplicity and Circuit Size Dissociate in a Threshold-Dependent Way: A Controlled Test via Adversarial Trainingcited by 0
- 2026Representational Simplicity and Circuit Size Dissociate in a Threshold-Dependent Way: A Controlled Test via Adversarial Training27 Sep 2026
- 2026S^3martCirc: Self-supervised Smart Circuit Discovery1 Sep 2026
- 2026Transcoders for Investigating Deception in Language Models16 Jul 2026
- 2026Subspace-Aware Sparse Autoencoders for Effective Mechanistic Interpretability4 Jun 2026
- 2026Explaining the Explainer: Understanding the Inner Workings of Transformer-based Symbolic Regression Models3 Feb 2026
- 2026Why Do Large Language Models Generate Harmful Content?cited by 0
- 2026Why Do Large Language Models Generate Harmful Content?13 Apr 2026
- 2024Attention Heads of Large Language Models: A Surveycited by 67
- 2024Correcting Negative Bias in Large Language Models through Negative Attention Score Alignmentcited by 12
- 2025SymLoc: Symbolic Localization of Hallucination across HaluEval and TruthfulQAcited by 1
- 2025Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errorscited by 0
- 2025Towards Inclusive Toxic Content Moderation: Addressing Vulnerabilities to Adversarial Attacks in Toxicity Classifiers Tackling LLM-generated Contentcited by 0
- 2026Inherited Circuits, Learned Semantics: How Fine-Tuning Creates Evasion Vulnerabilities Invisible to Standard Evaluationcited by 0
- 2026Hallucinations in LLMs: A Lifecycle-Based Survey of Causes, Detection, Mitigation, and Preventioncited by 0
- 2026Hallucinations in LLMs: A Lifecycle-Based Survey of Causes, Detection, Mitigation, and Prevention20 Jul 2026
- 2026Inherited Circuits, Learned Semantics: How Fine-Tuning Creates Evasion Vulnerabilities Invisible to Standard Evaluation25 Jun 2026
- 2025SymLoc: Symbolic Localization of Hallucination across HaluEval and TruthfulQA18 Nov 2025
- 2025Towards Inclusive Toxic Content Moderation: Addressing Vulnerabilities to Adversarial Attacks in Toxicity Classifiers Tackling LLM-generated Content16 Sep 2025
- 2025Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors27 Feb 2025
- 2024Attention Heads of Large Language Models: A Survey5 Sep 2024
- 2024Correcting Negative Bias in Large Language Models through Negative Attention Score Alignment31 Jul 2024
Similar, not cited
Close in wording, no citation either way
- 2024Breaking Down the Defenses: A Comparative Survey of Attacks on Large Language Models
- 2024Recent Advances in Attack and Defense Approaches of Large Language Models
- 2026Mechanistic Interpretability of LLM Jailbreaks via Internal Attribution Graphs
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Survey
- 2025Attack and defense techniques in large language models: A survey and new perspectives
- 2025AdversariaLLM: A Unified and Modular Toolbox for LLM Robustness Research
- 2025A Survey of Attacks on Large Language Models
- 2024Jailbreaking and Mitigation of Vulnerabilities in Large Language Models