Recommenders Systems tutorial slides from the European Summer School of Information Retrieval (ESSIR).
Covers basic ideas on Collaborative Filtering, Content-based methods, Matrix Factorization, Restricted Boltzmann Machines, Ranking, Diversity.
The slides include material from Xavier Amatriain, Saul Vargas and Linas Baltrunas.
1. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Recommender Systems
Alexandros Karatzoglou
Research Scientist @ Telefonica Research, Barcelona
alexk@tid.es
@alexk_z
2. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Telefonica Research in Barcelona
Machine Learning & Recommender Systems
Data Mining, Social Networks
Multimedia Indexing & Analysis
HCI
System & Networking
We are looking for interns!We are looking for interns!
http://www.tid.eshttp://www.tid.es
5. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Recent Publications
CIKM 2013: GAPfm: Optimal Top-N Recommendations for Graded Relevance Domains
RecSys 2013: xCLiMF: Optimizing Expected Reciprocal Rank for Data with Multiple Levels of Relevance
ECML/PKDD 2013: Socially Enabled Preference Learning from Implicit Feedback Data
AAAI 2013 Workshop: Games of Friends: a Game-Theoretical Approach for Link Prediction in Online Social Networks
CIKM 2012: Climbing the App Wall: Enabling Mobile App Discovery through Context-Aware Recommendations
RecSys 2012: CLiMF: Learning to Maximize Reciprocal Rank with Collaborative Less-is-More Filtering * Best Paper Award
SIGIR 2012: TFMAP: Optimizing MAP for Top-N Context-aware Recommendation
NIPS 2011 Workshop: Collaborative Context-Aware Preference Learning
RecSys 2011: Collaborative Temporal Order Modeling
RecSys 2011: Implicit Feedback Recommendation via Implicit-to-Explicit Ordinal Logistic Regression Mapping
RecSys 2010: Multiverse Recommendation: N-dimensional Tensor Factorization for Context-Aware Collaborative Filtering
EC-Web 2010: Quantile Matrix Factorization for Collaborative Filtering
AISTATS 2010: Collaborative Filtering on a Budget
RecSys 2009: Maximum Margin Code Recommendation
RecSys 2008: Adaptive Collaborative Filtering
Machine Learning Journal, 2008: Improving Maximum Margin Matrix Factorization * Best Machine Learning Paper Award at ECML
PKDD 2008
NIPS 2007: CoFiRank - Maximum Margin Matrix Factorization for Collaborative Ranking
9. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
10. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
11. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
From Search to Recommendation
“The Web is leaving the era of search and
entering one of discovery. What's the difference?
SearchSearch is what you do when you're looking for
something. DiscoveryDiscovery is when something
wonderful that you didn't know existed, or didn't
know how to ask for, finds you.” – CNN Money, “The race
to create a 'smart' Google
12. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
The value of recommendations
Netflix: 2/3 of the movies watched are
recommended
Google News: recommendations generate 38%
more click-throughs
Amazon: 35% sales from recommendations
Choicestream: 28% of the people would buy more
music if they found what they liked.
13. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
The “Recommender problem”
Estimate a utility functionutility function
to predictpredict how
a user will likelike an item.
14. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
The “Recommender problem”
C:= {users}
S:= {recommendable items}
u:= utility function, measures the usefulness of
item s to user c,
u : C X S→ R
where R:= {recommended items}.
For each user c, we want to choose the items
s that maximize u.
15. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
A good recommendation
is relevant to the user: personalized
16. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
A good recommendation
is diverse:
it represents all the possible interests of one user
17. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
A good recommendation
Does not recommend items the user already
knows or would have found anyway.
Expands the user's taste into neighboring areas.
SerendipitySerendipity = Unsought finding= Unsought finding
18. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Top k recommendations
Users take into account only few suggestions.
There is a need to do better on the top scoring
recommended items
19. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
20. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
What works?
Depends on the domain and particular problem
Currently, the best approach is Collaborative Filtering.
Other approaches can be combined to improve results
What matters?
Data preprocessing: outlier removal, denoising, removal of
global effects
“Smart” dimensionality reduction
Combining methods
21. 21
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Collaborative Filtering
The task of predictingpredicting (filtering) user
preferences on new items by collectingcollecting
taste information from many users
(collaborative).
Challenges:
many items to choose from
very few recommendations to propose
few data per user
no data for new user
very large datasets
22. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
1. Collaborative Filtering:
1. Memory-based CF
1. User-based CF
2. Item-based CF
2. Model-based CF
23. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Memory-Based CF:
User-based CF & Item-based CF
24. 24
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
2
4
1
Example
Each user has expressed
an opinion for some
items:
Explicit opinion:
rating score
Implicit: purchase
records or listen to
tracks
25. 25
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
Example: User-based CF
Target (or Active)
user for whom the
CF
recommendation
task is performed
26. 26
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
Example: User-based CF
1. Identify set of
items rated by the
target user
27. 27
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
Example: User-based CF
1. Identify set of
items rated by
the target user
2. Identify which
other users rated 1+
items in this set
(neighborhood
formation)
28. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
3. Compute how similar
each neighbor is to the
target user (similarity
function)
4. In case, select k most
similar neighbors
User-based Similarity
29. 29
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
5. Predict ratings for the target user's unrated items
(prediction function)
6. Recommend to the target user the top N products
based on the predicted ratings
User-based CF
30. 30
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
User-based CF
Target user u, ratingsratings matrix Y
yv,i → rating by user v for item i
Similarity Pearson r correlation sim(u,v) between users u & v
Predicted rating
31. 31
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
sim(u,v)
NA
NA
Example: User-based CF
32. 32
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
Example: User-based CF
0.87
sim(u,v)
NA
NA
33. 33
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
1
sim(u,v)
0.87
NA
NA
Example: User-based CF
34. 34
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
-1
0.87
1
sim(u,v)
NA
NA
Example: User-based CF
35. 35
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
3.51*
4
5
4
4
1
3.81*
5
5
4
2.42*
1
2
5
2.48*
4
1
2
-1
0.87
1
sim(u,v)
NA
NA
Example: User-based CF
36. 36
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
2
5
4
5
4
4
1
5
5
4
1
2
5
4
1
2
Example: Item-based CF
Target item:
item for
which the CF
prediction
task is
performed.
37. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Item-based CF
The basic steps:
Identify set of users who rated the target item i
Identify which other items (neighbours) were
rated by the users set
Compute similarity between each
neighbour & target item (similarity function)
In case, select k most similar neighbours
Predict ratings for the target item (prediction
function)
39. 39
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Item Based Similarity
Target item I
yu,j → rating of user u for item j, average rating for j.
Similarity sim(i,j) between items i and j (Pearson-
correlation)
Predicted rating
46. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
PearsonPearson r correlation-based Similarityr correlation-based Similarity
does not account for user rating biases
Cosine-basedCosine-based SimilaritySimilarity
does not account for user rating biases
AdjustedAdjusted Cosine SimilarityCosine Similarity
takes care of user rating biases as each pair in the co-rated
set corresponds to a different user.
Item Similarity Computation
47. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Performance Implications
Bottleneck: Similarity computation.
Time complexity, highly time consuming with millions
of users & items in the database.
Two-step process:
“off-line component” / “model”:
similarity computation, precomputed & stored.
“on-line component”: prediction process.
48. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Two-step process
OfflineOffline OnlineOnline
49. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Performance Implications
User-based similarity is more dynamic.
Precomputing user neighbourhood can lead to
poor predictions.
Item-based similarity is static.
We can precompute item neighbourhood.
Online computation of the predicted ratings.
50. 50
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Memory based CF
+ Requires minimal knowledge engineering efforts
+ Users and products are symbols without any internal
structure or characteristics
+ Produces good-enough results in most cases
- Requires a large number of explicit and reliable
“ratings”
- Requires standardized products: users should have
bought exactly the same product
- Assumes that prior behaviour determines current
behaviour without taking into account “contextual”
knowledge
51. 51
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Personalised vs Non-Personalised CF
CF recommendations are personalized: the prediction
is based on the ratings expressed by similar users;
neighbours are different for each target user
A non-personalized collaborative-based
recommendation can be generated by averaging the
recommendations of ALL users
How would the two approaches compare?
52. 52
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Personalised vs Non-Personalised CF
0,1510,2230,0222811718164974424EachMovie
0,1790,2330,041100020939526040MovieLens
0,1520,2200,725351944910048483Jester
MAE
Pers
MAE
Non
Pers
density
total
ratings
itemsusersData Set
Not much difference indeed!
vij is the rating of user i for product j
and vj is the average rating for
product j
MAENP =
∑i, j
∣vij− v j∣
num.ratings
Mean Average Error Non Personalized:
53. 53
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
The Sparsity Problem
Typically large product sets & few user ratings
e.g. Amazon:
in a catalogue of 1 million books, the probability
that two users who bought 100 books each,
have a book in common is 0.01
in a catalogue of 10 million books, the
probability that two users who bought 50 books
each, have a book in common is 0.0002
CF must have a number of users ~ 10% of
the product catalogue size
54. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
The Sparsity Problem
Methods for dimensionality reduction
Matrix Factorization
SVD
Clustering
55. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Model-Based
Collaborative Filtering
56. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Model Based CF Algorithms
Models are learned from the underlying data rather than
heuristics.
Models of user ratings (or purchases):
Clustering (classification)
Association rules
Matrix Factorization
Restricted Boltzmann Machines
Other models:
Bayesian network (probabilistic)
Probabilistic Latent Semantic Analysis ...
57. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Clustering
ClusterCluster customers into categories based
on preferences & past purchases
ComputeCompute recommendations at the
cluster level:
all customers within a cluster receive the
same recommendations
58. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Clustering
B, C & D form 1 CLUSTER vs. A & E form another cluster.
« Typical » preferences for CLUSTER are:
Book 2, very high
Book 3, high
Books 5 & 6, may be recommended
(Books 1 & 4, not recommended)
59. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Clustering
Customer F is classified as a new member of
CLUSTER will receive recommendations based
on the CLUSTER's preferences :
Book 2 will be highly recommended to Customer F
Book 6 will also be recommended to some extent
60. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Clustering
+ It can also be applied for selecting the k
most relevant neighbours in a CF algorithm
+ Faster: recommendations are per cluster
- less personalized: recommendations are
per cluster vs. in CF they are per user
61. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Association rules
Past purchases used to find relationships of
common purchases
62. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Association rules
+ Fast to implement
+ Fast to execute
+ Not much storage space required
+ Not « individual » specific
+ Very successful in broad applications for large
populations, such as shelf layout in retail stores
- Not suitable if preferences change rapidly
- Rules can be used only when enough data
validates them. False associations can arise
64. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Loss Functions for MF
Squared error loss:
Mean Average Error:
Binary Hinge loss:
65. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning: Stochastic Gradient
Descent
66. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Restricted Boltzmann Machines
A (generative stochastic) Neural Network
Learns a probability distribution over its
inputs
Used in dimensionality reduction, CF,
topic modeling, feature learning
Essential components of Deep Learning
methods (DBN's, DBM's)
68. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Restricted Boltzmann Machines
Each unit is in a state which can be active or
not active.
Each input of a unit is associated to a weight
The transfer function Σ calculates for each unit a
score based on the weighted sum of the inputs
This score is passed to the activation function φ
which calculated the probability that the unit
state is active.
69. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Restricted Boltzmann Machines
Each unit in the visible layer vi corresponds to one item
The number of the hidden units hj is a parameter.
Each vi is connected to each hj through a weight wij
In the training phase, for each user:
if the user purchased the item the corresponding vi is activated.
The activation states of all vi are the input of each hj
Based on this input the activation state of each hj is calculated
The activation state of all hj become now the input of each vi
The activation state of each vi is recalculated
For each vi the difference between the present activation state
and the previous is used to update the weights wij and thresholds θj
71. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Restricted Boltzmann Machines
In the prediction phase, using a trained RBM, when recommending to a user:
For the items of the user the corresponding vi
is activated.
The activation states of all v are the input of each hj
Based on this input the activation state of each hj is calculated
The activation state of all hj become now the input of each vi
The activation state of each vi
is recalculated
The activation probabilities are used to recommend items
72. 72
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Limitations of CF
Requires User-Item dataRequires User-Item data:
It needs to have enough users in the system.
New items need to get enough ratings.
New users need to provide enough ratings (cold start)
Sparsity:
it is hard to find users who rated the same items.
Popularity Bias:
Cannot recommend items to users with unique tastes.
Tends to recommend popular items.
73. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Cold-start
New User ProblemNew User Problem: the system must first learn the
user’s preferences from the ratings.
Hybrid RS, which combines content-based
and collaborative techniques, can help.
New Item ProblemNew Item Problem: Until the new item is rated by
a substantial number of users, the RS is not able
to recommend it.
74. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
75. 75
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-Based
Recommendations
Recommendations are based on the
information on the contentcontent of itemsof items rather than
on other users’ opinions.
Use a machine learning algorithm to model
the users' preferences from examples based on
a description of the content.
76. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
What is content of an item?
Explicit attributes or characteristics
e.g. for a movie:
Genre: Action / adventure
Feature: Bruce Willis
Year: 1995
Textual content
e.g. for a book:
title,
description,
table of content
78. 78
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-Based
Recommendation
Suitable for text-based products (web pages, books)
Items are “described” by their features (e.g. keywords)
Users are described by the keywords in the items they
bought
Recommendations based on the match between the
content (item keywords) and user keywords
The user model can also be a classifier (Neural Networks,
SVM, Naïve Bayes...)
79. 79
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Advantages of CB Approach
+ No need for data on other users.
+ No cold-start or sparsity problems.
+ Can recommend to users with unique tastes.
+ Can recommend new and unpopular items
+ Can provide explanations of recommended
items by listing content-features that caused an
item to be recommended.
80. 80
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Disadvantages of CB Approach
- Only for content that can be encoded as meaningful
features.
- Some types of items (e.g. movies, music)are not amenable
to easy feature extraction methods
- Even for texts, IR techniques cannot consider multimedia
information, aesthetic qualities, download time: a positive
rating could be not related to the presence of certain
keywords
- Users’ tastes must be represented as a learnable function of
these content features.
- Hard to exploit quality judgements of other users.
- Difficult to implement serendipity
81. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-based Methods
Content(s):= item profile, i.e. a set of
attributes/keywords characterizing item s.
weight wij measures the 'Importance” (or
“informativeness”) of word kj in document dj
term frequency/inverse document
frequency(TF-IDF) is a popular weighting
technique in IR
82. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-based User Profile
ContentBasedProfile(c):= profile of user c
profiles are obtained by:
analysing the content of the previous items
using keyword analysis techniques
e.g., ContentBasedProfile(c):=(wc1, . . . , wck)
a vector of weights, where wci denotes the
importance of keyword ki to user c
83. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Similarity Measurements
In content-based systems, the utility function
u(c,s) is defined as:
where ContentBasedProfile(c) of user c and
Content(s) of document s are both
represented as TF-IDF vectors of keyword
weights.
84. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Similarity Measurements
Utility function u(c,s) usually represented by some
scoring heuristic defined in terms of vectors, such
as the cosine similarity measure.
85. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-based Recommendation.
An (unrealistic) example
How to compute recommendations of books based only
on their title?
A customer buys the book: Building data mining applications for
CRM
7 Books are possible candidates for a recommendation:
Accelerating Customer Relationships: Using CRM and Relationship Technologies
Mastering Data Mining: The Art and Science of Customer Relationship Management
Data Mining Your Website
Introduction to marketing
Consumer behaviour
Marketing research, a handbook
Customer knowledge management
86. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
COUNT
a
Accelerating
and
applications
art
behavior
Building
Consumer
CRM
customer
data
for
Handbook
Introduction
Knowledge
Management
Marketing
Mastering
mining
of
relationship
Research
science
technology
the
to
using
website
your
1 1 1 1 1 1
1 1 1 1 2 1 1
1 1 1 1 1 1 1 1 1 1 1
1 1 1 1
1 1 1
Consumer behavior 1 1
1 1 1 1
1 1 1
Building data mining
applications for
CRM
Accelerating
customer
relationships: using
CRM and
relationship
technologies
Mastering Data
Mining: the art and
science of Customer
Relationship
Management
Data Mining your
website
Introduction to
Marketing
Marketing Research:
a Handbook
Customer
Knowledge
Management
87. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Content-based
Recommendation
Computes distances between this book & all others
Recommends the « closest » books:
#1: Data Mining Your Website
#2: Accelerating Customer Relationships: Using CRM and Relationship
Technologies
#3: Mastering Data Mining: The Art and Science of Customer
Relationship Management
88. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
a
Accelerating
and
applications
art
behavior
Building
Consumer
CRM
customer
data
for
Handbook
Introduction
Knowledge
Management
Marketing
Mastering
mining
of
relationship
Research
science
technology
the
to
using
website
your
0.502 0.502 0.344 0.251 0.502 0.251
0.432 0.296 0.296 0.216 0.468 0.432 0.432
0.256 0.374 0.187 0.187 0.256 0.374 0.187 0.374 0.256 0.374 0.374
0.316 0.316 0.632 0.632
0.636 0.436 0.636
Consumer behavior 0.707 0.707
0.537 0.537 0.368 0.537
0.381 0.736 0.522
TFIDF Normed
Vectors
Building data mining
applications for
CRM
Accelerating
customer
relationships: using
CRM and
relationship
technologies
Mastering Data
Mining: the art and
science of Customer
Relationship
Management
Data Mining your
website
Introduction to
Marketing
Marketing Research:
a Handbook
Customer
Knowledge
Management
89. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
90. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context
Context is a dynamic set of
factors describing the state
of the user at the moment of
the user's experience
Context factors can rapidly
change and affect how the
user perceives an item
91. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context in Recommendations
Temporal: Time of the day, weekday/end
Spatial: Location, Home, Work etc.
Social: with Friends, Family
Recommendations should be tailored to the
user & to the current Context of the user
93. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context-Aware RS: Pre-filtering
94. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context-Aware RS: Post-filtering
95. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context-Aware RS:
Tensor Factorization
96. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context-Aware RS:
Pre-filtering
+ Simple
+ Works with large amounts of data
- Increases sparseness
- Does not scale well with many Context variables
Post-filtering
+ Single model
+ Takes into account context interactions
- Computationally expensive
- Increases data sparseness
- Does not model the Context directly
Tensor Factorization
+ Performance
+ Linear scalability
+ Models context directly
97. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
98. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Ranking
Most recommendations are presented in a
sorted list
Recommendation is a ranking problem
Popularity is the obvious baseline
Users pay attention to few items at the top of
the list
99. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Ranking: Approaches
(I) Re-ranking: based on features e.g.
predicted rating, popularity, etc
(II) Learning to Rank: Build Ranking CF
models
102. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Re-ranking
Final
Ranking
Popularity
Predicted
Ra4ng
1
2
3
4
5
103. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank
Machine learning task: Rank the most relevant
items as high as possible in the
recommendation list
Does not try to predict a rating, but the order of
preference
Training data have partial order or binary
judgments (relevant/not relevant)
Can be treated as a standard supervised
classification problem
104. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Metrics
Metrics evaluate the quality of a recommendation list
- Normalized Discounted Cumulative Gain NDCG
Computed for the first k items
The NDCG@k of a list of items ratings Y, permuted by π is:
where πs is the permutation which sorts Y decreasingly
105. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Metrics
1/log(7)3/log(6)7/log(5)15/log(4)31/log(3)
7/log(7)1/log(5)
31/log(5)7/log(3)
106. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Metrics
Mean Reciprocal Rank (MRR)
107. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Metrics
Mean Average Precision (MAP)
S the set of relevant items, N #users
108. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Matrix Factorization for Ranking
109. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Approaches
1) Pointwise
Ranking function minimizes loss function
defined on individual relevance judgment e.g.
Ranking score based on regression or
classification
Ordinal regression, Logistic regression, SVM
110. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Approaches
2) Pairwise
Loss function is defined on pair-wise
preferences
Goal: minimize number of inversions
in ranking
BPR, RankBoost, RankNet, FRank…
111. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Non-smoothness of Metrics
0.81
0.75
0.64
0.58
0.55
F_i = RR = 0.5
112. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Non-smoothness of Metrics
0.82
0.80
0.63
0.52
0.50
F_i = RR = 0.5
113. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Non-smoothness of Metrics
0.83
0.82
0.62
0.52
0.49
F_i = RR = 1
115. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Learning to rank - Approaches
3) Listwise
Direct optimization of ranking metrics,
List-wise loss minimization for CF a.k.a
Collaborative Ranking
CoFiRank: optimizes an upper bound of
NDCG (Smooth version)
CLiMF : optimizes a smooth version of MRR
TFMAP: optimizes a smooth version of MAP
AdaRank: uses boosting to optimize NDCG
116. 116
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Diversity in Recommendation (I)
Recommendations from a music on-line retailer:
No diversity: pop albums from female singers.
Some are redundant.
Born This Way Pink Friday Dangerously in
Love
Born This Way
– The Remix
Femme Fatale Can't be Tamed Teenage Dream
Lady Gaga Nicki Minaj Beyoncé Lady Gaga Britney Spears Miley Cyrus Katy Perry
117. 117
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Diversity in Recommendation (II)
Some good music recommendations:
Different artists and genres.
Not similar between them.
These are much better recommendations!
Wrecking Ball Not your Kind
of People
Like a Prayer Choice of
Weapon
Sweet Heart
Sweet Light
The Light the
Dead See
Little Broken
Hearts
B. Springsteen Garbage Madonna The Cult Spiritualized Soulsavers Norah Jones
118. 118
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Diversity: Re-Ranking
Recommender Re-ranking
top 5
not diverse
top 5
diverse
Ziegler et al. 2005
Zhang et al. 2008
Vargas et al. 2011
comedy
drama
action
120. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Social and Trust-based
recommenders
A social RS recommends items that are “popular”
with the friends of the user.
Friendship though does not imply trust
“Trust” in social-based RS can be per-user or
topic-specific
121. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Building RS Using Trust
Trust for CF
Use trust to give more weight to some users
Use trust in place of (or combined with)
similarity
Trust for sorting & filtering
Prioritize information from trusted sources
122. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Other ways to use Social
Social connections can be used in
combination with other approaches
In particular, “friendships” can be fed into
CF methods in different ways
e.g. replace or modify user-user similarity by
using social network information
124. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
125. 129
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Hybridization Methods
Hybridization Method Description
Weighted Outputs (scores or votes) from several
techniques are combined with different
degrees of importance to offer final
recommendations
Switching Depending on situation, the system changes
from one technique to another
Mixed Recommendations from several techniques
are presented at the same time
Feature combination Features from different recommendation
sources are combined as input to a single
technique
Cascade The output from one technique is used as
input of another that refines the result
Feature augmentation The output from one technique is used as
input features to another
Meta-level The model learned by one recommender is
used as input to another
126. 130
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Weighted
Rating for an item is computed as the weighted sum of
ratings produced by a pool of different RS.
The weights are determined by training and get adjusted as
new ratings arrive.
Assumption: relative performance of the different
techniques is uniform. Not true in general: e.g. CF performs
worse for items with few ratings.
e.g.
a CB and a CF recommender equally weighted at first.
Weights are adjusted as predictions are confirmed or not.
RS with consensus scheme: each recommendation of a
specific item counts as a vote for the item.
127. 131
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Feature Combination
CF ratings of users are passed as additional feature to a CB.
CB makes recommendations over this augmented data set.
Switching
The system uses a criterion to switch between
techniques
The main problem is to identify a good switching
criterion.
e.g.
The DailyLearner system uses a CB-CF. When CB cannot
predict with sufficient confidence, it switches to CF.
128. 133
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Mixed
Recommendations from more than one technique are
presented together
e.g.
The PTV system recommends a TV viewing schedule for
the user by combining recommendations from a CB and
a CF system.
CB uses the textual descriptions of TV shows; vs CF uses
other users’ preferences.
When collision occurs, the CB has priority.
129. 134
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Cascade
At each iteration, a first recommendation technique
produces a coarse ranking & a second technique
refines the recommendation
Cascading avoids employing the second, lower-priority,
technique on items already well-differentiated by the
first
Requires a meaningful ordering of the techniques.
E.g.: EntreeC is a restaurant RS uses its knowledge of
restaurants to make recommendations based on the
user’s stated interests. The recommendations are
placed in buckets of equal preference, and the
collaborative technique breaks ties
130. 135
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Feature Augmentation
Very similar to the feature combination method:
Here the output of one RS is incorporated into
the processing of a second RS
e.g.:
Amazon.com generates text data (“related
authors” and “related titles”) using its internal
collaborative systems
Libra system makes content-based
recommendations of books based on these text
data found in Amazon.com, using a naive
Bayes text classifier
131. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
132. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Beyond Explicit Ratings
Implicit feedback is more readily available, and less noisy
Already many approaches (e.g. SVD++) can make use of
implicit feedback
Ongoing research in combining explicit and implicit
feedback
D. H. Stern, R. Herbrich, and T. Graepel. Matchbox: large scale online bayesian
recommendations. In Proc.of the 18th WWW, 2009.
Koren Y and J. Sill. OrdRec: an ordinal model for predicting personalized item rating
distributions. In Rec-Sys ’11, pages 117–124, 2011.
Y. Koren. Factorization meets the neighborhood: a multifaceted collaborative
filtering model. In Proceedings of the 14th ACM SIGKDD, 2008.
Yifan Hu, Y. Koren, and C. Volinsky. Collaborative Filtering for Implicit Feedback
Datasets. In Proc. Of the 2008 Eighth ICDM, pages 263–272, 2008.
133. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Personalized Learning to Rank
Better approaches to learning to rank that
directly optimize ranking metrics and allow
for personalization (e.g. CliMF & TFMAP)
Y. Shi, A. Karatzoglou, L. Baltrunas, M. Larson, N. Oliver, and A.
Hanjalic. CLiMF: learning to maximize reciprocal rank with
collaborative less-is-more filtering. In Proc. of the sixth Recsys,
2012.
Y. Shi, A. Karatzoglou, L. Baltrunas, M. Larson,A. Hanjalic, and N.
Oliver. TFMAP: optimizing MAP for top-n context-aware
recommendation. In Proc. Of the 35th SIGIR, 2012.
134. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Context-aware
Recommendations
Beyond the traditional 2D user-item space
Recommendations should also respond to user
context (e.g. location, time of the day...)
Many different approaches such as Tensor
Factorization or Factorization Machines
A. Karatzoglou, X. Amatriain, L. Baltrunas, and N. Oliver. Multiverse
recommendation: n-dimensional tensor factorization for context-aware
collaborative filtering. In Proc. of the fourth ACM Recsys, 2010.
S. Rendle, Z. Gantner, C. Freudenthaler, and L. Schmidt-Thieme. Fast
context-aware recommendations with factorization machines. In Proc. of
the 34th ACM SIGIR, 2011.
135. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
User choice and presentation
effects
We log the recommended items to the
users and their choice
We can use this information as negative
feedback (not chosen) and positive
feedback (chosen).
S.H. Yang, B. Long, A.J. Smola, H. Zha, and Z. Zheng.
Collaborative competitive filtering: learning recommender
using context of user choice. In Proc. of the 34th ACM
SIGIR, 2011.
136. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Social Recommendations
Beyond trust-based
Cold-starting with Social Information
Combining Social with CF
Finding “experts”
J. Delporte, A. Karatzoglou, T. Matuszczyk, S. Canu. Socially Enabled Preference Learning
from Implicit Feedback Data. In Proc. of ECML/PKDD 2013
N. N. Liu, X. Meng, C. Liu, and Q. Yang. Wisdom of the better few: cold start
recommendation via representative based rating elicitation. In Proc. of RecSys’11, 2011.
M. Jamali and M. Ester. Trustwalker: a random walk model for combining trust-based and
item-based recommendation. In Proc. of KDD ’09, 2009.
J. Noel, S. Sanner, K. Tran, P. Christen, L. Xie, E. V. Bonilla, E. Abbasnejad, and N. Della
Penna. New objective functions for social collaborative filtering. In Proc. of WWW ’12,
pages 859–868, 2012.
X. Yang, H. Steck, Y. Guo, and Y. Liu. On top-k recommendation using social networks. In
Proc. of RecSys’12, 2012.
137. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
138. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Conclusions
RS are an important application of Machine
Learning
RS have the potential to become as
important as Search is now
However, RS are more than Machine
Learning
HCI
Economical models
...
139. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Conclusions
RS are fairly new but already grounded on
well-proven technology
Collaborative Filtering
Machine Learning
Content Analysis
Social Network Analysis
…
However, there are still many open questions
and a lot of interesting research to do!
140. Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
Index
1. Introduction: What is a Recommender System?
2. Approaches
1. Collaborative Filtering
2. Content-based Recommendations
3. Context-aware Recommendations
4. Other Approaches
5. Hybrid Recommender Systems
3. Research Directions
4. Conclusions
5. References
141. 146
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
"Recommender Systems Handbook." Ricci, Francesco, Lior Rokach, Bracha
Shapira, and Paul B. Kantor. (2010).
“Recommender systems: an introduction”. Jannach, Dietmar, et al.
Cambridge University Press, 2010.
“Toward the Next Generation of Recommender Systems: A Survey of the
State-of-the-Art and Possible Extensions”. G. Adomavicious and A. Tuzhilin.
2005. IEEE Transactions on Knowledge and Data Engineering, 17 (6)
“Item-based Collaborative Filtering Recommendation Algorithms”, B.
Sarwar et al. 2001. Proceedings of World Wide Web Conference.
“Lessons from the Netflix Prize Challenge.”. R. M. Bell and Y. Koren. SIGKDD
Explor. Newsl., 9(2):75–79, December 2007.
“Beyond algorithms: An HCI perspective on recommender systems”. K.
Swearingen and R. Sinha. In ACM SIGIR 2001 Workshop on Recommender
Systems
“Recommender Systems in E-Commerce”. J. Ben Schafer et al. ACM
Conference on Electronic Commerce. 1999-
“Introduction to Data Mining”, P. Tan et al. Addison Wesley. 2005
References
142. 147
Alexandros Karatzoglou – September 06, 2013 – Recommender Systems
“Evaluating collaborative filtering recommender systems”. J. L.
Herlocker, J. A. Konstan, L. G. Terveen, and J. T. Riedl. ACM Trans.
Inf. Syst., 22(1):5–53, 2004.
“Trust in recommender systems”. J. O’Donovan and B. Smyth. In
Proc. of IUI ’05, 2005.
“Content-based recommendation systems”. M. Pazzani and D.
Billsus. In The Adaptive Web, volume 4321. 2007.
“Fast context-aware recommendations with factorization
machines”. S. Rendle, Z. Gantner, C. Freudenthaler, and L. Schmidt-
Thieme. In Proc. of the 34th ACM SIGIR, 2011.
“Restricted Boltzmann machines for collaborative filtering”. R.
Salakhutdinov, A. Mnih, and G. E. Hinton.In Proc of ICML ’07, 2007
“Learning to rank: From pairwise approach to listwise approach”. Z.
Cao and T. Liu. In In Proceedings of the 24th ICML, 2007.
“Introduction to Data Mining”, P. Tan et al. Addison Wesley. 2005
References