动态调整奖励,让大模型更安全且高效对齐。
Inverse Reinforcement Learning with Dynamic Reward Scaling for LLM Alignment
- 用逆强化学习构建分类型安全奖励模型,解决数据不均衡问题。
- 根据任务难度、文本难易度和模型响应差异动态调奖,提升优化效率。
- 在多个基准上超越现有方法,适合需要高安全性的模型部署场景。
大语言模型的安全对齐至关重要。现有方法或基于奖励(在偏好对上训练奖励模型并用强化学习优化),或无奖励(直接在排序输出上微调)。近期研究显示,经过调优的奖励式流程仍最稳健,单次响应示范可优于成对偏好数据。但仍有两大挑战:(1)安全数据集失衡,常见危害过载而忽视长尾威胁;(2)奖励模型静态,忽略任务难度,限制优化效率与性能上限。为此,我们提出DR-IRL,通过逆强化学习实现动态奖励调节。首先使用涵盖七类有害内容的平衡安全数据集,通过IRL训练类别特异性奖励模型;随后在组相对策略优化(GRPO)中引入动态奖励缩放:依据任务难度、文本编码器余弦相似度衡量的数据级难易度,以及奖励差距反映的模型级响应性进行奖励调整。跨多种基准与大模型的大量实验表明,DR-IRL在安全对齐上全面优于所有基线方法,同时保持模型有用性。
原文摘要 · Abstract (English)
Alignment is vital for safely deploying large language models (LLMs). Existing techniques are either reward-based (training a reward model on preference pairs and optimizing with reinforcement learning) or reward-free (directly fine-tuning on ranked outputs). Recent research shows that well-tuned reward-based pipelines remain the most robust, and single-response demonstrations can outperform pairwise preference data. However, there still exist two key challenges: (1) imbalanced safety datasets that overrepresent common hazards while neglecting long-tail threats; and (2) static reward models that ignore task difficulty, limiting optimization efficiency and attainable gains. To address these limitations, we propose DR-IRL, which Dynamically adjusts Rewards through Inverse Reinforcement Learning. We first train category-specific reward models using a balanced safety dataset of seven harmful categories as demonstration via IRL. Then we enhance Group Relative Policy Optimization (GRPO) by introducing dynamic reward scaling: adjusting rewards by task difficulty, data-level hardness by text encoder cosine similarity, and model-level responsiveness by reward gaps. Extensive experiments across various benchmarks and LLMs demonstrate that DR-IRL outperforms all baseline methods in safety alignment while maintaining usefulness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。