betaFeedback

WorksComputer Science

Aligning Large Language Models with Human Feedback: Mathematical Foundations and Algorithm Design

Abstract

This article provides an introduction to the mathematical foundations and algorithmic frameworks used to align Large Language Models (LLMs) with human intentions, preferences, and values. We discuss standard alignment techniques, such as fine-tuning (SFT), reinforcement learning with human feedback (RLHF), and direct preference optimization (DPO). We also explore the theoretical underpinnings of learning from human preferences, drawing connections to inverse reinforcement learning (IRL) and discrete choice models. We present state-of-the-art algorithms in a tutorial style, discuss their advantages and limitations, and offer insights into practical implementation. Our exposition is intended to serve as a comprehensive resource for researchers and practitioners, providing both a foundational understanding of alignment methodologies and a framework for developing more robust and scalable alignment techniques.

Introduction

Background. As large language models (LLMs) have taken the world by storm, it is clear that generative AI systems will soon become ubiquitous in our lives. LLMs have been applied beyond chatbots and personal assistants to tackle complex challenges, including video gaming [1] and autonomous control [2]. After the successful introduction and demonstrated efficacy of alignment training in LLMs [3, 4], the concept of alignment has been playing an increasingly important role in the design and training of AI systems. Loosely speaking, alignment refers to the performance guarantee that the AI system will generate outcomes that are intended or preferred by the human user without undesirable side effects or behaviors such as deception or manipulation.

More technically, the LLM alignment problem involves fine-tuning or adjusting a base model that was originally trained on extensive, diverse datasets. While such a base model is trained to learn core behaviors and general knowledge, it often falls short when applied to specific tasks or to meeting the nuanced preferences of a human user. To better align the model, additional feedback is gathered from human experts who evaluate and/or rank the model’s performance within a specific task context. As demonstrated in [4, 5], reinforcement learning (RL) holds significant promise for LLM alignment by leveraging additional feedback to enhance their performance. This feedback embodies expert judgments regarding both the accuracy of the model’s responses and any particular preferences they may have. The goal is to refine the model to better meet these specific requirements, ultimately enhancing its task relevance and user satisfaction. Generally, it is observed that after the alignment process, LLMs can follow human instructions well, and can avoid providing toxic and non-preferable responses. Please refer to Figure 1 as an illustration of the alignment process.

Figure 1. An illustration of the alignment process.

Contributions of This Work. Despite extensive study of the alignment problem in recent literature, this research area remains young, and it is still evolving rapidly with many unresolved theoretical challenges. A primary contribution of this article is to introduce the signal processing community to the fundamentals of alignment, highlight state-of-the-art algorithms and approaches, and clarify the intersection between alignment methodologies and various techniques relevant to signal processing (SP).

We believe that our article will foster interdisciplinary contributions and expand the role of SP in LLM alignment research. By understanding the alignment problem, SP researchers can leverage their expertise in mathematical modeling, noise handling, inverse problem-solving, and optimization to address a number of key challenges. For instance, similar to reconstructing signals from observed data in SP, many alignment approaches involve solving inverse problems, such as learning the human preference models from the data. Therefore, we expect that introducing the alignment to SP professionals can foster innovation in AI safety, inspire novel techniques, and accelerate the development of robust, generalizable alignment frameworks that can be applied across diverse applications.

Organization of this work. The article is organized as follows. In § 2, we provide the readers with an overview of the LLM training process. In § 3, we discuss some classical notion and techniques of learning from human preference, which serves as the foundation for many alignment approaches to be discussed subsequently. In § 4, we provide a detailed discussion of a number of state-of-the-art algorithms for different stages of LLM alignment. In § 5, we provide readers with a framework that unify a few alignment algorithms discussed in the previous section under a single formulation. In § 6, we provide some high-level discussion. In § 8, we conclude with final remarks and open questions.

Preliminaries

In this section, we provide a basic description of the LLM training process, while emphasizing the basic concepts relevant for alignment problems that we will describe in the sequel.

LLM Representation. Consider an LLM parameterized by parameters θ\theta and denote the output probability by π(y∣x;θ)\pi(y|x;\theta) where x:=[x1,…,xn]x := [x_1,\ldots,x_n] is the sequence of input prompts and y:=[y1,…,ym]y := [y_1,\ldots,y_m] is the sequence of output continuation, where nn and mm are their sequence length, correspondingly. In practice, each one of yiy_i and xjx_j is a token, which is one element of a token vocabulary. A token is a discrete unit that represents certain semantic information. For example, a word “learning” itself could be one token in the vocabulary, however more commonly two elements “learn” and “-ing” are both tokens where “-ing” represents the semantic information of tense. A tokenizer is commonly utilized to transform an input natural language sentence into sequence of tokens x=[x1,…,xn]x = [x_1, \ldots, x_n] and y=[y1,…,ym]y = [y_1, \ldots, y_m]. Given sequences xx and yy, we use ∣x∣|x| and ∣y∣|y| to denote the length of the sequence xx and yy.

Typical LLM is an auto-regressive model, meaning that it predicts the output probability of the yjy_j given all tokens in xx and y<j:=[y1,…,yj−1]y_{<j} := [y_1, \ldots, y_{j-1}] (y<1y_{<1} is null). More precisely, the probability of producing a sequence yy can be defined as:

π(y∣x;θ)=∏j=1mπ(yj∣x,y<j;θ).(1)\pi(y|x;\theta) = \prod_{j=1}^{m} \pi(y_j|x,y_{<j};\theta). \tag*{(1)}

The state-of-the-art LLMs are built upon the attention mechanism [6] and θ\theta represents all the trainable parameters, including the attention matrices and weights of the feed-forward layers.

Illustration of Auto-regressive LLMs

Figure 2. An illustration of Auto-regressive LLMs. Here <BOS> and <EOS> are two special tokens representing the start and the end of the sentence, respectively. The tokens at the bottom are the input token sequence, and those at the top are the output tokens. In this example, the token sequence “<BOS> All transformer models ” is given to the LLM and “are generative models <EOS>” is the prediction. Each of the previous tokens will be used to predict the next token, corresponding to (1).

Model Architecture. Before going to the details, we briefly discuss the standard architectural design adopted by modern large language models. Most LLMs are built upon the Transformer [6] architecture, which consists of a stack of self-attention and feed-forward (MLP) [7] layers interleaved with normalization [8] and residual connections [9]. Each input token xix_i is first embedded into a continuous representation and then processed through multiple attention heads, where self-attention [6] computes contextualized token representations by weighting all previous tokens according to their learned relevance. Formally, each attention head computes Attn⁡(Q,K,V)=softmax⁡(QK⊤dk)V\operatorname{Attn}(Q, K, V) = \operatorname{softmax}\left(\frac{QK^{\top}}{\sqrt{d_k}}\right)V, where Q,K,VQ, K, V are linear projections of the hidden states. The output of each attention block is then passed through the MLP layers or normalization layers such as LayerNorm [10], forming one Transformer block. Stacking LL such blocks yields a deep auto-regressive model that predicts the next-token probability π(yj∣x,y<j;θ)\pi(y_j|x,y_{<j};\theta) as defined in (1). These components together define the function class π(⋅;θ)\pi(\cdot;\theta) over which subsequent alignment and optimization problems are formulated.

Next, we provide an overview of the different stages of LLM training. Before delving into the alignment-specific stages, it is worth noting that fine-tuning is widely used in LLM training beyond alignment tasks. Depending on the supervision signal, fine-tuning can take the form of supervised fine-tuning (SFT) or RL-based optimization. These approaches have been extensively applied to a variety of downstream objectives, including domain adaptation, instruction following [11], reasoning enhancement [5, 12], controllable generation [13], and agent training [14, 15]. For completeness, we briefly review both stages below.

The LLM pre-training. The first stage of the training is called pre-training, where an LLM model is initialized randomly and trained over a vast corpus of documents, known as the pre-training dataset. As an example, Llama 3 model is pre-trained on more than 15T token of documents collected from all over the Internet, with the entire token vocabulary size (i.e., the total number of distinct tokens) of 128K [16]. The pre-training dataset is an unsupervised dataset, denoted as Dpre:={xi}i=1Npre\mathcal{D}_{\mathrm{pre}} := \{x^{i}\}_{i=1}^{N_{\mathrm{pre}}}, where each sample xi=[x1i,…,xmii]x^{i} = [x^{i}_{1}, \ldots, x^{i}_{m_i}] is a sequence of mim_i tokens, and mim_i denotes the length of the sequence. D\mathcal{D} is a dataset without labels usually collected from the internet, such as Wikipedia articles; the learning task at the pre-training stage is typically formulated as the so-called next-token prediction task, which predicts the next token given the current and all previous tokens shown to the LLM, and can be mathematically formulated as a negative log-likelihood minimization problem:

min⁡θ−1Npre∑i=1Nprelog⁡π(xi;θ)=−1Npre∑i=1Npre∑j=1milog⁡π(xji∣x<ji;θ).(2)\min_{\theta} -\frac{1}{N_{\mathrm{pre}}}\sum_{i=1}^{N_{\mathrm{pre}}}\log\pi(x^{i};\theta) = -\frac{1}{N_{\mathrm{pre}}}\sum_{i=1}^{N_{\mathrm{pre}}}\sum_{j=1}^{m_i}\log\pi(x^{i}_{j}|x^{i}_{<j};\theta). \tag*{(2)}

This task is commonly understood as encouraging the LLM to memorize all the given texts and enabling the LLM for more fine-grained tasks. (2) is further solved by first order optimizers such as SGD, RMSProp [17] and AdamW [18, 19]. In practice, AdamW is the default optimizer for pre-training, fine-tuning and aligning LLMs due to its efficiency and stability. We use AdamW to solve all the alignment protocols in this work unless otherwise mentioned. The LLM Alignment. Once the pre-training is done, the next step is called alignment or fine-tuning. The fine-tuning process is a supervised process that aims at improving the instruction following capabilities of LLMs to better align with human behaviors and values. It usually consists of two main steps: the supervised fine-tuning (SFT) step and the reinforcement learning with human feedback (RLHF) step.

The SFT step utilizes a demonstration dataset Ddemo:={(xi,yi)}i=1Ndemo\mathcal{D}_{\mathrm{demo}} := \{(x^{i}, y^{i})\}_{i=1}^{N_{\mathrm{demo}}}, where xx is the input prompt (such as, “Where is the capital of the US?”) and yy is the expert response (such as, “Washington, DC”). We assume that the demonstration continuations yy are collected from an expert (typically a human expert, but sometimes it can also be a very large and well-aligned model such as GPT4 which produces high quality responses), thus we also denote (x,y)∼Ddemo(x,y) \sim\mathcal{D}_{\mathrm{demo}} as x∼ρ,y∼πE(⋅∣x)x \sim\rho, y \sim\pi^{E}(\cdot|x) as their population distributions, where ρ\rho is the distribution of the input prompts when collecting the data, and πE\pi^{E} is the expert policy.

Meanwhile the RLHF step first utilizes a preference dataset to learn from human preference about the quality of the answers to a particular question xx. This dataset is denoted as Dpref:={(x,yw≻yl)}\mathcal{D}_{\mathrm{pref}} := \{(x,y_w \succ y_l)\}, where ywy_w is preferred (i.e., ‘wins’) over yly_l (i.e., ‘loses’) by a human labeler, and will be exclusively denoted as (yw≻yl)(y_w \succ y_l) throughout the paper. We use the notation x∼ρ,(yw≻yl)∼πP(⋅∣x)x \sim\rho, (y_w \succ y_l) \sim\pi^{P}(\cdot|x) to denote the population distribution of the preference dataset, where πP\pi^{P} is the preference distribution. The preference data is typically used to learn a parameterized reward function r(x,y;ϕ)r(x,y;\phi) where ϕ\phi is the reward parameters. The reward model provides a score for a given prompt-response pair (x,y)(x,y). Once such a reward function is learned, the RLHF step leverages this reward function, together with a prompt dataset Dprompt:={x}\mathcal{D}_{\mathrm{prompt}} := \{x\}, to evaluate and further improve the quality of the generated responses, through reinforcement learning (RL) process. The whole process of RLHF is summarized and illustrated in Figure 3.

Figure 3. An illustration of the standard LLM Alignment process. The standard RLHF pipeline first trains a supervised model on demonstrations, then builds a reward model from preference data, and finally optimizes the policy with RL guided by the reward model.

Below we provide an example of the demonstration and the preference data.

Example 1: Data of LLM Alignment. Given a question prompt “How should I respond to an email from my professor asking for a delayed assignment?” The demonstration data includes a preferred answer “You can politely acknowledge the delay and provide a reasonable explanation. For example: ‘Dear Professor, I apologize for the delay in submitting my assignment. I encountered unexpected challenges but will submit it by [new deadline]. Thank you for your understanding.” Meanwhile, the preference dataset includes an additional non-preferred answer, e.g., “Just say you were busy and didn’t have time. Professors have to deal with it.” Clearly, the preferred response aligns with human values of politeness and professionalism.

We will provide a detailed account of popular methods to learn from these different kinds of datasets in the subsequent sections. In a high level, the SFT step can be used to directly teach LLM to imitate the expert behavior, while the RLHF step teaches LLM to distinguish the better behavior over the worse ones, in order to achieve a better generalization.

Based on the above discussion, we can now define the LLM alignment problem as follows:

LLM alignment problem: Given a diverse dataset representing human demonstrations and preferences, how can we effectively train an LLM to consistently generate outputs that align with human values, ethical principles, and intended use cases?

The LLM Evaluation. Before closing this introductory section, let us briefly discuss how the LLMs are evaluated after different stages of training. At the pre-training stage, the model learns to predict the next token probabilistically. The model is thus evaluated on how well it predicts the next token, and the common measure is the perplexity (PPL).

Mathematically, given a sequence x=[x1,…,xm]x = [x_1, \ldots, x_m], perplexity is defined as the exponential of the average negative log-likelihood of the tokens:

PPL⁡(x;θ):=exp⁡(−1m∑j=1mlog⁡π(xj∣x<j;θ))\operatorname{PPL}(x;\theta) := \exp\left(-\frac{1}{m}\sum_{j=1}^{m}\log\pi(x_j \mid x_{<j};\theta)\right)

which assigns a single score to each sequence. A lower perplexity indicates that the model is more confident and accurate in predicting the next tokens.

In the fine-tuning stage, multiple metrics are typically used. After the SFT step, the metric is usually determined by the nature of the task. For classification tasks such as sentiment analysis (i.e., given a text of words, determine whether the sentiment of the text is positive or negative), traditional metrics, such as accuracy, precision and recall are used; For translation tasks, BLEU (BiLingual Evaluation Understudy) score is the most popular metric, which measures how similar a machine-translated text is to a human-written reference translation. After the RLHF step, the aligned model could be evaluated by win-rates from human raters or some judge models (typically takes the form of a specialized LLM), which calculate the favorability of the model response over other models/ground truth response.

In the next section, we will begin our technical discussion by delving into classical techniques on learning from human feedback data. This will serve as mathematical foundation for various alignment techniques to be discuss subsequently.

Theoretical Foundations of Learning from Human Feedback.

Given the background above, it is clear that the alignment problem is closely related to the problem of modeling human behaviors through the observed choices. Indeed, in the context of LLM, the response yy in the demonstration data as well as the labels that distinguish ywy_w’s with yly_l’s can both be viewed as human choices. It turns out that there is a vast literature about developing models for discrete choices, and these models were first used to describe discrimination between perceptual stimuli [20] and choices for urban transportation modes [21]. In this section, we will provide a brief overview of this literature.

Classical models of discrete choice

The choice models are used to describe observed choices (or actions) a∈Aa \in A made by a decision maker given a relevant state variable s∈Ss \in S. A parallel to LLM alignment problem described in the previous section can be made by having the state ss correspond to the prompt xx and the action aa corresponds to the possible responses yy’s to the prompt.

As in the previous section, we use the notation (s,a)≻(s,a′)(s, a) \succ(s, a') to indicate that in state ss action a∈Aa \in A is preferred over a′∈Aa' \in A. An assumed structure of preferences over action set AA is a relation ≻\succ, which is

  • Complete: (s,a)≻(s,a′)(s, a) \succ(s, a') or a′≻aa' \succ a for all a,a′∈Aa, a' \in A and s∈Ss \in S.

  • Transitive: (s,a)≻(s,a′)(s, a) \succ(s, a') and (s,a′)≻(s,a′′)(s, a') \succ(s, a'') implies (s,a)≻(s,a′′)(s, a) \succ(s, a''), for all a,a′,a′′∈Aa, a', a'' \in A, s∈Ss \in S.

A structure of preferences can be modeled by a reward (or utility) function r:S×A↦Rr : S \times A \mapsto\mathbb{R}, such that (s,a)≻(s,a′)(s, a) \succ(s, a') if and only if r(s,a)>r(s,a′)r(s, a) > r(s, a'). This implies when in state ss, the decision maker will always prefer aa to a′a'. However in practice, one may observe a decision maker engages in mixing, i.e. implementing different actions when in the same state s∈Ss \in S. In the context of LLM alignment, mixing corresponds to observing different responses to the same prompt.

There are several ways of modeling mixing in the literature of discrete choice:

Random Utility: In this model, the decision maker perceives a random reward (or utility) r(s,a)+ϵ(a)r(s, a) + \epsilon(a) (where ϵ(a)\epsilon(a) is a random variable) given the pair (s,a)(s, a). A pair (s,a)(s, a) is preferred to (s,a′)(s, a') if:

r(s,a)+ϵ(a)>r(s,a′)+ϵ(a′).r(s, a) + \epsilon(a) > r(s, a') + \epsilon(a').

For a given state s∈Ss \in S and a reward r(⋅)r(\cdot), the probability of such preference can be modeled as follows:

Pr((s,a)≻(s,a′)):=Prob⁡(r(s,a)+ϵ(a)>r(s,a′)+ϵ(a′))=Prob⁡(ϵ(a)−ϵ(a′)>r(s,a′)−r(s,a)).P_r\left((s, a) \succ(s, a')\right) := \operatorname{Prob}\left(r(s, a) + \epsilon(a) > r(s, a') + \epsilon(a')\right) = \operatorname{Prob}\left(\epsilon(a) - \epsilon(a') > r(s, a') - r(s, a)\right).

When the random variables {ϵ(a):a∈A}\{\epsilon(a) : a \in A\} are assumed i.i.d and standard Gumbel we obtain the following logit model [22, 23] (also known as the Bradley-Terry-Luce model (BTL)):

Pr((s,a)≻(s,a′))=exp⁡r(s,a)exp⁡r(s,a)+exp⁡r(s,a′)=σ(r(s,a)−r(s,a′))(3)P_r\left((s, a) \succ(s, a')\right) = \frac{\exp r(s, a)}{\exp r(s, a) + \exp r(s, a')} = \sigma\left(r(s, a) - r(s, a')\right) \tag*{(3)}

where σ(x):=11+e−x\sigma(x) := \frac{1}{1+e^{-x}}. In [24], the authors summarize the various motivations and use-cases of the BT model. We will see later that the logit model expressed above has been heavily used in the RLHF step to learn a reward function from preference data.

Perturbed Utility: Stochastic choice can also arise as the solution to expected reward maximization subject to an additive perturbation [25] which may describe limited information processing capacity. [26] or aversion to ambiguity [27]. Assuming that the reward function r(⋅)r(\cdot) is known, then the optimal stochastic choice can be modeled as the following utility maximization problem

πr∗(⋅∣s):=arg⁡max⁡π∈Δ∣A∣{Ea∼π[r(s,a)]−β×c(π)},(4)\pi_r^*(\cdot\mid s) := \underset{\pi\in\Delta^{|A|}}{\arg\max}\left\{\mathbb{E}_{a \sim\pi}[r(s,a)]-\beta\times c(\pi)\right\}, \tag*{(4)}

where Δ∣A∣⊂R∣A∣\Delta^{|A|} \subset\mathbb{R}^{|A|} is the simplex; c:Δ∣A∣↦Rc:\Delta^{|A|}\mapsto\mathbb{R} is a convex function; β>0\beta>0 is a constant. For example, when cc is the (forward) Kullback-Leibler (KL) divergence with respect to a default policy π0\pi^0 defined as

DKL(π∥π0):=∑a∈Aπ(a)log⁡π(a)π0(a),(5)D_{\mathrm{KL}}(\pi\Vert\pi^0):=\sum_{a\in A}\pi(a)\log\frac{\pi(a)}{\pi^0(a)}, \tag*{(5)}

then the optimal stochastic choice can be expressed as follows:

πr∗(a∣s)=π0(a∣s)exp⁡(β−1r(s,a))∑a~∈Aπ0(a~∣s)exp⁡(β−1r(s,a~)).(6)\pi_r^*(a\mid s)=\frac{\pi^0(a\mid s)\exp(\beta^{-1}r(s,a))}{\sum_{\tilde{a}\in A}\pi^0(\tilde{a}\mid s)\exp(\beta^{-1}r(s,\tilde{a}))}. \tag*{(6)}

It should be noted that in order to precisely calculate the optimal policy, one has to assume that all available actions in AA are known. Nevertheless, the perturbed utility model described here is instrumental for establishing a number of LLM alignment approaches, assuming that a reward model is available.

The reward learning problem

Based upon the observed preferences Dpref:={(s,a)≻(s,a′)}\mathcal{D}_{\mathrm{pref}}:=\{(s,a)\succ(s,a')\} by an agent and the model (3), the estimation problem consists of finding a reward function r(s,a)r(s,a) that rationalizes the data, so that observed preferences are consistent with a reward model. Specifically, the likelihood of Dpref\mathcal{D}_{\mathrm{pref}} can be written as

ℓpref(r)=EDpref[log⁡Pr((s,a)≻(s,a′))].(7)\ell_{\mathrm{pref}}(r)=\mathbb{E}_{\mathcal{D}_{\mathrm{pref}}}\left[\log P_r\left((s,a)\succ(s,a')\right)\right]. \tag*{(7)}

In general, there is no unique reward function that maximizes likelihood ℓpref(r)\ell_{\mathrm{pref}}(r). However, assuming the reward r(s,a0)r(s,a_0) for a reference action a0∈Aa_0\in A is known, it can be shown a unique reward function that maximizes likelihood function ℓpref(r)\ell_{\mathrm{pref}}(r).

Alternatively, based upon the observed choices Ddemo:={(s,a)}\mathcal{D}_{\mathrm{demo}}:=\{(s,a)\} and assuming these choices are consistent with the model (6). Then the estimation problem consists of finding a reward function r(s,a)r(s,a) that maximizes the likelihood of Ddemo\mathcal{D}_{\mathrm{demo}} defined as:

ℓdemo(r)=EDdemo[log⁡πr∗(a∣s)].(8)\ell_{\mathrm{demo}}(r)=\mathbb{E}_{\mathcal{D}_{\mathrm{demo}}}\left[\log\pi_r^*(a\mid s)\right]. \tag*{(8)}

As pointed out before, a limitation of this model is the assumption of complete information on the menu of available choices AA. When the reward is linearly parametrized, i.e. r(s,a)=ϕ(s,a)Tθr(s,a)=\phi(s,a)^{\mathsf{T}}\theta where ϕ(s,a),θ∈Rp\phi(s,a),\theta\in\mathbb{R}^{p} and ϕ(s,a)\phi(s,a) is a vector of features, problem (8) is the Lagrangian dual of the maximum entropy estimation problem (see Theorem 2 in [28]):

max⁡π(⋅∣s)∈Δ∣A∣Es∼Ddemo[H(π(⋅∣s))],s.t.Es∼Ddemo,a∼π(⋅∣s)[ϕ(s,a)].\underset{\pi(\cdot\mid s)\in\Delta^{|A|}}{\max}\quad\mathbb{E}_{s\sim\mathcal{D}_{\mathrm{demo}}}[\mathcal{H}(\pi(\cdot\mid s))],\quad\text{s.t.}\quad\mathbb{E}_{s\sim\mathcal{D}_{\mathrm{demo}},a\sim\pi(\cdot\mid s)}[\phi(s,a)].

State-of-the-art Algorithms for LLM Alignment

In this section, we provide an overview of the mathematical formulation of the alignment problem, and a number of state-of-the-art algorithms. To facilitate discussion, this section is organized according to the structure of the available data.

Learning from demonstrations data

We begin with the discussion on how to model and learn from demonstration data Ddemo:={(x,y)}\mathcal{D}_{\mathrm{demo}} := \{(x,y)\}. Given the prompt xx, the response yy is viewed as a golden answer. A natural approach to learning from such a dataset is supervised learning, leading to the supervised fine-tuning (SFT) paradigm. To this end, we formulate the following optimization problem over the LLM parameters class Θ\Theta:

min⁡θ∈Θ ℓSFT(θ):=−Ex∼ρ,y∼πE(⋅∣x)[log⁡π(y∣x;θ)](9)\min_{\theta\in\Theta}\ \ell_{\mathrm{SFT}}(\theta) := -\mathbb{E}_{x \sim\rho,y \sim\pi^{\mathrm{E}}(\cdot\mid x)}[\log\pi(y \mid x;\theta)] \tag*{(9)}

where πE\pi^{\mathrm{E}} is the expert policy. It is easy to see the above problem shares the same optimal solutions as

min⁡θ∈Θ Ex∼ρ[DKL(πE(⋅∣x) ∥ π(⋅∣x;θ))](10)\min_{\theta\in\Theta}\ \mathbb{E}_{x \sim\rho}[D_{\mathrm{KL}}(\pi^{\mathrm{E}}(\cdot\mid x) \,\|\, \pi(\cdot\mid x;\theta))] \tag*{(10)}

where DKL(⋅)D_{\mathrm{KL}}(\cdot) is the (forward) KL-divergence defined in (5). The latter shows that SFT aims at imitating the demonstration dataset via minimizing the KL divergence. Given a dataset Ddemo\mathcal{D}_{\mathrm{demo}} of expert demonstrations, we show the SFT method in Protocol 1 where ℓSFTb(θ)\ell_{\mathrm{SFT}}^{b}(\theta) is a finite sample version of ℓSFT(θ)\ell_{\mathrm{SFT}}(\theta) in (9).

It is worth noting that the SFT stage described here is closely related to behavioral cloning [29, 30], whose goal is to mimic the policy of an expert, we describe the details in the next paragraph.

Behavioral cloning approaches

Behavioural cloning (BC, see Protocol 1) it is an offline problem where the learner cannot collect new data using the current policy, but should learn relying exclusively on the expert dataset [29]. This can be done via a reduction to supervised learning where the actions are the labels to be predicted and the states are the features. Very recently, [31] show that exact minimization of the loss ℓSFTb\ell_{\mathrm{SFT}}^{b} allows to output a policy which enjoys suboptimality guarantees compared to the expert. Their experiments and theoretical analysis also show that the guarantees and practical performance of the method do not deteriorate for long horizon problems. Unfortunately, exact minimization of the loss ℓSFTb\ell_{\mathrm{SFT}}^{b} is not possible for non-convex policy classes, and to our knowledge, there are currently no studies investigating how those optimization errors affect performance. In [32], the authors proposed offline inverse reinforcement learning (IRL)-based imitation leraning methods in the SFT setting to effectively utilize the sequential structure underlying autoregressive generation. Compared with standard SFT method, the IRL methods can extract both reward and policy from the demonstration dataset. Moreover, the authors find that offline IRL-based imitation retains diversity while maximizing task performance. In this sense, IRL can also be regarded as a strong alternative on fixed SFT datasets even without online data generation. In § 5, we will discuss the details of IRL in LLM alignment. It is also important to notice that in the alignment of LLM, the environment is simpler than what generally assumed in analyzing and empirically testing BC. Indeed, in language tasks LLMs are tree shaped and deterministic.

Protocol 1 SFT (Supervised Fine Tuning) via Behavioral Cloning (BC)

  1. The learner receives: (i) A dataset Ddemo={(xi,yi)}i=1Ndemo\mathcal{D}_{\mathrm{demo}} = \{(x^{i}, y^{i})\}_{i=1}^{N_{\mathrm{demo}}}, (ii) A policy function parameters class Θ\Theta.

  2. The learner computes the loss: ℓ^SFT(θ):=E(x,y)∼Ddemo[−log⁡π(yi∣xi;θ)]\hat{\ell}_{\mathrm{SFT}}(\theta) := \mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}}}\left[-\log\pi(y^{i}|x^{i};\theta)\right].

  3. The learner outputs πθ⋆\pi_{\theta^{\star}} with θ⋆=arg⁡min⁡θ∈Θℓ^SFT(θ)\theta^{\star} = \arg\min_{\theta\in\Theta}\hat{\ell}_{\mathrm{SFT}}(\theta).

Self generation approaches

An alternative approach, dubbed SPIN (Self-Play fIne-tuNing), presented in [33] casts the fine-tuning with demonstration problem as a two-player game. On the one hand, the first player tries to generate answers as similar as possible as the observed ones in Ddemo\mathcal{D}_{\mathrm{demo}}. On the other hand, the second player’s aims at distinguish artificially generated answers from the answers in the demonstrations dataset Ddemo\mathcal{D}_{\mathrm{demo}}. The algorithm employs alternating updates between the first and second player. In particular, at iteration tt, the first player observes the second players parameters θt\theta_t and updates its weights via the following minimization over potentially time-varying parameters classes {Ft}\{\mathcal{F}_t\} as

ft+1=arg⁡min⁡f∈FtEx,y∼DdemoEy′∼π(⋅∣x;θt)[ℓ(f(x,y)−f(x,y′))],(11)f_{t+1} = \arg\min_{f\in\mathcal{F}_t} \mathbb{E}_{x,y\sim\mathcal{D}_{\mathrm{demo}}}\mathbb{E}_{y^{\prime}\sim\pi(\cdot|x;\theta_t)}\left[\ell\left(f(x,y)-f(x,y^{\prime})\right)\right], \tag*{(11)}

where ℓ(⋅)\ell(\cdot) is a monotonically decreasing, non negative, smooth and convex function. A common choice in practice satisfying the above properties is the logistic loss function ℓ(x)=log⁡(1+exp⁡(−x))\ell(x) = \log\left(1+\exp(-x)\right). All these properties are imposed to make the optimization problem easier to solve via first order methods. At this point, the second player can update its weights exploiting knowledge of ft+1f_{t+1}. This is done by solving the following problem: θt+1=arg⁡min⁡θ∈Θ−Ex∼ρ,y∼π(⋅∣x;θt)[ft+1(x,y)+βDKL(π(⋅∣x;θ)∥π(⋅∣x;θt))]\theta_{t+1} = \arg\min_{\theta\in\Theta} -\mathbb{E}_{x\sim\rho,y\sim\pi(\cdot|x;\theta_t)}\left[f_{t+1}(x,y) + \beta D_{\mathrm{KL}}(\pi(\cdot|x;\theta)\|\pi(\cdot|x;\theta_t))\right], which is an application of Equation (4) for c(π)=−DKL(π(⋅∣x)∥π(⋅∣x;θt))c(\pi)=-D_{\mathrm{KL}}(\pi(\cdot|x)\|\pi(\cdot|x;\theta_t)). The analytical solution of the above problem is surprisingly easy to obtain (analogously to (6)): π(y∣x;θt+1)∝π(y∣x;θt)exp⁡(ft+1(x,y)β)\pi(y|x;\theta_{t+1}) \propto\pi(y|x;\theta_t)\exp\left(\frac{f_{t+1}(x,y)}{\beta}\right), if the class Θ\Theta is expressive enough compared to the class Ft+1\mathcal{F}_{t+1}. To ensure that this is the case, in [33] the class Ft+1\mathcal{F}_{t+1} is chosen to be coupled with Θ\Theta as follows, Ft+1={βlog⁡(π(y∣x;θt+1)π(y∣x;θt))}\mathcal{F}_{t+1} = \left\{\beta\log\left(\frac{\pi(y|x;\theta_{t+1})}{\pi(y|x;\theta_t)}\right)\right\}. Another benefit of this choice is that the two updates can now be expressed as single update over the weight class Θ\Theta. Indeed, (11) is at this point equivalent to

θt+1=arg⁡min⁡θ∈Θℓ^SPIN(θ)=E(x,y)∼DdemoEy′∼π(⋅∣x;θt)[ℓ(βlog⁡(π(y∣x;θ)π(y∣x;θt))−βlog⁡(π(y′∣x;θ)π(y′∣x;θt)))].(12)\theta_{t+1} = \arg\min_{\theta\in\Theta}\widehat{\ell}_{\mathrm{SPIN}}(\theta) = \mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}}}\mathbb{E}_{y^{\prime}\sim\pi(\cdot|x;\theta_t)}\left[\ell\left(\beta\log\left(\frac{\pi(y|x;\theta)}{\pi(y|x;\theta_t)}\right)-\beta\log\left(\frac{\pi(y^{\prime}|x;\theta)}{\pi(y^{\prime}|x;\theta_t)}\right)\right)\right]. \tag*{(12)}

The practical algorithm can be obtained via a stochastic estimator of this loss constructed with the dataset Ddemo\mathcal{D}_{\mathrm{demo}}, as described in Protocol 2. We note that SPIN shares similarity with Direct Preference Optimization (DPO), to be described in Section 4.3, however there are also important differences that we will highlight in Section 5.

In SPIN, the adversarial imitation procedure leverages self-generated data to recover a demonstration-level policy (see Equation (11)).

Protocol 2 SFT (Supervised Fine Tuning) via SPIN (Self-Play fIne tuNing)

  1. The learner receives: (i) A dataset Ddemo={(xi,yi)}i=1Ndemo\mathcal{D}_{\mathrm{demo}} = \{(x^{i}, y^{i})\}_{i=1}^{N_{\mathrm{demo}}}, (ii) A policy function parameters class Θ\Theta.

  2. for t=1,…,Tt = 1, \ldots, T do

  3. The learner samples y′,i∼π(⋅∣xi;θt)y^{\prime,i} \sim\pi(\cdot\mid x^{i}; \theta_t) and computes the loss:

ℓ^SPIN(θ):=E(x,y)∼Ddemo, y′∼π(⋅∣x;θt)[ℓ(βlog⁡(π(y∣x;θ)π(y∣x;θt))−βlog⁡(π(y′∣x;θ)π(y′∣x;θt)))].\widehat{\ell}_{\mathrm{SPIN}}(\theta) := \mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},\,y^{\prime}\sim\pi(\cdot\mid x;\theta_t)} \left[\ell\left(\beta\log\left(\frac{\pi(y\mid x;\theta)}{\pi(y\mid x;\theta_t)}\right)-\beta\log\left(\frac{\pi(y^{\prime}\mid x;\theta)}{\pi(y^{\prime}\mid x;\theta_t)}\right)\right)\right].
  1. θt+1:=arg⁡min⁡θ∈Θℓ^SPIN(θ)\theta_{t+1} := \arg\min_{\theta\in\Theta} \widehat{\ell}_{\mathrm{SPIN}}(\theta)

  2. end for

  3. The learner outputs πθ∗\pi_{\theta_*}

Protocol 3 GAIL (Generative Adversarial Imitation Learning) [34]

  1. The learner receives: (i) A dataset Ddemo={(xi,yi)}i=1Ndemo\mathcal{D}_{\mathrm{demo}} = \{(x^{i}, y^{i})\}_{i=1}^{N_{\mathrm{demo}}}, (ii) A policy function parameter class Θ\Theta, (iii) A discriminator parameter class Φ\Phi.

  2. The learner optimizes the following problem:

min⁡θmax⁡ϕℓ^GAIL(θ,ϕ):=E(x,y)∼Ddemo, y′∼π(⋅∣x;θ)[log⁡(1−Dϕ(x,y))+log⁡(D(x,y′))+λlog⁡πθ(y′∣x)].\min_{\theta}\max_{\phi}\widehat{\ell}_{\mathrm{GAIL}}(\theta,\phi):=\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},\,y^{\prime}\sim\pi(\cdot\mid x;\theta)} \left[\log(1-D_{\phi}(x,y))+\log(D(x,y^{\prime}))+\lambda\log\pi_{\theta}(y^{\prime}\mid x)\right].
  1. The learner outputs πθ∗\pi_{\theta_*}

Notably, both adversarial imitation frameworks like TextGAIL [34] (see Protocol 3) and online IRL approaches [35] similarly incorporate self-generated rollouts into their training pipelines to enable effective learning from demonstrations. We discuss these details of IRL approaches and their connections with other baselines in § 5.

Information theoretic approaches

Recent works [36, 37] considered matching general information theoretic divergences between answers distribution.

As mentioned, minimizing the forward KL divergence between demonstrated and learner answer distribution is equivalent to the SFT objective in (10). As commonly noticed, the forward KL minimization outputs a mode covering distribution. That is, the learned distribution has support which contains the support of the demonstrations distribution.

However, a mode seeking behavior can be more desirable if one wants to perfectly imitate some aspects of the demonstrations while discarding others. We refer the reader to Figure 4 for a visual illustration. To this end, [36] suggested to minimize the reversed KL divergence

Mode-seeking and mode-covering distributions

Figure 4. True distribution in blue and estimated distribution in green. When the estimated distribution has a smaller support than the true one, as in the left plot, we say that it has a mode seeking. Vice versa, the estimated distribution has a mode covering behavior if its support is larger, as in the right plot. Image from https://g/sander.ai/2020/03/24/audio-generation.html.

min⁡θ∈ΘEx∼ρ[DKL(π(⋅∣x;θ) ∥ πE(⋅∣x))].\min_{\theta\in\Theta}\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta)\,\|\,\pi^{E}(\cdot\mid x)\right)\right].

This method however requires additional prompts and answers generated by the learner policy. As a last example of divergence minimization, [38] considers χ2\chi^{2} divergence minimization.

Protocol 4 RLHF (Reinforcement Learning from Human Feedback)

  1. The learner receives: (i) A preference dataset Dpref={(xi,ywi,yli)}i=1NprefD_{\mathrm{pref}}=\{(x^i,y_w^i,y_l^i)\}_{i=1}^{N_{\mathrm{pref}}}, (ii) A prompt dataset Dprompts={xi}i=1NpromptsD_{\mathrm{prompts}}=\{x^i\}_{i=1}^{N_{\mathrm{prompts}}}, (iii) A reward function parameter class Φ\Phi, (iv) A policy function parameter class Θ\Theta.

  2. The learner estimates the reward as r(⋅,⋅;ϕ⋆)r(\cdot,\cdot;\phi^\star) with

ϕ⋆=arg⁡min⁡ϕ∈Φℓ^RM(ϕ):=−E(x,yw,yl)∼Dpref[log⁡(σ(r(xi,ywi;ϕ)−r(xi,yli;ϕ)))].\phi^\star=\arg\min_{\phi\in\Phi}\widehat{\ell}_{\mathrm{RM}}(\phi):=-\mathbb{E}_{(x,y_w,y_l)\sim D_{\mathrm{pref}}}\left[\log\left(\sigma\left(r(x^i,y_w^i;\phi)-r(x^i,y_l^i;\phi)\right)\right)\right].
  1. The learner finds θ⋆=arg⁡min⁡θ∈ΘℓRL(θ)\theta^\star=\arg\min_{\theta\in\Theta}\ell_{\mathrm{RL}}(\theta), using RL trainer.

  2. The learner outputs πθ⋆\pi_{\theta^\star}.

Protocol 5 PPO (Proximal Policy Optimization) [39]

  1. Receive policy class parameters Θ\Theta. Initialize θ1\theta_1.

  2. for t=1,…,Tt=1,\ldots,T do

  3. Sample y∼π(⋅∣x;θt)y\sim\pi(\cdot\mid x;\theta_t) and x∈Dpromptsx\in D_{\mathrm{prompts}}.

  4. Update the value function

  5. Compute advantages {A^h}h=1∣y∣\{\hat{A}_h\}_{h=1}^{|y|} according to generalized advantage estimation at the token level

  6. The learner computes

ℓ^PPO(θ)=−Ex∼Dprompts,y∼π(⋅∣x;θt)[1∣y∣∑h=1∣y∣{min⁡[π(yh∣x,y<h;θ)π(yh∣x,y<h;θt)A^h,clip⁡(π(yh∣x,y<h;θ)π(yh∣x,y<h;θt),1−ϵ,1+ϵ)A^h]}].\widehat{\ell}_{\mathrm{PPO}}(\theta)=-\mathbb{E}_{x\sim D_{\mathrm{prompts}},y\sim\pi(\cdot\mid x;\theta_t)} \left[ \frac{1}{|y|}\sum_{h=1}^{|y|} \left\{ \min\left[ \frac{\pi(y_h\mid x,y_{<h};\theta)} {\pi(y_h\mid x,y_{<h};\theta_t)} \hat{A}_h, \operatorname{clip}\left( \frac{\pi(y_h\mid x,y_{<h};\theta)} {\pi(y_h\mid x,y_{<h};\theta_t)} ,1-\epsilon,1+\epsilon \right)\hat{A}_h \right] \right\} \right].
  1. θt+1=arg⁡min⁡θ∈ΘℓPPO(θ)\theta_{t+1}=\arg\min_{\theta\in\Theta}\ell_{\mathrm{PPO}}(\theta)

  2. end for

  3. The learner outputs πθ⋆\pi_{\theta^\star}.

Learning from preferences

Learning from preferences is usually performed in two steps: (i) reward learning using the preference dataset (ii) based on the reward model learned in the first step, further fine-tune the LLM by conducting reinforcement learning using a prompt dataset. Note that these two steps are closely related to the two types of stochastic choice models discussed in § 3.1.

Reward learning To find an appropriate reward model, RLHF (see e.g., [41]) leverages a set of preference dataset Dpref:={(x,yw,yl)}D_{\mathrm{pref}}:=\{(x,y_w,y_l)\}, where each data contains a pair of output yw,yly_w,y_l. The output ywy_w is preferred over yly_l by human labeler (denoted as yw≻yly_w\succ y_l). Leveraging the the Bradley-Terry model (BT) discussed in (3) and the likelihood of the preference data (7), one could formulate the Protocol 6 REINFORCE [40]

  1. Receive policy class parameters Θ\Theta. Initialize θ1\theta_1, step size η\eta

  2. for t=1,…,Tt = 1, \ldots, T do

  3. Sample outputs y∼π(⋅∣x;θt)y \sim\pi(\cdot\mid x; \theta_t) and x∈Dpromptsx \in\mathcal{D}_{\mathrm{prompts}}.

  4. The learner computes the gradient estimator

∇ℓ^REINFORCE(θt)=−Ex∼Dprompts,y∼π(⋅∣x;θt)[r(x,y)∇θlog⁡π(y∣x;θt)]\nabla\widehat{\ell}_{\mathrm{REINFORCE}}(\theta_t) = -\mathbb{E}_{x \sim\mathcal{D}_{\mathrm{prompts}},y \sim\pi(\cdot\mid x;\theta_t)} \left[r(x,y)\nabla_\theta\log\pi(y \mid x;\theta_t)\right]
  1. θt+1=θt−η∇ℓ^REINFORCE(θt)\theta_{t+1} = \theta_t - \eta\nabla\widehat{\ell}_{\mathrm{REINFORCE}}(\theta_t)

  2. end for

  3. The learner outputs πθ⋆\pi_{\theta_\star}.

following problem to find the reward model (parameterized by ϕ\phi):

ϕ⋆=arg⁡min⁡ϕ∈Φ ℓRM(ϕ):=−Ex∼ρ,(yw≻yl)∼πP[log⁡(σ(r(x,yw;ϕ)−r(x,yl;ϕ)))].(13)\phi^\star= \underset{\phi\in\Phi}{\arg\min}\ \ell_{\mathrm{RM}}(\phi) := -\mathbb{E}_{x \sim\rho,(y_w \succ y_l) \sim\pi^P} \left[\log\left(\sigma\left(r(x,y_w;\phi)-r(x,y_l;\phi)\right)\right)\right]. \tag*{(13)}

where (yw≻yl)∼πP(y_w \succ y_l) \sim\pi^P denotes sampling from the distribution of the preference dataset. Protocol 4 describes the procedure where r(⋅;ϕ)r(\cdot;\phi) is learned via minimization of the empirical loss ℓ^RM\widehat{\ell}_{\mathrm{RM}}. In the empirical loss ℓ^RM\widehat{\ell}_{\mathrm{RM}}, we replace (yw≻yl)∼πP(y_w \succ y_l) \sim\pi^P by sampling from a finite preference dataset (yw≻yl)∼Dprefs(y_w \succ y_l) \sim\mathcal{D}_{\mathrm{prefs}}.

Policy Learning Once a reward model r(x,y;ϕ⋆)r(x,y;\phi^\star) is learned, the LLM can be fine tuned on the top of SFT by leveraging the perturbed utility model (4), which results in the following problem:

min⁡θ ℓRL(θ):=−Ex∼ρ,y∼π(⋅∣x;θ)[r(x,y;ϕ)]+βEx∼ρ[DKL(π(⋅∣x;θ)∥πref(⋅∣x))](14)\min_\theta\ \ell_{\mathrm{RL}}(\theta) := -\mathbb{E}_{x \sim\rho,y \sim\pi(\cdot\mid x;\theta)}[r(x,y;\phi)] + \beta\mathbb{E}_{x \sim\rho}[\mathop{\mathrm{D}_{\mathrm{KL}}}(\pi(\cdot\mid x;\theta)\mathbin\Vert\pi_{\mathrm{ref}}(\cdot\mid x))] \tag*{(14)}

where πref\pi_{\mathrm{ref}} is a reference model such as the SFT-ed model, and β\beta is the regularization coefficient of the KL regularizer. Here, the optimal policy in (14) under the reward parameter ϕ\phi has the following closed-form expression:

πϕ⋆(y∣x)=πref(y∣x)exp⁡(β−1r(x,y;ϕ))Z(x,ϕ,β),(15)\pi^\star_\phi(y \mid x) = \frac{\pi_{\mathrm{ref}}(y \mid x)\exp(\beta^{-1}r(x,y;\phi))}{Z(x,\phi,\beta)}, \tag*{(15)}

where we have Z(x,ϕ,β):=∑y′πref(y′∣x)exp⁡(β−1r(x,y′;ϕ))Z(x,\phi,\beta) := \sum_{y'} \pi_{\mathrm{ref}}(y' \mid x)\exp(\beta^{-1}r(x,y';\phi)). Note that both the expected reward and the KL in (14) are not computable given the large cardinality of X\mathcal{X} and Y\mathcal{Y}, so (14) is usually solved approximately by minimizing an empirical loss, using policy optimization techniques such as REINFORCE [40], RLOO [42], PPO [39] and GRPO [43]; see Protocol 4 - 8.

Pros and Cons: PPO or REINFORCE? PPO was proposed as an improvement over the REINFORCE algorithm in environment where the gradient estimates generated by REINFORCE suffer from high variance. As a result, PPO enforces conservative policy updates to counterbalance the high variance effect. However, as argued in [42], for the LLM fine-tuning task the gradient variance is not as high to justify the PPO conservative mechanism. Since both options are used across the community, we describe both algorithms in Protocols 5 and 6 respectively. As a remark, PPO requires a critic model to estimate the advantage function which can be used to compute the value function score {V(x,y<h)}h=1∣y∣\{V(x,y_{<h})\}_{h=1}^{|y|} at each token level and compute the token-level advantage estimation. Consequently, training the critic model for token-level advantage estimation will also

Image not extracted

Figure 7.

  1. Receive policy class parameters Θ\Theta and reward model parameters ϕ∗\phi^{*}. Initialize θ1\theta_{1}, step size η\eta

  2. for t=1,…,Tt=1,\ldots,T do

  3. Sample GG outputs {yj}j=1G∼π(⋅∣x;θt)\{y^{j}\}_{j=1}^{G}\sim\pi(\cdot\mid x;\theta_{t}) and x∈Dpromptsx\in\mathcal{D}_{\mathrm{prompts}}.

  4. The learner computes rewards {rj}j=1,…,G\{r^{j}\}_{j=1,\ldots,G} for each output yjy^{j}.

  5. The learner computes the estimated advantage function

A^j=rj−1G−1∑i≠jri.\hat{A}_{j}=r^{j}-\frac{1}{G-1}\sum_{i\ne j}r^{i}.
  1. The learner computes

∇ℓRLOO(θt)=−Ex∼Dprompts,{yj}j=1G∼π(⋅∣x;θt)[1G∑j=1GA^j∇θlog⁡π(yj∣x;θt)].\nabla\ell_{\mathrm{RLOO}}(\theta_{t})=-\mathbb{E}_{x\sim\mathcal{D}_{\mathrm{prompts}},\{y^{j}\}_{j=1}^{G}\sim\pi(\cdot\mid x;\theta_{t})}\left[\frac{1}{G}\sum_{j=1}^{G}\hat{A}^{j}\nabla_{\theta}\log\pi(y^{j}\mid x;\theta_{t})\right].
  1. θt+1=θt−η∇ℓRLOO(θt)\theta_{t+1}=\theta_{t}-\eta\nabla\ell_{\mathrm{RLOO}}(\theta_{t})

  2. end for

  3. The learner outputs πθ∗\pi_{\theta^{*}}.

incur additional memory overhead. REINFORCE does not require training a critic, therefore it is more memory efficient than PPO. RLOO [42] is a modern REINFORCE modification that retains the advantage of not keeping a critic in memory and achieves a variance reduction effect subtracting the average of the other rewards (see Protocol 7). It can be shown that the RLOO estimator is an unbiased estimator of the advantage. Recently, a new policy optimization method (GRPO) which does not require an estimated reward model has been introduced and has been proven successful in reasoning applications (see Protocol 8 and § 4.5).

Pros and Cons: Learning from demonstrations vs learning from preferences. It is widely observed that the models learned only using SFT stage do not perform as well as those that are trained via episodically learning the policy (14) and learning the reward (13) on top of the SFT models [4]. This is partly because the reward model and the RL algorithms together guide the LLMs to explore high-quality responses that can go beyond those defined by the SFT data, thus improving their generalization capabilities [44]. Moreover, obtaining the SFT dataset is typically more expensive than obtaining preference data, therefore standard alignment process leverages both the SFT and the preference data.

Learning from preferences without online generations: Direct Preference Optimization

Direct Preference Optimization (DPO) [45] bypasses the need to perform the RL, by noticing that minimizing ℓRL(⋅)\ell_{\mathrm{RL}}(\cdot) admits an analytical solution if we optimize over the whole Marvov stationary policy space denoted by Π\Pi. In fact, notice that from our discussion on stochastic choice model (6), for a fixed r(⋅,⋅;ϕ)r(\cdot,\cdot;\phi), the solution to the policy optimization problem πϕ∗(⋅,x)=arg⁡min⁡π∈Π−Ey∼π(⋅∣x)[r(x,y;ϕ)]+βDKL(π(⋅∣x)∥πref(⋅∣x))\pi_{\phi}^{*}(\cdot,x)=\arg\min_{\pi\in\Pi}-\mathbb{E}_{y\sim\pi(\cdot\mid x)}[r(x,y;\phi)]+\beta D_{\mathrm{KL}}(\pi(\cdot\mid x)\Vert\pi_{\mathrm{ref}}(\cdot\mid x)) is defined in (15). This implies that for all yy, it holds that log⁡(πϕ∗(y∣x))=log⁡(πref(y∣x))+β−1r(x,y;ϕ)−log⁡(Z(x,ϕ,β))\log(\pi_{\phi}^{*}(y\mid x))=\log(\pi_{\mathrm{ref}}(y\mid x))+\beta^{-1}r(x,y;\phi)-\log(Z(x,\phi,\beta)). Such a quantity cannot be computed in closed form because computing Z(x,ϕ,β)Z(x,\phi,\beta) is intractable. However, for two possible answers yy, y′y' to the same Protocol 8 GRPO (Group Relative Policy Optimization) [43]

  1. Receive policy class parameters Θ\Theta, and reward model parameters ϕ⋆\phi^{\star}. Initialize θ1\theta_{1}.

  2. for t=1,…,Tt = 1,\ldots,T do

  3. Sample GG outputs {yj}j=1G∼π(⋅∣x;θt)\{y^{j}\}_{j=1}^{G} \sim\pi(\cdot|x;\theta_{t}) and x∈Dpromptsx \in\mathcal{D}_{\mathrm{prompts}}.

  4. The learner computes rewards {rj}j=1,…,G\{r^{j}\}_{j=1,\ldots,G} for each output yjy^{j}.

  5. The learner computes the estimated advantage function

A^j=rj−mean⁡({rj}j=1G)std⁡({rj}j=1G),j=1,…,G\hat{A}^{j}=\frac{r^{j}-\operatorname{mean}(\{r^{j}\}_{j=1}^{G})}{\operatorname{std}(\{r^{j}\}_{j=1}^{G})},\quad j=1,\ldots,G
  1. The learner computes

ℓGRPO(θ)=−Ex∼Dprompts,{yj}j=1G∼π(⋅∣x;θt)[1G∑j=1G1∣yj∣∑h=1∣yj∣{min⁡[π(yhj∣x,y<hj;θ)π(yhj∣x,y<hj;θt)A^j,clip⁡(π(yhj∣x,y<hj;θ)π(yhj∣x,y<hj;θt),1−ϵ,1+ϵ)A^j]−βDKL[πθ∥πref]}]\ell_{\mathrm{GRPO}}(\theta)=-\mathbb{E}_{x\sim\mathcal{D}_{\mathrm{prompts}},\{y^{j}\}_{j=1}^{G}\sim\pi(\cdot|x;\theta_{t})}\left[\frac{1}{G}\sum_{j=1}^{G}\frac{1}{|y^{j}|}\sum_{h=1}^{|y^{j}|}\left\{\min\left[\frac{\pi(y_{h}^{j}|x,y_{<h}^{j};\theta)}{\pi(y_{h}^{j}|x,y_{<h}^{j};\theta_{t})}\hat{A}^{j},\operatorname{clip}\left(\frac{\pi(y_{h}^{j}|x,y_{<h}^{j};\theta)}{\pi(y_{h}^{j}|x,y_{<h}^{j};\theta_{t})},1-\epsilon,1+\epsilon\right)\hat{A}^{j}\right]-\beta D_{\mathrm{KL}}[\pi_{\theta}\Vert\pi_{\mathrm{ref}}]\right\}\right]
  1. θt+1=arg⁡min⁡θ∈ΘℓGRPO(θ)\theta_{t+1}=\arg\min_{\theta\in\Theta}\ell_{\mathrm{GRPO}}(\theta)

  2. end for

  3. The learner outputs πθ⋆\pi_{\theta^{\star}}.

question xx, it holds that log⁡(πϕ⋆(y∣x))−log⁡(πϕ⋆(y′∣x))=log⁡(πref(y∣x))−log⁡(πref(y′∣x))+β−1r(x,y;ϕ)−β−1r(x,y′;ϕ)\log(\pi_{\phi}^{\star}(y|x))-\log(\pi_{\phi}^{\star}(y^{\prime}|x))=\log(\pi_{\mathrm{ref}}(y|x))-\log(\pi_{\mathrm{ref}}(y^{\prime}|x))+\beta^{-1}r(x,y;\phi)-\beta^{-1}r(x,y^{\prime};\phi). Therefore, the difference of reward functions for different answers y,y′y,y^{\prime} can be computed efficiently as the normalization constant Z(x,ϕ,β)Z(x,\phi,\beta) does not appear, i.e.

r(x,y;ϕ)−r(x,y′;ϕ)=βlog⁡(πϕ⋆(y∣x)πref(y∣x))−βlog⁡(πϕ⋆(y′∣x)πref(y′∣x)).(16)r(x,y;\phi)-r(x,y^{\prime};\phi)=\beta\log\left(\frac{\pi_{\phi}^{\star}(y|x)}{\pi_{\mathrm{ref}}(y|x)}\right)-\beta\log\left(\frac{\pi_{\phi}^{\star}(y^{\prime}|x)}{\pi_{\mathrm{ref}}(y^{\prime}|x)}\right). \tag*{(16)}

Protocol 9 DPO (Direct Preference Optimization)

  1. The learner receives as input:

    • A preference dataset Dpref={(xi,ywi,yℓi)}i=1N\mathcal{D}_{\mathrm{pref}} = \{(x^{i}, y_{w}^{i}, y_{\ell}^{i})\}_{i=1}^{N}.

    • A policy function parameters class Θ\Theta.

  1. The learner computes the stochastic loss.

ℓ^DPO(θ):=−E(x,yw,yl)∈Dpref[log⁡(σ(βlog⁡(π(yw∣x;θ)πref(yw∣x))−βlog⁡(π(yl∣x;θ)πref(yl∣x))))]\widehat{\ell}_{\mathrm{DPO}}(\theta) := -\mathbb{E}_{(x,y_w,y_l)\in\mathcal{D}_{\mathrm{pref}}}\left[\log\left(\sigma\left(\beta\log\left(\frac{\pi(y_w|x;\theta)}{\pi_{\mathrm{ref}}(y_w|x)}\right)-\beta\log\left(\frac{\pi(y_l|x;\theta)}{\pi_{\mathrm{ref}}(y_l|x)}\right)\right)\right)\right]
  1. The learner outputs πθ⋆\pi_{\theta^\star} with θ⋆=arg⁡min⁡θ∈Θℓ^DPO(θ)\theta^\star= \arg\min_{\theta\in\Theta}\widehat{\ell}_{\mathrm{DPO}}(\theta).

It follows that we can plug in the above analytical solution into the loss ℓRM\ell_{\mathrm{RM}} (13) to obtain the following bi-level optimization problem that finds the optimal reward parameterization:

min⁡ϕ∈Φℓ(ϕ):=−Ex∼ρ,(yl≺yw)∼πP(⋅∣x)[log⁡(σ(βlog⁡(πϕ⋆(yw∣x)πref(yw∣x))−βlog⁡(πϕ⋆(yl∣x)πref(yl∣x))))](17)\min_{\phi\in\Phi}\ell(\phi):=-\mathbb{E}_{x\sim\rho,(y_l\prec y_w)\sim\pi^P(\cdot|x)}\left[\log\left(\sigma\left(\beta\log\left(\frac{\pi^\star_\phi(y_w|x)}{\pi_{\mathrm{ref}}(y_w|x)}\right)-\beta\log\left(\frac{\pi^\star_\phi(y_l|x)}{\pi_{\mathrm{ref}}(y_l|x)}\right)\right)\right)\right] \tag*{(17)}
s.t.πϕ⋆:=arg⁡max⁡π∈ΠEx∼ρ,y∼π(⋅∣x)[r(x,y;ϕ)]−βEx∼ρ[DKL(π(⋅∣x)∥πref(⋅∣x))],(18)\mathrm{s.t.}\quad\pi^\star_\phi:=\arg\max_{\pi\in\Pi}\mathbb{E}_{x\sim\rho,y\sim\pi(\cdot|x)}[r(x,y;\phi)]-\beta\mathbb{E}_{x\sim\rho}[D_{\mathrm{KL}}(\pi(\cdot|x)\parallel\pi_{\mathrm{ref}}(\cdot|x))], \tag*{(18)}

where πϕ⋆\pi^\star_\phi is an optimal policy defined in (15) under a certain reward model parameterized by ϕ\phi. If one faithfully follows the above approach, then one would first compute the optimal reward r(⋅;ϕ⋆)r(\cdot;\phi^\star), then use it to identify the optimal policy using (15). To avoid training two separate models, [45] proposes to directly parameterize the policy and find the parameters θ⋆\theta^\star that solve the following problem:

arg⁡min⁡θ∈ΘℓDPO(θ):=−Ex∼ρ,(yl≺yw)∼πP(⋅∣x)[log⁡(σ(βlog⁡(π(yw∣x;θ)πref(yw∣x))−βlog⁡(π(yl∣x;θ)πref(yl∣x))))].(19)\arg\min_{\theta\in\Theta}\ell_{\mathrm{DPO}}(\theta):=-\mathbb{E}_{x\sim\rho,(y_l\prec y_w)\sim\pi^P(\cdot|x)}\left[\log\left(\sigma\left(\beta\log\left(\frac{\pi(y_w|x;\theta)}{\pi_{\mathrm{ref}}(y_w|x)}\right)-\beta\log\left(\frac{\pi(y_l|x;\theta)}{\pi_{\mathrm{ref}}(y_l|x)}\right)\right)\right)\right]. \tag*{(19)}

Notice that, as shown in Protocol 9, an empirical estimate of this loss can be computed without the need of the dataset Dprompts\mathcal{D}_{\mathrm{prompts}} and online generations. A first clear advantage of DPO over RLHF is that only the policy parameter is kept in memory. The reward network does not need to be stored, therefore, as shown in the Figure 5, DPO is more memory efficient than RLHF. Further, no self-generation such as line 3 of Protocol 5 and 6 is needed, so DPO is much easier to implement as compared to RL based algorithms.

Figure 5. Estimated memory consumption of running the Pythia-1B model on TL;DR dataset with batch-size 2 on a single device

However, dropping the analytical form of πϕ⋆(y∣x)\pi^\star_\phi(y|x) in the last step of the DPO derivation creates practical differences between the performance of DPO and RLHF. Therefore, DPO and RLHF are not equivalent, in particular, since we dropped a constraint, the solution set for DPO is a superset of the solution set for RLHF (Theorem 4.1 in [46]). Recent studies suggest that RL-based fine-tuning has greater potential to enhance the performance of LLMs compared to the DPO [46].

From the formulation of DPO in Eq. (19), we see that DPO only fits the given preference data and does not leverage online generations from its own model (see line 3 of Protocol 5 and 6). Due to the lack of the optimal policy constraint, the model trained by the DPO method can suffer from the limited generalization capability and can encounter the distribution shift issue when the coverage of the preference dataset is limited.

Furthermore, when there exists distribution shift between the model outputs and the preference dataset, the performance of DPO can be significantly affected. A possible way to circumvent this problem is to use DPO in an online fashion [47]. In contrast, in the RLHF training pipeline, the policy model is trained by RL and has leveraged online generations from the model itself, which can alleviate the distribution shift issue between model outputs and the preference dataset through leveraging the generalization power from the explicit estimated reward model. Similar empirical observations for the potential drawbacks of DPO compared with RLHF / PPO has also been observed in recent study [46]. Hence, to unlock the full potential of LLMs, it appears that RL is a necessary step in the post-training pipeline.

The toy example in [46] that we report in Table 1 shows that the solution set of DPO is a strict superset of the solution set of RLHF. In particular, there are minimizers of the DPO loss assign positive probability to answers for which no information is available (y3y_3 in this example). This example shows that DPO should not be applied when the preference dataset has poor coverage of the answers set Y\mathcal{Y}. For more practical problems, it is also observed that DPO can be less performant in terms of winrate against the model fine tuned via RLHF; see Table 2.

Actiony1y_1y2y_2y3y_3
πref\pi_{\mathrm{ref}}0.50.50
Dpref\mathcal{D}_{\mathrm{pref}}{(yw=y1,yl=y2)}\{(y_w=y_1,y_l=y_2)\}
πDPO\pi_{\mathrm{DPO}}α\alpha0.01−α1-\alpha
πRLHF\pi_{\mathrm{RLHF}}100

Table 1. The policy πDPO\pi_{\mathrm{DPO}} minimizes ℓDPO\ell_{\mathrm{DPO}} for any α∈[0,1)\alpha\in[0,1). Hence, for α>0\alpha>0, it produces a policy with support which is not a subset of πref\pi_{\mathrm{ref}}. The same can not happen for πRLHF\pi_{\mathrm{RLHF}} that minimizes ℓRLHF\ell_{\mathrm{RLHF}}.

PPO WinTieDPO Win
PPO V.S. DPO422830

Table 2. On HH-RLHF, GPT-4 is used to decide the winner between PPO and DPO models’ output. Taken from [46].

Learning from preference without the BT assumption.

Regardless of using RLHF and the DPO approach to perform alignment, one key step is to use the BT model (13) to model human preference. The BT assumption implies transitivity. This is restrictive because the preference dataset collected from different individuals might not be transitive even if each person follows a transitive model in generating the preference. As an example, let us consider 3 individuals h1,h2,h3h_1,h_2,h_3 and 3 possible answers y1,y2,y3y_1,y_2,y_3. Let us denote Ph\mathcal{P}_h the preference model of individuals hh. Suppose that they follow the following preference models:

Ph1(y1≻y2)=1Ph1(y2≻y3)=0Ph1(y3≻y1)=1Ph2(y1≻y2)=0Ph2(y2≻y3)=1Ph2(y3≻y1)=1Ph3(y1≻y2)=1Ph3(y2≻y3)=1Ph3(y3≻y1)=0.\begin{aligned} \mathcal{P}_{h_1}(y_1 \succ y_2) &= 1 & \mathcal{P}_{h_1}(y_2 \succ y_3) &= 0 & \mathcal{P}_{h_1}(y_3 \succ y_1) &= 1 \\ \mathcal{P}_{h_2}(y_1 \succ y_2) &= 0 & \mathcal{P}_{h_2}(y_2 \succ y_3) &= 1 & \mathcal{P}_{h_2}(y_3 \succ y_1) &= 1 \\ \mathcal{P}_{h_3}(y_1 \succ y_2) &= 1 & \mathcal{P}_{h_3}(y_2 \succ y_3) &= 1 & \mathcal{P}_{h_3}(y_3 \succ y_1) &= 0. \end{aligned}

Notice, that each of these models is transitive. However, the average model defined as P(y≻y′)=13∑h∈{h1,h2,h3}Ph(y≻y′)\mathcal{P}(y \succ y') = \frac{1}{3}\sum_{h \in\{h_1,h_2,h_3\}} \mathcal{P}_h(y \succ y') satisfies P(y1≻y2)=P(y2≻y3)=P(y3≻y1)=2/3\mathcal{P}(y_1 \succ y_2) = \mathcal{P}(y_2 \succ y_3) = \mathcal{P}(y_3 \succ y_1) = 2/3. That is, the average model is not transitive and can not be modeled by the BT assumption. In the sense, the BT assumption is data wasteful. In this example, one should consider preferences only from a single individual in order to make the BT assumption valid. Not enforcing the BT assumption, allows to use more data, i.e. preferences from all the three individuals. Given this motivation, recent works [48] investigated learning from preferences directly. The training happens in two stages as in RLHF: the first step uses maximum likelihood to learn a preference model rather than a reward function, and a second step identifies a Nash equilibrium rather than an optimal policy.

Protocol 10 NLHF (Nash Learning from Human Feedback)

1: The learner receives as input: (i) A preference dataset Dpref={(xi,ywi,yli)}i=1ND_{\mathrm{pref}} = \{(x^{i}, y_{w}^{i}, y_{l}^{i})\}_{i=1}^{N}, (ii) a prompt dataset Dprompts={xi}i=1NpromptsD_{\mathrm{prompts}} = \{x^{i}\}_{i=1}^{N_{\mathrm{prompts}}}, (iii) a preference model function parameters class Φ\Phi and (iv) a policy function parameters class Θ\Theta.

2: The learner estimates the preference model as P(⋅≻⋅∣⋅;ϕ⋆)\mathcal{P}(\cdot\succ\cdot\mid\cdot; \phi^{\star}) with

ϕ⋆=arg⁡min⁡ϕ∈Φ ℓ^PM(ϕ):=−E(x,yw,yl)∈Dpreflog⁡(P(yw≻yl∣x;ϕ)).\phi^{\star} = \underset{\phi\in\Phi}{\arg\min}\ \widehat{\ell}_{\mathrm{PM}}(\phi) := -\mathbb{E}_{(x,y_{w},y_{l})\in D_{\mathrm{pref}}}\log\left(\mathcal{P}(y_{w}\succ y_{l}\mid x;\phi)\right).

3: The learner computes the stochastic objective

ℓ^NLHF(θ,θ′):=−Ex∈Dprompts,y∼π(⋅∣x;θ),y′∼π(⋅∣x;θ′)P(y≻y′∣x;ϕ⋆)+βDKL(π(⋅∣x;θ)∥πref(⋅∣x))−βDKL(π(⋅∣x;θ′)∥πref(⋅∣x)),\widehat{\ell}_{\mathrm{NLHF}}(\theta,\theta^{\prime}) := -\mathbb{E}_{x\in D_{\mathrm{prompts}},y\sim\pi(\cdot\mid x;\theta),y^{\prime}\sim\pi(\cdot\mid x;\theta^{\prime})}\mathcal{P}(y\succ y^{\prime}\mid x;\phi^{\star}) + \beta D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta)\mathbin{\|}\pi_{\mathrm{ref}}(\cdot\mid x)\right) - \beta D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta^{\prime})\mathbin{\|}\pi_{\mathrm{ref}}(\cdot\mid x)\right),

4: The learner outputs πθ⋆\pi_{\theta^{\star}} with θ⋆=arg⁡min⁡θ∈Θmax⁡θ′∈Θℓ^NLHF(θ,θ′)\theta^{\star} = \arg\min_{\theta\in\Theta}\max_{\theta^{\prime}\in\Theta}\widehat{\ell}_{\mathrm{NLHF}}(\theta,\theta^{\prime}).

Preference learning First, we learn via maximum likelihood, a preference model P:X×Y×Y→[0,1]\mathcal{P}:\mathcal{X}\times\mathcal{Y}\times\mathcal{Y}\to[0,1] such that P(y≻y′∣x)\mathcal{P}(y\succ y^{\prime}\mid x) is the probability that certain oracle, which produced the preferences in the dataset DprefD_{\mathrm{pref}}, prefers answer yy over y′y^{\prime} following the prompt xx. Mirroring the procedure in RLHF, let us consider a preference model class with parameters class Φ\Phi, i.e. {P(⋅≻⋅∣⋅;ϕ)}ϕ∈Φ\{\mathcal{P}(\cdot\succ\cdot\mid\cdot;\phi)\}_{\phi\in\Phi}, consider the following minimization problem (where PM stands for preference modelling):

ϕ⋆=arg⁡min⁡ϕ∈ΦℓPM(ϕ):=−Ex∼ρ,(yl≺yw)∼πP(⋅∣x)[log⁡(P(yw≻yl∣x;ϕ))].\phi^{\star}=\arg\min_{\phi\in\Phi}\ell_{\mathrm{PM}}(\phi):=-\mathbb{E}_{x\sim\rho,(y_{l}\prec y_{w})\sim\pi_{\mathcal{P}}(\cdot\mid x)}\left[\log\left(\mathcal{P}(y_{w}\succ y_{l}\mid x;\phi)\right)\right].

Protocol 10 shows how to do this practically, minimizing an empirical unbiased estimate for ℓPM\ell_{\mathrm{PM}}.

Nash equilibrium learning After learning the preference model, [48] proposes to find the unique Nash equilibrium of the objective ℓ^NLHF\widehat{\ell}_{\mathrm{NLHF}} in Protocol 10. Due to the min max structure of this problem, the optimization algorithm design is more delicate and require careful conservative updates to ensure last iterate convergence. However, this additional complexity on the optimization side comes at the benefit of dropping the BT assumption and therefore accommodating a larger number of preference data.

Experiments in [48 Table 1] shows that the NLHF method dubbed MD1 achieves win rate of 0.598 against the same model aligned via RLHF on a text summarization task. The drawback of this method is that it requires solving a minmax optimization problem rather than the simpler minimization problem required in RLHF.

Learning from data verifiers via Rule-Based Reinforcement Learning

Before closing this section, we would like to mention a recently developed alignment strategy, which is fundamental for training powerful reasoning models such as DeepSeek-R1 [5]. The general idea is simple: To teach the model to solve many challenging math, STEM or coding related problems, a reward model is no longer needed. Rather, one can simply use a solution verifier, which simply verifies whether the solution is correct or not. In [5], the authors proposed to use LeetCode tests case as verifier for programming questions, while creating a dataset of mathematical problems from OpenWebMath for math verifiers. In particular, in the reproduction of the Deepseek R1, [49] adopted the rule-based reward system that comprises two types of rewards: Format Reward and Answer Reward. Here, we show the detailed reward designed in [49] as below:

rformat={1,if format is correct−1,if format is incorrect,ranswer={2,if the answer fully matches the ground truth−1.5,if the answer partially mismatches the ground truth−2,if the answer cannot be parsed or is missingr_{\mathrm{format}} = \begin{cases} 1, & \text{if format is correct} \\ -1, & \text{if format is incorrect} \end{cases} ,\qquad r_{\mathrm{answer}} = \begin{cases} 2, & \text{if the answer fully matches the ground truth} \\ -1.5, & \text{if the answer partially mismatches the ground truth} \\ -2, & \text{if the answer cannot be parsed or is missing} \end{cases}

where rformatr_{\mathrm{format}} is the format reward and ranswerr_{\mathrm{answer}} is the answer reward.

However in [5], it is noted that the model which optimizes purely the rule based reward, i.e. DeepSeek-R1-Zero leads to poor language skills suffering for example from language mixing. To avoid this, [5] uses multi-stage training with learning with verifiable rewards at the initial stage and SFT/preference based learning used at the final stages to improve the language skills of the model. In the initial stage, the rule based reward is optimized via GRPO in Algorithm 8.

A Unified Perspective for LLM Alignment

So far we have discussed a number of state-of-the-art approaches for LLM alignment. Generally speaking, they can be divided into two categories: alignment using the demonstration data, and alignment using the preference data. One might wonder why algorithms belonging to these two categories are so different (e.g., supervised learning vs. reward learning + RL). After all, both families of algorithms are trying to learn from some forms of human preference. In this section, we provide a perspective derived from the stochastic choice model discussed in § 3, which serves to unify different approaches of alignment.

Recall that in § 3, we have introduced two estimation problems (7) and (8). Although they use different datasets (i.e., the former uses the preference dataset Dpref\mathcal{D}_{\mathrm{pref}}, while the latter uses the demonstration dataset Ddemo\mathcal{D}_{\mathrm{demo}}), they share a few common properties: (1) the reward function can be learned from both datasets and (2) both maximize some form of the likelihood function. These observations lead to the following questions:

  • (Q1) Given that the formulation of the demonstration-based problem also allows for reward learning, why do existing alignment algorithms only learn rewards from the preference dataset but not from the demonstration dataset?

  • (Q2) Since both problems maximize the likelihood functions, why do we need to separate the alignment process into different stages (i.e., SFT and RLHF)?

In the following, we will first address question (Q1) by formulating a new problem that learns both the reward and the policy from Ddemon\mathcal{D}_{\mathrm{demon}}. We will show that this formulation is closely related to a class of RL problem called inverse RL (IRL), and we will derive efficient methods from the IRL literature. Somewhat unexpectedly, it turns out that a number of algorithms discussed in the previous section, such as SFT and SPIN, can be viewed as special cases of the IRL-based approach.

Furthermore, leveraging the development in (Q1), we address (Q2) by introducing a framework that unifies the two stages of alignment problem into a single stage. The new framework, named Alignment with Integrated Human Feedback (AIHF), jointly learns a reward and a policy by maximizing the likelihood of both Ddemon\mathcal{D}_{\mathrm{demon}} and Dpref\mathcal{D}_{\mathrm{pref}}. We will discuss the connection of AIHF with various alignment algorithms introduced in the previous section.

Jointly learning policy and reward from the demonstrations data

To jointly learn a reward and a policy from the demonstration dataset Ddemon\mathcal{D}_{\mathrm{demon}}, let us leverage the estimation problem (8) derived from the stochastic choice theory. Given the demonstration (x,y)(x,y) sampled from an expert policy πE\pi^{\mathrm{E}}, we can directly translate (8) with the optimal reward defined in (4), into the LLM alignment setting and obtain the following problem [50]:

max⁡ϕ ℓIRL(ϕ):=Ex∼ρ,y∼πE(⋅∣x)[log⁡πϕ⋆(y∣x)](20)\max_{\phi}\ \ell_{\mathrm{IRL}}(\phi) := \mathbb{E}_{x\sim\rho,y\sim\pi^{\mathrm{E}}(\cdot\mid x)}\left[\log\pi_{\phi}^{\star}(y\mid x)\right] \tag*{(20)}
πϕ⋆:=arg⁡max⁡π Ex∼ρ,y∼π(⋅∣x)[r(x,y;ϕ)]−βEx∼ρ[DKL(π(⋅∣x)∥πref(⋅∣x))].(21)\pi_{\phi}^{\star} := \underset{\pi}{\arg\max}\ \mathbb{E}_{x\sim\rho,y\sim\pi(\cdot\mid x)}\left[r(x,y;\phi)\right]-\beta\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x)\mathbin\Vert\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right]. \tag*{(21)}

Compared with the SFT formulation in (9), we see that (19) shares the same objective, but has an additional constraint which ensures that the policy has to be an optimal policy under a certain reward model.

The problem (19) falls under the class of inverse reinforcement learning (IRL) problems, where the objective is to jointly learn an optimal policy and the underlying reward model, assuming access to expert policy samples. Similarly, as noted in § 4.1.1, the conventional SFT formulation (9) is a form of BC that aims to replicate an expert’s policy. However, BC generally exhibits poorer generalization than IRL. Indeed, [51] shows that BC is a suboptimal approach to learning from demonstrations, leading to regret bounds that scale quadratically with the problem horizon. This arises due to distribution shift – the learned policy may encounter states not covered in the demonstration data, causing compounding errors that increasingly deviate from the expert trajectory over time.

In contrast, IRL mitigates distribution shift and achieves better generalization by explicitly modeling the expert’s reward function, rather than simply mimicking actions. By recovering an estimate of the reward structure that drives expert behavior, IRL enables the agent to make goal-directed decisions even in unseen states. This contrasts with BC, which lacks an underlying objective thus often struggles in novel situations. Additionally, optimizing policies with a learned reward function allows for adaptive behavior, where the agent can deviate from expert demonstrations in a way that still aligns with the inferred intent. As a result, IRL-based policies are generally more robust in complex environments where state distributions differ from training data [52]. Recognizing the limitations of standard SFT methods, particularly regarding distribution shift, researchers have proposed a range of IRL-based techniques [32, 34, 35, 53] to more effectively leverage demonstration data.

Unfortunately, the IRL problem (19) appears to be much more involved compared to the SFT problem (9), as it involves two levels of optimization problem stacked in hierarchy. It turns out that there is a way to simplify it. In [54, 55], the authors show that when a finite demonstration dataset Ddemo:={(x,y)}\mathcal{D}_{\mathrm{demo}} := \{(x,y)\} is available, one can consider the following surrogate objective:

max⁡ϕmin⁡θ L~(ϕ,θ;Ddemo):=E(x,y)∼Ddemo,y′∼π(⋅∣x;θ)[r(x,y;ϕ)−r(x,y′;ϕ)+βDKL(π(⋅∣x;θ)∥πref(⋅∣x))].(22)\max_{\phi}\min_{\theta}\ \widetilde{\mathcal{L}}(\phi,\theta;\mathcal{D}_{\mathrm{demo}}) := \mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},y'\sim\pi(\cdot\mid x;\theta)}\left[r(x,y;\phi)-r(x,y';\phi)+\beta D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta)\mathbin\Vert\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right]. \tag*{(22)}

As a remark, one can plug the closed-form expression of the optimal policy πϕ⋆\pi_{\phi}^{\star} into the maximum likelihood objective (20), then one can see that the surrogate objective (22) is a finite-sample version of the IRL problem (19). Further, as the number of demonstration data becomes large, problem (22) becomes asymptotically close to problem (19), in the sense that their optimal solutions become asymptotically close to each other (with provable bounds) [54]. The surrogate objective in (22) offers an alternative interpretation of the IRL problem formulated in (19) from the adversarial training perspective. Specifically, the reward estimator is optimized to distinguish between expert demonstrations and self-generated trajectories (the max problem), while the policy is optimized to generate trajectories which can best mimic the expert demonstrations and the self-generated trajectories (the min problem). Therefore, it is reasonable to develop practical algorithms based on (22), which is apparently much easier to optimize. As suggested in [55], one can use the following alternating algorithm to optimize the reward and the policy:

ϕt+1:=arg⁡min⁡ϕ  −E(x,y)∼Ddemo,y′∼π(⋅∣x;θt)[ℓ(r(x,y;ϕ)−r(x,y′;ϕ))].(23)\phi_{t+1} := \underset{\phi}{\arg\min}\; -\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},y'\sim\pi(\cdot\mid x;\theta_t)}\left[\ell\left(r(x,y;\phi)-r(x,y';\phi)\right)\right]. \tag*{(23)}
θt+1:=arg⁡max⁡θ  Ex∼ρ,y∼π(⋅∣x;θ)[r(x,y;ϕt+1)]−βEx∼ρ[DKL(π(⋅∣x;θ)∥πref(⋅∣x))].(24)\theta_{t+1} := \underset{\theta}{\arg\max}\; \mathbb{E}_{x\sim\rho,y\sim\pi(\cdot\mid x;\theta)}\left[r(x,y;\phi_{t+1})\right]-\beta\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta)\mathbin\Vert\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right]. \tag*{(24)}

Note that if we directly apply the above gradient descent/ascent algorithm to (22), then ℓ(⋅)\ell(\cdot) in (23) should be a linear function ℓ(x)=x\ell(x)=x. Considering that the use of a linear loss function results in an unbounded objective value, one can typically choose some easy-to-optimize loss functions such as log sigmoid function ℓ(z):=log⁡σ(z)\ell(z):=\log\sigma(z). Next, let us make some remarks about the algorithm (21).

Connection to the RLHF. We observe that (21) is an iterative update scheme which integrates the reward and policy updates. This closely resembles the RLHF pipeline, where both the reward and policy are updated. There are two major differences. First, in RLHF the reward and the policy are updated in two separate stages, while here they are updated iteratively. Second, since only demonstration data Ddemon\mathcal{D}_{\mathrm{demon}} are available, when learning a reward model in (23), the demonstration is always treated as the preferred data, while the non-preferred data are the model-generated responses. This is reasonable, under the assumption that expert data are of high quality. In practice, RLHF-based and IRL-based methods are complementary to each other. It’s common to leverage both demonstration and preference datasets jointly in the training pipeline to achieve better performance [56, 57]. In [58, 59], the connections has been shown that both IRL and RLHF are imitating a target policy using different dataset (demonstrations and preferences). Leveraging this insight, the alignment pipeline can incorporate both demonstration and preference datasets, improving model performance by integrating RLHF with IRL techniques. In general, it can be shown that RLHF could be a special form of IRL. Here, we show that IRL models the preference of a single action over all possible actions in (20) when maximizing the likelihood of one demonstration action, whereas RLHF models the relative preference between pairs of actions.

Below we show that the reward modeling in RLHF can be derived from the optimal policy expression in (15). As we have defined in (15), given the reward parameter ϕ\phi, the optimal policy of the regularized RL problem defined in (14) has the closed-form πϕ∗(y∣x)=πref(y∣x)exp⁡(β−1r(x,y;ϕ))Z(x,ϕ,β)\pi_\phi^*(y\mid x)=\frac{\pi_{\mathrm{ref}}(y\mid x)\exp(\beta^{-1}r(x,y;\phi))}{Z(x,\phi,\beta)}. With this expression, we can now obtain a model for the likelihood that sequence ywy_w is preferred over yly_l. With a pair of actions {yl,yw}\{y_l,y_w\}, by the independence of irrelevant alternatives property [60] of the optimal choice πϕ∗\pi_\phi^*, the likelihood that sequence ywy_w is preferred over yly_l is given by

Pπϕ∗(yw≻yl∣x):=πϕ∗(yw∣x)πϕ∗(yw∣x)+πϕ∗(yl∣x).\mathbb{P}_{\pi_\phi^*}(y_w \succ y_l\mid x):=\frac{\pi_\phi^*(y_w\mid x)}{\pi_\phi^*(y_w\mid x)+\pi_\phi^*(y_l\mid x)}.

This motivates the choice model as the following likelihood function:

L(R(⋅;ϕ))=E(yw≻yl)[log⁡πϕ∗(yw∣x)πϕ∗(yw∣x)+πϕ∗(yl∣x)]=E(yw≻yl)[log⁡πref(yw∣x)exp⁡(β−1r(x,yw;ϕ))πref(yw∣x)exp⁡(β−1r(x,yw;ϕ))+πref(yl∣x)exp⁡(β−1r(x,yl;ϕ))].\begin{aligned} L(R(\cdot;\phi))=\mathbb{E}_{(y_w\succ y_l)}\left[\log\frac{\pi_\phi^*(y_w\mid x)}{\pi_\phi^*(y_w\mid x)+\pi_\phi^*(y_l\mid x)}\right] \\ &=\mathbb{E}_{(y_w\succ y_l)}\left[\log\frac{\pi_{\mathrm{ref}}(y_w\mid x)\exp(\beta^{-1}r(x,y_w;\phi))}{\pi_{\mathrm{ref}}(y_w\mid x)\exp(\beta^{-1}r(x,y_w;\phi))+\pi_{\mathrm{ref}}(y_l\mid x)\exp(\beta^{-1}r(x,y_l;\phi))}\right]. \end{aligned}

When πref\pi_{\mathrm{ref}} equals to the uniform distribution, this model is equivalent to the BTL model in RLHF:

L(R(⋅;ϕ))=ℓRM(ϕ):=−E(yw≻yl)[log⁡(σ(r(x,yw;ϕ)−r(x,yl;ϕ)))].(25)L(R(\cdot;\phi))=\ell_{\mathrm{RM}}(\phi):=-\mathbb{E}_{(y_w\succ y_l)}\left[\log\left(\sigma\left(r(x,y_w;\phi)-r(x,y_l;\phi)\right)\right)\right]. \tag*{(25)}

For the IRL formulation defined in (19), we see that it models the preference of a single action over the entire action space. When the action space consists of only two actions, we see that RLHF is a special case of IRL and the reward modeling between IRL and RLHF is equivalent.

Connection to SPIN. There is also an interesting connection between (22) and the SPIN introduced in Sec. 4.1.2. Note that in (16), we have shown that the reward difference can be expressed by using the definition of the optimal policy. By plugging (16) into (23), we obtain the following problem:

min⁡ϕ∈Φ ℓ(ϕ):=−E(x,y)∼D,y′∼π(⋅∣x;θt)[ℓ(βlog⁡(πϕ⋆(y∣x)πref(y∣x))−βlog⁡(πϕ⋆(y′∣x)πref(y′∣x)))]s.t.πϕ⋆:=arg⁡max⁡π Ex∼ρ,y∼π(⋅∣x)[r(x,y;ϕ)]−βEx∼ρ[DKL(π(⋅∣x) ∥ πref(⋅∣x))].\begin{aligned} \min_{\phi\in\Phi}\ \ell(\phi)&:=-\mathbb{E}_{(x,y)\sim\mathcal{D},y'\sim\pi(\cdot\mid x;\theta_t)}\left[\ell\left(\beta\log\left(\frac{\pi_{\phi}^{\star}(y\mid x)}{\pi_{\mathrm{ref}}(y\mid x)}\right)-\beta\log\left(\frac{\pi_{\phi}^{\star}(y'\mid x)}{\pi_{\mathrm{ref}}(y'\mid x)}\right)\right)\right]\\ \text{s.t.}\quad\pi_{\phi}^{\star}&:=\underset{\pi}{\arg\max}\ \mathbb{E}_{x\sim\rho,y\sim\pi(\cdot\mid x)}[r(x,y;\phi)]-\beta\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x)\,\|\,\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right]. \end{aligned}

Similarly, as discussed in the DPO approach, one can make two simplifications (1) remove the constraints that the policy has to be optimal w.r.t. some reward; (2) directly parameterize the resulting policy using θ\theta. Then the above problem will be reduced precisely to the SPIN formulation (12).

To further compare the SPIN and IRL, note that at each iteration, once the synthetic preference dataset has been constructed where the preferred data are the demonstration / SFT data and the nonpreferred data are the model-generated data, SPIN directly leverages the synthetic preference dataset and runs DPO to update the policy, while the IRL approach considers two separate steps to update both the reward model and the policy model. Similarly to the comparison of DPO and RLHF, here we expect that IRL enjoys better generalization and can alleviate the distribution shift issue through leveraging online generations in the RL training step, at the cost of a heavier memory burden and additional online generations.

In summary, the method discussed in this section addressed the question (Q1) we raised at the beginning of this section – instead of directly performing SFT on the demonstration data Ddemon\mathcal{D}_{\mathrm{demon}}, it is also possible to learn a reward function from such a dataset, and we expect that the resulting model will generalize better. Later we will use numerical results to confirm such an advantage.

Jointly learning policy and reward from Integrated Human Feedback

Next, let us address question (Q2), by developing an approach that integrates different steps of the alignment process. Toward this end, we observe that by leveraging the IRL-based formulation (19), learning from the demonstration data DDemon\mathcal{D}_{\mathrm{Demon}} becomes very similar to the standard RLHF approach discussed in Sec. 4.2, which learns preference data Dpref\mathcal{D}_{\mathrm{pref}} – both maximize the likelihood of observing the data, while explicitly learning a reward function. Therefore, using reward learning as a common component, it is straightforward to integrate these problems together. In [58] the authors considered the following problem, which extends the IRL problem (19) by adding the BT loss (13):

max⁡ϕ ℓAIHF(ϕ):=γEx∼ρ,y∼πE(⋅∣x)[log⁡πϕ⋆(y∣x)]+αEx∼ρ,(yl≺yw)∼πP(⋅∣x)[ℓ(r(x,yw;ϕ)−r(x,yl;ϕ))](26)\begin{aligned} \max_{\phi}\ \ell_{\mathrm{AIHF}}(\phi)&:=\gamma\mathbb{E}_{x\sim\rho,y\sim\pi^{\mathrm{E}}(\cdot\mid x)}\left[\log\pi_{\phi}^{\star}(y\mid x)\right]\\ &\quad+\alpha\mathbb{E}_{x\sim\rho,(y_l\prec y_w)\sim\pi^{\mathrm{P}}(\cdot\mid x)}\left[\ell\left(r(x,y_w;\phi)-r(x,y_l;\phi)\right)\right] \tag*{(26)} \end{aligned}
πϕ⋆:=arg⁡max⁡π Ex∼ρ,y∼π(⋅∣x)[r(x,y;ϕ)]−βEx∼ρ[DKL(π(⋅∣x) ∥ πref(⋅∣x))],(27)\pi_{\phi}^{\star}:=\underset{\pi}{\arg\max}\ \mathbb{E}_{x\sim\rho,y\sim\pi(\cdot\mid x)}[r(x,y;\phi)]-\beta\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x)\,\|\,\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right], \tag*{(27)}

where γ≥0\gamma\ge0 and α≥0\alpha\ge0 are two tuneable parameters. The authors refer to this approach as AIHF (Alignment with Integrated Human Feedback).

To design an algorithm to solve problem (23), one can combine the RLHF Protocol 4 and the IRL algorithm in (21), to obtain the following iterative algorithm (where tt denotes the iteration number):

ϕt+1:=arg⁡min⁡ϕ  −γE(x,y)∼Ddemo,y′∼π(⋅∣x;θt)[ℓ(r(x,y;ϕ)−r(x,y′;ϕ))]−αE(x,yw,yl)∼Dpref[ℓ(r(x,yw;ϕ)−r(x,yl;ϕ))],(28)\begin{aligned} \phi_{t+1} &:= \underset{\phi}{\arg\min}\;-\gamma\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},y'\sim\pi(\cdot\mid x;\theta_t)}\left[\ell\left(r(x,y;\phi)-r(x,y';\phi)\right)\right] \\ &\quad-\alpha\mathbb{E}_{(x,y_w,y_l)\sim\mathcal{D}_{\mathrm{pref}}}\left[\ell\left(r(x,y_w;\phi)-r(x,y_l;\phi)\right)\right], \tag*{(28)} \end{aligned}
θt+1:=arg⁡max⁡θ  Ex∼ρ,y∼π(⋅∣x;θ)[r(x,y;ϕt+1)]−βEx∼ρ[DKL(π(⋅∣x;θ)∥πref(⋅∣x))].(29)\theta_{t+1}:=\underset{\theta}{\arg\max}\;\mathbb{E}_{x\sim\rho,y\sim\pi(\cdot\mid x;\theta)}\left[r(x,y;\phi_{t+1})\right]-\beta\mathbb{E}_{x\sim\rho}\left[D_{\mathrm{KL}}\left(\pi(\cdot\mid x;\theta)\mathbin\Vert\pi_{\mathrm{ref}}(\cdot\mid x)\right)\right]. \tag*{(29)}

In fact, compared to the IRL algorithm (21), the only difference is that the reward is learned from both preference dataset and the demonstration dataset. In [58], the authors observed that learning reward function from a diverse set of data can be more robust to situations, e.g. when there is an imbalance between the demonstration and preference data, resulting in a more robust policy model; see [58 Sec.3.4] for detailed discussion and a few examples showcasing such an advantage.

Finally, we note that AIHF has several notable special cases. First, if one chooses γ=0\gamma= 0, then reward learning and policy learning become completely decoupled, reducing to the original two-step RLHF approach discussed in § 4.2. Second, similarly to DPO, one can plug in the optimal solution of the lower-level problem (as given in (16)) to the upper-level, remove the lower-level constraint (23b), and directly parameterize the policy. The resulting problem becomes:

max⁡θ  Ex∼ρ,y∼πE(⋅∣x;θ)[log⁡π(y∣x)]+αEx∼ρ,(yl≺yw)∼πP(⋅∣x)[ℓ(βlog⁡(π(yw∣x;θ)πref(yw∣x))−βlog⁡(π(yl∣x;θ)πref(yl∣x)))].\max_{\theta}\;\mathbb{E}_{x\sim\rho,y\sim\pi^{E}(\cdot\mid x;\theta)}[\log\pi(y\mid x)]+\alpha\mathbb{E}_{x\sim\rho,(y_l\prec y_w)\sim\pi^{P}(\cdot\mid x)}\left[\ell\left(\beta\log\left(\frac{\pi(y_w\mid x;\theta)}{\pi_{\mathrm{ref}}(y_w\mid x)}\right)-\beta\log\left(\frac{\pi(y_l\mid x;\theta)}{\pi_{\mathrm{ref}}(y_l\mid x)}\right)\right)\right].

This corresponds to the Regularized Preference Optimization (RPO) approach proposed in [61]. Moreover, if we drop (29) and apply the DPO trick to (24) to optimize:

max⁡θ  E(x,y)∼Ddemo,y′∼π(⋅∣x;θt)[ℓ(βlog⁡(π(y∣x;θ)πref(y∣x))−βlog⁡(π(y′∣x;θ)πref(y′∣x)))]+αE(x,yw,yl)∼Dpref[ℓ(βlog⁡(π(yw∣x;θ)πref(yw∣x))−βlog⁡(π(yl∣x;θ)πref(yl∣x)))].\begin{aligned} \max_{\theta}\;&\mathbb{E}_{(x,y)\sim\mathcal{D}_{\mathrm{demo}},y'\sim\pi(\cdot\mid x;\theta_t)}\left[\ell\left(\beta\log\left(\frac{\pi(y\mid x;\theta)}{\pi_{\mathrm{ref}}(y\mid x)}\right)-\beta\log\left(\frac{\pi(y'\mid x;\theta)}{\pi_{\mathrm{ref}}(y'\mid x)}\right)\right)\right] \\ &+\alpha\mathbb{E}_{(x,y_w,y_l)\sim\mathcal{D}_{\mathrm{pref}}}\left[\ell\left(\beta\log\left(\frac{\pi(y_w\mid x;\theta)}{\pi_{\mathrm{ref}}(y_w\mid x)}\right)-\beta\log\left(\frac{\pi(y_l\mid x;\theta)}{\pi_{\mathrm{ref}}(y_l\mid x)}\right)\right)\right]. \end{aligned}

Then it corresponds to the Self-Play with Adversarial Critic (SPAC) approach proposed in [62].

Finally, we conclude this section with a tabular comparison of different types of alignment algorithms.

Table 3 summarizes different alignment algorithms according to their data sources and optimization requirements. Demonstration-based methods (e.g., SFT, SPIN, IRL) rely solely on expert trajectories, whereas preference-based methods (e.g., DPO, PPO, RLOO) depend on pairwise comparisons or on demonstration data when initialized from an SFT model. Among these, PPO-style variants explicitly require a value function to compute advantages, while most direct preference-modeling approaches remove the need for critic estimation. Hybrid frameworks such as AIHF integrate both demonstration and preference data, effectively bridging supervised and reinforcement-based alignment paradigms.

AlgorithmNeeds Reward?Dataset TypeNeeds Value Fn.?
SFT✗Demonstration✗
SPIN✗Demonstration + self-generated✗
IRL✓Demonstration✗
REINFORCE✓Demonstration + Preference✗
RLOO✓Demonstration + Preference✗
PPO✓Demonstration + Preference✓
DPO✗Demonstration + Preference✗
NLHF✗ (pref. model)Preference✗
GRPO✓Demonstration + Preference✗
Rule-based RL✓ (rule/verifier)Verifiable tasks✗
AIHF✓Demonstration + Preferenceflexible

Table 3. Comparison of alignment algorithms by reward requirement, dataset type, and value-function (critic) dependence. Here since AIHF can use different kinds of RL algorithms such as PPO and DPO, we denote it as ‘flexible’ in the last column.

Dataset, Benchmarks, and Evaluation

In this section, we will introduce a few datasets and benchmarks that are often used to evaluate alignment algorithms. Further, we will present some evaluation results comparing a number of algorithms we have discussed so far.

Dataset

Typically, datasets used in LLM alignment can be categorized into two types: (1) datasets containing multiple responses for a given prompt, with human (or AI-generated) rankings indicating preference, and (2) datasets containing a single demonstration response per prompt.

Preference Dataet. Some of the most well-known preference datasets include: (1) HH-RLHF2 (Anthropic’s Helpful-Harmless RLHF), a dataset collected by Anthropic that includes human preference annotations over pairs of responses, focusing on helpfulness (how well the response answers the query) and harmlessness (avoiding toxic, biased, or dangerous content). (2) UltraFeedback3, which consists of 64K prompts, each accompanied by four model completions from a diverse set of open and proprietary models. Preference labels are provided by GPT-4 based on criteria such as helpfulness and honesty. This dataset has been used to train state-of-the-art chat models such as Zephyr-7B-β.

Demonstration Dataset. Some of the most well-known demonstration datasets include: (1) the TL;DR dataset4, a dataset collected from Reddit where users provide short summaries (TL;DRs) of their posts. (2) UltraChat5, an open-source, large-scale, multi-turn dialogue dataset generated using Turbo APIs. It contains 774K training samples and is designed to enhance instruction-following capabilities.

Self-Generated Dataset In addition to using public datasets, another line of research leverages self-generated data for policy optimization. For example, given a prompt, [63] samples one or more responses from a policy π\pi, evaluates each input-generation pair using a evaluation function (e.g., a reward model in RLHF), labels them as preferred or dispreferred, and then updates the policy using the EM algorithm based on these individual preferences. Similarly, [64] also employs self-generated data to iteratively improve the policy model. This approach can lead to more uniform coverage of the prompt-response space.

Benchmark datasets and benchmark models

AlpacaEval. AlpacaEval [65] is an LLM-based automated evaluation metric – it operates on a fixed set of 805 instructions chosen to be representative of user interactions on the Alpaca web demo. A GPT-4 turbo-based evaluator then compares the responses head-to-head and outputs the probability of preferring the evaluated model. The win rate is then computed as the expected probability that the auto-evaluator prefers the evaluated model’s output on the 805 instructions. This win rate serves as a performance measure of the evaluated LM chatbot.

Open LLM Leaderboard. The HuggingFace Open LLM Leaderboard framework [66] is widely adopted for evaluating LLMs. This comprehensive evaluation suite assesses LLM performance across six key tasks: commonsense reasoning, including ARC, HellaSwag, and Winogrande; multi-task language understanding, as measured by MMLU; truthfulness assessment, which evaluates a model’s tendency to mimic human falsehoods using TruthfulQA; and mathematical problem-solving, assessed via GSM8K.

MT-Bench. MT-Bench [67] is a benchmark consisting of 80 high-quality multi-turn questions, specifically designed to evaluate multi-turn conversation and instruction-following capabilities in LLMs. It focuses on common real-world use cases while incorporating challenging questions to effectively differentiate model performance. To ensure comprehensive coverage, the benchmark is structured around eight key categories of user prompts: writing, roleplay, extraction, reasoning, mathematics, coding, knowledge I (STEM), and knowledge II (humanities/social sciences).

HELM Holistic Evaluation of Language Models (HELM) [68] consists of two levels: (i) an abstract taxonomy of scenarios and metrics that defines the design space for language model evaluation, and (ii) a concrete set of implemented scenarios and metrics selected to prioritize coverage (e.g., different English varieties), value (e.g., user-facing applications), and feasibility (e.g., limited engineering resources). HELM currently includes a core set of 16 scenarios and 7 metrics. These scenarios cover six user-facing tasks (e.g., question answering, information retrieval, summarization, toxicity detection) and span multiple domains (e.g., news, books).

Artificial Analysis6 Artificial Analysis provides objective evaluations and insights to assist developers, researchers, businesses, and other AI users in selecting the most suitable AI technologies for their specific use cases. This benchmark compares and ranks the performance of over 30 LLMs across key metrics, including output quality, cost, performance, and speed, as well as context window size and other relevant factors.

Reasoning Benchmark. Several challenging benchmarks are also used to evaluate reasoning ability. For example, mathematical benchmarks such as AIME (American Invitational Mathematics Examination), AMC (American Mathematics Competitions), and OlympiadBench [69] assess problem-solving skills in competitive mathematics. Additionally, datasets like the Knights and Knaves (K&K) puzzles [70] and LeetCode are commonly used for evaluating logical reasoning and coding proficiency.

RewardBench. The RewardBench [71] offers a comprehensive set of evaluations for reward models, encompassing key aspects such as chat, instruction-following, coding, safety, and other critical metrics for fine-tuned language models. The RewardBench dataset includes a combination of pre-existing evaluation prompt-completion pairs as well as newly curated examples specifically for this project.

Numerical Results

In this subsection, we will present some evaluations results of different alignment approaches. First, we will compare IRL approach (21) with other learning-from-demonstration approaches like SFT (Protocol 1) and SPIN (Protocol 2) to illustrate their differences. Then we will compare a number of algorithms that leverage preference data to further improve the LLM alignment.

Demonstration-only setting

We conduct experiments on the UltraChat dataset [72]. Both the policy and reward models are initialized from the public checkpoint Mistral-7b-SFT-Beta7, which is an SFT model fine-tuned on the UltraChat dataset using the base model Mistral-7B-v0.18.

Since UltraChat contains only demonstration data, we construct a synthetic preference dataset to train the reward model for IRL approaches. In each IRL iteration, we treat the demonstration data from UltraChat as preferred responses and the outputs generated by the IRL policy model as rejected responses. This method enables the creation of preference pairs without explicit human annotations.

We assess the performance of reward models derived from several baselines using RewardBench [71], focusing on categories pertinent to language understanding and generation. Since SPIN lacks an explicit reward model, we evaluate its performance based on an implicit reward formulated as

r(s,a)=log⁡π(a∣s)πref(a∣s)r(s,a) = \log\frac{\pi(a|s)}{\pi_{\mathrm{ref}}(a|s)}

motivated by (16). In our experiments, πref\pi_{\mathrm{ref}} represents the SFT model. For the SFT model itself, we measure performance using the implicit reward r(s,a)=log⁡πSFT(a∣s)r(s,a)=\log\pi_{\mathrm{SFT}}(a|s).

The results, summarized in Table 4, indicate that the IRL-trained reward model outperforms both the base model (initialized from the SFT model) and the policy model trained with SPIN [33]. This demonstrates that integrating high-quality demonstration datasets with IRL methods, which generate synthetic preference pairs by combining demonstrations and model outputs, can significantly enhance reward model quality. Furthermore, Figure 7 illustrates the comparative evaluation of alignment methods when both demonstrations and preference dataset are available. The numerical results show that the IRL-based method is compatible with RLHF method to to enhance model alignment through integrating both demonstration and preference dataset.

TasksFirst turnSecond turnAverage
mistral-7b-sft-beta5.665.095.37
SPIN-Iter16.755.566.16
SPIN-Iter23.183.413.29
IRL-Iter1-Policy6.715.966.33
IRL-Iter2-Policy7.016.196.60

Table 4. Evaluation of Policy Models in MT-Bench. The results show that the IRL method can effectively improve the quality of policy models on multi-turn questions.

Figure 7. Performance comparison of alignment methods. The AIHF-trained model demonstrates superior alignment across various downstream tasks.

We evaluate various LLM policy models using the Open LLM Leaderboard [73] and MT-Bench [67]. As shown in Figure 6 and Table 4, the IRL-based method consistently outperforms both the mistral-7b-sft-beta checkpoint and the SPIN method (regardless of whether self-generation is performed once or twice). These results demonstrate the effectiveness of leveraging high-quality demonstrations and synthetic preferences to improve language model performance in dialogue generation tasks.

(a) Policy Evaluations on Open LLM Leaderboard

(b) Reward Evaluations on Reward Bench

Figure 6. Left: Evaluation of policy models on the Open LLM Leaderboard. Right: Evaluation of reward models using RewardBench, where reward accuracy measures the proportion of preference pairs in which the reward model assigns a higher score to the preferred response. Results show that high-quality demonstration datasets can effectively enhance both reward and policy models via the IRL method.

Aligning with Both Demonstrations and Pairwise Comparisons

In this section, we evaluate several alignment algorithms, categorized as follows: (1) Preference-only: DPO [74], IPO [75], and SPAC [62], which optimize policies solely based on preference data; (2) Demonstration-only: SPIN [33]; (3) Preference and demonstration: RPO [61] and AIHF, which leverage both preference data and demonstrations. For this experiment, we use UltraFeedback. as the preference dataset and UltraChat200k9 as the demonstration dataset. The base model for our experiments is mistral-7b-sft-beta10 [76], which is also used to initialize the reward model.

Fig. 7 evaluates the quality of the aligned models trained on different methods. Furthermore, in Table 5, we also evaluate the reward models estimated using different methods (DPO, standard preference learning and AIHF) over the popular benchmark RewardBench [71]. The BTL reward model is trained in the RLHF pipeline using the loss function defined in (13). The DPO reward is obtained by training a DPO loss on preference data (UltraFeedback) and use the following implicit reward r(s,a)=log⁡π(a∣s)πref(a∣s)r(s,a)=\log\frac{\pi(a|s)}{\pi_{\mathrm{ref}}(a|s)} where πref\pi_{\mathrm{ref}} is the SFT model. For AIHF, we use the demonstration data UltraChat and generate the non-preferred sample using the base model (mistral-7b-stf-full), then train a reward with UltraFeedback and UltraChat data combined. It can be seen that the reward model estimated by AIHF which incorporates both demonstrations and preference achieves better performance.

Reward ModelChatChat HardSafetyReasoningAverage
DPO Reward Model37.43%55.92%64.14%47.33%51.21%
BTL Reward Model95.11%56.58%63.69%69.22%71.15%
AIHF Reward Model94.41%55.37%63.98%76.75%72.63%

Table 5. Evaluation of reward models in Reward-Bench. It can be seen that the reward model estimated by AIHF which incorporates both demonstrations and preference achieves better performance.

Connection of Alignment to Signal Processing

Before we conclude this article, we would like to point out that the SP community has a wealth of expertise that can contribute significantly to alignment research. Given the complexity of aligning LLMs with human preferences, SP methodologies offer valuable tools and frameworks that can improve both the theoretical and practical aspects of alignment.

The connection between large-scale model alignment and SP can be made precise once we recognize that the core challenge of alignment is inference from indirect, noisy, and often incomplete measurements of human intent. Many mathematical tools originally developed in SP, such as inverse problems, denoising and robust estimation all provide rigorous frameworks for tackling precisely these challenges. Below, we elaborate on a few of these connections.

First, alignment can be viewed as a broad class of inverse problems, in which both the human intent and the model’s reasoning trajectory act as latent variables that must be inferred from indirect and noisy observations. In this view, human feedback (e.g., pairwise preferences or rankings) constitutes a noisy measurement of an underlying latent reward signal that reflects human values, while the model’s internal reasoning process represents a second latent structure that mediates how these preferences are expressed in behavior. This setting is analogous to classical SP problems such as image deblurring or tomography, where one seeks to recover a clean signal xx from degraded observations y=Ax+ϵy=Ax+\epsilon. Here, both the human reward signal and the model’s internal reasoning can be regarded as hidden components of xx, and the alignment algorithm attempts to reconstruct them from limited feedback data yy.

Recent work has begun to explicitly exploit this latent-variable perspective. For example, [77] formulates reasoning-based alignment as a joint inference problem: it treats an LLM’s internal rationales as hidden variables and alternates between (i) inferring plausible reasoning chains using reward-guided sampling, and (ii) updating model parameters to maximize the joint log-likelihood of the latent rationales and final outputs. This two-stage optimization is formally equivalent to an Expectation–Maximization (EM) procedure widely used in SP and statistics to solve inverse problems with hidden variables. In this context, the E-step corresponds to estimating latent model reasoning signals, while the M-step updates model parameters given these inferred signals. Such a formulation provides a principled link between SP-style latent-variable estimation and alignment objectives, and clarifies how human preferences or reasoning traces can be reconstructed and aligned through iterative inference.

Such latent variable perspectives also extend to the IRL problem discussed earlier, which can be viewed as solving inverse problems over high-dimensional function spaces. Classical SP regularization techniques such as Tikhonov penalties, total-variation priors, or sparsity constraints can provide principled ways to stabilize these ill-posed estimation problems, particularly when human feedback is sparse or inconsistent.

Moreover, as alignment research expands to multi-modal domains involving text, images, speech, and video, SP expertise in multi-modal signal fusion, feature extraction, and cross-modal learning becomes increasingly relevant. The SP community’s long-standing experience in designing architectures that integrate heterogeneous signal sources can directly inform the development of more effective and interpretable multi-modal alignment mechanisms.

Concluding Remarks

In this work, we provided a tutorial on aligning LLMs with human feedback, exploring both mathematical foundations and state-of-the-art algorithmic approaches. Despite significant progress in aligning LLMs with human values and preferences, several open challenges remain.

LLM alignment methods continue to face challenges related to scalability and effectiveness. Learning robust and high-quality policies from reward models is challenging and requires extensive human annotation and computation. Existing RL-based fine-tuning methods, such as PPO, demand careful hyperparameter tuning and require a huge amount of compute resources. Moreover, reward hacking remains a significant problem – where models find unintended shortcuts to maximize reward scores without genuinely improving response alignment. Instead of producing responses that align with human intent, models can generate outputs optimized purely for high reward function scores, potentially leading to unreliable behavior. Addressing these concerns requires the development of more efficient RL algorithms, robust and diverse reward functions (e.g., a combination of trained reward functions and the verifiable ones mentioned in § 4.5), and hybrid approaches that integrate supervised learning with RL to improve scalability and alignment fidelity.

Acknowledgments

Luca Viano was supported by the Swiss Data Science Center under fellowship number P22_03. This work was supported as part of the Swiss AI Initiative, through a grant from the ETH Domain and computational resources provided by the Swiss National Supercomputing Centre (CSCS) under the Alps infrastructure. Research was sponsored by the Army Research Office and was accomplished under Grant Number W911NF-24-1-0048. This work was funded by the Swiss National Science Foundation (SNSF) under grant number 2000-1-240094.

References

  1. [1]Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław Dębiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al., “Dota 2 with large scale deep reinforcement learning,” arXiv preprint arXiv:1912.06680, 2019.arxiv.org/abs/1912.06680
  2. [2]Marc G Bellemare, Salvatore Candido, Pablo Samuel Castro, Jun Gong, Marlos C Machado, Subhodeep Moitra, Sameera S Ponda, and Ziyu Wang, “Autonomous navigation of stratospheric balloons using reinforcement learning,” Nature, vol. 588, no. 7836, pp. 77–82, 2020.DOI
  3. [3]Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al., “Training a helpful and harmless assistant with reinforcement learning from human feedback,” arXiv preprint arXiv:2204.05862, 2022.arxiv.org/abs/2204.05862
  4. [4]Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al., “Training language models to follow instructions with human feedback,” Advances in neural information processing systems, vol. 35, pp. 27730–27744, 2022.arxiv.org/abs/2203.02155
  5. [5]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al., “Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning,” arXiv preprint arXiv:2501.12948, 2025.DOI
  6. [6]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin, “Attention is all you need,” Advances in neural information processing systems, vol. 30, 2017.arxiv.org/abs/1706.03762
  7. [7]David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams, “Learning representations by back-propagating errors,” nature, vol. 323, no. 6088, pp. 533–536, 1986.
  8. [8]Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton, “Layer normalization,” arXiv preprint arXiv:1607.06450, 2016.arxiv.org/abs/1607.06450
  9. [9]Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander Alemi, “Inception-v4, inception-resnet and the impact of residual connections on learning,” in Proceedings of the AAAI conference on artificial intelligence, 2017, vol. 31.arxiv.org/abs/1602.07261
  10. [10]Jingjing Xu, Xu Sun, Zhiyuan Zhang, Guangxiang Zhao, and Junyang Lin, “Understanding and improving layer normalization,” Advances in neural information processing systems, vol. 32, 2019.arxiv.org/abs/1911.07013
  11. [11]Jeffrey Zhou, Tianjian Lu, Swaroop Mishra, Siddhartha Brahma, Sujoy Basu, Yi Luan, Denny Zhou, and Le Hou, “Instruction-following evaluation for large language models,” arXiv preprint arXiv:2311.07911, 2023.arxiv.org/abs/2311.07911
  12. [12]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al., “Chain-of-thought prompting elicits reasoning in large language models,” Advances in neural information processing systems, vol. 35, pp. 24824–24837, 2022.arxiv.org/abs/2201.11903
  13. [13]Xinnan Zhang, Chenliang Li, Siliang Zeng, Jiaxiang Li, Zhongruo Wang, Kaixiang Lin, Songtao Lu, Alfredo Garcia, and Mingyi Hong, “Aligning frozen llms by reinforcement learning: An iterative reweight-then-optimize approach,” arXiv preprint arXiv:2506.17828, 2025.arxiv.org/abs/2506.17828
  14. [14]Zehan Qi, Xiao Liu, Iat Long Iong, Hanyu Lai, Xueqiao Sun, Wenyi Zhao, Yu Yang, Xinyue Yang, Jiadai Sun, Shuntian Yao, et al., “Webrl: Training llm web agents via self-evolving online curriculum reinforcement learning,” arXiv preprint arXiv:2411.02337, 2024.arxiv.org/abs/2411.02337
  15. [15]Kimi Team, Yifan Bai, Yiping Bao, Guanduo Chen, Jiahao Chen, Ningxin Chen, Ruijue Chen, Yanru Chen, Yuankun Chen, Yutian Chen, et al., “Kimi k2: Open agentic intelligence,” arXiv preprint arXiv:2507.20534, 2025.
  16. [16]Abhimanyu Dubey, Abhinav Jauhari, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al., “The llama 3 herd of models,” arXiv preprint arXiv:2407.21783, 2024.arxiv.org/abs/2407.21783
  17. [17]Geoffrey Hinton, “rmsprop: Divide the gradient by a running average of its recent magnitude,” 2012.
  18. [18]Diederik P. Kingma and Jimmy Ba, “Adam: A method for stochastic optimization,” in International Conference on Learning Representations (ICLR), San Diego, CA, USA, 2015.arxiv.org/abs/1412.6980
  19. [19]Ilya Loshchilov and Frank Hutter, “Decoupled weight decay regularization,” in International Conference on Learning Representations (ICLR), 2019.
  20. [20]Louis L. Thurstone, “A law of comparative judgment,” Psychological Review, vol. 34, no. 4, pp. 273–286, 1927.
  21. [21]Daniel McFadden, “The measurement of urban travel demand,” Journal of Public Economics, vol. 3, no. 4, pp. 303–328, 1974.DOI
  22. [22]R. Duncan Luce, Individual Choice Behavior: A Theoretical analysis, Wiley, New York, NY, USA, 1959.
  23. [23]Ralph Allan Bradley and Milton E Terry, “Rank analysis of incomplete block designs: I. the method of paired comparisons,” Biometrika, vol. 39, no. 3/4, pp. 324–345, 1952.DOI
  24. [24]Ian Hamilton, Nick Tawn, and David Firth, “The many routes to the ubiquitous bradley-terry model,” arXiv preprint arXiv:2312.13619, 2023.arxiv.org/abs/2312.13619
  25. [25]Mark J. Machina, “Stochastic choice functions generated from deterministic preferences over lotteries,” The Economic Journal, vol. 95, no. 379, pp. 575–594, 1985.DOI
  26. [26]Naftali Tishby and Daniel Polani, “Information theory of decisions and actions,” in Perception-Action Cycle: Models, Architectures, and Hardware, Vassilis Cutsuridis, Amir Hussain, and John G. Taylor, Eds., pp. 601–636. Springer New York, New York, NY, 2011.DOI
  27. [27]Fabio Maccheroni, Massimo Marinacci, and Aldo Rustichini, “Ambiguity aversion, robustness, and the variational representation of preferences,” Econometrica, vol. 74, no. 6, pp. 1447–1498, 2006.DOI
  28. [28]Siliang Zeng, Mingyi Hong, and Alfredo Garcia, “Structural estimation of markov decision processes in high-dimensional state space with finite-time guarantees,” arXiv preprint arXiv:2210.01282, 2022.arxiv.org/abs/2210.01282
  29. [29]Dean A Pomerleau, “Alvinn: An autonomous land vehicle in a neural network,” Advances in neural information processing systems, vol. 1, 1988.
  30. [30]Stéphane Ross and Drew Bagnell, “Efficient reductions for imitation learning,” in Proceedings of the thirteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, 2010, pp. 661–668.
  31. [31]Dylan J Foster, Adam Block, and Dipendra Misra, “Is behavior cloning all you need? understanding horizon in imitation learning,” arXiv preprint arXiv:2407.15007, 2024.arxiv.org/abs/2407.15007
  32. [32]Markus Wulfmeier, Michael Bloesch, Nino Vieillard, Arun Ahuja, Jorg Bornschein, Sandy Huang, Artem Sokolov, Matt Barnes, Guillaume Desjardins, Alex Bewley, et al., “Imitating language via scalable inverse reinforcement learning,” Advances in Neural Information Processing Systems, vol. 37, pp. 90714–90735, 2024.arxiv.org/abs/2409.01369
  33. [33]Zixiang Chen, Yihe Deng, Huizhuo Yuan, Kaixuan Ji, and Quanquan Gu, “Self-play fine-tuning converts weak language models to strong language models,” arXiv preprint arXiv:2401.01335, 2024.arxiv.org/abs/2401.01335
  34. [34]Qingyang Wu, Lei Li, and Zhou Yu, “Textgail: Generative adversarial imitation learning for text generation,” in Proceedings of the AAAI Conference on Artificial Intelligence, 2021, vol. 35, pp. 14067–14075.arxiv.org/abs/2004.13796
  35. [35]Siliang Zeng, Yao Liu, Huzefa Rangwala, George Karypis, Mingyi Hong, and Rasool Fakoor, “From demonstrations to rewards: Alignment without explicit human preferences,” arXiv preprint arXiv:2503.13538, 2025.arxiv.org/abs/2503.13538
  36. [36]Hao Sun and Mihaela van der Schaar, “Inverse-rlignment: Inverse reinforcement learning from demonstrations for llm alignment,” arXiv preprint arXiv:2405.15624, 2024.
  37. [37]Chris Cundy and Stefano Ermon, “Sequencematch: Imitation learning for autoregressive sequence modelling with backtracking,” arXiv preprint arXiv:2306.05426, 2023.arxiv.org/abs/2306.05426
  38. [38]Markus Wulfmeier, Peter Ondruska, and Ingmar Posner, “Maximum entropy deep inverse reinforcement learning,” arXiv preprint arXiv:1507.04888, 2015.arxiv.org/abs/1507.04888
  39. [39]John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov, “Proximal policy optimization algorithms,” arXiv preprint arXiv:1707.06347, 2017.arxiv.org/abs/1707.06347
  40. [40]Ronald J Williams, “Simple statistical gradient-following algorithms for connectionist reinforcement learning,” Machine learning, vol. 8, pp. 229–256, 1992.
  41. [41]Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei, “Deep reinforcement learning from human preferences,” Advances in neural information processing systems, vol. 30, 2017.arxiv.org/abs/1706.03741
  42. [42]Arash Ahmadian, Chris Cremer, Matthias Gallé, Marzieh Fadaee, Julia Kreutzer, Ahmet Üstün, and Sara Hooker, “Back to basics: Revisiting reinforce style optimization for learning from human feedback in llms,” arXiv preprint arXiv:2402.14740, 2024.arxiv.org/abs/2402.14740
  43. [43]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Y Wu, et al., “Deepseekmath: Pushing the limits of mathematical reasoning in open language models,” arXiv preprint arXiv:2402.03300, 2024.arxiv.org/abs/2402.03300
  44. [44]Tian Xu, Ziniu Li, and Yang Yu, “Error bounds of imitating policies and environments,” Advances in Neural Information Processing Systems, vol. 33, pp. 15737–15749, 2020.arxiv.org/abs/2010.11876
  45. [45]Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn, “Direct preference optimization: Your language model is secretly a reward model,” Advances in Neural Information Processing Systems, vol. 36, 2024.arxiv.org/abs/2305.18290
  46. [46]Shusheng Xu, Wei Fu, Jiaxuan Gao, Wenjie Ye, Weilin Liu, Zhiyu Mei, Guangju Wang, Chao Yu, and Yi Wu, “Is dpo superior to ppo for llm alignment? a comprehensive study,” arXiv preprint arXiv:2404.10719, 2024.arxiv.org/abs/2404.10719
  47. [47]Biqing Qi, Pengfei Li, Fangyuan Li, Junqi Gao, Kaiyan Zhang, and Bowen Zhou, “Online dpo: Online direct preference optimization with fast-slow chasing,” arXiv preprint arXiv:2406.05534, 2024.arxiv.org/abs/2406.05534
  48. [48]Rémi Munos, Michal Valko, Daniele Calandriello, Mohammad Gheshlaghi Azar, Mark Rowland, Zhaohan Daniel Guo, Yunhao Tang, Matthieu Geist, Thomas Mesnard, Andrea Michi, et al., “Nash learning from human feedback,” arXiv preprint arXiv:2312.00886, 2023.arxiv.org/abs/2312.00886
  49. [49]Tian Xie, Zitian Gao, Qingnan Ren, Haoming Luo, Yuqian Hong, Bryan Dai, Joey Zhou, Kai Qiu, Zhirong Wu, and Chong Luo, “Logic-rl: Unleashing llm reasoning with rule-based reinforcement learning,” arXiv preprint arXiv:2502.14768, 2025.arxiv.org/abs/2502.14768
  50. [50]Siliang Zeng, Chenliang Li, Alfredo Garcia, and Mingyi Hong, “Maximum-likelihood inverse reinforcement learning with finite-time guarantees,” Advances in Neural Information Processing Systems, vol. 35, pp. 10122–10135, 2022.arxiv.org/abs/2210.01808
  51. [51]Stéphane Ross, Geoffrey Gordon, and Drew Bagnell, “A reduction of imitation learning and structured prediction to no-regret online learning,” in Proceedings of the fourteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, 2011, pp. 627–635.
  52. [52]Luca Viano, Yu-Ting Huang, Parameswaran Kamalaruban, Adrian Weller, and Volkan Cevher, “Robust inverse reinforcement learning under transition dynamics mismatch,” Advances in Neural Information Processing Systems, vol. 34, pp. 25917–25931, 2021.arxiv.org/abs/2007.01174
  53. [53]Jiaxiang Li, Siliang Zeng, Hoi-To Wai, Chenliang Li, Alfredo Garcia, and Mingyi Hong, “Getting more juice out of the sft data: Reward learning from human demonstration improves sft for llm alignment,” Advances in Neural Information Processing Systems, 2024.arxiv.org/abs/2405.17888
  54. [54]Siliang Zeng, Mingyi Hong, and Alfredo Garcia, “Structural estimation of markov decision processes in high-dimensional state space with finite-time guarantees,” Operations Research, 2024.arxiv.org/abs/2210.01282
  55. [55]Siliang Zeng, Yao Liu, Huzefa Rangwala, George Karypis, Mingyi Hong, and Rasool Fakoor, “From demonstrations to rewards: Alignment without explicit human preferences,” 2025.arxiv.org/abs/2503.13538
  56. [56]Borja Ibarz, Jan Leike, Tobias Pohlen, Geoffrey Irving, Shane Legg, and Dario Amodei, “Reward learning from human preferences and demonstrations in atari,” Advances in neural information processing systems, vol. 31, 2018.
  57. [57]Lewis Tunstall, Edward Beeching, Nathan Lambert, Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi Huang, Leandro von Werra, Clémentine Fourrier, Nathan Habib, et al., “Zephyr: Direct distillation of llm alignment,” arXiv preprint arXiv:2310.16944, 2023.arxiv.org/abs/2310.16944
  58. [58]Chenliang Li, Siliang Zeng, Zeyi Liao, Jiaxiang Li, Dongyeop Kang, Alfredo Garcia, and Mingyi Hong, “Joint demonstration and preference learning improves policy alignment with human feedback,” arXiv preprint arXiv:2406.06874, 2024.
  59. [59]Teng Xiao, Yige Yuan, Mingxiao Li, Zhengyu Chen, and Vasant G Honavar, “On a connection between imitation learning and rlhf,” arXiv preprint arXiv:2503.05079, 2025.arxiv.org/abs/2503.05079
  60. [60]Drew Fudenberg, Ryota Iijima, and Tomasz Strzalecki, “Stochastic choice and revealed perturbed utility,” Econometrica, vol. 83, no. 6, pp. 2371–2409, 2015.DOI
  61. [61]Zhihan Liu, Miao Lu, Shenao Zhang, Boyi Liu, Hongyi Guo, Yingxiang Yang, Jose Blanchet, and Zhaoran Wang, “Provably mitigating overoptimization in RLHF: Your SFT loss is implicitly an adversarial regularizer,” in The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.arxiv.org/abs/2405.16436
  62. [62]Xiang Ji, Sanjeev Kulkarni, Mengdi Wang, and Tengyang Xie, “Self-play with adversarial critic: Provable and scalable offline alignment for language models,” arXiv preprint arXiv:2406.04274, 2024.arxiv.org/abs/2406.04274
  63. [63]Abbas Abdolmaleki, Bilal Piot, Bobak Shahriari, Jost Tobias Springenberg, Tim Hertweck, Rishabh Joshi, Junhyuk Oh, Michael Bloesch, Thomas Lampe, Nicolas Heess, et al., “Preference optimization as probabilistic inference,” arXiv preprint arXiv:2410.04166, 2024.
  64. [64]Wei Xiong, Hanze Dong, Chenlu Ye, Ziqi Wang, Han Zhong, Heng Ji, Nan Jiang, and Tong Zhang, “Iterative preference learning from human feedback: Bridging theory and practice for rlhf under kl-constraint,” arXiv preprint arXiv:2312.11456, 2023.arxiv.org/abs/2312.11456
  65. [65]Yann Dubois, Balázs Galambosi, Percy Liang, and Tatsunori B Hashimoto, “Length-controlled alpacaeval: A simple way to debias automatic evaluators,” arXiv preprint arXiv:2404.04475, 2024.arxiv.org/abs/2404.04475
  66. [66]Edward Beeching, Clémentine Fourrier, Nathan Habib, Sheon Han, Nathan Lambert, Nazneen Rajani, Omar Sanseviero, Lewis Tunstall, and Thomas Wolf, “Open llm leaderboard,” https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard, 2023.
  67. [67]Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al., “Judging llm-as-a-judge with mt-bench and chatbot arena,” Advances in Neural Information Processing Systems, vol. 36, pp. 46595–46623, 2023.arxiv.org/abs/2306.05685
  68. [68]Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhui Wu, Ananya Kumar, Benjamin Newman, Binhang Yuan, Bobby Yan, Ce Zhang, Christian Alexander Cosgrove, Christopher D Manning, Christopher Re, Diana Acosta-Navas, Drew Arad Hudson, Eric Zelikman, Esin Durmus, Faisal Ladakh, Frieda Rong, Hongyu Ren, Huaxiu Yao, Jue WANG, Keshav Santhanam, Laurel Orr, Lucia Zheng, Mert Yuksekgonul, Mirac Suzgun, Nathan Kim, Neel Guha, Niladri S. Chatterji, Omar Khattab, Peter Henderson, Qian Huang, Ryan Andrew Chi, Sang Michael Xie, Shibani Santurkar, Surya Ganguli, Tatsunori Hashimoto, Thomas Icard, Tianyi Zhang, Vishrav Chaudhary, William Wang, Xuechen Li, Yifan Mai, Yuhui Zhang, and Yuta Koreeda, “Holistic evaluation of language models,” Transactions on Machine Learning Research, 2023, Featured Certification, Expert Certification.
  69. [69]Chaoqun He, Renjie Luo, Yuzhuo Bai, Shengding Hu, Zhen Leng Thai, Junhao Shen, Jinyi Hu, Xu Han, Yujie Huang, Yuxiang Zhang, et al., “Olympiadbench: A challenging benchmark for promoting agi with olympiad-level bilingual multimodal scientific problems,” arXiv preprint arXiv:2402.14008, 2024.
  70. [70]Chulin Xie, Yangsibo Huang, Chiyuan Zhang, Da Yu, Xinyun Chen, Bill Yuchen Lin, Bo Li, Badih Ghazi, and Ravi Kumar, “On memorization of large language models in logical reasoning,” arXiv preprint arXiv:2410.23123, 2024.
  71. [71]Nathan Lambert, Valentina Pyatkin, Jacob Morrison, LJ Miranda, Bill Yuchen Lin, Khyathi Chandu, Nouha Dziri, Sachin Kumar, Tom Zick, Yejin Choi, et al., “Rewardbench: Evaluating reward models for language modeling,” arXiv preprint arXiv:2403.13787, 2024.
  72. [72]Ning Ding, Yulin Chen, Bokai Xu, Yujia Qin, Zhi Zheng, Shengding Hu, Zhiyuan Liu, Maosong Sun, and Bowen Zhou, “Enhancing chat language models by scaling high-quality instructional conversations,” arXiv preprint arXiv:2305.14233, 2023.
  73. [73]Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noach’s, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou, “A framework for few-shot language model evaluation,” 12 2023.
  74. [74]Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D Manning, and Chelsea Finn, “Direct preference optimization: Your language model is secretly a reward model,” arXiv preprint arXiv:2305.18290, 2023.
  75. [75]Mohammad Gheshlaghi Azar, Zhaohan Daniel Guo, Bilal Piot, Remi Munos, Mark Rowland, Michal Valko, and Daniele Calandriello, “A general theoretical paradigm to understand learning from human preferences,” in International Conference on Artificial Intelligence and Statistics. PMLR, 2024, pp. 4447–4455.
  76. [76]Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al., “Mistral 7b,” arXiv preprint arXiv:2310.06825, 2023.arxiv.org/abs/2310.06825
  77. [77]Han Zhong, Yutong Yin, Shenao Zhang, Xiaojun Xu, Yuanxin Liu, Yifei Zuo, Zhihan Liu, Boyi Liu, Sirui Zheng, Hongyi Guo, et al., “Brite: Bootstrapping reinforced thinking process to enhance language model reasoning,” in Forty-second International Conference on Machine Learning.

Paper details

vlnc:W_txmqzjfs
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents