Search

Search papers and lessons

SimPO: Simple Preference Optimization with a Reference-Free Reward

Yu Meng, Mengzhou Xia, Danqi Chen · 2024

Meng, Xia and Chen (2024) align a language model to human preferences with a reward equal to its average token log-probability and a margin, dropping the reference model DPO needs.

On this page

  • Colour = topic mix
  • Probability
  • Discrete math
  • Calculus
  • Linear algebra
  • Reinforcement learning
  • Post-training
  • ReadReady to readNot yet

TL;DR

SimPO is a way to train a language model on pairs of answers, where a person has marked one answer as preferred. It defines a reward for an answer as its average token log-probability, scaled by a constant, and it asks the reward of the preferred answer to beat the other by a fixed margin. Because the reward uses only the model being trained, it needs no reference model, which saves memory and compute. On AlpacaEval 2 and Arena-Hard, SimPO scored higher than DPO and the other preference methods the paper tested.

Builds on: Direct Preference Optimization, Language Model, Bradley–Terry Model · Leads to: the DPO family of methods

Why it mattered

After RLHF became the standard way to make chat models follow instructions, a large share of work moved to simpler offline methods that train directly on preference pairs. DPO was the most widely used of these. It still needs a frozen reference model, which doubles memory during training, and the reward it optimises does not match the likelihood that the model uses when it generates text.

SimPO removes both problems. Its reward is the quantity used to rank candidate outputs during decoding, so training and generation use the same measure. It is cheap to run, and it reached the highest scores in the paper's comparison across two base-model settings and two instruction-tuned settings. It is widely cited as a reference point for reference-free preference training.

History

Preference learning goes back to the Bradley-Terry model of 1952, which assigns each item a strength and gives the probability that one beats another. Christiano and colleagues used the same idea to train a reward model from human comparisons in 2017. Ouyang and colleagues applied it to language models in 2022 with a reward model and reinforcement learning. Rafailov and colleagues removed the explicit reward model in 2023 with DPO, and SimPO came in 2024 as a further simplification of DPO's reward.

The problem

Preference data for language models comes as triples: a prompt xx, a winning response ywy_w that a person preferred, and a losing response yly_l. The goal is to make the model assign higher probability to winners than to losers, without drifting too far from good behaviour.

DPO handles this by defining an implicit reward from the ratio between the trained model and a frozen reference model, then fitting a Bradley-Terry probability to the reward difference. The paper identifies two drawbacks.

  1. A reference model is required. It must be loaded and run during training, which costs memory and compute.
  2. The training reward does not match generation. A model generates by choosing high-likelihood continuations, but DPO trains on a reference-adjusted reward. The paper argues that this mismatch is a real cost: the model is trained to rank pairs by a measure it does not use when it generates.

The paper also notes a length problem. The summed log-probability of a response falls as the response gets longer, so a summed reward favours short answers, whatever their quality. Averaging over tokens removes that length bias from the comparison.

How it works

The walkthrough traces one preference pair through the SimPO loss. The model assigns a log-probability to each token of each response. The numbers below are chosen so the arithmetic is easy to check.

flowchart LR
  A[Prompt with winning and losing answers] --> B[Token log-probs from the model]
  B --> C[Sum or average per answer]
  C --> D[Scale by beta over length]
  D --> E[Reward difference minus margin]
  E --> F[Sigmoid and negative log]
  F --> G[Gradient step on the model]
  1. Take a preference pair. The winning answer has ∣yw∣=4|y_w| = 4 tokens and the losing answer has ∣yl∣=2|y_l| = 2 tokens. Check: the winner is longer, so a summed score would penalise it.
  2. Add up the log-probabilities. The winner's token log-probabilities sum to −2.4-2.4, and the loser's sum to −2.0-2.0. Check: the summed score ranks the shorter loser higher, which is the length bias the paper describes.
  3. Average over tokens. Divide by length: the winner gives −2.4/4=−0.6-2.4 / 4 = -0.6 and the loser gives −2.0/2=−1.0-2.0 / 2 = -1.0. Check: now the winner is ranked higher, which matches the preference label.
  4. Scale by β\beta. With β=2\beta = 2 the rewards are rw=2×(−0.6)=−1.2r_w = 2 \times (-0.6) = -1.2 and rl=2×(−1.0)=−2.0r_l = 2 \times (-1.0) = -2.0. Check: the reward difference is 0.80.8.
  5. Subtract the margin. With target margin γ=0.5\gamma = 0.5, the quantity inside the sigmoid is 0.8−0.5=0.30.8 - 0.5 = 0.3. Check: the margin asks for more separation than the raw difference gives.
  6. Compute the loss. The sigmoid of 0.30.3 is about 0.5740.574, so the loss is −ln⁡(0.574)≈0.554-\ln(0.574) \approx 0.554. Check: the loss falls as the sigmoid approaches one, which means the margin is exceeded by more.

