Abstract
UrbanGPT is a novel spatio-temporal large language model designed to predict urban phenomena like traffic flow and crime rates with minimal data. By integrating a dedicated spatio-temporal encoder with an instruction-tuning paradigm, it achieves superior zero-shot generalization, outperforming traditional models in scenarios where no prior training data for a specific region or city exists.
Introduction
Predicting urban dynamics—such as traffic congestion, bike-sharing demand, or crime hotspots—is fundamental to smart city infrastructure. Traditional spatio-temporal (ST) models, typically based on Graph Neural Networks (GNNs) or Recurrent Neural Networks (RNNs), are notoriously "data-hungry," requiring extensive labeled historical data for every new deployment region. In real-world scenarios, sensors are costly, and data is often scarce or missing for new urban areas. While Large Language Models (LLMs) offer powerful reasoning capabilities, they struggle with raw numerical time-series and complex spatial inter-dependencies. UrbanGPT addresses this gap by enabling LLMs to effectively "see" and "reason" about spatio-temporal data.
Methodology
UrbanGPT seamlessly connects spatio-temporal signals with the linguistic space of an LLM (specifically Vicuna-7b). The architecture is built upon three pillars:
- Spatio-Temporal Dependency Encoder: To avoid the limitations of fixed graph structures in zero-shot settings, UrbanGPT employs a Gated Dilated Temporal Convolutional Network (TCN) to capture multi-level temporal patterns and dependencies across different time resolutions.
- Spatio-Temporal Instruction-Tuning: The model processes instructions that combine textual context (e.g., region descriptions) with aligned ST tokens. A projection layer maps the ST encoder's output into the LLM’s hidden dimension, represented by tokens like
<ST_HIS>(history) and<ST_PRE>(prediction). - Regression Head: To overcome "LLM math" errors that occur when models attempt to output numbers as text strings, UrbanGPT uses a dedicated regression layer to transform hidden representations of prediction tokens into precise numerical forecasts.
Experimental Evaluation
The model was evaluated on four datasets: NYC-Taxi, NYC-Bike, NYC-Crime, and CHI-Taxi (used for cross-city zero-shot testing). UrbanGPT consistently outperformed state-of-the-art baselines like STGCN, GWN, and MTGNN, particularly in scenarios where no prior training data was available for the target city.
Key Results
- Zero-Shot Accuracy: In NYC-Taxi inflow prediction, UrbanGPT achieved a Mean Absolute Error (MAE) of 6.16, significantly lower than the best baseline (ASTGCN) at 9.75.
- Cross-City Generalization: When trained on NYC and tested on Chicago (CHI-Taxi), UrbanGPT maintained its lead, proving it learns universal urban patterns rather than city-specific layouts.
- Robustness: The model excels in high-variance regions, such as busy commercial centers, where traditional models often fail to capture volatile spikes.
Conclusion
UrbanGPT represents a significant advancement in urban computing by bridging the gap between LLMs and spatio-temporal dynamics. By leveraging semantic synergy—using LLM world knowledge to interpret regional characteristics—and a graph-free architecture, it provides a robust solution for data-scarce urban environments. Future work will focus on increasing data diversity and improving the interpretability of the model's decision-making process.
Summary updated