Abstract
The simplicity and effectiveness of the UNet architecture makes it ubiquitous in image restoration, image segmentation, and diffusion models. They are often assumed to be equivariant to translations, yet they traditionally consist of layers that are known to be prone to aliasing, which hinders their equivariance in practice. To overcome this limitation, we propose a new alias-free UNet designed from a careful selection of state-of-the-art translation-equivariant layers. We evaluate the proposed equivariant architecture against non-equivariant baselines on image restoration tasks and observe competitive performance with a significant increase in measured equivariance. Through extensive ablation studies, we also demonstrate that each change is crucial for its empirical equivariance. Our implementation is available at https://github.com/jscanvic/UNet-AF
Introduction
In many computer vision tasks, we expect a model to be translation equivariant: if you shift the input image by three pixels to the left, the output should also shift by exactly three pixels to the left. While Convolutional Neural Networks (CNNs) like the UNet are often assumed to have this property, they fail in practice—especially when dealing with sub-pixel shifts.
The culprit is aliasing. Standard deep learning building blocks—like Max Pooling, zero-inserted upsampling, and even non-linear activations like ReLU—introduce high-frequency signals that the digital grid cannot represent correctly. This "breaks" the equivariance, leading to artifacts like "texture sticking" in videos or inconsistent results in medical imaging and restoration.
The UNet-AF Architecture
The proposed UNet-AF (Alias-Free) systematically replaces every aliasing-prone layer in a standard UNet with a mathematically "cleaner" version.
Key components include:
- Blur Pooling: Instead of Max Pooling, periodic sinc anti-aliasing filters implemented via Fast Fourier Transforms (FFT) are used.
- Filtered Upsampling: Replaces standard upsampling with a scheme using anti-aliasing filters to suppress high-frequency artifacts.
- Filtered GELU: Standard activations create "sharp corners" causing aliasing. UNet-AF temporarily upsamples data to a finer grid, applies the activation, filters high frequencies, and downsamples back.
- Alias-Free Layer Normalization: Swaps Batch Normalization for a version of Layer Normalization proven to maintain equivariance.
- Circular Convolutions: Utilizes circular padding to handle boundary effects during shifts.
Experimental Evaluation
The model was evaluated on the DIV2K dataset, consisting of 900 high-resolution natural images. The authors split these into 700 images for training, 100 for evaluation, and 100 for testing. Tasks included circular deblurring, valid (cropped) deblurring, and Gaussian denoising.
Key Results
- Equivariance Boost: On circular deblurring, UNet-AF achieved an EQUIV score of 81.63 dB, a massive improvement over the 37.60 dB of the original Ronneberger UNet.
- Restoration Quality: In deblurring, UNet-AF reached a PSNR of 32.22 dB, outperforming the standard UNet baseline (31.28 dB).
- Robustness to Displacement: As shown in Figure 1, UNet-AF's performance remains nearly constant regardless of input shift, whereas baseline models show significant performance "wobble" as the image moves.
Discussion and Insights
Ablation studies reveal that equivariance is fragile; reverting even one specialized layer to a standard version drops the EQUIV metric by ~40 dB. However, the benefits are clear: training is smoother, and the network no longer fights aliasing artifacts.
While UNet-AF is mathematically rigorous and maintains competitive restoration quality, it currently faces a computational cost hurdle. It is roughly 7 times slower than a standard UNet (290 FPS vs. 2494 FPS on an H100). Future work will focus on developing dedicated GPU kernels to optimize these alias-free operations and exploring different filter designs to balance purity and efficiency.
Summary updated