LLM-Cardiff
Trained models for Coarse-to-Fine Trajectory Generation via LLM-Conditioned Cascaded Diffusion Models โ the journal extension of "Leveraging the Spatial Hierarchy: Coarse-to-fine Trajectory Generation via Cascaded Hybrid Diffusion" (KDD 2026, arXiv:2507.13366).
Two cascaded diffusion stages over a spatial hierarchy. Stage 1 generates a route โ a sequence of road segments โ in the latent space of a frozen autoencoder. Stage 2, conditioned on that latent, generates the GPS points along it.
Models
| directory | city | condition | stage 1 | stage 2 | last.pt |
ae_mae/ |
|---|---|---|---|---|---|---|
porto/ |
Porto | 5-d attributes | DiT, depth 8 | DiT, 64 points | 210 MB | 65 MB |
chengdu/ |
Chengdu | 5-d attributes | DiT, depth 8 | DiT, 256 points | 204 MB | 47 MB |
singapore-attr/ |
Singapore | 5-d attributes | DiT, depth 12 | DiT, 256 points | 337 MB | 78 MB |
singapore-llm-intent/ |
Singapore | 8 LLM intention slots | DiT, depth 12 | DiT, 256 points | 327 MB | 78 MB |
Each directory is self-contained.
| file | what it is |
|---|---|
last.pt |
both diffusion stages and the condition encoders, in one checkpoint |
ae_mae/model.pt |
the frozen autoencoder: road segments โ the latent stage 1 diffuses over |
ae_mae/ae_config.json |
its architecture, vocabulary size, and which feature table it reads |
ae_mae/vocab.json |
the segment vocabulary, checked against the dataset's road network at load |
ae_mae/segment_features_meta.json |
the feature dimensions the encoder expects |
Architecture is read from the checkpoint, not from a config, so a depth-8 and a depth-12 stage 1 load through the same code path. The autoencoder is not interchangeable: the diffusion model was trained in that encoder's latent space, and a mismatch aborts at load.
Conditions
| content | |
|---|---|
| 5-d attributes | departure slot (10-minute bins), trip distance, number of points, origin cell, destination cell |
| 8 intention slots | origin cell, destination cell, destination place type, home cell, departure slot, day type, distance band, age band โ each encoded by a frozen sentence encoder |
Use
git clone https://github.com/urban-mobility-generation/LLM-cardiff && cd LLM-cardiff
huggingface-cli download seanguo61/LLM-cardiff --local-dir checkpoints
cp paths.yml.example paths.yml
bash scripts/sample.sh porto # also: chengdu, singapore-attr, singapore-llm
Sampling reads the dataset: the condition comes from held-out real trips, and the constants that turn the model's output back into coordinates live beside them. Only Porto's data is redistributed; the other three need their data obtained separately.
Citation
If you find these models useful in your research, please cite:
@inproceedings{guo2026leveraging,
title={Leveraging the Spatial Hierarchy: Coarse-to-fine Trajectory Generation via Cascaded Hybrid Diffusion},
author={Guo, Baoshen and Hong, Zhiqing and Li, Junyi and Wang, Shenhao and Zhao, Jinhua},
booktitle={Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 1},
pages={359--370},
year={2026}
}
The Porto model was trained on data derived from the public ECML/PKDD 15 Taxi Trajectory Prediction dataset (CC BY 4.0); please cite it as well.