arXiv:cs.CL· Sovesh Mohapatra, Dani S Bassett·· 11 小时前
任务上下文如何塑造语言模型内部组件的角色
Task Context Shapes Component Roles in Language Models
AI 导读
研究用相同图事实对比不同任务下语言模型的固定组件,发现任务变化会重新分配五个开源权重模型(覆盖四个模型族、1.5-14B 参数)中注意力头的影响力。在 Gemma-2-9B 和 Qwen3-14B 中,一次激活编辑即可在指令不变时改变模型读取的事实。针对独立事实干预,对应条件的线性响应图相比两图平均将预测均方误差在 Gemma 中降低 53.6%、在 Qwen 中降低 5.0%。
正文
Abstract:Large language models reuse the same attention heads across tasks, but identifying these shared heads does not explain what they do differently in each task. A natural source of inspiration is task-dependent interactions among shared brain regions, which motivate a network view of language-model computation. Here, we compare fixed model components across tasks using identical graph facts, statements specifying which directed connections are present. We measure how interventions affect attention heads and the activation state in later layers (influence), as well as the answer (importance). Task changes redistribute the influence in five open-weight models spanning four families and 1.5-14 billion parameters. In Gemma-2-9B and Qwen3-14B, an activation edit changes an early internal activation vector and switches which fact the model reads while the written instruction stays fixed. The same heads then respond to different graph facts and influence later components differently. For each prompt, we construct two linear response maps, one before the edit and one after it. Each map predicts a later head's response from a measured change in an earlier head. For a separate factual intervention, the map for the corresponding condition reduces mean squared prediction error by 53.6% in Gemma and 5.0% in Qwen compared with the average of the two maps. These findings show that task context changes both which graph facts the shared components respond to and how their outputs affect later computation. A network account may help explain how models use shared parameters to perform different computations. Measurements of task-dependent influence could also guide interventions intended to alter one behavior while preserving others.
| Comments: | 9 pages, 5 Figs |
| Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.13895 [cs.CL] |
| (or arXiv:2610.13895v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.13895 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Sovesh Mohapatra [view email]
[v1]
Fri, 9 Oct 2026 17:40:53 UTC (5,040 KB)
来源:arXiv:cs.CL · arxiv.org