# Variational Autoencoders-Based Algorithm for Multi-Criteria Recommendation Systems
## 3 Proposed Variational Autoencoder Model
By learning relationships between the different criteria, the model can deduce a user preference for certain criteria even when explicit ratings are missing, leading to more accurate predictions. Algorithm 1 represents the general pseudocode for the VAE-MCRS model. As indicated after step 9, the model is trained, enabling the VAE-MCRS model to generate recommendations by sampling from the latent space and employing the decoder to predict ratings for unrated user-movie pairs. These predictions are derived from the learned  
Figure 2: The proposed VAE-MCRS model architecture. R: Rating, C: Criterion, m: Movie, i: User. relationships among various criteria and user preferences. The VAE-MCRS model is subsequently evaluated using the testing dataset. ```
Input: Multi-criteria dataset. Output: Recommendation prediction. First stage: Dataset and VAE-MCRS model preparation Step 1: Clean missing values, duplication, standardization (rating range [1; 2; 3; 4; 5]) \(\triangleright\) Data preprocessing Step 2: For each criterion, construct a matrix where N rows represent N users and M columns represent M movies. \(\triangleright\) Construct User-Movie Matrix Step 3: Split dataset on 80% for training and 20% for testing. Step 4: Initialize the hyper-parameters of the VAE-MCRS encoder and decoder networks. \(\triangleright\) Initialization phase. Second stage: Train VAE-MCRS model Step 5: Maps the user's ratings to two vectors: mean and standard deviation of the latent space (representing latent features). \(\triangleright\) Encoding phase. Step 6 The encoder produces two vectors: \(\bullet\)\(\mu\) **(mean):** The center of the distribution in latent space. \(\bullet\)\(\sigma\) **(variance):** The spread or uncertainty in the latent space. \(\triangleright\) Latent representation phase. Step 7: Construct the latent representation vector \(\mathbf{z}\) using the mean and the standard deviation vectors. \(\triangleright\) Reparameterization phase. Step 8: Decodes the latent vector \(\mathbf{z}\) back into predicted ratings for all movies, including those that the user has not rated. \(\triangleright\) Decoding phase. Step 9: For each new criterion, go back to Step 5 to train the trained VAE-MCRS model with the rating matrix of the new criteria. Step 10: Feed VAE-MCRS with testing data for prediction. ```  
**Algorithm 1** Multi-criteria variational autoencoder for collaborative filtering-based recommender systems VAE-MCRS. The second key motivation for using a variational autoencoder in the development of the proposed VAE-MCRS model is its ability to significantly improve the performance of collaborative filtering approaches in several critical aspects:  
* When trained sequentially on a multiple criteria ratings dataset (for example, Acting, Story, Direction, and Visuals), the VAE can learn a shared latent space that effectively captures users' preferences across all the criteria. This process results in a compact latent representation of a user's overall preferences, considering how preferences for one criterion (e.g., Acting) may relate to others (e.g., Direction). For example, the VAE might learn that users who rate Acting highly also tend to rate Direction highly, or that users with strong Visuals preferences might not care as much about the Story. This shared latent space enables the model to gain a deeper understanding of user behavior across all criteria, ultimately improving its predictive accuracy and recommendation effectiveness. * In a multi-criteria recommendation system, user preferences are not always independent. There may be complex, nonlinear interactions between different criteria. For example, a user might only value strong Direction if the Story is equally compelling. Traditional linear models may struggle to capture these relationships. However, the VAE is designed to handle such nonlinear interactions through the learning of the compressed latent vector.