Lune

AAAI2023Top-tier venue

Mean-Shifted Contrastive Loss for Anomaly Detection

Tal Reiss, Yedid Hoshen

Abstract

Deep anomaly detection methods learn representations that separate between normal and anomalous images. Although self-supervised representation learning is commonly used, small dataset sizes limit its effectiveness. It was previously shown that utilizing external, generic datasets (e.g. ImageNet classification) can significantly improve anomaly detection performance. One approach is outlier exposure, which fails when the external datasets do not resemble the anomalies. We take the approach of transferring representations pre-trained on external datasets for anomaly detection. Anomaly detection performance can be significantly improved by fine-tuning the pre-trained representations on the normal training images. In this paper, we first demonstrate and analyze that contrastive learning, the most popular self-supervised learning paradigm cannot be naively applied to pre-trained features. The reason is that pre-trained feature initialization causes poor conditioning for standard contrastive objectives, resulting in bad optimization dynamics. Based on our analysis, we provide a modified contrastive objective, the Mean-Shifted Contrastive Loss. Our method is highly effective and achieves a new state-of-the-art anomaly detection performance including 98.6% ROC-AUC on the CIFAR-10 dataset.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

25 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere cites A Simple Framework for Contrastive Learning of Visual Representations
  • PointAD: Comprehending 3D Anomalies from Points and Pixels for Zero-shot 3D Anomaly Detection cites Deep One-Class Classification via Interpolated Gaussian Descriptor
  • Deep One-Class Classification via Interpolated Gaussian Descriptor cites A Simple Framework for Contrastive Learning of Visual Representations
  • Deep One-Class Classification via Interpolated Gaussian Descriptor cites Classification-Based Anomaly Detection for General Data
  • Deep One-Class Classification via Interpolated Gaussian Descriptor cites CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances
  • AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection cites Deep One-Class Classification via Interpolated Gaussian Descriptor
  • Invariant Anomaly Detection under Distribution Shifts: A Causal Perspective cites A Simple Framework for Contrastive Learning of Visual Representations
  • Invariant Anomaly Detection under Distribution Shifts: A Causal Perspective cites CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances
  • CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances cites A Simple Framework for Contrastive Learning of Visual Representations
  • CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instances cites Classification-Based Anomaly Detection for General Data
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers25

  1. AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly DetectionQihang Zhou, Guansong Pang, Yu Tian, Shibo He et al.ICLR 2024 · 380 citations
  2. Deep One-Class Classification via Interpolated Gaussian DescriptorYuanhong Chen, Yu Tian, Guansong Pang, Gustavo CarneiroAAAI 2022 · 139 citations
  3. PointAD: Comprehending 3D Anomalies from Points and Pixels for Zero-shot 3D Anomaly DetectionQihang Zhou, Jiangtao Yan, Shibo He, Wenchao Meng et al.NeurIPS 2024 · 49 citations
  4. Focus the Discrepancy: Intra- and Inter-Correlation Learning for Image Anomaly DetectionXincheng Yao, Ruoqi Li, Zefeng Qian, Yan Luo et al.ICCV 2023 · 48 citations
  5. Invariant Anomaly Detection under Distribution Shifts: A Causal PerspectiveJoão B. S. Carvalho, Mengtao Zhang, Robin Geyer, Carlos Cotrini et al.NeurIPS 2023 · 18 citations

Builds on8

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
  3. CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted InstancesJihoon Tack, Sangwoo Mo, Jongheon Jeong, Jinwoo ShinNeurIPS 2020 · 755 citations
  4. Classification-Based Anomaly Detection for General DataLiron Bergman, Yedid HoshenICLR 2020 · 412 citations
  5. Detecting Semantic AnomaliesFaruk Ahmed, Aaron C. CourvilleAAAI 2020 · 93 citations

Related papers

  1. ADPretrain: Advancing Industrial Anomaly Detection via Anomaly Representation PretrainingXincheng Yao, Yan Luo, Zefeng Qian, Chongyang ZhangNeurIPS 2025 · 6 citations
  2. ReContrast: Domain-Specific Anomaly Detection via Contrastive ReconstructionJia Guo, Shuai Lu, Lize Jia, Weihang Zhang et al.NeurIPS 2023 · 124 citations
  3. Efficient Visual Pretraining with Contrastive DetectionOlivier J. Hénaff, Skanda Koppula, Jean-Baptiste Alayrac, Aäron van den Oord et al.ICCV 2021 · 186 citations
  4. Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
  5. Boost Supervised Pretraining for Visual Transfer Learning: Implications of Self-Supervised Contrastive Representation LearningJinghan Sun, Dong Wei, Kai Ma, Liansheng Wang et al.AAAI 2022 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines