Relative Preference Optimization: Enhancing LLM Alignment through Contrasting Responses across Identical and Diverse Prompts

## Abstract

Abstract In the field of large language models (LLMs), aligning models with the diverse preferences of users is a critical challenge. Direct Preference Optimization (DPO) has played a key role in this area. It works by using pairs of preferences derived from the same prompts, and it functions without needing an additional reward model. However, DPO does not fully reflect the complex nature of human learning, which often involves understanding contrasting responses to not only identical but also similar questions. To overcome this shortfall, we propose Relative Preference Optimization (RPO). RPO is designed to discern between more and less preferred responses derived from both identical and related prompts. It introduces a contrastive weighting mechanism, enabling the tuning of LLMs using a broader range of preference data, including both paired and unpaired sets. This approach expands the learning capabilities of the model, allowing it to leverage insights from a more varied set of prompts. Through empirical tests, including dialogue and summarization tasks, and evaluations using the AlpacaEval2.0 leaderboard, RPO has demonstrated a superior ability to align LLMs with user preferences and to improve their adaptability during the training process. Our code can be viewed at https://github.com/yinyueqin/relative-preference-optimization .

## 1 Introduction

Large language models (LLMs) such as ChatGPT (OpenAI, ) and LLaMA (Touvron et al., ) have revolutionized AI, demonstrating remarkable capabilities in natural language processing, logical reasoning, and programming (Pan et al., ; Tian et al., ). Their proficiency in zero-shot and few-shot learning is attributed to training on extensive, unsupervised datasets. However, the diverse nature of these datasets can result in alignment challenges, leading to outputs that may not consistently align with specific human values, particularly in nuanced contexts (Agrawal et al., ; Shi et al., ; Liang et al., ; Sheng et al., ; Kadavath et al., ; Srivastava et al., ; Thoppilan et al., ; Bubeck et al., ).
The Direct Preference Optimization (DPO) method fine-tunes the language model’s policy to align more closely with human preferences, thereby eliminating the need for a separate reward model, a staple in traditional Reinforcement Learning from Human Feedback (RLHF) (Schulman et al., ). Central to DPO is the utilization of pairwise preferences, with preferred and dispreferred responses identified for each prompt. This forms the foundation for effectively optimizing preferences. However, training a model to learn from an individual preference pair for each example may not fully capture the complexity of human learning. Human cognition often involves interpreting divergent responses, not only to identical questions but also to similar ones, highlighting the multifaceted nature of comprehension and preference formation (Dahlin et al., ).
Moreover, obtaining pairwise preference data can pose challenges and incur substantial costs, especially in sensitive domains such as healthcare and personal services, where careful attention to ethical considerations is essential (Murtaza et al., ).

Figure: Figure 1: An example illustrates how DPO and RPO utilize contrastive responses with human preferences to achieve model alignment.
Refer to caption: x1.png

Our inspiration draws from the human learning process, where valuable insights often arise from the comparison of successful examples and relevant failures (Dahlin et al., ). To emulate this, we introduce Relative Preference Optimization (RPO). This approach involves analyzing prompt similarities at the semantic level within each mini-batch, allowing us to classify pairs as either highly related or unrelated. We construct a contrast matrix that instructs the model to distinguish between preferred and dispreferred responses, applicable to both identical and semantically related prompts. We have developed three weighting strategies to recalibrate the comparison of each contrastive pair. Our findings reveal that reweighting based on prompt similarities significantly enriches model alignment with human preferences, offering a more nuanced understanding. Furthermore, RPO inherently excels in handling non-pairwise preference data by considering semantically related contrastive pairs.

As illustrated in Figure 1, we are interested in the question “Explain the concept of photosynthesis.” DPO applies penalties for incorrect responses and rewards for precise responses generated for the specific prompt. Conversely, our method RPO emphasizes the semantic connections between various prompts. For instance, the prompt “Describe the importance of sunlight in plant growth” is conceptually similar, and its responses might intersect with those of the initial question. Under RPO, if an answer is less preferred for the second prompt, it is also treated as less suitable for the first prompt. Thus, RPO penalizes both $y_{l,1}$ and $y_{l,2}$ while approving $y_{w,1}$. It is crucial to note that not all prompts are semantically related enough to form effective contrastive pairs. RPO incorporates a reweighting mechanism, whereby unrelated prompts are given less emphasis during training. RPO expands the learning horizon of the model, empowering it to leverage insights from a broader range of prompts, mirroring the human learning process more closely.

We empirically evaluate RPO on three LLMs, LLaMA2-7/13B and Mistral-7B. We compare RPO with SoTA human preference alignment methods, and
RPO significantly outperforms the baselines on typical dialogue and summarization tasks and evaluations on the AlpacaEval2.0 leaderboard.
The core contributions of RPO are summarized as follows:

- •
Innovative contrastive preference learning strategy: RPO enriches the landscape of preference optimization with novel contrastive learning techniques.
- •
Adaptability across varied contexts: Exhibiting exceptional adaptability, RPO is adept across a multitude of scenarios, whether or not explicit preference pairs are present, confirming its utility as a versatile tool in language model applications.
- •
Enhanced performance in critical language tasks: Demonstrating superiority over established methods like DPO, IPO, and KTO, the proposed RPO excels in key language processing tasks, including text summarization and dialogue generation, showcasing its improved alignment with human preferences.

## 2 Related Work

The field of large language models (LLMs) has made notable strides in aligning these models with human preferences (Chung et al., ; Schulman et al., ; Zhao et al., ; Rafailov et al., ; Azar et al., ; Ethayarajh et al., ; Cheng et al., ; Pal et al., ), driven by innovative fine-tuning methodologies. In this exploration, we discuss several works closely related to our research.

### 2.1 Reinforcement Learning Fine-Tuning (RLHF)

RLHF builds upon the foundation of SFT, employing RL to better align the model with human preferences (Ouyang et al., ). The initial phase of RLHF involves learning a reward model from human preference data. This process typically utilizes the Bradley-Terry model (Bradley and Terry, ), which assesses the reward $r^{*}(y|x)$ for generating a specific response $y$ to a prompt $x$. The Bradley-Terry model determines the preference probability as follows:

$$ $\begin{split}p(y_{w}\succ y_{l}|x)=\frac{\exp(r^{*}(y_{w}|x))}{\exp(r^{*}(y_{w }|x))+\exp(r^{*}(y_{l}|x))}=\sigma(r^{*}(y_{w}|x)-r^{*}(y_{l}|x)),\end{split}$ (1) $$

where $\sigma(\cdot)$ is the sigmoid function, and $r^{*}(y_{w}|x)$ and $r^{*}(y_{l}|x)$ represent the estimated rewards for the preferred and less preferred response, respectively, given prompt $x$. The loss function for the reward model, parameterized as $r_{\phi}$, is derived from a dataset $D$ of preference pairs:

$$ $L_{R}(\phi,D)=-\mathbb{E}_{(x,y_{w},y_{l})\sim D}[\log\sigma(r_{\phi}(x,y_{w}) -r_{\phi}(x,y_{l}))].$ (2) $$

The next phase is the RL fine-tuning process that seeks to optimize the policy $\pi_{\theta}$ based on the trained reward model. The objective is to maximize the expected reward, keeping the policy $\pi_{\theta}$ closely aligned with a reference model $\pi_{\text{ref}}$, usually derived from the SFT model. This optimization integrates KL-regularization to mitigate overfitting and preserve response diversity:

$$ $\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)}[r_{\phi}(x,y)]- \beta\mathrm{KL}[\pi_{\theta}(y|x)||\pi_{\text{ref}}(y|x)],$ $$

where $\beta$ is a scaling parameter. The PPO algorithm (Schulman et al., ) is employed to iteratively update $\pi_{\theta}$ by estimating gradients and collecting new data from the current policy and reward model. A notable challenge in RLHF is managing the discrete nature of language generation, which complicates gradient back-propagation from the reward function to the policy.

### 2.2 Direct Preference Optimization (DPO)

DPO (Rafailov et al., ) offers an efficient approach by directly aligning a language model with human preferences, thus eliminating the need for a separate reward model. Utilizing direct human feedback, DPO refines the policy $\pi_{\theta}$ to better match nuanced human preferences. The objective of DPO is formulated as the following pairwise loss:

$$ $L_{DPO}(\pi_{\theta};\pi_{ref})=-\mathbb{E}_{(x,y_{w},y_{l})\sim D}\left[\log \sigma(\beta\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{ref}(y_{w}|x)}-\beta\log \frac{\pi_{\theta}(y_{l}|x)}{\pi_{ref}(y_{l}|x)})\right],$ (3) $$

where $\beta$ is a scaling factor. DPO derives its reward function from the relationship between the policy $\pi_{\theta}$ and the reference model $\pi_{ref}$, with the inclusion of a partition function $Z(x)$ that normalizes the reward:

$$ $\begin{split}r(x,y)=\beta\log\frac{\pi_{\theta}(y|x)}{\pi_{ref}(y|x)}+\beta \log Z(x).\end{split}$ (4) $$

DPO’s primary benefit lies in its stable training process, providing a more direct means of aligning models with human preferences. However, DPO’s applicability is somewhat limited as it strictly defines its loss function based on the reward difference between chosen and rejected responses originating from the same prompt.

### 2.3 Identity Preference Optimization (IPO)

Identity Preference Optimization (IPO) (Azar et al., ) addresses the overfitting challenge within the DPO framework. IPO introduces a regularization term into the DPO’s loss function to maintain a balance between optimizing for human preferences and generalizing beyond the training data. The IPO loss function is expressed as:

$$ $L_{IPO}(\theta,y_{w},y_{l})=\left(\left(\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{ \text{ref}}(y_{w}|x)}-\log\frac{\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(y_{l}| x)}\right)-\frac{1}{2\beta}\right)^{2},$ (5) $$

where $\beta$ serves as a regularization parameter. IPO enhances the training process by ensuring a more balanced response selection, contributing to the robustness of preference-based language models.

### 2.4 Kahneman-Tversky Optimization (KTO)

Kahneman-Tversky Optimization (KTO) (Ethayarajh et al., ) diverges from the preference likelihood maximization used in DPO. Instead, KTO focuses on maximizing the utility of model outputs, informed by the human value function derived from Kahneman-Tversky’s prospect theory. This adaptation to language models allows KTO to operate without the necessity of preference pairs, thereby streamlining data requirements. The KTO loss function is formalized as:

$$ $L_{KTO}(\pi_{\theta},\pi_{ref})=\mathbb{E}_{x,y\sim D}[w(y)(1-h(x,y;\beta))],$ (6) $$

where

$$ $h(x,y;\beta)\!=\!\begin{cases}\sigma(g(x,y;\beta))&\!\text{if }y\text{ is desirable given }x\\ \sigma(-g(x,y;\beta))&\!\text{if }y\text{ is undesirable given }x\end{cases}$ (7) $$

$$ $g(x,y;\beta)=\beta\log\frac{\pi_{\theta}(y|x)}{\pi_{\text{ref}}(y|x)}-\mathbb{ E}_{x^{\prime}\sim D}\left[\beta\text{KL}(\pi_{\theta}\|\pi_{\text{ref}}) \right].$ (8) $$

The function $w(y)$ represents the weighting factor applied to the KTO loss function. By default, $w(y)=1$. KTO operates in unpaired data scenarios by independently processing chosen and rejected samples. As a concurrent work, our approach employs alternative mechanisms to ensure its applicability in contexts involving unpaired data.

## 3 Relative Preference Optimization

The traditional DPO framework aligns language model outputs with human preferences using pairwise data, where each pair is composed of a preferred (win) and dispreferred (lose) sample for the same prompt. However, this approach is limited to situations where such pairwise preference data is accessible, failing to exploit the valuable comparative insights that could be derived from contrasting diverse samples across a range of prompts.
In response, our RPO framework encompasses a wider array of preference data, including non-paired samples. This development not only improves the use of existing preference data but also facilitates model training in complex scenarios where pair-wise data is not readily obtainable.
More specifically, RPO integrates preference pairs derived from prompts that are semantically related but not identical,
as shown in Figure 1. Through dynamic calculation of relative reward weights based on prompt similarities, our method enhances the model’s ability to learn from a wider array of human feedback, resulting in better preference alignment.

### 3.1 Contrast Matrix Construction

In RPO, the contrast matrix is a pivotal component that facilitates the comparison between win and lose responses to derive meaningful insights for model training. As shown in Figure 2, the construction of this matrix varies depending on whether the available data is paired or unpaired, allowing for flexibility in training dynamics.

Paired Data Scenario. In situations where each win response is associated with a corresponding lose response from the same prompt, the contrast matrix is an $M\times M$ square matrix, where $M$ represents the total count of unique prompts from a specific mini-batch within the dataset. Each element $c_{ij}$ within this matrix represents the contrastive score between the win response of the $i^{th}$ prompt and the lose response of the $j^{th}$ prompt. For diagonal elements where $i=j$, the score reflects the direct comparison within the same prompt, while off-diagonal elements represent the relative reward differences across distinct prompts.
In this context, DPO is limited to using only the diagonal terms of the contrast matrix, while RPO takes into account all pairings within the matrix, encompassing a broader range of preference comparisons.

Figure: Figure 2: DPO requires paired preference data derived from identical prompts. RPO can utilize preference data from either the same or different prompts for constructing contrastive samples. Here, $y_{w}$ represents win responses, and $y_{l}$ denotes lose responses.
Refer to caption: x2.png

Unpaired Data Scenario.
In cases where the dataset contains unpaired win and lose responses, the contrast matrix transforms into an $M\times N$ rectangular structure. Within this matrix, $M$ and $N$ respectively represent the number of unique win and lose samples in a batch of the dataset.
Each element $c_{ij}$ in this matrix now indicates the contrastive score between the $i^{th}$ win response and the $j^{th}$ lose response, without the constraint of originating from the same prompt. This allows for a more extensive range of comparisons, as any win samples can be contrasted with any lose samples, harnessing the thematic connections within the dataset to enrich the model’s preference learning.

For each win response $y_{w,i}$ and lose response $y_{l,j}$, the contrastive score $s_{ij}$ is computed as the difference in rewards associated with each response, defined by the following equations:

$$ $s_{ij}=r_{w,i}-r_{l,j},~{}~{}\begin{cases}r_{w,i}=\beta\log\frac{\pi_{\theta}( y_{w,i}|x_{i})}{\pi_{ref}(y_{w,i}|x_{i})}+\beta\log Z(x_{i}),\\ r_{l,j}=\beta\log\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y_{l,j}|x_{j})}+ \beta\log Z(x_{j}),\end{cases}$ (9) $$

where $r_{w,i}$ denotes the reward associated with the $i^{th}$ win response, and $r_{l,j}$ signifies the reward for the $j^{th}$ lose response. By calculating the contrastive scores across the matrix, RPO enables a comprehensive evaluation of the relative preference among all potential contrastive pairs.

Similar to DPO (Rafailov et al., ), we define $Z(x)=\sum_{y}[\pi_{ref}(y|x)\exp(\frac{1}{\beta}\cdot r(x,y))]$.
The normalization term $Z(x)$ in DPO is considered a nuanced constant that could generally be omitted. However, with the introduction of cross-prompt contrast in RPO, differences between $Z(x_{i})$ and $Z(x_{j})$ become meaningful, illustrating how well the reference model responds to prompts $x_{i}$ versus $x_{j}$. This variance offers opportunities to differentiate prompts based on their responses from the model. Nevertheless, estimating $Z(x)$ accurately remains a challenge. As detailed in Appendix A, it is reasonable to assume that differences between $Z(x_{i})$ and $Z(x_{j})$ correlate with the distinctions between $x_{i}$ and $x_{j}$. The weighting strategy we discuss later allows us to reasonably disregard the differences between $Z(x_{i})$ and $Z(x_{j})$ when computing $s_{ij}$.

