# MOCCA: Multi-Layer One-Class ClassificAtion for Anomaly Detection

arXiv: https://arxiv.org/abs/2012.12111 · HTML: https://mlsanity.com/paper/2012.12111/

## Key facts

- Cited by 31 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 9 Dec 2020.

## Built on by (most cited first, 30 of 31)

- [Deep Industrial Image Anomaly Detection: A Survey](https://mlsanity.com/paper/2301.11514/) (2023)
- [IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing](https://mlsanity.com/paper/2301.13359/) (2023)
- [Segment Any Anomaly without Training via Hybrid Prompt Regularization](https://mlsanity.com/paper/2305.10724/) (2023)
- [Multimodal Industrial Anomaly Detection by Crossmodal Feature Mapping](https://mlsanity.com/paper/2312.04521/) (2023)
- [Do LLMs Understand Visual Anomalies? Uncovering LLM's Capabilities in Zero-shot Anomaly Detection](https://mlsanity.com/paper/2404.09654/) (2024)
- [Target before Shooting: Accurate Anomaly Detection and Localization under One Millisecond via Cascade Patch Retrieval](https://mlsanity.com/paper/2308.06748/) (2023)
- [A Survey on Unsupervised Anomaly Detection Algorithms for Industrial Images](https://mlsanity.com/paper/2204.11161/) (2022)
- [Curved Geometric Networks for Visual Anomaly Recognition](https://mlsanity.com/paper/2208.01188/) (2022)
- [Towards Zero-shot Point Cloud Anomaly Detection: A Multi-View Projection Framework](https://mlsanity.com/paper/2409.13162/) (2024)
- [NNG-Mix: Improving Semi-supervised Anomaly Detection with Pseudo-anomaly Generation](https://mlsanity.com/paper/2311.11961/) (2023)
- [Clustering Aided Weakly Supervised Training to Detect Anomalous Events in Surveillance Videos](https://mlsanity.com/paper/2203.13704/) (2022)
- [VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformer](https://mlsanity.com/paper/2603.07952/) (2026)
- [Dense Out-of-Distribution Detection by Robust Learning on Synthetic Negative Data](https://mlsanity.com/paper/2112.12833/) (2021)
- [Industrial Anomaly Detection and Localization Using Weakly-Supervised Residual Transformers](https://mlsanity.com/paper/2306.03492/) (2023)
- [Dynamic Distinction Learning: Adaptive Pseudo Anomalies for Video Anomaly Detection](https://mlsanity.com/paper/2404.04986/) (2024)
- [RAD: A Dataset and Benchmark for Real-Life Anomaly Detection with Robotic Observations](https://mlsanity.com/paper/2410.00713/) (2024)
- [SiM3D: Single-instance Multiview Multimodal and Multisetup 3D Anomaly Detection Benchmark](https://mlsanity.com/paper/2506.21549/) (2025)
- [DOC3-Deep One Class Classification using Contradictions](https://mlsanity.com/paper/2105.07636/) (2021)
- [Test Time Training for Industrial Anomaly Segmentation](https://mlsanity.com/paper/2404.03743/) (2024)
- [Towards Personalized Quantum Federated Learning for Anomaly Detection](https://mlsanity.com/paper/2511.07471/) (2025)
- [Enhancing Zero-Shot Anomaly Detection: CLIP-SAM Collaboration with Cascaded Prompts](https://mlsanity.com/paper/2510.11028/) (2025)
- [Y-GAN: Learning Dual Data Representations for Efficient Anomaly Detection](https://mlsanity.com/paper/2109.14020/) (2021)
- [Restricted Generative Projection for One-Class Classification and Anomaly Detection](https://mlsanity.com/paper/2307.04097/) (2023)
- [StackCLIP: Clustering-Driven Stacked Prompt in Zero-Shot Industrial Anomaly Detection](https://mlsanity.com/paper/2506.23577/) (2025)
- [Interpretable Maximum Margin Deep Anomaly Detection](https://mlsanity.com/paper/2603.07073/) (2026)
- [Learning Trustworthy Model from Noisy Labels based on Rough Set for Surface Defect Detection](https://mlsanity.com/paper/2301.10441/) (2023)
- [LBL: Logarithmic Barrier Loss Function for One-class Classification](https://mlsanity.com/paper/2307.10753/) (2023)
- [Improved AutoEncoder with LSTM module and KL divergence](https://mlsanity.com/paper/2404.19247/) (2024)
- [Dual-Mode Deep Anomaly Detection for Medical Manufacturing: Structural Similarity and Feature Distance](https://mlsanity.com/paper/2509.05796/) (2025)
- [When Normality Shifts: Risk-Aware Test-Time Adaptation for Unsupervised Tabular Anomaly Detection](https://mlsanity.com/paper/2605.10242/) (2026)

## Abstract (arXiv)

Anomalies are ubiquitous in all scientific fields and can express an unexpected event due to incomplete knowledge about the data distribution or an unknown process that suddenly comes into play and distorts observations. Due to such events' rarity, to train deep learning models on the Anomaly Detection (AD) task, scientists only rely on "normal" data, i.e., non-anomalous samples. Thus, letting the neural network infer the distribution beneath the input data. In such a context, we propose a novel framework, named Multi-layer One-Class ClassificAtion (MOCCA),to train and test deep learning models on the AD task. Specifically, we applied it to autoencoders. A key novelty in our work stems from the explicit optimization of intermediate representations for the AD task. Indeed, differently from commonly used approaches that consider a neural network as a single computational block, i.e., using the output of the last layer only, MOCCA explicitly leverages the multi-layer structure of deep architectures. Each layer's feature space is optimized for AD during training, while in the test phase, the deep representations extracted from the trained layers are combined to detect anomalies. With MOCCA, we split the training process into two steps. First, the autoencoder is trained on the reconstruction task only. Then, we only retain the encoder tasked with minimizing the L_2 distance between the output representation and a reference point, the anomaly-free training data centroid, at each considered layer. Subsequently, we combine the deep features extracted at the various trained layers of the encoder model to detect anomalies at inference time. To assess the performance of the models trained with MOCCA, we conduct extensive experiments on publicly available datasets. We show that our proposed method reaches comparable or superior performance to state-of-the-art approaches available in the literature.
