Language model accuracy drops from irrelevant prompt words
The Intrusion Pathway: How Non-Evidential Context Degrades Language Model Performance
Artificial Intelligence
Summary
Language models get worse at answering questions when their input includes unrelated or random words that don't help find the answer. The authors explain this happens because certain parts of the model, called intrusion heads, carry distracting information into the final answer step. They found that these intrusion heads interfere even though other parts of the model try to focus on relevant information. By either replacing or disabling these specific heads, the authors could significantly improve model performance despite the distracting words.
What this means in practice
- •For natural language engineers: Improve language model robustness by selectively disabling intrusion heads to reduce errors from irrelevant prompt content.
- •For ai platform operators: Enhance deployed models handling long or tool-augmented contexts by masking specific attention heads that degrade answers.
Authors
Dikshant Kukreja, Gautam Gupta, Avni Mittal, Avinash Anand, Kritarth Prasad, Zhengkui Wang, Timothy Liu, Rajiv Ratn Shah, Aik Beng Ng, Simon See, Erik Cambria
Abstract
Language models lose accuracy when a prompt contains non-evidential context: irrelevant statements from unrelated domains, or random off-distribution tokens, with no competing answer and no semantic overlap with the query. Such noise pervades retrieval-augmented, tool-using, and long-context deployments, yet the failure has lacked a mechanistic account. We trace the corruption to the Intrusion Pathway, which starts with MLPs enriching both query-subject and irrelevant-token representations, parroting heads carry prefix-token content to the prediction position, and relational readers largely avoid unrelated sources. Nevertheless, preserved subject enrichment and selective reading do not prevent intrusion in the broader computation. We then localize part of this interference to a sparse set of attention heads, which we call intrusion heads. Their prefix-derived writes promote distractor-related content, while their reduced support for the correct answer arises primarily from weaker non-prefix contributions rather than direct suppression by the prefix. The same heads transfer across tasks and distractor types and are largely weight-disjoint from the heads that integrate relevant contextual evidence, enabling a class-conditional intervention. Replacing the corrupted last-token residual with its clean counterpart, an oracle probe that requires a matched clean forward pass, recovers 97.6% on average of the distractor-induced drop across four downstream tasks. A deployable mask level knockout of about ten heads, roughly 1% of the model's attention heads, recovers 57% at bounded cost to helpful context.