VisiFold: Long-Term Traffic Forecasting via Temporal Folding Graph and Node Visibility
Organizations: Key Laboratory of Big Data & Artificial Intelligence in Transportation (Beijing Jiaotong University), Ministry of Education · School of Computer Science and Technology, Beijing Jiaotong University, Beijing 100044, China · Beijing Normal University, Beijing, China
Abstract
Traffic forecasting is a cornerstone of intelligent transportation systems. While existing research has made significant progress in short-term prediction, long-term forecasting remains a largely uncharted and challenging frontier. Extending the prediction horizon intensifies two critical issues: escalating computational resource consumption and increasingly complex spatial-temporal dependencies. Current approaches, which rely on spatial-temporal graphs and process temporal and spatial dimensions separately, suffer from snapshot-stacking inflation and cross-step fragmentation. To overcome these limitations, we propose VisiFold. Our framework introduces a novel temporal folding graph that consolidates a sequence of temporal snapshots into a single graph. Furthermore, we present a node visibility mechanism that incorporates node-level masking and subgraph sampling to overcome the computational bottleneck imposed by large node counts. Extensive experiments show that VisiFold not only drastically reduces resource consumption but also outperforms existing baselines in long-term forecasting tasks. Remarkably, even with a high mask ratio of 80%, VisiFold maintains its performance advantage. By effectively breaking the resource constraints in both temporal and spatial dimensions, our work paves the way for more realistic long-term traffic forecasting. The code is available at~ https://github.com/PlanckChang/VisiFold.
Figures & tables
| Dataset | # Time Steps | Nodes | Time Range | Frequency |
| PEMS04 | 16992 | 307 | 2018/01 – 2018/02 | 288 |
| PEMS08 | 17856 | 170 | 2016/07 – 2016/08 | 288 |
| SEATTLE | 8760 | 323 | 2015/01 – 2015/12 | 24 |
| Method | 24 Time Steps | 36 Time Steps | 48 Time Steps | |||||||
| RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | ||
| PEMS04 | HA | 81.57 | 56.47 | 45.49 | 106.58 | 76.01 | 68.84 | 127.28 | 93.37 | 94.62 |
| VAR | 41.09 | 27.19 | 21.42 | 45.44 | 30.48 | 24.51 | 49.46 | 33.50 | 27.28 | |
| DCRNN | 42.86 | 28.70 | 21.23 | 51.40 | 33.78 | 27.10 | 57.85 | 38.26 | 33.73 | |
| GWNet | 35.52 | 22.79 | 16.04 | 38.17 | 24.71 | 17.67 | 40.60 | 26.42 | 18.99 | |
| GMAN | 38.10 | 21.67 | 17.78 | 52.86 | 22.12 | 16.43 | 47.85 | 23.35 | 17.98 | |
| Method | RMSE | MAE | MAPE |
| Full model | 31.36 | 19.07 | 12.44 |
| w/o Spatial Embedding | +8.22 | +5.45 | +4.20 |
| w/o Dow Embedding | +0.19 | +0.26 | +0.18 |
| w/o Tod embedding | +0.35 | +0.29 | +0.27 |
| PEMS04 | PEMS08 | SEATTLE | |
| Only TFG | 704 | 514 | 706 |
| w/ Node-level Masking | -10.23% | -8.56% | -6.23% |
| w/ Subgraph Sampling | -1.70% | -2.33% | -4.53% |
| Full Model | -12.22% | -10.86% | -11.33% |
| Method | RMSE | MAE | MAPE |
| Node-level | 7.22 | 3.82 | 11.87 |
| AllZero | +0.08 | +0.05 | +0.05 |
| PartialZero | +0.09 | +0.04 | +0.05 |
| RandomValue | +0.15 | +0.07 | +0.14 |
| Method | 24 Time Steps | 36 Time Steps | 48 Time Steps | |||||||
| RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | ||
| PEMS04 | TFG | 31.70 | 19.36 | 12.84 | 32.57 | 19.92 | 13.23 | 33.90 | 20.70 | 13.61 |
| SF | 37.37 | 22.98 | 15.46 | 37.85 | 23.30 | 15.65 | 38.11 | 23.60 | 16.16 | |
| PEMS08 | TFG | 25.60 | 15.19 | 10.05 | 26.81 | 15.99 | 10.69 | 27.75 | 16.66 | 11.10 |
| SF | 35.92 | 21.45 | 13.75 | 36.70 | 21.76 | 14.09 | 36.48 | 21.59 | 14.15 | |
| Dataset | Setting | 24 Time Steps | 36 Time Steps | 48 Time Steps | ||||||
| RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | ||
| PEMS04 | VisiFold | 31.36 | 19.07 | 12.44 | 32.52 | 19.78 | 12.92 | 33.23 | 20.27 | 13.35 |
| Node-specific and | 31.64 | 19.32 | 12.57 | 32.93 | 20.07 | 13.02 | 33.52 | 20.53 | 13.48 | |
| w/ Leader token (shared) | 32.02 | 19.52 | 12.89 | 33.15 | 20.29 | 13.28 | 33.88 | 20.76 | 13.95 | |
| w/ Leader token (exclusive) | 32.03 | 19.62 | 13.09 | 32.92 | 20.16 | 13.92 | 35.01 | 21.22 | 13.80 | |
| PEMS08 | VisiFold | 25.31 | 14.73 | 9.84 | 26.51 | 15.48 | 10.38 | 27.49 | 16.35 | 10.98 |
| Hyperparameter | PEMS04 | PEMS08 | SEATTLE |
| Mask ratio | 0.2 | 0.2 | 0.2 |
| Subgraph size | 50 | 30 | 50 |
| Embedding dim | 64 | 32 | 64 |
| Feed-forward dim | 1024 | 1024 | 1024 |
| Heads | 4 | 4 | 4 |
| Layers | 1 | 1 | 1 |
Traffic Forecasting
Traffic forecasting predicts future flows, speeds, demand, travel times, and congestion from spatial, temporal, and contextual data.
See all 87 papers