Dueling Bandits & Learning from Comparisons
When feedback is a preference between two arms: the road to RLHF.
People are better at saying which of two answers they prefer than at scoring either on an absolute scale. A dueling bandit learns from exactly that: in each round it shows two arms and observes which one wins. Comparisons bring new difficulties: preferences can cycle, so a best arm may not exist, and what counts as the winner depends on what you assume. This lesson covers the preference matrix and its winners, the main algorithms and their regret, the Bradley–Terry model that turns comparisons into scores, and the path from interleaved search results to choosing which responses to show human raters in RLHF.
What you’ll learn
- Define the dueling bandit, its preference matrix and regret, and the Condorcet, Copeland, Borda and von Neumann winners.
- State the assumptions and regret of Interleaved Filter, RUCB, RMED and double Thompson sampling.
- Prove that a von Neumann winner always exists, using the minimax theorem.
- Fit a Bradley–Terry model by maximum likelihood, and explain why utility models make the different winners coincide.
- Connect dueling bandits to interleaving in web search and to preference collection for RLHF.
Comparisons instead of rewards
In a dueling bandit with arms, the learner chooses two arms in each round and observes a single bit: whether won. Arm beats arm with probability , where and . Write for the preference margin, so . No arm has a reward of its own: everything is relative.
A Condorcet winner beats every other arm with probability above one half, for all . When one exists, round costs , the average of the two arms' margins against the winner ("strong" regret), or only the smaller of the two ("weak" regret). Showing the winner against itself costs nothing, so a learner that has found it stops paying.
| A | B | C | D | Borda score | |
|---|---|---|---|---|---|
| A | 0.5 | 0.55 | 0.55 | 0.55 | 0.55 |
| B | 0.45 | 0.5 | 0.9 | 0.9 | 0.75 |
| C | 0.45 | 0.1 | 0.5 | 0.6 | 0.38 |
| D | 0.45 | 0.1 | 0.4 | 0.5 | 0.32 |
Two more notions complete the list. A Copeland winner beats the largest number of other arms; one always exists, though there may be several. A von Neumann winner (Dudík, Hofmann, Schapire, Slivkins & Zoghi, 2015) is a probability distribution over arms that beats or ties every single arm in expectation; it also always exists, as the third step proves. Of the four, only the Condorcet winner can fail to exist.
Three answers to a question: A beats B with probability 0.6, B beats C with probability 0.6, and C beats A with probability 0.6. Which is the Condorcet winner?
- A, because it is listed first
- None: every arm loses to another one, so preferences cycle
- All three, because each wins one comparison
- C, because it beats the arm that beats B
Show the answer
B. None: every arm loses to another one, so preferences cycle
A Condorcet winner must beat every other arm. Here each arm beats one rival and loses to the other, a cycle like rock–paper–scissors. Each arm's Borda score is and each has one Copeland win, so those winners are three-way ties; the von Neumann winner, by symmetry the uniform mix, is the natural answer.
Algorithms and their regret
Interleaved Filter (Yue, Broder, Kleinberg & Joachims, 2012) assumes a total order of the arms with two regularity conditions: strong stochastic transitivity, if then , and a stochastic triangle inequality, . It keeps a candidate arm, duels it in turn against the remaining arms until confidence intervals separate each pair, discards the arms it beats, and adopts any arm that beats it as the new candidate. Its refined version IF2 has expected regret of order , where is the best arm's margin over the second best, and the paper proves a matching lower bound of the same order.
RUCB (Zoghi, Whiteson, Munos & de Rijke, 2014) needs only that a Condorcet winner exists. It keeps optimistic estimates of every pairwise probability, picks as candidate an arm whose optimistic win probability against every other arm is at least one half, and pits it against the arm with the best optimistic chance of beating it. It has a finite-time regret bound that grows like . RMED (Komiyama, Honda, Kashima & Nakagawa, 2015) matches a tight asymptotic lower bound of the Lai–Robbins type, in which KL divergences between comparison outcomes play the role of the arms' divergences.
When no Condorcet winner is assumed, the target is a Copeland winner, which always exists. Double Thompson sampling (Wu & Liu, 2016) keeps a Beta posterior for every pairwise probability and chooses the two arms with two independent sets of posterior samples, the first to pick a likely winner and the second its strongest challenger; its regret is of order for Copeland winners, and when a Condorcet winner exists.
| Algorithm | Assumption | Regret |
|---|---|---|
| Interleaved Filter (IF2) | Total order, strong stochastic transitivity, stochastic triangle inequality | , matching the lower bound |
| RUCB | A Condorcet winner exists | Finite-time, growing like |
| RMED | A Condorcet winner exists | Asymptotically optimal |
| Double Thompson sampling | None (targets a Copeland winner) | ; with a Condorcet winner |
When no arm wins: the von Neumann winner
Let , so and is skew-symmetric, . Read as a zero-sum game: the row player picks arm , the column player arm , and the row player wins . By von Neumann's minimax theorem the game has a value over mixed strategies:
Skew-symmetry pins the value at zero. For every , , so the column player can answer and ; symmetrically, for every :
A maximin strategy therefore guarantees against every arm . Since , this says that an arm drawn from beats or ties each single arm on average: a von Neumann winner. If a Condorcet winner exists, the point mass on qualifies, since for every .
Dudík et al. (2015) introduced the von Neumann winner for contextual dueling bandits, where the target is a randomized policy, a map from contexts to arms, that beats or ties every other policy; they gave efficient algorithms that access the policy class through a classification oracle. The same object has reappeared in language-model alignment: Nash learning from human feedback (Munos et al., 2024) learns a preference model over pairs of responses and trains a policy toward the Nash equilibrium of the resulting preference game, a policy preferred to any competing policy, rather than maximizing a scalar reward.
From comparisons to scores: Bradley–Terry
When preferences come from latent utilities, the cycles disappear. The Bradley–Terry model (Bradley & Terry, 1952) gives every arm a score and sets . Then beats with probability above one half exactly when , and since is increasing, strong stochastic transitivity holds: the arm with the largest score is a Condorcet winner, and the Condorcet, Copeland and Borda winners coincide. The Plackett–Luce model (Luce, 1959; Plackett, 1975) extends it to rankings of several items: the top item is chosen with probability proportional to , the next one likewise among the rest, and so on.
Given comparisons , with if won, the log-likelihood is that of a logistic regression on the difference vector :
It is concave, and since , its gradient for each arm is that arm's observed wins minus its expected wins:
Scores are identified only up to a common shift, since adding a constant changes no probability, so fix one score or regularize. The maximum likelihood estimate exists and is unique, given the shift, when for every split of the arms into two groups each group has beaten the other at least once. With features, turns the problem into logistic regression on : the setting of linear dueling bandits, and of the reward models trained on human preferences in Reward Models from Preferences.
Under a Bradley–Terry model, arm A's score exceeds arm B's by 1. With what probability does A win a comparison against B?
Show the answer
0.73
. Score differences add along chains: if B's score also exceeds C's by 1, then A beats C with probability , more than either single comparison, which is strong stochastic transitivity at work. A difference of gives odds of exactly 3 to 1.
From search engines to RLHF
Interleaving. Search engines compared rankers by preferences long before RLHF. Team-draft interleaving (Radlinski, Kurup & Joachims, 2008) merges the result lists of two rankers into a single list shown to one user, alternating picks like captains choosing teams; clicks on each team's results reveal which ranker the user preferred, without asking anyone. Yue and Joachims (2009) used such comparisons to tune a parameterized ranker online, with dueling bandit gradient descent: compare the current ranker with a randomly perturbed one, and step toward the perturbation when it wins.
Preferences for language models. Reinforcement learning from human feedback (RLHF) fits a Bradley–Terry reward model to human comparisons of responses, the preference data, and then optimizes the policy against it (RL from Human Feedback). Which pairs to show raters is a dueling bandit problem with contexts, the prompts: passive collection compares two responses sampled from the current model, while active collection chooses pairs that are informative about which response is best. Dwaracherla, Asghari, Hao and Van Roy (2024) compared these for a language model and found that double Thompson sampling, with an epistemic neural network representing the reward model's uncertainty, reached strong performance with far fewer queries than passive or Boltzmann exploration.
Key takeaways
- A dueling bandit observes which of two arms wins. Its preference matrix may have a Condorcet winner, which then also wins Copeland's count; Borda and von Neumann winners answer different questions, and only the Condorcet winner can fail to exist.
- Under a total order with strong stochastic transitivity and a stochastic triangle inequality, Interleaved Filter's matches the lower bound; RUCB needs only a Condorcet winner, RMED is asymptotically optimal, and double Thompson sampling targets Copeland winners.
- A von Neumann winner always exists: the skew-symmetric game has value 0, so its maximin mixed strategy beats or ties every arm, and averages of no-regret self-play approximate it.
- Bradley–Terry scores make preferences transitive and the winners coincide. The maximum likelihood fit is a logistic regression whose gradient is each arm's wins minus its expected wins.
- Interleaving turned clicks into comparisons for web search. RLHF reward models are Bradley–Terry fits to human comparisons, and choosing which pairs to query is a contextual dueling bandit problem, where Thompson-style active selection can save many queries.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which statement about the Condorcet winner is true?
- It always exists
- It may not exist, since preferences can cycle; when it exists it is also the Copeland winner, but not necessarily the Borda winner
- It is always the Borda winner
- It is the arm with the highest average win probability
Show the answer
B. It may not exist, since preferences can cycle; when it exists it is also the Copeland winner, but not necessarily the Borda winner
An arm that beats all rivals has the maximal Copeland count, so it is the unique Copeland winner. But it may beat them narrowly while another arm crushes most rivals, as in the four-arm table, so the Borda winner can differ. And with a cycle there is no Condorcet winner at all.
Why does a von Neumann winner always exist, even when preferences cycle?
- Because some arm always beats at least half of the others
- Because the preference matrix is invertible
- Because it is defined as the Borda winner
- Because the skew-symmetric game has value 0 by the minimax theorem, so its maximin mixed strategy beats or ties every arm in expectation
Show the answer
D. Because the skew-symmetric game has value 0 by the minimax theorem, so its maximin mixed strategy beats or ties every arm in expectation
Skew-symmetry gives for every mixed strategy, which forces the value of the zero-sum game to be 0. A maximin strategy then guarantees for every arm : it beats or ties each arm on average.
Preferences follow a Bradley–Terry model, . Which statement holds?
- The arm with the largest score is a Condorcet winner, and the Condorcet, Copeland and Borda winners coincide
- Preferences may still cycle
- The Borda winner may differ from the arm with the largest score
- Only a von Neumann winner exists
Show the answer
A. The arm with the largest score is a Condorcet winner, and the Condorcet, Copeland and Borda winners coincide
exactly when , so the order of the scores is the order of preferences, and strong stochastic transitivity holds because is increasing. Every notion of winner picks the top-scoring arm.
What does the dueling-bandit view add to collecting preference data for RLHF?
- It replaces the reward model by a lookup table of comparisons
- It shows that comparisons carry no more information than ratings
- It treats the choice of which pairs of responses to show raters as an exploration problem: informative pairs can reach a good model with far fewer comparisons than pairs sampled passively
- It removes the need for human raters
Show the answer
C. It treats the choice of which pairs of responses to show raters as an exploration problem: informative pairs can reach a good model with far fewer comparisons than pairs sampled passively
Passive collection compares two samples from the current model, which are often similar or uninformative. Treating pair selection as a (contextual) dueling bandit, with uncertainty about the reward model, directs queries where they help: in Dwaracherla et al.'s experiments, double Thompson sampling with an epistemic neural network needed far fewer queries.
Further reading
- Y. Yue, J. Broder, R. Kleinberg & T. Joachims, "The K-armed dueling bandits problem," Journal of Computer and System Sciences 78(5), 1538–1556 (2012).
- M. Zoghi, S. Whiteson, R. Munos & M. de Rijke, "Relative upper confidence bound for the K-armed dueling bandit problem," International Conference on Machine Learning (2014).
- M. Dudík, K. Hofmann, R. E. Schapire, A. Slivkins & M. Zoghi, "Contextual dueling bandits," Conference on Learning Theory (2015).
- R. A. Bradley & M. E. Terry, "Rank analysis of incomplete block designs: I. The method of paired comparisons," Biometrika 39(3/4), 324–345 (1952).
- V. Bengs, R. Busa-Fekete, A. El Mesaoudi-Paul & E. Hüllermeier, "Preference-based online learning with dueling bandits: A survey," Journal of Machine Learning Research 22(7), 1–108 (2021).