Correlation-Based Context-aware Matrix Factorization - CiteSeerX

4 downloads 0 Views 2MB Size Report
tourism [3, 4], music [5], movies [6], and restaurants [7]. Take the movie domain for example, a user may choose a different movie if he or she is going to see the ...
Correlation-Based Context-aware Matrix Factorization Yong Zheng, Bamshad Mobasher, and Robin Burke Center for Web Intelligence, School of Computing, DePaul University 243 South Wabash Ave, Chicago, Illinois 60604 {yzheng8,rburke,mobasher}@cs.depaul.edu

Abstract. In contrast to traditional recommender systems, context-aware recommender systems (CARS) additionally take context into consideration and try to adapt their recommendations to users’ different contextual situations. Several contextual recommendation algorithms have been developed by incorporating context into recommenders in different ways. Most of those recommendation algorithms consider modeling contextual rating deviations but ignore the correlations among contexts. In this paper, we highlight the importance of contextual correlations, and build a correlation-based context-aware matrix factorization algorithm which demonstrates and further confirms the effectiveness of contextual correlations.

1

Introduction

Recommender systems (RS) are an effective way to alleviate information overload in many application areas by tailoring recommendations to users’ personal preferences. There are also some new type of RS emerged in recent years, such as context-aware recommender systems (CARS) [1] and context recommender [2]. CARS emerged to go beyond user preferences and also take into account the contextual situation of users in generating recommendations. CARS have proved effective in several domains, such as tourism [3, 4], music [5], movies [6], and restaurants [7]. Take the movie domain for example, a user may choose a different movie if he or she is going to see the movie with kids rather than with parents. The standard formulation of the recommendation problem begins with a two-dimensional (2D) matrix of ratings, organized by user and item: Users × Items → Ratings. The key insight of context-aware recommender systems is that users’ preferences for items may be a function of the context in which those items are encountered. Incorporating contexts requires that we estimate user preferences using a multidimensional rating function – R: Users × Items × Contexts → Ratings [1]. In the past decade, several context-aware recommendation algorithms have been developed, such as differential context modeling [4, 8, 9] which incorporates context as filters into collaborative filtering, context-aware matrix factorization (CAMF) [10] which makes use of contexts in matrix factorization, and tensor factorization (TF) [11] which directly considers context as individual dimension in a multidimensional rating space. Apparently, contexts can be integrated with recommendation algorithms in different ways, where the most effective method is to introduce a contextual rating deviation

SOCRS-2015, May 29, Chicago, IL, USA Copyright is held by the author or owner(s).

2

Yong Zheng, Bamshad Mobasher, and Robin Burke

term, such as the deviation term in CAMF. However, researchers may ignore the contextual correlations to present the contextual effects in recommendation algorithms. In this paper, we highlight the importance of contextual correlation, and propose a correlationbased context-aware matrix factorization algorithm which introduces a correlation term to the matrix factorization technique.

2

Related and Prior Work

In context-aware recommender system, context is usually defined as, “any information that can be used to characterize the situation of an entity [12]”,e.g., time and companion may be two influential contexts, since users’ preferences may change accordingly when those two situations are altered. Adomavicius, et al. [1] introduce a two-part classification of contextual information. Their taxonomy is based on two considerations: what a recommender system knows about a contextual factor and how the contextual factor changes over time. System knowledge can be subdivided into fully observable, partially observable and unobservable. The temporal aspect of a factor can be categorized as static or dynamic. This analysis yields six possible classes for contextual factors, which characterizes possible contextual situations in the applications of CARS. In this paper, we are concerned with static and fully observable factors – we assume that we have a set of known contextual variables at hand which remain stable over time, and try to model and adapt to users’ contextual preferences to recommend appropriate items to the end users. Several context-aware recommendation algorithms have been developed in the past decade. Typically, context can be applied in recommendation using three basic strategies: pre-filtering, post-filtering and contextual modeling [1] as depicted in Figure 1. Pre-filtering technique, such as context-aware splitting approaches (CASA) [13], simply apply contexts as filters beforehand to filter out irrelevant rating profiles. Postfiltering, on the other hand, applies the context as filters to the recommended items after the recommendation process. In contextual modeling, predictive models are learned using the full contextual data. Most of the recent work, such as context-aware matrix factorization (CAMF) [10], tensor factorization (TF) [11] and contextual sparse linear method (CSLIM) [14, 15], were built upon the contextual modeling approach. The most effective context-aware recommendation algorithms, such as CAMF and CSLIM, usually incorporate a contextual rating deviation term into recommendation algorithms, where this deviation term is used to estimate users’ rating deviations associated with specific contexts. Alternatively, the contextual correlation which estimates the rating correlations between contexts is another way to incorporate contextual information into recommendation algorithm, where it has been introduced to sparse linear method in our early work [16], but it was not explored in the matrix factorization technique. In this paper, we continue to work on this piece and introduce our contributions as follows.