Step 6 is where training happens: a gradient step increases the log-probability of the winner's tokens and decreases that of the loser's, weighted by how wrong the current ranking is. No reference model appears anywhere in this chain.

The math

Let πθ(y∣x)\pi_\theta(y \mid x) be the model. The paper uses the average token log-probability as the implicit reward:

rSimPO(x,y)=β∣y∣log⁡πθ(y∣x)=β∣y∣∑i=1∣y∣log⁡πθ(yi∣x,y<i).r_{\text{SimPO}}(x, y) = \frac{\beta}{|y|} \log \pi_\theta(y \mid x) = \frac{\beta}{|y|} \sum_{i=1}^{|y|} \log \pi_\theta(y_i \mid x, y_{\lt i}).

Here ∣y∣|y| is the number of tokens and β\beta scales the reward. The probability that ywy_w is preferred is modelled with a target margin γ>0\gamma > 0:

p(yw≻yl∣x)=σ(r(x,yw)−r(x,yl)−γ),σ(z)=11+e−z.p(y_w \succ y_l \mid x) = \sigma\big( r(x, y_w) - r(x, y_l) - \gamma \big), \qquad \sigma(z) = \frac{1}{1 + e^{-z}}.

Training minimises the negative log-likelihood of the observed preferences:

LSimPO(πθ)=−E(x,yw,yl)[log⁡σ(β∣yw∣log⁡πθ(yw∣x)−β∣yl∣log⁡πθ(yl∣x)−γ)].\mathcal{L}_{\text{SimPO}}(\pi_\theta) = -\mathbb{E}_{(x, y_w, y_l)}\left[ \log \sigma\left( \frac{\beta}{|y_w|} \log \pi_\theta(y_w \mid x) - \frac{\beta}{|y_l|} \log \pi_\theta(y_l \mid x) - \gamma \right) \right].

Step 3 in symbols

The average is the sum divided by ∣y∣|y|. For the winner, 14(−2.4)=−0.6\frac{1}{4}(-2.4) = -0.6. For the loser, 12(−2.0)=−1.0\frac{1}{2}(-2.0) = -1.0. These are the values inside the reward before multiplying by β\beta.

Step 5 in symbols

The margin enters as a subtraction inside the sigmoid. The loss is zero only in the limit where the reward difference goes to infinity, and at any finite margin the gradient keeps pushing the difference upward. The paper finds that the margin helps generalisation up to a point and then hurts.

Step 6 in symbols

With z=0.3z = 0.3, σ(z)=1/(1+e−0.3)=1/1.7408=0.5744\sigma(z) = 1 / (1 + e^{-0.3}) = 1 / 1.7408 = 0.5744, and −ln⁡(0.5744)=0.5544-\ln(0.5744) = 0.5544.

Worked examples

Example
1. Average log-probability (tiny)

A response has two tokens with log-probabilities −0.5-0.5 and −1.5-1.5.

  1. Sum: −0.5+(−1.5)=−2.0-0.5 + (-1.5) = -2.0.
  2. Length: ∣y∣=2|y| = 2.
  3. Average: −2.0/2=−1.0-2.0 / 2 = -1.0.
  4. Interpretation: this is the value the SimPO reward uses before the scale β\beta is applied.
Example
2. One preference pair (standard)

The winning answer has length 44 and summed log-probability −2.4-2.4. The losing answer has length 22 and summed log-probability −2.0-2.0. Use β=2\beta = 2 and γ=0.5\gamma = 0.5.

  1. Winner average: −2.4/4=−0.6-2.4 / 4 = -0.6, reward 2×(−0.6)=−1.22 \times (-0.6) = -1.2.
  2. Loser average: −2.0/2=−1.0-2.0 / 2 = -1.0, reward 2×(−1.0)=−2.02 \times (-1.0) = -2.0.
  3. Reward difference: −1.2−(−2.0)=0.8-1.2 - (-2.0) = 0.8.
  4. Subtract the margin: 0.8−0.5=0.30.8 - 0.5 = 0.3.
  5. Sigmoid: σ(0.3)≈0.574\sigma(0.3) \approx 0.574.
  6. Loss: −ln⁡(0.574)≈0.554-\ln(0.574) \approx 0.554.
  7. Interpretation: the pair is already ranked correctly, but the margin is not yet met, so the loss is still substantial and training continues to widen the gap.
Example
3. Reading the ablation in the paper (realistic)

Suppose an ablation table reports the AlpacaEval 2 length-controlled win rate for the Mistral-Base setting. Illustrative numbers: the full SimPO model scores 21.521.5, the version without length normalisation scores 11.911.9, the version with margin γ=0\gamma = 0 scores 16.816.8, and DPO scores 15.115.1 in the same table.

  1. Effect of removing length normalisation: 21.5−11.9=9.621.5 - 11.9 = 9.6 points.
  2. Effect of removing the margin: 21.5−16.8=4.721.5 - 16.8 = 4.7 points.
  3. Gain of SimPO over DPO: 21.5−15.1=6.421.5 - 15.1 = 6.4 points.
  4. Relative gain over DPO: 6.4/15.1≈0.426.4 / 15.1 \approx 0.42, about 4242 percent.
  5. Interpretation: with these numbers, length normalisation is the larger of the two design choices, and the margin also contributes a clear part of the gain. Check the real figures in the paper before quoting them.

