Understanding when spatial transformer networks do not support invariance, and what to do about it
Lukas Finnveden, Ylva Jansson, Tony Lindeberg
TL;DR
The paper proves that spatial transformer networks (STNs) cannot generally induce invariance by transforming CNN feature maps, due to pure spatial transforms not aligning transformed feature maps with the original under affine changes and due to channel shifts and non-invariant receptive fields. It analyzes STN architectures, showing input-space transformations outperform feature-map transformations for rotation and scale, while deeper, shared localization networks improve stability and accuracy when predicting transformation parameters. Iterative alignment provides additional gains but is not a substitute for rich, deep features. The results guide STN design for practical invariance and robustness across diverse datasets like MNIST, SVHN, and PlanktonSet, with implications for related spatial-transform-based methods.
Abstract
Spatial transformer networks (STNs) were designed to enable convolutional neural networks (CNNs) to learn invariance to image transformations. STNs were originally proposed to transform CNN feature maps as well as input images. This enables the use of more complex features when predicting transformation parameters. However, since STNs perform a purely spatial transformation, they do not, in the general case, have the ability to align the feature maps of a transformed image with those of its original. STNs are therefore unable to support invariance when transforming CNN feature maps. We present a simple proof for this and study the practical implications, showing that this inability is coupled with decreased classification accuracy. We therefore investigate alternative STN architectures that make use of complex features. We find that while deeper localization networks are difficult to train, localization networks that share parameters with the classification network remain stable as they grow deeper, which allows for higher classification accuracy on difficult datasets. Finally, we explore the interaction between localization network complexity and iterative image alignment.
