Unbiased learning to rank

Also known as: counterfactual learning to rank

On this page 7

Unbiased learning to rank is a family of methods that train ranking models from implicit user feedback, mainly clicks, while correcting the systematic biases in how that feedback is collected. Its central goal is to learn a ranker that orders items by their true relevance rather than by how often they happened to be seen and clicked under the previous ranking.

In recommender systems and search, click logs are abundant and cheap, but they are distorted: items shown near the top receive far more clicks regardless of quality. Unbiased learning to rank, also called counterfactual learning to rank, models these distortions explicitly and reweights or adjusts the training signal so that, in expectation, the learning objective matches the one that would be obtained from unbiased relevance judgments.

Why click data is biased

Click data is biased because a click depends on whether a user examined an item, not only on whether the item is relevant. Users scan lists from the top, trust the system’s ordering and never see items beyond the first screen, so the logging policy shapes the feedback it later learns from.

The table below lists the biases most frequently modeled in unbiased learning to rank.

BiasCauseEffect on naive training
Position biasLower positions are examined less oftenTop items look more relevant than they are
Selection biasItems outside the shown list get no exposureUnseen relevant items count as negatives
Trust biasUsers click top results even when unsureFalse positive clicks at high ranks
Presentation biasThumbnails, snippets or layout attract attentionVisual prominence mistaken for relevance
Popularity biasPopular items receive more exposureRich-get-richer feedback loop
Common biases in click feedback

Training directly on raw clicks therefore reinforces the existing ranking. The model learns that whatever the old system placed first is good, which is a classic recommendation feedback loop.

The examination hypothesis and propensity weighting

Most methods rest on the examination hypothesis: a user clicks an item only if the item is examined and judged relevant, so the click probability equals the examination probability multiplied by the relevance probability. In the simplest position-based model, examination depends only on rank.

The examination probability at a position is called the propensity. Inverse propensity scoring divides each click’s contribution to the loss by its propensity, so a click at rank 8, where examination is rare, counts more than a click at rank 1. Under correct propensities and the stated click model, this produces an unbiased estimate of a relevance-based ranking metric such as discounted cumulative gain.

Two refinements are standard in practice. Propensity clipping caps the weight at a maximum value to control variance, accepting a small bias. Self-normalized estimators divide by the sum of weights for a similar variance reduction.

Estimating propensities

Propensities are not observed directly, and estimation quality largely determines the result. Errors in the propensity model propagate into the ranker, so teams choose an estimation method based on how much disruption to users they can accept.

MethodHow it worksMain trade-off
Result randomizationShuffle top results for a small traffic shareAccurate but degrades user experience
Swap interventionsSwap one position with a fixed top positionLess disruptive, still needs online traffic
Intervention harvestingReuse natural ranking changes across logged policiesNo new experiments, needs varied historical rankers
EM-based estimationJointly fit propensity and relevance from logsNo intervention, sensitive to model assumptions
Dual learningTrain a propensity model and a ranker togetherElegant, but can converge to degenerate solutions
Propensity estimation methods

Propensity can also depend on context, such as device type, query intent or item presentation. Contextual propensity models capture this but require more data and careful validation.

How it relates to other ranking approaches

Unbiased learning to rank is best understood as a debiasing layer on top of standard learning to rank rather than a new model architecture. The underlying ranker can be a gradient-boosted tree model, a neural network or a two-tower scorer; what changes is the loss weighting and the data assumptions.

ApproachFeedback sourceBias handling
Supervised learning to rankEditorial relevance labelsUnbiased labels, but costly and small
Naive click trainingRaw click logsNone, inherits position and selection bias
Counterfactual unbiased learning to rankHistorical click logsPropensity weighting offline
Online learning to rankLive interleaving or explorationControls bias through interventions during learning
Click modelsClick logsGenerative models of browsing, used for estimation or features
Unbiased learning to rank compared with related approaches

The closest relative in recommendation is inverse propensity scoring for exposure bias, which uses the same estimator to correct for items that the recommender rarely shows. Offline recommender evaluation relies on the same counterfactual reasoning to estimate how a new policy would perform on logged data.

Limitations and common mistakes

The unbiasedness guarantee holds only when the assumed click model is correct. Real users violate the position-based model in many ways, and an unbiased estimator built on the wrong model is still biased.

  • Ignoring trust bias: pure inverse weighting cannot remove false positive clicks; affine corrections are needed.
  • Unclipped weights: tiny propensities at deep ranks create extreme variance and unstable training.
  • Ignoring selection bias: items never shown have zero propensity and cannot be corrected by reweighting alone.
  • Stale propensities: interface redesigns change examination patterns, so estimates need periodic re-measurement.
  • Evaluating on biased clicks: offline evaluation must also be debiased, or improvements will look smaller or larger than they are.

Explained without jargon

People mostly click what they see first. If a shop puts a product at the top of a list, it gets many clicks, even if a better product sits lower down. A system that learns only from clicks would think the top product is the best one. It would keep showing it first. The mistake would repeat itself.

Unbiased learning to rank fixes this by asking how likely each spot was to be noticed. A click on an item far down the list is worth more, because few people look there. In this way the system learns what people actually prefer, not just what they happened to see.

A typical use case

An online grocery service ranks search results for queries such as “oat milk” using a model retrained weekly on click logs. Analysts notice that new products never climb the list: items first shown at position 1 receive about six times more clicks than equally good items at position 6.

The team runs a swap intervention on 2 percent of traffic for two weeks and estimates that the examination probability falls from 1.0 at rank 1 to about 0.17 at rank 6. It then retrains the ranker with inverse propensity weights, clipped at a maximum of 10, and adds a trust-bias correction for the top three positions.

In an online A/B test, the debiased ranker raises add-to-cart rate by about 3 percent and lifts new products into the top five more often. The improvement comes not from a better model architecture but from a more honest training signal.