Hua Jiang & Kedar Sadekar
Feature Engineering with Time Travel
Jan 2018
Netflix Scale
▪ Started streaming videos
in 2007
▪ > 117M members
▪ > 190 countries
▪ > 1000 device types
▪ A third of peak US
downstream traffic
Create a page of recommendations
where the titles you are
most likely to watch and enjoy are
shown on the most visible parts of
the page
We Want to Help Members Find Great Content
We Want to Help Members Find Great Content
Title Ranking
Everything is a RecommendationRowSelection&Ordering
Recommendations are
driven by machine
learning algorithms
Over 80% of what
members watch comes
from our
recommendations
Image
• Try an idea offline using historical data to see if it
would have made better recommendations
• If it would, deploy a live A/B test to see if it performs
well in production
Running Experiments
Design Experiment
Collect Label Dataset
Offline Feature
Generation
Model Training
Compute
Validation Metrics
Model Testing
Design a New Experiment to Test Out Different Ideas
Offline
Experiment
Online
System
Online
AB Testing
Running Experiments
Offline Feature Generation - Feature Logging
• How to get features for offline training?
▪ Feature logging
▪ Pros: no need to compute offline
▪ Cons: delayed iteration for new features
Feature
Generator
Viewing
History
Service
MyList
Service
Thumbs
Service
Predictor
Facts Features
Log these
Recommendations
• How to get features for offline training?
Feature
Generator
Viewing
History
Service
MyList
Service
Thumbs
Service
Predictor
Facts Features
Log these
▪ Fact logging + time travel
Recommendations
Offline Feature Generation - Fact Logging
Offline Feature Generation - Fact Logging
Offline Feature Generation - Time Travel
Training Data
Fact Store Fact Store Fact Store
Feature
Encoders
Prepared
Data
S3
Snapshot
DeLorean: Offline
Feature Generation
Online Ranking /
Scoring Service
Model Training /
Validation / Testing
Offline Experiment
Online SystemViewing
History
Service
My List
Service
Ratings
Service
Online Feature
Generation
Deploy
models
Shared Feature
Encoders
Feature Generation - Online/Offline Parity
Feature Generation - Online/Offline Parity
Required
Data
Shared Feature
Encoders
Viewing History
Service
My List Service
Ratings
Service
Fact
Stores
Feature Generation from Logged Facts
S3
Snapshot
Model Training
Features
Training Data
Feature Model
Feature Encoders
Required
Features Data
Features
Fact Data
Required Data
1
3
42
5
6
Offline Feature Generation - Fact Logging
• Fact
▪ Input data for feature encoders
▪ Example: viewing history of member, my list of a member
• Temporal
▪ Facts are temporal i.e. they change with time
▪ Each online scoring service uses the latest value of a fact
Offline Feature Generation
▪ Pull based: Fact logging + offline feature generation
▪ Pros:
▪ Easy to add new features
▪ Cons:
▪ Not temporally accurate data
▪ Additional load on micro-services serving facts
• How to obtain features for offline training?
S3
User
Sets
Data
Snapshots Runs once
a day
S3
Snapshot
Viewing
History
Service
MyList
Service
Thumbs
Rating
Service
Snapshot data for
each user
Parquet
Feature Generation: Fact Logging - Pull based
Pull
Offline Feature Generation
▪ Push based: Fact logging + offline feature generation
▪ Pros:
▪ Easy to add new features.
▪ Temporally accurate facts
▪ Algorithm controls who to log
▪ Cons:
▪ Scale challenges
• How to obtain features for offline training?
Data
Snapshots
S3
Snapshot
User
Compute
Services
Viewing
History
Service
MyList
Service
Thumbs
Rating
Service
Feature Generation: Fact Logging - Push based
Push facts used for
compute
Data Pipeline
Offline Feature Generation
▪ Data pipeline load
▪ Multiple services logging (m facts * n services)
▪ Solution
▪ De-Duplication
▪ Considerations: Server v/s Client & TTL of data
• Push based Fact logging: Challenges
Data
Snapshots
S3
Snapshot
User
Compute
Services
Viewing
History
Service
MyList
Service
Thumbs
Rating
Service
Feature Generation: Fact Logging - Push based
Push facts
conditionally
Key Value
Store
Has a fact been
seen
Data Pipeline
Offline Feature Generation
▪ Read characteristics and performance
▪ 20-30 times more data being logged. S3 suited for storage
▪ Training data accessed is 1-5%, suited for point-query lookups
▪ Solution
▪ Hot cache for read performance
▪ Spark API thats seamless irrespective of access from cache or
from S3
• Push based Fact logging: Challenges
Data
Snapshots
S3
Snapshot
User
Compute
Services
Viewing
History
Service
MyList
Service
Thumbs
Rating
Service
Recent facts for
fast access
Feature Generation: Fact Logging - Push based
Push facts
conditionally
Key Value
Storage
Key Value
Store
Has a fact been
seen
APIData Pipeline
Conclusions
● Offline feature generation
○ Feature logging vs. fact logging
○ Time travel to retrieve fact
○ Online / offline parity
Conclusions ..
● Fact logging enabled
○ Time travel
○ Algorithm service controls when / who to log
○ Temporally accurate data
○ Log request level data used in computation
○ Scale to a very large number of members
Questions?

