Bidirectional Trust-Enhanced Collaborative Filtering for Point-of-Interest Recommendation

A personalized point-of-interest (POI) recommender system is of great significance to facilitate the daily life of users. However, it suffers from some challenges, such as trustworthiness and data sparsity problems. Existing models only consider the trust user influence and ignore the role of the trust location. Furthermore, they fail to refine the influence of context factors and fusion between the user preference and context models. To address the trustworthiness problem, we propose a novel bidirectional trust-enhanced collaborative filtering model, which investigates the trust filtering from the views of users and locations. To tackle the data sparsity problem, we introduce temporal factor into the trust filtering of users as well as geographical and textual content factors into the trust filtering of locations. To further alleviate the sparsity of user-POI rating matrices, we employ a weighted matrix factorization fused with the POI category factor to learn the user preference. To integrate the trust filtering models and the user preference model, we develop a fused framework with two kinds of integrating methods in relation to the different impacts of factors on the POIs that users have visited and the POIs that users have not visited. Finally, we conduct extensive experiments on Gowalla and Foursquare datasets to evaluate our proposed POI recommendation model, and the results show that our proposed model improves by 13.87% at precision@5 and 10.36% at recall@5 over the state-of-the-art model, which demonstrates that our proposed model outperforms the state-of-the-art method.


Introduction
Currently, the rapid development of the social internet of things is promoting the realization of a smart city [1]. With the growing popularization of modern mobile communication technologies (i.e., mobile devices, wireless networks, and 5G communication), more and more location-based social networks (LBSNs) have emerged, such as Gowalla, Foursquare, and Weibo, etc., where users are able to instantaneously share locations visited by them. In relation to this, if we can obtain and make full use of the collected information, including user check-in records and contexts from LBSNs, the accuracy of personalized POIs recommended to users would then greatly improve. Furthermore, with a user's POI information, it is possible to know when the user is at which location and how often he/she appears at the location. This will not only help us to explore potential customers but also design advertisements to attract customers.
In LBSNs, a personalized POI recommendation aims to recommend unvisited POIs to targeted users in terms of users' historical check-ins [2,3], which is of great significance in the realization of a smart city. This is because the received recommendation results are beneficial for users' personalized demands, users' behavior trends or trajectory predictions, as well as certain traffic fields related to users' behavior trends. However, to accurately predict whether a personalized user will visit a specific location at a specific time based on historical check-ins, it is a critical challenge to cope with the issue of data sparsity and trustworthiness. For example, in real-world Gowalla and Foursquare datasets, the user-POI checking-in density is 0.291% and 0.385%, respectively, and the user-POI rating matrix contains some noise [4,5], i.e., fake ratings and malicious feedbacks.
For this study, we have divided existing works into two categories: (1) Fused multiple factors models [6][7][8][9][10][11]: These works consider the roles of various context factors in order to determine and match user preferences, i.e., geographical, social, temporal, POI category, and textual content factors. The authors employ different advanced techniques to integrate these factors for POI recommendations, i.e., matrix factorization, convolution neural network, graph neural network, recurrent neural network, and deep neural network. However, all of them assume the user-POI rating is reliable and ignore the unreliable rating involved in check-ins. There is no doubt that if unreliable noise data are not excluded, the accuracy of recommendation is limited regardless of the model's optimization. (2) Trust-enhanced models [12][13][14][15]: These works [12][13][14] propose a user-user trust matrix modeled by calculating the trust relationship between users. Combining the user trust matrix and the user rating, they achieve the trust-enhanced similarity between users. The work [15] proposes a DeepWalk-based trust similarity measurement running over a co-visited network. Nevertheless, all of them ignore the temporal factor influence on the user similarity, leading to biased similarities. For example, the user u k visits POI l 1 and l 2 at time t 1 and t 2 , respectively, while u i checks in l 2 and l 1 at time t 1 and t 2 , respectively. When not considering time, the similarity between the two users is 1. However, if taking time into account, the similarity between them is 0, since the time of their check-ins on the two POIs is different. Existing methods fail to distinguish the difference. Furthermore, these authors only consider the trust filtering from the view of users, resulting in insufficient trustworthiness evaluations. For example, given a location l j and the check-in set L i l j / ∈ L i visited by u i , l j could be recommended to u i due to their stronger correlations on geographical or textual content factors. However, l j may not be a good choice for u i when it is rated by other unreliable users. Existing methods fail to consider the trust filtering from the view of locations.
To summarize, existing works suffer from two shortcomings:

