Diffusion Transformers as Open-World Spatiotemporal Foundation Models

Yuan Yuan, Chonghua Han, Jingtao Ding, Guozhen Zhang, Depeng Jin, Yong Li

Overview

Urban environments are a chaotic symphony of human activity, reflected in data that is notoriously difficult to model. UrbanDiT is a pioneering foundation model that brings the power of Diffusion Transformers to the complex world of urban spatio-temporal data. By unifying diverse data types (like traffic graphs and population grids) and tasks (from forecasting to data imputation) into a single framework, it achieves state-of-the-art performance and demonstrates remarkable "zero-shot" capabilities in entirely new cities.

The Challenge of Urban Data

Traditionally, researchers attempting to model urban dynamics have faced three major hurdles:

  1. Data Heterogeneity: Urban data comes in different "shapes." Some are grid-based (like a heatmap of crowd density), while others are graph-based (like traffic speeds on an irregular road network).
  2. Task Silos: Most models are specialists. A model trained to forecast traffic usually cannot fill in missing sensor data (imputation) or predict patterns in a neighborhood it hasn't seen (spatial extrapolation).
  3. The "Open-World" Gap: Most models fail when moved to a new city because they haven't learned "universal" urban patterns; they have merely memorized one specific city's layout.

The authors of UrbanDiT set out to create a "foundation model"—similar in spirit to GPT for text—that can handle any urban data type and any spatio-temporal task across any city.

UrbanDiT unifies diverse urban spatio-temporal data and multiple tasks into a single foundation model.

How UrbanDiT Works

UrbanDiT leverages Diffusion Transformers (DiT), an architecture recently made famous by video generation models like Sora. The model works by learning to "denoise" urban data, effectively learning the underlying distribution of how cities move over space and time.

The architecture of UrbanDiT, detailing the transformation of diverse datasets into a sequential format and the unified prompt learning mechanism.

Key technical innovations include:

  • Unified Sequential Format: To handle both grids and graphs, the authors use specialized "patching" techniques. Grids are processed via 3D convolutions, while graphs are processed via Graph Convolutional Networks (GCNs). Both are then flattened into a sequence of tokens that a Transformer can digest.
  • Unified Prompt Learning: This is the model's "secret sauce." It uses two types of prompts:
  • Data-driven prompts: The model maintains "memory pools" for the time, frequency, and spatial domains. It retrieves relevant patterns from these pools to help it understand the specific context of the input data.
  • Task-specific prompts: These guide the model on what to do (e.g., "predict the next hour" vs. "fill in this missing block of data") based on the masking strategy applied to the input.
  • Rectified Flow: To solve the "slow inference" problem typical of diffusion models, they use a technique called InstaFlow, which "straightens" the diffusion path, allowing the model to generate accurate results in just 20 steps—a 25x speedup over standard methods.

Datasets and Evaluation

The model was evaluated on a massive benchmark of 8 diverse datasets across multiple cities, including New York, Beijing, Shanghai, and Nanjing. These datasets covered both grid-based data (TaxiBJ, FlowSH, TaxiNYC, CrowdNJ, PopBJ) and graph-based data (SpeedSH, SpeedBJ, SpeedNJ).

Key Insights and Results

  • Universal Urban Laws: Perhaps the most striking finding is that UrbanDiT exhibits powerful zero-shot capabilities. It can be tested on a city it has never seen during training and still outperform baseline models that were specifically trained on that city's data. This suggests the model has captured fundamental spatio-temporal patterns common to all urban environments.
  • Superior Prediction and Versatility: In forward prediction tasks, UrbanDiT achieved an 11.3% relative improvement over the best existing baselines. It also dominated in non-prediction tasks. For spatial extrapolation (predicting values in unobserved areas), it outperformed the next best model (CSDI) by a staggering margin—for example, reducing Mean Absolute Error (MAE) from 36.66 to 8.10 on the TaxiBJ dataset.
  • The Importance of Frequency: In ablation studies, the authors found that removing the "frequency-domain" prompt caused the biggest drop in performance. This highlights that urban life is deeply rhythmic (daily/weekly cycles), and capturing these oscillations is key to accuracy.
  • Scaling Laws Apply: Just like Large Language Models, UrbanDiT follows scaling laws. The "Large" version of the model (UrbanDiT-L) showed a much steeper improvement in performance as more data was added compared to the "Small" or "Medium" versions, indicating that the architecture is ready for even larger-scale deployments.

Limitations and Future Work

While UrbanDiT is a massive step forward, the authors note a few areas for growth:

  • Data Scope: Currently, the model focuses primarily on human activity (mobility, traffic, population). Future iterations should incorporate "non-human" urban data, such as air pollution levels, climate indicators, and microclimate dynamics, to provide a truly holistic "Digital Twin" of the city.
  • Computational Cost: Although inference is optimized via Rectified Flow, training a foundation model of this scale still requires significant GPU resources compared to smaller, task-specific models.

Summary updated

BibTeX
@inproceedings{yuan2025diffusion,
  author = {Yuan Yuan and Chonghua Han and Jingtao Ding and Guozhen Zhang and Depeng Jin and Yong Li},
  title = {{Diffusion Transformers as Open-World Spatiotemporal Foundation Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=supy1n4Tev},
}
Figure