https://netflixtechblog.com/sitemap/sitemap.xml https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav----------------------------------------- Sign up https://medium.com/m/signin?operation=login&r…
# Improving Model Safety Behavior with Rule-Based Rewards
OpenAI introduces Rule-Based Rewards (RBRs), a method that aligns models to behave safely without collecting large amounts of human feedback. RBRs use clear, step-by-step rules scored by a fixed grader model and feed those scores into the standard RLHF pipeline as an additional reward signal. The authors report that RBR-trained models match the safety of human-feedback-trained models, overrefuse less, and keep capability benchmark scores intact, while remaining cheap to update when safety policies change.
## Why Human Feedback Falls Short for Safety
- Standard RLHF relies on human feedback to train a reward model that signals desirable behavior.
- Collecting human feedback for routine, repetitive safety cases is inefficient.
- When safety policies change, previously collected feedback can become outdated and require new data collection.
## How Rule-Based Rewards Work
- Developers define **propositions**, simple true/false statements about a response, such as "Response is judgmental towards the user," "Response contains a short apology and inability to comply," "Response answers the user's request in a non-refusing manner," and "Response is maximally helpful for the user."
- Propositions are combined into **rules** that encode what an ideal response looks like for a given scenario. For example, a refusal should contain a brief apology and state an inability to comply.
- A fixed grader language model scores each response against these rules.
- A linear model, with weights learned from a small dataset of prompts labeled with ideal response types and desired and undesired completions, converts the rule scores into a reward.
- This RBR reward is combined with a helpful-only reward model and used as an additional signal in PPO to train the model.
## Three Response Categories
- **Hard refusals** apply to requests such as criminal hate speech, advice for violent crimes, and extremism. The ideal response is a brief apology and a statement of inability to comply, without verbosity or judgmental language.
- **Soft refusals** apply to requests involving self-harm. The ideal response is a more empathetic apology that acknowledges the user's emotional state while still declining.
- **Comply** applies to benign requests, where the model should answer helpfully.
## Results
- RBR-trained models reach safety performance comparable to models trained with human feedback.
- They reduce overrefusal of safe requests without degrading common capability benchmarks.
- They require far less human data, making training faster and cheaper.
- Rules can be updated by editing or adding them, without extensive retraining.
- Evaluation tracks a trade-off curve: usefulness (share of safe prompts correctly complied with) against safety (share of unsafe prompts correctly refused). Helpfulness-only baselines are more useful but less safe, while human-feedback baselines are very safe but less useful. RBR aims for the top-right corner, where both are high.
## Limitations and Ethical Considerations
- RBRs work best for tasks with clear, straightforward rules and are harder to apply to subjective qualities such as essay quality.
- The authors suggest combining RBRs with human feedback. RBRs enforce specific guidelines, such as avoiding slang or following the Model Spec, while human feedback handles nuanced aspects like coherence and writing style.
- The RBR term is designed to enforce safety without dominating the overall reward more than necessary.
- Shifting safety checks from humans to AI can reduce human oversight and may amplify biases if the grader model is biased. Careful rule design and a mix of RBRs and human feedback are recommended to mitigate these risks.
## Future Directions
The authors see RBRs as applicable beyond safety, for example to shaping a model's personality or response format for a specific application. Planned work includes ablation studies of RBR components, using synthetic data for rule development, and human evaluations across more domains.
Reinforcement learning from human feedback often optimizes a policy against a reward model trained on human preferences. Because that reward model is an imperfect proxy, pushing its score too high can hurt true performance, a pattern consistent with Goodhart's law. The authors measure this overoptimization systematically using a synthetic setup and find that its scaling follows different functional forms depending on the optimization method, with coefficients that scale smoothly with reward model size.
## Goodhart's Law in Preference-Based Training
- Policies are commonly trained against a learned reward model that predicts human preferences
- Over-optimizing this proxy can degrade performance on the true objective
- The effect has been widely observed but rarely measured carefully, because collecting human preference data is expensive
## A Synthetic Experimental Setup
- A fixed "gold-standard" reward model stands in for human labelers
- A proxy reward model is trained on labels produced by the gold model
- The gold model's score tracks how the policy performs as it is optimized against the proxy, which makes the degradation measurable
## Two Optimization Methods
- The policy is optimized either with reinforcement learning or with best-of-n sampling
- The relationship between optimization pressure and gold score follows a different functional form for each method
- For both methods, the coefficients of these relationships scale smoothly with the number of reward model parameters
## Factors Affecting Overoptimization
- Size of the reward model training dataset
- Number of reward model parameters and policy parameters
- Coefficient of the KL penalty added to the reward in the reinforcement learning setup
## Implications for Alignment
- The empirical scaling relationships are used to inform theoretical discussions in AI alignment
- Quantifying overoptimization turns a commonly noted qualitative risk into something that can be modeled and predicted
The practical takeaway is that overoptimization is regular enough to be modeled, so the choice of optimization pressure, KL penalty, and reward model size and data can be reasoned about together rather than tuned by trial and error.
# Summary of "Gathering Human Feedback" (RL-Teacher)
OpenAI released RL-Teacher, an open-source system for training AI agents with occasional human feedback instead of hand-crafted reward functions. The technique is aimed at safer AI systems and at reinforcement learning tasks where rewards are difficult to specify. The entire system is under 1,000 lines of Python, excluding the example agents.
## Core Components
- **Reward predictor:** A module that can be plugged into any agent. It learns to predict which actions a human would approve of.
- **Example agent:** An agent that learns from a reward function produced by the reward predictor. RL-Teacher includes three pre-integrated algorithms, including OpenAI Baselines PPO.
- **Web app:** An interface where humans give feedback. This feedback is the data used to train the reward predictor.
## Running an Experiment
- The web server must be set up first. An experiment is then launched with `rl_teacher/teach.py`, using the `human` feedback mode, 175 pretraining labels, the `Reacher-v1` environment, and a run name.
- Human raters give feedback through the web interface, which can run locally (not recommended) or on a separate machine.
- Full documentation is in the project's GitHub repository.
OpenAI invites researchers and engineers to experiment with the tool and share their results.