As Simple as Fine-tuning: LLM Alignment via Bidirectional Negative Feedback Loss

## Abstract

Abstract Direct Preference Optimization (DPO) has emerged as a more computationally efficient alternative to Reinforcement Learning from Human Feedback (RLHF) with Proximal Policy Optimization (PPO), eliminating the need for reward models and online sampling. Despite these benefits, DPO and its variants remain sensitive to hyper-parameters and prone to instability, particularly on mathematical datasets. We argue that these issues arise from the unidirectional likelihood-derivative negative feedback inherent in the log-likelihood loss function.
To address this, we propose a novel LLM alignment loss that establishes a stable Bidirectional Negative Feedback (BNF) during optimization.
Our proposed BNF loss eliminates the need for pairwise contrastive losses and does not require any extra tunable hyper-parameters or pairwise preference data, streamlining the alignment pipeline to be as simple as supervised fine-tuning.
We conduct extensive experiments across two challenging QA benchmarks and four reasoning benchmarks.
The experimental results show that BNF achieves comparable performance to the best methods on QA benchmarks, while its performance decrease on the four reasoning benchmarks is significantly lower compared to the best methods, thus striking a better balance between value alignment and reasoning ability.
In addition, we further validate the performance of BNF on non-pairwise datasets, and conduct in-depth analysis of log-likelihood and logit shifts across different preference optimization methods.
Github Url: https://github.com/MaoXinn/BNF/ .

## 1 Introduction

Alignment of Large Language Models (LLMs) plays a pivotal role in ensuring that these LLMs behave in accordance with human values and expectations (Bai et al., ). As LLMs become increasingly integrated into various applications (Zhang et al., ; Roziere et al., ), ensuring proper alignment is crucial to mitigate risks such as biased or harmful outputs, while also enhancing trustworthiness. One of the most prominent LLM alignment methods is Reinforcement Learning from Human Feedback (Ouyang et al., ) with Proximal Policy Optimization (RLHF-PPO) (Schulman et al., ), which underpins the success of ChatGPT. However, despite its achievements, RLHF-PPO faces notable limitations, particularly regarding the high computational costs associated with reward modeling and online sampling (Casper et al., ). These challenges complicate its widespread adoption, especially in scenarios where computational resources are limited.

In response to these limitations, Direct Preference Optimization (DPO) (Rafailov et al., ) and its derivative methods (Ethayarajh et al., ; Zhao et al., ) aim to simplify the overall alignment pipeline by eliminating the need for reward and value models, as well as online sampling.
Despite achieving impressive performance on QA and Chatbot tasks (Meng et al., ), DPO-series methods remain highly sensitive to hyper-parameters and often exhibit instability (Xu et al., ).
This instability is particularly pronounced when applied to mathematical datasets, leading to potential training collapse (Pal et al., ).
Recently, several efforts (Xu et al., ; Pal et al., ) have been made to address this issue.
They attribute the collapse to an erroneous decrease in the likelihood of the preferred samples and propose using Negative Log Likelihood (NLL) regularization to stabilize the training process.
Although these methods successfully prevent the model from collapsing on mathematical datasets, they perform poorly on several popular Chat and QA benchmarks (Meng et al., ) and introduce additional hyper-parameters.

Figure: Figure 1: The likelihood-derivative curve of NLL and BNF loss.
Refer to caption: x1.png

Different from previous studies, we argue that the instability of DPO stems from a more fundamental cause: the unidirectional likelihood-derivative negative feedback inherent in the log-likelihood loss.
As shown in Figure 1, when applying the NLL loss to increase the likelihood $\pi_{\theta}(y_{w}|x)=\frac{e^{z_{y_{w}}}}{\sum_{k=1}^{|\mathcal{V}|}e^{z_{k}}}$ of a preferred output $y_{w}$, the partial derivative $\left|\frac{\partial\mathcal{L}_{\text{NLL}}}{\partial z_{y_{w}}}\right|$ with respect to the unnormalized logit $z_{y_{w}}$ will gradually decrease, which limits the rate of future increases in $z_{y_{w}}$ and $\pi_{\theta}(y_{w}|x)$, preventing the model from over-fitting.
However, when the same loss is used to decrease the likelihood of a dispreferred output $y_{l}$, this negative feedback turns into a positive one.
As $\pi_{\theta}(y_{l}|x)$ decreases, $\left|\frac{\partial-\mathcal{L}_{\text{NLL}}}{\partial z_{y_{l}}}\right|$ continues to rise, which further accelerates subsequent decreases in $z_{y_{l}}$ and $\pi_{\theta}(y_{l}|x)$, ultimately resulting in model collapse.
To mitigate this issue, DPO-series methods introduce pairwise contrastive losses to constrain the likelihood of $y_{l}$ from deviating excessively from that of the preferred sample $y_{w}$.
However, this constraint is sensitive to hyper-parameters and lacks stability, resulting in the failure of DPO on mathematical datasets in practice.

Based on the above findings, we propose a novel alignment loss, Bidirectional Negative Feedback (BNF) loss.
As shown in Figure 1, when optimizing with BNF loss, the partial derivative $\left|\frac{\partial\mathcal{L}}{\partial z_{y}}\right|$ reaches its maximum only when $\pi_{\theta}(y|x)=\pi_{\text{ref}}(y|x)$ (i.e., the initial state). Whether the likelihood $\pi_{\theta}(y|x)$ increases or decreases, $\left|\frac{\partial\mathcal{L}}{\partial z_{y}}\right|$ decreases linearly in both directions, thus establishing a bidirectional negative feedback.
Since this bidirectional negative feedback fundamentally addresses the issue of excessive decreases in the likelihood of dispreferred samples, BNF eliminates the need for pairwise contrastive losses, further streamlining the alignment pipeline to be as simple as supervised fine-tuning.
In summary, BNF loss offers the following advantages:

- •
Less alignment tax:
Recent studies (Ouyang et al., ; Lin et al., ) have shown that using preference optimization methods to align LLMs with human values often harms their reasoning ability, referred to as the alignment tax.
With the bidirectional negative feedback, our proposed BNF can naturally prevent the model from over-fitting to preference data, striking a better balance between human values and reasoning ability while minimizing the alignment tax.
- •
Fewer tunable hyper-parameters:
Since the need for pairwise contrastive losses is eliminated, our proposed BNF loss does not involve any extra tunable hyper-parameters such as scaling factor $\beta$ in DPO (Rafailov et al., ), margin $\gamma$ in SimPO (Meng et al., ) or NLL regularization weight $\lambda$ in SLiC (Zhao et al., ), which significantly reduces the cost of grid searches.
- •
Less pairwise data:
In addition to fewer tunable hyper-parameters, the removal of pairwise contrastive losses means that BNF no longer relies on pairwise preference data. Similar to KTO (Ethayarajh et al., ), BNF loss only requires either single preferred or dispreferred samples without the need for pairwise matching, significantly reducing data construction costs.

**Table 1: Elo Rank on Wild-Bench.**
| Model | Elo |
| --- | --- |
| GPT-4o (05-13) | 1237 |
| Claude-3-Opus | 1216 |
| Gemma-2-9B-BNF | 1186 |
| Nemotron-4-340B-it | 1184 |
| Gemma-2-27B-it | 1183 |
| Gemma-2-9B-SimPO | 1181 |
| Gemma-2-9B-DPO | 1181 |

To comprehensively evaluate the effectiveness of our proposed BNF, we conduct extensive comparison experiments across two popular QA benchmarks and four reasoning benchmarks, using three $7$B-$9$B LLMs as the base models.
On two QA benchmarks, BNF achieves comparable performance to the best baselines, SimPO and DPO. Notably, we produce a top-performing model, based on Gemma-2-9B-it (Team et al., ), which outperforms not only all baselines but also larger scale LLMs like Gemma-2-27B-it and Nemotron-4-340B-instruct (Adler et al., ) on the most challenging benchmark, Wild-Bench (Lin et al., ). As for the reasoning benchmarks, BNF’s performance decrease is significantly lower than that of SimPO (Meng et al., ) and DPO, indicating that BNF can strike a better balance between value alignment and reasoning abilities, thus paying less alignment tax.
In addition, we design an experiment to validate the performance of BNF on non-pairwise datasets and conduct in-depth analysis of log-likelihood and logit shifts across different preference optimization methods.

## 2 Theoretical Analysis of Log-Likelihood and DPO

In this section, we first provide a detailed discussion on how the unidirectional negative feedback leads to an excessive decrease in the likelihood of dispreferred samples, ultimately causing model collapse. Then, we explain how DPO-series methods mitigate this excessive decrease by employing a pairwise contrastive loss, and why this approach is ineffective for mathematical datasets.

### 2.1 Limitation of Log-likelihood Loss

In the Supervised Fine-Tuning (SFT) stage, we typically only use the NLL loss to maximize the likelihood of each sample from the dataset without worrying about collapse.
In the alignment stage, a naive approach would be to try the following log-likelihood loss for preference optimization:

$$ $\mathcal{L_{\text{NLL+PLL}}}=\mathbb{E}_{(x,y_{w},y_{l})\sim\mathcal{D}}[-\log \pi_{\theta}(y_{w}|x)+\log\pi_{\theta}(y_{l}|x)]$ (1) $$

This naive loss tries to increase the likelihood of the preferred sample $y_{w}$ with NLL and decrease the likelihood of the dispreferred sample $y_{l}$ with Positive Log Likelihood (PLL). However, LLMs will quickly collapse when optimized with the above loss (Rafailov et al., ).
As mentioned in Section 1, the underlying reason is the unidirectional likelihood-derivative negative feedback inherent in the log-likelihood loss.
Let’s consider a simple case where the response $y$ consists of only a single token.
When we apply the NLL loss to increase the likelihood $\pi_{\theta}(y_{w}|x)$ of the preferred $y_{w}$:

$$ $\mathcal{L}_{\text{NLL}}=\mathbb{E}_{(x,y_{w})\sim\mathcal{D}}[-\log\pi_{ \theta}(y_{w}|x)]=\mathbb{E}_{(x,y_{w})\sim\mathcal{D}}\left[-\log\frac{e^{z_{ y_{w}}}}{\sum_{k=1}^{|\mathcal{V}|}e^{z_{k}}}\right]$ (2) $$

