Abstract
Spatiotemporal traffic flow prediction is a fundamental task in intelligent transportation systems and is crucial for promoting efficient and sustainable urban mobility, especially under increasingly complex and rapidly evolving traffic conditions. To overcome the challenges of modeling high-order spatial dependencies and heterogeneous temporal patterns, this study develops a novel Hierarchical Spatiotemporal Graph–Hypergraph Network (HSTGHN). For spatial representation learning, a hypergraph neural module is employed to capture high-order interactions across the road network, while a hypernode mechanism is designed to characterize complex correlations among multiple road segments. Furthermore, an adaptive adjacency matrix is constructed in a data-driven manner and enriched with prior knowledge of bidirectional traffic flows, thereby enhancing the robustness and accuracy of graph structural representations. For temporal modeling, HSTGHN integrates the complementary strengths of Gated Recurrent Units (GRUs) and Transformers: GRUs effectively capture local sequential dependencies, whereas Transformers excel at modeling global dynamic patterns. This joint mechanism enables comprehensive learning of both short-term and long-term temporal dependencies. Extensive experiments on multiple benchmark datasets demonstrate that HSTGHN consistently outperforms state-of-the-art baselines in terms of prediction accuracy and stability, with particularly significant improvements in long-term forecasting and highly dynamic traffic scenarios. These improvements provide more reliable decision support for intelligent transportation systems, contributing to enhanced traffic efficiency, reduced congestion, and ultimately more sustainable urban mobility.