Manuscript Offprint
arXiv:2610.40732Don't Just Impute, Detect: Task-Aware Diffusion Pipelines for Edge Anomaly Detection
Jeongsu Park Ⓤ, Taehyeon Yun Ⓤ, Geonwoo Kim Ⓤ, Yuji Lim Ⓤ, Moohong Min Ⓤ*
Sungkyunkwan University, Seoul, Republic of Korea
Abstract—Industrial Internet of Things (IIoT) edge pipelines routinely lose contiguous blocks of multi-sensor data to network dropouts and hardware faults. The standard remedy is a disjointed “impute-then-detect” pipeline whose imputer is trained only for Mean Squared Error (MSE). Such an imputer fills a missing block with the most probable normal pattern: a partially observed anomaly is smoothed back toward normality, and boundary artifacts on normal data raise false alarms. We call this imputation bias and propose the Task-Aware Diffusion Refiner (TADR), a conditional diffusion refiner trained against the loss landscape of a frozen downstream detector. Because back-propagating through the sampling trajectory is intractable, the task-aware terms act on the one-step clean-window estimate that the noise prediction already yields, so training costs no more than plain diffusion training. Under strict Point-to-Point evaluation over five seeds with paired significance tests, TADR raises F1 by 0.338 over the unrefined detector on SMD (), and the anomaly enhancement objective alone contributes 0.463 in ablation. We also characterise when the method helps: the gain tracks the continuous, mutually redundant channels available and the anomaly evidence the outage removes, and it is absent on telemetry datasets dominated by one-hot command channels and on PSM. At ten sampling steps TADR runs in 41.4 ms per window on a single CPU core, sustaining about 24 concurrent 1 Hz streams from a 4.03 MB model. Code and per-seed results are available at https://github.com/int-park422/TADR.
Index Terms—Time-Series Anomaly Detection, Block Missing Data, Diffusion Models, Task-aware Learning, Robustness.
I. INTRODUCTION
The Industrial Internet of Things (IIoT) and Cyber-Physical Systems (CPS) rely heavily on continuous multi-sensor data to monitor operational status and ensure structural integrity. However, real-world IIoT infrastructures often operate under resource-constrained edge conditions where hardware malfunctions and network dropouts frequently disrupt data collection. Unlike simple and isolated missing points, these communication failures typically result in block missing—continuous sequences of data loss across multiple timestamps and channels [1], [2]. This structural corruption not only poses a severe threat to downstream anomaly detection systems but also creates a critical processing bottleneck within the edge-to-cloud data pipeline. The same concern extends to security-critical monitoring such as on-site sensing for illicit drug
detection, where the rare events of interest can coincide with lost data, and an imputer that fills the gap with normal-looking values erases precisely what the system exists to find.
To handle missing data, standard industrial pipelines typically employ a disjointed two-step “impute-then-detect” strategy [3], [4]. In this paradigm, incomplete data is first reconstructed using generative imputation models optimized purely for Mean Squared Error (MSE), followed by the application of state-of-the-art anomaly detectors such as Anomaly Transformer [5] or TimesNet [6]. While this intuitively restores the structural integrity of the time series, it exposes a vulnerability in the pipeline architecture: imputation bias [7]–[9]. Because the generative model is isolated from the downstream task, it defaults to synthesizing statistically probable normal patterns—suppressing the very attack signals the detector is looking for, and leaving boundary artifacts that inflate false alarms. Section III formalises this failure mode.
To address the computational inefficiencies and architectural vulnerabilities of disjointed data preparation pipelines, we propose the Task-Aware Diffusion Refiner (TADR), an end-to-end data preprocessing optimization framework tailored for edge infrastructures facing severe block missing conditions. Rather than merely smoothing data to minimize reconstruction error, TADR fundamentally redefines the objective of the data preparation phase [10]. We introduce a task-aware diffusion mechanism where the generative refinement process is explicitly guided by the loss landscape of the downstream anomaly detector. By bridging the semantic gap between data reconstruction and anomaly identification, TADR refines incomplete sequences to sharpen critical anomaly peaks while preserving normal background patterns. Because the detector stays frozen, TADR is a plug-in module that requires no structural modification of the detector; we find it effective for detectors that score by reconstruction error.
The main contributions of this paper are as follows.
-
We expose how the disjointed nature of standard reconstruction pipelines induces imputation bias under block missing conditions, squandering edge resources and inflating false alarms.
-
We propose TADR, a conditional diffusion refiner coupled to the frozen detector's objective. Because back-propagating through the sampling trajectory is intractable, the task-aware terms act on the one-step estimate the noise prediction already yields, leaving training no more
*Corresponding authors.
© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
costly than plain diffusion training.
-
Under strict Point-to-Point evaluation with five seeds, confidence intervals and paired tests, TADR raises P2P F1 by +0.338 over the unrefined detector; the enhancement objective alone accounts for +0.463 of the ablation gain, and the iterative formulation for a further +0.300 over a single-pass refiner.
-
Rather than claiming uniform superiority, we characterise when task-aware refinement helps: the gain tracks the continuous, mutually redundant sensor signal available, and vanishes when channels are predominantly discrete or when the detector already recovers most anomalies unaided. Adversarial manipulation of the observable channels, poisoning, and concept drift are outside our evaluation (Section VI).
-
We profile TADR at batch size one on a single CPU core rather than only on server GPUs, and identify the sampling budget at which quality is retained, establishing a deployable operating point.
A. Deep Learning for Time-Series Anomaly Detection
Deep learning techniques have significantly advanced multivariate time-series anomaly detection. The field has transitioned from traditional Recurrent Neural Networks (RNNs) to architectures that better capture complex temporal and cross-channel dependencies [11]–[13]. Transformer-based models, such as the Anomaly Transformer [5], utilize anomaly attention mechanisms to distinguish abnormal patterns by measuring the discrepancy between series and prior associations. The inverted Transformer (iTransformer) extends this by embedding entire temporal sequences as tokens to model multivariate correlations [14]. Concurrently, convolutional methods like TimesNet [6] address multi-periodic variations through 2D convolutions, while KAN-AD explores the parameter efficiency of Kolmogorov-Arnold Networks for anomaly detection [15]. However, a shared limitation among these detectors is their inherent assumption of ideal network conditions and structural data integrity. Because they are designed for stable and continuous data streams, they experience severe performance degradation in practical IIoT edge environments where sensor malfunctions and network dropouts render the input sequences highly fragmented [1], [16].
B. Disjointed Pipelines and Imputation Bias
To manage missing values in real-world deployments, the standard industrial practice employs a disjointed “impute-thendetect” pipeline. Early methods applied statistical interpolation or forward-filling, which fails to capture the dynamics of IIoT signals [17], [18]; later approaches reconstruct missing segments with autoencoders or recurrent networks optimised for Mean Squared Error (MSE) [19], [20]. Because such imputers are isolated from the detection objective and trained on normal operation, they are prone to imputation bias [1], [20], [21], the failure mode we formalise in Section III. The resulting loss of precision has historically been masked by the Point Adjustment (PA) metric, which inflates recall regardless of false alarms [8], [9].
C. Generative Refinement and System-Level Optimization
Denoising Diffusion Probabilistic Models (DDPMs) and score-based generative models are increasingly used for time-series imputation because of their high-fidelity generation [22], [23]. CSDI trains a conditional diffusion model that exploits correlations among observed values [4], and TIMBA combines bidirectional Mamba blocks with a diffusion framework to capture long-range dependencies [24]. Both remain reconstruction-centric, optimised for conditional MSE [10], [25], and diffusion imputers additionally pay for iterative sampling at inference. Whether that cost is justified for detection depends on what the reconstruction does to the detector's score, which their objective does not consider: under strict Point-to-Point (P2P) evaluation we find such imputers can help substantially or collapse precision (Section V). TADR keeps the diffusion architecture and sampler of CSDI but replaces the objective with one coupled to the frozen detector, so that the sampling cost buys detection quality rather than statistical smoothness alone.
III. MOTIVATION AND PROBLEM FORMULATION
A. Problem Definition: Anomaly Detection under Block Missing
In typical IIoT infrastructures, we monitor a multivariate time-series sequence , where is the total number of timestamps and is the number of sensor channels. Following standard anomaly detection practices, the continuous sequence is divided into deeply overlapped sliding windows [26]. Let denote a single sliding window of length .
Under ideal network conditions, the downstream anomaly detection model maps the complete window to an anomaly score vector , where a higher score indicates a higher probability of an anomalous event, such as a cyber-physical attack or equipment failure. However, physical edge environments often suffer from strict hardware constraints, network dropouts, and sensor malfunctions, leading to incomplete data matrices. We model this structural corruption using a binary missing mask , where 0 indicates a missing value and 1 indicates an observed value.
Unlike random missing values (Missing Completely At Random, MCAR) often assumed in general data science [27], sensor failures in harsh IIoT settings typically result in block missing scenarios [28]. A block missing event of length starting at timestamp implies that for all across one or multiple channels. Consequently, the anomaly detector only receives the heavily corrupted input , where denotes element-wise multiplication, which severely disrupts the temporal receptive field required for accurate detection. A systematic comparison of generative detectors under varied noise reports the same

