Beyond Token-Level Cross-Entropy: Fréchet Distributional Post-Training for Autoregressive Image Generation

TL;DR

Introduces FD-loss post-training using Fréchet distance in feature space to improve autoregressive image generation, reducing FID by 41.4%.

cs.CV 🔴 Advanced 2026-08-01 42 views
Jinhua Zhang Yisong Lin Wei Long Shuhang Gu
image generation autoregressive models distribution matching Fréchet distance post-training

Key Findings

Methodology

The approach employs a dual-pass scheme: first, a gradient-free rollout generates detached contexts under the model’s inference configuration; second, a differentiable replay with a probability-level STE propagates image-level gradients through temperature-scaled probabilities. The core is using the Fréchet distance (FD) in feature space as the sole objective to align real and generated image distributions. During training, only the generator parameters are updated, while the tokenizer and feature extractors remain frozen. EMA statistics of feature distributions are maintained to stabilize the FD loss. This process effectively bridges the gap between training with teacher forcing and inference with self-generated contexts, directly optimizing for distributional similarity at the image level.

Key Results

  • Across eight configurations from four generator families on ImageNet 256×256, post-training with FD-loss reduces FID by 41.4% and FDr6 by 52.0% on average. The best FID improves from 2.42 to 1.43 without additional parameters or inference steps, demonstrating high efficiency.
  • The method consistently improves diverse architectures such as LlamaGen, TiTok, VAR, and GigaTok, especially in complex, high-resolution scenarios, indicating broad applicability.
  • By replacing teacher-forced contexts with self-generated rollouts, the approach significantly reduces distribution mismatch, leading to higher quality and more diverse images, validated by quantitative metrics and visual samples.

Significance

This work addresses a fundamental challenge in discrete autoregressive image generation: the mismatch between training objectives and inference conditions. Traditional token-level cross-entropy fails to optimize the distribution of decoded images directly, leading to suboptimal quality. By introducing a distribution-level matching via Fréchet distance, the method offers a principled way to improve realism and diversity without increasing model complexity. Its ability to enhance existing models through post-training makes it highly practical, bridging a crucial gap between training and inference. This advancement paves the way for more reliable, high-fidelity image synthesis, impacting fields like content creation, virtual reality, and AI-assisted art.

Technical Contribution

The key technical innovation lies in integrating a distributional loss based on Fréchet distance into the post-training of discrete autoregressive generators. The method employs a dual-pass scheme: a gradient-free rollout constructs detached contexts, and a probability-level STE enables gradient flow through hard argmax decoding. The use of EMA-estimated feature statistics ensures stable and accurate distribution alignment. This approach circumvents the non-differentiability of token sampling, enabling direct optimization of image-level distribution similarity. It also maintains computational efficiency by updating only the generator parameters, without additional inference steps or parameters, representing a significant step forward in training strategies for discrete models.

Novelty

This research is the first to apply Fréchet distance-based distribution matching in the post-training of discrete autoregressive image generators. It innovatively combines model-generated offline contexts with a probability-level straight-through estimator, effectively bridging the gap between training with teacher forcing and inference with self-generated contexts. Unlike prior methods that rely solely on token-level likelihood, this approach directly optimizes the distribution of generated images, leading to substantial quality improvements. Its unique integration of EMA feature statistics and distributional loss sets a new standard for post-training enhancement of discrete generative models.

Limitations

  • The method depends on the pretrained model’s inference configuration, which may limit its effectiveness in scenarios with different sampling strategies or architectures. Its performance in extremely high-resolution or highly complex scenes remains to be validated.
  • Computational overhead from maintaining EMA statistics and offline context generation could be significant for very large models or datasets, potentially limiting scalability.
  • Currently, only the generator is optimized, leaving the tokenizer and feature extractors fixed. Future work could explore joint optimization for further gains.

Future Work

Future directions include extending the distribution matching to multi-scale and multi-modal features, integrating end-to-end training, and exploring adaptive offline context construction. Additionally, applying this framework to diffusion models and other generative paradigms could further enhance image quality and diversity, broadening its impact across AI content synthesis.

AI Executive Summary

Autoregressive (AR) models have become a dominant approach for high-fidelity image synthesis, especially when leveraging discrete token representations combined with Transformer architectures. Despite their success, a persistent challenge has been the mismatch between training objectives and inference conditions. Traditional training relies on token-level cross-entropy with teacher forcing, where models learn to predict tokens conditioned on ground-truth histories. However, during inference, models generate images based on their own previous outputs, leading to a divergence in the distribution of generated images versus training data. This discrepancy often results in suboptimal image quality and diversity.

