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

为什么RLHF对齐是浅层的?一种梯度分析

Why Is RLHF Alignment Shallow? A Gradient Analysis

Department of Computer Science and Technology University of Cambridge(计算机科学与技术系剑桥大学)

Robin Young

AI总结:

本文通过梯度分析揭示RLHF对齐浅层的原因,提出有害信息概念并设计新的目标以实现深层对齐。

摘要:

为什么大语言模型中的安全对齐是浅层的?我们证明基于梯度的对齐本质上集中在决定有害性的位置,并在之后消失。利用序列层面有害性的鞅分解,我们推导出对齐梯度的确切特征。位置t处的梯度等于条件期望有害性与得分函数之间的协方差。这表明,在输出的有害性已经确定的位置之后,训练期间会接收到零梯度信号。这解释了经验观察到对齐模型与基础模型之间的KL散度集中在早期token上。因此,无论优化质量如何,标准对齐目标都无法产生深层对齐。我们引入了有害信息I_t的概念,该概念量化了每个位置对有害性的影响,并证明了平衡KL散度跟踪这一数量。最后,我们推导出一个基于恢复惩罚的目标,该目标在所有位置上产生梯度信号,为经验上成功的数据增强技术提供了理论基础。

英文摘要:

Why is safety alignment in LLMs shallow? We prove that gradient-based alignment inherently concentrates on positions where harm is decided and vanishes beyond. Using a martingale decomposition of sequence-level harm, we derive an exact characterization of alignment gradients. The gradient at position $t$ equals the covariance between the conditional expected harm and the score function. This implies that positions beyond the harm horizon where the output's harmfulness is already determined receive zero gradient signal during training. This explains empirical observations that KL divergence between aligned and base models concentrates on early tokens. Consequently, standard alignment objectives cannot produce deep alignment, regardless of optimization quality. We introduce the concept of harm information $I_t$, which quantifies each position's influence on harm, and prove that equilibrium KL divergence tracks this quantity. Finally, we derive an objective based on recovery penalties that creates gradient signal at all positions, providing theoretical grounding for empirically successful data augmentation techniques.

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

↑