Collaborative Deep Learning for Recommender Systems

Hao Wang, Naiyan Wang, Dit-Yan Yeung

Introduction

Due to the abundance of choice in many online services, recommender systems (RS) now play an increasingly significant role . For individuals, using RS allows us to make more effective use of information. Besides, many companies (e.g., Amazon and Netflix) have been using RS extensively to target their customers by recommending products or services. Existing methods for RS can roughly be categorized into three classes : content-based methods, collaborative filtering (CF) based methods, and hybrid methods. Content-based methods make use of user profiles or product descriptions for recommendation. CF-based methods use the past activities or preferences, such as user ratings on items, without using user or product content information. Hybrid methods seek to get the best of both worlds by combining content-based and CF-based methods.

Because of privacy concerns, it is generally more difficult to collect user profiles than past activities. Nevertheless, CF-based methods do have their limitations. The prediction accuracy often drops significantly when the ratings are very sparse. Moreover, they cannot be used for recommending new products which have yet to receive rating information from users. Consequently, it is inevitable for CF-based methods to exploit auxiliary information and hence hybrid methods have gained popularity in recent years.

According to whether two-way interaction exists between the rating information and auxiliary information, we may further divide hybrid methods into two sub-categories: loosely coupled and tightly coupled methods. Loosely coupled methods like process the auxiliary information once and then use it to provide features for the CF models. Since information flow is one-way, the rating information cannot provide feedback to guide the extraction of useful features. For this sub-category, improvement often has to rely on a manual and tedious feature engineering process. On the contrary, tightly coupled methods like allow two-way interaction. On one hand, the rating information can guide the learning of features. On the other hand, the extracted features can further improve the predictive power of the CF models (e.g., based on matrix factorization of the sparse rating matrix). With two-way interaction, tightly coupled methods can automatically learn features from the auxiliary information and naturally balance the influence of the rating and auxiliary information. This is why tightly coupled methods often outperform loosely coupled ones .

Collaborative topic regression (CTR) is a recently proposed tightly coupled method. It is a probabilistic graphical model that seamlessly integrates a topic model, latent Dirichlet allocation (LDA) , and a model-based CF method, probabilistic matrix factorization (PMF) . CTR is an appealing method in that it produces promising and interpretable results. Nevertheless, the latent representation learned is often not effective enough especially when the auxiliary information is very sparse. It is this representation learning problem that we will focus on in this paper.

On the other hand, deep learning models recently show great potential for learning effective representations and deliver state-of-the-art performance in computer vision and natural language processing applications. In deep learning models, features are learned in a supervised or unsupervised manner. Although they are more appealing than shallow models in that the features can be learned automatically (e.g., effective feature representation is learned from text content), they are inferior to shallow models such as CF in capturing and learning the similarity and implicit relationship between items. This calls for integrating deep learning with CF by performing deep learning collaboratively.

Unfortunately, very few attempts have been made to develop deep learning models for CF. uses restricted Boltzmann machines instead of the conventional matrix factorization formulation to perform CF and extends this work by incorporating user-user and item-item correlations. Although these methods involve both deep learning and CF, they actually belong to CF-based methods because they do not incorporate content information like CTR, which is crucial for accurate recommendation. uses low-rank matrix factorization in the last weight layer of a deep network to significantly reduce the number of model parameters and speed up training, but it is for classification instead of recommendation tasks. On music recommendation, directly use conventional CNN or deep belief networks (DBN) to assist representation learning for content information, but the deep learning components of their models are deterministic without modeling the noise and hence they are less robust. The models achieve performance boost mainly by loosely coupled methods without exploiting the interaction between content information and ratings. Besides, the CNN is linked directly to the rating matrix, which means the models will perform poorly when the ratings are sparse, as shown in the following experiments.

To address the challenges above, we develop a hierarchical Bayesian model called collaborative deep learning (CDL) as a novel tightly coupled method for RS. We first present a Bayesian formulation of a deep learning model called stacked denoising autoencoder (SDAE) . With this, we then present our CDL model which tightly couples deep representation learning for the content information and collaborative filtering for the ratings (feedback) matrix, allowing two-way interaction between the two. Experiments show that CDL significantly outperforms the state of the art. Note that although we present CDL as using SDAE for its feature learning component, CDL is actually a more general framework which can also admit other deep learning models such as deep Boltzmann machines , recurrent neural networks , and convolutional neural networks .

