# An Adversarial Deep Hybrid Model for Text-Aware Recommendation with Convolutional Neural Networks
## 3 Adversarial Deep Collaborative Filtering
### Generator with Deep Text Modeling  
The generator hinges on predicting the user-item score \(\hat{t}_{uj}\) that indicates the preference of a user \(u\) towards an item \(j\). We adopt a commonly used latent factor model in this paper [1; 3; 4], leaving more complex models based on neural networks [47; 48] to future work. Specifically, we define \(\hat{t}_{uj}\) as:  
\[\hat{t}_{uj}=p_{u}\cdot q_{j}+b_{j}, \tag{3}\]  
where \(p_{u}\) and \(q_{j}\) represent the latent vector for user \(u\) and item \(j\), respectively. Compared with plain MF, a bias term is included in Equation (3) and \(b_{j}\) is the bias term for item \(j\). Here, \(p_{u}\) is a user ID embedding and the modeling of \(q_{j}\) will be discussed in the following subsection. By letting \(q_{j}\) to be an item ID embedding, Equation (3) reduces to the ordinary latent factor model. Integrating CNN into MF  
We consider text-aware recommendation where item \(j\) is a document associated with a sequence of word tokens denoted by \(D_{j}\). To incorporate document features, we model the item vector \(q_{j}\) with the following additive approach:  
\[q_{j}=g(D_{j})+v_{j}, \tag{4}\]  
where \(g(\cdot)\) is a function that takes a raw document as input and is used to establish a high-level feature representation of the document. An item embedding vector \(v_{j}\) is included as an offset term and corresponds to the original item vector of the plain MF. By plugging Equation (4) into Equation (3), the CNN-based document modeling is integrated into the latent item vectors of MF and this additive manner allows the training signals to directly flow into the CNN. This paper builds a model for \(g(\cdot)\) based on Convolutional Neural Network (CNN), which is one of the most popular deep learning tools to extract high-level features from text data [29]. Unlike previous order-insensitive models [8; 9], CNN has the benefit of exploiting the additional information inherent in word orders [29; 30], which has recently been demonstrated to be critical for performing text-aware hybrid recommendation [10; 14]. It is worth pointing out the difference between our model and ConvMF [10], which considers text information as the prior knowledge to regularize item latent vectors and thus requires to tune additional trade-off hyper-parameters for training. By contrast, our CNN is directly incorporated into the representations of items and thus enjoys more explicit flow of the learning signals than the regularization approach. Figure 1: Illustration of Adversarial Deep Hybrid Recommendation (ADHR) model. ADHR consists of two components: a generator and a discriminator. The generator is a deep hybrid model to capture the pairwise ranking distribution where a convolutional neural network is used to extract high-level item content features. The discriminator is a binary classifier based upon latent factor model, which takes the user and item embeddings in a sample pair as input and predicts the probability of the sample being real. While the generator provides fake samples for training the discriminator, the discriminator provides learning signals that drive the optimization of the generator. We design the CNN module \(g(\cdot)\) as follows. First, we transform an item \(j\)'s document \(D_{j}\) into the concatenation of a sequence of \(k\)-dimensional embeddings:  
\[\mathbf{x}=e_{1}\oplus e_{2}\oplus\cdots\oplus e_{n}, \tag{5}\]  
where \(n\) is the total number words in the text, \(\oplus\) is the concatenation operator, and \(e_{i}\in R^{k}\) represents the embedding vector of the \(i\)-th word in the document.