where $|\mathcal{V}|$ is the vocabulary size.
The partial derivative of the NLL loss with respect to the logit $z_{y_{w}}$ is given by $\left|\frac{\partial\mathcal{L_{\text{NLL}}}}{\partial z_{y_{w}}}\right|=1-\pi
_{\theta}(y_{w}|x)$ (derivation in Appendix A.1).
In this case, the likelihood $\pi_{\theta}(y_{w}|x)$ and the partial derivative $\left|\frac{\partial\mathcal{L}_{\text{NLL}}}{\partial z_{y_{w}}}\right|$ actually establish a stable negative feedback.
As $\pi_{\theta}(y_{w}|x)$ increases, $|\frac{\partial\mathcal{L}_{\text{NLL}}}{\partial z_{y_{w}}}|$ gradually decreases, which limits the rate of future increases in $z_{y_{w}}$ and $\pi_{\theta}(y_{w}|x)$, thereby preventing the model from over-fitting.

However, this negative feedback is unidirectional.
When $\mathcal{L}_{\text{PLL}}=\mathbb{E}_{(x,y_{l})\sim\mathcal{D}}[\log\pi_{\theta
}(y_{l}|x)]$ is used to decrease the likelihood $\pi_{\theta}(y_{l}|x)$, the above negative feedback will turn into a positive one, which means that any decrease in $\pi_{\theta}(y_{l}|x)$ will further accelerate itself.
As $\pi_{\theta}(y_{l}|x)$ decreases, the partial derivative $|\frac{\partial\mathcal{L}_{\text{PLL}}}{\partial z_{y_{l}}}|=1-\pi_{\theta}(y
_{l}|x)$ continues to rise, which further accelerates subsequent decreases in $z_{y_{l}}$ and $\pi_{\theta}(y_{l}|x)$, ultimately resulting in model collapse.
Similarly, since the log-likelihood of a longer response is the sum of the log-likelihoods of individual tokens $\log\pi_{\theta}(y|x)=\sum_{i}\log\pi_{\theta}(y_{i}|x,y_{<i})$, the aforementioned conclusion still holds.

### 2.2 Role of Pairwise Contrastive Losses

Since solely using vanilla log-likelihood loss in preference optimization will cause model collapse, DPO-series methods introduce pairwise contrastive losses to stabilize the optimization process.
The gradients of most DPO-series methods with respect to parameters $\theta$ could be written as follows:

$$ $\displaystyle\nabla_{\theta}\mathcal{L}=\mathbb{E}_{(x,y_{w},y_{l})\sim \mathcal{D}}\bigg{[}\underbrace{\mathcal{C}(y_{l},y_{w},\pi_{\theta},\pi_{ \text{ref}})}_{\text{constrain the log-likelihoods gap}}\Big{[}-\underbrace{ \nabla_{\theta}\log\pi_{\theta}(y_{w}|x)}_{\text{increase likelihood of }y_{w} }+\underbrace{\nabla_{\theta}\log\pi_{\theta}(y_{l}|x)}_{\text{ decrease likelihood of }y_{l}}\Big{]}\bigg{]}$ (3) $$

The second half of Eq. (3) is similar to the gradient of Eq. (1), which aims to increase the likelihood of the preferred sample $y_{w}$ and decrease the likelihood of the dispreferred sample $y_{l}$. The key difference is the introduction of a pairwise contrastive function $\mathcal{C}(y_{l},y_{w},\pi_{\theta},\pi_{\text{ref}})$, which constrains the likelihood of dispreferred samples from deviating excessively from that of the preferred ones.
Taking DPO as an example, $\mathcal{C}_{\text{DPO}}(y_{l},y_{w},\pi_{\theta},\pi_{\text{ref}})=\beta\cdot
\sigma\left(\beta\log\frac{\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(y_{l}|x)}-
\beta\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{\text{ref}}(y_{w}|x)}\right)$, where $\mathcal{C}_{\text{DPO}}$ decreases gradually as the log-likelihood gap between $y_{l}$ and $y_{w}$ increases, creating a negative feedback that constrains $\log\pi_{\theta}(y_{l}|x)$ from deviating excessively from $\log\pi_{\theta}(y_{w}|x)$ .
Table 2 lists several representative DPO-series methods and their derived constraint functions $\mathcal{C}$. Despite variations in specific implementations, these methods share a common core idea: using pairwise contrastive losses to avoid excessive decreases in the likelihood of dispreferred samples.

**Table 2: The objective $\mathcal{L}$ and derived constraint $\mathcal{C}$ of representative DPO-series methods.**
| Method | Objective $\bm{\mathcal{L}}$ | $\bm{\mathcal{C}(y_{w},y_{l},\pi_{\theta},\pi_{\textbf{ref}})}$ |
| --- | --- | --- |
| SLiC-HF (Zhao et al., ) | $\max\left(0,\delta-\log\pi_{\theta}(y_{w}|x)+\log\pi_{\theta}(y_{l}|x)\right)$ | $f(x)=\begin{cases}1,&\text{if }\log\pi_{\theta}(y_{w}|x)-\log\pi_{\theta}(y_{l<br>}|x)<\delta\\<br>0,&\text{if }\log\pi_{\theta}(y_{w}|x)-\log\pi_{\theta}(y_{l}|x)>=\delta\end{cases}$ |
| DPO (Rafailov et al., ) | $-\log\sigma\left(\beta\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{\text{ref}}(y_{w}|<br>x)}-\beta\log\frac{\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(y_{l}|x)}\right)$ | $\beta\cdot\sigma\left(\beta\log\frac{\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(y<br>_{l}|x)}-\beta\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{\text{ref}}(y_{w}|x)}\right)$ |
| IPO (Azar et al., ) | $\left(\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{\text{ref}}(y_{w}|x)}-\log\frac{<br>\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(y_{l}|x)}-\frac{1}{2\tau}\right)^{2}$ | $2\cdot\left(\frac{1}{2\tau}+\log\frac{\pi_{\theta}(y_{l}|x)}{\pi_{\text{ref}}(<br>y_{l}|x)}-\log\frac{\pi_{\theta}(y_{w}|x)}{\pi_{\text{ref}}(y_{w}|x)}\right)$ |
| SimPO (Meng et al., ) | $-\log\sigma\left(\frac{\beta}{|y_{w}|}\log\pi_{\theta}(y_{w}|x)-\frac{\beta}{|<br>y_{l}|}\log\pi_{\theta}(y_{l}|x)-\gamma\right)$ | $\sigma\left(\gamma+\frac{\beta}{|y_{l}|}\log\pi_{\theta}(y_{l}|x)-\frac{\beta}<br>{|y_{w}|}\log\pi_{\theta}(y_{w}|x)\right)$ |

### 2.3 Failure on Mathematical Datasets

Generally, constructing a preference dataset involves three steps: (1) generating multiple responses for each prompt in the instruction dataset, (2) scoring each response with human annotators or reward models, and (3) selecting the highest and lowest scoring responses as the preference pair.
However, since mathematical reasoning requires rigorous logic, the diversity of responses to math problems is often significantly lower compared to other types of problems.
As a result, mathematical preference datasets often contain many highly similar pairs, some differing by even only one single token (^1^11[https://huggingface.co/datasets/argilla/distilabel-math-preference-dpo](https://huggingface.co/datasets/argilla/distilabel-math-preference-dpo)).
Given this data distribution, selecting an appropriate scaling factor $\beta$ for DPO-series methods is challenging, as it is difficult to create a substantial log-likelihood gap for highly similar preference pairs.
As illustrated in Figure 2, although the likelihood of the correct answer is significantly greater than that of the incorrect one ($0.8$ vs. $0.05$), the total log-likelihood gap still only amounts to $1.2$.
In this situation, if the scaling factor $\beta$ is set as usually (e.g., $0.1$ in DPO), the scaled gap will become extremely small, which may cause the pairwise contrastive function $\mathcal{C}$ to fail in preventing the excessive decrease of $\pi_{\theta}(y_{l}|x)$.
Conversely, if $\beta$ is set higher than usual, it may lead to underfitting for the preference pairs with less overlap, which also negatively affects performance.
Recent studies have proposed two solutions: (1) adding NLL regularization to maximize the likelihood of preferred responses (Saeidi et al., ), and (2) directly removing preference pairs with small edit distances from the dataset (Pal et al., ). While these methods can resolve the collapse issue in mathematical datasets, they often perform poorly on QA benchmarks (Meng et al., ).

Figure: Figure 2: An example of mathematical preference dataset. Due to the significant overlap between preferred and dispreferred samples, it is difficult to create a substantial log-likelihood gap.
Refer to caption: x2.png

## 3 Bidirectional Negative Feedback Loss

In this section, we provide a detailed introduction to the proposed Bidirectional Negative Feedback (BNF) loss, including optimization objective and gradient analysis.

### 3.1 Optimization Objective

In Section 2, we argue that the limitation of the log-likelihood loss in preference optimization stems from the unidirectional negative feedback.
While DPO-series methods introduce pairwise contrastive losses to address this issue, they face challenges in hyper-parameter tuning, especially when applied to mathematical preference datasets.
Building on these insights, we propose a novel alignment loss that establishes a bidirectional negative feedback, eliminating the need for contrastive losses and simplifying LLM alignment to the level of supervised fine-tuning.
Given a policy model $\pi_{\theta}$, a reference model $\pi_{\text{ref}}$, and a preference dataset $\mathcal{D}$ where each response is labeled as either preferred or not (without necessarily being paired), the optimization objective of our proposed BNF loss is described as follows:

$$ $\mathcal{L}_{\text{BNF}}=-\mathbb{E}_{(x,y)\sim\mathcal{D}}\left[\frac{\text{ label}(y)}{|y|}\sum_{i}^{|y|}\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{j })\log\pi_{\theta}(t_{j}|x,y_{<i})\right]$ (4) $$

where $|y|$ represents the length of the response $y$, $\text{label}(y)=\left\{\begin{array}[]{ll}1,&\text{if $y$ is preferred}\\
-1,&\text{if $y$ is dispreferred}\end{array}\right.$ is the annotation label of $y$, $|\mathcal{V}|$ is the vocabulary size, and $t_{j}$ is the $j$-th token in the vocabulary.
In fact, Eq (4) is merely a standard length-normalized cross-entropy loss.
If we adopt the following one-hot $f_{\text{BNF}}=f_{\text{LL}}$ as the target distribution, the proposed loss will be same with Eq. (1):

$$ $f_{\text{LL}}(y_{i},t_{j})=\begin{cases}1,&\text{if }y_{i}=t_{j}\\ 0,&\text{if }y_{i}\neq t_{j}\end{cases}$ (5) $$

Therefore, the core of our proposed method lies in the target distribution $f_{\text{BNF}}(y_{i},t_{j})$ of the cross-entropy loss, which we call Dynamic Target Distribution (DTD):

$$ $f_{\text{BNF}}(y_{i},t_{j})=\begin{cases}sg\left[\min\left(\frac{\pi_{\theta}( y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i})},1\right)\right],&\text{if } y_{i}=t_{j}\vspace{10pt}\\ sg\left[\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_{i}|x,y_{<i})} \pi_{\theta}(t_{j}|x,y_{<i})\right],&\text{if }y_{i}\neq t_{j}\end{cases}$ (6) $$

