You are currently viewing a new version of our website. To view the old version click .
Applied Sciences
  • This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
  • Article
  • Open Access

3 December 2025

MMHFormer: Multi-Source and Multi-View Hierarchical Transformer for Traffic Flow Prediction

,
,
,
and
1
School of Computer Science and Engineering, Chongqing University of Science and Technology, Chongqing 400054, China
2
School of Electrical and Electronic Engineering, North China Electric Power University, Beijing 102206, China
*
Author to whom correspondence should be addressed.
This article belongs to the Special Issue Advanced Methods for Time Series Forecasting

Abstract

Traffic flow prediction is a vital component of Intelligent Transportation Systems (ITSs), playing a key role in proactive traffic management and the optimization of urban mobility. However, the complex spatial–temporal dependencies, dynamic variations, and external factors in traffic networks present significant challenges for accurate predictions. In this paper, we propose MMHFormer, a novel multi-source, multi-view hierarchical Transformer model specifically designed for traffic flow prediction. MMHFormer incorporates three key innovations: (1) a multi-source gated embedding layer that integrates diverse multidimensional inputs, including spatial Laplacian embeddings, temporal periodic embeddings, and traffic occupancy embeddings, to better capture the complex dynamics of traffic conditions; (2) a hierarchical multi-view spatial attention module that models global, local, and dynamic similarity-based spatial dependencies, effectively addressing the spatial heterogeneity of traffic flows; (3) a hierarchical two-stage temporal attention mechanism that captures global temporal dependencies while adapting to node-specific temporal variations. Extensive experiments conducted on four benchmark traffic datasets demonstrate that MMHFormer outperforms state-of-the-art methods, achieving significant improvements in prediction accuracy.

Article Metrics

Citations

Article Access Statistics

Article metric data becomes available approximately 24 hours after publication online.