Modelling and Analysis of Temporal Preference Drifts Using A Component-Based Factorised Latent Approach
F. Zafari I. Moser T. Baarslag



 


1234-5678-9012-3456

	Swinburne University of Technology
	John St, Hawthorn
	Melbourne
	VIC
	3122
	Australia
fzafari@swin.edu.au


	Swinburne University of Technology
	John St, Hawthorn
	Melbourne
	VIC
	3122
	Australia
imoser@swin.edu.au


	Centrum Wiskunde & Informatica
	
	Amsterdam
	
	
	Netherlands
T.Baarslag@cwi.nl


In recommender systems, human preferences are identified by a number of individual components with complicated interactions and properties. Recently, the dynamicity of preferences has been the focus of several studies. The changes in user preferences can originate from substantial reasons, like personality shift, or transient and circumstantial ones, like seasonal changes in item popularities. Disregarding these temporal drifts in modelling user preferences can result in unhelpful recommendations. Moreover, different temporal patterns can be associated with various preference domains, and preference components and their combinations. These components comprise preferences over features, preferences over feature values, conditional dependencies between features, socially-influenced preferences, and bias. For example, in the movies domain, the user can change his rating behaviour (bias shift), her preference for genre over language (feature preference shift), or start favouring drama over comedy (feature value preference shift). In this paper, we first propose a novel latent factor model to capture the domain-dependent component-specific temporal patterns in preferences. The component-based approach followed in modelling the aspects of preferences and their temporal effects enables us to arbitrarily switch components on and off. We evaluate the proposed method on three popular recommendation datasets and show that it significantly outperforms the most accurate state-of-the-art static models. The experiments also demonstrate the greater robustness and stability of the proposed dynamic model in comparison with the most successful models to date. We also analyse the temporal behaviour of different preference components and their combinations and show that the dynamic behaviour of preference components is highly dependent on the preference dataset and domain. Therefore, the results also highlight the importance of modelling temporal effects but also underline the advantages of a component-based architecture that is better suited to capture domain-specific balances in the contributions of the aspects.




Modelling and Analysis of Temporal Preference Drifts Using A Component-Based Factorised Latent Approach
    T. Baarslag
    December 30, 2023
=======================================================================================================







§ INTRODUCTION



Recommender systems suggest items (movies, books, music, news, services, etc.) that appear most likely to interest a particular user. Matching users with the most desirable items helps enhance user satisfaction and loyalty. Therefore, many e-commerce leaders such as Amazon and Netflix have made recommender systems a salient part of their services <cit.>.
Currently, most recommendation techniques leverage user-provided feedback data to infer user preferences <cit.>.
Typically, recommender systems are based on collaborative filtering (CF) <cit.>, where the preferences of a user are predicted by collecting rating information from other similar users or items <cit.>.
Many recent studies have contributed extensions to the basic Probabilistic Matrix Factorisation (PMF) by incorporating additional information.
Despite their popularity and good accuracy, recommender systems based on latent factor models encounter some important problems in practical applications <cit.>. In these models, it is assumed that all values for item features are equally preferred by all users.

Another major problem with latent factor models based on matrix factorisation is that they do not usually take conditional preferences into consideration <cit.>.
Furthermore, in general, latent factor models do not consider the effect of social relationships on user preferences, which encompasses peer selection (homophily) and social influence <cit.>. 
In previous work, we addressed the problem of modelling the socially-influenced conditional feature value preferences, and proposed CondTrustFVSVD <cit.>.

Since data usually changes over time, the models should continuously update to reflect the present state of data <cit.>.
A major problem with the most of the recent recommender systems is that they mostly ignore the drifting nature of preferences <cit.>. Modelling the time drifting data is a central problem in data mining. Drifting preferences can be considered a particular type of concept drift, which has received much attention from researchers in recent years <cit.>. However, very few recommendation models have considered the drifting nature of preferences <cit.>. Changes in user preferences can originate from substantial reasons, or transient and circumstantial ones. For example, the items can undergo seasonal changes or some items may experience periodic changes, for instance, become popular in the specific holidays.

Apart from the short-term changes, user preferences are also subject to long term drifts. For example, a user may be a fan of romantic or action movies at a younger age, while his/her preference may shift more towards drama movies as gets older. Also, users may change their rating scale over time. For example, a user may be very strict and give 3 out of 5 for the best movie. However, might become less strict with age and be more willing to elect the full rate when fully satisfied. A similar situation may apply for movies. A movie may receive a generally high/low rate at some time period, and lower/higher rates at some other period <cit.>. Therefore, a preference model should be able to distinguish between different types of preference drifting, and model them individually in order to achieve the highest accuracy.

In recommender systems research, six major aspects to the preferences have been identified. These aspects include feature preferences (<cit.>), feature value preferences (<cit.>), socially-influenced preferences (<cit.>), temporal dynamics (<cit.>), conditional preferences (<cit.>), and user and item biases (<cit.>). Feature value preferences refer to the relative favourability of each one of the item feature values, social influence describes the influence of social relationships on the preferences of a user, temporal dynamics means the drift of the preferences over time, conditional preferences refer to the dependencies between item features and their values, and user and item biases pertain to the systematic tendencies for some users to give higher ratings than others, and for some items to receive higher ratings than others (<cit.>). Modelling the temporal properties of these preference aspects is the central theme of this paper.

In this paper, we extend our previous work <cit.>, by considering the drifting nature of preferences and their constituting aspects. We assume that the socially-influenced preferences over features and conditional preferences over feature values, as well as user and item rating scales can be subject to temporal drift.
Therefore, the two major research questions addressed in this paper are:


	
  * How can we efficiently model the drifting behaviour 
	preferences, and how much improvement would incorporating such information make?
	
  * Which aspects are more subject temporal changes, and how is this related to the domain on which the model is trained?


The current work proposes a novel latent factor model based on matrix factorisation to address these two questions.
This paper has two major contributions for the field. 
In this paper, we make further improvements on the accuracy of, CondTrustFVSVD, a model that we proposed earlier. CondTrustFVSVD proved to be the the most accurate model among a large set of state of the art models. The additional improvements were achieved by incorporating the temporal dynamics of preference aspects. We also draw conclusions about the dynamicity of preference aspects, by analysing the temporal aspects of the these aspects using a component-based approach, and show which aspects are more subject to drift over time. This research provides useful insights into the accurate modelling of preferences and their temporal properties, and helps pave the way for boosting the performance of recommender systems. The findings suggest that the temporal aspects of user preferences can vary from one domain to another. Therefore, modelling domain-dependent temporal effects of preference aspects are critical in improving the quality of recommendations.

The rest of the paper is organised as follows: The related work is introduced in section <ref>. In section <ref>, we first briefly introduce probabilistic matrix factorisation, and CondTrustFVSVD. Then in section <ref> we introduce Aspect-MF to overcome the challenge of learning drifting conditional socially-influenced preferences over feature values. In section <ref>, we first explain the experimental setup, and then report on the results of Aspect-MF using two popular recommendation datasets. Finally we conclude the paper in section <ref>, by summarising the main findings and giving the future directions of this work.



§ RELATED WORK


Collaborative Filtering models are broadly classified into memory-based and model-based approaches. Memory- or instance-based learning methods predict the user preferences based on the preferences of other users or the similarity of the items. Item-based approaches in memory-based CF <cit.> calculate the similarity between the items, and recommend the items similar to the items that the user has liked in the past. User-based approaches recommend items that have been liked by similar users <cit.>.

The time-dependent collaborative filtering models are also classified into the memory-based time-aware recommenders and model-based time-aware recommenders <cit.>.



 §.§ Model-based time-aware recommenders

The models in this category usually fall into four classes: 1) models based on Probabilistic Matrix Factorisation, 2) models based on Bayesian Probabilistic Matrix Factorisation, and 3) models based on Bayesian Probabilistic Tensor Factorisation, and 4) models based on Bayesian Probabilistic Tensor Factorisation.



  §.§.§ Models based on probabilistic matrix factorisation

Modelling the drifting preferences using a model-based approach based on PMF has first been considered by Koren <cit.> in TimeSVD++. TimeSVD++ builds on the previous model called SVD++ <cit.>, in which the user preferences are modelled through a latent factor model that incorporates the user bias, item bias, and also the implicit feedback given by the users. 
For each one of these preference aspects, Koren <cit.> used a time-dependent factor to capture both transient and long-term shifts. They showed TrustSVD++ achieves significant improvements over SVD++ on a daily granularity <cit.>.

In TrustFVSVD <cit.>, we extended TrustSVD by adding the preferences over feature values and the conditional dependencies between the features. We did this by adding additional matrices that captured the feature value discrepancies, where the values of these matrices were related to the values of the social influence matrix. In TrustFVSVD, the explicit influence of the social relationships on each one of the aspects of preferences were captured. Through comprehensive experiments on three benchmark datasets, we showed that TrustFVSVD significantly outperformed TrustSVD and a large set of state of the art models. However, similar to most of the state of the art models, in TrustFVSVD, we assumed that the preferences are static.

Another model-based time-aware recommendation model was proposed by Koenigstein, Dror and Koren <cit.>. In this model, the authors use session factors to model specific user behaviour in music learning sessions.
Unlike TimeSVD++ which is domain-independent, was developed especially for the music domain. First, it enhances the bias values in SVD++, by letting the item biases share components for items linked by the taxonomy. For example, the tracks in a good album may all be rated higher than the average, or a popular artist may receive higher ratings than the the average for items. Therefore, shared bias parameters are added to different items with a common ancestor in the taxonomy hierarchy of the items. Similarly, the users may also tend to rate artists or genres higher than songs. Therefore, the user bias is also enhanced by adding the type of the items. It is also assumed that unlike in the movies domain, in music it is common for the users to listen to many songs, and rate them consecutively. Such ratings might be rated similarly due to many psychological phenomena.
The advantage of the models proposed by Koenigstein, Dror and Koren <cit.> and Koren <cit.> that extend SVD++ is that they enable the capturing of dynamicity of the preference aspects with a high granularity for aspects that are assumed to be more subject to temporal drift. Furthermore, as shown in <cit.>, domain-dependent temporal aspects of the preferences and their individual aspects can also be taken into consideration.

Jahrer, Toscher and Legenstein <cit.> split the rating matrix into several matrices, called bins, based on their time stamps. For each bin, a separate time-unaware model is trained by producing an estimated rating value that is obtained using the ratings of given for that bin. Each one of the bins are assigned a weight value, and the final rating is obtained by combining the ratings that are obtained through the models trained on each bin. Therefore, using this approach, they combine multiple time-unaware models into a single time-aware model. The disadvantage of this model is that the ratings matrix is usually sparse as it is, and it even becomes sparser, when the ratings are split into bins.

A similar approach is followed in the model proposed by Liu and Aberer <cit.>. They systematically integrated contextual information and social network information into a matrix factorization model to improve the recommendations. To overcome the sparsity problem of training separate models based on their time-stamps, they applied a random decision trees algorithm, and create a hierarchy of the time-stamps. For example, the ratings can be split based on year in the first level, month in the second level, day in the third level, and so on. They argue that the ratings that are given at similar time intervals are better correlated with each other, and therefore such clustering is justified. They also added the influence of the social friends to the model, using a context-aware similarity function. In this function users who give similar ratings to those of their friends in similar contexts get higher similarity values. Consequently, in this model, the role of time on the social influence is also indirectly taken into consideration.

Baltrunas, Ludwig and Ricci <cit.> argued that methods based on tensor factorisation can improve the accuracy when the datasets are large. Tensor factorisation requires the addition of a large number of model parameters that must be learned. 
When the datasets are small, simpler models with fewer parameters can perform equally well or better. In their  method, a matrix is added to capture the influence of contextual factors (e.g. time) on the user preferences by modelling the interaction of contextual conditions with the items. 
Although the model is quite simple and fast, it does not include the effect of time on individual preference aspect. Unlike the models proposed by Koenigstein, Dror and Koren <cit.> and Koren <cit.>, it can not capture fine-grained and domain-specific dynamicities.



  §.§.§ Models based on Bayesian probabilistic matrix factorisation

BPMF extends the basic matrix factorisation <cit.> by assuming Gaussian-Wishart priors on the user and item regularisation parameters and letting the hyper-parameters be trained along with the model parameters. Dynamic BPMF (dBPMF) is a non-parametric Bayesian dynamic relational data modelling approach based on the Bayesian probabilistic matrix <cit.>. This model imposes a dynamic hierarchical Dirichlet process (dHDP) prior over the space of probabilistic matrix factorisation models to capture the time-evolving statistical properties of modelled sequential relational datasets. The dHDP was developed to model the time-evolving statistical properties of sequential datasets, by linking the statistical properties of data collected at consecutive time points via a random parameter that controls their probabilistic similarity.



  §.§.§ Models based on probabilistic tensor factorisation

In tensor factorisation methods, the context variables are modelled in the same way as the users and items are modelled in matrix factorisation techniques, by considering the interaction between users-items-context. In tensor factorisation methods, the three dimensional user-item-context ratings are factorised into three matrices, a user-specific matrix, an item-specific matrix, and a context-specific matrix.
A model in this category is proposed by Karatzoglou et al. <cit.>, who used Tensor Factorisation with CP-decomposition, and proposed multi-verse recommendation, which combines the data pertaining to different contexts into a unified model. Therefore, similar to the model proposed by Baltrunas, Ludwig and Ricci <cit.>, other contextual information besides time (e.g. user mode, companionship) can also be taken into consideration. However, unlike Baltrunas, Ludwig and Ricci <cit.>, they factorise the rating tensor into four matrices, a user-specific matrix, an item-specific matrix, a context-specific matrix, and a central tensor, which captures the interactions between each user, item, and context value. Then the original ratings tensor, which includes the ratings given by users to items in different contexts (e.g. different times) can be reconstructed by combining the four matrices back into the ratings tensor.
Other models in this category are the models proposed by Li et al. <cit.> and Pan et al. <cit.>.



  §.§.§ Models based on Bayesian probabilistic tensor factorisation

There is a class of dynamic models that are based on Bayesian Probabilistic Tensor Factorisation (BPTF) <cit.>. BPTF generalises BPMF by adding tensors to the matrix factorisation process. A tensor extends the two dimensions of the matrix factorisation model to three or more dimensions. Therefore, besides capturing the user-specific and item-specific latent matrices, this model also trains a time-specific latent matrix, which captures the latent feature values in different time periods. The models based on tensor factorisation are similar in introduction of the time-specific matrices into the factorisation process. However, they are different in the way they factorise the ratings matrix into the user, item, and time matrices, and also the way they train the factorised matrices. Similar to BPMF, BPTF uses Markov Chain Monte Carlo with Gibbs sampling to train the factorised matrices. 



 §.§ Memory-based time-aware recommenders

Some simple time-dependent collaborative filtering models have been proposed by Lee, Park and Park <cit.>. The models use item-based and user-based collaborative filtering, and exploit a pseudo-rating matrix, instead of the real rating matrix. In the pseudo-rating matrix the entries are obtained using a rating function, which is defined as the rating value when an item with launch time l_j was purchased at time p_i. This function was inspired by two observations, that more recent purchases better reflected a user's current preferences, and also recently launched items appealed more to the users. If the users are more sensitive to the item's launch time, the function gives more weight to new items, and if the user's purchase time is more important in estimating their current preference, the function assigns more weight to recent purchases. After obtaining the pseudo-rating matrix, the neighbours are obtained as in the traditional item-based or user-based approaches, and the items are recommended to the users. These models are less related to the proposed model in this paper, so we are not going to review them further.



§ MODELLING TIME-AWARE PREFERENCE ASPECTS IN CONDTRUSTFVSVD



In this section, we explain how to integrate the time-awareness on different aspects of preferences into CondTrustFVSVD <cit.>.



 §.§ Brief introduction of PMF and CondTrustFVSVD



In rating-based recommender systems, the observed ratings are represented by the user-item ratings matrix R, in which the element R_uj is the rating given by the user u to the item j. Usually, R_uj is a 5-point integer, 1 point means very bad, and 5 points means excellent. Let P ∈ℝ^N × D and Q ∈ℝ^M × D be latent user and item feature matrices, with vectors P_u and Q_j representing user-specific and item-specific latent feature vectors respectively (N is the number of users, M is the number of items, and D is the number of item features). In PMF, R_uj is estimated by the inner product of the latent user feature vector P_u and latent item feature vector Q_j, that is R̂_uj = P_uQ_j^T.

PMF maximises the log-posterior over the user and item latent feature matrices with rating matrix and fixed parameters given by Eq. <ref>.


    ln p(   P,Q|R,σ,σ_P,σ_Q)   
    		= 
    		ln p(   R|P,Q,σ)   
    		+ 
    		ln p(   P|σ_P)  
    		+
    		ln p(   Q|σ_Q)  
    		+
    		C



where C is a constant that is not dependent on P and Q. σ_P, σ_Q, and σ are standard deviations of matrix entries in P, Q, and R respectively. Maximising the log-posterior probability in Eq. <ref> is equivalent to minimising the error function in Eq. <ref>.


    argmin_U,V
    		[  
    		E 
    		= 1/2∑_u=1^N∑_j=1^MI_uj (  R_uj - R̂_uj ) ^2
    		+
    		λ_P/2∑_u=1^NP_u_Frob^2
    		+
    		λ_Q/2∑_j=1^MQ_j_Frob^2
    		]



where ._Frob denotes the Frobenius norm, and λ_P = σ^2/σ_P^2 and λ_Q = σ^2/σ_Q^2  (regularisation parameters). Stochastic Gradient Descent and Alternating Least Squares are usually employed to solve the optimisation problem in Eq. <ref>. Using these methods, the accuracy of the method measured on the training set is improved iteratively.