•
These works fail to refine the influence of context factors and fusion between the user preference and context models; • These works ignore the role of the trust filtering from the view of locations.
To make up the shortcomings of existing works, we are the first to propose a novel bidirectional trust-enhanced collaborative filtering model for both trustworthiness and data sparsity problems. We have developed a trustworthy community combining the direct trust and the indirect trust between users, where the collaborative filtering is performed from the views of users and locations via leveraging temporal, geographical, and textual content factors. Secondly, to further alleviate the sparsity of user-POI rating matrices, we integrate a POI category factor into a weighted matrix factorization to learn the user preference. Thirdly, we develop a fused framework with two kinds of integrating methods for the trust filtering and the user preference models, which considers the different impacts of factors on the POIs that users have visited and the POIs that users have not visited. Finally, we conduct extensive experiments on two real-world datasets to evaluate our proposed POI recommendation model and baseline methods.
To sum up, our main contributions are as follows: • We propose a novel bidirectional trust-enhanced collaborative filtering model, which performs the trust filtering from the views of users and locations via leveraging temporal, geographical, and textual content factors. To our knowledge, we are the first to focus on trust filtering from the views of users and locations.

•
We refine the influence of context factors against the data sparsity problem.

•
We develop a fused framework for the trust filtering and the user preference models, which considers the different impacts of factors on the POIs that users have visited and the POIs that users have not visited.
The remainder of the paper is organized as follows. In Section 2, we review some stateof-the-art-related works. We present the overview and technical details of our proposed recommendation model in Section 3. In Section 4, we present our experimental setup and results. In Section 5, we conclude our work.

Related Works
In this paper, our proposed model aims to address the data sparsity and trustworthiness problems in POI recommender systems, and thus we review the related literature, including fused multiple context factors POI recommendations against data sparsity problem and trust-enhanced POI recommendations filtering out noise information.

Fused Multiple Factors POI Recommendations
To alleviate data sparsity, more and more work focus on exploring the roles of different context factors, i.e., geographical, social, temporal, POI category, and textual content factors. Gao et al. [16] model four types of friendships based on the geographical location and social relationship. Li et al. [17] propose three types of friendships, including social friends, location friends, and neighboring friends, which are fused into a unified matrix factorization framework with two loss functions for POI recommendation. Since user check-in behaviors vary with time, capturing user check-in temporal features is essential. Yuan et al. [18] propose a temporal factor-enhanced collaborative filtering model to recommend POIs at a specific time. Gao et al. [19] propose a spatiotemporal recommender network model to recommend unvisited POIs to a given user at a specific time in a day. However, these methods only consider a few context factors such as geographical, social, and temporal factors, causing a limited alleviation of data sparsity. Compared with them, our proposed model considers more context factors in predicting user POIs.
Furthermore, to utilize more context factors, some hybrid models have been proposed. Zhang et al. [6] propose a fused matrix factorization with multi-tag, social, and geographical factors for POI recommendation, where the multi-tag factor is extracted from the user-POI rating matrix. Xing et al. [7] propose a content-aware POI recommendation based on the convolutional neural network, which introduces three types of content information, including POI properties, user interests, and sentiment indications. Davtalab et al. [8] propose a probabilistic matrix factorization model integrating social spatiotemporal information, which develops a multivariable inference approach using the latent social space, geographical space, and POI category space similarities for POI recommendation. Liu et al. [9] argue that spatial and temporal effects should be analyzed simultaneously in POI recommendation, and they design a four-way neural interaction model over a spatiotemporal heterogeneous information network to mine user preferences. In addition, some works integrate various contexts to capture the user's next POIs in terms of his/her current check-in trajectory. Li et al. [10] propose an attention-based spatiotemporal gated graph neural network model for sequential POI recommendations. Dai et al. [20] propose a unified spatiotemporal neural network framework via leveraging users' check-in records and social ties, and the framework recommends POIs to users by joint embedding and sequential modeling. Chakraborty et al. [21] propose an unsupervised, generic framework involving a factored relevance model, which balances this trade-off between user historical preferences and current preferences. Yu et al. [22] propose a top-K initial POI recommendation model by considering the influence of similarity, popularity, and location of POIs, which is then used to further achieve subsequent recommendations through transfer probability. Wu et al. [11] present a personalized next POI recommendation framework, where they employ a long-and short-term method to learn the specific preference for each user by fusing the POI category and check-in time information. Xu et al. [23] develop a multi-modal collaborative filtering which focuses on addressing efficient cold-start recommendation.
They map multi-modal auxiliary features of users and items into binary hash codes and leverage a novel discrete optimization strategy to learn the user and item codes, reducing the storage cost in the hash optimization process. Considering that existing recommender systems fail to explain recommendations to users, Zhu et al. [24] propose an explainable discrete collaborative filtering, which is a multi-task learning framework fully exploiting the correlations between the preference prediction task and the explanation generation task based on hash codes for users and items. Margaris et al. [25] propose a novel collaborative filtering with the experiencing period criterion, aiming to keep recommendations close to users' patterns of practice. It can delay recommending a newly released item to users that prefer to delay the experience of new items in a particular category, while recommending these new items to other users who intend to experience trendy items in time. Wang et al. [26] develop a novel spatial-temporal and text representation learning framework which can learn long-term dependencies among visits in check-in sequences, users' perspectives, and POIs' reputations from textual reviews. Fang et al. [27] construct the user-POI interaction graph, the user social graph, and the POI geographical vector, which are fused via a graph neural network for POI recommendations. Nevertheless, these methods ignore the unreliable rating involved in check-ins, which lead to limited accuracy, although they employ different techniques to optimize the recommendation model. In contrast, our proposed model considers trust filtering from the views of users and locations.

Trust-Enhanced POI Recommendations
To filter out noise information in user rating matrices and achieve trust-enhanced recommendations, some works take the trust relationship between users in LBSNs into account. Deng et al. [28] propose a relevant trust walker to generate personalized POI recommendations, which enhances the trust relationship between similar users. Logesh et al. [12] propose a social pertinent trust walker model, which utilizes a modified random walk based on trust pertinence calculated by matrix factorization for POI recommendation. Liu et al. [29] propose a trust-aware recommendation model, where the trust relationship is measured by combining explicit and implicit trust between users. Ahmadian et al. [30] propose an effective neighbor selection mechanism for removing unreliable users from the nearest neighbor set, which enhance the accuracy of recommendations. Guo et al. [31] leverage implicit feedbacks of users to measure trust relationships between users. The trust relationship is used to model three factored similarities. Guo et al. [32] propose three heterogeneous graphs, including user-item interaction graph, user-user trust relation graph, and item-item knowledge graph. They present recommendations to users by fusing these heterogeneous graphs. Ahmed et al. [33] and Ma et al. [34] integrate the user trust relationship into deep neural networks for cross-domain recommendations, respectively. Zhao et al. [35] propose a fused user trust relationships tensor factorization model to address trustworthiness and data sparsity problems, where the trust relationships are divided into unilateral trust and mutual trust for an improved use of social information. Wang et al. [15] propose a trust-enhanced collaborative filtering model which fuses the geographical influence, temporal influence, and trust relationship learned by DeepWalk model running over the user co-visiting network. Ahmadian et al. [13,14] develop a trust matrix from user trust networks that are modeled by combining the similarities of user implicit ratings and the trust relationship between users. Additionally, the authors input trust matrices, user-item rating matrices, and user-tag matrices into a deep neural network to learn user preferences. These methods employ different techniques such as random walk, deep walk, and trust matrix to enhance trustworthiness. However, they only consider trust filtering from the view of users, resulting in insufficient trustworthiness evaluations. In contrast, our proposed model performs trust enhancement from the views of users and locations.

Problem Formulation
We focus on the research of a novel POI recommendation model with bidirectional trust filtering, which recommends unknown or unvisited POIs to targeted users in LBSNs on the premise of reliable users and locations, as illustrated in Figure 1. Firstly, to establish the trust weighted matrix, we propose a trustworthy community modeled by the combination of direct and indirect trusts, where reliable users and their corresponding visited POIs are included. We perform the collaborative filtering from the views of these users and locations in the trustworthy community. From the point of view of users, we propose a time-aware similarity measurement between users for modeling the user similarity matrix. We fuse the trust-weighted matrix and the user-similarity matrix to perform the trust user-based collaborative filtering and capture the trust user influence matrix. From the point of view of locations, we develop a location correlation measurement by leveraging geographical and content factors for modeling the POI geographical correlation matrix. We fuse the trust-weighted matrix and the geographical correlation matrix to achieve the trust location-based collaborative filtering and obtain the trust location influence matrix. Secondly, we integrate the POI category factor into a weighted matrix factorization to learn the user preference matrix to address sparse user-POI rating matrices. Thirdly, we present two kinds of integrating methods for the trust filtering and the user preference models, and the first fusion is to integrate the non-zero entities in the user preference matrix into the trust filtering models, and the second fusion is to take zero entities in the user preference matrix into the first fusion. Afterward, we can achieve top-k POIs that the target user would be interested in. The descriptions of some key notions are presented in Table 1. The overview of the proposed model. Green-filled area represents the proposed trust community framework, and the blue one denotes the methodology based on the trust community framework, including the trust-enhanced collaborative filtering from the views of users and locations and the two-step data fusion.

Definition 1.
(point-of-interest, POIl j ). Let l j = l j .loc, l j .doc , where l j .locrepresents the geographical location of l j , and l j .doc indicates the textual content of l j . Let a POI set be L = l 1 , l 2 , · · · , l j .

Definition 2.
(trustworthy community, TC). Let TC = (U, Nic), U = {u 1 , u 2 , · · · , u k } is a trust user set of u i , where there are the trust relationships between u k and u i . Nic = {Niche 1 , Niche 2 , · · · , Niche k }, where Niche k is a set of locations that are visited by u k .