Fig. 1. Conceptual illustration of imputation bias and pipeline failure, demonstrated using a sampled anomaly region from the normalized Server Machine Dataset (SMD). When an anomaly coincides with a block missing event, standard MSE-based optimization wastes computational resources to synthesize a statistically probable normal pattern, inadvertently erasing the true anomaly. TADR resolves this by directly preserving critical sharp variations for the detector.
asymmetry: block-type perturbation degrades detection most sharply, and does so architecture-specifically [29].
B. Motivation: The Systemic Dilemma of Impute-then-Detect
To counter the block missing problem and restore the receptive field, the conventional edge pipeline employs a pretrained generative refiner as a data preparation step before the detector. The goal of is to reconstruct the original window from the corrupted input . The reconstructed window is then fed into the detector .
Whether utilizing basic autoencoders or advanced generative architectures like CSDI and TIMBA, the refiner is universally optimized using the Mean Squared Error (MSE) objective:
While minimizing reduces the statistical distance between the reconstructed and original signals, it leads to two pipeline failure modes. First, anomalies are rare, abrupt deviations from normal operation. Because the training data consist almost exclusively of normal operation, learns the conditional expectation of the normal distribution, [30], [31]. When a block missing event overlaps an anomaly, the MSE-optimized refiner fills the gap with the most probable normal sequence and pulls the surviving fragment of the anomaly back toward normality, producing false negatives (Figure 1).
Second, on purely normal sequences, imputing large missing blocks frequently leaves unnatural reconstruction boundaries or structural artifacts, which a sensitive detector reads as abrupt deviations, producing false positives. Point Adjustment conceals this loss of precision; under strict Point-to-Point (P2P) evaluation it is directly visible as alarm fatigue for IIoT operators. We refer to these two failure modes jointly as imputation bias, and reference this definition throughout the rest of the paper.
The objective of the data preparation phase must therefore change. Rather than aiming for statistical smoothness, a
generative refiner whose sampling cost is to be paid on the edge should be aligned with the downstream detection task: it should preserve partially observed anomaly evidence and avoid fabricating artifacts on normal data. This motivates the design of the Task-Aware Diffusion Refiner (TADR).
IV. PROPOSED METHODOLOGY: TADR
To address the imputation bias and systemic inefficiencies of standard reconstruction pipelines, we propose the Task-Aware Diffusion Refiner (TADR). TADR is designed as a modular generative framework that operates directly upstream of pretrained anomaly detectors on edge devices. Figure 2 depicts the overall architecture of the proposed methodology.
A. Plug-and-Play Architecture Overview
Let be a fully trained and fixed anomaly detector, such as Anomaly Transformer, TimesNet, or KAN-AD [5], [6], [15]. Under normal conditions, processes a complete window and outputs an anomaly score sequence . Within our framework, the detector is functionally divided into two components: a feature extractor that generates intermediate latent representations , and a scoring head that maps these representations to the final anomaly score .
The objective is to train a generative refinement network , realised as a conditional denoising diffusion model over the window. A time-conditioned 1D U-Net (1.34M parameters) predicts the injected noise from the concatenation of the current diffusion iterate, the observed samples masked by , and the mask itself, and refinement is performed by deterministic DDIM sampling. We adopt the same quadratic noise schedule used by CSDI [4] so that the comparison against that baseline isolates the training objective rather than the architecture. Given a corrupted input , the refined output should produce optimal latent representations and discriminative anomaly scores when processed by the frozen detector .

