2/20/2011
Collaborative Filtering Based Recommendations Danielle Lee Fabruary 16, 2011
1
If I have 3 million customers on the Web, I should have 3 million stores on the Web - Jeff Bezos, CEO of Amazon.com
Collaborative Filtering Recommender System, Danielle Lee
2
1
2/20/2011
One Exemplary Recommendation
3
Classification of Recommender Systems • Collaborative Filtering Recommender System – “Word‐of‐Mouth” phenomenon.
• Content‐based Recommender System – Recommendation generated from the content features associated with products and the ratings from a user.
• Case‐based Recommender System – A kind of content‐based recommendation. Information are represented as case and the system recommends the cases that are most similar to a user’s preference.
• Hybrid Recommender System – Combination of two or more recommendation techniques to gain better performance with fewer of the drawbacks of any individual one (Burke, 2002). Collaborative Filtering Recommender System, Danielle Lee
4
2
2/20/2011
Recommendation Taxonomy Targeted Customer Inputs Implicit navigation Implicit navigation Explicit navigation Keyword/Item Attribute Ratings Purchase History
Delivery
Recommendation Method Raw retrieval Community Inputs Manually selected Statistical summarization Statistical summarization Item attribute Attribute‐based External Item Item‐to‐item correlation Popularity User‐to‐user correlation Purchase History Suggestion, Prediction Ratings Outputs Ratings, Reviews Text Comments
E‐store Engine
Push Pull
Degree of Personalization Non‐personalized Ephemeral Persistent
Response/Feedback
Response/Feedback
Good Offer for You!!
Schafer, et al. (2001) 5
Very Simple Procedure of Recommendations 1. Understand and model users 2. Collect candidate items to recommend. 3. Based on your recommendation method, predict target users’ preferences for each candidate item. 4 Sort the candidate items according to the 4. Sort the candidate items according to the prediction probability and recommend them.
Collaborative Filtering Recommender System, Danielle Lee
6
3
2/20/2011
What is Collaborative Filtering? Originated from the Information Tapestry project at Xerox PARC. It allows its users to annotate the documents that they read and system recommends Is also called “nearest neighbor recommendation”. Collaborative Filtering is ‘the process of filtering or evaluating items using the opinions of other people.’ CF recommends items which are likely interesting to a target user based on the evaluation averaging the opinions of people with similar tastes.
People who agreed with me in the past, will also agree People who agreed with me in the past will also agree in the future. On the other hand, the assumption of Content‐based recommendation is that Items with similar objective features will be rated similarly. Collaborative Filtering Recommender System, Danielle Lee
7
General Procedure of CF Recommendation 1.Select like‐minded peer group for a target user 2. Choose candidate items which are not in the list of the target user but in the list of peer group. 3.Score the items by producing a weighted score and predict the ratings for the given items. 4.Select the best candidate items and recommend them to a target user. Redo all the procedures through 1 ~ 4 on a timely basis. 8
4
2/20/2011
User‐based Nearest Neighbor Recommendation (2) The input for the CF prediction algorithms is a matrix of users’ ratings g on items,, referred as the ratings matrix. Item 1 Item 2 Item 3 Item 4 Item 5 Average
Target User
Alice
5
3
4
4
???
16/4
User1
3
1
2
3
3
9/4
User2
4
3
4
3
5
14/4
User3
3
3
1
5
4
12/4
User4
1
5
5
2
1
13/4
Collaborative Filtering Recommender System, Danielle Lee
9
User‐based Nearest Neighbor Recommendation (2) 6 5 4 Alice 3
User1 User2
2
User4
1 0 Item 1
Item 2
Item 3
Collaborative Filtering Recommender System, Danielle Lee
Item 4 10
5
2/20/2011
User‐based Nearest Neighbor Recommendation (3)_User Similarity • Pearson’s Correlation Coefficient for User a and User b for all rated Products P User b for all rated Products, P. sim(a, b)
p product ( P )
(ra , p ra )(rb , p rb )
(ra , p ra ) 2
p product ( P )
p product ( P )
(rb , p rb ) 2
• Pearson correlation takes values from +1 (Perfectly positive correlation) to ‐1 (Perfectly negative correlation) . Collaborative Filtering Recommender System, Danielle Lee
11
User‐based Nearest Neighbor Recommendation (4) _Rating Prediction
pred (a, p ) ra
bneighbors ( n )
sim(a, b) (rb , p rb )
bneighbors ( n )
Collaborative Filtering Recommender System, Danielle Lee
sim(a, b)
12
6
2/20/2011
User‐based Nearest Neighbor Recommendation (5) • Adjusted Cosine similarity, Spearman’s rank correlation coefficient, or mean squared different measures. • Necessity to reduce the relative importance of the agreement on universally liked items : inverse user frequency (Breese, et al., 1998) and variance weighting factor (Herlocker, et al., 1999). • Skewed neighboring is possible: Significance Skewed neighboring is possible: Significance weighting (Herlocker, et al., 1999). • Calculating a user’s perfect neighborhood is immensely resource intensive calculations Collaborative Filtering Recommender System, Danielle Lee
13
Core Concepts in CF • User: any individual who provides ratings to a system – User who provides ratings and user who receive recommendations User who provides ratings and user who receive recommendations
• Item: anything for which a human can provide a rating. – Ex) art, books, CDs, journal articles, music, movie, or vacation destinations
• Ratings: vote from a user for an item by means of some value – Scalar/ordinal ratings (5 points Likert scale), binary ratings ( (like/dislike), unary rating (observed/abase of rating) ) y g( g) – Explicit ratings and implicit ratings
Collaborative Filtering Recommender System, Danielle Lee
14
7
2/20/2011
One Typical CF recommendation
15
One Typical CF recommendation
16
8
2/20/2011
Motivations for Collaborative Filtering based Recommendations • Collaborative filtering systems work by people in system, and it is expected that people to be better at evaluating information than a computed function • CF doesn’t require contents. • Completely independent of any machine‐ readable representation of the objects being recommended. – Works well for complex objects (or multimedia) such as music, pictures and movies
• More diverse and serendipitous recommendation Collaborative Filtering Recommender System, Danielle Lee
17
Prediction/Recommendation Generation Prediction/Recomm endation Algorithm Non‐ probabilistic Algorithm
User‐based Nearest Neighbor
Item‐based Nearest Neighbor
Probabilistic Algorithm
Dimension Reduction
Collaborative Filtering Recommender System, Danielle Lee
Bayesian‐ Network Models
Others 18
9
2/20/2011
Item‐based Nearest Neighbor Recommendation (1) Target User
Item 1 Item 2 Item 1 Item 2 Item 3 Item 3 Item 4 Item 4 Item 5 Item 5 Average
Alice
5
3
4
4
???
4.0
User1
3
1
2
3
3
2.4
User2
4
3
4
3
5
3.8
User3
3
3
1
5
4
3.2
User4
1
5
5
2
1
2.8
Collaborative Filtering Recommender System, Danielle Lee
19
Item‐based Nearest Neighbor Recommendation (2) Item 1
Item 2 Item 3
Item 4
Item 5
Alice
1
‐1
0
0
User1
0.6
‐1.4
‐0.4
0.6
0.6
User2
0.2
‐0.8
0.2
‐0.8
1.2
User3
‐0.2
‐0.2
‐2.2
1.8
0.8
User4
‐1.8 18
22 2.2
22 2.2
‐0.8 08
‐1.8 18
Collaborative Filtering Recommender System, Danielle Lee
20
10
2/20/2011
Item‐based Nearest Neighbor Recommendation (2) Generate predictions based on similarities between items: Prediction for a user a and item x is composed items: Prediction for a user a and item x is composed of a weighted sum of the users’ ratings for items most similar to x. Adjusted Cosine Similarity
sim ( x , y )
u U
u U
( r u , x ru )( r u , y ru )
( ru , x ru ) 2
pred ( u , p )
i similarIte ms ( u )
u U
( ru , y ru ) 2
sim ( i , p ) ru ,i
i similarIte ms ( u )
sim ( i , p )
21
Item‐based Nearest Neighbor Recommendation (3) More computationally efficient than user‐based nearest neighbors. neighbors Compared with user‐based approach that is affected by the small change of users’ ratings, item‐based approach is more stable. Recommendation algorithm used by Amazon.com (Linden et al., 2003).
Collaborative Filtering Recommender System, Danielle Lee
22
11
2/20/2011
Other Non‐Probabilistic Algorithms (1) • Dimensionality Reduction – Map item space to a smaller number of underlying “dimensions.” – Matrix Factorization/Latent Factor models such as Singular Value Decomposition, Principal Component Analysis, Latent Semantic Analysis, etc. t – Expensive offline computation and mathematical complexity Collaborative Filtering Recommender System, Danielle Lee
23
Other Non‐Probabilistic Algorithms (2) • Matrix Factorization got an attention since Netflix Prize competition.
Collaborative Filtering Recommender System, Danielle Lee
24
12
2/20/2011
Other Non‐Probabilistic Algorithms (3) • Association Rule Mining – Ex) “If a customer purchases baby food then the customer also buys diapers in 70% of the cases.” l b d f h ” – Build Models based on commonly occurring patterns in the ratings matrix. – “If user X liked both item 1 and item 2, then X will most probably also like item 5.” S Support t (X→Y) (X Y) =
Number of Transactions containing gXUY Number of Transactions
Confident(X→Y) =
Number of Transactions containing X U Y Number of Transactions containing X Collaborative Filtering Recommender System, Danielle Lee
25
Other Non‐Probabilistic Algorithms (4) • Association Rule Mining I Item 1 1
I Item 2 2 Item 3 I 3
I Item 4 4
I Item 5 5
Alice
1
0
0
0
User1
1
0
0
1
1
User2
1
0
1
0
1
User3
0
0
0
1
1
User4
0
1
1
0
0
• For association rule of item1 →item5, the support is 2/4 and confidence 2/2 Collaborative Filtering Recommender System, Danielle Lee
26
13
2/20/2011
Other Non‐Probabilistic Algorithms (4) • Recommendation procedure based on association rules (by Sarwar, et al., 2000) – Determine the set of X→Y association rules that are relevant for a target user. – Compute the union of items appearing in the consequent Y of these association rules that have not been purchased by the target user. – Sort the products according to the confidence of the rule that predicted them. If multiple rules suggested l th t di t d th If lti l l t d one product, take the rule with the highest confidence – Return the first N elements of this ordered list as a recommendation. Collaborative Filtering Recommender System, Danielle Lee
27
Probabilistic Algorithm • Bayesian‐Network – Derive Derive probabilistic dependencies among users or probabilistic dependencies among users or items using decision trees.
• Probabilistic Clustering/Dimensionality Reduction Techniques. • Expectation Maximization (EM) algorithm for CF with Gaussian probability distribution. • Probabilistic algorithms can produce a probability Probabilistic algorithms can produce a probability distribution across possible rating values – information that captures the likelihood of each possible rating value. Collaborative Filtering Recommender System, Danielle Lee
28
14
2/20/2011
Properties of Domains Are the properties of Data Distribution suitable for CF?
There are many items. Most users rate a single item. There are more items to be recommended than users. Very skewed rating distribution.
Are the Underlying Meaning properties suitable for CF? For each user of the community, there are other users with common needs or tastes. Item evaluation requires personal taste q p Items are heterogeneous
Are these properties of Data Persistence suitable for CF? Dynamically changing items (e.g. news or job cases) Persistent Taste Collaborative Filtering Recommender System, Danielle Lee
29
User Tasks studied in CF recomendation • Help me find new items I might like • Advise me on a particular item • Help me find a user (or some users) I might like • Help our group find something new that we might like might like • Help me find a mixture of “new” and “old” items Collaborative Filtering Recommender System, Danielle Lee
30
15
2/20/2011
Evaluation of Collaborative Filtering System To determine the quality of the predictions and recommendations Accuracy Rating accuracy : error between the predicted ratings and the true ratings. Mean Absolute Error (MAE) = average absolute difference between the predicted ratings and the actual rating given by a user Precision Rank accuracy : half‐life utility.
Novelty / Serendipity (Karypis, 2001) g ( ) Coverage (Sarwar, et. al., 2000) Learning Rate (Schein, et. al., 2001) Confidence (Herlocker, 2000) User Satisfaction (Swearingen & Sinha, 2001; Dahlen, B. J., 1998) Site Performance Collaborative Filtering Recommender System, Danielle Lee
31
Exercise to recommend using CF technology Astrono my for Kid Kids
Bob
Bagheera Learning : In the Network Wild
4
The GeoNet G Game
1
5
Math Maniac
Leonardo Homepag e
5
Alice Mark
1
5
4
???
Kate
1
5
4
3
5
Modified from the original table in Walker, et al., 2004 32
16
2/20/2011
Problems regarding CF (Cont.) Data Sparsity & Ratings scarcity The ratings matrix is sparse and only a small Th ti ti i d l ll fraction of all possible user item entries is known. Many CF algorithms have been designed specifically for data sets where there are many more users than items (e.g., the MovieLens data set has 65,000 users and 5,000 movies). CF may be inappropriate in a domain where there are many more items than users.
Implicit vs. explicit ratings Collaborative Filtering Recommender System, Danielle Lee
33
Problems regarding CF (Cont.) Problems regarding cold‐start. New item problem : the fact that if the number of users that p rated an item is small, accurate prediction for this item cannot be generated. New user problem : the fact that if the number of items rated by a user is small, it is unlikely that there could be an overlap of items rated by this user and active users. User‐ to‐user similarity cannot be reliably computed. New community problem : Without sufficient ratings, it’s h d diff hard to differentiate value by personalized CF i l b li d CF recommendations. Clear reward systems are necessary to convince users to vote or rate items. Collaborative Filtering Recommender System, Danielle Lee
34
17
2/20/2011
Possible solutions for Cold‐start Problem As the solution for new user problem: Displaying non‐personalized recommendation until the user has rated enough Asking the user to describe their taste in aggregate Asking the user for demographic information and using ratings of other users with similar demographics as recommendations
As the solution for new item problem: Recommending items through non‐CF techniques content analysis or metadata Randomly selecting items with few or no ratings and asking user R d l l i i i hf i d ki to rate those items.
As the solution for new community problem: Provide ratings incentives to a small “bootstrap” subset of the community, before inviting the entire community. Collaborative Filtering Recommender System, Danielle Lee
35
Problems regarding CF (Cont.) • Rarely‐rated entities : users, items, and user and item pairs with few co‐ratings d it i ith f ti – Discard rarely‐rated entities: Simple and clean approach but the decreased coverage. – Adjust calculation for rarely‐rated entities: Adjustment amount inversely proportional to the number of ratings
Collaborative Filtering Recommender System, Danielle Lee
36
18
2/20/2011
Problems regarding CF (Cont.) • Opinionated users : Provided more than 4 ratings and the std. dev. is greater than 1.5 ti d th td d i t th 1 5 • Black sheep (Peculiar users) : provided more than 4 ratings and for which the average distance of their rating on item i with respect to mean rating of item i g is greater than 1 g • Controversial items : received rating whose std. dev. Is greater than 1.5 Collaborative Filtering Recommender System, Danielle Lee
37
Problems regarding CF (Cont.) Explanation “Why this item was recommended to me?” Most recommender systems are black box approach and need to provide transparency. Explanations provide transparency, exposing the reasoning and data behind a recommendation (Herlocker, et al., 2000) Benefits of Explanations are Transparency, Scrutability, User Involvement, Education, Acceptance, Trust, Effectiveness, Persuasiveness, Satisfaction (Tintarev & Masthoff, 2007)
Explanations for ‘How’ and ‘Why’ are required (Explanations about model/process error & data error) model/process error & data error)
Privacy & Security Trust / Social Network based recommendations Confidence Matrix
Collaborative Filtering Recommender System, Danielle Lee
38
19
2/20/2011
Problems regarding CF Ad hoc user profiles / Copy profile attack Malicious intent to bias recommendations in their favor. Real profile attack case about sex manual http://www.news.com/2100‐1023‐976435.html
Shilling attacks (profile injection attacks) Push attacks Nuke attacks
Robust statistical methods to detect spam or random noise are required. M‐estimator SVD (Singular value decomposition) / new SVD based on Hebbian learning. PLSA Collaborative Filtering Recommender System, Danielle Lee
39
“Active/Trusted” Collaborative Filtering • More closer approach to the “word of mouth” • To search trustable users by exploiting trust propagation over To search trustable users by exploiting trust propagation over the trust network, not to search similar users as CF (Massa & Avesani, 2007) – possible to cover more than half users with reasonable error just based on their small number of ratings like 2, 3, or 4 ratings. – For users with 4 ratings, trust can make recommendation for 66% of the users while CF can do for 14% and with a higher error
Collaborative Filtering Recommender System, Danielle Lee
40
20
2/20/2011
Trust Networks and Trust Metrics Trust Metrics : Algorithms whose goal is to predict, based on the trust network, the di t b d th t t t k th trustworthiness of “unknown” users. Local Trust Metrics : the very personal and subjective views of the users. Different value of trust in other users for every user MoleTrust Global Trust Metrics : a global “reputation” value that approximates how the community as a whole considers a certain user. PageRank Collaborative Filtering Recommender System, Danielle Lee
41
Trust‐Aware Recommender Architecture
(Massa & Avesani, 2004; Massa & Avesani, 2007) Collaborative Filtering Recommender System, Danielle Lee
42
21
2/20/2011
Hybrid Recommender System • •
Combination of Two or more different Recommendation Technologies The spaces of possible hybrid recommender systems (Burke, 2007) Weight
Mixed
Switch
FC
Cascade
FA
Meta
CF/CN CF/DM CF/KB CN/CF CN/DM CN/KB DM/CF / DM/CN DM/KB KB/CF KB/CN KB/DM
FC = Feature Combination, FA = Feature Augmentation, CF = Collaborative, 43 CN = Content-based, DM = Demographic, KB = Knowledge-based
Other Useful Resources Adomavicius, G. & Tuzhilin, A. (2005) Toward the Next Generation of Recommender Systems: A Survey of the State‐of‐the‐Art and Possible Extensions IEEE Transactions on Knowledge and Data Engineering 17 (6) Extensions, IEEE Transactions on Knowledge and Data Engineering, 17 (6), pp. 734 ~ 749 Herlocker, J. L., Konstan, J. A., Terveen, L. G. & Riedl, J. T. (2001) Evaluating Collaborative Filtering Recommender Systems, ACM Transations Inf. Syst., 22 (1), pp. 5 ~ 53 Schafer, J. B., Konstan, J. & Riedl, J. (2001) E‐Commerce Recommendation Applications, Data Mining & Knowledge Discovery, 5, pp. 115 ~ 153 Paulson, P. & Tzanavari, A. (2003) Combining collaborative and content filtering using conceptual graphs Kaultz, H., Selman, B. & Shah, M. (1997) Referral Web: Combining Social Networks and Collaborative Filtering. For more useful resources, refer to the CF related page in course wiki.
Collaborative Filtering Recommender System, Danielle Lee
44
22