Don't Just Impute, Detect: Task-Aware Diffusion Pipelines for Edge Anomaly Detection

Jeongsu Park, Taehyeon Yun, Geonwoo Kim, Yuji Lim, Moohong MinarXiv 2026 · arXiv

TL;DR

Standard "impute-then-detect" pipelines for industrial sensor data often fail because their imputation models are trained to minimize reconstruction error, which inadvertently smooths away the very anomalies they are meant to find. This paper introduces the Task-Aware Diffusion Refiner (TADR), a plug-and-play module that uses the loss landscape of a downstream detector to guide the imputation process, sharpening anomaly signals while preserving normal patterns.

What Problem Does This Paper Address?

In Industrial Internet of Things (IIoT) environments, sensor data is frequently lost in contiguous "blocks" due to network dropouts or hardware malfunctions. The conventional solution is a two-step pipeline: first, an imputer fills in the missing data, and then an anomaly detector analyzes the result.

However, the authors identify a critical failure mode called imputation bias. Because most imputers are trained solely on Mean Squared Error (MSE) using normal data, they learn to fill gaps with the most statistically probable "normal" patterns. If an anomaly happens to occur during a data dropout, the imputer effectively erases it by smoothing it back toward normality. Furthermore, these imputers often create artificial boundaries at the edges of missing blocks, which sensitive detectors misinterpret as false alarms.

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.

Methods

The authors propose TADR (Task-Aware Diffusion Refiner), a conditional diffusion model designed to sit directly upstream of a frozen, pre-trained anomaly detector.

Key technical highlights include:

  • Task-Aware Loss Function: Unlike standard models that only use reconstruction loss ($\mathcal{L}_{recon}$), TADR incorporates a feature matching loss ($\mathcal{L}_{feat}$) to preserve semantic features the detector relies on, and an anomaly enhancement loss ($\mathcal{L}_{enhance}$). This last term uses a switching logic: it minimizes score discrepancies for normal data but actively penalizes the refiner for smoothing over synthetic anomalies during training.
  • Efficient Training: Back-propagating through a full diffusion sampling trajectory is computationally expensive. TADR bypasses this by applying its task-aware objectives to a "one-step clean-window estimate" that the noise prediction network already produces. This keeps training costs comparable to standard diffusion models.
  • Plug-and-Play Architecture: Because the downstream detector remains frozen, TADR can be added to existing pipelines without structural modifications to the detection models themselves.
The TADR architecture: A trainable refiner network is guided by three task-aware objectives derived from a frozen downstream detector.

Datasets

The framework was evaluated on four widely used multi-sensor IIoT benchmarks:

  1. Server Machine Dataset (SMD)
  2. Soil Moisture Active Passive (SMAP)
  3. Mars Science Laboratory (MSL)
  4. Pooled Server Metrics (PSM)

The researchers simulated harsh conditions by injecting continuous block missing masks (10% to 50% of the window length) and Gaussian noise.

Key Insights and Ideas

  • MSE is not enough for detection: The "aha moment" is that statistical smoothness (low MSE) is actually detrimental to anomaly detection. A "good" imputation for a detector is one that preserves the discriminative features of the signal, even if they are statistically unlikely.
  • Spatial Redundancy is the Engine: TADR's effectiveness scales with the number of mutually redundant continuous channels. It "borrows" information from surviving sensors to reconstruct the missing ones. If a dataset is dominated by discrete (one-hot) command channels, the Gaussian diffusion process lacks the signal to help.
  • Iterative Refinement vs. Single-Pass: The authors found that the iterative nature of diffusion is worth the cost; a single-pass version of the same model performed significantly worse, likely because the iterative process allows the model to better navigate the complex loss landscape of the detector.

Key Results

  • Significant Performance Boost: On the SMD dataset under 40% block missing conditions, TADR raised the Point-to-Point (P2P) F1-score by 0.338 over the unrefined detector.
  • Ablation Impact: The anomaly enhancement objective was the single largest contributor to success, accounting for a +0.463 gain in F1-score during ablation studies.
  • Edge Feasibility: Despite being a generative model, TADR is efficient. At 10 sampling steps, it runs in 41.4 ms per window on a single CPU core, capable of sustaining 24 concurrent 1 Hz sensor streams from a small 4.03 MB model.
  • Detector Generality: The method works best for detectors that score based on reconstruction error (like TimesNet or KAN-AD) rather than association discrepancy (like Anomaly Transformer).
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 p = 0.0015, iTransformer p = 0.0010, CSDI p = 0.018, TIMBA p = 0.028).

Limitations and Future Work

  • Discrete Data: The current Gaussian diffusion architecture cannot represent one-hot command signals or asynchronous event logs.
  • High-Recall Baselines: On datasets like PSM, where the detector already achieves very high recall (0.88) despite missing data, the refiner offers little benefit and can even be slightly detrimental.
  • Adversarial Robustness: While resilient to random noise, the authors note that targeted adversarial perturbations could potentially trick the refiner into hallucinating artifacts.
  • Future Directions: The authors suggest exploring asynchronous sensor networks, zero-shot adaptation to concept drift (e.g., mechanical wear), and multi-tenant scheduling for shared edge accelerators.

Summary updated

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 ($p = 0.0015$), 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.
BibTeX
@misc{park2026don,
  author = {Jeongsu Park and Taehyeon Yun and Geonwoo Kim and Yuji Lim and Moohong Min},
  title = {{Don't Just Impute, Detect: Task-Aware Diffusion Pipelines for Edge Anomaly Detection}},
  year = {2026},
  eprint = {2610.40732},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.40732},
}
Figure