Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Unsupervised Continual Anomaly Detection with Contrastively-learned Prompt (2401.01010v1)

Published 2 Jan 2024 in cs.CV and cs.LG

Abstract: Unsupervised Anomaly Detection (UAD) with incremental training is crucial in industrial manufacturing, as unpredictable defects make obtaining sufficient labeled data infeasible. However, continual learning methods primarily rely on supervised annotations, while the application in UAD is limited due to the absence of supervision. Current UAD methods train separate models for different classes sequentially, leading to catastrophic forgetting and a heavy computational burden. To address this issue, we introduce a novel Unsupervised Continual Anomaly Detection framework called UCAD, which equips the UAD with continual learning capability through contrastively-learned prompts. In the proposed UCAD, we design a Continual Prompting Module (CPM) by utilizing a concise key-prompt-knowledge memory bank to guide task-invariant anomaly' model predictions using task-specificnormal' knowledge. Moreover, Structure-based Contrastive Learning (SCL) is designed with the Segment Anything Model (SAM) to improve prompt learning and anomaly segmentation results. Specifically, by treating SAM's masks as structure, we draw features within the same mask closer and push others apart for general feature representations. We conduct comprehensive experiments and set the benchmark on unsupervised continual anomaly detection and segmentation, demonstrating that our method is significantly better than anomaly detection methods, even with rehearsal training. The code will be available at https://github.com/shirowalker/UCAD.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (53)
  1. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European conference on computer vision, 139–154.
  2. Task-free continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 11254–11263.
  3. MVTec AD–A comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 9592–9600.
  4. Uninformed students: Student-teacher anomaly detection with discriminative latent embeddings. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 4183–4192.
  5. Anomaly Detection: A Survey. ACM Computing Surveys. vol, 41: 15.
  6. Riemannian walk for incremental learning: Understanding forgetting and intransigence. In Proceedings of the European conference on computer vision, 532–547.
  7. Sub-image anomaly detection with deep pyramid correspondences. arXiv preprint arXiv:2005.02357.
  8. Padim: a patch distribution modeling framework for anomaly detection and localization. In Proceedings of International Conference on Pattern Recognition, 475–489. Springer.
  9. Anomaly localization by modeling perceptual features. arXiv preprint arXiv:2008.05369.
  10. Anomaly Detection via Reverse Distillation from One-Class Embedding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 9737–9746.
  11. Imagenet: A large-scale hierarchical image database. In Proceedings of 2009 IEEE conference on computer vision and pattern recognition, 248–255. Ieee.
  12. The farthest point strategy for progressive image sampling. IEEE Transactions on Image Processing, 6(9): 1305–1315.
  13. Towards Total Online Unsupervised Anomaly Detection and Localization in Industrial Vision. arXiv preprint arXiv:2305.15652.
  14. Generative adversarial nets. Advances in neural information processing systems, 27.
  15. Cflow-ad: Real-time unsupervised anomaly detection with localization via conditional normalizing flows. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 98–107.
  16. ReConPatch: Contrastive Patch Representation Learning for Industrial Anomaly Detection. arXiv preprint arXiv:2305.16713.
  17. Masked Swin Transformer Unet for Industrial Anomaly Detection. IEEE Transactions on Industrial Informatics.
  18. Softpatch: Unsupervised anomaly detection with noisy data. Advances in Neural Information Processing Systems, 35: 15433–15445.
  19. Adam: A Method for Stochastic Optimization. CoRR, abs/1412.6980.
  20. Segment Anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 4015–4026.
  21. Overcoming catastrophic forgetting in neural networks. In Proceedings of the national academy of sciences, 114(13): 3521–3526.
  22. Cfa: Coupled-hypersphere-based feature adaptation for target-oriented anomaly localization. IEEE Access, 10: 78446–78454.
  23. PyramidFlow: High-Resolution Defect Contrastive Localization using Pyramid Normalizing Flow. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 14143–14152.
  24. Cutpaste: Self-supervised learning for anomaly detection and localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 9664–9674.
  25. Cross-Modal Alternating Learning with Task-Aware Representations for Continual Learning. IEEE Transactions on Multimedia.
  26. Towards continual adaptation in industrial anomaly detection. In Proceedings of the 30th ACM International Conference on Multimedia, 2871–2880.
  27. Omni-frequency channel-selection representations for unsupervised anomaly detection. arXiv preprint arXiv:2203.00259.
  28. Real3D-AD: A Dataset of Point Cloud Anomaly Detection. In Proceedings of Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track.
  29. Deep Industrial Image Anomaly Detection: A Survey. arXiv preprint arXiv:2301.11514, 2.
  30. P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. arXiv preprint arXiv:2110.07602.
  31. Simplenet: A simple network for image anomaly detection and localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 20402–20411.
  32. VT-ADL: A vision transformer network for image anomaly detection and localization. 2021 IEEE 30th International Symposium on Industrial Electronics (ISIE), 01–06.
  33. Anomaly Detection with Conditioned Denoising Diffusion Models. arXiv preprint arXiv:2305.15956.
  34. Inpainting transformer for anomaly detection. In Proceedings of International Conference on Image Analysis and Processing, 394–406.
  35. Towards total recall in industrial anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 14318–14328.
  36. Same same but differnet: Semi-supervised defect detection with normalizing flows. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, 1907–1916.
  37. Fully convolutional cross-scale-flows for image-based defect detection. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 1088–1097.
  38. Multiresolution knowledge distillation for anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 14902–14912.
  39. Natural synthetic anomalies for self-supervised anomaly detection and localization. In Proceedings of European Conference on Computer Vision, 474–489. Springer.
  40. Revisiting reverse distillation for anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 24511–24520.
  41. Student-Teacher Feature Pyramid Matching for Anomaly Detection. BMVC.
  42. Learning to prompt for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 139–149.
  43. Pushing the Limits of Fewshot Anomaly Detection in Industry Vision: Graphcore. In Proceedings of The Eleventh International Conference on Learning Representations.
  44. Im-iad: Industrial image anomaly detection benchmark in manufacturing. arXiv preprint arXiv:2301.13359.
  45. Learning semantic context from normal samples for unsupervised anomaly detection. In Proceedings of the AAAI conference on artificial intelligence, volume 35, 3110–3118.
  46. A unified model for multi-class anomaly detection. Advances in Neural Information Processing Systems, 35: 4571–4584.
  47. Fastflow: Unsupervised anomaly detection and localization via 2d normalizing flows. arXiv preprint arXiv:2111.07677.
  48. Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 8330–8339.
  49. DSR–A dual subspace re-projection network for surface anomaly detection. arXiv preprint arXiv:2208.01521.
  50. IDDM: An incremental dual-network detection model for in-situ inspection of large-scale complex product. Journal of Industrial Information Integration, 33: 100463.
  51. DiffusionAD: Denoising Diffusion for Anomaly Detection. arXiv preprint arXiv:2303.08730.
  52. Zhao, Y. 2023. OmniAL: A unified CNN framework for unsupervised anomaly localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 3924–3933.
  53. Spot-the-difference self-supervised pre-training for anomaly detection and segmentation. In Proceedings of European Conference on Computer Vision, 392–408. Springer.
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Jiaqi Liu (102 papers)
  2. Kai Wu (134 papers)
  3. Qiang Nie (25 papers)
  4. Ying Chen (333 papers)
  5. Bin-Bin Gao (35 papers)
  6. Yong Liu (721 papers)
  7. Jinbao Wang (30 papers)
  8. Chengjie Wang (178 papers)
  9. Feng Zheng (117 papers)
Citations (8)

Summary

An Overview of Unsupervised Continual Anomaly Detection with Contrastively-learned Prompt

The paper at hand introduces a novel approach to Unsupervised Continual Anomaly Detection (UCAD) with an emphasis on contrastively-learned prompts. The research addresses significant challenges in industrial manufacturing, where obtaining labeled defect data is often impractical. The authors point out a critical gap in existing models: the application of continual learning (CL) methods predominantly depends on supervised annotations, making them less suitable for unsupervised anomaly detection due to the lack of supervision.

To overcome these issues, the paper proposes the UCAD framework, which uses a Continual Prompting Module (CPM) to instill continual learning capabilities in unsupervised anomaly detection (UAD) models. Additionally, the researchers have introduced a Structure-based Contrastive Learning (SCL) module, leveraging the Segment Anything Model (SAM) to optimize prompt learning and anomaly segmentation.

Key Contributions

The research proposes several novel methodologies, which are key to its proposed solution:

  • Continual Prompting Module (CPM): This module employs a key-prompt-knowledge architecture, comprised of a memory bank that helps guide task-invariant anomaly predictions with task-specific knowledge. The method allows the model to automatically select the relevant task queries and adapt to incoming image data without prior knowledge of task identities during the inference phase.
  • Structure-based Contrastive Learning (SCL): This component enhances feature representation by treating SAM masks as structures to guide learning. It contrasts features within the same mask with those from different masks, promoting more discriminative and general feature representations.

The UCAD framework significantly lowers computational overhead by requiring only the current dataset during training and allowing model application to prior tasks without a complete retraining.

Results and Implications

The research demonstrates impressive results, with the proposed UCAD method surpassing existing anomaly detection methods when evaluated on benchmarks for unsupervised continual anomaly detection and segmentation. The authors report a 15.6% improvement in detection and a 26.6% improvement in segmentation over other methods, even those leveraging rehearsal training.

These results indicate UCAD's potential to transform how unsupervised anomaly detection is approached within industrial environments, offering a continual learning model that adapts to new tasks while retaining knowledge of previous ones. This advancement holds significance for real-world applications, particularly in industries where labeling anomalies is costly and defect patterns can vary over time.

Conclusion and Future Prospects

The paper presents a novel and effective approach to anomaly detection in a continual learning framework, addressing some of the practical challenges faced in unsupervised learning scenarios. By removing the dependency on supervised labels and introducing a robust CL system, the proposed model offers significant advancements for industrial manufacturing settings.

Looking forward, there are multiple avenues for further research and development. The combination of contrastively-learned prompts with other model architectures or domains could yield additional improvements, potentially expanding this framework to other real-world applications where continual learning and unsupervised methodologies intersect. Additionally, exploring extensions of this approach to other domains beyond industrial manufacturing may further validate the robustness and versatility of this framework.

Youtube Logo Streamline Icon: https://streamlinehq.com