TL;DR
Training large-scale Diffusion Transformers (DiTs) is notoriously expensive due to slow convergence. While aligning intermediate diffusion features with pretrained vision models accelerates training, it introduces a fundamental mismatch because diffusion models process noisy inputs while reference features come from clean images. MaskAlign elegantly resolves this by aligning only a randomly sampled subset of tokens combined with a lightweight token-mixing block, delivering up to a 77× training speedup while simultaneously reducing per-step computational overhead.
What Problem Does This Paper Address?
Recent breakthroughs in generative AI rely heavily on Diffusion Transformers (like DiT and SiT), but training them from scratch requires massive computational budgets. To speed things up, state-of-the-art methods use representation alignment (e.g., REPA, REG), which forces the diffusion model's intermediate layers to match the clean-image features extracted by a pretrained self-supervised vision encoder (like DINOv2).
However, this introduces a subtle but critical flaw: the clean-to-noisy mismatch. Diffusion models operate on highly noisy inputs that change dynamically across timesteps, whereas the reference features are always static and clean.
By analyzing the gradients of this alignment loss at a token level, the authors discovered that full-token alignment causes the model to develop a rigid spatial bias. Certain token positions exhibit disproportionately large gradient norms, meaning the model learns a "feature-fitting shortcut"—it over-relies on the complete, unperturbed set of clean tokens rather than learning robust denoising representations.
Methods
To break this shortcut and force the model to learn more stable representations, the authors introduce MaskAlign. The framework consists of two core components:
- Token-Subset Alignment (Random Masking): Inspired by how dropout prevents co-adaptation in neural networks, MaskAlign randomly masks out a percentage of patch tokens (a 25% mask ratio proved optimal) during the alignment phase of training. By varying the visible token subsets across iterations, the model can no longer rely on a complete set of clean features or fixed spatial shortcuts.
- Pre-Mask Token Mixing Block: Directly dropping tokens risks losing fine-grained spatial context. To mitigate this information loss, MaskAlign passes the tokens through a lightweight, multi-layer token mixing block before the mask is applied. This ensures that the remaining visible tokens carry aggregated contextual information from the entire image.
During training, both the standard diffusion prediction loss and the representation alignment loss are computed exclusively on the preserved class token and the visible patch tokens. At inference time, masking is completely deactivated, and the model processes all tokens normally.
Datasets
The method was trained and evaluated on the standard class-conditional image generation benchmark:
- ImageNet 256 × 256
The authors utilized DINOv2-B as the external pretrained vision encoder providing the reference features, and the Stable Diffusion VAE to map images into the latent space.
Key Insights and Ideas
- The Gradient Concentration Phenomenon: In standard full-token alignment, the spatial distribution of alignment gradients is highly non-uniform. The authors found that the most influential tokens (top 10% gradient norm) consistently concentrate in specific spatial regions, with the highest probability being 21× larger than the lowest. MaskAlign successfully flattens this distribution.
- Masking as a Dual Benefit: Usually, masking tokens is used as a pretext reconstruction task (like in MAE or MaskDiT). Here, masking acts strictly as a regularizer for representation alignment. Crucially, reducing the token count from 257 to 193 during training blocks physically shortens the transformer sequence length, providing a rare win-win: better regularization and lower computational cost per step.
Key Results
MaskAlign achieves state-of-the-art convergence efficiency on ImageNet 256 × 256:
- Massive Training Speedups: When evaluated on the SiT-XL/2 backbone, MaskAlign reaches an 8.3 FID score 77× faster than the vanilla SiT-XL/2 baseline, and a 5.9 FID score 30× faster than SiT-XL/2 + REPA (measured by the number of iterations required).
- Higher Generation Quality: At a fixed budget of 400K iterations, MaskAlign improves the FID score from 3.4 (achieved by REG) to 2.8. At 1M iterations, it pushes the FID down to 2.4.
- Lower Per-Step Cost: Despite adding the token-mixing block, the 25% token masking results in a 24.9% reduction in input tokens, which translates to an 11.6% reduction in per-step training time compared to REG.
Limitations and Future Work
While the results are compelling, the authors note a few limitations:
- Scope of Evaluation: The method was primarily validated on ImageNet 256 × 256 using SiT/DiT architectures and DINOv2 features. Its performance on higher-resolution images, text-to-image generation tasks, and alternative teacher models remains to be explored.
- Sensitivity to Hyperparameters: The performance gains are sensitive to design choices. For instance, aggressive masking (e.g., 75% mask ratio) or excessive token mixing (3+ layers) actually degrades performance by over-weakening the alignment supervision or disrupting the effective depth of the representations. Future work will look into adaptive masking strategies to make the framework more robust.
Summary updated