Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Personalizing	Session-based	
Recommendations	with	Hierarchical	
Recurrent	Neural	Networks
Massimo	Quadrana	(Politecnico di...
Anonym	2
Time
Traditional	session-based	recommendation
Anonym	3
Anonym	1
Soccer
Anonym	1
Anonym	2
Time
Traditional	session-based	recommendation
Cartoons
NBA
Anonym	3
Soccer
User	2
Time
Personalized	session-based	recommendation
Cartoons
NBA
User	1
User	1
Soccer
Time
Personalized	session-based	recommendation
NBA
User	1
Sports!
User	1
Soccer
Time
Personalized	session-based	recommendation
Cupcakes
User	1
Sports!
User	1
Research	question
How	can	we	combine	long-term	(historical)	preferences	of	the	
user	with	her	short-term	(session)	intent	...
• Whole	user	history	as	a	single sequence
• Trivial	implementation	but	limited	effectiveness
Naïve	solution:	concatenation...
Hierarchical	RNN
• Decouple	user	and	session	representations
• User	RNN	(GRUusr)
• Relays	&	Evolves	the	user	latent	state	...
s1
i1,3
c0
i1,4i1,2
i1,3
i1,1
i1,2
s1,0
prediction
input
item id
session-level
representation
Architecture
Session	1
User	...
Architecture
User	1
Session	1
s1
i1,3
c0
c1
i1,4i1,2
i1,3
i1,1
i1,2
s1,0
user-level
representation
session-level
represent...
Architecture	– HRNN	Init
User	1
Session	1 Session	2
s1
s2
i2,4i1,3
c0
c1
i2,3i2,1
i2,2
i2,5
i2,4
i2,2
i2,3i1,4i1,2
i1,3
i1...
Architecture	– HRNN	All
User	1
Session	1 Session	2
s1
s2
i2,4i1,3
c0
c1
i2,3i2,1
i2,2
i2,5
i2,4
i2,2
i2,3i1,4i1,2
i1,3
i1,...
Architecture	- Complete
User	1
s1
s2
i2,4i1,3
c2c0
c1
user representation
propagation
i2,3i2,1
i2,2
prediction i2,5
i2,4
i...
Architecture	- Complete
User	1
s1
s2
i2,4i1,3
c2c0
c1
user representation
propagation
i2,3i2,1
i2,2
prediction i2,5
i2,4
i...
Training
• Based	on	GRU4Rec	[Hidasi et	al.,	2016]
• Gated	Recurrent	Units
• Ranking	losses	(Cross-entropy,	BPR,	TOP1)
• Ou...
Experiments
• Datasets
• Job	postings	(XING)
• “Sessionized”	RecSys Challenge	2016	dataset	(30-min	idle	threshold)
• No	re...
Evaluation
• Methods:
• Personalized	Popularity	(PPOP)
• Co-occurrence	Item-kNN
• Session-based	RNN	(RNN)
• RNN	on	concate...
Evaluation
• Procedure
• Sequential	next-item	prediction	(Recall/Precision/MRR @5)
• RNNs:	Avg.	10	iterations	with	differe...
Overall	results	- XING
XING
Method
#Hidden
units
Recall@5 MRR@5
ItemKNN - 0.0697 0.0406
PPOP - 0.1326 0.0939
RNN 500 0.131...
Overall	results	- VIDEO
• RNN-models	outperform	all	baselines	significantly
• HRNNInit outperforms all	baselines
• +7%	Rec...
Overall	results	- VIDEO
• RNN-models	outperform	all	baselines	significantly
• HRNNInit outperforms all	baselines
• +7%	Rec...
In-depth analysis
• History	length	
• #	Sessions	in	the	user	profile
• Short:	≤6	sessions
• Long:	>6 sessions
• Position	w...
History	length	- XING
Short Long
0.120
0.125
0.130
0.135
0.140
0.145
0.150
0.155
0.160
Recall
0.1304
0.1355
0.1449
0.1504
...
History	length	- VIDEO
Short Long
0.44
0.46
0.48
0.50
0.52
0.54
0.56
0.58
Recall
0.4999
0.5167
0.4770
0.5025
0.4753 0.4763...
Analysis	within	session	- XING
Beginning Middle End
0.120
0.125
0.130
0.135
0.140
0.145
0.150
Recall
RNN
RNN Concat
HRNN A...
Session	evolution	- VIDEO
Beginning Middle End
0.475
0.525
0.575
0.625
0.675
Recall
RNN
RNN Concat
HRNN All
HRNN Init
Begi...
Experiments	with	a	large	dataset
• Validate	HRNNs	effectiveness	on	large	
dataset	(VIDEOXXL)
• 810k	users,	380k	videos,	8....
Summary
• Cross-session	knowledge	transfer	works!
• Naïve	concatenation	is	only	partially	effective
• Both	HRNN	variants	p...
Future	works
• Attention	models
• Multimodal	models	(user/item	features)	[Hidasi et	al.,	2016]
• Enhanced	GRU4Rec	losses	[...
Thanks!
Questions?
Próxima SlideShare
Cargando en…5
×

Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks

Slides on our ACM RecSys 2017 paper

  • Inicia sesión para ver los comentarios

Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks

  1. 1. Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks Massimo Quadrana (Politecnico di Milano) Alexandros Karatzoglou (Telefonica R&D) Balázs Hidasi (Gravity R&D) Paolo Cremonesi (Politecnico di Milano) 29/08/2017 Como
  2. 2. Anonym 2 Time Traditional session-based recommendation Anonym 3 Anonym 1
  3. 3. Soccer Anonym 1 Anonym 2 Time Traditional session-based recommendation Cartoons NBA Anonym 3
  4. 4. Soccer User 2 Time Personalized session-based recommendation Cartoons NBA User 1 User 1
  5. 5. Soccer Time Personalized session-based recommendation NBA User 1 Sports! User 1
  6. 6. Soccer Time Personalized session-based recommendation Cupcakes User 1 Sports! User 1
  7. 7. Research question How can we combine long-term (historical) preferences of the user with her short-term (session) intent effectively?
  8. 8. • Whole user history as a single sequence • Trivial implementation but limited effectiveness Naïve solution: concatenation User 1 Session 1 Session 2 Session N … R N N R N N R N N R N N R N N R N N R N N R N N R N N R N N
  9. 9. Hierarchical RNN • Decouple user and session representations • User RNN (GRUusr) • Relays & Evolves the user latent state across sessions • Session RNN (GRUses) • Generates personalized session-based recommendations • Seamlessly personalize Session RNN with cross-session information transfer
  10. 10. s1 i1,3 c0 i1,4i1,2 i1,3 i1,1 i1,2 s1,0 prediction input item id session-level representation Architecture Session 1 User 1 GRUses (first session only): • Initialization: • Update: 𝑠",$ = 0 𝑠",' = 𝐺𝑅𝑈+,+ (𝑖",', 𝑠",'0") GRUusr: • Initialization: 𝑐$ = 0
  11. 11. Architecture User 1 Session 1 s1 i1,3 c0 c1 i1,4i1,2 i1,3 i1,1 i1,2 s1,0 user-level representation session-level representation GRUusr: • Update: 𝑐3 = 𝐺𝑅𝑈4+5 𝑠3, 𝑐30" previous user-state last session-state
  12. 12. Architecture – HRNN Init User 1 Session 1 Session 2 s1 s2 i2,4i1,3 c0 c1 i2,3i2,1 i2,2 i2,5 i2,4 i2,2 i2,3i1,4i1,2 i1,3 i1,1 i1,2 s1,0 session initialization user-level representation GRUses (from the 2nd session on): • Initialization: • Update: 𝑠3,' = 𝐺𝑅𝑈+,+ (𝑖3,', 𝑠3,'0") 𝑠3,$ = tanh ( 𝑊;';< 𝑐30" + 𝑏;';<)
  13. 13. Architecture – HRNN All User 1 Session 1 Session 2 s1 s2 i2,4i1,3 c0 c1 i2,3i2,1 i2,2 i2,5 i2,4 i2,2 i2,3i1,4i1,2 i1,3 i1,1 i1,2 s1,0 user representation propagation user-level representation session initialization GRUses (from the 2nd session on): • Initialization: • Update: 𝑠3,' = 𝐺𝑅𝑈+,+ (𝑖3,', 𝑠3,'0", 𝑐30") 𝑠3,$ = tanh ( 𝑊;';< 𝑐30" + 𝑏;';<)
  14. 14. Architecture - Complete User 1 s1 s2 i2,4i1,3 c2c0 c1 user representation propagation i2,3i2,1 i2,2 prediction i2,5 i2,4 i2,2 i2,3 input item id i1,4i1,2 i1,3 user-level representation session-level representation session initialization i1,1 i1,2 s1,0 Session 1 Session 2
  15. 15. Architecture - Complete User 1 s1 s2 i2,4i1,3 c2c0 c1 user representation propagation i2,3i2,1 i2,2 prediction i2,5 i2,4 i2,2 i2,3 input item id i1,4i1,2 i1,3 user-level representation session-level representation session initialization i1,1 i1,2 s1,0 Session 1 Session 2 Two identical sessions from different users will produce different recommendations
  16. 16. Training • Based on GRU4Rec [Hidasi et al., 2016] • Gated Recurrent Units • Ranking losses (Cross-entropy, BPR, TOP1) • Output sampling • Dropout regularization • Adagrad w/ Momentum • User-parallel mini-batches 𝑖"," 𝑖",? 𝑖",@ 𝑖",A 𝑖?," 𝑖?,? 𝑖?,@ 𝑖"," 𝑖",? 𝑖"," 𝑖",? 𝑖?," 𝑖?,? Session1 Session2 Session1 Session1 Session2 … 𝑖"," 𝑖",? 𝑖",@ 𝑖"," 𝑖",? 𝑖"," 𝑖?," 𝑖?,? 𝑖",? 𝑖",@ 𝑖",A 𝑖",? 𝑖",@ 𝑖",? 𝑖?,? 𝑖?,@ Input Output Mini-batch1 Mini-batch2 … … … … User1User2User3 𝑖",A𝑖",@ 𝑖",@ 𝑖",? 𝑖",@ Hidasi B., Karatzoglou A., Baltrunas L. and Tikk D..Session-based recommendations with recurrent neural networks. International Conference on Learning Representations, 2016.
  17. 17. Experiments • Datasets • Job postings (XING) • “Sessionized” RecSys Challenge 2016 dataset (30-min idle threshold) • No repetitions + “deletes” • 11K users, 60k items (min 5 sess/user, 20 events/item) • Training/Test: 78k sessions (488k events) / 11k sessions (58k events) • Online video site (VIDEO) • 13k users, 20k items (min 5 sess/user, 10 events/item) • Training/Test: 120k sessions (745k events) / 13k sessions (78k events)
  18. 18. Evaluation • Methods: • Personalized Popularity (PPOP) • Co-occurrence Item-kNN • Session-based RNN (RNN) • RNN on concatenated sessions (RNNConcat) • Hierarchical RNNs • HRNN Init (initialization only) • HRNN All (Initialization + propagation in input)
  19. 19. Evaluation • Procedure • Sequential next-item prediction (Recall/Precision/MRR @5) • RNNs: Avg. 10 iterations with different random seeds • Bootstrapped evaluation (RNNConcat and HRNNs) • Discarded first prediction of each session made by RNNConcat
  20. 20. Overall results - XING XING Method #Hidden units Recall@5 MRR@5 ItemKNN - 0.0697 0.0406 PPOP - 0.1326 0.0939 RNN 500 0.1317 0.0796 RNNConcat 500 0.1467 0.0878 HRNN All 500+500 0.1482 0.0925 HRNN Init 500+500 0.1473 0.0901 • PPOP strong baseline due to repetitiveness across sessions • Only personalized models work • +11% Recall vs RNN/PPOP (HRNN All) • Comparable MRR to PPOP (HRNN All) • No significant difference between HRNNs
  21. 21. Overall results - VIDEO • RNN-models outperform all baselines significantly • HRNNInit outperforms all baselines • +7% Recall vs RNN & RNNConcat (HRNN Init) • +19%/+2% MRR vs RNN/RNNConcat (HRNN Init) VIDEO Method #Hidden units Recall@5 MRR@5 ItemKNN - 0.4192 0.2916 PPOP - 0.3887 0.3031 RNN 500 0.5551 0.3886 RNNConcat 500 0.5582 0.4333 HRNN All 500+500 0.5191 0.3877 HRNN Init 500+500 0.5947 0.4433
  22. 22. Overall results - VIDEO • RNN-models outperform all baselines significantly • HRNNInit outperforms all baselines • +7% Recall vs RNN & RNNConcat (HRNN Init) • +19%/+2% MRR vs RNN/RNNConcat (HRNN Init) • HRNNs differ significantly • Forced propagation degrades performance of HRNN All VIDEO Method #Hidden units Recall@5 MRR@5 ItemKNN - 0.4192 0.2916 PPOP - 0.3887 0.3031 RNN 500 0.5551 0.3886 RNNConcat 500 0.5582 0.4333 HRNN All 500+500 0.5191 0.3877 HRNN Init 500+500 0.5947 0.4433
  23. 23. In-depth analysis • History length • # Sessions in the user profile • Short: ≤6 sessions • Long: >6 sessions • Position within session • Beginning [1,2] - Middle [3,4] - End [4,Inf) • Only session with length >4 • 6,736 sessions XING • 8,254 sessions VIDEO History length XING VIDEO Short 67% 54% Long 33% 46%
  24. 24. History length - XING Short Long 0.120 0.125 0.130 0.135 0.140 0.145 0.150 0.155 0.160 Recall 0.1304 0.1355 0.1449 0.1504 0.1464 0.1518 0.1457 0.1505 RNN RNN Concat HRNN All HRNN Init Short Long 0.080 0.085 0.090 0.095 0.100 0.105 0.110 MRR 0.0860 0.0824 0.0932 0.0916 0.0985 0.0957 0.0968 0.0929 RNN RNN Concat HRNN All HRNN Init
  25. 25. History length - VIDEO Short Long 0.44 0.46 0.48 0.50 0.52 0.54 0.56 0.58 Recall 0.4999 0.5167 0.4770 0.5025 0.4753 0.4763 0.5249 0.5535 RNN RNN Concat HRNN All HRNN Init Short Long 0.30 0.32 0.34 0.36 0.38 0.40 0.42 MRR 0.3388 0.3306 0.3491 0.3658 0.3440 0.3308 0.3820 0.3954 RNN RNN Concat HRNN All HRNN Init
  26. 26. Analysis within session - XING Beginning Middle End 0.120 0.125 0.130 0.135 0.140 0.145 0.150 Recall RNN RNN Concat HRNN All HRNN Init Beginning Middle End 0.0725 0.0775 0.0825 0.0875 0.0925 MRR RNN RNN Concat HRNN All HRNN Init
  27. 27. Session evolution - VIDEO Beginning Middle End 0.475 0.525 0.575 0.625 0.675 Recall RNN RNN Concat HRNN All HRNN Init Beginning Middle End 0.30 0.35 0.40 0.45 0.50 0.55 MRR RNN RNN Concat HRNN All HRNN Init
  28. 28. Experiments with a large dataset • Validate HRNNs effectiveness on large dataset (VIDEOXXL) • 810k users, 380k videos, 8.5M sessions, 33M events • Evaluation on top-50k popular items only • HRNN Init: +28% Recall / +41% MRR over RNN VIDEOXXL Method #Hidden units Recall@5 MRR@5 RNN 100 0.3415 0.2314 RNNConcat 100 0.3459 0.2368 HRNN All 100+100 0.3621 0.2658 HRNN Init 100+100 0.4362 0.3261
  29. 29. Summary • Cross-session knowledge transfer works! • Naïve concatenation is only partially effective • Both HRNN variants play well when personalization is “easy” • HRNN Init is significantly more effective in complex scenarios
  30. 30. Future works • Attention models • Multimodal models (user/item features) [Hidasi et al., 2016] • Enhanced GRU4Rec losses [Hidasi & Karatzoglou, 2017] • Other domains (music, e-commerce, etc.) • Code available at https://github.com/mquad/hgru4rec [Hidasi et al., 2016] Parallel Recurrent Neural Network Architectures for Feature-rich Session-based Recommendations. ACM RecSys 2016 [Hidasi & Karatzoglou, 2017] Recurrent Neural Networks with Top-k Gains for Session-based Recommendations. arXiv:1706.03847
  31. 31. Thanks! Questions?

×