Cross-Encoder Anchor Refinement for Zero-Shot Anomaly Detection

Kaisong Ji, Ziyang Xu, Chang Bian, Yu Zhou, Wenyu Liu +1 more
10/29/2026
cs.CV
transformer-attention

No confident code implementation found for this paper.

Abstract

Zero-shot anomaly detection aims to transfer anomaly discrimination from auxiliary training domains to unseen categories while localizing subtle defects. A key challenge is to construct discriminative references that combine contextual representations with complementary local evidence.

Show full abstract

We present Cross-Encoder Anchor Refinement (CEAR), which connects two visual encoding paths for the same image at the anchor stage, before normal and anomalous prototypes are constructed. An independent convolutional encoder pretrained for industrial product recognition builds an image-specific memory shared across selected vision transformer (ViT) layers. Spatial anchors read from ViT patch features query this memory through cross-attention and undergo residual refinement. Image-conditioned normal and anomalous queries then gate anchor aggregation to construct prototypes for anomaly scoring. Across 13 industrial and medical datasets, CEAR achieves the best performance in 57 of 68 evaluations spanning image-level detection and pixel-level localization. Notably, CEAR surpasses all other state-of-the-art methods in 41 of 44 pixel-level comparisons. Across 11 localization datasets, mean gains in pixel-level maximum F1 score and average precision are 4.45 and 3.79 percentage points, respectively. This study shows how cross-encoder interaction at the anchor stage can integrate complementary visual representations for fine-grained anomaly localization across domains.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ji2026crossencoder,
  title  = {Cross-Encoder Anchor Refinement for Zero-Shot Anomaly Detection},
  author = {Kaisong Ji and Ziyang Xu and Chang Bian and Yu Zhou and Wenyu Liu and Xinggang Wang},
  year   = {2026},
  eprint = {2610.39727},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.39727v1}
}

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/2610.39727.svg)](https://codeofpaper.com/paper/2610.39727)

Discussion