Dropping ranking metrics in a recommender system, part 2: two-stage models

Daria Tikhonovich, Grigory Gusarov18 Aug 2023

Problem

A recommender built from a competition-winning model scored well on ranking metrics but gave poor recommendations. A balanced first-stage model (implicit bm25) fixed most of the popularity bias, yet off-genre items still slipped into the top: an adult film appeared at the top of a list for the historical movie "Gladiator". Gradient boosting on top of the candidates, the usual fix, did not help on this dataset.

Example from the article: on the Kion cinema dataset, recommendations for "Gladiator" from the bm25 model contained an adult film among otherwise relevant titles.

Solution in brief

Replace the boosting reranker with a content-based second stage. Score each bm25 candidate by the cosine between the user's average genre-and-country vector and the item's vector, then sort by the weighted sum of the bm25 rank and the genre-score rank with weights 1:2. Validate two-stage models with sliding-window cross-validation, and judge them by several metrics plus visual review rather than MAP alone.

Questions this case answers
  • How to re-rank candidates from a retrieval model so that irrelevant items disappear when a learned reranker only amplifies item popularity
  • How to cross-validate a two-stage ranking pipeline over time when features, first-stage models and the reranker are all tied to dates
  • How to remove off-genre items from the top of a recommendation list without bringing popularity bias back?
  • How to re-rank first-stage candidates when a gradient boosting reranker only pulls hits to the top?

Tools and methods

  • Implicit bm25 — first-stage candidate generator
  • Genre and country dummy vectors — 12 most frequent genres plus 3 "countries"; user vector is the mean over viewing history
  • Rank blending — bm25 rank and genre-score rank weighted 1:2
  • CatBoost — boosting reranker that was tried and dropped
  • Sliding-window cross-validation — time-ordered folds for the whole two-stage pipeline
Continue reading — it's free

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