What Remains Normal? Clean Images Miss Useful Near-Defect Normal Patches for Anomaly Detection

2026-08-24Computer Vision and Pattern Recognition

Computer Vision and Pattern Recognition
AI summary

The authors studied how memory-based anomaly detectors pick and store examples from normal data to compare against new test data patches. They tested different selection methods and introduced a new technique called CLEANCON to reduce errors caused by rare or contaminated examples slipping into memory. CLEANCON lowered contamination almost to zero and improved detection performance across tests. However, even with low contamination, the best performance was not always achieved, showing that contamination alone doesn't explain effectiveness.

anomaly detectionmemory-based detectorstraining contaminationpatch selectioncoverage selectionout-of-bag evaluationcross-image supportrepresentation learningprecision-average precisionmedoid
Authors
Joongwon Chae, Runming Wang, Peiwu Qin
Abstract
Memory-based anomaly detectors store nominal training patches and score test patches against this memory. A patch selected for coverage therefore becomes a nor- mal reference without a separate check that geometric rarity makes it safe to trust. We probe this coupling with sparse training contamination. Under fixed representa- tions and memory budgets, we compare random, medoid, local, and global coverage selectors. We then use CLEANCON, an out-of-bag cross-image support gate that changes candidate-image eligibility while fixing the representation, absolute mem- ory size, builder, and inference rule. Global coverage strongly over-represents sparse contamination. CLEANCON reduces final-memory contamination to approx- imately zero and increases category-macro P-AP in all 12 matched comparisons. Yet along a retention sweep, the lowest-contamination memory does not attain the highest P-AP; performance continues to improve while contamination rises. Mem- ory contamination therefore does not order the resulting memories by P-AP.Code is publicly available at https://github.com/jw-chae/cleancon.