NextLocLLM: Location Semantics Modeling and Coordinate-Based Next Location Prediction with LLMs
This addresses the limitation of existing methods in spatial continuity modeling and generalization to new cities for human mobility analysis.
The paper tackles the problem of next location prediction by reformulating it as coordinate regression instead of classification, and integrates LLMs for location semantics encoding and prediction. Experiments across diverse cities show NextLocLLM outperforms existing baselines in both supervised and zero-shot settings.
Next location prediction is a critical task in human mobility analysis.Existing methods typically formulate it as a classification task based on discrete location IDs, which hinders spatial continuity modeling and limits generalization to new cities. In this paper, we propose NextLocLLM, a novel framework that reformulates next-location prediction as coordinate regression and integrates LLMs for both location semantics encoding and coordinate-level prediction. To model location functional semantics, it constructs LLM-enhanced POI embeddings by leveraging language understanding capabilities of LLMs to extract functional semantics from textual descriptions of POI categories. These POI embeddings are combined with spatiotemporal trajectory representation and fed into the same LLM, enabling unified semantic and predictive modeling. A lightweight regression head generates coordinate outputs, which are mapped to top-k candidate locations via post-prediction retrieval module, ensuring structured outputs. Experiments across diverse cities show that NextLocLLM outperforms existing baselines in both supervised and zero-shot settings. Code is available at: https://github.com/liuwj2000/NexelocLLM.