arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.04757cs.AI
收藏

大语言模型的引导编辑何时应依赖输入?

When Should an LLM Steering Edit Depend on the Input?

Baillie Gifford Pandemic Science Hub(贝利吉福德疫情科学中心);Centre for Inflammation Research(炎症研究中心);The University of Edinburgh(爱丁堡大学)

Rachael Harkness, Konrad Rawlik

AI总结:

该研究提出输入依赖的大语言模型引导编辑方法,通过检索类别内最近k个状态的均值实现,在目标随类别内变化时优于固定方向引导,且可通过四个状态计算量确定适用场景。

摘要:

激活引导编辑应在目标随查询请求的类别内部变化且可在任何规则拟合或应用前测量时,才依赖输入。对比激活加法(CAA)为每个输入添加一个固定方向,即类别均值之差。将其条件设置为请求的类别,可解释所需位移的类别间变化,且不触及类别内变化,这是仅读取源状态的规则无法表达的。我们研究了增加引导编辑中输入依赖性的影响,从均值之差转向为每个查询检索目标——请求类别内与查询最近的k个存储状态的均值,其中两个基线为端点:当k等于类别大小时,检索规则即为类别条件下的均值之差。我们在六个替换语料库(编辑是否改变单词或子句)和一个外部基准上测量了输入依赖引导,发现当目标在类别内变化时,输入依赖引导优于固定方向引导。在两个模型的所有替换语料库的每一层,检索均获胜,且所需的输入依赖程度决定了如何应用:单词级编辑在网络前十分之一层从少量邻居处进行效果最佳,子句级编辑在任意深度从类别均值处进行效果最佳。当类别已确定答案时,类别均值足够,检索仅能与之匹配,尽管固定方向在此仍失效。仅从状态计算的四个量可确定应应用编辑的场景。

英文摘要:

An activation steering edit should depend on the input exactly when the destination varies \emph{inside} the class a query requests, and that is measurable before any rule is fitted or applied. Contrastive Activation Addition (CAA) adds one fixed direction to every input, the difference of the class means. Conditioning it on the requested class accounts for the between-class variation in the required displacement and leaves the within-class variation untouched, which no rule that reads only the source state can express. We study the impact of increasing input-dependence in the steering edit, moving from a difference of means to a destination retrieved per query --- the mean of the $k$ stored states nearest the query, inside the requested class --- in which the two baselines are endpoints: at $k$ equal to the class size the retrieved rule \emph{is} the class-conditional difference of means. We measure input-dependent steering on six substitution corpora that vary in whether the edit changes a word or a clause, and on an external benchmark, and find that input-dependent steering outperforms fixed-direction steering when the destination varies within the class. Retrieval wins at every layer of every substitution corpus in two models, and the level of input-dependence needed governs how to apply it: word-level edits are best made in the first tenth of the network from a few neighbours, clause-level edits at any depth from the class mean. Where the class already determines the answer the class mean suffices and retrieval only matches it, though a fixed direction still fails there. Four quantities computed from the states alone identify the regime in which the edit should be applied.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