# Metric Learning for Novelty and Anomaly Detection

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

## Key facts

- Cited by 21 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 16 Aug 2018.

## Built on by (most cited first, 21 of 21)

- [Generalized Out-of-Distribution Detection: A Survey](https://mlsanity.com/paper/2110.11334/) (2021)
- [Student-Teacher Feature Pyramid Matching for Anomaly Detection](https://mlsanity.com/paper/2103.04257/) (2021)
- [One-Class Classification: A Survey](https://mlsanity.com/paper/2101.03064/) (2021)
- [Reconstruction Student with Attention for Student-Teacher Pyramid Matching](https://mlsanity.com/paper/2111.15376/) (2021)
- [Handling Out-of-Distribution Data: A Survey](https://mlsanity.com/paper/2507.21160/) (2025)
- [Distance-based Hyperspherical Classification for Multi-source Open-Set Domain Adaptation](https://mlsanity.com/paper/2107.02067/) (2021)
- [A Simple Test-Time Method for Out-of-Distribution Detection](https://mlsanity.com/paper/2207.08210/) (2022)
- [Leveraging Intermediate Representations for Better Out-of-Distribution Detection](https://mlsanity.com/paper/2502.12849/) (2025)
- [Novelty Detection and Analysis of Traffic Scenario Infrastructures in the Latent Space of a Vision Transformer-Based Triplet Autoencoder](https://mlsanity.com/paper/2105.01924/) (2021)
- [Multi-Class Anomaly Detection](https://mlsanity.com/paper/2110.15108/) (2021)
- [Self-Supervised Anomaly Detection by Self-Distillation and Negative Sampling](https://mlsanity.com/paper/2201.06378/) (2022)
- [Effective Out-of-Distribution Detection in Classifier Based on PEDCC-Loss](https://mlsanity.com/paper/2204.04665/) (2022)
- [Learning to Compare Hardware Designs for High-Level Synthesis](https://mlsanity.com/paper/2409.13138/) (2024)
- [Reconstructing Humpty Dumpty: Multi-feature Graph Autoencoder for Open Set Action Recognition](https://mlsanity.com/paper/2212.06023/) (2022)
- [Novel Category Discovery with X-Agent Attention for Open-Vocabulary Semantic Segmentation](https://mlsanity.com/paper/2509.01275/) (2025)
- [Siamese Neural Networks for Skin Cancer Classification and New Class Detection using Clinical and Dermoscopic Image Datasets](https://mlsanity.com/paper/2212.06130/) (2022)
- [Incremental Learning with Repetition via Pseudo-Feature Projection](https://mlsanity.com/paper/2502.19922/) (2025)
- [Anomaly-Aware Semantic Segmentation by Leveraging Synthetic-Unknown Data](https://mlsanity.com/paper/2111.14343/) (2021)
- [Simple But Effective: Rethinking the Ability of Deep Learning in fNIRS to Exclude Abnormal Input](https://mlsanity.com/paper/2402.18112/) (2024)
- [Unlocking Transfer Learning for Open-World Few-Shot Recognition](https://mlsanity.com/paper/2411.09986/) (2024)
- [Unsupervised Anomaly Detection with an Enhanced Teacher for Student-Teacher Feature Pyramid Matching](https://mlsanity.com/paper/2512.18219/) (2025)

## Abstract (arXiv)

When neural networks process images which do not resemble the distribution seen during training, so called out-of-distribution images, they often make wrong predictions, and do so too confidently. The capability to detect out-of-distribution images is therefore crucial for many real-world applications. We divide out-of-distribution detection between novelty detection ---images of classes which are not in the training set but are related to those---, and anomaly detection ---images with classes which are unrelated to the training set. By related we mean they contain the same type of objects, like digits in MNIST and SVHN. Most existing work has focused on anomaly detection, and has addressed this problem considering networks trained with the cross-entropy loss. Differently from them, we propose to use metric learning which does not have the drawback of the softmax layer (inherent to cross-entropy methods), which forces the network to divide its prediction power over the learned classes. We perform extensive experiments and evaluate both novelty and anomaly detection, even in a relevant application such as traffic sign recognition, obtaining comparable or better results than previous works.