### 3.2 Weighting Strategies

After forming the contrast matrix for each mini-batch in RPO, we deploy diverse strategies to assign differentiated weights to each comparison pair. These weights crucially determine the relative influence of different comparison pairs in the final loss computation.
We propose a strategy that reweights the contrast matrix based on the distance between prompt feature embeddings for preference learning. For distinct data configurations, we have introduced two additional, simpler weighting strategies alongside our primary Embedding Distance Reweighting Strategy.

#### Embedding Distance Reweighting Strategy.

The incorporation of prompt similarity plays a pivotal role in contrastive analysis, applicable to both paired and unpaired datasets. This technique involves calculating the cosine distance $d=\cos(f(x_{w}),f(x_{l}))$ between the embeddings of win ($x_{w}$) and lose ($x_{l}$) prompts, effectively assessing their thematic relatedness. This similarity directly influences the weight $\tilde{\omega}$ assigned to each pair of responses:

$$ $\tilde{\omega}=\exp\left(-\frac{d}{\tau}\right)=\exp\left(-\frac{\cos(f(x_{w}) ,f(x_{l}))}{\tau}\right).$ (10) $$

Here, $f$ represents the model for extracting sentence embeddings, such as all-MiniLM-L6-v2 (Wang et al., ), and $\tau$ acts as a temperature parameter that moderates the impact of prompt similarity on the weight.
Specifically, a lower $\tau$ results in a greater variation in weights for different levels of similarity, emphasizing the contrastive scores between closely related prompts. In contrast, a higher $\tau$ leads to a more uniform distribution of weights, diminishing the disparity in influence between prompts of varying thematic similarity.
The adjusted contrastive score $s_{ij}$ for a win and lose response pair is then calculated as:

$$ $s_{ij}=\omega_{ij}\times(r_{w,i}-r_{l,j}),~{}~{}\omega_{ij}=\frac{\tilde{ \omega}_{ij}}{\sum_{j^{\prime}=1}^{N}\tilde{\omega}_{ij^{\prime}}}$ (11) $$

where $N$ represents the number of lose responses in the mini-batch, and each $\omega_{ij}$ is normalized within its respective mini-batch so that $\sum_{j=1}^{N}\omega_{ij}=1$. In this configuration, the sum of the weights in each row of the matrix equals one.

We then obtain

$$ $s_{ij}=\omega_{ij}\times\beta\left(\log\frac{\pi_{\theta}(y_{w,i}|x_{i})}{\pi_ {ref}(y_{w,i}|x_{i})}-\log\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y_{l,j} |x_{j})}\right).$ (12) $$

This strategy ensures that contrast scores derived from thematically similar prompts are accentuated, enhancing context-sensitive preference learning.
While the Embedding Distance Reweighting Strategy serves as the primary method to construct RPO’s contrast matrix, we have explored two additional strategies for specific data configurations, offering alternative ways to weight the contrast matrix.

#### Uniform Weighting Strategy.

In this strategy, each comparison pair within the $M\times N$ contrast matrix is assigned equal weight. Specifically, for each win response, which is compared against $N$ lose responses, the weight allocated to each comparison pair is uniformly set at $1/N$. This method simplifies the analysis process and is applicable in both unpaired and paired data settings.

#### Diagonal Emphasis Weighting Strategy.

This strategy can only be applied to paired data scenarios with an $M\times M$ contrast matrix. Central to this approach is the weighting factor $\alpha$, which crucially balances the impact of diagonal and off-diagonal elements in the matrix.
Diagonal terms (where $i=j$) represent direct comparisons of win and lose responses for the same prompt, while non-diagonal terms account for comparisons across different prompts:

$$ $s_{ij}=\begin{cases}\alpha\times(r_{w,i}-r_{l,j})&\text{if }i=j\\ \frac{(1-\alpha)}{M-1}\times(r_{w,i}-r_{l,j})&\text{if }i\neq j\end{cases}$ (13) $$

where $r_{w,i}-r_{l,j}$ follows the same formulation as described in Eq. 12.

The final RPO loss can be expressed as:

$$ $L_{\text{RPO}}=-\frac{1}{M*N}\sum_{i=1}^{M}\sum_{j=1}^{N}\log\sigma\left(s_{ij }\right)$ (14) $$

where $s_{ij}$ represents the adjusted contrastive scores calculated using one of the three weighting strategies mentioned before.
This loss function directs the model to amplify the reward for winning responses and diminish it for losing ones among both identical and semantically related prompts. The learning intensity is dynamically modulated by both the prompt-aware reweighting factor $w$ and the scaling factor $\beta$.

## 4 Experiments

We have undertaken a comprehensive series of experiments to address three primary questions of RPO:
(a) Can conceptually related prompts be deemed effective contrastive pairs for human preference optimization?
(b) What factors influence the performance of RPO?
(c) How does the performance of RPO compare to current state-of-the-art preference alignment methods?
In the following sections, we will begin by presenting the details of our experimental setup in Section 4.1. We will then delve into an in-depth ablation study to address questions (a) and (b) in Section 4.2, and finally, in Section 4.3, we will showcase the benchmark performance of our approach.

### 4.1 Experimental Setup

#### Training Tasks and Datasets.

Following DPO (Rafailov et al., ), our experiments were conducted on two pivotal datasets, each meticulously chosen to evaluate specific competencies in open-ended text generation tasks:

Anthropic’s Helpful and Harmless (HH) Dataset (Bai et al., ): This dataset was utilized for assessing single-turn dialogue performance of our models. With 170k dialogues, each comprising a human query and paired model responses rated for helpfulness and harmlessness. Following DPO (Rafailov et al., ), the preferred responses from this dataset were utilized for the supervised Fine-Tuning (SFT) phase, aligning the initial model behavior with desirable conversational outcomes.

OpenAI’s Summarization Dataset (Stiennon et al., ): Targeted for the summarization task, each input $x$ in the dataset is a substantive forum post, and the task for the model is to generate a concise summary $y$.
Similar to the HH dataset, the SFT phase was informed by preferred responses from this dataset, which set a benchmark for the model’s summarization capabilities.

#### Baselines.

We assessed RPO against a range of alignment methods. These included SFT (Chung et al., ) for initial model adaptation, PPO (Schulman et al., ) for reinforcement learning fine-tuning, DPO and IPO (Azar et al., ) for preference-based model alignment, and KTO (Ethayarajh et al., ) as an alternative approach incorporating human value functions. This varied set of baselines provided a comprehensive context for evaluating RPO’s performance in aligning language models with nuanced human preferences.
For these comparisons, we utilized a range of pre-trained large language models, including LLaMA2-7/13B (Touvron et al., ) and Mistral-7B (Jiang et al., ).
We conducted the evaluations of RPO on the validation sets of Anthropic’s HH Dataset for dialogue and the OpenAI Summarization Dataset for summarization. To further challenge RPO’s adaptability and general capability in instruction-following, we integrated the AlpacaEval2.0 leaderboard (Li et al., ) into our evaluation benchmark. This benchmark comprises a set of 805 diverse and carefully curated prompts, serving as an ideal platform for testing the model’s ability to follow general user instructions accurately and effectively.

Our primary evaluation metric was the win rate, calculated using the advanced capabilities of GPT-4 (OpenAI, ) as the evaluative tool. This metric quantitatively assessed the preference rate of our model’s responses against those generated by baseline models, which refer to the chosen responses in the test set. By employing GPT-4 for evaluation, we leveraged its robust understanding and judgment abilities as a stand-in for human evaluators (Zheng et al., ; Li et al., ). This method provided a scalable and consistent way to assess the alignment of the RPO-generated responses with nuanced human preferences, thereby offering a comprehensive measure of the model’s overall performance and effectiveness.

#### Training Details.

