Exploratory Preference Optimization: Harnessing Implicit Q*-Approximation for Sample-Efficient RLHF

Tengyang Xie, Dylan J. Foster, Akshay Krishnamurthy, Corby Rosset, Ahmed Awadallah, Alexander Rakhlin

Introduction

Reinforcement learning from human feedback (RLHF) is a central tool to align language models to human values and elicit useful behavior (Christiano et al., 2017; Bai et al., 2022; Ouyang et al., 2022). Using human-labeled preference data, RLHF achieves enhanced capabilities using a modest amount of data compared to unsupervised pre-training (on the order of tens of millions versus trillions of tokens) by treating the language model as a “policy” and optimizing it with reinforcement learning techniques.

Even though RLHF is typically only applied with preference data from humans or other language models, one might hope that it has potential to produce super-human capabilities because recognizing novel behavior and insights is typically easier than generating novel behavior. Indeed, it is often much easier to verify correctness of a given proof or program than it is to produce one from scratch. By repeatedly generating new proposals and labeling them with human feedback, a language model could gradually push beyond the boundary of human capabilities. Unfortunately, even with the great disparity in difficulty between generation and verification, a major barrier to achieving enhanced capabilities via RLHF is the volume of human feedback, i.e., sample complexity, required by existing methods. Thus, a promising research direction is to develop sample-efficient methods for RLHF.

A natural way to address the sample efficiency problem for RLHF is to augment algorithms with online exploration. Online exploration exploits interactive access to human or AI feedback by deliberately encouraging the model to produce diverse, novel responses. RLHF algorithms that exploit online feedback have received limited investigation, and in spite of encouraging initial results, existing approaches either do not update the language model (Dwaracherla et al., 2024), or engage in purely passive exploration (Guo et al., 2024; Gao et al., 2024), with no mechanism to encourage novelty or diversity. Passive exploration is intuitively insufficient, as we are unlikely to generate novel and correct proofs by chance; we make this precise in Proposition 2.1. Thus, the full potential of online exploration as a new paradigm for language model training has yet to be realized.

The central challenge in equipping language models with deliberate exploration is to efficiently navigate the vast, combinatorially large space of token sequences to find responses for which feedback will be maximally informative. The contemporary theory of reinforcement learning offers—at a conceptual level—solutions to this problem, providing algorithm design principles for exploration that can optimally take advantage of problem structure and achieve sample efficiency to the best extent one can hope for (Jiang et al., 2017; Agarwal et al., 2019; Foster and Rakhlin, 2023). However, the most powerful approaches in this space are computationally intractable in the general reinforcement learning setting (Jiang et al., 2017; Jin et al., 2021; Foster et al., 2021), and prior attempts to adapt them to RLHF either make unrealistic modeling assumptions (i.e., do not allow for general function approximation) (Xu et al., 2020; Novoseller et al., 2020; Pacchiano et al., 2021; Wu and Sun, 2023; Zhan et al., 2023b; Du et al., 2024; Das et al., 2024), or are computationally inefficient and not feasible to faithfully implement (Chen et al., 2022; Wang et al., 2023; Ye et al., 2024). Can we, perhaps by specializing to language modeling, develop practical, provable, and empirically efficient online exploration methods for RLHF?

We propose a new algorithm for online exploration in RLHF, Exploratory Preference Optimization (XPO), which is simple and practical—a one-line change to (online) Direct Preference Optimization (DPO; Rafailov et al. (2023); Guo et al. (2024))—yet enjoys the strongest known provable guarantees and promising empirical performance. XPO augments the DPO objective with a novel and principled exploration bonus, empowering the algorithm to explore outside the support of the initial model. We show that XPO is provably sample-efficient, and converges to a near-optimal language model policy under natural exploration conditions (Jin et al., 2021; Xie et al., 2023; Zhong et al., 2022). Critically, and in contrast to prior work, our theory holds irrespective of whether the initial model is sufficiently exploratory on its own. To summarize:

XPO offers the first practical and provably sample-efficient online exploration algorithm for RLHF with general function approximation.

Our design and analysis of XPO uses previously disparate techniques from language modeling and theoretical reinforcement learning, combining them in a serendipitous fashion through the perspective of KL-regularized Markov decision processes (Neu et al., 2017).

First, generalizing Rafailov et al. (2024), we observe that DPO can be viewed as implicitly performing Bellman error minimization (Xie and Jiang, 2020) to approximate the optimal value function Q⋆Q^{\star} in a KL-regularized MDP. We use this to provide a novel KL-regularized regret decomposition.

Then, we show that global optimism (Jiang et al., 2017; Jin et al., 2021; Xie et al., 2023), a powerful RL exploration technique that has classically been viewed as computationally intractable (Dann et al., 2018; Kane et al., 2022; Golowich et al., 2024), can be implemented in any KL-regularized MDP with deterministic transitions (generalizing language modeling) by adding a surprisingly simple exploration bonus to the DPO objective. This yields the XPO objective.

We expect our analysis techniques and perspective to be useful more broadly. In particular, the guarantees for XPO hold not just for language models, but for any reinforcement learning problem with a stochastic starting state and (potentially unknown) deterministic transition dynamics (“Deterministic Contextual MDP”).

In Section 3.4, we perform a proof-of-concept experiment to validate our theory, and find that XPO can match the performance of DPO variants (Xu et al., 2023; Tran et al., 2024; Dong et al., 2024) based on passive or heuristic exploration using significantly less preference data. These initial findings suggest that augmenting language models with online exploration may indeed lead to benefits over passive exploration.

Two concurrent and independent works posted to arXiv just before this preprint, Cen et al. (2024); Zhang et al. (2024), propose algorithms that equip DPO with exploration bonuses similar to XPO. On the theoretical side, both works are restricted to the contextual bandit formulation of RLHF, and do not consider the general reinforcement learning framework in this work or make the connection to Q⋆Q^{\star}-approximation and KL-regularized MDPs. Compared to our results, which give provable sample complexity guarantees with general function approximation, Zhang et al. (2024) do not provide sample complexity guarantees, while Cen et al. (2024) provide guarantees only for linear contextual bandits. In addition, and importantly, the sample complexity guarantees in Cen et al. (2024) have exponential dependence on the KL regularization parameter, which our results avoid. Empirically, both works find benefits from exploration.

2 Paper Organization

Section 2 presents background on RLHF, online feedback, and the necessity of exploration. Section 3 presents our algorithm and main theoretical guarantees, including motivation behind the algorithm design and a proof sketch. Section 3.4 presents experimental results, and we conclude with discussion in Section 4. Proofs and additional results are deferred to the appendix.

Background

This section contains necessary background to present our main results. We begin by recalling the standard formulation of reinforcement learning from human feedback from offline data (Section 2.1), then introduce the online feedback model and highlight the need for systematic exploration (Section 2.2).

We study RLHF in a general reinforcement learning formulation which subsumes the token-level MDP formulation considered in prior work (Rafailov et al., 2024), but is somewhat broader.

In the context of language modeling, the main object of interest is the token-level MDP (Rafailov et al., 2024). Here, s1∼ρs_{1}\sim\rho represents a prompt, each action aha_{h} represents a token (with A\mathcal{A} representing the vocabulary), and the state sh=(s1,a1,…,ah−1)s_{h}=(s_{1},a_{1},\ldots,a_{h-1}) is the prompt and sequence of tokens so far. The language model is represented by a policy π\pi, which maps the current context sh=(s1,a1,…,ah−1)s_{h}=(s_{1},a_{1},\ldots,a_{h-1}) to a distribution over the next token aha_{h}. The trajectory τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}) produced by this process can be interpreted as the language model’s response to the prompt s1s_{1}; we will occasionally use the terms “trajectory” and “response” synonymously in this context.

Our main results apply to any Deterministic Contextual MDP (DCMDP) for which the initial state is stochastic, but the subsequent transition dynamics are deterministic and potentially unknown. This formulation encompasses but strictly generalizes the token-level MDP.

Based on the preference dataset Dpref\mathcal{D}_{\mathsf{pref}}, the goal is to learn a policy π^\widehat{\pi} with high reward. Following prior theoretical works on RLHF, we consider a KL-regularized reward objective (Xiong et al., 2023; Ye et al., 2024), defined for a regularization parameter β>0\beta>0, via

We aim to compute a policy π^\widehat{\pi} such that

for some small ε>0\varepsilon>0. Such a guarantee means that π^\widehat{\pi} near-optimally maximizes reward, yet stays relatively close to πref\pi_{\mathsf{ref}} (as a function of β\beta). The choice of β>0\beta>0, which is important for safety and reliability, is typically viewed as a domain specific hyperparameter (Tang et al., 2024). Our main focus in this paper is the small-β\beta regime, which allows π^\widehat{\pi} to meaningfully deviate from πref\pi_{\mathsf{ref}} and generate potentially novel responses. Notably, by taking β\beta sufficiently small, it is possible to translate suboptimality bounds for the regularized reward into bounds for the unregularized reward (e.g., Zhu et al., 2023; Zhan et al., 2023a).

We refer to this setting as offline RLHF because the algorithm relies only on the offline dataset Dpref\mathcal{D}_{\mathsf{pref}} for training, and does not perform any active data collection.

Initial approaches to offline RLHF (Christiano et al., 2017; Ouyang et al., 2022) proceed by first estimating a reward function r^\widehat{r} from Dpref\mathcal{D}_{\mathsf{pref}} using the Bradley-Terry model, then optimizing an estimated version of the KL-regularized objective in Eq. 2 using policy optimization methods like PPO, i.e.,

The starting point for our work is an alternative approach introduced by Rafailov et al. (2023), Direct Preference Optimization (DPO). DPO is motivated by a closed-form solution for the policy that optimizes the KL-regularized objective in Eq. 2, and condenses the two-step process above into a single policy optimization objective, removing the need for reward function estimation. Concretely, DPO solvesWe adopt the convention that the value of the DPO objective is +∞+\infty if π\pi does not satisfy π≪πref\pi\ll{}\pi_{\mathsf{ref}}.

for a user-specified policy class Π\Pi, where σ(x):=exp⁡(x)1+exp⁡(x)\sigma(x)\vcentcolon={}\frac{\exp(x)}{1+\exp(x)} is the sigmoid function.

2 Online Feedback and Exploration in RLHF

DPO and other offline RLHF methods have achieved great success in language model alignment, but are fundamentally limited to behaviors that are well-supported by the initial model πref\pi_{\mathsf{ref}} and preference data Dpref\mathcal{D}_{\mathsf{pref}}. RLHF with online feedback offers a promising approach to move beyond this limitation by collecting feedback from responses sampled from the model during training (Guo et al., 2024).

3 The Necessity of Deliberate Exploration

Existing approaches to online RLHF adapt offline techniques by applying them iteratively. As an example, Online DPO (Guo et al., 2024) proceeds as follows:The closely related Iterative DPO approach (Xu et al., 2023; Tran et al., 2024) proceeds in the same fashion, but samples a large batch of preference pairs from each policy π(t)\pi^{{\scriptscriptstyle(t)}} instead of a single pair, and performs fewer updates.

Compute π(t)\pi^{{\scriptscriptstyle(t)}} by solving the DPO objective in Eq. 4 with the current preference dataset Dpref(t)\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t)}}.

Sample τ(t),τ~(t)∼π(t)∣s1(t)\tau^{{\scriptscriptstyle(t)}},\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim{}\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}}, then label as (τ+(t),τ−(t))(\tau_{+}^{{\scriptscriptstyle(t)}},\tau_{-}^{{\scriptscriptstyle(t)}}) and update Dpref(t+1)←Dpref(t)∪{(τ+(t),τ−(t))}\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t+1)}}\leftarrow\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t)}}\cup\{(\tau_{+}^{{\scriptscriptstyle(t)}},\tau_{-}^{{\scriptscriptstyle(t)}})\}.

We refer to such an approach as passive exploration, as the responses are sampled directly from the policy π(t)\pi^{{\scriptscriptstyle(t)}} without an explicit mechanism to encourage diversity. The following proposition shows that passive exploration is insufficient to discover novel behavior: Unless the initial policy πref\pi_{\mathsf{ref}} has good coverage, Online DPO can fail to learn a near-optimal policy.

Fix β∈(0,18log⁡(2))\beta\in(0,\tfrac{1}{8}\log(2)), and consider the bandit setting (H=1H=1, S=∅\mathcal{S}=\varnothing, and ∣A∣=2\left\lvert\mathcal{A}\right\rvert=2). There exists a reference policy πref\pi_{\mathsf{ref}} such that for all T≤12exp⁡(18β)T\leq{}\tfrac{1}{2}\exp(\frac{1}{8\beta}), with constant probability, all of the policies π(1),…,π(T+1)\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(T+1)}} produced by Online DPO satisfy

That is, the sample complexity required by Online DPO is exponential in 1β\frac{1}{\beta}, which is unacceptable in the small-β\beta regime; inspecting the proof, it is straightforward to see that the same conclusion holds for Iterative DPO and purely offline DPO. The idea behind Proposition 2.1 is simple: If πref\pi_{\mathsf{ref}} places small probability mass on the optimal action, Online DPO may fail to ever explore this action until the number of iterations is exponentially large. This reflects the intuition that in the small-β\beta regime, more deliberate exploration is required to discover behaviors or capabilities not already covered by πref\pi_{\mathsf{ref}}.

Various empirical works have suggested that offline DPO can under-perform relative to vanilla RLHF with PPO due to a lack of on-policy sampling (Xiong et al., 2023; Guo et al., 2024; Dong et al., 2024; Tang et al., 2024). Proposition 2.1 highlights a conceptually distinct phenomenon, where both of the aforementioned algorithms (as well as online variants of DPO) fail due to poor coverage from πref\pi_{\mathsf{ref}}, in spite of on-policy sampling.

Exploratory Preference Optimization

We now present our main algorithm XPO, which addresses the limitations of existing alignment methods by augmenting DPO with active exploration. We first describe the algorithm and motivation (Section 3.1), then present theoretical guarantees (Section 3.2), and sketch the analysis (Section 3.3).

XPO (Exploratory Preference Optimization) is displayed in Algorithm 1. The algorithm takes as input a user-specified policy class Π\Pi and proceeds in almost the same fashion as Online DPO. For each step t∈[T]t\in[T], given the current policy π(t)\pi^{{\scriptscriptstyle(t)}} and an initial state s1(t)s_{1}^{{\scriptscriptstyle(t)}}, the algorithm begins by sampling a pair of trajectories τ(t)∼π(t)∣s1(t)\tau^{{\scriptscriptstyle(t)}}\sim\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} and τ~(t)∼πref∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\pi_{\mathsf{ref}}\mid{}s_{1}^{{\scriptscriptstyle(t)}}, which are labeled as (τ+(t),τ−(t))(\tau_{+}^{{\scriptscriptstyle(t)}},\tau_{-}^{{\scriptscriptstyle(t)}}) based on the preference feedback and used to update the preference dataset via Dpref(t+1)←Dpref(t)∪{(τ+(t),τ−(t))}\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t+1)}}\leftarrow\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t)}}\cup\{(\tau_{+}^{{\scriptscriptstyle(t)}},\tau_{-}^{{\scriptscriptstyle(t)}})\}. The most important step is 7, which updates the policy to π(t+1)\pi^{{\scriptscriptstyle(t+1)}} via the following optimistic variant of the DPO objective:

Here, α≥0\alpha\geq{}0 is an optimism parameter; for α=0\alpha=0, the algorithm nearly equivalent to Online DPO, except that we sample τ(t)∼π(t)∣s1(t)\tau^{{\scriptscriptstyle(t)}}\sim\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} and τ~(t)∼πref∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\pi_{\mathsf{ref}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} instead of sampling (τ(t),τ~(t))∼π(t)∣s1(t)(\tau^{{\scriptscriptstyle(t)}},\widetilde{\tau}^{{\scriptscriptstyle(t)}})\sim\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} at each iteration. As we will see now, for α>0\alpha>0, the term

in Eq. 6 encourages the policy to behave optimistically, and produce diverse responses τ\tau.

Optimism in the face of uncertainty is a widely used technique in reinforcement learning theory (Agarwal et al., 2019; Lattimore and Szepesvári, 2020; Foster and Rakhlin, 2023). In its most standard form, the optimism principle is usually stated as follows: One should explore by choosing their actions according to the most optimistic view of the world, given all of the data that has already been observed. The idea is that if we choose a decision according to this principle, one of two good things can happen: (i) the optimistic view is correct, and we receive large reward; or (ii) the optimistic view is incorrect, but we receive useful information that will help to better estimate the state of the world in subsequent iterations.

In other words, πβ⋆\pi^{\star}_{\beta} implements an accurate internal reward model. From this viewpoint:

The standard DPO term in Eq. 6 encourages the policy π\pi to build an accurate internal model for rewards under the Bradley-Terry model; this can be viewed as a form of implicit Q⋆Q^{\star}-approximation, since we are implicitly minimizing the Bellman errors in Eq. 8.

In light of Equation 9 it is natural to approximate Vβπ(s1)V_{\beta}^{\pi}(s_{1}), the regularized value function for π\pi, by r(τ)−βlog⁡π(τ)πref(τ)r(\tau)-\beta\log\frac{\pi(\tau)}{\pi_{\mathsf{ref}}(\tau)}. Using this approximation, the first term in Equation 6 biases the policy toward a large value function such that Vβ⋆≲VβπV^{\star}_{\beta}\lesssim V^{\pi}_{\beta}, implementing implicit (global) optimism in the face of uncertainty (up to an inconsequential difference in on-policy rewards). The fact that this suffices to drive exploration is quite subtle, and leverages non-trivial properties of the KL-regularized MDP, including the fact that Eq. 8 holds on a per-trajectory basis.

As remarked above, another difference between XPO and online/iterative DPO is that instead of sampling the preference pairs via (τ(t),τ~(t))∼π(t)(\tau^{{\scriptscriptstyle(t)}},\widetilde{\tau}^{{\scriptscriptstyle(t)}})\sim\pi^{{\scriptscriptstyle(t)}}, we sample τ(t)∼π(t)∣s1(t)\tau^{{\scriptscriptstyle(t)}}\sim\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} and τ~(t)∼πref∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\pi_{\mathsf{ref}}\mid{}s_{1}^{{\scriptscriptstyle(t)}}. This small change is important: it is possible to show that in general, sampling (τ(t),τ~(t))∼π(t)(\tau^{{\scriptscriptstyle(t)}},\widetilde{\tau}^{{\scriptscriptstyle(t)}})\sim\pi^{{\scriptscriptstyle(t)}} can lead to degenerate behavior in which the algorithm fails to adequately explore in the small-β\beta regime, even when πref\pi_{\mathsf{ref}} itself has good coverage.

While we use τ~(t)∼πref∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\pi_{\mathsf{ref}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} in Algorithm 1, XPO is significantly more general, and leads to provable guarantees for any fixed sampling policy τ~(t)∼π~∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\widetilde{\pi}\mid{}s_{1}^{{\scriptscriptstyle(t)}}, as well as certain data-dependent sampling schemes (e.g., sampling τ~(t)∼unif(π(1),…,π(t))∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim{\sf unif}(\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(t)}})\mid{}s_{1}^{{\scriptscriptstyle(t)}}); different choices may have different tradeoffs and benefits in practice. A general version of XPO which leaves the sampling distribution for τ~(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}} as a free parameter is given in Section C.1 (Algorithm 2).

XPO is highly practical, and can easily be incorporated into existing language modeling and RLHF pipelines as a drop-in replacement for Online DPO (a one-line change to existing code). The theoretical guarantees for the algorithm continue to hold under standard modifications such as (i) incorporating additional preference data from πref\pi_{\mathsf{ref}} or another reference policy; and (ii) performing a smaller number of iterations, but collecting a larger batch of preference data from π(t)\pi^{{\scriptscriptstyle(t)}} (as in Iterative DPO).

2 Theoretical Guarantees

To provide sample complexity guarantees for XPO, we make some standard statistical assumptions. The first assumption asserts that the policy class Π\Pi is powerful enough to represent the optimal KL-regularized policy.

The policy class Π\Pi satisfies πβ⋆∈Π\pi^{\star}_{\beta}\in\Pi.

Policy realizability is a minimal assumption for sample-efficient reinforcement learning (Agarwal et al., 2019; Lattimore and Szepesvári, 2020; Foster and Rakhlin, 2023); through Eq. 9, it is equivalent to a form of reward/value realizability. For language modeling, Π\Pi will typically correspond to a class of language models with fixed architecture but variable weights. Next, we make a regularity assumption on the policies in Π\Pi (Rosset et al., 2024).

For all π∈Π\pi\in\Pi and trajectories τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}),

Note that VmaxV_{\mathsf{max}} is measurable and controllable in practice; our guarantees scale polynomially with this parameter. For log-linear policies where π(a∣s)∝exp⁡(\nicefracf(s,a)β)\pi(a\mid{}s)\propto\exp\left(\nicefrac{{f(s,a)}}{{\beta}}\right), we expect Vmax≲RmaxV_{\mathsf{max}}\lesssim{}R_{\mathsf{max}}.

The trajectory-level coverability coefficient is given by

Assumption 3.2 implies a trivial bound of C_{\mathsf{cov}}(\Pi)\lesssim{}\exp\big{(}\frac{V_{\mathsf{max}}}{\beta}\big{)}. Indeed, Ccov(Π)C_{\mathsf{cov}}(\Pi) measures coverage with respect to the best possible distribution μ\mu, while the bound implied by Assumption 3.2 takes μ=πref\mu=\pi_{\mathsf{ref}}, so we expect Ccov(Π)≪exp⁡(Vmax/β)C_{\mathsf{cov}}(\Pi)\ll\exp(V_{\mathsf{max}}/\beta) when πref\pi_{\mathsf{ref}} does not provide adequate coverage on its own (e.g., the example in Proposition 2.1). This is precisely the setting where we expect deliberate exploration to be helpful. We also note that there is a trivial bound Ccov(Π)≤∣A∣HC_{\mathsf{cov}}(\Pi)\leq|\mathcal{A}|^{H}, but because coverability depends on the structure of the (restricted) class Π\Pi, the value can be significantly smaller in general (e.g., if policies π∈Π\pi\in\Pi are highly correlated or stochastic).

The main sample complexity guarantee for XPO is as follows.

Let us discuss some key features of this result.

Theorem 3.1 shows that XPO converges to a near-optimal policy with sample complexity polynomial in the coverability coefficient Ccov(Π)C_{\mathsf{cov}}(\Pi); in particular, to learn an ε\varepsilon-optimal policy T=O~(Ccov(Π)log⁡∣Π∣ε2)T=\widetilde{O}\left(\frac{C_{\mathsf{cov}}(\Pi)\log\lvert\Pi\rvert}{\varepsilon^{2}}\right) episodes are required.We state the result for finite classes (log⁡∣Π∣<∞\log\lvert\Pi\rvert<\infty) to simplify presentation, following the standard in RL theory (Agarwal et al., 2019; Foster and Rakhlin, 2023); the result readily extends to infinite classes through standard arguments. By scaling with Ccov(Π)C_{\mathsf{cov}}(\Pi), Theorem 3.1 can be viewed as a strict improvement over offline RLHF (Zhu et al., 2023; Zhan et al., 2023a), as well as prior works on online RLHF that rely on passive exploration (Xiong et al., 2023; Gao et al., 2024; Chang et al., 2024). In particular, these works scale with coverage parameters for πref\pi_{\mathsf{ref}}, the simplest of which take the form Cconc(Π):=sup⁡τ∈(S×A)Hsup⁡π∈Ππ(τ)πref(τ)C_{\mathsf{conc}}(\Pi)\vcentcolon={}\sup_{\tau\in(\mathcal{S}\times\mathcal{A})^{H}}\sup_{\pi\in\Pi}\frac{\pi(\tau)}{\pi_{\mathsf{ref}}(\tau)}. Under Assumption 3.2, we have that Cconc(Π)=exp⁡(Vmax/β)C_{\mathsf{conc}}(\Pi)=\exp(V_{\mathsf{max}}/\beta) which, as discussed above, upper bounds Ccov(Π)C_{\mathsf{cov}}(\Pi) but can be much larger when πref\pi_{\mathsf{ref}} has poor coverage. The dependence on Ccov(Π)C_{\mathsf{cov}}(\Pi) in Theorem 3.1 reflects the fact that XPO can explore responses not covered by πref\pi_{\mathsf{ref}}. Many works consider more general notions of coverage that account for reward function structure, in the same vein as SEC, as well as single-policy variants; both can be problematic for similar reasons.

In Appendix C, we give a generalization of Theorem 3.1 (Theorem 3.1′) which scales with a more comprehensive exploration parameter, the Sequential Extrapolation Coefficient (SEC), matching (for DCMDPs) the most general results in prior work on exploration in RLHF, but with a significantly simpler algorithm (Chen et al., 2022; Wang et al., 2023; Ye et al., 2024). The SEC also leads to polynomial sample complexity for tabular and linear MDPs, a common setting considered in prior work (Xu et al., 2020; Novoseller et al., 2020; Pacchiano et al., 2021; Wu and Sun, 2023; Zhan et al., 2023b; Das et al., 2024). See Appendix A for a detailed comparison. We emphasize that Theorem 3.1 applies to any DCMDP (including but not limited to the token-level MDP), even if the dynamics are unknown; as such, the result meaningfully extends beyond the contextual bandit formulation of RLHF found in many prior works (Zhu et al., 2023; Xiong et al., 2023; Das et al., 2024; Ye et al., 2024).

By avoiding explicit dependence on exp⁡(1β)\exp(\frac{1}{\beta}), XPO provably improves upon Online DPO when β\beta is small; per Proposition 2.1, the latter must pay exp⁡(1β)\exp(\frac{1}{\beta}) even when Ccov(Π)≤2C_{\mathsf{cov}}(\Pi)\leq{}2. This improvement stems from the fact that KL-regularization does not automatically lead to exploration or grant meaningful control of coverability in the small-β\beta regime.

Most prior approaches to RL with general function approximation that incorporate global forms of optimism similar to Eq. 7 (Jiang et al., 2017; Sun et al., 2019; Du et al., 2021; Jin et al., 2021; Xie et al., 2023; Liu et al., 2024) are known to be computationally intractable to implement in general (Dann et al., 2018), and involve solving non-convex, non-differentiable constrained optimization problems. Thus, it is natural to ask why our result is not too good to be true. The answer is that even though the objective in Eq. 6 is simple, it is still non-convex in general, even if one employs log-linear policies of the form

Separately, we mention in passing that we believe it should be possible to derive tighter sample complexity bounds for large β>0\beta>0, in the vein of Tiapkin et al. (2023a).

Our results are limited to MDPs with deterministic dynamics and stochastic start state (DCMDPs). We believe that without further modifications, the DPO objective is not suitable for stochastic dynamics, as Eq. 9 no longer holds on a per-trajectory basis.

A related point concerns trajectory coverability. In the standard (as opposed to preference-based) RL setting, it is possible to achieve guarantees that scale with state-action coverability (Xie et al., 2023), defined via:

3 Proof Sketch for \crtcrefthm:main

Our starting point for the proof of Theorem 3.1 is the following regret decomposition, which is proven as a consequence of the implicit Q⋆Q^{\star}-approximation result in Eq. 9.

For any pair of policies π\pi and ν\nu, it holds that

This result decomposes the error of any policy into two pairs of terms: The first pair in Eq. 13 measures the extent to which the policy’s internal reward model overestimates the optimal value, and directly informs the notion of optimism in XPO, while the second pair in Eq. 14 measures the reward model’s predictive accuracy. Critically, as a consequence of the fact that Eq. 9 holds uniformly for all trajectories, the regret decomposition measures error under (i) the policy π\pi itself (on-policy error), and (ii) an arbitrary reference policy ν\nu, which we will instantiate as the historical data distribution.

