1. Introduction
Short-term traffic flow forecasting supports route guidance, congestion warning, signal control and network-level traffic management. The task is difficult because detector observations form multivariate time series on a non-Euclidean road graph, and their evolution reflects local persistence, spatial propagation and recurring temporal regimes. Recurrent models represent temporal dependence [
1,
2], while graph-based models explicitly describe interactions among sensors [
3,
4,
5,
6]. A useful forecasting model must, therefore, balance temporal dynamics, graph structure and operating context without obscuring the source of its gains.
Graph-based traffic forecasting has progressed from fixed-topology convolution and diffusion [
4,
5] to adaptive graph learning and node-specific parameterization [
6,
7,
8]. Attention and Transformer architectures further capture long-range or time-varying dependencies through global attention, adaptive embeddings and propagation-delay modelling [
9,
10,
11,
12]. These methods achieve strong predictive accuracy, but their adaptation usually changes the graph, node representation, attention map or latent embedding. The contribution of individual polynomial graph-convolution orders is seldom exposed as a context-conditioned quantity.
This distinction is relevant to ASTGCN. The model learns temporal and spatial attention from historical flow, but calendar semantics such as hour of day, day of week and weekend status remain implicit. Moreover, its Chebyshev graph convolution combines polynomial orders without an explicit sample-level mechanism that links their relative contributions to temporal context. The same receptive-field mixture can, therefore, be applied to peak, off-peak and weekend conditions even when their spatial dependence patterns differ.
CD-MRFG addresses this narrow limitation while retaining the ASTGCN backbone. Its first contribution is a five-dimensional calendar-context encoding that separates periodic semantics from raw flow measurements. Its second contribution is a block-specific Softmax gate that converts the encoded context into weights for different Chebyshev orders. Its third contribution is an evaluation on PEMS03, PEMS04 and PEMS08 that combines reproduced baselines, module ablation, three-seed tests, gate diagnostics, complexity profiling, hyperparameter sensitivity and quantitative convergence analysis. The resulting claim is deliberately bounded: the method improves its direct ASTGCN baseline and exposes context-dependent order allocation, but it does not outperform every recent model.
The remainder of this paper is organized as follows.
Section 2 reviews temporal, graph-based and context-aware forecasting methods and distinguishes CD-MRFG from related adaptive models.
Section 3 defines the forecasting task and notation.
Section 4 presents the model architecture and training objective.
Section 5 reports the comparative, robustness, ablation, interpretation, efficiency, sensitivity and convergence results.
Section 6 summarizes the findings and their limitations.
5. Experiments and Results
Experiments were conducted on PEMS03, PEMS04 and PEMS08. The evaluation addressed six questions: whether CD-MRFG improves its direct ASTGCN baseline, whether the result generalizes to a third sensor network, how it compares with recent strong baselines, whether the gains persist across random seeds, which components and hyperparameters control performance, and whether the added mechanism has acceptable computational and optimization costs. Unless otherwise stated, all reproduced models used the same chronological split, 12-step input, 12-step target and test metrics.
5.1. Datasets
PEMS03, PEMS04 and PEMS08 are public California freeway detector datasets sampled every 5 min. As shown in
Table 2, PEMS03 contains 358 sensors and 26,208 time steps from 1 September to 30 November 2018. PEMS04 contains 307 sensors and 16,992 time steps from 1 January to 28 February 2018, and PEMS08 contains 170 sensors and 17,856 time steps from 1 July to 31 August 2016. Each dataset was divided chronologically into training, validation and test sets using a 6:2:2 ratio. Twelve historical observations were used to forecast the following twelve observations.
5.2. Experimental Settings and Metrics
Experiments were run on a workstation with a 13th Gen Intel Core i7-13700K CPU and an NVIDIA GeForce RTX 4090D GPU. Architecture-specific objectives and validation-selected settings followed the corresponding implementations, while the data split, input length, forecast horizon and evaluation code were fixed. As shown in
Table 3, ASTGCN and CD-MRFG used Adam, mean squared error, a learning rate of 0.001 and a batch size of 32. Their common configuration contained two spatio-temporal blocks, Chebyshev order K = 3, 64 graph and temporal filters, and a CD-MRFG context hidden dimension of 64. The controlled benchmark runs of CD-MRFG achieved an overall MAE and RMSE of 16.98 and 28.59 on PEMS03, 20.82 and 32.77 on PEMS04, and 17.24 and 26.84 on PEMS08. Repeated-seed statistics are reported separately in
Section 5.4.
Following common practice in traffic forecasting, mean absolute error (MAE), root mean square error (RMSE) and masked mean absolute percentage error (MAPE) are used as metrics. Their formal definitions are given in Equations (8)–(10). Let Y and Ŷ denote the ground-truth and predicted traffic flows, N the number of sensors and T the prediction horizon. Because traffic flow may contain zero or near-zero values, MAPE is calculated only on the valid set Ω, where the ground-truth value is larger than ε. In this paper, ε is set to 1 × 10−5. A lower MAE and RMSE indicate smaller forecasting error. RMSE is more sensitive to large errors, whereas MAPE measures relative error.
5.3. Comparison with Baseline Methods
The comparison includes HA, LSTM, GRU, DCRNN, STGCN, ASTGCN, AGCRN and STSGCN. All values in
Table 4 were reproduced with the common chronological split and evaluation code. Model-specific architecture and optimization settings followed their implementations and were selected using validation data. ASTGCN is the primary controlled baseline because CD-MRFG modifies its graph-convolution stage. STID and MTGNN are reported separately in
Table 5 as recent strong baselines on PEMS04 and PEMS08.
Errors increased with the prediction horizon for the learned baselines on all three datasets. On PEMS03, CD-MRFG achieved an overall MAE and RMSE of 16.98 and 28.59. It improved DCRNN by 5.67% in MAE and 1.68% in RMSE, STGCN by 15.48% and 12.00%, and STSGCN by 4.34% and 2.46%, respectively. AGCRN remained more accurate, with an overall MAE and RMSE of 15.51 and 27.17. The third dataset, therefore, supports generalization beyond PEMS04 and PEMS08 while preserving the bounded accuracy claim.
On PEMS04, CD-MRFG reduced overall MAE and RMSE by 6.13% and 4.25% relative to DCRNN, and by 20.93% and 19.32% relative to STGCN. On PEMS08, it reduced MAE by 0.52% relative to DCRNN, whereas its RMSE was 0.60% higher. AGCRN produced lower overall errors than CD-MRFG on PEMS04 and PEMS08. These mixed results show that the proposed gate improves an ASTGCN-style model but does not dominate adaptive graph learning.
The direct ASTGCN comparison was consistent across datasets. CD-MRFG reduced overall MAE and RMSE from 18.66 and 31.05 to 16.98 and 28.59 on PEMS03, from 22.79 and 35.02 to 20.82 and 32.77 on PEMS04, and from 18.88 and 28.83 to 17.24 and 26.84 on PEMS08. The corresponding MAE reductions were 9.00%, 8.64% and 8.69%. This controlled comparison supports the specific claim that explicit calendar context and order gating improve the ASTGCN backbone.
Table 6 provides a stricter comparison with STID and MTGNN. Both recent baselines achieved lower overall errors than CD-MRFG on PEMS04 and PEMS08. The proposed method is, therefore, evaluated for its controlled gain over ASTGCN, explicit order-level diagnostics and modest architectural change, not for state-of-the-art accuracy.
MTGNN and STID benefit from learned graph structure or strong identity embeddings and, therefore, define an important accuracy boundary. Their advantage does not invalidate the controlled ASTGCN comparison, but it prevents a universal superiority claim.
5.4. Robustness Across Random Seeds
ASTGCN and CD-MRFG were independently trained with seeds 1, 42 and 2026 on PEMS04 and PEMS08.
Table 5 reports mean ± standard deviation over the three runs. Paired two-sided t-tests compare the two models using matched seeds. Given the small sample size, the
p-values are interpreted together with the paired differences rather than as standalone proof.
CD-MRFG reduced the mean MAE for every matched seed. The MAE difference was significant on PEMS04 (p = 0.028) and PEMS08 (p = 0.042). The mean RMSE was also lower, but the paired tests did not cross the 0.05 threshold on PEMS04 (p = 0.181) or PEMS08 (p = 0.057). MAPE differences were not significant. These results support a reproducible MAE gain while placing an explicit statistical boundary on the RMSE and MAPE claims.
5.5. Ablation Study
Four variants are evaluated on PEMS04 and PEMS08 to isolate the effect of each component. M1 is the original ASTGCN baseline. M2 adds fixed multi-order graph-convolution gating to ASTGCN. M3 uses only the context feature embedding module. M4, namely CD-MRFG, combines context embedding with dynamic multi-order receptive-field gating.
Table 7 reports the average 12-step results.
M1 ASTGCN. This baseline measures the forecasting ability of the original spatio-temporal attention graph convolution without temporal context or multi-order gating. Its average MAE is 22.79 and RMSE is 35.02 on PEMS04, while its average MAE is 18.88 and RMSE is 28.83 on PEMS08. These results show that ASTGCN captures basic spatio-temporal dependencies, but its input remains dominated by historical flow values and does not explicitly encode temporal context.
M2 fixed multi-order graph-convolution gating. M2 does not provide a neutral modification to the ASTGCN baseline. On PEMS04, its MAE remains nearly unchanged, decreasing from 22.79 to 22.78, whereas its RMSE increases from 35.02 to 36.45, corresponding to a relative deterioration of 4.08%. Because RMSE assigns greater weight to large residuals, this divergence indicates that fixed order weighting increases the magnitude of difficult forecasting errors even when the average absolute error remains stable. A fixed gate applies the same receptive-field mixture to all samples and cannot distinguish traffic states dominated by local variation from states involving broader spatial propagation. This mismatch can cause excessive neighbourhood aggregation in local regimes or insufficient higher-order propagation during spatially extended congestion. On PEMS08, M2 produces only marginal reductions in MAE and RMSE, from 18.88 and 28.83 to 18.85 and 28.56, respectively, while MAPE increases from 0.12 to 0.13. The opposite RMSE changes across datasets indicate that a fixed receptive-field mixture interacts with dataset-specific topology and traffic-regime composition rather than providing a robust improvement. In contrast, M4 conditions the order weights on temporal context and reduces the PEMS04 RMSE from 36.45 to 32.77 and the PEMS08 RMSE from 28.56 to 26.84 relative to M2. These results indicate that the effectiveness of multi-order gating depends on sample-specific contextual modulation rather than on the introduction of additional order weights alone.
M3 context feature embedding. This variant evaluates the contribution of temporal context itself. M3 reduces MAE to 21.34 and RMSE to 33.81 on PEMS04 and reduces MAE to 17.83 and RMSE to 27.25 on PEMS08, clearly outperforming M1 on both datasets. Hour, weekday and weekend indicators, therefore, provide useful periodic semantics that help distinguish morning and evening peaks, off-peak periods and weekend traffic.
M4 CD-MRFG. The full model combines context embedding with dynamic multi-order receptive-field gating and achieves the best results among the four variants. It obtains an MAE of 20.82, RMSE of 32.77 and MAPE of 0.14 on PEMS04, and an MAE of 17.24 and RMSE of 26.84 on PEMS08. Its further improvement over M3 indicates that context is useful not only as an auxiliary input representation but also as a condition for selecting graph-convolution orders.
5.6. Gate Weight Analysis Under Different Traffic Periods
Gate weights were extracted from the PEMS04 and PEMS08 test sets to determine whether order allocation changed with temporal context.
Table 8 reports the mean weights assigned to orders 0, 1 and 2 in the two ASTGCN blocks for four traffic periods. Each row sums to one because the gate uses a Softmax output.
The distributions varied across traffic periods and blocks. On PEMS04, block 1 emphasized order 2 during the morning peak and daytime off-peak periods, whereas block 2 emphasized order 1 in the morning peak and order 0 in the evening peak and at night. On PEMS08, block 1 mainly balanced orders 0 and 1, while block 2 assigned larger weights to order 2 in the three daytime periods. The gate, therefore, did not collapse to a single fixed mixture.
These weights are model-internal allocation coefficients, not measurements of physical traffic propagation or causal influence. Their variation supports the narrower conclusion that CD-MRFG uses different polynomial graph components under different calendar contexts. Physical interpretation would require external traffic-state evidence or controlled interventions.
5.7. Model Interpretation and Applicability Boundary
CD-MRFG is designed for short-term forecasting on fixed sensor graphs with regular daily and weekly regimes. The gate converts calendar context into a convex combination of self, first-order and higher-order graph features. This construction makes the model’s receptive-field preference inspectable without replacing the ASTGCN backbone.
The applicability boundary is equally important. The five context variables do not represent holidays, incidents, weather, roadworks or special events. The method may, therefore, be less reliable when non-recurring disturbances dominate the traffic state. It also retains a predefined graph and cannot recover missing or evolving connectivity as directly as adaptive graph-learning models.
AGCRN, STID and MTGNN achieved lower absolute errors in several comparisons. CD-MRFG should, thus, be used when the objective is a controlled ASTGCN improvement with explicit order-level diagnostics and modest structural change, rather than when forecasting accuracy alone determines model choice.
5.8. Complexity and Computational Overhead
Because CD-MRFG adds only a context encoder and a dynamic receptive-field gate to ASTGCN, its overhead mainly comes from lightweight multilayer perceptrons and scalar order-wise weighting.
Table 9 reports profiling under a batch size of 32 on CUDA. On PEMS04, the parameter count increases from 0.450 M to 0.459 M, and latency increases from 24.06 ms to 27.86 ms. On PEMS08, the parameter count increases from 0.179 M to 0.189 M, and latency increases from 17.94 ms to 19.53 ms. The measured PEMS08 checkpoint sizes are 0.6966 MB for ASTGCN and 0.7342 MB for CD-MRFG. The measured values indicate limited model-size growth and moderate inference overhead.
5.9. Hyperparameter Sensitivity
A one-factor-at-a-time analysis was conducted on PEMS04 with seed 42. Chebyshev order K, context hidden dimension and the number of spatio-temporal blocks were varied while the remaining settings were fixed. The analysis was performed after the main benchmark and was not used to retrospectively select the reported test configuration.
Table 10 reports PEMS04 hyperparameter sensitivity results and
Figure 3 demonstrates PEMS04 sensitivity to the varied parameters.
Increasing K from 2 to 4 progressively reduced MAE and RMSE, but K = 4 increased training time by 11.1% relative to K = 3. A hidden dimension of 32 was more accurate and smaller than the default 64, whereas 128 degraded both errors, indicating that a larger context encoder is not automatically beneficial. Three blocks achieved the lowest errors but increased parameters and training time by about 52% and 50% relative to two blocks. The main setting, therefore, represents a fixed benchmark configuration rather than the best point from post hoc tuning.
5.10. Quantitative Convergence Analysis
Table 11 reports quantitative convergence results from the completed three-seed logs. E90 and E95 denote the first epochs that reached 90% and 95% of the final achieved validation-loss reduction. In
Figure 4, normalized area under the validation curve (AUC) summarizes the full optimization trajectory, with a smaller value indicating faster loss reduction. Late-stage variability is measured by the coefficient of variation over the final ten epochs.
Both models reached E90 within approximately five epochs. CD-MRFG had a lower normalized AUC on both datasets. The paired difference was significant on PEMS08 (p = 0.031) and marginal on PEMS04 (p = 0.054). On PEMS08, CD-MRFG also reduced late-stage variability from 3.18% to 0.84%. These optimization benefits required additional time: the mean training duration increased by 4.58 min on PEMS04 and 4.16 min on PEMS08. The results support a more efficient loss trajectory, particularly on PEMS08, rather than a universal claim of faster threshold attainment.
5.11. Forecasting Visualization
In
Figure 5 and
Figure 6, representative PEMS04 and PEMS08 test sequences are plotted with ground-truth flow, ASTGCN predictions and CD-MRFG predictions. The curves provide qualitative evidence about turning-point response and trend continuity. PEMS03 is evaluated quantitatively in
Table 4 but is not used to select an additional visualization.
On PEMS04, the selected sequence contains evident morning-like growth, a high-flow plateau, subsequent decline and recovery. These stages are useful for evaluating multi-step forecasting because errors easily accumulate around turning points. The ASTGCN baseline captures the broad temporal trend, but its predicted curve tends to lag when the flow changes quickly. CD-MRFG gives a smoother yet more responsive trajectory, especially around the falling segment after the local peak and the later recovery interval.
The PEMS08 visualization provides a second case with a different sensor scale and temporal distribution. Although the overall profile differs from PEMS04, the same phenomenon can be observed: baseline predictions are delayed in several peak-decline and trough-recovery intervals, whereas CD-MRFG remains closer to the ground-truth direction of change. This cross-dataset consistency supports the argument that the proposed context-conditioned gate improves the dynamic selection of spatial receptive fields instead of overfitting one particular dataset.
The visual results complement the aggregate errors in
Table 4. They show that CD-MRFG follows several rise, decline and recovery segments more closely than ASTGCN. These examples are illustrative rather than statistical evidence and should be interpreted together with the full test-set metrics and repeated-seed analysis.