HAF-RM: A Hybrid Alignment Framework for Reward Model Training

Shujun Liu   Xiaoyu Shen   Yuhang Lai  Siyuan Wang  Shengbin Yue
Zengfeng Huang   Xuanjing Huang   Zhongyu Wei
Fudan University
Eastern Institute of Technology, Ningbo
{shujunliu20,huangzf,xjhuang,zywei}@fudan.edu.cn,
[email protected],{sbyue23,yhlai23}@m.fudan.edu.cn
[email protected]
Corresponding author
Abstract

The reward model has become increasingly important in alignment, assessment, and data construction for large language models (LLMs). Most existing researchers focus on enhancing reward models through data improvements, following the conventional training framework for reward models that directly optimizes the predicted rewards. In this paper, we propose a hybrid alignment framework HaF-RM for reward model training by introducing an additional constraint on token-level policy probabilities in addition to the reward score. It can simultaneously supervise the internal preference model at the token level and optimize the mapping layer of the reward model at the sequence level. Theoretical justifications and experiment results on five datasets show the validity and effectiveness of our proposed hybrid framework for training a high-quality reward model. By decoupling the reward modeling procedure and incorporating hybrid supervision, our HaF-RM framework offers a principled and effective approach to enhancing the performance and alignment of reward models, a critical component in the responsible development of powerful language models. We release our code at https://haf-rm.github.io.

HAF-RM: A Hybrid Alignment Framework for Reward Model Training


Shujun Liu   Xiaoyu Shen   Yuhang Lai  Siyuan Wang  Shengbin Yue Zengfeng Huang   Xuanjing Huang   Zhongyu Weithanks: Corresponding author Fudan University Eastern Institute of Technology, Ningbo {shujunliu20,huangzf,xjhuang,zywei}@fudan.edu.cn, [email protected],{sbyue23,yhlai23}@m.fudan.edu.cn [email protected]


1 Introduction

Recent periods have witnessed a continuous evolution of Large Language Model (LLM) techniques, especially pre-training Devlin et al. (2019); Radford et al. (2019); Brown et al. (2020) and instruction tuning Wei et al. (2021); Wang et al. (2022); Yue et al. (2023). Researchers start to shift their focus from generating correct responses to aligning responses more closely with human preferences (Russell, 2014). As an efficient alternative to human feedback, the reward model for generative language models emerges, facilitating scalable alignment in training (Christiano et al., 2017; Stiennon et al., 2020), response generation (Gao et al., 2023; Mudgal et al., 2024; Jinnai et al., 2024), data construction(Yuan et al., 2023) etc.

Despite the availability of numerous sophisticated reward models (Kopf et al., 2023; Zhu et al., 2023), these exist several key limitations. First, most reward models originate from industry and are not open-source, making further training and transfer impossible. Second, prior studies have highlighted incorrect and ambiguous preferences within the training data of these reward models (Bai et al., 2022; Pitis, 2023). These two issues both limit the quality and generalizability of existing reward models, necessitating further enhancement either from the data perspective or the training process. While recent researches mainly focus on enriching data sources for better reward models, including utilizing external tools or information sources to enhance generalization (Li et al., 2023a; Sun et al., 2023) or leveraging fine-grained signals (Wu et al., 2023; Cao et al., 2024) and their combinations (Go et al., 2023; Lai et al., 2024), we focus on the training framework of reward models in this work.

Refer to caption
Figure 1: The standard reward model substitutes the policy layer from the policy model, while our HaF model retains the policy layer. By optimizing the model’s two outputs, we achieve a better alignment process for the reward model with little additional training overhead.

A reward model is typically structured with two components: a transformer-based model (referred to as the internal preference model) that outputs preference vectors for each token, and a projection module called “reward layer” (usually a linear layer with normalization) that maps these vectors to sequence-level rewards. The standard practice for training the reward model involves utilizing the ranking loss of paired rewards. However, optimizing both two components using such a single sequence-level objective may cause insufficient supervision for token-level preference modeling. We argue that hybrid optimization of the two components of the reward model with corresponding token-level and sequence-level objectives will lead to more consistent improvement.

Since a policy model is also based on an internal preference model to predict the expected reward for each action/token, essentially acting as a Q-function under token-level supervision Rafailov et al. (2024), we propose a Hybrid Alignment Framework (HAF). This framework jointly optimizes the reward model and policy model with a shared internal preference model. With the policy loss, we can directly supervise the internal preference model at the token level while simultaneously optimizing the mapping layer of the reward model using the reward loss, enabling more effective alignment of the reward model.

We provide both theoretical justifications and empirical experiments to demonstrate the effectiveness of our HAF. In the experiment section, we compare the performance of reward models trained using our framework against those resulting from baseline approaches across four public datasets. The results highlight the advantage of HAF with different policy losses integrated. Further analysis reveals that using additional policy loss can improve the performance of policy model calibration, which opens a new horizon for training high-quality reward models.

2 Preliminary

The objective of our framework is to train the reward model 𝒓𝒓\bm{r}bold_italic_r based on a pairwise comparison dataset (also known as “preference dataset”) 𝒟𝒟\mathcal{D}caligraphic_D, following typical reward model training settings.

2.1 Notation

  • 𝒟={(xi,yi,yi)}i=1n𝒟superscriptsubscriptsubscript𝑥𝑖subscript𝑦𝑖superscriptsubscript𝑦𝑖𝑖1𝑛\mathcal{D}=\left\{{\left({x_{i},y_{i},y_{i}^{\prime}}\right)}\right\}_{i=1}^{n}caligraphic_D = { ( italic_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) } start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT represents the dataset used to train the reward model, where xisubscript𝑥𝑖x_{i}italic_x start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, yisubscript𝑦𝑖y_{i}italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and yisuperscriptsubscript𝑦𝑖y_{i}^{\prime}italic_y start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT are the query, preferred and non-preferred responses respectively.

  • 𝒫={(x,y)(x,y,y)𝒟}{(x,y)(x,y,y)𝒟}𝒫conditional-set𝑥𝑦𝑥𝑦superscript𝑦𝒟conditional-set𝑥superscript𝑦𝑥𝑦superscript𝑦𝒟\mathcal{P}=\left\{{\left({x,y}\right)\mid\left({x,y,y^{\prime}}\right)\in% \mathcal{D}}\right\}\cup\left\{\left({x,y^{\prime}}\right)\mid\right.\\ \left.\left({x,y,y^{\prime}}\right)\in\mathcal{D}\right\}caligraphic_P = { ( italic_x , italic_y ) ∣ ( italic_x , italic_y , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∈ caligraphic_D } ∪ { ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∣ ( italic_x , italic_y , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∈ caligraphic_D } is the set of query-response pairs from the dataset 𝒟𝒟\mathcal{D}caligraphic_D.

  • 𝒓𝒓\bm{r}bold_italic_r is the reward model which can be split into two parts as 𝒓(x,y)=Fϕ(x,y)𝒓xyFitalic-ϕ𝑥𝑦\bm{r}\mathrm{\left({x,y}\right)}=\mathrm{F}\circ\phi\left({x,y}\right)bold_italic_r ( roman_x , roman_y ) = roman_F ∘ italic_ϕ ( italic_x , italic_y ), to output the reward of a response y𝑦yitalic_y given a query x𝑥xitalic_x. Here, ϕ(,)italic-ϕ\phi\left({\cdot,\cdot}\right)italic_ϕ ( ⋅ , ⋅ ) denotes the model’s internal preference model, while FF\mathrm{F}roman_F serves as the reward prediction layer mapping the model’s internal preference to the final reward. We use the symbol \circ to signify function nesting, i.e., Fϕ(x,y)=F(ϕ(x,y))Fitalic-ϕ𝑥𝑦Fitalic-ϕ𝑥𝑦\mathrm{F}\circ\phi\left({x,y}\right)=\mathrm{F}\left({\phi\left({x,y}\right)}\right)roman_F ∘ italic_ϕ ( italic_x , italic_y ) = roman_F ( italic_ϕ ( italic_x , italic_y ) ).

  • 𝝅𝝅\bm{\pi}bold_italic_π is the policy model, and 𝝅(x,y)𝝅𝑥𝑦\bm{\pi}\left({x,y}\right)bold_italic_π ( italic_x , italic_y ) is the generation probability of y𝑦yitalic_y given x𝑥xitalic_x. It can also be divided into two parts as 𝝅(x,y)=Kϕ(x,y)𝝅𝑥𝑦Kitalic-ϕ𝑥𝑦\bm{\pi}\left({x,y}\right)=\mathrm{K}\circ\phi\left({x,y}\right)bold_italic_π ( italic_x , italic_y ) = roman_K ∘ italic_ϕ ( italic_x , italic_y ) where the policy prediction layer KK\mathrm{K}roman_K maps the model’s internal preference to the generation probability.

  • The oracle (optimal) value is denoted as the corresponding letter with an asterisk such as 𝒓superscript𝒓\bm{r}^{*}bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT(oracle reward model), ϕsuperscriptitalic-ϕ\phi^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT(optimal model preference), FsuperscriptF\mathrm{F}^{*}roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT(optimal reward prediction layer) and KsuperscriptK\mathrm{K}^{*}roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT(optimal policy prediction layer).

2.2 Training Loss

We use D1subscriptD1\mathrm{D}_{1}roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT to represent the distribution discrepancy between the reward model’s output and the oracle reward model’s output, and D2subscriptD2\mathrm{D}_{2}roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT for the outputs of the policy model and the oracle policy model.

Reward Loss

The standard reward loss ssubscript𝑠\mathcal{L}_{s}caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT considers the precision of rewards alone, being a simple and direct metric to quantify the quality of a reward model.

s𝔼d𝒫[D1(𝒓(d),𝒓(d))]subscript𝑠similar-to𝑑𝒫𝔼delimited-[]subscriptD1𝒓𝑑superscript𝒓𝑑\mathcal{L}_{s}\coloneqq\underset{d\sim\mathcal{P}}{\mathbb{E}}\left[{\mathrm{% D}_{1}\left({\bm{r}\left({d}\right),\bm{r}^{*}\left({d}\right)}\right)}\right]caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ≔ start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( bold_italic_r ( italic_d ) , bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] (1)

For notational convenience, we use d𝑑ditalic_d to denote (x,y)𝑥𝑦\left({x,y}\right)( italic_x , italic_y ) and use argmin𝒓s𝒓argminsubscript𝑠\underset{\bm{r}}{\mathrm{argmin}}\mathcal{L}_{s}underbold_italic_r start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT or argminF,ϕsFitalic-ϕargminsubscript𝑠\underset{\mathrm{F},\phi}{\mathrm{argmin}}\mathcal{L}_{s}start_UNDERACCENT roman_F , italic_ϕ end_UNDERACCENT start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT to represent the model training with the standard reward loss.

Policy Loss

Similar to the reward loss, standard policy loss aims to measure the error of the policy model.

P𝔼d𝒫[D2(𝝅(d),𝝅(d))]subscript𝑃similar-to𝑑𝒫𝔼delimited-[]subscriptD2𝝅𝑑superscript𝝅𝑑\mathcal{L}_{P}\coloneqq\underset{d\sim\mathcal{P}}{\mathbb{E}}\left[{\mathrm{% D}_{2}\left({\bm{\pi}\left({d}\right),\bm{\pi}^{*}\left({d}\right)}\right)}\right]caligraphic_L start_POSTSUBSCRIPT italic_P end_POSTSUBSCRIPT ≔ start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( bold_italic_π ( italic_d ) , bold_italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] (2)
Hybrid Alignment Loss

To fully leverage the similarity between the reward model and the policy model, we incorporate an additional supervising term D2subscriptD2\mathrm{D}_{2}roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT on the policy model into the loss function. By calibrating the shared preference space, we effectively align the model in a hybrid manner:

H𝔼d𝒫[D1(𝒓(d),𝒓(d))\displaystyle\mathcal{L}_{H}\coloneqq\underset{d\sim\mathcal{P}}{\mathbb{E}}% \left[\mathrm{D}_{1}\left({\bm{r}\left({d}\right),\bm{r}^{*}\left({d}\right)}% \right)\right.caligraphic_L start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ≔ start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( bold_italic_r ( italic_d ) , bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) (3)
+αD2(𝝅(d),𝝅(d))]\displaystyle+\alpha\cdot\left.\mathrm{D}_{2}\left({\bm{\pi}\left({d}\right),% \bm{\pi}^{*}\left({d}\right)}\right)\right]+ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( bold_italic_π ( italic_d ) , bold_italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
=𝔼d𝒫[D1(Fϕ(d),Fϕ(d))\displaystyle=\underset{d\sim\mathcal{P}}{\mathbb{E}}\left[\mathrm{D}_{1}\left% ({\mathrm{F\circ\phi}\left({d}\right),\mathrm{F^{*}\circ\phi^{*}}\left({d}% \right)}\right)\right.= start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F ∘ italic_ϕ ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) )
+αD2(Kϕ(d),Kϕ(d))]\displaystyle+\alpha\cdot\left.\mathrm{D}_{2}\left({\mathrm{K\circ\phi}\left({% d}\right),\mathrm{K^{*}\circ\phi^{*}}\left({d}\right)}\right)\right]+ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]