where $sg$ represents the stop gradient operation (i.e., detach in PyTorch).
Since $f_{\text{BNF}}(y_{i})$ satisfies $f_{\text{BNF}}(y_{i},t_{j})\geq 0$ and $\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{j})=1$ for all $y_{i}$ and $t_{j}$ (derivation in Appendix A.2), it constitutes a valid probability distribution.
Although DTD seems complex at first glance, its code implementation is quite simple and efficient (as shown in Appendix B). Moreover, compared to DPO-series methods, the BNF loss involves no tunable hyper-parameters and eliminates the need for pairwise preference data, which reduces the costs of grid searches and dataset construction.
In the next section, we will explain how this loss function establishes a bidirectional negative feedback.

### 3.2 Gradient Analysis

For a mechanistic understanding of the proposed BNF loss, we need to analyze the gradient of the loss function $\mathcal{L}_{\text{BNF}}$.
The gradient with respect to parameters $\theta$ can be written as:

$$ $\displaystyle\nabla_{\theta}\mathcal{L}_{\text{BNF}}=-\mathbb{E}_{(x,y)\sim \mathcal{D}}\sum_{i}^{|y|}\sum_{j}^{|\mathcal{V}|}\frac{\partial\mathcal{L}_{ \text{BNF}}}{\partial z^{x,y_{<i}}_{t_{j}}}\nabla_{\theta}z_{t_{j}}^{x,y_{<i}}$ (7) $$

where $z_{t_{j}}^{x,y_{<i}}$ represents the original ouput logit of $\pi_{\theta}(t_{j}|x,y_{<i})$ before Softmax .
Since $f_{\text{BNF}}(y_{i})$ is a valid probability distribution with stop gradient, the partial derivative $\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}$ with respect to any output logits $z_{t_{k}}^{x,y_{<i}}$ can be obtained as follows (derivation in Appendix A.3):

$$ $\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}=\frac{ \text{label}(y)}{|y|}\big{[}\pi_{\theta}(t_{k}|x,y_{<i})-f_{\text{BNF}}(y_{i}, t_{k})\big{]}$ (8) $$

By substituting Eq. (6) into Eq. (8), we can derive a function between $\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}\right|$ and $\pi_{\theta}(t_{k}|x,y_{<i})$ (as shown in Appendix A.4).
Here, we focus on the token $t_{k}=y_{i}$ within the responses $y$:

$$ $\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}} \right|=\frac{\text{label}(y)}{|y|}\cdot\begin{cases}\pi_{\theta}(y_{i}|x,y_{< i})\frac{1-\pi_{\text{ref}}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i})} ,&\text{if }\pi_{\theta}(y_{i}|x,y_{<i})<\pi_{\text{ref}}(y_{i}|x,y_{<i}) \vspace{10pt}\\ 1-\pi_{\theta}(y_{i}|x,y_{<i}),&\text{if }\pi_{\theta}(y_{i}|x,y_{<i})\geq\pi_ {\text{ref}}(y_{i}|x,y_{<i})\end{cases}$ (9) $$

From this piecewise function, we can observe that the partial derivative $\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}\right|$ reaches its maximum only when $\pi_{\theta}(y_{i}|x,y_{<i})=\pi_{\text{ref}}(y_{i}|x,y_{<i})$.
When $\pi_{\theta}(y_{i}|x,y_{<i})<\pi_{\text{ref}}(y_{i}|x,y_{<i})$, since $\frac{1-\pi_{\text{ref}}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i})}$ is always greater than 0 0, $\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}\right|$ decreases linearly as $\pi_{\theta}(y_{i}|x,y_{<i})$ decreases until it reaches 0.
In contrast, when $\pi_{\theta}(y_{i}|x,y_{<i})\geq\pi_{\text{ref}}(y_{i}|x,y_{<i})$,
$\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}\right|$ is equal to that of the NLL loss, decreasing linearly as $\pi_{\theta}(y_{i}|x,y_{<i})$ increases.
In this way, the proposed BNF loss establishes a bidirectional negative feedback between the partial derivatives and the likelihoods, aligning precisely with the illustration in Figure 1.

**Table 3: Statistical comparison of two instruction-following QA benchmarks.**
| Dataset | #Tasks | #Turns | ChatHistory | QueryLen | PromptLen | RealUser | Evaluation |
| --- | --- | --- | --- | --- | --- | --- | --- |
| ArenaHard | 500 | 1 | × | 406 | 406 | ✓ | Pair |
| Wild-Bench | 1,024 | $\leq$5 | ✓ | 979 | 3,402 | ✓ | Score+Pair |

## 4 Experimental Setup

We follow the experimental setup of SimPO (Meng et al., ) to objectively assess the effectiveness of our proposed method.
They provide numerous checkpoints aligned with DPO-series methods and the corresponding training datasets, we acknowledge their contributions.
For a reference, we list the GPU hours for training and API cost for evaluation in Appendix C.