As mentioned in the introduction section, the disadvantage of traditional matrix factorisation methods is that the discrepancies between users in preferring item feature values and conditional dependencies between features are disregarded.
CondTrustFVSVD <cit.> addresses these problems by adding matrices W and Z to learn the preferences over item feature values.
Suppose that a social network is represented by a graph 𝔾 = (𝕍,𝔼), where 𝕍 includes a set of 
users (nodes) and 𝔼 represents the trust relationships among the users (edges). We denote the adjacency matrix by T ∈ℝ^N × N, where T_uv shows the degree to which user u trusts user v. Throughout this paper, we use the indices u and v for the users and indices i and j for items, and indices f and f^' for item features.
In CondTrustFVSVD, all aspects of preferences are assumed to be subject to change by social interactions, and therefore the explicit influence of social relationships on each of the aspects of the preferences are modelled. 
In this method, we assume that the user preferences over an item feature can be formulated with a linear function. In this function, matrix W is used to capture the "gradient" values and matrix Z is used to learn the "intercept" values. 
These matrices have the same dimensions as the user matrix P.
According to this figure, the probabilities of the matrices P, Q, W, Z, ω, y and vectors bu and bi are dependent on the hyper-parameters σ_P, σ_Q, σ_W, σ_Z, σ_ω, σ_y, σ_bu and σ_bi respectively. Likewise, the probability of obtaining the ratings in matrix R is conditional upon the matrices P, Q, W, Z, ω, y and vectors bu and bi. CondTrustFVSVD finds the solution for the optimisation problem formulated by Eq. <ref>.


    argmin_P,Q,W,Z,ω,y,bu,bi
    		[  
    		E    
    		=
    		λ_t/2∑_u=1^N∑_∀ v ∈ T_uI_uv (  T_uv - ∑_f=1^DP_ufω_vf ) ^2 
    		+
    		λ_t/2∑_u=1^N∑_∀ v ∈ T_u(  T_uv - ∑_f=1^D(1 - W_uf)ω_vf ) ^2 
       
    		+
    		λ_t/2∑_u=1^N∑_∀ v ∈ T_u(  T_uv - ∑_f=1^DZ_ufω_vf ) ^2 
    		+
    		1/2∑_u=1^N∑_j=1^M (  R_uj - R̂_uj ) ^2 
       
    		+
    		∑_u=1^N(λ_P/2|I_u|^-1/2 + λ_T/2|T_u|^-1/2)P_u_Frob^2
    		+
    		λ_Q/2∑_j=1^MQ_j_Frob^2
       
    		+
    		∑_u=1^N(λ_W/2|I_u|^-1/2 + λ_T/2|T_u|^-1/2)W_u_Frob^2
    		+
    		∑_u=1^N(λ_Z/2|I_u|^-1/2 + λ_T/2|T_u|^-1/2)Z_u_Frob^2
       
    		+
    		λ/2∑_i=1^M|U_i|^-1/2y_i_Frob^2
    		+
    		λ_ω/2∑_v=1^N|T^+_v|^-1/2ω_v_Frob^2
       
    		+
    		λ_bu/2∑_u=1^N|I_u|^-1/2bu_u^2
    		+
    		λ_bi/2∑_j=1^M|U_j|^-1/2bi_j^2
    		+
    		λ_Y/2∑_f=1^D∑_f^'=1^DY_ff^'^2 
    		]



where λ_W = σ^2/σ_W^2, λ_Z = σ^2/σ_Z^2, λ_ω = σ^2/σ_ω^2, λ_y = σ^2/σ_y^2, λ_bu = σ^2/σ_bu^2, λ_bi = σ^2/σ_bi^2, λ_Y = σ^2/σ_Y^2. μ denotes the global average of the observed ratings, and bu_i and bi_j denote biases for user i and item j respectively. I_u is the set of items rated by user u and U_j is the set of users who have rated item j. The values of R̂_uj in Eq. <ref> are obtained using Eq. <ref>.


    R̂_uj = μ + bu_u + bi_j + ∑_f=1^D(P_uf + |I_u|^-1/2∑_∀ i ∈ I_uy_if + |T_u|^-1/2∑_∀ v ∈ T_uω_vf)(W_ufQ_jf + Z_uf)


According to the Eq. <ref>, the user u's preference value over an item j is defined using different aspects. These aspects are user bias, item bias, the socially-influenced preferences over features, and the socially-influenced preferences over feature values. Therefore, preferences are defined using different aspects that interact with each other by influencing the values of one another.



 §.§ Time-aware CondTrustFVSVD (Aspect-MF)


In the following sections, we first provide a high-level view of Aspect-MF by explaining the interactions between aspects that are captured by the model, and then elaborating how the aspects are trained from the users' ratings and social relationships.



  §.§.§ Aspect interactions and high-level view of the model


To address the problem of capturing drifting socially-influenced conditional preferences over feature values, we extend the method CondTrustFVSVD, by adding the dynamicity of each one of the preference aspects that are assumed to be subject to concept drift. 
The method proposed here is abbreviated to Aspect-MF. A high-level overview of the preference aspects in Aspect-MF are presented in Fig. <ref>.





In Fig. <ref>, FP represents preferences over features, which is captured by matrix P in the basic matrix factorisation. F represents item features captured by matrix Q in the basic matrix factorisation. CP represents conditional dependencies, FVP represents preferences over feature values, SI stands for social influence, and finally T is an abbreviation for time.
Aspect-MF incorporates additional matrices and vectors into matrix factorisation to capture as many aspects present in the data as possible. As Fig. <ref> shows, the model starts by loading the time-stamped user ratings as well as the social network data into the memory.
The main loop accounts for the learning iterations over the model. The first loop within the main loop iterates over the time-stamped user-item ratings matrix, while the second loop iterates over the social network adjacency matrix, to train the socially influenced parts of the model. In each loop, one entry of the input matrix is read and used to update the matrices/vectors related to that input data. As can be seen, the user and item bias values are only updated in loop 1, since they are only related to the user-item ratings. Both user-item ratings and users' social relationships include information about the users' preferences over features. Therefore, the new values for FP are calculated in both loops and updated in the main loop, when all new values have been calculated. Similarly, the values for SI and FVP depend on both user-item ratings and social relationships. Consequently, their new values are calculated inside both loops 1 and 2, and are updated in the main loop. In contrast, the values of F as well as CP only need the user-item ratings to be updated. Therefore, they are immediately updated inside loop 1. The time aspect includes parameters that account for the dynamics of user and item biases, feature value preferences, and preferences over features. Since bias values do not depend on the user-item ratings matrix, they are updated immediately in loop 1. However, the new values for the dynamics of feature value preferences, and preferences over features are updated in the main loop. In Aspect-MF, every one of the preference aspects can be arbitrarily switched off and on by setting their respective learning rates and regularisation parameters (hyper-parameters) to zero or a non-zero value respectively.

Although social relationships are likely to be time-dependent, most datasets do not contain this information. Conditional preferences are related to the feature value preferences, since they model the dependencies between the features and their values, and therefore, are applied to the matrices that account for the users' preferences over feature values. Social influence is applied to the aspects of preferences over features and preferences over feature values. However, applying social influence to the user and item biases showed no observable benefits and user or item biases do not seem to be influenced by social interactions. Therefore, we concluded that user and item biases are not much influenced by the social interactions <cit.>. Therefore, in the most abstract view of the model as depicted in the high-level representation in Fig. <ref>, the model is comprised of four main modules. Initialising the model parameters (Model Initialiser), learning the intrinsic constituting aspects of preferences (i.e. preferences over features, preferences over feature values, conditional dependencies, and user and item bias values) and the drifting properties of preferences (Intrinsic Trainer), learning the social influence of the friends over the drifting intrinsic preference aspects (Social Trainer), and finally updating the model to reflect the new information extracted from the data about user ratings, time, and social connections (Model Updater). These modules will be discussed in more details later, when we introduce the algorithm in section <ref>.



  §.§.§ Aspect-MF model formulation


In this section, we provide the mathematical formulation of the preferences captured in Aspect-MF.
Basically, in Aspect-MF, the user preferences are modelled as a Bayesian Network <cit.>.
Fig. <ref> shows the topology or the structure of the Bayesian Network for user preferences that are modelled by Aspect-MF. 

As mentioned earlier, Aspect-MF extends CondTrustFVSVD, by adding the time factor to the aspects of preferences as depicted in Fig <ref>. In CondTrustFVSVD, the user preferences were captured using the matrices P, Q, W, Z, Y, ω, y, with the hyper-parameters σ_P, σ_Q, σ_W, σ_Z, σ_ω, σ_y, σ_Y, σ_bu and σ_bi.



In Aspect-MF, the drifting social influence of friends in the user's social network are captured through Eq. <ref> to <ref>.


    T̂^t_uv =1/|I_u^t|∑_∀t_uj∈ I_u^t^D∑_f=1^DP_uf(t_uj)ω_vf



    Ŝ^t_uv = 1/|I_u^t|∑_∀t_uj∈ I_u^t^D∑_f=1^D(1 - W_uf(t_uj))ω_vf



    Ĝ^t_uv = 1/|I_u^t|∑_∀t_uj∈ I_u^t^D∑_f=1^DZ_uf(t_uj)ω_vf


where T̂^t_uv, Ŝ^t_uv, Ĝ^t_uv model the time-dependent influence of user v on the preferences of user u for the preferences over features (captured by P_uf(t)) and preferences over feature values (captured by W_uf(t) and Z_uf(t)), and similar to CondTrustFVSVD, ω captures the implicit influence of user u on other users and is obtained using the matrix factorisation process. As can be seen in Fig. <ref>, the user preferences over features and feature values in Aspect-MF are subject to social influence, and they also drift over time. In Eqs. <ref> to <ref>, I_u^t is the set of timestamps for all the ratings given by user u. Therefore, using these equations, the influence of the user v on the preferences of user u is calculated for all the time points, and then it is averaged. 
Intuitively, these equations are telling us that the trust of user u in user v can be estimated by calculating the average of the weighted averages of user v's influence on user u's preferences for different features, in different times. Intuitively, if user u strongly trusts user v, his preferences would be more strongly influenced by user v. Furthermore, depending on the trust strength of user u in user v and the influence he gets from user v and its direction (positive or negative), the user's preference can be positively or negatively affected. Therefore in Aspect-MF, the user preferences are subject to social influence, and the social influence depends on the strength of their trust in the friends. According to these equations, if there is no relationship between user u and user v, user u's preferences will not be directly affected by the social influence of user v.

