68
Part 16: Context Dependent Recommendations Francesco Ricci Free University of Bozen-Bolzano Italy [email protected]

Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Part 16: Context Dependent

Recommendations

Francesco Ricci Free University of Bozen-Bolzano

Italy [email protected]

Page 2: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Content

p  What is context? p  Types of context p  How context should impact on recommendations

and ratings p  Context modelling – collaborative filtering p  Context-based recommendation computation p  When context matters – detecting relevance p  Contextual computing p  Adapting the recommendation to the current

interaction context

2

Page 3: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Context Definition

“Any information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and applications themselves.”

[Dey, 2001]

3

Page 4: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Types of Context - Mobile

p  Context with capital C: the understanding of circumstances n  … providing Context for better understanding

what this moment in time means to me n  Ex: I understand why you did it – your were

under pressure for such a long time

p  The present location or physical context n  User’s: group, transportation mean, …

p  The present device of access – media context p  The present state of mind – modal context

n  User’s: goal, mood, experience, … 4

[Fling, 2009]

Page 5: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

p  Recommender Systems are software tools and techniques providing suggestions for items to be of use to a user

p  Recommender systems must take into account this information to deliver more useful (perceived) recommendations.

Context in Recommender Systems

5

Context is any information or conditions that can influence the perception of the

usefulness of an item for a user

Page 6: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

6

Motivating Examples

p  Recommend a vacation n  Winter vs. summer

p  Recommend a purchase n  Gift vs. for yourself

p  Recommend a movie n  With girlfriend in a movie theater vs. at

home with a group of friends p  Recommend a recipe

n  Alone vs. with my kids p  Recommend music

n  When you have a happy vs. sad mood.

These conditions changes the evaluation (rating) given by the user to the considered item – and consequently the user’s decision

Page 7: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Recommendation Evaluation

eval accept

reje

ct

q  Predictions based on the "remembered" utility data

q  Accept/reject is based on expected utility

recommendation

Expe

rien

ced

utili

ty

Remembered utility

Expected Utility

Context

Page 8: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Ratings vs. Decisions

p  Rating: measures how much a user likes an item – general definition – without substance n  Q: How this is linked to the probability to

select an item? n  A: The larger the rating the higher the

probability? n  No: I like Ferrari cars (5 stars) but it is

unlikely that I will buy one! p  Only context can transform a rating into a

measure of the likelihood to choose an item n  How likely is that I will buy a Ferrari? 0.001

star 8 Specifies the context

Page 9: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Context and Ratings

p  Context changes the way you consider/use items p  Only a rating-in-context has a meaning an

measures something: e.g. whether you will buy or not an item

p  Without context an evaluation is not possible p  Ratings without context are actually assuming a

default context – the most likely context for deciding to select an item

p  Q1: When the user is in another context – one that will cause some differences?

p  Q2: How to detect the presence of a relevant context?

9

Page 10: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Factors influencing Holiday Decision

Decision

Personal Motivators

Personality Disposable Income

Health

Family commitments

Past experience

Works commitments

Hobbies and interests

Knowledge of potential holidays

Lifestyle Attitudes, opinions and perceptions

Internal to the tourist External to the tourist Availability of products Advice of travel

agents

Information obtained from tourism organization and media

Word-of-mouth recommendations

Political restrictions: visa, terrorism,

Health problems

Special promotion and offers

Climate

[Swarbrooke & Horner, 2006]

Page 11: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

11

Context Preferences

www.visitfinland.com

Page 12: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

12 Preferences

Ranking is computed by considering more recommendable those products/services that where selected in other travel plans with similar contextual conditions

Page 13: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

13

A Simplified Model of Recommendation

1.  Two types of entities: Users and Items 2.  A background knowledge:

l  A set of ratings: a map R: Users x Items à [0,1] U {?} – R is a partial function!

l  A set of “features” of the Users and/or Items 3.  A method for substituting all or part of the ‘?’

values - for some (user, item) pairs – with good rating predictions

4.  A method for selecting the items to recommend l  Recommend to u the item: l  i*=arg maxi∈Items {R(u,i)}

[Adomavicius et al., 2005]

Page 14: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

14

A Bidimensional Model

user

item

ratings User features

Product features

Where is context?

Page 15: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

15

Bi-dimensional vs. multidimensional

p  The previous model (R: Users x Items à [0,1] U {?}) is bi-dimensional

p  A more general model may include “contextual” dimensions, e.g.: n  R: Users x Time x Goal x Items à [0,1] U {?}

p  Assumption: the rating function or, more in general, the recommendation evaluation is more complex than an assignment of each pair (user, product) to a rating

p  There must be some "hidden variables" that contributes to determining the rating function

p  This multidimensional data model approach was developed for data warehousing and OLAP.

Page 16: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

16

Multidimensional Model

[Adomavicius et al., 2005]

Page 17: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

17

General Model

p  D1, D2, … Dn are dimensions p  The recommendation space is n-dimensional:

D1 x D2 x … x Dn p  Each dimension is a subset of the Cartesian

product of some attributes Di ⊆ Ai(1) x … x Ai(ki) – profile of the dimension Di

p  i:[1, ki] à N (injective), and A1, …, AN is the set of all the attributes

p  General Rating function n  R: D1 x D2 x … x Dn à [0,1] U {?}

[Adomavicius et al., 2005]

Page 18: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

18

Example p  User x Item x Time à [0,1] U {?} – 3 dimensions p  User ⊆ UName x Address x Income x Age - 4

attributes p  Item ⊆ IName x Type x Price – 3 attributes p  Time ⊆ Year x Month x Day – 3 attributes p  Example:

n  User John Red (living in Bolzano, with Income 1000 and aged 34)

n  rated 0.6 n  a vacation at Miramonti Hotel (for 100E per

night), n  for August 4-11, 2010.

Page 19: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

19

Recommendation Problem

p  Assume that the rating function is complete (defined for each entry in D1 x D2 x … x Dn)

p  Recommendation problem: n  “what” to recommend is a subset of the

dimensions: Di1, …, Dik (k<n) n  “for whom” is another subset of the

dimensions: Dj1, …, Djl (l<n) n  The dimension in “what” and “for whom” have a

void intersection, and

for whom

what

This is given

Page 20: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

20

Example

p  Movie: defined by attributes Movie(MovieID, Name, Studio, Director, Year, Genre, MainActors)

p  Person: defined by attributes Person(UserID, Name, Address, Age, Occupation, etc.)

p  Place: a single attribute defining the listing of movie theaters and also the choices of the home TV, VCR, and DVD

p  Time: the time when the movie can be or has been seen: Time(TimeOfDay, DayOfWeek, Month, Year)

p  Companion: a person or a group with whom one can see the movie: a single attribute having values “alone,” “friends,” “girlfriend/boyfriend,” “family,” “co-workers,” and “others.”

Page 21: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

21

Example (cont)

R(movie, person, place, time, companion)

p  Recommend the best movies to users p  Recommend top 5 action movies to users older than

18 p  Recommend top 5 movies to user to see on the

weekend, but only if the personal ratings of the movies are higher than 0.7

p  Recommend to Tom and his girlfriend top 3 movies and the best time to see them over the weekend

p  Recommend movie genre to different professions using only the movies with personal ratings bigger than 6.

context

Page 22: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

22

Paradigms for Incorporating Context in Recommender Systems

Data U × I × C × R

2D Recommender U × I à R

Recommendations i1, i2, i3, …

Contextual Recommendations

i1, i2, i3, …

Contextual Post-Filtering

c

Data U × I × C × R

Contextualized Data U × I × R

2D Recommender U × I à R

Contextual Recommendations

i1, i2, i3, …

Contextual Pre-Filtering

c

Data U × I × C × R

MD Recommender U × I × C à R

Contextual Recommendations

i1, i2, i3, …

Contextual Modeling

c

[Adomavicius and Tuzhilin 2008]

Page 23: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

23

Reduction-Based (pre-filtering)

p  1) Reduce the problem of multimensional recommendation to the traditional two-dimensional User x Item

p  2) For each “value” of the contextual dimension(s) estimate the missing ratings with a traditional method

p  Example: n  R: U x I x T à [0,1] U {?} ; User, Item, Time

p RD(u, i, t) = RD[T=t](u, i) n  The context-dependent estimation for (u, i, t) is

computed using a traditional approach, in a two-dimensional setting, but using only the ratings that have T=t.

Page 24: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

24

Multidimensional Model

We use only the slice for T=t

Page 25: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

25

Problems with the reduction

p  The relation D[Time=t](User, Item, Rating) may not contain enough ratings for the two dimensional recommender algorithm to accurately predict R(u, i) for that specific value t of the Time variable

p  Approach: use a “larger” contextual segment St, such that t ∈ St

p  Instead of RD(u,i,t) = RD[T=t](u,i)

p  We have RD(u,i,t) = RD[t ∈ St](u,i) aggregated p  Example: instead of considering only the ratings of

a specific day, e.g., Monday, use the ratings of all the weekdays and aggregate them to produce a two-dimensional slice.

Page 26: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

26

Multidimensional Model We use the slices for T=t, and T=t’ and we merge the two slices with an

aggregation function, e.g., AVG

Page 27: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

27

Research Problem

p  Local vs. Global model: the local model exploits the local context "around" a (user, item) point to build the prediction, whereas the global model of CF would use all the (user, item) points ignoring the contextual information

p  Will a local model outperform a global model? p  Is the local variability worth exploiting? p  When there is a “dependency” between context

and rating? p  When the contextual dimensions will not reduce

the available data to a too tiny subset?

Page 28: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

28

Finding high-performance segments

The algorithm performs better if

trained on the segment

Page 29: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

29

Finding the “Large” segments

p  A segment is a "logical" aggregation of ratings based on some contextual dimensions: e.g., the ratings collected in the "week end", or the ratings in the "week end at home"

p  Not easy to find all large segments with enough data

p  Classical clustering/partitioning problem p  Rely on background information (such as those

provided by a marketing expert) to determine the initial segments

p  Use the “natural” hierarchies on the contextual dimensions to determine the segments.

Page 30: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

30

Combining the local and global predictions p  Basic idea of the combined approach here proposed

for context exploitation: 1.  Use the prediction of the best performing

segments to which a point belongs 2.  If there is no segments that contain the point

use the standard prediction, that is, computed without the segments

p  Hence the combined approach will always work better or equal than the standard approach (at the cost of the additional search on the set of segments)

p  BUT: how much better? Is it worth the extra effort?

Page 31: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

31

Combining the local and global predictions

The larger the accuracy value the better the

segment

Prediction based on

algorithm A and data Sj

Page 32: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

32

Experimental Evaluation

p  Acquired movie ratings and contextual information related to n  Time: weekday, weekend, don’t remember n  Place: movie theater, at home, don’t remember n  Companion: alone, with friends, with partner,

with family, others p  Movies rated in a scale from 1 to 13 p  Participants were students p  1755 ratings by 117 students over a period of 12

months p  Dropped students that had rated less than 10 movies p  Finally 62 students, 202 movies and 1457

ratings (the set D) – not very big!

Page 33: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

33

Algorithms

p  µA,S(S) is computed using only the ratings in the segment (contextual dependent)

p  µA,T(S) is computed using all the data (in the train or in the test set depending when it is needed)

p  To compute both µA,S(S) and µA,T(S) they use: user to user collaborative filtering

Page 34: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

34

Searching large segments

p  These are obtained by performing an exhaustive search among the space of all possible segments (for the different dimensions try all different attribute values combinations)

p  Each one of these segments has more than 262 user-specified ratings (more than 20% of the original dataset DM)

Page 35: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

35

Comparison on each segment

p=0.025 z= -1.96

Page 36: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

36

Summary of the differences

p  Substantial improvement of F-measure on some segments

p  Since Theater-Friends has lower F-measure than Theater then this is discarded (see the original algorithm)

p  The final segments obtained are: Theater-Weekend, Theater and Weekend.

Page 37: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Building the model

p  The multidimensional model is appealing: general - supports various recommendation tasks

p  But it requires a lot of information

p  What is the best model - given our application

goals? 37

Low complexity High complexity

BUT?

Page 38: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Is this context?

p  “Shindler’s List” has been rated 5 stars by john and tagged as “sad” – is this context? n  This “sad” tag is not expressing context – is

content description n  We should not recommend this movie when the

