# STAN: Spatio-Temporal Attention Network for Next Location Recommendation

arXiv: https://arxiv.org/abs/2102.04095 · HTML: https://mlsanity.com/paper/2102.04095/

## Key facts

- Cited by 102 papers in the map (data through 14 Oct 2026).
- Builds on 16 of its 45 references that are in the map.
- First posted on arXiv 8 Feb 2021.

## Builds on (most cited first, 16 of 16)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Self-Attentive Sequential Recommendation](https://mlsanity.com/paper/1808.09781/) (2018)
- [Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding](https://mlsanity.com/paper/1809.07426/) (2018)
- [Deep Interest Evolution Network for Click-Through Rate Prediction](https://mlsanity.com/paper/1809.03672/) (2018)
- [Session-based Recommendation with Graph Neural Networks](https://mlsanity.com/paper/1811.00855/) (2018)
- [Neural Attentive Session-based Recommendation](https://mlsanity.com/paper/1711.04725/) (2017)
- [Fusing Similarity Models with Markov Chains for Sparse Sequential Recommendation](https://mlsanity.com/paper/1609.09152/) (2016)
- [A Simple Convolutional Generative Network for Next Item Recommendation](https://mlsanity.com/paper/1808.05163/) (2018)
- [RepeatNet: A Repeat Aware Neural Recommendation Machine for Session-based Recommendation](https://mlsanity.com/paper/1812.02646/) (2018)
- [TAGNN: Target Attentive Graph Neural Networks for Session-based Recommendation](https://mlsanity.com/paper/2005.02844/) (2020)
- [Context-aware Sequential Recommendation](https://mlsanity.com/paper/1609.05787/) (2016)
- [Modeling Personalized Item Frequency Information for Next-basket Recommendation](https://mlsanity.com/paper/2006.00556/) (2020)
- [Sequential Click Prediction for Sponsored Search with Recurrent Neural Networks](https://mlsanity.com/paper/1404.5772/) (2014)
- [Multi-behavioral Sequential Prediction with Recurrent Log-bilinear Model](https://mlsanity.com/paper/1608.07102/) (2016)
- [NEXT: A Neural Network Framework for Next POI Recommendation](https://mlsanity.com/paper/1704.04576/) (2017)
- [An Empirical Study on Feature Discretization](https://mlsanity.com/paper/2004.12602/) (2020)

## Built on by (most cited first, 30 of 102)

- [Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation](https://mlsanity.com/paper/2402.14744/) (2024)
- [A Survey on Graph Representation Learning Methods](https://mlsanity.com/paper/2204.01855/) (2022)
- [GETNext: Trajectory Flow Map Enhanced Transformer for Next POI Recommendation](https://mlsanity.com/paper/2303.04741/) (2023)
- [MobTCast: Leveraging Auxiliary Trajectory Forecasting for Human Mobility Prediction](https://mlsanity.com/paper/2110.01401/) (2021)
- [Large Language Models for Next Point-of-Interest Recommendation](https://mlsanity.com/paper/2404.17591/) (2024)
- [Spatial-Temporal Hypergraph Self-Supervised Learning for Crime Prediction](https://mlsanity.com/paper/2204.08587/) (2022)
- [A Diffusion model for POI recommendation](https://mlsanity.com/paper/2304.07041/) (2023)
- [Automated Spatio-Temporal Graph Contrastive Learning](https://mlsanity.com/paper/2305.03920/) (2023)
- [Large Language Models are Zero-Shot Next Location Predictors](https://mlsanity.com/paper/2405.20962/) (2024)
- [Mobility-LLM: Learning Visiting Intentions and Travel Preferences from Human Mobility Data with Large Language Models](https://mlsanity.com/paper/2411.00823/) (2024)
- [LibCity: A Unified Library Towards Efficient and Comprehensive Urban Spatial-Temporal Prediction](https://mlsanity.com/paper/2304.14343/) (2023)
- [Towards Unifying Diffusion Models for Probabilistic Spatio-Temporal Graph Learning](https://mlsanity.com/paper/2310.17360/) (2023)
- [GPT-ST: Generative Pre-Training of Spatio-Temporal Graph Neural Networks](https://mlsanity.com/paper/2311.04245/) (2023)
- [NetTraj: A Network-based Vehicle Trajectory Prediction Model with Directional Representation and Spatiotemporal Attention Mechanisms](https://mlsanity.com/paper/2106.11175/) (2021)
- [Decentralized Collaborative Learning Framework for Next POI Recommendation](https://mlsanity.com/paper/2204.06516/) (2022)
- [MultiSPANS: A Multi-range Spatial-Temporal Transformer Network for Traffic Forecast via Structural Entropy Optimization](https://mlsanity.com/paper/2311.02880/) (2023)
- [TrajGPT: Controlled Synthetic Trajectory Generation Using a Multitask Transformer-Based Spatiotemporal Model](https://mlsanity.com/paper/2411.04381/) (2024)
- [GeoGen: A Two-stage Coarse-to-Fine Framework for Fine-grained Synthetic Location-based Social Network Trajectory Generation](https://mlsanity.com/paper/2510.07735/) (2025)
- [TransGNN: Harnessing the Collaborative Power of Transformers and Graph Neural Networks for Recommender Systems](https://mlsanity.com/paper/2308.14355/) (2023)
- [Revisiting Mobility Modeling with Graph: A Graph Transformer Model for Next Point-of-Interest Recommendation](https://mlsanity.com/paper/2310.01224/) (2023)
- [Translating Human Mobility Forecasting through Natural Language Generation](https://mlsanity.com/paper/2112.11481/) (2021)
- [A Universal Model for Human Mobility Prediction](https://mlsanity.com/paper/2412.15294/) (2024)
- [Kernel-based Substructure Exploration for Next POI Recommendation](https://mlsanity.com/paper/2210.03969/) (2022)
- [Taming the Long Tail in Human Mobility Prediction](https://mlsanity.com/paper/2410.14970/) (2024)
- [Enhancing Large Language Models for Mobility Analytics with Semantic Location Tokenization](https://mlsanity.com/paper/2506.11109/) (2025)
- [Learning Time Slot Preferences via Mobility Tree for Next POI Recommendation](https://mlsanity.com/paper/2403.12100/) (2024)
- [Reasoning-Enhanced Object-Centric Learning for Videos](https://mlsanity.com/paper/2403.15245/) (2024)
- [Geo-Llama: Leveraging LLMs for Human Mobility Trajectory Generation with Spatiotemporal Constraints](https://mlsanity.com/paper/2408.13918/) (2024)
- [Graph Neural Network for spatiotemporal data: methods and applications](https://mlsanity.com/paper/2306.00012/) (2023)
- [Spatial-Temporal Interplay in Human Mobility: A Hierarchical Reinforcement Learning Approach with Hypergraph Representation](https://mlsanity.com/paper/2312.15717/) (2023)

## Abstract (arXiv)

The next location recommendation is at the core of various location-based applications. Current state-of-the-art models have attempted to solve spatial sparsity with hierarchical gridding and model temporal relation with explicit time intervals, while some vital questions remain unsolved. Non-adjacent locations and non-consecutive visits provide non-trivial correlations for understanding a user's behavior but were rarely considered. To aggregate all relevant visits from user trajectory and recall the most plausible candidates from weighted representations, here we propose a Spatio-Temporal Attention Network (STAN) for location recommendation. STAN explicitly exploits relative spatiotemporal information of all the check-ins with self-attention layers along the trajectory. This improvement allows a point-to-point interaction between non-adjacent locations and non-consecutive check-ins with explicit spatiotemporal effect. STAN uses a bi-layer attention architecture that firstly aggregates spatiotemporal correlation within user trajectory and then recalls the target with consideration of personalized item frequency (PIF). By visualization, we show that STAN is in line with the above intuition. Experimental results unequivocally show that our model outperforms the existing state-of-the-art methods by 9-17%.
