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.