Direct Alignment of Language Models via Quality-Aware Self-Refinement

## Abstract

Abstract Reinforcement Learning from Human Feedback (RLHF) has been commonly used to align the behaviors of Large Language Models (LLMs) with human preferences. Recently, a popular alternative is Direct Policy Optimization (DPO), which replaces an LLM-based reward model with the policy itself, thus obviating the need for extra memory and training time to learn the reward model. However, DPO does not consider the relative qualities of the positive and negative responses, and can lead to sub-optimal training outcomes. To alleviate this problem, we investigate the use of intrinsic knowledge within the on-the-fly fine-tuning LLM to obtain relative qualities and help to refine the loss function. Specifically, we leverage the knowledge of the LLM to design a refinement function to estimate the quality of both the positive and negative responses. We show that the constructed refinement function can help self-refine the loss function under mild assumptions. The refinement function is integrated into DPO and its variant Identity Policy Optimization (IPO). Experiments across various evaluators indicate that they can improve the performance of the fine-tuned models over DPO and IPO.

## 1 Introduction

Large Language Models (LLMs) have demonstrated significant capabilities across various natural language processing tasks [; ; ; ]. Ensuring that these LLMs produce the desired responses and behaviors that are aligned with human preferences is crucial for safe and controllable AI systems []. To achieve this, a popular method is Reinforcement Learning from Human Feedback (RLHF) [; ; ], which first trains a reward model using human-labeled response pairs, and then uses this to adjust the policy parameters of the LLM [; ]. However, the reward model is often constructed by another LLM, which requires further training and storage [].

To reduce the storage and training time of the reward model, a variety of methods have been proposed recently [; ; ]. In particular, a prominent solution is the Direct Policy Optimization (DPO) [], which replaces the reward model with the policy itself, thus obviating the need for an explicit reward model. Recently, numerous variants of DPO have also been developed [; ; ; ; ].

The objective of DPO is to consistently increase the likelihood of human-preferred responses while reducing the likelihood of the undesired ones. However, this strategy does not consider the relative qualities of the positive and negative responses, and can lead to suboptimal training outcomes, particularly when the preferred responses are not substantially superior, or when the undesired responses are not adequately inferior [; ; ].

To alleviate this issue, Amini et al. [] and Zhou et al. [] propose the use of a score function to self-refine the objective. However, this approach requires the availability of an ideal reward or score function, which may not be always feasible. Similarly, Cui et al. [] and Tunstall et al. [] employ GPT-4 [] to select high-quality response pairs by scoring them. This method requires a strong LLM to effectively filter the dataset, which again may not always be practical. These considerations raise the question: *Can we achieve this by using the inherent knowledge within the policy itself?*

Recently, self-alignment has attracted increasing attention due to its ability to leverage the inherent knowledge of LLMs to enhance alignment capabilities, obviating the necessity for additional human-annotated data [; ; ; ]. Inspired by this, we propose to utilize on-the-fly fine-tuning of an LLM’s knowledge to help evaluate the quality of positive and negative responses. The underlying premise is that even relatively weak LLMs possess some ability to assess the quality of responses [; ]. Consequently, our objective is to exploit this capability to more effectively evaluate response quality, thereby enhancing the efficiency and accuracy of the fine-tuned model.

In this paper, we investigate the use of intrinsic knowledge within the LLM to self-refine the loss function. In summary, the contributions of this work are as follows:

- •
We leverage the knowledge of the LLM to design a refinement function, which estimates the quality of positive and negative responses.
- •
We demonstrate that the constructed refinement function can help self-refine the loss function under mild assumptions.
- •
By utilizing the refinement function, we propose two novel approaches based on DPO and its variant Identity Policy Optimization (IPO)
[].

Experimental results across various evaluators indicate that the proposed self-refined methods improve the performance of the fine-tuned models compared to their counterparts.

## 2 Preliminaries

### 2.1 Classical RLHF with Bradley-Terry Reward Model

Given a pre-trained large language model (LLM) $\pi_{\text{ref}}$ as initialization, Reinforcement Learning from Human Feedback (RLHF) [; ; ] aims to learn an LLM $\pi$ that aligns with human values and preferences. Specifically, let $x$ be the query, $y$ be the output of $\pi$, and $r$ be a reward function that evaluates the performance of $y$ given $x$, RLHF tries to maximize $r$ while ensuring that the trained LLM $\pi$ does not deviate significantly from the pre-trained model $\pi_{\text{ref}}$. This can be formulated as the following optimization problem [; ; ]:

$$ $\max_{\pi}\mathbb{E}_{x\sim\mathcal{D},y\sim\pi(\cdot|x)}r(y|x)-\beta\mathbb{D }_{\mathrm{KL}}[\pi(y|x)\|\pi_{\text{ref}}(y|x)],$ (1) $$

where $\mathbb{D}_{\mathrm{KL}}[\pi(y|x)\|\pi_{\text{ref}}(y|x)]$ is the Kullback-Leibler divergence between $\pi$ and $\pi_{\text{ref}}$, and $\beta$ is a constant.

Since $r$ is unknown, the user needs to provide a set of preferences $D\equiv\{(x_{i},y^{+}_{i},y^{-}_{i})\}^{N}_{i=1}$, where $y^{+}_{i}$ (resp. $y^{-}_{i}$) is the positive (resp. negative) response for query $x_{i}$. A suitable model, typically another LLM (parameterized by $\omega$) [; ], then learns the reward function by maximizing the probability $p(y_{i}^{+}\succ y_{i}^{-}|x)$ that $y_{i}^{+}$ is preferred over $y_{i}^{-}$ (denoted $y_{i}^{+}\succ y_{i}^{-}$) [; ; ]. Typically, this probability is defined by the Bradley-Terry preference model [; ] as:

$$ $p(y_{i}^{+}\succ y_{i}^{-}|x_{i})\equiv\sigma(r(y_{i}^{+}|x_{i})-r(y_{i}^{-}|x _{i})),$ (2) $$

where $\sigma(\cdot)$ is the logistic function. The optimal $r$ can then be obtained by maximizing the log likelihood

$$ $\max_{r}\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log[\sigma(r(y_{i}^{+}|x_{ i})-r(y_{i}^{-}|x_{i}))].$ (3) $$

With the obtained $r$, we can then find $\pi$ by optimizing (1).

### 2.2 Direct Preference Optimization (DPO)

In RLHF, the reward model is represented by a LLM []. This can be time- and memory-expensive. It is observed that the optimal $\pi$ in (1) indeed has the closed form []:
$\pi(y|x)\propto\pi_{\text{ref}}(y|x)\exp\left(\frac{r(y|x)}{\beta}\right),$ and so

$$ $r(y|x)=\beta\log\frac{\pi(y|x)}{\pi_{\text{ref}}(y|x)}+c(x),$ (4) $$

where $c(x)\equiv\sum_{y\in\mathcal{Y}}\pi_{\text{ref}}(y\mid x)\exp\left(\frac{1}{
\beta}r(y|x)\right)$, and $\mathcal{Y}$ is the set of responses. By plugging this into (3), the optimal policy can be found directly by maximizing:

$$ $\max\nolimits_{\pi}\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log\sigma\left( \beta\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\beta\log\frac{\pi(y^{ -}|x)}{\pi_{\text{ref}}(y^{-}|x)}\right).$ (5) $$

### 2.3 Identity Policy Optimisation (IPO)

DPO aims to maximize (1). However, our goal is to maximize the preference rather than the reward []. Consequently, a better option is to maximize the preference probabilities $p(y\succ y^{\prime}|x)$. To this end, IPO [] optimizes the following objective:

$$ $\max_{\pi}\mathbb{E}_{x\sim\mathcal{D},y^{+}\sim\pi(\cdot|x),y^{-}\sim\pi_{ \text{ref}}(\cdot|x)}p(y^{+}\succ y^{-}|x)-\beta\mathbb{D}_{\mathrm{KL}}[\pi(y ^{+}|x)\|\pi_{\text{ref}}(y^{-}|x)].$ (6) $$

Similar to DPO, following [], the optimal $\pi$ also has a closed-form solution:

$$ $\pi(y^{+}|x)\propto\pi_{\text{ref}}(y^{-}|x)\exp\left(\mathbb{E}_{y^{+}\sim\pi _{\text{ref}}(\cdot|x)}p(y^{+}\succ y^{-}|x)/\beta\right).$ (7) $$

The loss for IPO is then defined as:

$$ $\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\left[\left(\log\frac{\pi(y^{+}|x)} {\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi(y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)} -\frac{1}{2\beta}\right)^{2}\right].$ (8) $$

### 2.4 Self-Alignment

The proposed method is also related to self-alignment [; ; ], which uses the LLM’s own knowledge to improve the alignment. For example, self-judgement [; ; ; ; ] uses the LLM as a judge to evaluate the generated answer. Self-improving [; ; ; ; ] improves LLM by playing game with another LLM opponent. Our work uses the self-alignment ability of LLM to construct a refinement function to adjust the quality of responses.

## 3 Proposed Method

### 3.1 Limitation of Maximizing Bradley-Terry Preference

Let $r^{*}$ and $r$ be the true and learned reward function respectively. For any tuple $(x,y^{+},y^{-})\in D$, the true reward of the positive response $y^{+}$ should exceed that of the negative response $y^{-}$, i.e., $y^{+}\succ y^{-}\Leftrightarrow r^{*}(y^{+}|x)>r^{*}(y^{-}|x)$. Consider two tuples $(x_{i},y_{i}^{+},y_{i}^{-})$ and $(x_{j},y_{j}^{+},y_{j}^{-})$. When $r^{*}(y_{i}^{+}|x_{i})-r^{*}(y_{i}^{-}|x_{i})>r^{*}(y_{j}^{+}|x_{j})-r^{*}(y_{
j}^{-}|x_{j})$, we prefer $p(y_{i}^{+}\succ y_{i}^{-}|x_{i})>p(y_{j}^{+}\succ y_{j}^{-}|x_{j})$, and so $\sigma(r(y_{i}^{+}|x_{i})-r(y_{i}^{-}|x_{i}))>\sigma(r(y_{j}^{+}|x_{j})-r(y_{j
}^{-}|x_{j}))$ from (2). In other words, the more informative tuple $(x_{i},y_{i}^{+},y_{i}^{-})$ should be more important. However, RLHF simply maximizes (3), which considers all tuples in the dataset $D$ equally.

### 3.2 Refining the Reward Difference between Positive and Negative Responses

#### 3.2.1 Intuition

To alleviate this problem, we propose adding a refinement function $\Delta(y^{-},y^{+};x):\mathcal{Y}\times\mathcal{Y}\times\mathcal{X}\rightarrow
\mathbb{R}$ (where $\mathcal{X}$ and $\mathcal{Y}$ are the sets of queries and responses, respectively) to adjust $r(y^{+}|x)-r(y^{-}|x)$, so that problem (3) is modified to:

$$ $\max_{\pi}\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log[\sigma(r(y^{+}|x)-r( y^{-}|x)-\lambda\Delta(y^{-},y^{+};x))],$ (9) $$

where $\lambda$ is a positive constant. Intuitively, when $\Delta(y^{-},y^{+};x)$ is large, $\sigma(r(y^{+}|x)-r(y^{-}|x)-\lambda\Delta(y^{-},y^{+};x))$ becomes small, and the optimization in (9) will tend to enlarge the “distance” $r(y^{+}|x)-r(y^{-}|x)$ between the positive and negative responses. Thus, for two tuples $(x,y^{+},y^{-})$ and $(x,\tilde{y}^{+},\tilde{y}^{-})$ corresponding to the same query $x$, we want to design a $\Delta$ such that when $\Delta(y^{-},y^{+};x)>\Delta(\tilde{y}^{-},\tilde{y}^{+};x)$, their true reward values satisfy:

$$ $r^{*}(y^{+}|x)-r^{*}(y^{-}|x)>r^{*}(\tilde{y}^{+}|x)-r^{*}(\tilde{y}^{-}|x).$ $$

In other words, a larger difference $r^{*}(y^{+}|x)-r^{*}(y^{-}|x)$ in the true reward values between the positive and negative responses corresponds to a larger $\Delta(y^{-},y^{+};x)$, and vice versa. However, obviously the difficulty is that we do not have access to $r^{*}$.

#### 3.2.2 Implementing Δ Δ \Delta roman_Δ via Prompting

First, we assume that the LLM is capable of learning a reward function that aligns with the true reward function. This premise is formalized as follows:

###### Assumption 3.1 .

LLM $\pi$ can construct a reward model $r$ such that for any $(x,y^{+},y^{-})$ with $y^{+}\succ y^{-}$, the corresponding reward values satisfy $r(y^{+}|x)>r(y^{-}|x)$.

As $r^{*}$ is unknown, with a capable LLM, a natural idea is to use $r$ as a proxy of $r^{*}$. Recall from Section 3.2.1 that a large $r^{*}(y^{+}|x)-r^{*}(y^{-}|x)$ should correspond to a large $\Delta(y^{-},y^{+};x)$. Using (4), one can define $\Delta$ as

$$ $\Delta_{\text{naive}}=r(y^{+}|x)-r(y^{-}|x)=\beta\left(\log\frac{\pi(y^{+}|x)} {\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi(y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)} \right).$ (10) $$

Substituting this into the DPO objective (5), we have

$$ $\displaystyle\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log\sigma\left(\beta \log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\beta\log\frac{\pi(y^{-}|x) }{\pi_{\text{ref}}(y^{-}|x)}-\lambda\Delta_{\text{naive}}(y^{-},y^{+};x)\right)$ $\displaystyle=$ $\displaystyle\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log\sigma\left((\beta -\lambda\beta)\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-(\beta- \lambda\beta)\log\frac{\pi(y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)}\right).$ $$

However, this is the same as the original DPO objective except for a scaling of the regularization parameter $\beta$, and thus is not useful.

To alleviate this problem, our idea is to first improve the LLM performance by concatenating the query $x$ with a prompt $p$, as $p\oplus x$,
where $\oplus$ denotes concatenation. With (4) the reward with this prompt-augmented query is:

