Case Studies from Industry

By Ludovico Bessi, Senior ML Engineer at Google ยท Updated

These case studies show how the techniques in this book fit together in published systems at YouTube, TikTok/ByteDance, Pinterest, Alibaba, Meta, Kuaishou and Netflix. Each one illustrates a different trade-off between retrieval, ranking, freshness and scale.

For deeper write-ups, see the ML systems case studies collection and the Machine Learning at Scale newsletter.

YouTube: The Reference Funnel

Problem: recommend videos from a corpus of millions to billions of users, with fresh content arriving constantly.

Design:

  • Candidate generation framed as extreme classification over videos, using averaged watch-history and search embeddings, trained with sampled softmax (Candidate Generation in the Wild).
  • Ranking with a deep network trained with watch-time-weighted logistic regression (Deep Ranking Models).
  • Later: sampling-bias-corrected two-tower retrieval, MMoE multi-task ranking with engagement and satisfaction objectives, and a shallow tower for position bias (Bias & Debiasing).

Lessons: optimize for watch time and satisfaction rather than clicks; model freshness explicitly (example age); correct position bias in training rather than ignoring it.

TikTok / ByteDance: Real-Time Adaptation

Problem: a short-video feed where each user watches many items per session and tastes shift within minutes.

Design:

  • Rich implicit signals per video: watch completion, rewatches, skips, likes, shares.
  • Online training with Monolith: collisionless embedding tables with frequency filtering and expiry, and frequent parameter sync from training to serving (Training at Scale).
  • Heavy use of exploration to test new videos with small audiences before wider distribution.

Lessons: in fast-moving products, model freshness and dense implicit feedback can matter more than model sophistication. See TikTok's real-time recommendation system.

Pinterest: Graphs, Content and Multi-Interest Users

Problem: visual discovery over billions of pins with highly diverse user interests.

Design:

  • Pixie random walks for real-time related-pin retrieval; PinSage graph convolutional embeddings at billion-node scale.
  • PinnerSage multi-embedding user representations; PinnerFormer sequence-based user embeddings trained for long-term engagement (Foundation Models).
  • Multiple retrieval paths blended before ranking (Multiple Retrieval Paths).

Lessons: match retrieval to the data's structure; represent users with several interests. See Pinterest's recommendation evolution.

Alibaba: Behavior Modeling for E-commerce

Problem: rank products for users with long, intent-rich shopping histories.

Design: a lineage of influential models โ€” DIN (target attention over behavior), DIEN (interest evolution), BST (transformers over behavior), SIM (lifelong behavior via two-stage search), MIND (multi-interest retrieval) and ESMM (entire-space modeling of click and conversion) (User Behavior Modeling, Multi-Objective Optimization).

Lessons: user history is the strongest signal, and making it candidate-aware is a large win; model dependent outcomes over the full impression space.

Meta: Scaling Recommendation Models

Problem: rank content and ads for billions of users across many surfaces.

Design:

  • DLRM as the reference architecture, with sharded embedding tables and hybrid parallelism.
  • Generative Recommenders with HSTU, trained on raw action sequences, showing power-law scaling of quality with compute (Sequential Generative Recommenders).
  • Large ads ranking models (for example GEM) that bring LLM-scale ideas to ads and transfer knowledge to smaller production models (Meta's GEM).

Lessons: recommendation models can scale like language models once the architecture and training data are right; knowledge transfer from large to small models is how scale reaches serving.

Kuaishou: Collapsing the Funnel

Problem: short-video recommendation with the cost and inconsistency of a multi-stage cascade.

Design: OneRec, an end-to-end generative model that produces recommendations directly with semantic IDs, aligned to user preferences with a reward model and preference optimization. Earlier work (TWIN) improved lifelong behavior modeling consistency between retrieval and ranking stages.

Lessons: the funnel is a cost optimization, not a law; with enough modeling and serving efficiency, stages can merge.

Netflix: Foundation Models for Personalization

Problem: personalize many surfaces (rows, artwork, search) for a catalog that is small compared to social platforms but where each choice matters.

Design: a foundation model trained on members' full interaction histories, providing embeddings and fine-tuned variants for downstream applications; continued study of scaling such models (Foundation Models).

Lessons: consolidating many specialized models into one shared representation simplifies the stack and lets every surface benefit from improvements.

Common Themes

Theme Chapters
Funnel with many retrieval paths 2, 6โ€“9
History is the strongest signal 11, 15
Multi-objective ranking with calibrated predictions 3, 13
Bias correction and exploration 14, 19
Freshness via real-time training 18
Scaling with sequence and generative models 15โ€“17
List-level logic in re-ranking 20

Key Takeaways

  1. YouTube established the retrieval-then-ranking funnel and practical bias corrections.
  2. TikTok/ByteDance shows the value of real-time training and dense implicit feedback.
  3. Pinterest and Alibaba show graph retrieval, multi-interest users and behavior modeling.
  4. Meta, Kuaishou and Netflix show the shift toward scaled, generative and foundation models.
  5. The same few principles โ€” recall then precision, history, calibration, debiasing, freshness โ€” recur everywhere.