Models and training datasets.
In this paper, we adopt three mainstream open-source LLMs as the base models: [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) (Jiang et al., ), [Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) (Dubey et al., ), and [Gemma-2-9b-it](https://huggingface.co/google/gemma-2-9b-it) (Team et al., ).
For a fair comparison, we use the same preference training datasets constructed by SimPO.
Specifically, for each prompt $x$ in Ultrafeedback (Cui et al., ), they generate $5$ responses with a sampling temperature of $0.8$.
Then, using PairRM (Jiang et al., ) or ArmoRM (Wang et al., ) to score the $5$ responses, selecting the highest-scoring one as $y_{w}$ and the lowest-scoring one as $y_{l}$.
Here are the three training datasets: [Mistral-Ultrafeedback-PairRM](https://huggingface.co/datasets/princeton-nlp/mistral-instruct-ultrafeedback), [Llama3-Ultrafeedback-ArmoRM](https://huggingface.co/datasets/princeton-nlp/llama3-ultrafeedback-armorm), and [Gemma2-Ultrafeedback-ArmoRM](https://huggingface.co/datasets/princeton-nlp/gemma2-ultrafeedback-armorm).

Training hyper-parameters.
In this paper, we set the maximum sequence length to $4096$ and adopt the AdamW optimizer (Loshchilov & Hutter, ), applying cosine learning rate schedule with $10\%$ warm-up steps.
Since our proposed BNF loss does not have any extra tunable hyper-parameters, we only perform grid searches on batch size {$64$, $128$, $256$} and learning rate {5e-7, 6e-7, 8e-7, 1e-6}.
After grid search, we adopt a unified batch size of $128$ and select learning rates of 5e-7 for Mistral-7B-Instruct-v0.2, 6e-7 for Meta-Llama-3-8B-Instruct, and 8e-7 for Gemma-2-9b-it.

Baselines.
In addition to DPO (Rafailov et al., ), we also compare our proposed BNF loss with the following strong baselines in preference optimization:
(1) SLiC-HF (Zhao et al., ) is based on contrastive ranking loss, which directly applies log-likelihood and integrates an SFT objective.
(2) IPO (Azar et al., ) is a theoretically grounded method designed to bypass DPO’s assumption that pairwise preferences can be replaced by pointwise rewards.
(3) KTO (Ethayarajh et al., ) learns from preference data that is not pairwise.
(4) RDPO (Park et al., ) introduces a length regularization term to prevent exploitation of length.
(5) SimPO (Meng et al., ) is a simpler and effective preference optimization method without using a reference model.
All the baselines have been well-tuned through hyper-parameter grid searches, as described in Meng et al. ().

Evaluation benchmarks.
We primarily evaluate all the models using two recent proposed instruction-following QA benchmarks:
Arena-Hard (Li et al., ) and Wild-Bench(Lin et al., ).
Arena-Hard, an enhanced version of MT-Bench (Zheng et al., ), includes $500$ high-quality prompts from real user queries.
For Arena-Hard, we report the standard win rate (WR) and length-controlled win rate (LC), using GPT-4-0314 as the reference model and GPT-4o-mini as the evaluator(^2^22The original evaluator was GPT-4-Turbo, we replace it with GPT-4o-mini due to the high API costs.).
Wild-Bench is a highly challenging benchmark, featuring longer prompts and more difficult questions sourced from real users.
Besides scoring each response on a $100$-point scale, Wild-Bench further introduces LMSYS-Elo (Chiang et al., ) to better rank all the models.
For Wild-Bench, we report Elo and score using GPT-4o as the evaluator.
The statistical comparison of these benchmarks are listed in Table 3.
The reason we do not adopt MT-bench and AlpacaEval (Dubois et al., ) is due to the significant flaws in these datasets: MT-bench only contains $80$ samples and exhibits poor separability across different methods (Meng et al., ). AlpacaEval is a highly imbalanced dataset, with $50\%$ of the question types focused on information seeking, while less than $20\%$ are related to reasoning.
In fact, Arena-Hard and Wild-Bench are upgraded versions of MT-Bench and AlpacaEval, offering more challenging tasks with a more balanced distribution.
Furthermore, we also evaluate all the models on four logical reasoning benchmarks to verify the impact of these alignment methods on model’s reasoning abilities, including: MMLU-redux (Gema et al., ) (Language), CRUX (Gu et al., ) (Code), GSM8K (Cobbe et al., ) and MATH-L5 (Hendrycks et al., ) (Math).
For these reasoning benchmarks, we use ZeroEval (Lin, ) as the evaluator, which aims to evaluate instruction-tuned LLMs for their zero-shot performance.

## 5 Experimental Results

Table 4 presents the detailed experimental results of all preference optimization methods across six benchmarks and three base models, covering both performance and relative rankings. In this section, we first provide a comprehensive analysis of these statistics. Then, we conduct an experiment to evaluate the performance of our proposed BNF on non-pairwise preference datasets. Finally, we analyze the log-likelihood and logit shifts under different preference optimization methods.
In addition, we provide some response comparisons in Appendix D for reference.

**Table 4: Main experimental results across all benchmarks. The numbers in parentheses ($x$) indicate the relative ranking of each method under this metric, while Average Rank represents the average ranking across all metrics for each method. For Gemma-2, since Meng et al. () only provides the checkpoints for DPO and SimPO, BNF is compared exclusively with these two methods.**
| Method | Meta-Llama-3-8B-Instruct |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Wild-Bench | Arena-Hard | GSM8K | MATH | CRUX | MMLU | Average |  |  |  |
| Elo | Score | LC (%) | WR(%) | Acc (%) | Acc (%) | Acc (%) | Acc (%) | Rank |  |
| Base | 1131 (8) | 29.2 (8) | 33.9 (8) | 36.1 (8) | 78.5 (3) | 6.8 (7) | 38.1 (3) | 62.4 (3) | 6.00 |
| SLiC-HF | 1142 (6) | 33.2 (7) | 49.1 (6) | 46.3 (6) | 66.6 (7) | 8.3 (6) | 33.9 (6) | 61.4 (4) | 6.00 |
| DPO | 1155 (1) | 39.5 (1) | 60.4 (1) | 62.2 (1) | 70.5 (6) | 8.5 (5) | 31.8 (8) | 56.4 (7) | 3.75 |
| IPO | 1146 (5) | 36.1 (5) | 50.1 (4) | 51.3 (4) | 79.9 (1) | 9.2 (4) | 39.2 (1) | 59.8 (6) | 3.75 |
| KTO | 1139 (7) | 34.7 (6) | 45.4 (7) | 45.8 (7) | 78.8 (2) | 10.0 (1) | 38.9 (2) | 63.7 (1) | 4.13 |
| ORPO | 1149 (3) | 36.2 (4) | 49.6 (5) | 49.2 (5) | 74.8 (5) | 9.3 (2) | 34.5 (5) | 63.5 (2) | 3.88 |
| SimPO | 1149 (3) | 37.2 (3) | 52.2 (3) | 52.5 (2) | 56.6 (8) | 6.0 (8) | 32.6 (7) | 55.0 (8) | 5.25 |
| BNF | 1153 (2) | 37.5 (2) | 54.8 (2) | 52.1 (3) | 77.0 (4) | 9.3 (2) | 35.4 (4) | 61.4 (4) | 2.88 |

### 5.1 Main Experiment Analysis

Preference optimization is essential for QA.
From Table 4, we observe that all three base models rank the lowest on two QA benchmarks, Wild-Bench and Arena-Hard, while all preference optimization methods achieve significant performance improvements. More specifically, DPO, SimPO, and our proposed BNF demonstrate superior performance compared to other methods, consistently securing the top three positions across all QA metrics. DPO performs best on Meta-Llama-3, SimPO works best on Mistral-7B, and our proposed BNF exhibits outstanding performance on Gemma-2. These experimental results indicate that preference optimization is essential for improving model performance on QA tasks and demonstrate that our proposed BNF can deliver performance comparable to, or even superior to, the strongest preference optimization baselines.

BNF pays the lowest alignment tax.
When our attention shifts to reasoning benchmarks, we find that the methods excelling in QA benchmarks often perform poorly in reasoning benchmarks, which is also referred to as alignment tax (Ouyang et al., ).
For instance, SimPO, which performs well on QA, experiences a significant drop in performance on reasoning, with a more than $10\%$ performance decrease on GSM8K, ranking nearly at the bottom.
In contrast, KTO, which excels in reasoning benchmarks, performs poorly on QA benchmarks, only slightly better than base models.
Some studies (Lin et al., ) suggest that alignment tax occurs due to over-fitting to preference data, leading to a decline in reasoning ability.
With the bidirectional negative feedback, our proposed BNF can automatically constrain the model from over-fitting to preference datasets, thus preserving the reasoning ability.
Experimental results show that BNF achieves the best average relative ranking across three base models (last column of Table 4), indicating that BNF strikes a better balance between QA and reasoning ability, thus paying the lowest alignment tax.

**Table 5: Average output length.**
| Method | Meta-Llama-3 | Mistral-7B |  |  |
| --- | --- | --- | --- | --- |
| WB | AH | WB | AH |  |
| Base | 2975 | 595 | 2832 | 507 |
| SLiC-HF | 2318 $\downarrow$ | 469 $\downarrow$ | 3198 $\uparrow$ | 576 $\uparrow$ |
| DPO | 2665 $\downarrow$ | 602 $\uparrow$ | 2655 $\downarrow$ | 509 $\uparrow$ |
| IPO | 2843 $\downarrow$ | 547 $\downarrow$ | 3431 $\uparrow$ | 545 $\uparrow$ |
| KTO | 2776 $\downarrow$ | 543 $\downarrow$ | 2813 $\downarrow$ | 504 $\downarrow$ |
| ORPO | 2551 $\downarrow$ | 523 $\downarrow$ | 2913 $\uparrow$ | 524 $\uparrow$ |
| SimPO | 2533 $\downarrow$ | 527 $\downarrow$ | 3214 $\uparrow$ | 521 $\uparrow$ |
| BNF | 2521 $\downarrow$ | 496 $\downarrow$ | 2827 $\downarrow$ | 526 $\uparrow$ |

Response length of different methods.
Some recent studies (Xu et al., ) argue that the models trained with DPO tend to produce verbose responses that may degrade the quality of results.
To investigate this issue, we calculate the average response length of all preference optimization methods on two QA benchmarks and list their statistics in Table 5.1.
On Meta-Llama-3, the average response lengths of almost all methods decrease.
However, on Mistral-7B, only KTO’s response length decrease on both two benchmarks, while all other methods see an increase on at least one benchmark.
Despite the introduction of length normalization, the response length of SimPO on Mistral-7B still increase significantly.
These statistics indicate that average response lengths are closely related to the base models.
DPO does not necessarily generate longer responses, and specially designed method may also fail on certain models.

### 5.2 Non-pairwise Optimization

With the bidirectional negative feedback, BNF no longer requires pairwise contrastive losses to constrain the excessive decrease in the likelihood of dispreferred samples. Therefore, BNF fundamentally eliminates the need for preference pairs during optimization. To evaluate its performance with non-pairwise preference datasets, we randomly mask either the preferred or dispreferred response from the original preference pairs with a certain probability. Table 6 presents the experimental results with different pairing ratios. On QA benchmarks, it is evident that more pairwise preference data leads to better performance. However, even without any preference pairs, BNF still achieves significant performance improvements over the base model, with an average score increase of $6.8$ on Wild-Bench and a $12.3\%$ win rate improvement on Arena-Hard. Interestingly, the alignment tax phenomenon is also observed in this scenario. At a $0\%$ pairing ratio, the absence of preference pairs prevents over-fitting to preference data. While this leads to lower performance gains in QA, the model’s reasoning ability improves on mathematical datasets, showing a $1.6\%$ increase on GSM8K and a $2.6\%$ improvement on Math-L5.

**Table 6: Experimental results with different pairing ratios. A ratio of $50\%$ indicates that in half of the preference pairs, one response is randomly masked. A ratio of $0\%$ means that no pairwise data is included in the dataset, while $100\%$ represents the original preference dataset.**
| Pairing-Ratio | Meta-Llama-3-8B-Instruct |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Wild-Bench | Arena-Hard | GSM8K | MATH | CRUX | MMLU | Average |  |  |  |
| Elo | Score | LC (%) | WR(%) | Acc (%) | Acc (%) | Acc | Acc (%) | Rank |  |
| Base | 1131 (5) | 29.2 (5) | 33.9 (5) | 36.1 (5) | 78.5 (2) | 6.8 (5) | 38.1 (1) | 62.4 (1) | 3.63 |
| 0% | 1146 (4) | 36.0 (4) | 49.3 (4) | 48.4 (4) | 80.1 (1) | 9.4 (2) | 35.6 (4) | 62.2 (2) | 3.13 |
| 25% | 1148 (2) | 36.2 (3) | 51.5 (3) | 49.7 (3) | 77.9 (3) | 9.3 (3) | 36.7 (3) | 61.8 (3) | 2.88 |
| 50% | 1148 (2) | 36.7 (2) | 53.5 (2) | 51.4 (2) | 76.4 (5) | 10.0 (1) | 37.9 (2) | 61.2 (5) | 2.63 |
| 100% | 1153 (1) | 37.5 (1) | 54.8 (1) | 52.1 (1) | 77.0 (4) | 9.3 (3) | 35.4 (5) | 61.4 (4) | 2.5 |

### 5.3 Distributions of Log-Likelihood and Logit

To gain a deeper understanding of the optimization behavior of BNF, we analyze log-likelihood and logit shifts between policy and reference models using $1,000$ questions from Wild-Bench (Lin et al., ). We apply greedy decoding to generate responses using BNF and three baselines: DPO, IPO, and SimPO. The base model is Llama-3-8B-Instruct.

[Uncaptioned image]: x3.png

[Uncaptioned image]: x4.png

Figure: Figure 3: Comparisons between BNF, DPO, IPO, and SimPO. (a) Log-likelihood shifts. (b) Absolute logit shifts. (c) Logit shifts vs. log-likelihood shifts. (d) Length-normalized log-likelihood shifts. (e) Length-normalized absolute logit shifts. (f) Gini coefficients for logits.
Refer to caption: x5.png

#### BNF exhibits minimal log-likelihood shift.

Our experiments reveal that BNF exhibits the least log-likelihood shift (Figure 3a and 3d), which may help preserve reasoning and comprehension capabilities from the reference model. In contrast, SimPO shows the largest shift, potentially explaining its inferior performance in these areas.

#### BNF’s uniform logit increase leads to unique shift pattern.

Interestingly, BNF shows larger logit shifts compared to DPO and IPO (Figure 3b and 3e), which also require a reference model.
While larger logit shifts usually correlate with larger log-likelihood shifts, BNF presents a unique pattern: many samples have significant logit shifts with minimal log-likelihood shifts (Figure 3c, top-left). This occurs may because BNF increases the output logits uniformly across preferred tokens at each position, resulting in consistent likelihood after softmax normalization.

#### BNF distributes shifts evenly across tokens.

The Gini coefficients (Gini, ) for logit shifts (Figure 3f) show that BNF’s logit shifts are more evenly distributed across tokens compared to other baselines.
A lower Gini coefficient indicates that the shifts come from many tokens, rather than being concentrated in a few with significant differences.
This suggests that BNF achieves a balanced optimization strategy, reducing the gradients for tokens already showing large differences from the reference, thereby effectively preventing over-fitting and reducing the alignment tax.

Figure: Figure 4: Distribution of token-level log-likelihood shifts.

#### BNF exhibits fewer polarized shifts compared to DPO.

We use DPO as a reference model to analysis the shifts of token-level log-likelihood (Figure 4).
Specifically, we divide DPO’s token-level log-likelihood shifts into $10$ percentile-based bins and map the token-level shifts from BNF, SimPO (Meng et al., ), and IPO (Azar et al., ) onto these DPO-defined bins. Figure 4 reveals that BNF exhibits a more centralized distribution of token-level shifts compared to DPO, likely due to the moderating effect of its bidirectional negative feedback design, which limits extreme log-likelihood shifts. In contrast, SimPO shows a more binarized distribution, while IPO’s distribution remains close to that of DPO.

## 6 Related Works

### 6.1 Reinforcement Learning from Human Feedback

Reinforcement Learning from Human Feedback (RLHF) (Ouyang et al., ) has become a widely adopted approach to align Large Language Models (LLMs) with human preferences. The typical RLHF pipeline consists of three stages: Supervised Fine-tuning (SFT), reward model training, and policy optimization.
Proximal Policy Optimization (PPO) (Schulman et al., ) is commonly used in the policy optimization stage to align the model with human feedback. RLHF has been applied across various domains, including mitigating toxicity (Chaudhari et al., ), enhancing reasoning abilities (Wang et al., ), and improving the helpfulness of language models (Bai et al., ). However, RLHF often requires complex hyper-parameter tuning and can be unstable, primarily due to the sensitivity of the reward model (Casper et al., ).
In contrast, Direct Preference Optimization (DPO) (Rafailov et al., ) simplifies this process by removing the need for an explicit reward model, directly optimizing for preferences. This makes DPO a more resource-efficient alternative to RLHF.
While DPO addresses some of RLHF’s complexities, further improvements and variants have been proposed to overcome specific challenges in preference optimization.

### 6.2 Challenges of Direct Preference Optimization

Although DPO-series methods have demonstrated impressive performance on QA and Chatbot tasks (Meng et al., ), they remain highly sensitive to hyper-parameters and often exhibit instability (Xu et al., ). This instability is especially evident when applied to mathematical datasets, potentially leading to training collapse (Pal et al., ).
Recent studies (Zhao et al., ; Xu et al., ) propose using Negative Log Likelihood (NLL) regularization to stabilize training.
While these approaches successfully prevent collapse on mathematical datasets, they perform poorly on several popular Chat and QA benchmarks (Meng et al., ) and introduce additional hyper-parameters.
Another significant challenge in preference optimization is controlling the output length, as models trained with DPO tend to produce verbose responses that may reduce the quality of results (Xu et al., ).
To address this, several DPO variants have been developed.
For instance, SimPO (Meng et al., ) applies a length-normalized reward to prevent the generation of excessively long outputs.
RDPO (Park et al., ) adds a regularization term to reduce length exploitation.

## 7 Conclusion, Limitations and Future work

Conclusion.
In this paper, we propose a novel LLM alignment loss with Bidirectional Negative Feedback (BNF), addressing the instability and hyper-parameter sensitivity found in DPO and its variants.
Unlike DPO-series methods, BNF eliminates the need for pairwise contrastive losses and preference data, streamlining the alignment pipeline to be as simple as supervised fine-tuning.
Our experiments across six benchmarks demonstrate that BNF achieves strong performance on QA benchmarks, while preserving the reasoning ability of LLMs and paying the lowest alignment tax.

Limitations and Future work.
Despite our efforts to improve this work, due to constraints in computational resources and budgets, there are still the following limitations:

- •
Model Scale. All the experiments in this paper are based on LLMs of $7$B-$9$B scales, and we are unsure whether our proposed method can be stably scaled to larger LLMs of $30$B or more.
- •
Combination with DPO-series methods. Our proposed BNF loss is not necessarily opposed to DPO-series methods; in fact, the two approaches can be complementary, and introducing a pairwise contrastive function may further improve the performance and stability of BNF.
- •
Non-pairwise Dataset. The non-pairwise dataset used in this paper is derived from a regular preference dataset with random masking, which is merely a simulation and may not fully reflect real-world applications.

These limitations will also serve as the starting point for our future work.
We plan to request more computational resources and funding in the future to further improve this work.

## Acknowledgement

This research/project is supported by the National Research Foundation, Singapore under its AI Singapore Programme (AISG Award No: AISG2-TC-2022-005).
We also wish to extend their heartfelt gratitude to the Sea AI Lab for their generous support in providing the necessary equipment and computational resources critical for the successful completion of this research.

## Appendix A Mathematical Derivations

### A.1 Deriving the partial derivative of NLL loss

Given a policy model $\pi_{\theta}$, the NLL loss is described as follows:

$$ $\mathcal{L}_{\text{NLL}}=\mathbb{E}_{(x,y)\sim\mathcal{D}}[-\log\pi_{\theta}(y |x)]=\mathbb{E}_{(x,y)\sim\mathcal{D}}\left[-\log\frac{e^{z_{y}}}{\sum_{k=1}^{ |\mathcal{V}|}e^{z_{k}}}\right]$ $$

Therefore,

$$ $\displaystyle\left|\frac{\partial\mathcal{L}_{\text{NLL}}}{\partial z_{y}}\right|$ $\displaystyle=\left|\frac{\partial}{\partial z_{y}}\left(-\log\frac{e^{z_{y}}} {\sum_{k=1}^{|\mathcal{V}|}e^{z_{k}}}\right)\right|$ $\displaystyle=\left|\frac{\partial}{\partial z_{y}}\left(-z_{y}+\log\sum_{k=1} ^{|\mathcal{V}|}e^{z_{k}}\right)\right|$ $\displaystyle=\left|\frac{e^{z_{y}}}{\sum_{k=1}^{|\mathcal{V}|}e^{z_{k}}}-1\right|$ $\displaystyle=1-\pi_{\theta}(y|x)$ $$

### A.2 The proof of f BNF subscript 𝑓 BNF f_{\text{BNF}} italic_f start_POSTSUBSCRIPT BNF end_POSTSUBSCRIPT being a valid probability distribution.

Given the proposed Dynamic Target Distribution function $f_{\text{BNF}}$:

$$ $f_{\text{BNF}}(y_{i},t_{j})=\begin{cases}sg\left[\min\left(\frac{\pi_{\theta}( y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i})},1\right)\right],&\text{if } y_{i}=t_{j}\vspace{10pt}\\ sg\left[\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_{i}|x,y_{<i})} \pi_{\theta}(t_{j}|x,y_{<i})\right],&\text{if }y_{i}\neq t_{j}\end{cases}$ $$

