# Pretraining-improved Spatiotemporal graph network for the generalization performance enhancement of traffic forecasting

**Authors:** Xiangyue Zhang, Chao Li, Ling Ji, Yuyun Kang, Mingming Pan, Zhuo Liu, Qiang Qi

PMC · DOI: 10.1038/s41598-025-11375-2 · Scientific Reports · 2025-07-29

## TL;DR

This paper introduces a new pre-training method for traffic forecasting that improves long-term predictions and reduces computational costs.

## Contribution

The novel ImPreSTDG method combines a Denoised Diffusion Probability Model and a Mamba module to enhance generalization and efficiency in traffic forecasting.

## Key findings

- Experiments show the model effectively handles long-term dependencies and missing data.
- The Mamba module reduces computational costs while maintaining accuracy.
- The pre-training method outperforms existing models on real-world traffic datasets.

## Abstract

Traffic forecasting is considered a cornerstone of smart city development. A key challenge is capturing the long-term spatiotemporal dependencies of traffic data while improving the model’s generalization ability. To address these issues, various sophisticated modules are embedded into different models. However, this approach increases the computational cost of the model. Additionally, adding or replacing datasets in a trained model requires retraining, which decreases prediction accuracy and increases time cost. To address the challenges faced by existing models in handling long-term spatiotemporal dependencies and high computational costs, this study proposes an enhanced pre-training method called the Improved Spatiotemporal Diffusion Graph (ImPreSTDG). While existing traffic prediction models, particularly those based on Graph Convolutional Networks (GCNs) and deep learning, are effective at capturing short-term spatiotemporal dependencies, they often experience accuracy degradation and increased computational demands when dealing with long-term dependencies. To overcome these limitations, we introduce a Denoised Diffusion Probability Model (DDPM) as part of the pre-training process, which enhances the model’s ability to learn from long-term spatiotemporal data while significantly reducing computational costs. During the pre-training phase, ImPreSTDG employs a data masking and recovery strategy, with DDPM facilitating the reconstruction of masked data segments, thereby enabling the model to capture long-term dependencies in the traffic data. Additionally, we propose the Mamba module, which leverages the Selective State Space Model (SSM) to effectively capture long-term multivariate spatiotemporal correlations. This module enables more efficient processing of long sequences, extracting essential patterns while minimizing computational resource consumption. By improving computational efficiency, the Mamba module addresses the challenge of modeling long-term dependencies without compromising accuracy in capturing extended spatiotemporal trends. In the fine-tuning phase, the decoder is replaced with a forecasting header, and the pre-trained parameters are frozen. The forecasting header includes a meta-learning fusion module and a spatiotemporal convolutional layer, which facilitates the integration of both long-term and short-term traffic data for accurate forecasting. The model is then trained and adapted to the specific forecasting task. Experiments conducted on three real-world traffic datasets demonstrate that the proposed pre-training method significantly enhances the model’s ability to handle long-term dependencies, missing data, and high computational costs, providing a more efficient solution for traffic prediction.

## Full-text entities

- **Diseases:** SSM (MESH:D004195), STSSN (MESH:D010855), STGNN (MESH:D015441)
- **Chemicals:** CYY-TD-2022-004 (-)
- **Species:** Homo sapiens (human, species) [taxon 9606], Pseudomonas sp. AN (species) [taxon 534632]
- **Cell lines:** PeMS04 — Homo sapiens (Human), Melanoma, Cancer cell line (CVCL_S856)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12307734/full.md

## Figures

15 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12307734/full.md

## References

4 references — full list in the complete paper: https://tomesphere.com/paper/PMC12307734/full.md

---
Source: https://tomesphere.com/paper/PMC12307734