More Related Content

PDF
Artwork Personalization at Netflix
PDF
Recent Trends in Personalization at Netflix
PDF
Artwork Personalization at Netflix Fernando Amat RecSys2018
PDF
Past, Present & Future of Recommender Systems: An Industry Perspective
PDF
Context Aware Recommendations at Netflix
PPTX
Netflix talk at ML Platform meetup Sep 2019
PDF
Time, Context and Causality in Recommender Systems
PPTX
Personalized Page Generation for Browsing Recommendations
Artwork Personalization at Netflix
Recent Trends in Personalization at Netflix
Artwork Personalization at Netflix Fernando Amat RecSys2018
Past, Present & Future of Recommender Systems: An Industry Perspective
Context Aware Recommendations at Netflix
Netflix talk at ML Platform meetup Sep 2019
Time, Context and Causality in Recommender Systems
Personalized Page Generation for Browsing Recommendations

What's hot (20)

PDF
Recent Trends in Personalization: A Netflix Perspective
PDF
Netflix Recommendations - Beyond the 5 Stars
PDF
Recommending for the World
PDF
ML Infra for Netflix Recommendations - AI NEXTCon talk
PPTX
Lessons Learned from Building Machine Learning Software at Netflix
PDF
Crafting Recommenders: the Shallow and the Deep of it!
PDF
Homepage Personalization at Spotify
PDF
Personalizing "The Netflix Experience" with Deep Learning
PDF
Learning to Rank for Recommender Systems - ACM RecSys 2013 tutorial
PPTX
Recommendation at Netflix Scale
PDF
Déjà Vu: The Importance of Time and Causality in Recommender Systems
PDF
Recent Trends in Personalization at Netflix
PPTX
Collaborative Filtering at Spotify
PDF
Past, present, and future of Recommender Systems: an industry perspective
PPTX
Learning a Personalized Homepage
PDF
User behavior analytics
PDF
Deep Learning for Recommender Systems
PDF
Incorporating Diversity in a Learning to Rank Recommender System
PDF
Interactive Recommender Systems
PDF
Deep Learning for Recommender Systems
Recent Trends in Personalization: A Netflix Perspective
Netflix Recommendations - Beyond the 5 Stars
Recommending for the World
ML Infra for Netflix Recommendations - AI NEXTCon talk
Lessons Learned from Building Machine Learning Software at Netflix
Crafting Recommenders: the Shallow and the Deep of it!
Homepage Personalization at Spotify
Personalizing "The Netflix Experience" with Deep Learning
Learning to Rank for Recommender Systems - ACM RecSys 2013 tutorial
Recommendation at Netflix Scale
Déjà Vu: The Importance of Time and Causality in Recommender Systems
Recent Trends in Personalization at Netflix
Collaborative Filtering at Spotify
Past, present, and future of Recommender Systems: an industry perspective
Learning a Personalized Homepage
User behavior analytics
Deep Learning for Recommender Systems
Incorporating Diversity in a Learning to Rank Recommender System
Interactive Recommender Systems
Deep Learning for Recommender Systems
Ad

Similar to Netflix Recommendations Feature Engineering with Time Travel (20)

PDF
Distributed Time Travel for Feature Generation at Netflix
PPTX
Is that a Time Machine? Some Design Patterns for Real World Machine Learning ...
PDF
Zipline—Airbnb’s Declarative Feature Engineering Framework
PDF
Managed Feature Store for Machine Learning
PDF
Accelerating the ML Lifecycle with an Enterprise-Grade Feature Store
PPTX
Big data and machine learning / Gil Chamiel
PDF
Berlin buzzwords 2020-feature-store-dowling
PDF
Before Kaggle : from a business goal to a Machine Learning problem
PDF
Before Kaggle
PDF
Distributed Time Travel for Feature Generation by DB Tsai and Prasanna Padman...
PDF
Simplify Feature Engineering in Your Data Warehouse
PDF
MLOps with a Feature Store: Filling the Gap in ML Infrastructure
PDF
Spil games konrad
PDF
Zipline - A Declarative Feature Engineering Framework
PDF
Operationalizing Machine Learning—Managing Provenance from Raw Data to Predic...
PDF
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
PDF
2017 Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit Ea...
PDF
Online learning talk
PDF
Hopsworks data engineering melbourne april 2020
PDF
Streamlining Data Science Workflows with a Feature Catalog
Distributed Time Travel for Feature Generation at Netflix
Is that a Time Machine? Some Design Patterns for Real World Machine Learning ...
Zipline—Airbnb’s Declarative Feature Engineering Framework
Managed Feature Store for Machine Learning
Accelerating the ML Lifecycle with an Enterprise-Grade Feature Store
Big data and machine learning / Gil Chamiel
Berlin buzzwords 2020-feature-store-dowling
Before Kaggle : from a business goal to a Machine Learning problem
Before Kaggle
Distributed Time Travel for Feature Generation by DB Tsai and Prasanna Padman...
Simplify Feature Engineering in Your Data Warehouse
MLOps with a Feature Store: Filling the Gap in ML Infrastructure
Spil games konrad
Zipline - A Declarative Feature Engineering Framework
Operationalizing Machine Learning—Managing Provenance from Raw Data to Predic...
Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit East ta...
2017 Netflix's Recommendation ML Pipeline Using Apache Spark: Spark Summit Ea...
Online learning talk
Hopsworks data engineering melbourne april 2020
Streamlining Data Science Workflows with a Feature Catalog
Ad

Recently uploaded (20)

PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
substrate PowerPoint Presentation basic one
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Human Computer Interaction Miterm Lesson
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
SaaS reusability assessment using machine learning techniques
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Examining Bias in AI Generated News Content.pdf
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
substrate PowerPoint Presentation basic one
Electrocardiogram sequences data analytics and classification using unsupervi...
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Human Computer Interaction Miterm Lesson
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
CEH Module 2 Footprinting CEH V13, concepts
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Connector Corner: Transform Unstructured Documents with Agentic Automation
SaaS reusability assessment using machine learning techniques
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
Advancing precision in air quality forecasting through machine learning integ...
Build Real-Time ML Apps with Python, Feast & NoSQL
Examining Bias in AI Generated News Content.pdf
Build automations faster and more reliably with UiPath ScreenPlay
Module 1 Introduction to Web Programming .pptx
A symptom-driven medical diagnosis support model based on machine learning te...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf

Netflix Recommendations Feature Engineering with Time Travel

  • 1. Hua Jiang & Kedar Sadekar Feature Engineering with Time Travel Jan 2018
  • 2. Netflix Scale ▪ Started streaming videos in 2007 ▪ > 117M members ▪ > 190 countries ▪ > 1000 device types ▪ A third of peak US downstream traffic
  • 3. Create a page of recommendations where the titles you are most likely to watch and enjoy are shown on the most visible parts of the page We Want to Help Members Find Great Content
  • 4. We Want to Help Members Find Great Content
  • 5. Title Ranking Everything is a RecommendationRowSelection&Ordering Recommendations are driven by machine learning algorithms Over 80% of what members watch comes from our recommendations Image
  • 6. • Try an idea offline using historical data to see if it would have made better recommendations • If it would, deploy a live A/B test to see if it performs well in production Running Experiments
  • 7. Design Experiment Collect Label Dataset Offline Feature Generation Model Training Compute Validation Metrics Model Testing Design a New Experiment to Test Out Different Ideas Offline Experiment Online System Online AB Testing Running Experiments
  • 8. Offline Feature Generation - Feature Logging • How to get features for offline training? ▪ Feature logging ▪ Pros: no need to compute offline ▪ Cons: delayed iteration for new features Feature Generator Viewing History Service MyList Service Thumbs Service Predictor Facts Features Log these Recommendations
  • 9. • How to get features for offline training? Feature Generator Viewing History Service MyList Service Thumbs Service Predictor Facts Features Log these ▪ Fact logging + time travel Recommendations Offline Feature Generation - Fact Logging
  • 10. Offline Feature Generation - Fact Logging
  • 11. Offline Feature Generation - Time Travel Training Data Fact Store Fact Store Fact Store Feature Encoders Prepared Data
  • 12. S3 Snapshot DeLorean: Offline Feature Generation Online Ranking / Scoring Service Model Training / Validation / Testing Offline Experiment Online SystemViewing History Service My List Service Ratings Service Online Feature Generation Deploy models Shared Feature Encoders Feature Generation - Online/Offline Parity
  • 13. Feature Generation - Online/Offline Parity Required Data Shared Feature Encoders Viewing History Service My List Service Ratings Service Fact Stores
  • 14. Feature Generation from Logged Facts S3 Snapshot Model Training Features Training Data Feature Model Feature Encoders Required Features Data Features Fact Data Required Data 1 3 42 5 6
  • 15. Offline Feature Generation - Fact Logging • Fact ▪ Input data for feature encoders ▪ Example: viewing history of member, my list of a member • Temporal ▪ Facts are temporal i.e. they change with time ▪ Each online scoring service uses the latest value of a fact
  • 16. Offline Feature Generation ▪ Pull based: Fact logging + offline feature generation ▪ Pros: ▪ Easy to add new features ▪ Cons: ▪ Not temporally accurate data ▪ Additional load on micro-services serving facts • How to obtain features for offline training?
  • 17. S3 User Sets Data Snapshots Runs once a day S3 Snapshot Viewing History Service MyList Service Thumbs Rating Service Snapshot data for each user Parquet Feature Generation: Fact Logging - Pull based Pull
  • 18. Offline Feature Generation ▪ Push based: Fact logging + offline feature generation ▪ Pros: ▪ Easy to add new features. ▪ Temporally accurate facts ▪ Algorithm controls who to log ▪ Cons: ▪ Scale challenges • How to obtain features for offline training?
  • 20. Offline Feature Generation ▪ Data pipeline load ▪ Multiple services logging (m facts * n services) ▪ Solution ▪ De-Duplication ▪ Considerations: Server v/s Client & TTL of data • Push based Fact logging: Challenges
  • 21. Data Snapshots S3 Snapshot User Compute Services Viewing History Service MyList Service Thumbs Rating Service Feature Generation: Fact Logging - Push based Push facts conditionally Key Value Store Has a fact been seen Data Pipeline
  • 22. Offline Feature Generation ▪ Read characteristics and performance ▪ 20-30 times more data being logged. S3 suited for storage ▪ Training data accessed is 1-5%, suited for point-query lookups ▪ Solution ▪ Hot cache for read performance ▪ Spark API thats seamless irrespective of access from cache or from S3 • Push based Fact logging: Challenges
  • 23. Data Snapshots S3 Snapshot User Compute Services Viewing History Service MyList Service Thumbs Rating Service Recent facts for fast access Feature Generation: Fact Logging - Push based Push facts conditionally Key Value Storage Key Value Store Has a fact been seen APIData Pipeline
  • 24. Conclusions ● Offline feature generation ○ Feature logging vs. fact logging ○ Time travel to retrieve fact ○ Online / offline parity
  • 25. Conclusions .. ● Fact logging enabled ○ Time travel ○ Algorithm service controls when / who to log ○ Temporally accurate data ○ Log request level data used in computation ○ Scale to a very large number of members