SPMF: A Social Trust and Preference Segmentation-based Matrix Factorization Recommendation Algorithm

The traditional social recommendation algorithm ignores the following fact: the preferences of users with trust relationships are not necessarily similar, and the consideration of user preference similarity should be limited to specific areas. A social trust and preference segmentation-based matrix factorization (SPMF) recommendation system is proposed to solve the above-mentioned problems. Experimental results based on the Ciao and Epinions datasets show that the accuracy of the SPMF algorithm is significantly higher than that of some state-of-the-art recommendation algorithms. The proposed SPMF algorithm is a more accurate and effective recommendation algorithm based on distinguishing the difference of trust relations and preference domain, which can support commercial activities such as product marketing.


INTRODUCTION
The Internet has brought about industrial change and nurtured e-commerce. E-commerce has generated huge amount of network information, which results in information overload. Information overload directly increases the difficulty of selecting products and inspires people to seek effective solutions. Today, there are mainly four types of solutions we can employ: (1) information acquisition timelines; (2) categories; (3) search engines; and (4) personalized recommendations.
The first type of solution can save information retrieval time, but it is easy to miss lots of useful information. The second type of solution is to classify the project according to the similarity feature chosen by the user; this can overcome the defects of the first type of solution, but it has the disadvantage of low efficiency and poor precision. The third type of solution allows users to retrieve and filter irrelevant information by keywords, which can solve the problem of the second type of solution but cannot consider the user's individualized needs. Finally, the fourth type of solution can solve the problem of the third solution, and through historical data, user attributes, product attributes, and other information to mine user preferences, it can actively make personalized recommendations to users (Kuang et al., 2018).
A recommendation system can inspire the potential needs of users and make an e-commerce platform more intelligent and humanized. Such systems have helped Amazon, JD, Alibaba, and other companies to significantly increase sales. The recommendation algorithm is the core of the recommendation system (Chang, Lin, & Chen, 2016), but data sparsity and other problems have always been obstacles to its further development. Most scholars (Khazaei & Alimohammadi, 2018) employ machine learning algorithms, such as those for clustering and dimensionality reduction, to fill sparse data with a small amount of original data. However, it is difficult to guarantee the quality of the filled data.
In order to solve the above problems and improve the accuracy of recommendation, many scholars (AlBanna, Sakr, Moussa, & Moawad, 2016;Cui et al., 2018;Haruna et al., 2017) put forward recommendation algorithms based on the social network, that is, using direct or indirect trust relationships to make recommendations for target users. However, the trust relationship-based algorithm still has three problems: (1) The preference similarity of users with the trust relationship may be small or even zero. For example, a user has a trust relationship with his parents, but their preference differences may be significant, and therefore the recommendation may not be ideal. (2) The diversity of user preference determines that the measurement of preference similarity should be limited to certain areas. For example, the preference similarity of users is low in the music field, but it may be very high in the film field, and therefore a recommendation in the film field is very satisfactory. (3) Even if the preferences of different users are very similar, the recommendation will significantly influenced because of the difference in trust relationships.
Based on the above discussions, our main contributions are as follows. We proposed a social trust and preference segmentation-based matrix factorization recommendation algorithm by setting different recommendation trust weights for different relationships and the preference domain. This solves the abovementioned problems and improves the recommendation accuracy.

BACKGROUND
The context of the literature in this paper is shown in Figure 1. As the level-1 classification shows, Cui et al. (2018) and Su & Khoshgoftaar (2009) divided the recommendation algorithms into three categories: content-based recommendation algorithms (Pazzani & Billsus, 2007), collaborative filtering algorithms (Herlocker, Konstan, & Riedl, 2000), and hybrid recommendation algorithms (Burke, 2002). Strictly speaking, the content-based recommendation algorithm is derived from the collaborative filtering recommendation algorithm, and both generate recommendations for target users based on similarity. Content-based recommendation algorithms need to filter massive amounts of information and update user profiles regularly, resulting in high time complexity and unsatisfactory recommendation results. Conversely, collaborative filtering recommendation algorithms only use neighbors with high similarity to target users to evaluate a product, predict the preferences of target users, and make recommendations. Hybrid recommendation algorithms are designed to meet a specific need and incorporate content-based recommendation algorithms and collaborative filtering recommendation algorithms.
The collaborative filtering algorithm is the most successful and widely used personalized recommendation algorithm in business, and it is also a hotspot of academic research. As the level-2 classification shows, Breese et al. (1998) divided this algorithm into a memory-based collaborative filtering algorithm and a model-based collaborative filtering algorithm. The memory-based collaborative filtering algorithm does not distinguish the rated item information attributes, and therefore it directly uses the correlation matrix to make predictions, which results in a heavy workload and low efficiency. In order to improve the recommendation efficiency and accuracy, the model-based collaborative filtering algorithm employs machine learning and data mining models such as the Bayesian network (Kang, 2018), SVM (Ren & Wang, 2018), or matrix decomposition (Zhao & Sun, 2018) for recommendation; this is shown in the level-3 classification. However, the ability to solve the sparsity problem of user-item rating data is an important indicator for evaluating the pros and cons of a recommendation algorithm. The matrix factorization-based collaborative filtering algorithm has become one of the most popular algorithms in the last decade due to its outstanding performance in the 2009 Netflix Prize competition.
As the level-4 classification shows, the matrix factorization-based collaborative filtering algorithm includes the trust relationship-based matrix factorization algorithm (Ma, Yang, Lyu, & King, 2008;Mi, Peng, Xiao, & Lu, 2017) and the preference similarity-based matrix factorization algorithm (Han, Huang, Zhang, & Bhatti, 2018). Wang et al. (2006) solved the problem of low-accuracy caused by sparse data by integrating the user preference similarity and matrix factorization algorithm and combining the user rating data. Lai et al. (2019) constructed a social recommendation model that integrated trust relationships and product popularity and speculated on their potential interactions based on user interaction behavior. The trust relationship could lead to more accurate recommendations. Guo et al. (2016) proposed TrustSVD, a trust-based matrix factorization technique for recommendations. Lee & Ma (2016) constructed a recommendation algorithm that combined the KNN and matrix factorization by using a trust relationship and propagation effect, and combining user rating and the trust relationship, they achieved a higher recommendation accuracy.
In this paper, we will combine the social trust segmentation and the preference domain segmentation and construct the level-6 classification, i.e., a social trust and preference segmentation-based matrix factorization (SPMF) recommendation algorithm.

RESEARCH MODEL
The main ideas of the proposed SPMF recommendation algorithm are as follows: (1) To show the impact of preference domain segmentation on target user recommendation.
(2) To reveal the different influences on target users' recommendation between users with and without trust relationships.

Preference Domain Segmentation
User preferences are diverse, but most of the existing recommendation algorithms do not take full account of it. To demonstrate the impact of preference domain segmentation on measuring user preference similarity, we provide the following example.
A website provides ten products that can be subdivided into three categories: music, movies, and books ( Table 1). The numbers in the table represent rating records. The rating scale is 1-5, and 0 indicates no rating. a u and b u represent users, and P k I denotes the th k item in the domain P .   Table 1 shows that the preferences of a u and b u in the music field are similar; the preferences are temporarily uncertain in the movie field; and the preferences are quite different in the book field.

Trust Relationship Segmentation
In Figure  User relationships are complex, but in classical recommendation algorithms, we assume that user relationships are independent of each other in order to simplify the problem. Typically, we only consider the user's ratings on products, such as with the probability matrix factorization (PMF) recommendation algorithm (Jamali & Ester, 2010), as shown in Figure 2(A). However, it is difficult for us to be completely independent when making sensible decisions, and we are often influenced by our friends and family. In view of this, some researchers introduced the trust relationship into the recommendation algorithm and only considered the user evaluation with a trust relationship to make recommendations for target users, i.e., the SocialMF recommendation algorithm (Jamali & Ester, 2010). This algorithm is shown in Figure 2(B). Social recommendation algorithms could improve recommendation accuracy but ignored the user's evaluation of the product. In order to overcome the shortcomings of the PMF recommendation algorithm and the trust-based recommendation algorithm and utilize their advantages, it is necessary to combine them. Doing so produces the STE recommendation algorithm (Ma, King, & Lyu, 2009), as shown in Figure 2(C). In order to adequately reflect the effect of the trust relationship and the preference similarity to target users, we construct a matrix factorization recommendation algorithm that combines trust relationship segmentation and preference domain segmentation, named SPMF, which is shown in Figure 2 where  is an adjustment factor that is used to weigh the recommendation impact of If we incorporate the specific domain recommendation influence into the PMF algorithm, the posterior probability distribution of the user eigenmatrix U and the item eigenmatrix V is as follows: 2  2  2  2  2  2  2  2   2   11   2  ,  1   22   11   , , , , , , , C is constant.
In order to obtain the optimal value of the objective function (6), we employ the gradient descent algorithm to get the partial derivatives of the eigenvectors In this way, we can get the following eigenvectors by iteratively updating the gradient descent algorithm: ,, where  is the sequence number of the iterative updating, and  is the learning rate.

Experimental Datasets
In this section, two public datasets, Ciao and Epinions, are employed. The performance of the proposed SPMF is evaluated by the mean absolute error (MAE) and the root mean square error (RMSE) (Jamali & Ester, 2010;Ma et al., 2009). The statistics of datasets Ciao and Epinions are shown in Table 3. Obviously, both datasets are highly sparse. In Algorithm 1,  is set to 0.4. We explain this in the section titled "Parameter analysis on  ."

The User-Item Rating Matrix for Prediction
For the SPMF recommendation algorithm, the algorithm of the user-item rating matrix for prediction is shown by Algorithm 2. In Algorithm 2, K represents matrix factorization dimensions.

Experimental Results Comparison
For comparison, we use the same strategy as most of the literature: the matrix factorization dimensions are set to 5 K  and 10 . The MAE and RMSE of the proposed SPMF algorithm and other recommendation algorithms on Epinions and Ciao datasets are shown in Table 4.  Table 4 shows that the MAE and RMSE of the SPMF algorithm are less than those of algorithms PMF, RSTE, SocialMF, and TrustSVD in the cases of 5 K  and 10 , i.e., the accuracy of the SPMF algorithm is the highest among all compared algorithms.

Parameter Analysis
In exploring the influence of various parameters on the performance of the algorithm, this paper adopts the idea of control variables. The more the epoch increases, the longer the training time becomes. Therefore, the epochs in this section are all set at 10.

Parameter Analysis on 
In this section, we explore the optimal  of the algorithm. The result is shown in Figure 7.

Parameter Analysis on K
In this section, we explore the optimal decomposition dimension K . The result is shown in Figure 8. is not the smallest in this experiment, but too large of a decomposition dimension may cause overfitting, and the difference of RMSE between =20 K and =40 K , =50 K is within a reasonable range, and. Similarly, we can conclude that =20 K is the optimal decomposition dimension of Epinions.

CONCLUSIONS
The traditional social recommendation algorithm ignores the following fact: the preferences of users with trust relationships are not necessarily similar, and the consideration of user preference similarity should be limited to specific areas. To solve these problems, this paper proposed a SPMF recommendation algorithm by setting different recommendation trust weights for different relationships and preference domains. The experimental results on Ciao and Epinions datasets show that the accuracy of the SPMF algorithm is much higher than that of some state-of-the-art recommendation algorithms.