Introduction
Reinforcement Learning from Human Feedback (RLHF) has become the cornerstone of aligning Large Language Models (LLMs) with human intent. While successful in practice, the theoretical underpinnings of RLHF often focus on offline settings, where an agent learns from a static, pre-collected dataset. This approach frequently leads to "performance degeneration" when the initial data fails to cover the optimal policy's state-action space.
Online RLHF addresses this by allowing agents to actively explore and request preferences on new trajectories. However, analyzing online RLHF with complex, non-linear function approximators (like neural networks) presents significant mathematical challenges. This paper introduces the first model-free Thompson Sampling (TS) algorithm for online RLHF that supports general function approximation, providing both a tractable implementation and rigorous theoretical guarantees.
The Proposed Algorithm: Model-Free Thompson Sampling
The authors propose a model-free approach to online RLHF, leveraging Thompson Sampling to balance exploration and exploitation. Unlike Upper Confidence Bound (UCB) methods that require optimizing over complex confidence sets, Thompson Sampling relies on posterior sampling, which is often more computationally feasible for general function classes.
The algorithm operates in discrete rounds. In each round $t$, it draws a Q-function $f^t$ from a posterior distribution based on previously observed human preferences. It then computes a greedy policy $\pi_0^t$ based on this sampled function. To generate informative feedback, the algorithm employs a "two-policy" trick: it compares the trajectory of the current greedy policy $\pi_0^t$ against the policy from the previous round $\pi_1^t = \pi_0^{t-1}$. A human (or preference model) provides feedback on which trajectory is preferred, and this data is used to update the posterior.
Theoretical Framework
To handle the complexity of general function approximation, the paper utilizes the Bellman eluder (BE) dimension. This metric measures the complexity of the function class and allows the theoretical results to extend far beyond simple linear models.
A key technical contribution is the "MLE to Bellman Error Bridge." The authors derive a new concentration inequality showing that the Maximum Likelihood Estimator (MLE) used in preference modeling directly bounds the squared Bellman error. This bridge allows standard supervised learning generalization bounds to be applied to the reinforcement learning regret analysis.
Key Results and Insights
The primary theoretical result is a high-probability regret bound of $\tilde{O}(\sqrt{T})$. This indicates that the agent's performance gap relative to an optimal policy diminishes at a rate consistent with state-of-the-art algorithms in standard RL.
Beyond the theory, the authors validated their approach using a synthetic Markov Decision Process (MDP) with 15 states and 15 actions. Using variational inference to approximate the posterior, they observed:
- Convergence: The per-step regret converged toward zero.
- Value Accuracy: The learned value function successfully converged to the true underlying value of the MDP.
The study highlights that model-free Thompson Sampling is not only theoretically equivalent to more complex confidence-set-based methods in terms of regret but is also more practical for implementation with general function approximators.
Limitations and Future Directions
Despite its advantages, several challenges remain:
- Computational Complexity: While more tractable than UCB, exact posterior sampling for large-scale neural networks is still a significant bottleneck.
- Completeness Assumptions: The proof relies on "Bellman Completeness," an assumption that the function class is closed under the Bellman operator—a condition often violated by deep neural networks in practice.
- Scalability: Moving from synthetic, discrete MDPs to the high-dimensional, continuous state spaces of LLMs remains a major hurdle for future research.
Future work may explore relaxing the completeness assumption or investigating more efficient posterior approximation techniques for high-dimensional models.
Summary updated