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

在语言模型发言前引导它们:Logit 级别的干预

Steering Language Models Before They Speak: Logit-Level Interventions

Department of Computer Science, Yonsei University, Seoul, South Korea(延世大学计算机科学系,首尔,韩国)

Hyeseon An, Shinwoo Park, Hyundong Jin, Yo-Sub Han

AI总结:

提出 SWAI 方法,通过基于语料库的 token 统计在 logit 空间直接引导语言模型,无需训练或访问内部激活,在可读性、礼貌性和毒性控制上优于提示和基线方法。

摘要:

可控生成要求语言模型实现诸如阅读水平、礼貌性和毒性等输出特征。现有的引导方法通常间接、需要访问内部激活或依赖辅助训练模型。我们提出 SWAI,一种无需训练、推理时的方法,通过使用基于语料库的 token 统计直接在 logit 空间引导,解决了这些限制。SWAI 从标记语料库计算 z 归一化的一对多 log-odds 分数,并仅在模型的前 K 个候选集内偏向高分数 token,从而在保留上下文合理选择的同时允许控制偏向目标特征 token。在可读性、礼貌性和毒性控制方面,SWAI 在不修改模型参数、访问内部层或训练辅助模型的情况下,始终优于基于提示和先前的 logit 级别基线。选择性和查找表消融实验表明,增益来自目标特定的统计分数,而非通用 logit 扰动。这些结果表明,当 logit 干预在高概率候选下由目标特定统计引导时,有效的引导不需要学习控制器。

英文摘要:

Controllable generation requires language models to realize output characteristics such as reading level, politeness, and toxicity. Existing steering methods are often indirect, require access to internal activations, or depend on auxiliary trained models. We propose SWAI, a training-free inference-time method that addresses these limitations by steering directly in logit space using corpus-derived token statistics. SWAI computes z-normalized one-vs-rest log-odds scores from labeled corpora and biases high-scoring tokens only within the model's top-K candidate set, allowing control to favor target-characteristic tokens while preserving contextually plausible choices. Across readability, politeness, and toxicity control, SWAI consistently improves over prompt-based and prior logit-level baselines without modifying model parameters, accessing internal layers, or training an auxiliary model. Selectivity and lookup-table ablations show that the gains come from target-specific statistical scores rather than generic logit perturbation. These results indicate that effective steering does not require learned controllers when the logit intervention is guided by target-specific statistics under high-probability candidates.

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

↑