Context Aware
Recommendations at Netflix
Linas Baltrunas
DMBI, May 10, 2018
@LinasTw
Netflix
is Entertainment.
Product defines macro-context
Goal: maximize member satisfaction and retention
Contents.
● Why Context Matters
● Contextual Models
○ Feature Based Model
○ Sequence Models
● Conclusions
Context Free Context Aware
Importance of Context
Signal strength is
domain specific:
● Tourism
● E-commerce
● Movies
● Explicit
○ Location (country, region)
○ Time (day, season, hour)
○ Device
○ Language
● Inferred
○ Binging state
○ Companion
Contextual Dimensions at Netflix
Features that describe user experience
and can rapidly change states
Technical Definition of Context
Examples of
Contextual Signals
Location
JAPAN MEXICO
Time
9AM in UK:
:11PM in UK
Device
Language
Dutch in Belgium
French in Belgium
How to Train your Dragon
First Context Aware Model
User Modes
of Watching.
● Continuation
● Discovery
● Play from My List
● Rewatch
● Search
Feature Based
Context-Aware Model
● Continue Watching row
○ Time
○ Device
● Title ranking
● Row ranking
Title Ranking Model
● P(titleX=continue_watch | current_time, current_device, some_play_happens)
Time, tPast Today
t1,iOS t2,web t3,web t4,iOS
? ?
● P(titleX=continue_watch | current_time, current_device, some_play_happens)
● Construction of the data set and feature extraction is the key
● Model matters, but it is a secondary concern
Title Ranking Model
Time, tPast Today
t1,iOS t2,web t3,web t4,iOS
Continue Discovery
Data Set Construction
t3,web,user1,item1
t3,web,user1,item2
t4,iOS,user1,item3
t4,iOS,user1,item1
t4,iOS,user1,item2
Today at time t3, and web for continuation title Today at time t4, and iOs, for discovery title
Feature Extraction
morning, web
morning, web
evening,iOS
evening,iOS
evening,iOS
Today at time t3, and web for continuation title Today at time t4, and iOs, for discovery title
Performance
Time machines
Observed
labels
Training
input data
collected
Training
time
Serving
time
Serving
input data
collected
Distributed Time Travel for Feature Generation
DeLorean image by JMortonPhoto.com & OtoGodfrey.com
Sequence Prediction
with Context
● Representation (Deep) Learning promises to do feature engineering
for you
● Time is a complex contextual dimension that needs special attention
● Time exhibits many periodicities
○ Daily
○ Weekly
○ Seasonally
○ … and even longer: Olympics, elections, etc.
● Generalizing to future behaviors through temporal extrapolation
Representation Learning
Sequence prediction
● Treat recommendations as a
sequence classification problem
○ Input: sequence of user actions
○ Output: next action
● E.g. Gru4Rec [Hidasi et. al., 2016]
○ Input: sequence of items in a
sessions
○ Output: next item in the session
Contextual sequence prediction
● Input: sequence of contextual user actions, plus
current context
● Output: probability of next action
● E.g. “Given all the actions a user has taken so far,
what’s the most likely video they’re going to play right
now?”
● e.g. [Smirnova & Vasile, 2017], [Beutel et. al., 2018]
Contextual Sequence Data
2017-12-10
15:40:22
2017-12-23
19:32:10
2017-12-24
12:05:53
2017-12-27
22:40:22
2017-12-29
19:39:36
2017-12-30
20:42:13
Context ActionSequence
per user
?
Time
Training Contextual RNN
2017-12-23
19:32:10
2017-12-24
12:05:53
2017-12-27
22:40:22
2017-12-29
19:39:36
2017-12-30
20:42:13
Context ActionSequence
per user
?
Time
2017-12-10
15:40:22
Extrapolating Time
9AM in UK:
:11PM in UK
Time-sensitive sequence prediction
● Experiment on a Netflix internal dataset
○ Context:
■ Discrete time
● Day-of-week: Sunday, Monday, …
● Hour-of-day
■ Continuous time (Timestamp)
■ Device
■ Country
○ Predict next play (temporal split data)
Results
The Price to pay
The Price of Contextual Models
● Increased computational cost
○ Models can not be precomputed
● Modeling
○ Harder to build intuition
○ Higher time and memory complexity
○ Testing methodology is complicated
● Model gets stale easily
● Deep models can overfit offline metric
Takeaways
● Be careful when splitting dataset
○ Don’t overfit the past
○ Predict the future
● May need to train/test at multiple distinct time points to see
generalization across time (e.g. [Lathia et. al., 2009])
● Not all offline metrics make sense for contextual
recommendations
Experimental Design
Train
Time
Test
Takeaways from Deep Learning
● Think beyond solving existing problems with new tools and instead
think what new problems the new tools can solve
● Deep Learning can work well for Recommendations...
○ When you go beyond the classic problem definition
○ Use more complex data such as contextual factors
● Lots of open areas to improve recommendations using deep
learning
● Contextual signals can be as strong as personal preferences
○ Model them as such
○ Evaluate them as such
○ Make them central to your system and infrastructure
Final Note
Thank you.
Credits
Justin Basilico
Yves Raimond
Sudeep Das
Hossein Taghavi
and the whole Algorithm Engineering team
Read more in depth discussion on the topic:
● Other relevant presentations
● Blog post on continue watching model

Context Aware Recommendations at Netflix