通过稀疏标记掩码实现大模型偏好对齐的精细化控制
SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Masks
- 基于词元重要性差异,动态学习权重掩码以调节奖励与KL散度
- 在摘要和对话任务中分别提升10%和3%胜率,不损害推理能力
- 适合需要精准控制生成行为的应用场景,如内容安全与情感调控
直接对齐算法已被证明是将语言模型与人类期望行为对齐的有效手段。当前的直接偏好优化方法通常假设序列中所有词元对KL散度和奖励损失的贡献是均等的。然而,人类偏好往往并非受每个词元同等影响,而是由特定词语或短语决定(如毒性词汇的存在会引发非偏好响应)。基于此观察,我们提出一种灵活的目标函数SparsePO,旨在训练过程中自动学习每个词元对应的KL散度和奖励权重。该方法设计了两种不同的权重掩码:一种来自参考模型自身,另一种可在线学习。值得注意的是,所学掩码具有稀疏性,使模型能在词元层面学习最优的奖励与KL平衡策略。大量实验表明,该方法在情感控制、帮助性、无害性和摘要质量等偏好代理任务中均具有效性。在摘要和对话任务中分别获得+10%和+3%的胜率提升,且未牺牲模型推理能力、相关性与忠实性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。