Similar to KTO (Ethayarajh et al., ), we process preference data in two distinct ways in our experiments. In the paired setting, each batch comprises $N$ triplets $(x,y_{w},y_{l})$. For the unpaired setting, we deconstruct each triplet into two pairs: $(x,y_{w})$ and $(x,y_{l})$, effectively separating the responses into winners and losers. Following a thorough shuffle of the dataset, we extract $N$ instances each of $(x,y_{w})$ and $(x,y_{l})$ to assemble the batch data.
It is important to emphasize that the volume of training data utilized in RPO are identical to those in DPO and KTO.
In all experiments, both RPO and the baseline consistently utilized a beta value ($\beta=0.1$) and a sampling temperature of 0. The training utilized 8 Nvidia A100 GPUs, with a batch size of 64, optimized with RMSProp optimizer (Tieleman and Hinton, ). Initially, we trained the SFT, followed by training the subsequent alignment models based on the SFT. For more detailed information on training and evaluation, please refer to Appendix D.

### 4.2 Ablation Study

We initiated our investigation with an ablation study aimed at assessing the viability of using semantically related prompts as effective contrastive pairs for preference optimization. Initially, we utilized DPO as the baseline and began with the pairwise preference data, a setup similar to that of DPO. DPO primarily focuses on preference pairs in relation to each individual prompt, while RPO constructs a contrastive matrix encompassing all potential pairs within each mini-batch.
In our experiments, we compared RPO with various weighting strategies against DPO, using the Mistral-7B model for dialogue tasks. We employed GPT-4 to determine the win rate compared to the suggested responses within the test dataset.

As presented in Table 1, simple reweighting strategies, such as Uniform Weighting (where all contrastive pairs are considered equally important) and Diagonal Weighting (which places more emphasis on diagonal pairwise terms while treating the other non-diagonal terms evenly), yielded slightly worse results than the baseline DPO. This suggests that not all prompt pairs can be deemed effective contrastive pairs for preference optimization. This finding aligns with our intuition, indicating that only semantically related prompt responses can effectively serve as preferred and rejected pairs for each other.
Motivated by these observations, we introduced a sentence embedding model to measure the semantic relatedness between prompts. We then utilized this similarity measure to emphasize the preference contrast for highly related pairs. The experiments demonstrated that with Embedding Reweighting, RPO significantly outperformed DPO in both paired and unpaired data scenarios. This success validates the notion that preference contrast between highly related prompts is extremely valuable for aligning human preferences, a process closely mirroring human learning.

Our investigation progressed to examine the impact of different prompt embedding extraction models on the LLaMA2-7B model’s efficacy in dialogue tasks, as delineated in Table 2.
In this comparative study, we compared three distinct models: all-MiniLM-L6-v2 (Wang et al., ), known for its efficiency and balance in handling context; sentence-t5-large (Raffel et al., ), designed for generating semantically rich embeddings; and all-distilroberta-v1 (Sanh et al., ), recognized for its distilled knowledge from larger models.
Observing a consistent trend where moderate temperature settings enhance model performance, the all-MiniLM-L6 model, set at a temperature of 0.5, was selected as the benchmark setting for subsequent comparisons against other state-of-the-art models.

We explored the impact of per GPU batch size on the performance of RPO, conducting experiments using the Mistral-7B model on the Anthropic-HH dataset. The results of these experiments are presented in Table 3. Note the baseline DPO model, judged by GPT-4, achieved a win-rate of 72.26. When operating with the minimal batch size of 2 per GPU, RPO demonstrates a slight underperformance in comparison to the DPO baseline, which is trained with a batch size of 8 per GPU. This observed discrepancy can largely be ascribed to the reduced dimensions of the similarity matrix. However, as the batch size increases, RPO’s performance consistently improves, surpassing the DPO baseline comfortably at batch sizes 4 and above. This trend highlights the effectiveness of RPO’s approach in leveraging larger amounts of comparative data for preference learning. It demonstrates that while RPO can work with smaller batches, its strength is amplified when provided with a richer and more varied similarity matrix, which is intrinsic to larger batch sizes.
For further details on ablation studies concerning the inputs used for computing relative weights, as well as experiments exploring the effects of different beta values and sampling temperatures, please refer to Appendix F.

**Table 1: Ablation study on RPO weighting strategies. We use Mistral-7B as the base model and train RPO with the Anthropic-HH dataset using our proposed three weighting strategies. If applied sentence embedding model is set as all-MiniLM-L6-v2.**
| Method | Win Rate |
| --- | --- |
| DPO (Rafailov et al., ) | 72.26 |
| Uniform Weighting | 68.36 |
| Diagonal Weighting ($\alpha=0.8$) | 69.92 |
| Embedding Reweighting (Unpaired, $\tau=0.75$) | 75.00 |
| Embedding Reweighting (Paired, $\tau=0.5$) | 78.52 |

**Table 2: Ablation study on prompt embedding extraction models across various temperature settings. We use LLaMA2-7B as the base model and train RPO on the Anthropic-HH dataset using multiple sentence embedding models and various temperature values.**
| Embedding Extraction Model |  |  |  |
| --- | --- | --- | --- |
| $\tau$ | all-MiniLM-L6-v2 | sentence-t5-large | all-distilroberta-v1 |
| 0.25 | 66.80 | 67.38 | 67.58 |
| 0.5 | 68.75 | 65.23 | 67.78 |
| 0.75 | 67.97 | 65.43 | 65.43 |

**Table 3: Batch-size ablation Study for RPO on the Anthropic-HH dataset with Mistral-7B model.**
| Per GPU Batch Size | 2 | 4 | 6 | 8 |
| --- | --- | --- | --- | --- |
| RPO Win Rate (%) | 71.48 | 74.60 | 74.61 | 78.52 |

### 4.3 Benchmark Performance

**Table 4: Win rate on Anthropic-HH and OpenAI Summarization datasets. We conduct a comparative analysis of RPO (unpaired/paired) against state-of-the-art human preference optimization baselines. We evaluate their performance using metrics such as GPT-4 win rate and AlpacaEval2.0 leaderboard. The evaluation of AlpacaEval2.0 leaderboard is carried out using Mistral-7B, which has been trained on the Anthropic-HH dataset.**
| Method | Anthropic-HH | OpenAI Summarization | AlpacaEval2.0 |  |  |
| --- | --- | --- | --- | --- | --- |
| LLaMA2-7B | LLaMA2-13B | Mistral-7B | Mistral-7B | Mistral-7B |  |
| SFT (Chung et al., ) | 45.90 | 48.05 | 48.24 | 28.52 | 13.68 |
| PPO (Schulman et al., ) | 50.39 | 51.95 | 58.98 | 39.84 | 15.00 |
| IPO (Azar et al., ) | 53.91 | 46.48 | 63.48 | 33.98 | 21.62 |
| DPO (Rafailov et al., ) | 63.67 | 63.28 | 72.26 | 48.83 | 30.84 |
| KTO (Ethayarajh et al., ) | 67.78 | 71.48 | 61.13 | 39.45 | 15.06 |
| RPO-Unpaired ($\tau=0.75$) | 61.33 | 70.31 | 75.00 | 50.39 | 31.24 |
| RPO-Paired ($\tau=0.5$) | 68.75 | 72.66 | 78.52 | 50.00 | 38.88 |

Table 4 offers a detailed comparative analysis of the win rates for diverse alignment methods applied to the LLaMA2-7B, LLaMA2-13B, and Mistral-7B models, addressing tasks across the Anthropic-HH, OpenAI Summarization datasets, and the AlpacaEval2.0 leaderboard. The array of methods evaluated includes SFT, PPO, IPO, DPO, KTO, and our RPO in both unpaired and paired modalities. Our findings indicate that while SFT establishes a fundamental layer of adaptation, it is surpassed by methods integrating human feedback such as PPO and IPO. DPO, with its strategy of leveraging direct human preferences, robustly outperforms SFT, PPO, and IPO, attesting to the efficacy of direct preference-based contrast learning. KTO, treating chosen and rejected samples separately, notches high win rates, especially with the LLaMA2-13B model on the Anthropic-HH dataset. Yet, it is the RPO approaches that command the highest win rates across the majority of datasets and models, with the RPO-Paired method particularly dominant, exemplified by a 78.52 win rate on the Anthropic-HH dataset with the Mistral-7B model, highlighting the significant benefits of constructing rich contrastive pairs from prompts with semantic similarities.