Let μ(t):=1t−1∑i<tπ(i)⊗πref\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}\vcentcolon={}\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(i)}}\otimes\pi_{\mathsf{ref}} denote the policy that, given s1s_{1}, samples τ∼π(i)\tau\sim{}\pi^{{\scriptscriptstyle(i)}} for i∼unif([t−1])i\sim{\sf unif}([t-1]) and samples τ~∼πref\widetilde{\tau}\sim\pi_{\mathsf{ref}}, with the convention that μ(1)\boldsymbol{\mu}^{{\scriptscriptstyle(1)}} is arbitrary. Observe that min⁡t∈[T+1]Jβ(πβ⋆)−Jβ(π(t))≤1T∑t=1TJβ(πβ⋆)−Jβ(π(t))\min_{t\in[T+1]}J_{\beta}(\pi^{\star}_{\beta})-J_{\beta}(\pi^{{\scriptscriptstyle(t)}})\leq{}\frac{1}{T}\sum_{t=1}^{T}J_{\beta}(\pi^{\star}_{\beta})-J_{\beta}(\pi^{{\scriptscriptstyle(t)}}). For each step tt, applying Lemma 3.1 with π=π(t)\pi=\pi^{{\scriptscriptstyle(t)}} and ν=πref\nu=\pi_{\mathsf{ref}} gives

The reward estimation error term in Eq. 15 samples τ∼π(t)∣s1\tau\sim{}\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1} and τ~∼πref∼s1\widetilde{\tau}\sim{}\pi_{\mathsf{ref}}\sim{}s_{1} (on-policy). To relate this to the purely off-policy objective in 7 of XPO, we use a potential argument based on coverability (Xie et al., 2023) which, for any α>0\alpha>0, allows us to bound the above expression by

The XPO objective in 7 minimizes an empirical analogue of this quantity (up to a standard translation between log-loss and square loss under the Bradley-Terry model), so a concentration argument (Lemma D.5) allows us to conclude that the iterates of XPO satisfy ΨXPO(t)(π(t))≲α−1log⁡∣Π∣t+log⁡∣Π∣t\Psi_{\texttt{XPO}}^{{\scriptscriptstyle(t)}}(\pi^{{\scriptscriptstyle(t)}})\lesssim{}\alpha^{-1}\frac{\log\lvert\Pi\rvert}{t}+\sqrt{\frac{\log\lvert\Pi\rvert}{t}} with high probability. Plugging this bound into Eq. 16 yields

4 Empirical Validation

To close this section, we provide a preliminary empirical evaluation of XPO in real-world RLHF experiments. To implement XPO, we use the iterative DPO (Xu et al., 2023; Tran et al., 2024; Dong et al., 2024) pipeline from Dong et al. (2024) with 3 total iterations (that is, we set T=3T=3, but draw a large batch of pairs from π(t)\pi^{{\scriptscriptstyle(t)}}), and augment the DPO objective with the optimism term in XPO. We use the same base model (which we refer to as Llama-3-8B-Flow-SFT),https://huggingface.co/RLHFlow/LLaMA3-SFT. prompt sets for each iteration,https://huggingface.co/datasets/RLHFlow/iterative-prompt-v1-iter1-20K, https://huggingface.co/datasets/RLHFlow/iterative-prompt-v1-iter2-20K, https://huggingface.co/datasets/RLHFlow/iterative-prompt-v1-iter3-20K. and preference model (to generate preference feedback),https://huggingface.co/RLHFlow/pair-preference-model-LLaMA3-8B. as Dong et al. (2024), which makes our results generally comparable to theirs. Over all three iterations, we fix πref\pi_{\mathsf{ref}} to be the base model, Llama-3-8B-Flow-SFT.

In Table 1, we compare XPO with the following baselines: 1) iterative DPO with the same setup (i.e., XPO with α=0\alpha=0), 2) Llama-3-8B-Flow-Final, the final model from Dong et al. (2024), and 3) the industry-level instruction-tuned model Llama-3-8B-it,https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct on various academic and chat benchmarks (Zhong et al., 2023; Nie et al., 2020; Hendrycks et al., 2021; Rein et al., 2023; Cobbe et al., 2021; Dubois et al., 2024; Li et al., 2024; Clark et al., 2018; Lin et al., 2022; Zellers et al., 2019; Sakaguchi et al., 2021). We compute all baseline numbers ourselves with the same configuration for a fair comparison. A key distinction between our experimental setup and that of Dong et al. (2024) is that we construct preference pairs from only two responses, whereas Dong et al. (2024) use best/worst-over-8-responses for preference pair construction as a heuristic exploration strategy. In other words, the final models we obtain (XPO-iter3, and a baseline, DPO-iter3 in Table 1) use only \nicefrac14\nicefrac{{1}}{{4}} the number of generated responses compared the final model (Llama-3-8B-Flow-Final)https://huggingface.co/RLHFlow/LLaMA3-iterative-DPO-final from Dong et al. (2024).

We find that the model obtained by XPO improves over the non-exploratory baseline (DPO-iter) on the chat benchmarks (which offer roughly ∼\sim90% agreement and/or Spearman correlation to Chatbot Arena (Chiang et al., 2024)), and attains performance comparable to the industry-level (Llama-3-8B-it) or 4×\timesdata-usage (Llama-3-8B-Flow-Final) models. At the same time, XPO also improves over the non-exploratory baseline on most of the academic benchmarks, again achieving comparable performance with the industry-level and 4×\timesdata-usage models, and does not introduce significant performance regression in any benchmark. In contrast, we observe that the iterative DPO baseline (without exploration) causes obvious regression in the math (GSM8K) benchmark. However, we caution that conducting separate training runs with different random seeds can yield results with relatively high variance (e.g., the difference in win rates can be up to 3%∼4%3\%\sim 4\%) for both chat benchmarks; due to resource limitations, we defer a more comprehensive evaluation to future work. See Appendix F for additional results.

Discussion

Our work provides the first practical and provably sample-efficient online exploration algorithm for RLHF with general function approximation, a step toward fully realizing the potential of online exploration for aligning language models. Our results also show that viewing DPO as a form of implicit Q⋆Q^{\star}-approximation can directly inform new algorithmic interventions (e.g., implicit optimism), and offer an example of fruitful interplay between language modeling and theoretical reinforcement learning. Building on this viewpoint, an exciting direction for future work is to import the broader set of tools from the literature on reinforcement learning theory (e.g., more powerful exploration principles (Foster et al., 2021)) and harness them for language modeling and alignment; in this context, we expect our analysis techniques based on the KL-regularized MDP to find broader use.

From a reinforcement learning perspective, interesting technical directions for future work include (i) providing instance-dependent sample complexity bounds for XPO; and (ii) supporting RL settings beyond deterministic contextual MDPs. On the practical side, immediate followup directions include extending XPO to support general preference models (Munos et al., 2023; Swamy et al., 2024) or more general feedback modalities (Ethayarajh et al., 2024).

References

Appendix A Related Work

Theoretical analysis of algorithms for RLHF is becoming an active area of research. Much of this research focuses on purely offline RLHF (Zhu et al., 2023; Zhan et al., 2023a), which is complementary to our work. Many works also consider a so-called hybrid RLHF setting, where the algorithm has access to online feedback, but requires the initial policy πref\pi_{\mathsf{ref}} to have good coverage (e.g., bounded concentrability or related quantities) (Xiong et al., 2023; Gao et al., 2024; Chang et al., 2024).To our knowledge, all prior works in this space require uniform notions of concentrability as opposed to single-policy concentrability. Gao et al. (2024) state guarantees in terms of single-policy concentrability under the assumption that certain regression errors can be bounded, but this cannot be achieved in general without further coverage or exploration-like conditions. These hybrid algorithms do not engage in systematic exploration (i.e., they explore passively), and hence cannot provide meaningful guarantees if πref\pi_{\mathsf{ref}} does not adequately cover the optimal policy (e.g., for the setting in Proposition 2.1).

For online RLHF, the most relevant related work can be summarized as follows:

Most prior work (Xu et al., 2020; Novoseller et al., 2020; Pacchiano et al., 2021; Wu and Sun, 2023; Zhan et al., 2023b; Du et al., 2024; Das et al., 2024) gives algorithms and sample complexity guarantees for the special case of tabular or linear MDPs; these algorithms use exploration bonuses that are tailored to linear models, and are not suitable for the general function approximation setting we consider (e.g., for LLMs). Nonetheless, we obtain polynomial sample complexity guarantees for tabular and linear MDPs (Examples D.1 and D.2), though our results are restricted to deterministic dynamics (we believe that moving beyond the DPO objective is likely required to handle stochastic dynamics).

More relevant to our work is Ye et al. (2024), who give algorithms and sample complexity guarantees for online RLHF with general function approximation for the special case of contextual bandits (H=1H=1). For contextual bandits, their sample complexity guarantees scale with a complexity measure, the eluder coefficient, which is equivalent to the Sequential Extrapolation Coefficient in our most general result, Theorem 3.1′. However, their exploration algorithm requires solving a rather complicated optimization problem, and it is unclear whether it is possible to implement it faithfully for language models (in particular, their experiments use an alternative, heuristic approach to exploration which is only loosely inspired by the theory).

Lastly, Chen et al. (2022); Wang et al. (2023) give guarantees for RLHF with general function approximation based on eluder dimension-like complexity measures which are incomparable to, but in some cases more general than Theorem 3.1′. However, these works require model-based function approximation (as opposed to the model-free setup we consider), and do not lead to efficient or practical algorithms when specialized to language modeling.

