arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.05102cs.CLcs.AIcs.LG
收藏

SparsePO:通过稀疏 Token 掩码控制大语言模型的偏好对齐

SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Masks

Huawei Noah’s Ark Lab(华为诺亚实验室);University College London(伦敦大学学院)

Fenia Christopoulou, Ronald Cardenas, Gerasimos Lampouras, Haitham Bou-Ammar, Jun Wang

AI总结:

SparsePO 提出了一种灵活的偏好优化目标,通过自动学习稀疏 token 掩码来动态加权 KL 散度和奖励,在摘要和对话场景中分别提升 +10% 和 +3% 胜率,同时保持模型推理和响应质量。

摘要:

直接对齐算法已被证明是使语言模型对齐人类期望行为的有效步骤。当前 Direct Preference Optimization 目标的变体集中于一种严格设定,即所有 token 都为损失函数贡献 KL 散度和奖励信号。然而,人类偏好并非受序列中每个词的同等影响,而是通常依赖于特定词或短语,例如毒性词汇的存在会导致非偏好响应。基于此观察,我们论证在 PO 过程中不应同等加权所有 token,并提出一种名为 SparsePO 的灵活目标,旨在自动学习在 PO 训练期间加权对应每个 token 的 KL 散度和奖励。我们提出了两种不同的权重掩码变体,它们既可以从参考模型本身推导,也可以在训练过程中动态学习。值得注意的是,我们的方法在学习的掩码中引入稀疏性,使模型能够学习如何在 token 级别最佳平衡奖励和 KL 散度贡献,从而学习最优的掩码稀疏水平。大量实验表明我们的方法在对齐偏好代理方面的有效性,包括情感控制、有益性和无害性以及摘要质量。我们的方法在摘要和对话场景中分别获得 +10% 和 +3% 的胜率百分点,同时不损害模型推理或摘要响应的相关性和忠实度。

英文摘要:

Direct alignment algorithms have proven an effective step for aligning language models to human-desired behaviors. Current variants of the Direct Preference Optimization objective have focused on a strict setting where all tokens are contributing signals of KL divergence and rewards to the loss function. However, human preference is not affected equally by each word in a sequence but is often dependent on specific words or phrases, e.g. existence of toxic terms leads to non-preferred responses. Based on this observation, we argue that not all tokens should be weighted equally during PO and propose a flexible objective termed SparsePO, that aims to automatically learn to weight the KL divergence and reward corresponding to each token during PO training. We propose two different variants of weight-masks that can either be derived from the reference model itself or learned on the fly. Notably, our method induces sparsity in the learned masks, allowing the model to learn how to best balance reward and KL divergence contributions at the token level, learning an optimal level of mask sparsity. Extensive experiments illustrate the effectiveness of our approach at aligning to preference proxies, including sentiment control, helpfulness and harmlessness, and summary quality. Our method obtains +10% and +3% win rate points in summarization and dialogue scenarios, respectively, without compromising model reasoning or the relevancy and faithfulness of the summary response.

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

↑