Firstly, since $\pi_{\theta}(y_{i}|x,y_{<i})>0$ and $\pi_{\text{ref}}(y_{i}|x,y_{<i})>0$, it is obvious that $f_{\text{BNF}}(y_{i},y_{i})=\min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_
{\text{ref}}(y_{i}|x,y_{<i})},1\right)>0$ when $y_{i}=t_{j}$.
Furthermore, since $1-f_{\text{BNF}}(y_{i},y_{i})$, $1-\pi_{\theta}(y_{i}|x,y_{<i})$ and $\pi_{\theta}(t_{j}|x,y_{<i})$ are greater than 0 0, $f_{\text{BNF}}(y_{i},t_{j})>0$ also holds when $y_{i}\neq t_{j}$.
Therefore, $f_{\text{BNF}}(y_{i},t_{j})>0$ for all $y_{i}$ and $t_{j}$.

Secondly, the sum of $f_{\text{BNF}}(y_{i})$ equals:

$$ $\displaystyle\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{j})$ $\displaystyle=min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_ {i}|x,y_{<i})},1\right)+\sum_{t_{j}\neq y_{i}}^{|\mathcal{V}|}\frac{1-f_{\text {BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_{i}|x,y_{<i})}\pi_{\theta}(t_{j}|x,y_{<i})$ $\displaystyle=min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_ {i}|x,y_{<i})},1\right)+\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_ {i}|x,y_{<i})}\sum_{t_{j}\neq y_{i}}^{|\mathcal{V}|}\pi_{\theta}(t_{j}|x,y_{<i})$ $\displaystyle=min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_ {i}|x,y_{<i})},1\right)+\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_ {i}|x,y_{<i})}\left(1-\pi_{\theta}(y_{i}|x,y_{<i})\right)$ $\displaystyle=min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_ {i}|x,y_{<i})},1\right)+1-min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{ \text{ref}}(y_{i}|x,y_{<i})},1\right)$ $\displaystyle=1$ $$

Therefore, $f_{\text{BNF}}(y_{i})$ is a valid probability distribution.

### A.3 Deriving the partial derivative of BNF loss

The optimization objective of BNF is:

$$ $\mathcal{L}_{\text{BNF}}=-\mathbb{E}_{(x,y)\sim\mathcal{D}}\left[\frac{\text{ label}(y)}{|y|}\sum_{i}^{|y|}\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{j })\log\pi_{\theta}(t_{j}|x,y_{<i})\right]$ $$

The likelihood $\pi_{\theta}(t_{j}|x,y_{<i})$ is obtained by softmax:

$$ $\pi_{\theta}(t_{j}|x,y_{<i})=\frac{e^{z_{t_{j}}^{x,y_{<i}}}}{\sum_{k}^{| \mathcal{V}|}e^{z_{t_{k}}^{x,y_{<i}}}}$ $$

The partial derivative $\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}$ with respect to any output logit $z^{x,y_{<i}}_{t_{k}}$ can be derived as follows:

$$ $\displaystyle\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_ {k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\frac{\partial}{\partial z^{x,y_{<i} }_{t_{k}}}\left(\sum_{i}^{|y|}\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{ j})\log\pi_{\theta}(t_{j}|x,y_{<i})\right)$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\frac{\partial}{\partial z^{x,y_{<i} }_{t_{k}}}\left(\sum_{j}^{|\mathcal{V}|}f_{\text{BNF}}(y_{i},t_{j})\log\pi_{ \theta}(t_{j}|x,y_{<i})\right)$ $$

