# Joint Modeling of User Behaviors Based on Variable-Order Additive Markov Chain for POI Recommendation

Authors: RuiChang Li
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

The POI recommendation system has become an important means to help people discover attractive and interesting places. Based on our data analysis, we observe that users pay equal attention to conservatism and curiosity. In particular, adopting analysis corresponding to different time intervals, we find that users lean towards old POIs in the short term and look for new POIs with the increase of the time interval. However, existing approaches usually neglect users’ conservatism and curiosity preferences. Therefore, they are confronted with a bottleneck of depicting accurate user needs, making it difficult to improve the recommendation performance further. Besides, we further find that the number of user daily check-ins has uneven distribution, which is not conducive to capture the accurate transition patterns of user behaviors. In light of the above, we design a single POI sequential method. On this basis, we propose a recommendation method of the variable additive Markov chain. We consider the user sequential preferences, especially liking old and pursuing new features. In addition, our model exploits the geographical tendency of user behaviors. Finally, we conduct abundant experiments on four cities in the two real datasets, i.e., Foursquare and Jiepang. The experimental results show its superiority over other competitors.


---

## Body

## 1. Introduction

Recommender systems are valuable tools that play a crucial role in mitigating information overload problems. Today, such systems are used in many application domains [1–3]. With the increasing popularity of WSN [4] and location-based social networks (LBSNs), such as Foursquare, Gowalla, and Yelp, unlimited possibilities are provided for users to share their highlights. Users not only explore location-aware information but also write reviews and share their experiences [5]. In LBSNs, user-generated trajectory data contains rich information, such as POI location, category, content, visited time, and trajectory sequence, which can be used to exploit user’s preferences for providing personalized POI recommendation for the target user. There are huge business opportunities. So the academic and industry has invested a great deal of enthusiasm and energy in studies of recommendation, such as location-based activity recommendation [6], friend recommendation [1, 7], and location recommendation [8, 9]. In these studies, providing location recommendations becomes an important application with the rapid emergence of LBSNs, such as POIs recommendation [10–16] and routes recommendation [17, 18].Existing researches mainly study how to use time influence, geographical influence, social relationship, and other characteristics for POI recommendation. For example, a user is more likely to choose a restaurant for dinner at noon. A POI closer to the current location is more popular with the user, and friends may have similar preferences. However, these studies mainly provide POI recommendations based on common sense analysis and fail to notice that users’ past experiences that will affect their attitudes towards POI. For example, the pursuit of familiarity and novelty is also an important factor. Through data analysis and reasoning, we found some interesting phenomena to consider POI recommendations from a new perspective.In a limited geographic space, users tend to like the old and pursue the new. We define POIs that users have visited as old POIs and that have not been visited in the previous period as new POIs. Due to time and distance constraints, the user choice space and the number of new POIs are limited. For a user, he chooses a POI considering his available time and the acceptable transfer distance. For example, if the user only has half an hour, POIs that take longer than an hour are not considered. If the user likes to walk, then POIs within 1 km are more popular. Long-distance movement requires more time and financial support, which limits users’ desire to visit it. The POIs that users frequently visit are not evenly distributed geographically but clustered around limited centers [19, 20]. For example, users have more check-ins near their homes, workplaces, and popular areas. Taylor’s first law of geography also confirms this phenomenon [21]. Obviously, the category and number of POIs are limited in a limited geographic area. After repeated exploration by users, new POIs will gradually become old. Therefore, users can only choose POIs on the premise that the new is less and the old is more.The POI alternates between the old and the new, driving users to like the old and pursue the new POIs. As we all know, users often visit the same POI multiple times, and each visit has a different experience. For example, it is impossible for the user to taste all dishes of a restaurant at one time. For scenic spots, users will find discoveries during repeated visits. For example, climbing the Great Wall from different roads has different sceneries, and the view in the morning and evening is also different. In addition, the POI is also changing. For example, POIs may be updated irregularly, and the surrounding environment may also vary. Just as it is impossible for a person to step into the same river, all the POIs constantly change. Changes of the POI and the surrounding environment will make the old POI glow with new appeal. Intuitively, users will prefer the new POI to the old one. For example, if a restaurant leaves a good memory to the user, the user’s experience of going to this restaurant again for dinner will not be worse than the last time and may be better. The user will not wander in the corridor as he revisited the museum the first time, he will be more confident, and the second visit will be smoother than the initial visit [22].Sparse trajectories affect the acquisition of POI relationships. We define a sequence containing multiple POIs as a dense trajectory, and correspondingly, the other holding a single POI is called a sparse trajectory. Intuitively, a user sometimes generates multiple check-ins a day. Occasionally, they check in only one POI, and even worse, they do not do that for several days. Some studies believe that there is an association relationship between POIs that a user visits continuously, and this relationship reflects the law of cooccurrence between them. Intuitively, due to the continuity of user behavior, the smaller the time interval between check-ins, the more the influential impact on the next behavior. In practice, there are studies that use hours, days, weeks, months, etc., as time intervals [23]. No matter what time interval is used, there will be dense and sparse trajectories coexisting. Currently, two methods are usually used to deal with sparse trajectories: (1) filter out the check-in records of a single POI and only retain the dense trajectories that visit multiple POIs in a day and (2) increase the time threshold between adjacent POIs to expand the coverage of a single trajectory. For example, we can adjust the time interval so that POIs of several consecutive days are formed a trajectory. However, both of them have drawbacks. The first method will make user data more sparse, which is not conducive to accurately obtaining user preferences. Correspondingly, although the second method reduces data loss, it introduces some additional noise. Obviously, additional noise may interfere with the accuracy of user preferences.In this paper, we propose a variable-order additive Markov chain based on sequential patterns, the influence of liking the old and pursuing the new, and geographical restriction (SONG). In SONG, the model consists two components: POI transition and variable influence. The POI transition probability model is used to obtain the one-step transition probability between any POIs. The variable influence model is used to extract the joint influence of three factors. We first construct a POI-POI transition graph based on the user-POI interaction sequence contained in check-in trajectories of all users. The transition probabilities can be deduced by dividing transition degrees by outgoing degrees of the graph vertex. Then, we jointly model the variable effects of liking old, pursuing new, and geographical restriction based on the mere exposure effect [24], depreciation theory [25], and Taylor’s first law [21], respectively. We finally provide TOP-N POI recommendations. The main contributions of this paper can be summarized:
(1)
User check-in behavior has an apparent feature of liking the old and pursuing the new. Currently, there is no research on this feature. We found that it is mainly due to the unbalanced distribution of interest POIs and user likes to pursue familiarity and novelty, which provides new ideas for POI recommendations(2)
The check-in number of a user is very uneven every day. For example, there may be only one or no record in a day. This imbalanced situation influences acquiring the sequence pattern implied by the user’s check-in behavior. We propose a method to serialize sparse trajectories, which alleviates the problems caused by the neglect of a single POI or the introduction of additional noise by extending the sequence and better obtain user preferences(3)
Based on the above discovery and the results of single POI serialization, we propose a variable-order additive Markov chain model to capture the influence of historical sequences on subsequent POIs. Then, we use the mere exposure effect and depreciation theory to jointly model the users’ preference of preferring old, pursuing new, and combine the geographical restriction to provide personalized recommendations(4)
We conducted extensive experiments on four city subsets of real trajectory datasets, Foursquare and Jiepang. Experimental results show that our model outperforms other state-of-the-art methods.The remainder of the paper is organized as follows. In Section2, we review related work on POIs recommendation. In Section 3, we first describe and define the task we are tackling. Then, we make data analysis on four subdatasets of two real-world datasets. In Section 4, we present our proposed model SONG for POI recommendation in detail. In Section 5, we describe our experiment settings for evaluating the performance of SONG against the state-of-the-art POI recommendation techniques. Finally, Section 6 concludes this paper.


## 2. Related Work

POI recommendation based on trajectories is a hot topic in LBSNs, and it has attracted increasing attention in both academia and industry. Therefore, we briefly introduce three lines of researches related to our task: (a) POI recommendation based on temporal; (b) recommendation based on geographical influence; and (c) sequential POI recommendation. All of these factors are closely related to acquiring user preferences [26].


### 2.1. POI Recommendation Based on Temporal

Temporal influence plays a vital role in POI recommendation. Yuan et al. [10] found out that most users tend to visit different POIs at a different time in a day, and the check-in behaviors between neighbor time slots are similar. In addition to that, Zhang et al. [27] pointed out that POI may be not available in all time, for example, POIs are only accessible during their opening hours. He et al. [28] investigated the temporal popularity of a POI and the temporal check-in trends to provide personalized POI recommendation. He et al. [28] propose a spatial-temporal topic model (STM), which embedded the temporal and spatial patterns in users chick-in activities. Oppokhonov et al. [29] develop a recommendation system based on a directed graph. The algorithm of the system considers both the temporal factor and the distance for recommending a new POI for next hours. Gao et al. [30] put forward four temporal aggregation strategies, such as sum, mean, maximum, and voting, to integrate a user’s check-in preferences of different temporal states. The method using the strategy greatly improves the POI recommendation performance. Ji et al. [31] proposed a social-period-aware topic model (SPATM) to learn the influence weights of both user interests and her social preferences on making-decision for each check-in time automatically. Actually, the time law of users’ behaviors include two different patterns, i.e., periodic and aperiodic. For example, a user may like to find a restaurant for dinner at noon, which is periodic. Since the historical experience will affect the user’s choice of the target POI, this influence is generally believed to be related to the interval between visiting two POIs. For convenience, we use the interval hops between POIs instead of specific time to model aperiodic effects.


### 2.2. Recommendation Based on Geographical Influence

In LBSNs, the geographical influence is an important factor that distinguishes the POI recommendation from other recommendations because physical interactions are required for users to visit POIs [32]. For example, users prefer to select POIs near to their homes or offices and also may be fond of exploring the nearby POIs of their current locations. Several studies have attempted to leverage the geographical influence to improve POI recommendation systems [33, 34]. Ye et al. [35] proposed a power-law distribution model to capture the geographical influence, and proposed a collaborative POI recommendation algorithm based on geographical influence via naive Bayesian. Because it is difficult to find an anchor point to derive a reasonable distance for the new POI, Zhang et al. [32] develop a kernel function to model the geographical influence. The kernel function on two-dimensional is more reasonable than the one-dimensional distance power-law distribution. For users’ check-ins is unevenly distribution. Some exiting studied assume that user checked locations conform to the Gaussian distribution of multiple centers. Chenget al. [19] proposed a multicenter Gaussian model to capture the geographical influence for POI recommendation. In addition to directly using geographical influences, there are some joint model methods. Liu et al. [13] develop a general geographical probabilistic factor model (Geo-PFM) to capture the geographical influence on user mobility behaviors, and then combine the influence with Bayesian nonnegative matrix factorization (BNMF) to model user preferences. Finally, POIs are recommended for users by combining the effects of multiple factors. Yin et al. [12] propose a joint probabilistic generative model to integrate geographical-social influence, temporal and word-of-mouth effect for solving check-in data sparsity in the out-of-town recommendation scenario. Griesner et al. [15] propose a augmenting matrix factorization model (GeoMF-TD) for POI recommendation by combining geographical and temporal influences. Li et al. [16] put forward a ranking based geographical factorization method (Rank-GeoFM) model to provide POIs prediction. Specifically, the proposed model can easily combine geographical influence and temporal influence. In this paper, we use power-law distribution to capture the influence of distance on the user’s choice of POI.


### 2.3. Sequential POI Recommendation

In the real world, users’ behaviors usually happen in succession, and the next action is often related to the previous one. In recent years, studies have focused on various sequential recommendation tasks, such as next POI recommendation [29, 36]. Early studies were typically based on the Markov chain models for sequential recommendation [32, 36]. For example, He and McAuley [36] proposed fossil that fuses similarity-based models with the Markov chains to predict personalized sequential behavior. Cheng et al. [8] developed a matrix factorization method, which embeds the personalized Markov chains and the localized regions for solving the sequential recommendation task. The order of the Markov chain model decides the scale-free parameters. A higher order will increase the computation cost. Following the development of machine learning, a lot of complex models have been proposed: recurrent neural networks (RNNs) [37], convolutional neural networks (CNNs) [38, 39], translation-based methods [40], and attention mechanism [41]. Approaches based RNN are popular models for sequential recommendation due to their performance on sequential works. Liu et al. [42] extend RNN and propose a novel method to model temporal and spatial contexts for different time intervals and distance-specific transition matrices for different geographical distances. However, existing RNN methods neglect some details of users preferences, thus making the recommendation results unreliable. To address the above limitations, Sun et al. [43] proposed a method named LSTPM for next POI recommendation. Li et al. [44] introduce a novel neural network model named TMCA that employed the LSTM-based encoder-decoder framework for the next POI recommendation. In this paper, we use a variable high-order Markov chain to model the relationship between preceding POI to the posterior in trajectory.


## 2.1. POI Recommendation Based on Temporal

Temporal influence plays a vital role in POI recommendation. Yuan et al. [10] found out that most users tend to visit different POIs at a different time in a day, and the check-in behaviors between neighbor time slots are similar. In addition to that, Zhang et al. [27] pointed out that POI may be not available in all time, for example, POIs are only accessible during their opening hours. He et al. [28] investigated the temporal popularity of a POI and the temporal check-in trends to provide personalized POI recommendation. He et al. [28] propose a spatial-temporal topic model (STM), which embedded the temporal and spatial patterns in users chick-in activities. Oppokhonov et al. [29] develop a recommendation system based on a directed graph. The algorithm of the system considers both the temporal factor and the distance for recommending a new POI for next hours. Gao et al. [30] put forward four temporal aggregation strategies, such as sum, mean, maximum, and voting, to integrate a user’s check-in preferences of different temporal states. The method using the strategy greatly improves the POI recommendation performance. Ji et al. [31] proposed a social-period-aware topic model (SPATM) to learn the influence weights of both user interests and her social preferences on making-decision for each check-in time automatically. Actually, the time law of users’ behaviors include two different patterns, i.e., periodic and aperiodic. For example, a user may like to find a restaurant for dinner at noon, which is periodic. Since the historical experience will affect the user’s choice of the target POI, this influence is generally believed to be related to the interval between visiting two POIs. For convenience, we use the interval hops between POIs instead of specific time to model aperiodic effects.


## 2.2. Recommendation Based on Geographical Influence

In LBSNs, the geographical influence is an important factor that distinguishes the POI recommendation from other recommendations because physical interactions are required for users to visit POIs [32]. For example, users prefer to select POIs near to their homes or offices and also may be fond of exploring the nearby POIs of their current locations. Several studies have attempted to leverage the geographical influence to improve POI recommendation systems [33, 34]. Ye et al. [35] proposed a power-law distribution model to capture the geographical influence, and proposed a collaborative POI recommendation algorithm based on geographical influence via naive Bayesian. Because it is difficult to find an anchor point to derive a reasonable distance for the new POI, Zhang et al. [32] develop a kernel function to model the geographical influence. The kernel function on two-dimensional is more reasonable than the one-dimensional distance power-law distribution. For users’ check-ins is unevenly distribution. Some exiting studied assume that user checked locations conform to the Gaussian distribution of multiple centers. Chenget al. [19] proposed a multicenter Gaussian model to capture the geographical influence for POI recommendation. In addition to directly using geographical influences, there are some joint model methods. Liu et al. [13] develop a general geographical probabilistic factor model (Geo-PFM) to capture the geographical influence on user mobility behaviors, and then combine the influence with Bayesian nonnegative matrix factorization (BNMF) to model user preferences. Finally, POIs are recommended for users by combining the effects of multiple factors. Yin et al. [12] propose a joint probabilistic generative model to integrate geographical-social influence, temporal and word-of-mouth effect for solving check-in data sparsity in the out-of-town recommendation scenario. Griesner et al. [15] propose a augmenting matrix factorization model (GeoMF-TD) for POI recommendation by combining geographical and temporal influences. Li et al. [16] put forward a ranking based geographical factorization method (Rank-GeoFM) model to provide POIs prediction. Specifically, the proposed model can easily combine geographical influence and temporal influence. In this paper, we use power-law distribution to capture the influence of distance on the user’s choice of POI.


## 2.3. Sequential POI Recommendation

