You built a new recommender. You think it’s better than the one in production. You have months of logs from the old recommender: every request, every ranked list shown, every click.
But there’s a problem. Those logs only show what happened for the items the old recommender chose to show, in the positions it chose to show them. Your new recommender would rank different items higher, and you have no idea how users would have responded to those. The data you have is about one reality. You want to know about another.
This is the problem off-policy evaluation (OPE) solves: estimating how a new recommender would have performed, using only data collected under a different recommender. It is also called counterfactual evaluation, because you are asking a counterfactual question: what would have happened if we had used a different recommender?
The three estimators are below, then when to use them instead of the ranking metrics you already know, then the practical problems that break them. If you already know IPS and doubly robust, skip ahead to the practical failures. If you don’t, the worked example builds the whole thing from scratch.
The setup: what you actually have
Every interaction in your logs has the same shape: a context (the user, the request), an action (the item the old recommender showed), and an outcome (click, purchase, watch time, whatever you measure). Call the old recommender the logging policy. Call the new one the target policy.
The key fact is that you only observe the outcome for the action actually taken. If the logging recommender showed item A at the top and the user clicked, you know the user liked A in that context. You know nothing about whether they would have liked item B, because B was never shown. Or it was shown at rank 10, where almost nobody looks.
A naive approach is to replay the target recommender on the logged contexts and only count the cases where it agrees with the logging recommender. This is unbiased when there is enough overlap, but it throws away most of your data, and it fails when the two recommenders differ a lot, which is exactly when you most want to know if the new recommender is better.
To do better, you need one more thing in your logs: the propensity, the probability the logging recommender assigned to the action it took. Without it, no reweighting is possible. And if the logging recommender was deterministic, always showing the argmax item, there is no counterfactual at all, because no other item was ever given a chance. Logging propensities, and adding a little randomization to production, is what makes OPE possible.
The three estimators
There are three families of estimators, and the differences between them are the whole story. We will carry one worked example through all three, first on a single slot, then evolved into a ranked list.
The example, step 1: one slot. Suppose you have 100 logged requests. The logging recommender put item A at the top 50 times and item B at the top 50 times. Item A got 10 clicks (a 20% click rate) and item B got 5 clicks (a 10% click rate). Your new target recommender would put item A at the top 80% of the time and item B 20% of the time. What is the target recommender’s expected click rate?
The true value, if the click rates are really 20% and 10%, is 0.8 × 0.2 + 0.2 × 0.1 = 0.18. That is the number we are trying to recover from the logs. Each estimator gets there differently, and each fails differently.
The direct method: fit a model, trust the model
The direct method (DM) fits a reward model on the logs, a model that predicts the click probability for each item in each context, and averages its predictions weighted by the target recommender.
If the model says A has a 20% click rate and B has 10%, the estimate is . Correct.
DM has low variance, because it does not reweight anything. Its problem is bias: it is only as good as the reward model, and the reward model was trained on the same biased logs.
Suppose the model is wrong about item A. It predicts a 15% click rate instead of the true 20%, perhaps because A was rarely shown in a context where it performs well. Then DM gives . It confidently reports the wrong number, and nothing in the estimate tells you it is wrong.
DM is a good estimator when your reward model is good. It is a dangerous one when your model is wrong in exactly the places where the target recommender differs from the logging recommender, which is the common case.
IPS: reweight what you observed
Inverse propensity scoring (IPS) does not use a reward model at all. It reweights each observed outcome by how much more (or less) likely the target recommender is to take that action than the logging recommender was:
V̂ = average over logs of [ reward × π_target(action) / π_logging(action) ]
The intuition: each logged observation represents many similar cases that were not observed. If the target recommender is more likely to show item A, then each time A was shown and clicked, it counts for more than one click in the target recommender’s world.
In our example, the logging recommender showed each item with probability 0.5. The target recommender shows A with 0.8 and B with 0.2. So each click on A is weighted by 0.8 / 0.5 = 1.6, and each click on B by 0.2 / 0.5 = 0.4. The estimate is . It recovers the true value.
IPS is unbiased, provided the propensities are known and every item the target recommender might show had some chance of being shown by the logging recommender. That is its strength. Its weakness is variance. The weights can be enormous. A deterministic target recommender that picks an item the logger chose 5% of the time carries weight 20 on every matching event, and its effective sample size is about 5% of the log. A handful of rare, heavily weighted observations can dominate the entire estimate.
The cautionary tale is from YouTube’s REINFORCE recommender (Chen et al., 2019). The team raised the cap on importance weights from e^3 (about 20) to e^5 (about 148). Same model, same objective, same traffic. View time fell by 0.52%, a significant loss on a system where a 0.07% gain was worth reporting. With the cap lifted, the recommender was free to chase the noise in the heavily weighted tail. Clipping the weights is not a minor implementation detail; it is what keeps IPS usable.
Doubly robust: model plus correction
The doubly robust (DR) estimator combines the two. It starts with the reward model’s prediction, then adds an IPS-weighted correction on the residual, the difference between the observed reward and what the model predicted:
V̂ = model prediction + average over logs of [ (π_target / π_logging) × (reward − model prediction) ]
The correction is what makes it doubly robust: the estimate is unbiased if either the reward model is correct or the propensities are correct. If the model is wrong, the correction fixes it. If the propensities are wrong, the model carries the estimate.
Return to our example, but now suppose the reward model is wrong about item A: it predicts 15% instead of the true 20%. DM alone gives 0.14. DR starts from 0.14 and adds the IPS-weighted residual, which comes to +0.04 across the item A observations. For item B the model is right, so the correction averages to zero. DR gives 0.14 + 0.04 = 0.18, the true value, even though the model was wrong.
DR is the workhorse estimator, and for good reason. But know its limits. On click rates of a few percent, the reward model removes little variance, because most of the residual is irreducible noise. And DR still needs the support condition: if the logging recommender never showed an item, no correction can recover it.
The example, step 2: from one slot to a ranked list
Now evolve the example. The recommender shows a top-3 list, and the user can click any of them. The reward depends on the whole list and on position, because users examine the top position far more than the third.
Take three items with true relevance, the probability a user clicks an item if they examine it: A = 0.4, B = 0.3, C = 0.2. Examination falls with position: 1.0 at position 1, 0.5 at position 2, 0.25 at position 3. A click is examination relevance, so item A at position 1 is clicked with probability 0.4, but at position 3 only .
The logging recommender shows a uniformly random permutation of [A, B, C], each of the six orderings equally likely. The target recommender always shows [A, B, C], the relevance order. What is the target list worth?
Its true value is the sum over positions of examination relevance:
The logging recommender’s average list is worth 0.525, since each item lands at each position a third of the time. The target list is better by 0.075, and we want to estimate that from the logs.
Naive list-level IPS fails here. Treat the whole list as one action. The target puts probability 1 on the list [A, B, C]. The logger puts probability 1/6 on it. So the IPS weight for a logged [A, B, C] list is 1 / (1/6) = 6, and for any other logged list it is 0.
The estimator only uses the one-sixth of logs where the logger happened to show exactly [A, B, C], each weighted by 6. With 600 logged lists, your effective sample size is about 100, not 600. The estimate is unbiased, it recovers 0.60 in expectation, but it throws away five-sixths of your data, and the variance is correspondingly large. This is the list-level version of the IPS variance problem: the propensity of a whole list is the product of the propensities of its items, so it gets tiny fast, and the weights get huge.
The fix is to decompose by position. Instead of weighting whole lists, estimate each item’s relevance from every log where it appeared, correcting for examination. Item A appears in all 600 logged lists, a third of the time at position 1, a third at position 2, a third at position 3.
Take each click on A and weight it by 1 / examination(position where A appeared). At position 1 the weight is 1, at position 2 it is 2, at position 3 it is 4. The expected weighted clicks on A are ; divide by the 600 times A appeared and you get 0.4, the true relevance, recovered using all the data instead of one-sixth of it. Do the same for B and C, then score the target list as the sum over positions of examination estimated relevance, which gives 0.60 as above.
This is the examination decomposition, the central idea in list-level OPE: do not treat the list as one action with one tiny propensity. Break the reward into per-position contributions, correct each for examination, and recombine.
It is also why position bias is the core of ranking OPE, not a side topic: the examination model is what lets you use all your data instead of only the exact list matches. Recent estimators extend the same decomposition to DR, so the estimate is unbiased if either the examination model or the relevance model is right.
Two things to carry forward. First, support gets harder for lists: every item in the target list needs to have been shown somewhere by the logger, ideally at multiple positions. Second, the single-slot estimators are building blocks, not the final answer. The final answer decomposes by position.
OPE vs ranking metrics: when to use which
If you have read the earlier posts in this series, you already know NDCG, MAP, precision@k, recall@k, and MRR. When do you use OPE instead of those? They answer different questions.
Ranking metrics ask: how well does this recommender order the items users interacted with? You run the candidate over a held-out set of logged interactions and measure how highly it ranks the items the user actually clicked. NDCG rewards putting relevant items near the top. These are prediction questions, answered on observed data.
OPE asks: what reward would this recommender get if it were deployed? Not how well it orders what users already did, but what users would do if this recommender were the one choosing what they see. That is a causal question, and it is the one that matters for a deployment decision.
The difference matters because ranking metrics are biased by the logging recommender. A candidate that ranks the same items the old recommender showed, in the same order, scores well on NDCG, even if those items are not the best ones to show. The metric cannot see the items the old recommender never surfaced, so it cannot reward a recommender for surfacing them.
This is a feedback loop: a recommender trained and evaluated on its predecessor’s logs converges toward reproducing its predecessor, and the offline metrics improve while the online metrics do not. I covered this in the offline-vs-online evaluation post.
So the rule of thumb is:
- Use ranking metrics when the candidate is close to the logging recommender. If the new recommender mostly reorders the same items, NDCG and precision@k are fine. They are cheap, fast, low-variance, and need no propensities logged.
- Use OPE when the candidate differs substantially: a new retrieval stage, a different candidate set, a recommender that surfaces items the old one rarely showed. Ranking metrics are biased in favour of the status quo here, and OPE corrects for the exposure difference.
- Use both, in sequence. Ranking metrics for fast model selection, OPE as a gate before A/B testing, and A/B tests for the final decision.
The practical problems
Each estimator above has a failure mode, and the fixes are as important as the estimators themselves. Each problem is also where the research is heading: the direction follows from the failure.
Support and overlap. If the logging recommender never showed an item, no estimator can tell you how users would have responded to it. Check the overlap before trusting an estimate. If the target concentrates on items the logger rarely showed, the effective sample size, not the raw log volume, is the number to report. The support condition is the hard limit on what OPE can say (Dudík, Langford & Li, 2011). Two caveats to that limit: propensities are not always logged, and many production systems explore with Thompson sampling, where the propensities are not directly available, but they can be recovered exactly (Jeunen, 2025). And a deterministic logger is not quite a dead end: recent work recovers a counterfactual by exploiting the stochasticity of clicks themselves rather than the logger (Tanaka et al., 2026).
Variance. Weights of 20 to 50 let a handful of observations dominate. The fixes are clipping the weights and the self-normalized IPS estimator (SNIPS), which divides by the sum of the weights instead of the number of observations (Swaminathan & Joachims, 2015). Control variates are the same idea in a more general form, and the bridge to the next post. One direction that attacks variance directly is pairwise OPE: instead of estimating each recommender’s absolute value and subtracting, estimate the difference between two recommenders directly (Δ-OPE, Jeunen & Ustimenko, 2024). Most of the noise is shared, the same contexts and the same users, so it cancels in the difference. When you only care which of two recommenders is better, which is usually the case, the pairwise estimator is the right tool.
Propensity overfitting. So far we have been evaluating one recommender. When you go from evaluating to learning, searching over many candidates and picking the best-scoring one, a new failure appears. IPS is unbiased for any single recommender, but the maximum of IPS estimates is biased upward, and the bias concentrates on the recommenders that differ most from the logger. The fix is counterfactual risk minimization (Swaminathan & Joachims, 2015): penalize each recommender’s own estimated variance during learning, so the optimizer cannot exploit the estimator’s noise.
Position bias. A click is examination × relevance, and dividing by the rank-dependent examination probability recovers an unbiased relevance estimate (Joachims, Swaminathan & Schnabel, 2017). The correction needs propensities only for clicked documents, but the price is variance, so clipping is mandatory. The open problem is lists: the position-based decomposition is the current best answer, but it rests on the examination model being right, that a click factorizes into examination × relevance and examination depends only on position. When examination depends on the items around it, the decomposition breaks. Recent work proposes estimators for exactly this case, decomposing clicks into examination and relevance when examination depends on the ranking itself (Okamura & Sugawara, 2026).
The offline-online gap. Even a perfect OPE cannot capture feedback loops, novelty effects, or how user behaviour shifts once a recommender is live. OPE is a filter for bad recommenders, not a replacement for an A/B test. The direction that closes this gap is fusing OPE with A/B testing. The traditional view treats offline and online as separate worlds: OPE for screening, A/B tests for decisions. Recent work erases that boundary. If you know how much the two recommenders overlap, you can design the online test around the difference between them rather than splitting traffic between them, and you need far less traffic to reach the same conclusion (Jeunen, 2026; Gupta & Maji, 2026). Their headline result is the accuracy of a balanced A/B test with roughly half the evaluation traffic.
What the evidence says
No estimator dominates. On the 26-million-row Open Bandit Dataset (Saito et al., 2021), the direct method was most accurate at n = 10,000 in two of three campaigns, and a shrinkage doubly robust estimator at n = 300,000. So try more than one, compare them, and be suspicious when they disagree. Disagreement is information about where your data is thin.
Airbnb reported (Zhang et al., 2025) that interleaving and counterfactual evaluation together increased experiment sensitivity by up to a factor of 100 relative to conventional A/B testing, in the first deployment that ran both side by side. That is the promise: OPE does not just save you from running bad tests, it makes the tests you do run far more sensitive.
Key papers: Horvitz & Thompson (1952); Bottou et al. (2013, JMLR); Li et al. (2011, WSDM); Dudík, Langford & Li (2011, ICML); Strehl et al. (2010, NIPS); Swaminathan & Joachims (2015, JMLR); Swaminathan & Joachims (2015, NIPS); Joachims, Swaminathan & Schnabel (2017, WSDM); Joachims, Swaminathan & de Rijke (2018, ICLR); Gilotte et al. (2018, WSDM); Yang et al. (2018, RecSys); Chen et al. (2019, WSDM); Saito et al. (2021, NeurIPS); Jeunen & Ustimenko (2024, RecSys); Zhang et al. (2025, KDD); Jeunen (2025, RecSys); Jeunen (2026, arXiv); Tanaka et al. (2026, ICLR); Okamura & Sugawara (2026, arXiv); Gupta & Maji (2026, arXiv:2611.24757).