Try it: a pair has reward difference 1.51.5, with β=2\beta = 2 already applied and γ=0.5\gamma = 0.5. What is the loss −ln⁡σ(1.5−0.5)-\ln \sigma(1.5 - 0.5)?

Answer: σ(1.0)=1/(1+e−1)=0.7311\sigma(1.0) = 1 / (1 + e^{-1}) = 0.7311, and −ln⁡(0.7311)=0.3133-\ln(0.7311) = 0.3133.

Results

The paper evaluates on AlpacaEval 2, which reports a length-controlled win rate (LC) and a raw win rate (WR) judged against a reference model, on Arena-Hard, and on MT-Bench. It uses four settings: Mistral-7B and Llama-3-8B, each in a base version fine-tuned on UltraChat and an instruct version.

On Mistral-Base, SimPO scores 21.521.5 LC and 20.820.8 WR on AlpacaEval 2, where DPO scores 15.115.1 and 12.512.5. On Mistral-Instruct, SimPO scores 32.132.1 LC and 34.834.8 WR. On Llama-3-Instruct it scores 44.744.7 LC and 40.540.5 WR. The gains hold across the four settings on AlpacaEval 2, and the paper reports consistent gains on Arena-Hard as well. Exact figures are in the paper's tables.

The ablations support the two design choices. Removing length normalisation hurts, and the paper links this to longer outputs whose length the reward has come to favour. Setting the margin to zero also hurts.

The limits are stated in the paper. AlpacaEval 2 and Arena-Hard are judged by a strong language model rather than by people, and MT-Bench separates methods poorly, so small differences there may be noise. Increasing the margin eventually lowers generation quality, so γ\gamma must be tuned. SimPO does not impose a KL constraint; the paper reports that the drift from the starting model stays small in its experiments, which is an empirical observation and not a guarantee.

Common mistakes and tradeoffs

It is tempting to think SimPO is DPO without the reference model. In fact it changes the reward in two ways: it uses the average log-probability instead of the reference ratio, and it adds a margin. Removing the reference model is only part of the method.

It is tempting to think that length normalisation is a cosmetic fix. In fact it changes which answer wins the comparison: on a per-token scale, length no longer decides the ranking by itself, which removes a systematic bias rather than tidying up the scores.

It is tempting to think a larger margin is always better. In fact the paper reports that generation quality does not keep improving as γ\gamma grows, and falls for large margins, so the margin is a setting to tune.

It is tempting to think that without KL regularisation the model will drift away from its starting point. In fact the drift stayed small in the paper's experiments, but nothing in the objective guarantees it, so it should be measured in practice.

When to use SimPO: preference tuning where memory is tight and a reference model is costly to hold. When not to use it: when a learned reward model is needed for other purposes, such as best-of-n ranking at inference, or when a principled divergence constraint is required. DPO remains the safer baseline when a reference model is affordable and the reference ratio is part of the design.

Reading guide

Read the paper in this order, with the lessons that cover what each section needs.

Check yourself

QuestionWhy does SimPO use the average log-probability per token rather than the summed log-probability as its reward?Show answer

The summed value falls as the answer gets longer, so it penalises long winning answers and encourages the model to inflate the probability of long answers. Dividing by the length removes that incentive and makes the reward match the length-normalised likelihood the model uses when it generates.

QuestionA winning answer has summed log-probability −3.0-3.0 and length 66. A losing answer has summed log-probability −2.0-2.0 and length 22. What are their average log-probabilities?Show answer

The winner's average is −3.0/6=−0.5-3.0 / 6 = -0.5. The loser's average is −2.0/2=−1.0-2.0 / 2 = -1.0. The winner has the higher average, which matches the preference label.

QuestionIn the SimPO loss, what does the target margin γ\gamma do, and what does the paper report happens when it is made very large?Show answer

The margin is subtracted from the reward difference inside the sigmoid, so the winner must beat the loser by at least γ\gamma to make the loss small. The paper reports that generation quality does not keep improving as the margin grows, and falls for large margins, so γ\gamma has to be tuned.

QuestionA pair has reward difference 0.60.6 (already scaled by β\beta) and margin γ=0.2\gamma = 0.2. What is the loss −ln⁡σ(0.6−0.2)-\ln \sigma(0.6 - 0.2)?Show answer

The argument is 0.40.4. The sigmoid is 1/(1+e−0.4)=1/1.6703=0.59871 / (1 + e^{-0.4}) = 1 / 1.6703 = 0.5987. The loss is −ln⁡(0.5987)≈0.513-\ln(0.5987) \approx 0.513.

Sources

Read the full paper

Yu Meng, Mengzhou Xia, Danqi Chen, 2024. arXiv:2405.14734