Since we have adopted the stop gradient operation to the function $f_{\text{BNF}}$, thus:

$$ $\displaystyle\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_ {k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\sum_{j}^{|\mathcal{V}|}f_{\text{BNF }}(y_{i},t_{j})\frac{\partial\log\pi_{\theta}(t_{j}|x,y_{<i})}{\partial z^{x,y _{<i}}_{t_{k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\sum_{j}^{|\mathcal{V}|}\frac{f_{ \text{BNF}}(y_{i},t_{j})}{\pi_{\theta}(t_{j}|x,y_{<i})}\frac{\partial\;\pi_{ \theta}(t_{j}|x,y_{<i})}{\partial z^{x,y_{<i}}_{t_{k}}}$ $$

The partial derivative of the cross-entropy operation with respect to logits is given by:

$$ $\frac{\partial\pi_{\theta}(y_{i}|x)}{\partial z_{y_{k}}}=\frac{\partial}{ \partial z_{y_{k}}}\left(\frac{e^{z_{y_{i}}}}{\sum_{j}^{|\mathcal{V}|}e^{z_{y_ {j}}}}\right)=\begin{cases}\pi_{\theta}(y_{k}|x)(1-\pi_{\theta}(y_{k}|x)),& \text{if }y_{k}=y_{i}\vspace{10pt}\\ -\pi_{\theta}(y_{k}|x)\pi_{\theta}(y_{i}|x),&\text{if }y_{k}\neq y_{i}\end{cases}$ $$

Therefore:

$$ $\displaystyle\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_ {k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\sum_{j}^{|\mathcal{V}|}\frac{f_{ \text{BNF}}(y_{i},t_{j})}{\pi_{\theta}(t_{j}|x,y_{<i})}\frac{\partial\;\pi_{ \theta}(t_{j}|x,y_{<i})}{\partial z^{x,y_{<i}}_{t_{k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\left(\frac{f_{\text{BNF}}(y_{i},t_{ k})}{\pi_{\theta}(t_{k}|x,y_{<i})}\frac{\partial\;\pi_{\theta}(t_{k}|x,y_{<i}) }{\partial z^{x,y_{<i}}_{t_{k}}}+\sum_{j\neq k}^{|\mathcal{V}|}\frac{f_{\text{ BNF}}(y_{i},t_{j})}{\pi_{\theta}(t_{j}|x,y_{<i})}\frac{\partial\;\pi_{\theta}( t_{j}|x,y_{<i})}{\partial z^{x,y_{<i}}_{t_{k}}}\right)$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\left(f_{\text{BNF}}(y_{i},t_{k})(1- \pi_{\theta}(t_{k}|x,y_{<i}))-\sum_{j\neq k}^{|\mathcal{V}|}f_{\text{BNF}}(y_{ i},t_{j})\pi_{\theta}(t_{k}|x,y_{<i})\right)$ $$

Because $f_{\text{BNF}}(y_{i})$ is valid distribution, $\sum_{j}f_{\text{BNF}}(y_{i},t_{j})=1$, thus:

$$ $\displaystyle\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_ {k}}}$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\left(f_{\text{BNF}}(y_{i},t_{k})(1- \pi_{\theta}(t_{k}|x,y_{<i}))-\sum_{j\neq k}^{|\mathcal{V}|}f_{\text{BNF}}(y_{ i},t_{j})\pi_{\theta}(t_{k}|x,y_{<i})\right)$ $\displaystyle=-\frac{\text{label}(y)}{|y|}\bigg{(}f_{\text{BNF}}(y_{i},t_{k})( 1-\pi_{\theta}(t_{k}|x,y_{<i}))-(1-f_{\text{BNF}}(y_{i},t_{k}))\pi_{\theta}(t_ {k}|x,y_{<i})\bigg{)}$ $\displaystyle=\frac{\text{label}(y)}{|y|}\bigg{(}\pi_{\theta}(t_{k}|x,y_{<i})- f_{\text{BNF}}(y_{i},t_{k})\bigg{)}$ $$

### A.4 Deriving the function between partial derivative and likelihood

Since we have:

$$ $f_{\text{BNF}}(y_{i},t_{j})=\begin{cases}sg\left[\min\left(\frac{\pi_{\theta}( y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i})},1\right)\right],&\text{if } y_{i}=t_{j}\vspace{10pt}\\ sg\left[\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_{i}|x,y_{<i})} \pi_{\theta}(t_{j}|x,y_{<i})\right],&\text{if }y_{i}\neq t_{j}\end{cases}$ $$

and,

$$ $\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}=\frac{ \text{label}(y)}{|y|}\big{[}\pi_{\theta}(t_{k}|x,y_{<i})-f_{\text{BNF}}(y_{i}, t_{k})\big{]}$ $$

For the token $t_{k}=y_{i}$ within the response $y$, its $\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}$ can be obtained as follows:

$$ $\displaystyle\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i }}_{y_{i}}}\right|$ $\displaystyle=\left|\frac{\text{label}(y)}{|y|}\big{[}\pi_{\theta}(y_{i}|x,y_{ <i})-f_{\text{BNF}}(y_{i},y_{i})\big{]}\right|$ $\displaystyle=\frac{\text{label}(y)}{|y|}\left|\pi_{\theta}(y_{i}|x,y_{<i})- \min\left(\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_{<i}) },1\right)\right|$ $\displaystyle=\frac{\text{label}(y)}{|y|}\cdot\begin{cases}\left|\pi_{\theta}( y_{i}|x,y_{<i})-\frac{\pi_{\theta}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y _{<i})}\right|,&\text{if }\pi_{\theta}(y_{i}|x,y_{<i})<\pi_{\text{ref}}(y_{i}| x,y_{<i})\vspace{10pt}\\ \left|\pi_{\theta}(y_{i}|x,y_{<i})-1\right|,&\text{if }\pi_{\theta}(y_{i}|x,y_ {<i})\geq\pi_{\text{ref}}(y_{i}|x,y_{<i})\end{cases}$ $\displaystyle=\frac{\text{label}(y)}{|y|}\cdot\begin{cases}\pi_{\theta}(y_{i}| x,y_{<i})\frac{1-\pi_{\text{ref}}(y_{i}|x,y_{<i})}{\pi_{\text{ref}}(y_{i}|x,y_ {<i})},&\text{if }\pi_{\theta}(y_{i}|x,y_{<i})<\pi_{\text{ref}}(y_{i}|x,y_{<i} )\vspace{10pt}\\ 1-\pi_{\theta}(y_{i}|x,y_{<i}),&\text{if }\pi_{\theta}(y_{i}|x,y_{<i})\geq\pi_ {\text{ref}}(y_{i}|x,y_{<i})\end{cases}$ $$

For the token $t_{k}\neq y_{i}$:

$$ $\displaystyle\sum_{t_{k}\neq y_{i}}^{|\mathcal{V}|}\left|\frac{\partial \mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}\right|$ $\displaystyle=\sum_{t_{k}\neq y_{i}}\frac{\text{label}(y)}{|y|}\left|\pi_{ \theta}(t_{k}|x,y_{<i})-\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_ {i}|x,y_{<i})}\pi_{\theta}(t_{k}|x,y_{<i})\right|$ $\displaystyle=\frac{\text{label}(y)}{|y|}\left[\sum_{t_{j}\neq y_{i}}\pi_{ \theta}(t_{k}|x,y_{<i})-\frac{1-f_{\text{BNF}}(y_{i},y_{i})}{1-\pi_{\theta}(y_ {i}|x,y_{<i})}\sum_{t_{j}\neq y_{i}}\pi_{\theta}(t_{j}|x,y_{<i})\right]$ $\displaystyle=(1-\pi_{\theta}(y_{i}|x,y_{<i}))-(1-f_{\text{BNF}}(y_{i},y_{i}))$ $\displaystyle=f_{\text{BNF}}(y_{i},y_{i})-\pi_{\theta}(y_{i}|x,y_{<i})=\left| \frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}\right|$ $$

Therefore, the sum of $\sum_{t_{k}\neq y_{i}}^{|\mathcal{V}|}\left|\frac{\partial\mathcal{L}_{\text{
BNF}}}{\partial z^{x,y_{<i}}_{t_{k}}}\right|$ is actually equal to $\left|\frac{\partial\mathcal{L}_{\text{BNF}}}{\partial z^{x,y_{<i}}_{y_{i}}}\right|$, which also establishs a bidirectional negative feedback.

## Appendix B Code Implementation

## Appendix C Training and Evaluation Costs

**Table 7: The training and evaluation costs of this paper. We use $8\times$ A100-80GB-SXM for training, and the precision is bf16.**
|  | Llama-3-8B-Inst | Mistral-7B-Inst-v0.2 | Gemma-2-9B-it |
| --- | --- | --- | --- |
| Training GPU hours (per training) | 30 | 30 | 45 |
| Training GPU hours (total) | 600 | 480 | 700 |
| Wild-Bench API Costs ($\$$/time) | 5 | 5 | 5 |
| Wild-Bench API Costs ($\$$/total) | 150 | 150 | 150 |
| Arena-Hard API Costs ($\$$/time) | 0.2 | 0.2 | 0.2 |
| Arena-Hard API Costs ($\$$/total) | 5 | 5 | 5 |

## Appendix D Some Case Studies

