# Multipointer Coattention Recommendation with Gated Neural Fusion between ID Embedding and Reviews
## 3 Model Architecture
### Review Feature Learning Module  
In order to extract deeper interaction information between users and items, in the review feature learning module, we use a multipointer coattention network to process review information. In this module, we take the users' list of reviews and the items' list of reviews as two input sequences. 1. Embedding Layer. In the embedding layer, we calculate the initial review embedding according to the embedding method in the MPCN model. Given review \(R_{u,i}\) consisting of a series of \(\ell_{w}\) words, these words are represented as one-hot encoding vectors. Then, all words are passed into an embedding matrix. With the embedding matrix, we retrieve a \(d\)-dimensional vector for each word and finally construct user review embeddings \(r_{u,1}\), \(r_{u,2}\),..., \(r_{u,\ell_{d}}\) and item review embeddings \(r_{v,1}\), \(r_{v,2}\),..., \(r_{v,\ell_{d}}\) according to a series of words. 2. Review Gating Mechanism. Regardless of whether reviews written by users or reviews written for items are used, the information contained in these reviews is different, and not every review contains useful information. Here, we use a review gating mechanism to filter out useful review information. \[r_{i}^{\prime}=\sigma\big{(}W_{g}r_{i}\big{)}+b_{g}\odot tanh(W_{u}r_{i}+b_{u})\] (1) where \(\odot\) is the Hadamard product and \(\sigma\) is the sigmoid activation function. \(r_{i}\) is the \(i\)-th review in sequence \(r\). \(W_{g}\), \(W_{u}\in\mathbb{R}^{d\times d}\) and \(b_{g}\), \(b_{u}\in\mathbb{R}^{n}\) are the parameters of this layer. 3. Review-level Coattention. We use a review gating mechanism to select informative reviews \(r_{u}\) and \(r_{v}\) from review libraries of user \(u\) and item \(v\), respectively, as this layer of the input list. We first calculate the affinity matrix between them using Formula (2) and then obtain the row and column maximum values of the matrix using the max pooling function of Formula (3). We transform the maximum value into a one-hot vector (pointers \(p_{u}\) and \(p_{v}\)) using the Gumbel-Softmax and apply these pointers to the original review list of the users (items) to obtain the \(p_{u}\)th review of user \(u\) and the \(p_{v}\)th review of item \(v\), respectively. The description is as follows: \[\varphi_{uv}= F(r_{u})^{T}W_{r}F(r_{v})\] (2) \[r_{u}^{\prime}=\big{(}Gumbel(_{col}^{max}(\varphi))\big{)}^{T}r_{u}\text{ and }r_{v}^{\prime}=\big{(}Gumbel(_{row}^{max}(\varphi))\big{)}^{T}r_{v}\] (3) \[y_{i}= \frac{exp\big{(}\frac{\log(\pi_{i})+\beta_{i}}{\tau}\big{)}}{\sum _{j=1}^{k}exp\big{(}\frac{\log(\pi_{i})+\beta_{i}}{\tau}\big{)}}\] (4) \begin{table}
\begin{tabular}{c c} \hline
**Notations** & **Definitions** \\ \hline \(R_{u,i}\) & User reviews and item reviews \\ \(r_{u,i}\) & The \(i\)-th review of user \(u\) \\ \(r_{v,j}\) & The \(j\)-th review of item \(v\) \\ \hline \(r_{u}\) and \(r_{v}\) & Informative reviews from review libraries of user \(u\) and item \(v\) \\ \(\varphi_{uv}\) & TThe affinity matrix between \(r_{u}\) and \(r_{v}\) \\ \hline \(r_{u}^{\prime}\) and \(r_{v}^{\prime}\) & The most informative reviews from user \(u\) and item \(v\) \\ \(p_{u}\) and \(p_{v}\) & One-hot vector (pointers) \\ \(\theta_{ij}\) & The affinity matrix between \(r_{u}^{\prime}\) and \(r_{v}^{\prime}\) \\ \(w_{u}^{\prime}\) and \(w_{v}^{\prime}\) & The word-level representations of user \(u\) and user \(v\) \\ \(w_{u}\) and \(w_{v}\) & Combinations of multiple word-level representations of user \(u\) and user \(v\) \\ \(V_{u}\) and \(V_{v}\) & The ID embedding of user \(u\) and user \(v\) \\ \(h_{u}\) and \(h_{v}\) & The interaction information between ID embedding and review features \\ \(o_{u}\) and \(o_{v}\) & The final representations of user \(u\) and item \(v\) \\ \hline \end{tabular}
\end{table} 
Table 1: Notations and definitions. \[y_{i} =\left\{ \begin{array}{c}1,i=argmax_{j}(y_{j})\\ 0,\ otherwise\end{array} \right. \tag{5}\]  
where \(W_{r}\in\mathbb{R}^{d\times d}\) and \(\varphi\in\mathbb{R}^{\ell r\times\ell r}\).