Abstract
The field of image synthesis is currently flourishing due to the advancements in diffusion models. While diffusion models have been successful, their computational intensity has prompted the pursuit of more efficient alternatives. As a representative work, non-autoregressive Transformers (NATs) have been recognized for their rapid generation. However, a major drawback of these models is their inferior performance compared to diffusion models. In this paper, we aim to re-evaluate the full potential of NATs by revisiting the design of their training and inference strategies. Specifically, we identify the complexities in properly configuring these strategies and indicate the possible sub-optimality in existing heuristic-driven designs. Recognizing this, we propose to go beyond existing methods by directly solving the optimal strategies in an automatic framework. The resulting method, named AutoNAT, advances the performance boundaries of NATs notably, and is able to perform comparably with the latest diffusion models at a significantly reduced inference cost. The effectiveness of AutoNAT is validated on four benchmark datasets, i.e., ImageNet-256 & 512, MS-COCO, and CC3M.
Introduction
While diffusion models like Stable Diffusion and DiT currently dominate the landscape of high-fidelity image synthesis, their iterative denoising process is computationally demanding, requiring numerous sequential steps. Non-Autoregressive Transformers (NATs) present a compelling alternative, designed for speed by predicting multiple image tokens in parallel.
Despite their speed advantage, NATs have historically lagged behind diffusion models in image quality. This research posits that the performance gap is not a fundamental architectural flaw but rather a consequence of sub-optimal, manually-tuned heuristics used during training and inference. By replacing these human-designed rules with an automated optimization framework, we demonstrate that NATs can achieve state-of-the-art quality with significantly higher efficiency.
The AutoNAT Framework
The core of our approach is AutoNAT, a unified framework that treats training and generation strategies as variables to be optimized rather than fixed rules. We identify four critical scheduling functions that govern NAT performance:
- Re-masking Ratio $r(t)$: Determines the fraction of tokens to be re-masked at each generation step.
- Sampling Temperature $\tau_1(t)$: Regulates the randomness in token selection.
- Re-masking Temperature $\tau_2(t)$: Controls the criteria for identifying and re-masking "unreliable" tokens.
- Guidance Scale $s(t)$: Modulates the strength of classifier-free guidance.
To optimize these functions, we employ an Alternating Optimization algorithm. This process alternates between optimizing the generation strategy for a fixed model using gradient descent and searching for the optimal training mask ratio distribution $p(r)$ to retrain the model.
Experimental Evaluation
We validated AutoNAT across several diverse benchmarks, including ImageNet-256 & 512, MS-COCO, and CC3M. Our investigation revealed that common heuristics are often bottlenecks. For instance, we found that a simple fixed mask ratio during training can outperform the more complex "cosine" distribution typically used in models like MaskGIT. Ablation studies further highlighted that the sampling temperature ($\tau_1$) is the most critical hyperparameter; failing to optimize it leads to a significant degradation in image quality.
Furthermore, we observed high strategy transferability: configurations optimized on smaller, less expensive models transfer effectively to larger architectures, enabling efficient scaling of the optimization process.
Results and Discussion
AutoNAT significantly improves the Pareto front of the speed-vs-quality tradeoff. As shown in the figure below, AutoNAT models achieve a 5.1× speedup over leading diffusion models like DiT and LDM while maintaining comparable or superior FID scores.
On ImageNet-256, AutoNAT-L achieved a state-of-the-art FID of 2.68 in just 8 steps. This performance not only surpasses previous NAT models like MaskGIT (FID 6.18) but also rivals much slower diffusion-based counterparts. These efficiency gains are hardware-agnostic, translating to both GPU and CPU environments, which makes AutoNAT highly suitable for real-time applications and edge deployment.
Conclusion
AutoNAT demonstrates that the perceived quality limitations of Non-Autoregressive Transformers are largely due to sub-optimal strategy design. By automating the optimization of training and inference schedules, we bridge the gap between NATs and diffusion models. While the performance remains tied to the quality of the underlying VQ-autoencoder, AutoNAT establishes a new benchmark for efficient image synthesis.
Summary updated