Correlation-Based Context-aware Matrix Factorization

3

Fig. 1: Three Strategies for Context-Aware Recommendation [1]

3

Preliminary: Matrix Factorization and Context-aware Matrix Factorization

In this section, we introduce the matrix factorization technique used in recommender systems, as well as the existing research on CAMF which utilizes the contextual rating deviations.

3.1

Matrix Factorization

Matrix factorization (MF) [17] is one of the most effective recommendation algorithm in the traditional recommender systems. Simply, both users and items are represented → − by vectors. For example, − p→ u is used to denote user vector, and qi as an item vector. The values in those vectors indicate the weights on K (e.g., K = 5) latent factors. As a result, the rating prediction can be described by Equation 1. − → → − rˆui = p u · qi

(1)

More specifically, the weights in − p→ u are used to denote how much users like those → − latent factors, and the weights in qi represent how this specific item obtains those latent factors. Therefore, the dot product of those two vectors is used to indicate how much the user likes this item. − → → − rˆui = µ + bu + bi + p u · qi

(2)

Besides, user and item rating biases could also be added, as shown in Equation 2, where µ denotes the global average rating in the data set, bu and bi represent user and item bias respectively.

4

3.2

Yong Zheng, Bamshad Mobasher, and Robin Burke

Context-aware Matrix Factorization

Consider the movie recommendation example in Table 1. There is one user U 1, one item T 1, and three contextual dimensions – Time (weekend or weekday), Location (at home or cinema) and Companion (alone, girlfriend, family). In the following discussion, we use contextual dimension to denote the contextual variable, e.g. “Location”. The term contextual condition refers to a specific value in a dimension, e.g. “home” and “cinema” are two conditions for “Location”. A context or contextual situation is, therefore, a set of contextual conditions, e.g. {weekend, home, family}.

User U1 U1 U1

Item Rating Time Location Companion T1 3 weekend home alone T1 5 weekend cinema girlfriend T1 ? weekday home family

Table 1: Movie Ratings in Contexts

More specifically, we use ck and cm to denote two different contextual situations. In other words, ck is composed by a set of contextual conditions. And we use ck,l to denote the lth contextual condition in the context ck . For example, assume ck = {weekend, home, alone}, ck,2 equals to “home”. In the following discussions, we continue to use those terms and symbols to describe corresponding contextual dimensions and conditions in the algorithms or equations. Most context-aware recommendation algorithms were built by incorporating contexts into traditional recommendation algorithms, especially the ones based on collaborative filtering. As one of the most popular recommendation algorithms, it makes sense to work on MF to build context-aware matrix factorization algorithms. The first CAMF algorithm was proposed and developed by Baltrunas et al. [10], where the rating prediction function can be shown in Equation 3. rˆuick,1 ck,2 ...ck,L = µ + bu +

L X

→ − Bijck,j + − p→ u · qi

(3)

j=1

Assume there are L contextual dimensions in total, ck = {ck,1 ck,2 ...ck,L } is used to describe the contextual situation, where ck,j denotes the contextual condition in the j th context dimension. Therefore, Bijck,j indicates the contextual rating deviation associated with item i and the contextual condition in the j th dimension. A comparison between Equation 2 and Equation 3 reveals that CAMF simply reL P place the item bias bi by a contextual rating deviation term Bijck,j , where it assumes j=1