where α𝛼\alphaitalic_α is a hyperparameter to balance losses from the reward and policy model, ϕitalic-ϕ\phiitalic_ϕ is the shared internal preference model which receives gradients from both loss terms. Similarly, argminF,K,ϕHFKitalic-ϕargminsubscript𝐻\underset{\mathrm{F,K},\phi}{\mathrm{argmin}}\mathcal{L}_{H}start_UNDERACCENT roman_F , roman_K , italic_ϕ end_UNDERACCENT start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT and argmin𝒓,𝝅H𝒓𝝅argminsubscript𝐻\underset{\bm{r,\pi}}{\mathrm{argmin}}\mathcal{L}_{H}start_UNDERACCENT bold_italic_r bold_, bold_italic_π end_UNDERACCENT start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT represent the model training with our hybrid alignment loss.

3 Hybrid Alignment Framework

3.1 Model Implementation

The most commonly used decoder-only LLM consists of stacked transformer blocks (Vaswani et al., 2017) or similar structures, and a linear layer for policy projection. In the reward model, only the shape of the final linear layer is adjusted to match the format of the reward value output compared to the policy model. We retain two linear layers for our model, enabling it to output rewards and probabilities simultaneously.

To significantly reduce the resources required for training, it is standard practice to initialize the internal preference module of the reward model with a fine-tuned language model as it retains the model’s language modeling capabilities.

3.2 Loss Calculation

There is consensus on the specific calculation method for the reward loss. In avoiding the issue of uncertain reward values, the Bradley-Terry model (Christiano et al., 2017) is used to transform the reward modeling problem into a probability optimization problem. Treating the problem as a binary classification task yields the popular form of reward loss function:

s=𝔼d𝒫\displaystyle\mathcal{L}_{s}\;=\,\quad\underset{d\sim\mathcal{P}}{\mathbb{E}}caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT = start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [D1(𝒓(d),𝒓(d))]delimited-[]subscriptD1𝒓𝑑superscript𝒓𝑑\displaystyle\left[\mathrm{D}_{1}\left({\bm{r}\left({d}\right),\bm{r}^{*}\left% ({d}\right)}\right)\right][ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( bold_italic_r ( italic_d ) , bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] (4)
=𝔼(x,y,y)𝒟absentsimilar-to𝑥𝑦superscript𝑦𝒟𝔼\displaystyle=\underset{\left({x,y,y^{\prime}}\right)\sim\mathcal{D}}{\mathbb{% E}}= start_UNDERACCENT ( italic_x , italic_y , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∼ caligraphic_D end_UNDERACCENT start_ARG blackboard_E end_ARG [logσ(𝒓(x,y)𝒓(x,y))]delimited-[]𝜎𝒓𝑥𝑦𝒓𝑥superscript𝑦\displaystyle\left[-\log\sigma\left({\bm{r}\left({x,y}\right)-\bm{r}\left({x,y% ^{\prime}}\right)}\right)\right][ - roman_log italic_σ ( bold_italic_r ( italic_x , italic_y ) - bold_italic_r ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ) ]

where σ()𝜎\sigma\left({\cdot}\right)italic_σ ( ⋅ ) is the sigmoid function.

Given the preference data, there currently does not exist a universally optimal policy loss. However, since the derivation of the DPO loss is based on assumptions similar to those made for the reward loss (as detailed in Appendix C.2), we choose to use the DPO loss as the method for calculating the policy loss.

P=𝔼d𝒫\displaystyle\mathcal{L}_{P}\;=\,\quad\underset{d\sim\mathcal{P}}{\mathbb{E}}caligraphic_L start_POSTSUBSCRIPT italic_P end_POSTSUBSCRIPT = start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [D2(𝝅(d),𝝅(d))]delimited-[]subscriptD2𝝅𝑑superscript𝝅𝑑\displaystyle\left[{\mathrm{D}_{2}\left({\bm{\pi}\left({d}\right),\bm{\pi}^{*}% \left({d}\right)}\right)}\right][ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( bold_italic_π ( italic_d ) , bold_italic_π start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] (5)
=𝔼(x,y,y)𝒟absentsimilar-to𝑥𝑦superscript𝑦𝒟𝔼\displaystyle=\underset{\left({x,y,y^{\prime}}\right)\sim\mathcal{D}}{\mathbb{% E}}= start_UNDERACCENT ( italic_x , italic_y , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ∼ caligraphic_D end_UNDERACCENT start_ARG blackboard_E end_ARG [logσ(τ(pdwinpdlose))]delimited-[]𝜎𝜏𝑝subscript𝑑𝑤𝑖𝑛𝑝subscript𝑑𝑙𝑜𝑠𝑒\displaystyle\left[{-\log\sigma\left({\tau\left({pd_{win}-pd_{lose}}\right)}% \right)}\right][ - roman_log italic_σ ( italic_τ ( italic_p italic_d start_POSTSUBSCRIPT italic_w italic_i italic_n end_POSTSUBSCRIPT - italic_p italic_d start_POSTSUBSCRIPT italic_l italic_o italic_s italic_e end_POSTSUBSCRIPT ) ) ]

where
pdwin=log𝝅(x,y)𝝅ref(x,y)𝑝subscript𝑑𝑤𝑖𝑛𝝅𝑥𝑦subscript𝝅𝑟𝑒𝑓𝑥𝑦pd_{win}=\log\frac{\bm{\pi}(x,y)}{\bm{\pi}_{ref}(x,y)}italic_p italic_d start_POSTSUBSCRIPT italic_w italic_i italic_n end_POSTSUBSCRIPT = roman_log divide start_ARG bold_italic_π ( italic_x , italic_y ) end_ARG start_ARG bold_italic_π start_POSTSUBSCRIPT italic_r italic_e italic_f end_POSTSUBSCRIPT ( italic_x , italic_y ) end_ARG, pdlose=log𝝅(x,y)𝝅ref(x,y)𝑝subscript𝑑𝑙𝑜𝑠𝑒𝝅𝑥superscript𝑦subscript𝝅𝑟𝑒𝑓𝑥superscript𝑦pd_{lose}=\log\frac{\bm{\pi}(x,y^{\prime})}{\bm{\pi}_{ref}(x,y^{\prime})}italic_p italic_d start_POSTSUBSCRIPT italic_l italic_o italic_s italic_e end_POSTSUBSCRIPT = roman_log divide start_ARG bold_italic_π ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) end_ARG start_ARG bold_italic_π start_POSTSUBSCRIPT italic_r italic_e italic_f end_POSTSUBSCRIPT ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) end_ARG. 𝝅refsubscript𝝅𝑟𝑒𝑓\bm{\pi}_{ref}bold_italic_π start_POSTSUBSCRIPT italic_r italic_e italic_f end_POSTSUBSCRIPT is the reference policy model and τ𝜏\tauitalic_τ is the hyperparameter set to 0.1.

Combining the two losses, we have our HaF loss calculate in the following manner:

H=s+αPsubscript𝐻subscript𝑠𝛼subscript𝑃\mathcal{L}_{H}=\mathcal{L}_{s}+\alpha\cdot\mathcal{L}_{P}caligraphic_L start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT = caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT + italic_α ⋅ caligraphic_L start_POSTSUBSCRIPT italic_P end_POSTSUBSCRIPT (6)

We will elaborate in Appendix C.1 on why Eq. 4 and Eq. 5 hold and why there is no optimal model on the right-hand side.

3.3 Theoretical Analysis

In this subsection, we present several properties of HaF that are independent of the specific calculation methods of the two loss functions. We will start from Section 2.2.

In practice, functions such as FF\mathrm{F}roman_F and ϕitalic-ϕ\phiitalic_ϕ are represented by parameterized models with finite parameters, and thus cannot precisely model arbitrary distributions. Here we show that under certain assumptions, using the hybrid alignment loss can yield a better solution than simply using the standard reward loss.

Proposition 1.

Unless K𝐾Kitalic_K can exactly fit Ksuperscript𝐾K^{*}italic_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT, there exists ϵ>0italic-ϵ0\epsilon>0italic_ϵ > 0, such that

𝔼d𝒫[D2(KHϕH(d),Kϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD2subscriptKHsubscriptitalic-ϕH𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\quad\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{2}(% \mathrm{K_{H}\circ\phi_{H}}(d),\mathrm{K^{*}\circ\phi^{*}}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
minK𝔼d𝒫[D2(Kϕs(d),Kϕ(d))]ϵαabsentKminsimilar-to𝑑𝒫𝔼delimited-[]subscriptD2Ksubscriptitalic-ϕs𝑑superscriptKsuperscriptitalic-ϕ𝑑italic-ϵ𝛼\displaystyle\leqslant\underset{\mathrm{K}}{\mathrm{min}}\underset{d\sim% \mathcal{P}}{\mathbb{E}}[\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{% *}\circ\phi^{*}}(d))]-\frac{\epsilon}{\alpha}⩽ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] - divide start_ARG italic_ϵ end_ARG start_ARG italic_α end_ARG

holds for all α(0.1,2)𝛼0.12\alpha\in(0.1,2)italic_α ∈ ( 0.1 , 2 ), where KH,ϕH=argminK,ϕHsubscript𝐾𝐻subscriptitalic-ϕ𝐻Kitalic-ϕargminsubscript𝐻K_{H},\phi_{H}=\underset{\mathrm{K},\phi}{\mathrm{argmin}}\mathcal{L}_{H}italic_K start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT , italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT = start_UNDERACCENT roman_K , italic_ϕ end_UNDERACCENT start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT in Equation 3 and ϕs=argminϕssubscriptitalic-ϕ𝑠italic-ϕargminsubscript𝑠\phi_{s}=\underset{\phi}{\mathrm{argmin}}\mathcal{L}_{s}italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT = underitalic_ϕ start_ARG roman_argmin end_ARG caligraphic_L start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT in Equation 4.

Here we use argminargmin\mathrm{argmin}roman_argmin to represent the best models optimized with the corresponding loss functions, so ϕHsubscriptitalic-ϕ𝐻\phi_{H}italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT and ϕssubscriptitalic-ϕ𝑠\phi_{s}italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT are not equal to ϕsuperscriptitalic-ϕ\phi^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT although ϕsuperscriptitalic-ϕ\phi^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT is the minimum mathematically. Intuitively this indicates that the model learned from the joint calibrated loss outperforms the one learned solely from the preference space using the standard reward loss.

Proposition 2.

Assume that ϕsuperscriptitalic-ϕ\phi^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT is unique, Ksuperscript𝐾K^{*}italic_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT is locally Lipschitz continuous, , and 0.1<α<20.1𝛼20.1<\alpha<20.1 < italic_α < 2, there exists k,δ>0𝑘𝛿0k,\delta>0italic_k , italic_δ > 0, such that

𝔼d𝒫[|ϕH(d)ϕ(d)||ϕs(d)ϕ(d)|]<similar-to𝑑𝒫𝔼delimited-[]subscriptitalic-ϕ𝐻𝑑superscriptitalic-ϕ𝑑subscriptitalic-ϕ𝑠𝑑superscriptitalic-ϕ𝑑absent\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[|\phi_{H}(d)-\phi^{*}(d)|% -|\phi_{s}(d)-\phi^{*}(d)|]<start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ | italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | - | italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | ] <
gmaxgmingmin𝔼d𝒫|ϕs(d)ϕ(d)|+2δϵαksubscript𝑔subscript𝑔subscript𝑔similar-to𝑑𝒫𝔼subscriptitalic-ϕ𝑠𝑑superscriptitalic-ϕ𝑑2𝛿italic-ϵ𝛼𝑘\displaystyle\frac{g_{\max}-g_{\min}}{g_{\min}}\underset{d\sim\mathcal{P}}{% \mathbb{E}}|\phi_{s}(d)-\phi^{*}(d)|+2\delta-\frac{\epsilon}{\alpha\cdot k}divide start_ARG italic_g start_POSTSUBSCRIPT roman_max end_POSTSUBSCRIPT - italic_g start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT end_ARG start_ARG italic_g start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | + 2 italic_δ - divide start_ARG italic_ϵ end_ARG start_ARG italic_α ⋅ italic_k end_ARG

The detailed derivations for both propositions are provided in Appendix D. Here we obtain an upper bound on the model preference error. By tuning the hyperparameter α𝛼\alphaitalic_α, the right term can be strictly negative. In other words, model preference space trained with our calibrated loss can be strictly closer to the true preference space compared to the standard reward loss. (In practice, there is no need for an exhaustive search, we find α=0.2𝛼0.2\alpha=0.2italic_α = 0.2 already yields satisfactory results. We give a discussion about this in B)

4 Experiment setup

4.1 Datasets

We comprehensively assess the performance of our framework using five public datasets, namely Anthropic-HH-Harmless (HH-harmless) (Bai et al., 2022), Anthropic-HH-Helpful (HH-Helpful) (Bai et al., 2022), Beaver Safe (BS) (Ji et al., 2023), Alpaca Human Pref (AHP) (Dubois et al., 2023) and Chatbot Arena (CA) (Zheng et al., 2023). Note that AHP and CA do not have original data split for evaluation, we randomly extract 10% from the original data as a test set, the details of the used datasets are shown in Tab 1.

Name Size Words/QA Tokens/QA
Harmless 12,915 42.9 61.5
Helpful 13,543 54.3 77.2
BS 47,625 69.3 88.5
AHP 08,722 59.6 81.9
CA 19,466 165.50 257.60
Table 1: Statistics of the Training Datasets

4.2 Comparative Models

Baseline

We compare our framework with the standard training approach, in which the reward model only has a reward layer for reward prediction and is optimized via Eq. 4.

DPO

Although DPO loss (Eq. 5) is typically used for training policy models rather than reward models, it can implicitly convert the model’s outputs into reward values (Rafailov et al., 2023). Therefore, the DPO model can also be considered a reward model (Rafailov et al., 2024). Following the work of Lambert et al. (2024), we also evaluate the model trained with DPO loss.

HAF

Under our framework, the reward model has both the reward and policy layer for predicting sequence-level rewards and providing token-level probabilities.

In our implementation, we use Phi-2-2.7B and Mistral-7B-Instruct-v0.2 as our base model. We train Phi-2 and Mistral-7B using full-parameter and Low-rank Adaptation (LoRA) Hu et al. (2022), respectively. More experiment setup can be found in Appendix A.

5 Experiment Results

5.1 Intrinsic performance of Reward Models

The primary function of a reward model is to evaluate the quality of responses to a given question, which involves accurately comparing two answers to the same question. Using judgment accuracy as the evaluation metric, we conduct several experiments to assess the effectiveness of HaF in training the reward model.

5.1.1 Overall Performance

Method Helpful Harmless CA BS AHP Avg
DPO(Phi-2) 69.70 66.30 66.80 87.80 52.60 68.64
Baseline(Phi-2) 64.30 69.50 79.30 76.00 58.40 69.50
HaF (Phi-2) 76.40 70.40 79.00 84.00 60.80 74.12
DPO(Mistral) 74.29 70.30 81.90 92.70 60.30 75.90
Baseline(Mistral) 76.20 72.70 79.80 80.80 56.30 73.16
HaF (Mistral) 75.80 73.10 81.90 88.70 63.10 76.52
Table 2: Overall results on each dataset for accuracy, which denotes the proportion that the better response is scored higher. The best performance is highlighted in boldface and the suboptimal result is underlined.

Firstly we compare the performance of HaF with the baseline and two judging models across the five datasets. Table 2 presents the overall results. HAF has higher accuracy than the baseline in most cases, indicating that the model can more sensitively identify whether an answer is good and give a more accurate high (or low) score. At the same time, those results worse than the baseline or DPO are generally only slightly worse, indicating that our method is basically not weaker than the baseline under various circumstances.

Refer to caption
Figure 2: Comparison of models trained with HAF/baseline/DPO methods on the mixed dataset.
Acc(%) AHP CA Helpful BS Harmless AVG rAcc
Phi-2-2.7B
AHP * 67.40(30.30)(1.00)\textrm{67.40}^{{}_{(\textrm{1.00}\downarrow)}}_{{}^{(\textrm{30.30}\uparrow)}}67.40 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.00 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 30.30 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 67.60(17.10)(3.40)\textrm{67.60}^{{}_{(\textrm{3.40}\uparrow)}}_{{}^{(\textrm{17.10}\uparrow)}}67.60 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 3.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 17.10 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 39.80(14.80)(0.20)\textrm{39.80}^{{}_{(\textrm{0.20}\uparrow)}}_{{}^{(\textrm{14.80}\downarrow)}}39.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.20 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 14.80 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 41.90(9.30)(5.40)\textrm{41.90}^{{}_{(\textrm{5.40}\downarrow)\phantom{1}}}_{{}^{(\textrm{9.30}% \downarrow)\phantom{1}}}41.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 5.40 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.30 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 54.18(5.83)(0.70)\textrm{54.18}^{{}_{(\textrm{0.70}\downarrow)\phantom{1}}}_{{}^{(\textrm{5.83}% \uparrow)\phantom{1}}}54.18 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.70 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.83 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 67.50(23.70)(1.20)\textrm{67.50}^{{}_{(\textrm{1.20}\uparrow)}}_{{}^{(\textrm{23.70}\uparrow)}}67.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.20 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 23.70 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
CA 60.20(8.20)(0.50)\textrm{60.20}^{{}_{(\textrm{0.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{8.20}% \uparrow)\phantom{1}}}60.20 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 8.20 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 64.70(15.00)(3.20)\textrm{64.70}^{{}_{(\textrm{3.20}\downarrow)}}_{{}^{(\textrm{15.00}\uparrow)}}64.70 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 3.20 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 15.00 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 37.60(13.00)(0.80)\textrm{37.60}^{{}_{(\textrm{0.80}\uparrow)}}_{{}^{(\textrm{13.00}\downarrow)}}37.60 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.80 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 13.00 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 42.10(9.40)(5.60)\textrm{42.10}^{{}_{(\textrm{5.60}\uparrow)\phantom{1}}}_{{}^{(\textrm{9.40}% \downarrow)\phantom{1}}}42.10 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 5.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.40 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 51.15(0.20)(0.92)\textrm{51.15}^{{}_{(\textrm{0.92}\uparrow)\phantom{1}}}_{{}^{(\textrm{0.20}% \uparrow)\phantom{1}}}51.15 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.92 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 0.20 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 62.45(11.60)(1.35)\textrm{62.45}^{{}_{(\textrm{1.35}\downarrow)}}_{{}^{(\textrm{11.60}\uparrow)}}62.45 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.35 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 11.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Helpful 60.20(6.90)(2.90)\textrm{60.20}^{{}_{(\textrm{2.90}\uparrow)\phantom{1}}}_{{}^{(\textrm{6.90}% \uparrow)\phantom{1}}}60.20 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.90 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 6.90 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 72.00(32.70)(1.10)\textrm{72.00}^{{}_{(\textrm{1.10}\downarrow)}}_{{}^{(\textrm{32.70}\uparrow)}}72.00 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.10 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 32.70 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 36.20(10.30)(1.40)\textrm{36.20}^{{}_{(\textrm{1.40}\downarrow)}}_{{}^{(\textrm{10.30}\downarrow% )}}36.20 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.40 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 10.30 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 38.50(0.30)(6.90)\textrm{38.50}^{{}_{(\textrm{6.90}\downarrow)\phantom{1}}}_{{}^{(\textrm{0.30}% \downarrow)\phantom{1}}}38.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 6.90 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 0.30 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 51.73(7.25)(1.62)\textrm{51.73}^{{}_{(\textrm{1.62}\downarrow)\phantom{1}}}_{{}^{(\textrm{7.25}% \uparrow)\phantom{1}}}51.73 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.62 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 7.25 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 66.10(19.80)(0.90)\textrm{66.10}^{{}_{(\textrm{0.90}\uparrow)}}_{{}^{(\textrm{19.80}\uparrow)}}66.10 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.90 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 19.80 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
BS 47.90(1.20)(0.20)\textrm{47.90}^{{}_{(\textrm{0.20}\downarrow)\phantom{1}}}_{{}^{(\textrm{1.20}% \downarrow)\phantom{1}}}47.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.20 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 1.20 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 41.00(9.20)(2.50)\textrm{41.00}^{{}_{(\textrm{2.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{9.20}% \uparrow)\phantom{1}}}41.00 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.20 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 35.70(9.30)(1.40)\textrm{35.70}^{{}_{(\textrm{1.40}\downarrow)\phantom{1}}}_{{}^{(\textrm{9.30}% \downarrow)\phantom{1}}}35.70 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.40 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.30 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 70.60(4.60)(5.60)\textrm{70.60}^{{}_{(\textrm{5.60}\uparrow)\phantom{1}}}_{{}^{(\textrm{4.60}% \uparrow)\phantom{1}}}70.60 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 5.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 4.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 48.80(0.82)(1.62)\textrm{48.80}^{{}_{(\textrm{1.62}\uparrow)\phantom{1}}}_{{}^{(\textrm{0.82}% \uparrow)\phantom{1}}}48.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.62 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 0.82 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 70.60(4.60)(5.60)\textrm{70.60}^{{}_{(\textrm{5.60}\uparrow)\phantom{1}}}_{{}^{(\textrm{4.60}% \uparrow)\phantom{1}}}70.60 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 5.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 4.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Harmless 43.80(6.20)(1.30)\textrm{43.80}^{{}_{(\textrm{1.30}\uparrow)\phantom{1}}}_{{}^{(\textrm{6.20}% \downarrow)\phantom{1}}}43.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.30 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 6.20 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 29.40(5.70)(0.50)\textrm{29.40}^{{}_{(\textrm{0.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{5.70}% \downarrow)\phantom{1}}}29.40 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.70 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 32.60(9.10)(0.80)\textrm{32.60}^{{}_{(\textrm{0.80}\uparrow)\phantom{1}}}_{{}^{(\textrm{9.10}% \downarrow)\phantom{1}}}32.60 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.80 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.10 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 76.90(8.60)(1.50)\textrm{76.90}^{{}_{(\textrm{1.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{8.60}% \uparrow)\phantom{1}}}76.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 8.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 45.67(3.10)(1.02)\textrm{45.67}^{{}_{(\textrm{1.02}\uparrow)\phantom{1}}}_{{}^{(\textrm{3.10}% \downarrow)\phantom{1}}}45.67 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.02 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 3.10 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 76.90(8.60)(1.50)\textrm{76.90}^{{}_{(\textrm{1.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{8.60}% \uparrow)\phantom{1}}}76.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 8.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Mistral-7B-Instruct
AHP * 75.50(17.90)(6.20)\textrm{75.50}^{{}_{(\textrm{6.20}\uparrow)}}_{{}^{(\textrm{17.90}\uparrow)}}75.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 6.20 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 17.90 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 68.90(7.60)(10.60)\textrm{68.90}^{{}_{(\textrm{10.60}\uparrow)}}_{{}^{(\textrm{7.60}\uparrow)}}68.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 10.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 7.60 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 55.70(5.90)(7.20)\textrm{55.70}^{{}_{(\textrm{7.20}\uparrow)\phantom{1}}}_{{}^{(\textrm{5.90}% \uparrow)\phantom{1}}}55.70 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 7.20 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.90 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 48.00(1.40)(1.20)\textrm{48.00}^{{}_{(\textrm{1.20}\uparrow)\phantom{1}}}_{{}^{(\textrm{1.40}% \downarrow)\phantom{1}}}48.00 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.20 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 1.40 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 62.02(7.50)(6.30)\textrm{62.02}^{{}_{(\textrm{6.30}\uparrow)\phantom{1}}}_{{}^{(\textrm{7.50}% \uparrow)\phantom{1}}}62.02 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 6.30 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 7.50 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 72.20(12.75)(8.40)\textrm{72.20}^{{}_{(\textrm{8.40}\uparrow)}}_{{}^{(\textrm{12.75}\uparrow)}}72.20 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 8.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 12.75 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
CA 60.80(6.80)(0.20)\textrm{60.80}^{{}_{(\textrm{0.20}\downarrow)\phantom{1}}}_{{}^{(\textrm{6.80}% \uparrow)\phantom{1}}}60.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.20 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 6.80 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 65.80(12.50)(1.20)\textrm{65.80}^{{}_{(\textrm{1.20}\downarrow)}}_{{}^{(\textrm{12.50}\uparrow)}}65.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.20 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 12.50 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 38.50(3.00)(6.60)\textrm{38.50}^{{}_{(\textrm{6.60}\downarrow)\phantom{1}}}_{{}^{(\textrm{3.00}% \downarrow)\phantom{1}}}38.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 6.60 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 3.00 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 36.80(6.80)(4.00)\textrm{36.80}^{{}_{(\textrm{4.00}\downarrow)\phantom{1}}}_{{}^{(\textrm{6.80}% \downarrow)\phantom{1}}}36.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 4.00 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 6.80 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 50.47(2.37)(3.00)\textrm{50.47}^{{}_{(\textrm{3.00}\downarrow)\phantom{1}}}_{{}^{(\textrm{2.37}% \uparrow)\phantom{1}}}50.47 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 3.00 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 2.37 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 63.30(9.65)(0.70)\textrm{63.30}^{{}_{(\textrm{0.70}\downarrow)\phantom{1}}}_{{}^{(\textrm{9.65}% \uparrow)\phantom{1}}}63.30 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.70 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 9.65 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Helpful 60.90(8.20)(1.00)\textrm{60.90}^{{}_{(\textrm{1.00}\downarrow)\phantom{1}}}_{{}^{(\textrm{8.20}% \uparrow)\phantom{1}}}60.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.00 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 8.20 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 73.90(20.30)(0.60)\textrm{73.90}^{{}_{(\textrm{0.60}\uparrow)}}_{{}^{(\textrm{20.30}\uparrow)}}73.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 20.30 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 36.00(5.40)(9.30)\textrm{36.00}^{{}_{(\textrm{9.30}\downarrow)\phantom{1}}}_{{}^{(\textrm{5.40}% \downarrow)\phantom{1}}}36.00 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 9.30 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.40 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 37.50(2.10)(0.00)\textrm{37.50}^{{}_{(\textrm{0.00})\phantom{1}}}_{{}^{(\textrm{2.10}\uparrow)% \phantom{1}}}37.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.00 ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 2.10 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 52.08(6.30)(2.42)\textrm{52.08}^{{}_{(\textrm{2.42}\downarrow)\phantom{1}}}_{{}^{(\textrm{6.30}% \uparrow)\phantom{1}}}52.08 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.42 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 6.30 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 67.40(14.25)(0.20)\textrm{67.40}^{{}_{(\textrm{0.20}\downarrow)}}_{{}^{(\textrm{14.25}\uparrow)}}67.40 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.20 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 14.25 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
BS 52.90(1.10)(4.00)\textrm{52.90}^{{}_{(\textrm{4.00}\uparrow)\phantom{1}}}_{{}^{(\textrm{1.10}% \downarrow)\phantom{1}}}52.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 4.00 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 1.10 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 55.20(12.30)(9.50)\textrm{55.20}^{{}_{(\textrm{9.50}\uparrow)}}_{{}^{(\textrm{12.30}\uparrow)}}55.20 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 9.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 12.30 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 43.80(8.10)(3.40)\textrm{43.80}^{{}_{(\textrm{3.40}\downarrow)\phantom{1}}}_{{}^{(\textrm{8.10}% \downarrow)\phantom{1}}}43.80 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 3.40 ↓ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 8.10 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 71.90(3.00)(1.40)\textrm{71.90}^{{}_{(\textrm{1.40}\uparrow)\phantom{1}}}_{{}^{(\textrm{3.00}% \uparrow)\phantom{1}}}71.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 3.00 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 55.95(1.52)(2.87)\textrm{55.95}^{{}_{(\textrm{2.87}\uparrow)\phantom{1}}}_{{}^{(\textrm{1.52}% \uparrow)\phantom{1}}}55.95 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.87 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 1.52 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 71.90(3.00)(1.40)\textrm{71.90}^{{}_{(\textrm{1.40}\uparrow)\phantom{1}}}_{{}^{(\textrm{3.00}% \uparrow)\phantom{1}}}71.90 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 3.00 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Harmless 46.50(0.40)(1.00)\textrm{46.50}^{{}_{(\textrm{1.00}\uparrow)\phantom{1}}}_{{}^{(\textrm{0.40}% \downarrow)\phantom{1}}}46.50 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 1.00 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 0.40 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 38.30(10.50)(4.60)\textrm{38.30}^{{}_{(\textrm{4.60}\uparrow)}}_{{}^{(\textrm{10.50}\downarrow)}}38.30 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 4.60 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 10.50 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 32.40(2.10)(0.50)\textrm{32.40}^{{}_{(\textrm{0.50}\uparrow)\phantom{1}}}_{{}^{(\textrm{2.10}% \downarrow)\phantom{1}}}32.40 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 0.50 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 2.10 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 76.70(5.70)(2.40)\textrm{76.70}^{{}_{(\textrm{2.40}\uparrow)\phantom{1}}}_{{}^{(\textrm{5.70}% \uparrow)\phantom{1}}}76.70 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.70 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT * 48.48(1.82)(2.13)\textrm{48.48}^{{}_{(\textrm{2.13}\uparrow)\phantom{1}}}_{{}^{(\textrm{1.82}% \downarrow)\phantom{1}}}48.48 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.13 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 1.82 ↓ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT 76.70(5.70)(2.40)\textrm{76.70}^{{}_{(\textrm{2.40}\uparrow)\phantom{1}}}_{{}^{(\textrm{5.70}% \uparrow)\phantom{1}}}76.70 start_POSTSUPERSCRIPT start_FLOATSUBSCRIPT ( 2.40 ↑ ) end_FLOATSUBSCRIPT end_POSTSUPERSCRIPT start_POSTSUBSCRIPT start_FLOATSUPERSCRIPT ( 5.70 ↑ ) end_FLOATSUPERSCRIPT end_POSTSUBSCRIPT
Table 3: Results for the OOD experiment. The results in the same row are derived from the same backbone and the same training dataset, while the columns represent different test datasets. The displayed accuracies are for HaF , with superscripts and subscripts indicating the performance differences relative to the baseline and DPO, respectively. \uparrow denotes an improvement with HaF , whereas \downarrow indicates a decline. rAcc is the average accuracy among grey blocks.

5.1.2 Mixed Data

For the mixed data setting, we construct two datasets by sampling and combining examples from multiple sources: Anthropic-HH (Anthropic Helpful + Anthropic Harmless) and Mixed (evenly sampled from each of the five datasets in our corpus). As shown in Figure 2, our proposed hybrid alignment framework achieves the best generalization performance across all reward models when evaluated on these mixed data distributions. This suggests our approach can better learn the diversity present in the combined datasets for generalization.

5.1.3 OOD Data

Data within the same dataset often exhibits certain distributional similarities due to similar or even identical data cleaning and processing methods. To simulate a distribution shift in real-world application, we also evaluate generalization to entirely held-out OOD datasets. Specifically, we train models on one dataset and evaluate on the remaining four. Although different datasets have distinct distributions, their main preferences can be generalized as “overall better” (AHP, CA and Helpful) and “safer” (BS and Harmless), which we use rAcc (“r” stands for “relevant”) to represent model’s generalization ability within similar preferences.

The results are detailed in Table 3. We can tell from the table that the rAcc of HaF is basically higher than that of both Baseline and DPO, indicating HaF possesses a strong ability to learn preferences and effectively generalize them to similar preference distributions, despite great differences in language style and topic. Touvron et al. (2023) noted that RLHF involves distributional shifts in the policy model during training, necessitating iterative training for the reward model. The robustness of HaF against such distributional shifts could potentially be a key factor in alleviating this problem.

Comparing Table 3 and Table 2, we can observe that models trained using CA or Helpful datasets outperform those directly trained on AHP dataset when the test set is AHP. This suggests two things: firstly, there is a certain similarity in preferences across the three datasets, and secondly, the amount of AHP data may be insufficient to support the complete training of the reward model, as shown in Table 1. Consequently, the model’s preference learning is incomplete, which results in low test outcomes for AHP in Table 2.

On this observation, it can be noted that the HaF-mistral model, when fully trained using CA or Helpful datasets, performs worse on BS and Harmless compared to Baseline. However, when insufficiently trained using AHP dataset, its test results are better than the baseline. This might indicate that during the training process of the reward model, the learning of reward mapping precedes the learning of preferences. When the model is not fully trained, HAF’s advantage in learning speed enables it to outperform. Yet, once fully trained, the baseline’s weaker preference learning ability might allow it to exhibit some degree of cross-preference generalization. This hypothesis requires further validation in future work.

One easily overlooked result is that nearly all the test outcomes of the DPO model converge to approximately 50% in a highly exaggerated manner, indicating a complete loss of modeling capability for out-of-distribution data. This issue is likely related to its inherent nature as a language model: the generation process of language models exhibits strong stylistic tendencies, which, in turn, leads to a significantly higher preference for responses that align with its style (as reflected in the generation probabilities and the implicit reward values of the DPO model). Consequently, when the response distribution deviates from its stylistic norms (e.g., responses that are too short or too long, or use different vocabulary), the output probabilities become highly inaccurate. This indicates that the DPO model is not suitable for use as a conventional reward model.

5.2 Extrinsic Evaluation on Downstream Task

In assessing the practical applicability of reward models, intrinsic performances alone provide an incomplete picture of their efficacy. To comprehensively evaluate their utility in real-world applications, it is essential to examine how these models perform in downstream tasks that simulate practical scenarios.

This section aims to investigate the robustness and effectiveness of HaF model in such scenarios. Specifically, we explore its performance in two distinct downstream tasks: best-of-N sampling as a training-free response generation strategy (Stiennon et al., 2020; Gao et al., 2023; Jinnai et al., 2024), and RLHF as a training-dependent aligning methods.

5.2.1 Best-of-N

Refer to caption
Figure 3: Win rate of responses selected by the HAF model compared to the baseline model.

We demonstrate the reliability of our trained reward model through Best-of-N pick, in which the reward model should pick the best one (the response with the highest reward) from several responses sampled from the same language model. The backbone for the reward model and the sampling model are the same, 8 and 4 responses are provided to the Mistral-based reward model the Phi-2-based reward model respectively, because Phi-2 is more likely to generate the same responses. The prompts for comparisons and ranking are listed in Appendix E, which reference AlpacaEval (Li et al., 2023b).

We report two evaluation metrics. Win rate: We use GPT-4-turbo to directly compare the responses from HaF reward model and baseline and report the win rate (Jang et al., 2023). Consistency with GPT: we use GPT-3.5-turbo to rank the sampled responses and calculate the recall of the top-1 and top-2 responses.

Top-1(%) Top-2(%)
HaF Baseline HaF Baseline
Phi-2 33.77 26.68 58.30 49.47
Phi-2NoharmNoharm{}_{\mathrm{No\;harm}}start_FLOATSUBSCRIPT roman_No roman_harm end_FLOATSUBSCRIPT 37.21 28.97 64.33 53.41
Mistral 13.31 11.55 25.27 23.49
MistralNoharmNoharm{}_{\mathrm{No\;harm}}start_FLOATSUBSCRIPT roman_No roman_harm end_FLOATSUBSCRIPT 15.70 13.88 29.20 27.67
Table 4: Top-k recall for HaF and the baseline. There are 4 candidate responses for Phi-2 and 8 for Mistral. The results are averaged over the recall values from all five datasets. The subscript “No harm” indicates that the result in that row is averaged over the AHP, CA, and harmless datasets instead of all datasets.

As shown in Figure 3 and Table 4, HaF demonstrates significant advantages over the baseline reward model in selecting responses especially for Phi-2 model in terms of both evaluation metrics. It is important to note that the average performance of the baseline reward model is comparable to random selection, suggesting that it has poor sensitivity and cannot effectively distinguish between responses when the quality differences are minimal. In contrast, the reward model obtained using HaF demonstrates good discriminative ability. Considering that the model can only learn to distinguish harmful from non-harmful responses from the BS and Harmless datasets, and that the responses generated by Phi-2 and Mistral are mostly harmless, we also report the average results on the remaining three datasets. When the safety-related datasets are excluded, both HAF and baseline show an improvement in average performance. Due to space limitations, the detailed results are presented in the appendix in Table 10.

5.2.2 RLHF

We also test HaF in the regular RLHF process: we train two reward models with HaF and the baseline method and then use them to train the policy models with RLHF. After training, GPT-3.5-turbo is introduced to compare the generations from the two policy models.

We conduct experiments using the Mistral model along with the AHP, CA, and Helpful datasets to investigate the reward model’s capability in optimizing for comprehensive preferences. Phi-2 is not used here as it shows great unstability during training which may not exhibit any performance improvement. Setups for reward model training and PPO are listed in Appendix A.

#Win #Lose Win rates(%)
AHP 285 215 57.00
CA 346 154 69.20
Helpful 243 256 48.70
Table 5: Win rates for the policy model trained with HaF reward model by RLHF.

HaF demonstrates a significant advantage on the AHP and CA datasets, while showing slightly worse performance compared to the baseline on the Helpful dataset. This indicates that the HaF reward model provides more effective guidance for the policy model. Given the widespread application of RLHF-like methods, HaF shows promising potential for active use in language model alignment in the near future. However, due to the simple experimental setup and the inherent instability of RLHF at small scales, the effectiveness of the HAF method in language model alignment still requires extensive exploration.

6 Related Work

Reward model was proposed to modeling human language preferences (model that outputs preference values based on questions and answers) (Christiano et al., 2017), then the explosive growth of research on reward models (McKinney et al., 2023) and large language models (Wei et al., 2022; Park et al., 2023; Zheng et al., 2023) emerged after the popularity of ChatGPT.

From training to practical applications, an increasing number of studies have also featured the presence of quantifiable preferences(usually known as “reward”). For example, RLHF (Christiano et al., 2017; Stiennon et al., 2020) uses the PPO algorithm (Schulman et al., 2017) to maximize the reward of the policy model; RAFT (Dong et al., 2023) and RRHF (Yuan et al., 2023) remove substandard data by scoring the candidate responses with reward model; LLM-as-a-judge (Zheng et al., 2023) employs GPT-4 to score the text.

Therefore, how to construct a model offering explicit preference feedback has naturally become a focal point of much research. To train a precise and robust reward model, many studies start from training with human preference data, and many works in the data field are largely centered around this. (Touvron et al., 2023) and (Zhao et al., 2022) provided different methods for using ranking data; (Wang et al., 2024) explored ways of measuring the strength of the data; while concerning datasets themselves, (Azar et al., 2023), (Knox et al., 2022) and (Hong et al., 2022) analyzed the impact of data preference strength on training from theoretical or practical perspectives. In addition, similar to the RAG technique (Lewis et al., 2020) in large language models, many methods (Li et al., 2023a; Sun et al., 2023) using external tools or references have also emerged, injecting new vitality into the development of reward models.

Although many data-oriented methods have greatly enhanced the performance of reward models, the field of reward model optimization has been rarely explored. Currently, the training of reward models basically follows the process proposed by OpenAI (Christiano et al., 2017). It involves initializing the reward model using a finetuned model, then transforming the model’s predictions into probability values through the Bradley-Terry model, and optimizing these probabilities using cross-entropy loss. Considering the widespread practical applications of reward models, the attention given to their training paradigms does not match their importance.

7 Conclusion

In this paper, we extend and improve the training framework of the current reward model. We split the training mechanism of the reward model into two stages: aligning model preference and optimizing the reward layer. Through introducing an additional constraint of policy loss, our hybrid alignment framework supervises the internal preference model at the token level while simultaneously optimizing the mapping layer at the seqneuce level, significantly improving the training effectiveness. We theoretically verify the validity of our method and demonstrate its reliability through systematic experiments.

Our method allows for a consistent customization of the reward model. In the future, we will thoroughly explore the potential of the reward model and its variants across various tasks, and investigate whether the logistic distribution is the optimal prior for reward modeling.

Impact Statements

This paper presents work whose goal may benefit the training of large language models in the field of deep learning. Among the many possible consequences, we do not believe that there is a significant possibility of adverse effects on society.

Limitations

In this paper, we discuss the potential of enhancing the alignment process of reward models by incorporating policy constraints, where the policy loss functions similarly to a regularization loss, acting as an auxiliary function to guide model training. However, since DPO can be directly used to train an implicit reward model, replacing the reward model with a DPO model for downstream tasks can also be a feasible approach, while we do not explore methods for combining the outputs of the policy layer and the reward layer, which remains a direction for our future research.

References

Appendix A Experiments Setup

Our default setup is shown in Table 6.

setup value setup value setup value
lora rank 64 optimizer AdamW precision bf16
lora alpha 16 adam_beta1 0.9 max gradient norm 1.0
training steps 3200 adam_beta2 0.999 max sequence length 512
evaluation steps 0.025 weight_decay 0.0 global random seed 0
batch size 16 adam_epsilon 1e-5 framework PyTorch
Table 6: Default setup

To train the reward model, we use DPO Loss as the policy loss in HAF and set policy ratio α=0.2𝛼0.2\alpha=0.2italic_α = 0.2. The learning rate is 1.0×1051.0superscript1051.0\times 10^{-5}1.0 × 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT for Phi-2 and Mistral-lora-baseline, 3.0×1053.0superscript1053.0\times 10^{-5}3.0 × 10 start_POSTSUPERSCRIPT - 5 end_POSTSUPERSCRIPT for Mistral-lora-HAF. A single RTX A6000 with 48GB memory is used for training the reward model. The model used for testing is the checkpoint that achieves the highest reward on the validation set.

For PPO training in Section 5.2.2, we utilize two RTX A6000 GPUs for parallel training with a total batch size of 4. The maximum number of new tokens generated is set to 128, and the learning rate is 1e-6. The training is conducted over a maximum of 20,000 episodes. We employ score scaling and score normalization and clip the scores between -3 and 3. All other settings follow the implementation in the TRL library. The model used for testing is the checkpoint that achieves the highest reward on the validation set. The generation config includes top_p=0.8𝑡𝑜𝑝_𝑝0.8top\_p=0.8italic_t italic_o italic_p _ italic_p = 0.8, temperature=0.5𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒0.5temperature=0.5italic_t italic_e italic_m italic_p italic_e italic_r italic_a italic_t italic_u italic_r italic_e = 0.5, length_penalty=1.3𝑙𝑒𝑛𝑔𝑡_𝑝𝑒𝑛𝑎𝑙𝑡𝑦1.3length\_penalty=1.3italic_l italic_e italic_n italic_g italic_t italic_h _ italic_p italic_e italic_n italic_a italic_l italic_t italic_y = 1.3, repetition_penalty=1.2𝑟𝑒𝑝𝑒𝑡𝑖𝑡𝑖𝑜𝑛_𝑝𝑒𝑛𝑎𝑙𝑡𝑦1.2repetition\_penalty=1.2italic_r italic_e italic_p italic_e italic_t italic_i italic_t italic_i italic_o italic_n _ italic_p italic_e italic_n italic_a italic_l italic_t italic_y = 1.2, do_sample=True𝑑𝑜_𝑠𝑎𝑚𝑝𝑙𝑒𝑇𝑟𝑢𝑒do\_sample=Trueitalic_d italic_o _ italic_s italic_a italic_m italic_p italic_l italic_e = italic_T italic_r italic_u italic_e

Appendix B Discussions for Policy Loss Ratio

Refer to caption
Figure 4: Results for different policy ratios. “margin” is the average difference between a better and worse response’s rewards. A policy ratio of 0 equals to Baseline method.

Figure 4 reveals that incorporating even a mere 0.1x of policy loss can significantly impact the results. Using reward loss alone leads to slow training; to achieve the same loss value, the model with policy loss requires only a fraction of the time. However, this rapid training characteristic also accelerates overfitting, necessitating the use of early stopping strategies to halt training in time. When the policy loss ratio is negative, model performance deteriorates, and the variations in various metrics resemble those of the baseline. This indicates a correlation between the policy model and the reward model.

Appendix C Loss Functions

C.1 Deriving the Reward Loss Functions

In practice, there is no access to the ground truth reward of a response, so it is not applicable to solve the reward regression problem by directly optimizing the discrepancy between every predicted reward and the true reward. The Bradley-Terry model is introduced here to construct a solvable classification problem with one additional assumption – if one response is better than the other, then it wins with the probability of 100%. For a query x𝑥xitalic_x, a preferred response y𝑦yitalic_y and a dispreferred response ysuperscript𝑦y^{\prime}italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, the predicted winning probability is P(yy)=σ(𝒓(x,y)𝒓(x,y))Psucceeds𝑦superscript𝑦𝜎𝒓𝑥𝑦𝒓𝑥superscript𝑦\mathrm{P}(y\succ y^{\prime})=\sigma(\bm{r}(x,y)-\bm{r}(x,y^{\prime}))roman_P ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_σ ( bold_italic_r ( italic_x , italic_y ) - bold_italic_r ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ), and the ground truth P(yy)=σ(𝒓(x,y)𝒓(x,y))=1superscriptPsucceeds𝑦superscript𝑦𝜎superscript𝒓𝑥𝑦superscript𝒓𝑥superscript𝑦1\mathrm{P}^{*}(y\succ y^{\prime})=\sigma(\bm{r}^{*}(x,y)-\bm{r}^{*}(x,y^{% \prime}))=1roman_P start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = italic_σ ( bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_x , italic_y ) - bold_italic_r start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ) = 1, so the standard reward loss is essentially a cross-entropy loss of the predicted winning probability.

=absent\displaystyle\mathcal{L}=caligraphic_L = P(yy)logP(yy)superscriptPsucceeds𝑦superscript𝑦Psucceeds𝑦superscript𝑦\displaystyle-\mathrm{P}^{*}(y\succ y^{\prime})\log\mathrm{P}(y\succ y^{\prime})- roman_P start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) roman_log roman_P ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT )
P(yy)logP(yy)superscriptPsucceedssuperscript𝑦𝑦Psucceedssuperscript𝑦𝑦\displaystyle-\mathrm{P}^{*}(y^{\prime}\succ y)\log\mathrm{P}(y^{\prime}\succ y)- roman_P start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≻ italic_y ) roman_log roman_P ( italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≻ italic_y )
=\displaystyle== logσ(𝒓(x,y)𝒓(x,y))𝜎𝒓𝑥𝑦𝒓𝑥superscript𝑦\displaystyle-\log\sigma(\bm{r}(x,y)-\bm{r}(x,y^{\prime}))- roman_log italic_σ ( bold_italic_r ( italic_x , italic_y ) - bold_italic_r ( italic_x , italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) )

The optimal model FsuperscriptF\mathrm{F}^{*}roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT and ϕsuperscriptitalic-ϕ\mathrm{\phi}^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT are secretly hidden in the coefficient “1”.

C.2 DPO as the Policy Loss

The derivation for policy loss is the same as reward loss in their essence. The policy model can be treated as a reward model with sequence probabilities reflecting the rewards (Rafailov et al., 2023, 2024). reward(x,y)=π(x,y)/πref(x,y)𝑟𝑒𝑤𝑎𝑟𝑑𝑥𝑦𝜋𝑥𝑦subscript𝜋𝑟𝑒𝑓𝑥𝑦reward(x,y)=\pi(x,y)/\pi_{ref}(x,y)italic_r italic_e italic_w italic_a italic_r italic_d ( italic_x , italic_y ) = italic_π ( italic_x , italic_y ) / italic_π start_POSTSUBSCRIPT italic_r italic_e italic_f end_POSTSUBSCRIPT ( italic_x , italic_y ). With the Bradley-Terry model and the assumption of P(yy)=1Psucceeds𝑦superscript𝑦1\mathrm{P}(y\succ y^{\prime})=1roman_P ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 1, DPO is also a legal loss function.

From this perspective, the DPO loss and reward loss share the same assumption of P(yy)=1𝑃succeeds𝑦superscript𝑦1P(y\succ y^{\prime})=1italic_P ( italic_y ≻ italic_y start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 1. The reward model and the DPO-trained policy model are essentially doing the same task despite some formal differences (Rafailov et al., 2023, 2024). This may provide insight into why DPO is the most suitable among all policy losses.

Appendix D Mathematical Derivations

D.1 Inequality Scaling

minF,ϕ,K𝔼d𝒫[\displaystyle\mathop{\min}_{\mathrm{F,\phi,K}}\;\mathop{\mathbb{E}}_{d\sim% \mathcal{P}}[roman_min start_POSTSUBSCRIPT roman_F , italic_ϕ , roman_K end_POSTSUBSCRIPT blackboard_E start_POSTSUBSCRIPT italic_d ∼ caligraphic_P end_POSTSUBSCRIPT [ D1(Fϕ(d),Fϕ(d))subscriptD1Fitalic-ϕ𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle\mathrm{D}_{1}(\mathrm{F\circ\phi}(d),\mathrm{F^{*}\circ\phi^{*}}% (d))roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F ∘ italic_ϕ ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) )
+α\displaystyle+\alpha\cdot+ italic_α ⋅ D2(Kϕ(d),Kϕ(d))]\displaystyle\mathrm{D}_{2}(\mathrm{K\circ\phi}(d),\mathrm{K^{*}\circ\phi^{*}}% (d))]roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
minF=Fsϕ=ϕsK𝔼d𝒫[\displaystyle\leqslant\;\underset{\mathrm{\underset{K}{\underset{\phi=\phi_{s}% }{F=F_{s}}}}}{\min}\;\underset{d\sim\mathcal{P}}{\mathbb{E}}[⩽ start_UNDERACCENT underroman_K start_ARG start_UNDERACCENT italic_ϕ = italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT end_UNDERACCENT start_ARG roman_F = roman_F start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT end_ARG end_ARG end_UNDERACCENT start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ D1(Fϕ(d),Fϕ(d))subscriptD1Fitalic-ϕ𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle\mathrm{D}_{1}(\mathrm{F\circ\phi}(d),\mathrm{F^{*}\circ\phi^{*}}% (d))roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F ∘ italic_ϕ ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) )
+α\displaystyle+\alpha\cdot+ italic_α ⋅ 2(Kϕ(d),Kϕ(d))]\displaystyle\mathcal{L}_{2}(\mathrm{K\circ\phi}(d),\mathrm{K^{*}\circ\phi^{*}% }(d))]caligraphic_L start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
=minK𝔼d𝒫[\displaystyle=\;\underset{\mathrm{K}}{\min}\;\underset{d\sim\mathcal{P}}{% \mathbb{E}}[= underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ αD2(Kϕs(d),Kϕ(d))]\displaystyle\alpha\cdot\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{*% }\circ\phi^{*}}(d))]italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
+𝔼d𝒫similar-to𝑑𝒫𝔼\displaystyle+\underset{d\sim\mathcal{P}}{\mathbb{E}}+ start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [D1(Fsϕs(d),Fϕ(d))]delimited-[]subscriptD1subscriptFssubscriptitalic-ϕs𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle[\mathrm{D}_{1}(\mathrm{F_{s}\circ\phi_{s}}(d),\mathrm{F^{*}\circ% \phi^{*}}(d))][ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]

