# Joint Geosequential Preference and Distance Metric Factorization for Point-of-Interest Recommendation

Authors: Chunyang Liu; Chao Liu; Haiqiang Xin; Jian Wang; Jiping Liu; Shenghua Xu
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

Point-of-interest (POI) recommendation is a valuable service to help users discover attractive locations in location-based social networks (LBSNs). It focuses on capturing users’ movement patterns and location preferences by using massive historical check-in data. In the past decade, matrix factorization has become a mature and widely used technology in POI recommendation. However, the inner product of latent vectors adopted in matrix factorization methods does not satisfy the triangle inequality property, which may limit the expressiveness and lead to suboptimal solutions. Besides, the extreme sparsity of check-in data makes it challenging to capture users’ movement preferences accurately. In this paper, we propose a joint geosequential preference and distance metric factorization framework, called GeoSeDMF, for POI recommendation. First, we introduce a distance metric factorization method that is capable of learning users’ personalized preferences from a position and distance perspective in the metric space. Specifically, we convert the user-POI interaction matrix into a distance matrix and factorize it into user and POI dense embeddings. Additionally, we measure users’ personalized preference for the POI by using the Euclidean distance metric instead of the inner product. Then, we model the users’ geospatial preference by applying a geographic weight coefficient and model the users’ sequential preference by using the Euclidean distance of continuous check-in locations. Moreover, a pointwise loss strategy and AdaGrad algorithm are adopted to optimize the positions and relationships of users and POIs in a metric space. Finally, experimental results on three large-scale real-world datasets demonstrate the effectiveness and superiority of the proposed method.


---

## Body

## 1. Introduction

The rapid development of mobile internet, positioning technology, wireless communication technology, and smart mobile devices, has much promoted the development of location-based social networks (LBSNs), such as Foursquare, Gowalla, and Facebook places [1]. These LBSNs have attracted millions of users to share their locations and life experiences through check-in point-of-interest (POI), e.g., tourist attractions, restaurants, hotels, and shopping malls. A variety of available check-in data accumulated in LBSNs brings new opportunities for understanding and analyzing users’ mobility. In order to meet the users’ personalized needs for the location service, POI recommendation has been an important research topic in LBSNs [2]. As shown in Figure 1, the task of POI recommendation is to mine the users’ movement preferences based on the massive users’ historical check-in records and movement trajectories, to help the users to quickly discover exotic locations, and to overcome the “choice paralysis” problem [3]. POI recommendation not only provides users with a better location service experience but also helps location service providers tap potential customer requirements [4, 5].Figure 1
An example of users’ check-in behavior.Different from traditional recommendation tasks, the interactions between a user and POIs reflect the user’s real activities in the physical world. Therefore, POI recommendation will be more challenging due to the limitation of user’s activity range. There are two specific aspects: (1) the number of POIs visited by users is generally small, so the extreme sparsity of an individual user’s check-in data makes it difficult to obtain more accurate recommendation results; (2) the user’s movement preference changes dynamically in different spatiotemporal contexts. Therefore, there are two essential properties of users’ check-ins that should be considered to improve the POI recommendation performance. On the one hand, geographic distance has an essential impact on users’ check-in behavior. A large number of studies [6, 7] have shown that the geographical influence is the most significant on POI recommendation as the user’s activity range is a critical factor in determining whether the user travels far or not. The first law of geography [8] states that “everything is related to other things, but things that are closer are more closely related to,” which can be understood as the spatial correlation of everything in the geographic space. The association of things that are closer in a geographic area is stronger. For example, users usually visit POIs around their workplaces at weekday, while they are more inclined to visit some POIs near their homes at the weekend. On the other hand, the users’ check-in behavior presents specific sequential transition patterns. Existing research studies [9, 10] have shown that sequential behavior is vital for POI recommendation because human movement exhibits complex sequence relationships. For example, some users prefer to go to a bar or nightclub for entertainment after dinner, rather than going to the gym to exercise, which reflects the users’ sequential preference for check-ins. Therefore, we aim at designing a fine-grained POI recommendation framework by capturing geographical influence and sequential influence.Many advanced technologies, e.g., collaborative filtering (CF), Markov chain (MC), and metric learning (ML), have been proposed for POI recommendation. The matrix factorization-based CF approach becomes the first choice because it is widely used in traditional recommendation models [11]. To be specific, matrix factorization factorizes the large user-POI matrix into low-dimensional user/POI latent vectors and measures a user’s personalized preference for a POI by utilizing an inner product of latent vectors. Specifically, many POI recommendation methods based on the variants of matrix factorization, such as Bayesian personalized ranking (BPR) [12], weighted matrix factorization (WMF) [13], and probabilistic matrix factorization (PMF) [14], have been proposed. However, matrix factorization suffers from an inherent defect as the inner product does not satisfy the crucial triangle inequality property, which may significantly reduce the accuracy of modelling similarity between users and POIs. This weakness limits the expressiveness and generalization of the matrix factorization model [10, 15]. As another popular method, MC has been successfully applied to POI recommendation [16]. A major problem of MC‐based methods is that these methods are based on a strong independence assumption among different factors. Recent studies have demonstrated that ML-based methods have significant advantages in modelling user’s personalized preferences compared with traditional matrix factorization methods [9, 10]. Unlike the matrix factorization methods, the ML model can directly adopt a distance metric which satisfies the axiom of triangle inequality to cluster similar users and POIs in a metric vector space. However, some works demonstrated that ML methods might suffer from the problem of overcongestion in the metric vector space, resulting in suboptimal solutions [15].Thus, in this study, we propose a joint geosequential preference and distance metric factorization framework (GeoSeDMF), forming a new POI recommendation method. To be specific, to solve the POI recommendation task, we combine metric learning with factorization methods to capture users’ fine-grained personalized preferences, geospatial preferences, and sequential preferences. First, we introduced a distance metric factorization method to model a user’s personalized preference from a position and distance perspective in the metric vector space. Then, considering the geographical influence and sequential influence of the user’s check-in activity, the geographical influence is modelled by constructing the geographic weight coefficient, and the user’s movement sequential transition is modelled by using the Euclidean distance of the continuous check-in locations. Finally, it linearly integrates the above essential factors and constructs a unified framework for POI recommendation. The main contributions of this study can be summarized as follows:(i)
We introduce a distance metric factorization model for the POI recommendation task, which can effectively acquire the user’s personalized preferences from a position and distance perspective in the metric space. Specifically, we combine metric learning with factorization to avoid the limitations of traditional matrix factorization models.(ii)
We design a unified recommendation framework by capturing the two types of intrinsic influences (i.e., geographical and sequential influences) in users’ successive check-ins, which can model users’ fine-grained preferences for POIs and improve the performance of POI recommendation.(iii)
We conduct extensive experiments on three large-scale real-world datasets (i.e., Foursquare, Gowalla, and Instagram datasets) to evaluate the performance of our model. The experimental results show that our model outperforms other state-of-the-art methods.The rest of this paper is organized as follows. Section2 reviews the related work in POI recommendation. Section 3 introduces the preliminaries of this study. Section 4 presents the proposed model and optimization process in detail. Section 5 describes the experimental setups and presents the experimental results. Finally, we draw some conclusions of this study in Section 6.


## 2. Related Work

CF is one of the most widely used techniques in recommender systems [17, 18]. Hence, many traditional CF methods have been introduced for the POI recommendation task. The first category is about user-based CF or POI-based CF. Some previous works predicted a user’s preference based on the similarity of users or POIs by using a similarity measurement, such as cosine similarity or Pearson correlation [19, 20]. For example, Horozov et al. [19] developed a user-based CF method to recommend restaurants to a user by finding which restaurants similar users have visited before. User-based CF or POI-based CF models have practical benefits, but they usually focus on a small subset of users or POIs. The second category is about matrix factorization-based CF, which can learn the latent factors that represent users’ inherent preferences over POI’s multiple dimensions [21–25]. MF has also become a popular model in POI recommendation because of its simplicity and scalability.Due to the sparsity of user’s check-ins, exploiting only check-in counts often suffers from poor performance. To achieve more accurate recommendations, current studies mainly utilize various information to supplement the highly sparse check-in data for POI recommendation tasks, such as geographical information, sequential characteristics, temporal information, social connections, and content information. For example, Ye et al. [20] developed a user-based CF algorithm based on naive Bayesian. They proposed a unified recommendation framework, which incorporates both geographical influence and social influence within their model. Levandoski et al. [26] proposed a location-aware recommender system based on POI-based CF, which employs a user partitioning technique and a travel penalty technique to exploit item locations and provide a recommendation. Cheng et al. [22] first introduced the matrix factorization model to solve the POI recommendation task, and they studied users’ multicenter movement patterns and acquired the spatial preference by employing a multicenter Gaussian model. Yuan et al. [27] and Gao et al. [28] proposed the time-aware POI recommendation framework by using different temporal aggregation strategies. Liu et al. [29] introduced a geographical probabilistic factor model for POI recommendation, which effectively employs regional popularity, geographical influence, and user mobility. Lian et al. [23] first proposed to exploit WMF for the POI recommendation task since it usually serves CF with implicit feedback better. They designed a two-dimensional kernel density estimation model to capture the spatial clustering phenomenon. Recently, Lian et al. [24] further proposed a more efficient and flexible method, namely GeoMF++, which exploits both geographical influence and implicit feedback characteristics of check-in data. Wang et al. [30] used POI-specific geographical influence to improve POI recommendation, which models geographical influence by considering the geoinfluence of the POI, the geosusceptibility of the POI, and their physical distance. However, these methods have difficulty in solving the aforementioned inherent defects, and they fail to model complicated relations in the check-in sequence.Some existing works utilize the MC property to model check-in sequence relationships. Mathew et al. [31] introduced hidden Markov models (HMMs) to predict human mobility. Cheng et al. [16] proposed a personalized Markov chain model, namely, FPMC-LR, which takes into account users’ sequential transition and movement constraints. Zhang et al. [32] exploited the sequential influence on location recommendations based on the nth-order additive Markov chain (AMC), which represents the sequential patterns from a dynamic location-location transition graph perspective. However, MC-based methods made a strong assumption of independence among different components.Distance metric learning has become one of the most attractive research areas in machine learning, pattern recognition, and computer vision [33–35]. Ye et al. [36] proposed an adaptive metric learning (AML) model, which combines the ideas of clustering and distance metric learning. Chen et al. [37] proposed a nonlinear adaptive distance metric learning algorithm based on the AML algorithm combined with kernel learning technology. Wang et al. [38] learnt the distance metric by maximizing mutual information entropy. For the recommendation task, Hsieh et al. [39] argued that using inner product formulation lacks expressiveness in the matrix factorization model due to its violation of the triangle inequality, so they proposed the collaborative metric learning (CML) model which learns a joint metric space to encode not only users’ preferences but also the user-user and item-item similarity. Zhang et al. [40] proposed the factorized metric learning (FML) model which represents users and items as points in a metric vector space and further designed two variants of metric factorization to tackle the two classic recommendation tasks: rating prediction and item ranking. Tran et al. [41] introduced a new capable and competent recommendation model, namely, HyperML, to explore metric learning in the hyperbolic space in a recommender system. Recently, ML methods have been proved to be useful in solving POI recommendation tasks. For example, Feng et al. [9] proposed a personalized ranking metric embedding method (PRME) to model personalized check-in sequences, and they demonstrated that distance metric learning models can capture common preferences from similar users more effectively than traditional MF models. Ding et al. [10] proposed a spatiotemporal distance metric embedding method (ST-DME) for POI recommendation, which exploits both geosequential and temporal properties of check-in to model users’ time-specific preferences effectively.In addition to the above three types of methods, it is worth mentioning that neural networks have also been gradually applied in POI recommendations in recent years. For example, typical methods in existing research are based on Word2Vec [42, 43], multilayer perceptron (MLP) [44, 45], deep neural networks (DNNs) [46], recurrent neural networks (RNNs) [47, 48], convolutional neural networks (CNNs) [49], and attention model [50, 51].


## 3. Preliminaries to This Study

First, we introduce some relevant definitions used in this paper. Then, we shortly recapitulate the basic idea of matrix factorization and the metric learning model.


### 3.1. Notations and Definitions

Definition 1.
(POI). A POI is defined as a uniquely identified place (e.g., a hotel or a restaurant). In this paper, we useL=l1,l2,…,lN to denote a set of POIs, and each POI li1≤i≤N is associated with a unique geographical coordinate.Definition 2.
(check-in). In LBSNs, users can share their physical locations and life experiences in the form of check-ins, and a massive volume of check-in data has been collected at a lower cost. Each check-in record mainly contains a user-ID, POI-ID, timestamp, and comment content.Definition 3.
(preference matrix). In the POI recommendation task, the interaction betweenM users and N POIs can be expressed as a user-POI matrix R, and elements in the user-POI matrix are represented by 1 or 0 (each 0/1 indicates whether a user has visited the POI). The user-POI matrix implicitly reflects the users’ preference for POIs, so it is also called a preference matrix.Definition 4.
(distance matrix). In this paper, the distance matrix and the preference matrix can be regarded as a pair of opposite concepts. That is, the shorter the distance between the user and the POI in the metric space is, the higher the user’s preference for POI is. To be specific, the user-POI distance matrix can be calculated by adopting a simple principle (i.e., distance (u, l) = 1 − preference (u, l)), which we will describe later.Definition 5.
(geosequential preference). Geosequential preference contains the user’s geospatial preference and sequential preference. In this paper, we use geographic distance as a weighting factor to capture the geospatial preference and consider the sequential transition of continuous locations to capture the dynamic changes of the user’s preferences.


#### 3.1.1. Problem Definition (POI Recommendation)

The primary task of this study is to recommend to the POIs that the user is likely to visit in future travel plans by mining all users’ historical check-in information. To be specific, given a set ofM users and a set of N POIs, the user-POI preference matrix is represented as RM×N. We aim to generate a personalized POI recommendation list of k POIs to a user by using the distance metric factorization method and considering the user’s geosequential preference.Table1 presents some critical notations used in this paper.Table 1
Mathematical notations.
NotationExplanationu, l, U, LUser, POI, set of users, set of POIsPu, QlLatent vector of useru and POI lR, DPreference matrix, distance matrixEu,lEuclidean distance between the user and the POIElc,lEuclidean distance of the continuous locationsαComponent weightβDistance scaling factorwlc,lGeographic weight coefficientCu,lConfidence valuewu,lCheck-in frequency


### 3.2. Matrix Factorization Model

Matrix factorization has become a widely used method to solve the POI recommendation task. The basic idea is to map users and POIs to a low-dimensional latent space and to model users’ preferences by calculating the inner product of latent vectors of users and POIs. For example, a user-POI matrix containingM users and N POIs can be expressed as C (C∈ℝM×N), where the elements Cui in matrix C represent the check-in frequency of user u to POI i: then, the optimization problem based on matrix factorization is defined as(1)minP,QC−PQTF2+γPF2+QF2,where ⋅F is the Frobenius norm, P∈ℝM×d and Q∈ℝN×d (d≪minM,N) are the d-dimensional users’ latent vectors and POIs’ latent vectors, respectively, and γ is a nonnegative regularization parameter to avoid overfitting. Then, it becomes possible to approximate the missing value C˜uj=PuQjΤ by using the alternating least squares (ALS) algorithm.The matrix factorization method, as mentioned above, directly draws on the idea of traditional explicit recommendation (e.g., movie or music recommendation) but simply replaces the score information with the check-in frequency. However, in the POI recommendation, users’ historical check-in records belong to implicit feedback data. The check-in frequency only indicates the confidence level of the preference, and only positive samples can be observed. Therefore, POI recommendation is considered as a one-class collaborative filtering (OCCF) problem [6]. Hu et al. [13] proved that the WMF model could obtain better results on implicit feedback data. To be specific, all unobserved interactions are considered as negative samples, and the same weight is set, usually set to 1. For positive samples observed, the check-in frequency is used as the confidence of users’ preference, described as follows:(2)Wui=1+αCui,ifCui>0,1,otherwise,where αCui is a monotonically increasing function with respect to Cui. Based on this weighted matrix, the objective function of the POI recommendation problem can be further calculated by the following operation:(3)minP,QW⊙R−PQT2+γP2+Q2,where ⊙ indicates the element-wise matrix multiplication and R is the binary 0/1 matrix, and each entry Rui∈0,1 indicates whether user u has visited POI i. Similarly, an ALS algorithm can be used to solve the objective function efficiently.The basic idea of the POI recommendation method based on WMF is to use the inner product of the user/POI latent vectors. However, the inner product does not satisfy the triangle inequality property, which limits the expressive power of the matrix factorization model. In our method, we convert the user-POI matrix into a distance matrix and treat the POI recommendation problem from a position and distance perspective in the metric space, which effectively avoided the drawbacks of the existing matrix factorization methods.


### 3.3. Metric Learning Model

In recent years, ML methods have been most widely used in fields such as computer vision, pattern recognition, and machine learning. ML refers to obtaining a metric matrix that can reflect the distance between samples by learning a given training dataset. The distance in the metric space demonstrates the similarity between samples, so it is also called similarity learning. For ad-dimensional metric vector space Rd, in which all vectors ∀x⟶i,x⟶j,x⟶k∈Rd, the mapping function D in the metric space satisfies the following properties:(4)triangular inequality:Dx⟶i,x⟶j+Dx⟶j,x⟶k≥Dx⟶i,x⟶k,nonnegativity:Dx⟶i,x⟶j≥0,symmetry:Dx⟶i,x⟶j=Dx⟶j,x⟶i,distinguishability:Dx⟶i,x⟶j=0⟺x⟶i=x⟶j.In the metric space, Mahalanobis distance is a commonly used distance indicator in metric learning. For example, the distance between samplesx and y is measured by the measurement matrix Md×d, described as follows:(5)DM2x,y=x−yM2=x−yMx−yΤ,where M is a positive semidefinite matrix, which satisfies nonnegativity and symmetry.Given the equivalence constraints inS and the inequivalence constraints in D, the objective function can be expressed as(6)minM≥0∑x,y∈Sx−yM2,s.t.∑x,y∈Dx−yM2≥θ.Therefore, the idea of the ML model is to minimize the sum of squared distances of similar pairs while constraining the sum of squared distances of nonsimilar pairs. In this way, similar pairs in the new metric space are aggregated, and nonsimilar pairs are pushed farther, thereby achieving the purpose of similarity learning.


## 3.1. Notations and Definitions

Definition 1.
(POI). A POI is defined as a uniquely identified place (e.g., a hotel or a restaurant). In this paper, we useL=l1,l2,…,lN to denote a set of POIs, and each POI li1≤i≤N is associated with a unique geographical coordinate.Definition 2.
(check-in). In LBSNs, users can share their physical locations and life experiences in the form of check-ins, and a massive volume of check-in data has been collected at a lower cost. Each check-in record mainly contains a user-ID, POI-ID, timestamp, and comment content.Definition 3.
(preference matrix). In the POI recommendation task, the interaction betweenM users and N POIs can be expressed as a user-POI matrix R, and elements in the user-POI matrix are represented by 1 or 0 (each 0/1 indicates whether a user has visited the POI). The user-POI matrix implicitly reflects the users’ preference for POIs, so it is also called a preference matrix.Definition 4.
(distance matrix). In this paper, the distance matrix and the preference matrix can be regarded as a pair of opposite concepts. That is, the shorter the distance between the user and the POI in the metric space is, the higher the user’s preference for POI is. To be specific, the user-POI distance matrix can be calculated by adopting a simple principle (i.e., distance (u, l) = 1 − preference (u, l)), which we will describe later.Definition 5.
(geosequential preference). Geosequential preference contains the user’s geospatial preference and sequential preference. In this paper, we use geographic distance as a weighting factor to capture the geospatial preference and consider the sequential transition of continuous locations to capture the dynamic changes of the user’s preferences.


### 3.1.1. Problem Definition (POI Recommendation)

The primary task of this study is to recommend to the POIs that the user is likely to visit in future travel plans by mining all users’ historical check-in information. To be specific, given a set ofM users and a set of N POIs, the user-POI preference matrix is represented as RM×N. We aim to generate a personalized POI recommendation list of k POIs to a user by using the distance metric factorization method and considering the user’s geosequential preference.Table1 presents some critical notations used in this paper.Table 1
Mathematical notations.
NotationExplanationu, l, U, LUser, POI, set of users, set of POIsPu, QlLatent vector of useru and POI lR, DPreference matrix, distance matrixEu,lEuclidean distance between the user and the POIElc,lEuclidean distance of the continuous locationsαComponent weightβDistance scaling factorwlc,lGeographic weight coefficientCu,lConfidence valuewu,lCheck-in frequency


## 3.1.1. Problem Definition (POI Recommendation)

The primary task of this study is to recommend to the POIs that the user is likely to visit in future travel plans by mining all users’ historical check-in information. To be specific, given a set ofM users and a set of N POIs, the user-POI preference matrix is represented as RM×N. We aim to generate a personalized POI recommendation list of k POIs to a user by using the distance metric factorization method and considering the user’s geosequential preference.Table1 presents some critical notations used in this paper.Table 1
Mathematical notations.
NotationExplanationu, l, U, LUser, POI, set of users, set of POIsPu, QlLatent vector of useru and POI lR, DPreference matrix, distance matrixEu,lEuclidean distance between the user and the POIElc,lEuclidean distance of the continuous locationsαComponent weightβDistance scaling factorwlc,lGeographic weight coefficientCu,lConfidence valuewu,lCheck-in frequency


## 3.2. Matrix Factorization Model

Matrix factorization has become a widely used method to solve the POI recommendation task. The basic idea is to map users and POIs to a low-dimensional latent space and to model users’ preferences by calculating the inner product of latent vectors of users and POIs. For example, a user-POI matrix containingM users and N POIs can be expressed as C (C∈ℝM×N), where the elements Cui in matrix C represent the check-in frequency of user u to POI i: then, the optimization problem based on matrix factorization is defined as(1)minP,QC−PQTF2+γPF2+QF2,where ⋅F is the Frobenius norm, P∈ℝM×d and Q∈ℝN×d (d≪minM,N) are the d-dimensional users’ latent vectors and POIs’ latent vectors, respectively, and γ is a nonnegative regularization parameter to avoid overfitting. Then, it becomes possible to approximate the missing value C˜uj=PuQjΤ by using the alternating least squares (ALS) algorithm.The matrix factorization method, as mentioned above, directly draws on the idea of traditional explicit recommendation (e.g., movie or music recommendation) but simply replaces the score information with the check-in frequency. However, in the POI recommendation, users’ historical check-in records belong to implicit feedback data. The check-in frequency only indicates the confidence level of the preference, and only positive samples can be observed. Therefore, POI recommendation is considered as a one-class collaborative filtering (OCCF) problem [6]. Hu et al. [13] proved that the WMF model could obtain better results on implicit feedback data. To be specific, all unobserved interactions are considered as negative samples, and the same weight is set, usually set to 1. For positive samples observed, the check-in frequency is used as the confidence of users’ preference, described as follows:(2)Wui=1+αCui,ifCui>0,1,otherwise,where αCui is a monotonically increasing function with respect to Cui. Based on this weighted matrix, the objective function of the POI recommendation problem can be further calculated by the following operation:(3)minP,QW⊙R−PQT2+γP2+Q2,where ⊙ indicates the element-wise matrix multiplication and R is the binary 0/1 matrix, and each entry Rui∈0,1 indicates whether user u has visited POI i. Similarly, an ALS algorithm can be used to solve the objective function efficiently.The basic idea of the POI recommendation method based on WMF is to use the inner product of the user/POI latent vectors. However, the inner product does not satisfy the triangle inequality property, which limits the expressive power of the matrix factorization model. In our method, we convert the user-POI matrix into a distance matrix and treat the POI recommendation problem from a position and distance perspective in the metric space, which effectively avoided the drawbacks of the existing matrix factorization methods.


## 3.3. Metric Learning Model

In recent years, ML methods have been most widely used in fields such as computer vision, pattern recognition, and machine learning. ML refers to obtaining a metric matrix that can reflect the distance between samples by learning a given training dataset. The distance in the metric space demonstrates the similarity between samples, so it is also called similarity learning. For ad-dimensional metric vector space Rd, in which all vectors ∀x⟶i,x⟶j,x⟶k∈Rd, the mapping function D in the metric space satisfies the following properties:(4)triangular inequality:Dx⟶i,x⟶j+Dx⟶j,x⟶k≥Dx⟶i,x⟶k,nonnegativity:Dx⟶i,x⟶j≥0,symmetry:Dx⟶i,x⟶j=Dx⟶j,x⟶i,distinguishability:Dx⟶i,x⟶j=0⟺x⟶i=x⟶j.In the metric space, Mahalanobis distance is a commonly used distance indicator in metric learning. For example, the distance between samplesx and y is measured by the measurement matrix Md×d, described as follows:(5)DM2x,y=x−yM2=x−yMx−yΤ,where M is a positive semidefinite matrix, which satisfies nonnegativity and symmetry.Given the equivalence constraints inS and the inequivalence constraints in D, the objective function can be expressed as(6)minM≥0∑x,y∈Sx−yM2,s.t.∑x,y∈Dx−yM2≥θ.Therefore, the idea of the ML model is to minimize the sum of squared distances of similar pairs while constraining the sum of squared distances of nonsimilar pairs. In this way, similar pairs in the new metric space are aggregated, and nonsimilar pairs are pushed farther, thereby achieving the purpose of similarity learning.


## 4. Proposed GeoSeDMF Model

In this section, we introduce the GeoSeDMF model for the POI recommendation task. In detail, we first map users and POIs to a Euclidean metric space to obtain the user’s personalized preference. Then, we design a unified recommendation framework by capturing the geographical influence and sequential influence. Finally, we give specific methods for model optimization and parameter learning.


### 4.1. Overview

The framework of our GeoSeDMF model is presented in Figure2, and the detailed steps are as follows:Step 1: establish the user-POI preference matrixR based on the users’ historical check-in data, where the elements in the preference matrix are 1 or 0, indicating that the user has visited or has not visited the POI. In the traditional matrix factorization method, the preference matrix is generally directly adopted to calculate the user’s location preference.Step 2: convert the user-POI preference matrixR to the user-POI distance matrix D through a simple and efficient principle mentioned above. The purpose of this is that we can represent all users and POIs as points in the same metric vector space, so the distance between the user and the POI reflects the user’s preference for a POI. That is, we measure the user’s personalized preferences from the distance perspective.Step 3: construct a distance metric factorization model considering users’ fine-grained personalized preferences, geospatial preferences, and sequential preferences. Specifically, we combine metric learning and factor decomposition models, which can more accurately model the user’s personalized preferences as the Euclidean distance metric has better expressiveness than the inner product. Besides, we have considered the geosequential preference of the user’s check-in behavior, which we will introduce in detail later.Step 4: generate POI ranking and recommendation results. In this paper, we adopt a pointwise loss strategy and AdaGrad algorithm to optimize the positions and distance relationships between users and POIs in the metric space. Then, the top-k POI recommendation lists can be obtained according to the predicted distance from training.Figure 2
The framework of the GeoSeDMF.


### 4.2. Modelling Users’ Personalized Preference

As mentioned above, matrix factorization-based POI recommendation methods assume that users and POIs can be represented by latent factors in a low-dimensional space. In this paper, we regard all users and POIs as points in the metric space. The distance between the points is used to model their interaction. The closer the distance is, the higher the user’s preference for the POI is. To be specific, we introduce a simple principle (i.e., distance (u, l) = 1 − preference (u, l)) to convert the preference matrix R into a distance matrix D [15]. The distance matrix in our model represents the user-POI distance. We choose the distance matrix method for two reasons. First, the distance matrix is converted from the preference matrix, so the distance matrix can reflect the user’s preference for the POI. Second, it is straightforward to be used as the goal of metric learning. It is worth noting that the POI recommendation task should consider unobserved negative samples, and the calculation of the distance matrix can be further improved via the following equation:(7)Du,l=β1−Ru,l,where β is the distance scaling factor, which controls the shortest distance of negative samples, Ru,l represents the elements in the user-POI preference matrix, and Du,l represents the elements in the user-POI distance matrix.Unlike the matrix factorization method which treats users and POIs as vectors in a latent “translation space,” ML considers the users and POIs as points in the metric vector space, and their relationships are represented by distances (e.g., Euclidean distance or Mahalanobis distance). Through distance metric learning, all users and POIs in the metric vector space can be clustered to reveal the potential relationships between them. This involves mappingM users and N POIs into a d-dimensional (d≪minM,N) Euclidean space, and user u and POI l are represented as Pu∈ℝk and Ql∈ℝk in the Euclidean space, respectively. Therefore, the user’s personalized preference for the POI can be measured by the Euclidean distance, and squared Euclidean distance is used to simplify the calculation, as shown in the following equation:(8)Eu,l=Pu−Ql22,where ⋅2 is used to calculate the Euclidean distance between the user’s latent vector and POI’s latent vectors. In equation (7), Eu,l measures user u’s personalized preference for POI l. Intuitively, if user u is interested in location l, the value of Eu,l will be small, meaning that their position in the metric vector space will be close to each other. It is worth noting that our proposed model combines metric learning approaches and factorization-based models, which can effectively acquire the user’s personalized preferences from a position and distance perspective in the metric space. In addition, our model is essentially different from the method in [10, 39] because [10, 39] only use the metric learning model to solve the problem of triangle inequality; however, it possesses its own set of problems, i.e., overcongestion in the vector space.


### 4.3. Modelling Users’ Geosequential Preference

Unlike general recommendation (e.g., short videos, goods, movies, and news recommendation), POI recommendation is always closely related to users’ continuous movement behavior, and the users’ check-in behaviors are limited by the scope of activities. Therefore, we further consider geosequential properties in the metric space to improve the performance of POI recommendation. First, we use the Euclidean distances of the users’ continuous check-in locations to model sequential transition. Useru’s recent check-in POI lc and the next candidate check-in POI l are represented as Qlc and Ql in the same Euclidean space, respectively. A user’s sequential preference for a POI is measured as follows:(9)Elc,l=Qlc−Ql22,where ⋅2 is used to calculate the Euclidean distance between the recent check-in POI’s latent vectors and the next candidate check-in POI’s latent vectors.To simultaneously consider the user’s personalized preference and sequential preference, two types of Euclidean distances can be further linearly fused as follows:(10)ESu,l=αEu,l+1−αElc,l,where α∈0,1 is the hyperparameter used to control the weights of the two kinds of distance. Particularly, if α is set to 1, the metric can only learn the personalized preferences of users, without considering the user-specific sequential preference, while if α is set to 0, the distance metric only captures the sequential preference, and the POI recommendation model is nonpersonalized.Previous works have shown that the geographical distance has an essential effect on the POI recommendation. For example, users prefer to check-in POIs closer to the current location in practice. Therefore, similar to [9], we further introduce a geographic weight coefficient to model the user’s geographic preference as follows:(11)wlc,l=1+Δlc,lγ,where Δlc,l is the geographical distance from lc to l and γ is the hyperparameter used to control the contribution of the geographic distance. Therefore, the integrated metric with the geosequential preference is calculated as follows:(12)EGSu,l=wlc,l⋅αEu,l+1−αElc,l.Obviously, in the metric vector space, the fused distance metric can cluster similar users and POIs as the ML method satisfies the triangle inequality property. Also, these clusters can be modelled more accurately and practically in the metric space by considering the geographic influence and sequential influence. For example, if both useru and user u’ have visited POI l, the above method can not only pull user u and user u’ closer to POI l but also pull u closer to u’ in the metric vector space. In particular, the fused distance metric can not only effectively model users’ fine-grained preferences but also contribute to the interpretability of the POI recommendation system. To be specific, all users and POIs are modelled in the same metric vector space, and similar users are pulled closer since they share similar personalized preference and geosequential preference; such an operation can also effectively alleviate the data sparsity problem.


### 4.4. Model Optimization and Parameter Learning

In the specific POI recommendation task, the user-POI distance matrixD can be calculated according to formula (6), so our goal is to learn the predicted distance and position relationships between users and POIs based on the known distance matrix D. In order to learn a more accurately personalized POI ranking, we need to consider the unobserved items in the user-POI distance matrix. In many methods, unobserved items are regarded as negative samples, and joint pairwise ranking is used for training [6, 9, 10]. Our approach focuses on measuring the distance of the metric space, and the objective loss function based on a pointwise loss strategy is constructed as follows:(13)LGSPu,Qlc,Ql=∑u,lc,lCu,lDu,l−EGSu,l2=∑u,lc,lCu,lDu,l−wlc,l⋅αEu,l+1−αElc,l2=∑u,lc,lCu,lDu,l−wlc,l⋅αPu−Ql22+1−αQlc−Ql222,where Cu,l is the confidence value, which is used to consider all unobserved items and can be calculated as follows:(14)Cu,l=1+Ru,lwu,l,where wu,l is the check-in frequency of user u to POI l.It can be seen that, by optimizing and training the objective loss function, the users and the positive POIs are pulled closer in the metric space, and the negative POIs are pushed farther. Also, our proposed model has high flexibility and fewer training parameters.A proper regularization scheme is crucial for model training and can effectively solve model overfitting. Traditional matrix factorization methods generally useL2-norm regularization on users’ and POIs’ latent factors and biases. However, L2-norm creates a gradient to cluster users and POIs in the metric space close to the origin. This scheme is not suitable to be adopted here as the origin in the metric space does not have any specific meaning. Therefore, we bound all the users/POIs within a Euclidean ball, i.e.,(15)Pu2≤h,Ql2≤h,Qlc2≤h,where h is the Euclidean ball size; such a regularization scheme effectively avoids the curse of dimensionality.Similar to [15, 40], AdaGrad is used to optimize the objective loss function of the proposed GeoSeDMF method. As for the general gradient descent method, each parameter training uses the same learning rate, but AdaGrad can automatically adjust the learning rate during training. The specific training process is as follows:(16)gt,i=∇θtJθt,i,Gt,ii=∑i=1tgt,i2,θt+1,i=θt,i−ηGt,ii+ε⋅gt,i,where Jθt,i represents the objective function that needs to be minimized, corresponding to formula (13). gt,i is the gradient value of the current parameter. Gt,ii is the diagonal matrix, and each diagonal position (i, i) is the sum of squares of the corresponding parameters from the first round to the t-th round of the gradient. ε is a smooth term which is used to control the denominator to be nonzero. For the final POI recommendation task, we can directly sort according to the Euclidean distance trained in the metric space. The shorter distance between the user and the POI indicates that the user may have a greater interest in this POI.


## 4.1. Overview

The framework of our GeoSeDMF model is presented in Figure2, and the detailed steps are as follows:Step 1: establish the user-POI preference matrixR based on the users’ historical check-in data, where the elements in the preference matrix are 1 or 0, indicating that the user has visited or has not visited the POI. In the traditional matrix factorization method, the preference matrix is generally directly adopted to calculate the user’s location preference.Step 2: convert the user-POI preference matrixR to the user-POI distance matrix D through a simple and efficient principle mentioned above. The purpose of this is that we can represent all users and POIs as points in the same metric vector space, so the distance between the user and the POI reflects the user’s preference for a POI. That is, we measure the user’s personalized preferences from the distance perspective.Step 3: construct a distance metric factorization model considering users’ fine-grained personalized preferences, geospatial preferences, and sequential preferences. Specifically, we combine metric learning and factor decomposition models, which can more accurately model the user’s personalized preferences as the Euclidean distance metric has better expressiveness than the inner product. Besides, we have considered the geosequential preference of the user’s check-in behavior, which we will introduce in detail later.Step 4: generate POI ranking and recommendation results. In this paper, we adopt a pointwise loss strategy and AdaGrad algorithm to optimize the positions and distance relationships between users and POIs in the metric space. Then, the top-k POI recommendation lists can be obtained according to the predicted distance from training.Figure 2
The framework of the GeoSeDMF.


## 4.2. Modelling Users’ Personalized Preference

As mentioned above, matrix factorization-based POI recommendation methods assume that users and POIs can be represented by latent factors in a low-dimensional space. In this paper, we regard all users and POIs as points in the metric space. The distance between the points is used to model their interaction. The closer the distance is, the higher the user’s preference for the POI is. To be specific, we introduce a simple principle (i.e., distance (u, l) = 1 − preference (u, l)) to convert the preference matrix R into a distance matrix D [15]. The distance matrix in our model represents the user-POI distance. We choose the distance matrix method for two reasons. First, the distance matrix is converted from the preference matrix, so the distance matrix can reflect the user’s preference for the POI. Second, it is straightforward to be used as the goal of metric learning. It is worth noting that the POI recommendation task should consider unobserved negative samples, and the calculation of the distance matrix can be further improved via the following equation:(7)Du,l=β1−Ru,l,where β is the distance scaling factor, which controls the shortest distance of negative samples, Ru,l represents the elements in the user-POI preference matrix, and Du,l represents the elements in the user-POI distance matrix.Unlike the matrix factorization method which treats users and POIs as vectors in a latent “translation space,” ML considers the users and POIs as points in the metric vector space, and their relationships are represented by distances (e.g., Euclidean distance or Mahalanobis distance). Through distance metric learning, all users and POIs in the metric vector space can be clustered to reveal the potential relationships between them. This involves mappingM users and N POIs into a d-dimensional (d≪minM,N) Euclidean space, and user u and POI l are represented as Pu∈ℝk and Ql∈ℝk in the Euclidean space, respectively. Therefore, the user’s personalized preference for the POI can be measured by the Euclidean distance, and squared Euclidean distance is used to simplify the calculation, as shown in the following equation:(8)Eu,l=Pu−Ql22,where ⋅2 is used to calculate the Euclidean distance between the user’s latent vector and POI’s latent vectors. In equation (7), Eu,l measures user u’s personalized preference for POI l. Intuitively, if user u is interested in location l, the value of Eu,l will be small, meaning that their position in the metric vector space will be close to each other. It is worth noting that our proposed model combines metric learning approaches and factorization-based models, which can effectively acquire the user’s personalized preferences from a position and distance perspective in the metric space. In addition, our model is essentially different from the method in [10, 39] because [10, 39] only use the metric learning model to solve the problem of triangle inequality; however, it possesses its own set of problems, i.e., overcongestion in the vector space.


## 4.3. Modelling Users’ Geosequential Preference

Unlike general recommendation (e.g., short videos, goods, movies, and news recommendation), POI recommendation is always closely related to users’ continuous movement behavior, and the users’ check-in behaviors are limited by the scope of activities. Therefore, we further consider geosequential properties in the metric space to improve the performance of POI recommendation. First, we use the Euclidean distances of the users’ continuous check-in locations to model sequential transition. Useru’s recent check-in POI lc and the next candidate check-in POI l are represented as Qlc and Ql in the same Euclidean space, respectively. A user’s sequential preference for a POI is measured as follows:(9)Elc,l=Qlc−Ql22,where ⋅2 is used to calculate the Euclidean distance between the recent check-in POI’s latent vectors and the next candidate check-in POI’s latent vectors.To simultaneously consider the user’s personalized preference and sequential preference, two types of Euclidean distances can be further linearly fused as follows:(10)ESu,l=αEu,l+1−αElc,l,where α∈0,1 is the hyperparameter used to control the weights of the two kinds of distance. Particularly, if α is set to 1, the metric can only learn the personalized preferences of users, without considering the user-specific sequential preference, while if α is set to 0, the distance metric only captures the sequential preference, and the POI recommendation model is nonpersonalized.Previous works have shown that the geographical distance has an essential effect on the POI recommendation. For example, users prefer to check-in POIs closer to the current location in practice. Therefore, similar to [9], we further introduce a geographic weight coefficient to model the user’s geographic preference as follows:(11)wlc,l=1+Δlc,lγ,where Δlc,l is the geographical distance from lc to l and γ is the hyperparameter used to control the contribution of the geographic distance. Therefore, the integrated metric with the geosequential preference is calculated as follows:(12)EGSu,l=wlc,l⋅αEu,l+1−αElc,l.Obviously, in the metric vector space, the fused distance metric can cluster similar users and POIs as the ML method satisfies the triangle inequality property. Also, these clusters can be modelled more accurately and practically in the metric space by considering the geographic influence and sequential influence. For example, if both useru and user u’ have visited POI l, the above method can not only pull user u and user u’ closer to POI l but also pull u closer to u’ in the metric vector space. In particular, the fused distance metric can not only effectively model users’ fine-grained preferences but also contribute to the interpretability of the POI recommendation system. To be specific, all users and POIs are modelled in the same metric vector space, and similar users are pulled closer since they share similar personalized preference and geosequential preference; such an operation can also effectively alleviate the data sparsity problem.


## 4.4. Model Optimization and Parameter Learning

In the specific POI recommendation task, the user-POI distance matrixD can be calculated according to formula (6), so our goal is to learn the predicted distance and position relationships between users and POIs based on the known distance matrix D. In order to learn a more accurately personalized POI ranking, we need to consider the unobserved items in the user-POI distance matrix. In many methods, unobserved items are regarded as negative samples, and joint pairwise ranking is used for training [6, 9, 10]. Our approach focuses on measuring the distance of the metric space, and the objective loss function based on a pointwise loss strategy is constructed as follows:(13)LGSPu,Qlc,Ql=∑u,lc,lCu,lDu,l−EGSu,l2=∑u,lc,lCu,lDu,l−wlc,l⋅αEu,l+1−αElc,l2=∑u,lc,lCu,lDu,l−wlc,l⋅αPu−Ql22+1−αQlc−Ql222,where Cu,l is the confidence value, which is used to consider all unobserved items and can be calculated as follows:(14)Cu,l=1+Ru,lwu,l,where wu,l is the check-in frequency of user u to POI l.It can be seen that, by optimizing and training the objective loss function, the users and the positive POIs are pulled closer in the metric space, and the negative POIs are pushed farther. Also, our proposed model has high flexibility and fewer training parameters.A proper regularization scheme is crucial for model training and can effectively solve model overfitting. Traditional matrix factorization methods generally useL2-norm regularization on users’ and POIs’ latent factors and biases. However, L2-norm creates a gradient to cluster users and POIs in the metric space close to the origin. This scheme is not suitable to be adopted here as the origin in the metric space does not have any specific meaning. Therefore, we bound all the users/POIs within a Euclidean ball, i.e.,(15)Pu2≤h,Ql2≤h,Qlc2≤h,where h is the Euclidean ball size; such a regularization scheme effectively avoids the curse of dimensionality.Similar to [15, 40], AdaGrad is used to optimize the objective loss function of the proposed GeoSeDMF method. As for the general gradient descent method, each parameter training uses the same learning rate, but AdaGrad can automatically adjust the learning rate during training. The specific training process is as follows:(16)gt,i=∇θtJθt,i,Gt,ii=∑i=1tgt,i2,θt+1,i=θt,i−ηGt,ii+ε⋅gt,i,where Jθt,i represents the objective function that needs to be minimized, corresponding to formula (13). gt,i is the gradient value of the current parameter. Gt,ii is the diagonal matrix, and each diagonal position (i, i) is the sum of squares of the corresponding parameters from the first round to the t-th round of the gradient. ε is a smooth term which is used to control the denominator to be nonzero. For the final POI recommendation task, we can directly sort according to the Euclidean distance trained in the metric space. The shorter distance between the user and the POI indicates that the user may have a greater interest in this POI.


## 5. Experiments

In this section, we use three large-scale real-world datasets to evaluate the performance of the proposed GeoSeDMF method. First, we introduce the three public datasets, seven state-of-the-art baselines, and four widely used evaluation metrics. Then, we present our experiment settings and make a comparison between GeoSeDMF and the baselines. Finally, we study the impact of hyperparameters.


### 5.1. Datasets’ Description

Three public check-in datasets used in our experiments are Foursquare [27] (available at https://www.ntu.edu.sg/home/gaocong/datacode.htm), Gowalla [27] (available at https://www.ntu.edu.sg/home/gaocong/datacode.htm), and Instagram [52] (available at https://dmis.korea.ac.kr/cape), which are widely used benchmark datasets for evaluating POI recommendation algorithms. In the three datasets, each check-in comprises user-ID, POI-ID, timestamp, and geographical coordinates. The Foursquare dataset collects check-in data from August 2010 to July 2011 in Singapore. The Gowalla dataset collects check-in data from February 2009 to October 2010 in California and Nevada. The Instagram dataset collects check-in data from June 2011 to November 2016 in New York. To mitigate the impact of data sparsity, similar to [27, 50], we empirically filter out those users who have fewer than five check-in POIs and those POIs which are visited by less than five users. Especially, the Instagram dataset contains a small amount of data that lack timestamps, and we further removed these noisy data. Besides, to reduce the amount of calculations, we only use data from October 2015 to September 2016 in our experiments. After data preprocessing, the basic statistics of the three datasets are shown in Table 2. Moreover, Figure 3 presents all users’ spatial heat distribution of check-in in the three datasets. We can observe that users’ activity ranges are relatively centralized, which is in line with the human mobility pattern because people tend to check-in around several centers and tend to check-in nearby locations.Table 2
Statistics information of the three datasets.
StatisticsFoursquareGowallaInstagram#users223110,16216,889#POIs559624,2373961#check-ins194,108456,967278,735Avg. #check-ins per user45.5730.3616.5Avg. #visited POIs per user18.9012.6970.4Sparsity (%)99.1999.8899.58RegionSingaporeCalifornia and NevadaNew York CityTime rangeAug 2010–Jul 2011Feb 2019–Oct 2010Oct 2015–Sep 2016Figure 3
Spatial heat distribution of users’ check‐in in the three datasets. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)


### 5.2. Baseline Methods

To illustrate the effectiveness of the GeoSeDMF model, we compare it with the following state-of-the-art POI recommendation methods:(i)
BPR-MF [12], a Bayesian personalized ranking recommendation method based on matrix factorization: it optimizes the difference of user’s preferences for positive and negative POIs by adopting a weighted pairwise optimization criterion(ii)
GRU [53]: a robust variant of the RNN model, which leverages the temporal dependency in the users’ behavior sequence through the gated recurrent unit network(iii)
GeoMF [23]: a matrix factorization model that incorporates the geographical influence and explains the spatial clustering phenomenon(iv)
FPMC-LR [16]: a first-order Markov model that models personalized sequential transitions and takes into account users’ movement constraints(v)
PRME-G [9]: a metric learning model that considers the geographic distance as a weight(vi)
POI2Vec [43]: a latent representation model that incorporates the geographical influence and sequential influence(vii)
ST-LSTM [48]: a new variant of LSTM, which implements time gates and distance gates into LSTM to capture the spatiotemporal relation between successive check-ins


### 5.3. Evaluation Metrics

We choose three widely used evaluation metrics, namely, Recall@k [6, 16], F1-score@k [47, 50], and NDCG@k [49], where k is the length of the recommendation list. Formally, the three metrics are formulated and defined as(17)Recall@k=1N∑u=1NRuk∩TuTu,F1−score@k=1N∑u=1N2⋅Ruk∩Tu/k⋅Ruk∩Tu/Tu|Ruk∩Tu|/k+Ruk∩Tu/Tu,NDCG@K=1N∑u=1N1Yu∑n=1k2reln−1log2n+1,where Ruk denotes the set of POIs recommended to user u. Tu denotes the set of POIs user u actually visited in the test set. reln denotes the relevance of the nth POI to the user. Yu denotes the maximum DCG value of user u. Note that we report results of the three metrics with the setting of k = 5, 10, and 20 in our experiments. For all the metrics, the larger the value, the better the POI recommended performance.


### 5.4. Experiment Setup

In our experiments, the latent factor dimensiond, the Euclidean ball size h, the hyperparameter α, and the initial learning rate are set to 110, 1, 0.6, and 0.05, respectively. The hyperparameter β is set to 3 on the three datasets. Other baseline parameters are determined with grid search and random search to ensure all baselines achieve their best performance [54]. In order to facilitate the comparison of all algorithms, the training set and the test set of the experimental data are divided in the same way as that in [12, 49], i.e., leave-one-out evaluation. To be specific, for each user’s check-in sequence, the last POI is the test data, and the other data are for training. Specifically, all experiments are conducted with Python 3.5 and TensorFlow under a single GeForce RTX 2080Ti GPU environment.


### 5.5. Experimental Results

Figures4–6 depict the overall performance comparison of all methods evaluated by Recall, F1-score, and NDCG on the three datasets. From the comparison results, we can draw the following conclusions: (1) it is obvious that our proposed GeoSeDMF outperformed all baselines for POI recommendation on the three datasets, which shows the effectiveness of the GeoSeDMF in solving the POI recommendation task. (2) We can observe both BPR-MF and GRU perform poorly because they do not take into account additional spatiotemporal contextual information. Although BPR utilizes the ranking-based optimization strategy and GRU considers the users’ sequence relationships, they are still insufficient to improve the POI recommendation performance effectively. (3) Compared with BPR-MF and GRU, GeoMF incorporated geographical information into the WMF model. Therefore, its performance is significantly better on the three datasets, indicating that modelling the geographical influence is essential for POI recommendation. (4) Unlike the GeoMF model which is based on the matrix factorization method, FPMC-LR and PRME are based on Markov chain and metric learning, respectively. It is worthy to note that FPMC-LR and PRME-G considered both geographical influence and sequential influence. However, it can be seen that FPMC-LR has not achieved higher accuracy than GeoMF, perhaps because the FPMC-LR model is limited by the independence assumption of the Markov model. Fortunately, PRME-G has better performance than that of FPMC-LR. This meaningful result indicates that the use of ML and ranking-based optimization strategies can effectively improve the recommendation performance. Besides, we observe that POI2Vec slightly improves the performance compared with FPMC-LR and PRME-G because it incorporates the geographical influence of POIs in learning latent representations and develops a method to model the user preference and POI sequential transition jointly. (5) Among the baseline methods, ST-LSTM has the state-of-the-art performance compared with other baselines as it can well model temporal and spatial contexts by using a new variant of LSTM. Compared with ST-LSTM, the proposed GeoSeDMF has further improved the recommendation performance. For instance, on the Foursquare dataset, Recall@5, Recall@10, Recall@20, F1-score@5, F1-score@10, F1-score@20, NDCG@5, NDCG@10, and NDCG@20 values of the GeoSeDMF increased by 9.74%, 8.68%, 12.86%, 9.50%, 7.72%, 12.97%, 8.11%, 7.88%, and 10.45%, respectively. Similarly, on the Gowalla datasets, the above evaluation values were increased by 8.12%, 8.31%, 10.52%, 8.78%, 9.43%, 9.37%, 8.07%, 7.93%, and 10.05%, respectively. Also, on the Instagram dataset, the performance improvements in the above evaluation metrics were 7.14%, 8.03%, 11.44%, 7.49%, 8.17%, 13.33%, 8.60%, 9.82%, and 11.13%, respectively.Figure 4
Performance comparison results on the Foursquare dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Figure 5
Performance comparison results on the Gowalla dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Figure 6
Performance comparison results on the Instagram dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Overall, our GeoSeDMF is optimal on three datasets, indicating the advantage of incorporating the geosequential influence via joint distance metric learning and factorization model. On the one hand, the GeoSeDMF model adopts the ML method to learn the positions and distances of users and POIs in the metric space. Unlike PRME-G, which also uses the ML method, the GeoSeDMF can directly sort the distance and generate recommendations by factorizing the metric space, so it effectively avoids the shortcomings of traditional matrix factorization methods. On the other hand, the GeoSeDMF model comprehensively considers the combined effects of users, POIs, sequence contexts, and spatial contexts and can simultaneously model general preferences, sequential transitions, and geographical influence of users’ check-in behavior.


### 5.6. Study of the Influence of Parameters

We study the influence of several hyperparameters in the GeoSeDMF, which are latent dimension sized, Euclidean ball size h, component weight α, and distance scaling factor β. We adopt the metric Recall@k to report the performance results of the GeoSeDMF model with various values of hyperparameters.Figure7 shows the recommended quality for different values of latent dimensions regarding Recall@5 and Recall@10 on the three datasets. In our experiment, we set d to 20, 40, 60, 80, 100, 120, 140, 160, 180, and 200, respectively. From Figure 7, it can be seen that the performance of the GeoSeDMF increases with d as higher dimensions can capture more complex interactions and learn more latent features. When the latent dimension value reaches 110, the model can obtain the best performance and then tends to stabilize. It is worth noting that, with the further increase of the latent dimension value, the model does not have obvious overfitting problems, which also proves that the stability and generalization ability of the proposed GeoSeDMF method are superior to those of the traditional matrix factorization method.Figure 7
Impact of latent dimension size on the GeoSeDMF. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)Figure8 presents the performance of the GeoSeDMF by varying the value of Euclidean ball size h from 0.5 to 1.5 regarding Recall@5 and Recall@10 on the three datasets. From the results, we observe that the performance first improves quickly with the increase of the value of Euclidean ball sizes, and then the increment becomes small. GeoSeDMF achieves the best performance on the three datasets when h is set to 1, i.e., a unit Euclidean ball. Therefore, for the POI recommendation task, setting h to 1 is sufficient as the implicit feedback is either 0 or 1.Figure 8
Impact of Euclidean ball size on the GeoSeDMF. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)Figure9 presents the performance of the GeoSeDMF by varying the value of component weight α from 0 to 1.0 and the distance scaling factor β from 1.5 to 5 while keeping the other optimal hyperparameters unchanged. As shown in Figure 9(a), GeoSeDMF achieves the best performance when component weight α is set to 0.6. As shown in Figure 9(b), GeoSeDMF achieves the best performance when distance scaling factor β is set to 3. However, β does not have as much influence as that of other parameters.Figure 9
Impact of component weight and distance scaling factor on the GeoSeDMF. (a) Component weight. (b) Distance scaling factor.
(a)(b)


## 5.1. Datasets’ Description

Three public check-in datasets used in our experiments are Foursquare [27] (available at https://www.ntu.edu.sg/home/gaocong/datacode.htm), Gowalla [27] (available at https://www.ntu.edu.sg/home/gaocong/datacode.htm), and Instagram [52] (available at https://dmis.korea.ac.kr/cape), which are widely used benchmark datasets for evaluating POI recommendation algorithms. In the three datasets, each check-in comprises user-ID, POI-ID, timestamp, and geographical coordinates. The Foursquare dataset collects check-in data from August 2010 to July 2011 in Singapore. The Gowalla dataset collects check-in data from February 2009 to October 2010 in California and Nevada. The Instagram dataset collects check-in data from June 2011 to November 2016 in New York. To mitigate the impact of data sparsity, similar to [27, 50], we empirically filter out those users who have fewer than five check-in POIs and those POIs which are visited by less than five users. Especially, the Instagram dataset contains a small amount of data that lack timestamps, and we further removed these noisy data. Besides, to reduce the amount of calculations, we only use data from October 2015 to September 2016 in our experiments. After data preprocessing, the basic statistics of the three datasets are shown in Table 2. Moreover, Figure 3 presents all users’ spatial heat distribution of check-in in the three datasets. We can observe that users’ activity ranges are relatively centralized, which is in line with the human mobility pattern because people tend to check-in around several centers and tend to check-in nearby locations.Table 2
Statistics information of the three datasets.
StatisticsFoursquareGowallaInstagram#users223110,16216,889#POIs559624,2373961#check-ins194,108456,967278,735Avg. #check-ins per user45.5730.3616.5Avg. #visited POIs per user18.9012.6970.4Sparsity (%)99.1999.8899.58RegionSingaporeCalifornia and NevadaNew York CityTime rangeAug 2010–Jul 2011Feb 2019–Oct 2010Oct 2015–Sep 2016Figure 3
Spatial heat distribution of users’ check‐in in the three datasets. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)


## 5.2. Baseline Methods

To illustrate the effectiveness of the GeoSeDMF model, we compare it with the following state-of-the-art POI recommendation methods:(i)
BPR-MF [12], a Bayesian personalized ranking recommendation method based on matrix factorization: it optimizes the difference of user’s preferences for positive and negative POIs by adopting a weighted pairwise optimization criterion(ii)
GRU [53]: a robust variant of the RNN model, which leverages the temporal dependency in the users’ behavior sequence through the gated recurrent unit network(iii)
GeoMF [23]: a matrix factorization model that incorporates the geographical influence and explains the spatial clustering phenomenon(iv)
FPMC-LR [16]: a first-order Markov model that models personalized sequential transitions and takes into account users’ movement constraints(v)
PRME-G [9]: a metric learning model that considers the geographic distance as a weight(vi)
POI2Vec [43]: a latent representation model that incorporates the geographical influence and sequential influence(vii)
ST-LSTM [48]: a new variant of LSTM, which implements time gates and distance gates into LSTM to capture the spatiotemporal relation between successive check-ins


## 5.3. Evaluation Metrics

We choose three widely used evaluation metrics, namely, Recall@k [6, 16], F1-score@k [47, 50], and NDCG@k [49], where k is the length of the recommendation list. Formally, the three metrics are formulated and defined as(17)Recall@k=1N∑u=1NRuk∩TuTu,F1−score@k=1N∑u=1N2⋅Ruk∩Tu/k⋅Ruk∩Tu/Tu|Ruk∩Tu|/k+Ruk∩Tu/Tu,NDCG@K=1N∑u=1N1Yu∑n=1k2reln−1log2n+1,where Ruk denotes the set of POIs recommended to user u. Tu denotes the set of POIs user u actually visited in the test set. reln denotes the relevance of the nth POI to the user. Yu denotes the maximum DCG value of user u. Note that we report results of the three metrics with the setting of k = 5, 10, and 20 in our experiments. For all the metrics, the larger the value, the better the POI recommended performance.


## 5.4. Experiment Setup

In our experiments, the latent factor dimensiond, the Euclidean ball size h, the hyperparameter α, and the initial learning rate are set to 110, 1, 0.6, and 0.05, respectively. The hyperparameter β is set to 3 on the three datasets. Other baseline parameters are determined with grid search and random search to ensure all baselines achieve their best performance [54]. In order to facilitate the comparison of all algorithms, the training set and the test set of the experimental data are divided in the same way as that in [12, 49], i.e., leave-one-out evaluation. To be specific, for each user’s check-in sequence, the last POI is the test data, and the other data are for training. Specifically, all experiments are conducted with Python 3.5 and TensorFlow under a single GeForce RTX 2080Ti GPU environment.


## 5.5. Experimental Results

Figures4–6 depict the overall performance comparison of all methods evaluated by Recall, F1-score, and NDCG on the three datasets. From the comparison results, we can draw the following conclusions: (1) it is obvious that our proposed GeoSeDMF outperformed all baselines for POI recommendation on the three datasets, which shows the effectiveness of the GeoSeDMF in solving the POI recommendation task. (2) We can observe both BPR-MF and GRU perform poorly because they do not take into account additional spatiotemporal contextual information. Although BPR utilizes the ranking-based optimization strategy and GRU considers the users’ sequence relationships, they are still insufficient to improve the POI recommendation performance effectively. (3) Compared with BPR-MF and GRU, GeoMF incorporated geographical information into the WMF model. Therefore, its performance is significantly better on the three datasets, indicating that modelling the geographical influence is essential for POI recommendation. (4) Unlike the GeoMF model which is based on the matrix factorization method, FPMC-LR and PRME are based on Markov chain and metric learning, respectively. It is worthy to note that FPMC-LR and PRME-G considered both geographical influence and sequential influence. However, it can be seen that FPMC-LR has not achieved higher accuracy than GeoMF, perhaps because the FPMC-LR model is limited by the independence assumption of the Markov model. Fortunately, PRME-G has better performance than that of FPMC-LR. This meaningful result indicates that the use of ML and ranking-based optimization strategies can effectively improve the recommendation performance. Besides, we observe that POI2Vec slightly improves the performance compared with FPMC-LR and PRME-G because it incorporates the geographical influence of POIs in learning latent representations and develops a method to model the user preference and POI sequential transition jointly. (5) Among the baseline methods, ST-LSTM has the state-of-the-art performance compared with other baselines as it can well model temporal and spatial contexts by using a new variant of LSTM. Compared with ST-LSTM, the proposed GeoSeDMF has further improved the recommendation performance. For instance, on the Foursquare dataset, Recall@5, Recall@10, Recall@20, F1-score@5, F1-score@10, F1-score@20, NDCG@5, NDCG@10, and NDCG@20 values of the GeoSeDMF increased by 9.74%, 8.68%, 12.86%, 9.50%, 7.72%, 12.97%, 8.11%, 7.88%, and 10.45%, respectively. Similarly, on the Gowalla datasets, the above evaluation values were increased by 8.12%, 8.31%, 10.52%, 8.78%, 9.43%, 9.37%, 8.07%, 7.93%, and 10.05%, respectively. Also, on the Instagram dataset, the performance improvements in the above evaluation metrics were 7.14%, 8.03%, 11.44%, 7.49%, 8.17%, 13.33%, 8.60%, 9.82%, and 11.13%, respectively.Figure 4
Performance comparison results on the Foursquare dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Figure 5
Performance comparison results on the Gowalla dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Figure 6
Performance comparison results on the Instagram dataset. (a) Recall. (b) F1-score. (c) NDCG.
(a)(b)(c)Overall, our GeoSeDMF is optimal on three datasets, indicating the advantage of incorporating the geosequential influence via joint distance metric learning and factorization model. On the one hand, the GeoSeDMF model adopts the ML method to learn the positions and distances of users and POIs in the metric space. Unlike PRME-G, which also uses the ML method, the GeoSeDMF can directly sort the distance and generate recommendations by factorizing the metric space, so it effectively avoids the shortcomings of traditional matrix factorization methods. On the other hand, the GeoSeDMF model comprehensively considers the combined effects of users, POIs, sequence contexts, and spatial contexts and can simultaneously model general preferences, sequential transitions, and geographical influence of users’ check-in behavior.


## 5.6. Study of the Influence of Parameters

We study the influence of several hyperparameters in the GeoSeDMF, which are latent dimension sized, Euclidean ball size h, component weight α, and distance scaling factor β. We adopt the metric Recall@k to report the performance results of the GeoSeDMF model with various values of hyperparameters.Figure7 shows the recommended quality for different values of latent dimensions regarding Recall@5 and Recall@10 on the three datasets. In our experiment, we set d to 20, 40, 60, 80, 100, 120, 140, 160, 180, and 200, respectively. From Figure 7, it can be seen that the performance of the GeoSeDMF increases with d as higher dimensions can capture more complex interactions and learn more latent features. When the latent dimension value reaches 110, the model can obtain the best performance and then tends to stabilize. It is worth noting that, with the further increase of the latent dimension value, the model does not have obvious overfitting problems, which also proves that the stability and generalization ability of the proposed GeoSeDMF method are superior to those of the traditional matrix factorization method.Figure 7
Impact of latent dimension size on the GeoSeDMF. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)Figure8 presents the performance of the GeoSeDMF by varying the value of Euclidean ball size h from 0.5 to 1.5 regarding Recall@5 and Recall@10 on the three datasets. From the results, we observe that the performance first improves quickly with the increase of the value of Euclidean ball sizes, and then the increment becomes small. GeoSeDMF achieves the best performance on the three datasets when h is set to 1, i.e., a unit Euclidean ball. Therefore, for the POI recommendation task, setting h to 1 is sufficient as the implicit feedback is either 0 or 1.Figure 8
Impact of Euclidean ball size on the GeoSeDMF. (a) Foursquare. (b) Gowalla. (c) Instagram.
(a)(b)(c)Figure9 presents the performance of the GeoSeDMF by varying the value of component weight α from 0 to 1.0 and the distance scaling factor β from 1.5 to 5 while keeping the other optimal hyperparameters unchanged. As shown in Figure 9(a), GeoSeDMF achieves the best performance when component weight α is set to 0.6. As shown in Figure 9(b), GeoSeDMF achieves the best performance when distance scaling factor β is set to 3. However, β does not have as much influence as that of other parameters.Figure 9
Impact of component weight and distance scaling factor on the GeoSeDMF. (a) Component weight. (b) Distance scaling factor.
(a)(b)


## 6. Conclusions

In this study, we propose a joint geosequential preference and distance metric factorization model (GeoSeDMF) for POI recommendation, which handles the recommendation task from a position and distance perspective in the metric space by simultaneously considering users’ fine-grained personalized preferences, geospatial preferences, and sequential preferences. More specifically, the proposed method measures a user’s preference for a POI by adopting a Euclidean distance metric to replace the inner product. It can not only avoid the shortcomings (i.e., does not satisfy the triangle inequality property) of the existing matrix factorization methods but also help to handle the data sparsity. Besides, we have designed a geosequential preference fusion framework to combine the geographical and sequential influence for preference inference. The experimental results on three large-scale real-world datasets indicate that the GeoSeDMF significantly outperforms the state-of-the-art methods for POI recommendation in terms of three widely used metrics, i.e., Recall, F1-score, and NDCG. For future studies, we will focus on the extension of the GeoSeDMF by incorporating more check-in information, such as review texts, to improve its scalability and performance.



---

*Source: 6582676-2020-10-30.xml*