SLIDE 1 1 ¡ 1 ¡
Personalized ¡Page ¡Genera/on ¡using ¡Data, ¡Science, ¡ and ¡Algorithms ¡
Jus&n ¡Basilico ¡ Page ¡Algorithms ¡Engineering ¡
July ¡30, ¡2015 ¡
@Jus&nBasilico ¡
Mathema/cs ¡in ¡Data ¡Science ¡ Workshop ¡
SLIDE 3 3 ¡
§ Interested ¡in ¡high-‑quality ¡ recommenda&ons ¡ § Proxy ¡ques&on: ¡
§ Accuracy ¡in ¡predicted ¡ra&ng ¡ § Measured ¡by ¡root ¡mean ¡ squared ¡error ¡(RMSE) ¡ § Improve ¡by ¡10% ¡= ¡$1 ¡million! ¡
§ Data ¡size: ¡
§ 100M ¡ra&ngs ¡(back ¡then ¡ “almost ¡massive”) ¡
SLIDE 4 4 ¡
Change ¡of ¡focus ¡
¡ ¡
2006 2015
SLIDE 5 5 ¡
Ne@lix ¡Scale ¡
§ > ¡65M ¡members ¡ § > ¡50 ¡countries ¡ § > ¡1000 ¡device ¡types ¡ § Hours: ¡> ¡3B/month ¡ § Plays: ¡> ¡100M/day ¡ § Log ¡100B ¡events/day ¡ § 36.5% ¡of ¡peak ¡US ¡ downstream ¡traffic ¡
SLIDE 6 6 ¡
Where ¡we ¡use ¡Data ¡Science? ¡
§ Personaliza/on ¡ § Search ¡ § Product ¡experimenta0on ¡ § Content ¡buying ¡ § Content ¡delivery ¡ § Streaming ¡quality ¡ § Marke&ng ¡effec&veness ¡ § Predic&ng ¡reten&on ¡ § Fraud ¡detec&on ¡ § … ¡
Data-‑driven ¡ ¡ Company ¡
} ¡
SLIDE 7 7 ¡ 7 ¡
Approach ¡to ¡Recommenda/on ¡
“Emmy ¡Winning” ¡
SLIDE 8 8 ¡
Goal ¡
Help ¡members ¡find ¡content ¡to ¡watch ¡and ¡enjoy ¡ to ¡maximize ¡member ¡sa&sfac&on ¡and ¡reten&on ¡
SLIDE 9 9 ¡
Everything ¡is ¡a ¡Recommenda/on ¡
Rows ¡
Ranking ¡
Over ¡80% ¡of ¡what ¡ people ¡watch ¡ comes ¡from ¡our ¡ recommenda/ons ¡ Recommenda/ons ¡ are ¡driven ¡by ¡ Machine ¡Learning ¡
SLIDE 10 10 ¡
Top Picks
¡ ¡
Personaliza&on ¡awareness ¡ Diversity ¡
SLIDE 11 11 ¡
Personalized genres
§ Genres ¡focused ¡on ¡user ¡interest ¡
§
Derived ¡from ¡tag ¡combina&ons ¡
§
Provide ¡context ¡and ¡evidence ¡
§ How ¡are ¡they ¡generated? ¡
§
Implicit: ¡Based ¡on ¡recent ¡plays, ¡ ra&ngs ¡& ¡other ¡interac&ons ¡
§
Explicit: ¡Taste ¡preferences ¡ ¡ ¡
SLIDE 12 12 ¡
Similarity ¡
§ Recommend ¡videos ¡similar ¡ to ¡one ¡you’ve ¡liked ¡ § “Because ¡you ¡watched” ¡ rows ¡ § Pivots ¡
§ Video ¡informa&on ¡page ¡ § In ¡response ¡to ¡user ¡ac&ons ¡ (search, ¡list ¡add, ¡…) ¡
¡
SLIDE 13 13 ¡ 13 ¡
Science ¡and ¡Data ¡
SLIDE 14 14 ¡
Machine ¡Learning ¡Approach ¡
Problem ¡ Data ¡ Algorithm ¡ Model ¡ Metrics ¡
SLIDE 15 15 ¡
Data ¡
§ Plays ¡
§ Dura&on, ¡bookmark, ¡&me, ¡ device, ¡… ¡
§ Ra&ngs ¡ § Metadata ¡
§ Tags, ¡synopsis, ¡cast, ¡… ¡
§ Impressions ¡ § Interac&ons ¡
§ Search, ¡list ¡add, ¡scroll, ¡… ¡
SLIDE 16 16 ¡
Models ¡& ¡Algorithms ¡
§ Regression ¡(Linear, ¡logis&c, ¡elas&c ¡net) ¡ § SVD ¡and ¡other ¡Matrix ¡Factoriza&ons ¡ § Factoriza&on ¡Machines ¡ § Restricted ¡Boltzmann ¡Machines ¡ § Deep ¡Neural ¡Networks ¡ § Markov ¡Models ¡and ¡Graph ¡Algorithms ¡ § Clustering ¡ § Latent ¡Dirichlet ¡Alloca&on ¡ § Gradient ¡Boosted ¡Decision ¡Trees/ Random ¡Forests ¡ § Gaussian ¡Processes ¡ § … ¡
SLIDE 17 17 ¡
A/B ¡Tes/ng ¡
§ Randomized, ¡controlled ¡experiments ¡ § Start ¡with ¡hypothesis ¡for ¡poten&al ¡improvement ¡ § Take ¡random ¡sample ¡of ¡users ¡(say ¡~500k) ¡
§ Assign ¡half ¡to ¡control ¡group ¡(exis&ng ¡experience) ¡ § Assign ¡other ¡half ¡to ¡new ¡experience ¡
§ Collect ¡business-‑relevant ¡metrics ¡over ¡&me ¡(say ¡1-‑2 ¡ months) ¡
§ Reten&on ¡ § Engagement ¡(hours ¡of ¡plays) ¡
§ Compare ¡outcomes ¡with ¡sta&s&cal ¡test ¡
§ Significant ¡improvement? ¡Roll ¡out ¡new ¡experience ¡ § No? ¡Use ¡insight ¡to ¡inform ¡next ¡hypothesis ¡
Time ¡ Control ¡ Idea ¡1 ¡ Metrics ¡ Significant? ¡
SLIDE 18 18 ¡
Offline-‑Online ¡Tes/ng ¡Process ¡
Online ¡A/B ¡ Tests ¡ Offline ¡ Experiments ¡
Hours/Days ¡ Weeks/Months ¡ Success ¡ Failure ¡
Deploy ¡to ¡ all ¡users ¡
Success ¡
SLIDE 19 19 ¡
Evolu/on ¡of ¡our ¡Recommenda/on ¡Approach ¡
Ra&ng ¡ Ranking ¡ Page ¡Genera&on ¡
4.7 ¡
SLIDE 20 20 ¡ 20 ¡
Personalized ¡Ra/ng ¡Predic/on ¡
SLIDE 21 21 ¡
Ra/ng ¡Predic/on ¡
§ Based ¡on ¡first ¡year ¡progress ¡prize ¡ § Top ¡2 ¡algorithms ¡ § Matrix ¡Factoriza&on ¡(SVD++) ¡ § Restricted ¡Boltzmann ¡Machines ¡ (RBM) ¡ § Ensemble: ¡Linear ¡blend ¡
R ¡
Videos ¡
≈ ¡
Users ¡
U ¡ V ¡
(99% ¡Sparse) ¡
d ¡ Videos ¡ Users ¡ d ¡
× ¡
SLIDE 22 22 ¡
Ranking ¡by ¡ra/ngs ¡
4.7 ¡ 4.6 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ 4.5 ¡ Niche ¡&tles ¡ High ¡average ¡ra&ngs… ¡by ¡those ¡who ¡would ¡watch ¡it ¡
SLIDE 23 23 ¡
SLIDE 24 24 ¡ 24 ¡
Personalized ¡Ranking ¡
SLIDE 25 25 ¡
Learning ¡to ¡Rank ¡
§ Approaches: ¡
§ Point-‑wise: ¡Loss ¡over ¡items ¡ (Classifica&on, ¡ordinal ¡regression, ¡MF, ¡…) ¡ § Pair-‑wise: ¡Loss ¡over ¡preferences ¡ (RankSVM, ¡RankNet, ¡BPR, ¡…) ¡ § List-‑wise: ¡(Smoothed) ¡loss ¡over ¡ranking ¡ (LambdaMART, ¡DirectRank, ¡GAPfm, ¡…) ¡
§ Ranking ¡quality ¡measures: ¡ ¡ ¡
§ Recall@N, ¡Precision@N, ¡NDCG, ¡MRR, ¡ ERR, ¡MAP, ¡FCP, ¡… ¡
0 ¡ 0.1 ¡ 0.2 ¡ 0.3 ¡ 0.4 ¡ 0.5 ¡ 0.6 ¡ 0.7 ¡ 0.8 ¡ 0.9 ¡ 1 ¡ 0 ¡ 20 ¡ 40 ¡ 60 ¡ 80 ¡ 100 ¡ Importance ¡ Rank ¡ NDCG ¡ MRR ¡ FCP ¡
SLIDE 26 26 ¡
Example: ¡Two ¡features, ¡linear ¡model ¡
Popularity ¡ Predicted ¡Ra&ng ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡
Linear ¡Model: ¡ frank(u,v) ¡= ¡w1 ¡p(v) ¡+ ¡w2 ¡r(u,v) ¡ ¡
Final ¡Ranking ¡
SLIDE 27 27 ¡
Personalized ¡Ranking ¡
SLIDE 28 28 ¡ 28 ¡
Personalized ¡Page ¡Genera/on ¡
“Learning ¡to ¡Row” ¡
SLIDE 29 29 ¡
Page-‑level ¡algorithmic ¡challenge ¡
10,000s ¡of ¡ possible ¡ rows ¡ … ¡ 10-‑40 ¡ rows ¡ Variable ¡number ¡of ¡ possible ¡videos ¡per ¡ row ¡(up ¡to ¡thousands) ¡ 1 ¡personalized ¡page ¡ per ¡device ¡
SLIDE 30 30 ¡
Balancing ¡a ¡Personalized ¡Page ¡
Accurate ¡ Diverse ¡
Discovery ¡ Con&nua&on ¡
Depth ¡ Coverage ¡
Freshness ¡ Stability ¡
Recommenda&ons ¡ Tasks ¡
SLIDE 31 31 ¡
Browsing ¡Modeling ¡
More ¡likely ¡ to ¡see ¡ Less ¡likely ¡
SLIDE 32 32 ¡
Process ¡for ¡crea/ng ¡rows ¡
Find ¡ Candidates ¡ Evidence ¡ Filter ¡& ¡ Deduplicate ¡ Rank ¡ Format ¡ Choose ¡
SLIDE 33 33 ¡
Building ¡a ¡page ¡algorithmically ¡ Approaches ¡
- 1. Rule-‑based ¡
- 2. Row-‑independent ¡
- 3. Stage-‑wise ¡
- 4. Page-‑wise ¡
SLIDE 34 34 ¡
Rule-‑based ¡Approach ¡
§ Create ¡rules ¡for ¡loca&on ¡of ¡rows ¡ § Non-‑personalized ¡layout ¡ § Op&mize ¡by ¡AB ¡tes&ng ¡ § Example: ¡
§ First: ¡Con&nue ¡Watching ¡(if ¡any) ¡ § Next: ¡Top ¡picks ¡ § Next: ¡Popular ¡on ¡Newlix ¡ § Next ¡3: ¡Because ¡you ¡watched ¡(if ¡ any) ¡ § Next ¡3: ¡Genres ¡ § Next: ¡Recently ¡added ¡ § … ¡
§ Pros: ¡
§ Backed ¡up ¡by ¡AB ¡tes&ng ¡ § Easy ¡to ¡compute ¡ § Very ¡familiar ¡page ¡layout ¡
§ Cons: ¡
§ One ¡size ¡fits ¡nobody ¡ § Local ¡op&ma ¡ § Hard ¡to ¡add ¡new ¡kinds ¡of ¡rows ¡ § Rules ¡get ¡complicated ¡ § S&ll ¡need ¡to ¡pick ¡best ¡rows ¡within ¡ groupings ¡
SLIDE 35 35 ¡
Row-‑independent ¡Approach ¡
§ Treat ¡row ¡selec&on ¡as ¡a ¡standard ¡ ranking ¡problem ¡ § Greedily ¡rank ¡rows ¡by ¡f(r ¡| ¡u, ¡d) ¡ § Sort ¡and ¡take ¡top ¡n ¡ § Approaches: ¡
§ Top-‑n ¡recommenda&on ¡ algorithms ¡
§ Pros: ¡
§ Available ¡algorithms ¡ § Fast ¡ § High ¡accuracy ¡
§ Cons: ¡
§ No ¡considera&on ¡of ¡diversity ¡ § People ¡watch ¡videos, ¡row ¡ interac&on ¡is ¡indirect ¡
SLIDE 36 36 ¡
Stage-‑wise ¡Approach ¡
§ Use ¡informa&on ¡about ¡already ¡ picked ¡rows ¡ § Pick ¡next ¡rows ¡by ¡f(r ¡| ¡u, ¡d, ¡p1:n) ¡ § Approaches: ¡
§ Train ¡scoring ¡model ¡ § Greedy ¡ § Submodular ¡op&miza&on ¡ § K-‑step ¡look-‑ahead ¡
§ Pros: ¡
§ Can ¡balance ¡accuracy ¡and ¡ diversity ¡ § Follows ¡naviga&on ¡pazern ¡
§ Cons: ¡
§ May ¡need ¡to ¡evaluate ¡each ¡row ¡ mul&ple ¡&mes ¡from ¡deduping ¡ § S&ll ¡greedy ¡ § Hard ¡to ¡get ¡training ¡data ¡
SLIDE 37 37 ¡
Page-‑wise ¡approach ¡
§ Op&mize ¡the ¡whole ¡page ¡ § Poten&ally ¡re-‑rank ¡within ¡rows ¡ § Total ¡page ¡fitness ¡f(p ¡| ¡u, ¡d) ¡ § Approaches: ¡
§ Constrained ¡op&miza&on ¡ § Approximate ¡integer ¡ programming ¡
§ Pros: ¡
§ Includes ¡informa&on ¡about ¡en&re ¡ page ¡ § Can ¡include ¡diversity ¡and ¡ deduping ¡into ¡objec&ve ¡ § Able ¡to ¡synthesize ¡rows ¡
§ Cons: ¡
§ Computa&onally ¡expensive ¡ § Huge ¡space ¡of ¡possible ¡pages ¡
SLIDE 38 38 ¡
Row ¡Features ¡
§ Quality ¡of ¡items ¡ § Features ¡of ¡items ¡ § Quality ¡of ¡evidence ¡ § User-‑row ¡interac&ons ¡ § Item/row ¡metadata ¡ § Recency ¡ § Item-‑row ¡affinity ¡ § Row ¡length ¡ § Posi&on ¡on ¡page ¡ § Title ¡ § Diversity ¡ § Similarity ¡ § Freshness ¡ § … ¡
SLIDE 39 39 ¡
Page-‑Level ¡Metrics ¡
§ How ¡do ¡you ¡measure ¡the ¡quality ¡of ¡the ¡homepage? ¡
§ Ease ¡of ¡discovery ¡ § Diversity ¡ § Novelty ¡ § … ¡
§ Challenges: ¡
§ Posi&on ¡effects ¡ § Row-‑video ¡generaliza&on ¡
§ Approach: ¡2D ¡versions ¡of ¡ranking ¡quality ¡metrics ¡
SLIDE 40 40 ¡
Simple example: Recall @ row-by-column
Drama ¡ Ac&on ¡ Comedy ¡
Page ¡Variant ¡1 ¡
Drama ¡ Sitcoms ¡
Page ¡Variant ¡2 ¡
Top ¡Picks ¡ Sci-‑Fi ¡ Comedy ¡
Page ¡Variant ¡3 ¡
✔ ✔ ✔ ✔
Sitcoms ¡
✔
User ¡Watched ¡ 1/3 ¡ 1/3 ¡ 1/3 ¡ 0/3 ¡ 1/3 ¡ 2/3 ¡ 2/3 ¡ 3/3 ¡ 3/3 ¡
✔ ✔
SLIDE 41 41 ¡
Offline Results: Recall @ row-by-column
0 ¡ 5 ¡ 10 ¡ 15 ¡ 20 ¡ 25 ¡ 30 ¡ 35 ¡ Recall ¡ Row ¡
Previous ¡ Template ¡ Best ¡ personalized ¡ layout ¡
SLIDE 42 42 ¡ 42 ¡
Conclusions ¡
SLIDE 43 43 ¡
Evolu/on ¡of ¡Recommenda/on ¡Approach ¡
Ra&ng ¡ Ranking ¡ Page ¡Genera&on ¡
4.7 ¡
SLIDE 44 44 ¡
Research ¡Direc/ons ¡
Presenta&on ¡ effects ¡ Full-‑page ¡
Context ¡ Awareness ¡ Evidence ¡ Selec&on ¡ Global ¡ Algorithms ¡ Cold ¡start ¡
SLIDE 45 45 ¡
Thank ¡You ¡
Jus&n ¡Basilico ¡
jbasilico@newlix.com ¡ @Jus&nBasilico ¡