Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold...

16
Recommender Systems CS6780 – Advanced Machine Learning Spring 2019 Thorsten Joachims Cornell University Reading: Y. Koren, R. Bell, C. Volinsky, Matrix Factorization Techniques for Recommender Systems, IEEE Computer, 42:8, 2009. (link )

Transcript of Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold...

Page 1: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Recommender Systems

CS6780 – Advanced Machine LearningSpring 2019

Thorsten JoachimsCornell University

Reading: Y. Koren, R. Bell, C. Volinsky, Matrix Factorization Techniques for Recommender Systems, IEEE Computer, 42:8, 2009. (link)

Page 2: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Movie Recommender

Recommendation

Movie to watch

Page 3: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

News Recommender

Recommendation

Portfolio of newsarticles

Page 4: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Voice Assistant

Recommendation for “Alexa, play music”

Playlist

Page 5: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Recommender Systems

Examples

– Netflix: Movies

– Amazon: Products

– Spotify: Music

– YouTube: Videos

– Xbox Live: Games/Players

– Facebook: News

Problem

– There are far more “items” than an individual user could browse.

Goal

– Narrow down the choices to the items that are likely of interest to user.

Page 6: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

The Long Tail(Chris Anderson, 2004)

Page 7: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

When do Recommender Systems work?

• Main Ideas

– Past user preferences are predictive of future user preferences.

• Example: If user 𝑢 enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

– There is a small number of user types.

• Example: Users 𝑢1 and 𝑢2 both like the Red Hot ChilliPeppers. If 𝑢1 also likes Linkin Park, then recommend Linkin Park to 𝑢2.

Page 8: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Setup

• Set of users: U

• Set of items: V

• Ratings Y: 𝑈 × 𝑉 → ℜ

– Explicit Feedback• Star rating [1-5]

– Implicit Feedback• Watched/skipped [0,1]

• Visited web pages [1]

4 54 33 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs

Items

Observed Rating Matrix ෨𝑌

Page 9: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Content-Based Recommendation

• Idea:

Supervised learning for each row or column

ℎ𝑢: 𝑋𝑣 → 𝑌ℎ𝑣: 𝑋𝑢 → 𝑌

• Challenge:

Need to come up with features for users and/or items.

4 54 33 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs U

Items V

Observed Rating Matrix ෨𝑌

Page 10: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Collaborative Recommendation

• Idea:

Find users with similar ratings and fill in unobserved ratings.

Find items with similar ratings and fill in unobserved ratings.

4 54 35 4 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs U

Items V

Observed Rating Matrix ෨𝑌

Page 11: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Matrix Completion Model

• Low rank assumption: rank k

• For each user 𝑢𝑖 and item 𝑣𝑗𝑌𝑖𝑗 = 𝑢𝑖 𝑣𝑗

• Learn feature vectors 𝑢𝑖 and 𝑣𝑗 for each user/item

4 54 35 4 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs U

Items V

Observed Rating Matrix ෨𝑌

=

×

𝑘

𝑘

Page 12: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Matrix Completion Training

Given: Sample 𝑆 of observed entries of ෨𝑅Training: Solve for 𝑈 and 𝑉 with 𝑘 rows/cols respectively

min𝑈,𝑉

𝑖,𝑗 ∈𝑆

෨𝑌𝑖𝑗 − 𝑢𝑖𝑣𝑗2

Prediction: Fill in entries not in 𝑆 with 𝑌𝑖𝑗 = 𝑢𝑖 𝑣𝑗

4 54 35 4 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs U

Items V

Observed Rating Matrix ෨𝑌

=

×

𝑘

𝑘

Page 13: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Movie Recommendation

Missing Not At Random (MNAR) Problem

5 4 54 4 33 4 4

1 3 12 1 22 2 1

1 1 32 2 21 3 1

3 4 41 2 11 1 3

2 2 25 3 54 4 4

2 1 23 2 32 1 1

1 2 22 2 11 1 1

1 1 12 2 23 1 1

5 3 54 3 34 3 4

Use

rs

Movies4 5

4 33 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs

Movies

True Rating Matrix Y* Observed Rating Matrix ෨𝑌

Partially revealed

Predict 𝑌

Horror Romance Comedy

Romance lovers

Horror lovers

Comedy lovers

Page 14: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

MNAR and Evaluation

Predicted Rating Matrices 𝑌1 and 𝑌2

4 54 33 4

2

4 4 25 34 4

12

5 33 3

4 4

Use

rs

Movies

Observed Rating Matrix ෨𝑌

4 4 44 4 44 4 4

5 5 55 5 55 5 5

5 5 55 5 55 5 5

4 4 45 5 55 5 5

5 5 54 4 44 4 4

5 5 55 5 55 5 5

5 5 55 5 55 5 5

5 5 55 5 55 5 5

4 4 44 4 44 4 4

Use

rs

Movies𝑌2

5 5 55 5 55 5 5

1 1 11 1 11 1 1

1 1 11 1 11 1 1

5 5 51 1 11 1 1

1 1 15 5 55 5 5

1 1 11 1 11 1 1

1 1 11 1 11 1 1

1 1 11 1 11 1 1

5 5 55 5 55 5 5

Use

rs

Movies𝑌1

Severly biased performance estimates!

𝑀𝐴𝐸 𝑌1, ෨𝑌 = 24

𝑀𝐴𝐸 𝑌2, ෨𝑌 = 22

𝑀𝐴𝐸 𝑌, ෨𝑌 =

𝑖𝑗

ො𝑦𝑖𝑗 − 𝑦𝑖𝑗

Page 15: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Why is the Data MNAR?

• User Induced MNAR

Page 16: Learning (Text) Classification Rules · •Example: If user enjoyed action movies with Arnold Schwarzenegger in the past, recommend more action movies with Arnold Schwarzenegger.

Why is the Data MNAR?

• System Induced MNAR