mlsanityData to 14 Oct 2026

Detecting and Understanding Vulnerabilities in Language Models via Mechanistic Interpretability

arXiv 2407.19842 ↗First posted 29 Jul 2024cs.LG cs.CL cs.CRcited by 13

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  4. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  5. 2020Scaling Laws for Neural Language Modelscited by 6,586
  6. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  7. 2016Layer Normalizationcited by 5,669
  8. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  9. 2022Toy Models of Superpositioncited by 971
  10. 2022In-context Learning and Induction Headscited by 964
  11. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
  12. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
7 more
  1. 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
  2. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 202
  3. 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 194
  4. 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 156
  5. 2020Adversarial Training for Large Neural Language Modelscited by 111
  6. 2019Improving Neural Language Modeling via Adversarial Trainingcited by 49
  7. 2024How does GPT-2 Predict Acronyms? Extracting and Understanding a Circuit via Mechanistic Interpretabilitycited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 2; 2025: 3; 2026: 8.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2024Breaking Down the Defenses: A Comparative Survey of Attacks on Large Language Models
  2. 2024Recent Advances in Attack and Defense Approaches of Large Language Models
  3. 2026Mechanistic Interpretability of LLM Jailbreaks via Internal Attribution Graphs
  4. 2024Exploring Vulnerabilities and Protections in Large Language Models: A Survey
  5. 2025Attack and defense techniques in large language models: A survey and new perspectives
  6. 2025AdversariaLLM: A Unified and Modular Toolbox for LLM Robustness Research
  7. 2025A Survey of Attacks on Large Language Models
  8. 2024Jailbreaking and Mitigation of Vulnerabilities in Large Language Models