Skip to content
mlmentorship

Position bias and counterfactual learning to rank

Clicks reflect relevance and exposure. Use randomized data, propensities, IPS, self-normalization, or doubly robust estimates without hiding support and variance limits.

Published · 7 min read ·Role-specific ·Advanced

Visual quick review

Separate relevance from exposure, then trace how inverse examination weighting makes two positions with identical latent relevance contribute equal expected signal under a position-based examination model.

Learning objective

Importance weights change estimated contribution, not the observed click count

Position 1 · usually examined

100 impressions with the same assumed 60% relevance rate

Examination propensitye = 1.00
Expected clicks100 × 0.60 × 1.00 = 60
Inverse weight1 / 1.00 = 1×
Weighted click signal60 × 1 = 60

Position 4 · often skipped

100 impressions with the same assumed 60% relevance rate

Examination propensitye = 0.25
Expected clicks100 × 0.60 × 0.25 = 15
Inverse weight1 / 0.25 = 4×
Weighted click signal15 × 4 = 60
Read it this way: hold relevance probability at 0.60 over 100 impressions. Examination rates 1 and 0.25 produce 60 and 15 expected clicks. Weights 1 and 4 restore expected signals of 60 under this model. These are hypothetical expectations, not measured clicks or a target-policy value estimate. Original example checked against Joachims, Swaminathan, and Schnabel.
Check: Why do fifteen lower-position clicks contribute sixty units in expectation without becoming sixty actual clicks?
Full explanation 7 min read
Reading depth

Summary

Clicks reflect both relevance and whether users examined the result under the displayed ranking. Identical relevance can produce different click counts at different positions. Define the desired outcome and the probability creating its observation before choosing a correction.

Examination weighting estimates a signal under a click model; policy ratios target an alternative policy’s reward. These are different estimands and different propensities.

The observation process

A simple examination model writes click probability as

where means the user examined position and means document was relevant to query .

Here denote click, examination, and relevance; denote query, document, and position. The factorization excludes effects such as trust-driven clicks and examination dependencies on snippets or neighboring results. No click does not distinguish an unexamined result from an examined rejection.

Learning objective

Importance weights change estimated contribution, not the observed click count

The weight changes estimated contribution, not the clickOne click under examination probability 0.2 contributes weight 5 under this estimator. It remains one observed click.Observation identity does notmultiply#151 observed click; total weight 5One-in-five examination enlarges itsweight to five
Read it this way: One click under examination probability 0.2 contributes weight 5 under this estimator. It remains one observed click. Does a weight of five mean that five clicks were observed?
Reference drawing

Learning objective

Importance weights change estimated contribution, not the observed click count

The weight changes estimated contribution, not the clickOne click under examination probability 0.2 contributes weight 5 under this estimator. It remains one observed click.Observation identity does notmultiply#151 observed click; total weight 5One-in-five examination enlarges itsweight to five
Derivation

Position 1 · usually examined

100 impressions with the same assumed 60% relevance rate

Examination propensitye = 1.00
Expected clicks100 × 0.60 × 1.00 = 60
Inverse weight1 / 1.00 = 1×
Weighted click signal60 × 1 = 60

Position 4 · often skipped

100 impressions with the same assumed 60% relevance rate

Examination propensitye = 0.25
Expected clicks100 × 0.60 × 0.25 = 15
Inverse weight1 / 0.25 = 4×
Weighted click signal15 × 4 = 60
Read it this way: hold relevance probability at 0.60 over 100 impressions. Examination rates 1 and 0.25 produce 60 and 15 expected clicks. Weights 1 and 4 restore expected signals of 60 under this model. These are hypothetical expectations, not measured clicks or a target-policy value estimate. Original example checked against Joachims, Swaminathan, and Schnabel.
Check: Why do fifteen lower-position clicks contribute sixty units in expectation without becoming sixty actual clicks?
Read it this way: One click under examination probability 0.2 contributes weight 5 under this estimator. It remains one observed click. Does a weight of five mean that five clicks were observed?

Estimate propensities

Examination propensity is the probability of examination; policy propensity is the probability of assigning an action or slate. Randomized swaps or a validated click model can inform examination probabilities. Randomized assignment should log its actual conditional policy probability, candidates, and policy version. Propensities inferred from click outcomes alone need an identification model.

Worked example

Fix one context and deterministic toy rewards, with a five-event log containing four A actions and one B.

ActionLogger Target RewardPolicy ratio
A0.80.210.25
B0.20.804
B under a different, unsupported logger00.8UnknownUndefined

The last row is a separate failure scenario, not part of the five-event log. Raw reward is , but the original target policy’s value is .

Inverse propensity scoring

For contextual bandit data logged under policy , the value of target policy can be estimated by

Here are context, chosen action, and mature reward; are logger and target policies. The fixture gives . The action counts match logger expectations by construction, not by a precision guarantee.

With correct assignment probabilities, overlap, consistent outcomes, and no hidden assignment confounding, the expectation becomes target-policy reward. Very small logger probabilities can create large variance; reward maturity and interference remain separate assumptions.

Self-normalization and clipping

Self-normalized IPS, often called SNIPS, divides by the sum of weights:

The fixture’s weight sum is , so SNIPS also equals . Its effective sample-size diagnostic is . Self-normalization has finite-sample bias and is undefined when the realized weight sum is zero.

Weight clipping applies

Clipping changes weights, whereas SNIPS changes normalization. Either can trade variance against bias; neither is an identification repair.

Doubly robust estimation

Let predict the expected reward. A doubly robust value estimate is

where

For outcome predictions , the target-model baseline is . The average weighted residual is , restoring estimate . Under valid identification and regularity, DR can remain consistent if either nuisance model is correct. Use independent nuisance fitting or suitable cross-fitting; reusing evaluation outcomes naively can invalidate that claim.

Leave logged support

New task: evaluate a candidate the deterministic logger never exposes.

Picture and change: check before forming ratios.

Check: the unsupported table row requires division by zero. More logs from the same deterministic policy do not reveal its missing reward. An extrapolating outcome model adds assumptions; calling it doubly robust does not supply observed evidence.

Use when: restrict the target policy/population or obtain permitted evidence where coverage is absent.

Change weight tails

New task: reduce sensitivity to a few large weights.

Picture and change: compare declared clipping, normalization, nuisance models, and additional supported data separately.

Check: clipping at changes the B weight from four to one. The clipped SNIPS denominator becomes , giving instead of . Lower dispersion therefore need not preserve the estimate.

Use when: report ESS, weight quantiles/maxima, and clipping sensitivity rather than trusting nominal sample size.

Slates and ranking policies

A ranked list is a structured action whose full assignment probability may be very small. Replacing slate propensities with independent item or position probabilities requires assumptions about interactions and examination. One click may change whether later items are examined. An inverse-examination weight is not a generic whole-slate policy-value ratio. Randomized interleaving or online experiments can answer suitable comparisons when offline identification is inadequate.

Diagnostics

Before trusting a counterfactual estimate, report:

  • how propensities were generated or estimated;
  • effective sample size;
  • weight quantiles and maximum weight;
  • overlap by query and item slice;
  • sensitivity to clipping;
  • agreement with randomized online results;
  • reward maturity and missing outcomes;
  • policy and data versions.

A precise result on a supported slice does not identify value for unsupported traffic. Report target population, reward definition, and unknown outcomes alongside numerical uncertainty.

In an interview

Does doubly robust mean assumption-free?

Answer

No. Its nuisance-model robustness operates within a valid identification setup. It does not fix zero support, interference, confounded assignment, immature rewards, or an ill-defined outcome.

Common mistakes

Do not treat the toy log as a confidence interval or empirical reproduction. More independent supported data can improve precision; more unsupported traffic cannot create an absent counterfactual. Neither a smaller variance estimate nor a fitted reward model proves examination or assignment assumptions.

Practice next

Use this material in learning-to-rank losses, evaluating a search ranker, causal inference for ML decisions, and personalized search ranking.