$$ $r(y|p\oplus x)=\beta\log\frac{\pi(y|p\oplus x)}{\pi_{\text{ref}}(y|p\oplus x)} +c(x).$ (11) $$

With a good prompt, this $r$ is expected to be a good proxy of $r^{*}$. Specifically, we use the following prompt $p$.
{promptBox}
Please generate a response with a usefulness rating of 100 out of 100 for the following query. Note that the response should be harmless. The term 100 indicates the level of usefulness, where 100 is the maximum and 1 is the minimum. Query:

We assume that adding this prompt does not change the preference between the positive and negative responses ($y^{+}$ and $y^{-}$).

###### Assumption 3.2 .

For a given query $x$, if $y^{+}\succ y^{-}$, we still have $y^{+}\succ y^{-}$ with the prompt-augmented query $p\oplus x$.

Analogous to (10), we consider the following refinement function:

$$ $\Delta_{\pi}\left(y^{-},y^{+};x\right)\equiv\beta\log\frac{\pi(y^{+}|p\oplus x )\pi_{\text{ref}}(y^{-}|p\oplus x)}{\pi_{\text{ref}}(y^{+}|p\oplus x)\pi(y^{-} |p\oplus x)}.$ (12) $$

Note that we have added subscript $\pi$ to explicitly indicate the dependence of $\Delta$ on $\pi$. Obviously, when putting this $\Delta_{\pi}$ into the DPO objective (5), it does not suffer from the same problem as the $\Delta_{\text{naive}}$ discussed earlier.

The following Proposition shows that $\Delta_{\pi}$ in (12) satisfies two important properties. First, $\Delta_{\pi}(y^{-},y^{+};x)$ can be measured relative to the optimal response $y^{*}$, which allows to represent $\Delta_{\pi}(y^{-},y^{+};x)$ in terms of $\Delta_{\pi}(y^{-},y^{*};x)$ and $\Delta_{\pi}(y^{+},y^{*};x)$. Second, the positive response (which has a higher true reward value) is “closer” to $y^{*}$ than the negative response, and vice versa. All the proofs are in Appendix A.

###### Proposition 3.3 .

With Assumptions 3.1 and 3.2, we have
(i)
$\Delta_{\pi}(y^{-},y^{+};x)=\Delta_{\pi}(y^{-},y^{*};x)-\Delta_{\pi}(y^{+},y^{
*};x)$, where $y^{*}$ is the optimal $y$ for the given $x$;
(ii)
For any tuple $(x,y^{+},y^{-})$, $r^{*}(y^{+}|x)>r^{*}(y^{-}|x)\Leftrightarrow\Delta_{\pi}(y^{+},y^{*};x)<\Delta
_{\pi}(y^{-},y^{*};x)$.

The following Corollary shows that this $\Delta_{\pi}(y^{-},y^{+};x)$ satisfies the desired property in Section 3.2.1, namely that a larger difference $r^{*}(y^{+}|x)-r^{*}(y^{-}|x)$ in the true reward values between the positive and negative responses corresponds to a larger $\Delta_{\pi}(y^{-},y^{+};x)$.

###### Corollary 3.3.1 .

For any $(x,y_{i}^{+},y_{i}^{-})$ and $(x,y_{j}^{+},y_{j}^{-})$, if $r^{*}(y_{i}^{+}|x)>r^{*}(y_{j}^{+}|x)$, and $r^{*}(y_{i}^{-}|x)<r^{*}(y_{j}^{-}|x)$ we have
$r^{*}(y_{i}^{+}|x)-r^{*}(y_{i}^{-}|x)>r^{*}(y_{j}^{+}|x)-r^{*}(y_{j}^{-}|x)
\Leftrightarrow\Delta_{\pi}(y_{i}^{-},y_{i}^{+};x)>\Delta_{\pi}(y_{j}^{-},y_{j
}^{+};x)$.

###### Assumption 3.1 .

###### Assumption 3.2 .

###### Proposition 3.3 .

###### Corollary 3.3.1 .

### 3.3 Integration with DPO and IPO

#### 3.3.1 Integration with DPO

First, we show how to integrate the proposed refinement into DPO. Substituting (4) and (12) into (9), we obtain:

$$ $\displaystyle\max_{\pi}\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}}\log\sigma(r (y^{+}|x)-r(y^{-}|x)-\lambda\Delta_{\pi}(y^{-},y^{+};x))$ (13) $\displaystyle=$ $\displaystyle\!\!\!\!\!\!\max_{\pi}\mathbb{E}_{(x,y^{+},y^{-})\sim\mathcal{D}} \log\sigma\left(\beta\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}\!-\! \beta\log\frac{\pi(y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)}-\lambda\Delta_{\pi}(y^ {-},y^{+};x)\right).$ $$

Recall that $\Delta_{\pi}$ above depends on $\pi$. During learning, we use the stop-gradient operator(^1^11In other words, $\nabla_{x}\perp\!\![g(x)]\equiv 0$ and $\perp\!\![g(x)]\equiv g(x)$ for any differentiable $g$.) $\perp\!\![\cdot]$ on $\Delta_{\pi}$to prevent it from being changed. The whole procedure, which will be called Self-refined DPO (Sr-DPO), is shown in Algorithm 1.

Figure: Algorithm 1 Self-refined Direct Policy Optimization (Sr-DPO).

#### 3.3.2 Integration with IPO

For IPO, we first construct a variant of the IPO objective in (6):

$$ $\displaystyle\max_{\pi}$ $\displaystyle\!\!\!\!\!\!\!\mathbb{E}_{x\sim\mathcal{D},y^{+}\sim\pi(\cdot|x), y^{-}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{+}\succ y^{-}|x)\!\!+\!\!\lambda r(y^{ +}|p\oplus x)\!\!-\!\!\beta\mathbb{D}_{\mathrm{KL}}[\pi(y^{+}|x)\|\pi_{\text{ ref}}(y^{-}|x)],$ (14) $$

which adds an extra $\lambda\mathbb{E}_{x\sim\mathcal{D},y^{+}\sim\pi(\cdot|x)}r(y^{+}|p\oplus x)$ term to maximize the expectation of reward $r(y^{+}|p\oplus x)$.

###### Proposition 3.4 .

The optimal policy $\pi$ in (14) satisfies

$$ $\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi(y^{-}|x)}{\pi _{\text{ref}}(y^{-}|x)}=\frac{1}{2\beta}+\lambda\Delta_{\pi}(y^{-},y^{+};x).$ (15) $$

Note that when $\beta=0$, $\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi(y^{-}|x)}{\pi
_{\text{ref}}(y^{-}|x)}-\lambda\Delta_{\pi}(y^{-},y^{+};x)$ should be infinite. This implies maximizing $\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi(y^{-}|x)}{\pi
_{\text{ref}}(y^{-}|x)}-\lambda\Delta_{\pi}(y^{-},y^{+};x)$ w.r.t, $\pi$, which has a similar form to DPO. The procedure, which will be called Self-Refined IPO (Sr-IPO), is shown in Algorithm 2. It uses stochastic gradient descent to minimize the difference between the LHS and RHS in (15).

