Research map / Continual learning / Domain and prompt-based
Unsupervised Continual Anomaly Detection with Contrastively-Learned Prompt
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes UCAD, a task-agnostic continual unsupervised anomaly detection and segmentation framework that uses a key-prompt-knowledge memory with contrastively learned prompts guided by SAM masks.
Problem
Unsupervised anomaly detection in industrial settings must learn new product classes sequentially without labels, but existing UAD methods suffer catastrophic forgetting and cost, and continual methods are not designed for unsupervised pixel-level anomaly segmentation.
Approach
A Continual Prompting Module stores task keys (FPS-sampled ViT features), learnable task prompts, and coreset-compressed normal knowledge in a key-prompt-knowledge memory for task-agnostic inference, while Structure-based Contrastive Learning uses SAM masks as structure labels to pull same-region features together and push others apart when training the prompts.
Key results
- On MVTec AD, UCAD reaches 0.930 mean image AUROC with avg FM 0.010, versus 0.904 for rehearsal-based UniAD* (avg FM 0.076).
- On VisA, UCAD reaches 0.874 mean image AUROC and 0.300 pixel AUPR, ahead of the best non-replay baseline by 4.9 AUROC points on image level.
- Ablation shows the CPM raises MVTec image AUROC from 0.693 to 0.894, and SCL adds a further gain to 0.930.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add CPM to the model without CPM or SCL (ablation) | UCAD · MVTec AD | image AUROC: 0.693 -> 0.894 | Helped |
| Add CPM to the model without CPM or SCL (ablation) | UCAD · VisA | image AUROC: 0.584 -> 0.786 | Helped |
| Add SCL to CPM (ablation) | UCAD · MVTec AD | image AUROC: 0.894 -> 0.930 | Helped |
| Add SCL to CPM (ablation) | UCAD · VisA | image AUROC: 0.786 -> 0.874 | Helped |
| Increase knowledge size from 1x to 4x without SCL (ablation) | UCAD with CPM · MVTec AD | image AUROC: 0.894 -> 0.929 | Helped |
| Increase knowledge size from 1x to 4x without SCL (ablation) | UCAD with CPM · VisA | image AUROC: 0.786 -> 0.860 | Helped |
| Increase knowledge size from 1x to 4x with SCL (ablation) | UCAD with CPM and SCL · MVTec AD | image AUROC: 0.930 -> 0.938 | Helped |
| Increase knowledge size from 1x to 4x with SCL (ablation) | UCAD with CPM and SCL · VisA | image AUROC: 0.874 -> 0.909 | Helped |
| Use ViT encoder layers other than layer 5 (ablation) | UCAD · MVTec AD | image AUROC: 0.840; 0.934; 0.936; 0.906 vs 0.930 | Mixed |
| Use ViT encoder layers other than layer 5 (ablation) | UCAD · VisA | image AUROC: 0.806; 0.876; 0.872; 0.853 vs 0.874 | Mixed |
| Use UCAD instead of UniAD* with rehearsal | Continual anomaly detection · MVTec AD | image AUROC: 0.904 -> 0.930 | Helped |
| Use UCAD instead of UniAD* with rehearsal | Continual anomaly detection · VisA | pixel AUPR: 0.283 -> 0.300 | Helped |
Surprising findings
- Without replay, UniAD already outperforms DNE on VisA, and replay-based UniAD* surpasses DNE on MVTec AD, indicating reconstruction-based models may suit continual UAD.
- Under SCL, increasing the knowledge size gives only marginal gains, whereas without SCL the gains are noticeable.
Limitations
- Relies on frozen ViT features and a single intermediate layer (layer 5) chosen for simplicity; other layers vary by category.
- Baselines without official code were reproduced with non-official implementations, and replay baselines use a 100-sample buffer that may be infeasible in practice.
- Segmentation performance on some categories (e.g., grid, screw) remains low in pixel AUPR.
Experimental setup
Datasets: MVTec AD VisA
Benchmarks: MVTec AD VisA
Metrics: image-level AUROC pixel-level AUPR average forgetting measure (avg FM)
Baselines: DNE PatchCore UniAD CFA CSFlow CutPaste DRAEM FastFlow FAVAE PaDiM RD4AD SPADE
Builds on: PatchCore Segment Anything Model L2P ReConPatch DNE
Closest papers by meaning
- InCLAD: A Continual Learning Benchmark for Industrial Visual Anomaly Detection (NeurIPS 2026 · similarity 0.89)
- One-for-More: Continual Diffusion Model for Anomaly Detection (CVPR 2025 · similarity 0.87)
- PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection (CVPR 2024 · similarity 0.86)
- Co-Progression Knowledge Distillation with Knowledge Prototype for Industrial Anomaly Detection (AAAI 2025 · similarity 0.85)
- Generating and Reweighting Dense Contrastive Patterns for Unsupervised Anomaly Detection (AAAI 2024 · similarity 0.85)
- AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language Models (AAAI 2024 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
