SlideShare a Scribd company logo
Bandit Infrastructure
for Personalized
Recommendations
Elliot Chow & Fernando Amat Gil
ML Platform Meetup
September 12th 2019
Recommendations at Netflix
User is going to abandon
session in...
Recommendations at Netflix
● Personalized Homepage for each member
● Goal: quickly help members find content they love
● Challenge:
○ 150M+ members in 190 countries
○ New content added daily
● Recommendations Valued at: $1B*
*Carlos A. Gomez-Uribe, Neil Hunt: The Netflix Recommender System: Algorithms, Business Value, and Innovation. ACM Trans. Management Inf. Syst. 6(4): 13:1-13:19 (2016)
Meaning
● What is this title?
● Why should I watch it?
Evidence to convey meaning
Evidence example I
Evidence example I: web homepage
Evidence example II
Billboard
iOS
Evidence personalization
● Multiple choices for each (show, evidence) pair
● For each title, hard to predict what resonates before launch
● Taste can change over time
Evidence personalization (cont’d)
● Asset choreography (slate): image, video, text, cast, etc
Bandit
Bandit setup
● Generic framework to obtain unbiased training data
● Very vast literature (beyond scope)
● Every session is a mini A/B test
Pred 1-Pred
reward?
Bandit setup for evidence
● Goal: for each mini A/B test collect a sample with
○ Context x
○ Selected action (or treatment) a
○ Propensity p
○ Set of possible actions s
○ Reward r
● Once you have this, very similar to other ML approaches
● Obtaining this data is the hard part infrastructure-wise
(Elliot’s section)
System requirements
● Scalable: at Netflix’s global size
● Generic: common policy (or model) and offline metrics API
● Flexible:
○ Each recommendation problems has different
attribution, reward and context definition
○ Easy to add new canvases to the bandit system (image,
video, text, cards, etc)
Policy API
● Class Slate (List[Items] items)
○ Vector of ids to recreate a composition
(“row_10”, “img_124”, “img_1037”,...,
“synopsis_32”, “card_101”)
1
2 3 4 5
7 6
8
9
Policy API
● Slate select(List[List[Item]] items)
○ Given a list of possible slates, return one of them
(explore-exploit trade-off)
● Map[Slate, Double] propensity(List[List[Item]
items)
○ Return propensity of each possible slate to debias data
Offline policy evaluation
● Unbiased offline evaluation from logged samples
● Inverse Propensity Scoring (IPS), Doubly Robust, etc
E[Reward] = 2 / 3
User 1 User 2 User 3 User 4 User 5 User 6
Logged stochastic
treatment
Play?
(binary
reward)
New policy
assignment
Offline policy evaluation system
● Input:
○ Logged sample (x, a, s, r, p)
○ Trained policy
● Output:
○ Metric (IPS, SNIPS, DM, DR, RECAP, etc)
● Observations:
○ Trivially parallelizable (decomposes per sample)
○ Each sample needs to consider all possible candidates
Data
Actions taken by a Netflix member
- Log-in
- Search for “stra”
- Play Stranger Things
...
Data:
Member Activity
Describes Netflix’s desire to take a specific action
- Recommend Stranger Things
- Display Image
...
Data:
Intent-to-Treat (ITT)
The actual experience as seen by the Netflix member
- Showed Stranger Things on Home Page
- Displayed Image
...
Data:
Treatment
Log In Play Stranger
Things
Post-PlayIntent-to-treatHome
Page
13 Reasons Why
on Popular on
Netflix
Stranger
Things
on My List
Treatment
Member Actions
“Closing the
Loop”
“Closing the
Loop”:
Join Intent-to-
Treat with
Treatment
- Did the intent-to-treat
take effect as desired?
- Which policy was
used?
- What were the
propensities?
- What features were
used?
“Closing the
Loop”:
Attribution /
Reward
Computation
- Define reward based
on short-/long-term
member activity
- Compute in “near”
real-time
“Closing the
Loop”:
Update and
Publish Policy
- Incorporate incoming
observations
- Evaluate offline replay
metrics
- Push updated policy
Infrastructure
Components
Standardized
Logging
Standardize logging to simplify on-
boarding
- Common logging format
- Centralized landing
topics/tables
Real-time
Processing with
Flink
Process member activity,
treatment, and intent-to-treat
events in real-time
- Join intent-to-treat and
treatment events
- Prepare data in format
amenable to reward
computation
- Kafka and Hive outputs
Spark Client For
Attribution and
Reward
Computation
Provide flexible processing of the
joined member activity, treatment,
and intent-to-treat data
- Events sorted by time
- Unbounded windowing
support
- Optimizations for common
access patterns
Configurable,
Common
Attribution
Templatize common attribution
methods for simpler access to data
- Select treatment T events
- Attribute member actions A to
treatments
- Within time window W
- Match treatment and member
action based on key K
- Materialize as Hive tables
Challenges
Microservice Architecture
Edge
Home Page
Service
Image
Selection
Service
...
...
...
... ...
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
ID1=ITT1:
Image-123,
Features...
ID1
ID1
...
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
ID1,
Image-123
ID1→ITT1:
Image-123,
Features...
ID1
ID1
...
ID1, Image-
123
ID1, Image-
123
ID1, Image-
123
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
ID1,
Image-123
ID1→ITT1:
Image-123,
Features...
ID1
ID1
...
ID1, Image-
123
ID1, Image-
123
ID1, Image-
123
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
Cache
ITT1:
Image-123,
Features..
...
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
Cache
ITT1:
Image-123,
Features..
ID2
...
ID2,
Image-123
ID2, Image-
123
ID2, Image-
123
Microservice Architecture
Edge
Home Page
Service
...
Image
Selection
Service
...
...
...
Cache
ITT1:
Image-123,
Features...
ID2,
Image-123
ID2
ID2 →
ITT1
...
ID2, Image-
123
ID2, Image-
123
Stream Processing
- Out-of-order data
- Maintaining state for joins
- Widely-varying traffic patterns
Scale
- 150M+ members
- 190 countries
- 450B+ unique events per day
- Many microservices
- Many personalization
algorithms
Used in Production as well
as multiple A/B tests
Thank you

More Related Content

PDF
From Idea to Execution: Spotify's Discover Weekly
PDF
Sequential Decision Making in Recommendations
PPTX
Recommendation Modeling with Impression Data at Netflix
PDF
Time, Context and Causality in Recommender Systems
PDF
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
PDF
Personalized Playlists at Spotify
PPTX
Collaborative Filtering at Spotify
PDF
Calibrated Recommendations
From Idea to Execution: Spotify's Discover Weekly
Sequential Decision Making in Recommendations
Recommendation Modeling with Impression Data at Netflix
Time, Context and Causality in Recommender Systems
[PR12] You Only Look Once (YOLO): Unified Real-Time Object Detection
Personalized Playlists at Spotify
Collaborative Filtering at Spotify
Calibrated Recommendations

What's hot (20)

PDF
Facebook Talk at Netflix ML Platform meetup Sep 2019
PPTX
LinkedIn talk at Netflix ML Platform meetup Sep 2019
PPTX
ML Infrastracture @ Dropbox
PDF
ML Infra for Netflix Recommendations - AI NEXTCon talk
PDF
Déjà Vu: The Importance of Time and Causality in Recommender Systems
PDF
Past, Present & Future of Recommender Systems: An Industry Perspective
PDF
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
PDF
Deep Learning for Recommender Systems
PDF
Deep Learning for Recommender Systems
PDF
Crafting Recommenders: the Shallow and the Deep of it!
PDF
Tutorial on Deep Learning in Recommender System, Lars summer school 2019
PDF
A Multi-Armed Bandit Framework For Recommendations at Netflix
PDF
Artwork Personalization at Netflix
PDF
Rishabh Mehrotra - Recommendations in a Marketplace: Personalizing Explainabl...
PDF
Past, present, and future of Recommender Systems: an industry perspective
PDF
Missing values in recommender models
PDF
Interactive Recommender Systems with Netflix and Spotify
PPTX
Learn to Rank search results
PDF
Recent Trends in Personalization: A Netflix Perspective
PDF
Recent Trends in Personalization at Netflix
Facebook Talk at Netflix ML Platform meetup Sep 2019
LinkedIn talk at Netflix ML Platform meetup Sep 2019
ML Infrastracture @ Dropbox
ML Infra for Netflix Recommendations - AI NEXTCon talk
Déjà Vu: The Importance of Time and Causality in Recommender Systems
Past, Present & Future of Recommender Systems: An Industry Perspective
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Deep Learning for Recommender Systems
Deep Learning for Recommender Systems
Crafting Recommenders: the Shallow and the Deep of it!
Tutorial on Deep Learning in Recommender System, Lars summer school 2019
A Multi-Armed Bandit Framework For Recommendations at Netflix
Artwork Personalization at Netflix
Rishabh Mehrotra - Recommendations in a Marketplace: Personalizing Explainabl...
Past, present, and future of Recommender Systems: an industry perspective
Missing values in recommender models
Interactive Recommender Systems with Netflix and Spotify
Learn to Rank search results
Recent Trends in Personalization: A Netflix Perspective
Recent Trends in Personalization at Netflix
Ad

Similar to Netflix talk at ML Platform meetup Sep 2019 (20)

PDF
A fresh new look into Information Gathering - OWASP Spain
PPTX
Fairness, Transparency, and Privacy in AI @ LinkedIn
PDF
Real-time big data analytics based on product recommendations case study
PDF
Pinterest - Big Data Machine Learning Platform at Pinterest
PDF
IRIS.TV Talks Future of Video Personalization at Cross Campus LA
PDF
Snowplow: open source game analytics powered by AWS
PPTX
Supersize your production pipe enjmin 2013 v1.1 hd
PDF
Big Data LDN 2018: ENABLING DATA-DRIVEN DECISIONS WITH AUTOMATED INSIGHTS
PPTX
Dataiku hadoop summit - semi-supervised learning with hadoop for understand...
PPTX
PPTX
Making Reddit Search Relevant and Scalable - Anupama Joshi & Jerry Bao, Reddit
PDF
Using Apache Kafka to Analyze Session Windows
PPTX
SplunkLive! Presentation - Data Onboarding with Splunk
PPTX
ApacheCon NA 2018 : Apache Unomi, an Open Source Customer Data Platformapache...
PPTX
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
PDF
F8 tech talk_pinterest_v4
PDF
How Celtra Optimizes its Advertising Platform with Databricks
PDF
user Behavior Analysis with Session Windows and Apache Kafka's Streams API
PDF
Open source for customer analytics
PDF
PSUG 1 - 2024-01-22 - Onboarding Best Practices
A fresh new look into Information Gathering - OWASP Spain
Fairness, Transparency, and Privacy in AI @ LinkedIn
Real-time big data analytics based on product recommendations case study
Pinterest - Big Data Machine Learning Platform at Pinterest
IRIS.TV Talks Future of Video Personalization at Cross Campus LA
Snowplow: open source game analytics powered by AWS
Supersize your production pipe enjmin 2013 v1.1 hd
Big Data LDN 2018: ENABLING DATA-DRIVEN DECISIONS WITH AUTOMATED INSIGHTS
Dataiku hadoop summit - semi-supervised learning with hadoop for understand...
Making Reddit Search Relevant and Scalable - Anupama Joshi & Jerry Bao, Reddit
Using Apache Kafka to Analyze Session Windows
SplunkLive! Presentation - Data Onboarding with Splunk
ApacheCon NA 2018 : Apache Unomi, an Open Source Customer Data Platformapache...
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
F8 tech talk_pinterest_v4
How Celtra Optimizes its Advertising Platform with Databricks
user Behavior Analysis with Session Windows and Apache Kafka's Streams API
Open source for customer analytics
PSUG 1 - 2024-01-22 - Onboarding Best Practices
Ad

Recently uploaded (20)

PPTX
The various Industrial Revolutions .pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Five Habits of High-Impact Board Members
PDF
Architecture types and enterprise applications.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
STKI Israel Market Study 2025 version august
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Hybrid model detection and classification of lung cancer
The various Industrial Revolutions .pptx
A comparative study of natural language inference in Swahili using monolingua...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Five Habits of High-Impact Board Members
Architecture types and enterprise applications.pdf
WOOl fibre morphology and structure.pdf for textiles
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A review of recent deep learning applications in wood surface defect identifi...
DP Operators-handbook-extract for the Mautical Institute
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Group 1 Presentation -Planning and Decision Making .pptx
observCloud-Native Containerability and monitoring.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Module 1.ppt Iot fundamentals and Architecture
STKI Israel Market Study 2025 version august
Getting started with AI Agents and Multi-Agent Systems
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Hybrid model detection and classification of lung cancer

Netflix talk at ML Platform meetup Sep 2019

Editor's Notes

  • #4: Mention study of 1B is from 2016. It is just an approximation.
  • #5: One aspect of recommendations is once you have selected a title for the user, trying to explain to them why the system things is a good title for them. This especially important for Netflix Originals, where there is almost no previous knowledge. For example, I go to my home page and I see this title recommended in the big billboard. OK, seems definitely romance. But is it also commedy? Or more drama? Are there any of my favourite actors/actresses? Do I have time to watch it?
  • #6: Imagine a recommendation homepage without any evidence… this is how it would look like. You would probably only click on things that you know really well (for example, play The Office S2:E3 for the hundredth time).
  • #8: TODO: run animation
  • #19: More detail about Data and Infra side
  • #22: Can be different from ITT - fall backs, business rules overriding
  • #23: Timeline view of when this data is produced/by whom
  • #24: Connect these different discrete pieces of data back together to update our policies
  • #25: Allows us to answer important questions
  • #26: Ctr, abandonment…. As soon as possible to allow policies up-to-date/reactive to changes
  • #27: Cool stuff Fernando mentioned before.
  • #28: As interest in bandits grew organically, learn from every individual use case and build a number of components to make things easier and more reusable.
  • #29: Instead of each application logging to different places in different formats… Ingesting new data becomes easier because uniform.
  • #30: Make data available ASAP
  • #31: Library to access data in batch. Provide events in sorted order, unbounded….
  • #32: In addition to library access, found common patterns in the way rewards are computed. Templatize this so we can materialize this data for our consumers regularly, enable simple SQL access, with no job scheduling/operations work involved.
  • #33: I’ll highlight a few high-level challenges we faced
  • #34: Netflix powered by microservices. All requests from the devices go through a single layer called Edge and it fans out to call many microservices. Makes joining ITT and Treatment a bit challenging.
  • #35: Let’s say we are collecting data for an algorithm used for selecting the best image for a video. Simple case - ID1 is minted and threaded through subsequent requests for tracing - logged and then passed back to device and then logged with treatment. Join directly.
  • #36: Let’s say we are collecting data for an algorithm used for selecting the best image for a video. Simple case - ID1 is minted and threaded through subsequent requests for tracing - logged and then passed back to device and then logged with treatment. Join directly.
  • #37: Let’s say we are collecting data for an algorithm used for selecting the best image for a video. Simple case - ID1 is minted and threaded through subsequent requests for tracing - logged and then passed back to device and then logged with treatment. Join directly.
  • #38: Many cases - caching/precompute. Computation service is unaware of the use of its output when logging
  • #39: Many cases - caching/precompute. Computation service is unaware of the use of its output when logging. Cannot connect T2 and ITT1. Could approximate with time but not accurate.
  • #40: Introduced new thing to be logged as part of standardization - id pairs. Each service that uses data logs id pairs when using data (not computing data) so that we can resolve the ids logged with treatment and ITT data.
  • #41: Implemented as stream processing - typical challenges faced
  • #42: A lot of IDs and a lot of (Terabytes) state to be dealt with
  • #43: The question you probably want to ask… Only scratched the surface - many more parts of the experience to personalize using bandits. Infra will make it much simplet...