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 Publications and ReviewsRGC 21 - Publication in refereed journalpeer-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. © 2026
Original languageEnglish
Article number114280
Number of pages11
JournalPattern Recognition
Volume180, Part D
Online published30 Jun 2026
DOIs
Publication statusOnline published - 30 Jun 2026

Funding

This work was supported in part by the National Key Research and Development Program of China (Grant No. 2023YFF0716504), the National Natural Science Foundation of China (Grant No. 62576218 and 62521007), Beijing Natural Science Foundation (Grant No. L254018), Guangdong Provincial Key Laboratory (Grant No. 2023B1212060076), Tencent \u201CRhinoceros Birds\u201D - Scientific Research Foundation for Young Teachers of Shenzhen University, and the Signal, Information, Biological System Processing Laboratory at Shenzhen Audencia Financial Technology Institute, Shenzhen University, Scientific Foundation for Youth Scholars of Shenzhen University (Grant No. 868-000001032328), and the Intelligent Computing Center of Shenzhen University.

Research Keywords

  • Anomaly detection
  • Binarization
  • Computational efficiency
  • Lightweight models

Fingerprint

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

Cite this