In light of Mistral-7B’s outstanding performance on dialogue tasks, we solely advanced this model for additional scrutiny on the OpenAI Summarization dataset. The RPO-Unpaired method surprisingly outperformed the paired configuration with win rates of 50.39 and 50.00, respectively, suggesting that the unpaired setting can be remarkably effective, potentially due to the model’s inherent capability to leverage diverse training signals. Additionally, the Mistral-7B model, previously tuned on the Anthropic-HH dataset, was applied to the AlpacaEval2.0 leaderboard to assess its broad generalizability across a spectrum of instruction-following scenarios. Our results on both the Summarization and AlpacaEval benchmarks were highly promising, with the RPO-Unpaired model showcasing a level of performance that not only competes robustly with its paired counterpart but also exemplifies the method’s adaptability. This strong showing emphasizes RPO’s capacity to harness the information content in unpaired data effectively, further confirming the method’s robustness in diverse training scenarios.

## 5 Conclusion and Discussion

In summary, Relative Preference Optimization (RPO) innovatively aligns Large Language Models (LLMs) with human preferences, adeptly handling both paired and non-paired data. Its contrastive weighting mechanism effectively processes similar and identical prompts, enriching the understanding of nuanced preferences. Empirical results on models like LLaMA2-7/13B and Mistral-7B show RPO outperforming the previous alignment methods in key tasks, particularly in dialogue and summarization. This adaptability and improved alignment highlight RPO’s potential in advancing LLM training, setting the stage for more user-centric and ethically aligned AI applications.

Limitations & Future Work.
RPO currently faces three limitations: First, it depends on the quality of the embedding model used to construct contrast pairs. A weak text encoder may fail to effectively capture the linguistic patterns and contextual similarities within prompts, necessitating the selection of a sufficiently powerful text encoder within the available computational budget.
Second, the construction of the contrastive matrix is limited by the memory capacity of a single GPU’s mini-batch. Future enhancements could include aggregating data across multiple GPUs to create a larger contrastive matrix. Third, the algorithm currently assumes a constant $Z(x)$ for all $x$. Advancing RPO could involve dynamically modeling $Z(x)$ for different prompts, potentially using a neural network, to more effectively handle variations in data inputs.

## Appendix A Discussion of Z ⁢ ( x ) 𝑍 𝑥 Z(x) italic_Z ( italic_x ) .

Similar to DPO [Rafailov et al., ], we define $Z(x)$ as:

$$ $Z(x)=\sum_{y}[\pi_{ref}(y|x)\exp(\frac{1}{\beta}\cdot r(x,y))].$ (15) $$

However, under the frameworks of Plackett-Luce [Plackett, , Luce, ] and Bradley-Terry [Bradley and Terry, ], the normalization term $Z(x)$ in DPO is treated as a nuanced constant and can be omitted [Rafailov et al., ]. While this simplification facilitates the derivation and implementation of DPO, it precludes considerations of variations in $Z(x)$, which could reflect how effectively the reference model answers different prompts $x$.

In RPO, with the introduction of cross-prompt contrast, differences between $Z(x_{i})$ and $Z(x_{j})$ become meaningful, illustrating the varied responses of the reference model to prompts $x_{i}$ versus $x_{j}$. This variance creates opportunities to differentiate prompts based on their model responses. Estimating $Z(x)$ accurately, however, remains challenging. Fortunately, it is reasonable to assume that differences between $Z(x_{i})$ and $Z(x_{j})$ correlate with the distinctions between the prompts themselves. The weighting strategy introduced in Section 3.2 allows us to reasonably ignore these differences when computing $s_{ij}$, as detailed in the subsequent discussion.

Firstly, the assumption that $Z(x_{i})\approx Z(x_{j})$ is reasonable when $x_{i}$ and $x_{j}$ are similar.
Conversely, should $x_{i}$ and $x_{j}$ differ to the extent that $Z(x_{i})$ and $Z(x_{j})$ diverge, the weight $w_{ij}$ will diminish the influence of $Z(x_{i})-Z(x_{j})$ discrepancy.
Elaborating further, in instances where $Z(x_{i})\neq Z(x_{j})$ within RPO, $s_{ij}$ as defined in Eq. 12 must be adjusted to:

$$ $\tilde{s}_{ij}=\beta w_{ij}\left(\log\frac{\pi_{\theta}(y_{w,i}|x_{i})e^{Z(x_{ i})}}{\pi_{ref}(y_{w,i}|x_{i})}-\log\frac{\pi_{\theta}(y_{l,j}|x_{j})e^{Z(x_{j })}}{\pi_{ref}(y_{l,j}|x_{j})}\right),$ (16) $$

resulting in a modified loss expression:

$$ $\tilde{L}_{RPO}=-\frac{1}{MN}\sum_{i=1}^{M}\sum_{j=1}^{N}\log\sigma(\tilde{s}_ {ij})=\frac{1}{MN}\sum_{i=1}^{M}\sum_{j=1}^{N}\log(1+\exp(-s_{ij}-\beta w_{ij} (Z(x_{i})-Z(x_{j}))).$ (17) $$

This revised formulation accounts for potential disparities in $Z(x)$ values across different prompts while mitigating their impact through appropriate weighting.

Comparing $\log(\sigma(\tilde{s}_{ij}))$ and $\log(\sigma(s_{ij}))$ elucidates the impact of considering $Z(x)$ in the loss formulation:

For $\log(\sigma(s_{ij}))$, we have:

$$ $\log(\sigma(s_{ij}))=\log\frac{\left(\frac{\frac{\pi_{\theta}(y_{w,i}|x_{i})}{ \pi_{ref}(y_{w,i}|x_{i})}}{\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y_{l,j }|x_{j})}}\right)^{\beta w_{ij}}}{1+\left(\frac{\frac{\pi_{\theta}(y_{w,i}|x_{ i})}{\pi_{ref}(y_{w,i}|x_{i})}}{\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y _{l,j}|x_{j})}}\right)^{\beta w_{ij}}}$ (18) $$

For $\log(\sigma(\tilde{s}_{ij}))$, it becomes:

$$ $\log(\sigma(\tilde{s}_{ij}))=\log\frac{\left(\frac{\frac{\pi_{\theta}(y_{w,i}| x_{i})}{\pi_{ref}(y_{w,i}|x_{i})}}{\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref }(y_{l,j}|x_{j})}}\right)^{\beta w_{ij}}e^{\beta(Z(x_{i})-Z(x_{j}))w_{ij}}}{1+ \left(\frac{\frac{\pi_{\theta}(y_{w,i}|x_{i})}{\pi_{ref}(y_{w,i}|x_{i})}}{ \frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y_{l,j}|x_{j})}}\right)^{\beta w_ {ij}}e^{\beta(Z(x_{i})-Z(x_{j}))w_{ij}}}$ (19) $$

Simplified, this can be represented as:

$$ $\log\frac{\left(\frac{\frac{\pi_{\theta}(y_{w,i}|x_{i})}{\pi_{ref}(y_{w,i}|x_{ i})}}{\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y_{l,j}|x_{j})}}e^{Z(x_{i}) -Z(x_{j})}\right)^{\beta w_{ij}}}{1+\left(\frac{\frac{\pi_{\theta}(y_{w,i}|x_{ i})}{\pi_{ref}(y_{w,i}|x_{i})}}{\frac{\pi_{\theta}(y_{l,j}|x_{j})}{\pi_{ref}(y _{l,j}|x_{j})}}e^{Z(x_{i})-Z(x_{j})}\right)^{\beta w_{ij}}}$ (20) $$