In the real world, users’ behaviors usually happen in succession, and the next action is often related to the previous one. In recent years, studies have focused on various sequential recommendation tasks, such as next POI recommendation [29, 36]. Early studies were typically based on the Markov chain models for sequential recommendation [32, 36]. For example, He and McAuley [36] proposed fossil that fuses similarity-based models with the Markov chains to predict personalized sequential behavior. Cheng et al. [8] developed a matrix factorization method, which embeds the personalized Markov chains and the localized regions for solving the sequential recommendation task. The order of the Markov chain model decides the scale-free parameters. A higher order will increase the computation cost. Following the development of machine learning, a lot of complex models have been proposed: recurrent neural networks (RNNs) [37], convolutional neural networks (CNNs) [38, 39], translation-based methods [40], and attention mechanism [41]. Approaches based RNN are popular models for sequential recommendation due to their performance on sequential works. Liu et al. [42] extend RNN and propose a novel method to model temporal and spatial contexts for different time intervals and distance-specific transition matrices for different geographical distances. However, existing RNN methods neglect some details of users preferences, thus making the recommendation results unreliable. To address the above limitations, Sun et al. [43] proposed a method named LSTPM for next POI recommendation. Li et al. [44] introduce a novel neural network model named TMCA that employed the LSTM-based encoder-decoder framework for the next POI recommendation. In this paper, we use a variable high-order Markov chain to model the relationship between preceding POI to the posterior in trajectory.


## 3. Task Definition and Data Analysis

In this section, we first describe and define the task we are tackling. Then, we make data analysis on four subdatasets of two real-world datasets, which serve as the foundation of our model.


### 3.1. Task Definition

A notationU denotes the collection of users U=u1,u2,uu, and the notation V represents the collection of POIs V=v1,v2,vV. We use the v to represent a POI identifier and lv to denote its corresponding geographical attribute in terms of longitude and latitude coordinates. For each user u∈U, we sort her historical records by time and subdivided these into trajectories with different lengths relying on the suitable time interval, i.e., Su=su1,su2,⋯,sun, where n denotes the latest trajectory. The subtrajectory suj=v1,v2,⋯.,vt is the jth trajectory of user u. Given a trajectory set of target user u, our goal is to recommend Top-N POIs, namely Prv∣suj=Prv∣vn,vn−1,v2,v1.


### 3.2. Dataset Description

We conduct analysis on four real-world datasets from the Foursquare [45] and the JiePang [11]. The Foursquare check-in dataset is from 12 April 2012 to 16 February 2013 in New York (NYC) and Tokyo (TKY), while JiePang contains Beijing and Shanghai from April 2011 to April 2013. For all of them, we filter unpopular POIs with less than five user visits.


### 3.3. Data Analysis

In theory, users can check any locations. However, user behavior is affected by various factors such as available time, geographic distance, and economic support. Users often look for interesting POIs near their living and working centers. Intuitively, users’ repeated exploration might make POIs less appealing, but users can always find pleasure in these POIs. It is worth exploring that makes these POIs so appealing.We divide POIs into two categories. POIs that appeared in the last time period are called old POIs, and the corresponding ones that did not appear are called new POIs. Figure1 shows the new and old changes of POIs by different time intervals. We use different time intervals to analyze the new and old changes of visited POIs. Traditionally, we divide a year into 52 weeks. In the figure, “2012-02” indicates the second week of 2012. Figure 1 contains four cities information, and every city has two figures. The left takes one week as an interval, and the right is five weeks. As we can see from the left figure of every city, the old POI is predominant. Especially, the Foursquare dataset shows this more clearly. Comparing the left and right, it is clear that the ratio of new POIs is predominant in JiePang. Although the proportion of old POIs exceeds the new POIs, the new increases and old decreases.Figure 1
Changes of the ratio of new and old POIs on four datasets at different time intervals. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)According to the above analysis, we can come to the following conclusion: Users are conservative in the short term and show more curiosity characteristics with the increase of the time interval. Making full use of users’ preference features of liking old and pursuing new simultaneously may improve the recommendation performance.


## 3.1. Task Definition

A notationU denotes the collection of users U=u1,u2,uu, and the notation V represents the collection of POIs V=v1,v2,vV. We use the v to represent a POI identifier and lv to denote its corresponding geographical attribute in terms of longitude and latitude coordinates. For each user u∈U, we sort her historical records by time and subdivided these into trajectories with different lengths relying on the suitable time interval, i.e., Su=su1,su2,⋯,sun, where n denotes the latest trajectory. The subtrajectory suj=v1,v2,⋯.,vt is the jth trajectory of user u. Given a trajectory set of target user u, our goal is to recommend Top-N POIs, namely Prv∣suj=Prv∣vn,vn−1,v2,v1.


## 3.2. Dataset Description

We conduct analysis on four real-world datasets from the Foursquare [45] and the JiePang [11]. The Foursquare check-in dataset is from 12 April 2012 to 16 February 2013 in New York (NYC) and Tokyo (TKY), while JiePang contains Beijing and Shanghai from April 2011 to April 2013. For all of them, we filter unpopular POIs with less than five user visits.


## 3.3. Data Analysis

In theory, users can check any locations. However, user behavior is affected by various factors such as available time, geographic distance, and economic support. Users often look for interesting POIs near their living and working centers. Intuitively, users’ repeated exploration might make POIs less appealing, but users can always find pleasure in these POIs. It is worth exploring that makes these POIs so appealing.We divide POIs into two categories. POIs that appeared in the last time period are called old POIs, and the corresponding ones that did not appear are called new POIs. Figure1 shows the new and old changes of POIs by different time intervals. We use different time intervals to analyze the new and old changes of visited POIs. Traditionally, we divide a year into 52 weeks. In the figure, “2012-02” indicates the second week of 2012. Figure 1 contains four cities information, and every city has two figures. The left takes one week as an interval, and the right is five weeks. As we can see from the left figure of every city, the old POI is predominant. Especially, the Foursquare dataset shows this more clearly. Comparing the left and right, it is clear that the ratio of new POIs is predominant in JiePang. Although the proportion of old POIs exceeds the new POIs, the new increases and old decreases.Figure 1
Changes of the ratio of new and old POIs on four datasets at different time intervals. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)According to the above analysis, we can come to the following conclusion: Users are conservative in the short term and show more curiosity characteristics with the increase of the time interval. Making full use of users’ preference features of liking old and pursuing new simultaneously may improve the recommendation performance.


## 4. The Proposed Model

In this section, we present our proposed model SONG in detail. SONG mainly consists of three parts, which are the sequential recommendation modeling and the old and new influence weight modeling. Our main contribution lies in joint modeling liking the old and pursuing the new influence, the geographical influence for sequential recommendation in a unified way.


### 4.1. Modeling Sequential Recommendation Based on Trajectory

For sequential recommendation, the order-based models are used to derive order patterns from items sequences of users’, such as using the Markov chains [36, 46]. Inspired by the successful cases of the Markov method in capturing sequence features and the high compatibility [46] with the problem in our paper, we use the high-order Markov chain model to model the sequential recommendation task. The mathematical form of this model is shown by the following equation.
(1)Prvr∣suj=Prvr=vt+1∣vt,vt−1,⋯.,v2,v1.However, as [47] points out, if the k-order Markov chain has n possible states, it usually leads to exponential expansion on the number of states, e.g., n−1nk. Moreover, high-order Markov chains also suffer from the sparsity of transitions in the given dataset, which discourages people from using a higher-order Markov chain directly and leads to ineffectiveness in modeling the behaviors of users. Inspired by [32, 47], a higher-order Markov chain model involves only one additional parameter for each one-step transition probability. The model can be written as follows:
(2)Prvr∣suj=Prvr=vt+1∣suj≈∑i=1twuPrvt+1,vt+1−i,where Prvt+1,vt+1−i denotes the one-step transition probability from POI vt+1−i to POI vt+1 and wu is the additional parameter.


#### 4.1.1. One-Step Transition Probability

The number of POIs that a user visits every day is unevenly distributed, and sparse trajectories containing a single POI are sometimes ignored in mining POIs transition patterns. In order to make reasonable use of these sparse trajectories, we propose a method to serialize sparse trajectories. The core idea is as follows. We first split the user’s training data by one day and then determine whether it needs to be serialized according to the length of the trajectory. When the user’s trajectory length of a day is greater than 2, this trajectory does not need to be processed. The processing flow is shown in the pseudocode on lines 5-7. When the trajectory length is equal to 1, it needs to be dealt with in three cases: (1) If it is the first trajectory of the user, insert this one into the next one; (2) if it is the last trajectory of the user, add this trajectory to the previous one; and (3) in other cases, it needs to judge the time interval to the previous and the subsequent trajectories and insert the current trajectory into the closer trajectory. The insert operation is relatively simple, it only needs to modify the inserted trajectory’s date to the date of the target trajectory, and the time remains unchanged. For example, the date of the target trajectory is October 6, 2016, and the date and time of the trajectory to be inserted is October 7, 2016, 13:23:11. It only needs to change the date to October 6, 2016. Comparing Su’ with Su, only the date of some trajectories in Su’ has changed, and the time remains the same to retain the user’s time-related preferences. The time remains unchanged at 13:23:11. The specific operation process is shown in the following algorithm.Algorithm 1: Serialization algorithm.
Input: Training trajectories of user u: Su,suj∈Su, u∈U.Output: Dense trajectories set of user u: Su′1: for (u=0; u<U; u++) do2:  Get the trajectories count of u:Su;3:  Set trajectory index: p =0;4:whilep<Sudo5:   Get the length of trajectorysup;6:ifsup>2then7:p⟵p+18:else ifsup≤1 and p=0then9:    Adds the current trajectory to the next one10:else ifsup≤1 and p<Su−1then11:    Get the time interval ofTsup−sup−1 and Tsup+1−sup.12:ifTsup−sup−1≤Tsup+1−supthen13:     Insertsup to sup−1, p⟵p+114:else15:     Insertsup to sup+1,p⟵p+sup+1+116:end if17:else18:   Insertsup into sup−1,p⟵p+119:end if20:end while21:end for22: ReturnSu′.Inspired by [32], the one-step transition probabilities between two POIs are derived by employing the first-order Markov chain. They are supposed to be fixed, which can be represented by the following equation:
(3)Prvt+1∣suj=Prvt+1∣vt=ToDegreevt,vt+1AoDegreevt,when AoDegreevt>0, where AoDegreevt is out degree of POI vt and ToDegreevt,vt+1 is the degree from vt to vt+1. When AoDegreevt=0, Prvt+1∣vt denotes the following:
(4)Prvt+1∣vt=1,vt+1=vt0,vt+1≠vt.


#### 4.1.2. Modeling the Influence Weight of User Pursuing Old

It is common that the more exposure something is in front of us, the more it will strengthen our attitude towards it. Users’ attitudes towards things can be divided into three categories: like, neutral, and dislikes. Since the neutral attitude does not change the user’s opinion, it can be classified into the other two categories, or ignored. According to this assumption, users’ attitudes can be divided into two categories: like and dislike. A user’s check-in record is positive feedback. For example, a user who checks in a restaurant indicated that he likes the restaurant.If a user repeatedly checks in a POI, it indicates that the user likes the POI more. Similarly, if the user does not like it, the record of it will not exist. We assume that if the user checks in to the current POI multiple times, the probability of the POI being checked in again will increase. Based on this hypothesis, we use the following equation to express the exposure effect in the subtrajectory of useru. Multiple exposures of POI v may make the user’s loving old preference to be enhanced.
(5)Γu,vκsuj=1+∑r=1sujIvr=vκRvκ∈sujϕu,where Icond is the indicator function, and it returns 1 if cond is satisfied, or otherwise returns 0. R is the maximum number that the user checked in repeatedly in all trajectories. ϕu is u’s personalized parameter for exposure. The exposure influence Γu,suj,v monotonically increases as the POI is visited repeatedly.


#### 4.1.3. Modeling the Influence Weight of User Pursuing New

In real life, visiting a POI is a consumable activity. For example, users need to spend time or move a certain distance to enjoy the happiness brought by POI-related activities [18]. The memory of the user’s access to the POI will affect the novelty of the subsequent POI, and the impact is related to the time interval. Like depreciation in economics, the residual value is smaller when the time is longer, and the possibility of purchasing new equipment is greater [25]. We assume that the POI currently checked in by the user will affect the utility of subsequent POIs, and this effect is related to the time interval. The larger the interval, the weaker the impact, making users more likely to choose a new POI. For convenience, we use interval hops instead of time intervals. For example, for the sequence “a, b, c, d,” the number of hops between ab, ac, and ad are 1, 2, and 3. We assume that the influence of the current POI on the rear target POI is inversely proportional to the total number of hops between them, and we use the following equation to express the pursuit of newness.
(6)Ψu,κsuj=cuκαueβuκ,where cu, αu, and βu are personalized parameters and κ refers to the intervals between the current POI to the target POI visited by the same user.


#### 4.1.4. Modeling Geographical Influence

Some existing studies show that the geographical proximities of POIs have a significant influence on users’ check-in behavior. To better understand this geographical influence on users, Ye et al. [35] performed a spatial analysis on user check-in activities records collected from the Foursquare. A significant percentage of two consecutive POIs visited by the same user appear to be within a short distance. There are three tendencies: (1) people tend to select POIs near their homes or workplaces; (2) people may prefer to explore POIs from current location; and (3) the POI visited by the user conforms to the Gaussian distribution of multiple centers, which means that the POI visited by the user is not evenly distributed but concentrated in several areas [48]. Based on the above conclusions, it can be seen that distance is the core of geographic influence. There are many mature models for modeling geographic influence, for example, power-law, exponential, and hyperbolic [34]. Thus, we also use power-law distribution to model the check-in probability to the distance between two POIs visited by the same user.
(7)Yd=au×d−bu,where au and bu are parameters of a power-law distribution and d refers to the distance between the current POI to the target POI visited by the same user.


### 4.2. Integrating Model and Inferring Model Parameters

According to the above submodel representation, we change Equation (2) to Equation (8). The weight wui becomes a combination of distance, liking the old, and pursuing the new.
(8)Prvr∣suj≈∑i=1twuPrvt+1,vt+1−i=∑i=1tYd·μ·Γu,visuj+1−μΨu,isuj·Prvt+1,vt+1−i,where μ is the parameter of liking old and 1−μ is the pursuing new, respectively.Letθ denote the set of parameters in the personalized SONG framework. Then, we define our optimization problem to obtain the optimal θ∗ as follows:
(9)Θ∗=argmaxΘ∏u∏su,su,j∈suPrvr∣suj;Θ.The goal of this problem is aimed at maximizing the probability of predicting the last POI given the rest of an observing sequencesu. To solve this optimization problem, we employ the maximum a posteriori (MAP) estimation on the following log-likelihood function:
(10)Θ∗=argminΘL=−∑u∑su,su,j∈sulnPv∣suj;Θ=−∑u∑Suln∑i=1tYd·μ·Γu,visuj+1−μΨu,isuj·Prvt+1,vt+1−i.Furthermore, the gradient of the log-likelihoodL with respect to the model parameters is given by
(11)∂L∂θ=−∑u∑su∑i=1tY··μ∂Γ·suj/∂θPr·∑i=1tY·μ·Γ·suj+1−μΨ·sujPr·,θ∈ϕu,∂L∂θ=−∑u∑su∑i=1tY·1−μ∂Ψ·suj/∂θPr·∑i=1tY··μ·Γ·suj+1−μΨ·suj·Pr·,θ∈αu,cu,βu,∂L∂θ=−∑u∑su∑i=1tY··Γ·suj−Ψ·sujPr·∑i=1tY··μ·Γ·suj+1−μΨ·suj·Pr·,θ∈μ,∂L∂θ=−∑u∑su∑i=1t∂Yd/∂θ·μ·Γ·suj+1−μΨ·suj·Pr·∑i=1tYd·μ·Γ·suj+1−μΨ·suj·Pr·,θ∈au,bu.In order to make the formula easier to understand and save space,Yd, Γu,vκsuj, Ψu,κsuj, and Prvt+1,vt+1−i are abbreviated as Y·, Γ·suj, Ψ·suj, and Pr·, respectively.In addition, the set of parametersθ in our method consists of all the personalized parameters in the definitions of liking old and pursuing new POIs, such as ϕu, αu, βu, cu, au, bu, and μ. αu is randomly drawn from absolute N (0, 0.1). μ is initialized to 0.5. The other parameters are randomly initialized in the range [0.0, 1.0].Given a training set containing observing sequences of agents, we can iteratively update the parametersθ using the gradient ascent method. Once the (near) optimal Θ is obtained, our SONG framework allows for personalized recommendations based on Equation (8).


## 4.1. Modeling Sequential Recommendation Based on Trajectory

For sequential recommendation, the order-based models are used to derive order patterns from items sequences of users’, such as using the Markov chains [36, 46]. Inspired by the successful cases of the Markov method in capturing sequence features and the high compatibility [46] with the problem in our paper, we use the high-order Markov chain model to model the sequential recommendation task. The mathematical form of this model is shown by the following equation.
(1)Prvr∣suj=Prvr=vt+1∣vt,vt−1,⋯.,v2,v1.However, as [47] points out, if the k-order Markov chain has n possible states, it usually leads to exponential expansion on the number of states, e.g., n−1nk. Moreover, high-order Markov chains also suffer from the sparsity of transitions in the given dataset, which discourages people from using a higher-order Markov chain directly and leads to ineffectiveness in modeling the behaviors of users. Inspired by [32, 47], a higher-order Markov chain model involves only one additional parameter for each one-step transition probability. The model can be written as follows:
(2)Prvr∣suj=Prvr=vt+1∣suj≈∑i=1twuPrvt+1,vt+1−i,where Prvt+1,vt+1−i denotes the one-step transition probability from POI vt+1−i to POI vt+1 and wu is the additional parameter.


### 4.1.1. One-Step Transition Probability

The number of POIs that a user visits every day is unevenly distributed, and sparse trajectories containing a single POI are sometimes ignored in mining POIs transition patterns. In order to make reasonable use of these sparse trajectories, we propose a method to serialize sparse trajectories. The core idea is as follows. We first split the user’s training data by one day and then determine whether it needs to be serialized according to the length of the trajectory. When the user’s trajectory length of a day is greater than 2, this trajectory does not need to be processed. The processing flow is shown in the pseudocode on lines 5-7. When the trajectory length is equal to 1, it needs to be dealt with in three cases: (1) If it is the first trajectory of the user, insert this one into the next one; (2) if it is the last trajectory of the user, add this trajectory to the previous one; and (3) in other cases, it needs to judge the time interval to the previous and the subsequent trajectories and insert the current trajectory into the closer trajectory. The insert operation is relatively simple, it only needs to modify the inserted trajectory’s date to the date of the target trajectory, and the time remains unchanged. For example, the date of the target trajectory is October 6, 2016, and the date and time of the trajectory to be inserted is October 7, 2016, 13:23:11. It only needs to change the date to October 6, 2016. Comparing Su’ with Su, only the date of some trajectories in Su’ has changed, and the time remains the same to retain the user’s time-related preferences. The time remains unchanged at 13:23:11. The specific operation process is shown in the following algorithm.Algorithm 1: Serialization algorithm.
Input: Training trajectories of user u: Su,suj∈Su, u∈U.Output: Dense trajectories set of user u: Su′1: for (u=0; u<U; u++) do2:  Get the trajectories count of u:Su;3:  Set trajectory index: p =0;4:whilep<Sudo5:   Get the length of trajectorysup;6:ifsup>2then7:p⟵p+18:else ifsup≤1 and p=0then9:    Adds the current trajectory to the next one10:else ifsup≤1 and p<Su−1then11:    Get the time interval ofTsup−sup−1 and Tsup+1−sup.12:ifTsup−sup−1≤Tsup+1−supthen13:     Insertsup to sup−1, p⟵p+114:else15:     Insertsup to sup+1,p⟵p+sup+1+116:end if17:else18:   Insertsup into sup−1,p⟵p+119:end if20:end while21:end for22: ReturnSu′.Inspired by [32], the one-step transition probabilities between two POIs are derived by employing the first-order Markov chain. They are supposed to be fixed, which can be represented by the following equation:
(3)Prvt+1∣suj=Prvt+1∣vt=ToDegreevt,vt+1AoDegreevt,when AoDegreevt>0, where AoDegreevt is out degree of POI vt and ToDegreevt,vt+1 is the degree from vt to vt+1. When AoDegreevt=0, Prvt+1∣vt denotes the following:
(4)Prvt+1∣vt=1,vt+1=vt0,vt+1≠vt.


### 4.1.2. Modeling the Influence Weight of User Pursuing Old

It is common that the more exposure something is in front of us, the more it will strengthen our attitude towards it. Users’ attitudes towards things can be divided into three categories: like, neutral, and dislikes. Since the neutral attitude does not change the user’s opinion, it can be classified into the other two categories, or ignored. According to this assumption, users’ attitudes can be divided into two categories: like and dislike. A user’s check-in record is positive feedback. For example, a user who checks in a restaurant indicated that he likes the restaurant.If a user repeatedly checks in a POI, it indicates that the user likes the POI more. Similarly, if the user does not like it, the record of it will not exist. We assume that if the user checks in to the current POI multiple times, the probability of the POI being checked in again will increase. Based on this hypothesis, we use the following equation to express the exposure effect in the subtrajectory of useru. Multiple exposures of POI v may make the user’s loving old preference to be enhanced.
(5)Γu,vκsuj=1+∑r=1sujIvr=vκRvκ∈sujϕu,where Icond is the indicator function, and it returns 1 if cond is satisfied, or otherwise returns 0. R is the maximum number that the user checked in repeatedly in all trajectories. ϕu is u’s personalized parameter for exposure. The exposure influence Γu,suj,v monotonically increases as the POI is visited repeatedly.


### 4.1.3. Modeling the Influence Weight of User Pursuing New

In real life, visiting a POI is a consumable activity. For example, users need to spend time or move a certain distance to enjoy the happiness brought by POI-related activities [18]. The memory of the user’s access to the POI will affect the novelty of the subsequent POI, and the impact is related to the time interval. Like depreciation in economics, the residual value is smaller when the time is longer, and the possibility of purchasing new equipment is greater [25]. We assume that the POI currently checked in by the user will affect the utility of subsequent POIs, and this effect is related to the time interval. The larger the interval, the weaker the impact, making users more likely to choose a new POI. For convenience, we use interval hops instead of time intervals. For example, for the sequence “a, b, c, d,” the number of hops between ab, ac, and ad are 1, 2, and 3. We assume that the influence of the current POI on the rear target POI is inversely proportional to the total number of hops between them, and we use the following equation to express the pursuit of newness.
(6)Ψu,κsuj=cuκαueβuκ,where cu, αu, and βu are personalized parameters and κ refers to the intervals between the current POI to the target POI visited by the same user.


### 4.1.4. Modeling Geographical Influence

Some existing studies show that the geographical proximities of POIs have a significant influence on users’ check-in behavior. To better understand this geographical influence on users, Ye et al. [35] performed a spatial analysis on user check-in activities records collected from the Foursquare. A significant percentage of two consecutive POIs visited by the same user appear to be within a short distance. There are three tendencies: (1) people tend to select POIs near their homes or workplaces; (2) people may prefer to explore POIs from current location; and (3) the POI visited by the user conforms to the Gaussian distribution of multiple centers, which means that the POI visited by the user is not evenly distributed but concentrated in several areas [48]. Based on the above conclusions, it can be seen that distance is the core of geographic influence. There are many mature models for modeling geographic influence, for example, power-law, exponential, and hyperbolic [34]. Thus, we also use power-law distribution to model the check-in probability to the distance between two POIs visited by the same user.
(7)Yd=au×d−bu,where au and bu are parameters of a power-law distribution and d refers to the distance between the current POI to the target POI visited by the same user.


## 4.1.1. One-Step Transition Probability

The number of POIs that a user visits every day is unevenly distributed, and sparse trajectories containing a single POI are sometimes ignored in mining POIs transition patterns. In order to make reasonable use of these sparse trajectories, we propose a method to serialize sparse trajectories. The core idea is as follows. We first split the user’s training data by one day and then determine whether it needs to be serialized according to the length of the trajectory. When the user’s trajectory length of a day is greater than 2, this trajectory does not need to be processed. The processing flow is shown in the pseudocode on lines 5-7. When the trajectory length is equal to 1, it needs to be dealt with in three cases: (1) If it is the first trajectory of the user, insert this one into the next one; (2) if it is the last trajectory of the user, add this trajectory to the previous one; and (3) in other cases, it needs to judge the time interval to the previous and the subsequent trajectories and insert the current trajectory into the closer trajectory. The insert operation is relatively simple, it only needs to modify the inserted trajectory’s date to the date of the target trajectory, and the time remains unchanged. For example, the date of the target trajectory is October 6, 2016, and the date and time of the trajectory to be inserted is October 7, 2016, 13:23:11. It only needs to change the date to October 6, 2016. Comparing Su’ with Su, only the date of some trajectories in Su’ has changed, and the time remains the same to retain the user’s time-related preferences. The time remains unchanged at 13:23:11. The specific operation process is shown in the following algorithm.Algorithm 1: Serialization algorithm.
Input: Training trajectories of user u: Su,suj∈Su, u∈U.Output: Dense trajectories set of user u: Su′1: for (u=0; u<U; u++) do2:  Get the trajectories count of u:Su;3:  Set trajectory index: p =0;4:whilep<Sudo5:   Get the length of trajectorysup;6:ifsup>2then7:p⟵p+18:else ifsup≤1 and p=0then9:    Adds the current trajectory to the next one10:else ifsup≤1 and p<Su−1then11:    Get the time interval ofTsup−sup−1 and Tsup+1−sup.12:ifTsup−sup−1≤Tsup+1−supthen13:     Insertsup to sup−1, p⟵p+114:else15:     Insertsup to sup+1,p⟵p+sup+1+116:end if17:else18:   Insertsup into sup−1,p⟵p+119:end if20:end while21:end for22: ReturnSu′.Inspired by [32], the one-step transition probabilities between two POIs are derived by employing the first-order Markov chain. They are supposed to be fixed, which can be represented by the following equation:
(3)Prvt+1∣suj=Prvt+1∣vt=ToDegreevt,vt+1AoDegreevt,when AoDegreevt>0, where AoDegreevt is out degree of POI vt and ToDegreevt,vt+1 is the degree from vt to vt+1. When AoDegreevt=0, Prvt+1∣vt denotes the following:
(4)Prvt+1∣vt=1,vt+1=vt0,vt+1≠vt.


## 4.1.2. Modeling the Influence Weight of User Pursuing Old

It is common that the more exposure something is in front of us, the more it will strengthen our attitude towards it. Users’ attitudes towards things can be divided into three categories: like, neutral, and dislikes. Since the neutral attitude does not change the user’s opinion, it can be classified into the other two categories, or ignored. According to this assumption, users’ attitudes can be divided into two categories: like and dislike. A user’s check-in record is positive feedback. For example, a user who checks in a restaurant indicated that he likes the restaurant.If a user repeatedly checks in a POI, it indicates that the user likes the POI more. Similarly, if the user does not like it, the record of it will not exist. We assume that if the user checks in to the current POI multiple times, the probability of the POI being checked in again will increase. Based on this hypothesis, we use the following equation to express the exposure effect in the subtrajectory of useru. Multiple exposures of POI v may make the user’s loving old preference to be enhanced.
(5)Γu,vκsuj=1+∑r=1sujIvr=vκRvκ∈sujϕu,where Icond is the indicator function, and it returns 1 if cond is satisfied, or otherwise returns 0. R is the maximum number that the user checked in repeatedly in all trajectories. ϕu is u’s personalized parameter for exposure. The exposure influence Γu,suj,v monotonically increases as the POI is visited repeatedly.


## 4.1.3. Modeling the Influence Weight of User Pursuing New

In real life, visiting a POI is a consumable activity. For example, users need to spend time or move a certain distance to enjoy the happiness brought by POI-related activities [18]. The memory of the user’s access to the POI will affect the novelty of the subsequent POI, and the impact is related to the time interval. Like depreciation in economics, the residual value is smaller when the time is longer, and the possibility of purchasing new equipment is greater [25]. We assume that the POI currently checked in by the user will affect the utility of subsequent POIs, and this effect is related to the time interval. The larger the interval, the weaker the impact, making users more likely to choose a new POI. For convenience, we use interval hops instead of time intervals. For example, for the sequence “a, b, c, d,” the number of hops between ab, ac, and ad are 1, 2, and 3. We assume that the influence of the current POI on the rear target POI is inversely proportional to the total number of hops between them, and we use the following equation to express the pursuit of newness.
(6)Ψu,κsuj=cuκαueβuκ,where cu, αu, and βu are personalized parameters and κ refers to the intervals between the current POI to the target POI visited by the same user.


## 4.1.4. Modeling Geographical Influence

Some existing studies show that the geographical proximities of POIs have a significant influence on users’ check-in behavior. To better understand this geographical influence on users, Ye et al. [35] performed a spatial analysis on user check-in activities records collected from the Foursquare. A significant percentage of two consecutive POIs visited by the same user appear to be within a short distance. There are three tendencies: (1) people tend to select POIs near their homes or workplaces; (2) people may prefer to explore POIs from current location; and (3) the POI visited by the user conforms to the Gaussian distribution of multiple centers, which means that the POI visited by the user is not evenly distributed but concentrated in several areas [48]. Based on the above conclusions, it can be seen that distance is the core of geographic influence. There are many mature models for modeling geographic influence, for example, power-law, exponential, and hyperbolic [34]. Thus, we also use power-law distribution to model the check-in probability to the distance between two POIs visited by the same user.
(7)Yd=au×d−bu,where au and bu are parameters of a power-law distribution and d refers to the distance between the current POI to the target POI visited by the same user.


## 4.2. Integrating Model and Inferring Model Parameters

According to the above submodel representation, we change Equation (2) to Equation (8). The weight wui becomes a combination of distance, liking the old, and pursuing the new.
(8)Prvr∣suj≈∑i=1twuPrvt+1,vt+1−i=∑i=1tYd·μ·Γu,visuj+1−μΨu,isuj·Prvt+1,vt+1−i,where μ is the parameter of liking old and 1−μ is the pursuing new, respectively.Letθ denote the set of parameters in the personalized SONG framework. Then, we define our optimization problem to obtain the optimal θ∗ as follows:
(9)Θ∗=argmaxΘ∏u∏su,su,j∈suPrvr∣suj;Θ.The goal of this problem is aimed at maximizing the probability of predicting the last POI given the rest of an observing sequencesu. To solve this optimization problem, we employ the maximum a posteriori (MAP) estimation on the following log-likelihood function:
(10)Θ∗=argminΘL=−∑u∑su,su,j∈sulnPv∣suj;Θ=−∑u∑Suln∑i=1tYd·μ·Γu,visuj+1−μΨu,isuj·Prvt+1,vt+1−i.Furthermore, the gradient of the log-likelihoodL with respect to the model parameters is given by
(11)∂L∂θ=−∑u∑su∑i=1tY··μ∂Γ·suj/∂θPr·∑i=1tY·μ·Γ·suj+1−μΨ·sujPr·,θ∈ϕu,∂L∂θ=−∑u∑su∑i=1tY·1−μ∂Ψ·suj/∂θPr·∑i=1tY··μ·Γ·suj+1−μΨ·suj·Pr·,θ∈αu,cu,βu,∂L∂θ=−∑u∑su∑i=1tY··Γ·suj−Ψ·sujPr·∑i=1tY··μ·Γ·suj+1−μΨ·suj·Pr·,θ∈μ,∂L∂θ=−∑u∑su∑i=1t∂Yd/∂θ·μ·Γ·suj+1−μΨ·suj·Pr·∑i=1tYd·μ·Γ·suj+1−μΨ·suj·Pr·,θ∈au,bu.In order to make the formula easier to understand and save space,Yd, Γu,vκsuj, Ψu,κsuj, and Prvt+1,vt+1−i are abbreviated as Y·, Γ·suj, Ψ·suj, and Pr·, respectively.In addition, the set of parametersθ in our method consists of all the personalized parameters in the definitions of liking old and pursuing new POIs, such as ϕu, αu, βu, cu, au, bu, and μ. αu is randomly drawn from absolute N (0, 0.1). μ is initialized to 0.5. The other parameters are randomly initialized in the range [0.0, 1.0].Given a training set containing observing sequences of agents, we can iteratively update the parametersθ using the gradient ascent method. Once the (near) optimal Θ is obtained, our SONG framework allows for personalized recommendations based on Equation (8).


## 5. Experiments Evaluation

In this section, we describe our experiment settings for evaluating the performance of SONG against the state-of-the-art POI recommendation techniques.


### 5.1. Experiment Settings

Each dataset is divided into the training and testing set in terms of visit time rather than random partition methods in the experiments. In practice, we can only utilize the past data to predict future check-in events. For each user, we select 80% of her check-ins to constitute a training dataset for learning the parameters of the proposed model. The remaining portions are used as ground truth for testing.


### 5.2. Evaluation Metrics

To study the effectiveness of the methods, we use two popular metrics, i.e., Recall (Rec@k) and normalized discounted cumulative gain (NDCG@k). While the Recall is defined as the ratio of recovered POIs to the number of POIs generated by the recommendation model, NDCG@N is a measure to indicate the ranking quality of the recommendation models.To produce a TOP-k recommendation list for a query user, we compute a preference score for each POI and sort them by score. The Recall@k for each user is defined as
(12)Rec@k=tptp+tn,where tp is the number of POIs visited by a user u and also in the TOP-k recommendations and tn is the number of POIs visited by u but not in the TOP-k recommendations. The NDCG@k for each user is defined as
(13)NDCG@k=DCG@kIDCG@K,where
(14)DCG@k=∑i=1k2reli−1log2i=1,and reli refers to the graded relevance of the result ranked at the position. We use the binary relevance in our work, i.e., reli=1 if the result is in the test set, and 0, otherwise. IDCG@k is the DCG@k value when the recommended POIs are ideally ranked. The average of recall and NDCG values overall users are reported as the final Rec@k and NDCG@k (k=1,5,10,15). These two metrics are both in the range [0, 1], and a higher value means better results.


### 5.3. Comparison Methods

#### 5.3.1. FPMC-LR

Cheng et al. [8] observed two prominent properties in the check-in sequence: personalized Markov chain and region localization. Then, they proposed a matrix factorization method, which embeds the personalized Markov chains and the localized regions for solving the recommendation task.


#### 5.3.2. TMCA

Li et al. [44] proposed an encoder-decoder-based neural network model named TMCA to capture the complex spatial and temporal dependencies among historical check-in activities automatically. The model leverages the embedding method to incorporate heterogeneous contextual factors to boost recommendation performance. Furthermore, they introduce the temporal and multilevel context attention mechanisms to dynamically select the relevant check-ins and discriminative contextual factors for predicting the preferences over POIs to visit next.


#### 5.3.3. STRNN

Liu et al. [42] extend RNN and propose the spatial-temporal recurrent neural networks (STRNN). To capture time interval and geographical distance information, they replace the single-transition matrix in RNN with time-specific transition matrices and distance-specific transition matrices.


#### 5.3.4. CTransRec

CTransRec [40] is a translation-based recommender for complex users, which utilizes auxiliary information (item category and timestamp) and category-specific projection and temporal dynamic relaxation in recommender systems to improve the performance of sequential recommendation.


#### 5.3.5. LSTPM

Sun et al. [43] proposed a novel method named long-term and short-term preference modeling for the next POI recommendation. The proposed model consists of a context-aware nonlocal network for long-term preference modeling and a geodilated RNN for short-term preference learning.


#### 5.3.6. STAN

Luo et al. [41] adopt a spatiotemporal attention network (STAN) for location recommendation. This allows a point-to-point interaction between nonadjacent locations and nonconsecutive check-ins with explicit spatiotemporal effect. STAN uses a bilayer attention architecture to learn the explicit spatiotemporal correlations.


### 5.4. Comparison with Baselines

We present the comparison results on the four datasets in terms of Recall and NDCG in Figures2 and 3, respectively. We can make the following important observations.Figure 2
Recall on four datasets. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)Figure 3
NDCG on four datasets. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)We model users’ preference for liking old, assume that repeated check-in POI was the basis of users’ liking old, and converted the check-in times into liking old influence. New POIs will bring users unprecedented experience. We calculate the residual value of POIs according to the time interval between check-in POIs, which will serve as the basis for users to pursue new POIs. The lower the residual value, the stronger the incentive to pursue something new. Finally, the combination of liking the old and chasing the new can better reflect the influence of precursor POIs on successor POIs.Our proposed SONG consistently and significantly outperforms all baselines in terms of every metric on four datasets. For example, on Beijing, Shanghai, NYC, and TKY, compared with the second best method STAN, SONG improves the Recall@1 by 5.22%, 11.17%, 8.22%, and 7.62%, and the NDCG@1 13.55%, 8.17%, 8.88%, and 3.24% by, respectively. The quantitative evaluation clearly demonstrates the superior effectiveness of our method.Among the baseline methods, STAN performs the best on all datasets. It may be because STAN established the association between nonadjacent locations and nonconsecutive check-ins with explicit spatiotemporal effect, which has alleviated data sparsity. Secondly, the performances of LSTPM and TMCA are better. Specifically, LSTPM performed well on BJ and SH of the JiePang, and TMCA performed well on NYC and TKY of the Foursquare. LSTMP requires dense trajectory support, which is not very good for users with sparse trajectories. In comparison, TMCA adopted an embedding method to incorporate heterogeneous information for mitigating sparsity.Ctrance used item category and timestamp, and STRNN used time interval and geographic distance. Both methods use time, which shows that time played a role in the recommendation. Comparing the performance of them, the former is slightly better than the latter. This result may indicate that the item category better reflects the user’s preferences.


### 5.5. Comparison of SONG_N and SONG

Due to the uneven distribution of the number of daily check-ins, dense and sparse trajectories coexist. In order to make full use of user data, this paper proposes a method to serialize sparse trajectories. We test the proposed SONG on the original and the serialized data, and the test results are shown in Table1. It is found that the effects of Recall and NDCG after serialization (SONG) are significantly higher than those of no serialization (SONG_N). It shows in Table 1. For example, on BJ, SH, NYC, and TKY, Rec@k (k=1,5,10,15) has increased by more than 13%, 6%, 15%, and 10%, respectively. Comparing the growth rates of Recall and NDCG of each dataset, NYC and BJ have the best growth rates, followed by TKY and SH. The growth trends of the two indicators are consistent. From this point of view, the sparse trajectory data serialization method we proposed is effective.Table 1
Performance of SONG_N and SONG on four datasets.
DataMetricSONG_NSONGIncBJRec@10.20490.232714%Rec@50.32080.366214%Rec@100.35770.405513%Rec@150.37100.427015%SHRec@10.14880.15816%Rec@50.26220.28007%Rec@100.30940.32977%Rec@150.32910.35558%NYCRec@10.23370.274017%Rec@50.43610.504216%Rec@100.48000.552315%Rec@150.49090.563915%TKYRec@10.17690.199413%Rec@50.33640.372411%Rec@100.39090.431810%Rec@150.41920.462310%BJNDCG@10.32560.35649%NDCG@50.13410.14407%NDCG@100.09590.10307%NDCG@150.07710.08328%SHNDCG@10.29780.30844%NDCG@50.15220.15804%NDCG@100.11700.12093%NDCG@150.09720.10084%NYCNDCG@10.35800.405613%NDCG@50.17850.197311%NDCG@100.12800.140710%NDCG@150.10240.112410%TKYNDCG@10.32480.35068%NDCG@50.16490.17657%NDCG@100.11990.12837%NDCG@150.09770.10447%


## 5.1. Experiment Settings

Each dataset is divided into the training and testing set in terms of visit time rather than random partition methods in the experiments. In practice, we can only utilize the past data to predict future check-in events. For each user, we select 80% of her check-ins to constitute a training dataset for learning the parameters of the proposed model. The remaining portions are used as ground truth for testing.


## 5.2. Evaluation Metrics

To study the effectiveness of the methods, we use two popular metrics, i.e., Recall (Rec@k) and normalized discounted cumulative gain (NDCG@k). While the Recall is defined as the ratio of recovered POIs to the number of POIs generated by the recommendation model, NDCG@N is a measure to indicate the ranking quality of the recommendation models.To produce a TOP-k recommendation list for a query user, we compute a preference score for each POI and sort them by score. The Recall@k for each user is defined as
(12)Rec@k=tptp+tn,where tp is the number of POIs visited by a user u and also in the TOP-k recommendations and tn is the number of POIs visited by u but not in the TOP-k recommendations. The NDCG@k for each user is defined as
(13)NDCG@k=DCG@kIDCG@K,where
(14)DCG@k=∑i=1k2reli−1log2i=1,and reli refers to the graded relevance of the result ranked at the position. We use the binary relevance in our work, i.e., reli=1 if the result is in the test set, and 0, otherwise. IDCG@k is the DCG@k value when the recommended POIs are ideally ranked. The average of recall and NDCG values overall users are reported as the final Rec@k and NDCG@k (k=1,5,10,15). These two metrics are both in the range [0, 1], and a higher value means better results.


## 5.3. Comparison Methods

### 5.3.1. FPMC-LR

Cheng et al. [8] observed two prominent properties in the check-in sequence: personalized Markov chain and region localization. Then, they proposed a matrix factorization method, which embeds the personalized Markov chains and the localized regions for solving the recommendation task.


### 5.3.2. TMCA

Li et al. [44] proposed an encoder-decoder-based neural network model named TMCA to capture the complex spatial and temporal dependencies among historical check-in activities automatically. The model leverages the embedding method to incorporate heterogeneous contextual factors to boost recommendation performance. Furthermore, they introduce the temporal and multilevel context attention mechanisms to dynamically select the relevant check-ins and discriminative contextual factors for predicting the preferences over POIs to visit next.


### 5.3.3. STRNN

Liu et al. [42] extend RNN and propose the spatial-temporal recurrent neural networks (STRNN). To capture time interval and geographical distance information, they replace the single-transition matrix in RNN with time-specific transition matrices and distance-specific transition matrices.


### 5.3.4. CTransRec

CTransRec [40] is a translation-based recommender for complex users, which utilizes auxiliary information (item category and timestamp) and category-specific projection and temporal dynamic relaxation in recommender systems to improve the performance of sequential recommendation.


### 5.3.5. LSTPM

Sun et al. [43] proposed a novel method named long-term and short-term preference modeling for the next POI recommendation. The proposed model consists of a context-aware nonlocal network for long-term preference modeling and a geodilated RNN for short-term preference learning.


### 5.3.6. STAN

Luo et al. [41] adopt a spatiotemporal attention network (STAN) for location recommendation. This allows a point-to-point interaction between nonadjacent locations and nonconsecutive check-ins with explicit spatiotemporal effect. STAN uses a bilayer attention architecture to learn the explicit spatiotemporal correlations.


## 5.3.1. FPMC-LR

Cheng et al. [8] observed two prominent properties in the check-in sequence: personalized Markov chain and region localization. Then, they proposed a matrix factorization method, which embeds the personalized Markov chains and the localized regions for solving the recommendation task.


## 5.3.2. TMCA

Li et al. [44] proposed an encoder-decoder-based neural network model named TMCA to capture the complex spatial and temporal dependencies among historical check-in activities automatically. The model leverages the embedding method to incorporate heterogeneous contextual factors to boost recommendation performance. Furthermore, they introduce the temporal and multilevel context attention mechanisms to dynamically select the relevant check-ins and discriminative contextual factors for predicting the preferences over POIs to visit next.


## 5.3.3. STRNN

Liu et al. [42] extend RNN and propose the spatial-temporal recurrent neural networks (STRNN). To capture time interval and geographical distance information, they replace the single-transition matrix in RNN with time-specific transition matrices and distance-specific transition matrices.


## 5.3.4. CTransRec

CTransRec [40] is a translation-based recommender for complex users, which utilizes auxiliary information (item category and timestamp) and category-specific projection and temporal dynamic relaxation in recommender systems to improve the performance of sequential recommendation.


## 5.3.5. LSTPM

Sun et al. [43] proposed a novel method named long-term and short-term preference modeling for the next POI recommendation. The proposed model consists of a context-aware nonlocal network for long-term preference modeling and a geodilated RNN for short-term preference learning.


## 5.3.6. STAN

Luo et al. [41] adopt a spatiotemporal attention network (STAN) for location recommendation. This allows a point-to-point interaction between nonadjacent locations and nonconsecutive check-ins with explicit spatiotemporal effect. STAN uses a bilayer attention architecture to learn the explicit spatiotemporal correlations.


## 5.4. Comparison with Baselines

We present the comparison results on the four datasets in terms of Recall and NDCG in Figures2 and 3, respectively. We can make the following important observations.Figure 2
Recall on four datasets. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)Figure 3
NDCG on four datasets. (a) Beijing (Jiepang). (b) Shanghai (Jiepang). (c) NYC (Foursquare). (d) TKY (Foursquare).
(a)(b)(c)(d)We model users’ preference for liking old, assume that repeated check-in POI was the basis of users’ liking old, and converted the check-in times into liking old influence. New POIs will bring users unprecedented experience. We calculate the residual value of POIs according to the time interval between check-in POIs, which will serve as the basis for users to pursue new POIs. The lower the residual value, the stronger the incentive to pursue something new. Finally, the combination of liking the old and chasing the new can better reflect the influence of precursor POIs on successor POIs.Our proposed SONG consistently and significantly outperforms all baselines in terms of every metric on four datasets. For example, on Beijing, Shanghai, NYC, and TKY, compared with the second best method STAN, SONG improves the Recall@1 by 5.22%, 11.17%, 8.22%, and 7.62%, and the NDCG@1 13.55%, 8.17%, 8.88%, and 3.24% by, respectively. The quantitative evaluation clearly demonstrates the superior effectiveness of our method.Among the baseline methods, STAN performs the best on all datasets. It may be because STAN established the association between nonadjacent locations and nonconsecutive check-ins with explicit spatiotemporal effect, which has alleviated data sparsity. Secondly, the performances of LSTPM and TMCA are better. Specifically, LSTPM performed well on BJ and SH of the JiePang, and TMCA performed well on NYC and TKY of the Foursquare. LSTMP requires dense trajectory support, which is not very good for users with sparse trajectories. In comparison, TMCA adopted an embedding method to incorporate heterogeneous information for mitigating sparsity.Ctrance used item category and timestamp, and STRNN used time interval and geographic distance. Both methods use time, which shows that time played a role in the recommendation. Comparing the performance of them, the former is slightly better than the latter. This result may indicate that the item category better reflects the user’s preferences.


## 5.5. Comparison of SONG_N and SONG

Due to the uneven distribution of the number of daily check-ins, dense and sparse trajectories coexist. In order to make full use of user data, this paper proposes a method to serialize sparse trajectories. We test the proposed SONG on the original and the serialized data, and the test results are shown in Table1. It is found that the effects of Recall and NDCG after serialization (SONG) are significantly higher than those of no serialization (SONG_N). It shows in Table 1. For example, on BJ, SH, NYC, and TKY, Rec@k (k=1,5,10,15) has increased by more than 13%, 6%, 15%, and 10%, respectively. Comparing the growth rates of Recall and NDCG of each dataset, NYC and BJ have the best growth rates, followed by TKY and SH. The growth trends of the two indicators are consistent. From this point of view, the sparse trajectory data serialization method we proposed is effective.Table 1
Performance of SONG_N and SONG on four datasets.
DataMetricSONG_NSONGIncBJRec@10.20490.232714%Rec@50.32080.366214%Rec@100.35770.405513%Rec@150.37100.427015%SHRec@10.14880.15816%Rec@50.26220.28007%Rec@100.30940.32977%Rec@150.32910.35558%NYCRec@10.23370.274017%Rec@50.43610.504216%Rec@100.48000.552315%Rec@150.49090.563915%TKYRec@10.17690.199413%Rec@50.33640.372411%Rec@100.39090.431810%Rec@150.41920.462310%BJNDCG@10.32560.35649%NDCG@50.13410.14407%NDCG@100.09590.10307%NDCG@150.07710.08328%SHNDCG@10.29780.30844%NDCG@50.15220.15804%NDCG@100.11700.12093%NDCG@150.09720.10084%NYCNDCG@10.35800.405613%NDCG@50.17850.197311%NDCG@100.12800.140710%NDCG@150.10240.112410%TKYNDCG@10.32480.35068%NDCG@50.16490.17657%NDCG@100.11990.12837%NDCG@150.09770.10447%


## 6. Conclusions

In this paper, we find out that users’ check-in behaviors have an apparent characteristic of liking the old and pursuing the new. After studying the problem of POI recommendation, we proposed a novel sequential prediction method based on the Markov chain model, i.e., SONG. We jointly model users’ behaviors and geographical influence with a variable-order additive Markov chain. The experimental results demonstrate that our proposed approach substantially improves the recommendation performance compared with the state-of-the-art methods.



---

*Source: 4359369-2021-11-23.xml*