Query-Policy Misalignment in Preference-Based Reinforcement Learning

Xiao Hu, Jianxiong Li, Xianyuan Zhan, Qing-Shan Jia, Ya-Qin Zhang

Abstract

Existing Preference-Based Reinforcement Learning (PbRL) methods often waste expensive human feedback by asking for preferences on behaviors the agent isn't currently performing. This paper introduces Query-Policy Alignment (QPA), a simple yet powerful approach that ensures human feedback is focused on the agent's current interests, leading to significantly faster learning and better performance with fewer human labels.

The Challenge of Query-Policy Misalignment

Reinforcement Learning (RL) usually requires a hand-engineered reward function—a mathematical formula that tells the agent whether it is doing a "good job" or a "bad job." However, defining these rewards for complex tasks, such as a robot walking naturally, is notoriously difficult. Preference-Based RL (PbRL), or RL from Human Feedback (RLHF), solves this by letting humans simply choose which of two behaviors they prefer.

The primary bottleneck in this process is that human feedback is expensive and slow. To maximize efficiency, researchers have developed complex "query selection" schemes to pick the most "informative" pairs of behaviors for humans to label. Surprisingly, these complex schemes often perform no better than picking pairs at random.

Illustration of Query-Policy Misalignment

The authors identify the root cause of this inefficiency: Query-Policy Misalignment. Most methods try to improve the reward model globally across all possible states. But if a human provides feedback on a state the agent never visits, that feedback is useless for the agent's current learning process. It’s akin to trying to teach a student advanced calculus when they are still struggling with basic addition—the information might be globally "informative," but it is entirely irrelevant to the student's current needs.

Methodology: Query-Policy Alignment (QPA)

To address this, the authors propose QPA (Query-Policy Alignment), which consists of two simple yet elegant components that can be implemented in just a few lines of code:

  1. Policy-Aligned Query Selection: Instead of searching the entire history of the agent's experiences for the most "uncertain" segments, QPA only selects from the most recent trajectories. This ensures the human is providing feedback on behaviors the agent is actually capable of performing right now.
  2. Hybrid Experience Replay: In standard off-policy RL, the agent learns by sampling randomly from its entire history. QPA changes this by sampling 50% of data from the whole history and 50% from the most recent, "policy-aligned" trajectories. This forces the agent to update its behavior more frequently in the regions where it has just received fresh human guidance.
  3. Enhanced Data Augmentation: The method utilizes temporal cropping to generate multiple "snippets" from a single labeled pair, effectively squeezing more training data out of every single human click.

Experimental Setup and Insights

The researchers evaluated QPA across two major benchmarks:

  • DeepMind Control Suite (DMControl): Six locomotion tasks including Walker_walk, Cheetah_run, Quadruped_run, and Humanoid_stand.
  • MetaWorld: Three robotic manipulation tasks: Door-unlock, Drawer-open, and Door-open.
  • Real Human Feedback: Experiments where actual humans provided preferences for the Cheetah_run task tested the method's robustness against real-world human inconsistency.

A key insight from the study is the "Local" Advantage. You don't need a perfect reward model for the entire world; you just need a reward model that is accurate where the agent currently is. By focusing on "local" accuracy, QPA makes every human label count. Furthermore, alignment is bidirectional: it isn't just about what we ask the human (Query $\to$ Policy); it's also about how the agent learns from that feedback (Policy $\to$ Query). The Hybrid Experience Replay acts as the missing link ensuring the agent pays attention to the latest advice.

Key Results

QPA consistently outperformed state-of-the-art methods like SURF and PEBBLE. In many tasks, it achieved higher scores with significantly fewer human queries.

Learning curve for Quadruped-walk

Notably, in complex tasks like Quadruped_walk, QPA actually surpassed the performance of Soft Actor-Critic (SAC) trained with the true, hand-engineered reward. This "aha moment" occurs because the learned reward model can sometimes encode a "longer-term horizon," providing a smoother gradient for the agent to follow than the original, often sparse, reward function.

In real human experiments, QPA-trained agents developed more "natural" behaviors. While agents trained on hand-engineered rewards would often "exploit" the math (e.g., moving forward while lying down to maximize velocity), the human-fed QPA agent learned to maintain a proper posture because the human preferred natural movement.

Limitations and Future Directions

By focusing queries on the current policy, there is a theoretical risk of the agent getting "stuck" in a local optimum because it isn't being told about high-reward areas far outside its current behavior. However, the inherent entropy-seeking nature of the underlying RL algorithm (SAC) helps mitigate this exploration trade-off.

While tested primarily on robotics and locomotion, the concept of Query-Policy Misalignment is highly relevant to Large Language Models (LLMs). Future work could investigate if similar "recent-context" filtering could improve the efficiency of RLHF in fine-tuning models like GPT.

Summary updated

BibTeX
@inproceedings{hu2024query,
  author = {Xiao Hu and Jianxiong Li and Xianyuan Zhan and Qing-Shan Jia and Ya-Qin Zhang},
  title = {{Query-Policy Misalignment in Preference-Based Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=UoBymIwPJR},
}
Figure