NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Transform for Generalizable Instance-wise Invariance

Utkarsh Singhal, Carlos Esteves, Ameesh Makadia, Stella X. Yu

TL;DR

This paper introduces a method to learn instance-specific spatial invariances using normalizing flows. By predicting a unique distribution of transformations for every image, the model achieves superior robustness and accuracy, successfully transferring learned invariances across different object categories and adapting to unexpected poses.

Introduction

Deep learning models are notoriously brittle when it comes to spatial transformations like rotations or translations. Traditionally, researchers have addressed this through hard-coded architectural invariances (e.g., CNNs for translation) or data augmentation. However, standard augmentation is typically "one-size-fits-all," failing to recognize that the appropriate level of invariance depends on the specific object. For instance, a daisy is rotationally invariant across 360°, whereas a digit '6' becomes a '9' if rotated 180°. This paper introduces a flexible, adaptive, and generalizable framework to learn instance-wise invariance.

Methodology

The core innovation is treating invariance as a prediction problem. The authors utilize a Normalizing Flow ($g_\phi$) to predict a probability distribution over transformations ($T$) conditioned on the input image ($I$). Unlike prior methods that assume independent transformation parameters, normalizing flows can model complex correlations and multi-modal distributions, allowing for a more nuanced representation of an object's symmetries.

The image classification pipeline: an input image is processed by a normalizing flow to predict a transformation distribution, which guides an augmenter to produce samples for the classifier.

During inference, the model samples transformations from its predicted distribution, applies them to the image, and averages the classifier's ($f_\theta$) predictions. For "out-of-distribution" poses, a Mean-Shift Alignment algorithm is employed. This process iteratively transforms the image toward a local mode where the model is most confident, effectively performing a "mental rotation" to align unfamiliar objects with learned prototypes.

Key Results and Insights

The approach was evaluated across several benchmarks, including CIFAR-10, MNIST, and long-tail datasets like CIFAR-10-LT.

  • Superior Accuracy: On CIFAR-10, the method achieved 86.8% accuracy, significantly outperforming previous learned-invariance methods such as LILA (84.2%) and Augerino (79.0%).
  • Generalization to the Long-Tail: In imbalanced datasets, models often struggle to learn invariances for rare ("tail") classes. Because the transformation predictor is class-agnostic, it can learn the nature of transformations from common classes and successfully transfer that knowledge to rare ones. On CIFAR-10-LT, the method reached 78.1% accuracy, a substantial gain over the 70.8% baseline.
Performance comparison on imbalanced classification (CIFAR-10-LT), showing significant accuracy gains for rare classes (higher class indices).
  • Joint Constraint Discovery: The model can discover mathematical constraints directly from raw data. For example, it learns the specific correlations between affine matrix elements required to represent pure rotations.
  • Zero-Shot Alignment: Demonstrating impressive generalization, a model trained only on "Mario-Iggy" characters was able to successfully align unseen MNIST digits.

Discussion and Future Work

While the method provides a robust framework for instance-wise invariance, some challenges remain. The mean-shift alignment can occasionally fail when faced with multi-modal distributions (e.g., '6' vs '9'). Future work could extend the transformation scope beyond affine changes to non-rigid or 3D viewpoint variations. Additionally, the computational cost of sampling multiple transformations during inference presents an opportunity for optimization through more efficient sampling or rejection schemes.

Summary updated

BibTeX
@inproceedings{singhal2023learning,
  author = {Utkarsh Singhal and Carlos Esteves and Ameesh Makadia and Stella X. Yu},
  title = {{Learning to Transform for Generalizable Instance-wise Invariance}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure