Recommendation System based on User Trust and Ratings

Recommendation systems aim at providing the user with large information that will be user-friendly. They are techniques based on the individual’s contribution in rating the items. The main principle of recommendation systems is that it is useful for user’s sharing the same interests. Furthermore, collaborative filtering is a widely used technique for creating recommender systems, and it has been successfully applied in many programs. However, collaborative filtering faces multiple issues that affect the recommended accuracy, including data sparsity and cold start, which is caused by the lack of the user's feedback. To address these issues, a new method called “GlotMF” has been suggested to enhance the collaborative filtering method of recommendation accuracy. Trust-based social networks are also used by modelling the user's preferences and using different user's situations. The experimental results based on real data sets show that the proposed method performs better result compared to trust-based recommendation approaches, in terms of prediction accuracy. Keywords—Recommendation systems; collaborative filtering; trust; social networks


I. INTRODUCTION
The platforms with thousands of items will support the users to be able to know how to connect to the right content, which is relevant to their interests and concern. To help users, the systems of recommendation emerge as a great solution to personalize the content presented to the users in the form of techniques and software tools that provide personalized suggestions and recommendations for items in order to boost the users' competencies [1,2]. Even though several types of methods have been proposed to build systems of recommendation, the collaborative filtering method remains one of the greatest widely used and adopted techniques to generate recommendations. It is far from ideal in terms of predictive performance. As, it suffers from countless inherent problems [3,4]. The most important thing of these is data sparsity and cold start, which affects the recommender's accuracy of the system [3]. To address these issues and model the user's preferences more accurately, the additional information can be incorporated into the collaborative filtering method to compensate for insufficient rating information, such as social media information, including friendship, belonging, and trusting relationships [1,5,6].
The relationship which is based on trust is one of the most crucial types of social relationships, as it gives its power and good positive association with similarities between the users [1], and several studies have shown great efficiency in improving predictive accuracy compared with the traditional recommendation techniques. Additionally, collaborative filtering is one of the most common approaches in systems of recommendation. As it does not depend on additional data, only the history of interactions, it becomes quite simple to be reproduced in various real applications and increase its popularity. The recommendation based on collaborative filtering was developed from the observation that people tend to adopt other people's recommendations. Someone who has the intention to purchase a certain product, for example, s/he looks for opinions and points of view from the other people who have already purchased and bought the same product before deciding to purchase. This happens frequently in the daily lives of people with different yet varied situations. The selection of a certain movie, a book, among many other [2]. Several trust-based systems of recommendation that employ these models to solve data sparsity and cold-start problems have also been proposed to combine the impacts and the great influences of social trust with different strategies. However, the previous work which is proposed in this field failed to systematically model the reciprocal effect between the users. It cannot model how and to what extent the user's preferences are affected by trustees and at the same time to what extent it influences the same user by trustors, where the user preferences as trustee or trustor can be distinct from each other [7]. Therefore, when predicting a user's preferences for an item, it does make more sense to consider both the trustor's preferences and the trustee's performances at the same time. However, in the previous studies, the methods modelled the users using a single case [8], or by separately considering the two user cases [7]. In other words, no distinction is made between different cases of the user as trustee or trustor in the ratings generation process.
Regardless of the learning approach adopted by the systems of recommendation, there must be a past set of interactions that describe the users' relationships with the items of the system. Past interactions between a user and an item are traditionally called feedback, and they can be either explicit or implicit. Most of the existing methods depend on an explicit trust bond between the users, based on which users display their preferences as trustors or trustees, except those users who may not explicitly interact with others, but rather implicitly. We note that most of the methods found in previous studies are effective and efficient in modelling explicit relationships. However, they do not consider the discovery and modelling of implicit interactions between two users who may be similar but not connected in the network of trust. The local perspective of social relations reveals the relationship between the user and their neighbors, while the global perspective of social relations reveals the reputation of the user in the social network [9]. Users around the world are more likely to seek suggestions from their local friends. Yet, they may also be tempted to solicit suggestions from high-reputation users, indicating that public and local opinions based on social relations might be exploited to improve the performance of systems of recommendation.
As a suggestion, a model called "GlotMF" (Global Local Trust with Matrix Factorization), that exploits both the global and local social context of trust relationships for recommendations. This work introduces a new strategy for merging ratings data and trust data by sufficiently exploring how to generate known ratings under the influence of the trust behaviors of users that are intertwined in their trust network, rather than simply combining two types of data, as most previous studies did, to express the mutual influence of users more logically on each other's opinions. The proposed method uses a matrix factorization technique to model user preferences for trust-based recommendations, and the preferences of the two different cases of users are learned by modelling the explicit and implicit interactions between them. Specifically, the preferences of the trustees and trustors are estimated to be distinctly suitable for the explicit ratings and explicit trust relationships of existing methods that measure the association of two users based on only the links between them. It is also being taken advantage of the structure of Local Trust Network Links to assess links between trustees and trustors users, as the structure of these links is used to model the user's implicit interaction with other users in terms of both trustees' and trustors' preferences. Experiments conducted on a real dataset demonstrate the effectiveness of our method in terms of predictive accuracy, and the results confirm that our method achieves promising recommendation performance, especially by dint of its effectiveness for Cold-Start and sparsity data compared to its counterparts.

II. LITERATURE REVIEW OF RELATED WORK
The merge of model-based collaborative filtering methods with trust relationships to improve the accuracy of recommendations has recently become a very popular research topic, especially using the matrix factorization technique due to its high precision and ease of use contribution to alleviating the problem of sparsity data better than other techniques [3,8]. Many researchers have exploited this technique to learn about latent features of users and well-known ratings items, and to merge social relationships between users with rating data using different techniques. The researchers proposed in [8] a "SoRec" model which integrates a social network database into a probability matrix factorization model by simultaneously analyzing the rating matrix and the social trust matrix by sharing the matrix of features latent to a user [10]. Their empirical analysis shows that their method is superior to the basic matrix factorization model and other memory-based methods that take advantage of trust relationships, but that true recommendation processes are not reflected in this model. Thus, to model the information of confidence in a more realistic way, the same researchers proposed in a model "RSTE" [11], which interprets the user's decision to rate like a balance between his own tastes and those of his neighbor's trustees. Their experiences shows that their model outperforms the basic matrix factorization method and existing trust-based methods, but in their model, the vectors of features of user's immediate neighbors influence his ratings rather of influence his vector of features, and this model does not deal with the diffusion of trust.
The researchers reinforced in [12] this model by allowing the diffusion of trust and built a "SocialMF" model, which integrates the social impact by making the latent features of each user depend on the latent features of their immediate neighbors in the social network. Moreover, to effectively use the information of social networks when there is no trust information available, the researchers proposed in [13,14] a "SoReg" model that performs matrix factorization while exploiting social regularization defined based on both useritem matrices and positive social relations. This work is different from previous studies in the field of trust-based recommendation since it recognizes the difference between the relationship of trust and the relationship of friendship, as well as it forces the preferences of the user to be closer to the preferences of their friends in the social network.
The methods "SoReg", "SocialMF", "STE" and "SoRec" in general have the same goal [15,16], while the most important work relevant to our work, which is "TrustMF", in this paper is the preferences of different cases are learned independently to guess the ratings. However, in this paper, it is said that it makes more sense to consider both the preferences of the trustee and the preferences of the trustor at the same time in the learning process since the assessment is generated from the two cases. In addition, the "TrustMF" model cannot capture the implicit relationship between the confident user and the trusted user when they are not socially related, nor does it consider the trust of the public, which will be addressed in our proposed model [17].

Problem Description
A.
A recommender system that involves m users and n items is introduced to introduce some notations used to model the recommendation problem in this work. Let = { 1 , 2 , . . . , } and = { 1 , 2 , . . . , } be two groups of users and items respectively, where n is the number of users and m is the number items. Let ∈ denotes the user-item rating matrix which represents the numerical scores given by the users on the items, and , represents the rating of item given by user , where each user evaluates a subset item with certain values from a rating field predefined by the recommendation system. Let Ω = �( , ): , ≠ � denotes the locations of observed ratings in the rating matrix R.