With the definition of ϕH,KH,FHsubscriptitalic-ϕ𝐻subscriptK𝐻subscriptF𝐻\phi_{H},\mathrm{K}_{H},\mathrm{F}_{H}italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT , roman_K start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT , roman_F start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT, we have:

𝔼d𝒫[D1(FHϕH(d),Fϕ(d))\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{1}(\mathrm{F_% {H}\circ\phi_{H}}(d),\mathrm{F^{*}\circ\phi^{*}}(d))start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) )
+αD2(KHϕH(d),Kϕ(d))]\displaystyle\qquad+\alpha\cdot\mathrm{D}_{2}(\mathrm{K_{H}\circ\phi_{H}}(d),% \mathrm{K^{*}\circ\phi^{*}}(d))]+ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
\displaystyle\leqslant 𝔼d𝒫[D1(Fsϕs(d),Fϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD1subscriptFssubscriptitalic-ϕs𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{1}(\mathrm{F_% {s}\circ\phi_{s}}(d),\mathrm{F^{*}\circ\phi^{*}}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
+minK𝔼d𝒫[αD2(Kϕs(d),Kϕ(d))]Ksimilar-to𝑑𝒫𝔼delimited-[]𝛼subscriptD2Ksubscriptitalic-ϕs𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\qquad+\underset{\mathrm{K}}{\min}\underset{d\sim\mathcal{P}}{% \mathbb{E}}[\alpha\cdot\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{*}% \circ\phi^{*}}(d))]+ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
\displaystyle\leqslant 𝔼d𝒫[D1(FHϕH(d),Fϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD1subscriptFHsubscriptitalic-ϕH𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{1}(\mathrm{F_% {H}\circ\phi_{H}}(d),\mathrm{F^{*}\circ\phi^{*}}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
+minK𝔼d𝒫[αD2(Kϕs(d),Kϕ(d))]Ksimilar-to𝑑𝒫𝔼delimited-[]𝛼subscriptD2Ksubscriptitalic-ϕs𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\qquad+\underset{\mathrm{K}}{\min}\underset{d\sim\mathcal{P}}{% \mathbb{E}}[\alpha\cdot\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{*}% \circ\phi^{*}}(d))]+ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]

In practical settings, “\leqslant”s do not hold at the same time (simultaneously optimizing two objectives is preferable to optimizing them sequentially). With the premise that the model is fully optimized with the hybrid alignment loss for any α(0.1,2)𝛼0.12\alpha\in(0.1,2)italic_α ∈ ( 0.1 , 2 ), which means both of the objectives have an impact on the final optimization result, namely ϕHϕssubscriptitalic-ϕ𝐻subscriptitalic-ϕ𝑠\phi_{H}\neq\phi_{s}italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ≠ italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT, there exists a little gap ϵ>0italic-ϵ0\epsilon>0italic_ϵ > 0 such that

𝔼d𝒫[D1(FHϕH(d),Fϕ(d))\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{1}(\mathrm{F_% {H}\circ\phi_{H}}(d),\mathrm{F^{*}\circ\phi^{*}}(d))start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) )
+αD2(KHϕH(d),Kϕ(d))]\displaystyle\qquad+\alpha\cdot\mathrm{D}_{2}(\mathrm{K_{H}\circ\phi_{H}}(d),% \mathrm{K^{*}\circ\phi^{*}}(d))]+ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
\displaystyle\leqslant 𝔼d𝒫[D1(FHϕH(d),Fϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD1subscriptFHsubscriptitalic-ϕH𝑑superscriptFsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{1}(\mathrm{F_% {H}\circ\phi_{H}}(d),\mathrm{F^{*}\circ\phi^{*}}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( roman_F start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_F start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
+minK𝔼d𝒫[αD2(Kϕs(d),Kϕ(d))]ϵKsimilar-to𝑑𝒫𝔼delimited-[]𝛼subscriptD2Ksubscriptitalic-ϕs𝑑superscriptKsuperscriptitalic-ϕ𝑑italic-ϵ\displaystyle+\underset{\mathrm{K}}{\min}\underset{d\sim\mathcal{P}}{\mathbb{E% }}[\alpha\cdot\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{*}\circ\phi% ^{*}}(d))]-\epsilon+ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ italic_α ⋅ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] - italic_ϵ

Then, there goes

𝔼d𝒫[D2(KHϕH(d),Kϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD2subscriptKHsubscriptitalic-ϕH𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\quad\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{2}(% \mathrm{K_{H}\circ\phi_{H}}(d),\mathrm{K^{*}\circ\phi^{*}}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ]
minK𝔼d𝒫[D2(Kϕs(d),Kϕ(d))]ϵαabsentKsimilar-to𝑑𝒫𝔼delimited-[]subscriptD2Ksubscriptitalic-ϕs𝑑superscriptKsuperscriptitalic-ϕ𝑑italic-ϵ𝛼\displaystyle\leqslant\underset{\mathrm{K}}{\min}\underset{d\sim\mathcal{P}}{% \mathbb{E}}[\mathrm{D}_{2}(\mathrm{K\circ\phi_{s}}(d),\mathrm{K^{*}\circ\phi^{% *}}(d))]-\frac{\epsilon}{\alpha}\phantom{11111111}⩽ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ start_POSTSUBSCRIPT roman_s end_POSTSUBSCRIPT ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] - divide start_ARG italic_ϵ end_ARG start_ARG italic_α end_ARG

Here we get Prop. 1.

D.2 Derive the Final Inequality with the 3 Properties

Convergence:

Since the trained model KϕKitalic-ϕ\mathrm{K}\circ\phiroman_K ∘ italic_ϕ is close to KϕsuperscriptKsuperscriptitalic-ϕ\mathrm{K}^{*}\circ\phi^{*}roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT, we can therefore linearize D2subscriptD2\mathrm{D}_{2}roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT with a certain positive number k𝑘kitalic_k:

𝔼d𝒫[D2(Kϕ(d),Kϕ(d))]similar-to𝑑𝒫𝔼delimited-[]subscriptD2Kitalic-ϕ𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}[\mathrm{D}_{2}(\mathrm{K}% \circ\phi(d),\mathrm{K}^{*}\circ\phi^{*}(d))]start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ roman_D start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( roman_K ∘ italic_ϕ ( italic_d ) , roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) ) ] (7)
=\displaystyle== 𝔼d𝒫k|Kϕ(d)Kϕ(d)|similar-to𝑑𝒫𝔼𝑘Kitalic-ϕ𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}k|\mathrm{K}\circ\phi(d)-% \mathrm{K}^{*}\circ\phi^{*}(d)|start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG italic_k | roman_K ∘ italic_ϕ ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) |

