A Large Language Model for Traffic Flow Prediction Based on Stationary Wavelet Transform and Graph Convolutional Networks
Abstract
1. Introduction
- (1)
- This study proposes an innovative prediction model that integrates wavelet transform and GCN into LLMs to boost the model’s capacity to handle traffic prediction tasks.
- (2)
- Building on the wavelet transform, the model enhances the temporal features of the input sub-signals through LSTM, enabling the WGLLM to model the spatiotemporal feature interactions across different traffic data types.
- (3)
- We conducted experiments on the public Citi Historical Bike Dataset (CHBike) and New York City taxi dataset (NYCTaxi), and the results verify the outstanding performance of the WGLLM. Additionally, a series of ablation studies were performed to validate the incorporation of wavelet transforms, and GCNs significantly improve the model performance.
2. Materials and Methods
2.1. Problem Definition
2.2. WGLLM Architecture Design
2.3. Spatiotemporal Embedding and Fusion
3. Result
3.1. Dataset
3.2. Experimental Setup
3.3. Evaluation Metrics
3.4. Comparison of Experimental Results
- AGCRN [32]: a graph convolutional recurrent network with adaptive mechanisms that integrates node-wise learning and the deduction of inter-traffic-sequence mutual dependencies.
- STG-NCDE [33]: this method proposes a graph neural network-driven differential equation for processing sequence data.
- ASTGCN: a spatiotemporal graph convolutional framework incorporating attention mechanisms to predict traffic conditions.
- GMAN [34]: a prediction model with attention mechanisms based on the encoder–decoder framework.
- ASTGN [35]: a model integrated with attention mechanisms for learning the dynamics and heterogeneity inherent in traffic data.
- STSGCN: a model adopting a spatiotemporal synchronous modeling mechanism: it captures local spatiotemporal correlations and designs multiple time-period-specific modules to model the heterogeneity of local spatiotemporal graphs.
- OFA [29]: constructs a unified framework by freezing the core layers of pre-trained language/vision models, achieving state-of-the-art or comparable performance across diverse time-series analysis tasks including classification, long- and short-term prediction, imputation, anomaly detection, and few-shot/zero-shot learning.
- GATGPT [36]: integrates a graph attention network (GAT) with a pre-trained large language model for spatiotemporal data imputation, enabling joint modeling of non-Euclidean spatial structural features and long-range sequential dependencies.
3.5. Ablation Experiments
- (1)
- ”wo-ST”: A variant of WG-LLM with the spatiotemporal embedding module removed.
- (2)
- ”wo-TE”: A variant of WG-LLM with the temporal embedding module removed.
- (3)
- ”wo-SE”: A variant of WG-LLM with the spatial embedding module removed.
- (4)
- ”wo-GP”: A variant of WG-LLM with the large language model module removed.
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ammar, H.; Yılmaz, Y. Deep reinforcement learning for intelligent transportation systems: A survey. IEEE Trans. Intell. Transp. Syst. 2022, 23, 11–32. [Google Scholar]
- Yin, X.; Wu, G.; Wei, J.; Shen, Y.; Qi, H.; Yin, B. Deep learning on traffic prediction: Methods, analysis, and future directions. IEEE Trans. Intell. Transp. Syst. 2021, 23, 4927–4943. [Google Scholar] [CrossRef]
- Liu, G.; Long, W.; Wang, J.; Gao, P. Improving the throughput of transportation networks with a time-optimization routing strategy. Int. J. Geogr. Inf. Sci. 2018, 32, 1815–1836. [Google Scholar] [CrossRef]
- Du, Y.; Liu, G.; Jiang, Y.; Cai, S.; He, J. Adaptive congestion index-based A* algorithm for dynamic vehicle path planning optimization. Phys. A: Stat. Mech. Its Appl. 2025, 672, 130702. [Google Scholar] [CrossRef]
- Du, Y.; Liu, G.; Jiang, Y.; Si, Z.; He, J. Analysis of urban traffic flow characteristics considering driving behavior. Transp. Plan. Technol. 2025, 1–19. [Google Scholar] [CrossRef]
- Tian, T.; Liu, G.; Hu, X.; Bian, D. Traffic behavior analysis of the urban expressway ramp based on continuous cellular automata. Phys. A Stat. Mech. Its Appl. 2024, 633, 129418. [Google Scholar] [CrossRef]
- Cai, S.; Liu, G.; He, J.; Du, Y.; Si, Z.; Jiang, Y. Temporal-Spatial Traffic Flow Prediction Model Based on Prompt Learning. ISPRS Int. J. Geo-Inf. 2025, 14, 11. [Google Scholar] [CrossRef]
- Williams, B.M.; Durvasula, P.K.; Brown, D.E. Urban Freeway Traffic Flow Prediction: Application of Seasonal Autoregressive Integrated Moving Average and Exponential Smoothing Models. Transp. Res. Rec. 1998, 1664, 132–141. [Google Scholar] [CrossRef]
- Ahmed, M.S.; Cook, A.R. Analysis of Freeway Traffic Time-Series Data by Using Box-Jenkins Techniques. Transp. Res. Rec. 1979, 733, 1–9. [Google Scholar]
- Williams, B.M. Multivariate Vehicular Traffic Flow Prediction: Evaluation of ARIMAX Modeling. Transp. Res. Rec. 2001, 1776, 194–200. [Google Scholar] [CrossRef]
- Okutani, I.; Stephanedes, Y.J. Dynamic Prediction of Traffic Volume through Kalman Filtering Theory. Transp. Res. Part B Methodol. 1984, 18, 1–11. [Google Scholar] [CrossRef]
- Davis, G.A.; Nihan, N.L. Nonparametric Regression and Short-Term Freeway Traffic Forecasting. J. Transp. Eng. 1991, 117, 178–188. [Google Scholar] [CrossRef]
- Vanajakshi, L.; Rilett, L.R. A comparison of the performance of artificial neural networks and support vector machines for the prediction of traffic speed. In Proceedings of the IEEE Intelligent Vehicles Symposium, Parma, Italy, 14–17 June 2004; pp. 194–199. [Google Scholar]
- Wu, C.; Ho, J.; Lee, D. Travel-Time Prediction with Support Vector Regression. IEEE Trans. Intell. Transp. Syst. 2004, 5, 276–281. [Google Scholar] [CrossRef]
- Wang, Y.; Gao, Z.; Long, M.; Wang, J.; Philip, S.Y. PredRNN++: Towards A Resolution of the Deep-in-Time Dilemma in Spatiotemporal Predictive Learning. In Proceedings of the International Conference on Machine Learning, Stockholm, Sweden, 10–15 July 2018; pp. 5123–5132. [Google Scholar]
- Lin, Z.; Li, M.; Zheng, Z.; Cheng, Y.; Yuan, C. Self-attention convlstm for spatiotemporal prediction. Proc. AAAI Conf. Artif. Intell. 2020, 34, 11531–11538. [Google Scholar] [CrossRef]
- Zhao, Z.; Chen, W.; Wu, X.; Chen, P.C.; Liu, J. LSTM network: A deep learning approach for short-term traffic forecast. IET Intell. Transp. Syst. 2017, 11, 68–75. [Google Scholar] [CrossRef]
- Zhang, Q.; Zhou, L.; Su, Y.; Xia, H.; Xu, B. Gated Recurrent Unit Embedded with Dual Spatial Convolution for Long-Term Traffic Flow Prediction. ISPRS Int. J. Geo-Inf. 2023, 12, 366. [Google Scholar] [CrossRef]
- Ranjan, N.; Bhandari, S.; Zhao, H.; Kim, H.; Khan, P. City-wide traffic congestion prediction based on CNN, LSTM and transpose CNN. IEEE Access 2020, 8, 81606–81620. [Google Scholar] [CrossRef]
- Zhang, W.; Yu, Y.; Qi, Y.; Shu, F.; Wang, Y. Short-term traffic flow prediction based on spatio-temporal analysis and CNN deep learning. Transp. A Transp. Sci. 2019, 15, 1688–1711. [Google Scholar] [CrossRef]
- Zhao, L.; Song, Y.; Zhang, C.; Liu, Y.; Wang, P.; Lin, T.; Deng, M.; Li, H. T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction. IEEE Trans. Intell. Transp. Syst. 2020, 21, 3848–3858. [Google Scholar] [CrossRef]
- Yu, B.; Yin, H.; Zhu, Z. Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. In Proceedings of the 27th International Joint Conferences on Artificial Intelligence, Stockholm, Sweden, 15–21 August 2018; pp. 3634–3640. [Google Scholar] [CrossRef]
- Guo, S.; Lin, Y.; Feng, N.; Song, C.; Wan, H. Attention based spatial-temporal graph convolutional networks for traffic flow forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, pp. 922–929. [Google Scholar] [CrossRef]
- Song, C.; Lin, Y.; Guo, S.; Wan, H. Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting. Proc. AAAI Conf. Artif. Intell. 2020, 34, 914–921. [Google Scholar] [CrossRef]
- Hu, E.; Shen, Y.; Wallis, P.; Allen-Zhu, Z.; Li, Y.; Wang, S.; Wang, L.; Chen, W. LoRA: Low-Rank Adaptation of Large Language Models. In Proceedings of the International Conference on Learning Representations, Online, 25–29 April 2022. [Google Scholar]
- Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language models are unsupervised multitask learners. OpenAI Blog 2019, 1, 8. [Google Scholar]
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.; Djariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. In Proceedings of the 34th International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 6–12 December 2020; pp. 1877–1901. [Google Scholar]
- Achiam, J.; Adler, S.; Agarwal, S.; Ahmad, L.; Akkaya, I.; Aleman, F.L.; Almeida, D.; Altenschmidt, J.; Altman, S.; Anadkat, S.; et al. Gpt-4 Technical Report. arXiv 2023, arXiv:2303.08774. [Google Scholar] [CrossRef]
- Zhou, T.; Niu, P.; Wang, X.; Sun, L.; Jin, R. One fits all: Power general time series analysis by pretrained lm. In Proceedings of the 37th Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2024; pp. 43322–43355. [Google Scholar]
- Walden, A.T.; Cristan, A.C. The phase-corrected undecimated discrete wavelet packet transform and its application to interpreting the timing of events. Proc. R. Soc. A Math. Phys. Eng. Sci. 1998, 454, 2243–2266. [Google Scholar] [CrossRef]
- Lu, K.; Grover, A.; Abbeel, P.; Mordatch, I. Pretrained transformers as universal computation engines. Proc. AAAI Conf. Artif. Intell. 2022, 36, 7628–7636. [Google Scholar] [CrossRef]
- Bai, L.; Yao, L.; Li, C.; Wang, X.; Wang, C. Adaptive graph convolutional recurrent network for traffic forecasting. In Proceedings of the 34th International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 6–12 December 2020; pp. 17804–17815. [Google Scholar]
- Choi, J.; Choi, H.; Hwang, J.; Park, N. Graph neural controlled differential equations for traffic forecasting. Proc. AAAI Conf. Artif. Intell. 2022, 36, 6367–6374. [Google Scholar] [CrossRef]
- Zheng, C.; Fan, X.; Wang, C.; Qi, J. Gman: A graph multi-attention network for traffic prediction. Proc. AAAI Conf. Artif. Intell. 2020, 34, 1234–1241. [Google Scholar] [CrossRef]
- Guo, S.; Lin, Y.; Wan, H.; Li, X.; Cong, G. Learning dynamics and heterogeneity of spatial-temporal graph data for traffic forecasting. IEEE Trans. Knowl. Data Eng. 2022, 34, 5415–5428. [Google Scholar] [CrossRef]
- Chen, Y.; Wang, X.; Xu, G. Gatgpt: A pre-trained large language model with graph attention network for spatiotemporal imputation. arXiv 2023, arXiv:2311.14332. [Google Scholar] [CrossRef]
- Wiles, O.; Gowal, S.; Stimberg, F.; Alvise-Rebuffi, S.; Ktena, I.; Dvijotham, K.; Cemgil, T. A fine-grained analysis on distribution shift. In Proceedings of the International Conference on Learning Representations, Online, 25–29 April 2022. [Google Scholar]
- Koh, P.W.; Sagawa, S. Wilds: A benchmark of in-the-wild distribution shifts. In Proceedings of the International Conference on Machine Learning, New York, NY, USA, 18–24 July 2021; pp. 5637–5664. [Google Scholar]
- Chen, M.; Goel, K.; Sohoni, N.S.; Poms, F.; Fatahalian, K.; Ré, C. Mandoline: Model evaluation under distribution shift. In Proceedings of the International Conference on Machine Learning, New York, NY, USA, 18–24 July 2021; pp. 1617–1629. [Google Scholar]
- Gibbs, I.; Candes, E. Adaptive conformal inference under distribution shift. In Proceedings of the 35th Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 6–14 December 2021; pp. 1660–1672. [Google Scholar]
- Li, Y.; Yu, R.; Shahabi, C.; Liu, Y. Diffusion convolutional recurrent neural network: Data-driven traffic forecasting. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Zhang, C. Graph WaveNet for deep spatial-temporal graph modeling. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, Macao, China, 10–16 August 2019; pp. 1907–1913. [Google Scholar]
- Li, Y.; Sun, Z.; Du, C.; Jiang, Z.; Xia, Y. Wavelet Decomposition Self-Supervised Neural Networks for Traffic Flow Forecasting. In Proceedings of the 2024 43rd Chinese Control Conference (CCC); IEEE: New York, NY, USA, 2024; pp. 6550–6555. [Google Scholar]
- Ouyang, L.; Zhu, F.; Xiong, G.; Zhao, H.; Wang, F.; Liu, T. Short-term traffic flow forecasting based on wavelet transform and neural network. In Proceedings of the 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC); IEEE: New York, NY, USA, 2017. [Google Scholar]
- Liu, C.; Yang, S.; Xu, Q.; Li, Z.; Long, C.; Li, Z.; Zhao, R. Spatial-temporal large language model for traffic prediction. In Proceedings of the 2024 25th IEEE International Conference on Mobile Data Management (MDM); IEEE: New York, NY, USA, 2024. [Google Scholar]







