A Complete Tutorial on Off-Policy Evaluation for Recommender Systems

Adrien Biarnes11 Mar 2023

Problem

A team builds a new version of a recommender, for example by adding an item-topic feature, and must decide whether it beats the production one. A standard offline test on logged clicks is biased: the logs hold rewards only for items the old policy showed, so the new model is judged on items it would rarely recommend. An A/B test avoids this but takes weeks on low traffic and may need the model rewritten for production first.

Example from the article: a deep-learning recommender showed a 10% decrease in the main metrics in the usual offline test and a 2% increase with off-policy evaluation; the A/B test confirmed the gain.

Solution in brief

Reweight logged rewards by how likely the new policy is to display each item relative to the old policy (self-normalized inverse propensity score, SNIPS). The estimate depends on display probabilities, so the author counts them from the logs for a simple context instead of predicting them with a neural network.

Questions this case answers
  • How to estimate the online performance of a new ranking policy from logs produced by a different policy, when rewards are observed only for the items that were shown
  • How to estimate action propensities for a policy that was never deployed, using only training data and logged exposures
  • How to evaluate a new recommender model offline on logs of the old model before running an A/B test?
  • How to estimate the probability that an item is shown to a user, for the old and the new policy?

Tools and methods

  • Off-policy evaluation — estimating a new policy's value from data logged by another policy.
  • Direct method — a reward model fills the missing labels; biased, the baseline to avoid.
  • Inverse propensity scoring (IPS), clipped IPS — reweight rewards by the ratio of action probabilities.
  • SNIPS — IPS divided by the mean importance weight; no hyperparameter.
  • Display probability counting — frequentist or Bayesian (beta posterior) estimate.
Continue reading — it's free

Google or a one-time email code. No password.