The main contribution of this paper is summarized below:

By performing deep learning collaboratively, CDL can simultaneously extract an effective deep feature representation from content and capture the similarity and implicit relationship between items (and users). The learned representation may also be used for tasks other than recommendation.

Unlike previous deep learning models which use simple target like classification and reconstruction , we propose to use CF as a more complex target in a probabilistic framework.

Besides the algorithm for attaining maximum a posteriori (MAP) estimates, we also derive a sampling-based algorithm for the Bayesian treatment of CDL, which, interestingly, turns out to be a Bayesian generalized version of back-propagation.

To the best of our knowledge, CDL is the first hierarchical Bayesian model to bridge the gap between state-of-the-art deep learning models and RS. Besides, due to its Bayesian nature, CDL can be easily extended to incorporate other auxiliary information to further boost the performance.

Extensive experiments on three real-world datasets from different domains show that CDL can significantly advance the state of the art.

Notation and Problem Formulation

Similar to the work in , the recommendation task considered in this paper takes implicit feedback as the training and test data. The entire collection of JJ items (articles or movies) is represented by a JJ-by-SS matrix Xc{\bf X}_{c}, where row jj is the bag-of-words vector Xc,j∗{\bf X}_{c,j*} for item jj based on a vocabulary of size SS. With II users, we define an II-by-JJ binary rating matrix R=[Rij]I×J{\bf R}=[{\bf R}_{ij}]_{I\times J}. For example, in the dataset citeulike-a Rij=1{\bf R}_{ij}=1 if user ii has article jj in his or her personal library and Rij=0{\bf R}_{ij}=0 otherwise. Given part of the ratings in R{\bf R} and the content information Xc{\bf X}_{c}, the problem is to predict the other ratings in R{\bf R}. Note that although we focus on movie recommendation (where plots of movies are considered as content information) and article recommendation like in this paper, our model is general enough to handle other recommendation tasks (e.g., tag recommendation).

The matrix Xc{\bf X}_{c} plays the role of clean input to the SDAE while the noise-corrupted matrix, also a JJ-by-SS matrix, is denoted by X0{\bf X}_{0}. The output of layer ll of the SDAE is denoted by Xl{\bf X}_{l} which is a JJ-by-KlK_{l} matrix. Similar to Xc{\bf X}_{c}, row jj of Xl{\bf X}_{l} is denoted by Xl,j∗{\bf X}_{l,j*}. Wl{\bf W}_{l} and bl{\bf b}_{l} are the weight matrix and bias vector, respectively, of layer ll, Wl,∗n{\bf W}_{l,*n} denotes column nn of Wl{\bf W}_{l}, and LL is the number of layers. For convenience, we use W+{\bf W}^{+} to denote the collection of all layers of weight matrices and biases. Note that an L/2L/2-layer SDAE corresponds to an LL-layer network.

Collaborative Deep Learning

We are now ready to present details of our CDL model. We first briefly review SDAE and give a Bayesian formulation of SDAE. This is then followed by the presentation of CDL as a hierarchical Bayesian model which tightly integrates the ratings and content information.

SDAE is a feedforward neural network for learning representations (encoding) of the input data by learning to predict the clean input itself in the output, as shown in Figure 2. Usually the hidden layer in the middle, i.e., X2{\bf X}_{2} in the figure, is constrained to be a bottleneck and the input layer X0{\bf X}_{0} is a corrupted version of the clean input data. An SDAE solves the following optimization problem:

where λ\lambda is a regularization parameter and ∥⋅∥F\|\cdot\|_{F} denotes the Frobenius norm.

2 Generalized Bayesian SDAE

If we assume that both the clean input Xc{\bf X}_{c} and the corrupted input X0{\bf X}_{0} are observed, similar to , we can define the following generative process:

For each column nn of the weight matrix Wl{\bf W}_{l}, draw

Draw the bias vector bl∼N(0,λw−1IKl){\bf b}_{l}\sim{\mathcal{N}}({\bf 0},\lambda_{w}^{-1}{\bf I}_{K_{l}}).