In Aspect-MF, the drifting preference value of the user u over an item j at time t is obtained according to Eq. <ref>.


    R̂_uj(t_uj) = μ    + bu_u(t_uj) + bi_j(t_uj) 
       + ∑_f=1^D(P_uf(t_uj) + |I_u|^-1/2∑_∀ i ∈ I_uy_if + |T_u|^-1/2∑_∀ v ∈ T_uω_vf)(W_uf(t_uj)Q_jf + Z_uf(t_uj)) 
       +  ∑_f^'=1^D(∑_f=1^D(W_uf(t_uj)Q_jf + Z_uf(t_uj))Y_ff^')(W_uf(t_uj)Q_jf^' + Z_uf(t_uj))


According to Eq. <ref>, in Aspect-MF, different aspects of preferences as well as user and item biases are subject to temporal drift.
As can be seen in Eq. <ref> to <ref>, the user bias, item bias, preferences over features captured by the matrix P, and preferences over feature values captured by the matrices W and Z are subject to temporal drift. In order to model the drifting properties of these aspects, we use Eqs. <ref> to <ref>.


    bu_u(t_uj) = bu_u + α_u dev_u(t_uj) + but_ut_uj


    bi_j(t_uj) = (bi_j + bi_jBin(t_uj))(C_u + Ct_ut_uj)


    P_uf(t_uj) = P_uf + α_u^P dev_u(t_uj) + Pt_uft_uj



    Z_uf(t_uj) = Z_uf + α_u^Z dev_u(t_uj) + Zt_uft_uj



    W_uf(t_uj) = W_uf + α_u^W dev_u(t_uj) + Wt_uft_uj


where P_uf, W_uf, and Z_uf capture the static preferences of the user u, while the variables P_uft_uj, W_uft_uj, Z_uft_uj capture the day-specific variations in the user preferences (e.g. due to the mood of the users in a particular day), and α_u^P, α_u^W, and α_u^Z model the users' long term preference shifts, and dev_u(t_uj) is obtained according to Eq. <ref> <cit.>.


    dev_u(t_uj) = sign(t_u_uj - t_u).|t_uj - t_u|^β


where t_u is the mean of the dates for the ratings given by the user u, and β is a constant value. In Eq. <ref>, all the dates are placed in a fixed number of bins, and the function Bin(.) returns the bin number for a particular date. For example, if the maximum period of the ratings is 30 years and 30 bins are used, all the rates given in a particular year are placed in a bin, and the function Bin(.) returns the year number for that particular year. The reason why this function is only used for items is that items are not expected to change on a daily basis, and as opposed to users' biases, longer time periods are expected to pass, before we see any changes in the items' popularity.
In simple words, dev_u(t_uj) shows how much the time of the rating given by user u to the item j deviates from the average time of the ratings given by that user. Therefore, if a rating is given at the same time as the average time of the ratings, then the according to these equations, there will be no long-term preference shift for that aspect. However, for instance, if the average time of the rates given by user u is 11/04/2006, the rating of the same item by that user on 11/04/2016 would be different, and this shift is captured by the coefficients of the function dev_u(t_uj) in Eq. <ref> and Eqs. <ref> to <ref>. The drifting preferences captured using Eq. <ref> and Eqs. <ref> to <ref> are depicted in Fig. <ref>. In these figures, the mean of the dates on which the user has given the ratings are assumed to be 50 (the fiftieth day in a year), and the variations of the user preferences over a period of one year are captured for different values of α in Eq. <ref> and Eqs. <ref> to <ref>. The red lines in these figures represent the case in which the day-specific variations in the user preferences are not captured, while the blue lines also include the day-specific variations. Therefore, as can be seen, in these figures there are two types of preference shifts, long term drifts (captured by the values of α, α^P, α^W, and α^Z), and short-term or day-specific drifts (captured by the values of but, Pt, Wt, and Zt). Therefore, the preference drifts are comprised of small variations from one day to the other, mainly because of temporary factors such as the mood of the user, and the large variations which happen in the long term, as the user changes preferences because of the shift in the his/her tastes. The blue lines show the preference shift patterns that can be learnt by Aspect-MF. Furthermore, the first three terms in Eq. <ref> model the social influence of the feature preferences and feature value preferences captured by P, α^P, Pt, W, α^W, Wt, Z, α^Z, Zt. Therefore, assuming that two users have established the social relationship from the very beginning (which is not essentially true, but usually social relationships do not contain time-stamps), using the Eqs. <ref> to <ref>, the social influence is applied to the preferences of the user over the entire period for which the rating data is record. Therefore, the formulation of the estimated ratings in Aspect-MF (<ref>) allows it to learn the drifting conditional feature value preferences, and the formulation of the optimisation in Aspect-MF (Eq. <ref>) enables it to learn the influence of social friends on the drifting preferences of a user.



Eqs. <ref> to <ref> show how Aspect-MF can capture long-term and short-term drifts in each one of the preference aspects (user bias, item bias, feature preferences, and feature value preferences). The advantage of formulating the problem using Eq. <ref> is that each one these aspects can be arbitrarily switched on/off. This results in a component-based approach, in which the model aspects interact with each other, with the purpose of extracting as much preference patterns from the raw data as possible.



  §.§.§ Aspect-MF model training

According to the Bayesian network of Aspect-MF in Fig. <ref>, this model minimises the log-posterior probability of matrices that define the user preferences, given the model hyper-parameters and the training matrix. Formally,


    argmin_P,Pt,α^P,Q,W,Wt,α^W,Z,Zt,α^Z,Y,ω,y,bu,α,but,C,Ct,bi,bit
       {ln p(P,Q,W,Z,ω,y,bu,bi,α_u,bu_t,bi_Bin(t),c,c_t,α^P,α^Z,α^W,P_t,Z_t,W_t
       |R,T^t,S^t,G^t,σ_N}

σ_N={σ,σ_T,σ_P,σ_Pt,σ_α^P,σ_Q,σ_W,σ_Wt,σ_α^W,σ_Z,σ_Zt,σ_α^Z,σ_ω,σ_y,σ_bu,σ_α,σ_but,σ_C,σ_Ct,σ_bi,σ_bit,σ_Y}
 denotes the set of all the hyper-parameters. T^t, S^t, G^t respectively denote the real values for the estimated matrices T̂^t, Ŝ^t, and Ĝ^t in Eqs. <ref> to <ref>.
According to the Bayesian network in Figure <ref> and by decomposing the full joint distribution using chain rule of probability theory <cit.> according to the conditional dependencies between the variables defined in this figure, minimising the probability above is equal to minimising the value given in Eq. <ref> <cit.>.


    argmin_P,Pt,α^P,Q,W,Wt,α^W,Z,Zt,α^Z,Y,ω,y,bu,α,but,C,Ct,bi,bit,Y
    {    ln p(R|P(t),Q,W(t),Z(t),bu(t),bi(t),Y,σ) 
    		+
    		ln p(Q|σ_Q) 
       
    		+
    		ln p(P(t)|σ_P)
    		+
    		ln p(W(t)|σ_W)
    		+
    		ln p(Z(t)|σ_Z) 
       
    		+
    		ln p(bu(t)|σ_bu)
    		+
    		ln p(bi(t)|σ_bi) 
    		+
    		ln p(y|,σ_y) 
    		+
    		ln p(Y|,σ_) 
       
    		+
    		ln p(T^t_uv|ω, P(t),σ_T) 
    		+
    		ln p(S^t_uv|ω, W(t),σ_T)
    		+
    		ln p(G^t_uv|ω, Z(t),σ_T) 
       
    		+
    		ln p(P(t)|σ_T)
    		+
    		ln p(W(t)|σ_T)
    		+
    		ln p(Z(t)|σ_T)
    		+
    		ln p(ω|,σ_T)
    		}



Provided that all the probabilities above follow a normal distribution, it can be shown that minimising the function in Eq. <ref> is equivalent to minimising the error value using the function in Eq. <ref>.


    E_R    =
    		1/2∑_u=1^N∑_j=1^M (  R_uj - R̂_uj ) ^2
    		+
    		λ_Q/2∑_j=1^MQ_j_Frob^2 
    		+
    		λ_y/2∑_i=1^M|U_i|^-1/2y_i_Frob^2
       
    		+
    		∑_u=1^Nλ_P/2|I_u|^-1/2(P_u_Frob^2 + Pt_ut_Frob^2 + α^P_Frob^2) 
       
    		+
    		∑_u=1^Nλ_W/2|I_u|^-1/2(W_u_Frob^2 + Wt_ut_Frob^2 + α^W_Frob^2) 
       
    		+
    		∑_u=1^Nλ_Z/2|I_u|^-1/2(Z_u_Frob^2 + Zt_ut_Frob^2 + α^Z_Frob^2) 
       
    		+
    		∑_u=1^Nλ_Z/2|I_u|^-1/2(Z_u_Frob^2 + Zt_ut_Frob^2 + α^Z_Frob^2) 
       
    		+
    		λ_bu/2∑_u=1^N|I_u|^-1/2(bu_u^2 + α_u^2 + C_u^2 + bu_u_Frob^2 + Ct_u_Frob^2) 
       
    		+
    		λ_bi/2∑_j=1^M|U_j|^-1/2bi_j^2
    		+
    		λ_bi/2∑_j=1^M∑_∀ t ∈ I^t_j^|U_j|^-1/2bit_j,Bin(t)^2
    		+
    		λ_Y/2∑_f=1^D∑_f^'=1^DY_ff^'^2




    E_T    =
    		λ_tη_P/2∑_u=1^N∑_∀ v ∈ T_u (  T_uv - T̂_uv ) ^2 
    		+
    		λ_tη_W/2∑_u=1^N∑_∀ v ∈ T_u (  T_uv - Ŝ_uv ) ^2 
    		+
    		λ_tη_Z/2∑_u=1^N∑_∀ v ∈ T_u (  T_uv - Ĝ_uv ) ^2 
       
    		+
    		∑_u=1^Nλ_T/2|T_u|^-1/2(P_u_Frob^2 + Pt_ut_Frob^2 + α^P_Frob^2) 
       
    		+
    		∑_u=1^Nλ_T/2|T_u|^-1/2(W_u_Frob^2 + Wt_ut_Frob^2 + α^W_Frob^2) 
       
    		+
    		∑_u=1^Nλ_T/2|T_u|^-1/2(Z_u_Frob^2 + Zt_ut_Frob^2 + α^Z_Frob^2) 
       
    		+
    		λ_ω/2∑_v=1^N|T^+_v|^-1/2ω_v_Frob^2




    argmin_P,Pt,α^P,Q,W,Wt,α^W,Z,Zt,α^Z,Y,ω,y,bu,α,but,C,Ct,bi,bit
    		[  
    		E = E_R + E_T
    		]


where I_j^t is the set of timestamps, for all the ratings given to item j, and η_P, η_W, and η_Z are constants added to control the weights of the components related to the social aspect in this equation. The details of the model training can be found in Appendix <ref>.



  §.§.§ Aspect-MF algorithm


Algorithm <ref> describes the details of the gradient descent method Aspect-MF uses to train the model parameters (P, Pt, α^P, Q, W, Wt, α^W, Z, Zt, α^Z, Y, ω, y, bu, α, but, C, Ct, bi, bit) as expressed in Eq. <ref>.

The algorithm receives the set of model hyper-parameters λ and the set of learning rates γ as input, and trains the model parameters according to the Bayesian approach described in section <ref>. 
As we showed in the high-level representation of the algorithm in Figure <ref>, the model is comprised of four basic components. A model initialiser, which initialises the model parameters after the input data is loaded into memory, an intrinsic trainer, which trains the model parameters using the user-item ratings, a social trainer which trains the model parameters using the social relationship data, and finally, a model updater, which updates the model based on the trained parameters for a particular iteration.

As can be seen in line <ref> in Algorithm <ref>, the training starts with initialising the model parameters. The matrices P, Q, y, and ω and user and item bias vectors (bu and bi) are randomly initialised using a Gaussian distribution with a mean of zero and the standard deviation of one. The new matrices Pt, W, Wt, Z, Zt, Ct, but, bit, and Y and the vectors α, α^P, α^W, α^Z, C are initialised with constant values.
By using constant values to initialise the matrices and vectors, the algorithm starts the search process at the same starting point as CTFVSVD, and explores the modified search space to find more promising solutions, by considering the possible conditional dependencies between the features and the differences between users in preferring item feature values, as well as dynamic properties of the preferences, and the influence of social friends in the preferences of a user.

The main algorithm consists of a main loop, which implements the learning iterations of the model. Each iteration is comprised of one model intrinsic training operation (Algorithm <ref>), one model social training operation (Algorithm <ref>), and one model updating operation (Algorithm <ref>).
In the model intrinsic trainer, the model parameters are updated using the gradient values in Eqs. <ref> to <ref>, using a rating value that is read from the user-item ratings matrix. 
First in line <ref>, the estimated rating is calculated according to Eq. <ref>. 
Then the basic parameters of the model, P, Q, W, Z, Y, bu, and bi, and the temporal parameters but, bit, α, C, Ct, α^P, α^W, α^Z, Pt, Wt, and Zt are updated using the rating-related gradient values (∂ E_R/∂(.)) in the Eqs. <ref> to <ref>. Since this trainer only learns the intrinsic user preferences, only the error value in Eq. <ref> will be used to update the model parameters. After learning the intrinsic preferences, the function in Algorithm <ref> is invoked to train the social aspects of the preferences. Similar to IntrinsicTrainer, SocialTrainer is also comprised of a main loop, which iterates over the social relationship data in the social matrix. In each iteration, one entry from the social matrix is read, and the  socially-influenced parameters of the model are updated though the gradient values that are obtained using the error in Eq. <ref>. Finally, the ModelUpdater in Algorithm <ref> is invoked, and the calculated model updates are applied to the model parameters. This process is repeated for a fixed number of iterations, or until a specific condition is met. At the end of this process, the model parameters (P, Pt, α^P, Q, W, Wt, α^W, Z, Zt, α^Z, Y, ω, y, bu, α, but, C, Ct, bi, bit) are trained using the input data, and can be used to estimate the rating value given by a user u to an item j according to Eq. <ref>.

[blanker,float=bpt, grow to left by=1cm, grow to right by=1cm]
	
	
	


[blanker,float=bpt, grow to left by=1cm, grow to right by=1cm]
	


[blanker,float=bpt, grow to left by=1cm, grow to right by=1cm]
	
	




  §.§.§ Computational complexity analysis


The model training in Algorithm <ref> is comprised of one main loop that iterates for a fixed number of iterations (maxIter). Therefore, the computation time of the model trainer is expressed in Eq. <ref>.


    C(ModelTrainer)     = C(IntrinsicTrainer) + C(SocialTrainer) + C(ModelUpdater)



First, we examine the computational complexity of Intrinsic Training in Algorithm <ref>. On the highest level, this algorithm is comprised of two loops that iterate over the non-zero ratings in the rating matrix R. In the following, |R| and |T| denote the number of non-zero entries in the rating matrix R and adjacency matrix T respectively. In Intrinsic Trainer:


	
  * The number of repetitions to calculate the estimated ratings (R̂) in line <ref> is (D^2×|R|) + (D×∑_u=1^N|I_u|^2) + (D×∑_u=1^N|I_u|×|T_u|).
	
  * The number of repetitions to update parameters related to user and item biases in lines <ref>, <ref>, and <ref> is 7×|R|.
	
  * The number of repetitions needed to update the parameters P, Q, W, and Z in lines <ref>, <ref>, <ref>, and <ref> is 10× D×|R|.
	
	
  * The number of repetitions needed to update the parameters ω in line <ref> is D×∑_u=1^N(|I_u|×|T_u|).
	
  * The number of repetitions needed to update the parameters y in line <ref> is D×∑_u=1^N|I_u|^2.
	
  * The number of repetitions needed to update the dependency matrix Y in line <ref> is D^2×|R|.


Therefore, the overall number of repetitions for the Intrinsic Trainer is obtained according to Eq. <ref>.


    N(IntrinsicTrainer)   = D^2×|R| + D×∑_u=1^N|I_u|×|T_u|
    		+ 7×|R|
    		+ 10× D×|R|
    		
       
    		+ D×∑_u=1^N(|I_u|×|T_u|)
    		+ D×∑_u=1^N|I_u|^2
    		
       
    		+ D^2×|R|



Assuming that on average, each user rates c items, and trusts k users, the computation time can be obtained as Eq. <ref>.


    C(IntrinsicTrainer) = O(D^2×|R|) + O(D× c× |R|) + O(D× k× |T|)



Assuming that c,k  N, we can ignore the values of c and k. Therefore, the computational time of the Intrinsic Trainer would be obtained according to Eq. <ref>.


    C(IntrinsicTrainer) = O(D^2×|R|) + O(D×|R|) + O(D× |T|) = O(D^2×|R|) + O(D× |T|)



Consequently, the overall computation time is linear with respect to the number of observed ratings as well as observed trust statements. 
Social Trainer consists of two loops that iterate over the non-zero trust relations in the adjacency matrix T. The number of repetitions needed to update the parameters P, W, Z, and β^P, β^W, and β^Z is 6× D×|T|. The number of repetitions to update the values of Pt, Wt, Zt, and ω is equal to 4×(∑_u=1^N|I_u|×|T_u|× D). Therefore, the computation time of Social Trainer is equal to:


    C(IntrinsicTrainer) = O(D× |R|) + O(D× |T|)



In the Model Updater, the values of matrices P, W, Z, and vectors ω, α^P, α^W, and α^Z need to be updated. The computation time needed to update these parameters is O(N× D). Assuming that each user has rated at least one item, it is safe to say that |R| is greater than the number of users N.
Therefore, the computation time of Model Updater does not exceed the maximum computation time of Intrinsic Trainer and Social Trainer. Finally, the computation time of the Model trainer is obtained as Eq. <ref>.


    C(ModelTrainer) = O(D^2× |R|) + O(D× |T|)



The number of latent factors D is fixed, hence the computation time is only a function of |R| and |T|. Since both ratings matrix and social network matrix are sparse, the algorithm is scalable to the problems with millions of users and items.



§ EXPERIMENTS





 §.§ Datasets

We tested Aspect-MF on three popular datasets, Ciao, Epinions, and Flixster.
Ciao is a dataset crawled from the ciao.co.uk website. This dataset includes 35,835 ratings given by 2,248 users over 16,861 movies. Ciao also includes the trust relationships between users. The number of trust relationships in Ciao is 57,544. Therefore the dataset density of ratings and trust relationships are 0.09% and 1.14% respectively. The ratings are integer values between 1 and 6.
The Epinions dataset consists of 664,824 ratings from 40,163 users on 139,738 items of different types (software, music, television show, hardware, office appliances, ...). Ratings are integer values between 1 and 5, and data density is 0.011%. Epinions also enables the users to issue explicit trust statements about other users. This dataset includes 487183 trust ratings. The density of the trust network is 0.03%.
Flixster is a social movie site which allows users to rate movies and share the ratings with each other, and become friends with others with similar movie taste. The Flixster dataset which is collected from the Flixster website includes 8,196,077 ratings issued by 147,612 users on 48,794 movies. The social network also includes 7,058,819 friendship links. The density of the ratings matrix and social network matrix are 0.11% and 0.001% respectively.

In all the experiments in sections <ref>, <ref>, and <ref>, 80% of the datasets are used for training and the remaining 20% are used for evaluation. In order to achieve statistical significance, each model training is repeated for 30 times and the average values are used. In section <ref>, we analyse the behaviour of the models in other cases, where 60% and 40% of the ratings are used for training.



 §.§ Comparisons


In order to show the effectiveness of Aspect-MF, we compared the results against the recommendation quality of some of the most popular state of the art models that have reported the highest accuracies in the literature. The following models are compared across the experiments in this section:

	
  * TrustSVD <cit.>, which builds on SVD++ <cit.>. The missing ratings are calculated based on explicit and implicit feedback from user ratings and user's trust relations.
	
  * CondTrustFVSVD <cit.>, this method extends TrustSVD by adding the conditional preferences over feature values to TrustSVD. Experimental results show that this method is significantly superior to TrustSVD in terms of accuracy. This model is denoted CTFVSVD in the experiments section.
	
  * Aspect-MF, which is the model proposed in this paper. The component-based approach that we took in designing this model enabled us to arbitrarily switch on/off the dynamicity over different preference aspects. Therefore, in the experiments we try all the combinations of dynamic preference aspects. This results in 7 combinations denoted by b, bf, bffv, bfv, f, ffv, and fv [fv denotes feature value preferences, f denotes feature preferences, and b denotes bias. Therefore, bffv denotes a model with all the three aspects.].


Guo, Zhang and Yorke-Smith <cit.> carried out comprehensive experiments, and showed that their model, TrustSVD outperformed all the state of the art models. Recently, Zafari and Moser <cit.> showed that their model CondTrustFVSVD significantly outperforms TrustSVD. Therefore, in this section, we limited our comparisons to these two models from the state of the art, since they outperform a comprehensive set of state of the art recommendation models <cit.>. 

The optimal experimental settings for each method are determined either by our experiments or suggested by previous works <cit.>.
Due to the over-fitting problem, the accuracy of iterative models improves for a  number of iterations, after which it starts to degrade. Therefore, we recorded the best accuracy values achieved by each model during the iterations, and compared the models based on the recorded values. We believe that this approach results in a fairer comparison of the models than setting the number of iterations to a fixed value, because the models over-fit at different iterations, and using a fixed number of iterations actually prevents us from fairly comparing the models based on their real capacity in uncovering hidden patterns from data. Therefore, the reported results for iterative models here are the best results that they could achieve using the aforementioned parameters. MAE and RMSE measures are used to evaluate and compare the accuracy of the models.
MAE and RMSE are two standard and popular measures that are used to measure and compare the performance of preference modelling methods in recommender systems. In the following sections, we consider the performances separately for All Users and Cold-start Users. Cold-start Users are the users who have rated less than 5 items, and All Users include all the users regardless of the number of items they have rated.



 §.§ Discussion


All latent factor approaches have been evaluated with 5 factors, because no clear ideal value could be established. In section <ref>, first we analyse the performance of the models from different perspectives. Since the results are subject to randomness, we also performed a t test to guarantee that the out-performances achieved do not happen by chance. The results are discussed in section <ref>. As we mentioned in section <ref>, one of the research questions we are interested in, in this paper is related to the interplay between the dynamicity of preference aspects and the preference domain. In section <ref>, we consider the performance of combinations of Aspect-MF, in order to pinpoint the aspects that are more subject to temporal drift in each dataset. In section <ref>, we also consider the effect of the amount of training data that is fed to the model as input, and analyse the robustness of the models to the shortage of training data.



  §.§.§ Model performances


We can consider the performance of the models from different perspectives. 
A preference model's performance can be considered with respect to the dataset on which it is trained, the accuracy measure that is used to evaluate the model's performance, and the performance of the model on cold-start users vs the performance on all users.



  
Datasets

The error values in Fig. <ref> show that the Aspect-MF results in substantial improvements over TrustSVD in all three datasets for both measures and for all users and cold-start users. As we can see in this figure, the box plots of Aspect-MF's combinations do not have much overlap with the box plot of TrustSVD, which means that the differences are definitely statistically significant. In this figure, we can also see that the box plot widths for Aspect-MF's combinations are usually much smaller than that for TrustSVD. This suggests that Aspect-MF's combinations are more stable than TrustSVD, meaning that they find roughly the same solutions across different model executions. This is a favourable property of the model, since it makes the model performance less subject to randomness. Clearly, a model that performs well sometimes and worse at other times is less reliable. The model's superior performance is likely due to its taking multiple preference aspects into account, therefore, it has more clues as to where the optimal solutions might reside in the solution space.

In particular, we can see that the model is more stable in the case of the Ciao and Epinions datasets than the Flixster dataset. On the Epinions dataset, each typical user and cold-start user rates 41.61 items and 4.08 items on average. These numbers respectively are 15.94 and 2.94 for the Ciao dataset, and 11.12 and 1.94 for the Flixster dataset. This could explain why the variations are larger on Flixster dataset than Epinions and Ciao datasets. Since more ratings per user are available in the Ciao and Epinions dataset, different executions lead the model to more similar solutions than the solutions that are found on the Flixster dataset across different model executions. 
We can also see from Table <ref>, that on the Ciao and Flixster datasets, the improvements are more significant for RMSE, while more significant improvements are achieved for RMSE.
We can also clearly observe that the model variations are smaller for all users in the Epinions dataset, and for cold-start users in the Flixster dataset.










  
Accuracy measures

As the statistical analysis of the models in Table <ref> show, the differences are generally more significant when the accuracies are measured in terms of the RMSE. This can be explained by the formulation of these models as an optimisation problem. These models focus on maximising accuracy using RMSE and achieving better MAE values is a secondary goal that is only pursued through minimising RMSE. 



  
Cold-start vs all users

By taking a close look at the statistical analysis results in Table <ref> and also the box plots of CTFVSVD vs Aspect-MF's combinations in Fig. <ref>, we can see that in all three datasets, the improvements of the Aspect-MF are more significant over all users than cold-start users. This can be explained by the amount of dynamic information that the models receive for each one of these groups of users. For all users, the model is trained using all ratings and also all associated time stamps for those ratings. Therefore the model can more successfully discern the temporal patterns in the preferences, and the accuracy improvements are larger. However, for the cold-start users, the model does not have access to much temporal information about these users, since they do not have many ratings. As a result, the model cannot identify the shift in the preferences of these users, and the improvements are smaller. From this, we conclude that temporal models are more successful on all users, because for them, temporal information is available.



 §.§ Statistical analysis


The statistical analysis of the performances provided in Table <ref> shows that all Aspect-MF's combinations achieve significantly better results than TrustSVD, which does not include the temporal information. The values in Table <ref> also show that Aspect-MF's combinations also result in improvements over CTFVSVD that are statistically significant, which means that in all three datasets, Aspect-MF has been successful in extracting the temporal patterns in the users' preferences. We can also see that the all the p values in Table <ref> are 0.0000, which means that with almost 100% probability, the two model executions (Aspect-MF and TrustSVD) do not come from distributions with equal mean performances. Therefore, we are almost 100% sure that the observed differences in performance are due to the superiority of Aspect-MF over TrustSVD, and not the result of chance. Similarly, the p values in Table <ref> are almost zero, which means that we are certain that Aspect-MF is better than CTFVSVD, in cases where the t test shows a statistically significant improvement.



 §.§ Dynamic aspects


The close comparison of the error values achieved by Aspect-MF in Fig. <ref> show that in terms of MAE for all users, Aspect-MF achieves the best performance on the Ciao and Epinions datasets, for the models including dynamic b and f aspects. However, on the Flixster dataset, the model combination with dynamic b and fv aspects performs best. Interestingly, for cold-start users, different models perform the best. In particular, on the Ciao dataset, the model including dynamic f performs best, whereas on the Epinions and Flixster datasets, the model including dynamic b, f, and fv aspects, and the model with drifting f aspect achieve the best results respectively. Furthermore, the error values in Fig. <ref> show that different model combinations might achieve the best performances for RMSE.
From these figures, we can make several conclusions.

The first conclusion is that the dynamic patterns are dataset-dependent. Therefore, users and the items in different dataset can have preferences with aspects with different levels of dynamicity. This finding supports our component-based approach in modelling the dynamic properties of the preference aspects.

The second conclusion is that the prediction of the ratings for the cold-start users is less dependent on the drifting bias than that of all users. As we see in this Figures <ref> and <ref>, for all users, the combinations that include dynamic b aspects are strictly better than the other combinations, whilst this is less consistent for cold-start users, where sometimes the models with only dynamic f aspects perform best. This suggests that the preferences of cold-start users are not much affected by the shifts in the popularity of the items, while other users' preferences are more influenced by such shifts. Therefore, the accurate modelling of such temporal effects is of greater importance in the case of all users than cold-start users. As previous studies have shown <cit.>, bias is a very important aspect in human preferences. Since the cold-start users do not have enough ratings, there is also not enough temporal data to train the preferences for these models. Therefore, the trained temporal aspects of these users are probably not very accurate, and therefore, the combinations that include bias perform poorly on these users, due to imprecise predictions.

The third conclusion is that both measures reveal roughly the same preference patterns. This seems justifiable, since the shift in user preferences should naturally be independent of how the differences in estimated preferences and real preferences are measured.

To summarise, it is very advantageous to have a component-based model in which the temporal aspects of preferences can be arbitrarily captured in different conditions. This enables us to capture the patterns only when they are actually helpful, and consequently, build the most accurate preference models, tailored to different datasets and domains with disparate temporal patterns.











 §.§ Effect of the size of the training dataset


The main purpose of this section is to evaluate the robustness of the models against shortage of training data. In the experiments in sections <ref> through <ref>, 80% of the ratings matrix was used for training the models and the remaining data was used for evaluation. The question that arises here is how the models would perform if less amount of data was fed to the models for training.

In order to analyse the behaviour of the models with respect to the amount of training data, we can reduce the amount of the training data, and consider how much the accuracy drops as the training data is decreased. Therefore, we also evaluate the models in two additional cases. The first case includes 60% of the data for training, and the remaining 40% for testing, and the second case uses 40% of ratings data for training and the rest for evaluation. The results for the Flixster and Ciao datasets are demonstrated in Figs. <ref> and <ref> respectively. These figures show the percentage of error increase as the amount of training data is decreased.



  
All users
As can be seen in Fig. <ref>, on the Flixster dataset, in the case of all users, all combinations of Aspect-MF result in a smaller increase in the error when the training data is decreased from 80% to 60% (denoted by 80-60 in these diagrams), and from 60% to 40% (denoted by 60-40 in these diagrams). Furthermore, we can observe that in terms of MAE, the combination that includes f and fv resulted the smallest error increase when the training data decreased from 80% to 60%, and the model that included fv resulted in the smallest error increase when the training data decreased from 60% to 40%. This suggests that the dynamic model is more robust to the shortage of training data, when the error is measured in terms of MAE for all users. In terms of RMSE, the least accuracy deterioration happened for the model combination with the f aspect, both when the training data amount drops to 60%, and when it drops to 40%.



  
Cold-start users
For cold-start users however, a different pattern is evident. Interestingly, we can see that for cold-start users, the error increases more when the training data is decreased from 80% to 60%, compared to when it is decreased from 60% to 40%. This means that the accuracy degrades more when the training data drops to 60%. Judging by the higher error increase for cold-start users in comparison with all users, cold-start users seem to be more sensitive to the decrease in the amount of training data. This seems understandable, since the cold-start users do not have many ratings. Therefore, when evaluating the model accuracy for cold-start users, less accurate predictions for each rating have a larger effect on the overall accuracy.

TrustSVD seems to be more robust to the shortage of training data for cold-start users, when the training data drops from 60% to 40%. This can be attributed to the fact that the dynamic model contains time information, and this information can be misleading if we substantially decrease the amount of training data, and evaluate the accuracy for cold-start users who do not have much ratings. A similar observation was made in Figs. <ref> and <ref>, where the dynamic model including the b aspect performed poorly on the cold-start users.





  
All users vs cold-start users
A similar trend to the one observed in Flixster dataset can also be seen in the Ciao dataset in Figure <ref>. As this figure shows, the accuracy deterioration for cold-start users is much larger compared with that for all users. Again, we attribute this to the high sensitivity of cold-start users to inaccurate predictions.
For the case where the training data amount drops from 80% to 60%, the model combination with all the dynamic aspects (bffv) results in the lowest increase in MAE for all users. For cold-start users, the model combination with b and f aspects achieve the smallest deterioration of accuracy.

However, in terms of RMSE for all users, TrustSVD incurs the lowest increase in the error, while for cold-start users, the model with the dynamic fv aspect is the most robust. In the second case where the training data amount is decreased from 60% to 40%, at least one of the model combinations performs best (incurs the lowest accuracy deterioration) for each measure, among the models tested. We can also see that when the training data amount is decreased from 80% to 60%, the error increase is much lower than when the training data amount drops from 60% to 40%. This means that the models are still quite robust with 60% of the ratings data as training data, but their accuracy considerably drops when the training data decreases to 40%.



  
Flixster vs Ciao
One of the key differences between the behaviour of the models on the Flixster and Ciao datasets, as can be seen in Figs. <ref> and <ref>, is the threshold at which the accuracy sharply drops for cold-start users. For the Flixster dataset, the accuracy of cold-start users sharply worsens when the training data amount is decreased from 80% to 60%, while for the Ciao dataset, the sharp decrease in accuracy happens when the training data amount decreases from 60% to 40%. This can be easily justified by looking at the statistics of these two datasets for cold-start users. On the Flixster dataset as we mentioned before, each cold-start user rates 1.94 items on average, while this number is 2.94 in the Ciao dataset. Therefore, the accuracy of cold-start users on the Flixster dataset is more sensitive to inaccurate predictions than that on the Ciao dataset.



Considering all four measures on the two datasets, in general, we can observe that Aspect-MF's combinations are more robust to the decrease in the amount of training information than TrustSVD and CTFVSVD. The combinations  in this paper are particularly more helpful in cases where enough time related data is fed into the model as input.



  
Insights
From the observations for cold-start users, we can conclude that in order for the time information to be helpful, we need to provide the model with enough time-related data as input, so that the accuracy can be improved, and the importance of such data is more pronounced for the cold-start users, whose predictions are more sensitive to the inaccuracies. Otherwise, if the amount of training data is insufficient, the model can learn unrealistic temporal patterns that directly result from a shortage of training information.

We also saw that the degree of deterioration of the accuracy is somewhat dependent on the dataset. On the Flixster, the accuracy degrades somewhere between just under 1% to just under 5%. On Ciao, however, the accuracy deteriorates much more (roughly between 6.5% and 19.5%). Therefore, it is up to the system users to decide whether they would like to use smaller datasets and sacrifice the accuracy, or spend more time on training more accurate models using more information. We did not observe any tangible differences between the execution times of these cases (80%-60%-40%), and the computational complexity analysis of the model in section <ref> showed that the model time is of linear order. Therefore, it is probably advisable for the system owners to use as much data as available to achieve the highest accuracies, as long as their computational limitations allow.




§ CONCLUSION AND FUTURE WORK



In this paper, we addressed the problem of modelling the temporal properties of human preferences in recommender systems. In order to tackle this problem, we proposed a novel latent factor model called Aspect-MF. Aspect-MF built on the basis of CTFVSVD, a model that we proposed earlier, in order to capture socially-influenced conditional preferences over feature values. In Aspect-MF, three major preference aspects were assumed to be subject to temporal drift. These aspects included user and item biases, preferences over features, and preferences over feature values. Moreover, we also analysed the temporal behaviour of each of these preference aspects and their combinations. We also considered the robustness of Aspect-MF's combinations with respect to the shortage of training data.

In order to evaluate the model, we carried out extensive experiments on three popular datasets in the area of recommender systems. We considered the model errors in terms of MAE and RMSE measures on all users and cold-start users. We also performed statistical analyses on the performances observed, to make sure that the differences in accuracies are significant, and hence do not happen by chance. The experiments revealed that in all three datasets, all combinations of Aspect-MF for both measures on all users and cold-start users significantly outperformed TrustSVD, which had proven to be the most accurate static social recommendation model before CTFVSVD. The experiments also proved that most of the Aspect-MF's combinations were significantly more accurate than CTFVSVD. In particular, we found that Aspect-MF with all dynamic aspects outperformed CTFVSVD in all three datasets on all users.

The analysis of the temporal behaviour of preference aspects and their combinations on the three datasets showed that different datasets included different temporal patterns, and therefore, required models with different dynamic aspects. This supported our component-based approach in modelling the basic preference aspects and their temporal properties. We also concluded that the dynamic models are more helpful in cases there is enough training data to discern the temporal properties. In particular, we concluded that the models proposed in this paper are more successful in modelling all users, because more time-related data is available for all users than cold-start users, and therefore the temporal characteristics were extracted more accurately. The analysis of the robustness of the models with respect to the shortage of training data also revealed that Aspect-MF was in general more robust than CTFVSVD and TrustSVD. The models were also more robust for all users than cold-start users, because cold-start users were more sensitive to the inaccurate predictions.

A direction that we would like to pursue in the future is related to explaining the resulting recommendations to the users. Explaining the recommendations to the users is believed to improve transparency and to instill trust in the users. So far we have pursued our main goal in improving the accuracy of the recommendations, and in this paper we showed how we could achieve significant improvements by taking the temporal aspects into consideration. As the next step, in particular we are interested in how we can explain the temporal properties of the trained models to the users. Furthermore, the component-based structure followed in designing Aspect-MF is generally beneficial in extracting explanations.


	
	We would like to acknowledge the SunCorp Group for partially funding this project. We would also like to thank the National eResearch Collaboration Tools and Resources (Nectar) for providing us with the necessary computational resources to carry out the experiments.


ACM-Reference-Format




§ ASPECT-MF TRAINING EQUATIONS



In Aspect-MF, we use gradient descent to optimise Eq. <ref>. The gradients for the model parameters are obtained using Eqs. <ref> to <ref>.


    ∂ E/∂ bu_u = ∂ E_R/∂ bu_u = e_uj + λ_bu|I_u|^-1/2bu_u




    ∀t_uj∈ I_u^t:
    		∂ E/∂ but_ut = ∂ E_R/∂ but_ut = e_uj + λ_bu|I_u|^-1/2but_ut




    ∂ E/∂α_u = ∂ E_R/∂α_u = e_uj dev_u(t_uj) + λ_bu|I_u|^-1/2α_u




    ∂ E/∂ bi_j = ∂ E_R/∂ bi_j = e_uj (C_u + C_ut) + λ_bi|J_j|^-1/2bi_j




    ∂ E/∂ bit_jBin(t_uj) = ∂ E_R/∂ bit_jBin(t_uj) = e_uj (C_u + C_ut) + λ_bi|J_j|^-1/2bit_jBin(t_uj)




    ∂ E/∂ C_u = ∂ E_R/∂ C_u = e_uj (bi_j + bit_jBin(t_uj)) + λ_bi|J_j|^-1/2C_u




    ∂ E/∂ Ct_u = ∂ E_R/∂ Ct_u = e_uj (bi_j + bit_jBin(t_uj)) + λ_bi|J_j|^-1/2Ct_u




    ∂ E/∂ P_uf=∂ E_R/∂ P_uf+∂ E_T/∂ P_uf




    ∂ E_R/∂ P_uf=e_uj(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj)) + λ_P|I_u|^-1/2P_uf




    ∂ E_T/∂ P_uf=λ_T|T_u|^-1/2P_uf+λ_tη_P∑_∀ v∈ T_ue^(1)_uvω_vf




    ∀t_uj∈ I_u^t:
    		∂ E/∂ Pt_uft=∂ E_R/∂ Pt_uft+∂ E_T/∂ Pt_uft




    ∂ E_R/∂ Pt_uft=e_uj(W_uf(t_uj)Q_jf(t_uj)+Z_uf(t_uj))+λ_Pt|I_u|^-1/2Pt_uft




    ∂ E_T/∂ Pt_uft=λ_T|T_u|^-1/2Pt_uft + λ_t η_P/|I_u^t|∑_∀ v∈ T_ue^(1)_uvω_vf




    ∂ E/∂α_uf^P=∂ E_R/∂α_uf^P+∂ E_T/∂α_uf^P




    ∂ E_R/∂α_uf^P=e_ujdev_u(t_uj)(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj))+λ_α^P|I_u|^-1/2α_uf^P





    ∂ E_T/∂α_uf^P=λ_T|T_u|^-1/2α_uf^P+λ_t η_P/|I_u^t|∑_∀ v∈ T_u∑_∀ t_uj∈ I_u^te^(1)_uvω_vfdev_u(t_uj)





    ∂ E/∂ W_uf=∂ E_R/∂ W_uf+∂ E_T/∂ W_uf




    ∂ E_R/∂ W_uf   =e_ujQ_jf(t_uj)(W_uf(t_uj)Q_jf(t_uj)+Z_uf(t_uj))
       +2Q_jf(t_uj)∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj) + Z_uf^'(t_uj))+λ_W|I_u|^-1/2W_uf




    ∂ E_T/∂ W_uf=λ_T|T_u|^-1/2W_uf+λ_t η_W∑_∀ v∈ T_ue^(2)_uvω_vf




    ∀t_uj∈ I_u^t:
    		∂ E/∂ Wt_uft=∂ E_R/∂ Wt_uft+∂ E_T/∂ Wt_uft




    ∂ E_R/∂ Wt_uft   =e_ujQ_jf(t_uj)(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj))
       +2Q_jf(t_uj)∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj) + Z_uf^'(t_uj))+λ_Wt|I_u|^-1/2W_uf




    ∂ E_T/∂ Wt_uft=λ_T|T_u|^-1/2W_uf+λ_t η_W/|I_u^t|∑_∀ v∈ T_ue^(2)_uvω_vf




    ∂ E/∂α_uf^W=∂ E_R/∂α_uf^W+∂ E_T/∂α_uf^W




    ∂ E_R/∂α_uf^W   =e_ujdev_u(t_uj)(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj))
       +2Q_jf(t_uj)∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj)+Z_uf^'(t_uj))+λ_α^W|I_u|^-1/2α_uf^W




    ∂ E_T/∂α_uf^W=λ_T|T_u|^-1/2α_uf^W+λ_t η_W/|I_u^t|∑_∀ v∈ T_u∑_∀t_uj∈ I_u^te^(2)_uvω_vfdev_u(t_uj)




    ∂ E/∂ Z_uf=∂ E_R/∂ Z_uf+∂ E_T/∂ Z_uf




    ∂ E_R/∂ Z_uf   =e_uj(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj))+2∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj)+Z_uf^'(t_uj))
       +λ_Z|I_u|^-1/2Z_uf




    ∂ E_T/∂ Z_uf=λ_T|T_u|^-1/2Z_uf+λ_tη_Z∑_∀ v∈ T_ue^(3)_uvω_vf




    ∀t_uj∈ I_u^t:
    		∂ E/∂ Zt_uft=∂ E_R/∂ Zt_uft+∂ E_T/∂ Zt_uft




    ∂ E_R/∂ Zt_uft=   e_uj(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj)) + 2∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj) + Z_uf^'(t_uj))+
       λ_Z|I_u|^-1/2Zt_uft




    ∂ E_T/∂ Zt_uft=λ_T|T_u|^-1/2Zt_uft+λ_t η_Z/|I_u^t|∑_∀ v∈ T_ue^(3)_uvω_vf




    ∂ E/∂α_uf^Z=∂ E_R/∂α_uf^Z+∂ E_T/∂α_uf^Z




    ∂ E_R/∂α_uf^Z   =e_ujdev_u(t_uj)(W_uf(t_uj)Q_jf(t_uj) + Z_uf(t_uj))
       +2∑_f^'=1^D(W_uf(t_uj)Q_jf^'(t_uj) + Z_uf^'(t_uj))+λ_α^Z|I_u|^-1/2α_uf^Z




    ∂ E_T/∂α_uf^Z=λ_T|T_u|^-1/2α_uf^Z+λ_t η_Z/|I_u^t|∑_∀ v∈ T_u∑_∀t_uj∈ I_u^te^(3)_uvω_vfdev_u(t_uj)




    ∀ i ∈ I_u:
    		∂ E/∂ y_if=∂ E_R/∂ y_if=e_uj|I_u|^-1/2(W_ufV_jf + Z_uf)+(λ_y|J_j|^-1/2y_if)




    ∀ v ∈ T_u:
    		∂ E/∂ω_vf=∂ E_R/∂ω_vf+∂ E_T/∂ω_vf




    ∂ E_R/∂ω_vf=e_uj|T_u|^-1/2(W(t)_ufQ_jf + Z(t)_uf)




    ∂ E_T/∂ω_vf   =(λ_T|T^+_v|^-1/2)ω_vf+λ_t η_P/|I_u^t|∑_∀t_uj∈ I_u^te^(1)_uvP(t_uj)_uf
       +λ_t η_W/|I_u^t|∑_∀t_uj∈ I_u^te^(2)_uv(1 - W(t_uj)_uf) + λ_t η_Z/|I_u^t|∑_∀t_uj∈ I_u^te^(3)_uvZ(t_uj)_uf




    ∂ E/∂ Y_ff^'=∂ E_R/∂ Y_ff^'=e_uj(W_ifV_jf + Z_if)(W_if^'V_jf^' + Z_if^') - λ_YY_ff^'




    ∂ E/∂ Q_jf   =∂ E_R/∂ Q_jf=e_uj[W_uf(P_uf + |I_u|^-1/2∑_∀ i ∈ I_uy_i+
       |T_u|^-1/2∑_∀ v ∈ T_uω_v)+2W_uf∑_f^'=1^D(W_if^'V_jf^' + Z_if^')Y_ff^'] + λ_Q|U_j|^-1/2Q_jf



where:

    e_uj=R_uj - R̂_̂ûĵ



Therefore, the gradients in Eqs. <ref> to <ref> will be used to update the values matrices used to capture socially-influenced drifting conditional feature value preferences using an incremental gradient descent method.

