# Multi-Feature Extension via Semi-Autoencoder for Personalized Recommendation
## 4 Methodology
### MFSAE for Personalized Recommendation  
The overall framework and detailed description of MFSAE are illustrated in Figure 3. Considering that the rating matrix \(R\in\Re^{n\times m}\) in real-world scenarios is usually extremely sparse, we introduce the own attributes information of items such as the genres and release date in the movie datasets, which is denoted as \(\Re^{k_{1}}\), and \(A^{i}\in\Re^{k_{1}}\) denote the attributes information for item \(i\), \(A^{I}\in\Re^{m\times k_{1}}\) is denoted as the attributes information vectors of all \(m\) items. In addition, considering the limitation of extensible feature information, the DBpedia is introduced to obtain all movie languages as auxiliary information for the model. The LSI model is introduced to embed language feature information into a low dimensional vector \(R\in\Re^{k_{2}}\), where \(k_{2}\) represents the output dimension of LSI model data in the model, \(L^{i}\in\Re^{k_{2}}\) denote the movie language vector of item \(i\), and we denote \(L^{I}\in\Re^{m\times k_{2}}\) as the language vectors of all \(m\) items. MFSAE is first introduced to incorporate the rating vector \(R^{i}\), the attributes vector \(A^{i}\) and the extended language features \(L^{i}\). The model's input can be formulated as \(con\big{(}R^{i},A^{i},L^{i}\big{)}\):  
\[con\Big{(}R^{i},A^{i},L^{i}\Big{)}\stackrel{{\text{def}}}{{=}} \text{{connection of }}R^{i}\;\;A^{i}\;\text{and}\;L^{i} \tag{4}\]  
The \(con\big{(}R^{i},A^{i},L^{i}\big{)}\in\Re^{n\times(m+k_{1}+k_{2})}\) refers to the connection of \(R^{I}\), \(A^{I}\) and \(L^{I}\), where \(R^{I}\in\Re^{n\times m}\) represents the rating vectors, \(A^{I}\in\Re^{n\times k_{1}}\) represents the attribute information vectors of all items and \(L^{I}\in\Re^{n\times k_{2}}\) represents the language vectors of all items. Then, the model learns the compressed reconstructed output from the input \(con\big{(}R^{I},A^{I},L^{I}\big{)}\); the encoding stage can be formulated as (5):  
\[\xi=f\Big{(}con\Big{(}R^{I},A^{I},L^{I}\Big{)}\cdot W+b\Big{)} \tag{5}\]  
where \(W\in\Re^{(m+k_{1}+k_{2})\times h}\) is the weight matrix, \(b\in\Re^{n\times h}\) is bias vector and \(f\) is the _sigmoid_ function for nonlinear activation. The decoding stage can be formulated as (6):  
\[ \begin{split} R^{\prime}&=g\big{(}\xi\cdot W^{ \prime}+b^{\prime}\big{)}\\ &=g\Big{(}f\Big{(}con\Big{(}R^{I},A^{I},L^{I}\Big{)}\cdot W+b \Big{)}\cdot W^{\prime}+b^{\prime}\Big{)}\end{split}  \tag{6}\]  
where \(W^{\prime}\in\Re^{h\times m}\) and \(b^{\prime}\in\Re^{n\times m}\) represent the decoding layer's weight matrix and bias vector, respectively, and g stands for the _identity_ function for nonlinear activation. Notably, the Stochastic Gradient Descent (SGD) method is used for model optimization in the semi-autoencoder. Furthermore, the weight matrix \(W\) and \(W^{\prime}\) of the \(\ell_{2}\) norm regularization are added to the objective function for avoiding overfitting, which can be formulated as (7):  
\[J=\big{\|}W\big{\|}_{2}^{2}+\big{\|}W^{\prime}\big{\|}_{2}^{2} \tag{7}\]  
Similar to the autoencoder, we compute the loss function of the weight matrix of the encoding and decoding stages, which can enhance the auxiliary information for the  
Figure 2: The whole framework of the LSA model. reconstruction of \(R^{I}\) and improve prediction accuracy. Thus, the objective function can be formulated as (8):  
\[J_{item}=\left\|(R^{\prime}-R^{I})\right\|^{2}+\alpha\cdot J \tag{8}\]  
where \(\alpha\) is the trade-off parameter that controls the balance of the regularization terms. The best recommendation result is obtained by minimizing the error between input \(R\) and output \(R^{\prime}\). When the model converges, the matrix \(R^{\prime}\), the output layer of the semi-autoencoder, is used for prediction. The details of MFSAE are summarized, as follows Algorithm 1. ```
0: The rating matrix \(R\in\Re^{m\times n}\), trade-off parameter \(\alpha\), the dimension of hidden layers \(h\). 0: The predicated rating matrix \(R^{\prime}\).