Figure: Algorithm 2 Self-refined Identity Policy Optimization (Sr-IPO).

###### Proposition 3.4 .

## 4 Experiments

### 4.1 Setup

Datasets. We evaluate the effectiveness of the proposed methods on three widely-used benchmark datasets:
(i) MT-Bench [], which is a multi-turn question set on writing, roleplay, extraction, reasoning, math, coding, knowledge I (STEM), and knowledge II (humanities/social science).
(ii) Vicuna-Bench [], which is a single-turn question set on writing, roleplay, generic, fermi, counterfactual, coding, math, and knowledge.
(iii) Open-LLM leader-board [], which includes (a) commonsense reasoning: Arc [], HellaSwag [], WinoGrande [];
(b) multi-task language understanding: MMLU [];
(c) human falsehood mimic: TruthfulQA []; and
(d) math problem solving: GSM8k []. Table 1 shows more information on the Hugging-Face Open LLM Leaderboard datasets.

**Table 1: Information on the Hugging-Face Open LLM Leaderboard datasets.**
|  | Arc | TruthfulQA | Winogrande | GSM8k | HellaSwag | MMLU |
| --- | --- | --- | --- | --- | --- | --- |
| # few-shot | 25 | 0 | 5 | 5 | 10 | 5 |
| performance metric | acc_norm | mc2 | acc | acc | acc_norm | acc |

Setup for MT-Bench and Vicuna-Bench.
As in [], we use Pythia 2.8B [], a pretrained LLM without supervised fine-tuning and RLHF, as the backbone model. Following [], we first conduct supervised fine tuning (SFT) using the HH-RLHF dataset [], which is human preference data on helpfulness and harmlessness based on positive feedbacks. We then perform direct alignment using the HH-RLHF dataset on the SFT model. Finally, we follow [] to use GPT-4 [] as a judge to evaluate the testing performance of the direct alignment trained model. For performance evaluation, we use the win-rate, tie-rate, and lose rate as in [].

