arXiv:2510.05703cs.LG2025-10

用双模型优化让大模型更安全,不需额外知识且内存更低。

Provably Convergent Primal-Dual DPO for Constrained LLM Alignment

  • 先用DPO训练奖励模型,再用重排拉格朗日目标微调主模型。
  • 仅需两模型训练,内存开销显著降低,性能超越现有方法。
  • 理论保证收敛性与约束满足,适合追求高效安全对齐的研究者。

大语言模型广泛应用带来安全性与约束需求,如减少有害内容、遵守预设规则。现有方法或需训练三模型导致高内存消耗,或依赖最优解先验知识。本文研究受约束的模型对齐问题:在输出奖励最大化的同时,确保成本低于阈值。提出一种新的原始-对偶直接偏好优化(Primal-Dual DPO)方法:首先用标准DPO在奖励偏好数据上训练一个模型以提供奖励信息;随后利用该奖励信息,采用重构的拉格朗日DPO目标对大模型进行微调。本方法仅需训练两个模型,显著节省内存,且无需额外先验知识。同时建立了严格的次优性和约束违反性保证,并扩展至支持在线探索,摆脱数据覆盖依赖。在PKU-SafeRLHF与TruthfulQA数据集上的实验表明,该方法达到当前最佳性能。

原文摘要 · Abstract (English)

The widespread application of large language models (LLMs) raises increasing demands on ensuring safety or imposing constraints, such as reducing harmful content and adhering to predefined rules. While there have been several works studying LLM safety alignment, these works either need to train three models and incur high memory costs, or require prior knowledge on the optimal solution. Witnessing this fact, we investigate the constrained alignment problem for LLMs, i.e., maximizing the reward of outputs while restricting the cost to stay below a threshold. We propose a novel primal-dual direct preference optimization (DPO) approach, which first trains a model using standard DPO on reward preference data to provide reward information, and then adopts a rearranged Lagrangian DPO objective utilizing the provided reward information to fine-tune LLMs. Our approach only needs to train two models rather than three, which significantly saves memory costs, and does not require extra prior knowledge. Moreover, we establish rigorous suboptimality and constraint violation guarantees. We also extend our approach to enable online exploration and drop the data coverage dependence in the results. Experiments on the PKU-SafeRLHF and TruthfulQA datasets demonstrate the state-of-the-art performance of our approach.

大模型对齐约束优化强化学习安全生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。