For each item jj, draw a clean input Note that while generation of the clean input Xc{\bf X}_{c} from XL{\bf X}_{L} is part of the generative process of the Bayesian SDAE, generation of the noise-corrupted input X0{\bf X}_{0} from Xc{\bf X}_{c} is an artificial noise injection process to help the SDAE learn a more robust feature representation.

Note that if λs\lambda_{s} goes to infinity, the Gaussian distribution in Equation (1) will become a Dirac delta distribution centered at σ(Xl−1,j∗Wl+bl)\sigma({\bf X}_{l-1,j*}{\bf W}_{l}+{\bf b}_{l}), where σ(⋅)\sigma(\cdot) is the sigmoid function. The model will degenerate to be a Bayesian formulation of SDAE. That is why we call it generalized SDAE.

Note that the first L/2L/2 layers of the network act as an encoder and the last L/2L/2 layers act as a decoder. Maximization of the posterior probability is equivalent to minimization of the reconstruction error with weight decay taken into consideration.

3 Collaborative Deep Learning

Using the Bayesian SDAE as a component, the generative process of CDL is defined as follows:

For each column nn of the weight matrix Wl{\bf W}_{l}, draw

Draw the bias vector bl∼N(0,λw−1IKl){\bf b}_{l}\sim{\mathcal{N}}({\bf 0},\lambda_{w}^{-1}{\bf I}_{K_{l}}).

