ReTTT-AD: Test-Time Training Neighborhood Prediction for Zero-Shot Anomaly Detection
Zero-shot anomaly detection (ZSAD) aims to identify anomalies in unseen categories without target-category training samples. Dominant methods learn normal and anomalous prototypes on an auxiliary dataset and detect anomalies via feature matching. However, this prototype-matching paradigm faces two key limitations: (i) heavy reliance on seen anomaly priors, which restricts generalization under unknown anomalies or domain shifts; and (ii) the neglect of intra-image local contextual relationships. To move beyond this paradigm, we conceptualize anomalies as spatial inconsistencies violating local contextual patterns and propose \textbf{ReTTT-AD}, establishing image-adaptive neighborhood prediction as the basis for anomaly discrimination. Specifically, our core Residual Local-TTT Block (RL-TTT) adapts a spatially shared predictor via a single-step Test-Time Training (TTT) update using neighborhood-to-center signals from the test image itself, modeling image-specific local regularities and capturing anomalies through prediction residuals. Furthermore, Normal-Tail Regularization (NTR) suppresses high-residual responses in complex normal regions, while a Global Anomaly Readout (GAR) module provides complementary image-level evidence. Extensive experiments across 14 benchmarks demonstrate that ReTTT-AD significantly outperforms state-of-the-art methods on both industrial and medical anomaly localization tasks.
Authors
- Minghan Fan
- Peiyuan Li (ORCID: https://orcid.org/0009-0002-0365-1602)
- Jianfeng Qiu
- Yanning Hou
- Ke Xu
Institutions
- Anhui University (CN)
- National University of Defense Technology (CN)
Publication Details
- Journal
- arXiv
- Published
- 2026-11-30
- DOI
- https://doi.org/10.48550/arxiv.2611.41558
- Primary Topic
- Anomaly Detection Techniques and Applications
- Type
- preprint