# From GPS Points to Travel Patterns: Flexible and Semantic Trajectory Generation with LLMs

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

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 32 of its 58 references that are in the map.
- First posted on arXiv 28 May 2026.

## Builds on (most cited first, 30 of 32)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://mlsanity.com/paper/1505.04597/) (2015)
- [The Llama 3 Herd of Models](https://mlsanity.com/paper/2407.21783/) (2024)
- [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://mlsanity.com/paper/1910.10683/) (2019)
- [LLaMA: Open and Efficient Foundation Language Models](https://mlsanity.com/paper/2302.13971/) (2023)
- [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://mlsanity.com/paper/2402.03300/) (2024)
- [Qwen3 Technical Report](https://mlsanity.com/paper/2505.09388/) (2025)
- [Efficient Memory Management for Large Language Model Serving with PagedAttention](https://mlsanity.com/paper/2309.06180/) (2023)
- [Qwen2.5 Technical Report](https://mlsanity.com/paper/2412.15115/) (2024)
- [Auto-Encoding Variational Bayes](https://mlsanity.com/paper/1312.6114/) (2013)
- [Qwen Technical Report](https://mlsanity.com/paper/2309.16609/) (2023)
- [node2vec: Scalable Feature Learning for Networks](https://mlsanity.com/paper/1607.00653/) (2016)
- [DiffWave: A Versatile Diffusion Model for Audio Synthesis](https://mlsanity.com/paper/2009.09761/) (2020)
- [SGLang: Efficient Execution of Structured Language Model Programs](https://mlsanity.com/paper/2312.07104/) (2023)
- [Autoregressive Image Generation using Residual Quantization](https://mlsanity.com/paper/2203.01941/) (2022)
- [Vector-quantized Image Modeling with Improved VQGAN](https://mlsanity.com/paper/2110.04627/) (2021)
- [TravelPlanner: A Benchmark for Real-World Planning with Language Agents](https://mlsanity.com/paper/2402.01622/) (2024)
- [OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks](https://mlsanity.com/paper/1611.01890/) (2016)
- [LLMLight: Large Language Models as Traffic Signal Control Agents](https://mlsanity.com/paper/2312.16044/) (2023)
- [Deep Gravity: enhancing mobility flows generation with deep neural networks and geographic information](https://mlsanity.com/paper/2012.00489/) (2020)
- [LSTM-TrajGAN: A Deep Learning Approach to Trajectory Privacy Protection](https://mlsanity.com/paper/2006.10521/) (2020)
- [Route Planning in Transportation Networks](https://mlsanity.com/paper/1504.05140/) (2015)
- [Alleviation of Gradient Exploding in GANs: Fake Can Be Real](https://mlsanity.com/paper/1912.12485/) (2019)
- [PateGail: A Privacy-Preserving Mobility Trajectory Generator with Imitation Learning](https://mlsanity.com/paper/2407.16729/) (2024)
- [Revisiting Synthetic Human Trajectories: Imitative Generation and Benchmarks Beyond Datasaurus](https://mlsanity.com/paper/2409.13790/) (2024)
- [Blurred Encoding for Trajectory Representation Learning](https://mlsanity.com/paper/2511.13741/) (2025)
- [DutyTTE: Deciphering Uncertainty in Origin-Destination Travel Time Estimation](https://mlsanity.com/paper/2408.12809/) (2024)
- [GTG: Generalizable Trajectory Generation Model for Urban Mobility](https://mlsanity.com/paper/2502.01107/) (2025)
- [Real-Time Trajectory Synthesis with Local Differential Privacy](https://mlsanity.com/paper/2404.11450/) (2024)
- [SIMformer: Single-Layer Vanilla Transformer Can Learn Free-Space Trajectory Similarity](https://mlsanity.com/paper/2410.14629/) (2024)

## Abstract (arXiv)

Urban trajectories play a crucial role in modeling urban dynamics and supporting various smart city applications. However, privacy concerns restrict access to large-scale and high-quality trajectory datasets. Trajectory generation provides a promising alternative by synthesizing realistic data to mitigate privacy risks. However, existing methods fail to explicitly capture travel patterns and can only generate fixed-length trajectories under a single condition. To address these limitations, we propose HTP, which Hierarchically generates Travel patterns first and then generates GPS Points by using large language models (LLMs), rather than directly generating GPS points. We first design a trajectory-specific residual quantization variational autoencoder (RQ-VAE) that quantizes micro-level GPS trajectories into compact, macro-level travel pattern tokens in a coarse-to-fine manner. These tokens capture rich segment spatial irregularities, such as point density variations caused by traffic conditions. Then, we extend the LLM vocabulary with travel pattern tokens to align trajectory representations with the LLM input, and apply supervised fine-tuning (SFT) to align the LLM with the trajectory generation task, enabling generation of travel pattern sequences under various conditions. Extensive experiments on two real-world datasets show that HTP outperforms the strongest baseline by an average of 29.78% in terms of generation quality. Our code is available at https://github.com/slzhou-xy/HTP.
