Designing reward functions for reinforcement learning (RL) is notoriously difficult. If you’ve ever tried to train an agent, you know the "reward engineering" loop: you write a function, the agent finds a loophole (reward hacking), and you start over. While researchers have moved toward learning rewards from human feedback, most systems rely on binary preferences—asking a human, "Do you like A or B better?"
A new paper, "Reward Learning through Ranking Mean Squared Error," argues that we are leaving a lot of information on the table. By switching from binary preferences to ordinal ratings (e.g., "bad," "neutral," "good"), the authors introduce a method called Ranked Return Regression (R4) that is more efficient, theoretically grounded, and easier for humans to use.
TL;DR
R4 is a new framework that learns reward functions from discrete human ratings using a novel "ranking mean squared error" loss. By treating ratings as ordinal ranks rather than categorical labels, R4 provides formal theoretical guarantees and consistently outperforms existing preference-based and rating-based methods on complex robotic tasks.
What Problem Does This Paper Address?
The "reward design bottleneck" is a major hurdle in RL. To solve it, many use Preference-based RL (PbRL), where humans compare pairs of trajectories. However, binary preferences are "low bandwidth"—each comparison provides only a single bit of information. Furthermore, preferences are purely relative; they don't tell you if both options are terrible or if one is significantly better than the other.
Recent Rating-based RL (RbRL) methods allow humans to assign scores (like 1–5 stars), but these have struggled with two issues:
- Hyperparameter Sensitivity: They often require pre-defined "bin boundaries" for what constitutes a specific rating.
- Intra-class Diversity: They tend to force all trajectories with the same rating to have the exact same predicted return, ignoring the natural variation within a "good" or "bad" category.
Methods
The core innovation is the Ranked Return Regression (R4) algorithm and its associated ranking Mean Squared Error (rMSE) loss.
Instead of treating a rating of "2" as a fixed numerical target or a categorical label, R4 treats it as a rank. Here is how the training loop works:
- Sampling: The system pulls one trajectory from each rating class (e.g., one "bad," one "neutral," one "good").
- Prediction: The reward model predicts the total return for each.
- Differentiable Sorting: These predicted returns are passed through a "soft" sorting operator. This turns the raw predictions into continuous "soft ranks."
- Optimization: The rMSE loss minimizes the difference between these soft ranks and the actual human-provided ratings.
Because the sorting is differentiable, gradients can flow back through the ranking operation to update the reward model. This allows the model to learn the order of quality without being forced into arbitrary numerical bins.
Datasets
The authors evaluated R4 across several high-standard benchmarks:
- Simulated Feedback: Robotic locomotion tasks from OpenAI Gym (Reacher, Inverted Double Pendulum, Half Cheetah) and the DeepMind Control Suite (Walker, Cheetah, Quadruped, Humanoid).
- Human Feedback: An ethics-approved user study involving 8 participants rating trajectories in the Reacher and Hopper environments.
- Open-Source Contribution: The authors have released the human-rated dataset to help the community study the noise and biases inherent in real-world human supervision.
Key Insights and Ideas
- Ordinality over Classification: The "aha moment" here is that ratings are inherently ordinal. A "4" is better than a "3," but not necessarily twice as good as a "2." By using a ranking loss, R4 respects this structure without needing to know the "true" underlying reward scale.
- Theoretical Completeness: The authors prove that the rMSE solution set is "minimal and complete." This means it captures all reward functions that satisfy the human's rankings without adding unnecessary constraints that could lead to poor performance.
- Robustness to Human Variability: In the user study, participants used wildly different scales (some used 4 rating classes, others used 12). R4 handled this heterogeneity gracefully, whereas previous methods (RbRL) often failed when the number of bins didn't match their internal settings.
- Dynamic Recalibration: R4 supports "response shift." As an agent gets better, a human might start grading more harshly (what was "good" yesterday is "neutral" today). R4’s ranking approach naturally adapts to these shifting standards.
Key Results
- Superior Performance: In online experiments, R4 learned significantly faster and achieved higher final returns than state-of-the-art preference-based methods like PEBBLE and SURF.
- Noise Resilience: R4 is remarkably robust. In stress tests, R4 trained with 80% noisy labels performed as well as the baseline RbRL method with only 10% noise.
- Human Preference: Participants reported a low cognitive workload (averaging 2.05/7 on the NASA TLX scale), suggesting that assigning ratings is less mentally taxing than making endless pairwise comparisons.
- Statistical Significance: R4 outperformed the previous rating-based baseline (RbRL) across all tested domains with high statistical significance ($p < 0.03$ in offline and $p < 0.006$ in human studies).
Limitations and Future Work
While R4 is a major step forward, the authors note a few areas for growth:
- Deterministic Assumption: The current theoretical proofs assume the human has an underlying deterministic reward function. Real humans are often stochastic or inconsistent.
- Adversarial Noise: While R4 handles random noise well, the authors mention that "order-corrupting" noise (like an adversarial rater intentionally flipping ranks) could still be detrimental.
- Scaling Complexity: Future work could explore how R4 scales to even higher-dimensional tasks, such as complex manipulation or multi-agent environments, where the "ranking" of quality might be more subjective.
By moving from "A vs B" to "How good is this?", R4 provides a high-bandwidth, theoretically sound path toward more alignment-friendly reinforcement learning.
Summary updated