Setup for Open-LLM Leader-board.
Following [; ], we use zephyr-7b-sft-full(^2^22[https://huggingface.co/alignment-handbook/zephyr-7b-sft-full](https://huggingface.co/alignment-handbook/zephyr-7b-sft-full)), a supervised fine-tuned version of Mistral 7B [], as the basic model. We directly perform direct alignment using a large-scale diverse preference dataset Ultra-feedback []. The fine-tuned model is then evaluated on the testing benchmarks via the platform [].

Following [], we use three performance metrics:

i) Average marginal: $\frac{1}{N}\sum^{N}_{i=1}\log\frac{\pi\left(y_{i}^{+}\mid x_{i}\right)}{\pi_{
\mathrm{ref}}\left(y_{i}^{+}\mid x_{i}\right)}-\log\frac{\pi\left(y_{i}^{-}
\mid x_{i}\right)}{\pi_{\mathrm{ref}}\left(y_{i}^{-}\mid x_{i}\right)}$, which measures the gap between positive and negative responses.

(ii) Accuracy: $\frac{1}{N}\sum^{N}_{i=1}\mathbbm{1}\left(\log\frac{\pi(y_{i}^{+}\mid x_{i})}{
\pi_{\mathrm{ref}}(y_{i}^{+}\mid x_{i})}>\log\frac{\pi(y_{i}^{-}\mid x_{i})}{
\pi_{\mathrm{ref}}(y_{i}^{-}\mid x_{i})}\right)$,
which measures the number of tuples with the reward of a positive response larger than that of the negative response.
Here,
$\mathbbm{1}(\cdot)$ returns 1 when the argument holds and 0 otherwise.

(iii) Accuracy defined on the prompt-augmented tuples:
$\frac{1}{N}\sum^{N}_{i=1}\mathbbm{1}\left(\log\frac{\pi(y_{i}^{+}\mid p\oplus x
_{i})}{\pi_{\mathrm{ref}}(y_{i}^{+}\mid p\oplus x_{i})}>\right.$ $\left.\log\frac{\pi(y_{i}^{-}\mid p\oplus x_{i})}{\pi_{\mathrm{ref}}(y_{i}^{-}
\mid p\oplus x_{i})}\right)$,
which measures the accuracy for tuples with input augmented by the prompt.

Baselines and Implmentation Details.
We choose two widely-adopted direct alignment baselines: (i) DPO [], and (ii) IPO []. Following [], $\beta$ is set to 0.1 for DPO and IPO. We also set $\beta=0.1$ for the proposed Sr-DPO and Sr-IPO for fair comparison. We select the optimal $\lambda$ from $\{0.1,0.3,0.5,1\}$ on the first 50 tuples from the HH-RLHF testing dataset. For both the HH-RLHF and UltraChat datasets, following [], the learning rate is $5\times 10^{-7}$, the optimizer is RMSprop [], the batch size is 64, and we also use gradient normalization to help training. The maximal input token size in training is 512. All experiments are performed on 8 A100 GPUs, and we use fully sharded data parallel [] for distributed training.

### 4.2 Performance Results

MT-Bench and Vicuna-Bench.
Table 2 shows the testing win/tie/lose rates of the various methods as evaluated by GPT-4. As can be seen, the proposed Sr-DPO and Sr-IPO are effective and outperform DPO and IPO (in other words, the win rate is larger than the lose rate) in both MT-bench and Vicuna-bench. This reveals the effectiveness of our proposal methods. Some examples are also shown in Appendix B.

**Table 2: Testing performance on MT-Bench and Vicuna-Bench.**
|  | MT-Bench | Vicuna-Bench |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | Win Rate | Tie Rate | Lose Rate | Win Rate | Tie Rate | Lose Rate |
| Sr-DPO vs DPO | 45.62% | 33.76% | 20.62% | 63.75% | 13.75% | 22.50% |
| Sr-IPO vs IPO | 38.75% | 25.00% | 26.25% | 60.00% | 8.75% | 31.25% |
| Sr-DPO vs IPO | 42.50% | 21.25% | 36.25% | 66.25% | 11.50% | 26.25% |
| Sr-IPO vs DPO | 38.61% | 28.89% | 32.50% | 61.25% | 5.00% | 33.75% |

HH-RLHF.
Figure 1 shows results on the training set. As seen, the proposed Sr-DPO and Sr-IPO have lower marginals (Figures 1(a) and 1(d)), while maintaining comparable accuracies (Figures 1(b) and 1(e)). This shows they avoid always enlarging the reward difference between positive and negative pairs, yet still achieving high accuracies. From Figures 1(c) and 1(f), we find that accuracies for the prompt-augmented tuples are similar to those for the original tuples, thus verifying Assumption 3.2.

Figure: (a) Marginal: DPO vs Sr-DPO.
Refer to caption: extracted/5634681/fig/1_hh_dpo_spin_u_all_gather.png

**Table 3: Testing performance of the various methods on Open-LLM leader-board. The best one is in bold.**
|  | Arc | TruthfulQA | WinoGrande | GSM8k | HellaSwag | MMLU | Average |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Zephyr-7b-sft-full | 60.41 | 43.73 | 74.19 | 26.76 | 82.85 | 60.92 | 58.14 |
| DPO | 63.05 | 59.30 | 78.53 | 31.01 | 84.89 | 61.44 | 63.04 |
| IPO | 61.86 | 46.03 | 79.24 | 35.91 | 82.80 | 61.55 | 61.23 |
| Sr-DPO | 65.27 | 60.30 | 80.82 | 33.36 | 85.52 | 61.63 | 64.48 |
| Sr-IPO | 62.46 | 47.87 | 79.32 | 39.80 | 83.15 | 61.80 | 62.40 |

Open-LLM leader-board.
Table 3 shows the testing performance across various methods. The results indicate that Sr-DPO achieves superior performance on Arc, TruthfulQA, WinoGrande; while Sr-IPO excels on GSM8k and MMLU. Overall, Sr-DPO emerges as the most effective method. Furthermore, Sr-DPO (resp. Sr-IPO) consistently outperforms DPO (resp. IPO) across all six datasets. These results validate the effectiveness of the proposed approach.

### 4.3 Effects of λ 𝜆 \lambda italic_λ and Number of Training Tuples

Effect of $\lambda$.
Figure 2(a) shows the testing win rate with varying $\lambda$ in Sr-DPO (resp. Sr-IPO) on MT-Bench and Vicuna-Bench. In both cases the win rate first increases with $\lambda$ and then decreases. In particular, $\lambda=0$ (i.e., not using the proposed refinement) leads to the worst performance. However, a $\lambda$ too large exaggerates the influence of $\Delta$, which can also negatively impact performance. We do not study its effect on Open-LLM leader-board because it is very time-consuming.

Effect of the number of training tuples.
Figure 2(b) shows the testing win rate with varying number of training tuples on Vicuna-Bench. As can be seen, both Sr-DPO and Sr-IPO can benefit from the use of more training tuples.

Figure: (a) Variation with $\lambda$.
Refer to caption: extracted/5634681/fig/abs_win_rate.png

Figure 3 shows the testing performance with varying number of training tuples on Open-LLM leader-board. As can be seen, DPO and IPO exhibit performance drop with the use of more training tuples on 4 of the 6 tasks (except on MMLU and HellaSwag), suggesting potential overfitting. In contrast, Sr-DPO and Sr-IPO are less prone to overfitting and exhibit improved performance with increased training data on ARC, TruthfulQA, GSM8k, and MMLU.

Figure: (a) ARC.
Refer to caption: extracted/5634681/fig/arc_curve.png

### 4.4 Correlation between Marginal and Score

Recall that GPT-4 is used as the evaluator. For each instance $x_{i}$, we define the score difference between the corresponding positive $y_{i}^{+}$ and negative $y_{i}^{-}$ responses as $s^{+}(x_{i})-s^{-}(x_{i})$, where $s^{+}(x_{i})$ (resp. $s^{-}(x_{i})$) is GPT-4’s evaluation score (0-5) of $y_{i}^{+}$ (resp. $y_{i}^{-}$). Inspired by [], which uses correlation to measure the agreements between GPT-4 and testing LLMs, here we compute the correlation between the marginal $\log\frac{\pi\left(y_{i}^{+}\mid x_{i}\right)}{\pi_{\mathrm{ref}}\left(y_{i}^{
+}\mid x_{i}\right)}-\log\frac{\pi\left(y_{i}^{-}\mid x_{i}\right)}{\pi_{
\mathrm{ref}}\left(y_{i}^{-}\mid x_{i}\right)}$ and score difference $s^{+}(x_{i})-s^{-}(x_{i})$ over 200 random tuples from the Ultrafeedback-binarized-preferences dataset(^3^33[https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences](https://huggingface.co/datasets/argilla/ultrafeedback-binarized-preferences)) (which already contains $s^{+}(x)$’s and $s^{-}(x)$’s). In particular, we use (i) Pearson’s correlation [], which measures linear relationships; (ii) Spearman’s rank correlation [], which measures monotonic relationships; and (iii) Kendall’s Tau [], which evaluates the strength and direction of associations.

Table 4 shows the correlation. As can be seen, Sr-DPO (resp. Sr-IPO) exhibits higher correlation values compared to DPO (resp. IPO). This suggests that Sr-DPO and Sr-IPO can evaluate the qualities of the positive and negative responses more accurately.

### 4.5 Training Time

Table 5 shows the direct alignment training time on the HH-RLHF dataset. As can be seen, Sr-DPO and Sr-IPO are about $24\%$ slower than DPO and IPO. We consider this acceptable given the performance improvements achieved by Sr-DPO and Sr-IPO.

**Table 4: Correlation between the marginal and GPT-4’s rating.**
|  | Pearson’s | Spearman’s | Kendall’s |
| --- | --- | --- | --- |
|  | correlation | rank correlation | Tau |
| DPO | 0.21 | 0.14 | 0.10 |
| IPO | 0.11 | 0.05 | 0.03 |
| Sr-DPO | 0.26 | 0.20 | 0.14 |
| Sr-IPO | 0.13 | 0.08 | 0.05 |

## 5 Conclusion

In this paper, we find that the widely adopted DPO method falls short by not accounting for the relative qualities of positive and negative samples, which can lead to sub-optimal training outcomes. To address this issue, we propose leveraging the intrinsic knowledge within LLMs to refine the loss function. Our main contributions are three-fold:
1) We utilize the knowledge of LLMs to create a refinement function that effectively estimates the quality of both positive and negative responses.
2) We demonstrate that under mild assumptions, the refinement function can enable the loss function to self-refine, leading to better alignment with human preferences.
3) Based on the refinement function, we develop two practical algorithms that enhance the training process.
Experimental results from various evaluators indicate that the proposed self-refined methods significantly improve the performance of fine-tuned models compared to existing approaches.

One limitation of our work is that we do not combine it with online policy-based direct alignment []. We will investigate this in our future work.

## 6 Broader Impacts

Our work falls under one of the RLHF frameworks, and thus shares similar social impacts, both positive and negative. On the positive side, our method can help LLMs avoid generating harmful or unhelpful results by aligning with human feedback. However, conversely, our method also has the potential to enable LLMs to generate harmful or unhelpful results if it is used to align with malicious preferences.

## Appendix A Proofs

### A.1 Proof of Proposition 3.3

###### Proof.

(i) First property: By directly substituting $\Delta_{\pi}(y^{-},y^{*};x)-\Delta_{\pi}(y^{+},y^{*};x)$ into the definition of $\Delta$ in (12), we have

$$ $\displaystyle\Delta_{\pi}(y^{-},y^{*};x)-\Delta_{\pi}(y^{+},y^{*};x)$ $\displaystyle=$ $\displaystyle\beta\left(\log\frac{\pi(y^{+}|p\oplus x)}{\pi_{0}(y^{+}|p\oplus x )}-\log\frac{\pi(y^{-}|p\oplus x)}{\pi_{0}(y^{-}|p\oplus x)}\right)$ $\displaystyle=$ $\displaystyle\beta\log\frac{\pi(y^{+}|p\oplus x)\pi_{0}(y^{-}|p\oplus x)}{\pi( y^{-}|p\oplus x)\pi_{0}(y^{+}|p\oplus x)}$ $\displaystyle=$ $\displaystyle\Delta_{\pi}\left(y^{-},y^{+};x\right).$ $$

