让大模型学会安全协作,减少有害输出和过度拒绝。
The Alignment Waltz: Jointly Training Agents to Collaborate for Safety
- 用双智能体强化学习协同训练,一个提建议,一个改进回复。
- 在多个数据集上,有害内容从39%降至4.6%,过度拒绝从45.3%降至9.9%。
- 适合关注模型安全性与可用性平衡的研究者和工程师。
利用大语言模型需在有用性和无害性间取得微妙平衡。当前方法常采用全拒策略,虽避免风险但加剧过度拒绝,且缺乏对拒绝查询的指导。为此,我们提出WaltzRL——一种多智能体强化学习框架,将安全对齐建模为合作型正和博弈。该框架联合训练对话智能体与反馈智能体,后者被激励提供有助于提升安全性和有用性的建议。核心是动态改进奖励(DIR),根据对话智能体采纳反馈的程度动态调整。推理时,不直接丢弃不安全或过度拒绝的回复,而是通过反馈智能体进行优化。反馈智能体仅在需要时激活,确保安全查询的高效响应。在五个不同数据集上的实验表明,相较于多种基线,WaltzRL显著降低有害响应(如在WildJailbreak上从39.0%降至4.6%)和过度拒绝(在OR-Bench上从45.3%降至9.9%)。通过双智能体共进化与自适应反馈,WaltzRL在不损害通用能力的前提下提升了安全性,推动了有用性与无害性之间的帕累托前沿。
原文摘要 · Abstract (English)
Harnessing the power of LLMs requires a delicate dance between being helpful and harmless. This creates a fundamental tension between two competing challenges: vulnerability to adversarial attacks that elicit unsafe content, and a tendency for overrefusal on benign but sensitive prompts. Current approaches often navigate this dance with safeguard models that completely reject any content that contains unsafe portions. This approach cuts the music entirely-it may exacerbate overrefusals and fails to provide nuanced guidance for queries it refuses. To teach models a more coordinated choreography, we propose WaltzRL, a novel multi-agent reinforcement learning framework that formulates safety alignment as a collaborative, positive-sum game. WaltzRL jointly trains a conversation agent and a feedback agent, where the latter is incentivized to provide useful suggestions that improve the safety and helpfulness of the conversation agent's responses. At the core of WaltzRL is a Dynamic Improvement Reward (DIR) that evolves over time based on how well the conversation agent incorporates the feedback. At inference time, unsafe or overrefusing responses from the conversation agent are improved rather than discarded. The feedback agent is deployed together with the conversation agent and only engages adaptively when needed, preserving helpfulness and low latency on safe queries. Our experiments, conducted across five diverse datasets, demonstrate that WaltzRL significantly reduces both unsafe responses (e.g., from 39.0% to 4.6% on WildJailbreak) and overrefusals (from 45.3% to 9.9% on OR-Bench) compared to various baselines. By enabling the conversation and feedback agents to co-evolve and adaptively apply feedback, WaltzRL enhances LLM safety without degrading general capabilities, thereby advancing the Pareto front between helpfulness and harmlessness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。