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

前缀在推理模型微调中起什么作用?

How Does Prefix Matter in Reasoning Model Tuning?

Mohamed bin Zayed University of Artificial Intelligence(莫莫德·本·扎耶德人工智能大学);Indian Institute of Technology Delhi(印度德里理工学院);INSAIT

Raj Vardhan Tomar, Preslav Nakov, Yuxia Wang

AI总结:

本研究探讨前缀在推理模型微调中的作用,发现其能提升安全性和推理性能,但对事实性和编程任务效果有限。

摘要:

最近的对齐研究通常从监督微调(SFT)数据集中移除介绍性套话短语。本研究挑战这一假设。我们假设以安全和推理为导向的前缀句子充当轻量级对齐信号,可以引导模型解码朝着更安全和更连贯的响应发展。为此,我们对三个R1系列模型进行了微调,考察了三个核心模型能力:推理(数学、编程)、安全性和事实性,系统地变化前缀包含比例从0%到100%。结果表明,带有前缀的SFT同时提高了安全性和推理性能,使在对抗性基准(WildJailbreak、StrongReject)上的Safe@1准确性提高了高达6%,在GSM8K推理上提高了7%。然而,事实性和编程任务显示微小或负面效果,表明前缀引起的搜索空间缩小有利于结构化推理。令牌级损失分析进一步揭示,如“修订”和“逻辑”等前缀令牌会引发更高的梯度幅度,充当对齐锚点,稳定推理轨迹。我们的发现表明,前缀条件提供了一种可扩展且可解释的机制,用于提高推理安全性,充当一种补充传统奖励方法的隐含对齐形式。

英文摘要:

Recent alignment studies commonly remove introductory boilerplate phrases from supervised fine-tuning (SFT) datasets. This work challenges that assumption. We hypothesize that safety- and reasoning-oriented prefix sentences serve as lightweight alignment signals that can guide model decoding toward safer and more coherent responses. To examine this, we fine-tune three R1 series models across three core model capabilities: reasoning (mathematics, coding), safety, and factuality, systematically varying prefix inclusion from 0% to 100%. Results show that prefix-conditioned SFT improves both safety and reasoning performance, yielding up to +6% higher Safe@1 accuracy on adversarial benchmarks (WildJailbreak, StrongReject) and +7% improvement on GSM8K reasoning. However, factuality and coding tasks show marginal or negative effects, indicating that prefix-induced narrowing of the search space benefits structured reasoning. Token-level loss analysis further reveals that prefix tokens such as "revised" and "logically" incur higher gradient magnitudes, acting as alignment anchors that stabilize reasoning trajectories. Our findings suggest that prefix conditioning offers a scalable and interpretable mechanism for improving reasoning safety, serving as an implicit form of alignment that complements traditional reward-based methods.

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

↑