An Adaptive Semantic Pattern Matching Transformer for Traffic Flow Prediction
Chen-yang Cao, Yin-Xin Bao, Weiwei Jiang, Quan Shi
Nantong University · Beijing University of Posts and Telecommunications
Abstract
Accurate traffic flow prediction is essential for intelligent transportation systems, yet most existing methods still forecast future traffic states mainly from the current historical input window and its derived representations. In real traffic systems, however, similar recent observations may correspond to different future evolutions under different latent traffic regimes, while short-term disturbances can further mislead input-local modeling. To address this issue, we propose an Adaptive Semantic Pattern Matching Transformer (ASPMformer) for traffic flow prediction. Rather than departing from the input-driven forecasting paradigm, ASPMformer complements it in three ways: a Context Embedding module enhances local semantic dependencies between adjacent time steps and reduces sensitivity to short-term fluctuations; an explicit spatiotemporal pattern repository enables the current input to be matched with reusable representative traffic patterns in both temporal and spatial dimensions; and a multi-granularity temporal modeling module enlarges the receptive field to capture long-range traffic trends. Extensive experiments on five public benchmark datasets, including PeMS03, PeMS04, PeMS07, PeMS08, and SZ-taxi, show that ASPMformer achieves competitive and consistent improvements over strong baselines. The results further suggest that the proposed pattern repository is particularly beneficial under heterogeneous and disturbance-prone traffic conditions, where relying solely on the current historical window is less sufficient. For the main content of the model, see https://github.com/ccy123q/ASPMformer.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- TSAformer: A Traffic Flow Prediction Model Based on Cross-Dimensional Dependency CaptureElectronics · 2026
- Multi-Perspective Spatio-Temporal Feature Fusion Model for Urban Traffic Flow Prediction.Sensors (Basel, Switzerland) · 2026
- Traffic Flow Prediction Model Based on Attention Mechanism Spatio-Temporal Graph Convolutional Network on U.S. HighwaysApplied Sciences · 2026
- A traffic flow forecasting model based on dynamic graph learning and temporally adaptive attentionSafety Science · 2025
- A Dynamic Fusion Large Language Model for Traffic Flow PredictionarXiv · 2026
- Cross-City Pretraining Transfer Learning Model for Traffic Flow PredictionIEEE Internet of Things Journal · 2026