This repository is the implementation of paper TrajFlow: nationwide Pseudo GPS Trajectory Generation with Flow Matching Models.
TrajFlow is a flow-matching based framework for pseudo GPS trajectory generation targeting multi-scale mobility patterns.
- OpenReview page: https://openreview.net/forum?id=BDOldEjwCE
- PDF: https://openreview.net/pdf?id=BDOldEjwCE
- This repository provides the training and inference pipeline for TrajFlow.
- The main paper conclusions are validated on BW data, which is commercial/private and not open-sourced here.
- Open-source support is provided for DiDi Chengdu/XiAn data to verify that the pipeline works on public-style data.
- This repository does not ship raw trajectories, private data, or model checkpoints.
- We do not redistribute DiDi datasets. Please obtain data from official/authorized channels under your own compliance responsibility.
Expected local layout for testing:
./data/DiDiTaxi_Chengdu_traj./data/DiDiTaxi_XiAn_traj
conda env create -f environment.yml
conda activate flow_matching_py311
pip install -r requirements.txtNotes:
flow_matchingis installed as an external dependency viarequirements.txt.- This repository does not vendor a local
flow_matching/copy.
Training:
python train.py --config ./src/config/config_chengdu.yaml
# XiAn:
# python train.py --config ./src/config/config_xian.yamlGeneration:
python generate.py \
--config ./outputs/run_YYYYMMDD_HHMMSS/config.yaml \
--checkpoint ./outputs/models/run_YYYYMMDD_HHMMSS/best_model.pt- Evaluation scripts are intentionally omitted from the open-source release to keep the repository focused on the core training/generation pipeline.
Unless otherwise noted, the original code in this repository is released under CC BY-NC 4.0 (LICENSE).
This repository also includes third-party code under separate licenses. For example, src/utils/jismesh_v2/ is distributed under the MIT License; see src/utils/jismesh_v2/LICENSE.
If you use this repository, please cite:
@inproceedings{li2026trajflow,
title={TrajFlow: nationwide Pseudo GPS Trajectory Generation with Flow Matching Models},
author={Li, Peiran and Wang, Jiawei and Zhang, Haoran and Shi, Xiaodan and Koshizuka, Noboru and Shimizu, Chihiro and Jiang, Renhe},
booktitle={International Conference on Learning Representations (ICLR)},
year={2026},
url={https://openreview.net/forum?id=BDOldEjwCE}
}