Rule Based Rewards for Language Model Safety

Tong Mu, Alec Helyar, Johannes Heidecke, Joshua Achiam, Andrea Vallone, Ian Kivlichan, Molly Lin, Alex Beutel, John Schulman, Lilian Weng

arXiv:2411.01111 · 2026-07-27 공개 · arXiv · PDF

reinforcement-learning fine-tuning llm-safety human-feedback preference-modeling few-shot-prompts rule-based-rewards llm-grading

Abstract

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.

한국어 요약

한 줄 요약

Rule Based Rewards (RBR)는 AI 피드백을 활용해 언어 모델의 안전성을 향상시키는 새로운 강화 학습 기반 접근법으로, F1 점수 97.1을 달성했다.

핵심 기여도

핵심 아이디어

기존의 강화 학습 기반 안전성 훈련은 인간 피드백에 의존적이었으나, 이는 비용이 많이 들고 편향이 발생할 수 있었다. RBR은 AI 피드백을 활용해 인간 데이터의 양을 줄이고, 명확한 규칙 (예: "자해 관련 응답은 공감적 사과 포함")을 기반으로 보상을 직접 강화 학습에 통합한다. 이는 기존 AI 피드백 방법과 달리, 규칙을 RM 훈련에 distill하지 않고 RL 과정에서 직접 적용함으로써 보다 정밀한 제어와 높은 정확도를 달성한다. RBR은 LLM grader를 사용해 few-shot prompt를 기반으로 보상을 생성하며, 이는 "composable"한 방식으로 복잡한 행동도 커버할 수 있다.

기술적 접근법

주요 결과

의의 및 한계

RBR은 인간 피드백의 비용과 편향 문제를 해결하고, AI 피드백을 통해 보다 정밀하고 유연한 안전성 제어가 가능하다는 점에서 학술적·실용적 의의가 있다. 특히, 규칙 기반 보상을 RL 과정에 직접 적용함으로써 기존 RM 훈련 방식의 정보 손실을 방지하는 것이 혁신적이다. 그러나 RBR은 규칙이 명확히 정의되어야 하며, 모델의 변화나 사용 패턴의 진화에 따라 규칙을 업데이트해야 하는 한계가 있다. 또한, RBR은 인간 평가와의 일관성을 보장하기 위해 Gold set에서 높은 정확도 (Table 2)를 유지해야 하며, 이는 추가적인 데이터셋 관리가 필요하다.

실용적 활용

RBR은 대형 언어 모델의 안전성 훈련에 적용되어, 자해, 폭언, 성적 콘텐츠 등 민감한 주제에 대한 응답을 정밀하게 제어할 수 있다. 특히, 사용자 요구에 따라 정책을 유연하게 업데이트해야 하는 산업 (예: 챗봇, 고객 지원, 콘텐츠 필터링)에서 유용하게 활용될 수 있다.