mlsanityData to 14 Oct 2026

The Mysterious Case of Neuron 1512: Injectable Realignment Architectures Reveal Internal Characteristics of Meta's Llama 2 Model

arXiv 2407.03621 ↗First posted 4 Jul 2024cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have an unrivaled and invaluable ability to "align" their output to a diverse range of human preferences, by mirroring them in the text they generate. The internal characteristics of such models, however, remain largely opaque. This work presents the Injectable Realignment Model (IRM) as a novel approach to language model interpretability and explainability. Inspired by earlier work on Neural Programming Interfaces, we construct and train a small network -- the IRM -- to induce emotion-based alignments within a 7B parameter LLM architecture. The IRM outputs are injected via layerwise addition at various points during the LLM's forward pass, thus modulating its behavior without changing the weights of the original model. This isolates the alignment behavior from the complex mechanisms of the transformer model. Analysis of the trained IRM's outputs reveals a curious pattern. Across more than 24 training runs and multiple alignment datasets, patterns of IRM activations align themselves in striations associated with a neuron's index within each transformer layer, rather than being associated with the layers themselves. Further, a single neuron index (1512) is strongly correlated with all tested alignments. This result, although initially counterintuitive, is directly attributable to design choices present within almost all commercially available transformer architectures, and highlights a potential weak point in Meta's pretrained Llama 2 models. It also demonstrates the value of the IRM architecture for language model analysis and interpretability. Our code and datasets are available at https://github.com/DRAGNLabs/injectable-alignment-model

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 37 references that are in the map. First posted on arXiv 4 Jul 2024.

Builds on

25 of 37 references.

References · 25

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  6. 2016Gaussian Error Linear Units (GELUs)cited by 3,502
  7. 2020GLU Variants Improve Transformercited by 1,804
  8. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  9. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  10. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  11. 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
  12. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
13 more
  1. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
  2. 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 243
  3. 2020Causal Mediation Analysis for Interpreting Neural NLP: The Case of Gender Biascited by 191
  4. 2023Linear Representations of Sentiment in Large Language Modelscited by 163
  5. 2023Summary of ChatGPT-Related Research and Perspective Towards the Future of Large Language Modelscited by 154
  6. 2017Learning to Generate Reviews and Discovering Sentimentcited by 148
  7. 2019The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectivescited by 139
  8. 2023Copy Suppression: Comprehensively Understanding an Attention Headcited by 76
  9. 2023Transformers are uninterpretable with myopic methods: a case study with bounded Dyck grammarscited by 30
  10. 2024Quantifying the Capabilities of LLMs across Scale and Precisioncited by 19
  11. 2022Explainable AI for Pre-Trained Code Models: What Do They Learn? When They Do Not Work?cited by 8
  12. 2023Proto-lm: A Prototypical Network-Based Framework for Built-in Interpretability in Large Language Modelscited by 7
  13. 2020Towards Neural Programming Interfacescited by 1

Built on by

Not cited yet.