DWAFM: Dynamic Weighted Graph Structure Embedding Integrated with Attention and Frequency-Domain MLPs for Traffic Forecasting
Authors: Sen Shi, Zhichao Zhang, Yangfan He
Organizations: School of Mathematics and Statistics, Nanjing University of Information Science and Technology, Nanjing 210044, China · Hubei Key Laboratory of Applied Mathematics, Hubei University, Wuhan 430062, China · Key Laboratory of System Control and Information Processing, Ministry of Education, Shanghai Jiao Tong University, Shanghai 200240, China · School of Communication and Artificial Intelligence, School of Integrated Circuits, Nanjing Institute of Technology, Nanjing 211167, China · Jiangsu Province Engineering Research Center of IntelliSense Technology and System, Nanjing 211167, China
Accurate traffic prediction is a key task for intelligent transportation systems. The core difficulty lies in accurately modeling the complex spatial-temporal dependencies in traffic data. In recent years, improvements in network architecture have failed to bring significant performance enhancements, while embedding technology has shown great potential. However, existing embedding methods often ignore graph structure information or rely solely on static graph structures, making it difficult to effectively capture the dynamic associations between nodes that evolve over time. To address this issue, this letter proposes a novel dynamic weighted graph structure (DWGS) embedding method, which relies on a graph structure that can truly reflect the changes in the strength of dynamic associations between nodes over time. By first combining the DWGS embedding with the spatial-temporal adaptive embedding, as well as the temporal embedding and feature embedding, and then integrating attention and frequency-domain multi-layer perceptrons (MLPs), we design a novel traffic prediction model, termed the DWGS embedding integrated with attention and frequency-domain MLPs (DWAFM). Experiments on five real-world traffic datasets show that the DWAFM achieves better prediction performance than some state-of-the-arts.
Figures & tables
Fig. 1: The overview of the proposed DWAFM.
Fig. 2: Learning mechanism of dynamic weighted adjacency matrix.
Datasets
Metric
HI
STGCN
GWNet
StemGNN
STNorm
STID
DGCRN
MegaCRN
STWave
STAEformer
DFDGCN
DWAFM
PEMS08
MAE
34.66
16.86
14.42
16.08
15.47
14.21
14.90
14.87
13.78
13.69
14.21
13.57
RMSE
50.54
26.10
23.38
25.49
25.13
23.36
23.76
23.87
23.68
23.06
23.45
22.94
MAPE
21.63
11.62
9.33
10.19
9.93
9.38
10.17
9.58
9.36
9.03
9.37
8.92
PEMS04
MAE
42.35
19.89
18.76
21.01
18.90
18.46
18.96
18.83
18.28
18.21
18.62
18.14
RMSE
61.66
31.59
30.19
32.96
30.50
29.98
30.77
30.54
29.98
30.57
30.01
29.72
MAPE
29.22
13.61
13.06
14.51
13.00
12.55
12.87
12.83
12.25
12.21
12.94
12.37
TABLE I: Performance Comparison of Baselines and Proposed DWAFM on Five Popular used Real-world Traffic Datasets.
Fig. 3: Ablation study on PEMS08 and PEMSD7(M).
Fig. 4: Hyperparameter study and computational cost analysis on PEMS08.
Fig. 5: Visualization of learned dynamic weighted adjacency matrix.
Models
Metric (PEMS08)
Metric (PEMSD7(M))
MAE
RMSE
MAPE
Time/s
MAE
RMSE
MAPE
Time/s
CNN
13.83
23.70
9.16
26.63
2.60
5.27
6.51
19.48
Attention
13.85
23.54
9.14
26.85
2.73
5.26
6.91
23.40
Fre-MLPs
13.57
22.94
8.92
26.71
2.59
5.24
6.40
19.53
TABLE II: Performance Comparison of Different Temporal Modeling Modules.
Fig. 6: Visualization of real traffic forecasting results.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Datasets
Nodes
Length
Sample Rate
Type
PEMS08
170
17856
5 min
Traffic flow
PEMS04
307
16992
5 min
Traffic flow
PEMS03
358
26208
5 min
Traffic flow
PEMSD7(M)
228
12672
5 min
Traffic speed
PEMSD7(L)
1026
12672
5 min
Traffic speed
Appendix
TABLE I : Statistics of Datasets.
Models
Pre-defined
Graph
S-T
Core Architecture
Graph
Dynamicity
Embed.
Spatial
Temporal
STGCN
✓
Static
-
GCN
CNN
GWNet
✓
Static
-
GCN
CNN
StemGNN
-
Static
-
GCN
CNN
STID
-
-
✓
MLP
MLP
DGCRN
✓
Dynamic
-
GCN
RNN
Appendix
TABLE II : Comparison of Graph Construction and Spatial-Temporal Modules Among Different Models.
Fig. 1 : Hyperparameter study and computational cost analysis on PEMSD7(M) and PEMS04.
Methods
Metric (PEMSD7(M))
Metric (PEMS08)
MAE
RMSE
MAPE
MAE
RMSE
MAPE
Xavier_uniform
2.59
5.24
6.40
13.57
22.94
8.92
Kaiming_uniform
2.59
5.25
6.40
13.59
22.98
8.94
Orthogonal
2.59
5.25
6.43
13.59
23.00
8.92
Xavier_normal
2.59
5.24
6.42
13.54
22.95
8.90
Mean ± Std
2.59±0.00
5.25±0.01
6.41±0.02
13.57±0.02
22.97±0.03
8.92±0.02
Appendix
TABLE III : Performance Comparison under Different Node Embedding Initialization Methods.
Traffic flow prediction is a core supporting technology for intelligent transportation systems. It uses historical data to infer future traffic dynamics in specific areas, thereby helping to alleviate congestion and improve resource allocation efficiency. Traditional neural networks struggle to break through accuracy limits due to their reliance on singular feature modeling, while large language models (LLMs) suffer from insufficient capture of spatial topological information and mining spatiotemporal correlation. This study proposes a Dynamic Fusion Large Language Model (DF-LLM) for traffic flow prediction. The model incorporates three core components: spatiotemporal embedding module, spatiotemporal fusion module, and LLM backbone. The spatiotemporal embedding module enables synergistic representation of multi-scale spatiotemporal features. The spatiotemporal fusion module integrates spatial topology and dynamic dependencies via graph convolution. The LLM backbone adopts a differentiated parameter adaptation strategy to balance training efficiency and traffic data adaptability. Additionally, it introduces a context aggregation attention module to strengthens global dependencies. More importantly, the LLM backbone takes the residual connections to mitigate the gradient vanishing in deep networks. Experiments show that DF-LLM has achieved better performance by comparing the metrics on all the four datasets.
Xue Qiu, Jianli Xiao
School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai, China
Accurate traffic forecasting is essential for intelligent transportation systems, supporting a wide range of real-world applications. However, it remains challenging due to two key factors:(1) Traffic series contain heterogeneous temporal patterns, where stable periodic regularities coexist with event-driven fluctuations. Existing methods often treat them within a unified representation, limiting their ability to capture fine-grained temporal dynamics.(2)Spatial dependencies among nodes are inherently dynamic and sparse, while dense all-pairs attention often introduces redundant interactions and amplifies noise. To address these issues, we propose ADMFormer, an Adaptive-Decomposition Transformer with Time-Varying Masked Spatial Attention. Specifically, ADMFormer first employs a time-node adaptive gating mechanism to decouple traffic signals into dominant regularities and residual fluctuations that vary across time and nodes. A dual-branch temporal module is then designed to separately capture global periodic dependencies and high-frequency irregular variations from these two decomposed components. Furthermore, ADMFormer introduces a time-varying masked spatial attention that sparsifies spatial interactions based on real-time traffic states, thereby effectively preserving dynamic and informative dependencies. Extensive experiments on four real-world datasets demonstrate that ADMFormer achieves state-of-the-art performance.
Ruiwen Gu, Qitai Tan, Yahao Liu +1
Shenzhen Ubiquitous Data Enabling Key Lab Shenzhen International Graduate School, Tsinghua University, Shenzhen, China · School of Computer Science and Engineering University of Electronic Science and Technology of China, Chengdu, China
Traffic forecasting is a significant part of intelligent transportation systems. One of the critical challenges of traffic forecasting is to find spatio-temporal correlations. In recent years, graph convolutional networks and graph attention networks have replaced traditional statistical models to predict future traffic. However, it is complicated for both of them to allow vertices to have far different characters. To address this, we propose the Global-Local Graph Attention Network (GLGAT) with pairwise encoding and the event-based adjacency matrix. The GLGAT allows vertices to have a global attention matrix set for the whole graph and assigns local attention matrix sets to each vertex. Experiments on two real-world traffic datasets show that GLGAT can effectively capture spatio-temporal correlations and has competitive performance against other state-of-the-art baselines.