Neural Collaborative Autoencoder
Qibing Li Xiaolin Zheng Xinyue Wu
cs.LG cs.IR stat.ML









































































IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING (under review)
Shell et al.: Bare Advanced Demo of IEEEtran.cls for IEEE Computer Society Journals






































In recent years, deep neural networks have yielded state-of-the-art performance on several tasks. Although some recent works have focused on combining deep learning with recommendation, we highlight three issues of existing models. First, these models cannot work on both explicit and implicit feedback, since the network structures are specially designed for one particular case. Second, due to the difficulty on training deep neural networks, existing explicit models do not fully exploit the expressive potential of deep learning. Third, neural network models are easier to overfit on the implicit setting than shallow models. To tackle these issues, we present a generic recommender framework called Neural Collaborative Autoencoder (NCAE) to perform collaborative filtering, which works well for both explicit feedback and implicit feedback. NCAE can effectively capture the subtle hidden relationships between interactions via a non-linear matrix factorization process. To optimize the deep architecture of NCAE, we develop a three-stage pre-training mechanism that combines supervised and unsupervised feature learning. Moreover, to prevent overfitting on the implicit setting, we propose an error reweighting module and a sparsity-aware data-augmentation strategy. Extensive experiments on three real-world datasets demonstrate that NCAE can significantly advance the state-of-the-art. 
















	Recommender System, Collaborative Filtering, Neural Network, Deep Learning






Neural Collaborative Autoencoder
    Qibing Li, Xiaolin Zheng, Senior Member, IEEE, Xinyue Wu


Q. Li, X. Zheng and X. Wu are with the College of Computer Science and Technology, Zhejiang university, Hangzhou, China.



E-mail: qblee@zju.edu.cn, xlzheng@zju.edu.cn and wxinyue@zju.edu.cn

Manuscript received April 19, 2005; revised August 26, 2015.
    December 30, 2023
============================================================================================================================================================================================================================================================================================================================




























§ INTRODUCTION



§ INTRODUCTION


In recent years, recommender systems (RS) have played a significant role in E-commerce services. A good recommender system may enhance both satisfaction for users and profit for content providers. For example, nearly 80% of movies watched on Netflix are recommended by RS <cit.>. The key to design such a system is to predict users' preference on items based on past activities, which is known as collaborative filtering (CF) <cit.>. Among the various CF methods, matrix factorization (MF) <cit.> is the most used one, which models the user-item interaction function as the inner product of user latent vector and item latent vector. Due to the effectiveness of MF, many integrated models have been devised, such as CTR <cit.>, HFT <cit.> and timeSVD <cit.>. However, the inner product is not sufficient for capturing subtle hidden factors from the interaction data <cit.>.




Currently, a trend in the recommendation literature is the utilization of deep learning to handle the auxiliary information <cit.> or directly model the interaction function <cit.>. Thus, based on these two usage scenarios, deep learning based recommender systems can be roughly categorized into integration models and neural network models <cit.>.  Integration models utilize deep neural networks to extract the hidden features of auxiliary information, such as item descriptions <cit.>, user profiles <cit.> and knowledge bases <cit.>. The features are then integrated into the CF framework to perform hybrid recommendation.  Although integration models involve both deep learning and CF, they actually belong to MF-based models because they use an inner product to model the interaction data, and thus face the same issue like MF.

On the other hand, neural network models directly perform collaborative filtering via modeling the interaction data. Due to the effectiveness of deep components, neural network models are able to discover the non-linear hidden relationships from data <cit.>. For example, Collaborative Filtering Network (CFN) <cit.> is a state-of-the-art model for explicit feedback, which utilizes DAE <cit.> to encode sparse user/item preferences (rows or columns of the observed rating matrix) and aims to reconstruct them in the decoder layer. However, we notice that existing explicit neural models do not fully exploit the representation power of deep architectures; stacking more layers yields little performance gain <cit.>. This is mainly caused by two reasons. First, without a proper pre-training strategy, training deep neural networks is difficult <cit.>. Second, due to the sparse nature of RS, conventional layer-wise unsupervised pre-training <cit.> does not work in this case[Supervised pre-training in the first hidden layer is critical to the performance, since unsupervised reconstruction method may lose user/item information. (see Sec. <ref>)]. Besides, neural network models are easier to overfit on the implicit setting due to the highly non-linear expressiveness (i.e., predicting all ratings as 1, since observed interactions are all converted as 1). Neural Collaborative Filtering (NCF) <cit.> is a state-of-the-art implicit neural model that can capture the non-linear hidden factors while combatting overfitting (NCF samples negative feedback from unobserved data to perform pairwise learning like BPR). However, the NCF architecture is designed at the interaction level, which is time-consuming to rank all items for all users during evaluation. Furthermore, providing more item correlation patterns may be the key factors to combat overfitting for implicit neural models (see the discussion in Sec. <ref>).








To address the aforementioned issues, we present a simple deep learning based recommender framework called Neural Collaborative Autoencoder (NCAE) for both explicit feedback and implicit feedback. The central idea of NCAE is to learn hidden structures that can reconstruct user/item preferences via a non-linear matrix factorization process. The NCAE architecture is designed at the user/item level, which takes the sparse user or item vectors as inputs for batch training and evaluation. By utilizing a sparse forward module and a sparse backward module, NCAE is scalable to large datasets and robust to sparse data; a new training loss is also designed for sparse user/item inputs. We further develop a novel three-stage pre-training mechanism, combining supervised and unsupervised feature learning to train the deep architecture of NCAE. As a result, NCAE with deeper architectures is more powerful and expressive for explicit feedback. Besides, NCAE includes two ingredients to prevent overfitting on the implicit setting: an error reweighting module that treats all unobserved interactions as negative feedback (i.e., whole-based method <cit.>), and a sparsity-aware data-augmentation strategy that provides more item correlation patterns in training and discovers better ranking positions of true positive items during inference. The key contributions of this paper are summarized as follows: 


  * We present a scalable and robust recommender framework named NCAE for both explicit feedback and implicit feedback, where we adapt several effective approaches from the deep learning literature to the recommendation domain, including autoencoders, dropout, pre-training and data-augmentation. NCAE can capture the subtle hidden factors via a non-linear matrix factorization process.

  * Thanks to the effectiveness of three-stage pre-training mechanism, NCAE can exploit the representation power of deep architectures to learn high-level abstractions, bringing better generalization. We further explore several variants of our proposed pre-training mechanism and compare our method with conventional pre-training strategies to better understand its effectiveness.

  * Compared with other implicit neural models, NCAE can utilize the error reweighting module and the sparsity-aware data augmentation to combat overfitting, and thus performs well on the implicit setting without negative sampling.

  * Extensive experiments on three real-world datasets demonstrate the effectiveness of NCAE on both explicit and implicit settings.




The paper is organized as follows. In Section <ref>, we discuss related work on applying neural networks to recommender systems. In Section <ref>, we provide the problem definition and notations. We describe the proposed NCAE in Section <ref>. We conduct experiments in Section <ref> before concluding the paper in Section <ref>.



§ RELATED WORK


We review the existing models in two groups, including integration models and neural network models <cit.>.

Integration models combine DNNs with the CF framework such as PMF <cit.> to perform hybrid recommendation, which can deal with the cold-start problem and alleviate data sparsity. The deep components of integration models are primarily used to extract the hidden features of auxiliary information <cit.>. For example, Collaborative Deep Learning (CDL) <cit.> integrates Stack Denoising Autoencoder (SDAE) <cit.> and PMF <cit.> into a unified probabilistic graph model to jointly perform deep content feature learning and collaborative filtering. However, integration models utilize an inner product to model the interaction data, which is not sufficient for capture the complex structure of interaction data <cit.>. Different from integration models, NCAE can model the interaction function via a non-linear matrix factorization process. Our focus is to design a deep learning based recommender framework for both explicit feedback and implicit feedback. Therefore, we remain the hybrid recommender (combining NCAE with deep content feature learning) to the future work.




Neural network models utilize DNNs to learn the interaction function from data, which are able to discover the non-linear hidden relationships <cit.>. We may further divide neural network models into two sub-categories: explicit neural models and implicit neural models. Restricted Boltzmann Machine (RBM) for CF <cit.> is the early pioneer work that applies neural networks to explicit feedback. Recently, autoencoders have become a popular building block for explicit models <cit.>. For example, <cit.> proposes CFN that achieves the best performance for explicit feedback (with well-tuned parameters and additional data pre-precessing). Compared to CFN, our NCAE employs a new training loss to balance the impact of sparse user/item vectors and achieves comparable performance without complex procedures of CFN. By utilizing the three-stage pre-training, NCAE with deeper architectures is more powerful and expressive than CFN. To our best knowledge, NCAE obtains a new state-of-the-art result for explicit feedback. On the other hand, implicit neural models also exploit the representation capacity of neural networks and combat overfitting by sampling negative interactions. Compared to the state-of-the-art implicit model NCF, our NCAE takes user vectors as inputs for batch evaluation; NCAE explicitly gathers information from other users for batch training, which may be a better network structure for CF (see Sec. <ref>). Besides, the error reweighting module and the sparsity-aware data-augmentation can provide more item correlation patterns for NCAE, greatly enhancing the top-M recommendation performance. Overall, NCAE is a generic framework for CF that performs well on the two settings.




§ PROBLEM DEFINITION


We start by introducing some basic notations. Matrices are written as bold capital letters (e.g., 𝐗) and vectors are expressed as bold lowercase letters (e.g., 𝐱). We denote the i-th row of matrix 𝐗 by 𝐗_i and its (i, j)-th element by 𝐗_ij. For vectors, 𝐱_i denotes the i-th element of 𝐱.

In collaborative filtering, we have M users, N  items and a partially observed user-item rating matrix =[_ij]_M × N. Fig. <ref> shows an example of explicit feedback and implicit feedback. Generally, explicit feedback problem can be regarded as a regression problem on observed ratings, while the implicit one is known as a one-class classification problem <cit.> based on interactions.
 

We let ℛ denote the set of user-item pairs (i,j,r_ij) where values are non-zero, ℛ̅ denote the set of unobserved, missing triples. Let  denote the set of item preferences in the training set for a particular user i; similar notations for ℛ̅_i. The goal of the recommender system is to pick a subset of items from the candidate set ℛ̅_i for each user i. Besides, we use a sparse vector ∈ℝ^N as the input of NCAE, which has only || observed values of user i: _ij=r_ij if j is in , otherwise, _ij=0; ,  are the corrupted version of  and the dense estimate of _i; similar notations , ,  and  for each item j. 

For neural network settings, K_l, ^l ∈ℝ^K_l× K_l-1, ^l ∈ℝ^K_l are represented as the hidden dimension, the weight matrix and the bias vector of the l-th layer. L is the number of layers. For convenience, we use ^+ to denote the collection of all weights and biases. ^l and ^l ∈ℝ^K_l are the activation function and the activation output vector of layer l, respectively. In our work, we use tanh(·) as activation function ^l for every layer l.



