[Paper Review] Generating Images with Sparse Representations
This paper proposes DCTransformer, a Transformer-based autoregressive model that generates high-resolution images by modeling sparse representations of quantized DCT coefficients. By treating images as sequences of non-zero DCT channel, spatial location, and coefficient triples, the model achieves competitive sample quality and diversity on ImageNet and other datasets, while enabling efficient super-resolution and colorization with minimal architectural modifications.
The high dimensionality of images presents architecture and sampling-efficiency challenges for likelihood-based generative models. Previous approaches such as VQ-VAE use deep autoencoders to obtain compact representations, which are more practical as inputs for likelihood-based models. We present an alternative approach, inspired by common image compression methods like JPEG, and convert images to quantized discrete cosine transform (DCT) blocks, which are represented sparsely as a sequence of DCT channel, spatial location, and DCT coefficient triples. We propose a Transformer-based autoregressive architecture, which is trained to sequentially predict the conditional distribution of the next element in such sequences, and which scales effectively to high resolution images. On a range of image datasets, we demonstrate that our approach can generate high quality, diverse images, with sample metric scores competitive with state of the art methods. We additionally show that simple modifications to our method yield effective image colorization and super-resolution models.
Motivation & Objective
- To address the high dimensionality and computational cost of pixel-based autoregressive generative models for images.
- To leverage classical image compression techniques, such as DCT quantization, to create compact, sparse representations suitable for likelihood-based generative modeling.
- To develop a scalable, autoregressive Transformer architecture that models sparse DCT sequences for high-resolution image generation.
- To demonstrate that sparse DCT representations enable effective image super-resolution and colorization without retraining.
- To achieve competitive sample quality and diversity compared to state-of-the-art GANs, while maintaining training stability and full data distribution coverage.
Proposed method
- Images are converted into 3D tensors of quantized DCT coefficients using 8×8 pixel blocks and zigzag ordering.
- Non-zero DCT coefficients are represented as sparse 3-tuples: (channel, spatial location, coefficient value), forming a sequence for autoregressive modeling.
- A Transformer-based architecture, DCTransformer, is trained to predict the next element in the sequence, conditioned on prior elements.
- The model uses a chunked training regime to handle long sequences efficiently, maintaining constant memory and compute costs regardless of image size.
- The generation process follows a coarse-to-fine ordering, starting with low-frequency components and progressing to high-frequency details.
- For downstream tasks, the model is fine-tuned or conditioned by modifying the input sequence structure—e.g., placing color channels at the end for colorization.
Experimental results
Research questions
- RQ1Can sparse DCT representations enable effective and efficient autoregressive image generation at high resolutions?
- RQ2How does modeling images via quantized DCT coefficients compare to pixel-based or VQ-VAE-based representations in terms of sample quality and diversity?
- RQ3Can the same sparse DCT-based model be adapted to super-resolution and colorization tasks with minimal architectural changes?
- RQ4Does the use of classical compression techniques like DCT improve sample diversity and training stability compared to GANs?
- RQ5To what extent does the sparse representation reduce inference and memory costs compared to standard autoregressive models?
Key findings
- DCTransformer achieves sample metric scores competitive with state-of-the-art GANs on ImageNet at 256×256 resolution, with improved sample diversity.
- The model generates high-quality, diverse images at 2048×2048 resolution on the plant leaves dataset, representing the first such unconditional generation at this resolution using neural networks.
- For image upsampling, DCTransformer-upsampled images achieve scores similar or better than the original validation set images, except for the precision metric.
- For image colorization, the model's sample metrics are very close to those of the ground truth, indicating a strong distributional match to the training data.
- The model demonstrates effective zero-shot super-resolution by generating high-frequency details from low-frequency DCT components, using the same architecture and training procedure.
- Despite requiring large models and significant compute, the method achieves full data distribution coverage, resulting in highly diverse outputs due to the likelihood maximization objective.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.