that the contextual rating deviation is dependent with items. Therefore, this approach is named as CAMF CI. Accordingly, this deviation can also be viewed as being dependent with users, which replaces bu by the contextual rating deviation term and helps formulate the CAMF CU. In addition, CAMF C algorithm assumes that the contextual rating deviation is independent with users and items.

Correlation-Based Context-aware Matrix Factorization

5

Then, the parameters, such as the user and item vectors, user biases and rating deviations, can be learned by the stochastic gradient descent (SGD) method to minimize the rating prediction errors. In early work [10], CAMF was demonstrated to outperform other effective contextual recommendation algorithms, including the tensor factorization [11].

4

Correlation-Based Context-aware Matrix Factorization

Introducing the contextual rating deviation term is a popular and effective way to build context-aware recommendation algorithms. Our recent work [14, 15] has incorporated the contextual rating deviations into the sparse linear method (SLIM) and develop contextual SLIM (CSLIM) which was demonstrated to outperform the state-of-the-art contextual recommendation algorithms, including CAMF introduced above. As mentioned before, contextual correlation is an alternative way to build contextaware recommendation algorithms, other than modeling the contextual deviations. Our early work [16] has made the first attempt to introduce the contextual correlations into SLIM. In this paper, we further explore ways to build correlation-based CAMF. The underlying assumption behind the notion “contextual correlation” is that, more similar or correlated two contexts are, the two recommendation lists for a same user for those two contextual situations should be similar too. When it comes to the matrix factorization, the prediction function can be described as Equation 4. → − rˆuick = − p→ u · qi · Corr(ck , cE )

(4)

cE denotes the empty context situation – the value in each contextual dimension is empty or “NA”; that is, cE,1 = cE,2 = ... = cE,L = N/A. Therefore, the function Corr(ck , cE ) estimates the correlation between the cE and the contextual situation ck where at least one contextual condition is not empty or “NA”. Note that in Equation 3, the contextual rating deviation can be viewed as the deviation from the empty contextual situation to a non-empty contextual situation. λ → 2 1 _ → p u k + k− qi k2 + Corr2 ) M inimize (ruick − r uick )2 + (k− p,q,Corr 2 2

(5)

Accordingly, the user and item vectors, as well as the contextual correlations can be learned based on SGD by minimizing the rating prediction errors, where the loss function can be shown by Equation 5. The remaining challenge is how to represent or model the correlation function in Equation 4. As discussed in [16], we came up four strategies: Independent Context Similarity (ICS), Latent Context Similarity (LCS), Multidimensional Context Similarity (MCS) and Weighted Jaccard Context Similarity (WJCS). And those strategies can also be reused for the correlation-based CAMF. Due to that the WJCS only counts the contextual dimensions with the same values, and the correlation is measured by the ones between a context and the empty context, it is not applicable to the correlation function mentioned above1 . 1

It is not usual to have contextual conditions are “NA” in the rating profiles, unless they are missing values.

6

Yong Zheng, Bamshad Mobasher, and Robin Burke

Therefore, we only introduce and compare the ICS, LCS and MCS as follows. Note that we introduce those notions in general in the following discussions – the context correlation or similarity is assumed to be measured between any two contextual situations ck and cm . However, in the correlation-based CAMF, the correlation is actually measured between ck and cE , where cE is the empty context. Note that in the following discussions, the notion context similarity is identical to context correlation. 4.1

Independent Context Similarity (ICS)

An example of a correlation matrix can be seen in Table 2. With Independent Context Similarity, we only measure the correlation between two contextual conditions when those they lie on the same contextual dimension, e.g., we never measure the correlation between “Time = Weekend” and “Location = Home”, since they are from two different dimensions. Each pair of contextual dimensions are assumed to be independent. In this case, the correlation between two contexts can be represented by the product of the correlations among different dimensions. For example, assume ck is {Time = Weekend, Location = Home}, and cm is {Time = Weekday, Location = Cinema}, the correlation between ck and cm can be represented by the correlation of