VAN-AD: Visual Masked Autoencoder with Normalizing Flow For Time Series Anomaly Detection

arXiv cs.LG / 3/31/2026

💬 OpinionSignals & Early TrendsIdeas & Deep AnalysisModels & Research

Key Points

  • The paper addresses time series anomaly detection challenges in IoT systems, focusing on poor cross-dataset generalization when models are trained separately per dataset.
  • It proposes VAN-AD, adapting a pretrained vision Masked Autoencoder (MAE) to time series while mitigating direct-transfer problems like overgeneralization and weak local perception.
  • VAN-AD introduces an Adaptive Distribution Mapping Module (ADMM) to map pre/post-MAE reconstruction statistics into a unified space to better emphasize abnormal patterns.
  • It adds a Normalizing Flow Module (NFM) to combine MAE reconstruction with density estimation of the current time-window under a global distribution.
  • Experiments across nine real-world datasets show VAN-AD consistently outperforms prior state-of-the-art TS anomaly detection methods, and the authors provide code and datasets publicly.

Abstract

Time series anomaly detection (TSAD) is essential for maintaining the reliability and security of IoT-enabled service systems. Existing methods require training one specific model for each dataset, which exhibits limited generalization capability across different target datasets, hindering anomaly detection performance in various scenarios with scarce training data. To address this limitation, foundation models have emerged as a promising direction. However, existing approaches either repurpose large language models (LLMs) or construct largescale time series datasets to develop general anomaly detection foundation models, and still face challenges caused by severe cross-modal gaps or in-domain heterogeneity. In this paper, we investigate the applicability of large-scale vision models to TSAD. Specifically, we adapt a visual Masked Autoencoder (MAE) pretrained on ImageNet to the TSAD task. However, directly transferring MAE to TSAD introduces two key challenges: overgeneralization and limited local perception. To address these challenges, we propose VAN-AD, a novel MAE-based framework for TSAD. To alleviate the over-generalization issue, we design an Adaptive Distribution Mapping Module (ADMM), which maps the reconstruction results before and after MAE into a unified statistical space to amplify discrepancies caused by abnormal patterns. To overcome the limitation of local perception, we further develop a Normalizing Flow Module (NFM), which combines MAE with normalizing flow to estimate the probability density of the current window under the global distribution. Extensive experiments on nine real-world datasets demonstrate that VAN-AD consistently outperforms existing state-of-the-art methods across multiple evaluation metrics.We make our code and datasets available at https://github.com/PenyChen/VAN-AD.