Skip to main navigation Skip to search Skip to main content

BinaryAD: Efficient image anomaly detection via binarized representations

  • Junjie Chen
  • , Wenjing Zhang
  • , Pengfei Wang
  • , Bingyang Guo
  • , Hanzhe Liang
  • , Linlin Shen
  • , Jinbao Wang*
  • , Zhichao Lu
  • *Corresponding author for this work

Research output: Journal PublicationArticlepeer-review

Abstract

The steadily increasing complexity of Transformer-based image anomaly detection models poses significant challenges for deployment on resource-constrained edge devices. Although pruning, knowledge distillation, and low-bit quantization have achieved notable success in classification networks, directly applying full-model binarization or uniform low-bit quantization to Transformer-based anomaly detectors often leads to severe degradation in pixel-level anomaly localization performance. A key observation motivating this work is that the prototype extraction and reconstruction objectives commonly adopted in Transformer-based anomaly detection models are highly sensitive to quantization noise in the attention and MLP modules. In this paper, we propose BinaryAD, a module-selective binarization framework that learns compact binarized representations in the Transformer decoder to enable lightweight yet accurate anomaly detection models. Specifically, BinaryAD selectively binarizes only the most computationally intensive components, namely the self-attention and MLP layers in the Transformer decoder, while preserving full-precision feature extractors to maintain sufficient representational capacity. We instantiate BinaryAD on the representative INP and Dinomaly models and conduct extensive experiments on standard anomaly detection benchmarks. Experimental results demonstrate that, across datasets, BinaryAD reduces model size by up to 6.53× and FLOPs by up to 7.99×. More importantly, under optimal configurations, BinaryAD incurs only a minimal performance gap compared to full-precision baselines, with I-AUROC degradation of at most 1.1%, while still retaining competitive pixel-level anomaly localization accuracy. These results indicate that, when properly designed, module-selective binarization offers a practical and effective pathway for deploying advanced Transformer-based anomaly detection architectures on low-power, real-time industrial edge hardware. Source code is available at https://github.com/jj258/BinaryAD.

Original languageEnglish
Article number114280
JournalPattern Recognition
Volume180
DOIs
Publication statusPublished - Dec 2026
Externally publishedYes

Free Keywords

  • Anomaly detection
  • Binarization
  • Computational efficiency
  • Lightweight models

ASJC Scopus subject areas

  • Software
  • Signal Processing
  • Computer Vision and Pattern Recognition
  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'BinaryAD: Efficient image anomaly detection via binarized representations'. Together they form a unique fingerprint.

Cite this