user is sad p  “Shindler’s List” has been rated 4 stars by john when

he was “sad” – lower rating than the default n  This is an evaluation in context and may be

useful to predict what people likes when they are “sad”

p  Today john is happy can we recommend to him “Shindler’s List” ? n  Probably yes, since it is an excellent movie and

john is not sad – a bad context for that movie. 38

Page 39: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Best Context Recommendation

p  We investigated the possibility to predict the best context for an item – music [Baltrunas et al., 2010]

p  Computed that without having full knowledge of the rating function

p  Using some best context evaluations - predict the missing best context evaluations by observing the best context assignments of similar users

p  Similar users are those assigning the best context in a similar way.

39

Page 40: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Acquiring Best Context

40

Rate it Select the mood for it: Valence=(happy vs. sad) Arousal=(Calm vs. Energetic)

Select the most suitable time: morning, afternoon, evening

Select the most suitable activity: work, party, relax, sport

Select the most suitable weather: blue sky, cloudy, rainy

Page 41: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

user1 user2 user3 user4

item1 item2 item3 rating

c1 c2

5 4 2

5 3 4

5 3 ?

? 3 1 item1 item2 item3

c1 c2

0 1 1

0 1 0

1 0 ?

0 1 1

Data Model

user1 user2 user3 user4

Page 42: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Best Context Prediction Accuracy

42

Page 43: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Is context Relevant?

p  “Shindler’s List” has been rated 5 stars by john on January 27th (Remembrance day) n  In this case January 27th is expressing relevant

context p  “Shindler’s List” has been rated 5 stars by john

on March 27th n  In this case March 27th is expressing

(probably) irrelevant context p  Context relevance may be item dependent p  … and also user dependent p  What are the relevant contextual

dimensions for each item? 43

Page 44: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

An Alternative to Global Segments

p  There are cases where the context may matter only for certain items

p  In item splitting [Baltrunas & Ricci, 2009] the ratings for certain items are split to produce two in-context items: only if the ratings for these two new items are significantly different

44

Page 45: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

How to detect context relevancy

p  It is unrealistic to believe that one can detect the relevance of context by mining the data n  Think about the detection of the importance of “January 27th” for “Shindler’s List” – you will never discover that

p  It is impossible to avoid the usage of explicit knowledge – before using data mining techniques

45

Data mining can refine reasonably defined hypothesis

Page 46: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Determine Context Relevance

46

Page 47: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

User study Results

47

Normalized Mutual Information between a contextual factor and the “influence” variable (+1, 0, -1 influence)

Page 48: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Acquiring Ratings in Context

48

Page 49: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Predictive Model

p  Context Aware Collaborative Filtering

r̂uic1...ck = vuq�i + ı̄ + bu +k�

j=1

bicj

Building Real-Time Context-Aware Recommendations for Mobile Users 7

4.1 The Predictive Model

The above listed features have shaped our algorithmic solu-tion. As we need to compute recommendations for rapidlychanging contextual conditions, we selected a model-basedrating prediction approach. The predictive model is there-fore trained off-line; once every hour or when a meaningfulnumber of new ratings are collected. The trained model isthen used to generate recommendations. The important fea-ture of this approach is that it can generate rating predictionsin a constant time2. Before describing how the other systemfeatures have been implemented we must first describe thedetails of the predictive model.

In [16] the authors present a Matrix Factorization ap-proach to CF that uses “baseline” parameters for each userand item. Baselines are additional model parameters that areintroduced for each user and item. They indicate the gen-eral deviation of the rating of a user or an item from theglobal average. So for instance, the user baseline, which islearned for a user that tends to rate higher than the average ofthe users’ population will be a positive number. Additionalparameters like these slightly increase the model complex-ity. However, they can also improve its accuracy, as we willshow later. The usage of baseline parameters can be usedalso for taking into account the impact of context. This hasbeen already shown by [17], where the authors have intro-duced several baseline parameters to model the time depen-dency of the ratings.

We have extended and adapted that approach, and wehave incorporated more contextual dimensions into the MFmodel. We propose to introduce one model parameter foreach contextual factor and item pair. This allows to learnhow the rating deviates from the classical personalized pre-diction as effect of the context. This deviation is the base-line for that factor and item combination. Broadly speaking,the system computes a rating prediction for a user-item pairand then adapts that to the current context using the learnedcontext-dependent baselines. Suppose that the user u ratesthe item i as rui. Now the user is asked to rate the sameitem i in a given contextual condition c, producing the ratingruic. The difference of the two ratings, rui − ruic, indicateshow much c influences the rating and this information canbe exploited in the model learning stage. Clearly, this is anoversimplified example, as there is typically a lot of noisein the data. Moreover, the model must simultaneously learnother parameters for correctly modeling the dependency ofthe rating on u, i and c.

In the collected context-aware rating data base, a ratingruic1...ck indicates the evaluation of the user u of the item imade in the context c1, . . . , ck, where cj ∈ {Cj}∪{?}. HereCj = {vj1, vj2, . . . , vjzj} is the set of values that the con-

2 In fact, as we will see later on, it is constant with respect to thenumber of input data and linear in the number of contextual conditions

textual factor j can take and “?” denotes the unknown value.The tuples (u, i, c1, . . . , ck) for which ruic1...ck is known arestored in the set R = {(u, i, c1, . . . , ck)|ruic1...ck is known}.Note, that in our collected data set, only one contextual con-dition is known and all others are unknown.

We recall that MF aims at factorizing the ratings matrixinto two m × d and n × d dimensional matrices V and Qrespectively. A user is then represented with a column vec-tor vu ∈ V and an item i with a column vector qi ∈ Q.One can balance the capacity and generalization capabilityof the predictive model by increasing or decreasing the di-mensionality d of V and Q. We propose to compute a per-sonalized context-dependent rating estimation using the fol-lowing model.

r̂uic1...ck = vuq�i + ı̄ + bu +k�

j=1

bicj (1)

where vu and qi are d dimensional real valued vectors rep-resenting the user u and the item i. ı̄ is the average of theitem i ratings in the data set R, bu is the baseline parameterfor user u and bicj is the baseline of the contextual conditioncj and item i. If a contextual factor is unknown, i.e., cj =?,then the corresponding baseline bicj is set to 0. In this way,one can learn the influence only of the known contextualconditions.

This model needs further explanations. Clearly, whendesigning any model one must take into account the amountof available training data and guess how complex the rela-tionships in the underlying data are. More complex mod-els could better fit the data, however, if one has not enoughtraining data, this can have a negative effect. Since we do nothave a large amount of bootstrapping data, in comparison toother data sets such as Netflix3 or Movielens4, we opted forthis simple linear model that is shown in Equation 1. In thatmodel the contextual information is exploited by using a setof model parameters, bicj . In the learning phase, describedlater on, the influence of the contextual factor on the ratingsis fully described by these parameters.

Note, that this model assumes the independence of thecontextual factors. This could appear as a limitation, as onecan easily find examples that do not satisfy this assump-tion. However, this assumption was implicitly made whenwe collected the training data as we asked the users to pro-vide their ratings assuming a single contextual condition pertime. Hence the model bias fits the data acquisition bias.Nevertheless, the model can capture the influence of mul-tiple contextual factors in the prediction stage but can stillbe learned with our particular training data. This is done bysumming up over all the baselines of the known contextualfactors. In addition, this model is simple and introduces less

3 www.netflixprize.com4 www.movielens.org

Page 50: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Training the model

p  Added regularization to avoid over fitting

p  We use the stochastic gradient descent method for fast training n  Linear time complexity in

amount of data and in number of contextual conditions

50

Page 51: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Mobile Application

51

Page 52: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

That’s all?

p  Is the problem reduced to that of acquiring enough rating in contextually relevant situations?

p  Are the recommendations speaking for themselves, and the user will definitely accept the recommendations if they are correct?

52

Page 53: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

53

Contextual Computing

p  Contextual computing refers to the enhancement of a user’s interactions by understanding the user, the context, and the applications and information being used, typically across a wide set of user goals

p  Actively adapting the computational environment - for each and every user - at each point of computation

p  Contextual computing approach focuses on understanding the information consumption patterns of each user

p  Contextual computing focuses on the process not only on the output of the search process.

[Pitkow et al., 2002]

