Continual-MEGA: A large-scale benchmark for generalizable continual anomaly detection

Geonu Lee, Yujeong Oh, Geonhui Jang, Soyoung Lee, Jeonghyo Song, Sungmin Cha, Youngjoon Yoo

TL;DR

To bridge the gap between static anomaly detection models and dynamic real-world deployments, this paper introduces Continual-MEGA, a large-scale benchmark evaluating both incremental learning and zero-shot generalization. Alongside a newly curated, high-variance dataset called ContinualAD, the authors propose a robust baseline method (ADCT) that leverages lightweight adapters and feature synthesis to mitigate catastrophic forgetting while maintaining strong generalization to unseen categories.

What Problem Does This Paper Address?

Traditional industrial anomaly detection (AD) algorithms assume a static environment: a model is trained on a fixed set of normal samples and deployed to find defects on that specific product line. In reality, manufacturing environments are highly dynamic—new products, variations, and defect types arrive sequentially over time.

Retraining models from scratch for every new task is computationally prohibitive and often impossible due to strict data privacy laws or retention policies. Consequently, models deployed in the wild face two major hurdles:

  1. Catastrophic Forgetting: As they adapt to new products, they lose the ability to detect defects in older ones.
  2. Poor Zero-Shot Generalization: They struggle to identify anomalies in entirely unseen product categories without explicit retraining.

Existing AD benchmarks (like MVTec-AD or VisA) are too small, lack visual diversity, and fail to simulate these sequential, real-world deployment challenges.

Motivation for using Continual Learning (CL) and Continual Zero-Shot Learning (CZSL) in anomaly detection.

Methods

The authors introduce a baseline framework called Anomaly Detection across Continual Tasks (ADCT) built on top of a pretrained CLIP (ViT-L/14) backbone. Rather than fully fine-tuning the network, which destroys CLIP's rich primordial knowledge, ADCT uses three core components:

  • Mixture-of-Experts (MoE) Adapters: ADCT inserts four lightweight Multi-Layer Perceptron (MLP) adapters into each block of the CLIP visual encoder. A separate set of adapters is trained for each incoming task to isolate task-specific knowledge. At inference time, these task-specific weights are averaged to form a unified model.
  • Synthetic Feature Generation: To train the adapters effectively without relying on scarce real anomaly data, the model synthesizes anomaly features by adding random Gaussian noise to the extracted normal visual features during the training phase.
  • Generalized Text Prompts: The framework leverages a set of 10 normal and 10 anomalous text prompt templates to guide the vision-language alignment without overfitting to specific object names.

Datasets

The paper introduces ContinualAD, a new dataset featuring 30 real-world object categories with 14,655 normal and 15,827 anomaly images. Crucially, it captures high intra-class variance by using 10 different imaging devices under varied environmental conditions.

The authors combine ContinualAD with six existing public datasets (MVTec-AD, VisA, Real-IAD, VIADUCT, BTAD, MPDD) to create the Continual-MEGA benchmark, totaling 145 classes and over 212,000 images.

Comparison of dataset statistics showing classes, image volume, and pixel variance.
Example visualizations of sample images from various public anomaly detection datasets and the proposed ContinualAD dataset.

Key Insights and Ideas

  • The Localization Collapse: While existing AD methods can maintain decent image-level classification accuracy during continual learning, their pixel-level defect localization performance drops precipitously. They can tell if something is broken, but they forget where the defect is.
  • Pre-trained VLMs are Resilient but Fragile: Vision-Language Models like CLIP provide an excellent foundation for zero-shot generalization. However, heavy adaptation or excessive fine-tuning causes them to overfit to previously seen objects, severely damaging their zero-shot capabilities on unseen classes.
  • Variance Drives Generalization: Training on a dataset with high intra-class variance (like ContinualAD) significantly boosts a model's cross-domain zero-shot performance on completely held-out datasets, acting as a regularizer against domain shift.

Key Results

The benchmark evaluates models across multiple scenarios. In Scenario 1 (standard continual learning with an 85-base / 30-new class setup), ADCT significantly outperforms existing specialized continual AD methods:

  • ADCT (Ours): Achieves an average score of 78.9% Image-AUROC and 32.7% Pixel-AP.
  • IUF (State-of-the-art continual method): Manages only 63.0% Image-AUROC and 8.8% Pixel-AP.

Ablation studies demonstrate that synthetic anomaly feature generation is the single most critical factor for maintaining high pixel-level localization accuracy; omitting it causes a significant drop in performance across both continual and zero-shot settings.

Limitations and Future Work

  • Class Imbalance: The integrated datasets within Continual-MEGA vary wildly in size (e.g., Real-IAD is massive compared to BTAD). This creates a severe class imbalance that can skew evaluation metrics if not carefully managed.
  • Data Scarcity Constraints: To simulate low-resource environments, the benchmark currently enforces a strict setup of only 10 normal and 10 anomaly images per class for training. Exploring how these models scale with varying amounts of training data remains an open question for future work.

Summary updated

BibTeX
@article{lee2026continual,
  author = {Geonu Lee and Yujeong Oh and Geonhui Jang and Soyoung Lee and Jeonghyo Song and Sungmin Cha and Youngjoon Yoo},
  title = {{Continual-MEGA: A large-scale benchmark for generalizable continual anomaly detection}},
  journal = {Neurocomputing},
  year = {2026},
  doi = {10.1016/j.neucom.2026.134460},
}
Figure