(ii) Second property: From assumption 3.1, we have: $r\left(y^{+}|x\right)>r\left(y^{-}|x\right),\forall(x,y^{+},y-)$ with $y^{+}\succ y^{-}$. From (4),

$$ $r(y^{+}|x)>r\left(y^{-}|x\right)\Leftrightarrow\log\frac{\pi\left(y^{+}\mid x \right)}{\pi_{0}\left(y^{+}\mid x\right)}>\log\frac{\pi\left(y^{-}\mid x\right )}{\pi_{0}\left(y^{-}\mid x\right)}.$ $$

From Assumption 3.2, for the prompt-augmented query $p\oplus x$, we still have $y^{+}\succ y^{-}$. By using Assumption 3.1 on $(p\oplus x,y^{+},y^{-})$, we have:

$$ $\displaystyle\log\frac{\pi(y^{+}|p\oplus x)}{\pi_{0}(y^{+}|p\oplus x)}>\log \frac{\pi(y^{-}|p\oplus x)}{\pi_{0}(y^{-}|p\oplus x)}.$ (16) $$

Thus, from the first property,

$$ $\Delta_{\pi}(y^{+},y^{*};x)-\Delta_{\pi}(y^{-},y^{*};x)=-\Delta_{\pi}\left(y^{ -},y^{+};x\right)=-\beta\log\frac{\pi(y^{+}|p\oplus x)\pi_{0}(y^{-}|p\oplus x) }{\pi_{0}(y^{+}|p\oplus x)\pi(y^{-}|p\oplus x)}<0$ $$

because of (16), and so
$\Delta_{\pi}(y^{+},y^{*};x)<\Delta_{\pi}(y^{-},y^{*};x)$.
Thus,

$$ $y^{+}\succ y^{-}\Leftrightarrow\Delta_{\pi}\left(y^{+},y^{*};x\right)<\Delta_{ \pi}\left(y^{-},y^{*};x\right).$ (17) $$

Since $y^{+}\succ y^{-}\Leftrightarrow r^{*}(y^{+}|x)>r^{*}(y^{-}|x)$. We obtain that $r^{*}(y^{+}|x)>r^{*}(y^{-}|x)\Leftrightarrow\Delta_{\pi}\left(y^{+},y^{*};x
\right)<\Delta_{\pi}\left(y^{-},y^{*};x\right)$.
∎

###### Proof.

### A.2 Proof of Corollary 3.3.1

###### Proof.

Using property (ii) in Proposition 3.3 on the assumption $r^{*}(y_{i}^{+}|x)>r^{*}(y_{j}^{+}|x)$ in Corollary 3.3.1, we have

$$ $r^{*}(y_{i}^{+}|x)>r^{*}(y_{j}^{+}|x)\Leftrightarrow-\Delta_{\pi}(y_{i}^{+},y^ {*};x)>-\Delta_{\pi}(y_{j}^{+},y^{*};x).$ (18) $$

Similarly, using this on the assumption in Corollary 3.3.1 that $r^{*}(y_{i}^{-}|x)<r^{*}(y_{j}^{-}|x)$, we have

$$ $-r^{*}(y_{i}^{-}|x)>-r^{*}(y_{j}^{-}|x)\Leftrightarrow\Delta_{\pi}(y_{i}^{-},y ^{*};x)>\Delta_{\pi}(y_{j}^{-},y^{*};x).$ (19) $$

Adding these two together, we obtain

$$ $\displaystyle r^{*}(y_{i}^{+}|x)-r^{*}(y_{i}^{-}|x)<r^{*}(y_{j}^{+}|x)-r^{*}(y _{j}^{-}|x)$ $\displaystyle\Leftrightarrow$ $\displaystyle\Delta_{\pi}(y_{i}^{-},y^{*};x)-\Delta_{\pi}(y_{i}^{+},y^{*};x)> \Delta_{\pi}(y_{j}^{-},y^{*};x)-\Delta_{\pi}(y_{j}^{+},y^{*};x)$ $\displaystyle\Leftrightarrow$ $\displaystyle\Delta_{\pi}(y_{i}^{-},y_{i}^{+};x)>\Delta_{\pi}(y_{j}^{-},y_{j}^ {+};x),$ $$

due to property (i) of Proposition 3.3.
∎

###### Proof.

### A.3 Proof of Proposition 3.4

As in [, ], the closed-form solution of (14) is:

$$ $\pi(y^{+}|x)\propto\pi_{\text{ref}}(y^{+}|x)\exp\left(\beta^{-1}\mathbb{E}_{y^ {+}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{+}\succ\pi_{\text{ref}}|x)+\lambda r(y^{ +}|p\oplus x)\right).$ $$

Similarly for $y^{-}$, we have

$$ $\pi(y^{-}|x)\propto\pi_{\text{ref}}(y^{-}|x)\exp\left(\beta^{-1}\mathbb{E}_{y^ {-}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{-}\succ\pi_{\text{ref}}|x)+\lambda r(y^{ -}|p\oplus x)\right).$ $$

After simplification, we have:

$$ $\displaystyle\frac{\pi(y^{+}|x)}{\pi(y^{-}|x)}$ $\displaystyle=$ $\displaystyle\frac{\pi_{\text{ref}}(y^{+}|x)}{\pi_{\text{ref}}(y^{-}|x)}\exp \left(\beta^{-1}[\mathbb{E}_{y^{+}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{+}\succ \pi_{\text{ref}}|x)-\mathbb{E}_{y^{-}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{-} \succ\pi_{\text{ref}}|x)]\right.$ $\displaystyle\left.+\lambda[r(y^{+}|p\oplus x)-r(y^{-}|p\oplus x)]\right).$ $$

Note that $r(y^{+}|p\oplus x)-r(y^{-}|p\oplus x)=\Delta_{\pi}(y^{-},y^{+};x)$. After some simplifications, we have

$$ $\displaystyle\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi( y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)}$ $\displaystyle=$ $\displaystyle\frac{1}{\beta}\left[\mathbb{E}_{y^{+}\sim\pi_{\text{ref}}(\cdot| x)}p(y^{+}\succ\pi_{\text{ref}}|x)-\mathbb{E}_{y^{-}\sim\pi_{\text{ref}}(\cdot |x)}p(y^{-}\succ\pi_{\text{ref}}|x)\right]+\lambda\Delta_{\pi}(y^{-},y^{+};x).$ $$

As $\mathbb{E}_{y^{+}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{+}\succ\pi_{\text{ref}}|x)
-\mathbb{E}_{y^{-}\sim\pi_{\text{ref}}(\cdot|x)}p(y^{-}\succ\pi_{\text{ref}}|x
)=\frac{1}{2}$ [], after taking expectations of both sides, we obtain