When $Z(x_{i})<Z(x_{j})$, indicating that $\pi_{ref}$ performs better in response to $x_{j}$ compared to $x_{i}$, Eq. 20 modulates the emphasis on the contrast between the favorable response for $x_{i}$ and the less favorable response for $x_{j}$, and the reverse applies.

Eq. 19 also illustrates that the influence of $(Z(x_{i})-Z(x_{j}))$ is modulated by $w_{ij}$, which measures the similarity between $x_{i}$ and $x_{j}$. As $w_{ij}$ approaches zero, the impact of $(Z(x_{i})-Z(x_{j}))$ diminishes, underscoring its conditional relevance.

This analysis supports the premise that treating $Z(x_{i})$ and $Z(x_{j})$ as equivalent is generally valid due to the contrastive weighting in RPO. However, there is potential to enhance RPO by explicitly accounting for differences between $Z(x_{i})$ and $Z(x_{j})$, as demonstrated in Eq. 20. This invites future exploration into refining this aspect of the model.

## Appendix B Impact Statements

Relative Preference Optimization (RPO) enhances large language models (LLMs) by aligning them more closely with diverse human preferences. This advancement promises more inclusive AI systems but also requires careful management of potential biases. Societally, RPO could improve AI interactions in education and customer service, but there’s a risk of overreliance on AI in sensitive areas. Additionally, the potential for misuse in spreading misinformation and invading privacy must be addressed. Ultimately, RPO underscores the imperative of advancing AI technology responsibly, harmonizing innovation with ethical stewardship for the betterment of society.

## Appendix C Utilization of LLM in Manuscript Preparation

We employed GPT-4 to refine the grammar and structure of our manuscript. This enhanced the readability and organization of the paper.

## Appendix D Training and Evaluation Details.

The detailed hyperparameters are presented in Table 5; the majority of these parameters are in accordance with the DPO framework [Rafailov et al., ]. For instance, the maximum length for prompts is set to 256, and the combined cap for both prompt and response lengths is fixed at 512. Furthermore, the number of samples employed for calculating the win rate is established at 256.

**Table 5: Hyperparameters.**
| Hyperparameters | Value |
| --- | --- |
| Batch size | 64 |
| GPUs | 8 |
| Learning rate | 5e-7 |
| Epochs | 1 |
| Max prompt length | 256 |
| Max prompt length + Max response length | 512 |
| Optimizer | RMSprop |
| $\beta$ | 0.1 |
| $\tau$ for RPO-Unpaired | 0.75 |
| $\tau$ for RPO-paired | 0.5 |
| Sampling temperature | 0 |
| Prompt embedding extraction model | all-MiniLM-L6 |
| Number of comparisons to make | 256 |
| GPT judge | gpt-4-0613 |
| AlpacaEval judge | alpaca_eval_gpt4_turbo_fn |

## Appendix E Algorithm Details

Figure: Algorithm 1 Relative Preference Optimization (RPO)

## Appendix F Ablation Study

In all ablation studies, we emphasize that sampling was conducted on the Anthropic-HH test dataset using 256 samples with Mistral-7B, and win rates were computed using GPT-4.

### F.1 Ablation study on similarity weighting: prompt-only vs. integrated prompt-response

Initially, our model computed weights based solely on prompt similarities. To explore the potential benefits of a more nuanced similarity assessment, we also developed a method that integrates both prompts and responses as a single unit for this computation. The comparative results on the Anthropic-HH test dataset and the AlpacaEval 2.0 benchmark are detailed in Table 6.
This analysis reveals that while integrating prompt and response information can enhance performance on specific datasets, it may also reduce the model’s generalizability across broader benchmarks. Given the critical importance of maintaining a balance between detailed embeddings and broad applicability, our final strategy prioritizes using prompt-based similarity computations for weight calculation.

**Table 6: Comparative win rates for prompt-only vs. integrated prompt-response weighting strategies.**
| Method | Dataset |  |
| --- | --- | --- |
| Anthropic-HH | AlpacaEval 2.0 |  |
| Prompt-Only | 78.52 | 38.88 |
| Integrated Prompt-Response | 80.86 | 35.47 |

### F.2 Ablation study on β 𝛽 \beta italic_β Values

In our experiments, a beta value of 0.1 was used for all experiments, in line with the default values for both KTO and DPO. We subsequently explored alternative beta values of 0.5 and 0.8 to assess their impact. Note for the best performance of RPO, the $\tau$ should be adjusted accordingly when $\beta$ changes. Here, we keep the same $\tau=0.5$. In Table 7, we observe that RPO consistently outperforms the other methods for all $\beta$ values.

**Table 7: Performance comparison of DPO, KTO, and RPO at different beta values.**
| Method | Beta |  |  |
| --- | --- | --- | --- |
| 0.1 | 0.5 | 0.8 |  |
| DPO | 72.26 | 64.85 | 58.59 |
| KTO | 61.13 | 65.23 | 63.28 |
| RPO | 78.52 | 68.36 | 63.67 |

### F.3 Ablation study on sampling temperature

All experiments were conducted with a default sampling temperature of 0, as detailed in Table 5. This setting aligns with those used in the DPO and KTO methods. Furthermore, we conducted a temperature ablation study, the results of which are presented in Table 8. These results clearly demonstrate that RPO consistently outperforms DPO and KTO across a range of sampling temperatures.

**Table 8: Performance comparison of DPO, KTO, and RPO under various sampling temperatures.**
| Method | Temperature |  |  |
| --- | --- | --- | --- |
| 0.0 | 0.3 | 0.7 |  |
| DPO | 72.26 | 70.70 | 72.65 |
| KTO | 61.13 | 57.81 | 60.94 |
| RPO | 78.52 | 72.48 | 75.39 |

## Appendix G The core Python implementation of RPO.

Figure: Listing 1: Python code for RPO Loss.

## Appendix H Evaluation Prompts.

#### GPT-4 prompt for dialogue task.

Here is a conversation between <$|$user$|$>and <$|$assistant$|$>.

<$|$user$|$>

<the user query>

<$|$assistant$|$>can now choose from different responses.

Response 1: <Response 1>

END OF RESPONSE 1

Response 2: <Response 2>

END OF RESPONSE 2

Between these two responses, which response is more helpful, harmless, and concise? Pick one.

#### GPT-4 prompt for summarization task.

Here is a forum post presented by <$|$user$|$>for summarization by <$|$assistant$|$>.

<$|$user$|$>

<post>

<$|$assistant$|$>can now choose from different summaries.

Summary 1: <Summary 1>

END OF SUMMARY 1

Summary 2: <Summary 2>

END OF SUMMARY 2

Between these two summaries, which summary does a better job of summarizing the most important points in the given forum post, without including unimportant or irrelevant details? A good summary is both precise and concise. Pick one.

## Appendix I Generation Example

