Bandits for Recommender Systems

Eugene Yan8 May 2022

Problem

A recommender trained on past engagement tends to promote items that already did well. Items it does not show get little or no engagement, so the system never learns that they might be good, and the feedback loop continues. The loop is worst when the item set changes quickly (news, ads, tweets) or traffic is low, because waiting for a batch retrain is too slow. The cost is regret, the opportunity lost while showing suboptimal items.

Example from the article: Yahoo's news recommender puts randomly selected users into an exploration bucket and serves them articles uniformly at random.

Solution in brief

A bandit keeps an estimate of each candidate's value together with its uncertainty, and picks candidates partly because they are uncertain. The post compares epsilon-greedy, Upper Confidence Bound (UCB) and Thompson Sampling, and collects how companies run them: exploration size, warm-start, user representation and offline evaluation.

Questions this case answers
  • How to keep a ranking system from locking in past winners when low-exposure items never collect enough feedback to be judged fairly
  • How to evaluate a new exploration policy offline when the logged data was produced by a different, biased policy
  • How to stop a recommender from starving new or rarely shown items of exposure?
  • How to choose between epsilon-greedy, UCB and Thompson Sampling for a recommender?

Tools and methods

  • Epsilon-greedy — random action with probability ε, best-known action otherwise
  • UCB / LinUCB — pick the arm with the highest optimistic estimate; LinUCB adds ridge regression on arm features
  • Thompson Sampling — sample each arm's value from its posterior and pick the highest draw
  • Replay and inverse propensity scoring — offline evaluation of a new policy on logged data
  • k-means and PCA — shrink the user space before learning a policy
Continue reading — it's free

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