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

带有显式奖励的语言模型噪声对比对齐

Noise Contrastive Alignment of Language Models with Explicit Rewards

Tsinghua University(清华大学);Zhongguancun Laboratory(中关村实验室)

Huayu Chen, Guande He, Lifan Yuan, Ganqu Cui, Hang Su, Jun Zhu

AI总结:

该研究提出基于噪声对比估计的通用语言模型对齐框架NCA与InfoNCA,可处理显式奖励数据与偏好数据,证明DPO是InfoNCA的特例,并通过实验验证其在多任务上的性能优势。

摘要:

用户意图通常被形式化为评估奖励,在微调语言模型(LM)时需要最大化该奖励。现有的对齐方法,如直接偏好优化(DPO),主要针对成对偏好数据设计,这类数据中的奖励是隐式定义的,而非显式给出的。本文提出了一种通用的语言模型对齐框架,利用噪声对比估计(NCE)填补了处理带有标量评估显式标注的奖励数据集的空白。该框架包含两种并行算法:NCA(噪声对比对齐)和InfoNCA,二者都能从奖励数据和偏好数据中直接提取语言模型策略。值得注意的是,我们证明DPO损失是本文提出的InfoNCA目标在成对偏好设置下的一个特例,从而整合并拓展了当前的对齐理论。通过对比NCA和InfoNCA,我们发现DPO/InfoNCA普遍存在的似然下降趋势,源于其侧重于调整不同响应间的相对似然。相比之下,NCA优化每个响应的绝对似然,从而有效防止选中响应的似然下降。我们使用Mistral-8*7B和7B模型,在奖励设置和偏好设置下评估了所提方法。实验表明,当存在奖励数据集时,InfoNCA/NCA优于多种偏好基线方法。我们还发现,在数学、编程等复杂推理任务中,NCA的表现显著优于DPO。

英文摘要:

User intentions are typically formalized as evaluation rewards to be maximized when fine-tuning language models (LMs). Existing alignment methods, such as Direct Preference Optimization (DPO), are mainly tailored for pairwise preference data where rewards are implicitly defined rather than explicitly given. In this paper, we introduce a general framework for LM alignment, leveraging Noise Contrastive Estimation (NCE) to bridge the gap in handling reward datasets explicitly annotated with scalar evaluations. Our framework comprises two parallel algorithms, NCA and InfoNCA, both enabling the direct extraction of an LM policy from reward data as well as preference data. Notably, we show that the DPO loss is a special case of our proposed InfoNCA objective under pairwise preference settings, thereby integrating and extending current alignment theories. By comparing NCA and InfoNCA, we demonstrate that the well-observed decreasing-likelihood trend of DPO/InfoNCA is caused by their focus on adjusting relative likelihood across different responses. In contrast, NCA optimizes the absolute likelihood for each response, thereby effectively preventing the chosen likelihood from decreasing. We evaluate our methods in both reward and preference settings with Mistral-8*7B and 7B models. Experiments suggest that InfoNCA/NCA surpasses various preference baselines when reward datasets are available. We also find NCA significantly outperforms DPO in complex reasoning tasks like math and coding.

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

↑