Industrial anomaly detectors degrade substantially under imaging conditions that differ from training, such as changes in illumination, background, or viewpoint. While a common remedy is to learn shift-invariant features, we show that misalignment of the normal reference remains a key bottleneck: much of the lost accuracy can be recovered without modifying the features. We find that augmenting frozen kNN memory banks with target normals recovers at least 80\% of shift-induced I-AUROC loss across evaluated benchmarks and backbones. However, this recalibration requires target normals from each new setup, which may be scarce or unavailable. We propose \textbf{Renormaly}, which \textbf{Re}normalizes the residuals of a frozen detector against its source \textbf{Norm}al reference, without target-side training, in two deployment scenarios: source-only and few-shot. In the source-only setting, Renormaly estimates nuisance directions from content-preserving perturbations of source images and caps excess feature spread along these directions at the source-normal level, preserving localized defect evidence. In the few-shot setting, it re-centers the residuals on the source reference, using an empirical-Bayes weight that balances target evidence against sampling noise. Renormaly achieves {\em state-of-the-art performance under distribution shift} in both settings. In the few-shot setting, our method outperforms competing methods using half as many target normal samples, demonstrating its sample efficiency. Notably, this robustness does not come at the expense of conventional AD performance: Renormaly remains competitive on standard benchmarks that do not explicitly evaluate distribution shift, including VisA, Real-IAD, and MVTec-AD.
翻译:暂无翻译