## 4 The Proposed Model  
### Our Multiview Transformer Model for Recommendation  
Multiview fusion is the integration of information from multiple sources or views, such as images, text, audio, video, and other types of data, to create a comprehensive and accurate representation of a given situation or event. Multiview fusion techniques are widely utilized in the fields of machine learning and artificial intelligence to enhance the performance of models that deal with complex and diverse data. By combining information from different views, these models can gain a deeper understanding of underlying patterns and relationships in the data, leading to improved predictions and decision-making.  
Early fusion and late fusion are two approaches for multiview fusion. Early fusion combines features or representations of different views at the input level, transforming them into a common feature space before feeding them into the fusion model. It is suitable for highly correlated views that provide complementary information. In contrast, late fusion involves fusing outputs of individual models trained on each modality separately. Each view is processed using a specific model, and the outputs are then combined using a fusion mechanism. Late fusion is used for views that are not highly correlated and provide unique, independent information.  
Our Multiview Transformer recommendation model, described in Algorithm 1, utilizes an early fusion approach. The architecture of our proposed model for the recommendation problem is depicted in an overview in Figure 3. It comprises three main components: the first includes modules for extracting and representing features from various information sources of users and items, the second involves converting the concatenated vector into n segments (described in Algorithm 2), and the third consists of a transformer module for the prediction task.  
```
1:Training Stage:
2:Input: The data set contains multiview of a set of users and items.
3:Output: A model for the rating
4:Feature Extraction: involves performing feature extraction for each modality, resulting in a vector of features for each modality. For a given user, a set of k feature vectors denoted by \(V_{u}=v_{u1},\cdots,v_{uk}\) is obtained, and for a given item, a set of \(j\) feature vectors denoted by \(V_{i}=v_{i1}.\cdots,v_{ij}\) is obtained.
5:Feature Conversion: involves combining feature vectors from Step 1 and segment it into a sequence of token vectors as input to the classification model.
6:Classification: building the Transformer Model for the Prediction task (named as TMP)
7:Feeding n tokens from Step 2 into a transformer encoder model is used for the task of rating generation (i.e., prediction),
8:Training prediction model.
9:Inference stage:
10:A given user-item pair (u, i).
11:Performing the feature extraction task to obtain feature vectors for user u and item i. These feature vectors include \(V_{u}=v_{u1},\cdots,v_{uk}\) and \(V_{i}=v_{i1},\cdots,v_{ij}\).
12:Combining \(V_{u}\) and \(V_{i}\), then using the Feature Conversion algorithm to generate n segments.
13:Feeding n tokens at Step 2 as input features for the TMP for generating the output (i.e., the rating).
```  
**Algorithm 1** Multiview Transformer Model For Recommendation  
Figure 3: Multiview fusion with transformer model for recommender systems. (The symbol * indicates the amount of item attribute information used in the model may vary depending on the dataset and the intended use of the organization.)