GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features

Luc P.J. Strater, Mohammadreza Salehi, E. Gavves, Cees G. M. Snoek, Yuki M. Asano
2/14/2026

No official code found. Best implementation: LucStrater/GeneralAD (59 stars, MIT, last commit 2024-12-17).

Abstract

In the domain of anomaly detection, methods often excel in either high-level semantic or low-level industrial benchmarks, rarely achieving cross-domain proficiency. Semantic anomalies are novelties that differ in meaning from the training set, like unseen objects in self-driving cars. In contrast, industrial anomalies are subtle defects that preserve semantic meaning, such as cracks in airplane components. In this paper, we present GeneralAD, an anomaly detection framework designed to operate in semantic, near-distribution, and industrial settings with minimal per-task adjustments. In our approach, we capitalize on the inherent design of Vision Transformers, which are trained on image patches, thereby ensuring that the last hidden states retain a patch-based structure. We propose a novel self-supervised anomaly generation module that employs straightforward operations like noise addition and shuffling to patch features to construct pseudo-abnormal samples. These features are fed to an attention-based discriminator, which is trained to score every patch in the image. With this, our method can both accurately identify anomalies at the image level and also generate interpretable anomaly maps. We extensively evaluated our approach on ten datasets, achieving state-of-the-art results in six and on-par performance in the remaining for both localization and detection tasks.

View on arXivView PDF

Code Implementations(1)

MIT

GeneralAD

596PythonJul 5, 20241 years agoMIT
anomaly-detectionanomaly-localizationcomputer-visiondeep-learningeccv2024+1 more

Similar Papers

Cite this paper

@article{strater2026generalad,
  title  = {GeneralAD: Anomaly Detection Across Domains by Attending to Distorted Features},
  author = {Luc P.J. Strater and Mohammadreza Salehi and E. Gavves and Cees G. M. Snoek and Yuki M. Asano},
  year   = {2026},
  eprint = {2407.12427},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.12427},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.12427.svg)](https://codeofpaper.com/paper/2407.12427)

Discussion