From Relation-Specific Heads to Shared Interventions: Contextual Entrainment in Language Models
作者: Jinghan Zheng, Jiajun Shi
分类: cs.CL, cs.AI
发布日期: 2026-10-13
备注: Accepted at AACL-IJCNLP 2026
💡 一句话要点
提出共享干预机制以解决语言模型的上下文依赖问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 语言模型 上下文依赖 注意力机制 关系完成 语义家族 鲁棒性 共享干预 上下文学习
📋 核心要点
- 现有研究表明,语言模型在处理上下文时可能会重用无关的标记,导致上下文依赖性问题。
- 本文提出通过消融特定的注意力头来减少上下文依赖,并探索这些头在不同关系和语义家族中的共享特性。
- 实验结果显示,同家族的迁移能力优于不同家族,且消融共享头后,模型的上下文使用能力得以改善。
📝 摘要(中文)
大型语言模型依赖于提示上下文进行上下文学习、遵循格式和适应局部证据。然而,这种能力也引发了鲁棒性问题:模型可能在回答后续查询时重用早期上下文中的无关标记。本文通过对19种词汇语义子类型的事实干扰关系完成提示进行研究,识别出消融注意力头可以减少上下文依赖,并测试这些头集在不同关系、语义家族和混合关系分布中的恢复能力。研究发现,同家族的迁移优于不同家族的迁移,全球共享头的移除会削弱家族残余,子类型特定搜索反复发现许多全球头。清晰完成和上下文使用探针进一步表明,这种共享干预可以减少有害的复制,同时保留普通的关系完成和简单的上下文能力。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在上下文学习中出现的上下文依赖性问题,现有方法未能有效识别和消除无关上下文的影响。
核心思路:通过识别和消融特定的注意力头,研究其在不同关系和语义家族中的共享特性,从而减少上下文依赖。
技术框架:整体架构包括对19种词汇语义子类型的关系完成提示进行实验,识别出影响上下文依赖的注意力头,并测试其在不同条件下的恢复能力。
关键创新:本文的创新在于提出共享干预机制,强调上下文依赖的解决不应仅依赖于关系特定的电路,而应通过异构攻击提示揭示可重用的干预目标。
关键设计:在实验中,采用了消融实验设计,使用清晰完成和上下文使用探针来评估模型性能,并关注注意力头的选择和消融策略。
🖼️ 关键图片
📊 实验亮点
实验结果表明,消融特定的注意力头可以显著减少上下文依赖,且同家族的迁移能力优于不同家族,具体性能提升幅度未明确给出。清晰完成和上下文使用探针的结果显示,模型在保留普通关系完成能力的同时,减少了有害的上下文复制现象。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理中的文本生成、问答系统和对话系统等。通过改进语言模型的上下文处理能力,可以提升模型在实际应用中的鲁棒性和准确性,未来可能对智能助手和自动化内容生成等领域产生深远影响。
📄 摘要(原文)
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.