Interleaved Spatial-Temporal Attention Aggregation Gated Transformer for Traffic Flow Prediction
摘要
Traffic flow prediction constitutes a crucial component in urban planning and the optimization of intelligent transportation systems. Attention-based models for traffic flow prediction within grid-based spatial partitioning frameworks might face challenges including insufficient learning of potential important local patterns during feature learning and underutilizing intermediate computational information. To address these problems, we propose ISTAFormer (Interleaved Spatial-Temporal Attention Aggregation Gated Transformer), which employs interleaved temporal-view and spatial-view gated transformer blocks (GTB) to effectively learn the spatiotemporal features. It incorporates an all-layer results weighted aggregation mechanism which allows the model to reuse the intermediate results that have learned local features to address potential local feature loss. In addition, this paper constructs a new real-world dataset of shared bicycles in Beijing, BikeBJ-7days, and analyzes its spatial and temporal features. The experimental results demonstrate that ISTAFormer successfully captures the local features in BikeBJ-7days that many baselines not capture correctly. Compared to the best-performing baseline, ISTAFormer reduces the mean squared error by 21.75% on TaxiBJ and 7.15% on BikeBJ-7days. ISTAFormer achieves the state-of-the-art (SOTA) performance on both TaxiBJ and BikeBJ-7days, which indicate that ISTAFormer has excellent prediction effect and generalization performance across datasets with different characteristics.