$$ $\displaystyle\log\frac{\pi(y^{+}|x)}{\pi_{\text{ref}}(y^{+}|x)}-\log\frac{\pi( y^{-}|x)}{\pi_{\text{ref}}(y^{-}|x)}=\frac{1}{2\beta}+\lambda\Delta_{\pi}(y^{- },y^{+};x).$ (20) $$

## Appendix B Example Cases

Tables 6, 7, 8, and 9 show four examples of responses by Sr-DPO, Sr-IPO, DPO, and IPO. As can be seen, the proposed Sr-DPO and Sr-IPO outperform DPO and IPO under GPT4’s judgement.

**Table 6: Example 1 for Sr-DPO and DPO. The first row is the query, the second and third rows are the responses generated by Sr-DPO and DPO, respectively, and the last row is the judgement made by GPT-4.**
| Prompt | Explain the process of natural selection and how it contributes to the evolution and adaptation of species. |
| --- | --- |
| Sr-DPO | Natural selection is the process of survival of the fittest, which occurs when organisms with the most advantageous traits are more likely to reproduce and pass on their traits than organisms with less desirable traits. It is a key factor in the evolution of species, with the most successful species being those that are the most adaptable to the environment. Natural selection ensures that organisms with the most advantageous traits are more likely to survive and pass on their traits to the next generation.<br>Here is a brief explanation of the process of natural selection:<br>1. The most adaptable organisms with the most advantageous traits are more likely to survive and pass on their traits to the next generation.<br>2. The most advantageous traits of organisms are those that are most effective at surviving and reproducing in their environment.<br>3. Those organisms with the most advantageous traits are more likely to survive and reproduce than organisms with less advantageous traits. |
| DPO | Natural selection is the process of survival of the fittest, which occurs when the genetic makeup of a population changes over time, favoring individuals that have beneficial traits such as increased physical strength, increased intelligence, or other adaptive features. This process allows for the survival of the species that is best able to adapt to its environment. |
| Judgment | Both assistants provide a correct explanation of natural selection, describing it as a process that favors individuals with beneficial traits, leading to changes in the genetic makeup of a population over time. However, Assistant A’s response is more detailed and comprehensive. It explains how the probability of an individual’s survival and reproduction is influenced by how well adapted the organism is to its environment, and it also mentions the importance of natural selection in the field of biology and evolution. Therefore, Assistant A’s response is more informative and provides a deeper understanding of the topic.<br>Final Verdict: [[A]] |

**Table 7: Example 2 for Sr-DPO and DPO. The first row is the query, the second and third rows are the responses generated by Sr-DPO and DPO, respectively, and the last row is the judgement made by GPT-4.**
| Prompt | Draft an apology email to a customer who experienced a delay in their order, and provide reassurance that the issue has been resolved. |
| --- | --- |
| Sr-DPO | Here’s an apology email draft for a customer who experienced a delay in their order:<br>Dear Customer,<br>Thank you for your patience during our recent order process. We recently experienced a delay with your order and apologize for the inconvenience. We are currently working to process your order, and we will provide a notification when it is ready. We sincerely apologize for the delay and appreciate your patience. Our team is working hard to resolve this issue as soon as possible. We look forward to welcoming your order and providing you with the best customer service experience possible.<br>Best regards,<br>Customer Support Team |
| DPO | Here’s an apology email draft for a customer who experienced a delay in their order:<br>Dear [Customer Name],<br>apologize for the delay in your delivery of your order. I have worked with our team to resolve the issue, and I am very pleased to let you know that the issue has been resolved and your order is now ready for dispatch. I look forward to providing you with a great customer experience in the future.<br>Sincerely,<br>[Customer Name]<br>Customer Support |
| Judgment | Both assistants provided a good response to the user’s request. However, Assistant A’s response was more detailed and provided more reassurance to the customer. Assistant A mentioned that they reviewed the issue with their fulfillment partners and are now shipping the order as quickly as possible. This gives the customer a sense of urgency and care for their order. On the other hand, Assistant B’s response was also good but lacked the level of detail and reassurance that Assistant A’s response provided. Therefore, Assistant A’s response is better.<br>Final Verdict: [[A]] |

**Table 8: Example 3 for Sr-IPO and IPO. The first row is the query, the second and third rows are the responses generated by Sr-IPO and IPO, respectively, and the last row is the judgement made by GPT-4.**
| Prompt | Why might someone choose to use a paper map or ask for directions instead of relying on a GPS device or smartphone app? |
| --- | --- |
| Sr-IPO | A paper map or paper printed directions can be a fun way to help you get from point A to point B. Paper maps are portable and easy to use, and they’re also a fun and easy way to explore your surroundings and get around town. They’re also less expensive than GPS systems or smartphone apps, and they’re very easy to use, so they’re a good option for older kids or adults who need to get by without a smartphone. Paper maps offer a more personal and hands-on experience than smartphone apps or GPS devices, and they can be a fun way to get around town or explore your surroundings. |
| IPO | A paper map or paper printed directions can be a fun way to help you get from point A to point B. Paper maps are portable and easy to use, and they’re also a fun and easy way to explore your surroundings and get around town. They’re also less expensive than GPS systems or smartphone apps, and they’re very easy to carry around.<br>If you are interested in using a paper map or directions, here are a few reasons why you might choose to do so:1. Paper maps are portable and easy to use.<br>2. Paper maps are less expensive than GPS systems or smartphone apps.<br>3. Paper maps are easy to carry around.<br>4. Paper maps are easy to use and interpret.<br>5. Paper maps can help you explore your surroundings and get around town.<br>6. Paper maps are easily outdated or outdated, so it is important to be sure you have the latest version of the map to use.<br>7. Paper maps are a fun way to explore your surroundings and get around town.<br>8. Paper maps are easy to use and interpret.<br>9. Paper maps can help you explore your surroundings and get around town.<br>10. Paper maps make it easy to get around town and explore your surroundings.<br>11. Paper maps are a fun and easy way to explore your surroundings and get around town.<br>Remember to tailor the activities to the birthday childs interests and preferences. Have a great celebration! |
| Judgment | Assistant A’s response is more concise and to the point, providing a clear explanation of why someone might choose to use a paper map or ask for directions instead of relying on a GPS device or smartphone app. Assistant B’s response, while it does provide some valid points, is repetitive and confusing, especially the last sentence about tailoring activities to a birthday child’s interests and preferences, which is completely irrelevant to the question asked. Therefore, Assistant A’s response is more helpful and relevant.<br>Final Verdict: [[A]] |

