Making RL with Preference-based Feedback Efficient via Randomization

Runzhe Wu, Wen Sun

Reinforcement Learning from Human Feedback (RLHF) is the engine behind modern AI marvels like ChatGPT. Unlike standard reinforcement learning, which receives a numerical reward at every step, RLHF agents learn from human preferences—usually by comparing two full trajectories and indicating which one is better.

Despite its massive empirical success, a significant gap exists between how RLHF works in practice and our theoretical understanding of it. Existing theoretical RLHF algorithms suffer from two major flaws:

  1. Computational Intractability: They often require searching over exponentially large policy spaces or maintaining complex "version spaces," making them impossible to run in practice.
  2. Query Inefficiency: Human feedback is expensive. Most algorithms do not strategically decide when to ask for a preference, leading to an unsustainably high "query complexity."

This paper introduces the first computationally efficient and statistically optimal algorithms for RLHF. By leveraging randomization instead of traditional optimism-based methods, the authors develop algorithms that achieve near-optimal regret while maintaining polynomial running times and minimizing the number of expensive human queries.

The Power of Randomization

The core "aha moment" of this research is that randomization—specifically, adding Gaussian noise—preserves the Markovian property of the reward model. Traditional Upper Confidence Bound (UCB) algorithms create non-Markovian "bonus" terms that make planning computationally hard. Randomization bypasses this bottleneck, enabling the use of efficient dynamic programming.

To capitalize on this, the authors propose two primary algorithms:

  • PR-LSVI (Preference-based and Randomized Least-Squares Value Iteration): Designed for linear Markov Decision Processes (MDPs). Instead of using UCB to encourage exploration, PR-LSVI injects Gaussian noise into the learned reward and value functions. This allows the agent to use standard value iteration to find the best policy efficiently.
  • PbTS (Preference-based Thompson Sampling): An extension for non-linear function approximation. It maintains a posterior distribution over models and rewards, sampling from them to guide behavior.

Randomized Active Learning

Both algorithms utilize a novel query condition to minimize human interaction. The agent only asks for human feedback if the "uncertainty" of the preference is high. Specifically, it checks the variance of the predicted preference across different sampled reward models. If the models disagree significantly on which trajectory is better, it triggers a query. Furthermore, in each round, the algorithm compares a trajectory from the current best policy with one from the previous round's policy. This ensures enough diversity in the trajectories to make the human feedback informative for exploration.

Key Theoretical Results

Because this is a theoretical paper focused on algorithmic design and provable guarantees, it relies on mathematical proofs within the MDP framework rather than empirical benchmarks. The key results include:

  • First of its Kind: PR-LSVI is the first algorithm for linear MDPs to achieve sublinear regret and polynomial runtime simultaneously in the RLHF setting.
  • The Regret-Query Tradeoff: The authors prove a fundamental, near-optimal tradeoff. If you want the best possible performance (a regret of $\tilde{O}(\sqrt{T})$), you must query the human almost every episode ($T$ queries). However, if you can tolerate slightly worse performance ($\tilde{O}(T^{1-\beta})$ regret), you can drastically reduce queries to $\tilde{O}(T^{2\beta})$. This matches known lower bounds for simpler "dueling bandit" problems.
  • Non-linear Generalization: The PbTS algorithm successfully extends these benefits to non-linear models. By using the "eluder dimension" to measure complexity, it achieves similar near-optimal Bayesian regret and query tradeoffs.

Limitations and Future Work

While a significant step forward for RLHF theory, the paper notes a few limitations. The most concrete results rely on the Linear MDP assumption, which may not capture the full complexity of deep neural networks used in practice. For the non-linear case (PbTS), the algorithm assumes the existence of a "planning oracle" that can find the optimal policy for a given model; in complex environments, this oracle itself might be computationally expensive. Finally, while the dependence on time ($T$) is optimal, the dependence on other factors like the feature dimension ($d$) and horizon ($H$) could potentially be tightened in future research.

Summary updated

BibTeX
@inproceedings{wu2024making,
  author = {Runzhe Wu and Wen Sun},
  title = {{Making RL with Preference-based Feedback Efficient via Randomization}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=Pe2lo3QOvo},
}
Figure