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

Source: [Zero-Shot Test-Time Canonicalization using Out-of-Distribution Scoring](<https://www.sota2.com/research/paper/6a3b6486206542251d7c9683>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-06-25T05:00:21.027Z

Authors: Dominik Lindner, Johann Schmidt, Tom Siegl, Martin Becker, Sebastian Stober

Published: 2026-06-23T06:00:33.000Z

## 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.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Image Classification on TU Berlin transformed (test)](<https://www.sota2.com/research/sota/image-classification-on-tu-berlin-transformed-test.md>): Image Classification; TU Berlin transformed (test); Accuracy: 28.1.

- [Image Classification on MNIST transformed (test)](<https://www.sota2.com/research/sota/image-classification-on-mnist-transformed-test.md>): Image Classification; MNIST transformed (test); Accuracy: 89.8.

- [Image Classification on EMNIST transformed (test)](<https://www.sota2.com/research/sota/image-classification-on-emnist-transformed-test.md>): Image Classification; EMNIST transformed (test); Accuracy: 56.1.

- [Image Classification on TU Berlin (test)](<https://www.sota2.com/research/sota/image-classification-on-tu-berlin-test.md>): Image Classification; TU-Berlin (test); Accuracy: 34.

- [Object Classification on ModelNet10 (test)](<https://www.sota2.com/research/sota/object-classification-on-modelnet10-test.md>): Object Classification; ModelNet10 (test); Accuracy: 60.6.

- [Image Classification on MNIST (test) (Accuracy Only)](<https://www.sota2.com/research/sota/image-classification-on-mnist-test-accuracy-only.md>): Image Classification; MNIST (test); Accuracy: 95.1.

- [Image Classification on EMNIST (test)](<https://www.sota2.com/research/sota/image-classification-on-emnist-test.md>): Image Classification; EMNIST (test); Accuracy: 64.4.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2606.24178>)

[PDF](<https://arxiv.org/pdf/2606.24178.pdf>)