A difference worth highlighting between our work and some (but not all) of the works above (Zhu et al., 2023; Xiong et al., 2023; Das et al., 2024; Ye et al., 2024) is that we model RLHF as a general reinforcement learning problem as opposed to a contextual bandit problem. The problem of autoregressive sequence prediction can equivalently be formulated as RL in the token-level MDP, or as a contextual bandit problem (RL with horizon H=1H=1) in which the “action space” consists of all possible token sequences. However, because our work supports general deterministic contextual MDPs (DCMDPs) with unknown dynamics and not just the token-level MDP, it is strictly more general than the contextual bandit formulation.

Recent work of Rafailov et al. (2024) shows that DPO, when applied to the token-level MDP can be viewed as estimating the KL-regularized value function Qβ⋆Q^{\star}_{\beta}; their work does not consider sample complexity or online exploration. Our results extend their observation to any deterministic contextual MDP and—more importantly—show that it is possible to harness this perspective to provide provable end-to-end sample complexity guarantees.

Online exploration in RLHF has received limited exploration so far, with notable examples including Online DPO (Guo et al., 2024) and Iterative DPO (Xu et al., 2023; Tran et al., 2024; Pang et al., 2024; Mitra et al., 2024; Dong et al., 2024). As discussed in Section 2, these methods engage in purely passive exploration, meaning that sample from the current model π(t)\pi^{{\scriptscriptstyle(t)}} without an explicit mechanism to encourage diverse, exploratory responses.

Dwaracherla et al. (2024) perform a dedicated empirical evaluation of active exploration for language models. However, this work does not actually train the language model, and thus cannot be viewed as a form of RLHF; instead the authors train a reward model iteratively, and use this in tandem with various active sampling schemes to accept or reject responses proposed by πref\pi_{\mathsf{ref}}. Nevertheless, the positive results achieved by Dwaracherla et al. (2024) in this limited setting are suggestive of the potential power of online exploration in RLHF. Similarly, Ye et al. (2024) perform a limited evaluation of empirical exploration schemes inspired by theoretical RL, but only report results for reward modeling benchmarks, not language modeling.

Most closely related, Xiong et al. (2023); Dong et al. (2024) perform an extensive empirical evaluation of Iterative DPO variants, and find that Iterative DPO with passive exploration can already have significant benefits over offline DPO. These works also incorporate a “best/worst-over-nn” trick for preference pair construction, which can be viewed as a heuristic to promote exploration, but does not have provable guarantees. See Section 3.4 for further discussion.

Outside the context of language models, an active line of research provides structural complexity measures and algorithms that enable sample-efficient exploration in reinforcement learning in general settings (Russo and Van Roy, 2013; Jiang et al., 2017; Sun et al., 2019; Wang et al., 2020; Du et al., 2021; Jin et al., 2021; Foster et al., 2021; Xie et al., 2023; Foster et al., 2023; Liu et al., 2024). The techniques from this line of research that support general function approximation, while sample-efficient, are computationally intractable to implement in general (Dann et al., 2018), involving non-convex and non-differentiable constrained optimization problems. We use the unique structure of the KL-regularized MDP formulation and deterministic contextual MDP (DCMDP) to derive the exploration objective in XPO which—while still non-convex—is differentiable and directly amenable to a practical implementation with language models.

First introduced in Ziebart et al. (2008); Ziebart (2010), a number of recent works provide sample complexity guarantees for reinforcement learning in KL-regularized or entropy-regularized MDPs (Kozuno et al., 2022; Tiapkin et al., 2023b, a), mainly focusing on the special case of tabular (finite-state/action) MDPs. To the best of our knowledge, the optimistic objective in XPO is novel in this context.

Appendix B Technical Tools

Let (Xt)t≤T(X_{t})_{t\leq{T}} be a sequence of real-valued random variables adapted to a filtration (Ft)t≤T(\mathscr{F}_{t})_{t\leq{}T}. If ∣Xt∣≤R\left\lvert X_{t}\right\rvert\leq{}R almost surely, then with probability at least 1−δ1-\delta,

For any sequence of real-valued random variables (Xt)t≤T(X_{t})_{t\leq{}T} adapted to a filtration (Ft)t≤T(\mathscr{F}_{t})_{t\leq{}T}, it holds that with probability at least 1−δ1-\delta, for all T′≤TT^{\prime}\leq{}T,

Appendix C Proof of \crtcrefthm:main

This section is organized as follows. First, in Section C.2, we present a more general version of XPO, which makes use of an arbitrary, user-specified sampling policy for the second response τ~\widetilde{\tau}. Then, in Section C.2, we state a more general version of Theorem 3.1 (Theorem 3.1′), and show how it implies Theorem 3.1. Examples are then given in Section D.3.

In the remainder of the section, we prove Theorem 3.1′. We first prove a number of intermediate results:

In Section D.4, we state preliminaries regarding the KL-regularized MDP, and use them to prove the implicit Q⋆Q^{\star}-approximation lemma (Lemma D.3).

In Section D.5, we prove the central regret decomposition lemma (Lemma 3.1).

In Section D.6, we prove a key concentration result used within Theorem 3.1′.

Finally, in Section D.7, we prove Theorem 3.1′, with proofs for supporting lemmas deferred to Section D.8.

Algorithm 2 presents a general version of XPO. The algorithm is identical to Algorithm 1, except that it makes use of an arbitrary, user-specified user-specified sampling policy for the second response τ~\widetilde{\tau}.

In more detail, the algorithm takes as input a sampling strategy πsamp\boldsymbol{\pi}_{\mathsf{samp}} which, at step tt, computes a sampling policy π~(t)\widetilde{\pi}^{{\scriptscriptstyle(t)}} via π~(t)←πsamp(π(1),…,π(T))\widetilde{\pi}^{{\scriptscriptstyle(t)}}\leftarrow\boldsymbol{\pi}_{\mathsf{samp}}(\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(T)}}). The algorithm then samples the response pair (τ(t),τ~(t))(\tau^{{\scriptscriptstyle(t)}},\widetilde{\tau}^{{\scriptscriptstyle(t)}}) via τ(t)∼π(t)∣s1(t)\tau^{{\scriptscriptstyle(t)}}\sim\pi^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}} and τ~(t)∼π~(t)∣s1(t)\widetilde{\tau}^{{\scriptscriptstyle(t)}}\sim\widetilde{\pi}^{{\scriptscriptstyle(t)}}\mid{}s_{1}^{{\scriptscriptstyle(t)}}. Algorithm 1 is a special case of this scheme in which π~(t)=πref\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\pi_{\mathsf{ref}} for all tt.

A secondary difference from Algorithm 1 is that Algorithm 2 assumes access to a dataset Dopt(t)\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t)}} consisting of tt responses sampled from π~(t)\widetilde{\pi}^{{\scriptscriptstyle(t)}}, which are used to compute the optimistic term in 9. In Algorithm 1, because π~=πref\widetilde{\pi}=\pi_{\mathsf{ref}} is static, we can simply re-use the responses τ~(1),…,τ~(t)\widetilde{\tau}^{{\scriptscriptstyle(1)}},\ldots,\widetilde{\tau}^{{\scriptscriptstyle(t)}} for this task, setting Dopt(t)={τ~(1),…,τ~(t)}\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t)}}=\left\{\widetilde{\tau}^{{\scriptscriptstyle(1)}},\ldots,\widetilde{\tau}^{{\scriptscriptstyle(t)}}\right\}. However, for general time-varying sampling scheme, it may be necessary to draw a fresh dataset of responses from π~(t)\widetilde{\pi}^{{\scriptscriptstyle(t)}} to compute Dopt(t)\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t)}}.

As a practical example, Algorithm 3—displayed below—instantiates the general scheme in Algorithm 2 by setting π~(t)=unif(π(1),…,π(t))\widetilde{\pi}^{{\scriptscriptstyle(t)}}={\sf unif}(\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(t)}}) to sample from the historical data distribution at step tt. For this scheme, it suffices to set Dopt(t)={τ(1),…,τ(t)}\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t)}}=\left\{\tau^{{\scriptscriptstyle(1)}},\ldots,\tau^{{\scriptscriptstyle(t)}}\right\}, re-using the responses sampled from π(1),…,π(t)\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(t)}}.

C.2 General Version of \crtcrefthm:main

Our most general sample complexity guarantee for XPO (Algorithm 1 and Algorithm 2), Theorem 3.1′, is stated in terms of the following preference-based analogue of the Sequential Extrapolation Coefficient (SEC) from Xie et al. (2023) (also known as an eluder coefficient or decoupling coefficient (Zhong et al., 2022; Ye et al., 2024)). Recall that for a trajectory τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}), we define

For a pair of policies π\pi and π~\widetilde{\pi}, we define π⊗π~\pi\otimes\widetilde{\pi} as the joint policy that, given s1s_{1}, samples τ∼π∣s1\tau\sim{}\pi\mid{}s_{1} and τ~∼π~∣s1\widetilde{\tau}\sim\widetilde{\pi}\mid{}s_{1}. We write (τ,τ~)∼π⊗π~∣s1(\tau,\widetilde{\tau})\sim{}\pi\otimes\widetilde{\pi}\mid{}s_{1} as shorthand for this process.

For a policy class Π\Pi, sampling strategy πsamp\boldsymbol{\pi}_{\mathsf{samp}}, and entropy regularization parameter β>0\beta>0, we define the Sequential Extrapolation Coefficient via

