Op Open enRec ec: A Modular Framework for Extensible
and Adaptable Recommendation Algorithms
1
Funders:
Lo Longqi Yang
Eugene Bagdasaryan Deborah Estrin Cheng-Kang(Andy) Hsieh Joshua Gruenstein
ec : A Modular Framework for Extensible Op Open enRec and - - PowerPoint PPT Presentation
ec : A Modular Framework for Extensible Op Open enRec and Adaptable Recommendation Algorithms Lo Longqi Yang Joshua Gruenstein Cheng-Kang(Andy) Eugene Bagdasaryan Deborah Estrin Hsieh Funders: 1 Pr Prom omising future e of of per
Op Open enRec ec: A Modular Framework for Extensible
and Adaptable Recommendation Algorithms
1
Funders:
Lo Longqi Yang
Eugene Bagdasaryan Deborah Estrin Cheng-Kang(Andy) Hsieh Joshua Gruenstein
Pr Prom
e of
erson
lization
ecom
ender er system ems
2
Education Healthcare Social network Media Food and Diet e-Commerce
3
Re Recomme mmendat dation al algorithms hms ar are increasi asingly compl mplex
4
Re Recomme mmendat dation al algorithms hms ar are increasi asingly compl mplex
Diverse user feedback signals click like skip follow rating save watch listen …
5
Re Recomme mmendat dation al algorithms hms ar are increasi asingly compl mplex
Diverse user feedback signals Heterogeneous data streams and context click like skip follow rating save watch listen user demographics user social media posts Item descriptions videos images activities location mood … …
6
Re Recomme mmendat dation al algorithms hms ar are increasi asingly compl mplex
Diverse user feedback signals Heterogeneous data streams and context Complex goals click like skip follow rating save watch listen user demographics accuracy diversity novelty quality user social media posts Item descriptions videos images activities location mood … … … interpretability fairness
7
Bag of algorithms
8
Ho However, current recomme mmendat dation al algorithms hms lac ack k si simpl mplicity an and d mo modu dular arity.
Bag of algorithms
…
9
Mod Modul ular arity ty
exten end and ad adap apt to various scenarios.
Ap Apache e Lic icen ense e 2.0 .0
10
Cu Current practice vs. Op Open enRec ec
Pr Prior rese search Yo Your research/application cur urrent nt pr practice News recommender Music recommender
11
Cu Current practice vs. Op Open enRec ec
Pr Prior rese search Yo Your research/application cur urrent nt pr practice News recommender Music recommender
different user feedback signals different data sources tangled implementations
12
Cu Current practice vs. Op Open enRec ec
Pr Prior rese search Yo Your research/application cur urrent nt pr practice Op Open enRec ec News recommender Music recommender
user clicks news keywords twitter following user clicks user demographics audio
different user feedback signals different data sources tangled implementations
13
1 2 3 4
Ab Abstract action and
int nter erface ace Im Implementatio ions Si Simpl ple us use cas ases Ta Takeaways and Future work
14
Abs Abstrac ract entit itie ies in in re recommenda ndatio tion n alg lgorith rithms
user (or group) context (environment) item
1 Ab Abstra raction n and nd int nterfa rface
15
En Entit ity User Context Item
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
16
En Entit ity Pr Profile User Context Item
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
17
En Entit ity Pr Profile User Context Item … … …
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
18
En Entit ity Pr Profile User Context Item … … … … … …
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
19
En Entit ity Pr Profile User Context Item … … … … … …
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
20
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … …
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
21
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … … …
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
22
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … … …
Gr Ground-tr truth th in interactio ions Gr Ground-tr truth th in interactio ions
Bu Building a a re recommenda ndatio tion n alg lgorith rithm
1 Ab Abstra raction n and nd int nterfa rface
23
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … … …
Gr Ground-tr truth th in interactio ions Gr Ground-tr truth th in interactio ions
Extraction data representation
1 Ab Abstra raction n and nd int nterfa rface
Ex Extraction: extra xtract t re repre presenta ntatio tions ns
24
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … … …
Gr Ground-tr truth th in interactio ions Gr Ground-tr truth th in interactio ions
Fusion representation … representation representation representation
1 Ab Abstra raction n and nd int nterfa rface
Fu Fusion: fuse representations
25
En Entit ity Pr Profile In Interactio ion User Context Item … … … … … … …
Gr Ground-tr truth th in interactio ions Gr Ground-tr truth th in interactio ions
Interaction predicted interactions user representation context representation item representation
1 Ab Abstra raction n and nd int nterfa rface
Int Intera ractio tion: n: pre predic dict t clic licks/lik likes/ra ratings tings…
26
A A hypo pothetic ical al music ic re recommenda ndatio tion n alg lgorith rithm
demographical information tweets latent factor LSTM concat location spatial- temporal audio MFCC CNN lyrics MLP music id latent factor user id (s (skip ip) (l (lik ike) masking PointwiseMSE PairwiseLog 1 Ab Abstra raction n and nd int nterfa rface
27
demographical information tweets latent factor concat location spatial- temporal audio MFCC CNN lyrics MLP music id latent factor user id (s (skip ip) (l (lik ike)
… … … … … … … … … … … …
1 Ab Abstra raction n and nd int nterfa rface
A A hypo pothetic ical al music ic re recommenda ndatio tion n alg lgorith rithm
28
demographical information latent factor concat mo mood LS LSTM ar artist lat atent fac actor music id latent factor user id (s (skip ip) (l (lik ike) masking PointwiseMSE PairwiseLog 1 Ab Abstra raction n and nd int nterfa rface
A A hypo pothetic ical al music ic re recommenda ndatio tion n alg lgorith rithm
29
Module
Interaction
Pointwise MSE Pointwise MLP
…
Fusion
Concatenation Average Weighted sum
…
Extraction
LF ResNet MLP LSTM AutoEncoder
…
Recommender
R-1: click logs, text posts, and content topic modeling. R-2: watch history, content visual analysis, and activity detection.
Utility Sampler
Pairwise sampler Pointwise sampler
…
Evaluator
…
AUC Recall@K Pairwise distance
…
R-n: …
Op Open enRec ec fra framework rk stru ructure re
2 Im Implementation
30
In Inside e a Re Recomme mmende der
Recommender build_inputs(train) build_user_extractions(train) build_item_extractions(train) build_extra_extractions(train) build_default_fusions(train) build_custom_fusions(train) build_default_interactions(train) build_custom_interactions(train) build_extractions(train) build_fusions(train) build_interactions(train) … … build_optimizer() if train==true build_training_graph() build_serving_graph() train=true train=false train(...) serve(…) save(…) load(…)2 Im Implementation
31
In Inside e a Re Recomme mmende der
Recommender build_inputs(train) build_user_extractions(train) build_item_extractions(train) build_extra_extractions(train) build_default_fusions(train) build_custom_fusions(train) build_default_interactions(train) build_custom_interactions(train) build_extractions(train) build_fusions(train) build_interactions(train) … … build_optimizer() if train==true build_training_graph() build_serving_graph() train=true train=false train(...) serve(…) save(…) load(…)2 Im Implementation
32
In Inside e a Mod Module le
build_shared_graph() build_training_graph() build_serving_graph() user repr. item repr. context repr.
train=True train=False
loss data module #1 module #n
…
Extraction Fusion Interaction 2 Im Implementation
33
In Inside e a Mod Module le
build_shared_graph() build_training_graph() build_serving_graph() user repr. item repr. context repr.
train=True train=False
loss data module #1 module #n
…
Extraction Fusion Interaction 2 Im Implementation
34
In Inside e a Mod Module le
build_shared_graph() build_training_graph() build_serving_graph() user repr. item repr. context repr.
train=True train=False
loss data module #1 module #n
…
Extraction Fusion Interaction 2 Im Implementation
35
3 Si Simple u e use c se cases ses
Conduct model selection (E
(E-co commerce book reco commendation).
Develop new al algor
thms ms --
brief
Compare modular and monolithic implementations.
36
Tw Two kinds of model selection
struc tructure ture selecti tion: n: what data traces to incorporate and how mod
ule s e sel elect ection:
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
37
Am Amazon n dataset [McA McAule ley et
Us User r da data: user id & purchases in other categories Bo Book data: book id & book cover image In Interactio ion data: user reviews
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
38
Ex Exp 1.
PMF
user id book id PointwiseMSE latent factor latent factor 3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
39
user id other purchases MLP book id average PointwiseMSE latent factor latent factor
Ex Exp 1.
UserPMF
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
40
user id book id visual feature MLP average PointwiseMSE latent factor latent factor
Ex Exp 1.
VisualPMF
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
41
user id other purchases MLP latent factor book id visual feature MLP latent factor average average PointwiseMSE
Ex Exp 1.
UserVisualPMF
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
42
user id book id visual feature MLP average Po PointwiseMSE latent factor latent factor
Ex Exp 2.
VisualPMF
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
43
user id book id visual feature MLP average Po PointwiseMSE/Pa PairwiseLog/Pa PairwiseEuDist/Po PointwiseGeCE PMF
[Salakhutdinov et. al. 08]BPR
[Rendle et. al. 09]GMF
[He et. al. 17]CML
[Hsieh et. al. 17]latent factor latent factor
Ex Exp 2.
VisualPMF/VisualBPR/VisualCML/VisualGMF
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
44
20 40 60 80 100 . 0.20 0.25 0.30 0.35 0.40 5eFall@.
30F, A8C 0.637 9iVual30F, A8C 0.700 8VeU30F, A8C 0.671 8VeU9iVual30F, A8C 0.689
Ex Experimental Results
20 40 60 80 100 . 0.15 0.20 0.25 0.30 0.35 0.40 5eFall@.
VLVualG0F, A8C 0.713 VLVual30F, A8C 0.700 VLVualB35, A8C 0.673 VLVualC0L, A8C 0.710
3 Co Conduct mo model selection - E-co commerce bo book recommenda dation
St Struc ructure ure selection Mo Module selectio ion
45
3 Si Simple u e use c se cases ses
Conduct model selection (E
(E-co commerce book reco commendation).
Develop new al algor
thms ms --
brief
Compare modular and monolithic implementations.
46
It Iter erative e re recommendation
Ne Netf tflix da data taset
a static algorithm t t+1 t+2 user id latent factor movie id latent factor PointwiseMSE
47
It Iter erative e re recommendation
Ne Netf tflix da data taset
a static algorithm t t+1 t+2 user id tem emporal l la laten ent fa factor movie id PointwiseMSE tem emporal l la laten ent fa factor 6% 6% MSE improvements compared to static model
48
Ta Takeaways
Share the same programming model and low-level APIs with Tensorflow/Keras.
Op Open enRec ec fo for r re researc rchers rs:
Op Open enRec ec fo for r pra practi titi tioners rs:
4 Ta Takeaways an and future work
49
Fu Future work
En Enric ichin hing modules, s, recommenders s and util ilit ity functio ions. s.
No Non-ne neur ural al ne netw twor
k mod model els.
4 Ta Takeaways an and future work
50
Pro Progra ramming la language Ma Machin ine la language
Specify where to store each bit
Hi High-le level l la languages
OS, file system, virtual memory
Mo Modern la languages
More abstractions, e.g., save, load.
Pre Pre-ca caffe er era
Write CUDA code for any matrix
ca caffe er era Some layer implementations in C++ Po Post-ca caffe er era (Te Tensorflow, , Py Pytorch, , mx mxnet, , etc.) .)
High-level python API
DN DNN
Mod Modula ularity ty in n oth
ns
51
“Modularity based on abstractions is the way things get done”
Barbar ara a Lis Liskov
“You will never succeed in extracting simplicity If don’t recognize it is different from mastering complexity.”
Scott Shen Shenker er
52
http://www.openrec.ai
Github link, documents, and tutorials
Lo Longqi Yang
Ph.D. candidate Computer Science, Cornell Tech, Cornell University Email: ylongqi@cs.cornell.edu Web: bit.ly/longqi Twitter: @ylongqi Connected Experiences Lab http://cx.jacobs.cornell.edu/ Small Data Lab http://smalldata.io/
Funders: