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 Wan Abstract Imputing missing values in spatial-temporal traffic data is essential for intelligent transportation systems. Among advanced imputation methods, score-based diffusion models have demonstrated competitive performance. These models generate data by reversing a noising process, using observed values as conditional guidance. However, existing diffusion models typically apply a uniform guidance scale across both spatial and temporal dimensions, which is inadequate for nodes with high missing data rates. Sparse observations provide insufficient conditional guidance, causing the generative process to drift toward the learned prior distribution rather than closely following the conditional observations, resulting in suboptimal imputation performance. To address this, we propose FENCE, a spatial-temporal feedback diffusion guidance method designed to adaptively control guidance scales during imputation. First, FENCE introduces a dynamic feedback mechanism that adjusts the guidance scale based on the posterior likelihood approximations. The guidance scale is increased when generated values diverge from observations and reduced when alignment improves, preventing overcorrection. Second, because alignment to observations varies across nodes and denoising steps, a global guidance scale for all nodes is suboptimal. FENCE computes guidance scales at the cluster level by grouping nodes based on their attention scores, leveraging spatial-temporal correlations to provide more accurate guidance. Experimental results on real-world traffic datasets show that FENCE significantly enhances imputation accuracy. † † footnotetext: \dagger Corresponding author. † † footnotetext: * These authors contributed equally. Code — https://github.com/maoxiaowei97/FENCE Introduction Spatial-temporal traffic data are often represented as a graph of spatial-temporal time series, where each node is a traffic sensor continuously collecting observations and edges describe sensor relationships ( 10 ) . Traffic data is essential for Intelligent Transportation Systems (ITS), supporting key services in ITS, such as real-time traffic display, traffic prediction, and traffic signal control. However, this data is frequently incomplete due to equipment malfunctions, and network failures. These missing values degrade the performance of dependent applications. Consequently, imputing missing values is essential to ensure data quality and reliability ( 25 ; 17 ) . Figure 1: Motivation for FENCE. Unlike CSDI, which uses a fixed guidance scale, FENCE dynamically adjusts guidance scale based on consistency with observed data. Deep learning paradigms for spatial-temporal imputation can be broadly categorized into two main approaches: discriminative and generative models. Discriminative models directly learn a mapping function from observed to missing values using architectures like Recurrent Neural Networks (RNNs) ( 18 ) , Graph Neural Networks (GNNs) ( 14 ) , and Transformers ( 19 ) . While often straightforward to train, their focus on direct prediction limits their ability to capture data distributions and the uncertainty associated with missing values. In contrast, generative models aim to learn the underlying probability distribution of the data, enabling high-fidelity imputations ( 16 ; 30 ) . Imputation is formulated as a conditional generation task, where missing values are sampled from this learned distribution based on the observed data ( 31 ) . Among these, score-based diffusion models ( 23 ) have emerged as a competitive method for imputation. These models learn the score function, defined as the gradient of the data’s log-likelihood, and utilize the conditional score to guide the generation process. However, these models often yield suboptimal performance, particularly for nodes with high missing data rates. As illustrated in Fig. 1 , a node with no observations during a time period is imputed inaccurately by CSDI ( 24 ) , where even the estimated lower and upper bounds may fail to encompass the ground truth. This issue can be quantitatively assessed by examining the generative process. The degree to which the generated data \boldsymbol{x}_{k} satisfies condition \boldsymbol{c} is measured by the posterior likelihood, p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) . To improve this likelihood, the diffusion model is guided by the gradient of the log-posterior likelihood. This guidance term is approximated by the difference between the conditional and unconditional score functions: \nabla_{\boldsymbol{x}_{k}}{\log}p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-\nabla_{\boldsymbol{x}_{k}}{\log}p_{\theta,k}(\boldsymbol{x}_{k}) . The L2-norm of this gradient vector quantifies the guidance strength. As shown in Fig. 1 , during the generation process of CSDI, the node without observations exhibits a consistently low gradient norm. This indicates that the learned conditional distribution has collapsed to the unconditional prior. Consequently, the generative process is biased towards sampling from the marginal distribution p_{\theta,k}(\boldsymbol{x}_{k}) instead of the conditional distribution p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c}) . Existing diffusion models for imputation lack mechanisms to control the guidance strength, leading to insufficient adherence to specific conditional observations and suboptimal performance. To address this issue, we propose FENCE (Spatial-Temporal FE edback Diffusion Guida NCE ), a novel method for controlled traffic imputation that dynamically adjusts the guidance scales throughout the generative process. FENCE introduces a feedback mechanism that adjusts the guidance scale based on an approximation of the posterior likelihood. Specifically, when the posterior likelihood decreases, indicating that the generated values do not sufficiently adhere to the conditional observations, the guidance scale is increased to enhance alignment with the observations. In contrast, when the posterior likelihood is high, indicating good alignment between the generated values and the observations, the guidance scale is reduced to avoid overcorrection. Furthermore, to account for varying degrees of alignment with conditional observations across different nodes, FENCE computes the guidance scale at the cluster level. By leveraging spatial-temporal correlations, FENCE ensures more accurate guidance scale adjustments for nodes with limited data availability, thereby improving the imputation quality. Our contributions are summarized as follows: • We propose FENCE, a spatial-temporal feedback diffusion guidance method that dynamically controls the guidance scales during the generative process, ensuring high-fidelity imputation of missing traffic data. • We propose a cluster-aware guidance mechanism that leverages spatial-temporal correlations to compute accurate guidance scales tailored to each node. • Extensive experiments show that FENCE significantly enhances the imputation accuracy in real-world spatial-temporal traffic datasets. Related Work Spatial-Temporal Imputation . Spatial-temporal imputation methods can be broadly classified into discriminative and generative paradigms. Discriminative models ( 1 ; 2 ; 27 ) , such as SAITS ( 6 ) and ImputeFormer ( 19 ) , learn deterministic mappings from observed data but fail to explicitly model data distributions. In contrast, generative models aim to learn the underlying data distribution and treat imputation as conditional sampling, generating plausible values for the missing entries given the observed data ( 30 ; 8 ; 12 ) . Score-based diffusion models are powerful generative models for imputation. These models learn the score function, which is the gradient of the log-likelihood of the data distribution. During imputation, they leverage the score of the conditional distribution to estimate missing values. Models such as CSDI ( 24 ) and MIDM ( 26 ) condition the diffusion process on available observations. Several extensions further enhance conditioning: LSCD ( 7 ) incorporates spectral information; and PriSTI ( 15 ) integrates geographic context. To improve imputation consistency and inference speed, CSBI ( 5 ) leverages a Schrödinger bridge formulation; MTSCI ( 31 ) generates multiple masks and auxiliary conditions during training; DSDI ( 29 ) incorporates the predicted values into the denoising process, and CoSTI ( 22 ) employs consistency training to reduce inference times. Despite their effectiveness in modeling complex distributions, diffusion models face challenges in spatial-temporal imputation, especially for nodes with high missing rates. In such cases, the limited observed data may be insufficient to effectively guide the model from its learned prior to converge to the true conditional distribution. Consequently, the imputed values often reflect general data patterns rather than adhering to the available observations. A key limitation is that current models lack mechanisms to dynamically adjust the scales of guidance strength based on the observed data. Preliminaries Definition 1. Traffic Network. We define the traffic network as a graph, i.e., G=(V,E,\mathbf{A}) , where V represents the set of |V|=N nodes (e.g., traffic sensors). E represents the set of edges. \mathbf{A}\in\mathbb{R}^{N\times N} is the adjacency matrix. Definition 2. Traffic Data. Let x_{v,t}\in\mathbb{R} denote the traffic data observed at node v\in V at time slice t . The traffic data at time t across all nodes is \boldsymbol{x}_{t}=(x_{1,t},x_{2,t},\dots,x_{N,t})\in\mathbb{R}^{N} , and the traffic data over T time slices is \boldsymbol{x}=(\boldsymbol{x}_{1},\boldsymbol{x}_{2},\dots,\boldsymbol{x}_{T})\in\mathbb{R}^{N\times T} . Definition 3. Mask Matrix. To indicate the missing position in the observed traffic data, we introduce an observation masking matrix \mathbf{M}\in\mathbb{R}^{N\times T} , where m_{v,t}=0 when x_{v,t} is missing, and m_{v,t}=1 when x_{v,t} is observed. The observed values in \boldsymbol{x} are denoted as \boldsymbol{x}^{o}=\boldsymbol{x}\odot\mathbf{M} , and the missing values in \boldsymbol{x} are denoted as \boldsymbol{x}^{m}=\boldsymbol{x}\odot(\mathbf{1}-\mathbf{M}) . Spatial-Temporal Traffic Imputation. Given the incomplete traffic observations \boldsymbol{x} , the mask matrix \mathbf{M}\in\mathbb{R}^{N\times T} over T time slices, and a network graph G , the objective is to estimate the missing values in \boldsymbol{x} such that the estimation error at the missing positions is minimized. Methods This section presents our controlled traffic imputation method, beginning with guidance in diffusion models for imputation. We then propose spatial-temporal feedback diffusion guidance, followed by the theoretical foundations, key mechanisms, and procedures for training and inference. 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. Guidance in Diffusion Models for Traffic Imputation In spatial-temporal diffusion models for traffic imputation, guidance is achieved by conditioning the reverse process on observed data and structural priors. This conditional information \boldsymbol{c} , is produced by a conditioning network \mathcal{F}_{cond} , which captures temporal and spatial dependencies. Given the observed data \boldsymbol{x}^{o} , the network first employs temporal attention to capture dependencies across time for each node, followed by spatial attention to aggregate information across nodes for each time slice. The conditioning also incorporates structural priors, such as node embeddings \mathbf{E_{\text{node}}}\in\mathbb{R}^{N\times d} and learnable time slice embeddings \mathbf{E_{\text{time}}}\in\mathbb{R}^{T\times d} . The resulting vector, \boldsymbol{c}=\mathcal{F}_{cond}(\boldsymbol{x}^{o},\mathbf{E_{\text{node}}},\mathbf{E_{\text{time}}}) , then guides the reverse process. Starting from Gaussian noise \boldsymbol{x}_{K}\sim\mathcal{N}(\mathbf{0},\mathbf{I}) , the model iteratively denoises the sample, with each step of the reverse process conditioned on \boldsymbol{c} : p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})=\mathcal{N}(\boldsymbol{x}_{k-1};{\mu}_{\theta}(\boldsymbol{x}_{k},k,\boldsymbol{c}),\sigma_{k}^{2}\mathbf{I}), (1) where the mean {\mu}_{\theta} is parameterized using a denoising network {\epsilon}_{\theta} that predicts the added noise at step k : {\mu}_{\theta}(\boldsymbol{x}_{k},k,\boldsymbol{c})=\frac{1}{\sqrt{\alpha_{k}}}\left(\boldsymbol{x}_{k}-\frac{1-\alpha_{k}}{\sqrt{1-\bar{\alpha}_{k}}}{\epsilon}_{\theta}(\boldsymbol{x}_{k},k,\boldsymbol{c})\right) (2) The denoising network {\epsilon}_{\theta} is trained to learn the conditional score function, where the score is proportional to the predicted noise: \nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})=-\frac{1}{\sqrt{1-\bar{\alpha}_{k}}}{\epsilon}_{\theta}(\boldsymbol{x}_{k},k,\boldsymbol{c}) . This score function provides the gradient direction to iteratively guide the sample \boldsymbol{x}_{k} to maximize its likelihood under the learned conditional distribution. While the objective of a diffusion model is to maximize the data likelihood, this does not ensure the maximization of the posterior likelihood, p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) , which quantifies how well a sample satisfies the observations. To better align the generated data with the observations, the reverse process can be guided by the gradient of the log-posterior likelihood, \nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) , which can be formulated in terms of learnable components using Bayes’ theorem: \nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})=\nabla_{\boldsymbol{x}_{k}}{\log}p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-\nabla_{\boldsymbol{x}_{k}}{\log}p_{\theta,k}(\boldsymbol{x}_{k}) (3) This equation reveals that the guidance can be achieved by subtracting the unconditional score, \nabla_{\boldsymbol{x}_{k}}{\log}p_{\theta,k}(\boldsymbol{x}_{k}) , from the conditional score. Classifier Free Guidance (CFG) ( 11 ) provides an efficient implementation by training a single denoising network to learn both scores. This is achieved by randomly providing the network during training with either the conditioning vector or an unconditional vector. The latter is constructed to model the prior distribution by feeding the conditioning network empty observations while retaining the structural priors. Using these scores, CFG constructs a guidance score by leveraging the gradient of the log-posterior likelihood. Specifically, the guidance score, \nabla\log\tilde{p}_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c}) , is constructed by scaling this gradient (as derived in Eq. 3 ) by a guidance scale \lambda and adding it to the unconditional score: \begin{split}\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})={}&\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k})\\ &+\lambda\big(\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})\\ &-\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k})\big)\end{split} (4) The guidance scale \lambda is a hyperparameter that adjusts the strength of the conditioning signal. Spatial-Temporal Feedback Diffusion Guidance CFG applies a uniform guidance scale \lambda to all nodes across all denoising steps. This approach has two limitations for traffic imputation. First, \lambda is a fixed hyperparameter that is difficult to optimize. Second, it fails to account for the varying degrees to which imputed values for different nodes satisfy the conditional observations at different times. To address this, we introduce a feedback guidance mechanism that adaptively adjusts the guidance scales based on the posterior likelihood at each denoising step k . The posterior likelihood quantifies the alignment between the generated sample \boldsymbol{x}_{k} and the condition \boldsymbol{c} . When the posterior likelihood is high, indicating good alignment with the observed data, then the guidance scale remains low to avoid overcorrection. In contrast, when the posterior likelihood decreases, the guidance scale is increased to ensure adherence to the conditional information. Posterior-Driven Dynamic Guidance Scaling To enable controlled imputation, we begin by introducing a global guidance mechanism. This approach treats the traffic data matrix comprising all nodes over T time slices as a sample. At each denoising step k , a unified guidance scale, denoted as \lambda(\boldsymbol{x}_{k},k) , is dynamically adjusted for the corresponding noised sample \boldsymbol{x}_{k} based on the posterior likelihood. This scale controls the guidance vector, which is the difference between the conditional and unconditional score estimates. We define the unconditional score as s_{\theta}(\boldsymbol{x}_{k}):=\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k}) and the conditional score as s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c}):=\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c}) . The resulting guidance score is: \begin{split}\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})={}&s_{\theta}(\boldsymbol{x}_{k})\\ &+\lambda(\boldsymbol{x}_{k},k)\left(s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c})-s_{\theta}(\boldsymbol{x}_{k})\right)\end{split} (5) To compute the guidance scale, we adopt the additive error formulation ( 13 ) . This formulation assumes that the learned conditional distribution p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c}) is a linear combination of the true conditional distribution p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) and the unconditional distribution p_{k}(\boldsymbol{x}_{k}) : p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})=(1-\pi)p_{k}(\boldsymbol{x}_{k})+\pi p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}), (6) where \pi\in[0,1] is a hyperparameter that indicates the prior confidence in how well the conditional generative model has learned to adhere to the condition \boldsymbol{c} . Next, we compute the score function of this target distribution. Applying the chain rule for logarithmic derivatives yields (see Appendix for the full derivation): \nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})=\frac{\nabla_{\boldsymbol{x}_{k}}\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right)}{p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})} (7) By formulating the probability densities in the numerator and denominator using Bayes’ theorem and applying the score identity ( \nabla_{\boldsymbol{x}_{k}}p(\boldsymbol{x}_{k})=p(\boldsymbol{x}_{k})\nabla_{\boldsymbol{x}_{k}}\log p(\boldsymbol{x}_{k}) ), this expression can be arranged into the guidance score formulation of Eq. 16 (see Appendix). This process yields the formulation for the guidance scale: \lambda(\boldsymbol{x}_{k},k)=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})-(1-\pi)} (8) In practice, assuming the prior p_{\theta,k}(\boldsymbol{c}) is constant yields: \lambda(\boldsymbol{x}_{k},k)\approx\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})-(1-\pi)} (9) This formulation indicates that the guidance scale is a function of the posterior likelihood p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) , and achieves our objective: when the posterior is high, indicating high consistency with the condition \boldsymbol{c} , the guidance scale approaches 1. As the posterior likelihood decreases toward the threshold (1-\pi) , the guidance scale increases, applying stronger guidance to ensure adherence to the conditional distribution. Posterior Likelihood Estimation The formulation for \lambda(\boldsymbol{x}_{k},k) in Eq. 36 depends on the posterior likelihood, which is not directly accessible. Inspired by ( 13 ) , we can estimate this value by tracking the diffusion’s reverse Markov chain. The derivation begins with the definition of the posterior, p_{\theta,k-1}(\boldsymbol{c}|\boldsymbol{x}_{k-1:K}) . By applying the chain rule of probability and leveraging the Markov property of the reverse diffusion process (i.e., p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k:K},\boldsymbol{c})=p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c}) ), the posterior at step k-1 is: p_{\theta,k-1}(\boldsymbol{c}|\boldsymbol{x}_{k-1})=p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})\cdot\frac{p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})}{p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})} (10) Taking the logarithm of Eq. 10 , we can obtain the update function of the posterior likelihood from step k to k-1 : \begin{split}\log p_{\theta,k-1}(\boldsymbol{c}|\boldsymbol{x}_{k-1})={}&\log p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})+\log p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})\\ &-\log p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})\end{split} (11) As the reverse transition distributions are Gaussian, the log-likelihood difference becomes: \begin{split}&\log p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})-\log p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})\\ &\qquad=\frac{1}{2\sigma_{k}^{2}}\left(\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}-\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}\right)\end{split} (12) This formulation enables updating the posterior likelihood by comparing the outputs of the conditional and unconditional models at each step. Additionally, we introduce two hyperparameters: a temperature \tau to scale the update strength and an offset \delta to ensure guidance activates properly in early diffusion stages. This leads to the parameterized update equation for posterior: \log p_{\theta,k-1}(\boldsymbol{c}|\boldsymbol{x}_{k-1})=\log p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})\\ -\frac{\tau}{2\sigma_{k}^{2}}\Bigl(\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}-\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}\Bigr)-\delta (13) By initializing \log p_{\theta,K}(\boldsymbol{c}|\boldsymbol{x}_{T}) (e.g., to 0, assuming a uniform prior distribution) and applying this update rule iteratively from k=K to 1 , we can estimate the log-posterior at each denoising step. The feedback guidance loop is thus complete: at each step k , we use the current guidance scale \lambda(\boldsymbol{x}_{k},k) to sample \boldsymbol{x}_{k-1} . We then use this new sample \boldsymbol{x}_{k-1} in Eq. 42 to update the posterior p_{\theta,k-1}(\boldsymbol{c}|\boldsymbol{x}_{k-1}) . Finally, this new posterior is fed into Eq. 36 to determine the guidance scale \lambda(\boldsymbol{x}_{k-1},k-1) for the next step. Cluster-Aware Feedback Guidance While the global guidance mechanism adapts the scale across denoising steps, it applies this scale uniformly to all nodes, which is suboptimal because nodes differ in their alignment to observations. Fully per-node scaling, however, can be statistically unstable under sparse observations. To address this, we introduce a cluster-aware feedback guidance strategy, which aggregates information from a group of correlated nodes to compute the guidance scale for each node. To group the nodes, we leverage the spatial attention scores, \mathbf{A}_{attn}\in\mathbb{R}^{N\times N} , from the conditional denoising network. Since the attention scores quantify dynamic correlations that evolve during the reverse process, we employ k-means clustering at each denoising step to partition the set of nodes V into K_{c} disjoint clusters, \{\mathcal{C}_{1},\mathcal{C}_{2},\dots,\mathcal{C}_{K_{c}}\} . During each step of the reverse diffusion process, for any node i belonging to the current cluster \mathcal{C}_{j} , we compute a cluster-level log-posterior. The aggregation rule for the cluster-level log-posterior is defined as: \log p_{\theta,k-1,\mathcal{C}_{j}}(\boldsymbol{c}|\boldsymbol{x}_{k-1})=\frac{1}{|\mathcal{C}_{j}|}\sum_{l\in\mathcal{C}_{j}}\log p_{\theta,k-1,l}(\boldsymbol{c}|\boldsymbol{x}_{k-1}), (14) where \log p_{\theta,k-1,l}(\boldsymbol{c}|\boldsymbol{x}_{k-1}) is the individually updated log-posterior for node l using Eq. 42 . By averaging over all nodes in the cluster, we obtain a more stable estimate that is less susceptible to the high variance from any single node. The cluster-level posterior, p_{\theta,k,\mathcal{C}_{j}}(\boldsymbol{c}|\boldsymbol{x}_{k}) , is then used to compute a shared guidance scale for all nodes within that cluster, using the formulation from Eq. 36 : \lambda_{\mathcal{C}_{j}}(\boldsymbol{x}_{k},k)=\frac{p_{\theta,k,\mathcal{C}_{j}}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k,\mathcal{C}_{j}}(\boldsymbol{c}|\boldsymbol{x}_{k})-(1-\pi)} (15) Training and Inference Training. FENCE requires both unconditional and conditional predictions to compute the guidance scales. To prevent the learning of the unconditional prior from interfering with the conditional imputation, we adopt a two-stage training procedure. First, we train an unconditional generative model to learn the prior distribution p_{\theta}(\boldsymbol{x}) . In this stage, the denoising network {\epsilon}_{\theta} is trained using only the unconditional vector which is generated from structural priors without any observations. After convergence, the weights of this unconditional model are saved. Next, we fine-tune this pre-trained model for the conditional imputation. The network weights are initialized from the saved unconditional model. The model is then trained using the conditional observations. Inference. During inference, the denoising network utilizes a conditional context \boldsymbol{c} and an unconditional context \boldsymbol{c}_{\text{uncond}} as inputs. Instead of applying a fixed guidance scale, FENCE dynamically adjusts the guidance scale at each step of the denoising process. This adjustment is driven by a feedback loop that continuously estimates the posterior likelihood to assess the alignment between the current sample and the conditional observations. Furthermore, to account for the varying degrees of alignment with conditional observations across different nodes, the feedback is computed at a cluster level, leveraging spatial-temporal correlations. The inference procedure is presented in Algorithm 1 . Algorithm 1 Inference of FENCE 1: Input: Conditional network {\epsilon}_{\theta} , unconditional network {\epsilon}_{\theta}^{\text{uncond}} , observed data \boldsymbol{x}^{o} and mask \mathbf{M} , total denoising steps K , hyperparameters \pi,\tau,\delta , K_{c} . 2: Initialize: 3: Sample \boldsymbol{x}_{K}\sim\mathcal{N}(0,\mathbf{I}) . 4: Initialize \log p_{\theta,K,i}(\boldsymbol{c}|\boldsymbol{x}_{K})\leftarrow 0 for all nodes. 5: for k=K,\dots,1 do 6: {\epsilon}_{\text{cond}}\leftarrow{\epsilon}_{\theta}(\boldsymbol{x}_{k},k,\boldsymbol{c}) 7: {\epsilon}_{\text{uncond}}\leftarrow{\epsilon}_{\theta}^{\text{uncond}}(\boldsymbol{x}_{k},k,\boldsymbol{c}_{\text{uncond}}) 8: Extract \mathbf{A}_{attn} and update clusters \{\mathcal{C}_{j}\}_{j=1}^{K_{c}} . 9: Compute cluster-level scales \lambda_{\mathcal{C}_{j}} by Eq. 14 , Eq. 15 . 10: Update \lambda_{i}\leftarrow\lambda_{\mathcal{C}_{i}} for each node. 11: \boldsymbol{\lambda}_{k}\leftarrow(\lambda_{1},\dots,\lambda_{N}) 12: \tilde{\epsilon}_{\theta}\leftarrow{\epsilon}^{\text{uncond}}_{\theta}+\boldsymbol{\lambda}_{k}\odot({\epsilon}^{\text{cond}}_{\theta}-{\epsilon}^{\text{uncond}}_{\theta}) 13: Compute \tilde{\mu}_{\theta} by \tilde{\epsilon}_{\theta} and sample \boldsymbol{x}_{k-1}\sim\mathcal{N}(\tilde{\mu}_{\theta},\sigma_{k}^{2}\mathbf{I}) 14: // Update posteriors for the next step 15: Update \log p_{\theta,k-1,i}(\boldsymbol{c}|\boldsymbol{x}_{k-1}) using Eq. 42 , Eq. 14 . 16: end for 17: return \boldsymbol{x}_{0} Experiments Experimental Settings Dateset. We conduct experiments on the PEMS04, PEMS07, and PEMS08 datasets ( 3 ) . The datasets are split chronologically into training, validation, and test sets (60%/20%/20%), and input samples are generated by segmenting these sets into overlapping sequences using a sliding window. Baselines. We evaluate the performance of FENCE against eight methods, covering machine learning baselines, discriminative models, and generative models. The discriminative models include: 1) ASTGNN ( 9 ) , an attention-based graph neural network adapted for imputation via a reconstruction-based self-supervised learning objective ( 1 ) ; 2) IGNNK ( 28 ) , an inductive GNN for kriging; 3) GCASTN ( 20 ) , a contrastive self-supervised learning framework for imputation; and 4) ImputeFormer ( 19 ) , which combines the Transformer with low-rank induction. The machine learning method is: 5) LCR ( 4 ) , which leverages laplacian convolutional representations for time series imputation. The generative models include: 6) mTAN ( 21 ) , employing a VAE for irregularly sampled time series; 7) CSDI ( 24 ) , a conditional score-based diffusion model for imputation; and 8) PriSTI ( 15 ) , a conditional diffusion framework that integrates geographic context. Missing Patterns. We introduce two challenging missingness patterns: Spatially Random, Temporally Contiguous (SR-TC) and Spatially Clustered, Temporally Contiguous (SC-TC). 1) SR-TC: The total length of the series at each node is L , and the time series is divided into \frac{L}{T} non-overlapping temporal patches of length T . For each of the N nodes, each temporal patch is independently masked with a probability of \alpha , resulting in missing blocks that are contiguous in time but randomly distributed across nodes. 2) SC-TC: The N nodes are first partitioned into N_{c} distinct communities. A missing block is defined by a temporal patch of length T and a node community. Each of these \frac{L}{T}\times N_{c} blocks is independently masked with a probability of \alpha , causing entire communities of sensors to drop out simultaneously for continuous time periods. For our experiments, we set the missing rate \alpha=80\% and T=12 . Performance Comparison Datasets Miss Type Metrics ASTGNN IGNNK GCASTN LCR ImputeFormer mTAN CSDI PriSTI FENCE PEMS04 SR-TC MAE 31.47 32.69 30.54 28.75 27.30 31.20 27.63 27.51 26.57 RMSE 45.94 47.27 44.93 44.10 43.81 45.36 43.37 43.46 42.45 MAPE 0.192 0.201 0.191 0.189 0.178 0.209 0.187 0.184 0.172 SC-TC MAE 31.70 33.32 30.07 28.98 29.35 30.59 28.26 28.47 27.31 RMSE 47.76 49.12 47.97 46.96 46.71 48.19 45.39 45.31 44.28 MAPE 0.212 0.214 0.205 0.197 0.206 0.217 0.189 0.190 0.180 PEMS07 SR-TC MAE 46.16 52.64 50.02 47.24 45.07 45.60 44.36 46.84 42.51 RMSE 65.60 71.16 66.31 65.88 65.86 67.07 64.37 65.23 63.48 MAPE 0.206 0.234 0.310 0.207 0.195 0.225 0.208 0.213 0.178 SC-TC MAE 47.63 55.12 45.95 44.97 44.59 45.31 44.78 45.18 43.12 RMSE 73.85 79.54 74.29 74.11 73.75 75.06 74.33 73.54 73.06 MAPE 0.265 0.332 0.260 0.248 0.232 0.247 0.228 0.224 0.215 PEMS08 SR-TC MAE 26.72 27.17 26.82 25.52 25.27 27.09 24.32 24.06 22.77 RMSE 41.22 42.76 41.87 40.90 40.64 44.92 41.09 42.01 40.26 MAPE 0.180 0.194 0.186 0.166 0.160 0.187 0.167 0.164 0.147 SC-TC MAE 31.82 32.25 30.78 30.51 29.64 30.29 28.23 35.90 27.29 RMSE 50.76 51.35 49.39 50.03 48.37 51.82 48.54 48.80 47.78 MAPE 0.220 0.231 0.213 0.218 0.216 0.229 0.190 0.193 0.175 Table 1: Overall Imputation performance comparison. Bold and underlined fonts indicate the best and second-best results. The overall performance is presented in Tab. 1 . The key observations are as follows: (1) FENCE achieves state-of-the-art performance across all three datasets, both for the SR-TC and SC-TC missing patterns. Notably, FENCE outperforms the second-best method by an average of 6.26\% in MAPE across all the datasets and missing patterns. (2) Among discriminative models, ImputeFormer demonstrates superior performance, benefiting from its integration of low-rank inductive bias combined with Transformers. (3) Score-based diffusion models, such as CSDI and PriSTI, perform competitively compared to machine learning and discriminative models. (4) FENCE significantly outperforms existing diffusion models, including CSDI and PriSTI, demonstrating the effectiveness of the dynamic feedback mechanism that adjusts the guidance scale during imputation. (5) Under the challenging SC-TC scenario, FENCE consistently outperforms all baselines across all metrics, demonstrating its effectiveness in handling highly sparse missing patterns. Ablation Study We conduct an ablation study to evaluate the effectiveness of the spatial-temporal feedback guidance mechanism and the cluster-aware guidance strategy. Specifically, we compare FENCE with three variants: (1) wo-U , which removes the modeling of unconditional scores and only models the conditional scores. (2) wo-F , which removes the spatial-temporal feedback guidance from the denoising process; (3) wo-C , which removes the cluster-aware guidance strategy and instead applies a uniform global guidance scale to all nodes at each denoising step. The results are shown in Fig. 3 . First, the wo-U variant, which does not model the unconditional prior distribution, results in suboptimal performance. This indicates that the two-stage training procedure, which first models the prior distribution, facilitates a more accurate modeling of the conditional distribution. Second, we compare FENCE with the wo-F variant. The results show that incorporating spatial-temporal feedback guidance yields substantial performance gains across all metrics and missing patterns, showing the importance of dynamically adjusting the guidance scale based on the alignment between generated values and conditional observations. Finally, FENCE outperforms the wo-C variant, showing the effectiveness of the cluster-aware guidance strategy. This result demonstrates that computing guidance scales based on clustered information leads to more accurate imputations, compared to applying a uniform global scale to all nodes at each denoising step. Figure 3: Ablation study. Hyperparameter Analysis We evaluate the key hyperparameters of FENCE on the PEMS04 dataset, as shown in Fig. 4 . These include the prior confidence \pi , the guidance timing parameters (t_{0},t_{1}) , and the number of clusters. The parameters (t_{0},t_{1}) control the guidance offset \delta and temperature \tau , with their relationships illustrated in the appendix. As shown in Fig. 4 , FENCE’s performance is relatively stable across different settings of (t_{0},t_{1}) . Regarding the prior confidence in the conditional model, the best results are obtained when \pi=0.5 . A higher value of \pi indicates high confidence in the conditional model, which necessitates a very low posterior likelihood for applying guidance. In contrast, a lower value, such as \pi=0.5 , provides a broader operational range for FENCE, lowering the threshold for guidance activation. Next, we evaluate different settings of the ratio of node number to cluster number: 1,N/20,N/10,N/8,N . The best performance is achieved at N/20 , while setting the ratio to 1 or N results in degraded performance. This indicates that using either a global uniform guidance scale or a node-specific guidance scale is suboptimal compared to employing a cluster-level guidance scale. Figure 4: Effect of hyperparameters. Case Study We compare FENCE with CFG, where the guidance scale is fixed at 1. In Fig. 5 , for a node with no observations across 12 time slices, CFG’s fixed scale provides insufficient correction strength, causing the imputation to revert to the learned average and deviate from the ground truth. In contrast, FENCE’s dynamic guidance mechanism actively adjusts the guidance scale based on the posterior likelihood. When the imputation diverges from the observations, the guidance scale increases to strengthen the correction. This adaptive process results in an imputation that more accurately reflects the true conditional data distribution. Figure 5: Case Study Conclusion This paper proposes FENCE, a spatial-temporal feedback diffusion guidance method that tackles the limitations of existing imputation methods based on diffusion models, which rely on a fixed guidance scale. FENCE dynamically adjusts the guidance scale based on posterior likelihood approximations, ensuring the generated values consistently align with observed data throughout the denoising process. Furthermore, the cluster-aware guidance mechanism leverages spatial-temporal correlations to tailor the guidance for different nodes, improving imputation accuracy. Appendix This appendix provides supplementary details for our work. We begin by presenting mathematical derivations for the guidance scale and the posterior likelihood update rule. Following the derivations, we describe the practical implementation of hyper-parameters. Finally, we introduce our experimental settings in detail, including hyper-parameter configurations, the computing environment, evaluation metrics, and the datasets. Derivation of the Guidance Scale This section provides a detailed derivation for the guidance scale \lambda(\boldsymbol{x}_{k},k) , which is applied at each denosing step k in the formulation of the guidance score: \begin{split}\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})&=s_{\theta}(\boldsymbol{x}_{k})\\ \quad&+\lambda(\boldsymbol{x}_{k},k)\left(s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c})-s_{\theta}(\boldsymbol{x}_{k})\right)\end{split} (16) The derivation begins with the additive error assumption introduced in ( 13 ) . The assumption states that the learned distribution is a linear combination of the true conditional distribution p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) and the true unconditional distribution p_{k}(\boldsymbol{x}_{k}) : p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})=(1-\pi)p_{k}(\boldsymbol{x}_{k})+\pi p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) (17) where \pi\in[0,1] is a hyper-parameter representing the prior confidence in how well the learned model approximates the true conditional distribution. Rearranging Eq. 17 yields: \pi p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})=p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{k}(\boldsymbol{x}_{k}) (18) This equation contains the true unconditional distribution p_{k}(\boldsymbol{x}_{k}) , which is unknown. To make the formulation practical, we assume that the model’s learned unconditional distribution approximates the true one: p_{\theta,k}(\boldsymbol{x}_{k})\approx p_{k}(\boldsymbol{x}_{k}) (19) Substituting this approximation into Eq. 18 yields: \pi p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})\approx p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k}) (20) Since \pi is a positive constant, this relationship can be interpreted as a proportionality. We define the approximated conditional distribution \tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) to be proportional to the true conditional distribution p_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) , resulting in: \tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})\propto p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k}) (21) This expression defines an approximated conditional distribution in terms of the distributions the model has learned. Next, we compute the score function \nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) based on this proportionality. To do so, we first rewrite the proportionality relationship in Eq. 21 as an equality by introducing a normalization constant Z : \tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})=\frac{1}{Z}\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right) (22) Here, Z is the normalization constant and is defined as: Z=\int\left(p_{\theta,k}(\boldsymbol{x}_{k}^{\prime}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k}^{\prime})\right)d\boldsymbol{x}_{k}^{\prime} Next, we take the logarithm of both sides of the equality in Eq. 22 : \displaystyle\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) \displaystyle=\log\left(\frac{1}{Z}\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right)\right) \displaystyle=-\log(Z) \displaystyle+\log\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right) (23) We then compute the gradient of the expression defined in Eq. 23 with respect to \boldsymbol{x}_{k} : \displaystyle\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) \displaystyle=\nabla_{\boldsymbol{x}_{k}}\left(-\log(Z)+\log\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})\right.\right. \displaystyle\left.\left.-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right)\right) (24) Applying the sum rule for derivatives: \displaystyle\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) \displaystyle=\nabla_{\boldsymbol{x}_{k}}(-\log Z) \displaystyle+\nabla_{\boldsymbol{x}_{k}}\log\Bigl(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c}) \displaystyle-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\Bigr) (25) Since Z is a constant, its logarithm \log Z is also constant, and thus its gradient is zero. As a result, the gradient simplifies to: \nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})=\\ \nabla_{\boldsymbol{x}_{k}}\log\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right) (26) Applying the identity \nabla\log f(\boldsymbol{x})=\frac{\nabla f(\boldsymbol{x})}{f(\boldsymbol{x})} yields the formulation: \nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})=\frac{\nabla_{\boldsymbol{x}_{k}}\left(p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})\right)}{p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})} (27) To introduce the posterior term p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) , we apply Bayes’ theorem, p(\boldsymbol{x}|\boldsymbol{c})=\frac{p(\boldsymbol{c}|\boldsymbol{x})p(\boldsymbol{x})}{p(\boldsymbol{c})} , to the terms in Eq. 27 . We begin by rewriting the denominator: Denominator \displaystyle=p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k}) \displaystyle=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})p_{\theta,k}(\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k}) \displaystyle=p_{\theta,k}(\boldsymbol{x}_{k})\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right) (28) Next, we rewrite the term inside the gradient in the numerator: \begin{split}p_{\theta,k}(\boldsymbol{x}_{k}|\boldsymbol{c})&-(1-\pi)p_{\theta,k}(\boldsymbol{x}_{k})=\\ &p_{\theta,k}(\boldsymbol{x}_{k})\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)\end{split} (29) We compute the gradient of the numerator using the gradient product rule: Numerator \displaystyle=\nabla_{\boldsymbol{x}_{k}}\left[p_{\theta,k}(\boldsymbol{x}_{k})\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)\right] \displaystyle=\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)\nabla_{\boldsymbol{x}_{k}}p_{\theta,k}(\boldsymbol{x}_{k}) \displaystyle+p_{\theta,k}(\boldsymbol{x}_{k})\nabla_{\boldsymbol{x}_{k}}\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\right) (30) Using the score identity, \nabla_{\boldsymbol{x}_{k}}p(\boldsymbol{x}_{k})=p(\boldsymbol{x}_{k})\nabla_{\boldsymbol{x}_{k}}\log p(\boldsymbol{x}_{k})=p(\boldsymbol{x}_{k})s_{\theta}(\boldsymbol{x}_{k}) , we substitute the gradient of the unconditional distribution into the numerator expression: \text{Numerator}=\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)p_{\theta,k}(\boldsymbol{x}_{k})s_{\theta}(\boldsymbol{x}_{k})\\ +p_{\theta,k}(\boldsymbol{x}_{k})\nabla_{\boldsymbol{x}_{k}}\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\right) (31) Substituting the formulations for the numerator (Eq. 31 ) and denominator (Eq. 28 ) into Eq. 27 yields: \displaystyle\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c})=\frac{1}{p_{\theta,k}(\boldsymbol{x}_{k})\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)} \displaystyle\qquad\times\Biggl[\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}-(1-\pi)\right)p_{\theta,k}(\boldsymbol{x}_{k})s_{\theta}(\boldsymbol{x}_{k}) \displaystyle\qquad+p_{\theta,k}(\boldsymbol{x}_{k})\nabla_{\boldsymbol{x}_{k}}\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\right)\Biggr] \displaystyle=s_{\theta}(\boldsymbol{x}_{k})+\frac{\nabla_{\boldsymbol{x}_{k}}\left(p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})\right)}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})-(1-\pi)} (32) Using the score identity again, and noting that \nabla_{\boldsymbol{x}_{k}}\log p(\boldsymbol{c}|\boldsymbol{x}_{k})=s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c})-s_{\theta}(\boldsymbol{x}_{k}) , we obtain: \displaystyle\nabla_{\boldsymbol{x}_{k}}\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\right) \displaystyle=\frac{1}{p_{\theta,k}(\boldsymbol{c})}\nabla_{\boldsymbol{x}_{k}}p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) \displaystyle=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\nabla_{\boldsymbol{x}_{k}}\log p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k}) \displaystyle=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c})}\left(s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c})-s_{\theta}(\boldsymbol{x}_{k})\right) (33) Substituting this result into Eq. 32 yields: \displaystyle\nabla_{\boldsymbol{x}_{k}}\log\tilde{p}_{k}(\boldsymbol{x}_{k}|\boldsymbol{c}) \displaystyle=s_{\theta}(\boldsymbol{x}_{k}) \displaystyle\quad+\left(\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})-(1-\pi)}\right) \displaystyle\quad\times\left(s_{\theta}(\boldsymbol{x}_{k},\boldsymbol{c})-s_{\theta}(\boldsymbol{x}_{k})\right) (34) By comparing Eq. 34 with the guidance score formulation in Eq. 16 , we can identify the guidance scale \lambda(\boldsymbol{x}_{k},k) : \lambda(\boldsymbol{x}_{k},k)=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})/p_{\theta,k}(\boldsymbol{c})-(1-\pi)} (35) In practice, assuming the prior p_{\theta,k}(\boldsymbol{c}) is constant yields: \lambda(\boldsymbol{x}_{k},k)=\frac{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})}{p_{\theta,k}(\boldsymbol{c}|\boldsymbol{x}_{k})-(1-\pi)} (36) This completes the derivation of guidance scale. Derivation of the Posterior Likelihood Estimation In this section, we derive the posterior likelihood estimation employed in the feedback guidance mechanism: \log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k-1})=\log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k})\\ -\frac{\tau}{2\sigma_{k}^{2}}\Bigl(\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}-\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}\Bigr)-\delta. (37) We aim to derive an update rule for estimating \log p(\boldsymbol{c}|\boldsymbol{x}_{k-1}) based on its value at the previous step, \log p(\boldsymbol{c}|\boldsymbol{x}_{k}) . The derivation begins with the application of the chain rule of probability to the posterior p(\boldsymbol{c}|\boldsymbol{x}_{k-1:K}) . By exploiting the Markov property of the reverse diffusion process, where the distribution of \boldsymbol{x}_{k-1} depends only on \boldsymbol{x}_{k} , we use the conditional independence p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k:K},\boldsymbol{c})=p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c}) to establish a relationship between the posterior at step k-1 and the posterior at step k : p(\boldsymbol{c}|\boldsymbol{x}_{k-1})=p(\boldsymbol{c}|\boldsymbol{x}_{k})\cdot\frac{p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})}{p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})} (38) Taking the logarithm of Eq. 38 yields the log-likelihood update rule: \begin{split}\log p(\boldsymbol{c}|\boldsymbol{x}_{k-1})&=\log p(\boldsymbol{c}|\boldsymbol{x}_{k})\\ &\quad+\log p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})\\ &\quad-\log p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})\end{split} (39) We model the reverse transition processes as Gaussian distributions. The unconditional reverse transition is given by p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})\sim\mathcal{N}(\boldsymbol{x}_{k-1};\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}),\sigma_{k}^{2}\mathbf{I}) , while the conditional reverse transition is modeled as p_{\theta}(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})\sim\mathcal{N}(\boldsymbol{x}_{k-1};\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c}),\sigma_{k}^{2}\mathbf{I}) . Here, \boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}) and \boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c}) denote the means predicted by the unconditional and conditional models, respectively, while the variance \sigma_{k}^{2} is assumed to be fixed across both processes. The log-probability density function of a Gaussian distribution \mathcal{N}(\boldsymbol{x};\boldsymbol{\mu},\sigma^{2}\mathbf{I}) is given by -\frac{1}{2\sigma^{2}}\|\boldsymbol{x}-\boldsymbol{\mu}\|^{2} plus a constant term that does not depend on the mean \boldsymbol{\mu} . When computing the difference between the conditional and unconditional log-likelihoods, this constant term cancels out. The resulting difference is: \begin{split}&\log p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k},\boldsymbol{c})-\log p(\boldsymbol{x}_{k-1}|\boldsymbol{x}_{k})\\ &\qquad=\left(-\frac{1}{2\sigma_{k}^{2}}\|\boldsymbol{x}_{k-1}-\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}\right)\\ \qquad&\qquad-\left(-\frac{1}{2\sigma_{k}^{2}}\|\boldsymbol{x}_{k-1}-\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}\right)\end{split} (40) This formulation allows the posterior likelihood to be updated by comparing the outputs of the conditional and unconditional models at each step. Accordingly, Eq. 39 becomes: \begin{split}\log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k-1})&=\log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k})\\ \quad&+\frac{1}{2\sigma_{k}^{2}}\Biggl(\|\boldsymbol{x}_{k-1}-\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}\\ \qquad&-\|\boldsymbol{x}_{k-1}-\boldsymbol{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}\Biggr)\end{split} (41) Additionally, we introduce two hyper-parameters: a temperature \tau to scale the update strength and an offset \delta to ensure guidance activates properly in early diffusion stages. This results in the following parameterized update equation for the posterior: \log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k-1})=\log p_{\theta}(\boldsymbol{c}|\boldsymbol{x}_{k})\\ -\frac{\tau}{2\sigma_{k}^{2}}\Bigl(\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k}|\boldsymbol{c})\|^{2}-\|\boldsymbol{x}_{k-1}-{\mu}_{\theta}(\boldsymbol{x}_{k})\|^{2}\Bigr)-\delta. (42) This completes the derivation of the posterior likelihood update rule. Practical Implementation of Hyper-parameters To simplify control of the guidance during the denoising process, we replace direct tuning of the hyper-parameters \tau and \delta with two denoising time-based parameters: t_{0} and t_{1} . These correspond to specific points in the denoising process, where t=0 represents the clean data and t=1 corresponds to pure noise. By specifying these time points, we enable adjustment of the guidance strength throughout the denoising process. The guidance strength can be modulated over time by three key parameters: t_{0} , t_{1} , and \pi . The activation time t_{0} determines the point in the denoising process at which the guidance scale reaches the predefined reference value \lambda_{ref} . The peak time t_{1} represents the time at which the guidance strength reaches its maximum, after which its influence begins to decrease. As the noised data becomes cleaner during the denoising process, the influence of guidance gradually diminishes. The peak time t_{1} is used to compute the overall scaling factor of the guidance strength, referred to as the temperature \tau . Finally, the prior confidence factor \pi is a time-invariant parameter that specifies the relative weighting between the model’s conditional and unconditional outputs. These parameters provide a flexible way to modulate guidance strength throughout the denoising process. The relationship between these parameters is established through a two-step calculation. First, the offset \delta is computed based on the specified time t_{0} and the prior confidence factor \pi . This step ensures that guidance becomes effective during the early stages of the denoising process. The parameter \lambda_{ref} is a predefined reference value of the guidance scale: \displaystyle\delta \displaystyle=\frac{1}{(1-t_{0})\,K}\log\!\biggl(\frac{(1-\pi)\,\lambda_{ref}}{\lambda_{ref}-1}\biggr) (43) Second, the temperature parameter \tau is calculated based on the specified time t_{1} , using the noise variance \sigma_{t_{1}}^{2} at that time and the previously computed offset \delta . This step determines the overall scaling of the guidance strength across the denoising process: \displaystyle\tau \displaystyle=\left\lvert\frac{2\,\sigma_{t_{1}}^{2}}{\alpha_{\mathrm{scale}}}\,\delta\right\rvert (44) Here, K denotes the total number of denoising steps, and \alpha_{\mathrm{scale}} is an empirically chosen scaling factor, typically set to 10. In summary, this reparameterization simplifies the tuning of hyperparameters (\tau,\delta) by formulating it as the task of defining a guidance schedule. This is achieved by specifying the time (t_{0}) at which guidance scale reaches a predefined value, and the time ( t_{1}) at which the guidance strength reaches its maximum, after which it begins to decrease. Experimental Settings Hyper-parameter Configurations Baselines are implemented following the parameters suggested in their original papers. For the hyper-parameters of FENCE, the batch size is 128. For unconditional generation, we train for 150 epochs with a learning rate of 2e-3 and apply early stopping with a patience of 20 epochs. For conditional generation, we train for 80 epochs with a learning rate of 1e-3 and apply early stopping with a patience of 10 epochs. The diffusion model uses a minimum noise level \beta_{1} and a maximum noise level \beta_{K} , where K is set to 50. We adopt the quadratic schedule for the intermediate noise levels, formalized as \beta_{k}=\left(\frac{K-k}{K-1}\sqrt{\beta_{1}}+\frac{k-1}{K-1}\sqrt{\beta_{K}}\right)^{2} The diffusion time embedding and temporal encoding are implemented by sine and cosine embeddings. We summarize the hyper-parameters of FENCE in Table 2 . All experiments are run five times. Table 2: The hyper-parameters of FENCE. Description Values Batch size 128 Length of time slices L 12 Layers of noise estimation 4 Channel size d 64 Number of attention heads 8 Diffusion embedding dim 64 Time embedding dim 128 Feature embedding dim 16 Minimum noise level \beta_{1} 0.0001 Maximum noise level \beta_{K} 0.5 Diffusion steps K 50 Prior confidence \pi 0.5 Reference guidance scale \lambda_{ref} 1.6 Activation time t_{0} 0.8 Peak time t_{1} 0.5 Environmental Settings All methods are implemented using Python and PyTorch. During training, two Adam optimizers with weight‐decay coefficients of 1e-6 and 1e-5 are employed for the unconditional and conditional diffusion models, each governed by a MultiStepLR scheduler that decays the learning rate by a factor of 0.1 at 75 % and 90 % of the total training epochs. We run all experiments on Ubuntu 20.04 servers equipped with Intel(R) Xeon(R) W-2155 CPUs and NVIDIA GPUs (RTX A4000 and RTX 3090). Evaluation metrics To quantitatively evaluate the imputation accuracy of all models, we employ three commonly adopted metrics to assess mean error: Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). For generative models such as FENCE and its diffusion-based counterparts, the final deterministic imputation is obtained by averaging 10 generated samples from the learned distribution before calculating the metrics. In our ablation studies and hyper-parameter analysis, we additionally employ the Continuous Ranked Probability Score (CRPS) to assess the quality of the entire predictive distribution. For a missing value x with estimated distribution D , CRPS is defined as \displaystyle\mathrm{CRPS}\bigl(D^{-1},x\bigr) \displaystyle=\int_{0}^{1}2\,\Lambda_{\alpha}\bigl(D^{-1}(\alpha),x\bigr)\,\mathrm{d}\alpha, (45) \displaystyle\Lambda_{\alpha}\bigl(D^{-1}(\alpha),x\bigr) \displaystyle=\bigl(\alpha-\mathbf{1}_{\,x