Interpreting Negation in GPT-2: Layer- and Head-Level Causal Analysis
Not on the map. Why?
Abstract (arXiv)
Negation remains a persistent challenge for modern language models, often causing reversed meanings or factual errors. In this work, we conduct a causal analysis of how GPT-2 Small internally processes such linguistic transformations. We examine its hidden representations at both the layer and head level. Our analysis is based on a self-curated 12,000-pair dataset of matched affirmative and negated sentences, covering multiple linguistic templates and forms of negation. To quantify this behavior, we define a metric, the Negation Effect Score (NES), which measures the model's sensitivity in distinguishing between affirmative statements and their negations. We carried out two key interventions to probe causal structure. In activation patching, internal activations from affirmative sentences were inserted into their negated counterparts to see how meaning shifted. In ablation, specific attention heads were temporarily disabled to observe how logical polarity changed. Together, these steps revealed how negation signals move and evolve through GPT-2's layers. Our findings indicate that this capability is not widespread; instead, it is highly concentrated within a limited number of mid-layer attention heads, primarily within layers 4 to 6. Ablating these specific components directly disrupts the model's negation sensitivity: on our in-domain, ablation increased NES (indicating weaker negation sensitivity), and re-introducing cached affirmative activations (rescue) increased NES further, confirming that these heads carry affirmative signal rather than restoring baseline behavior. On xNot360, ablation slightly decreased NES and rescue restored performance above baseline. This pattern demonstrates that these causal patterns are consistent across various negation forms and remain detectable on the external xNot360 benchmark, though with smaller magnitude.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 17 references that are in the map. First posted on arXiv 12 Mar 2026.
Builds on
11 of 17 references.
References · 11
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,046
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2019Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Flycited by 240
- 2024How to use and interpret activation patchingcited by 191
- 2023Language models are not naysayers: An analysis of language models on negation benchmarkscited by 73
- 2022An Analysis of Negation in Natural Language Understanding Corporacited by 39
- 2023A negation detection assessment of GPTs: analysis with the xNot360 datasetcited by 10
Built on by
Not cited yet.