From Data Alignment to Parameter Generation: Few-Shot Cross-City Traffic Prediction with Conditional Diffusion
Authors: Shengchun Wang, Yuhang Lin, Tong Li, Pengyuan Zhou, Andy Chi Lok Tai, Wenjie Chen, Zhu Xiao, Zhu Han
Organizations: Hunan Normal University, China · Hunan University, China · Aarhus University, Denmark · The Hong Kong Polytechnic University, China · Central South University of Forestry and Technology, China · University of Houston, USA · Kyung Hee University, South Korea
Accurate mobile traffic forecasting is crucial for network service management, supporting proactive capacity provisioning, congestion mitigation, and energy-efficient operation. However, many cities and regions are data-scarce (e.g., newly deployed or poorly instrumented areas), thus making traffic prediction a few-shot learning problem and limiting the practicality of standard data-driven models. Existing cross-city solutions primarily rely on data-space alignment to match traffic distributions between data-rich and data-scarce cities, but such alignment is often brittle under real-world distribution shifts, measurement noise, and city-specific bias. To address these limitations, we propose a Conditional Diffusion-based Parameter Generation (CDPG) framework. Instead of aligning raw data, CDPG learns the conditional distribution of high-performing predictor parameters for source cities and directly generates node-specific model parameters for the target city. To support reliable adaptation for network traffic prediction, CDPG conditions parameter generation on multi-modal spatio-temporal context. Specifically, CDPG captures spatial environment cues by combining satellite imagery with large language model (LLM)-derived semantic descriptions, and summarizes complex temporal behaviors via unsupervised pattern clustering. These contextual components guide CDPG in producing parameters tailored to each base station's operational context, thereby improving robustness under cross-city and cross-region shifts. Extensive experiments on three large-scale datasets show that CDPG consistently outperforms state-of-the-art cross-city few-shot baselines by up to 9.72% on standard forecasting metrics and remains robust for few-shot multi-step prediction. The code is available at https://github.com/LingoodBoy/CDPG.
Figures & tables
Figure 1. Paradigm shift from a generic neural network to task-specific neural networks for different tasks. A comparison diagram showing the paradigm shift.
Figure 2. The flowchart of the CDPG framework. The flowchart of the CDPG framework.
Figure 3. Illustration of the denoising process and the corresponding network architecture. Illustration of the denoising process and the corresponding network architecture.
Figure 4. The workflow of the proposed LLM-Enhanced Spatial Context Extraction mechanism. The workflow of the proposed LLM-Enhanced Spatial Context Extraction mechanism.
Figure 5. The workflow of Pattern-Guided Temporal Context Extraction. The workflow of Pattern-Guided Temporal Context Extraction.
Dataset
Duration
Covered BSs
Satellite Images
Text Descriptions
Time Interval
Shanghai
Aug. 1st–31st, 2014
4,505
4,505
27,030
30 minutes
Nanjing
Feb. 2nd–Mar. 31st, 2021
8,000
8,000
48,000
30 minutes
Nanchang
July. 1st–7th, 2023
7,702
7,702
46,212
30 minutes
Table 1. Dataset Statistics.
Model
Step
Shanghai
Nanjing
Nanchang
MAE
RMSE
R 2
MAE
RMSE
R 2
MAE
RMSE
R 2
STGP
1
0.2421
0.3183
0.7589
0.2547
0.3718
0.7335
0.2336
0.3526
0.7532
3
0.2684
0.3584
0.7157
0.2881
0.4185
0.6894
0.2673
0.3903
0.7127
6
0.2695
0.3563
0.6984
0.2913
0.4329
0.6584
0.2622
0.4154
0.6841
UniST
1
0.2287
0.3006
0.7843
0.2405
0.3512
0.7564
0.2207
0.3331
0.7881
3
0.2422
0.3233
0.7454
0.2599
0.3776
0.7109
0.2412
0.3522
0.7353
Table 2. Comprehensive performance comparison of 1-step, 3-step, and 6-step prediction on three datasets. Best and second-best results are marked in bold and underlined .
Model
Shanghai
Nanjing
Nanchang
MAE
RMSE
R 2
MAE
RMSE
R 2
MAE
RMSE
R 2
w/o Condition
0.1963
0.2765
0.8413
0.2142
0.3278
0.8075
0.1895
0.3041
0.8665
w/o Temporal
0.1846
0.2542
0.8659
0.1975
0.3024
0.8362
0.1743
0.2748
0.8910
w/o Spatial
0.1891
0.2673
0.8517
0.2057
0.3146
0.8227
0.1792
0.2835
0.8840
CDPG-Image
0.1834
0.2549
0.8651
0.1983
0.2992
0.8396
0.1745
0.2726
0.8928
CDPG-LLM
0.1848
0.2601
0.8596
0.2015
0.3057
0.8326
0.1762
0.2743
0.8914
Table 3. Component and adaptation ablation study for 1-step-ahead prediction. Best and second-best results are marked in bold and underlined . All variants include target-city fine-tuning unless marked “w/o FT”.
LLM
Shanghai
Nanjing
Nanchang
MAE
RMSE
R 2
MAE
RMSE
R 2
MAE
RMSE
R 2
Llama-3.2-Vision (11B)
0.1904
0.2695
0.8492
0.2178
0.3274
0.8079
0.1812
0.2835
0.8840
Qwen3-VL (32B)
0.1856
0.2563
0.8636
0.2035
0.3027
0.8358
0.1748
0.2742
0.8915
Llama-3.2-Vision (90B)
0.1824
0.2528
0.8673
0.2013
0.2976
0.8413
0.1785
0.2764
0.8898
GPT-4o
0.1815
0.2522
0.8680
0.1974
0.2985
0.8404
0.1769
0.2813
0.8858
GPT-5
0.1793
0.2486
0.8717
0.1962
0.2958
0.8432
0.1715
0.2716
0.8935
Table 4. Performance comparison of LLM choice for 1-step-ahead prediction across three datasets. Best and second-best results are marked in bold and underlined .
Figure 6. Sensitivity analysis of key hyperparameters on MAE across three datasets (Task: 1-step-ahead prediction): (a) Number of temporal clusters, (b) Model dimension, (c) Model depth, and (d) Diffusion steps. Sensitivity analysis of key hyperparameters on MAE across three datasets (Task: 1-step-ahead prediction): (a) Number of temporal clusters, (b) Model dimension, (c) Model depth, and (d) Diffusion steps.
Target
Source
MAE
RMSE
R 2
SH
NC
0.1904
0.2685
0.8503
NJ
0.1882
0.2617
0.8578
NC + NJ
0.1786
0.2445
0.8759
NJ
SH
0.2035
0.3152
0.8220
NC
0.2051
0.3108
0.8269
SH + NC
0.1929
0.2875
0.8519
Table 5. Impact of source city diversity on 1-step-ahead prediction performance. SH: Shanghai; NJ: Nanjing; NC: Nanchang. Best results are marked in bold .
Figure 7. Comparison of prediction performance versus deployment model size for 1-step-ahead single-station traffic prediction across three datasets. The bubble size is proportional to the model size of each method. Comparison of prediction performance versus deployment model size for 1-step-ahead single-station traffic prediction across three datasets. The bubble size is proportional to the model size of each method.
Traffic prediction is fundamental to intelligent transportation systems and urban computing, yet many cities continue to suffer from traffic data scarcity due to limited sensor deployment and uneven urban development. Cross-city knowledge transfer has thus attracted increasing attention, enabling data-rich cities to assist data-scarce ones. However, centralized approaches raise privacy concerns, while existing federated methods struggle with pronounced spatiotemporal heterogeneity across cities. To address these challenges, we propose MoE-FedTP, a personalized federated cross-city spatiotemporal prediction framework based on lightweight Mixture-of-Experts (MoE) networks. MoE-FedTP first employs spatiotemporal neural networks to extract features from both source and target cities, then introduces a set of expert networks derived from different source cities through partial parameter sharing. A gating mechanism dynamically fuses the experts to capture diverse traffic dynamics, achieving fine-grained modeling of urban heterogeneity while preserving privacy. Experiments on four real-world traffic datasets show that MoE-FedTP consistently outperforms state-of-the-art cross-city and federated learning baselines, demonstrating its effectiveness in enhancing prediction accuracy for data-scarce cities.
Zhehao Dai, Xiao Han, Zhaolin Deng +4
Zhejiang University of Technology, Zhejiang Key Laboratory of Visual Information Intelligent Processing, Hangzhou · Jilin University, Jilin · City University of Hong Kong, Hong Kong SAR China
Accurate traffic flow prediction remains challenging in cross-city, data-scarce scenarios where limited historical data hinders model generalisation. The chaotic nature of traffic dynamics, complex spatio-temporal dependencies, and heterogeneous urban networks complicate few-shot learning across cities. Existing deep learning approaches either treat traffic as purely deterministic or lack mechanisms to model wave-like interference patterns essential for cross-regime traffic dynamics. To address these limitations, this paper proposes CIWI-CKT, a novel Chaos-Informed Wave Interference Feature Fusion framework with Cross-City Knowledge Transfer. Our framework introduces three core innovations: chaos-informed wave generation that extracts measurable chaos invariants and models traffic as adaptive wave components; meta-interference processing that captures wave interactions between support and query regimes while producing a predictability score for confidence estimation; and chaos-aware meta-learning that enables efficient cross-city knowledge transfer while preserving chaotic characteristics. We establish theoretical guarantees including chaos-to-wave stability, wave-induced dimension reduction, and meta-learning generalisation bounds. Extensive experiments on four real-world traffic datasets demonstrate that CIWI-CKT significantly outperforms state-of-the-art spatio-temporal graph learning, transfer learning, prompt-based, and few-shot methods, improving prediction accuracy while substantially reducing required training data.
Abdul Joseph Fofanah, Lian Wen, David Chen +1
School of Information and Communication Technology, Griffith University, Brisbane, 4111, Australia · School of Information Engineering, Chang’an University, Xi’an, China
Urban traffic flow prediction is a cornerstone of intelligent transportation systems, yet accurate forecasting under adverse weather conditions remains a significant challenge. Existing data-driven models, while effective for routine patterns, often struggle with the sparse data and complex non-linear shifts associated with rare meteorological events. These methods typically treat environmental contexts as shallow numerical features, failing to capture the underlying semantic reasoning-why and how specific adverse conditions alter mobility behaviors across regions with different functional compositions. To address this limitation, we propose Multi-STG, a unified framework that integrates Large Language Model (LLM)-derived semantic priors with graph-based spatiotemporal learning. Multi-STG introduces an LLM-empowered semantic enhancement module that transforms comprehensive context descriptions such as weather, POIs, and holidays into high-level semantic embeddings, effectively providing a knowledge-driven complement to data scarcity. Furthermore, we design a multimodal attentional fusion mechanism to dynamically weigh heterogeneous inputs and a semantic-enhanced prediction head with gated residual calibration to robustly adjust forecasts based on semantic guidance. Extensive experiments on real-world multi-city private car datasets demonstrate that Multi-STG outperforms state-of-the-art baselines, reducing MAE by 11.82% on average relative to the strongest baseline across three cities, while maintaining stable performance under sparse and non-stationary conditions.
Zhu Xiao, Kuan Feng, Tong Li +4
College of Computer Science and Electronic Engineering, the Ministry of Education Key Laboratory of “Fusion Computing of Supercomputing and Artificial Intelligence”, Hunan University, Changsha 410082, China. · Hong Kong Institute of Science & Innovation, Chinese Academy of Sciences, Hong Kong. · CETC Key Laboratory of Aerospace Information Applications, Shijiazhuang, China.