∈
is the user's trust relationship matrix, where , is a real number in the domain [0, 1] describing the strength of the relationship between users and . Let = �( , ): , ≠ 0� denotes the locations of observed trust relations in trust network matrix T. Since we use in this paper a matrix analysis technique to build the proposed model, let ∈ be the K-dimensional preference vector of the trustor and ∈ the K-dimensional preference vector of trustee for the user . ∈ is a k-dimensional feature vector of the element . So, we can formulate the recommendation problem in this paper as follows: by giving a set of user ratings on R's items and a set of trust values T for users by other users who also rated a group of items, and by using the matrix analysis technique to study how to learn the preferences of the different states of the users and the features of the items to guess the rating given by the target user on the target item plus precisely.
The matrix factorization model assumes that some latent factors influence a user's rating behaviors and that the vector of user preferences is determined by how each factor is applied to that user [18]. This hypothesis makes it possible to discover missing ratings in the rating matrix from known ratings. This technique decomposes the rating matrix R into two matrices of lower order K which are the matrix of the latent features of the user U and the matrix of the latent features of the item V that is to say ≈ (as shown in Fig. 1), where the low dimension U and V matrices are unknown and must be predicted. Thus, the goal of the matrix factorization technique is to learn the matrices of latent features U and V and to use them thereafter to provide predictions of missing ratings by solving the following optimization problem [19]: ∈ denotes a vector of the latent features of user's preferences , and ∈ denotes a vector of latent features of the preferences of the item , K is the number of latent features, λ is the regulation parameter which controls the complexity of the model to avoid relevance with training data (over-fitting) by introducing the term (‖ ‖ 2 + ‖ ‖ 2 ) where ‖. ‖ 2 This is the "Frobenius norm". Conversely, ∈ is the weight matrix where , is the weight of the rating given by the user on the item . The common way to define W is , = 1 if , ≠ 0, but a matrix of weight W can also be used to process implicit opinions and encode secondary information such as the similarity between users and items or user reputation. This factorization is illustrated in Fig. 1. Steps of the Construction: The Proposed Model C.

1) Modeling of global information in social networks:
The information contained in social networks represents the reputation of the user in the network, where reputation is a type of case that gives additional powers and capabilities to recommendation systems. There are many algorithms to calculate the reputation value of social network nodes based on their connections. In this work, we rely on one of the most popular algorithms, "PageRank" to calculate user reputation values. We first apply the "PageRank" algorithm to rank users by exploiting the general view of social networks, assuming that ∈ is the reputation rank of so that = 1 indicates that has the highest reputation in the entire social network, then we set the reputation value to according to the reputation value according to as follows: So long as the function (f) constrains the reputation value in the interval [0, 1] is a decreasing function for , that is, higher rank users have high reputation values. So, to model the information in social networks, we can use the reputation values of the users to weigh the significance of their recommendations by modifying the previous equation (3) so that it becomes as follows: During this matrix factorization, the large value of w indicating the high reputation of , will force the term ( + (1 − ) ) to fit tightly into the evaluation of , , while the small value of will make the term ( + (1 − ) ) approximate , .
2) Modeling of local information in social networks: Local information represents preferences of the two different states of the user as a trustee and a trustor which are learned by modelling the explicit interactions between users. The preferences of the trustor and the preferences of the trustee are calculated to account for explicit ratings and explicit trust relationships. The local trust network link structure is used to assess the links between trustees and trustors, as the structure of these links is exploited as organizational boundaries to model the user's implicit interaction with other users in terms of the preferences of the trustors and the preferences of the trustees.
3) Modeling of explicit interactions between users: In this part, there is a description of how to generate ratings and trust relationships from the perspective of different user cases as shown in Fig. 2, where the social impact of user ratings can flow in both ways. That is to say, the user's rating is not influenced only by trustees, but also by trustors and this is what is confirmed by the researchers in [20], which indicates that the influence of trustors in predicting rating may be equal to that of trustees, and therefore may provide added value to predict ratings more accurately.  a) Trust modeling: In addition to the rating data, there is a huge user-generated trust network also available on product showcases on the Internet. Following user preferences are affected by the preferences of the trustees through browsing activities and comments (For example, presenting ratings and reviews of users who trust products) and affect the trustors themselves. Along with the relationship between user preferences and trust, we can also model user preferences on the known trust database using a matrix factorization technique as shown in [18,21]. When users are mapped to the same k-dimensional vector space, we can model each already known trust value , as the internal product of and , i.e., the expected strength of the trust relationship between and is given by: Considering only the trust data, we can learn the feature matrices ∈ × and ∈ × by solving the following optimization problem: Thus, by performing the above matrix factorization, anyone can learn the user's preferences in terms of the latent features vectors of the trustee, and the latent features vectors of the trustor from the known trust data. b) Rating modeling: Given the assumption that different user cases influence rating generation differently [6,20], each known rating should be determined by the preferences of the trustor as well as the preferences of the trustee. Based on this, the rating is predicted by user on the item as follows: Given α is the parameter to control the contribution to the evaluation of the different cases of the user. So, by considering only the rating data, we can learn the feature matrices ∈ × , ∈ × , ∈ × by solving the following optimization problem: where F = (‖ ‖ 2 + ‖ ‖ 2 + ‖ ‖ 2 ) This is the "Frobenius norm".
Given that g(x) is the logistic function suggested by the researchers to link the internal product of feature vectors latent in the interval [0, 1] is given by the relation ( ) = 1 (1 + − ) ⁄ To learn the parameters more conveniently, we map the raw rating , to the interval [0, 1] using the function where Rmax is the maximum value of the ratings defined in the recommender system. After training the model and learning the feature matrices, the prediction of the rating can be obtained from user at item by the relation � � , � x Thus, by performing the previous matrix factorization technique, a person can learn the user's preferences in terms of their latent feature vectors in both cases as trustee and trustor from already known rating data.
Modeling of implicit interactions between users: In this section, we describe how to model the implicit interactions between two trustees and between two trustors by incorporating the local binding structure of the trust network to restrict the objective function.
c) The implicit influence of the trusters: Two trustors are alike if they share many out-links in a trusted network. In other words, they are jointly chatting with several trustees. So, by taking all the user's trust links with other users, and instead of relying on a single link, we can achieve a more precise and robust link between two trustors even if they are not explicitly linked. Therefore, to capture the similarity between two trustors users , depending on the structure of the links coming out of it, we adopt the following "cosine similarity" scale [22]: In our experiment, we have used a binary value for the trust , (0 or 1), and here B denotes the similarity between two trustors. With this similarity, we can model the implicit effect of the trustors by minimizing the following term: The large value of , indicates that the trustor and the trustor share several external bonds, and we, therefore, enforce their preference vectors to be as close as possible, while a small value of , indicates that the distance between the two preference vectors must be large. Therefore, by presenting this structure-dependent analogy, the vectors of the preferences of the trustors are linked in the learning process.
d) The implicit impact of trustees: Two trustees are alike if they share many in-links in the trust network. That is, they are jointly trusted by many trustors. Thus, the similarity between two trustees and based on the structure of the links entering them can be captured by the following scale: Given that E here denotes the similarity between two trustees, as in modelling the implicit influence of the trustors, we model the implicit influence of the trustees by minimizing the following term: The proposed model standardized framework: As shown above, the explicit interactions and the implicit interactions between the trustors and the trustees. Moreover, we have presented how to model the information represented by the reputation of the users in the trust networks. We then propose the following merged model which considers all the previous information and find a solution for the following objective function: and are respectively parameters to control the extent of the influence of the implicit interactions between the trustors and those between the trustees. To reduce the complexity of the model, we experimented with λB = λE. The former term of the previous equation is the regulation parameter used to avoid large adaptation to the training data, while λ is the regulation parameter.
Learning the Model D.
To get the minimum term of the previous objective function, and, thus, learn the feature matrices V, E and B and use them to predict unknown ratings, we use the Stochastic Gradient Descent method, which generally works efficiently for recommender systems. Fig. 3 shows instructions of the algorithm for learning the model. There are several parameters taken as input, including the rating matrix R, the trust matrix T, the regulation parameters E, B, and A, the parameter controlling the rating contribution of the different cases of the user ∝, the initial learning rate μ, and the number of latent factors K.
In the first place, the researchers randomly generate the latent feature matrices V, E and B with small values. Secondly, we continue to train the model until the objective function converges to . More precisely, we calculate the derivatives of the variables V, E and B then we modify them using the Stochastic Gradient Descent method. Finally, we obtain a latent feature vector of the trustor and a latent feature vector of the trustee and the latent feature vector of the item, and we use them to compute the prediction of the target user on the target item.

Description of the Dataset A.
Epinions is considered a real-world dataset, publicly available, and widely used to evaluate recommender systems in the literature. Epinions contains users' ratings on items and explicit trust/distrust relationships between users, which is necessary to validate our model. The "Epinions" database used in our experiments was compiled by Paolo Massa in a five week "crawling" process (October / December 2003) for Epinions.com [23] , Table I presents statistics of this database. Intervalle [1][2][3][4][5] We have also noticed through a set of experiments that have been carried out that the distributions of trustors and trustees of the "Epinions" database correspond to the "Power-Law" distribution, as is the case. In many social networks, and this is illustrated in the Fig. 4, where only a few trustees have many trustors, while most trustees have only a few trustors. This indicates that there is a significant dislocation in the confidence data provided by users.

Ratings Measures B.
To measure the predictive quality of the proposed method compared to collaborative filtering and other methods based on trust, we use two measures [7,20,24]:Mean Absolute Error (MAE): it measures the mean absolute differences between the real ratings , given by the user and the ratings predicted by the recommendation system R and is illustrated by the following relation: Where N is the number of ratings we want to test, the lower the MAE measurement value is, the higher the prediction becomes.
RMSE (Root Mean Absolute Error) measures the square root of the mean square of the differences between the actual ratings , given by the user and the ratings predicted by the recommendation system, and is explained by the following relation: The lower the RMSE measurement value is, the higher the prediction becomes.
In addition to the ratings measures, it is also necessary to choose the technology in which the recommendation system will be rated. In this paper, we use the technique of "Five-Fold cross-validation" for training and testing, in which the database is divided into two parts. The former part concerns model training, while the latter is concerned with testing for its rating. Specifically, the database is randomly divided into five parts, one part is kept as test data, and the remaining four parts are used as training data. This process is repeated five times. Each of these five parts is used as test data only once, and at the end, the results are averaged to obtain the exact result. In our experiments, in each part, we use 80% of the data as training data and the remaining 20% as the test data, which means that we randomize 80% of the ratings in the "Epinions" database as training data to predict the remaining 20% of ratings.

Experimental Parameters C.
To show the performance improvements of the proposed method, we compare it with the traditional matrix analysis method and with a few confidence-based methods found in previous studies that are relevant to our present study.

Rationale Optimal Parameters
PMF [25] The basic matrix analysis method uses the rating matrix only for recommendations, without considering social relationships between users.

SoRec[8]
The method analyses the rating matrix and the users' social trust matrix by sharing the same space of latent features.

RSTE[11]
The method models users' ratings as a balance between their own preferences and those of their trustee's people.
= 0.4 = 0.001 = 0.001 SocialMF [12] The method in which the diffusion of trust is considered when modelling trust relationships between users.
SoReg [13] The method in which the trust relations are modelled by supposing that the distance between the latent features of the trustors must be minimal.
= 0.001 TrustMF [24] The method in which users are questioned at two spaces of latent features, the space of the user as trustor and the space of the user as trustee, by analyzing the trust network.   Vol. 13, No. 7, 2022 To check all the methods that are compared with the methods we use, we define our own optimization parameters according to the corresponding references that are based on our experiments, as shown in the Table II. To compare these methods fairly, we define the dimension K of the latent feature space, for example, five and ten. In reference to all the methods, we adopt the same initialization strategy, which randomly initializes all the latent feature matrices with a distribution uniform in the domain [0, 1].
In this test, we will focus on two user's points of view to measure the performance of the different methods compared: • Perspective of All Users: users who have at least one rating.
• Perspective of Cold-Start Users: Users with less than 5 ratings.

D.
the results of our experiments that we carried out on the "Epinions" database for the "All Users" and "Cold-Start Users" perspectives on the "MAE" and "RMSE" measurements used in the process of evaluation and with different parameters for the dimension of the latent factor space (k = 5, k = 10). The experimental results of our proposed method and the methods we compared with, are presented in the Table III and Table IV.

