arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.03867cs.LG
收藏

转向何处:输入依赖的层选择用于转向以改进LLM对齐

Where to Steer: Input-Dependent Layer Selection for Steering Improves LLM Alignment

University of Washington(华盛顿大学)

Soham Gadgil, Chris Lin, Su-In Lee

AI总结:

本文提出W2S框架,通过输入依赖的层选择改进LLM对齐,证明固定层方法不足,展示适应性层选择的重要性。

摘要:

转向向量已成为一种轻量且有效的对齐大型语言模型(LLM)的方法,通过在推理时将LLM表示向目标行为偏移来调节模型行为。然而,现有方法通常在固定层应用转向向量,隐含假设最优干预层在不同输入中不变。我们论证这种假设本质上受限,因为与目标行为相关的表示可能在不同层编码。理论上,我们证明不同输入可能需要在不同层进行转向以实现与理想模型行为的对齐。我们还提供了实证证据,表明最优转向层在实践中因输入而异。受这些观察启发,我们引入Where to Steer(W2S)框架,通过学习从输入嵌入到最优转向层的映射,适应性地选择干预层。在多个LLM和对齐行为上,W2S在分布内和分布外设置均优于固定层基线。我们的发现强调了LLM对齐中输入依赖控制的重要性,并展示了适应性层选择是当前转向向量方法中缺失的关键设计维度。

英文摘要:

Steering vectors have emerged as a lightweight and effective approach for aligning large language models (LLMs) at inference time, enabling modulation of model behaviors by shifting intermediate representations toward a target behavior. Many existing steering methods apply interventions at globally fixed locations in an LLM, effectively treating the optimal intervention location as input-invariant. However, representations relevant to a target behavior can be encoded at different LLM layers depending on the input. Theoretically, we show that different inputs may require steering at different layers to achieve alignment with a given behavior. Empirically, we observe that the most effective layer for steering varies substantially between inputs. Motivated by these observations, we introduce \textit{Where to Steer} (W2S), a general framework that adaptively selects intervention layers conditioned on the inputs by learning a mapping from input representations to steering layers. Across multiple LLMs and alignment behaviors, W2S consistently outperforms fixed-layer baselines in both in-distribution and out-of-distribution settings. Our findings suggest that input-dependent layer selection is a key design dimension complementary to methods for steering vector extraction.

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

↑