where π~(t)=πsamp(π(1),…,π(t))\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\boldsymbol{\pi}_{\mathsf{samp}}(\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(t)}}), and where we define μ(t):=1t−1∑i<tπ(i)⊗π~(i)\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}\vcentcolon={}\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(i)}}\otimes\widetilde{\pi}^{{\scriptscriptstyle(i)}}, with the convention that μ(1)\mu^{{\scriptscriptstyle(1)}} is arbitrary.

Note that for Algorithm 1, which sets π~(t)=πref\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\pi_{\mathsf{ref}} for all tt, we can simplify the definition above to

where μ(t):=1t−1∑i<tπ(i)⊗πref\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}\vcentcolon={}\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(i)}}\otimes\pi_{\mathsf{ref}}.

Our general sample complexity guarantee is as follows.

As a special case, if we set α=c⋅β(Vmax+Rmax)e2Rmax⋅log⁡(∣Π∣Tδ−1)log⁡(T)T⋅SECRLHF(Π,T,β;πref)\alpha=c\cdot{}\frac{\beta}{(V_{\mathsf{max}}+R_{\mathsf{max}})e^{2R_{\mathsf{max}}}}\cdot\sqrt{\frac{\log(\lvert\Pi\rvert T\delta^{-1})\log(T)}{T\cdot{}\mathsf{SEC_{RLHF}}(\Pi,T,\beta;\pi_{\mathsf{ref}})}} for an absolute constant c>0c>0, then Algorithm 1 ensures that with probability at least 1−δ1-\delta,

The following result shows that the SEC is always bounded by the coverability coefficient in Definition 3.1.

Theorem 3.1 follows immediately by combining Theorem 3.1′ with Lemma D.1.

D.3 Additional Examples for \crtcrefthm:main_general

for a given value function class F⊆(S×A→Rmax)\mathcal{F}\subseteq(\mathcal{S}\times\mathcal{A}\to R_{\mathsf{max}}). Note that for such a class, we can take Vmax≤RmaxV_{\mathsf{max}}\leq R_{\mathsf{max}}, and that Qβ⋆∈FQ^{\star}_{\beta}\in\mathcal{F} implies that πβ⋆∈ΠF\pi^{\star}_{\beta}\in\Pi_{\mathcal{F}}.

The following lemma bounds the SEC for log-linear policy classes in terms of a preference-based analogue of the value function SEC in Xie et al. (2023).

For any value function class F⊆(S×A→Rmax)\mathcal{F}\subseteq(\mathcal{S}\times\mathcal{A}\to R_{\mathsf{max}}), we have that SECRLHF(Π,T,β;πsamp)≤SECRLHF(F,T;πsamp)\mathsf{SEC_{RLHF}}(\Pi,T,\beta;\boldsymbol{\pi}_{\mathsf{samp}})\leq\mathsf{SEC_{RLHF}}(\mathcal{F},T;\boldsymbol{\pi}_{\mathsf{samp}}), where

where π(t):=πf(t)\pi^{{\scriptscriptstyle(t)}}\vcentcolon={}\pi_{f^{{\scriptscriptstyle(t)}}}, π~(t)=πsamp(π(1),…,π(t))\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\boldsymbol{\pi}_{\mathsf{samp}}(\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(t)}}), and μ(t):=1t−1∑i<tπ(i)⊗π~(i)\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}\vcentcolon={}\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(i)}}\otimes\widetilde{\pi}^{{\scriptscriptstyle(i)}} (with the convention that μ(1)\mu^{{\scriptscriptstyle(1)}} is arbitrary), and where Tβ\mathcal{T}_{\beta} is the KL-regularized Bellman operator defined in Section D.4.

Proof of Lemma D.2. This is an immediate corollary of Lemma D.4. ∎

We first apply this bound to give a polynomial bound on the SEC in tabular DCMDPs where S\mathcal{S} and A\mathcal{A} are finite.

Suppose that πsamp\boldsymbol{\pi}_{\mathsf{samp}} sets π(t)=π~\pi^{{\scriptscriptstyle(t)}}=\widetilde{\pi} for all tt for some fixed policy π~\widetilde{\pi}. When F={f:S×A→Rmax}\mathcal{F}=\left\{f:\mathcal{S}\times\mathcal{A}\to R_{\mathsf{max}}\right\} consists of all functions over tabular state and action spaces with ∣S∣,∣A∣<∞\lvert\mathcal{S}\rvert,\lvert\mathcal{A}\rvert<\infty, we have SECRLHF(F,T;πsamp)≤O~(H∣S∣∣A∣)\mathsf{SEC_{RLHF}}(\mathcal{F},T;\boldsymbol{\pi}_{\mathsf{samp}})\leq\widetilde{O}(H\lvert\mathcal{S}\rvert\lvert\mathcal{A}\rvert) and log⁡∣ΠF∣≲O~(∣S∣∣A∣)\log\lvert\Pi_{\mathcal{F}}\rvert\lesssim\widetilde{O}(\lvert\mathcal{S}\rvert\lvert\mathcal{A}\rvert). It follows that XPO (Algorithm 1) achieves

Example D.1 is a corollary of the following more general result.

In a Linear MDP (Jin et al., 2020), we have

for B=O(d)B=O(\sqrt{d}) and R=O(Rmax)R=O(R_{\mathsf{max}}), then πβ⋆∈ΠF\pi^{\star}_{\beta}\in\Pi_{\mathcal{F}}, satisfying Assumption 3.1. For this setting, when πsamp\boldsymbol{\pi}_{\mathsf{samp}} sets π(t)=π~\pi^{{\scriptscriptstyle(t)}}=\widetilde{\pi} for all tt for some fixed policy π~\widetilde{\pi}, we have SECRLHF(F,T;πsamp)≤O~(d)\mathsf{SEC_{RLHF}}(\mathcal{F},T;\boldsymbol{\pi}_{\mathsf{samp}})\leq\widetilde{O}(d) and log⁡∣ΠF∣≲O~(d)\log\lvert\Pi_{\mathcal{F}}\rvert\lesssim\widetilde{O}(d). It follows that XPO (Algorithm 1) achieves

In this section, we give some basic background on value functions and dynamic programming for the KL-regularized MDP (Ziebart et al., 2008; Ziebart, 2010), then use these properties to prove Lemmas D.3 and D.4, which show that the optimal KL-regularized policy implicitly performs models rewards and performs Q⋆Q^{\star}-approximation.

and that the policy that obtains the maximum above is

From here, beginning with Qβ⋆(sH,aH):=r(sH,aH)Q^{\star}_{\beta}(s_{H},a_{H})\vcentcolon={}r(s_{H},a_{H}), πβ⋆(aH∣sH)=πQβ⋆(aH∣sH)\pi^{\star}_{\beta}(a_{H}\mid{}s_{H})=\pi_{Q^{\star}_{\beta}}(a_{H}\mid{}s_{H}), and Vβ⋆(sH)=VQβ⋆(sH)V^{\star}_{\beta}(s_{H})=V_{Q^{\star}_{\beta}}(s_{H}) for sH∈SHs_{H}\in\mathcal{S}_{H}, for each sh∈Shs_{h}\in\mathcal{S}_{h}, we can inductively define for each h∈[H]h\in[H]:

The following lemma, generalizing Rafailov et al. (2024), shows that the optimal KL-regularized policy πβ⋆\pi^{\star}_{\beta} can be viewed as implicitly modeling rewards.

For any DCMDP, it holds that for all admissibleWe use “admissible” to a refer to a trajectory generated by executing an arbitrary policy π:S→Δ(A)\pi:\mathcal{S}\to\Delta(\mathcal{A}) in the MDP. trajectories τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}),

where Vβ⋆V^{\star}_{\beta} is the KL-regularized value function defined in Eq. 26.

Proof of Lemma D.3. Let τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}), and recall that for any DCMDP, all state transitions except for s1∼ρs_{1}\sim\rho are deterministic. Then we have

where the second equality uses that (Tβf)(sh,ah)=r(sh,ah)+Vf(sh+1)(\mathcal{T}_{\beta}f)(s_{h},a_{h})=r(s_{h},a_{h})+V_{f}(s_{h+1}) for any admissible trajectory in a deterministic MDP, and the third equality uses the explicit form for πβ⋆\pi^{\star}_{\beta} in terms of Vβ⋆V^{\star}_{\beta} and Qβ⋆Q^{\star}_{\beta} given in Equation 25. Rearranging yields the result. ∎

We can also prove the following, more general version of Lemma D.4.

Proof of Lemma D.4. Let τ=(s1,a1),…,(sH,aH)\tau=(s_{1},a_{1}),\ldots,(s_{H},a_{H}). Then we have

where the first equality uses the definition of VfV_{f}, the second equality uses that (Tβf)(sh,ah)=r(sh,ah)+Vf(sh+1)(\mathcal{T}_{\beta}f)(s_{h},a_{h})=r(s_{h},a_{h})+V_{f}(s_{h+1}) for any admissible trajectory in a deterministic MDP, and the third equality uses that πf(a∣s)=πref(a∣s)ef(s,a)−Vf(s)β\pi_{f}(a\mid{}s)=\pi_{\mathsf{ref}}(a\mid{}s)e^{\frac{f(s,a)-V_{f}(s)}{\beta}}. Rearranging yields the result. ∎

D.5 Regret Decomposition

In this section we prove the central regret decomposition for XPO, restated below.

Proof of Lemma 3.1. It follows immediately from the definition of the KL-regularized reward that