Draw a clean input Xc,j∗∼N(XL,j∗,λn−1IJ{\bf X}_{c,j*}\sim{\mathcal{N}}({\bf X}_{L,j*},\lambda_{n}^{-1}{\bf I}_{J}).

Draw a latent item offset vector \mbox{\boldmath\epsilon\unboldmath}_{j}\sim{\mathcal{N}}({\bf 0},\lambda_{v}^{-1}{\bf I}_{K}) and then set the latent item vector to be:

Draw a latent user vector for each user ii:

Draw a rating Rij{\bf R}_{ij} for each user-item pair (i,j)(i,j):

Here λw\lambda_{w}, λn\lambda_{n}, λu\lambda_{u}, λs\lambda_{s}, and λv\lambda_{v} are hyperparameters and Cij{\bf C}_{ij} is a confidence parameter similar to that for CTR (Cij=a{\bf C}_{ij}=a if Rij=1{\bf R}_{ij}=1 and Cij=b{\bf C}_{ij}=b otherwise). Note that the middle layer XL/2{\bf X}_{L/2} serves as a bridge between the ratings and content information. This middle layer, along with the latent offset \mbox{\boldmath\epsilon\unboldmath}_{j}, is the key that enables CDL to simultaneously learn an effective feature representation and capture the similarity and (implicit) relationship between items (and users). Similar to the generalized SDAE, for computational efficiency, we can also take λs\lambda_{s} to infinity.

The graphical model of CDL when λs\lambda_{s} approaches positive infinity is shown in Figure 1, where, for notational simplicity, we use x0{\bf x}_{0}, xL/2{\bf x}_{L/2}, and xL{\bf x}_{L} in place of X0,j∗T{\bf X}_{0,j*}^{T}, XL2,j∗T{\bf X}_{\frac{L}{2},j*}^{T}, and XL,j∗T{\bf X}_{L,j*}^{T}, respectively.

4 Maximum A Posteriori Estimates

Based on the CDL model above, all parameters could be treated as random variables so that fully Bayesian methods such as Markov chain Monte Carlo (MCMC) or variational approximation methods may be applied. However, such treatment typically incurs high computational cost. Besides, since CTR is our primary baseline for comparison, it would be fair and reasonable to take an approach analogous to that used in CTR. Consequently, we devise below an EM-style algorithm for obtaining the MAP estimates, as in .

Like in CTR, maximizing the posterior probability is equivalent to maximizing the joint log-likelihood of U{\bf U}, V{\bf V}, {Xl}\{{\bf X}_{l}\}, Xc{\bf X}_{c}, {Wl}\{{\bf W}_{l}\}, {bl}\{{\bf b}_{l}\}, and R{\bf R} given λu\lambda_{u}, λv\lambda_{v}, λw\lambda_{w}, λs\lambda_{s}, and λn\lambda_{n}:

If λs\lambda_{s} goes to infinity, the likelihood becomes:

where the encoder function fe(⋅,W+)f_{e}(\cdot,{\bf W}^{+}) takes the corrupted content vector X0,j∗{\bf X}_{0,j*} of item jj as input and computes the encoding of the item, and the function fr(⋅,W+)f_{r}(\cdot,{\bf W}^{+}) also takes X0,j∗{\bf X}_{0,j*} as input, computes the encoding and then the reconstructed content vector of item jj. For example, if the number of layers L=6L=6, fe(X0,j∗,W+)f_{e}({\bf X}_{0,j*},{\bf W}^{+}) is the output of the third layer while fr(X0,j∗,W+)f_{r}({\bf X}_{0,j*},{\bf W}^{+}) is the output of the sixth layer.

From the perspective of optimization, the third term in the objective function (3.4) above is equivalent to a multi-layer perceptron using the latent item vectors vj{\bf v}_{j} as target while the fourth term is equivalent to an SDAE minimizing the reconstruction error. Seeing from the view of neural networks (NN), when λs\lambda_{s} approaches positive infinity, training of the probabilistic graphical model of CDL in Figure 1(left) would degenerate to simultaneously training two neural networks overlaid together with a common input layer (the corrupted input) but different output layers, as shown in Figure 3. Note that the second network is much more complex than typical neural networks due to the involvement of the rating matrix.

When the ratio λn/λv\lambda_{n}/\lambda_{v} approaches positive infinity, it will degenerate to a two-step model in which the latent representation learned using SDAE is put directly into the CTR. Another extreme happens when λn/λv\lambda_{n}/\lambda_{v} goes to zero where the decoder of the SDAE essentially vanishes. On the right of Figure 1 is the graphical model of the degenerated CDL when λn/λv\lambda_{n}/\lambda_{v} goes to zero. As demonstrated in the experiments, the predictive performance will suffer greatly for both extreme cases.

For ui{\bf u}_{i} and vj{\bf v}_{j}, coordinate ascent similar to is used. Given the current W+{\bf W}^{+}, we compute the gradients of L\mathscr{L} with respect to ui{\bf u}_{i} and vj{\bf v}_{j} and set them to zero, leading to the following update rules:

where U=(ui)i=1I{\bf U}=({\bf u}_{i})^{I}_{i=1}, V=(vj)j=1J{\bf V}=({\bf v}_{j})^{J}_{j=1}, Ci=\mboxdiag(Ci1,…,CiJ){\bf C}_{i}=\mbox{diag}({\bf C}_{i1},\ldots,{\bf C}_{iJ}) is a diagonal matrix, Ri=(Ri1,…,RiJ)T{\bf R}_{i}=({\bf R}_{i1},\ldots,{\bf R}_{iJ})^{T} is a column vector containing all the ratings of user ii, and Cij{\bf C}_{ij} reflects the confidence controlled by aa and bb as discussed in .

Given U{\bf U} and V{\bf V}, we can learn the weights Wl{\bf W}_{l} and biases bl{\bf b}_{l} for each layer using the back-propagation learning algorithm. The gradients of the likelihood with respect to Wl{\bf W}_{l} and bl{\bf b}_{l} are as follows:

By alternating the update of U{\bf U}, V{\bf V}, Wl{\bf W}_{l}, and bl{\bf b}_{l}, we can find a local optimum for L\mathscr{L}. Several commonly used techniques such as using a momentum term may be used to alleviate the local optimum problem. For completeness, we also provide a sampling- based algorithm for CDL in the appendix.

5 Prediction

Let DD be the observed test data. Similar to , we use the point estimates of ui{\bf u}_{i}, W+{\bf W}^{+} and \mbox{\boldmath\epsilon\unboldmath}_{j} to calculate the predicted rating:

where E[⋅]E[\cdot] denotes the expectation operation. In other words, we approximate the predicted rating as:

Note that for any new item jj with no rating in the training data, its offset \mbox{\boldmath\epsilon\unboldmath}^{*}_{j} will be 0{\bf 0}.

Experiments

Extensive experiments are conducted on three real-world datasets from different domains to demonstrate the effectiveness of our model both quantitatively and qualitativelyCode and data are available at www.wanghao.in.

We use three datasets from different real-world domains, two from CiteULikeCiteULike allows users to create their own collections of articles. There are abstract, title, and tags for each article. More details about the CiteULike data can be found at http://www.citeulike.org. and one from Netflix, for our experiments. The first two datasets, from , were collected in different ways, specifically, with different scales and different degrees of sparsity to mimic different practical situations. The first dataset, citeulike-a, is mostly from . The second dataset, citeulike-t, was collected independently of the first one. They manually selected 273273 seed tags and collected all the articles with at least one of those tags. Similar to , users with fewer than 33 articles are not included. As a result, citeulike-a contains 55515551 users and 1698016980 items. For citeulike-t, the numbers are 79477947 and 2597525975. We can see that citeulike-t contains more users and items than citeulike-a. Also, citeulike-t is much sparser as only 0.07%0.07\% of its user-item matrix entries contain ratings but citeulike-a has ratings in 0.22%0.22\% of its user-item matrix entries.

The last dataset, Netflix, consists of two parts. The first part, with ratings and movie titles, is from the Netflix challenge dataset. The second part, with plots of the corresponding movies, was collected by us from IMDB http://www.imdb.com. Similar to , in order to be consistent with the implicit feedback setting of the first two datasets, we extract only positive ratings (rating 55) for training and testing. After removing users with less than 33 positive ratings and movies without plots, we have 407261407261 users, 92289228 movies, and 1534880815348808 ratings in the final dataset.

We follow the same procedure as that in to preprocess the text information (item content) extracted from the titles and abstracts of the articles and the plots of the movies. After removing stop words, the top SS discriminative words according to the tf-idf values are chosen to form the vocabulary (SS is 80008000, 2000020000, and 2000020000 for the three datasets).

2 Evaluation Scheme

For each dataset, similar to , we randomly select PP items associated with each user to form the training set and use all the rest of the dataset as the test set. To evaluate and compare the models under both sparse and dense settings, we set PP to 11 and 1010, respectively, in our experiments. For each value of PP, we repeat the evaluation five times with different randomly selected training sets and the average performance is reported.

As in , we use recall as the performance measure because the rating information is in the form of implicit feedback . Specifically, a zero entry may be due to the fact that the user is not interested in the item, or that the user is not aware of its existence. As such, precision is not a suitable performance measure. Like most recommender systems, we sort the predicted ratings of the candidate items and recommend the top MM items to the target user. The recall@MM for each user is then defined as:

The final result reported is the average recall over all users.

Another evaluation metric is the mean average precision (mAP). Exactly the same as , we set the cutoff point at 500500 for each user.

3 Baselines and Experimental Settings

The models included in our comparison are listed as follows:

CMF: Collective Matrix Factorization is a model incorporating different sources of information by simultaneously factorizing multiple matrices. In this paper, the two factorized matrices are R{\bf R} and Xc{\bf X}_{c}.

SVDFeature: SVDFeature is a model for feature-based collaborative filtering. In this paper we use the content information Xc{\bf X}_{c} as raw features to feed into SVDFeature.

DeepMusic: DeepMusic is a model for music recommendation mentioned in Section 1. We use the variant, a loosely coupled method, that achieves the best performance as our baseline.

CTR: Collaborative Topic Regression is a model performing topic modeling and collaborative filtering simultaneously as mentioned in the previous section.

CDL: Collaborative Deep Learning is our proposed model as described above. It allows different levels of model complexity by varying the number of layers.

In the experiments, we first use a validation set to find the optimal hyperparameters for CMF, SVDFeature, CTR, and DeepMusic. For CMF, we set the regularization hyperparameters for the latent factors of different contexts to 1010. After the grid search, we find that CMF performs best when the weights for the rating matrix and content matrix (BOW) are both 55 in the sparse setting. For the dense setting the weights are 88 and 22, respectively. For SVDFeature, the best performance is achieved when the regularization hyperparameters for the users and items are both 0.0040.004 with the learning rate equal to 0.0050.005. For DeepMusic, we find that the best performance is achieved using a CNN with two convolutional layers. We also try our best to tune the other hyperparameters. For CTR, we find that it can achieve good prediction performance when λu=0.1\lambda_{u}=0.1, λv=10\lambda_{v}=10, a=1a=1, b=0.01b=0.01, and K=50K=50 (note that aa and bb determine the confidence parameters Cij{\bf C}_{ij}). For CDL, we directly set a=1a=1, b=0.01b=0.01, K=50K=50 and perform grid search on the hyperparameters λu\lambda_{u}, λv\lambda_{v}, λn\lambda_{n}, and λw\lambda_{w}. For the grid search, we split the training data and use 5-fold cross validation.

We use a masking noise with a noise level of 0.30.3 to get the corrupted input X0{\bf X}_{0} from the clean input Xc{\bf X}_{c}. For CDL with more than one layer of SDAE (L>2L>2), we use a dropout rate of 0.10.1 to achieve adaptive regularization. In terms of network architecture, the number of hidden units KlK_{l} is set to 200200 for ll such that l≠L/2l\neq L/2 and 0<l<L0<l<L. While both K0K_{0} and KLK_{L} are equal to the number of words SS in the dictionary, KL/2K_{L/2} is set to KK which is the number of dimensions of the learned representation. For example, the 2-layer CDL model (L=4L=4) has a Bayesian SDAE of architecture ‘8000-200-50-200-8000’ for the citeulike-a dataset.

4 Quantitative Comparison

Figures 4 and 5 show the results that compare CDL, CTR, DeepMusic, CMF, and SVDFeature using the three datasets under both the sparse (P=1P=1) and dense (P=10P=10) settings. We can see that CTR is a strong baseline which beats DeepMusic, CMF, and SVDFeature in all datasets even though DeepMusic has a deep architecture. In the sparse setting, CMF outperforms SVDFeature most of the time and sometimes even achieves performance comparable to CTR. DeepMusic performs poorly due to lack of ratings and overfitting. In the dense setting, SVDFeature is significantly better than CMF for citeulike-a and citeulike-t but is inferior to CMF for Netflix. DeepMusic is still slightly worse than CTR due to the reasons mentioned in Section 1. To focus more specifically on comparing CDL with CTR, we can see that for citeulike-a, 2-layer CDL outperforms CTR by a margin of 4.2%∼\sim6.0% in the sparse setting and 3.3%∼\sim4.6% in the dense setting. If we increase the number of layers to 33 (L=6L=6), the margin will go up to 5.8%∼\sim8.0% and 4.3%∼\sim5.8%, respectively. Similarly for citeulike-t, 2-layer CDL outperforms CTR by a margin of 10.4%∼\sim13.1% in the sparse setting and 4.7%∼\sim7.6% in the dense setting. When the number of layers is increased to 33, the margin will even go up to 11.0%∼\sim14.9% and 5.2%∼\sim8.2%, respectively. For Netflix, 2-layer CDL outperforms CTR by a margin of 1.9%∼\sim5.9% in the sparse setting and 1.5%∼\sim2.0% in the dense setting. As we can see, seamless and successful integration of deep learning and RS requires careful designs to avoid overfitting and achieve significant performance boost.

Table 1 shows the mAP for all models in the sparse settings. We can see that the mAP of CDL is almost or more than twice of CTR. Tables 2 and 3 show the recall@300 results when CDL with different numbers of layers are applied to the three datasets under both the sparse and dense settings. As we can see, for citeulike-t and Netflix, the recall increases as the number of layers increases. For citeulike-a, CDL starts to overfit when it exceeds two layers. Since the standard deviation is always very small (4.31×10−5∼9.31×10−34.31\times 10^{-5}\sim 9.31\times 10^{-3}), we do not include it in the figures and tables as it is not noticeable anyway.

Note that the results are somewhat different for the first two datasets although they are from the same domain. This is due to the different ways in which the datasets were collected, as discussed above. Specifically, both the text information and the rating matrix in citeulike-t are much sparser.Each article in citeulike-a has 66.666.6 words on average and that for citeulike-t is 18.818.8. By seamlessly integrating deep representation learning for content information and CF for the rating matrix, CDL can handle both the sparse rating matrix and the sparse text information much better and learn a much more effective latent representation for each item and hence each user.

Figure 6 shows the results for different values of λn\lambda_{n} using citeulike-t under the dense setting. We set λu=0.01\lambda_{u}=0.01, λv=100\lambda_{v}=100, and LL to 22 and 66. Similar phenomena are observed when the number of layers and the value of PP are varied but they are omitted here due to space constraints. As mentioned in the previous section, when λn\lambda_{n} is extremely large, λn/λv\lambda_{n}/\lambda_{v} will approach positive infinity so that CDL degenerates to two separate models. In this case the latent item representation will be learned by the SDAE in an unsupervised manner and then it will be put directly into (a simplified version of) the CTR. Consequently, there is no interaction between the Bayesian SDAE and the collaborative filtering component based on matrix factorization and hence the prediction performance will suffer greatly. For the other extreme when λn\lambda_{n} is extremely small, λn/λv\lambda_{n}/\lambda_{v} will approach zero so that CDL degenerates to that in Figure 1 in which the decoder of the Bayesian SDAE component essentially vanishes. This way the encoder of the Bayesian SDAE component will easily overfit the latent item vectors learned by simple matrix factorization. As we can see in Figure 6, the prediction performance degrades significantly as λn\lambda_{n} gets very large or very small. When λn<0.1\lambda_{n}<0.1, the recall@MM is already very close to (or even worse than) the result of PMF.

5 Qualitative Comparison

To gain a better insight into CDL, we first take a look at two example users in the citeulike-t dataset and represent the profile of each of them using the top three matched topics. We examine the top 10 recommended articles returned by a 3-layer (L=6L=6) CDL and CTR. The models are trained under the sparse setting (P=1P=1). From Table 4, we can speculate that user I might be a computer scientist with focus on tag recommendation, as clearly indicated by the first topic in CDL and the second one in CTR. CDL correctly recommends many articles on tagging systems while CTR focuses on social networks instead. When digging into the data, we find that the only rated article in the training data is ‘What drives content tagging: the case of photos on Flickr’, which is an article that talks about the impact of social networks on tagging behaviors. This may explain why CTR focuses its recommendation on social networks. On the other hand, CDL can better understand the key points of the article (i.e., tagging and CF) to make appropriate recommendation accordingly. Consequently, the precision of CDL and CTR is 70% and 10%, respectively.

From the matched topics returned by both CDL and CTR, user II might be a researcher on blood flow dynamic theory particularly in the field of medical science. CDL correctly captures the user profile and achieves a precision of 100%. However, CTR recommends quite a few articles on astronomy instead. When examining the data, we find that the only rated article returned by CTR is ‘Simulating deformable particle suspensions using a coupled lattice-Boltzmann and finite-element method’. As expected, this article is on deformable particle suspension and the flow of blood cells. CTR might have misinterpreted this article, focusing its recommendation on words like ‘flows’ and ‘formation’ separately. This explains why CTR recommends articles like ‘Formation versus destruction: the evolution of the star cluster population in galaxy mergers’ (formation) and ‘Macroscopic effects of the spectral structure in turbulent flows’ (flows). As a result, its precision is only 30%.

From these two users, we can see that with a more effective representation, CDL can capture the key points of articles and the user preferences more accurately (e.g., user I). Besides, it can model the co-occurrence and relations of words better (e.g., user II).

We next present another case study which is for the Netflix dataset under the dense setting (P=10P=10). In this case study, we choose one user (user III) and vary the number of ratings (positive feedback) in the training set given by the user from 11 to 1010. The partition of training and test data remains the same for all other users. This is to examine how the recommendation of CTR and CDL adapts as user III expresses preference for more and more movies. Table 5 shows the recommendation lists of CTR and CDL when the number of training samples is set to 22, 44, and 1010. When there are only two training samples, the two movies user III likes are ‘Moonstruck’ and ‘True Romance’, which are both romance movies. For now the precision of CTR and CDL is close (20% and 30%). When two more samples are added, the precision of CDL is boosted to 50% while that of CTR remains unchanged (20%). That is because the two new movies, ‘Johnny English’ and ‘American Beauty’, belong to action and drama movies. CDL successfully captures the user’s change of taste and gets two more recommendations right but CTR fails to do so. Similar phenomena can be observed when the number of training samples increases from 44 to 1010. From this case study, we can see that CDL is sensitive enough to changes of user taste and hence can provide more accurate recommendation.

Complexity Analysis and Implementation

Following the update rules in this paper, the computational complexity of updating ui{\bf u}_{i} is O(K2J+K3)O(K^{2}J+K^{3}), where KK is the dimensionality of the learned representation and JJ is the number of items. The complexity for vj{\bf v}_{j} is O(K2I+K3+SK1)O(K^{2}I+K^{3}+SK_{1}), where II is the number of users, SS is the size of the vocabulary, and K1K_{1} is the dimensionality of the output in the first layer. Note that the third term O(SK1)O(SK_{1}) is the cost of computing the output of the encoder and it is dominated by the computation of the first layer. For the update of all the weights and biases, the complexity is O(JSK1)O(JSK_{1}) since the computation is dominated by the first layer. Thus for a complete epoch the total time complexity is O(JSK1+K2J2+K2I2+K3)O(JSK_{1}+K^{2}J^{2}+K^{2}I^{2}+K^{3}).

All our experiments are conducted on servers with 22 Intel E5-2650 CPUs and 44 NVIDIA Tesla M2090 GPUs each. Using the MATLAB implementation with GPU/C++ acceleration, each epoch takes only about 4040 seconds and each run takes 200200 epochs for the first two datasets. For Netflix it takes about 6060 seconds per epoch and needs much fewer epochs (about 100100) to get satisfactory recommendation performance. Since Netflix is much larger than the other two datasets, this shows that CDL is very scalable. We expect that changing the implementation to a pure C++/CUDA one would significantly reduce the time cost.

Conclusion and Future Work

We have demonstrated in this paper that state-of-the-art performance can be achieved by jointly performing deep representation learning for the content information and collaborative filtering for the ratings (feedback) matrix. As far as we know, CDL is the first hierarchical Bayesian model to bridge the gap between state-of-the-art deep learning models and RS. In terms of learning, besides the algorithm for attaining the MAP estimates, we also derive a sampling-based algorithm for the Bayesian treatment of CDL as a Bayesian generalized version of back-propagation.

Among the possible extensions that could be made to CDL, the bag-of-words representation may be replaced by more powerful alternatives, such as . The Bayesian nature of CDL also provides potential performance boost if other side information is incorporated as in . Besides, as remarked above, CDL actually provides a framework that can also admit deep learning models other than SDAE. One promising choice is the convolutional neural network model which, among other things, can explicitly take the context and order of words into account. Further performance boost may be possible when using such deep learning models.

Acknowledgments

This research has been partially supported by research grant FSGRF14EG36.

References

Appendix A Bayesian Treatment for CDL

For completeness we also derive a sampling-based algorithm for the Bayesian treatment of CDL. It turns out to be a Bayesian and generalized version of the well-known back-propagation (BP) learning algorithm. Due to space constraints we only list the results here without detailed derivation.

For Xl,j∗{\bf X}_{l,j*} (l≠L/2l\neq L/2): Similarly, we denote the concatenation of Wl{\bf W}_{l} and bl{\bf b}_{l} as Wl+{\bf W}_{l}^{+} and have

Note that for the last layer (l=Ll=L) the second Gaussian would be N(Xc,j∗∣Xl,j∗,λs−1I){\mathcal{N}}({\bf X}_{c,j*}|{\bf X}_{l,j*},\lambda_{s}^{-1}{\bf I}) instead.

For Xl,j∗{\bf X}_{l,j*} (l=L/2l=L/2): Similarly, we have

For vj{\bf v}_{j}: The posterior p(vj∣XL/2,j∗,R∗j,C∗j,λv,U)p({\bf v}_{j}|{\bf X}_{L/2,j*},{\bf R}_{*j},{\bf C}_{*j},\lambda_{v},{\bf U})

For ui{\bf u}_{i}: The posterior p(ui∣Ri∗,V,λu,Ci∗)p({\bf u}_{i}|{\bf R}_{i*},{\bf V},\lambda_{u},{\bf C}_{i*})

Interestingly, if λs\lambda_{s} goes to infinity and adaptive rejection Metropolis sampling (which involves using the gradients of the objective function to approximate the proposal distribution) is used, the sampling for W+{\bf W}^{+} turns out to be a Bayesian generalized version of BP. Specifically, as Figure 7 shows, after getting the gradient of the loss function at one point (the red dashed line on the left), the next sample would be drawn in the region under that line, which is equivalent to a probabilistic version of BP. If a sample is above the curve of the loss function, a new tangent line (the black dashed line on the right) would be added to better approximate the distribution corresponding to the loss function. After that, samples would be drawn from the region under both lines. During the sampling, besides searching for local optima using the gradients (MAP), the algorithm also takes the variance into consideration. That is why we call it Bayesian generalized back-propagation.