Machine Learning & Recommender Systems at Netflix Scale

1,794 views

Published on

Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1fMC8e3.

Xavier Amatriain discusses the machine learning algorithms and architecture behind Netflix' recommender systems, offline experiments and online A/B testing. Filmed at qconsf.com.

Xavier Amatriain (PhD) is Director of Algorithms Engineering at Netflix. He leads a team of researchers and engineers designing the next wave of machine learning approaches to power the Netflix product. Previous to this, he was a Researcher in Recommender Systems, and neighboring areas such as Data Mining, Machine Learning, Information Retrieval, and Multimedia.

Published in: Technology, Education

Machine Learning & Recommender Systems at Netflix Scale

  1. 1. Machine Learning & Recommender Systems @ Netflix Scale November, 2013 Xavier Amatriain Director - Algorithms Engineering @ Netflix @xamat
  2. 2. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /machine-learning-netflix InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month
  3. 3. Presented at QCon San Francisco www.qconsf.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  4. 4. SVD What we were interested in: ■ High quality recommendations Proxy question: ■ Accuracy in predicted rating ■ Improve by 10% = $1million! Results ● Top 2 algorithms still in production RBM
  5. 5. From the Netflix Prize to today 2006 2013
  6. 6. Everything is Personalized
  7. 7. Everything is personalized Ranking Over 75% of what people watch comes from a recommendation
  8. 8. Top 10 Personalization awareness Diversity
  9. 9. Support for Recommendations Social Support
  10. 10. Genre Rows
  11. 11. Similars
  12. 12. EVERYTHING is a Recommendation
  13. 13. Data & Models
  14. 14. Big Data @Netflix ■ > 40M subscribers ■ Ratings: ~5M/day ■ Searches: >3M/day Time ■ Plays: Geo-information > 50M/day ■ Streamed hours: ○ 5B hours in Q3 2013 Impressions Device Info Metadata Social Ratings Member Behavior Demographics
  15. 15. Smart Models ■ Regression models (Logistic, Linear, Elastic nets) ■ SVD & other MF models ■ Factorization Machines ■ Restricted Boltzmann Machines ■ Markov Chains & other graph models ■ Clustering (from k-means to HDP) ■ Deep ANN ■ LDA ■ Association Rules ■ GBDT/RF ■ …
  16. 16. SVD for Rating Prediction ■ User factor vectors ■ Baseline (bias) and item-factors vectors (user & item deviation from average) ■ Predict rating as ■ SVD++ (Koren et. Al) asymmetric variation w. implicit feedback ■ Where ■ are three item factor vectors ■ Users are not parametrized, but rather represented by: ■ R(u): items rated by user u & N(u): items for which the user has given implicit preference (e.g. rated/not rated)
  17. 17. Restricted Boltzmann Machines ■ Restrict the connectivity in ANN to make learning easier. ■ Only one layer of hidden units. ■ ■ Although multiple layers are possible No connections between hidden units. ■ Hidden units are independent given the visible states.. ■ RBMs can be stacked to form Deep Belief Networks (DBN) – 4th generation of ANNs
  18. 18. Ranking ■ Ranking = Scoring + Sorting + Filtering bags of movies for presentation to a user ■ Key algorithm, sorts titles in most contexts ■ Goal: Find the best possible ordering of a set of videos for a user within a specific context in real-time ■ Objective: maximize consumption & “enjoyment” ■ Factors ■ ■ ■ ■ ■ ■ Accuracy Novelty Diversity Freshness Scalability …
  19. 19. Example: Two features, linear model 2 3 4 5 Popularity Linear Model: frank(u,v) = w1 p(v) + w2 r(u,v) + b Final Ranking Predicted Rating 1
  20. 20. Example: Two features, linear model 2 3 4 5 Popularity Final Ranking Predicted Rating 1
  21. 21. Ranking
  22. 22. More data or better models?
  23. 23. More data or better models? Really? Anand Rajaraman: Former Stanford Prof. & Senior VP at Walmart
  24. 24. More data or better models? Sometimes, it’s not about more data
  25. 25. More data or better models? [Banko and Brill, 2001] Norvig: “Google does not have better Algorithms, only more Data” Many features/ low-bias models
  26. 26. More data or better models? Sometimes, it’s not about more data
  27. 27. “Data without a sound approach = noise”
  28. 28. Smart Architectures
  29. 29. Technology Stack http://techblog.netflix.com
  30. 30. Cloud Computing at Netflix ▪ Layered services ▪ 100s of services and applications ▪ Clusters: Horizontal scaling ▪ 10,000s of EC2 instances ▪ Auto-scale with demand ▪ Plan for failure ▪ Replication ▪ Fail fast ▪ State is bad ▪ Simian Army: Induce failures to ensure resiliency
  31. 31. System Overview ▪ Blueprint for multiple personalization algorithm services ▪ Ranking ▪ Row selection ▪ Ratings ▪ … ▪ Recommendation involving multi-layered Machine Learning
  32. 32. Event & Data Distribution ▪ Collect actions ▪ Plays, browsing, searches, ratings, etc. ▪ Events ▪ Small units ▪ Time sensitive ▪ Data ▪ Dense information ▪ Processed for further use ▪ Saved
  33. 33. Online Computation ▪ Synchronous computation in response to a member request ▪ Pros: ▪ Good for: ▪ Simple algorithms ▪ Model application ▪ Access to most fresh data ▪ Business logic ▪ Knowledge of full request context ▪ Context-dependence ▪ Compute only what is necessary ▪ Interactivity ▪ Cons: ▪ Strict Service Level Agreements ▪ Must respond quickly … in all cases ▪ Requires high availability ▪ Limited view of data www.netflix.com
  34. 34. Offline Computation ▪ Asynchronous computation done on a regular schedule ▪ Pros: ▪ Good for: ▪ Batch learning ▪ Model training ▪ Can handle large data ▪ Complex algorithms ▪ Can do bulk processing ▪ Precomputing ▪ Relaxed time constraints ▪ Cons: ▪ Cannot react quickly ▪ Results can become stale
  35. 35. Nearline Computation ▪ Asynchronous computation in response to a member event ▪ Pros: ▪ Good for: ▪ Incremental learning ▪ User-oriented algorithms ▪ Can keep data fresh ▪ Moderate complexity algorithms ▪ Can run moderate complexity algorithms ▪ Keeping precomputed results fresh ▪ Can average computational cost across users ▪ Change from actions ▪ Cons: ▪ Has some delay ▪ Done in event context
  36. 36. Where to place components? ▪ Example: Matrix Factorization ▪ Offline: ▪ Collect sample of play data ▪ Run batch learning algorithm to produce factorization ▪ Publish item factors ▪ Nearline: X X≈UVt Aui=b sij=uivj ▪ Solve user factors sij ▪ Compute user-item products ▪ Combine ▪ Online: ▪ Presentation-context filtering ▪ Serve recommendations sij>t V
  37. 37. Recommendation Results ▪ Precomputed results ▪ Fetch from data store ▪ Post-process in context ▪ Generated on the fly ▪ Collect signals, apply model ▪ Combination ▪ Dynamically choose ▪ Fallbacks
  38. 38. Conclusion
  39. 39. More data + Smarter models + More accurate metrics + Better system architectures Lots of room for improvement!
  40. 40. Xavier Amatriain (@xamat) xavier@netflix.com Thanks! We’re hiring!
  41. 41. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/machinelearning-netflix

×