However, since βlog⁡πβ⋆(τ)πref(τ)−r(τ)=Vβ⋆(s1)\beta\log\frac{\pi^{\star}_{\beta}(\tau)}{\pi_{\mathsf{ref}}(\tau)}-r(\tau)=V^{\star}_{\beta}(s_{1}) for all admissible trajectories by Lemma D.3, we have that

for all policies ν\nu, as the initial state s1s_{1} does not depend on the policy under consideration. The result now follows by rearranging

D.6 Concentration Lemmas

Recall that we define μ(t)=1t−1∑i<tπ(i)⊗π~(i)\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}=\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(i)}}\otimes\widetilde{\pi}^{{\scriptscriptstyle(i)}}. For a given policy π\pi, define

The following lemma is our central concentration guarantee for Algorithm 1.

Suppose that Assumptions 3.2 and 3.1 hold. Then Algorithm 1 guarantees that with probability at least 1−δ1-\delta, for all steps t∈[T]t\in[T],

for κ:=(8(Rmax+Vmax)e2Rmax)−2\kappa\vcentcolon={}(8(R_{\mathsf{max}}+V_{\mathsf{max}})e^{2R_{\mathsf{max}}})^{-2}.

Proof of Lemma D.5. Let t∈{2,…,T+1}t\in\left\{2,\ldots,T+1\right\} be fixed.

and B^(t)(π)=α∑τ∈Dopt(t−1)log⁡π(τ)\widehat{B}^{{\scriptscriptstyle(t)}}(\pi)=\alpha\sum_{\tau\in\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t-1)}}}\log\pi(\tau). Then we can equivalently write

For a given policy π\pi, recall that we define

Then, in light of Lemma D.3, under the Bradley-Terry model (Eq. 1), we have that for all tt,

For any fixed t≥1t\geq{}1, with probability at least 1−δ1-\delta, all π∈Π\pi\in\Pi satisfy

Rearranging Lemma D.6, with probability at least 1−δ1-\delta, all π∈Π\pi\in\Pi satisfy

Hence, as long as πβ⋆∈Π\pi^{\star}_{\beta}\in\Pi (Assumption 3.1), the definition of π(t)\pi^{{\scriptscriptstyle(t)}} in Algorithm 2 implies that

We next appeal to another basic concentration result.

For any fixed t≥1t\geq{}1, with probability at least 1−δ1-\delta, all π∈Π\pi\in\Pi satisfy

Combining Lemma D.7 with Eq. 32, we conclude that with probability at least 1−2δ1-2\delta,

To conclude, we further simplify the expression via

where the last inequality uses that for x,y≥0x,y\geq{}0, (x−y)2≤4(x+y)(x−y)2(x-y)^{2}\leq{}4(x+y)(\sqrt{x}-\sqrt{y})^{2}.

Finally, using Lemma D.3, we have fπβ⋆∈[−Rmax,Rmax]f_{\pi^{\star}_{\beta}}\in\left[-R_{\mathsf{max}},R_{\mathsf{max}}\right] almost surely, while fπ(t)∈[−Vmax,Vmax]f_{\pi^{{\scriptscriptstyle(t)}}}\in\left[-V_{\mathsf{max}},V_{\mathsf{max}}\right] by Assumption 3.2. We appeal to the following lemma.

If x∈[−X,X]x\in\left[-X,X\right] and y∈[−Y,Y]y\in[-Y,Y] for X≥0X\geq{}0, Y≥1Y\geq{}1, then

This proves the result after taking a union bound over all steps tt.

Next, using Eq. 30 and a somewhat standard argument from van de Geer (2000); Zhang (2006), we calculate that

Since DH2(⋅,⋅)≤2D^{2}_{\mathsf{H}}\left(\cdot,\cdot\right)\leq{}2 and −log⁡(1−x)≥x-\log(1-x)\geq{}x for x≤1x\leq{}1, we conclude that

Proof of Lemma D.7. Let τ(1),…,τ(t−1)\tau^{{\scriptscriptstyle(1)}},\ldots,\tau^{{\scriptscriptstyle(t-1)}} denote the trajectories in Dopt(t−1)\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t-1)}}. Let b^(i)(π)=αlog⁡π(τ(i))\widehat{b}^{{\scriptscriptstyle(i)}}(\pi)=\alpha\log\pi(\tau^{{\scriptscriptstyle(i)}}), and let

which implies that ∣Z(i)(π)∣≤2αβVmax\left\lvert Z^{{\scriptscriptstyle(i)}}(\pi)\right\rvert\leq{}2\frac{\alpha}{\beta}V_{\mathsf{max}}. From here, the result follows immediately by applying Lemma B.1 with the sequence (Zi(π))(Z_{i}(\pi)) and taking a union bound over π∈Π\pi\in\Pi. ∎

Proof of Lemma D.8. We consider three cases. First, if x∈[−2Y,2Y]x\in\left[-2Y,2Y\right], then

for some z∈[−2Y,2Y]z\in\left[-2Y,2Y\right]. In this regime, we have σ′(z)≥σ′(2Y)=e2Y/(1+e2Y)2≥(4e2Y)−1\sigma^{\prime}(z)\geq{}\sigma^{\prime}(2Y)=e^{2Y}/(1+e^{2Y})^{2}\geq{}(4e^{2Y})^{-1}. Next, if x≥2Y>0x\geq{}2Y>0, we can directly bound

where the last line holds whenever Y≥1Y\geq{}1. We conclude in this case that

Finally, we consider the case where x≤−2Y≤0x\leq{}-2Y\leq{}0. In this case, we can similarly lower bound

as long as Y≥1Y\geq{}1. From here, proceeding in the same fashion as the second case yields the result. ∎

D.7 Proof of \crtcrefthm:main_general

Proof of Theorem 3.1′. Before diving into the proof, we re-state two central technical lemmas. The first lemma, generalizing Rafailov et al. (2024), shows that the optimal KL-regularized policy πβ⋆\pi^{\star}_{\beta} can be viewed as implicitly modeling rewards.

This lemma allows us to view the DPO objective as a form of implicit Q⋆Q^{\star}-approximation. Building on this lemma, we prove the following regret decomposition.

This result shows that the (regularized) regret of any policy π\pi can be decomposed into two terms. The term in Eq. 14 measures the extent to which π\pi (implicitly) models the reward; by Lemma D.3, this term is zero when π=πβ⋆\pi=\pi^{\star}_{\beta}. Meanwhile, the term in Eq. 13 measures the extent to which the policy π\pi over-estimates the internal reward; we will control this term using optimism. Importantly, the regret decomposition in Lemma 3.1 holds for an arbitrary roll-in policy ν\nu. This will facilitate minimizing the terms in the regret decomposition in a data-driven fashion. Before proceeding, we remark that Lemma D.3 and Lemma 3.1 together imply that

For each step tt, we apply Lemma 3.1 with π=π(t)\pi=\pi^{{\scriptscriptstyle(t)}} and ν=π~(t−1)\nu=\widetilde{\pi}^{{\scriptscriptstyle(t-1)}}, which gives

Next, recall that we define μ(t)=1t−1∑i<tπ(t)⊗π~(t)\boldsymbol{\mu}^{{\scriptscriptstyle(t)}}=\frac{1}{t-1}\sum_{i<t}\pi^{{\scriptscriptstyle(t)}}\otimes\widetilde{\pi}^{{\scriptscriptstyle(t)}} Consider a fixed step t≥2t\geq{}2, and define

Then, using the AM-GM inequality, for any η>0\eta>0 we can bound

Note that by definition, we have that ∑t=1TI(t)≤SECRLHF(Π,T,β;πsamp)\sum_{t=1}^{T}\mathcal{I}^{{\scriptscriptstyle(t)}}\leq\mathsf{SEC_{RLHF}}(\Pi,T,\beta;\boldsymbol{\pi}_{\mathsf{samp}}). Hence, by plugging Eq. 36 into Eq. 35 and summing, we conclude that

above. Let fπ(τ,τ~):=βlog⁡π(τ)πref(τ)−βlog⁡π(τ~)πref(τ~)f_{\pi}(\tau,\widetilde{\tau})\vcentcolon={}\beta\log\frac{\pi(\tau)}{\pi_{\mathsf{ref}}(\tau)}-\beta\log\frac{\pi(\widetilde{\tau})}{\pi_{\mathsf{ref}}(\widetilde{\tau})}. By Lemma D.3, we have that for any pair of admissible trajectories (τ,τ~)(\tau,\widetilde{\tau}) that share the initial state s1s_{1}, fπβ⋆(τ,τ~)=r(τ)−r(τ~)f_{\pi^{\star}_{\beta}}(\tau,\widetilde{\tau})=r(\tau)-r(\widetilde{\tau}), so we can rewrite Eq. 38 as

We now recall the central concentration lemma for XPO (Lemma D.5).

It follows that if we set η=βκαT≤βκα(t−1)\eta=\frac{\beta\kappa}{\alpha{}T}\leq{}\frac{\beta\kappa}{\alpha(t-1)}, then with probability at least 1−δ1-\delta, for all t∈[T]t\in[T],

Plugging this bound back into Eq. 37, we have that

where the last line uses that κ≤Vmax−2\kappa\leq V_{\mathsf{max}}^{-2}. It follows that by choosing

Finally, we note that (Vmax+κ−1/2)=O((Vmax+Rmax)e2Rmax)(V_{\mathsf{max}}+\kappa^{-1/2})=O((V_{\mathsf{max}}+R_{\mathsf{max}})e^{2R_{\mathsf{max}}}).

D.8 Proofs for SEC Bounds

