实体替换响应的跨提示复用

·

研究论文 · 2026/11/05

在模型权重固定的条件下,本文测量实体替换响应在英语事实性问题之间的迁移程度,超越答案是否改变。方法是将两个源问题的隐藏状态变化加到关于同一实体的目标问题上,在已知答案前缀的情况下,比较两个关系已发布答案的预测对数概率偏移与实测值。隐藏重用将对齐的变化注入目标剩余层之前的50%深度处;直接重用则添加源输出分数变化。使用其他关系源时,隐藏重用在0.5-1B Qwen和Llama上消除了45%和49%的无变化错误。Gemma-2-2B消除了22%,并在没有默认序列开始(BOS)令牌的纯文本中通过三项比较中的一项。后来恢复BOS的协议得到58-68%,在三个队列上通过所有比较。更大的检查点、聊天格式和新实体显示出复制以及格式或队列相关的失败。在小规模纯格式检查点上,其他关系隐藏重用主要重现了两个关系问题共享的偏移,而没有可靠地降低关系选择性错误。使用目标关系源时,隐藏重用相对于直接重用的后验优势在聊天格式外为0.2-0.9 nats,未经证实且非替换特异性。在两个问题的实体令牌处相同的关心中性变化比随机或其他替换变化更能降低关系选择性错误,表明接收问题依赖性。

该研究深入探究了实体替换响应在模型内部的迁移机制,揭示了隐藏状态重用在不同模型和格式下的效果差异,为理解大语言模型的事实性知识表示和迁移提供了新的实验证据和见解。

With model weights fixed, we measure how much of an entity-replacement response transfers between English factual questions, beyond whether answers change. We add the hidden-state change from two source questions to a target question about the same entity, comparing the predicted log-probability shift between two relations' published answers, given known answer prefixes, with the measured one. Hidden reuse injects the aligned change at 50% depth before the target's remaining layers; direct reuse adds source output-score changes. With other-relation sources, hidden reuse removes 45% and 49% of no-change error on 0.5-1B Qwen and Llama. Gemma-2-2B removes 22% and passes one of three comparisons in plain text without its default beginning-of-sequence (BOS) token. A later protocol restoring it yields 58-68%, passing every comparison on three cohorts. Larger checkpoints, chat format and new entities show replication and format- or cohort-dependent failures. On small plain-format checkpoints, other-relation hidden reuse mainly reproduces the shift both relations' questions share, without reliably lowering relation-selective error. With target-relation sources, hidden reuse's post hoc advantage over direct reuse is 0.2-0.9 nats outside chat format, unconfirmed and not replacement-specific. The same relation-neutral change at both questions' entity tokens lowers relation-selective error more than random or other-replacement changes, indicating receiving-question dependence.

阅读原文

参与讨论