Xi SUN,Zhimin LV
Collaborative Innovation Center of Steel Technology, University of Science and Technology Beijing, Beijing 100083, China
Abstract: Next point-of-interest (POI) recommendation is an important personalized task in location-based social networks (LBSNs) and aims to recommend the next POI for users in a specific situation with historical check-in data.State-of-the-art studies linearly discretize the user’s spatiotemporal information and then use recurrent neural network (RNN) based models for modeling.However,these studies ignore the nonlinear effects of spatiotemporal information on user preferences and spatiotemporal correlations between user trajectories and candidate POIs.To address these limitations,a spatiotemporal trajectory (STT) model is proposed in this paper.We use the long short-term memory (LSTM) model with an attention mechanism as the basic framework and introduce the user’s spatiotemporal information into the model in encoding.In the process of encoding information,an exponential decay factor is applied to reflect the nonlinear drift of user interest over time and distance.In addition,we design a spatiotemporal matching module in the process of recalling the target to select the most relevant POI by measuring the relevance between the user’s current trajectory and the candidate set.We evaluate the performance of our STT model with four real-world datasets.Experimental results show that our model outperforms existing state-of-the-art methods.
Key words: Point-of-interest recommendation;Spatiotemporal effects;Long short-term memory (LSTM);Attention mechanism
With the popularity of information technology and mobile Internet,location-based social networks (LBSNs) have developed rapidly,leading to the attention of some services based on them,such as Brightkite,GyPSii,and Foursquare.A great amount of check-in data,such as time,location,and coordinates,is generated in the process of users using these services,which lays the foundation for exploring users’ travel patterns and recommending the best point-of-interest (POI) for users.POI recommendation creates value for both users and enterprises.It can not only help users discover interesting locations and services in the city but also help enterprises in LBSNs advertise for users.Therefore,the potential value of POI recommendation has attracted extensive attention from the academic world.
However,unlike other types of recommendation systems (music,movies,etc.),the next POI recommendation process is faced with highly correlated user behavior data,and user preferences are more sensitive to spatiotemporal information (Gao et al.,2013;Yuan et al.,2013;Feng SS et al.,2015;Xu S et al.,2020).To capture the sequentiality of user travel trajectories,some studies have improved the recommendation effect by integrating the sequential information of user trajectories.For example,factorized personalized Markov chain (FPMC) (Rendle et al.,2010) model obtained the sequential influence between consecutive check-in’s of users by combining matrix factorization and the Markov chain (MC).However,when considering the correlation of users’ long-term sequential behavior,the Markov model performs poorly.Later,some recurrent neural network (RNN) based models and the memory mechanism were proposed to alleviate this problem,enabling the model to take into account both the long-and short-term interest evolutions of users (Liu Q et al.,2016b;Feng J et al.,2018;Ying et al.,2018).User travel trajectories are not only regular in sequence but also including some obscure periodic rules that can be further reflected by spatiotemporal information (Qian et al.,2019).Some studies have changed the structure of the sequence model to comprehensively consider spatiotemporal information,improving the accuracy to a certain extent (Yang DQ et al.,2015).For the sparsity of spatiotemporal information,some studies (Lian et al.,2020;Yang DQ et al.,2020;Zhao KZ et al.,2020) linearly discretized the information into several intervals and achieved good results.
The above studies indicate that there are still some key problems to be solved in the analysis of user travel patterns.
1.Temporal and spatial distance information has not been learned effectively in many studies due to the nonlinear effects on user preferences.From a temporal perspective,user’s travel trajectory is periodic in the short term,as shown in Fig.1.Most users leave their residence every morning,work or relax in a specific area during the day,eat nearby in the afternoon,and go home at night.User travel patterns also exhibit long-term periodicity,with variations in activity region,travel purpose,and duration between weekends and weekdays.Moreover,the decay of user interest over time is usually also a nonlinear process.From a spatial perspective,as shown in Fig.2,user’s check-in’s are generally concentrated around one or more central locations,and the density decreases rapidly with increasing distance from the central location,indicating that user’s check-in preference is nonlinearly affected by geographical distance.
Fig.1 Spatiotemporal trajectory example showing user check-in rules
Fig.2 Heatmap of the geographic distribution of check-in’s by two real users
2.Previous models ignore the spatiotemporal correlation between user’s check-in trajectories and the candidate location sets.However,a user’s current preference is not only related to his/her historical behavior but also limited by time and region.That is,users are more inclined to visit places that are closer to them,and the later the check-in time,the more likely they are to go to a closer location.
Therefore,this study proposes the spatiotemporal trajectory (STT) model to recommend the next POI for users.The STT model consists of three parts: the interest extractor layer generates the representation of user features,the interest evolution layer is used to learn user travel patterns,and the spatiotemporal matching (STM) layer matches the best POI for users.In summary,this paper contributes as follows:
1.We propose the STT model,an improved form of the long short-term memory (LSTM) model with an attention mechanism (AM),to fully consider the spatiotemporal information of user’s historical trajectories for aggregating relevant locations.In this model,we devise a new encoding method that helps the sequence model learn the STT characteristics of users.
2.We introduce an information decay factor,which can be used as a weight in the process of spatiotemporal encoding.The decay factor can attenuate the information that is less relevant to the current spatiotemporal situation of the user,allowing the model to focus on more valuable information in a nonlinear fashion.
3.We design an STM architecture for the spatiotemporal correlation of user historical trajectories with all candidate locations.This architecture matches the latent feature of the user STT with all the spatial representations of the candidate sets,and thus,it can find the most suitable POIs.
4.We conduct experiments on three real datasets to demonstrate the superiority of our proposed STT model.The results show that the proposed STT is 10.79% more accurate than state-of-the-art models on average.
In this section,we introduce some research on traditional POI recommendation and POI recommendation with spatiotemporal information.The next POI recommendation is essentially a specific sequential recommendation task.
Traditional POI recommendations mostly use collaborative filtering (CF) methods (Jiang et al.,2015;Yang C et al.,2017),among which matrix factorization is the most common application (Salakhutdinov and Mnih,2007;Abdollahi and Nasraoui,2016;He et al.,2017;Xu CH et al.,2021).The matrix factorization method decomposes the “user-location” relationship matrix into two submatrices to represent the latent features of users and locations.However,the matrix factorization method does not consider the continuity of user behavior and thus is not suitable for modeling sequence information.
The next POI recommendation is an emerging recommendation mode,which is more challenging than traditional modes due to its sensitivity to sequence information.The methods for the next POI recommendation are mainly divided into two categories: MC-based methods and RNN-based methods.MC-based methods aim to predict the user’s next POI based on the past sequence of user behaviors.Due to the sparsity of the location check-in dataset,it is difficult for traditional MC-based methods to learn the transition of intermittent check-in actions.To address this problem,FPMC (Rendle et al.,2010) model was proposed to combine matrix factorization techniques with MCs to model user preferences and sequence information.Based on the FPMC model,Lian et al.(2013) predicted the next check-in location according to the user’s long-and short-term tendencies.Generally,MC-based model is used to explore the transition probability between consecutive actions.Recently,since neural network techniques have achieved promising results in many fields,such as language modeling (Mikolov et al.,2011) and machine vision (Ren et al.,2022),RNN-based models have been considered to be the most effective method for learning nonlinear relationships between users and locations,and they are more extensible than MC-based models.Liu Q et al.(2016b) proposed a spatiotemporal recurrent neural network (ST-RNN) method,which extends the RNN structure to capture more detailed sequence information.DeepMove (Feng J et al.,2018) uses an improved gate recurrent unit (GRU) network to capture mixed embeddings of multiple check-in information and designs a historical attention module to enhance the model’s perception of check-in sequence regularities.However,the success of RNN-based models in the field of natural language processing is because the recognition of text sequences generally does not need to consider temporal information,meaning that the distance between each time step of RNN is equal by default.Therefore,RNN-based models do not correspond to human behavior patterns that are highly correlated with spatiotemporal information,which makes RNN not perfect.
Spatial information is a key factor affecting users’behavior,which limits users’ travel scope.Zeng et al.(2021) introduced a region factor into the CF algorithm to help the model find the most likely preferences in the user’s vicinity.Liu Q et al.(2016a) added distance constraints on the basis of FPMC to achieve desirable results.Yin et al.(2017) proposed the spatial smoothing method to fully consider collective travel interests and individual travel interests,which alleviates the problem of user check-in sparsity to a certain extent.Si et al.(2019),Zhao GS et al.(2020),and Wu et al.(2022) focused on the personalized feature extraction of location attributes to analyze the specific trajectory of each user.Some studies consider the transfer spatial features between two POIs that users check consecutively.Cui et al.(2019) proposed the Distance2Pre model,which uses the GRU model for the first time to integrate the user’s preferences of different geographic distances to predict the next POI,and proposed two structural models that integrate the user’s distance preference scores in linear and nonlinear ways.Long-and short-term preference modeling (LSTPM) (Sun et al.,2020) designs a geo-dilated RNN model to focus on users’ recent travel interests,but it completely ignores users’ long-term travel interests.Attentional recurrent neural network (ARNN) (Guo et al.,2020) uses the knowledge graph method to mine user associations based on geographic locations and uses association information as prior knowledge of RNN input to help the model converge better.Some studies address the sparsity problem of spatiotemporal information by discretely dividing the spatial areas into hierarchical grids (Lian et al.,2020;Yang DQ et al.,2020;Zhao KZ et al.,2020).However,they ignore the explicit modeling of geographic distances because linear spatial partitioning does not capture actual metric information well.
Temporal information is of great significance for mining user travel patterns due to the periodicity (Zhao SL et al.,2016),consecutiveness (Ye et al.,2010;Liu Q et al.,2016b),and interest drift (Wang et al.,2003;Fan,2004) of user behavior.Yuan et al.(2013) proposed an improved CF model for POI recommendation,which is the first POI recommendation research considering the time factor.Yuan et al.(2014) then proposed the geographical-temporal influences aware graph (GTAG) model to integrate check-in contextual information such as location and time to obtain more accurate recommendation results.Liu YC et al.(2016) proposed a Where and When to gO (WWO) recommendation system that uses time interval in users’ trajectories when modeling user behavior.Some deep learning based models have been proposed to capture temporal information in user check-in records.Zhao WX et al.(2018) proposed a TA-TEM model based on distributed representation learning to integrate multiple types of temporal information into the model using a unified approach.STRNN (Zhang et al.,2019) improves the RNN model by transferring temporal information between each time step of the RNN in the form of time-specific transition matrices.STGN (Zhao PP et al.,2022) further enhances the LSTM structure by adding spatiotemporal gates to make better use of temporal information.Inspired by the sequence model SASRec (Kang and McAuley,2018),TiSASRec and STAN convert timestamps into time intervals and apply the self-attention mechanism to further consider the temporal regularity of user check-in trajectories (Li et al.,2020;Luo et al.,2021).
However,the studies mentioned above do not consider the nonlinear attenuation of the effect of spatiotemporal information on user behavior.In addition,they ignore the spatiotemporal correlation between user historical trajectories and candidate sets.
We first introduce the problem statement and definitions in this paper.We define U ={u1,u2,…,uU},V={v1,v2,…,vV},and T={t1,t2,…,tT} as the sets ofUusers,VPOIs,andTtimestamps,respectively.Each useruihas a spatiotemporal check-in sequence of POIs represented as Tr (ui)={l1,l2,…,lmi},wheremiis the total check-in number of userui.For each user check-in,we define it as (ui,vk,tk),which is a tuple containing three elementsui,vk,andtkrepresenting theithuser,thekthlocation ofui,and thekthtimestamp ofui.Then,we model temporal intervals and geographical distances as the spatiotemporal correlation between two consecutive check-in’s of the user.Let the temporal interval sequence of useruibe ?Ti={?t1,?t2,…,?tmi-1} and the spatial interval sequence of useruibe ?Si={?s1,?s2,…,?smi-1}.The spatial interval of two locations can be calculated by the great circle distance method (Chen et al.,2012),which measures the shortest route between two locations on Earth’s sphere.Consequently,the coordinates oflkare represented as (latk,lonk),and the spatial interval betweenlkandlk+1is calculated as
In addition to the basic information of user historical POI visits,we consider explicit relevance between the user trajectory sequence and the candidate locations in this paper.We denote a spatial distance matrix,which measures the spatial interval between each candidate POIp∈ [1,V] and each POI of the user trajectoryq∈ [1,m] asMp,q.The spatial interval matrix is represented as
Given the user trajectory {l1,l2,…,lm},the candidate locations {v1,v2,…,vV},and the spatial interval matrixM,the goal of the next POI recommendation is to predict the most likely upcoming locationv∈lm+1for the user.
In this section,we detail the techniques and specific processes in the model,consisting of (1) the interest extractor layer that extracts the representation of user’s STT,(2) the interest evolution layer that learns sequential preference by LSTM and AM,and (3) the STM layer that measures the correlation between user’s STTs and candidate sets and then calculates the softmax probability of user preference for candidate POIs.The technical modules and specific processes of the STT framework are shown in Fig.3.
Fig.3 Spatiotemporal trajectory (STT) model (References to color refer to the online version of this figure)
4.1.1 Trajectory embedding
Trajectory features count a great deal in the POI recommendation task,consisting of two sparse features and a continuous feature.We use the common embedding technique (Cheng et al.,2016) to transform the large-scale sparse features into low-dimensional dense vectors to reduce computation and improve representation.For sparse features,we denote the embedded representations of users and locations aseu∈Rdandev∈Rd,respectively.For continuous features,we first divide continuous timestamps intoTdiscrete intervals in hours and then denote their embedded representations aset∈Rd.Thus,the input dimensions of the embeddingseu,ev,andetareU,V,andT,respectively.The embedding of each user check-inlis represented asel=eu+ev+et∈Rd.Consequently,for embedding the sequence of user historical POI visits,we denote it asEu={el1,el2,…,elm}.
4.1.2 Spatiotemporal interval encoding
Spatiotemporal factors play an important role in the evolution of people’s travel preferences.To enhance the model’s perception of spatiotemporal information,we introduce a spatiotemporal interval encoding method that uses the trigonometric function (Gehring et al.,2017) to integrate temporal interval and geographic distance into the model in the form of dense vectors.Compared with traditional embedding methods,our proposed encoding method is more interpretable and can make the spatiotemporal features easier to learn by the sequence model.
First,to facilitate the subsequent calculation of matrices for continuous temporal and spatial intervals,we partition the temporal intervals ?Tiand spatial intervals ?Siinto discrete bins.In the partitioning process,we introduce an information decay factor to reflect nonlinear information attenuation.The decay factor uses an exponential function inspired by the Ebbinghaus forgetting curve,which can reflect the decay rate of things with concept drift (Aggarwal et al.,2004) features such as human memory.The formula of the temporal decay factor (TDF) is as follows:
According to the above formula,TDFf(?t) is positively related to the temporal interval ?t,andf(?t)∈(0,1).T0determines the rate at which user interest drifts over time,and it needs to be adjusted for the specific situation.Therefore,temporal intervals can be properly partitioned into discrete temporal bins.The formula is as follows:
Then,we calculate the high-dimensional representation of spatiotemporal intervals according to the bin index.Gehring et al.(2017) introduced several encoding methods for converting discrete values into dense vectors,in which we chose the position encoding of trigonometric functions.Thus,the spatiotemporal interval information of the user trajectory can be concatenated to represent itself in the sequence model.For temporal interval encoding (TIE),the formulae are as follows:
Similarly,we can obtain the spatial interval encoding (SIE) formulae:
wheredrepresents the dimension of the encoded vector andirepresents the dimension of the encoded vector.It can be seen from the calculation process that the odd-numbered dimension value and the evennumbered dimension value of the encoded vector are calculated by the cosine function and the sine function,respectively.Therefore,can be obtained by their linear dependencies withaccording to the characteristics of trigonometric functions.
Finally,we obtain the TIE sequence TRT={TIE1,TIE2,…,TIEm} and the SIE sequence TRS={SIE1,SIE2,…,SIEm},whose first items are both zero vectors.Therefore,the representation set of the user check-in sequenceX={x1,x2,…,xm} can be obtained by concatenating the corresponding items inEu,TRT,and TRS.Moreover,we use the same method to convert the spatial interval matrixMto the SIE tensorEMas follows:
In the interest evolution layer,we extend AM to the LSTM model in our approach as our basic framework,which not only has excellent time-series data mining capabilities,but also facilitates additional extensions based on prior knowledge of the recommendation task.
4.2.1 LSTM
In the POI recommendation system,the user check-in behavior is the carrier of latent interest,and the user’s interest will change after he/she visits several POIs.In the interest evolution layer,we extract a series of interest states from the sequential user visiting trajectory.For the balance between efficiency and performance,we take LSTM to model the dependency between check-in’s,where the input of the LSTM is the latent representation of user check-in’s sorted by occurrence time.LSTM (Hochreiter and Schmidhuber,1997) overcomes the vanishing gradient problem of RNN and has achieved good results in time-series related studies.The update equations of LSTM are as follows:
where “⊙” is the elementwise product,σis the sigmoid activation function,it,ft,andotare the input,forget,and output gates of thetthtime step,aiming to constrain the information to store,forget,and output,respectively,xtis thetthinput feature vector of LSTM,and represents thetthPOI that the user checks in,htis thetthhidden state,Wi,Wf,Wo,andWcare the weight matrices for the input,forget,output,and candidate memory cells,respectively,andctis the activated vector representing the cell state,which plays an important role in information transfer between each time step in the LSTM.
4.2.2 Attention mechanism
However,due to the diversity of the user visiting patterns and the integrated spatiotemporal information,the last hidden statehm,which captures only the dependency between behaviors,cannot represent interest effectively in the long term.Therefore,we use AM to filter critical check-in information in the user’s long-term travel trajectories.The contribution of each check-in behavior is estimated as a normalized weight,which can be formulated as
Then,the final representation vector of thetthcheck-in is calculated as follows:
whereαtis the attention score of thetthcheck-in of the user,andWα∈RNH×1is the transition matrix for the attention layer,where NH represents the dimension of the hidden state.
The interest evolution layer above,similar to most other methods in the field of POI recommendation,focuses on mining users’ historical behavior patterns but ignores the features of candidate sets to a certain extent.Here,we propose the spatiotemporal matching layer to recall candidates with the highest probability fromVcandidate POIs by measuring the spatiotemporal correlation between user trajectories and candidate sets.Given the encoded temporal intervals TRT,the encoded spatial intervals TRSand the latent trajectory featuresG={g1,g2,…,gm},we obtain the user’s STT representation STEu=[est1,est2,…,estm] by concatenating them.Given the embedded candidate location matrixEv=[ev1,ev2,…,evV]∈RV×dand the encoded spatial interval tensorEM∈RV×m×ds,we obtain the encoding of the candidate spatial relation matrixEMS∈RV×m×(ds+d)bymrepeated concatenating operations.Therefore,the spatiotemporal features of each user’s trajectory and the spatial distance information of each candidate location are well represented by STEuandEMS,respectively,which is important for discovering their spatiotemporal correlations.In this layer,we calculate the probability of each candidate POI being the next real check-in for useruas follows:
Here,parameter matrixWS∈Rmconverts the dimension ofO(u) to RV.The key step to obtain the correlation between candidate sets and user trajectories is Matching,in which the updated check-in embeddings all contribute to the matching of each candidate POI.
We use real datasets to experimentally demonstrate the effectiveness of the STT model for the next POI recommendation in this section.First,we detail the datasets,baseline methods,evaluation metrics,and settings for model training and testing.Next,we present our empirical results for a quantitative fair comparison with those of baseline models.Finally,we experimentally verify the effectiveness of different techniques in the model.
We use real user check-in datasets from four regions of New York City (NYC),Tokyo City (TKY),Singapore (SIN),and Gowalla for model training and testing.Table 1 presents the basic statistics in each dataset.For the datasets,we first extract the check-in records in units of users.Each user’s check-in includes user ID,venue ID,latitude,longitude,and timestamp.Next,we filter out users with more than five records and locations visited more than five times.Then,we slice the trajectory of each user with a fixed-length window.For each user that hasmcheck-in’s,we divide a dataset intom-3 training sets,with the firstm'∈[1,m-3]check-in’s as input and the (m'+1)thcheck-in as the label;we use the (m-1)thcheck-in as the validation label to tune parameters;the test label uses the last check-in of the trajectory to evaluate the performance of the proposed model.
Table 1 Dataset statistics
We briefly introduce the following state-of-the-art methods for the next POI recommendation,which will be compared with our proposed model.
ST-RNN (Liu Q et al.,2016b) is a variant RNN model that incorporates spatiotemporal information by introducing a single transition matrix during the time step transition.
DeepMove (Feng J et al.,2018) is a novel approach that designs a historical attention module to assist the model in representing latent features of user behavior.
STGN (Zhao PP et al.,2022) innovates the gating mechanism of LSTM to facilitate the use of spatiotemporal information.
ARNN (Yin et al.,2017) is a state-of-the-art model that explores heterogeneous neighbors based on metapath random walks,and the model uses RNN with an AM for features in heterogeneous neighbors.
LSTPM (Sun et al.,2020) uses an improved GRU network with a historical attention module to enhance the model’s ability to represent latent features of user behavior.
TiSASRec (Li et al.,2020) is a state-of-the-art self-attention-based method considering time interval,and can simultaneously model the absolute position of items in the sequence and time interval between items.
GeoSAN (Lian et al.,2020) is a state-of-the-art method that uses a novel loss function optimization method based on importance sampling to address sparsity by emphasizing the use of negative samples.
STAN (Luo et al.,2021) is a novel model that uses a self-attention mechanism to consider the interaction between nonadjacent POIs and nonconsecutive check-in’s.
To compare our model with baseline models and adjust parameters,we adopt the top-Krecall rates that are commonly applied in previous works (Kingma and Ba,2014;Liu Q et al.,2016b).Recall@Kcounts the rate of true positive samples in all positive samples,which in our case measures the presence of the correct POI among the top-Krecommended POIs.It is calculated as follows:
where tpurepresents the total number of POIs in both the future check-in trajectory of useruand the top-Kresults produced by our proposed model,andtnurepresents the number of POIs in the future check-in trajectory of the user but not in the top-Kresults.
Here we detail the setting of the training parameters.We use the balanced sampler in our model to reduce computing resources and follow STAN recommendation to set the embedding dimension for user,location,and time to 50 (Luo et al.,2021);the optimizer is the Adam optimizer with default betas (Kingma and Ba,2014);the learning rate is set to 0.0003;the maximum of the bin indexis set to 100 and 50,respectively;the training epoch is 50 and the fixed length for user’s check-in sequence is 100.To obtain a more reasonable experiment,we fine-tune some key parameters and test the stability against the number of negative samples using the validation set in Section 5.7.
We adopt Recall@5 and Recall@10 to evaluate the performance of the models.Table 2 shows the results of all baseline models on four datasets.To ensure the fairness of the experiment,we take the mean recall of 100 experimental results.
Table 2 Evaluation of baseline models in terms of Recall@5 and Recall@10 on four datasets
Our STT model outperforms all baselines on all datasets and gains 11.45% Recall@5 and 10.27%Recall@10 improvements on average against the strongest baseline STAN.Among the baseline models,self-attention-based models such as GeoSAN and STAN significantly outperform RNN variants.This is not surprising,as RNN-based models suffer from vanishing gradients,which toss long-term patterns.Note that we use an AM to help STT overcome gradient descent so that STT can effectively capture the sequential regularity of spatiotemporal trajectories while considering the long-term pattern.Moreover,reasonable use of spatiotemporal information through the decay factor and full consideration of candidate sets make our model better than the other methods.
Since there are many components in our proposed architecture,we validate the contributions of different components through an ablation study.We briefly describe the role of each component of the model as follows:
TDF determines whether the information decays with time;
SDF determines whether the information decays with geographic distance;
TIE characterizes the temporal intervals as highdimensional vectors in the model;
SIE characterizes the spatial intervals as highdimensional vectors in the model;
AM helps STT capture the long-term behavioral characteristics of users through spatiotemporal information;
STM enables the model to consider the spatiotemporal relationship between user trajectories and candidate sets when recommending to users.
We remove the modules mentioned above in turn and obtain some variants.The performance of variant STT models on all four datasets is shown in Table 3.We find that in the process of POI recommendation,spatial distances and temporal intervals have a strong role in promoting the sequence model,and they both improve the accuracy by nearly 2%.The introduction of TDF and SDF can help the model use the spatiotemporal information more reasonably and further improve the accuracy of the model by almost 1%-3%.AM is necessary for sequence models,especially in learning long-term patterns of user preferences,and it improves the recall rates by almost 1%-6%.STM contributes the most to the model by helping the model use the relevant information of the candidate set,which brings approximately 10%-20% accuracy improvement to our model.
Table 3 Ablation analysis (Recall@5 and Recall@10) on four datasets
1.The dimension of the hidden stateh.To investigate the impact of dimensionality on STT,we illustrate the Recall@10 performance of STT on all datasets with varying dimensionality in Fig.4.It is obvious that the performance of our STT is sensitive tohon all datasets.We find that the recall value of STT stays stable in a large range on all datasets after a sharp increase,and the most suitable parameters can be selected ash=50 in NYC,h=60 in TKY,h=90 in SIN,andh=80 in Gowalla.
Fig.4 Effect of embedding dimension h on Recall@10: (a) New York City;(b) Tokyo City;(c) Singapore;(d) Gowalla
2.T0andS0,which determine the temporal decay rate and the spatial decay rate,respectively.According to our knowledge of the decay function,we vary the value ofT0from 0.5×105to 5×105with step 50 000 and the value ofS0from 20 to 200 with step 20 in the STT on all datasets.Fig.5 shows thatT0=1×105is the best value for NYC,T0=3.5×105is the best value for TKY,T0=3×105is the best value for SIN,andT0=2.5×105is the best value for Gowalla.This indicates that the travel interests of people living in different regions change at different speeds over time.For the parameterS0,our best result is to take 100 in the NYC dataset,20 in the TKY dataset,80 in the SIN dataset,and 140 in the Gowalla dataset,which is obvious in Fig.6.We find that in different cities,people’s travel interests are different in sensitivity to distance,which is due to the different distribution of locations in different cities.
Fig.5 Effect of T0 on Recall@10: (a) New York City;(b) Tokyo City;(c) Singapore;(d) Gowalla
Fig.6 Effect of S0 on Recall@10: (a) New York City;(b) Tokyo City;(c) Singapore;(d) Gowalla
3.The number of negative samplesr.We use the validation set to test the performance of the model whenris set to 1,10,20,30,40,and 50,and the results are shown in Fig.7.Obviously,an appropriate amount of negative sample sampling can promote the convergence of the training process.Moreover,larger datasets seem to accept more negative samples,but more than a certain number will be counter-productive.
Fig.7 Effect of r on Recall@10: (a) New York City;(b) Tokyo City;(c) Singapore;(d) Gowalla
In this paper,we propose a novel next POI recommendation method called STT that effectively considers the nonlinear spatiotemporal influence on user trajectories.Specifically,we design an encoding method to introduce temporal and spatial interval sequences into our model.During the encoding process,we introduce a decay factor to help the model focus on valuable spatiotemporal information in a nonlinear way.In the process of recalling the target,we propose a new spatiotemporal matching method exploring the best candidate for users.Moreover,we use an attention mechanism to help the model mine long-term patterns of users based on their spatiotemporal trajectories.We perform comprehensive parameter filtering,ablation study,and comparisons with baseline models in the experimental section.Experimental results demonstrate that our STT model improves the accuracy to a great extent compared with state-of-the-art models.In practice,our results can bring commercial value to websites and applications based on personalized POI recommendation services.
There are also some valuable directions for our method that deserve further study.First,in addition to spatiotemporal information,other current state information is important for user’s interest,such as user age,weather,and season.Hence,we plan to exploit other user and environment state information in POI recommendation.Second,user preferences in a specific state are usually greatly influenced by POI types.Therefore,proper use of category information in recommendation is promising.
Contributors
Xi SUN and Zhimin LV designed the research and processed the data.Xi SUN drafted the paper.Zhimin LV helped organize the paper.Xi SUN and Zhimin LV revised and finalized the paper.
Compliance with ethics guidelines
Xi SUN and Zhimin LV declare that they have no conflict of interest.
Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.
Frontiers of Information Technology & Electronic Engineering2023年9期