Definition 3.
(trust relationship, TR). TR consists of direct trust (DTR) and indirect trust (IDTR). DTR: if u k and u i covisit POIs L, then there is DTR between u k and u i . IDTR: u k and u i do not covisit POIs L, but if there is DTR between u k and u p as well as u p and u i , then there is IDTR between u k and u i . Table 1. The descriptions of key notions.

Notions Descriptions
U, L, C The user set, POI set, POI category set R The user-POI rating matrix r i,j The frequency or rating of u i on l j , r i,j ∈ R TR k,i The trust weighted matrix DTR k,i The direct trust relationship between u i and u k IDTR k,i The indirect trust relationship between u i and u k [s k,i ] The user similarity matrix gs k,i The geographical similarity between u i and u k cs k,i The check-in behavior similarity between u i and u k The trust user influence matrix The trust location influence matrix P g l j Niche i The geographical correlation between l j and Niche i P c l j Niche i The textual content correlation between l j and Niche i The trust-enhanced context factor fused matrix The user preference matrix P The K-dimensional potential matrix for users Q The K-dimensional potential matrix for POIs V The K-dimensional potential matrix for POI categories

Modeling Trustworthy Community from LBSNs
We believe that it is an effective method to obtain DTR whereby both recommended users and the target user directly participate in the interactions of check-in POIs, where the trust is measured according to their ratings. Due to the applicability of the beta trust model [36] in building trust relationships based on a large number of ratings, we employ it to measure DTR between users. Moreover, compared with other clusteringand graph-learning methods, the beta model is simpler, more practical, and has lower time complexity. Let both u k and u i check in at l j , and the ratings of u k and u i on l j are r k,j and r i,j , respectively. When r k,j − r i,j is less than a fixed value, the recommendation to u i leveraging u k 's preference is positive, when otherwise negative. n k,i and n k,i are, respectively, the frequency of positive and negative recommendations. We use the beta probability density function to calculate the posterior probabilities (ρ, 1 − ρ) of positive and negative recommendations. DTR k,i can be calculated as follows: where Γ is the gamma function, 0 ≤ ρ ≤ 1. In recommender systems, the sparse phenomenon of the user interaction is common, thus a DTR between two users may not exist. We believe that IDTR mining is very essential to enhance the completeness of the trust relationship. As Definition 3 illustrated, IDTR can be measured through the transfer of DTR.
When D is a set consisting of the users that have DTR with the target user, the proposed IDTR ki can then be calculated by combining DTR kp , as follows: Based on DTR ki and IDTR ki , we can gain the trust relationship between u k and u i by: where α is a weighted parameter which denotes the relative importance of DTR to TR, and 0 ≤ α ≤ 1. We adopt a threshold θ to eliminate unreliable users and reserve trustworthy ones. When TR ki ≥ θ, u k and corresponding Niche k are reserved, or otherwise eliminated.

Trust User-Based Collaborative Filtering
We measure the similarities between u k and u i from two aspects. One is the geographical similarity. According to Tobler's First Law of Geography [37], everything is related to everything else, but near objects are more related with each other than distant objects. Thus, we believe that closer users are more similar. We employ the kernel function triangular method with nonparametric to estimate the user similarity on geography. Triangular can filter out users with low geographical correlations in contrast to other kernel functions (i.e., Gaussian). Specifically, the geographical similarity gs ki can be calculated as follows: where d(u k , u i ) returns the geographical distance between their residences. b is a width of the kernel function.
is, and the larger gs ki is. Another similarity is checking-in behavior similarity. We argue that the checking-in similarity between users should be considered by the same POIs and the similar POIs visited by them. For instance, u k and u i have visited l j , which could show that they have a similar preference. Additionally, u k has visited l j and u i has checked in l p , and l j and l p belong to the same category, which could show that they have a similar preference to some extent. Simultaneously, we observe that the checking-in frequency and time are important for the similarity measurement. The higher the frequency of both u k and u i visiting l j , the higher the similarity between u k and u i . The more consistent the time of both u k and u i checking-in l j is, the higher the similarity between u k and u i is. Therefore, we present a novel similarity measurement by taking these mentioned factors into account. We utilize CBOW model [38] to learn user checking-in behavior patterns and calculate the similarity with Earth Mover's Distance [39] EMD(u k , u i ).
Let the behavior patterns of u i and u k at time t be W t i and W t k , respectively.
. . , w qn , c qn , where w i is a word indicating l j , and c i is the normalized frequency of w i . T is a piece of a set of time slots, T = {1, 2, · · · , 24}, t ∈ T. Note that we integrate temporal factor into user checking-in behavior patterns to distinguish the check-ins at different times, leading to magnifying data sparsity. To address this challenge, we adopt a smoothing checkin method. Let the check-in vector corresponding to W t i be C i,t = C i,1,t , C i,2,t , · · · , C i,j,t , where C i,j,t = 1 if u i has visited l j at time t, and C i,j,t = 0, or otherwise. We propose to utilize the similarity η t,t between the vectors at t and t measured by Cosine similarity to smooth C i,t as follows: and we addĈ i,j,t to C i,t for updating W t i . Similarly, we update W t k via smoothing C k,t . Such improved EMD(u k , u i ) can be calculated as follows: where f ki is the consumption of conversion from w qk to w pi and d ki indicates the distance between w qk and w pi , as calculated by: and then the checking-in behavior similarity cs k,i can be calculated as follows: Accordingly, we can gain the similarity between u k and u i by: and further, the preference of the targeted user u i influenced by trust users can be estimated as follows:

