Personal project · public or synthetic data
Ranking with cascading bandits
Learn which 5 items to show from clicks alone, online, and serve the policy behind an API.
Key results
- CTR after learning, Thompson
- 0.656
- CTR, random ranking
- 0.216
- lost clicks over 20,000 users
- 718
Forgetting old evidence, the textbook answer to a changing catalogue, did not help. The result stays in the benchmark.
Learning from clicks alone
Which 5 products should a page show when click-through rates are unknown and the catalogue changes? Users scan top-down and click the first attractive item: items below a click were never seen, so treating "not clicked" as "not attractive" would bias every estimate.
20,000 simulated users
20,000 users, 10 seeds, 95 % confidence bands, 100 items, top-5 list. Cascade Thompson sampling loses 718 clicks and reaches 99 % of the optimal click rate, 3× random ranking. KL-UCB cuts UCB1’s regret by 3.5×; ε-greedy looks good on a stable catalogue but suffers most from a popularity shift (+50 % regret).
The API rejects unknown, expired or replayed ranking ids, so a replayed callback cannot double-count a click, and checkpoints the posterior so a restart keeps what was learned.


A negative result, kept on purpose
Negative result, kept on purpose: "forgetting" old evidence, the textbook answer to non-stationarity, did not help. With 100 items and 1–5 observations per user, every discount tried forgot faster than it learned; plain Thompson sampling re-adapted on its own. All results come from simulation.