**Table 8: Comparing generations of Wild-Benchmark prompts from Gemma-2-9B-it.**
| Prompt | If a 7B parameter Transformer LLM at fp16 with batch size 1 and Sequence length is 500 tokens and bytes per token is 2 - needs 14GB VRAM, what would the VRAM requirement be if batch size is 50? This is extremely important! Show your work. Let’s work this out in a step by step way to be sure we have the right answer. |
| --- | --- |
| Gemma-2-9B-Base | Here’s how to calculate the VRAM requirement with a batch size of 50: **1. Calculate the total model parameters in bytes:** * 7B parameters * 4 bytes/parameter (fp16) = 28 GB **2. Calculate the total input sequence size in bytes:** * 500 tokens * 2 bytes/token = 1000 bytes **3. Calculate the memory required per batch:** * With a batch size of 1: 28 GB (model) + 1000 bytes (input) = 28.001 GB * With a batch size of 50: 28 GB (model) + (1000 bytes/token * 50 tokens) = 28 GB + 50000 bytes = 28 GB + 0.047 GB = 28.047 GB **Therefore, the VRAM requirement would be approximately 28.047 GB with a batch size of 50.** **Important Considerations:** * **Overheads:** This calculation doesn’t include memory overheads for things like optimizer states, gradients, and other tensors used during training. These overheads can add a significant amount of memory usage. * **Hardware:** The actual VRAM requirement may vary depending on the specific hardware and its memory management capabilities.* **FP16 Precision:** Using fp16 precision can reduce memory usage compared to fp32, but it can also lead to some loss of accuracy. Let me know if you have any other questions! |
| Gemma-2-9B-BNF | Here’s the breakdown of how to calculate the VRAM requirement with a batch size of 50: **1. Model Parameters:** * **Parameters:** 7B (7 billion)* **FP16 Precision:** Each parameter uses 16 bits (half the memory of FP32). * **Parameter Memory:** 7B * (16 bits / 8 bits/byte) = 1.75 GB **2. Sequence Length and Bytes per Token:** * **Sequence Length:** 500 tokens * **Bytes per Token:** 2 * **Total Sequence Memory per Sample:** 500 tokens * 2 bytes/token = 1000 bytes = 1 MB **3. VRAM Consumption per Sample (Batch Size 1):** * **Model Parameters:** 1.75 GB * **Sequence Memory:** 1 MB * **Total per Sample:** 1.75 GB + 0.001 GB = 1.751 GB (approximately) **4. Scaling for Batch Size 50:** * **VRAM per Batch:** (VRAM per Sample) * (Batch Size) * **VRAM Requirement (Batch Size 50):** 1.751 GB * 50 = **87.55 GB (approximately)** **Therefore, with a batch size of 50, the estimated VRAM requirement would be approximately 87.55 GB.** |
| Gemma-2-9B-DPO | Here’s the breakdown of how to calculate the VRAM requirement with a batch size of 50: **1. Parameters and Memory Footprint:** * **Model Size:** 7B parameters * 4 bytes/parameter (fp16) = 28 GB (This is the *theoretical* memory the model itself occupies) * **However, not all parameters are actively used at once.** During inference or training, the model processes data in batches, so the actual VRAM usage is influenced by batch size and sequence length. **2. Batch Impact:** * **Original Scenario (Batch Size 1):** 1 sequence * 500 tokens * 2 bytes/token = 1000 bytes per sequence. Since we’re using fp16, this translates to roughly 2000 bytes per sequence in memory. The 14GB VRAM likely accounts for: * Model parameters (partially) * Activations, gradients, and other tensors related to *one* sequence. * **New Scenario (Batch Size 50):** Now we have 50 sequences processed simultaneously. The memory requirement per batch becomes: 50 sequences * 1000 bytes/sequence = 50,000 bytes. Again, accounting for fp16 precision, this is roughly 100,000 bytes per batch. **3. Estimating Total VRAM Usage (Batch 50):** * **Model Parameters:** While the full 28GB model size isn’t *directly* used at once, a significant portion is still required. Let’s assume around 15GB for the model itself (this can vary based on optimization techniques). * **Batch Data and Activations:** 100,000 bytes per batch * 500 tokens/sequence * additional memory overhead for activations, gradients, etc. This is a rough estimate, but let’s assume an additional 5GB per batch. With a batch size of 50, this becomes …(200 more words) |
| Gemma-2-9B-SimPO | Here’s a breakdown of how to calculate the VRAM requirement with a batch size of 50: **1. Parameters and Memory Footprint:** * The 7B parameter model’s memory usage primarily stems from storing its weights and activations. While exact precision varies, assume roughly **8 bytes per parameter** for fp16 representation (including some overhead). * Memory for 7B parameters: 7,000,000,000 * 8 bytes = 56 GB **2. Sequence Length and Token Memory:** * With 500 tokens and 2 bytes per token, each sequence consumes 500 * 2 = 1000 bytes (1 MB). **3. Batch Size Impact:** * **Original Scenario (Batch Size 1):** 14 GB VRAM used included memory for parameters, one sequence (1 MB), and activations/intermediate calculations. * **Scaling to Batch Size 50:** The primary memory increase comes from handling 50 sequences simultaneously. The token memory consumption scales linearly: 50 sequences * 1 MB/sequence = 50 MB. **4. Estimating Total VRAM with Batch 50:** * **Parameter Memory (unchanged):** Still 56 GB (dominant factor) * **Sequence Memory (increased):** 50 MB + overhead from previous activations * **Activation Memory (crucial estimate):** This is harder to pinpoint *directly* but *significantly* increases with batch size due to more parallel computations. Assume a *conservative* increase factor of **3x** over the original scenario (based on how activations grow with parallel processing). This adds another 42 GB (3 * 14 GB). * **Rough Total VRAM (Batch 50):** 56 GB + 50 MB + 42 GB ** 98 GB** **Important Considerations and Refinement:** * **Activation Memory Variability …(100 more words)* |

**Table 9: Comparing generations of Wild-Benchmark prompts from Gemma-2-9B-it.**
| Prompt | Show me how to make 1$ using 19 coins |
| --- | --- |
| Gemma-2-9B-Base | This is a fun challenge! Here’s how you can make $1 using 19 coins: * **1 Half Dollar (50 cents)** * **1 Quarter (25 cents)** * **1 Dime (10 cents)** * **1 Nickel (5 cents)** * **1 Penny (1 cent)** * **14 Pennies (14 cents)** Let me know if you’d like to try another coin puzzle! |
| Gemma-2-9B-BNF | You can’t make exactly $1.00 using only 19 coins from standard US currency. Here’s why: * **Coin Denominations:** US coins are: * Penny (1) * Nickel (5) * Dime (10) * Quarter (25) * Half-Dollar (50) * **Combinations:** Even with clever combinations of these coins, you won’t reach a precise $1.00 using only 19 coins. You’ll likely end up either slightly over or under a dollar. **Example (Closest You Can Get):** You could get *very* close to $1.00 using 19 coins, but not exactly: * 17 Pennies (17) * 1 Quarter (25) * 1 Dime (10) This totals 52, leaving you short of $1.00. |
| Gemma-2-9B-DPO | Here’s how you can represent $1 using 19 coins, keeping in mind standard US currency:* **1 Half Dollar (50 cents):** 1 coin* **3 Quarters (75 cents):** 3 coins* **1 Dime (10 cents):** 1 coin* **4 Nickels (20 cents):** 4 coins* **10 Pennies (10 cents):** 10 coins**Total:** 1 + 3 + 1 + 4 + 10 = **19 coins****Value:** 50 + 75 + 10 + 20 + 10 = **165 cents** which equals **$1.65**While you can’t *exactly* make $1 with *only* 19 coins, this combination gets you closest while using the specified number. |
| Gemma-2-9B-SimPO | You can’t directly make $1 using *only* 19 coins of standard US denominations to reach an *exact* dollar amount. Here’s why:* **Coin Values:** US coins are pennies (1), nickels (5), dimes (10), quarters (25), and half-dollars (50). No combination of these will add up precisely to $1 using only 19 coins.**However, you could create a scenario with a slight workaround involving implied value:**1. **The T̈rick:̈** Imagine a fictional coin worth 1/19th of a dollar (approximately 5.26 cents). With 19 of these coins, you’d theoretically reach $1. This isn’t realistic currency, but it fulfills the üsing 19 coins to make $1c̈ondition conceptually. |

| Prompt | How many 400 watt solar panels would it take in Michigan to produce the same amount of power in a day as a EV car which drives 40 miles a day? Assume 4 peak sun hours per day in Michigan on average and that the car uses 0.3 kWhmile |
| --- | --- |
| Gemma-2-9B-Base | Here’s how to calculate that:**1. Calculate the car’s daily energy consumption:*** Energy per mile: 0.3 kWh/mile* Daily miles: 40 miles* Total daily energy: 0.3 kWh/mile * 40 miles = 12 kWh**2. Calculate the total energy produced by the solar panels:*** Power per panel: 400 watts = 0.4 kW* Number of peak sun hours: 4 hours* Daily energy per panel: 0.4 kW * 4 hours = 1.6 kWh**3. Determine the number of panels needed:*** Total daily energy needed: 12 kWh* Daily energy per panel: 1.6 kWh* Number of panels: 12 kWh / 1.6 kWh/panel = 7.5 panels**Since you can’t have half a panel, you would need 8 solar panels to produce enough energy to match the daily consumption of an EV driving 40 miles a day in Michigan.****Important Considerations:*** **Average sunlight:** This calculation assumes 4 peak sun hours per day, which is an average. Actual sunlight hours vary depending on the time of year and weather conditions.* **Panel efficiency:** Solar panels have varying efficiencies. The calculation assumes a standard efficiency.* **System losses:** There are always some energy losses in a solar system due to wiring, inverters, and other components.* **Battery storage:** To ensure consistent power even when the sun isn’t shining, you would likely need battery storage. |
| Gemma-2-9B-BNF | Here’s how to calculate the number of 400-watt solar panels needed:**1. Calculate Daily EV Energy Consumption:*** **Energy per mile:** 0.3 kWh/mile* **Daily miles:** 40 miles* **Total daily energy (kWh):** 0.3 kWh/mile * 40 miles = 12 kWh**2. Calculate Daily Solar Energy Production:*** **Panel power:** 400 watts = 0.4 kW* **Peak sun hours:** 4 hours* **Daily energy per panel (kWh):** 0.4 kW * 4 hours = 1.6 kWh**3. Determine Number of Panels:*** **Total daily EV energy:** 12 kWh* **Daily energy per panel:** 1.6 kWh* **Number of panels:** 12 kWh / 1.6 kWh/panel = **7.5 panels****Since you can’t have half a panel, you would need 8 solar panels with a power output of 400 watts each to produce approximately the same amount of energy as an EV driving 40 miles per day in Michigan with the given conditions. |
| Gemma-2-9B-DPO | Here’s how to calculate the solar panel requirement:**1. Calculate Daily EV Energy Consumption:*** **Energy per mile:** 0.3 kWh/mile* **Daily miles driven:** 40 miles* **Total daily energy consumption:** 0.3 kWh/mile * 40 miles = 12 kWh**2. Calculate Daily Solar Energy Production per Panel:*** **Panel wattage:** 400 watts = 0.4 kW* **Peak sun hours:** 4 hours* **Daily energy production per panel:** 0.4 kW * 4 hours = 1.6 kWh**3. Determine the Number of Panels Needed:*** **Total daily EV energy needed:** 12 kWh* **Daily energy per panel:** 1.6 kWh* **Number of panels:** 12 kWh / 1.6 kWh/panel = 7.5 panels**Since you can’t have half a panel, you would need 8 solar panels to produce enough energy to match the daily consumption of an EV driving 40 miles in Michigan under these conditions.****Important Considerations:*** **Average vs. Peak Sun Hours:** While 4 peak sun hours is a reasonable average for Michigan, actual daily output fluctuates. Some days will have more, some less. Over time, this averages out.* **Panel Efficiency:** Real-world solar panel efficiency is slightly less than their rated wattage. Factor in a slight reduction (around 5-10%) for a more accurate estimate.* **System Losses:** …(100 more words). |
| Gemma-2-9B-SimPO | Here’s how to calculate the solar panel requirement:**1. Calculate Daily EV Energy Consumption:*** **Miles driven:** 40 miles* **Energy per mile:** 0.3 kWh/mile* **Total daily energy consumption:** 40 miles * 0.3 kWh/mile = 12 kWh**2. Determine Solar Panel Output in Peak Hours:*** **Panel wattage:** 400 watts = 0.4 kW* **Peak sun hours:** 4 hours* **Daily output per panel:** 0.4 kW * 4 hours = 1.6 kWh**3. Calculate Number of Panels:*** **Required daily energy (EV):** 12 kWh* **Output per panel:** 1.6 kWh* **Number of panels:** 12 kWh / 1.6 kWh/panel = **7.5 panels****Since you can’t have half a panel, you would need 8 solar panels to produce approximately the same amount of energy as an EV driving 40 miles daily in Michigan under these conditions. |

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. Could the authors provide evidence of BNF's favorability with respect to training collapse?
2. If BNF is meant to be an alternative to simply adding a NLL loss term to DPO-like methods, can the authors compare the proposed method with these baselines?
3. Could the authors explain how each point made in Section 2.3 connect to a contribution or result in the paper / positive property of BNF?
4. Could the authors clarify the central claims in the paper and distinguish them from statements that are hypotheses?
5. Could the authors explain why the BNF loss is the way it is, e.g., why it necessarily needs to look as complex as it is when the main goal is to simply avoid an increasing gradient norm for large deviations? 

