Spatial-Temporal Feedback Diffusion Guidance for Controlled Traffic Imputation

Xiaowei Mao, Huihu Ding, Yan Lin, Tingrui Wu, Shengnan Guo, Dazhuo Qiu, Feiling Fang, Jilin Hu, Huaiyu WanarXiv 2026

TL;DR

Standard diffusion models for traffic data imputation fail when data is highly sparse because they rely on a fixed guidance scale, causing the model to ignore observations and drift toward generic averages. This paper introduces FENCE, a framework that dynamically adjusts the guidance scale based on real-time feedback of how well generated samples match actual observations. By combining this feedback loop with a cluster-aware mechanism, FENCE achieves state-of-the-art imputation accuracy, outperforming existing models by over 6% on average.

What Problem Does This Paper Address?

Intelligent Transportation Systems (ITS) rely heavily on continuous spatial-temporal data from traffic sensors to predict traffic flow and control signals. However, sensor malfunctions and network drops frequently cause large gaps in this data.

While score-based diffusion models have become a popular tool for filling these gaps (imputation) by treating it as a conditional generation task, they have a major limitation: they apply a uniform, fixed guidance scale across all sensors and time steps. When a sensor has a very high missing data rate, the sparse observations provide weak conditional guidance. As a result, the generative process suffers from "prior collapse"—the model ignores the few available clues and drifts toward a generic, unconditional prior distribution, leading to inaccurate, "averaged-out" imputations.

Figure 1: Motivation for FENCE. Unlike CSDI, which uses a fixed guidance scale, FENCE dynamically adjusts guidance scale based on consistency with observed data.

Methods

The authors propose FENCE (Spatial-Temporal FEedback Diffusion GuidaNCE) to adaptively control guidance scales during the denoising process. It introduces two core innovations:

  1. Posterior-Driven Dynamic Guidance Scaling: Instead of using a fixed hyperparameter, FENCE continuously estimates the posterior likelihood at each denoising step. This likelihood measures how well the currently generated sample aligns with the observed data. If the sample drifts away from the observations, FENCE automatically increases the guidance scale to enforce consistency. If it aligns well, it lowers the scale to prevent overcorrection.
  2. Cluster-Aware Feedback Guidance: Because different sensors experience different missing rates, a single global guidance scale is suboptimal. FENCE dynamically groups sensors into clusters at each denoising step using K-means clustering on the spatial attention scores generated by the network. It then calculates a stable, aggregated guidance scale for each cluster, leveraging spatial-temporal correlations to help sensors with highly sparse data.

FENCE uses a two-stage training strategy: first training an unconditional model to learn the data prior, and then fine-tuning it with conditional observations to ensure the two score functions are modeled accurately.

Figure 2: FENCE performs imputation by estimating both conditional and unconditional scores. It dynamically adjusts the guidance scale at each step by evaluating the posterior likelihood, controlling the scales of the conditional guidance strength to ensure consistency with observed data.

Datasets

The model was evaluated on three standard real-world traffic flow datasets from the Caltrans Performance Measurement System (PeMS):

  • PEMS04: 307 nodes over 2 months.
  • PEMS07: 883 nodes over 4 months.
  • PEMS08: 170 nodes over 2 months.

The authors evaluated performance under an 80% missing data rate using two challenging patterns: Spatially Random, Temporally Contiguous (SR-TC) and Spatially Clustered, Temporally Contiguous (SC-TC).

Key Insights and Ideas

  • The Gradient Norm Clue: The authors observed that in standard diffusion models like CSDI, sensors with no observations exhibit a consistently low gradient norm during generation. This quantitatively proves that the model stops listening to the context and collapses to the unconditional prior.
  • Free Feedback via the Markov Chain: By tracking the reverse Markov chain, the model can approximate the log-posterior likelihood at each step simply by comparing the mathematical outputs of its conditional and unconditional denoising passes. This provides a dynamic feedback signal without requiring extra labels.
  • Dynamic Clustering over Static Graphs: Traffic patterns change dynamically. By clustering nodes based on attention scores during the denoising process rather than relying on a static road network graph, FENCE allows data-rich nodes to stabilize and accurately guide the scale adjustments for nearby data-poor nodes.

Key Results

  • State-of-the-Art Accuracy: FENCE consistently achieved the highest accuracy across all three datasets and both missing data patterns, outperforming the second-best baseline by an average of 6.26% in MAPE (Mean Absolute Percentage Error).
  • Robustness to Extreme Sparsity: Under the highly challenging Spatially Clustered (SC-TC) scenario where entire communities of sensors drop out simultaneously, FENCE maintained a significant edge over other generative and discriminative models.
  • Ablation Validation: Removing either the feedback mechanism (wo-F) or the clustering strategy (wo-C) led to a clear degradation in performance across all evaluation metrics (MAE, RMSE, MAPE, and CRPS), proving both components are vital.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@misc{mao2026spatial,
  author = {Xiaowei Mao and Huihu Ding and Yan Lin and Tingrui Wu and Shengnan Guo and Dazhuo Qiu and Feiling Fang and Jilin Hu and Huaiyu Wan},
  title = {{Spatial-Temporal Feedback Diffusion Guidance for Controlled Traffic Imputation}},
  year = {2026},
  eprint = {2601.04572},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.04572},
}
Figure