Test-Time Canonicalization by Foundation Models for Robust Perception

Utkarsh Singhal, Ryan Feng, Stella X. Yu, Atul Prakash
7/14/2025
cs.CVcs.LG

Official code: sutkarsh/focal (5 stars, MIT, last commit 2025-09-01).

Abstract

Perception in the real world requires robustness to diverse viewing conditions. Existing approaches often rely on specialized architectures or training with predefined data augmentations, limiting adaptability. Taking inspiration from mental rotation in human vision, we propose FOCAL, a test-time robustness framework that transforms the input into the most typical view. At inference time, FOCAL explores a set of transformed images and chooses the one with the highest likelihood under foundation model priors. This test-time optimization boosts robustness while requiring no retraining or architectural changes. Applied to models like CLIP and SAM, it significantly boosts robustness across a wide range of transformations, including 2D and 3D rotations, contrast and lighting shifts, and day-night changes. We also explore potential applications in active vision. By reframing invariance as a test-time optimization problem, FOCAL offers a general and scalable approach to robustness. Our code is available at: https://github.com/sutkarsh/focal.

View on arXivView PDF

Code Implementations(1)

sutkarsh/focalOfficial100%
MIT

ICML 2025 FoCAL

50Shell, PythonJun 5, 20251 years agoMIT

Similar Papers

Cite this paper

@article{singhal2025testtime,
  title  = {Test-Time Canonicalization by Foundation Models for Robust Perception},
  author = {Utkarsh Singhal and Ryan Feng and Stella X. Yu and Atul Prakash},
  year   = {2025},
  eprint = {2507.10375},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.10375v2},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.10375.svg)](https://codeofpaper.com/paper/2507.10375)

Discussion