Separating little disturbance:

𝔼d𝒫|Nϕ(d)|<δsimilar-to𝑑𝒫𝔼Nitalic-ϕ𝑑𝛿\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{N}\circ\phi(d)|<\deltastart_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_N ∘ italic_ϕ ( italic_d ) | < italic_δ (8)

holds for any fully-optimized model KϕKitalic-ϕ\mathrm{K}\circ\phiroman_K ∘ italic_ϕ with NKKNKsuperscriptK\mathrm{N}\coloneqq\mathrm{K}-\mathrm{K}^{*}roman_N ≔ roman_K - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT. Given that the trained model and its preferences closely approximate those of the true model and preferences, we are able to scale down the error terms by a small margin.

Gradient scaling:

Intuitively, the optimal model is unique, so 𝔼d𝒫|Kϕ(d)Kϕ(d)|>0similar-to𝑑𝒫𝔼superscriptKitalic-ϕ𝑑superscriptKsuperscriptitalic-ϕ𝑑0\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{K}^{*}\circ\phi(d)-\mathrm{K}^% {*}\circ\phi^{*}(d)|>0start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | > 0. Here we make a slightly stronger assumption that KsuperscriptK\mathrm{K}^{*}roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT is locally gmaxsubscript𝑔𝑚𝑎𝑥g_{max}italic_g start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT-Lipschitz continuous and has the lower bound gminsubscript𝑔𝑚𝑖𝑛g_{min}italic_g start_POSTSUBSCRIPT italic_m italic_i italic_n end_POSTSUBSCRIPT, which means for any ϕitalic-ϕ\phiitalic_ϕ that is close to ϕsuperscriptitalic-ϕ\phi^{*}italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT, there exists