§ PROPOSED METHDOLOGY


In this section, we first introduce a new recommender framework — Neural Collaborative Autoencoder (NCAE), which consists of an input dropout module, a sparse forward module, a sparse backward module and an error reweighing module. Then we propose a sparsity-aware data-augmentation strategy and a three-stage layer-wise pre-training mechanism to enhance the performance.



 §.§ Neural Collaborative Autoencoder



Previous work based on autoencoders can be simply categoried into two style: user-based and item-based <cit.>. For simplicity, the user-based autoencoder is considered in our paper[Item-based autoencoders will be used for explicit feedback in the experiments.]. The collaborative filtering problem can be interpreted based on autoencoders: transform the sparse vector  into dense vector  for every user i. Formally, user-based NCAE is defined as:

    =nn()=^L_i=ϕ^L(^L(..ϕ^1(^1+ ^1)..)+^L),

where the first L-1 layer of NCAE aims at building a low-rank representation for user i, and the last layer L can be regarded as item representation learning or a task-related decoding part. For the explicit setting, we make a slight modification and let nn()=2.25*^L_i+2.75, since ratings are 10 scale with 0.5 constant increments (0.5 to 5.0) and the range of tanh(·) is [-1,1]. 

In general, NCAE is strongly linked with matrix factorization. For NCAE with only one hidden layer and no output activation function, nn()=^2ϕ^1(^1+ ^1)+^2 can be reformulated as:

    =nn()=[^2 𝐈_N]_𝐕)
    	[[ ϕ^1(^1+ ^1);          ^2;             ]]_𝐔_i,

where 𝐕 is the item latent matrix and 𝐔_𝐢 is the user latent factors for user i. NCAE with more hidden layers and output activation function ϕ^L can be regarded as non-linear matrix factorization, aiming at learning deep representations. A nice benefit of the learned NCAE is that it can fill in every vector , even if that vector was not in the training data.

Fig. <ref> shows a toy structure of three-layer NCAE, which has two hidden layers and one output layer. Formal details are as follows.




Input Dropout Module.Like denoising autoencoder (DAE) <cit.>, NCAE learns item correlation patterns via training on a corrupted preference set . The only difference is that NCAE only corrupts observed ratings, i.e., non-zero elements of . As shown in Fig. <ref> (left panel), for sparse vector _4, only v_1, v_3, v_5 are considered and v_5 is finally dropped. This promotes more robust feature learning, since it forces the network to balance the rating prediction and the rating reconstruction. 

In general, corruption strategies include two types: the additive Gaussian noise and the multiplicative drop-out/mask-out noise. In our work, dropout <cit.> is used to distinguish the effects of observed items. For every epoch, the corrupted input  is generated from a conditional distribution p(|) and non-zero values in  are randomly dropped out (set to 0) independently with probability q:

    P(_id = δ_id) = 1-q
       P(_id=0)=q.


To make the corruption unbiased, uncorrupted values in  are set to δ=1/(1-q) times their original values. We find q=0.5 usually leads to good results. When predicting the dense , NCAE takes uncorrupted  as input.

Sparse Forward Module. In collaborative filtering, the rating matrix  is usually very sparse, i.e., more than 95% unobserved values. To handle the sparse input  or corrupted , NCAE will ignore the effects of unobserved values, in both forward stage and backward stage. For missing values in , the input edges (a subset of W^1) and the output edges (a subset of W^L, when training) will be inhibited by zero-masking.

Formally, in the input layer (l=0) and the output layer (l=L), there are N nodes for all items. For hidden layer l<L, there are K_l nodes, K_l ≪ N. As shown in Fig. <ref> (left panel), we only forward _41, _43, _45 with their linking weights. Specifically, when NCAE first maps the input  to latent representation ^1_i, we only need to forward non-zero elements of  with the corresponding columns of ^1:

    ^1_i = ϕ^1(^1+ ^1)=ϕ^1(∑_j ∈^1_*,j_ij),

where ^1_*,j represents the j-th column vector of W^1. This reduces the time complexity from O(K_1N) to O(K_1||), || ≪ N. For every middle layer, forward and backward procedures follow the same training paradigm like MLP with O(K_lK_l-1). In the output layer, the latent low-rank representation ^L-1_i is then decoded back to reconstruct the sparse  in training or to predict the dense  during inference. Finally, the recommendation list for user i is formed by ranking the unrated items in .  

Sparse Backward Module.To ensure that unobserved ratings do not bring information to NCAE, errors for them are turned to be zero before back-propagation. In other words, no error is back-propagated for missing values via zero-masking[Otherwise, NCAE learns to predict all ratings as 0, since missing values are converted to zero and the rating matrix  is quite sparse.]. As shown in Fig. <ref> (middle panel), unobserved  v_2 and v_4 are ignored, and error for v_3 is computed as |nn()_3-_i3|, similarly for v_1, v_5. Furthermore, we can emphasize the prediction criterion and the reconstruction criterion for errors of observed ratings via two hyperparameters α and β, respectively. Then we employ a new loss function for sparse rating inputs, which separates the two criteria and disregard the loss of unobserved ratings:


    _2,α,β(,   ) =  α/|𝒦()|( ∑_j ∈𝒞()∩𝒦() [nn()_j - _ij]^2) + 
       β/|𝒦()|( ∑_j ∈𝒦()-𝒞() [nn()_j - _ij]^2),

