Machine Learning in online cinemas: how to increase watch time and understand that ML alone is not enough. Part 2

Aleksey Zhiryakov1 Nov 2024

Problem

An online cinema builds a personal storefront of shelves for every viewer, and the goal is more viewing time. A neural model ranks titles by probability, so it cannot guarantee what editors need. It does not know about a title promoted on TV, it can repeat one title in several shelves, and it has no statistics for new releases. The storefront must also refresh daily, yet stay stable while a user browses.

Example from the article: in the KION online cinema, editors boost a title promoted on TV, which the model cannot know about, and a rules layer of more than 50 rules places it on the ML shelf.

Solution in brief

Train a title-embedding model on a 180-day window and validate it offline on a held-out later period. Then check it online in an A/B test against a pyramid of viewing metrics. A separate service, the blender, assembles the storefront from ML sources and applies editorial rules (boosting, deduplication, franchise spacing, removal of watched titles), with daily checks that nothing silently broke.

Questions this case answers
  • How to combine learned personalized rankings with editorial and business constraints in one serving layer while keeping the result fresh and stable
  • How to validate a candidate recommender offline on a time holdout before an online experiment, with a metric hierarchy for the rollout decision
  • How to train and offline-validate a title-embedding recommender for a streaming home page
  • How to keep a personalized home page fresh daily without it changing while the user browses

Tools and methods

  • Title embeddings (128 dimensions) — nearest titles in Euclidean space give candidates for shelves
  • Jaccard similarity on metadata — scores title pairs for the item-to-item (i2i) model
  • Business-rule blender — a service that composes shelves from ML sources and applies rules
  • FastAPI, MLflow, Apache Airflow — serving, model training and background jobs, on Python 3.11
Continue reading — it's free

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