Introduction
Urban transportation systems present a unique modeling challenge due to the intricate interplay between spatial dependencies (e.g., how traffic in one neighborhood cascades to another) and temporal patterns (e.g., rush hours, holidays, and weather). Current research typically falls into two camps: task-specific deep learning models like Graph Neural Networks (GNNs), which handle structured data well but lack generalization, and Large Language Models (LLMs), which possess high-level reasoning but struggle with the precision required for raw numerical spatiotemporal data.
TransLLM addresses this gap by introducing a unified foundation framework that handles heterogeneous inputs and diverse task objectives—ranging from regression-based forecasting to optimization-based vehicle dispatch—without the precision loss typical of text-based tokenization.
Methodology
TransLLM utilizes a hybrid architecture that integrates a lightweight spatiotemporal encoder with a Large Language Model. The framework is characterized by four primary components:
- Spatio-Temporal (ST) Encoder: Instead of feeding raw numbers directly to the LLM, a dedicated encoder using Dilated Temporal Convolutional Networks (TCN) and Graph Attention Networks (GAT) extracts features from physical and semantic graphs.
- RL-based Prompt Personalization: This core innovation uses an Actor-Critic reinforcement learning mechanism to dynamically "route" the most effective sentence components into functional slots (History, Context, Encoding, and Reasoning). This allows the model to adapt its reasoning strategy for every specific input instance.
- Textual-Spatiotemporal Alignment: The framework employs placeholder tokens (e.g.,
<st_patch>) to inject ST-encoder embeddings directly into the LLM’s input space, bypassing lossy text-based tokenization. - Multi-task Output Layers: Specialized regression and optimization heads project the LLM's internal representations back into continuous values, avoiding discretization errors.
Datasets and Evaluation
The framework was evaluated across seven diverse datasets covering three major urban tasks:
- Traffic Forecasting: LargeST-SD (San Diego) and PEMS08 (California).
- EV Charging Demand: ST-EVCDP (Shenzhen) and UrbanEV.
- Taxi Dispatching: Taxi-SH (Shanghai).
- Zero-Shot Generalization: PEMS03 and PEMS04 were used to test performance on unseen cities.
Key Results and Insights
TransLLM demonstrated significant performance gains across all benchmarks. On the UrbanEV dataset, it achieved an 83.7% improvement in Mean Absolute Error (MAE) over the strongest small-scale baseline. In taxi dispatching, the model improved the Mean Matching Rate (MMR) by 5% while reducing empty travel distance by 0.71 km.
Crucially, the model's zero-shot capabilities were evident on the PEMS03 dataset, where it outperformed the previous state-of-the-art (UrbanGPT) by 18.7% in MAE. This suggests that learning universal spatiotemporal patterns via a natural language interface allows for superior knowledge transfer between geographic regions.
Ablation studies (Figure 6) highlight the necessity of each component. Removing the Prompt Router (PR) or the ST-Encoder (STE) leads to a marked increase in error metrics, confirming that the synergy between structured encoding and dynamic prompting is vital for handling complex urban data.
Limitations and Future Work
While powerful, TransLLM involves a complex two-stage training process that is computationally intensive. Additionally, performance gains were more modest on datasets with high volatility and weak periodicity (e.g., ST-EVCDP), indicating that highly stochastic human behavior remains a challenge. Future research will focus on integrating larger foundation models and incorporating external data sources like real-time weather and social media events to further refine the prompt routing logic.
Summary updated