TL;DR
Modern image classifiers are surprisingly bad at separating what an object is from where it is—forcing them to memorize spatial transformations at a massive cost in data and parameters. By explicitly fitting a 6-parameter affine transformation alongside an implicit neural representation of appearance (TP-INR), the authors show we can slash data and capacity requirements and partially unlock the ability to recognize familiar objects in unfamiliar poses.
What Problem Does This Paper Address?
Recognizing an object requires handling two distinct sources of variation: appearance (what the object looks like) and spatial transformation (its position, rotation, scale, and shear).
Today’s vision models—from Vision Transformers (ViTs) to ConvNeXts—typically handle spatial variation by brute force: training on massive datasets with heavy data augmentation. This raises a fundamental question: Can neural networks actually learn a generalizable concept of spatial transformations, or do they just memorize every appearance–transformation combination separately?
The authors systematically isolate the cost of learning spatial transformations versus learning appearance alone. They also test compositional generalization: if a model learns to recognize pens in many orientations and markers in only one, can it recognize a marker in a new orientation?
Methods
To test whether explicitly modeling transformations beats memorizing them, the authors introduce Transform-Parameterized Implicit Neural Representations (TP-INR).
Instead of asking a classifier to digest raw, transformed pixels, TP-INR acts as a test-time preprocessing step that aligns each image into a shared reference frame:
- Separating Appearance and Geometry: Appearance is modeled by a SIREN (a continuous coordinate-based neural network, or INR), while spatial variation is explicitly represented by just six affine parameters acting on the INR’s input coordinates.
- Meta-Learned Initialization: Using Reptile (a first-order meta-learning algorithm), TP-INR learns a single shared appearance initialization across the training set.
- Anchored Coarse-to-Fine Fitting: For each new image, TP-INR jointly optimizes the appearance weights and the six affine parameters over 40 steps to reconstruct the image—without needing class labels or transformation annotations. To prevent the appearance network from "cheating" by memorizing the pose, the authors use:
- A proximal anchor that penalizes the appearance weights for drifting too far from the shared initialization.
- A coarse-to-fine blur schedule (gradually sharpening the target image) to provide broader alignment gradients early on.
- Complementary learning rates that let the affine parameters make large alignment moves first, before fine-tuning appearance.
Once fitted, the inferred affine transformation is inverted to warp the original image into the aligned reference frame for any downstream classifier.
Datasets
All experiments are conducted on MNIST ($28 \times 28$ digits centered on a $64 \times 64$ canvas) under controlled, randomly sampled affine transformations:
- Rotations: up to $\pm 45^\circ$
- Isotropic scaling: $[0.5, 2.0]$ (sampled log-uniformly)
- Shear: up to $\pm 15^\circ$
- Translations: up to $\pm 16$ pixels
The authors use 54k training images (and nested subsets of 54, 540, 5.4k, 27k, and 54k) and evaluate on the 10k MNIST test set. They compare against a ground-truth inverse condition (applying the exact inverse transformation) as an appearance-only upper bound. For compositional generalization, they create a split where even digits are affine-transformed during training, odd digits are inverse-aligned, and all digits are affine-transformed at test time.
Key Insights and Ideas
- Spatial transformations dominate data and capacity costs: Learning appearance alone is remarkably cheap. The vast majority of training data and model parameters in standard classifiers are spent memorizing spatial transformations.
- Inductive biases aren't enough: Even architectures with built-in spatial structure—like Spatial Transformer Networks (STNs) and $C_4$ rotation-invariant CNNs—suffer huge data-efficiency drops under affine transformations and still benefit significantly from TP-INR preprocessing.
- A striking failure of compositional generalization: Classifiers trained on transformed even digits and aligned odd digits almost completely fail to recognize transformed odd digits at test time. Even though the models have seen both the digit classes and the transformation distribution, they cannot recombine them.
Key Results
Across ViT, ConvNeXt, STN, and $C_4$ CNNs, the numbers paint a clear picture:
- Data Efficiency: Learning spatial transformations requires 100× to 1,000× more training data to match the appearance-only upper bound. For example, a ViT trained on just 540 appearance-only examples hits ~80% accuracy, whereas a ViT trained on 54,000 affine-transformed examples with data augmentation only reaches ~60%. TP-INR substantially closes this gap across all four architectures, especially in low-data regimes.
- Model Capacity: An appearance-only ViT achieves strong accuracy with just 10k parameters. Adding spatial transformations demands 100× to 1,000× more parameters. At roughly 10k parameters, TP-INR reaches ~62% accuracy compared to ~32% for the affine baseline.
- Compositional Generalization: On unseen class–transformation combinations (transformed odd digits), baseline models collapse. Online data augmentation helps by 5%–10%, while TP-INR boosts accuracy by 25%–30%.
Limitations and Future Work
The authors note two main limitations:
- Simple, single-object images: Experiments are restricted to MNIST and global affine transformations. Complex natural images with backgrounds, multiple objects, or local deformations would likely require richer, nonrigid transformation parameterizations or hierarchical fitting.
- Test-time compute: Because TP-INR runs 40 steps of iterative optimization per image, it is slower at inference than standard feed-forward networks.
Looking ahead, the authors argue that spatial invariance shouldn't be left to emerge implicitly from massive datasets and giant models—explicitly modeling known transformation structures offers a much more resource-efficient path forward.
Summary updated