Problem
A recommender must pick a short list per user from up to 1.5 million tracks, and a heavy model cannot score every user-item pair in time. Some users have no history, and the best design depends on catalog size. The author met all of this in one contest: music, marketplace and bank products, scored by one average metric. Code ran on the organizers' server (100 minutes, A100) and the data was visible only as a small sample.
Example from the article: recommend 10 tracks a listener will play in the rest of the session, judged by Mean Average Precision against the last two tracks held out of each test session.
Solution in brief
On large catalogs, cheap generators (co-occurrence statistics, plus ALS for the marketplace) give a few hundred candidates, and CatBoostRanker orders them using the candidate's rank in each generator. Users without history get propensity classifiers built on anonymized profile features. A catalog of 19 items needs one model per item.
Questions this case answers
- How to produce a top-N recommendation list from an item catalog too large to score every user-item pair with a heavy model
- How to recommend to users with no interaction history using only anonymized profile features
- How to choose between a two-stage pipeline and per-item propensity models depending on catalog size
- How to recommend the next tracks in a listening session from a catalog of over a million items
Tools and methods
- Co-occurrence statistics — top-N tracks that most often followed a track
- cuDF — GPU analog of pandas for fast groupby, merge and sort
- CatBoostRanker — reranks candidates, trained on 1/0 ranks
- ALS (implicit library) — user and item vectors for marketplace candidates
- Propensity classifiers — per-item models for cold users and for the 19 bank products
- Feature engineering and ensembling — helped in the bank-product task
Google or a one-time email code. No password.