NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ImDiffusion: Imputed Diffusion Models for Multivariate Time Series Anomaly Detection

Yuhang Chen, Chaoyun Zhang, Minghua Ma, Yudong Liu, Ruomeng Ding, Bowen Li, Shilin He, Saravan Rajmohan, Qingwei Lin, Dongmei Zhang · DOI

Abstract

Multivariate time series (MTS) anomaly detection is essential for monitoring complex systems, from microservices to medical diagnostics. Traditional approaches typically rely on forecasting or reconstruction, both of which face challenges with noise and stochasticity. This paper introduces ImDiffusion, a framework that reframes anomaly detection as an imputation task. By combining a specialized "grating" masking strategy with the generative power of diffusion models and an ensemble voting mechanism, ImDiffusion achieves state-of-the-art accuracy and a 39.9% improvement in detection timeliness.

Introduction

Detecting anomalies in multivariate time series is a high-stakes challenge. Whether identifying a latency spike in a microservice or an irregular heart rhythm, the goal is rapid and accurate identification. Existing methods generally fall into two categories: forecasting-based models, which predict future values based on past data, and reconstruction-based models, which compress and rebuild sequences. However, forecasting is often hampered by inherent uncertainty in noisy data, while reconstruction can produce "blurry" results that obscure the boundary between normal variations and true anomalies.

The Imputation Paradigm

ImDiffusion shifts the focus to imputation—filling in missing gaps using both past and future context. This approach provides more conditional information to the model, reducing uncertainty and creating a sharper decision boundary.

Comparison of Forecasting, Reconstruction, and Imputation approaches for anomaly detection.

As shown in the figure above, imputation leverages context from both sides of a gap, leading to more stable representations compared to one-sided forecasting or bottleneck-constrained reconstruction.

Methodology

ImDiffusion introduces three primary technical innovations:

1. Grating Data Masking

Instead of random masking, ImDiffusion utilizes a "grating" strategy. The time series is divided into windows and masked in a staggered, checkerboard-like pattern. This forces the model to reconstruct segments using neighboring context from both preceding and succeeding time steps.

The Grating Data Masking strategy used to create training and inference tasks.

2. Unconditional ImTransformer

The core engine is a diffusion model called ImTransformer. Uniquely, it uses an unconditional approach during inference. Rather than feeding the model raw values of unmasked neighbors, it receives the noise added to those neighbors. This prevents "label leakage" where the model might "cheat" by seeing ground truth values of nearby points, ensuring that anomalies result in high, detectable imputation errors. The architecture employs dual transformer layers to capture temporal and spatial dependencies independently.

3. Ensemble Anomaly Inference

Diffusion models iteratively denoise data. ImDiffusion treats these intermediate denoising steps as "votes." By aggregating predictions across multiple steps, the model filters out stochastic noise, producing a more stable and reliable anomaly signal.

Experimental Results

The framework was evaluated on six public benchmarks: SMD, PSM, MSL, SMAP, SWaT, and GCP.

  • State-of-the-Art Performance: ImDiffusion outperformed 10 major baselines, achieving an average F1 score of 92.84%.
  • Detection Timeliness: Using the Average Sequence Detection Delay (ADD) metric, ImDiffusion was 39.9% faster at detecting anomalies than the next best method.
  • Real-World Deployment: Integrated into Microsoft’s email delivery microservice system, ImDiffusion delivered an 11.4% increase in F1 score over previous deep-learning detectors and significantly reduced the Time to Detect (TTD) for incidents.

Conclusion

ImDiffusion demonstrates that reframing anomaly detection as an imputation task significantly enhances both accuracy and speed. By leveraging the generative capabilities of diffusion models and a novel masking strategy, it provides a robust solution for complex multivariate time series monitoring. Future work will focus on reducing model complexity and implementing dynamic thresholding to further refine precision and recall.

Summary updated

BibTeX
@article{chen2023imdiffusion,
  author = {Yuhang Chen and Chaoyun Zhang and Minghua Ma and Yudong Liu and Ruomeng Ding and Bowen Li and Shilin He and Saravan Rajmohan and Qingwei Lin and Dongmei Zhang},
  title = {{ImDiffusion: Imputed Diffusion Models for Multivariate Time Series Anomaly Detection}},
  journal = {Proc. VLDB Endow.},
  year = {2023},
  doi = {10.14778/3632093.3632101},
}
Figure