Manuscript Offprint
arXiv:2611.05715CoReFlow: Consistency-Relaxed Flow Maps for Probabilistic Traffic Forecasting
Abstract
Probabilistic traffic forecasting is essential for reliable Intelligent Transportation Systems (ITS), as it captures uncertainties in complex road networks. Recent diffusion- and flow-based generative models have facilitated uncertainty modeling through a multi-step sampling process. However, beyond slow inference, this process is designed to capture complex multimodal distributions, which misaligns with the limited complexity of the conditional traffic data distribution, causing models to underperform deterministic baselines. To address this, we introduce the Consistency-Relaxed Flow Map (CoReFlow) model, presenting the first effort to leverage the one-step generation capability of flow maps, known as solution operators of probability-flow ordinary differential equations. Besides, we improve accuracy using a concise training objective that supervises the model via interpolation endpoints over finite time intervals. Unlike existing methods (e.g., self-distillation and MeanFlow Identity) that maintain trajectory consistency to model multimodal distributions, our objective leverages conditional mean to restrict the consistency, thereby achieving higher accuracy in the probabilistic traffic forecasting task. Extensive experiments on four real-world datasets show CoReFlow achieves state-of-the-art forecasting accuracy. It surpasses recent baselines, provides competitive uncertainty modeling, and reduces inference costs compared to existing generative baselines.
1 Introduction
As a fundamental component of Intelligent Transportation Systems (ITS), traffic forecasting supports a wide range of downstream applications such as route planning, traffic signal control, and congestion management (Yin et al. 2021). Most existing deep learning methods formulate traffic forecasting as a deterministic task and produce point predictions (Liu et al. 2023a; Dong et al. 2024; Shao et al. 2025). However, transportation networks exhibit inherent uncertainty due to weather conditions, driver behaviors, and other external influences (Yan and Li 2023), making probabilistic forecasting essential for reliable decision-making.
Generative models, particularly Diffusion models (Ho, Jain, and Abbeel 2020; Song, Meng, and Ermon 2021), have been increasingly applied to probabilistic traffic forecasting (Wen et al. 2023; Chi and Ma 2023; Hu et al. 2024; Lin et al. 2025). Conditioned on historical observations, these models generate future traffic states through learning to reverse a
*Corresponding author.
Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

Figure 1: Accuracy (RMSE) vs. Inference latency on the PeMS07 dataset. The comparison includes CoReFlow, deterministic baselines, and generative baselines.
systematic noise-injection process. Despite their generative capabilities, these models suffer from two major limitations: (1) slow inference speed due to an iterative, multi-step sampling process, and (2) a noticeable performance gap in point prediction accuracy compared to state-of-the-art deterministic baselines. These two limitations are illustrated in Figure 1.
Our key observation is that the traffic data distribution tends to be concentrated, homogeneous, and of limited complexity when conditioned on priors such as specific time slots and weekdays. This suggests that the complex multimodal modeling capacity of diffusion models is largely redundant in this setting. Moreover, their multi-step sampling process may complicate optimization and introduce additional variance.
We address the probabilistic traffic forecasting problem by introducing the flow map, the solution operator of the probability-flow Ordinary Differential Equation (ODE), enabling efficient one-step generation. Specifically, this ODE is defined by a velocity field that transports a Gaussian prior to the target future traffic distribution, conditioned on historical traffic states and auxiliary variables. Motivated by the aforementioned key observation, we propose a simple yet effective objective function that relaxes the trajectory consistency constraints for the flow map while simultane-ously stabilizing the training process. Furthermore, we theoretically and empirically demonstrate the advantages of the objective. Based on the training objective, we propose the model CoReFlow, for Consistency-Relaxed Flow Map, which demonstrates promising deterministic and stochastic performance, as illustrated in Figure 1. The main contribution of this study can be summarized as:
-
CoReFlow is, to the best of our knowledge, the first model to apply the flow map concept to probabilistic traffic forecasting. It enables efficient one-step generation.
-
Leveraging the limited complexity of conditional traffic distributions, we formulate a domain-specific training objective for CoReFlow. We provide a theoretical analysis of this objective and empirically show that it surpasses existing flow map training objectives.
-
Extensive experiments on real-world public datasets show that CoReFlow achieves competitive performance in both deterministic and probabilistic forecasting.
2.1 Limited Complexity of Conditional Traffic Data Distributions
To analyze the impact of conditional information on different data distributions, we calculated the intra-class and inter-class cosine similarity distributions on ImageNet-256 and PEMS07, respectively. For the ImageNet-256 dataset, we randomly sampled 50 images from each of 150 randomly selected classes. After normalization, each image is encoded using the pretrained VAE from Latent Diffusion Models (Rombach et al. 2022) and flattened. For PEMS07, the two time indices, "non-overlap-hour" and "day-of-the-week", were combined to generate class labels. After applying Z-score normalization, the data was flattened into one-dimensional vectors. Given the differences in data dimension and processing methods between the two datasets, we avoid directly comparing the absolute similarity values across the two datasets. Instead, we focus on the relative relationship between the intra-class and inter-class similarity distributions within each dataset.
The similarity distribution is illustrated in Figure 2. For ImageNet-256, the inter- and intra-class similarity distributions approximate a normal distribution centered at 0, with significant overlap. This indicates that the conditional information imposes a weak constraint on the sample distribution. The inter-class similarity distribution of PEMS07 exhibits a broad range from -0.7 to 1. This indicates non-uniform disparities across classes, which aligns with the temporal heterogeneity of traffic data highlighted in earlier studies (Jiang et al. 2023; Ji et al. 2023; Li and Zhu 2021). Conversely, the intra-class similarity is densely concentrated in the range from 0.8 to 1, indicating a highly compact and homogeneous sample distribution. Furthermore, this suggests that the samples are tightly localized around the distribution mean.
The result demonstrates that auxiliary information such as time-of-day and day-of-week substantially reduces the complexity of the conditional distribution for traffic data. Consequently, the multi-step sampling process in diffusion models,

Figure 2: Distributions of intra- and inter-class cosine similarity on ImageNet and PEMS07.
which is typically advantageous for modeling complex, multimodal distributions, might not be fully utilized. Instead, the redundancy may introduce additional optimization difficulties and prediction variance, potentially explaining why diffusion models fail to consistently achieve an advantage in probabilistic traffic prediction.
2.2 Traffic Forecasting via Flow Map
For any given current time step, let denote the historical traffic states collected over the preceding time steps, where is the number of spatial nodes and represents the feature dimension. Accordingly, the future traffic states to be predicted over the subsequent time steps are denoted by . Furthermore, we incorporate contextual priors via auxiliary variables: indicates the time-of-day and day-of-week across the historical steps, while indicates spatial locations. For notational simplicity, we concatenate the historical traffic states and auxiliary variables into a single conditioning context: .
We further define a marginal velocity field (Lipman et al. 2023; Albergo, Boffi, and Vanden-Eijnden 2025), denoted as , that transports probability flow from a simple prior distribution to the target future traffic distribution . This field is conditioned on historical traffic states and other auxiliary variables, collectively denoted as for notational simplicity. The path for the probability flow is constructed through a linear interpolation, , where is the prior sample.
The flow map is a solution operator of the ordinary differential equation (ODE) defined by the marginal velocity field, as shown in Figure 3. It can be formulated via the integral equation on :
which naturally satisfies the boundary condition as well as

Figure 3: Velocity field and flow map defined in the traffic forecasting task.
the infinitesimal condition:
In this study, we want to approximate the flow map using a neural network parameterized by , referred to as CoReFlow. To strictly satisfy the boundary condition in Equation 2, and in line with previous studies (Luo, Yuan, and Liu 2025; Sabour, Fidler, and Kreis 2026), we parameterize as a residual mapping, formulated as the sum of the current state and a residual network :
where and are differentiable functions satisfying and . We use the Euler parameterization (Sabour, Fidler, and Kreis 2026; Boffi, Albergo, and Vanden-Eijnden 2026), where,
This leads to a constant addition of Gaussian noise to the model output.
During inference, this formulation enables highly efficient one-step generation, avoiding the need for iterative ODE solvers. By drawing an initial sample and setting , we directly map the prior to a generated data sample in a single forward pass as .
2.3 Training Objective
Training usually involves two losses (Luo, Yuan, and Liu 2025; Zhang et al. 2025; Frans et al. 2025; Boffi, Albergo, and Vanden-Eijnden 2026): Conditional Flow Matching loss and Trajectory Consistency loss . Specifically, optimizes the model by matching its diagonal derivative, as defined in Equation 3, to conditional velocity targets constructed from stochastic interpolations. While only constrains on the diagonal (s = t), regularizes off-diagonal (s > t) behaviors via self-consistency along the ODE trajectory, thereby enabling one-step generation of multimodal distributions without collapsing to the mean (Song et al. 2023; Frans et al. 2025). Nevertheless, incorporating inevitably introduces optimization difficulties, such as gradient instability (Boffi, Albergo, and Vanden-Eijnden 2025), gradient incompatibility with (Frans et al. 2025; Zhang et al. 2025), and error accumulation during early training stage (Song and Dhariwal 2024; Boffi, Albergo, and Vanden-Eijnden 2025).
Faced with the issues arising from , we exploit the inherently low-complexity and compactness of the conditional traffic data distribution, as noted in Section 2.1. By relaxing the trajectory consistency in the training objective, we simplify the optimization process while preserving training stability. Specifically, Specifically, we propose a consistency-relaxed loss ( ) that leverages the interpolation path to guide the training of the model , defined as:
where and are constructed via the interpolation for , with . To theoretically justify this relaxation, we first analyze its approximation behavior to ensure that dropping strict consistency does not degrade the target flow map.
Proposition 1 (Approximation Error, Proof in supplementary material). The optimal minimizer for approximates the flow map with an error of .
Beyond approximation guarantees, our objective formulation establishes a connection between trajectory consistency training and Conditional Flow Matching.
Proposition 2 (Convergence to CFM Loss, Proof in supplementary material). Under the limit as , reduces to the Conditional Flow Matching objective, i.e., .
Node-Level Adapted Loss Weight Previous studies (Geng et al. 2025b; Luo, Yuan, and Liu 2025; Geng et al. 2026) demonstrate that incorporating an adapted weighting mechanism into the loss function helps to stabilize training dynamics. The objective function for the flow map in Equation 6 can be reformulated as , where,
Rather than assigning an adaptive weight to the loss on the sample level (Luo, Yuan, and Liu 2025; Geng et al. 2026), we propose an adaptive weight at the node level. Specifically, given the residual , the adaptive weight for n-th node is based on the sum of squared errors on its temporal axis,
where denotes the stop-gradient operation, c is a small constant for numerical stability, and p is a scaling hyperparameter. The final optimized objective is given by computing

Figure 4: The Overall Model Structure.
the mean of the adaptively weighted errors across all nodes:
2.4 Model Structure and Conditioning
We employ a Transformer (Vaswani et al. 2017) as the backbone of our model. Given the dimension-wise correspondence between the conditional information c and the input signal , we find structure-level conditioning much more intuitive and suitable than guidance-based conditioning like classifier-free guidance (CFG) (Ho and Salimans 2021). Thus, our model structure, as shown in Figure 4, is designed to directly inject and fuse the conditions into the input.
Data Embeddings To effectively handle both continuous traffic data and discrete contextual attributes, we propose a specialized feature encoding module. For clarity, we first define a standard feedforward network (FFN) consisting of two linear transformations separated by a GELU activation function (Hendrycks and Gimpel 2017). For a generic input x, the FFN is defined as:
where are learnable weight matrices and are bias terms. The historical traffic states is first flatten from to to merge the temporal and channel dimensions, and subsequently projected to a -dimensional representation via an FFN,
Similarly, the flow path variable is flatten from to and mapped to -dimensional latent space via a linear projection,
Besides, categorical variables, , , and , are mapped into D-dimensional latent spaces using learnable embedding matrices. Mathematically, this is equivalent to applying a linear transformation to their one-hot representations:
where , , and represent the trainable parameters, with and being the number of unique categories. The resulting embeddings are dimensioned as and . Furthermore, the location embedding is and added to , element-wisely:
Temporal embeddings, and , are averaged along the temporal dimension and nonlinearly projected via two FFNs respectively,
where denotes the average pooling operation over the temporal axis T.
The time variables and are encoded by sinusoidal positional encoding, denoted as , and projected to and via FFNs, respectively,
Overall, the data embedding module projects the input variables , , , and into a -dimensional latent space, with and .
Transformer with Simplified AdaLN The model utilizes a stack of Transformer blocks, each with a Simplified Adaptive Layer Normalization (SAdaLN) module. Let denote the block index, where is the total number of Transformer blocks. For the initial layer ( ), the individual input representations are initialized as , , and the complete input sequence is formed by their concatenation .
Within the -th block, the conditioning representation of historical traffic and location, , is modulated into the flow-path representation, , via SAdaLN. Specifically, the conditioning representation is projected and split along the feature dimension to generate a shift parameter and a scale parameter :
(16)
where denotes element-wise multiplication. The resulting joint sequence is then processed by the -th Transformer block to capture dependencies among the flow-path, historical, temporal, and path indicator tokens:
where .
Output Layer The final flow-path representation from the Transformer output is linearly projected to and reshaped to match the target dimensions,
3 Experiments
3.1 Experimental Setup
Datasets A thorough evaluation of our model is conducted under extensive experiments on four real-world datasets: PEMS03, PEMS04, PEMS07, and PEMS08. The time resolution for the four datasets is 5 minutes, resulting in 12 time steps in one hour. More details are shown in Table 1.
| Datasets | #Nodes | #Timesteps | Time Range |
|---|---|---|---|
| PEMS03 | 358 | 26,209 | 09/2018-11/2018 |
| PEMS04 | 307 | 16,992 | 01/2018-02/2018 |
| PEMS07 | 883 | 28,224 | 05/2017-08/2017 |
| PEMS08 | 170 | 17,856 | 07/2016-08/2016 |
Table 1: Dataset Description
Baselines We compare our model with 11 baseline models, which belong to two categories:
• Deterministic models: HI (Cui, Xie, and Zheng 2021), GWNet (Wu et al. 2019), MTGNN (Wu et al. 2020), STNorm (Deng et al. 2021), STID (Shao et al. 2022), STAEFormer (Liu et al. 2023a), HimNet (Dong et al. 2024), and HyperD (Shao et al. 2025).
• Generative models: DiffSTG (Wen et al. 2023), USTD (Hu et al. 2024), SpecSTG (Lin et al. 2025).
Implementation Details Four datasets are chronologically split into training, validation, and test sets in a 6:2:2 ratio, following the baseline protocols. Observations from the past hour (T = 12) are used to predict traffic states for the next hour (T' = 12). Hyperparameters are selected through Bayesian optimization with 30 trials per dataset. The selected values and search space are reported in the supplementary material. All experiments are conducted on an NVIDIA GH200 GPU with 120 GB of memory. Our code is provided in the supplementary material.
Evaluation Metrics For deterministic models, three metrics are used: (1) Mean Absolute Error (MAE), (2) Mean Absolute Percentage Error (MAPE), and (3) Root Mean Squared Error (RMSE). For generative models, point metrics are computed from the predictive sample mean and the Continuous Ranked Probability Score (CRPS) is used as an additional metric for evaluating probabilistic prediction. In this study, CRPS is calculated using the Monte Carlo method (Gneiting and Raftery 2007).
3.2 Performance Comparison
Deterministic Predictions Table 6 compares CoReFlow with eight deterministic baselines across four datasets. Notably, CoReFlow ranks first in 11 of the 12 evaluated cases, outperforming baselines on all metrics for PEMS04, PEMS07, and PEMS08, as well as on MAE and MAPE for PEMS03. The only exception is RMSE on PEMS03, where HyperD ranks first. On average across the four datasets, CoReFlow reduces the MAPE by approximately 3.0% compared to the strongest baseline, reaching a maximum reduction of 3.4% on PEMS07.
Overall, these results demonstrate that CoReFlow maintains competitive performance on deterministic metrics, even when generating only a single sample.
Generative Predictions Table 7 compares CoReFlow with three generative baselines on PEMS07 and PEMS08, which are the largest and smallest road networks in our benchmark with 883 and 170 sensors, respectively. It achieves the best result in all 14 reported comparisons. Under the 1-sample generation setting, it reduces RMSE, MAE, and MAPE by 120.0%, 29.4%, and 39.0%, respectively, compared to the strongest baseline on PEMS07.
Under the 10-sample aggregation setting, our model maintains the lowest RMSE, MAE, and MAPE, as well as achieving the best CRPS across both datasets. The joint improvements in deterministic and probabilistic metrics demonstrate that CoReFlow generates predictive distributions of superior accuracy compared to existing generative baselines.
3.3 Ablation Study
This ablation study mainly aims to validate the design of the training objective for our model. We compare our approach with recently proposed flow map training methods, including MeanFlow Identity (Geng et al. 2026), improved MeanFlow Identity (Geng et al. 2025a), and self-Distillation (Boffi, Albergo, and Vanden-Eijnden 2026). Additionally, we substitute our adapted loss weight from the node level to the batch level for comparison. Since these losses were originally designed for image datasets, we reproduced them as faithfully as possible. We restrict this analysis to PEMS07 and PEMS08, as they represent the largest and smallest datasets, respectively. For notation clarity, the necessary formulation is established first.
Self-Distillation Self-distillation (Boffi, Albergo, and Vanden-Eijnden 2026) is a training objective, , combining the Conditional Flow Matching loss as well as the Trajectory Consistency loss inspired by the Lagrangian condition. The formulation is:
(23)
where and means a stop-gradient operation on . Besides, the norm in and is weighted by a trainable model in the form of .
| Model | PEMS03 | PEMS04 | PEMS07 | PEMS08 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | |
| HI | 49.892 | 32.619 | 30.596 | 61.659 | 42.353 | 29.922 | 71.340 | 49.288 | 22.753 | 50.452 | 34.661 | 21.631 |
| GWNet | 25.080 | 14.545 | 14.857 | 30.310 | 18.948 | 13.469 | 33.517 | 20.472 | 8.683 | 23.398 | 14.586 | 9.659 |
| MTGNN | 25.653 | 14.953 | 15.523 | 30.940 | 19.084 | 13.407 | 34.102 | 20.958 | 8.985 | 24.281 | 15.252 | 10.001 |
| STNorm | 26.129 | 15.275 | 14.817 | 31.440 | 19.056 | 12.861 | 34.488 | 20.508 | 8.639 | 24.860 | 15.406 | 9.838 |
| STID | 27.606 | 15.298 | 16.166 | 29.909 | 18.402 | 12.573 | 32.741 | 19.645 | 8.314 | 23.350 | 14.226 | 9.356 |
| STAEFormer | 25.549 | 15.010 | 15.415 | 30.199 | 18.154 | 12.455 | 32.891 | 19.438 | 8.028 | 23.225 | 13.511 | 8.858 |
| HimNet | 26.898 | 15.182 | 15.730 | 30.077 | 18.234 | 12.076 | 32.620 | 19.238 | 8.276 | 23.322 | 13.592 | 8.987 |
| HyperD | 24.205 | 14.940 | 16.023 | 30.018 | 18.240 | 12.510 | 33.278 | 19.434 | 8.116 | 23.318 | 13.640 | 9.016 |
| CoReFlow | 25.321 | 14.460 | 14.389 | 29.880 | 17.936 | 11.774 | 32.601 | 18.783 | 7.752 | 22.875 | 13.197 | 8.581 |
Table 2: Performance comparison with deterministic models. CoReFlow is evaluated based on 1-sample generation (). All results are averaged over three runs with random seeds. Best and second-best results are shown in bold and underlined, respectively.
| Metric | DiffSTG | USTD | SpecSTG | CoReFlow | ||
|---|---|---|---|---|---|---|
| PEMS07 | 1 sample | RMSE | 55.926 | 40.747 | 49.917 | 32.601 |
| MAE | 39.047 | 26.602 | 35.630 | 18.783 | ||
| MAPE | 21.431 | 12.699 | 19.172 | 7.752 | ||
| 10 samples | RMSE | 44.802 | 36.934 | 39.458 | 32.562 | |
| MAE | 31.085 | 24.297 | 26.298 | 18.731 | ||
| MAPE | 18.430 | 12.060 | 13.759 | 7.693 | ||
| CRPS | 21.335 | 19.226 | 18.527 | 18.201 | ||
| PEMS08 | 1 sample | RMSE | 34.577 | 30.707 | 34.045 | 22.875 |
| MAE | 22.921 | 19.801 | 24.370 | 13.197 | ||
| MAPE | 14.561 | 13.801 | 21.507 | 8.581 | ||
| 10 samples | RMSE | 27.334 | 26.892 | 27.204 | 22.843 | |
| MAE | 17.921 | 17.456 | 18.175 | 13.163 | ||
| MAPE | 11.511 | 12.780 | 16.106 | 8.546 | ||
| CRPS | 14.016 | 13.161 | 12.817 | 12.741 |
Table 3: Performance comparison with generative models. Best and second-best results are shown in bold and underlined, respectively.
MeanFlow Identity MeanFlow (Geng et al. 2026) Identity is an objective formulated as:
Batch-level adapted loss weight, is applied to the norm of .
Improved MeanFlow Identity Improved MeanFlow Identity (Geng et al. 2025a) is the a training objective based on . Specifically, the in in Equation 24 is replaced by .
Adaptive Loss Weight We compared the node-level adaptive loss weight to the batch-level alternative based on the

Figure 5: Percentage increase in prediction error for different ablated variants on the PEMS07 and PEMS08 datasets, using the proposed CoReFlow model as the baseline.
square L2 loss, (Geng et al. 2025b, 2026).
Summary Figure 5 summarizes the results of the ablation experiments by illustrating the relative percentage increase in prediction error for each variant. The positive error increases across all metrics clearly demonstrate that the current flow map training objectives degrade the model's predictive capability. Replacing the with the other objective compromises model accuracy, particularly on the PEMS08 dataset, highlighting the effectiveness of the proposed training objective. Second, training with a batch-level adaptive loss weight consistently underperforms, verifying that node-level adaptive weighting is essential for effective training.
3.4 Inference Efficiency
We measure the inference latency for generating the complete 12-step forecast with trajectories. The efficiency gain follows directly from the sampling formulation. CoRe-

Figure 6: Inference latency on PEMS07.
Flow evaluates the endpoint flow map once to generate the complete forecast. It therefore requires one network function evaluation (NFE) per trajectory (Chen et al. 2018). In contrast, SpecSTG requires 600 NFEs because it performs 50 diffusion evaluations in each of 12 autoregressive forecasting rounds. The reduced sampling depth removes the serial network evaluations required by iterative generative models.
As shown in Fig. 6, CoReFlow achieves over an order-of-magnitude faster inference than generative baselines on PEMS07, the largest dataset. It achieves speedups ranging from 67× to 163× for , and from 36× to 141× for , over the generative baselines. Its single-trajectory latency is comparable to Graph-based models (GWNet and HimNet), although deterministic baselines remain faster. The same efficiency advantage is observed on PEMS08. The full protocol and results is given in the supplementary material.
4 Related Work
4.1 Deterministic Spatiotemporal Forecasting
Early spatiotemporal models couple graph neural networks with temporal convolutions to capture spatial and temporal dependencies, either by learning an adaptive adjacency matrix (Wu et al. 2019) or by learning the graph structure jointly with the forecasting objective (Wu et al. 2020). Recent work shows that graph modules are not essential, reaching competitive accuracy through spatial and temporal normalization (Deng et al. 2021), identity embeddings on a multilayer perceptron (Shao et al. 2022), or an adaptive embedding in a Transformer backbone (Liu et al. 2023a). Later models further exploit the heterogeneity and periodicity of traffic (Dong et al. 2024; Shao et al. 2025). These models predict accurately, but they output a single trajectory and cannot express the uncertainty required for risk-aware decisions.
4.2 Generative Probabilistic Forecasting
Generative models instead sample future states from a learned conditional distribution, and most such models for spatiotemporal graphs are built on diffusion. The idea began
in probabilistic time series forecasting (Rasul et al. 2021; Tashiro et al. 2021) and was carried to spatiotemporal graphs by DiffSTG (Wen et al. 2023). Later models mainly differ in how past observations and spatial structure enter the denoiser, through imputation-style masking (Liu et al. 2023b), a pretrained deterministic encoder (Hu et al. 2024), or the graph spectral domain (Lin et al. 2025). Flow matching offers an alternative that transports the prior to the data distribution without a diffusion noise schedule (Kollovieh et al. 2025). Both paradigms capture uncertainty at two recurring costs. Sampling runs the network many times in sequence and is slow, and the point accuracy still falls behind the strongest deterministic models.
4.3 One-Step Generation and Flow Maps
Both diffusion and flow matching define generation as an ordinary differential equation solved with many small steps. One-step generators remove this cost by learning its solution operator directly, which is the flow map (Boffi, Albergo, and Vanden-Eijnden 2025). Consistency models are an early instance that maps every point on a trajectory to the same endpoint (Song et al. 2023), and later work generalizes this to arbitrary step sizes and continuous time (Kim et al. 2024; Frans et al. 2025; Sabour, Fidler, and Kreis 2026; Zhang et al. 2025), including MeanFlow, which learns the average velocity over an interval so one step spans the whole path (Geng et al. 2026). A unifying analysis views these methods as approximations of the same solution operator (Boffi, Albergo, and Vanden-Eijnden 2026), and most of them add a self-consistency term that keeps distinct modes apart, which matters for strongly multimodal image data.
5 Conclusion
We studied probabilistic traffic forecasting under a flow map formulation. We observed that traffic futures concentrate around a dominant mode given recent observations. This observation motivates relaxing trajectory consistency. Guided by this insight, we proposed a consistency-relaxed surrogate objective with a bounded approximation error. We then instantiated the objective in a Transformer flow map that produces a forecast in a single network evaluation. Experiments on four datasets showed accurate point predictions and competitive probabilistic scores. Both were achieved at a small fraction of the sampling cost of iterative baselines.
Our study has two main limitations. First, the proposed objective trades a small approximation bias for stable supervision, so its benefit is largest when the conditional future is close to unimodal, which is the regime our datasets fall in. Second, our evaluation covers highway flow datasets with a one-hour horizon, and other domains may exhibit stronger multimodality. Future work will extend the relaxed flow map to settings with richer multimodality and longer horizons.
References
Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; and Koyama, M. 2019. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.
Albergo, M.; Boffi, N. M.; and Vanden-Eijnden, E. 2025. Stochastic Interpolants: A Unifying Framework for Flows and Diffusions. Journal of Machine Learning Research, 26(209): 1–80.
Boffi, N.; Albergo, M.; and Vanden-Eijnden, E. 2026. How to build a consistency model: Learning flow maps via self-distillation. Advances in Neural Information Processing Systems, 38: 33346–33382.
Boffi, N. M.; Albergo, M. S.; and Vanden-Eijnden, E. 2025. Flow map matching with stochastic interpolants: A mathematical framework for consistency models. Transactions on Machine Learning Research.
Chen, R. T.; Rubanova, Y.; Bettencourt, J.; and Duvenaud, D. 2018. Neural ordinary differential equations. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, 6572–6583.
Chi, P.; and Ma, X. 2023. Difforecast: Image generation based highway traffic forecasting with diffusion model. In 2023 IEEE International Conference on Big Data (BigData), 608–615. IEEE.
Cui, Y.; Xie, J.; and Zheng, K. 2021. Historical inertia: A neglected but powerful baseline for long sequence time-series forecasting. In Proceedings of the 30th ACM international conference on information & knowledge management, 2965–2969.
Deng, J.; Chen, X.; Jiang, R.; Song, X.; and Tsang, I. W. 2021. ST-Norm: Spatial and Temporal Normalization for Multi-variate Time Series Forecasting. In Proceedings of the 27th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 269–278.
Dong, Z.; Jiang, R.; Gao, H.; Liu, H.; Deng, J.; Wen, Q.; and Song, X. 2024. Heterogeneity-Informed Meta-Parameter Learning for Spatiotemporal Time Series Forecasting. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.
Ferro, C. 2014. Fair scores for ensemble forecasts. Quarterly Journal of the Royal Meteorological Society, 140(683): 1917–1923.
Frans, K.; Hafner, D.; Levine, S.; and Abbeel, P. 2025. One Step Diffusion via Shortcut Models. In International Conference on Learning Representations.
Geng, Z.; Deng, M.; Bai, X.; Kolter, Z.; and He, K. 2026. Mean flows for one-step generative modeling. Advances in Neural Information Processing Systems, 38: 75460–75482.
Geng, Z.; Lu, Y.; Wu, Z.; Shechtman, E.; Kolter, J. Z.; and He, K. 2025a. Improved mean flows: On the challenges of fast-forward generative models. arXiv preprint arXiv:2512.02012.
Geng, Z.; Pokle, A.; Luo, W.; Lin, J.; and Kolter, Z. 2025b. Consistency models made easy. In International Conference on Learning Representations, volume 2025, 75158–75185.
Gneiting, T.; and Raftery, A. E. 2007. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477): 359–378.
Hendrycks, D.; and Gimpel, K. 2017. Bridging Nonlinearities and Stochastic Regularizers with Gaussian Error Linear Units.
Ho, J.; Jain, A.; and Abbeel, P. 2020. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33: 6840–6851.
Ho, J.; and Salimans, T. 2021. Classifier-Free Diffusion Guidance. In NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications.
Hu, J.; Liu, X.; Fan, Z.; Liang, Y.; and Zimmermann, R. 2024. Towards unifying diffusion models for probabilistic spatio-temporal graph learning. In Proceedings of the 32nd ACM International Conference on Advances in Geographic Information Systems, 135–146.
Ji, J.; Wang, J.; Huang, C.; Wu, J.; Xu, B.; Wu, Z.; Zhang, J.; and Zheng, Y. 2023. Spatio-temporal self-supervised learning for traffic flow prediction. In Proceedings of the AAAI conference on artificial intelligence, volume 37, 4356–4364.
Jiang, R.; Wang, Z.; Yong, J.; Jeph, P.; Chen, Q.; Kobayashi, Y.; Song, X.; Fukushima, S.; and Suzumura, T. 2023. Spatio-temporal meta-graph learning for traffic forecasting. In Proceedings of the AAAI conference on artificial intelligence, volume 37, 8078–8086.
Kim, D.; Lai, C.-H.; Liao, W.; Murata, N.; Takida, Y.; Uesaka, T.; He, Y.; Mitsufuji, Y.; and Ermon, S. 2024. Consistency trajectory models: Learning probability flow ode trajectory of diffusion. In International Conference on Learning Representations, volume 2024, 44493–44525.
Kollovieh, M.; Lienen, M.; Lüdke, D.; Schwinn, L.; and Günnemann, S. 2025. Flow matching with gaussian process priors for probabilistic time series forecasting. In International Conference on Learning Representations, volume 2025, 95435–95457.
Li, M.; and Zhu, Z. 2021. Spatial-temporal fusion graph neural networks for traffic flow forecasting. In Proceedings of the AAAI conference on artificial intelligence, volume 35, 4189–4196.
Liang, Y.; Shao, Z.; Wang, F.; Zhang, Z.; Sun, T.; and Xu, Y. 2022. Basicts: An open source fair multivariate time series prediction benchmark. In International symposium on benchmarking, measuring and optimization, 87–101. Springer.
Lin, L.; Shi, D.; Han, A.; and Gao, J. 2025. Specstg: A fast spectral diffusion framework for probabilistic spatiotemporal traffic forecasting. In 2025 International Joint Conference on Neural Networks (IJCNN), 1–10. IEEE.
Lipman, Y.; Chen, R. T. Q.; Ben-Hamu, H.; Nickel, M.; and Le, M. 2023. Flow Matching for Generative Modeling. In The Eleventh International Conference on Learning Representations.
Liu, H.; Dong, Z.; Jiang, R.; Deng, J.; Deng, J.; Chen, Q.; and Song, X. 2023a. STAEformer: Spatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traf fic Forecasting. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management (CIKM), 4115–4119.
Liu, M.; Huang, H.; Feng, H.; Sun, L.; Du, B.; and Fu, Y. 2023b. Pristi: A conditional diffusion framework for spatiotemporal imputation. In 2023 IEEE 39th international conference on data engineering (ICDE), 1927–1939. IEEE.
Luo, T.; Yuan, H.; and Liu, Z. 2025. SoFlow: Solution Flow Models for One-Step Generative Modeling. arXiv preprint arXiv:2512.15657.
Rasul, K.; Seward, C.; Schuster, I.; and Vollgraf, R. 2021. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. In International conference on machine learning, 8857–8868. PMLR.
Rombach, R.; Blattmann, A.; Lorenz, D.; Esser, P.; and Ommer, B. 2022. High-Resolution Image Synthesis with Latent Diffusion Models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 10684–10695.
Sabour, A.; Fidler, S.; and Kreis, K. 2026. Align your flow: Scaling continuous-time flow map distillation. Advances in Neural Information Processing Systems, 38: 146459–146512.
Shao, M.; Zhang, Z.; Wang, Y.; Dai, Y.; Shen, X.; and Wang, X. 2025. HyperD: Hybrid Periodicity Decoupling Framework for Traffic Forecasting. arXiv preprint arXiv:2511.09275.
Shao, Z.; Zhang, Z.; Wang, F.; and Xu, Y. 2022. Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management (CIKM), 4454–4458.
Song, J.; Meng, C.; and Ermon, S. 2021. Denoising Diffusion Implicit Models. In International Conference on Learning Representations.
Song, Y.; and Dhariwal, P. 2024. Improved techniques for training consistency models. In International Conference on Learning Representations, volume 2024, 15078–15097.
Song, Y.; Dhariwal, P.; Chen, M.; and Sutskever, I. 2023. Consistency models. In Proceedings of the 40th International Conference on Machine Learning, 32211–32252.
Tashiro, Y.; Song, J.; Song, Y.; and Ermon, S. 2021. Csdi: Conditional score-based diffusion models for probabilistic time series imputation. Advances in neural information processing systems, 34: 24804–24816.
Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A. N.; Kaiser, L.; and Polosukhin, I. 2017. Attention is all you need. Advances in neural information processing systems, 30.
Wen, H.; Lin, Y.; Xia, Y.; Wan, H.; Wen, Q.; Zimmermann, R.; and Liang, Y. 2023. Diffstg: Probabilistic spatio-temporal graph forecasting with denoising diffusion models. In Proceedings of the 31st ACM international conference on advances in geographic information systems, 1–12.
Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Chang, X.; and Zhang, C. 2020. Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 753–763.
Wu, Z.; Pan, S.; Long, G.; Jiang, J.; and Zhang, C. 2019. Graph WaveNet for Deep Spatial-Temporal Graph Modeling. In Proceedings of the 28th International Joint Conference on Artificial Intelligence (IJCAI), 1907–1913.
Yan, H.; and Li, Y. 2023. A survey of generative AI for intelligent transportation systems: Road transportation perspective. arXiv preprint arXiv:2312.08248.
Yin, X.; Wu, G.; Wei, J.; Shen, Y.; Qi, H.; and Yin, B. 2021. Deep learning on traffic prediction: Methods, analysis, and future directions. IEEE Transactions on Intelligent Transportation Systems, 23(6): 4927–4943.
Zhang, H.; Siarohin, A.; Menapace, W.; Vasilkovsky, M.; Tulyakov, S.; Qu, Q.; and Skorokhodov, I. 2025. Alphaflow: Understanding and improving meanflow models. arXiv preprint arXiv:2510.20771.
6 Proofs
6.1 Proof of Proposition 1
Proof. The objective function is defined as an expected squared distance. For any fixed time steps t and s, and conditioning variable c, minimizing the expected loss over the neural network parameters gives:
Since the factor is positive and independent of , it does not affect the population minimizer for any fixed . By standard properties of the loss, the optimal population minimizer is strictly given by the conditional expectation of the target given the input state and condition :
To analyze the behavior of this optimal minimizer for small time steps, we perform a Taylor expansion of with respect to around :
On the other hand, the Taylor expansion of the exact flow map around is:
Finally, we compare the optimal surrogate minimizer with the exact true flow map and obtain:
This demonstrates that the optimal population minimizer for the objective approximates the exact flow map with an error strictly bounded by .
6.2 Proof of Proposition 2
Proof. The velocity field model used in the CFM objective can be represented as the time derivative of the flow map model evaluated at s = t:
Taking the Taylor expansion of with respect to s around t, we obtain:
Besides, we perform a Taylor expansion of the target state around time t:
Substituting the expanded forms of and back into the difference term in the objective function :
Substituting the difference into the objective function :
Taking the limit as , the residual term vanishes. The expectation over the target time s drops out, resulting in:
7 Experimental Configuration
7.1 Data Availability
We utilize the preprocessed data published by STAEformer (Liu et al. 2023a), accessible via their GitHub repository: https://github.com/XDZhelheim/STAEformer/tree/main/data.
7.2 Preprocessing
We use Z-score normalization for data preprocessing. Specifically, we calculate the mean and standard deviation of the traffic states data from the training set, and then apply the same normalization to the training, validation, and test sets.
7.3 Hyperparameters
The hyperparameters for various datasets are listed in Table 4, and their search space is shown in Table 5. We employed Optuna (Akiba et al. 2019) for hyperparameter optimization and chose the combination with the minimum Huber loss.
| Parameter | PEMS | |||
|---|---|---|---|---|
| 03 | 04 | 07 | 08 | |
| EMA decay | 0.9995 | |||
| Learning rate | 0.0002 | |||
| Early stop | 10 | |||
| Batch size | 8 | |||
| clip_grad | 0.5 | 0 | 0.5 | 1 |
| Model dim (D) | 128 | 256 | 256 | 256 |
| Attention heads | 8 | 4 | 8 | 4 |
| Transformer FFN dim | 512 | 2048 | 1024 | 1024 |
| Blocks (L) | 8 | 5 | 10 | 6 |
| Dropout rate | 0.3 | 0.2 | 0.1 | 0.2 |
| Adaptive weight (c) | 0.001 | |||
| Adaptive weight (p) | 1.25 | |||
| t, s sampler | LogNormal( , ) | |||
| sampling mean ( ) | -1.4 | -1.2 | -1.6 | -2.4 |
| sampling std ( ) | 1.8 | 1.6 | 1.6 | 1.2 |
| Ratio | 0.5 | 0.5 | 0.25 | 0.75 |
Table 4: Model Hyperparameters for Different Datasets.
7.4 Random Seeds and Repeated Runs
We use three independent training seeds, {2024, 2025, 2026}. The seed is set before model initialization and reset before constructing the data loaders. During evaluation, the sampling seed is fixed to 0. Tables 6 and 7 use three runs per trainable model–dataset pair.
7.5 Computing Environment
The models were trained and evaluated on an NVIDIA GH200 GPU using PyTorch 2.12.1 and Python 3.13.5, with CUDA 13.0 on an AlmaLinux 9.8 operating system.
8 Evaluation Metrics
We evaluate deterministic models using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). For generative models,
| Parameters | Searching Space |
|---|---|
| Adaptive weight (p) | |
| sampling mean () | |
| sampling std () | |
| model dim () | |
| Transformer FFN dim | |
| Attention heads | |
| Blocks () | |
| Dropout rate | |
| Ratio | |
| EMA decay | 0.9995 |
| Learning rate | 0.0002 |
| Batch size | 8 |
| Early stop | 10 |
| Adaptive weight (c) | 0.001 |
Table 5: Hyperparameter Searching Space
we additionally use the Continuous Ranked Probability Score (CRPS) to evaluate the accuracy of the predictive distribution.
Let denote the set of all scalar forecast entries in the test set, including all test windows, spatial nodes, forecast horizons, and feature channels. For , let denote the target value from , and let denote the corresponding value in the -th predictive trajectory. For a generative model with trajectories, the point prediction is defined as
For a deterministic model, denotes its direct output. We use for generative evaluation. When , is a single sample generated by the model. The point prediction metrics are defined as
where . Zero-valued targets are excluded following the common practice (Liang et al. 2022). All metrics are averaged jointly over the complete forecast horizon.
For probabilistic evaluation, let denote the predictive distribution at entry . Let and be independent draws from . CRPS has the energy representation
Following Gneiting and Raftery (2007), we use CRPS to evaluate each scalar predictive marginal. We estimate CRPS
from independent predictive samples using the fair ensemble estimator of Ferro (2014):
The denominator excludes self-pairs and provides an unbiased estimate of the CRPS of the underlying predictive distribution. This correction avoids the finite-sample bias induced by treating the predictive samples as a finite empirical distribution. Lower values indicate better performance for all four metrics.
9 Additional Experimental Results
We report the mean and standard deviation over three runs with different random seeds. The complete results for deterministic and generative predictions are presented in Tables 6 and 7, respectively.
10 Inference Efficiency
We evaluate the inference latency of all models. For deterministic models, we measure the latency for producing a complete 12-step point forecast. For generative models, we measure the end-to-end latency for generating the complete 12-step forecast with trajectories. We use a batch size of 1 and report the median over 200 runs after 50 warm-up runs on NVIDIA GH200 GPUs. Data loading, checkpoint loading, and metric computation are excluded. The complete results on PEMS07 and PEMS08 are shown in Fig. 7 and Fig. 8, respectively.
| Model | PEMS03 | PEMS04 | PEMS07 | PEMS08 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | |
| HI | 49.892 ± 0.000 | 32.619 ± 0.000 | 30.596 ± 0.000 | 61.659 ± 0.000 | 42.353 ± 0.000 | 29.922 ± 0.000 | 71.340 ± 0.000 | 49.288 ± 0.000 | 22.753 ± 0.000 | 50.452 ± 0.000 | 34.661 ± 0.000 | 21.631 ± 0.000 |
| GWNet | 25.080 ± 0.094 | 14.545 ± 0.019 | 14.857 ± 0.153 | 30.310 ± 0.069 | 18.948 ± 0.061 | 13.469 ± 0.449 | 33.517 ± 0.087 | 20.472 ± 0.119 | 8.683 ± 0.117 | 23.398 ± 0.044 | 14.586 ± 0.007 | 9.659 ± 0.268 |
| MTGNN | 25.653 ± 0.352 | 14.953 ± 0.061 | 15.523 ± 0.255 | 30.940 ± 0.020 | 19.084 ± 0.019 | 13.407 ± 0.197 | 34.102 ± 0.089 | 20.958 ± 0.071 | 8.985 ± 0.062 | 24.281 ± 0.094 | 15.252 ± 0.049 | 10.001 ± 0.157 |
| STNorm | 26.129 ± 0.337 | 15.275 ± 0.055 | 14.817 ± 0.296 | 31.440 ± 0.135 | 19.056 ± 0.078 | 12.861 ± 0.172 | 34.488 ± 0.299 | 20.508 ± 0.094 | 8.639 ± 0.033 | 24.860 ± 0.123 | 15.406 ± 0.078 | 9.838 ± 0.067 |
| STID | 27.606 ± 0.746 | 15.298 ± 0.073 | 16.166 ± 0.178 | 29.909 ± 0.048 | 18.402 ± 0.031 | 12.573 ± 0.045 | 32.741 ± 0.074 | 19.645 ± 0.031 | 8.314 ± 0.026 | 23.350 ± 0.068 | 14.226 ± 0.008 | 9.356 ± 0.054 |
| STAEformer | 25.549 ± 0.257 | 15.010 ± 0.058 | 15.415 ± 0.254 | 30.199 ± 0.272 | 18.154 ± 0.072 | 12.455 ± 0.064 | 32.891 ± 0.181 | 19.438 ± 0.139 | 8.028 ± 0.024 | 23.225 ± 0.049 | 13.511 ± 0.058 | 8.858 ± 0.016 |
| HimNet | 26.898 ± 0.320 | 15.182 ± 0.125 | 15.730 ± 0.387 | 30.077 ± 0.120 | 18.234 ± 0.072 | 12.076 ± 0.111 | 32.620 ± 0.034 | 19.238 ± 0.014 | 8.276 ± 0.180 | 23.322 ± 0.051 | 13.592 ± 0.016 | 8.987 ± 0.043 |
| HyperD | 24.205 ± 0.104 | 14.940 ± 0.054 | 16.023 ± 0.124 | 30.018 ± 0.082 | 18.240 ± 0.042 | 12.510 ± 0.041 | 33.278 ± 0.021 | 19.434 ± 0.010 | 8.116 ± 0.025 | 23.318 ± 0.012 | 13.640 ± 0.005 | 9.016 ± 0.007 |
| CoReFlow | 25.321 ± 0.156 | 14.460 ± 0.051 | 14.389 ± 0.093 | 29.880 ± 0.043 | 17.936 ± 0.048 | 11.774 ± 0.083 | 32.601 ± 0.025 | 18.783 ± 0.034 | 7.752 ± 0.010 | 22.875 ± 0.028 | 13.197 ± 0.007 | 8.581 ± 0.043 |
Table 6: Performance comparison with deterministic models. CoReFlow is evaluated using one-sample generation (N=1). All results are reported as mean ± standard deviation over three runs with different random seeds. Best and second-best mean values are shown in bold and underlined, respectively.
| Metric | DiffSTG | USTD | SpecSTG | CoReFlow | |
|---|---|---|---|---|---|
| PEMS07 | RMSE | 55.926 ± 6.590 | 40.747 ± 1.351 | 49.917 ± 0.615 | 32.601 ± 0.025 |
| MAE | 39.047 ± 5.587 | 26.602 ± 1.137 | 35.630 ± 0.454 | 18.783 ± 0.034 | |
| MAPE | 21.431 ± 5.838 | 12.699 ± 0.695 | 19.172 ± 0.061 | 7.752 ± 0.010 | |
| RMSE | 44.802 ± 5.500 | 36.934 ± 0.434 | 39.458 ± 0.860 | 32.562 ± 0.025 | |
| 10 samples | MAE | 31.085 ± 4.766 | 24.297 ± 0.602 | 26.298 ± 0.693 | 18.731 ± 0.036 |
| MAPE | 18.430 ± 5.809 | 12.060 ± 0.625 | 13.759 ± 0.082 | 7.693 ± 0.009 | |
| CRPS | 21.335 ± 3.230 | 19.226 ± 0.281 | 18.527 ± 0.514 | 18.201 ± 0.038 | |
| RMSE | 34.577 ± 0.776 | 30.707 ± 1.632 | 34.045 ± 1.237 | 22.875 ± 0.028 | |
| PEMS08 | MAE | 22.921 ± 0.666 | 19.801 ± 1.360 | 24.370 ± 0.912 | 13.197 ± 0.007 |
| MAPE | 14.561 ± 0.254 | 13.801 ± 0.964 | 21.507 ± 1.531 | 8.581 ± 0.043 | |
| RMSE | 27.334 ± 0.404 | 26.892 ± 1.124 | 27.204 ± 0.735 | 22.843 ± 0.028 | |
| MAE | 17.921 ± 0.380 | 17.456 ± 1.017 | 18.175 ± 0.514 | 13.163 ± 0.008 | |
| 10 samples | MAPE | 11.511 ± 0.089 | 12.780 ± 0.837 | 16.106 ± 1.349 | 8.546 ± 0.040 |
| CRPS | 14.016 ± 0.227 | 13.161 ± 0.650 | 12.817 ± 0.323 | 12.741 ± 0.022 |
Table 7: Performance comparison with generative models. All results are reported as mean ± standard deviation over three runs with different random seeds. Best and second-best mean values are shown in bold and underlined, respectively.

Figure 7: The full results of inference latency on PEMS07.

Figure 8: The full results of inference latency on PEMS08.