| Hyperparameter | Value |
|---|---|
| Epochs | 500 |
| Learning rate | 0.01 |
| Dropout | 0.001 |
| Weight decay | 0.0001 |
| Channels | 64 |
| Batch size | 64 |
| Output lengths | 12 |
| Es patience | 50 |
| Dataset | NYCTaxi Pick-Up | NYCTaxi Drop-Off | CHBike Pick-Up | CHBike Drop-Off | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Metric | MAE | RMSE | MAPE | WAPE | MAE | RMSE | MAPE | WAPE | MAE | RMSE | MAPE | WAPE | MAE | RMSE | MAPE | WAPE |
| ASTGCN | 7.43 | 13.84 | 47.96% | 28.04% | 6.98 | 14.70 | 45.48% | 26.60% | 2.76 | 4.45 | 64.23% | 55.71% | 2.79 | 4.20 | 69.88% | 56.49% |
| ASTGNN | 5.90 | 10.71 | 40.15% | 22.32% | 6.28 | 12.00 | 49.78% | 23.97% | 2.37 | 3.67 | 60.08% | 47.81% | 2.24 | 3.35 | 57.21% | 45.27% |
| GMAN | 5.43 | 9.47 | 34.39% | 20.42% | 5.09 | 8.95 | 35.00% | 19.33% | 2.20 | 3.35 | 57.34% | 44.06% | 2.09 | 3.00 | 54.82% | 42.00% |
| STSGCN | 6.19 | 11.14 | 39.67% | 25.37% | 5.62 | 10.21 | 37.92% | 22.59% | 2.36 | 3.73 | 58.17% | 50.09% | 2.73 | 4.50 | 57.89% | 54.10% |
| AGCRN | 5.79 | 10.11 | 40.40% | 21.93% | 5.45 | 9.56 | 40.67% | 20.81% | 2.16 | 3.46 | 56.35% | 43.69% | 2.06 | 3.19 | 51.91% | 41.78% |
| STGNCDE | 6.24 | 11.25 | 43.20% | 23.46% | 5.38 | 9.74 | 40.45% | 21.37% | 2.15 | 3.97 | 55.49% | 61.38% | 2.28 | 3.42 | 60.96% | 46.06% |
| OFA | 5.81 | 10.40 | 36.65% | 22.00% | 5.58 | 10.12 | 37.37% | 21.36% | 2.04 | 3.23 | 53.55% | 41.70% | 1.94 | 2.91 | 50.68% | 39.29% |
| GATGPT | 5.90 | 10.53 | 37.83% | 22.39% | 5.64 | 10.33 | 37.36% | 21.60% | 2.05 | 3.23 | 53.54% | 41.70% | 1.93 | 2.88 | 50.20% | 39.04% |
| WGLLM | 5.33 | 9.43 | 36.01% | 20.18% | 5.04 | 9.23 | 33.03% | 19.25% | 2.02 | 3.14 | 52.91% | 40.76% | 1.92 | 2.86 | 50.80% | 38.98% |
| Dataset | CHBike Pick-Up | CHBike Drop-Off | ||||||
|---|---|---|---|---|---|---|---|---|
| Metric | MAE | RMSE | MAPE | WAPE | MAE | RMSE | MAPE | WAPE |
| wo-ST | 2.20 | 3.35 | 57.34% | 44.06% | 2.09 | 3.00 | 54.82% | 42.00% |
| wo-TE | 2.36 | 3.73 | 58.17% | 50.09% | 2.73 | 4.50 | 57.89% | 54.10% |
| wo-SE | 2.16 | 3.46 | 56.35% | 43.69% | 2.06 | 3.19 | 51.91% | 41.78% |
| wo-GP | 2.15 | 3.97 | 55.49% | 61.38% | 2.28 | 3.42 | 60.96% | 46.06% |
| WGLLM | 2.02 | 3.14 | 52.91% | 40.76% | 1.92 | 2.86 | 50.80% | 38.98% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the International Society for Photogrammetry and Remote Sensing. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wang, X.; Liu, G.; He, J.; Zhou, X.; Luo, Z. A Large Language Model for Traffic Flow Prediction Based on Stationary Wavelet Transform and Graph Convolutional Networks. ISPRS Int. J. Geo-Inf. 2026, 15, 166. https://doi.org/10.3390/ijgi15040166
Wang X, Liu G, He J, Zhou X, Luo Z. A Large Language Model for Traffic Flow Prediction Based on Stationary Wavelet Transform and Graph Convolutional Networks. ISPRS International Journal of Geo-Information. 2026; 15(4):166. https://doi.org/10.3390/ijgi15040166
Chicago/Turabian StyleWang, Xin, Gang Liu, Jing He, Xiangbing Zhou, and Zhiyong Luo. 2026. "A Large Language Model for Traffic Flow Prediction Based on Stationary Wavelet Transform and Graph Convolutional Networks" ISPRS International Journal of Geo-Information 15, no. 4: 166. https://doi.org/10.3390/ijgi15040166
APA StyleWang, X., Liu, G., He, J., Zhou, X., & Luo, Z. (2026). A Large Language Model for Traffic Flow Prediction Based on Stationary Wavelet Transform and Graph Convolutional Networks. ISPRS International Journal of Geo-Information, 15(4), 166. https://doi.org/10.3390/ijgi15040166