**Table 9: Example 4 for Sr-IPO and IPO. The first row is the query, the second and third rows are the responses generated by Sr-IPO and IPO, respectively, and the last row is the judgement made by GPT-4.**
| Prompt | How many lightning strikes occur on Earth each day? Try to explain your answer. Your explanation should take the reader through your reasoning step-by-step. |
| --- | --- |
| Sr-IPO | There are about 2,500 lightning strikes each day on Earth. That’s about two lightning strikes for every minute! The most common type of lightning strikes occur in the tropics, where temperatures range from 70 to 90 degrees Fahrenheit. Lightning strikes are most common around noon and also around sunset. The next most common type of lightning occurs in the polar regions, where the temperatures can reach as low as -20 degrees Celsius. Lightning strikes are most common during the winter months in these regions.<br>The most dangerous type of lightning occurs when the atmospheric pressure is extremely low, like when a storm is approaching. Low atmospheric pressure can cause the air to move faster and more violently, creating a stronger electric current through the air. When the air is moving quickly, it is also possible for an electrical charge to build up between the tips of a cloud or a thunderstorm. This electrical charge can then be released as lightning. Low atmospheric pressure can also increase the intensity of a thunderstorm, leading to more severe lightning storms. |
| IPO | There are about 2,500 lightning strikes each day on Earth. That’s about two lightning strikes for every minute! The most common type of lightning strikes occur in the tropics, where temperatures range from 70 to 90 degrees Fahrenheit. Lightning strikes are most common around noon and also around sunset. The next most common type of lightning occurs in the polar regions, where the temperatures can reach as low as -20 degrees Celsius. Lightning strikes are most common during the winter months in these regions. |
| Judgment | Both Assistant A and Assistant B start their responses with the same information, stating that there are about 2,500 lightning strikes each day on Earth. They both also provide similar information about where and when lightning strikes are most common. However, Assistant A goes a step further by explaining the conditions under which the most dangerous type of lightning occurs, providing a more detailed and comprehensive response to the user’s question. Therefore, Assistant A’s response is more informative and thorough.<br>Final Verdict: [[A]] |

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: - See weaknesses
soundness: 2
strengths: - Relatively simple modification of DPO (and IPO) objective to incorporate per-preference reweighting using a minor change in the input prompt.
summary: Recently, offline preferences-based RL methods have gained popularity for doing RLHF alignment without the need for online exploration or training a reward model. However, DPO methods, fail to take into account the relative qualitative differences between preference pairs since all training preferences are optimized equally. The authors argue that in the presence of the oracle reward model, the sigmoid of reward difference between very distinct preferences should be larger than the sigmoid of reward difference in preferences that are only slightly apart in quality. To enforce this ordering on top of existing DPO (and IPO) objectives, authors recommend a refinement operator that doesn't use any external reward model. Instead uses a prompted version of the same LM. In the case of DPO, their refinement term looks identical to the DPO's objective with the change that it has an additional evaluator prompt prepended to the input
> Please generate a response with a usefulness rating of 100 out of 100 for the following query. Note that the response should be harmless. The term 100 indicates the level of usefulness, where 100 is the maximum and 1 is the minimum. Query:

The authors add a positive weight $\lambda$ along with this refinement term before adding it to the DPO objective. The gradients are not propagated through the refinement term. Overall, this change increases the computational cost of the method with two forward passes for each input (one for DPO gradients and another for prompted refinement term) but also shows consistent improvements over vanilla objective across three different evaluations - MT-Bench, Vicuna Bench and Open LLM Leaderboard.
weaknesses: - It is unintuitive why a mere prompt would enforce/align with the margins of an oracle reward. In the previous literature, it is well known that language models are poor at assigning numerical feedback like humans. This makes the choice of prompt more unclear in the refinement operator. Moreover, the results from Table 4, also suggest that the wording of the prompt doesn't matter too much on the performance.
- The naive variation of the refinement operator in Table 4, effectively reduces the $\beta$ parameter and the authors claim that it also outperforms DPO in terms of win rate. This suggests, that the DPO baseline is not hyperparameter tuned correctly and makes me question the insights derived from the results.
- The method presentation can be improved further. Both the abstract and intro vaguely hint at a refinement process with LM's internal knowledge, without giving any meaningful intuition of what that is up until section 3.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. Is Sr-IPO effective on other LLMs?

2. The author introduces a gap value in the gradient of the DPO objective function, which can change according to positive or negative preference pairs. Could a similar idea be applied to the coefficient $\beta$, meaning $\beta$ could adaptively change based on positive or negative preference pairs? Theoretically, could such an approach be proven effective?
soundness: 2
strengths: 1. The paper introduces a novel method for refining the loss function using the intrinsic knowledge of LLMs, which is a good contribution to the field of model alignment.

2. The authors provide extensive experimental results that demonstrate the effectiveness of the proposed methods across different datasets, reinforcing the validity of their approach.

3. The paper includes a theoretical analysis that supports the design of the refinement function, providing a solid foundation for the proposed techniques.
summary: This paper proposes a novel approach to align large language models (LLMs) with human preferences by leveraging the intrinsic knowledge within the models themselves. The authors introduce a refinement function that estimates the quality of both positive and negative responses, which is then integrated into Direct Policy Optimization (DPO) and its variant, Identity Policy Optimization (IPO). The goal is to improve the loss function and enhance the performance of fine-tuned models. The experimental results across various datasets show that the proposed methods outperform traditional DPO and IPO.
weaknesses: 1. The compared baselines are not enough. Many improvements to DPO introduce a gap between positive and negative samples; I won't list them all here, but the author needs to compare their approach with such methods.

2. Introduce a gap value into the DPO objective is not a very novel idea. The author introduce the gap value by a prompt-augmented query $p+x$, but I argue that the chosen of $p$ has a large influence to the final results.  The relative analysis is not enough.

3. According to my own experimental experience, I found that Zephyr is a model that is quite easy to fine-tune for good results. Some methods are effective on Zephyr, but may not be as significant when applied to other large models, which is also one of the reasons why the Zephyr model is widely used in a large amount of academic research. Has the author tested the proposed methods on other series of large models, such as Llama3.1-8b?

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. Can the authors explain more clearly and convincingly how the proposed refinement method utilizes the intrinsic knowledge of LLMs to estimate the quality gap of responses?
2. Can the self-refinement method presented in this paper be combined with other RLHF approaches besides DPO and IPO, and would it lead to improved results?
soundness: 2
strengths: 1.	This paper is well-write and easy to follow.
2.	The proposed refinement function can be integrated into existing optimization frameworks like DPO and IPO, making it compatible with current research and practical applications.
3.	The self-refined methods (Sr-DPO and Sr-IPO) show performance improvements compared to traditional DPO and IPO, indicating the potential for future RLHF developments.
summary: This paper identifies a limitation in current RLHF methods, that is, they fail to consider the relative quality of chosen and rejected responses. To address this, the paper designs a self-refinement function, which includes the introduction of an additional prompt and modifications to the loss objective. This approach can be integrated into existing optimization methods (e.g., DPO and IPO), and demonstrates performance improvements.
weaknesses: 1. Lack of logical consistency. In the Abstract and Introduction sections, the authors emphasize utilizing the intrinsic knowledge of LLMs for self-refinement. However, in the Method section, they only introduce the addition of an extra prompt and the definition of a $\Delta$ objective based on the prompt, which is not convincing in demonstrating the application of LLMs' intrinsic knowledge.
2. Lack of novelty. As previously stated, the authors' method heavily relies on the introduction of an extra prompt and the definition of a $\Delta$ objective based on the prompt. Additionally, this $\Delta$ objective appears quite similar to the typical optimization objective of DPO, indicating a lack of innovation.