To address this, recent research has turned to distribution-level matching techniques, notably the Fréchet distance (FD), which measures the similarity between real and generated feature distributions. While effective in continuous models like diffusion, applying FD to discrete autoregressive generators has been hindered by the non-differentiability of token sampling and the context mismatch. The current study introduces a novel post-training framework that combines offline, model-specific rollout generation with a probability-level straight-through estimator (STE). This allows the model to optimize the FD loss directly at the image level, using self-generated contexts that mimic inference conditions.

The core innovation involves constructing detached rollout contexts without gradients, then reprocessing these contexts with differentiable replay that propagates image-level gradients through temperature-scaled probabilities. Only the generator parameters are updated, while the tokenizer and feature extractors remain frozen, ensuring efficiency. Experimental results on ImageNet 256×256 across multiple architectures demonstrate that this approach reduces FID by over 41%, with the best case achieving a FID of 1.43 from an initial 2.42, all without increasing model size or inference steps. These findings highlight the potential of distributional post-training to significantly enhance the quality and realism of autoregressive image generation.

This work bridges a crucial gap in generative modeling, offering a scalable, effective method to align generated image distributions with real data. Its implications extend beyond static models, providing a foundation for future research in joint optimization, multi-scale features, and broader applications in AI-driven content creation. Despite some limitations related to computational overhead and fixed components, the proposed framework marks a substantial step forward, opening new avenues for high-quality, reliable image synthesis in both academic and industrial contexts.

Deep Dive

Plain Language Accessible to non-experts

想象你在一家工厂里,工厂每天都在生产各种商品。以前,工厂的工人(模型)按照一本说明书(训练时用真实图片)来操作,确保每个步骤都正确,但实际上,工厂每天都在面对不同的情况(推理时的自生成上下文)。如果工人只按说明书工作,遇到实际情况就可能出错,生产的商品就不那么完美。这项研究就像给工厂装上了一个智能系统,它能模拟各种生产场景,提前练习,确保每个商品都符合标准。它用一种叫弗雷切距离的“质量检测仪”来衡量商品的差异,通过不断调整工人的操作,让生产出的商品越来越接近理想状态。这种方法没有增加新设备,只是让工人(模型)学会更好地应对实际生产中的变化,从而让工厂的产品更漂亮、更符合客户需求。这就像让工厂变得更聪明、更会自己改正错误,生产出更高质量的商品。

ELI14 Explained like you're 14

想象你在玩拼图游戏,你需要把很多小块拼成一幅完整的图片。以前,你每次都用说明书(训练用真实图片)来指导拼图,但在真正拼的时候,只能靠自己猜,结果拼出来的图片可能和原图差很多。这项研究就像教你一种新方法,让你在拼图时用一种特别的“质量检测器”来衡量拼出来的图片和真实图片的相似度。这个检测器能告诉你,哪里还不够像,哪里还可以改进。它还会在你拼图的过程中,偷偷观察你自己拼的样子,然后给你一些建议,让你拼得更快、更漂亮。这样,你的拼图就能变得越来越像原来的图片了,而且不用多买新工具。这种方法让模型在学习后,能更好地模仿真实图片的样子,拼出更高质量的图片,就像让拼图变得更聪明、更会自己改正错误一样。

Abstract

Autoregressive image generators are commonly pretrained with token-level cross-entropy under teacher forcing, yet evaluated by the distributional quality of decoded images. This creates an objective mismatch, because categorical errors have unequal image-level consequences, and a context mismatch, because inference conditions on model-generated histories. We introduce FD-loss post-training, which adapts a pretrained discrete generator using representation-space Fréchet distance as the sole objective. A dual-pass scheme first constructs detached rollout contexts through gradient-free generation under the model's native inference configuration, then performs differentiable replay with a probability-level straight-through estimator (STE) that preserves hard argmax decoding in the forward pass while propagating image-level gradients through temperature-scaled probabilities. Only the generator is updated, while the tokenizer and feature extractors remain frozen. Across eight completed configurations from four generator families on class-conditional ImageNet at $256\times256$, FD-loss post-training reduces FID and $\mathrm{FD}_{r6}$ by 41.4% and 52.0% on average. The strongest FID result improves from 2.42 to 1.43 without adding parameters or inference steps.

cs.CV