Unified Auto-Encoding with Masked Diffusion

Philippe Hansen-Estruch, Sriram Vishwanath, Amy Zhang, Manan TomararXiv 2024 · DOI

Unified Masked Diffusion (UMD) is a framework designed to bridge the gap between generative diffusion models and representation-learning masked autoencoders (MAE). While diffusion models excel at high-quality image synthesis, they are computationally intensive and often yield suboptimal internal representations. Conversely, MAEs are efficient and learn robust features through patch-masking but typically produce blurry generative outputs. UMD integrates patch-masking directly into the diffusion training process, creating a single model that excels at both tasks while significantly reducing training time.

Methodology

UMD modifies the standard Diffusion Transformer (DiT) architecture by incorporating several key structural and procedural innovations:

  1. Asymmetric Architecture: Inspired by MAE, UMD employs a deep "heavyweight" encoder and a shallower "lightweight" decoder. To maximize efficiency, the encoder processes only visible (unmasked) patches, significantly reducing the computational bottleneck associated with full-sequence transformers.
  2. Noise-Free Representation Step ($t=0$): UMD introduces a specific training step where images are heavily masked (75%) but contain no Gaussian noise. This step mimics a classic MAE, driving the model to learn strong semantic representations.
  3. Mixed Corruption Schedule: For timesteps $t > 0$, UMD applies a combination of Gaussian noise and patch masking. A lower masking ratio is used during these noisy steps to ensure the model captures the fine-grained details necessary for high-quality generation.
  4. Dual Prediction Objective: The model is trained to simultaneously predict the original image ($x_0$) for masked patches and the noise ($\epsilon$) for visible ones.
Figure 1: The UMD architecture combines masking and noising in an asymmetric encoder-decoder framework to support both representation learning and image generation.

Experiments and Datasets

The framework was primarily evaluated on ImageNet-1K at 64x64 (pixel space) and 256x256 (latent space) resolutions. To assess the transferability of learned features, the authors utilized a suite of eight downstream datasets, including STL-10, Oxford Flowers, CIFAR-100, and Stanford Dogs. These evaluations focused on both generative quality (FID, Inception Score) and representation quality (linear probing accuracy).

Key Results

UMD demonstrates superior performance across both generative and representative metrics compared to standard baselines:

  • Efficiency: On 64x64 ImageNet, UMD required only 60 TPU hours for training, a nearly 2x speedup over the 105 hours required by a standard DiT.
  • Representation Power: In 100-shot linear probing, UMD achieved 31.8% accuracy, outperforming DiT (25.7%) and MaskDiT (26.3%), effectively narrowing the gap with representation-focused MAEs (36.6%).
  • Generative Quality: UMD achieved an Inception Score (IS) of 63.5, significantly higher than MAE (18.5) and the baseline DiT (46.9) in comparable settings.
Figure 6: Training dynamics of UMD compared to baselines. UMD (blue) shows competitive FID scores, superior Inception Scores, and significantly better linear probing performance than standard diffusion models.

Discussion and Conclusion

The results indicate that the perceived trade-off between representation and generation is not inherent. By including a noise-free masking step, UMD improves feature learning without compromising generative fidelity. Furthermore, the dual prediction of $x_0$ and $\epsilon$ allows the model to master both global structure and local texture. While UMD offers substantial speedups in pixel space, the gains are more modest in latent diffusion setups (approx. 15%) due to VAE pre-processing overhead. Future work may explore more sophisticated, learned corruption schedules and scaling the architecture to larger transformer models. UMD stands as a robust "one-stop shop" for efficient, high-quality vision modeling.

Summary updated

BibTeX
@misc{hansenestruch2024unified,
  author = {Philippe Hansen-Estruch and Sriram Vishwanath and Amy Zhang and Manan Tomar},
  title = {{Unified Auto-Encoding with Masked Diffusion}},
  year = {2024},
  eprint = {2406.17688},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.17688},
}
Figure