arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

测试再路由:语言模型如何跨模型和语言执行上下文条件规则

Test, then Route: How Language Models Execute In-Context Conditional Rules Across Models and Languages

Luxshan Thavarasa, Sivasuthan Sukumar

arXiv 2608.04183首次发表:更新:

发表机构

University of Moratuwa(莫拉图瓦大学)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

该研究通过四捐赠者设计的激活修补实验,在三个开源模型、六种语言中揭示:中间层残差带承载谓词真值,路由模块无抽象性,测试具模块化而路由不具。

AI 中文摘要

当语言模型遵循“如果P(x)则A否则B”这类上下文条件规则时,是否会组装出一个运行时回路,其中一个模块测试谓词,另一个模块路由答案?我们采用四捐赠者设计,通过激活修补技术探究这一问题:两个规则交换捐赠者会使条件和答案词产生分歧,因此每一层都能揭示它携带的是哪一个信息。我们在两个系列的三个开源模型、以及共享一个固定词库的六种语言上开展实验,结果显示:中间层残差带承载了谓词的真值,对其进行修补会以近1.0的概率翻转谓词结果、以近0.0的概率翻转映射,实现了严格预先指定的隔离标准,在18个测试单元中满足了17个,且该定位在五个谓词类别中均成立;而路由模块则呈现相反的特征。一个学习子空间能在训练过的配对中近乎完美地翻转A和B,但在新配对中所有模型的转移概率均约为0;仅在跨语言探测的Gemma-3-4B模型中,该子空间在其他语言的相同配对上转移概率约为0.98。在所有探测中,路由方向具有token绑定性且不可转移(在Gemma中主要为答案读出,在Qwen中为配对特异性),而非抽象路由模块;测试是模块化的,但在这些探测下路由并非模块化。

英文摘要

When a language model follows an in-context conditional rule such as "if P(x) then A else B," does it assemble a runtime circuit with one module that tests the predicate and another that routes the answer? We probe this with activation patching under a four-donor design whose two swapped-rule donors make the condition and the answer word disagree, so each layer reveals which of the two it carries. Across three open models from two families and six languages sharing one fixed item bank, a mid-stack residual band carries the predicate's truth value: patching it reroutes the answer with predicate-outcome flip near 1.0 and mapping flip near 0.0, meeting a strict pre-specified isolation criterion in 17 of 18 cells, and the same localization holds across five predicate families. The router shows the opposite profile. A learned subspace flips A and B near-perfectly within the trained pair yet transfers to a new pair at approximately 0 in every model, while in Gemma-3-4B (the only model probed cross-lingually) it transfers at approximately 0.98 to the same pair in other languages. Under every probe we ran, the router direction is token-bound and non-transferable (largely answer-readout in Gemma, pair-specific in Qwen) rather than an abstract routing module. Test is modular; under these probes, route is not.

Comments19 pages, 16 figures. Code and data: https://github.com/Luxshan2000/icl-conditional-circuits

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