Page 54: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

54

Context-dependent travel planning

p  There is no single best strategy for bundling – a strategy must be influenced by:

1.   The travel plan – the goal of the process: it could be many “different” objects: package, flight&drive, itinerary, just an event

2.   Travelers – the user: they have different motivations, goals, preferences, style of traveling, …

3.   Information search and package bundling preferences: user may need to consults parents, read reviews, compare offers, think about, …

Page 55: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Conversational and Adaptive Systems

p  In conversational systems the user and the system can both query their conversation partner, get replies, ask clarifications, stop the dialogue etc.

p  But the dialogue is hard-coded into a dialogue model (as in all conversational systems)

p  Questions n  Is this dialogue optimal? n  Can we improve this dialogue for all the

possible states of the interaction? n  How can a system automatically learn to

improve the dialogue? 55

Page 56: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Example (cont)

When these should be asked?

Page 57: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,
Page 58: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

System Decision Points

p  Systems Decision Points: in some states of the interaction, multiple system actions could be available - equally like to produce a good outcome of the interaction?

1.  The Agent executes one action 2.  The user replies - click on a button or hyperlink (make a

request) 3.  The System records this transition and builds (in the long

run) a probabilistic model of the user behavior.

View State

User Request B

System Action B1

System Decision Point

View State

System Action B2

View State

User Request A View State System Action A

58 [Mahmood & Ricci, 2009]

Page 59: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

State Variables (Context) State Variable Description

User Request/Response label ranging on all possible user requests/responses

Current Result Size the number of products retrieved by a query

Travel Characteristics Specified?

whether the user, up to the current stage, has specified her travel characteristics (or not),

Cart Status whether the user, up to the current stage, has added some product to her cart (or not),

Result Pages Viewed the number of result pages viewed by the user up to some stage

User Goal the goal of the user during her session. In our application this is always “travel planning”

User Experience the user experience on tourism in Austria

User Response: Tightening the response of the user to the query tightening suggestions

User Response: Relax the response of the user to the query relaxation suggestions

User Response: Auto Relax the response of the user to the query auto-relax offer

Position of the most recent product added to the travel plan

“Position” refers to the product’s location in the ranked list of displayed products on a given result page

Score of the most recent product which the user has added to her travel plan

The product “Score” is a value that lies between 1 and 100 and it is the recommender system’s estimation of the goodness of the recommendation

Page 60: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Rewards and Transition Prob.

p  State Model: Combination of the user’s request and other variables describing the state of the interaction

p  User’s request: most important variable n  rewards are determined (also) by the next user

request n  used in order to learn the transition model and the

optimal policy.

Request A

Compute s

Web Page

Observe s

Select a

Execute a

HyperLink 1

HyperLink 2

HyperLink 3

Request B

Compute s1

T(s,a,s1) R(s,a,s1)

Request C

Compute s2

T(s,a,s2) R(s,a,s2)

Request D

T(s,a,s3) R(s,a,s3)

Compute s3

Page 61: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Markov Decision Process Model

p  State Model: described by a set of state variables describing: n  the state of the Interaction (e.g. the current and last-

visited page, the number of pages viewed, etc.); n  the state of the Agent (e.g. the number of times it has

pushed a suggestion, the type of the product suggested in the most recent suggestion, etc.)

n  the state of the User (preferences, goals, emotions, context, etc.)

p  A set of actions A available to the recommender (e.g. show recommendations, ask preferences, etc.)

p  A transition model T(s, a, s') that gives the probability of making a transition from state s to state s' when the Agent makes the action a

p  A reward function R(s, a) that assign a real number, to the Agent, for each possible action a ∈ A taken in each state s ∈ S of the interaction n  positive reward when the user check out, or browse info n  negative reward when the user enters data or navigate

Page 62: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Policy for the Recommendation Agent

p  GOAL: compute the optimal policy, i.e., a function from states to actions that, if followed, will maximize the total expected discounted reward for each initial state s:

p  γ < 1 : reward got later in the process is discounted p  Rt is the reward at time t p  If the system adopts a policy π, then the value of a

state is given by:

AS→:π

[Sutton and Barto, 1998] 62

Page 63: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Evaluation Strategy

p  First evaluation phase n  Acquire state transition probabilities by: n  Supporting trip planning sessions with (330)

users using a policy that we thought was good p  Learn the optimal policy: off-line, using the

transition probabilities and reinforcement learning techniques (policy iteration)

p  Second evaluation phase (2 months after) n  Run similar on line experiments with users (214

out of the 330) but using the optimal policy p  Compare the recommendation sessions in the two

phases n  Differences in the system actions n  Differences in performance variables.

In collaboration with Vienna Univ. Economics, prof. J. Mazanec 63

Page 64: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Differences

p  It is optimal to request the user for travel characteristics at the beginning of the query search session only 34% of the cases – skip this request in the other cases

p  Only for 7% of the cases, the system requests the user for travel characteristics during the query search session - users were largely unwilling to specify these characteristics during their query search sessions

p  Compared to the default policy, the optimal one supports more effective interaction sessions, i.e., larger task completion rate: task completion rate increased (51% vs. 55%). 64

Page 65: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Performance Variables and Hyp. 1

Performance Variable Default Optimal p-value

Number of elapsed interaction stages 10.5 8.1 0.0005

Interaction Session Time (minutes) 29.03 15.8 0.0242

Number of destination queries executed 1.8 1.5 0.014

Number of requests for destination search 1.8 1.3 0.00001

Number of result pages viewed by the user 3.3 2.7 0.095

Number of products added to the cart 2.8 2.4 0.079

Hypothesis 1: The optimal policy supports more efficient product search sessions (i.e., less interaction and less time) than the default policy defined by the system designer We have validated this hypothesis because with the optimal policy the users could add products to their carts with lesser effort

Page 66: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

66

Major obstacle for contextual computing

p  Understand the impact of contextual dimensions on the personalization process

p  Selecting the right information, i.e., relevant in a particular personalization task

p  Obtain sufficient and reliable data describing the user preferences in context

p  Embed the contextual dimension in a more classical – simpler - recommendation computational model.

Page 67: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

Summary

p  There is no rating without context – context let us understand the circumstances

p  Context modeling requires a multidimensional rating function n  Sparcity of the available samples n  Simple data mining approaches cannot work

properly n  Several prediction tasks are possible n  There is space for multiple prediction methods

p  Context changes during the interaction with the recommender system – it should be taken into account to adapt the next stages.

67

Page 68: Part 16: Context Dependent RecommendationsRecommender Systems Data U × I × C × R 2D Recommender U × I % R Recommendations i 1, i 2, i 3, … Contextual Recommendations i 1, i 2,

References

p  G. Adomavicius, R. Sankaranarayanan, S. Sen, A. Tuzhilin. Incorporating contextual information in recommender systems using a multidimensional approach. ACM TOIS, 23(1):103–145, 2005.

p  G. Adomavicius, A. Tuzhilin. Context-Aware Recommender Systems. Recommender Systems Handbook: 243-279, Springer, 2010.

p  L. Baltrunas, F. Ricci. Context-based splitting of item ratings in collaborative filtering. RecSys 2009: 245-248, 2009.

p  L. Baltrunas, M. Kaminskas, F. Ricci, L. Rokach, B. Shapira, K.H. Luke. Best usage context prediction for music tracks. CARS 2010.

p  A.K. Dey. Understanding and using context. Personal and ubiquitous computing, 5(1):4–7, 2001.

p  B. Fling. Mobile Design and Development. O’Reilly Media, 2009. p  T. Mahmood, F. Ricci. Improving recommender systems with adaptive

conversational strategies. Hypertext09: 73-82, 2009. p  C. Ono, Y. Takishima, Y. Motomura, H. Asoh. Context-Aware Preference Model

Based on a Study of Difference between Real and Supposed Situation Data. UMAP09: 102–113, 2009.

p  J. E. Pitkow, H. Schütze, T. A. Cass, R. Cooley, D. Turnbull, A. Edmonds, E. Adar, T. M. Breuel: Personalized search. Commun. ACM 45(9): 50-55, 2002.

p  F. Ricci, B. Arslan, N. Mirzadeh, A. Venturini. ITR: A Case-Based Travel Advisory System. ECCBR 2002: 613-627, 2002.

68