TL;DR
Latent Diffusion Models (LDMs) are notoriously sensitive to tiny spatial perturbations, meaning a sub-pixel shift in input noise can drastically alter the generated image. This paper introduces Alias-Free LDM (AF-LDM), which achieves fractional shift-equivariance by combining anti-aliasing network architectures, a novel equivariance loss, and a shift-equivariant attention mechanism. The result is a highly stable generation process that eliminates texture flickering and artifacts in downstream tasks like video editing and image-to-image translation.
What Problem Does This Paper Address?
While Latent Diffusion Models (LDMs) excel at generating high-quality imagery, they suffer from severe spatial instability. Ideally, shifting the input noise by a fraction of a pixel should simply result in a correspondingly shifted output image (a property known as shift-equivariance). In reality, vanilla LDMs lack this property: minor inputs shifts cause textures to unexpectedly warp, blur, or exhibit a "bouncing effect" where details stick to absolute pixel coordinates rather than moving with the scene.
This instability stems from two main sources:
- Aliasing Effects: Standard neural network operations like downsampling, upsampling, and non-linear activations introduce high-frequency signals that exceed the Nyquist-Shannon sampling limit, corrupting continuous signal representation.
- Self-Attention Modules: Standard self-attention is inherently sensitive to global translations and breaks shift-equivariance when image borders are cropped or padded.
Methods
The authors propose Alias-Free LDM (AF-LDM) to fundamentally fix the architectural and optimization flaws causing aliasing in diffusion models.
- Alias-Free Architecture Modifications: Following principles from StyleGAN3, the authors replace standard bilinear upsampling and strided convolutions with ideal FFT-based low-pass filters. Additionally, non-linear layers are wrapped between a 2× ideal upsampling and 2× ideal downsampling step to suppress high frequencies generated by the activation functions.
- Equivariance Loss ($L_{eq}$): The authors discovered that architectural fixes alone are insufficient because networks naturally learn to exploit and amplify high-frequency leaks during training. To counteract this, they introduce an explicit regularization loss that penalizes the discrepancy between the network's output on a shifted input versus the shifted version of its original output. This forces the VAE and U-Net to strictly operate within a band-limited continuous domain.
- Equivariant Attention (EA): To make attention shift-equivariant, the authors fix the keys ($K$) and values ($V$) to a specific reference frame while allowing queries ($Q$) to shift dynamically with the input. This formulation mirrors Cross-Frame Attention (CFA) but is uniquely integrated into both the training and inference phases.
Datasets
The models were trained and evaluated using several standard benchmarks:
- ImageNet: Used for training and validating the reconstruction quality and shift-equivariance of the Alias-Free VAE (AF-VAE).
- FFHQ: Employed to train and test unconditional AF-LDM generation stability.
- LAION Aesthetic 6.5+: Used to retrain the text-conditional LDM variant (AF-SD).
- Sintel: Used to evaluate warping errors and consistency for video editing applications.
Key Insights and Ideas
- The Training Amplification Trap: Simply inserting anti-aliasing layers into a network isn't a silver bullet. During training, the VAE optimization process actively amplifies any remaining high-frequency leaks to minimize reconstruction error, progressively destroying shift-equivariance. Explicit loss regularization is mandatory to keep the latent space clean.
- Denoising Compounds Error: Because diffusion models rely on iterative U-Net passes, tiny aliasing errors compound over timesteps. Standard LDMs show a massive degradation in shift-equivariance as denoising progresses, whereas AF-LDM stabilizes this error accumulation across the entire generation trajectory.
- Attention as a Coordinate Anchor: Self-attention layers act as an absolute coordinate anchor due to edge padding. Forcing the network to compute attention relative to a fixed reference frame removes absolute spatial bias.
Key Results
- VAE Equivariance: On the ImageNet validation set, the proposed AF-VAE dramatically improved Encoder Shift PSNR (SPSNR) from 25.07 to 45.10 and Decoder SPSNR from 22.31 to 33.88 compared to the vanilla Stable Diffusion VAE.
- Generation Consistency: For unconditional generation on FFHQ, AF-LDM achieved an image-level SPSNR of 28.06, vastly outperforming vanilla LDM's score of 12.38.
- Video Editing Stability: When applied to zero-shot video editing, AF-SD achieved a significantly lower neighboring-frame warping error (MSE of 0.056) than vanilla Stable Diffusion (0.094), successfully eliminating texture flickering without needing external optical flow models during generation.
Limitations and Future Work
- Reference Frame Dependency: Because Equivariant Attention relies on a fixed reference frame, it can struggle with severe occlusions or when entirely new objects enter subsequent video frames, occasionally causing content inconsistencies in those regions.
- Static Background Artifacts: In line with other flow-based video editing methods, the model can sometimes produce minor incoherencies in static background regions where flow guidance is naturally weak or insufficient.
Summary updated