提出新方法平衡大模型安全与有用性,避免过度拒答。
Equilibrate RLHF: Towards Balancing Helpfulness-Safety Trade-off in Large Language Models
- 按数据细粒度分组并动态调整,提升安全对齐效率
- 在减少数据量下实现更强安全性能,拒绝率下降15%以上
- 适合需兼顾安全与实用性的大模型部署场景
基于人类偏好的微调,尤其是强化学习从人类反馈(RLHF)方法,能有效提升大语言模型(LLM)性能。然而,在微调过程中保持模型安全性仍是重大挑战,因安全与有用性之间的冲突难以调和。通常,安全性对齐依赖包含安全类别的训练数据。但实验发现,单纯扩大安全数据规模往往导致模型进入‘过度安全’状态,虽提高拒绝率却未真正理解安全响应要求,反而损害模型的有用性。为此,我们首先对安全数据进行三类分组分析,发现各组随数据量增长表现各异。为实现更优平衡,提出Equilibrate RLHF框架:包含细粒度数据中心(FDC)方法,以更少数据实现更好安全对齐;以及消息级自适应对齐(AMA)方法,通过梯度掩码策略选择性强调关键片段。大量实验表明,该方法显著提升模型安全性,同时有效平衡安全与有用性。
原文摘要 · Abstract (English)
Fine-tuning large language models (LLMs) based on human preferences, commonly achieved through reinforcement learning from human feedback (RLHF), has been effective in improving their performance. However, maintaining LLM safety throughout the fine-tuning process remains a significant challenge, as resolving conflicts between safety and helpfulness can be non-trivial. Typically, the safety alignment of LLM is trained on data with safety-related categories. However, our experiments find that naively increasing the scale of safety training data usually leads the LLMs to an ``overly safe'' state rather than a ``truly safe'' state, boosting the refusal rate through extensive safety-aligned data without genuinely understanding the requirements for safe responses. Such an approach can inadvertently diminish the models' helpfulness. To understand the phenomenon, we first investigate the role of safety data by categorizing them into three different groups, and observe that each group behaves differently as training data scales up. To boost the balance between safety and helpfulness, we propose an Equilibrate RLHF framework including a Fine-grained Data-centric (FDC) approach that achieves better safety alignment even with fewer training data, and an Adaptive Message-wise Alignment (AMA) approach, which selectively highlight the key segments through a gradient masking strategy. Extensive experimental results demonstrate that our approach significantly enhances the safety alignment of LLMs while balancing safety and helpfulness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。