gmin𝔼d𝒫ϕ(d)ϕ(d)subscript𝑔𝑚𝑖𝑛similar-to𝑑𝒫𝔼normitalic-ϕ𝑑superscriptitalic-ϕ𝑑\displaystyle g_{min}\underset{d\sim\mathcal{P}}{\mathbb{E}}||\phi(d)-\phi^{*}% (d)||italic_g start_POSTSUBSCRIPT italic_m italic_i italic_n end_POSTSUBSCRIPT start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | | italic_ϕ ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | | (9)
<\displaystyle<< 𝔼d𝒫|Kϕ(d)Kϕ(d)|similar-to𝑑𝒫𝔼superscriptKitalic-ϕ𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{K}^{*}\circ\phi(d% )-\mathrm{K}^{*}\circ\phi^{*}(d)|start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) |
<\displaystyle<< gmax𝔼d𝒫ϕ(d)ϕ(d)subscript𝑔𝑚𝑎𝑥similar-to𝑑𝒫𝔼normitalic-ϕ𝑑superscriptitalic-ϕ𝑑\displaystyle g_{max}\underset{d\sim\mathcal{P}}{\mathbb{E}}||\phi(d)-\phi^{*}% (d)||italic_g start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | | italic_ϕ ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | |

Based on these three properties, we can derive the result from Prop. 1.

Prop. 1
Eq.7𝔼d𝒫|KHϕH(d)Kϕ(d)|superscriptEq.7absentsimilar-to𝑑𝒫𝔼subscriptKHsubscriptitalic-ϕ𝐻𝑑superscriptKsuperscriptitalic-ϕ𝑑\displaystyle\stackrel{{\scriptstyle\text{Eq.}~{}\ref{convergence}}}{{% \Longrightarrow}}\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{K_{H}}\circ% \phi_{H}(d)-\mathrm{K}^{*}\circ\phi^{*}(d)|start_RELOP SUPERSCRIPTOP start_ARG ⟹ end_ARG start_ARG Eq. end_ARG end_RELOP start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K start_POSTSUBSCRIPT roman_H end_POSTSUBSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) |
minK𝔼d𝒫|Kϕs(d)Kϕ(d)|ϵαkabsentKsimilar-to𝑑𝒫𝔼Ksubscriptitalic-ϕ𝑠𝑑superscriptKsuperscriptitalic-ϕ𝑑italic-ϵ𝛼𝑘\displaystyle\quad\leqslant\underset{\mathrm{K}}{\min}\underset{d\sim\mathcal{% P}}{\mathbb{E}}|\mathrm{K}\circ\phi_{s}(d)-\mathrm{K}^{*}\circ\phi^{*}(d)|-% \frac{\epsilon}{\alpha\cdot k}⩽ underroman_K start_ARG roman_min end_ARG start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K ∘ italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | - divide start_ARG italic_ϵ end_ARG start_ARG italic_α ⋅ italic_k end_ARG
Ineq.8𝔼d𝒫|KϕH(d)Kϕ(d)|δsuperscriptIneq.8absentsimilar-to𝑑𝒫𝔼superscriptKsubscriptitalic-ϕ𝐻𝑑superscriptKsuperscriptitalic-ϕ𝑑𝛿\displaystyle\stackrel{{\scriptstyle\text{Ineq.}~{}\ref{disturbance}}}{{% \Longrightarrow}}\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{K^{*}}\circ% \phi_{H}(d)-\mathrm{K}^{*}\circ\phi^{*}(d)|-\deltastart_RELOP SUPERSCRIPTOP start_ARG ⟹ end_ARG start_ARG Ineq. end_ARG end_RELOP start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | - italic_δ
<𝔼d𝒫|Kϕs(d)Kϕ(d)|+δϵαkbrasimilar-to𝑑𝒫𝔼superscriptKsubscriptitalic-ϕ𝑠𝑑conditionalsuperscriptKsuperscriptitalic-ϕ𝑑𝛿italic-ϵ𝛼𝑘\displaystyle\quad<\underset{d\sim\mathcal{P}}{\mathbb{E}}|\mathrm{K^{*}}\circ% \phi_{s}(d)-\mathrm{K}^{*}\circ\phi^{*}(d)|+\delta-\frac{\epsilon}{\alpha\cdot k}< start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - roman_K start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∘ italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | + italic_δ - divide start_ARG italic_ϵ end_ARG start_ARG italic_α ⋅ italic_k end_ARG
Ineq.9superscriptIneq.9\displaystyle\stackrel{{\scriptstyle\text{Ineq.}~{}\ref{gradient}}}{{% \Longrightarrow}}start_RELOP SUPERSCRIPTOP start_ARG ⟹ end_ARG start_ARG Ineq. end_ARG end_RELOP
gmin𝔼d𝒫[ϕH(d)ϕ(d)ϕs(d)ϕ(d)]subscript𝑔𝑚𝑖𝑛similar-to𝑑𝒫𝔼delimited-[]normsubscriptitalic-ϕ𝐻𝑑superscriptitalic-ϕ𝑑normsubscriptitalic-ϕ𝑠𝑑superscriptitalic-ϕ𝑑\displaystyle\;g_{min}\underset{d\sim\mathcal{P}}{\mathbb{E}}[||\phi_{H}(d)-% \phi^{*}(d)||-||\phi_{s}(d)-\phi^{*}(d)||]italic_g start_POSTSUBSCRIPT italic_m italic_i italic_n end_POSTSUBSCRIPT start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG [ | | italic_ϕ start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | | - | | italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | | ]
<(gmaxgmin)𝔼d𝒫ϕs(d)ϕ(d)absentsubscript𝑔𝑚𝑎𝑥subscript𝑔𝑚𝑖𝑛similar-to𝑑𝒫𝔼normsubscriptitalic-ϕ𝑠𝑑superscriptitalic-ϕ𝑑\displaystyle\,<(g_{max}-g_{min})\underset{d\sim\mathcal{P}}{\mathbb{E}}||\phi% _{s}(d)-\phi^{*}(d)||< ( italic_g start_POSTSUBSCRIPT italic_m italic_a italic_x end_POSTSUBSCRIPT - italic_g start_POSTSUBSCRIPT italic_m italic_i italic_n end_POSTSUBSCRIPT ) start_UNDERACCENT italic_d ∼ caligraphic_P end_UNDERACCENT start_ARG blackboard_E end_ARG | | italic_ϕ start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT ( italic_d ) - italic_ϕ start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( italic_d ) | |
+2δϵαk2𝛿italic-ϵ𝛼𝑘\displaystyle\qquad\qquad\qquad\qquad\qquad\qquad\qquad+2\delta-\frac{\epsilon% }{\alpha\cdot k}+ 2 italic_δ - divide start_ARG italic_ϵ end_ARG start_ARG italic_α ⋅ italic_k end_ARG

which is Proposition 2.

Appendix E GPT Judgement

Comparing two responses

The prompt we used for judgement is listed in Table 8. The sentence between “<SYSTEM PROMPT>” is the system prompt, and the others are the user prompt. “{question}”, “{response 1}”, “{response 2}” will be replaced with the actual query or responses respectively. As GPT does not exhibit a strong “positional bias” (Wang et al., 2023), so we just randomly interchange the order of the two responses rather than prompting twice with the responses swapped.

Ranking responses

Table 7 shows the consumption approximation for getting top-1, top-2 responses and the complete order out of 4/8 responses. We consider that performing a single sorting operation on eight responses with the model may result in a loss of precision. Besides, while binary comparisons exhibit high accuracy, repeated binary comparisons inevitably lead to cumulative errors and erroneous outcomes. Therefore, whether from a cost or accuracy standpoint, it is not a favorable option. In practice, we obtain the top 2 responses by ranking 4 responses with GPT-3.5-turbo at once. For 8 candidate responses, we first evenly divide them into two groups and use GPT to rank the responses of each group, then we rank the two sets of the top 2 responses to get the top 2 responses among 8 candidates.

Refer to caption
Figure 5: Three times of interactions with GPT to get top-2 responses

The prompt for ranking four responses is shown in Table 9. GPT’s answer will be parsed in JSON format.

Top-1 Top-2 Complete sort
# responses 4 8 4 8 4 8
binary comparison 6 3×2subscript632\textbf{6}_{\,3\times 2}6 start_POSTSUBSCRIPT 3 × 2 end_POSTSUBSCRIPT 14 7×2subscript1472\textbf{14}_{\,7\times 2}14 start_POSTSUBSCRIPT 7 × 2 end_POSTSUBSCRIPT 8 4×2subscript842\textbf{8}_{\,4\times 2}8 start_POSTSUBSCRIPT 4 × 2 end_POSTSUBSCRIPT 20 10×2subscript20102\textbf{20}_{\,10\times 2}20 start_POSTSUBSCRIPT 10 × 2 end_POSTSUBSCRIPT 10 5×2subscript1052\textbf{10}_{\,5\times 2}10 start_POSTSUBSCRIPT 5 × 2 end_POSTSUBSCRIPT 32 16×2subscript32162\textbf{32}_{\,16\times 2}32 start_POSTSUBSCRIPT 16 × 2 end_POSTSUBSCRIPT
rank 4 responses 4 1×4subscript414\textbf{4}_{\,1\times 4}4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 12 3×4subscript1234\textbf{12}_{\,3\times 4}12 start_POSTSUBSCRIPT 3 × 4 end_POSTSUBSCRIPT 4 1×4subscript414\textbf{4}_{\,1\times 4}4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 123×4subscript1234\textbf{12}_{\,\phantom{1}3\times 4}12 start_POSTSUBSCRIPT 3 × 4 end_POSTSUBSCRIPT 14 1×4subscript1414\textbf{\phantom{1}4}_{\,1\times 4}bold_1 4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 205×4subscript2054\textbf{20}_{\,\phantom{1}5\times 4}20 start_POSTSUBSCRIPT 5 × 4 end_POSTSUBSCRIPT
rank 8 responses 4 1×4subscript414\textbf{4}_{\,1\times 4}4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 18 1×8subscript1818\textbf{\phantom{1}8}_{\,1\times 8}bold_1 8 start_POSTSUBSCRIPT 1 × 8 end_POSTSUBSCRIPT 4 1×4subscript414\textbf{4}_{\,1\times 4}4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 181×8subscript1818\textbf{\phantom{1}8}_{\,\phantom{1}1\times 8}bold_1 8 start_POSTSUBSCRIPT 1 × 8 end_POSTSUBSCRIPT 14 1×4subscript1414\textbf{\phantom{1}4}_{\,1\times 4}bold_1 4 start_POSTSUBSCRIPT 1 × 4 end_POSTSUBSCRIPT 181×8subscript1818\textbf{\phantom{1}8}_{\,\phantom{1}1\times 8}bold_1 8 start_POSTSUBSCRIPT 1 × 8 end_POSTSUBSCRIPT
Table 7: Approximation for resources consumption. The first column is three different ways of interacting with GPT. The first row is the target response(s) and the second row is the number of candidate responses. “a×b𝑎𝑏a\times bitalic_a × italic_b” means we should engage with GPT-3.5 a total of a𝑎aitalic_a times, with each interaction requiring an input of b𝑏bitalic_b responses. For example, “6 3×2subscript632\textbf{6}_{\,3\times 2}6 start_POSTSUBSCRIPT 3 × 2 end_POSTSUBSCRIPT” means when using binary comparison, to get the top-1 response among 4 candidate responses, we need 3 turns of interactions with each turn requiring an input of 2 responses, hence our expenditure amounts to approximately 6 units
Prompt for comparing two responses. <SYSTEM PROMPT>You are a helpful instruction-following assistant that prints the best model by selecting the best outputs for a given instruction.<SYSTEM PROMPT> Select the output (a) or (b) that best matches the given instruction. Choose your preferred output, which can be subjective. Your answer should ONLY contain: Output (a) or Output (b). Here’s an example: # Example: ## Instruction: Give a description of the following job: "ophthalmologist" ## Output (a): An ophthalmologist is a medical doctor who pokes and prods at your eyes while asking you to read letters from a chart. ## Output (b): An ophthalmologist is a medical doctor who specializes in the diagnosis and treatment of eye diseases and conditions. ## Which is best, Output (a) or Output (b)? Output (b) Here the answer is Output (b) because it provides a comprehensive and accurate description of the job of an ophthalmologist. In contrast, output (a) is more of a joke. # Task: Now is the real task, do not explain your answer, just say Output (a) or Output (b). ## Instruction: {question} ## Output (a): {response 1} ## Output (b): {response 2} ## Which is best, Output (a) or Output (b)?
Table 8: We use 1-shot for response comparison.
Prompt for ranking four responses. <SYSTEM PROMPT>You are a helpful assistant, that ranks models by the quality of their answers<SYSTEM PROMPT> I want you to create a leaderboard of different models. To do so, I will give you the instructions (prompts) given to the models, and the responses of four models. Please rank the models based on which responses would be preferred by humans. All inputs and outputs should be python dictionaries. Here is the prompt: {   "instruction": {question}, } Here are the outputs of the models: [   {     "model": "model_1",     "answer": {output_1}   },   {     "model": "model_2",     "answer": {output_2}   },   {     "model": "model_3",     "answer": {output_3}   },   {     "model": "model_4",     "answer": {output_4}   } ] Now please rank the models by the quality of their answers, so that the model with rank 1 has the best output. Then return a list of the model names and ranks, i.e., produce the following output: [   {"model": "model_1", "rank": <model-rank>},   {"model": "model_2", "rank": <model-rank>},   {"model": "model_3", "rank": <model-rank>},   {"model": "model_4", "rank": <model-rank>} ] Your response must be a valid Python dictionary and should contain nothing else because we will directly execute it in Python. Please provide the ranking that the majority of humans would give.
Table 9: We rank four responses in order of quality in a single interaction.
AHP BS CA Helpful Harmless
Top-1 Top-2 Top-1 Top-2 Top-1 Top-2 Top-1 Top-2 Top-1 Top-2
Phi-2HAF 28.68 52.51 32.69 53.35 37.52 66.21 45.44 74.26 24.52 45.15
Phi-2baseline 15.46 34.64 29.28 49.72 27.83 51.68 43.62 73.92 17.22 37.29
MistralHAF 17.42 31.22 9.94 17.70 16.00 28.81 13.68 27.57 9.50 21.07
Mistralbaseline 10.97 23.87 7.45 17.08 17.99 32.78 12.68 26.36 8.68 17.36
Table 10: Top-k recall for best-of-N sampling on each dataset. The results are presented as the percentage of the chosen responses included in top-k responses.