English

Two Is Better Than One: Aligned Representation Pairs for Anomaly Detection

Machine Learning 2025-09-22 v3 Artificial Intelligence

Abstract

Anomaly detection focuses on identifying samples that deviate from the norm. Discovering informative representations of normal samples is crucial to detecting anomalies effectively. Recent self-supervised methods have successfully learned such representations by employing prior knowledge about anomalies to create synthetic outliers during training. However, we often do not know what to expect from unseen data in specialized real-world applications. In this work, we address this limitation with our new approach Con2_2, which leverages prior knowledge about symmetries in normal samples to observe the data in different contexts. Con2_2 consists of two parts: Context Contrasting clusters representations according to their context, while Content Alignment encourages the model to capture semantic information by aligning the positions of normal samples across clusters. The resulting representation space allows us to detect anomalies as outliers of the learned context clusters. We demonstrate the benefit of this approach in extensive experiments on specialized medical datasets, outperforming competitive baselines based on self-supervised learning and pretrained models and presenting competitive performance on natural imaging benchmarks.

Keywords

Cite

@article{arxiv.2405.18848,
  title  = {Two Is Better Than One: Aligned Representation Pairs for Anomaly Detection},
  author = {Alain Ryser and Thomas M. Sutter and Alexander Marx and Julia E. Vogt},
  journal= {arXiv preprint arXiv:2405.18848},
  year   = {2025}
}

Comments

Published in Transactions on Machine Learning Research (TMLR) https://openreview.net/forum?id=Bt0zdsnWYc

R2 v1 2026-06-28T16:45:13.863Z