Fig. 2. Overall Architecture of the Task-Aware Diffusion Refiner (TADR). The corrupted input is reconstructed by the trainable refiner . The refined output is then passed through the completely frozen anomaly detector to compute three task-aware objectives, ensuring that gradients flow backward solely to update the parameters .
Coupling a diffusion model to a downstream loss requires one non-obvious step. Back-propagating through a full T-step sampling trajectory is intractable, so the task-aware objectives are instead applied to the one-step estimate of the clean window implied by the current noise prediction, , which the same forward pass already yields. Training therefore costs no more than plain diffusion training. Since carries little signal at high noise levels, where that division amplifies any prediction error, the task-aware terms are weighted by and is clipped to the standardised data range. Because remains completely frozen during the training of , TADR maintains strict compatibility with various detectors without requiring structural modifications to the target models [32], [33].
B. Continuous-Channel Gating
Multivariate IIoT benchmarks are not uniformly continuous: in the telemetry datasets only one channel carries an analogue sensor reading, the rest being one-hot command signals. A Gaussian diffusion process cannot represent such variables, and imputing a command is not meaningful in any case, since what a dropout destroys is the measurement. We therefore restrict the refiner to channels that are not two-level in the raw training stream—the test must precede standardisation, which maps a binary channel to a different pair of values per entity and would make it appear continuous—and pass discrete channels through unchanged. Gating is applied identically to every refiner evaluated, so it changes the task rather than favouring a method.
C. Task-Aware Noise and Anomaly Simulation
To ensure the refiner is robust against the challenging IIoT conditions described in Section III, is trained using a mixed-noise injection strategy [34]. During the forward pass, a clean mini-batch is augmented by a stochastic noise injector that applies block missing, random masking, or Gaussian noise based on predefined probabilities.
To train the refiner to process anomalous patterns without over-smoothing them, we introduce synthetic anomalies into a subset of the training batch. We apply a localized Gaussian perturbation (e.g., ) over a short, continuous span (e.g., 10 timestamps) to simulate a severe sensor malfunction or a targeted cyber-physical attack [35]. Let denote the window injected with this synthetic anomaly, and denote its corresponding corrupted version.
D. Task-Aware Loss Enhancer
The primary contribution of TADR is its task-aware objective function. Rather than relying solely on the statistical distance between the input and the output, the training of is tightly coupled with the internal responses of the downstream detector . The total loss function consists of three distinct components.
The first component is the reconstruction loss (), which ensures the basic structural restoration of the underlying normal multi-sensor dynamics:
The second component is the feature matching loss (). Reconstructed data may resemble the original yet lack the channel dependencies the detector relies on, so this term forces the refiner to preserve the semantic features of the detector's intermediate layers [36], [37]:
Since the detector parameters are fixed, gradients from this loss flow backward through solely to update the parameters of .
The third component is the anomaly enhancement loss (). This loss directly counters imputation bias by dictating distinct behaviors for normal and anomalous regions via a mathematically defined switching logic. We define an indicator variable , where if the input contains a synthetic anomaly, and otherwise. The enhancement loss is formulated as a conditional expectation:
where acts as the reference score from the uncorrupted input, and is the score from the refined input. For normal instances (), the refiner minimizes the L1 distance strictly to prevent the generation of unnatural boundaries or artifacts that could trigger severe false positives (False Alarms). Conversely, for anomalous instances (), the refiner is severely penalized for statistical smoothing and is driven to maximize the overall anomaly score.
The refiner is trained end-to-end to minimize the unified task-aware loss [38]:
where and are hyperparameters that balance the feature alignment and score amplification objectives. We set and ; Section V reports a sweep over both, which shows this setting to be statistically indistinguishable from the grid optimum and the objective to be insensitive to over an order of magnitude, while collapses performance.
E. Training Procedure
To ensure computational efficiency and balanced adversarial learning, the training procedure of TADR is systematically structured. As a prerequisite, the base anomaly detector is fully trained on the normal IIoT training dataset and its parameters are completely frozen.
During the refiner training phase, we sample mini-batches of size from the normal sliding windows. To stabilize the gradient updates of the conditional enhancement loss, each batch is evenly split. The first half () remains purely normal but is subjected to structural corruption using the mixed-noise injector. The second half is injected with the synthetic localized anomalies to create , and subsequently corrupted by the same noise injector to generate .
Both halves are passed through the refiner and then evaluated by the frozen detector . The comprehensive loss is computed by aggregating the normal and anomalous responses. The network is optimized using the Adam optimizer with a learning rate of . To prevent exploding gradients caused by the adversarial nature of on the anomalous half, gradient clipping is rigorously applied with a maximum norm of 1.0. Training windows use a stride of 10 rather than a non-overlapping stride, since a diffusion model needs far
more distinct windows than a single-pass refiner: at stride 100 a single SMD entity yields only 284 windows and the model fails to converge, reconstructing missing regions worse than a constant fill. Across pooled datasets the epoch count is derived from the window count so every dataset receives the same gradient-step budget ( 3,100 updates); otherwise datasets of many short entities train an order of magnitude less than SMD and the comparison reflects budget rather than method. The refiner stays light enough for retraining on constrained edge infrastructure.
V. EXPERIMENTAL EVALUATION
A. Experimental Setup
To validate the proposed framework, we utilize four widely used multi-sensor IIoT anomaly detection benchmarks: Server Machine Dataset (SMD), Soil Moisture Active Passive (SMAP), Mars Science Laboratory (MSL), and Pooled Server Metrics (PSM) [13], [39], [40]. To ensure a robust, global evaluation rather than cherry-picking specific subsets, we pooled all machine entities within each dataset. All continuous data sequences are processed using a sliding window size of . Training and accuracy experiments run on a server with dual Intel Xeon E5-2620 v4 CPUs, 125 GiB of RAM, and NVIDIA GeForce RTX 3090 GPUs under Ubuntu 22.04 LTS; deployment latency is profiled separately at batch size one on a single CPU thread (Section V-H).
To simulate severe industrial operating conditions, we systematically inject continuous block missing masks, varying the missing ratio from 10% to 50% of the total window length. Missing ratios exceeding 30% represent critical communication blackouts where standard statistical interpolations completely fail [1]. Additionally, we inject Gaussian noise ( ) to evaluate the framework's baseline resilience against general sensor degradation.
Crucially, in terms of evaluation metrics, we explicitly abandon the widely criticized Point Adjustment (PA) protocol. Recent system studies indicate that PA induces a severe overestimation bias, masking the structural flaws of generative models that trigger massive false alarms across contiguous segments [41]. To accurately reflect the true system fatigue experienced in IIoT environments, we strictly report the Point-to-Point (P2P) F1-score, Precision, and Recall. All reported metrics are averaged over five independent runs with different random seeds. We report 95% confidence intervals rather than means alone, and compare methods with paired t-tests on the per-seed differences: pairing on seed removes the variance the two methods share, which is the comparison the claims actually rest on. Because a favourable best-threshold F1 does not by itself establish that a refiner reconstructed anything, we additionally record reconstruction fidelity—output scale, the fraction of samples pinned to the clipping bound, and reconstruction error on observed and missing positions—for every configuration, and report it alongside detection quality.
B. Mitigation of Imputation Bias (Precision-Recall Imbalance)
To isolate the effect of pure error-centric imputation, we evaluate the baselines under a severe 40% block missing scenario. Figure 4 reports the comparison on a representative subset (SMD 1-1), where exact model behaviours are visible.
Imputation bias is visible most clearly in TIMBA, which attains 0.822 recall at 0.332 precision and ends up below the unrefined detector (): MSE-optimised reconstruction fills missing blocks with smooth normal patterns, creating abrupt boundary artifacts that the downstream detector reads as widespread anomalies. Under the relaxed PA metric such a model would appear effective; strict P2P evaluation exposes the precision cost that drives alarm fatigue.
This failure is not universal among reconstruction-based refiners: CSDI and iTransformer both improve substantially over the unrefined detector. The reading these numbers support is not that MSE-trained imputation fails outright, but that aligning the refinement objective with the detector yields a further gain on top of it. TADR reaches the highest F1 (+0.338 against the unrefined detector, ) and the highest precision simultaneously, indicating the additional signal it recovers is not bought with false alarms.
C. Where the Recovered Detections Come From
A refiner can only add detections where some anomaly evidence survives the outage. To test whether TADR recovers partially observed anomalies or infers unseen ones from context, we bucket every anomalous point of the SMD 1-1 comparison by its masked fraction: the share of the sliding windows covering that point in which it was dropped. Table I reports the detection rate per bucket at each method's F1-optimal threshold.
TABLE I DETECTION RATE BY MASKED FRACTION, THE SHARE OF COVERING WINDOWS IN WHICH AN ANOMALOUS POINT WAS DROPPED (SMD 1-1, 40% BLOCK MISSING, FIVE SEEDS). THE LAST ROW IS THE FALSE-ALARM RATE ON NORMAL POINTS.
| Masked fraction | Points | Raw | CSDI | TADR |
|---|---|---|---|---|
| 25–50% | 2,643 | 0.344 | 0.735 | 0.778 |
| 50–75% | 51 | 0.205 | 0.665 | 0.830 |
| 75–100% | 0 | — | — | — |
| Normal (false alarms) | 25,785 | 0.027 | 0.056 | 0.037 |
No anomalous point was masked in more than 75% of its windows: each window draws its own mask, so under stride-one evaluation every point is observed in many windows. A point that no window ever observes is unrecoverable in principle, and our results make no claim about that case. Within the observed range, TADR's advantage over the unrefined detector grows with the masked fraction (+0.43 to +0.63), the opposite of what an account based on inferring the anomaly from its context would predict, although the higher bucket holds only 51 points. Its false-alarm rate stays close to the unrefined detector's and below CSDI's, so the additional detections are not bought by inflating scores. The mechanism is therefore
the preservation of partially observed anomaly evidence, and the method assumes that each anomaly remains observed in at least part of the windows that cover it.
D. Generality Across Detector Architectures
We further investigate the architectural generality of the task-aware mechanism. We integrated TADR directly upstream of three distinct state-of-the-art detector architectures (Anomaly Transformer, TimesNet, and KAN-AD).
Figure 5 reports the result, and it is more selective than we had expected. On the two reconstruction-error detectors the gain is large and significant: +0.108 for KAN-AD and +0.098 for TimesNet under 40% block missing (, ), and +0.082 and +0.078 under Gaussian noise. On Anomaly Transformer it is absent in both conditions (-0.009, -0.016; neither significant).
We therefore describe TADR as a plug-in for reconstruction-error detectors rather than a universally applicable optimizer. Both architectures that benefit score a window by how badly they reconstruct it, so sharpening a suppressed anomaly moves the score directly, whereas Anomaly Transformer derives its score from association discrepancy, which a refined window need not shift in the same way—consistent with reports that detectors respond to noise in structurally different ways [29]. The Gaussian condition doubles as a sanity check: with no missing block to fill, the refiner neither helps nor harms, confirming it does not degrade a pipeline already on intact data.
E. What the Gain Depends On
Task-aware refinement reconstructs a corrupted window from the channels that survived, so its benefit should scale with how much mutually redundant continuous signal remains. We test that prediction directly, by withholding channels from a dataset where the method works.
TABLE II BENEFIT AGAINST THE NUMBER OF CHANNELS RETAINED (SMD 1-1, 40% BLOCK MISSING), AND AGAINST THE OVERLAP BETWEEN SUCCESSIVE EVALUATION WINDOWS. IS THE PAIRED DIFFERENCE OVER FIVE SEEDS.
| Channels retained | 38 | 24 | 12 | 6 | 3 | 1 |
|---|---|---|---|---|---|---|
| F1 vs. Raw | +0.356 | +0.293 | +0.217 | +0.168 | +0.050 | +0.041 |
| <0.0001 | 0.004 | 0.015 | 0.049 | 0.51 | 0.29 | |
| Test stride | 1 | 5 | 25 | 50 | 100 | |
| F1 vs. Raw | +0.352 | +0.372 | +0.380 | +0.339 | +0.300 | |
| <0.0001 | <0.0001 | <0.0001 | <0.0001 | 0.0004 |
The two forms of redundancy behave differently. Spatial redundancy carries the method: the benefit falls monotonically as channels are withheld, from +0.356 with all 38 to +0.041 with one, and is no longer significant below six channels. Temporal overlap does not: scoring each timestamp exactly once, at a test stride equal to the window length, leaves the gain essentially intact, so the overlapped sliding window is a convenience of the protocol rather than part of the mechanism.
This predicts that the gain tracks the continuous channels a dataset actually provides, not its nominal count. We pool all

Fig. 3. Global P2P F1 across four IIoT datasets at 40% block missing, five seeds with 95% confidence intervals. Datasets are annotated with the number of continuous channels they provide, which is what the benefit of task-aware refinement tracks.

Fig. 4. Refiner comparison under 40% block missing (SMD 1-1). Means over five seeds; error bars are 95% intervals on F1, and the right column the paired difference against the unrefined detector (paired t-test: TADR , iTransformer , CSDI , TIMBA ).

Fig. 5. Detector generality on pooled SMD. Bars are means over five seeds, error bars 95% intervals on the refined score, and the annotation above each pair the paired difference. Gains are significant for KAN-AD and TimesNet (), absent for Anomaly Transformer.
entities within each of the four datasets and test that as the missing ratio rises from 10% to 50%.
The prediction holds (Figure 3). SMD supplies 33 of 38
continuous channels and is where TADR is strongest, with a paired gain of +0.090 to +0.108, significant at every missing ratio from 10% to 50% () and flat as the ratio rises. At this pooled scale a plain diffusion imputer is nearly as effective (+0.087 to +0.093), so the margin of the task-aware objective over CSDI is clearest on the single entity, where it is 0.17 (Figure 4), and in the channel ablation, where it is 0.12 with all channels retained. The telemetry datasets are the opposite of what their channel counts suggest: SMAP and MSL nominally offer 25 and 55 channels, but only one of each is an analogue sensor reading, the rest being one-hot command signals a Gaussian process cannot represent and a dropout does not meaningfully destroy. With one continuous stream to work from they sit at the far-right end of the channel row of Table II, exactly where the controlled ablation places them. Continuous-channel gating keeps the refiner off the command channels but cannot manufacture redundancy the data lacks: at 40% missing TADR remains below the unrefined detector on SMAP (-0.066) and MSL (-0.016).
PSM sharpens the condition further, since its channels are entirely continuous yet the gain is also absent. There the unrefined detector already attains 0.88 recall, so little anomaly evidence is lost to the outage in the first place; a plain diffusion imputer is roughly neutral on the same data, which locates the cost in the task-aware objective rather than in generative refinement. Redundancy is therefore necessary but not sufficient: the benefit scales with how much evidence the outage actually removes from the detector, and vanishes when little is removed.
F. Ablation Study on Task-Aware Objectives
To rigorously validate the contribution of each objective within the TADR framework, we conducted an ablation study under the 40% block missing scenario. To ensure a strict yet stable evaluation of exact timestamps, we utilized a smoothed P2P metric (moving average window of 5).
TABLE III ABLATION ON LOSS COMPONENTS (SMOOTHED P2P F1, 40% BLOCK MISSING). IS THE PAIRED DIFFERENCE AGAINST THE MSE-ONLY REFINER OVER FIVE SEEDS.
| Loss Components | P2P F1 | Precision | Recall | ||
|---|---|---|---|---|---|
| Recon (MSE Only) | 0.306 ± 0.069 | 0.525 | 0.313 | — | — |
| Recon + Feature | 0.542 ± 0.091 | 0.561 | 0.540 | +0.236 | 0.012 |
| Recon + Feature + Enhance (Full) | 0.769 ± 0.049 | 0.762 | 0.787 | +0.463 | 0.0002 |
| Full objective, single-pass refiner | 0.469 ± 0.065 | 0.708 | 0.359 | +0.163 | 0.010 |
Table III shows a clear progression. The MSE-only refiner yields 0.306, held back by imputation bias. Feature matching contributes +0.236 by aligning the latent representations, but it buys recall at the cost of precision (0.525 → 0.561 against 0.313 → 0.540 recall), because boundary artifacts still trigger false alarms. The decisive component is the anomaly enhancement loss, which raises F1 to 0.769—a paired gain of +0.463 over the MSE-only refiner (), the largest effect measured anywhere in this work—and, unlike the intermediate step, improves precision and recall together. The final row isolates the generative process itself: a deterministic single-pass refiner trained on the identical objective and data reaches only 0.469, so the iterative formulation is worth +0.300 beyond the loss function, which is what justifies its sampling cost.
G. Sensitivity to the Task-Aware Loss Weights
The two weights and are the only hyper-parameters the task-aware objective introduces, and Figure 6 sweeps both over a grid under the same protocol as the ablation.

Fig. 6. P2P F1 over the () grid, mean of five seeds. The setting used throughout the paper is outlined.
The setting used throughout, (0.1, 0.5), attains 0.776 against a grid optimum of 0.787—a difference well inside the confidence interval—and the objective is insensitive to over an order of magnitude at the chosen . Most informative is the leftmost column: with the grid collapses to between 0.296 and 0.639 regardless of , independently
confirming that the enhancement term, not feature matching, carries the method. Beyond performance degrades again as the refiner begins inflating scores on normal windows.
H. System Overhead and Edge Feasibility
Diffusion makes inference cost proportional to the sampling budget, scaling as . We therefore report latency against , and per window as well as per batch, since the two differ by two orders of magnitude and only the former is meaningful for streaming.
TABLE IV INFERENCE OVERHEAD. BATCH FIGURES USE BATCH SIZE 256 ON ONE RTX 3090 WITH CUDA SYNCHRONISATION, MEASURED WITH THE GPU OTHERWISE IDLE (MEANS OF FIVE RUNS; THE ROW IS FROM THE SAMPLING-STEP PROFILE). STREAMING ROWS USE BATCH SIZE 1 ON A SINGLE CPU THREAD OF A 2.1 GHz XEON E5-2620 V4. THE REFINER OCCUPIES 4.03 MB.
| Configuration | ms / batch | ms / window |
|---|---|---|
| Raw (No Refiner) | 0.39 | 0.002 |
| TIMBA | 0.85 | 0.003 |
| iTransformer | 1.67 | 0.007 |
| CSDI () | 241.8 | 0.944 |
| Ours (TADR), | 240.5 | 0.939 |
| Ours (TADR), | 44.2 | 0.173 |
| Streaming, one CPU core (1 Hz sensor streams sustained) | ||
| TADR | — | 205.6 / 41.4 / 20.8 |
| concurrent streams per core | — | 5 / 24 / 48 |
Non-generative refiners execute in about a millisecond per batch while diffusion pays for iterative sampling: roughly 240 ms at the full budget, the same as CSDI, with which TADR shares its network and sampler. Ten steps brings this to 44.2 ms per batch, and 41.4 ms per window in streaming mode, at which point a single CPU core sustains roughly 24 concurrent 1 Hz streams from a 4.03 MB model—so a GPU is not a prerequisite. The single server core is a proxy for a gateway-class processor; we have not measured on an embedded board, where per-core throughput is typically lower.
I. Sampling Budget and Reconstruction Fidelity
Because latency is linear in , the sampling budget is the principal deployment lever. Table V sweeps it with reconstruction fidelity reported next to detection quality.
TABLE V DETECTION QUALITY AND RECONSTRUCTION FIDELITY AGAINST THE SAMPLING BUDGET (SMD 1-1, 40% BLOCK MISSING). SATURATION IS THE FRACTION OF OUTPUT PINNED TO THE CLIPPING BOUND; OBSERVED MSE IS OVER NEVER-MISSING SAMPLES.
| CSDI F1 | TADR F1 | TADR sat. (%) | TADR obs. MSE | |
|---|---|---|---|---|
| 50 | 0.628 | 0.710 | 0.0 | 1.86 |
| 25 | 0.564 | 0.714 | 0.0 | 1.64 |
| 10 | 0.426 | 0.747 | 0.0 | 1.96 |
| 5 | 0.452 | 0.710 | 0.0 | 6.16 |
| 2 | 0.435 | 0.695 | 0.9 | 63.0 |
TADR is statistically flat between ten and fifty steps: the paired difference is +0.038 with , indistinguishable at five seeds. CSDI degrades sharply below twenty-five (0.426 at ten against 0.628 at fifty). We attribute this to where the task-aware terms act—on the one-step estimate , exactly what few-step sampling relies on, so the model is trained to make that estimate useful to the detector. Since latency is linear in , is the operating point we recommend: a five-fold saving at no measurable cost in quality.
The lower rows matter for a different reason. At two steps the output saturates its clipping bound on roughly half of all samples and reconstruction error rises fortyfold, yet best-threshold P2P F1 remains near 0.69. A detection metric that cannot separate this from genuine refinement is not sufficient evidence alone—the same weakness we identify in Point Adjustment, and the reason fidelity is reported throughout.
VI. DISCUSSION
A. Edge Deployment and System Acceleration
TADR inherits the iterative sampling cost of its generative architecture: 44 ms per batch of 256 windows at ten steps, rising to about 240 ms at fifty. The question that matters for deployment is not throughput but per-stream cost on the device that would run it, and a single CPU core sustains roughly 24 concurrent 1 Hz streams at ten steps with a 4.03 MB model (Section V). GPU acceleration is therefore not a prerequisite, though power, thermal headroom, and multi-tenant scheduling on PLCs and low-power gateways remain open [42].
Two further directions remain, and our measurements qualify both. Reducing the sampling budget is the more effective lever, since latency is linear in , and it realises much of what step distillation or Consistency Models [43] promise without additional training—but it has a floor. One-step sampling from pure noise must divide by , and the output then saturates its clipping bound on over half of all samples while still scoring a competitive best-threshold F1, which is why fidelity accompanies every detection metric. Compiler-level quantisation is the second, but must be the right kind: dynamic INT8 is marginally slower than FP32 here (47.3 against 41.4 ms), targeting linear layers while this refiner's cost is convolutional. Static or quantisation-aware training is the appropriate route.
Because quality is flat between fifty and ten steps but collapses below five, is also a natural control variable, lowered under power or thermal pressure and raised when headroom returns, above the degeneracy floor we identify.
B. Structural Redundancy and Graceful Degradation
On SMD, TADR's gain is flat across block missing ratios from 10% to 50% (Section V-E), an instance of graceful degradation obtained by exploiting structural redundancy. Section V attributes it to spatial rather than temporal redundancy, and the practical consequence is a design one: because the benefit depends on how many mutually redundant channels a deployment carries rather than on how densely it samples, a topology with overlapping receptive fields tolerates outages that would otherwise demand duplicated hardware.
C. Limitations and Future Work
While TADR proves highly effective for continuous, physically correlated multi-sensor streams, its current architecture assumes the presence of several mutually redundant continuous channels, and we observed two regimes in which it does not help.
The first is data dominated by discrete channels. A Gaussian diffusion process has no way to represent one-hot command signals, and restricting the refiner to the continuous channels recovers most, but not all, of the deficit on the telemetry datasets. The same limitation applies a fortiori to asynchronous event logs such as network routing or financial transaction streams.
The second is more interesting and less expected. On PSM, whose channels are entirely continuous, the unrefined detector already attains 0.88 recall, so there is little missed signal for the refiner to restore and refinement subtracts from what the detector would otherwise see. We attempted nine variants targeting this regime—rescaling, budget, both loss weights, the synthetic anomaly length and magnitude, its batch fraction, and confining the refiner to the missing region—and none recovered it. A plain diffusion imputer without the task-aware terms is neutral on this dataset, which locates the cost in the task-aware machinery rather than in generative refinement as such. We therefore state the operating condition directly: the benefit scales with how much anomaly evidence the detector loses to the outage, and vanishes when little is lost.
Two threats remain outside our evaluation. TADR is resilient to random Gaussian noise, but a targeted poisoning or adversarial perturbation injected into the observable channels could steer the refiner into hallucinating boundary artifacts and bypassing the detector; bounding the confidence of generated imputations, for instance via conformal prediction, is the natural response. Industrial systems also undergo concept drift through mechanical wear, and adapting the task-aware alignment over time without full retraining remains open. Future work will address asynchronous and heterogeneous sensor networks, zero-shot drift adaptation, and multi-tenant edge scheduling when several detection pipelines share one accelerator under QoS constraints.
VII. CONCLUSION
In this study, we addressed the systemic inefficiencies and structural vulnerabilities of conventional time-series anomaly detection pipelines deployed in IIoT edge environments subject to severe block missing conditions. We showed that the standard “impute-then-detect” paradigm, which relies on disjointed MSE-optimized generative models, admits an imputation bias that smooths over cyber-physical attack signatures and generates boundary artifacts that trigger alarm fatigue.
To resolve this, we introduced TADR, a conditional diffusion refiner whose training objective is coupled to the loss landscape of the frozen downstream detector. Because back-propagating through the sampling trajectory is intractable, the task-aware terms are applied to the one-step estimate of the clean window that the noise prediction already provides, leaving training no more expensive than plain diffusion training. Under strict Point-to-Point evaluation with five seeds and paired significance tests, TADR raises P2P F1 by +0.338 over the unrefined detector on SMD, and by +0.090 to +0.108 on pooled SMD at every missing ratio from 10% to 50%. The ablation isolates the source of this gain: the anomaly enhancement objective alone contributes +0.463, and the iterative generative formulation contributes a further +0.300 over a single-pass refiner trained on the identical objective.
Equally important is where the method does not help. The benefit scales with how much anomaly evidence the outage removes from the detector: it is large on multivariate continuous streams with mutually redundant channels, and disappears when the observable channels are predominantly one-hot command signals or when the unrefined detector already recovers most anomalies unaided. We report these regimes explicitly, with a controlled channel ablation reproducing the same collapse on a dataset where the method does work, because a precisely stated operating condition is more useful than an averaged claim of superiority.
On feasibility, a GPU is not a prerequisite: at ten sampling steps the refiner retains its detection quality while running in 41.4 ms per window on a single CPU core, sustaining roughly 24 concurrent 1 Hz streams from a 4.03 MB model. We also identify the budget below which sampling degenerates while conventional detection metrics fail to register it, which is why reconstruction fidelity is reported throughout.
This work argues against separating reconstruction from detection in resource-constrained pipelines, and for stating the conditions under which coupling them pays. Future work will address discrete and asynchronous channels, adaptive sampling under power and thermal limits, and validation on physical testbeds under operational drift.
ACKNOWLEDGMENT
This research was supported by Development of Field Technology for Responding to Illegal drugs Program through the Korea Institutes of Police Technology (KIPoT) funded by the Ministry of Science and ICT & Korean National Police Agency (RS-2026-25535833).
REFERENCES
[1] W. Cao, D. Wang, J. Li, H. Zhou, L. Li, and Y. Li, "Brits: Bidirectional recurrent imputation for time series," in Advances in Neural Information Processing Systems (NeurIPS), vol. 31, 2018.
[2] X. Miao, Y. Wu, J. Wang, Y. Gao, X. Mao, and J. Yin, “Generative semi-supervised learning for multivariate time series imputation,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 35, 2021, pp. 8983–8991.
[3] Y. Luo, X. Cai, Y. Zhang, J. Xu, and X. Yuan, “Multivariate time series imputation with generative adversarial networks,” Advances in neural information processing systems, vol. 31, 2018.
[4] Y. Tashiro, J. Song, Y. Song, and S. Ermon, “Csd: Conditional score-based diffusion models for probabilistic time series imputation,” Advances in Neural Information Processing Systems, vol. 34, pp. 24 804–24 816, 2021.
[5] J. Xu, H. Wu, J. Wang, and M. Long, “Anomaly transformer: Time series anomaly detection with association discrepancy,” in International Conference on Learning Representations (ICLR), 2022.
[6] H. Wu, T. Hu, Y. Liu, H. Dong, J. Wang, and M. Long, “Timesnet: Temporal 2d-variation modeling for general time series analysis,” in International Conference on Learning Representations (ICLR), 2023.
[7] B. Zong, Q. Song, M. R. Min, W. Cheng, C. Lumezanu, D. Cho, and H. Chen, “Deep autoencoding gaussian mixture model for unsupervised anomaly detection,” in International Conference on Learning Representations (ICLR), 2018.
[8] J. Audibert, P. Michiardi, F. Guyard, S. Marti, and M. A. Zuluaga, “Usad: Unsupervised anomaly detection on multivariate time series,” in Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, 2020, pp. 3395–3404.
[9] D. Li, D. Chen, B. Jin, L. Shi, J. Goh, and S.-K. Ng, “Mad-gan: Multivariate anomaly detection for time series data with generative adversarial networks,” in International conference on artificial neural networks. Springer, 2019, pp. 703–716.
[10] K. Rasul, C. Seward, I. Schuster, and R. Vollgraf, “Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting,” in International Conference on Machine Learning. PMLR, 2021, pp. 8857–8868.
[11] P. Malhotra, L. Vig, G. Shroff, and P. Agarwal, “Long short term memory networks for anomaly detection in time series,” in Proceedings of the 23rd European symposium on artificial neural networks, computational intelligence and machine learning (ESANN), 2015, p. 89.
[12] D. Park, Y. Hoshi, and C. C. Kemp, “A multimodal anomaly detector for robot-assisted feeding using an lstm-based variational autoencoder,” in IEEE Robotics and Automation Letters, vol. 3. IEEE, 2018, pp. 1544–1551.
[13] Y. Su, Y. Zhao, C. Niu, R. Liu, W. Sun, and D. Pei, “Robust anomaly detection for multivariate time series through stochastic recurrent neural network,” in Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, 2019, pp. 2828–2837.
[14] Y. Liu, T. Hu, H. Zhang, H. Wu, S. Wang, L. Ma, and J. Wang, “itransformer: Inverted transformers are effective for time series forecasting,” in International Conference on Learning Representations (ICLR), 2024.
[15] Z. Liu, Y. Wang, S. Vaidya, F. Ruehle, J. Halverson, M. Soljačić, T. Y. Hou, and M. Tegmark, “Kan: Kolmogorov-arnold networks,” in International Conference on Machine Learning (ICML), 2024.
[16] Y. Tang, Y. Zhao, Y. Liu, and D. Pei, “Joint modeling of local and global temporal dynamics for multivariate time series anomaly detection with partial observations,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, 2020, pp. 5956–5963.
[17] R. J. Little and D. B. Rubin, Statistical analysis with missing data. John Wiley & Sons, 2019, vol. 793.
[18] Z. Che, S. Purushotham, K. Cho, D. Sontag, and Y. Liu, “Recurrent neural networks for multivariate time series with missing values,” Scientific reports, vol. 8, no. 1, pp. 1–12, 2018.
[19] J. Yoon, D. Jarrett, and M. Van der Schaar, “Time-series generative adversarial networks,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 32, 2019.
[20] W. Du, D. Cote, and Y. Liu, “Saits: Self-attention-based imputation for time series,” Expert Systems with Applications, vol. 219, p. 119619, 2023.
[21] H. Zhao, Y. Wang, J. Duan, C. Huang, D. Cao, Y. Tong, B. Xu, J. Bai, J. Tong, and Q. Zhang, “Multivariate time-series anomaly detection via graph attention network,” in International Conference on Data Mining (ICDM). IEEE, 2020, pp. 841–850.
[22] J. Ho, A. Jain, and P. Abbeel, “Denoising diffusion probabilistic models,” Advances in neural information processing systems, vol. 33, pp. 6840–6851, 2020.
[23] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole, “Score-based generative modeling through stochastic differential equations,” in International Conference on Learning Representations (ICLR), 2021.
[24] J. Solis, J. Lee, and D. Smith, “Timba: Time series imputation with bidirectional mamba and diffusion,” in Proceedings of the International Conference on Machine Learning (ICML), 2024.
[25] H. Lin et al., “Diffusion models for time-series applications: a survey,” Frontiers of Information Technology & Electronic Engineering, vol. 25, no. 1, pp. 21–43, 2024.
[26] A. Garg, W. Zhang, J. Samaranayake, G. Lukoianova, N. Ploskas et al., “An evaluation of anomaly detection and diagnosis in multivariate time series,” in Advances in Neural Information Processing Systems, vol. 34, 2021, pp. 25 087–25 099.
[27] D. B. Rubin, "Inference and missing data," Biometrika, vol. 63, no. 3, pp. 581–592, 1976.
[28] X. Yi, Y. Zheng, J. Zhang, and T. Li, "St-mvl: filling missing values in geo-sensory time series data," in Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI), 2016, pp. 2704–2710.
[29] J. Park and M. Min, “Robustness and performance comparison of generative ai time series anomaly detection under noise,” Computer Modeling in Engineering & Sciences, vol. 145, no. 3, pp. 3913–3948, 2025.
[30] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in Proceedings of the 25th international conference on Machine learning, 2008, pp. 1096–1103.
[31] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial nets,” Advances in neural information processing systems, vol. 27, 2014.
[32] G. Hinton, O. Vinyals, and J. Dean, “Distilling the knowledge in a neural network,” arXiv preprint arXiv:1503.02531, 2015.
[33] A. Romero, N. Ballas, S. E. Kahou, A. Chassang, C. Gatta, and Y. Bengio, “Fitnets: Hints for thin deep nets,” in International Conference on Learning Representations (ICLR), 2015.
[34] T. DeVries and G. W. Taylor, “Improved regularization of convolutional neural networks with cutout,” arXiv preprint arXiv:1708.04552, 2017.
[35] L. Ruff, R. A. Vandermeulen, N. Görnitz, A. Binder, E. Müller, K.-R. Müller, and M. Kloft, “Deep semi-supervised anomaly detection,” in International Conference on Learning Representations (ICLR), 2020.
[36] S. Zagoruyko and N. Komodakis, “Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer,” in International Conference on Learning Representations (ICLR), 2017.
[37] B. Heo, J. Kim, S. Yun, H. Park, N. Kwak, and J. Y. Choi, “A comprehensive overhaul of feature distillation,” in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019, pp. 1921–1930.
[38] A. Kendall, Y. Gal, and R. Cipolla, “Multi-task learning using uncertainty to weigh losses for scene geometry and semantics,” in Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), 2018, pp. 7482–7491.
[39] K. Hundman, V. Constantinou, C. Laporte, I. Colwell, and T. Soderstrom, “Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding,” in Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining, 2018, pp. 387–395.
[40] A. Abdulaal, Z. Liu, and T. Lance, “Practical approach to asynchronous multivariate time series anomaly detection and localization,” in Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining, 2021, pp. 2465–2474.
[41] S. Kim, K. Choi, H.-S. Choi, B. Lee, and S. Yoon, “Towards a rigorous evaluation of time-series anomaly detection,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 36, 2022, pp. 7194–7201.
[42] F. Croce and M. Hein, “Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks,” in International conference on machine learning. PMLR, 2020, pp. 2206–216.
[43] Y. Song, P. Dhariwal, M. Chen, and I. Sutskever, “Consistency models,” in International Conference on Machine Learning (ICML), 2023.