From Relation-Specific Heads to Shared Interventions: Contextual Entrainment in Language Models
Abstract
Large language models rely on prompt context to perform in-context learning, follow formats, and adapt to local evidence. This ability, however, also raises a robustness concern: models may reuse irrelevant tokens from earlier context when answering a later query. Prior work identifies this behavior as contextual entrainment and finds attention heads whose ablation reduces it, arguing that these heads are largely task- or relation-specific. But are the mechanisms behind contextual entrainment truly isolated by relation, or do relation-conditioned searches recover reusable components shared across relations? Using factual-distractor relation-completion prompts across 19 lexical-semantic subtypes, we identify attention heads whose ablation reduces entrainment and test how the resulting head sets transfer recovery ability across exact relations, semantic families, and mixed relation distributions. Same-family transfer exceeds different-family transfer, family residuals weaken once globally shared heads are removed, and subtype-specific searches repeatedly rediscover many global heads. Clean-completion and context-use probes further suggest that this shared intervention can reduce harmful copying while preserving ordinary relation completion and simple in-context abilities. Our findings provide a more precise perspective on contextual entrainment and its mitigation: harmful context following is not best addressed by searching for isolated relation-specific circuits, but by using heterogeneous attack prompts to reveal reusable intervention targets whose effects are shaped by semantic relation structure.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- Accepted at AACL-IJCNLP 2026
Related papers
Contextual language representations link narrative processing to language and literacy in children
Shared title terminologycs.CLDongyi He, Tian Jiang, Nizhuan Wang et al.
ReCoPII: A Relation-Grounded Framework for Building Contextual PII Masking Datasets
Shared title terminologycs.CLTaehwan Lee
PRISM: Transfer and Limits of Activation Interventions in Tool-Calling Language Models
Shared title terminologycs.CLGiovana Kerche Bonás, Thales Sales Almeida, Marcelo da Silva Reis et al.
Share the Symbol, Not the Vector: Training-Free Fact Communication Across Language Models
Shared title terminologycs.CLXin Li, Mengbing Liu, Hao Jiang et al.
Evaluating Temporal Reasoning in Large Language Models: Event Temporal Relation Extraction with Allen's Interval Algebra, Logical Consistency, and Relative Time in Narratives
Shared title terminologycs.CLAdib Sakhawat, Fardeen Sadab, Tamjid Hasan Fahim et al.
Evaluating Ukrainian Grammatical Competence in Language Models: Probability Versus Prompting
Shared title terminologycs.CLDmytro Babarytskyi, Oleksandr Babarytskyi, Vadym Savanevych