Flow to the Mode: Mode-Seeking Diffusion Autoencoders for State-of-the-Art Image Tokenization

Kyle Sargent, Kyle Hsu, Justin Johnson, Li Fei-Fei, Jiajun Wu

TL;DR

This paper introduces FlowMo, a novel diffusion autoencoder for image tokenization that achieves state-of-the-art performance on ImageNet-1K reconstruction. FlowMo's key innovation is a two-stage training process that prioritizes perceptually relevant reconstruction modes, moving beyond traditional methods that focus on matching all possible modes.

What Problem Does This Paper Address?

Modern image generation systems, like VQGAN and diffusion models, often rely on a two-stage approach: first, a "tokenizer" compresses images into a lower-dimensional latent space, and second, a generative model learns from these latent representations. The quality of the tokenizer is crucial for the overall generation performance. Existing state-of-the-art tokenizers typically use convolutional autoencoders trained with a combination of MSE, perceptual, and adversarial losses. While diffusion autoencoders have shown promise for image compression, they haven't yet reached state-of-the-art performance on competitive benchmarks like ImageNet-1K reconstruction. This paper addresses this gap by proposing a diffusion autoencoder-based tokenizer that not only achieves state-of-the-art results but also does so without relying on convolutions, adversarial losses, or complex distillation techniques.

Methods

FlowMo is a fully transformer-based diffusion autoencoder. Its architecture consists of an encoder and a decoder, both built upon the multimodal diffusion image transformer (MMDiT). The encoder maps an image to a quantized latent code, and the decoder reconstructs the image from this latent code using a rectified flow objective.

The core novelty lies in FlowMo's two-stage training strategy:

  • Stage 1A: Mode-matching pre-training: This stage trains the encoder and decoder end-to-end using a diffusion loss, aiming to make the quantized latent code informative and to match the true conditional distribution of reconstructed images. It also incorporates learned perceptual distance and entropy/commitment losses.
  • Stage 1B: Mode-seeking post-training: This crucial stage freezes the encoder and fine-tunes the decoder. The goal is to bias the reconstruction distribution towards modes that are perceptually similar to the original image. This is achieved by introducing a Lsample loss, which is a perceptual loss applied to samples generated by integrating the probability flow ODE over multiple steps. This "mode-seeking" approach is the key to FlowMo's superior perceptual reconstruction.

Additionally, FlowMo employs a novel sampling strategy that concentrates sampling timesteps towards lower noise levels, further improving reconstruction quality.

Datasets

  • ImageNet-1K: Used for training and evaluating the tokenization performance. The evaluation is performed on the validation set at 256x256 resolution.

Key Insights and Ideas

  • Perceptual relevance over mode matching: The most significant insight is that for state-of-the-art perceptual reconstruction, it's more effective to sample modes of the reconstruction distribution that are perceptually close to the original image, rather than trying to match all possible modes.
  • Two-stage training is critical: Breaking down the training into a mode-matching pre-training phase and a mode-seeking post-training phase is essential for achieving superior performance. The post-training stage specifically biases the model towards perceptually relevant reconstructions.
  • Transformer-only architecture: The paper demonstrates that a transformer-only architecture can achieve state-of-the-art results in image tokenization, moving away from the prevalent CNN-based approaches.
  • 1D latent codes are sufficient: FlowMo uses 1-dimensional latent codes, challenging the common practice of using 2D spatially-aligned latent codes.

Key Results

  • State-of-the-art tokenization: FlowMo achieves new state-of-the-art results on ImageNet-1K reconstruction at multiple bits per pixel (BPP) rates (0.07 BPP and 0.22 BPP), outperforming existing tokenizers in terms of rFID, PSNR, and SSIM.
  • Improved rFID and PSNR: Specifically, FlowMo-Lo (0.07 BPP) achieves an rFID of 0.95, and FlowMo-Hi (0.22 BPP) achieves an rFID of 0.56.
  • Generative model performance: A generative model (MaskGiT) trained with a FlowMo tokenizer shows competitive performance, though not always beating traditional tokenizers, highlighting the interplay between tokenizer quality and generation.
  • Ablation studies confirm design choices: Experiments demonstrate the importance of the mode-seeking post-training stage, the logit-normal noise schedule, and the shifted sampler for achieving optimal performance.

Limitations and Future Work

  • Inference time: The primary limitation acknowledged is the inference time, which requires multiple model forward passes (n=25 steps in their work) to generate a sample from the decoder.
  • LPIPS metric: FlowMo tends to underperform on the LPIPS metric compared to some baselines.
  • Generative model interplay: While FlowMo tokenizers enable competitive generation, further work is needed to fully leverage their potential for improved downstream generative model performance.
  • Future work: The authors suggest exploring further improvements in generative model training atop FlowMo tokenizers and investigating the complex interplay between tokenizer quality and generation quality.

Summary updated

BibTeX
@inproceedings{sargent2025flow,
  author = {Kyle Sargent and Kyle Hsu and Justin Johnson and Li Fei-Fei and Jiajun Wu},
  title = {{Flow to the Mode: Mode-Seeking Diffusion Autoencoders for State-of-the-Art Image Tokenization}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure