# Geo-Llama: Leveraging LLMs for Human Mobility Trajectory Generation with Spatiotemporal Constraints

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

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- Builds on 21 of its 51 references that are in the map.
- First posted on arXiv 25 Aug 2024.

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

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [LoRA: Low-Rank Adaptation of Large Language Models](https://mlsanity.com/paper/2106.09685/) (2021)
- [Llama 2: Open Foundation and Fine-Tuned Chat Models](https://mlsanity.com/paper/2307.09288/) (2023)
- [A Comprehensive Overview of Large Language Models](https://mlsanity.com/paper/2307.06435/) (2023)
- [SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient](https://mlsanity.com/paper/1609.05473/) (2016)
- [Large Language Models Empowered Agent-based Modeling and Simulation: A Survey and Perspectives](https://mlsanity.com/paper/2312.11970/) (2023)
- [A Survey of Controllable Text Generation using Transformer-based Pre-trained Language Models](https://mlsanity.com/paper/2201.05337/) (2022)
- [Enabling Language Models to Fill in the Blanks](https://mlsanity.com/paper/2005.05339/) (2020)
- [STAN: Spatio-Temporal Attention Network for Next Location Recommendation](https://mlsanity.com/paper/2102.04095/) (2021)
- [Large Language Models as Urban Residents: An LLM Agent Framework for Personal Mobility Generation](https://mlsanity.com/paper/2402.14744/) (2024)
- [DiffTraj: Generating GPS Trajectory with Diffusion Probabilistic Model](https://mlsanity.com/paper/2304.11582/) (2023)
- [GETNext: Trajectory Flow Map Enhanced Transformer for Next POI Recommendation](https://mlsanity.com/paper/2303.04741/) (2023)
- [ControlTraj: Controllable Trajectory Generation with Topology-Constrained Diffusion Model](https://mlsanity.com/paper/2404.15380/) (2024)
- [Neural Point Process for Learning Spatiotemporal Event Dynamics](https://mlsanity.com/paper/2112.06351/) (2021)
- [Large Language Models for Next Point-of-Interest Recommendation](https://mlsanity.com/paper/2404.17591/) (2024)
- [STP-UDGAT: Spatial-Temporal-Preference User Dimensional Graph Attention Network for Next POI Recommendation](https://mlsanity.com/paper/2010.07024/) (2020)
- [Controllable Data Generation by Deep Learning: A Review](https://mlsanity.com/paper/2207.09542/) (2022)
- [PrivTrace: Differentially Private Trajectory Synthesis by Adaptive Markov Model](https://mlsanity.com/paper/2210.00581/) (2022)
- [Urban Mobility Assessment Using LLMs](https://mlsanity.com/paper/2409.00063/) (2024)
- [HRNet: Differentially Private Hierarchical and Multi-Resolution Network for Human Mobility Data Synthesization](https://mlsanity.com/paper/2405.08043/) (2024)
- [Factorized Deep Generative Models for Trajectory Generation with Spatiotemporal-Validity Constraints](https://mlsanity.com/paper/2009.09333/) (2020)

## Built on by (most cited first, 7 of 7)

- [SynHAT: A Two-stage Coarse-to-Fine Diffusion Framework for Synthesizing Human Activity Traces](https://mlsanity.com/paper/2604.14705/) (2026)
- [Bus-Conditioned Zero-Shot Trajectory Generation via Task Arithmetic](https://mlsanity.com/paper/2602.13071/) (2026)
- [A Study on Individual Spatiotemporal Activity Generation Method Using MCP-Enhanced Chain-of-Thought Large Language Models](https://mlsanity.com/paper/2506.10853/) (2025)
- [From Symbolic to Geometric: Enabling Spatial Reasoning in Large Language Models](https://mlsanity.com/paper/2606.04381/) (2026)
- [Think2Go: Generative Next POI Recommendation with LLM Reasoning](https://mlsanity.com/paper/2607.28997/) (2026)
- [Mobility Anomaly Generation using LLM-Driven Behavior with Kinematic Constraints](https://mlsanity.com/paper/2606.10314/) (2026)
- [TrajGenAgent: A Hierarchical LLM Agent for Human Mobility Trajectory Generation](https://mlsanity.com/paper/2606.12657/) (2026)

## Abstract (arXiv)

Generating realistic human mobility data is essential for various application domains, including transportation, urban planning, and epidemic control, as real data is often inaccessible to researchers due to high costs and privacy concerns. Existing deep generative models learn from real trajectories to generate synthetic ones. Despite the progress, most of them suffer from training stability issues and scale poorly with increasing data size. More importantly, they often lack control mechanisms to guide the generated trajectories under constraints such as enforcing specific visits. To address these limitations, we formally define the controlled trajectory generation problem for effectively handling multiple spatiotemporal constraints. We introduce Geo-Llama, a novel LLM finetuning framework that can enforce multiple explicit visit constraints while maintaining contextual coherence of the generated trajectories. In this approach, pre-trained LLMs are fine-tuned on trajectory data with a visit-wise permutation strategy where each visit corresponds to a specific time and location. This strategy enables the model to capture spatiotemporal patterns regardless of visit orders while maintaining flexible and in-context constraint integration through prompts during generation. Extensive experiments on real-world and synthetic datasets validate the effectiveness of Geo-Llama, demonstrating its versatility and robustness in handling a broad range of constraints to generate more realistic trajectories compared to existing methods.