be the distribution that achieves the value of the coverability coefficient in Definition 3.1. Let us abbreviate Ccov≡Ccov(Π)C_{\mathsf{cov}}\equiv C_{\mathsf{cov}}(\Pi). For a trajectory τ\tau, let

Letting T:=(S×A)H\mathcal{T}\vcentcolon={}(\mathcal{S}\times\mathcal{A})^{H}, we can further bound this by

so that (I)≤32Ccov\text{(I)}\leq{}32C_{\mathsf{cov}}.

where the last inequality is by Cauchy-Schwarz. We conclude that

To proceed, we restrict our attention to the case where π~(t)=π~\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\widetilde{\pi} for all tt for some fixed π~\widetilde{\pi}. We observe that in this case, for all tt,

since τ\tau and τ~\widetilde{\tau} are conditionally independent given s1s_{1}, and since dπ,π′(τ,τ~)=0d^{\pi,\pi^{\prime}}(\tau,\widetilde{\tau})=0 if τ,τ~\tau,\widetilde{\tau} do not share the same s1s_{1}. It follows that

Finally, by Lemma 4 of Xie et al. (2023), we have that for all τ∈T\tau\in\mathcal{T}, ∑t=1Tdπ(t)(τ)∑i<tdπ(i)(τ)+Ccovν(τ)≤O(log⁡(T))\sum_{t=1}^{T}\frac{d^{\pi^{{\scriptscriptstyle(t)}}}(\tau)}{\sum_{i<t}d^{\pi^{{\scriptscriptstyle(i)}}}(\tau)+C_{\mathsf{cov}}{}\nu(\tau)}\leq{}O(\log(T)), which yields (II)≤O(Ccovlog⁡(T))\text{(II)}\leq O(C_{\mathsf{cov}}\log(T)). This proves the result.

Proof for Example D.2. We claim for any pair of trajectories τ,τ~\tau,\widetilde{\tau} and function f∈Ff\in\mathcal{F}, we can write

With this definition, we observe that in the case where π~(t)=π~\widetilde{\pi}^{{\scriptscriptstyle(t)}}=\widetilde{\pi} for all tt, we can write the value of SECRLHF\mathsf{SEC_{RLHF}} for a sequence of policies π(1),…,π(T)\pi^{{\scriptscriptstyle(1)}},\ldots,\pi^{{\scriptscriptstyle(T)}} as

Appendix E Additional Proofs

This section contains proofs for supporting results found throughout Section 2 and Section 3.

Proof of Proposition 2.1. Consider the bandit setting where H=1H=1, S=∅\mathcal{S}=\varnothing, and A={a,b}\mathcal{A}=\{\mathfrak{a},\mathfrak{b}\}. Let β>0\beta>0 be given. We consider the reward function rr given by r(a)=1r(\mathfrak{a})=1 and r(b)=12r(\mathfrak{b})=\frac{1}{2}. We choose the reference model to set πref(a)=ε\pi_{\mathsf{ref}}(\mathfrak{a})=\varepsilon and πref(b)=1−ε\pi_{\mathsf{ref}}(\mathfrak{b})=1-\varepsilon for a parameter ε:=exp⁡(−cβ)\varepsilon\vcentcolon={}\exp(-\frac{c}{\beta}), where c>0c>0 is an absolute constant whose value will be chosen at the end of the proof. We choose Π={πref,πβ⋆}\Pi=\{\pi_{\mathsf{ref}},\pi^{\star}_{\beta}\}, which we note satisfies Assumption 3.1 and Assumption 3.2 with Vmax=O(1)V_{\mathsf{max}}=O(1).

Specialized to the bandit setting, Online DPO takes the following simplified form:

Sample pair of actions a(t),a~(t)∼π(t)a^{{\scriptscriptstyle(t)}},\widetilde{a}^{{\scriptscriptstyle(t)}}\sim\pi^{{\scriptscriptstyle(t)}}.

Label the actions as (a+(t),a−(t))(a_{+}^{{\scriptscriptstyle(t)}},a_{-}^{{\scriptscriptstyle(t)}}) according the Bradley-Terry model:

and update Dpref(t+1)←Dpref(t)∪{(a+(t),a−(t))}\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t+1)}}\leftarrow{}\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t)}}\cup\{(a_{+}^{{\scriptscriptstyle(t)}},a_{-}^{{\scriptscriptstyle(t)}})\}.

Compute π(t+1)\pi^{{\scriptscriptstyle(t+1)}} via

Our construction uses the fact that depending on the preference dataset Dpref(t)\mathcal{D}_{\mathsf{pref}}^{{\scriptscriptstyle(t)}}, the minimizer in Eq. 45 may not be uniquely defined. Let E(t)\mathcal{E}^{{\scriptscriptstyle(t)}} denote the event that at iteration tt, a(t)=a~(t)=ba^{{\scriptscriptstyle(t)}}=\widetilde{a}^{{\scriptscriptstyle(t)}}=\mathfrak{b}. We appeal to a technical lemma.

Suppose we initialize with π(1)=πref\pi^{{\scriptscriptstyle(1)}}=\pi_{\mathsf{ref}}. As long as c≤18c\leq\frac{1}{8}, ε≤1/2\varepsilon\leq{}1/2, the following properties hold:

Whenever E(1),…,E(t)\mathcal{E}^{{\scriptscriptstyle(1)}},\ldots,\mathcal{E}^{{\scriptscriptstyle(t)}} hold, we can choose the policy π(t+1)\pi^{{\scriptscriptstyle(t+1)}} to satisfy π(t+1)=πref\pi^{{\scriptscriptstyle(t+1)}}=\pi_{\mathsf{ref}}, which has

By Lemma E.1 and the union bound, we have that

as long as T≤12εT\leq{}\frac{1}{2\varepsilon}. It follows that whenever this occurs, max⁡πJβ(π)−Jβ(π(t))≥18\max_{\pi}J_{\beta}(\pi)-J_{\beta}(\pi^{{\scriptscriptstyle(t)}})\geq{}\frac{1}{8} for all t∈[T+1]t\in[T+1].

Note that since online DPO selects π(t)=πref\pi^{{\scriptscriptstyle(t)}}=\pi_{\mathsf{ref}} for all tt in our counterexample above, this also immediately implies a lower bound for offline DPO (interpreting π(T+1)\pi^{{\scriptscriptstyle(T+1)}} as the policy returned by offline DPO).

Proof of Lemma E.1. We prove this claim inductively. Let t∈[T]t\in[T] be fixed, and suppose the claim holds for 1,…,t−11,\ldots,t-1. If we assume E(1),…,E(t−1)\mathcal{E}^{{\scriptscriptstyle(1)}},\ldots,\mathcal{E}^{{\scriptscriptstyle(t-1)}} hold, then we have π(t)=πref\pi^{{\scriptscriptstyle(t)}}=\pi_{\mathsf{ref}} inductively. In this case,

Now, for the second part of the claim, suppose that E(1),…,E(t+1)\mathcal{E}^{{\scriptscriptstyle(1)}},\ldots,\mathcal{E}^{{\scriptscriptstyle(t+1)}} hold. Then for all t′∈[t+1]t^{\prime}\in[t+1], a+(t′)=a−(t′)=ba_{+}^{{\scriptscriptstyle(t^{\prime})}}=a_{-}^{{\scriptscriptstyle(t^{\prime})}}=\mathfrak{b}, which implies that

for all π∈Π\pi\in\Pi such that π≪πref\pi\ll\pi_{\mathsf{ref}}. It follows that π(t+1)=πref\pi^{{\scriptscriptstyle(t+1)}}=\pi_{\mathsf{ref}} is a valid minimizer for Eq. 45.

Finally, we compute that as long as ε≤1/2\varepsilon\leq{}1/2 and c≤18c\leq\frac{1}{8}

Appendix F Experiments: Additional Results and Details

Table 2 displays the performance of XPO and the comparator models described in Section 3.4 on additional reasoning tasks. We observe that the XPO model outperforms Llama-3-8B-it, and still comparable to Llama-3-8B-Flow-Final, which uses 4x more data than XPO. The average over all academic benchmarks is 59.94 for Llama-3-8B-Flow-Final vs. 59.61 for XPO-iter3, in addition to the performance gain from XPO-iter3 in the chat benchmarks (Table 1).

The experiments were conducted on 8 x Nvidia H100 GPUs. In our implementation, we mainly follow the general version of XPO (Algorithm 2), and we pick π~(t)=π(t)\widetilde{\pi}^{\scriptscriptstyle(t)}=\pi^{\scriptscriptstyle(t)} and Dopt(t)=Dpref(t)\mathcal{D}_{\mathsf{opt}}^{{\scriptscriptstyle(t)}}=\mathcal{D}_{\mathsf{pref}}^{\scriptscriptstyle(t)}. In each iteration, we fix the base model (Llama-3-8B-Flow-SFT) as πref\pi_{\mathsf{ref}}, set β=0.1\beta=0.1, use a global batch size of 1616, and use a learning rate of 5×10−75\times 10^{-7} with cosine scheduling. The α\alpha parameter follows the schedule {1×10−5,5×10−6,0}\{1\times 10^{-5},5\times 10^{-6},0\} for the three iterations. We clip the log⁡π(τ)πref(τ)\log\frac{\pi(\tau)}{\pi_{\mathsf{ref}}(\tau)} term for both positive and negative trajectories to $$, but only for the exploration term, in order to enhance stability. This is motivated by Assumption 3.2. The number of training epochs for each iteration is 2, and the warmup ratio is 0.03.