arXiv:2411.01111cs.AI2024-11NeurIPS被引 153

用规则+AI评分提升大模型安全响应,减少人类标注依赖。

Rule Based Rewards for Language Model Safety

论文配图:Rule Based Rewards for Language Model Safety
图 1 · 摘自论文原文
  • 基于规则和LLM评分生成细粒度奖励信号
  • F1得分97.1,优于人类反馈基线91.7
  • 规则可组合易更新,适合持续优化安全行为

基于强化学习的大语言模型微调在提升能力与安全行为方面已展现成效。但在安全相关任务中,若缺乏明确的人类指令,标注数据可能导致模型过度谨慎或产生评判性回应。此外,随着模型能力和使用模式变化,修改安全行为往往需要大量重标数据。本文提出一种新型偏好建模方法——规则奖励(Rule Based Rewards, RBR),仅需少量人类数据,结合一组关于期望/禁止行为的规则(如拒绝不应带有评判)及一个LLM评分器。与以往使用AI反馈的方法不同,RBR直接将由LLM评分的少样本提示作为强化学习中的奖励信号,实现更高控制力、准确性和可维护性。实验表明,RBR在安全行为检测上达到F1分数97.1,显著优于人类反馈基线的91.7,有效平衡了有用性与安全性。

原文摘要 · Abstract (English)

Reinforcement learning based fine-tuning of large language models (LLMs) on human preferences has been shown to enhance both their capabilities and safety behavior. However, in cases related to safety, without precise instructions to human annotators, the data collected may cause the model to become overly cautious, or to respond in an undesirable style, such as being judgmental. Additionally, as model capabilities and usage patterns evolve, there may be a costly need to add or relabel data to modify safety behavior. We propose a novel preference modeling approach that utilizes AI feedback and only requires a small amount of human data. Our method, Rule Based Rewards (RBR), uses a collection of rules for desired or undesired behaviors (e.g. refusals should not be judgmental) along with a LLM grader. In contrast to prior methods using AI feedback, our method uses fine-grained, composable, LLM-graded few-shot prompts as reward directly in RL training, resulting in greater control, accuracy and ease of updating. We show that RBRs are an effective training method, achieving an F1 score of 97.1, compared to a human-feedback baseline of 91.7, resulting in much higher safety-behavior accuracy through better balancing usefulness and safety.

大模型安全强化学习规则奖励

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