Zero-Shot Test-Time Canonicalization using Out-of-Distribution Scoring

📅 2026-06-23
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the vulnerability of pretrained vision models to affine transformations—such as rotation and scaling—that preserve semantic class but often lead to misclassification. The authors propose a test-time normalization method that maps inputs into a canonical form aligned with the training distribution, without modifying or retraining the classifier. Their key insight is framing this robustness challenge within an out-of-distribution (OOD) detection framework: OOD scores guide the search for beneficial affine transformations, and a gating mechanism applies these transformations only when necessary. Through systematic evaluation of over 20 OOD scoring functions and nine search strategies, they find that distance-based scores combined with random search followed by local optimization yield the best performance. The approach consistently enhances robustness across diverse benchmarks—including handwritten characters, sketches, natural images, and 3D point clouds—while preserving accuracy on in-distribution data.
📝 Abstract
Pretrained vision models often misclassify inputs that are rotated, scaled, or sheared, even though these affine transformations leave the object class unchanged. Robustness is usually restored either by building equivariance into the architecture or by retraining with augmentation, both of which require changing or retraining the model. Test-time canonicalization instead leaves the classifier untouched. It undoes the transformation of each input, mapping it to a canonical form near the training distribution before classification. Existing canonicalizers, however, rely on a narrow set of logit-based energy scores and bespoke search procedures, leaving the design space of scoring functions and optimizers unexplored. We reframe canonicalization as out-of-distribution (OOD) detection, which lets any OOD score serve as the energy minimized over transformations. Across benchmarks ranging from handwritten characters and sketches to natural images and 3D point clouds, we systematically evaluate around twenty OOD scores and nine search algorithms, finding that distance-based scores paired with random search and local refinement perform best overall. Because canonicalizing an already-aligned input can hurt accuracy, we add a gated mechanism that transforms an input only when its OOD score indicates this is needed, preserving most in-distribution accuracy while retaining the robustness gains on transformed inputs. Code is available at github.com/johschm/its.
Problem

Research questions and friction points this paper is trying to address.

zero-shot
test-time canonicalization
out-of-distribution detection
affine transformations
robustness
Innovation

Methods, ideas, or system contributions that make the work stand out.

test-time canonicalization
out-of-distribution detection
affine invariance
zero-shot robustness
gated transformation
🔎 Similar Papers
No similar papers found.