**Table 9: Sample summaries to a post from the OpenAI Summarization test set.**
| Prompt | As the title says, we just don’t know what to talk about or really how to talk to each other. I really like her (a lot) and she feels the same towards me, and I just don’t know what to do. She was grounded for 2 months a couple days ago (her mom’s a little crazy when it comes to punishments), so seeing her in person is sadly out of the question. We’re both just as awkward in person, anyway… |
| --- | --- |
|  | I’ve seen on some other places that this happens in every relationship at some point and not to be worried about it, but I never see how to deal with it. Both of us agree we need to be more confident and open with each other, but it seems like there’s never anything new to talk about, and even if there was we wouldn’t know how to talk about it. |
| SFT [Chung et al., ] | How do I help me talk to my girlfriend more? |
| PPO [Schulman et al., ] | Don’t know what to talk to gf about. She and I need to be more open with each other, but have no idea what to talk about/how to talk about it. |
| DPO [Rafailov et al., ] | How do you deal with not knowing what to talk about with the one you love? When talking with her just seems stagnant and not much to talk about. Both her and I feel the same, and want to fix it, but don’t know how to do it. Relationship is new (about a month |
| IPO [Azar et al., ] | How do I help me and my gf get better at talking to each other, and how do we deal with the awkwardness that is in our relationship? |
| KTO [Ethayarajh et al., ] | How do you deal with not knowing what to talk about with someone you’re in a relationship with? |
| RPO-Unpaired | With my girlfriend, we never know what to talk about or really how to talk to each other in general. She agrees something needs to change but what do we even say to each other? Nothing ever comes to mind. |
| RPO-Paired | Girlfriend and I like each other, are into each other, but don’t know how to talk and start good conversations with one another. We agree we need to work on being more comfortable and open. |

**Table 10: Sample summaries to a post from the OpenAI Summarization test set.**
| Prompt | I am a caregiver and one of the women I care for is openly racist. I began helping “Rose" and her husband “Dan" for 6 months. I started noticing that Rose was racist when we would chat, she would let on that she did not care for black, Asian, or gay people. These are the groups that I know of, anyway. Also, my sister is gay so it really hurt me when she said ‘Oh I HATE that woman, she is gay’ when referring to Ellen Degeneres. |
| --- | --- |
|  | What’s worse, we were taking a walk today and we walked past a black woman. My client proceeded to express her dislike for this person based solely on her skin color. I was appalled. I did not know what to say, so I just said “Hmm." |
|  | How do I handle this? My client has had a stroke and she isn’t "all there" but she definitely knows what she is saying and does not have Alzheimer’s disease or anything like that. |
| SFT [Chung et al., ] | Woman is openly racist and it hurts me. How do I handle it? |
| PPO [Schulman et al., ] | My client is openly racist and it hurts me because we were taking a walk today and she made racist comments about a black woman we passed. What do I do? |
| DPO [Rafailov et al., ] | The woman I care for is openly racist. She expressed dislike for black, asian, and gay people. What do I do? Should I change clients? Or deal with it? It’s hurtful to me. |
| IPO [Azar et al., ] | The client I care for is racist and I am not sure how to handle it. Any advice? |
| KTO [Ethayarajh et al., ] | The woman I care for is racist and I am trying to figure out how to handle it. |
| RPO-Unpaired | The woman I care for is openly racist. She isn’t senile or anything, she just holds these prejudices. How do I handle this? We live in a diverse area so I run into these instances a lot. |
| RPO-Paired | The woman I care for is openly racist and expressed dislike for people of other races as we walked past them. She has had a stroke and is not senile, what do I do about her being racist while I’m her caregiver? |

**Table 11: Sample responses to a prompt from the Anthropic-HH test set.**
| Prompt | My wife loves to cook. |
| --- | --- |
| SFT [Chung et al., ] | Great, I can help out with the cooking! |
| PPO [Schulman et al., ] | I’m glad your wife loves to cook. I appreciate that quality too. Is there any specific way you’d like me to assist her, or support you in supporting her passion for cooking? |
| DPO [Rafailov et al., ] | That’s wonderful! I’m also a fan of cooking. What are her favorite dishes to prepare? Are you guys adventurous with new recipes? How often does she cook? What’s a dish of hers you can’t get enough of? What about her cooking style do you love the most? I’d love to exchange some ideas for recipes and cooking tips if you’re interested. |
| IPO [Azar et al., ] | That’s fantastic. Cooking is a shared passion! What types of cuisine do you and your wife enjoy preparing together? |
| KTO [Ethayarajh et al., ] | That’s excellent! Home-cooked meals are such a pleasure. It’s wonderful that you have that in your home. |
| RPO-Unpaired | Great! Cooking is indeed a delightful hobby. If you have any cooking-related queries or need recipe advice, I’m all ears. How can I assist? What types of recipes is your wife looking to explore? I’m here to help with all things culinary, from ingredients to techniques. |
| RPO-Paired | Lovely to hear that your wife enjoys cooking! It’s a beautiful way to unwind, express creativity, and bond with family. How can I assist in enriching this experience for both of you? |

**Table 12: Sample responses to a prompt from the AlpacaEval2.0 test set.**
| Prompt | Pretend to be a business professional. Act like you are giving your mentee professional advice on the most essential points to create a self-sustaining business within the next five years time without the help of external investors. |
| --- | --- |
| SFT [Chung et al., ] | Ah, that’s an interesting challenge, I’d be happy to take it on. Let’s start by brainstorming a few important things that a business needs to be successful. First and foremost, you’ll need to ensure that your product or service is both high quality and meets a market demand that is large enough to sustain the business. You will need to develop a business plan and marketing strategy to promote your product or service, and then hire a team of talented and motivated people to help implement your business plan. You’ll also need to ensure that you have the necessary capital and resources to get your business off the ground and running, and make sure you stay on top of changes and trends in the market to ensure that your business is sustainable over the long-term. |
| PPO [Schulman et al., ] | I can absolutely do that! Here are some key points that would be essential for starting and growing a successful business in the next five years: Have a clear and well-defined vision for the company, and work to make that vision a reality. Ensure that the company has a solid financial foundation, with a strong balance sheet and plenty of working capital. Develop a strong team of employees, and invest in training and development opportunities for them. Market the company effectively, both online and offline, and use digital marketing and social media to reach potential customers. Stay abreast of changes and developments in your industry, and be prepared to pivot and adapt your business model as needed. With these key points in mind, I am confident that you can create a self-sustaining business within five years! |
| DPO [Rafailov et al., ] | Sure! I think a really essential point for any business is to create a business plan with clear, actionable goals. When starting a business, it’s also helpful to identify the target customer and understand how your product or service fits into the market. Also, I would recommend setting up an efficient accounting system so you can track expenses and profits accurately. And it’s very important to establish a good financial foundation by obtaining loans, grants, or other financing to cover initial expenses. I could also give you advice on building a strong team and creating an efficient organizational structure to support your business. Does that make sense? |
| IPO [Azar et al., ] | Ah, that is a really difficult question, but I think I understand what you are asking. The essential points to creating a self-sustaining business within the next five years time would be to plan for sustainable growth, find ways to increase your customer base, and find a way to increase your profits. Firstly, you would need to establish a good foundation for growth. You will need to establish a good business plan, which should clearly lay out the goals and objectives of your business, the expected growth rate of your business, and an idea of how you will maintain your growth. Without a solid plan in place, you cannot hope to grow your business. Once you have a solid business plan in place, you will also need to invest in your business by investing in your product and your employees. You will also need to establish a solid customer base, and this will require marketing and advertising. You will need to market your business effectively in order to attract customers and to communicate your business value to potential customers. You will also need to keep your customers happy, and this will require investing in customer service, and providing an excellent customer experience. The last point you will need to consider is increasing your profits. You will need to establish and maintain profitable business practices, and also keep up with the latest trends and technology in your field in order to remain competitive. |
| KTO [Ethayarajh et al., ] | Good morning, this is Jill. I’m very glad to have the chance to talk to you today. I can offer some advice to help you get started. To start, you should know that you’ll need to build up a team of employees. Once you have employees working for you, you’ll need to invest time in building relationships, especially with customers. And you should know that you’ll need to make sure your business has good cash flow. The basic steps for starting a business are: Make a business plan: This is important to know what you want to do, how you’re going to do it, and what you’ll need to be successful. Set up a business name: Make sure it’s easy to remember and unique. And it should communicate your product or service. Obtain a business license: This varies from state to state, but usually it means you’ll need to register your business, pay fees, get insurance, etc. Set up a business bank account: This is important to protect your personal finances from your business finances. Find a location: This is important to make sure your location is convenient to your customers and employees, and also to make sure it’s a good investment. Hire employees. |
| RPO-Unpaired | Sure! I think a really important first step would be to identify a clear business opportunity and develop a viable business model. Then you’d want to research the market thoroughly and identify your target customer and how to reach them. Once you’ve identified your target customer, you’d want to figure out how to deliver a compelling value proposition to them, including a unique selling point. Then you’d want to figure out your operational strategy and staffing requirements and develop a solid business plan. Once you’ve done all of that, you’d want to start working on building your brand and getting the word out about your business. You’d also want to put together a solid financial plan and make sure you have enough funding to sustain your business through its early stages. And finally, you’d want to set some milestones and performance targets for yourself, and work towards them over time. Does that make sense? |
| RPO-Paired | Sure, here are some key points to consider when launching a self-sustaining business within five years: 1. Define your business goals and mission. 2. Create a detailed business plan, including market research and financial projections. 3. Raise startup capital and secure funding sources. 4. Identify your target market and customer base. 5. Develop a strong marketing strategy to attract customers. 6. Build a solid team of employees and partners. 7. Establish strong financial controls and accounting systems. 8. Focus on providing exceptional customer service and building a positive brand image. 9. Monitor your business performance and make necessary adjustments to stay on track. |

## Peer Reviews

confidence: 5
contribution: 3
initial_rating: 5
presentation: 3
questions: All the points are mentioned in the Weakness section.
soundness: 3
strengths: The authors explored one of the important problems of direct preference optimization methods, and it's interesting. Another advantage of this paper is the comprehensive experiment and theory used to satisfy their hypothesis.
summary: The authors proposed new preference optimization methods to improve the performance of preference learning on various tasks. They explained that the current state-of-the-art methods cannot fully reflect the complex nature of human learning. To overcome this challenge, they proposed Relative Preference Optimization (RPO) to discern between more and less preferred responses derived from identical and related prompts. They showed that RPO outperforms DPO, KTO, and IPO on dialogue, summarization, and general evaluation benchmarks.
weaknesses: I would appreciate that if the authors could clarify the following points:

- The results show that RPO outperforms other methods. I looked at the implantation they put in Appendix G and understood the main difference between RPO loss and DPO loss is the weight matrix. I am wondering how the authors can describe if a policy model has knowledge about the difference between the response of prompt i and j (assume prompt i is a reasoning question, and prompt j is a usual question that asks about the weather) will have a better performance?

- The Experiment section shows that the authors didn't explore the hyperparameters for other methods. To the best of my knowledge for the authors, direct methods like DPO, IPO, and KTO have a different performance on different hyper-parameters like Batch-Size, Beta, Regularization terms in IPO etc. Also, they didn't use beta=0.01 for DPO, which is the best hyper-parameter for this method. So, I suggest the authors compare their methods with the best DPO, KTO, and IPO hyperparameters. 

- With respect to the comprehensive experiments, it seems the authors didn't report the scores for all models. For example, the experiments on Summarization are on the Mistral model, but for Anthropic-HH, it is on LLaMA (7B, 13B) and Mistral. Also, for other benchmarks, they didn't report the score for other methods. For example, on Open LLM  Leaderboard benchmarks, they just compared with KTO; another comparison method can be DRO [1]. I am confused as to why the authors used the Binarized Capybara Dataset because Ultrafeedback_binarized [2] is available, and they could use this dataset.

- New methods like SimPO and CPO are better choices for comparison. I encourage the authors to compare the proposed method with these algorithms, too.

- Using new models like LLaMA-3 can improve the experiment section.

---
[1] DRO:  https://arxiv.org/abs/2405.19107

[2] Ultrafeedback_binarized: https://huggingface.co/datasets/HuggingFaceH4/ultrafeedback_binarized

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: - How long does the embedding preprocessing step take?
- In my understanding, RPO utilizes a loss function similar to DPO's, augmented with a data reweighting mechanism. Could this mechanism be integrated with other approaches such as IPO, KTO, or SimPO? If so, what would the potential benefits or challenges be in combining these methodologies?
soundness: 3
strengths: The proposed RPO method introduces an innovative approach to preference alignment, showcasing enhanced data efficiency and effectiveness. By integrating a contrastive weighting mechanism, RPO significantly broadens the learning capabilities of language models, allowing them to process a wider range of preference data. The experimental results across various tasks, such as dialogue, summarization, and general evaluation benchmarks, highlight RPO's superior adaptability and effectiveness in optimizing language model performance according to user preferences.
summary: The Relative Preference Optimization (RPO) method presents a novel approach to aligning preferences that significantly improves data efficiency and effectiveness.
weaknesses: The paper states that "DPO does not fully reflect the complex nature of human learning, which often involves understanding contrasting responses to not only identical but also similar questions." However, there appears to be a lack of explicit experimentation or detailed discussion in the manuscript to substantiate this claim. It would be beneficial for the authors to provide empirical evidence or theoretical elaboration to support this assertion, which would strengthen the argument for RPO's advantages over existing methods like DPO.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Please refer to the Weaknesses.
soundness: 2
strengths: 1. RPO addresses a limitation of DPO by incorporating both identical and related prompts, thereby expanding the model's ability to learn from a more diverse set of data.

2. The paper is well-written and clearly explains the methodology and experimental results, making it easy for readers to understand the contributions and their implications.
summary: This paper introduces Relative Preference Optimization (RPO), an enhancement to the Direct Preference Optimization (DPO) method for aligning large language models (LLMs) with user preferences. RPO extends DPO by considering both identical and related prompts, and it uses a contrastive weighting mechanism to handle a broader range of preference data. Experiments demonstrate that RPO outperforms baseline methods on dialogue, summarization, and general evaluation benchmarks.
weaknesses: 1. The approach of using sentence embeddings to assess semantic similarity may not be sensitive to token-level differences. This could be a significant drawback in domains like code and mathematics, where even minor differences in tokens of prompts can lead to entirely different or even contradictory answers.

2. The proposed RPO may be seen as a form of data augmentation, where different question answer pairs are combined during the training process to generate more data pairs to improve model performance. This augmentation approach is common in traditional data augmentation fields.

3. The experiments could be further strengthened. For instance, it would be interesting to see if using the model being trained to compute sentence similarity would yield better results. Additionally, the paper should explore whether this simple method provides any benefits for larger models, such as 13B or more capable ones, to fully validate its effectiveness across different scales.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. It seems that the performance improvement of this method relative to DPO mainly stems from the combination of additional weighted training samples within the mini-batch, which expands the scale of the training data. Could you please count the proportion of samples with omega > 0.5 in the Anthropic-HH training set under different configurations of batch size?

2. If we construct new sample pairs of relative prompts (i.e. high $\omega$ values) based on the entire dataset and then add them to the original dataset according to the ratio obtained from Question 1, could DPO produce comparable or even better result?
soundness: 3
strengths: - Extends beyond traditional methods by considering semantically related prompts.
- RPO is adaptable to both paired and unpaired data scenarios, making it a flexible tool for different types of preference data.
summary: The paper introducs Relative Preference Optimization (RPO), a novel method to enhance the alignment of LLMs with human preferences. RPO considers preferences across both identical and semantically related prompts and employs a contrast matrix to discern preferences between preferred responses via a contrastive weighting mechanism. So RPO enhancs model training with a broader range of data. Empirical tests on dialogue and summarization tasks showed that RPO outperforms existing methods like DPO, IPO, and KTO, especially in adapting to varied contexts.
weaknesses: - RPO relies heavily on the semantic similarity of prompts to establish contrastive pairs. This approach might limit its effectiveness in contexts where prompts lack clear semantic relationships, especially in diverse general-purpose task datasets. As a result, the probability of relevant prompts appearing within a mini-batch is relatively low, and it is rather difficult to screen out sample pairs of high $\omega$ within a mini-batch. Related to Question 1.
- As an article submitted to ICLR, both the scientific problems distilled in the article and its methodologies are rather deficient in terms of inspiration and theoretical contributions.

Meta-review: This paper proposes Relative Preference Optimization (RPO) which is designed to discern between responses derived from identical and related prompts, which enables utilizing both paired and unpaired data. While the reviewers find the method to be interesting, they also raised significant concerns regarding the soundness of the method as well as the experiments/evaluations. The authors should consider reviewer's feedback when revising the manuscript.

Decision: Reject