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

直接对齐中的对数似然平均

Averaging log-likelihoods in direct alignment

Cohere

Nathan Grinsztajn, Yannis Flet-Berliac, Mohammad Gheshlaghi Azar, Florian Strub, Bill Wu, Eugene Choi, Chris Cremer, Arash Ahmadian, Yash Chandak, Olivier Pietquin, Matthieu Geist

AI总结:

针对直接对齐中因补全长度不同导致对数似然非长度不变的问题,引入新平均算子使损失内对数似然平均化,实现长度不变性,并实证揭示了生成长度与分数间的权衡。

摘要:

为了更好地使大型语言模型(LLMs)与人类判断对齐,基于人类反馈的强化学习(RLHF)会学习一个奖励模型,然后使用正则化RL对其进行优化。最近,引入了直接对齐方法,以直接从偏好数据集中学习此类微调模型,而无需计算代理奖励函数。这些方法建立在对比损失之上,该损失涉及根据训练模型得出的(非)偏好补全的对数似然。然而,补全具有不同的长度,且对数似然不是长度不变的。另一方面,监督训练中使用的交叉熵损失是长度不变的,因为批次通常是按token平均的。为了调和这些方法,我们引入了一种使直接对齐具有长度不变性的原则性方法。在形式上,我们引入了一个新的平均算子,它与给出底层RL问题最优策略的最优性算子组合。这转化为在损失内对对数似然进行平均。我们实证研究了这种平均的效果,观察到了生成长度与其分数之间的权衡。

英文摘要:

To better align Large Language Models (LLMs) with human judgment, Reinforcement Learning from Human Feedback (RLHF) learns a reward model and then optimizes it using regularized RL. Recently, direct alignment methods were introduced to learn such a fine-tuned model directly from a preference dataset without computing a proxy reward function. These methods are built upon contrastive losses involving the log-likelihood of (dis)preferred completions according to the trained model. However, completions have various lengths, and the log-likelihood is not length-invariant. On the other side, the cross-entropy loss used in supervised training is length-invariant, as batches are typically averaged token-wise. To reconcile these approaches, we introduce a principled approach for making direct alignment length-invariant. Formally, we introduce a new averaging operator, to be composed with the optimality operator giving the best policy for the underlying RL problem. It translates into averaging the log-likelihood within the loss. We empirically study the effect of such averaging, observing a trade-off between the length of generations and their scores.

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

↑