---
title: "Two-Stage Fine-Grained Trajectory Generation Constrained by Road Networks"
authors:
  - "Zewu Lv"
  - "Zipei Fan"
  - "Zhiwen Zhang"
  - "Xuan Song"
doi: "10.24963/ijcai.2026/324"
url: "https://ijcai.org/proceedings/2026/324"
pdf: "https://ijcai.org/proceedings/2026/0324.pdf"
venue: "Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence"
year: 2026
pages: "2915-2923"
track: "Main Track"
keywords:
  - "Data Mining: Mining spatial and/or temporal data"
  - "Machine Learning: Sequence and graph learning"
  - "Machine Learning: Representation learning"
---

# Two-Stage Fine-Grained Trajectory Generation Constrained by Road Networks

Zewu Lv, Zipei Fan, Zhiwen Zhang, Xuan Song

*Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence*, pages 2915-2923. DOI: [10.24963/ijcai.2026/324](https://doi.org/10.24963/ijcai.2026/324)

## Abstract

Trajectory generation is a pivotal technique for mitigating data sparsity, but existing methods struggle to simultaneously achieve strict road network alignment and capture realistic movement characteristics. To bridge this gap, we propose RNTrajGen, a two-stage fine-grained trajectory generation framework constrained by road networks. Specifically, we first develop a Road Network Knowledge-Enhanced Encoder (RNKEE) to provide semantically rich representations for trajectory generation. By leveraging graph attention networks, RNKEE encodes static prior knowledge of the road network while integrating self-supervised learning to extract latent movement patterns from real-world trajectories. Subsequently, RNTrajGen follows a two-stage generation strategy: it first generates a sequence of road segments to ensure strict topological alignment, and then infers the moving ratios of trajectory points along road segments to capture fine-grained movement characteristics. Extensive experiments on two real-world datasets demonstrate that RNTrajGen significantly outperforms state-of-the-art baselines, and the generated trajectories exhibit high utility in downstream prediction tasks. Our code is available at https://github.com/jkzh986/RNTrajGen.
