Alias-Free ViT: Fractional Shift Invariance via Linear Attention
Hagay Michaeli, Daniel Soudry
TL;DR
This work tackles the lack of translation invariance in Vision Transformers by introducing Alias-Free Vision Transformer (AFT), which combines alias-free downsampling and nonlinearities with shift-equivariant linear attention, specifically cross-covariance attention. The key idea is to maintain shift-equivariance across patch embedding, attention, and MLP components, enabling a near-invariant global representation while preserving competitive accuracy. Empirically, AFT achieves ImageNet-level performance comparable to baselines but with substantially higher shift-consistency (≈99% for integer and half-pixel shifts) and stronger robustness to adversarial translations and realistic shifts, albeit with higher runtime due to FFT-based operations. The approach advances robust, translation-insensitive ViTs and offers a principled path to combining anti-aliasing concepts with transformer architectures in vision tasks.
Abstract
Transformers have emerged as a competitive alternative to convnets in vision tasks, yet they lack the architectural inductive bias of convnets, which may hinder their potential performance. Specifically, Vision Transformers (ViTs) are not translation-invariant and are more sensitive to minor image translations than standard convnets. Previous studies have shown, however, that convnets are also not perfectly shift-invariant, due to aliasing in downsampling and nonlinear layers. Consequently, anti-aliasing approaches have been proposed to certify convnets' translation robustness. Building on this line of work, we propose an Alias-Free ViT, which combines two main components. First, it uses alias-free downsampling and nonlinearities. Second, it uses linear cross-covariance attention that is shift-equivariant to both integer and fractional translations, enabling a shift-invariant global representation. Our model maintains competitive performance in image classification and outperforms similar-sized models in terms of robustness to adversarial translations.