1) Analysis and discussion of the results
• The performance of the traditional "PMF" method is lower than the performance of other compared methods based on a matrix analysis which, in our opinion, benefits from the relationships of trust in the two perspectives "All Users" and "Cold-Start Users" which underline the importance of trust in improving the performance of model-based recommendation systems.
• From an "All Users" perspective, the TrustMF and GlotMF models perform better than other trust-based models that map users to a single latent feature space.
• From a Cold-Start User perspective, there is no single model that works best among trust-based models. In general, our suggested model performs better than the others. Although, with a few noted exceptions in terms of MAE, our model is more robust in terms of RMSE. Since all confidence-based models aim to improve the squared errors between predicted values and actual values. Whereas, the "RMSE" measurement is more significant than the "MAE" measurement (where "RMSE" calculates the square of the differences between the actual ratings and the predicted ratings, thusly, penalizing large errors more than the "MAE"), and, therefore, our model always has the best performances, surpassing the "TrustMF" model the best among the compared models at the level of the "RMSE" measure when K = 5, and the "SocialMF" model the best at the level of the "RMSE" measure when K = 10.
• In addition, we notice that the "GlotMF" model achieves better performance in both perspectives, which confirms the efficiency of taking the implicit links between the users beside the explicit links in improving the performance of the recommendation, as well as exploiting the general social context of users contributed to our model outperforming other models based on trust.
• Although the percentage of relative improvements in our model compared to other compared models is small, these improvements are significant, as researchers in [4,26] noted that even small improvements in MAE and RMSE measurements can lead to significant differences in the recommendations. 2) Checking the performance of the proposed model on users with different degrees of confidence: other series of experiments to verify the performance of the proposed model for users with different degrees of trust relationships was carried out to compare our method with other trust-based methods and test the possibilities of these different methods by benefiting trust data for the recommendation. The degrees of trust relationships can be defined as the total of the trustees' neighbors of the user and the trustors' neighbors of the user themselves. To conduct our experiments, we first group all the users into several groups (up to seven groups) according to their degrees of trust, these groups are "1-5", "6-10", "11-20 "," 21-40 "," 41-100 "," 101-500 ", and "> 500 "as used by the researchers. Then, we calculate the predictive error in each group respectively in terms of measures" MAE "and" RMSE "when the number of latent features is equal to five and ten, the results of these experiments are shown in the Fig. 5, Fig. 6, Fig. 7, and Fig. 8.    The results obtained show that the performance of the six compared methods differ to some extent from the different trust groups, and our "GlotMF" model works stable and shows the best quality for most groups, especially for the group with five relationships of maximum trust (about 63.4% of users), and for the group of 6 to 10 trust relationships (about 11.6% of users) on the MAE and RMSE measures in the two dimensions five and ten. This strongly suggests that our model can benefit from dispersed trust data more effectively than other trustbased collaborative filtering methods.

V. CONCLUSION
The Research tried to present our proposal to improve the accuracy of recommendations in the model-based collaborative filtering method by taking advantage of trust relationships between users. This is done by presenting a new data fusion strategy rating and trust data to express users' mutual impact on their opinions more logically, and, thusly, predict the unknown values of user ratings on items more accurately and efficiently. In our proposed method, local information represents the preferences of the two different user states trustee and trustor which are learned by modelling the explicit and implicit interactions between users. While general information represents the reputation of the user in the social network. Experiments were performed on a real database, "Epinions", and in two user perspectives, "All Users" and "Cold-Start Users". The results of these experiments showed that the suggested method brought up significant improvements in terms of predictive accuracy, and its effectiveness in alleviating data dispersion and cold start problems compared to other methods based on models that take advantage of trust relationships to improve the accuracy of recommendations. Current work relies on the explicit trust granted explicitly by users, but the user might refute to share or disclose this information, for example, due to privacy concerns. Moreover, many of these available datasets contain explicit trust information. Therefore, implicit trust values can be inferred from user behaviors to improve the generalizability of proposed method. In future work, we intend to improve the proposed model, and it will be interesting to study more extensions.