DCTdiff: Intriguing Properties of Image Generative Modeling in the DCT Space

Mang Ning, Mingxiao Li, Jianlin Su, Haozhe Jia, Lanmiao Liu, Martin Benes, Albert Ali Salah, Itir Önal Ertugrul · DOI

Introduction

Standard diffusion models typically operate in either pixel space (RGB) or latent space (via a VAE). Pixel-space modeling is inefficient due to high redundancy, making high-resolution scaling computationally prohibitive. Latent Diffusion Models (LDMs) address this using a pre-trained Variational Autoencoder (VAE) to compress images. However, VAEs are "black boxes" that are expensive to train, can introduce blurry artifacts, and often struggle to generalize across different image domains.

DCTdiff introduces a new generative paradigm that moves image diffusion from the redundant pixel space into the compact frequency domain using the Discrete Cosine Transform (DCT). By modeling images in the same space used by JPEG, it achieves higher quality and faster training than pixel-based models and outperforms VAE-based latent diffusion at high resolutions with significantly lower training costs.

Methodology

The core innovation of DCTdiff is performing diffusion directly on DCT coefficients. DCT converts spatial pixel data into frequency components, concentrating visual information into low-frequency coefficients.

The DCTdiff pipeline: from RGB image to diffusion modeling in the DCT space.

The pipeline consists of several key steps:

  1. Color Transformation: RGB images are converted to YCbCr with 2x chroma subsampling.
  2. 2D Block DCT: The image is partitioned into blocks and transformed into frequency space.
  3. Frequency Tokenization: High-frequency coefficients contributing minimally to visual quality are removed based on a reconstruction metric (rFID). The remaining coefficients are packed into tokens for a Transformer-based backbone.
  4. Entropy-Consistent Scaling (ECS): A normalization method that preserves the probability distribution shape of the coefficients.
  5. SNR Scaling: The noise schedule is adjusted to account for the concentrated energy in DCT space, preventing the premature destruction of information.

Experimental Results

The authors evaluated DCTdiff on standard benchmarks including CIFAR-10, CelebA, ImageNet, and high-resolution datasets like FFHQ (up to 512x512) and AFHQ.

Reconstruction quality (rFID) and compression ratios for different block sizes and coefficient counts (m) on the FFHQ dataset.

Key findings include:

  • Efficiency: DCTdiff converges up to 2.5x faster than pixel-based models.
  • Quality at Scale: At 512x512 resolution, DCTdiff achieves better FID scores than Latent Diffusion (using SD-VAE) while requiring only 25% of the training cost.
  • Compression: By using DCT, the model achieves 4x to 7x compression without a VAE. As a fixed linear transform, DCT is computationally efficient and avoids domain-shift issues common in neural compressors.
  • Detail Retention: Qualitative analysis shows that DCTdiff preserves fine details better than VAE-based compression, which often blurs small features.

Theoretical Insights

The paper posits that image diffusion is a form of "Spectral Autoregression," proving that the forward diffusion process destroys high-frequency details before low-frequency structures. This bridges diffusion models with autoregressive models in frequency space. Additionally, the authors introduce Entropy-Based Frequency Reweighting (EBFR) to prioritize high-entropy, low-frequency signals and a DCT Upsampling Theorem for high-quality image scaling.

Conclusion and Future Work

DCTdiff demonstrates that frequency-domain modeling is a powerful alternative to both pixel and latent spaces. While currently focused on unconditional and class-conditional generation, future work includes extending the model to text-to-image tasks and testing its limits at ultra-high resolutions like 1024x1024.

Summary updated

BibTeX
@inproceedings{ning2025dctdiff,
  author = {Mang Ning and Mingxiao Li and Jianlin Su and Haozhe Jia and Lanmiao Liu and Martin Benes and Albert Ali Salah and Itir Önal Ertugrul},
  title = {{DCTdiff: Intriguing Properties of Image Generative Modeling in the DCT Space}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=vDoAA8xKXL},
}
Figure