where 𝒦() are the indices for observed values of , 𝒞() are the indices for dropped elements of . Take the user vector _4 for example,  𝒦(_4)={1,3,5} and 𝒞(_4)={5}. Different from <cit.>, we divide the loss of DAE by |𝒦()| (equals to ||) to balance the impact of each user i on the whole. Actually, NCAE performs better than other methods even when we directly set α=β=1 for all experiments. Finally, we learn the parameters of NCAE by minimizing the following average loss over all users:

    ℒ = 1/M∑_i=1^M_2,α,β(,) + λ/2 ||^+||^2,

where we use the squared L2 norm as the regularization term to control the model complexity.


During back-propagation, only weights that are connected with observed ratings are updated, which is common in MF and RBM methods. In practice, we apply Stochastic Gradient Descent (SGD) to learn the parameters. For user i, take ∂ℒ/∂^L_j, ∂ℒ/∂^L_j and ∂ℒ/∂^L_i as a example:

    ∂ℒ/∂^L_j=∂/∂_ij∂_ij/∂^L_j+λ^L_j,


    ∂ℒ/∂^L_j=∂/∂_ij∂_ij/∂^L_j+λ^L_j,


    ∂ℒ/∂^L_i= ∑_j ∈∂/∂_ij∂_ij/∂^L_i.


This leads to a scalable algorithm, where one iteration for user i runs on the order of the number of non-zero entries. The time complexity is reduced from O(NK_L-1) to O(||K_L-1), || ≪ N.

Error Reweighting Module.As mentioned before, neural network models are easier to overfit on the implicit setting, since only the observed interactions are provided and the model may learn to predict all ratings as 1. To combat overfitting, we introduce a set of variables c_ij to determine which unobserved items a user do not like and then propose an error reweighting module for implicit NCAE. Specifically, unobserved values of  are turned to zero, and errors for them are first computed as |nn()_j-0|, then reweighted by the confidence level c_ij. In general, we can parametrize c_ij based on user exposure <cit.> or item popularity <cit.>. 

In our work, we implement a simple error reweighting module based on item popularity, since we do not use any auxiliary information (beyond interactions). Similar to <cit.>, we assume that popular items not interacted by the user are more likely to be true negative ones. Therefore, unobserved values of  on popular items means that the user i is not interested with those items <cit.>. We can reweight errors of unobserved places by item popularity c_j:

    c_j= c_0 f_j^ω/∑_k=1^Nf_k^ω,

where f_j denotes the frequency of item j: ||/ ∑_k=1^N |ℛ_k|. c_0 is the initial confidence for unobserved values and ω controls the importance level of popular items. As shown in Fig. <ref> (right panel), we assume that the item popularity vector is precomputed as [0.17, 0.25, 0.33, 0.17, 0.08], and errors for missing places v_2 and v_4 are reweighted by 0.25 and 0.17, respectively. Finally, we propose a new loss function for implicit NCAE:

    _2(,) = ∑_j ∈𝒦() [nn()_j-_ij]^2+∑_j ∈𝒥-𝒦()c_j[nn()_j]^2,

where 𝒥={1,2,...,N}. We set α=1 and β=1, and do not divide the loss by |𝒦(x)|, since it is whole-based optimization for all items of . During back-propagation, the time complexity of one user is O(NK_L-1), which is impractical when the number of items is large. An alternative solution is to build a feature-wise update scheme on the output layer <cit.>, which will reduce the complexity to O((K_L-1+||)K_L-1).



 §.§ Sparsity-aware Data Augmentation

In general, the input dropout module and the error reweighting module proposed in Sec. <ref> can provide more item correlation patterns via reweighting the input and the output error, respectively. It is empirically observed that these modules can effectively combat overfitting on the implicit setting. Following this way of thinking, data augmentation strategy can be utilized to provide more item correlation patterns directly with data pre-processing. However, unlike the augmentation on images, which enlarges the dataset using label-preserving transformations like image rotation <cit.>, how to select item correlation patterns without losing the item ranking order of user preferences is a key challenge on the implicit setting, since observed interactions are all represented as 1. In general, we have several alternatives to address this problem. For instance, for a particular user, we can reserve items that are viewed the most by him/her or that have similar contents.

 






As mentioned before, we only use the interaction data. Therefore, we employ a distinct form of augmentation based on item popularity, called sparsity-aware data-augmentation. The main assumptions include two points: only the users whose ratings are sparse need to be augmented, which reduces the biases caused by denser users that have interacted with more items; less popular items interacted by a user are more likely to reveal his/her interest. Hence, we can drop popular items from the sparse vector  to construct augmented sample 𝐮_i' and reserve the most relevant item correlation patterns. 

Fig. <ref> shows a toy example, where r_23 is dropped from u_2 to construct u_2', since v_3 is the most popular one that contributes least on the user profile. Specifically, we introduce a sparsity threshold ϵ and a drop ratio p to control the scale of augmented set. The augmentation procedure follows: If ||/N < ϵ, we will augment  and drop the top ⌊||*p⌋ popular items to form 𝐮_i'.




 §.§ Greedy Layer-wise Training

For explicit feedback, we can employ the NCAE architecture with stacks of autoencoders to learn deep representations. However, learning is difficult in multi-layer architectures. Generally, neural networks can be pre-trained using RBMs, autoencoders or Deep Boltzmann Machines to initialize the model weights to sensible values <cit.>. Hinton et al. <cit.> first proposed a greedy, layer-by-layer unsupervised pre-training algorithm to perform hierarchical feature learning. The central idea is to train one layer at a time with unsupervised feature learning and taking the features produced at that level as input for the next level. The layer-wise procedure can also be applied in a purely supervised setting, called the greedy layer-wise supervised pre-training <cit.>, which optimizes every hidden layer with target labels. However, results of supervised pre-training reported in <cit.> were not as good as unsupervised one. Nonetheless, we observe that supervised pre-training combined with unsupervised deep feature learning gives the best performance. We now explain how to build a new layer-wise pre-training mechanism for recommender systems, and define:

Definition 1:
Shallow Representation(SR) for user i is the first layer hidden activation ^1_i with supervised pre-training, where ^1_i=ϕ^1(^1+ ^1).

Definition 2:
Deep Representation(DR) for user i is the L-1 layer hidden activation ^L-1_i with unsupervised pre-training using SR, where ^L-1_i=ϕ^L-1(^L-1(..ϕ^2(^2^1_i+ ^2)..)+^L-1).

Definition 3:
Item Representation(V) for user-based NCAE is the L layer weight matrix, where V=^L. Similar definition for U of item-based one.




Following the definitions, the proposed layer-wise pre-training can be divided into three stages: supervised SR learning, unsupervised DR learning and supervised V learning. Here we consider a three-layer NCAE. Formal details are as follows:

Supervised SR Learning.
To train the weights between the input layer and the SR layer, we add a decoder layer on top of SR to reconstruct the input, as shown in Fig. <ref>, stage 1. Formally:

    ^1_i=ϕ^1(^1+ ^1) 
       ^'1_i=ϕ^'1(^'1^1_i+ ^'1),

where ^'1, ^'1, ^'1_i and ϕ^'1 are the weight matrix, the bias vector, the activation output and the activation function for the first decoder. Similar notations for the decoder of layer l are used in the rest of paper. We use ^'1_i*2.25+2.75 as estimates ^' on the explicit setting.

Different from conventional unsupervised pre-training strategies that reconstruct the dense vector of  (or reconstruct observed places of  without introducing noise), we use the supervised signal _i to form an encoder-decoder scheme. Therefore, we minimize the loss function ∑_i=1^M_2,α,β(^'1_i,_i)/M like Eq. (<ref>) to train ^1, ^'1, ^1 and ^'1. Supervised SR pre-training balances the prediction and the reconstruction criteria in the first layer and encourages the network to discover better item correlation patterns of the sparse input.

Unsupervised DR Learning.
After the SR is learned, the weights ^1 and ^1 of the first layer are frozen, and the decoder part of SR is removed. Then we add a new hidden layer with its decoder part on top of SR layer to perform unsupervised DR learning, as shown in Fig. <ref>, stage 2. Similar to the unsupervised training procedure proposed by <cit.>, only the new added top layer is trained. Thus, we can minimize the square loss between SR and corresponding decoder output ^'2 to train ^2, ^'2, ^2 and ^'2:

    min_^2, ^'2, ^2,^'21/MK_1∑_i=1^M∑_k=1^K_1 (^'2_ik-^1_ik)^2,

where K_1 is the hidden dimension of the SR layer. We take average over elements of ^1_i to ensure DR ^2_i can effectively reconstruct each hidden factor of SR. Furthermore, DR learning can be implemented by multi-layer autoencoders with unsupervised pre-training.

Supervised 𝐕 Learning.
In this stage, we perform a supervised pre-training for the top layer (see Fig. <ref>, green connection of V).  The main purpose of this stage is to find a better weight initializer for V to reduce the shrinking between layers caused by back-propagating large top error signals when fine-tuning the whole network. Specifically, after DR is learned, we fix weights ^2 and ^2 along with ^1, ^1 (or formally ^L-1, ^L-1, ..., ^1, ^1), and remove the decoder part. However, there is no need for adding a new decoder part in this stage, for the reason ^L_i is task-related:

    nn()=^L_i=ϕ^L(^L^L-1_i+ ^L),

where L=3 in this case. Similar to stage 1, supervised signal  is used to train V and minimize the following average loss function:

    min_^L, ^L1/M∑_i=1^M_2,α,β(nn(),_i).


After layer-by-layer pre-training, the parameters of NCAE are usually initialized close to a fairly good solution (see Sec. <ref> for details). Finally, we can perform fine-tuning using supervised back-propagation, minimizing the Eq. (<ref>) corresponding to all parameters ^+ to get a better task-related performance. 



§ EXPERIMENTS




In this section, we conduct a comprehensive set of experiments that aim to answer five key questions: (1) Does our proposed NCAE outperform the state-of-the-art approaches on both explicit and implicit settings? (2) How does performance of NCAE vary with model configurations? (3) Is the three-stage pre-training useful for improving the expressiveness of NCAE? (4) Do the error reweighting module and the sparsity-aware data augmentation work on the implicit setting? (5) Is NCAE scalable to large datasets and robust to sparse data?





 §.§ Experimental Setup

We first describe the datasets and the training settings, and then elaborate two evaluation protocols, including evaluation metrics, compared baselines and parameter settings.

Datasets.
To demonstrate the effectiveness of our models on both explicit and implicit settings, we used three real-world datasets obtained from MovieLens 10M[<https://grouplens.org/datasets/movielens/10m>], Delicious[<https://grouplens.org/datasets/hetrec-2011>] and Lastfm[5]. MovieLens 10M dataset consists of user's explicit ratings on a scale of 0.5-5. For Delicious and Lastfm datasets, we consider a user feedback for an item as ‘1’ if the user has bookmarked (or listened) the item. Table <ref> summarizes the statistics of datasets.


Training Settings.
We implemented NCAE using Python and Tensorflow[<https://www.tensorflow.org>], which will be released publicly upon acceptance. Weights of NCAE are initialized using Xavier-initializer <cit.> and trained via SGD with a mini-batch size of 128. Adam optimizer <cit.> is used to adapt the step size automatically with the learning rate set to 0.001. We use grid search to tune other hyperparameters of NCAE and compared baselines on a separate validation set. Then the models are retrained on the training plus the validation set and finally evaluated on the test set. We repeat this procedure 5 times and report the average performance.


Methodology.
We evaluate with two protocols: 

- Explicit protocol. We randomly split MovieLens 10M dataset into 80%-10%-10% training-validation-test datasets. Since ratings are 10-scale, we use Root Mean Square Error (RMSE) to evaluate prediction performance <cit.>:







    RMSE= √(1/|𝐑_te|∑_τ=1^|𝐑_te|(R_τ -R̂_̂τ̂)^2)

where |𝐑_te| is the number of ratings in the test set, _τ is the real rating of an item and R̂_̂τ̂ is its corresponding predicted rating. For the explicit setting, we compare NCAE with the following baselines:


  * ALS-WR <cit.> is a classic MF model via iteratively optimizing one parameter with others fixed.

  * BiasedMF <cit.> incorporates user/item biases to MF, which performs gradient descent to update parameters.

  * SVDFeature <cit.> is a machine learning toolkit for feature-based collaborative filtering, which won the KDD Cup for two consecutive years.

  * LLORMA <cit.> usually performs best among conventional explicit methods, which relaxes the low-rank assumption of matrix approximation.

  * I-AutoRec <cit.> is a one-hidden layer neural network, which encodes sparse item preferences and aims to reconstruct them in the decoder layer.

  * V-CFN <cit.> is a state-of-the-art model for explicit feedback, which is based on DAE. This model can be considered as an extension of AutoRec.  


In the experiments, we train a 3-layer item-based NCAE for MovieLens 10M dataset, which has two hidden layers with equal hidden factors K. We employ K as 500 unless otherwise noted. For regularization, we set weight decay λ=0.0002 and input dropout ratio q=0.5. Parameter settings for compared baselines are the same in original papers. We compare NCAE with the best results reported in authors' experiments under the same 90% (training+validation)/10% (test) data splitting procedure. 




- Implicit protocol. Similar to <cit.>, we adopt the leave-one-out evaluation on Delicious and Lastfm datasets, where the latest interaction of each user is held out for testing. To determine the hyperparameters, we randomly sample one interaction from the remaining data of each user as the validation set. We use Hit Ratio (HR) and Normalized Discounted Cumulative Gain (NDCG) for top-M evaluations, and report the score averaged by all users. Without special mention, we set the cut-off point to 100 for both metrics. We compare NCAE with the following top-M methods:














  * POP is a non-personalized model that rank items by their popularity. We use the implementation in <cit.>.

  * BPR <cit.> samples negative interactions and optimizes the MF model with a pairwise ranking loss. We set the learning rate and weight decay λ to the best values 0.1 and 0.01.

  * WMF <cit.> treats all unobserved interactions as negative instances, weighting them uniformly via a confidence value c. We set c and λ to the best values 0.05 and 0.1.

  * eALS <cit.> is a state-of-the-art MF-based model, weighting all unobserved interactions non-uniformly by item popularity. We set λ to the best value 0.05.

  * NCF <cit.> is a state-of-the-art neural network model for implicit feedback that utilizes a multi-layer perceptron to learn the interaction function. Similar to <cit.>, we employ a 4-layer MLP with the architecture of 2K→K→K/2→1, where the embedding size for the GMF component is set to K. 



We train a 2-layer user-based NCAE for the two datasets. Since it is easier to overfit the training set on the implicit setting, we set input dropout ratio q=0.5 and weight decay λ=0.01, and further utilize the error reweighing module and the sparsity-aware data augmentation strategy. Similar to <cit.>, we compute the item popularity using empirical parameters (c_0=512 and ω=0.5) for both NCAE and eALS. For a fair comparison, we report the performance of all methods when K is set to [8, 16, 32, 64, 128]. We employ K as 128 for NCAE unless otherwise noted.



 §.§ Explicit Protocol


We first study how model configurations impact NCAE's performance. Then we demonstrate the effectiveness of pre-training. Finally we compare NCAE with explicit baselines.

1) Analysis of Model Configurations







































Table <ref> shows the performance of NCAE with different configurations, where "SINGLE" means one hidden layer, "*" means the utilization of our pre-training mechanism, and the size of hidden factors K is set to [200, 300, 400, 500]. It can be observed that increasing the size of hidden factors is beneficial, since a larger K generally enlarges the model capacity. Without pre-training, NCAE with two hidden layers may perform worse than that with one hidden layer, which is due to the difficulty on training deep architectures. NCAE with pre-training performs better than that without pre-training, especially when a deeper architecture is used.


2) Utility of Pre-training

To demonstrate the utility of three-stage pre-training, we conducted two sub-experiments: effectiveness analysis for SR, DR and V components; performance comparison with conventional pre-training strategies. Firstly, we term "U" as "unsupervised" and "S" as "supervised". Thus, "S+U+S" means our proposed three-stage pre-training method, and "S+U" means "supervised + unsupervised" pre-training for the first two layers. Besides, "BP(None)" means NCAE without pre-training and "DOUBLE" means NCAE with two-hidden layers (3-layer NCAE). For a fair comparison, we set layer-wise pre-training epochs to 10 for each layer of compared strategies. It takes nearly 6.3 seconds per epoch.

Fig. <ref>(a,b) shows the training/test RMSE curves of NCAE on different pre-training configurations, where epoch-0 outputs RMSE after pre-training. From it, we get: 



  * Compared with "BP(None)", "S+U+S" gets lower RMSE on epoch-0 in both learning and inferring phases, and brings better generalization after fine-tuning, indicating  the usefulness of pre-training for initializing model weights to a good local minimum.

  * "S+U+S" gets better generalization on the test set than one-hidden layer NCAE with "S+S", verifying the necessity of DR to learn high-level representation of the input. Besides, "S+S" performs best on the training set, but gets worst RMSE on the test set (even when we set a larger weight decay λ), which may be caused by overfitting or its model capacity. 

  * "S+U+S" performs better than "S+U" at the beginning of learning phase, indicating that V pre-training can keep the top error signal in a reasonable range, and thus reduce weight shrinking in the lower layers when fine-tuning. Moreover, RMSE of "S+U+S" increases slightly at the beginning, which is in accord with the hypothesis of shrinking.


Fig. <ref>(c,d) shows the performance of 3-layer NCAE with different pre-training strategies. From it, we get: 


  * "U+U" performs worst in both learning and inferring phases. The greedy layer-wise unsupervised pre-training do not emphasize the prediction criterion. Therefore, the network cannot preserve the task-related information as the layer grows (compared to "U+S" and "S+S") due to the sparsity nature of the recommendation problem.

  * "S+U+S" outperforms "S+S" at the beginning of learning and finally gets similar generalization power. This shows the effectiveness of greedy layer-wise supervised pre-training. "S+S" also performs similarly to "S+U" (see DR(S+U)). However, since M and N are usually large, i.e., M≫ K and N≫ K, supervised pre-training for all layers is time-consuming and space-consuming. Besides, "S+U+S" can reduce the shrinking of weights.

  * Comparing "U+S" with "S+S" and "S+U+S", we can observe that supervised SR pre-training in the first layer is critical to the final performance; SR learning balances the prediction criterion and the reconstruction criterion, encouraging the network to learn a better representation of the sparse input.


3) Comparisons with Baselines


Table <ref> shows the performance of NCAE and other baselines on ML-10M, where the results of baselines are taken from original papers under the same 90%/10% data splitting. We conducted one-sample paired t-tests to verify that  improvements of NCAE and NCAE* are statistically significant for sig<0.005. NCAE without pre-training has already outperformed other models, which achieves RMSE of 0.775. Note that the strong baseline CFN shares a similar architecture like NCAE, but employs well-tuned parameters (α and β) and additional input pre-processing. The new training objective of NCAE (Eq. <ref>, which balances the impact of each user) provides further performance gain even without these procedures. The performance can be further enhanced by using three-stage pre-training, with a test RMSE of 0.767. This demonstrates that the proposed pre-training method can enhance the expressiveness of NCAE, bringing better generalization.


 §.§ Implicit Protocol


We first study how the sparsity-aware data augmentation impacts NCAE's performance. Then we compare NCAE with several top-M methods in detail. 































































































To illustrate the impact of our data-augmentation strategy, we show the performance of NCAE w.r.t. sparsity threshold ϵ and drop ratio p in Fig. <ref>(a). Noticeably, p=1.0 means that we drop all ratings of one user, i.e., we do not use data-augmentation in this case (with a NDCG@100 of 0.125). NCAE achieves the best performance when ϵ=0.001 and p=0.8, with a NDCG@100 of 0.165. This demonstrates that the proposed augmentation strategy can preserve the item ranking order while providing more item correlation patterns, and thus improve the top-M performance. We then study the performance of NCAE on the HR@100 metric, where "NCAE+" means NCAE with data augmentation, ϵ=0.001 and p=0.8. As shown in Fig. <ref>(b), we can see that the data-augmentation strategy can speed up convergence at the beginning of learning and finally get a better HR@100. The relative improvement on NDCG@100 (32.0%) is much larger than on HR@100 (4.2%), indicating that NCAE+ can discover better ranking positions of true positive items during inference. 

Table <ref> shows the recommendation performance w.r.t users with different scale of interactions on Delicious. For instance, the second user cluster "1-5(68)" contains 68 users with the number of ratings in (1,5] (except [0,1] on the first cluster). As can be seen, NCAE+ consistently outperforms NCAE, with the relative improvements of 127.1%, 55.0%, 36.4%, 52.9%, 19.6% (averaged by two metrics) on the five clusters. The sparsity-aware data augmentation can improve  inactive user recommendation, since more item correlation patterns are provided for sparse users.
















2) Comparisons with Baselines




































































































To illustrate the effectiveness of our NCAE architecture, we propose a variant "NCAE-" that reweights the errors of all unobserved interactions uniformly with a confidence value c=0.05, which is the same to WMF. Specifically, we do not plot the results of NCAE- with c=0, since it is easy to overfit the training set and gives poor predictive performance without the error reweighting module. Besides, "NCAE+" means the utilization of data-augmentation. 

Fig. <ref> and Fig. <ref> show the performance of HR@100 and NDCG@100 on Delicious and Lastfm with respect to the number of hidden factors K. First, we can see that, with the increase of K, the performance of most models is greatly improved. This is because a larger K generally enlarges the model capacity. However, large factors may cause overfitting and degrade the performance, e.g., eALS on Lastfm. Second, comparing two whole-based (uniform) methods NCAE- and WMF, we observe that by using non-linear matrix factorization, NCAE- consistently outperforms WMF by a large margin. The high expressiveness of neural network models is sufficient to capture subtle hidden factors when modeling the interaction data. The same conclusion can be obtained from the comparison of two sample-based methods NCF and BPR. Third, NCAE achieves the best performance on both datasets, significantly outperforming the strong baselines NCF and eALS. Specifically, the average improvements of NCAE+ over other models[We compute the relative improvements on both HR@100 and NDCG@100 metrics for all models except POP, since POP do not work on Delicious dataset. We report the average improvements of NCAE over all baselines and metrics.] are 170.4%, 312.9%, 170.0%, 126.4%, 111.0% when K=8, 16, 32, 64, 128 on Delicious, verifying the effectiveness of our architecture and sparsity-aware data-augmentation. On Lastfm dataset, NCAE+ do not significantly outperforms NCAE, which is different to that on Delicious. We notice that there are two significant differences on the two datasets: 1) Lastfm is denser than Delicious; 2) Users of Lastfm are more preferred to listen the popular artists, which can be observed from the excellent performance of POP method on Lastfm. Thus, our data-augmentation strategy that drops popular items may not work well on Lastfm. The average improvements of NCAE+ over other models are 70.5%, 68.7%, 72.4%, 77.5%, 78.1% when K=8, 16, 32, 64, 128 on Lastfm.



Fig. <ref> and Fig. <ref> show the performance of Top-M recommendation, where K is set to the best value for each model. First, we can see that eALS and NCF are strong baselines that beats BPR and WMF for all M, which is consistent with the results of <cit.>. Second, neural network models (e.g., NCF and NCAE-) outperform other models, especially on NDCG@M metrics of Delicious dataset, verifying the highly non-linear expressiveness of neural architectures. The performance of NCAE- can be further enhanced via utilizing the popularity-based error reweighting module (NCAE) and the sparsity-aware data augmentation (NCAE+). Lastly, NCAE+ consistently outperforms the best baseline NCF for every ranking position M, with the relative improvements of 33.0%, 24.3%, 22.3%, 20.5%, 18.1% when M=50, 100, 150, 200, 250 on Delicious, and 41.5%, 30.7%, 29.7%, 26.5%, 28.1% on Lastfm. Note that NCAE has fewer parameters than NCF (NCF stacks three hidden layers while NCAE is a shallow network). The autoencoder-based structures that directly take user vectors as inputs for batch training, may be better for collaborative filtering (the architecture of NCF is designed at the interaction level). Generally, the smaller M is, the larger improvement of NCAE+ against other models, indicating the reliability of our model on top-M recommendation.


































 §.§ Robustness and Scalability

1) Analysis of Robustness


We now explore the robustness of eALS, NCF and NCAE+ to different proportions of training set exploited. We randomly sample a D proportion of interaction data from each user. The test set and the hyperparameters remain unchanged. As shown in Table <ref>, we can observe that NCAE+ significantly outperforms the strong baselines eALS and NCF over all ranges of D, and NCAE+ (40%) has already performed slightly better than eALS (80%) and NCF (60%). Specifically, the average improvements of NCAE+ over eALS are 50.4%, 62.4%, 66.3% when training density D=80%, 60%, 40% on top-50 metrics, and 35.2%, 35.9%, 50.0% on top-100 metrics. Generally, as the training set gets sparser, NCAE+ gets a larger improvement against eALS (or NCF). This demonstrates the robustness of our model under the sparsity scenario.


2) Scalability and Computation Time

Analytically, by utilizing the sparse forward module and the sparse backward module[We use tf.sparse_tensor_dense_matmul() and tf.gather_nd() to implement NCAE.], the training complexity for one user i is O(K_1||+∑_l=1^L-2K_l+1K_l+||K_L-1), where L is the number of layers and K_l is the hidden dimension of layer l. All our experiments are conducted with one NVIDIA Tesla K40C GPU. For Lastfm and Delicious datasets, each epoch takes only 0.4 seconds and 2.1 seconds respectively, and each run takes 30 epochs. 

For ML-10M dataset, it takes about 6.3 seconds and needs 60 epochs to get satisfactory performance. Since ML-10M is much larger than the other two datasets, this shows that NCAE is very scalable. Table <ref> shows the average training time per epoch on ML-10M dataset w.r.t. hidden factors K and training set ratio D, where a 3-layer item-based NCAE with equal hidden factors is used. Then the time complexity can be reformulated as O(K||+K^2). As can be seen, the runtime scales almost linearly with K, since the modern GPU architecture parallelizes the matrix-vector product operation automatically. Besides, further observation shows that, the runtime grows slowly as the training size D increases, indicating the scalability of NCAE on large datasets. In practice, the second term O(∑_l=1^L-2K_l+1K_l) overtakes the extra cost.













 


§ CONCLUSION AND FUTURE WORK


In this paper, we present a new framework named NCAE for both explicit feedback and implicit feedback, and adapt several effective deep learning approaches to the recommendation domain. Contrary to other attempts with neural networks, we employ a new loss function for sparse inputs, and propose a three-stage pre-training mechanism, an error reweighting module and a data-augmentation strategy to enhance the recommendation performance. We conducted a comprehensive set of experiments to study the impacts of difference components, verifying the effectiveness of our NCAE architecture. We also compared NCAE with several state-of-the-art methods on both explicit and implicit settings. The results show that NCAE consistently outperforms other methods by a large margin.

In future, we will deal with the cold-start problem and explore how to incorporate auxiliary information. We also plan to study the effectiveness of neural network models when an online protocol is used <cit.>. Another promising direction is to explore the potential of other neural structures for recommendation. Besides, it is important to design an interpretative deep model that can explicitly capture changes in user interest or item properties.

abbrv




























































































































































