I would be happy to raise my score if these above concerns are addressed.
soundness: 2
strengths: 1. The paper exhibits strong experimental results supporting the use of BNF over the baselines tested.
2. The paper is easy-to-follow and makes progress on a relevant topic for the ICLR community.
3. BNF is novel and well-motivated by the desire to decrease gradient norms as the log probs deviate more from the reference log probs.
4. BNF improves upon DPO-like methods empirically and in applicability (going beyond pairwise data alone).
summary: The paper proposes an alternative to DPO and its variants such that $|\frac{\partial{\mathcal{L}}}{\partial{z_y}}|$, the norm of the derivative of the loss with respect to the logits of a given outputs, decreases linearly as $p(y|x)$ deviates from the $p_{ref}(y|x)$ in either direction. The loss is called Bidirectional Negative Feedback, in contrast to what the paper describes as unidirectional negative feedback in the likelihood loss, namely that $|\frac{\partial{\mathcal{L}}}{\partial{z_y}}|$ increases as $p(y|x)$ decreases. 

The paper also demonstrates how various DPO-series methods avoid excessive decreases in the likelihood of dispreferred samples relative to a loss that just applies NLL to the preferred samples and its negation to dispreferred samples: the gradient for these losses includes and additional scaling term $\mathcal{C}(y_w, y_l, p_\theta, p_{ref})$ that decreases as the gap between $p_\theta(y_w|x)$ and $p_{ref}(y_l|x)$ increases. However, they argue that these losses are unideal due to their sensitivity to the hyperparameter $\beta$.

Experimentally, BNF outperforms other DPO-style losses overall when evaluated across 2 instruction-following QA datasets and 4 logical reasoning datasets, using the preference training datasets from the SimPO paper. Moreover, because BNF is not a pairwise contrastive loss, it is applicable even with non-pairwise data (e.g., sometimes just a preferred or a dispreferred sample without a counterpart), and experiments show that BNF can still improve over the base model in such settings. The authors also show that BNF exhibits the least amount of log likelihood shifts as well as the lowest Gini coefficient in the logit shifts across tokens in a sequence.
weaknesses: 1. The authors point to two problems for DPO-like baselines (i.e., training collapse and alignment tax) but only seem to show positive results of BNF for one, i.e., less alignment tax. It would be helpful to see a precise definition of training collapse and show that BNF experiences less of it (or avoid framing the paper's story with training collapse).
2. The authors mention that DPO-like baselines with an additional NLL term have limitations (i.e., poor chat and QA performance), but it is not clear to me that BNF overcomes these specific limitations when trained on the same datasets.
3. While I believe that the paper makes sound and sufficient contributions, #1 and #2 point to a misalignment between the motivation for the work in the introduction and the contributions demonstrated in the body of the paper. Section 2.3 and Figure 2 are another example; they discuss various challenges and limitations, but it is not clear how each relates back to the paper's contributions. Also, for how focused this section is on the specifics of pairwise preference data in reasoning tasks, it is strange that the experiments don't explore training on such data.
4. The paper could benefit from being more careful in distinguishing claims from hypotheses. For instance, in lines 496-471: "This suggests that BNF achieves a balanced optimization strategy, reducing the gradients for tokens already showing large differences from the reference, thereby effectively preventing over-fitting and reducing the alignment tax." The logical leaps from smaller gradients for large differences to less overfitting and less alignment tax are not directly supported in the paper. Also, in the same section, it is not clear why a lower Gini coefficient is necessarily desirable in the first place; for instance, for some sequences it may be more desirable to just decrease the probability of the incorrect tokens rather than all tokens. Moreover, lines 54-55 state: "we argue that the instability of DPO stems from a more fundamental cause: the unidirectional likelihood-derivative negative feedback inherent in log-likelihood loss." While this is a reasonable hypothesis, it is not a claim that has been definitively proven; thus, rephrasing this section as a hypothesis that guides the development of an alternative loss may be more apt.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: See above weaknesses.
soundness: 3
strengths: 1.	This paper clearly outlines the previous methods and theoretically identifies their weaknesses. The motivations of this paper are clear.
2.	In terms of these issues, the authors propose their method and validate the effectiveness through theory and extensive experiments on multiple tasks and LLMs.
3.	The structure of this paper is clear, and the equations and charts are well-presented.
summary: This paper proposes a new LLM alignment loss to address the issues of DPO variants being sensitive to hyper-parameters and unstable in mathematical tasks. The loss can maintain Bidirectional Negative Feedback (BNF) during optimization and eliminate the need of additional hyperparameters and pairwise preference data. Finally, they evaluate the method on multiple tasks and backbones to verify its effectiveness.
weaknesses: 1.	Figure 2 illustrates the challenges of creating a substantial log-likelihood gap in mathematical tasks. Could you demonstrate the advantages of your method with similar examples in mathematical tasks?
2.	I am somewhat puzzled by Eq.(6). What are the motivations behind designing the equations where $y_i \neq t_i$? It appears to be a careful design.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: - Is BNF more sample efficient because it does not require pair-wise dataset? Is there a relationship between sample efficiency and loss/dataset type?
- Do you expect the other baselines to close in on BNF with further hyper-parameter tuning? 
- How sensitive is BNF to hyper-parameter tuning? Is it possible that the hyper-parameters are harder to tune despite the fact that they are fewer? 
- Is the performance difference on the benchmarks significant?
soundness: 3
strengths: - BNF has fewer hyper-parameters compared to DPO. If the method is robust to hyper-parameter tuning, this could make LLM alignment more compute efficient. 
- BNF does not require pairwise data. 
- The baselines are diverse and strong. The hyper-parameters of the other approaches were fine-tuned (although not directly by the authors).
summary: This paper proposes Bidirectional Negative Feedback (BNF), an LLM alignment loss that does not rely on pairwise contrastive losses.  Consequently, it does not require pairwise data and has fewer hyper-parameters compared to DPO. The authors empirically show that the models` reasoning ability is less affected when using BNF for preference optimization. They compare BNF to previous approaches such as DPO, IPO, KTO, SLiC-HF, ORPO, SimPO on QA and reasoning benchmarks.
weaknesses: - The performance across benchmarks is still relatively close to DPO. 
- Gemma lacks proper baselines as the scores were only copied from another paper.

Meta-review: This paper was reviewed by three experts in the field and received 6, 6, 6 as the final ratings. The reviewers acknowledged that the proposed Bidirectional Negative Feedback (BNF) scheme does not require pairwise data, it has been validated through theory and extensive experiments on multiple tasks, the baseline methods are diverse and strong, and that the paper is well-structured and the ideas are clearly presented. 

The reviewers raised a question about BNF's usefulness with respect to training collapse; in response, the authors have conducted experiments on a mathematical preference dataset to validate the effectiveness of their approach. A concern was raised about the complexity of the proposed BNF loss, which has been addressed by the authors in detail in the revised version of the paper. Another concern was raised about the sensitivity of BNF to hyperparameter tuning; in response, the authors have presented results depicting the performance of BNF under different learning rates, which demonstrate the stable behavior of the proposed loss function. The authors have also included a preference learning baseline method, CPO (which introduces an NLL regularization term to the DPO loss function), in response to a reviewer’s comment.    

Reviewer aXkU was satisfied with the authors’ response and raised the rating from 5 to 6. During the AC-reviewer discussion period, Reviewer dQGY mentioned that he was willing to bump up his score to 7 (but couldn’t do it, as the deadline for updating scores had passed).

The reviewers, in general, have a positive opinion about the paper and its contributions. Based on the reviewers' feedback, the decision is to recommend the paper for acceptance to ICLR 2025. The reviewers have provided some valuable comments, such as the probability update scheme for incorrect samples and the statistical significance of the performance improvement of the proposed method over the baselines. The authors are encouraged to address these in the final version of their paper. We congratulate the authors on the acceptance of their paper!

Decision: Accept (Poster)