Trust Location-Based Collaborative Filtering
We measure the correlation between locations from two aspects. One is the geographical correlation. Considering that the POIs in Niche i is personalized, we develop an adaptive bandwidth-based kernel density estimation for the personalized geographical correlation. u i has visited POI set Niche i = l 1 , l 2 , . . . , l q , . . . , l n }. r i,q is the frequency of u i checking in at l q , which is the weight of l q . The larger r i,q is, the more u i prefers l q . Based on Niche i , the geographical correlation can be calculated as follows: and where l j is visited by u k ∈ TC, l j ∈ Niche k , thereby enhancing the trust of l j . K Hh i l j − l q is a kernel function with respect to the adaptive bandwidth h i based on the fixed bandwidth H, including two global bandwidths (H 1 , H 2 ) which are calculated according to 4σ 5 /3n 1/5 = 1.06σn −1/5 [40], where σ is the standard deviation of the geographical coordinates of l q and l p (l q , l p ∈ Niche i ): and We further propose to obtain h i for Niche i by utilizing the fixed bandwidth H, as follows: and where K H l q − l p is a standard kernel function of H consisting of (H 1 − H 2 ). β is a sensitive parameter, 0 ≤ β ≤ 1, and the larger β is, the more sensitive h i is toP l q L i . Z represents the geometric mean ofP l q L i , calculated as follows: Then, K Hh i (l j − l q ) can be calculated as follows: where (x q , y q ) and (x q , y q ) correspond to the geographical coordinates of l q and l j , respectively. Next is the textual content correlation. The textual content of a POI illustrates the profile and equipment which shows what the user prefers. Through exploring the correlations between visited POIs and non-visited POIs, we can capture the potential POIs for users. We employ a topic model to capture contents and measure the correlation between them. Currently, latent Dirichlet allocation (LDA) is one of the most popular techniques for drawing topics. However, it fails to consider the temporal influence on the topic. We employ a beta distribution model to normalize the time from 0 to 1 in a day based upon the consideration that time is intrinsically continuous rather than discrete [18,19,41]. Essentially, we draw POIs' contents by topics and place textual contents of the same POIs together; thus, we can obtain a larger document set for each POI, which is represented as a random mixture of potential topics. Afterward, we will draw the topic features from documents using the word distribution with timestamps. The detailed steps are as follows: Draw a multinomial Φ z from a Dirichlet prior β for each topic z: Φ z |β ∼ Dirichlet(β) . Draw a multinomial θ d from a Dirichlet prior α for each document d for the location l j : θ d |α ∼ Dirichlet(α) .
Draw a topic z di from multinomial θ d for each word w di in document d for the location l j : z di |θ d ∼ Multinomial(θ d ) .
Draw a word w di from multinomial Φ z di for each word w di in document d for the location l j : Draw a timestamp Γ di from Beta Ψ z di for each word w di in document d for the location l j : T di Ψ z di ∼ Beta(Ψ z di ) .
We propose to employ Gibbs sampling to achieve the topic draw and obtain the conditional distribution based on the chain rule: where z −di indicates the topic assignments for all tokens w di in document d for location l q . T Beta Ψ z di 1 , Ψ z di 2 is updated as follows: and where T z and s 2 z indicate the timestamp sampling mean and covariance to topic z in profiles, respectively.
To summarize, the textual content correlation can be calculated as follows: Accordingly, we can gain the correlation between l j and Niche i , and the preference of the targeted user u i influenced by trust locations can be estimated as follows: L i,j = TR k,i · P g l j ∈ Niche k Niche i · P c l j ∈ Niche k Niche i (24)

Fused Model
We integrate U i,j and L i,j with the product rule, which has been widely applied to the fusing of different context factors, showing high robustness [42][43][44]: Indeed, the context factor plays an important role in predicting users' POIs, especially in data sparsity and cold-start problems. Meanwhile, user preference is much more important. In general, matrix factorization-based user preference modeling is common. Let p i be K-dimensional potential vector for u i , p i ∈ P,and q j be K-dimensional potential vector for l j , q j ∈ Q. Then, user preference can be denoted as I i,j = p T i q j . Accordingly, fused user preference models can be simply divided into two kinds. One is the Gaussian-distribution-based probability model, which weights non-zero entities as 1 and missing entities (zero entities) as 0. Another is the weighted matrix factorization model (WMF) [45], which weighs all entities as non-zero values in terms of check-in frequency. The details are as follows: where W i,j is the user preference weight, and ε is an adjustable parameter used to control the growth rate of W i,j with increasing r i,j . Taking the significance of missing entities into account, we adopt WMF as the basic fused framework for POI recommendation, as follows: where λ p and λ q are the regularization coefficients. Note that I i,j is still quite sparse in Equation (27). Therefore, we introduce the POI category factor into it. For example, if u i repeatedly visits l j that is a wetland park, u i may prefer this kind of POI. Consequently, the POI category factor can help model user preference and alleviate data sparsity. Let v c j be the K-dimensional potential vector that represents the category c for l j , c ∈ C, and v c ∈ V. We can thus improve user preference I i,j as: where γ is a trade-off parameter used to balance POI category influence to I i,j . Accordingly, we rewrite G as follows: where we introduce a regularization term ∑ |C| c=1 ||v c || 2 for the POI category, and λ v is the corresponding regularization coefficient. Furthermore, we observe that if u i has visited l j (C i,j = 1), then I i,j + H i,j will fit to C i,j = 1. When H i,j is smaller, I i,j may be larger to make up for I i,j + H i,j ≈ 1. For instance, l j is more distant from u i , but u i may prefer l j . Conversely, when I i,j is smaller, H i,j may be larger to make up for I i,j + H i,j ≈ 1. For instance, u i has a weak interest in l j , but l j is more nearby to u i . Therefore, the context factor is essential when predicting POIs. While if C i,j = 0, I i,j + H i,j will fit to C i,j = 0, thus I i,j < 0 due to H i,j > 0, which is unreasonable. The reason is that C i,j = 0 does not mean that u i is not interested in l j , and maybe u i does not know it exists. Surely, we can not conclude that u i is interested in l j , so that we believe that the better method is only I i,j is used to fit the user check-in. Finally, we present the refined objective function G as follows: To optimize G, we need to update matrix P, Q, and V. Considering that the user-POI rating matrix R is sparse where most missing entities exist, we will mainly deal with missing entities in the update process, such as ∑ u i ,l j / ∈R I 2 i,j . Notably, there is no context factor in ∑ u i ,l j / ∈R I 2 i,j , thus we can preprocess it offline to reduce time consumption. We develop an optimization method similar to eALS [46], which updates an element at a time instead of a vector. The advantage of the optimization is that it can avoid a large amount of time consumption caused by matrix transpose. Let x i, f , y j, f , and z c, f be the elements for P, Q, and V, respectively, and the following is achieved: where h j, f and I x i,j are indicated as follows: and and ψ h f ,e is an element for the defined cache matrix Φ h : Similarly, and where ψ p f ,e is an element for the defined cache matrix Φ p = P T P. I y i,j and I z i,j indicate: and

Time Complexity Analysis
The main time consumption of BiTCF is in the process of updating x i, f , y j, f , and z c, f . We take Equation (31) as an example, where most of the time consumption comes from missing items ∑ j/ ∈R i h j, f I x i,j and ∑ j/ ∈R i h 2 j, f , and thus we are the first to deal with the missing items. According to we can obtain the item that is not related to users of ∑ j=1 h j, f h j,k (similarly, ∑ j/ ∈R i h 2 j, f ). Therefore, Φ h (Equation (34)) can be updated offline. Except for the offline part, the online time complexity of calculating P is O |U|K 2 + |R|K . Correspondingly, the time complexity of calculating both Q and V is O |L|K 2 + |R|K in Equations (35) and (36), respectively. Therefore, the time complexity of our proposed model is O (|U| + |L|)K 2 + |R|K , which is the optimal time complexity among state-of-the-art models based on matrix factorization frameworks, to the best of our knowledge.

Datasets
We adopt Gowalla and Foursquare datasets, which are widely used LBSN datasets. Following the preprocessing performed by a previous work [47], we remove the users who have less than 10 check-in records or have checked in less than 5 POIs and POIs that have been visited by less than 10 users. Afterward, we gain the datasets as shown in Table 2 To evaluate the performance of our proposed model, we randomly select 80% check-in records from each user as the training set and the remaining 20% as the testing set. In the training and test processing, our proposed model takes about 200 epochs and 250 epochs to converge steadily on Gowalla and Foursquare for each run, which is analyzed in Section 4.5.

Baselines
• Context-influence-enhanced models (1) ASMF [17]: ASMF is a fused weighted matrix factorization with social factor which defines three types of friendships, including social friends, location friends, and neighboring friends, for POI recommendation. (2) TA [18]: TA is a temporal factor-enhanced collaborative filtering model that recommends POIs to a given user at a specific time.
ST-RNet [19]: ST-RNet is a spatiotemporal recommender network model which learns the cross-features and the combined features of users, POIs, and time together based on neural network. (4) SSTPMF [8]: SSTPMF is a POI recommendation model integrating social spatiotemporal information into probabilistic matrix factorization, which develops a multivariable inference approach using the latent social space, geographical space, and POI category space similarities for POI recommendation.
• Trust-enhanced models (1) SPTW [12]: SPTW is a social pertinent trust walker model for POI recommendation, which is modeled by calculating the level of trust between users in social networks. Combining high probability location category algorithm, SPTW can generate POI recommendation lists. (2) TECF [15]: TECF is a trust-enhanced collaborative filtering model, which fuses the geographic factor, temporal factor, and trust relationship learned by Deep-Walk model running over the user covisiting network, for POI recommendation.

Evaluation Metrics
We adopt two widely used metrics to evaluate the performance of BiTCF and the other baseline models, such as precision@k and recall@k with k = {5, 10, 20, 40}, as follows: and where S i (k) indicates the top-k POI list recommended to u i , and Test i is a POI set consisting of the POIs in the testing set visited by u i . All of the baseline models run over the test data 10 times, and each metric is also calculated 10 times and averaged to decrease errors.

Experimental Results
Firstly, we evaluate the performance of all models with top-5 recommendation results in different dimensions, K = {5, 10, 20, 40}. The results are shown in Table 3. When K < 10, the fused collaborative filtering models with context factors, i.e., TA and TECF, and the deep-learning-based model ST-RNet have more advantages over the other models based on matrix factorization. In particular, TECF is the most outstanding because it considers the trust relationship between users. When K ≥ 10, the matrix factorizationbased recommendation models, i.e., ASMF, SSTPMF, SPTW, and our proposed BiTCF, show excellent performance, among which SSTPMF and BiTCF performs best. When K = 20, BiTCF outperforms the other 6 models. Compared with SSTPMF, without considering the trust factor and TECF with the trust relationship between users, BiTCF considers the trust filtering from the views of users and locations. On the Gowalla dataset, the improvements over SSTPMF and TECF are 12.9% and 11.8%, respectively, as well as 14.5% and 13.4%, respectively, on the Foursquare dataset. Let K = 20 in other experiments we implement. Furthermore, we evaluate the performance of all models with top-k recommendation results in the dimension K = 20, k = {5, 10, 20, 40}. The experimental results are shown in Table 4. Evidently, with the increase in k, each model shows a trend of decreasing precision@k and increasing recall@k. The reason is that more POIs recommended to users contain more user preferences, while the POIs which may be visited will reduce. Specifically, the models integrating fewer context factors, i.e., ASMF and TA, are inferior to the models fusing more context factors, i.e., ST-RNet, SSTPMF, and BiTCF. Among the trust-enhanced models, TECF outperforms SPTW, and both are inferior to BiTCF. This is because BiTCF performs more sufficient trust filtering from the views of users and locations using various factors.
In addition, considering that the cold-start problem (given-n) is a serious challenge for recommender systems, we evaluate the performance of all models when each user only has visited the given n POIs, where n = {3, 5, 10}. The experimental results are shown in Table 5. As we can see, with the increase in n, each model shows a trend of increasing precision@5 and recall@5 because users visited more POIs, thus helping the models learn user preferences. Furthermore, the context factor plays an important role in predicting user preferences. The models integrating fewer context factors, i.e., ASMF, TA, and SPTW, are inferior to the models fusing more context factors, i.e., ST-RNet, SSTPMF, TECF, and BiTCF. Because BiTCF integrates user similarity, geographical factor, temporal factor, textual content factor, POI category factor, and trust factor, which can effectively and efficiently work in the cold-start problem, it is the best-performing model. We propose BiTCF for personalized POI recommendation via fusing 6 kinds of context factors, including user similarity, geographical factor, temporal factor, textual content factor, POI category factor, and trust factor. We evaluate the contributions of different factors to explore their roles. We name the model eliminating user similarity as BiTCF-U, the model eliminating geographical factor as BiTCF-G, the model eliminating temporal factor as BiTCF-T, the model eliminating textual content factor as BiTCF-C, the model eliminating POI category factor as BiTCF-Ca, and the model eliminating trust factor as BiTCF-BiT. The experimental results are shown in Figure 2. BiTCF has the best performance over all models, demonstrating the effectiveness of fusing these factors. The effectiveness of these factors is different: trust factor > user similarity > geographical factor > textual content > POI category > temporal factor. To explore the parameter sensitivity, we implement the experiments to understand the roles of different parameters in BiTCF. Here, there are 6 important parameters, i.e., θ, b, α, β, ε, γ. We still employ the same test set mentioned in Section 4.1 and select precision@5 and recall@5 as the metrics. Furthermore, we adapt the control variates for parameters to implement the experiments, namely we vary a parameter value while keeping the others constant. Figure 3 shows the sensitivity analysis of θ. On Gowalla, θ = 0.6, resulting in an optimal performance of BiTCF, and on Foursquare, θ = 0.55. When θ < 0.6 and 0.55 on Gowalla and Foursquare, respectively, the noise data are not adequately filtered, leading to limited efficiency. While θ > 0.6 and 0.55, the trust filtering is excessive, which seriously influences the number of available trustworthy users, resulting in the limited fitting of context factors. Figure 4 shows the sensitivity analysis of b. With the increase in b, BiTCF has a better performance, and the performance achieves an approximate optimal near b = 45 (Gowalla) and b = 30 (Foursquare). The larger b causes more neighbor users to participate in calculation, among which include more users who are distant from the target user (b > 45 and 30), causing a vainly increased calculation consumption. Figure 5 illustrates the sensitivity analysis of α. α balances the importance between DTR and IDTR. On Gowalla, when α = 0.7, BiTCF achieves the optimal performance, and α = 0.8 on Foursquare. Figure 6 shows the sensitivity analysis of β. When β = 0, the kernel density estimation method with adaptive bandwidth is reduced to the method with fixed bandwidth. BiTCF performs best when β = 0.5. If β < 0.5, P g l j Niche i has low sensitivity to user check-in records, and if β > 0.5, P g l j Niche i has a much higher sensitivity to user check-in records, causing fitting over. Figure 7 shows the sensitivity analysis of ε. Near ε = 3 and ε = 2 on Gowalla and Foursquare, respectively, BiTCF achieves the best performance. The reason is that our proposed model is based on a WMF framework, which assigns a non-zero weight to each missing entity and a weight calculated by using ε to the non-zero entities. If ε is smaller, there is little difference between the non-zero entities and missing entities, which impacts the role of non-zero entities. While if ε is bigger, the role of the missing entities is impacted. Figure 8 illustrates the sensitivity analysis of γ. γ trades off the impact of the POI category factor on BiTCF. As we can see, different γ values have a great impact on the performance of the model, and the model achieves the optimal performance when γ = 0.6 on Gowalla and γ = 0.4 on Foursquare.      BiTCF is combined with trust-user-based collaborative filtering (TUCF), trust-locationbased collaborative filtering (TLCF), and POI category-enhanced historical preference (CaP) modules. To evaluate the effectiveness of the above three modules, we implement the ablation experiment and the results are shown Figure 9. TUCF achieves a better performance compared with TLCF and CaP, and TLCF is superior to CaP. To evaluate the practical computing time complexity in training and test processing, we provide the converge speed of BiTCF on Gowalla and Foursquare datasets, as shown in Figure 10. BiTCF takes about 200 epochs and 250 epochs to converge steadily on Gowalla and Foursquare, which indicates the low computing time complexity of both training and test processing.

Conclusions
To address the trustworthiness and data sparsity problems in POI recommender systems, we propose a novel POI recommendation model with bidirectional trust-enhanced collaborative filtering. Firstly, we model a trustworthy community based on trust relationships. Secondly, we perform the trust filtering from the views of users and locations. From the views of users, taking the influence of temporal factors on user similarity into account, we propose a time-aware similarity measurement fusing trust factor. From the view of locations, considering the roles of geographical and textual content factors, we propose a location correlation measurement with geographical, textual content, and trust factors. Thirdly, we integrate the POI category factor into a weighted matrix factorization to learn user preference. To summarize, we have developed a fusion with two kinds of integrating methods for the trust-enhanced collaborative filtering and the user preference models.
Compared with the state-of-the-art models, the proposed model further considers the location trust alongside the user trust, and it refines context influence models for fitting the user preference more precisely. In addition, the model develops a novel fusion strategy to perform fusion between the user preference model and the trust-enhanced context models. Consequently, the model could even better facilitate user life, e.g., the user u i visits a series of POIs in a period of time, and the model then recommends some unvisited POIs to him/her based on historical records after comprehensively considering spatiotemporal factors, which can help users to accelerate retrieval and filter information from massive data.
We implement experiments on two widely used LBSN datasets to evaluate our proposed model. The model is deployed on a server with configuration (CPU: AMD Ryzen9 5950X 16-Core Processor 3.40 GHz; RAM: 128 G (32 GB DDR4-3600 DDR4 × 4); GPU: NVIDIA GeForce RTX3090 (24 GB) × 2; ROM: 1T SSD + 4T HDD) and run by Python + MongoDB. The experimental results demonstrate that our proposed model is effective and efficient and outperforms the state-of-the-art trust-enhanced POI recommendation models.
In the future, we will focus on ensuing POI recommendations, with an emphasis on the check-in sequence and the corresponding dependence relations between different POIs in the sequence of user real-time demands.

Data Availability Statement:
The data used to support this study are available from the corresponding author upon request.