Analog Bits: Generating Discrete Data using Diffusion Models with Self-Conditioning

Ting Chen, Ruixiang Zhang, Geoffrey E. Hinton

Abstract

We present Bit Diffusion: a simple and generic approach for generating discrete data with continuous state and continuous time diffusion models. The main idea behind our approach is to first represent the discrete data as binary bits, and then train a continuous diffusion model to model these bits as real numbers which we call analog bits. To generate samples, the model first generates the analog bits, which are then thresholded to obtain the bits that represent the discrete variables. We further propose two simple techniques, namely Self-Conditioning and Asymmetric Time Intervals, which lead to a significant improvement in sample quality. Despite its simplicity, the proposed approach can achieve strong performance in both discrete image generation and image captioning tasks. For discrete image generation, we significantly improve previous state-of-the-art on both CIFAR-10 (which has 3K discrete 8-bit tokens) and ImageNet-64x64 (which has 12K discrete 8-bit tokens), outperforming the best autoregressive model in both sample quality (measured by FID) and efficiency. For image captioning on MS-COCO dataset, our approach achieves competitive results compared to autoregressive models.

Introduction

Generative modeling has long been bifurcated by data modality. Autoregressive models (like GPT) are the standard for discrete data such as text, while Diffusion models have become the dominant architecture for continuous data like images and audio. While Transformers excel at discrete sequences, they suffer from sequential generation bottlenecks and quadratic computational scaling. Conversely, diffusion models offer parallel refinement but are natively designed for continuous values.

This paper introduces Bit Diffusion, a framework that bridges this gap by treating discrete data as continuous "analog bits," allowing standard continuous diffusion architectures to be applied to discrete tasks with high efficiency and superior sample quality.

The Bit Diffusion Framework

The core innovation of this work is the concept of Analog Bits. Instead of developing complex discrete state-space mathematics, the authors propose a simple transformation: discrete data (such as an 8-bit pixel value) is converted into its binary representation. These bits are then cast as real numbers (e.g., -1.0 and 1.0) to serve as continuous inputs for a standard diffusion model. During sampling, the model generates these continuous "analog" estimates, which are subsequently thresholded ($>0$ for 1, $\le0$ for 0) to recover the discrete tokens.

The Analog Bits pipeline illustrating the conversion between discrete tokens and continuous real numbers for training and sampling.

Enhancing Sample Quality: Self-Conditioning and Asymmetric Time

To optimize the performance of Bit Diffusion, the researchers introduced two key technical refinements:

  1. Self-Conditioning: In standard diffusion, the model predicts the clean data $x_0$ from a noisy state $x_t$. With self-conditioning, the model is also provided with its own prediction of $x_0$ from the previous sampling step. This "warm start" allows the model to iteratively refine its estimate, effectively correcting errors across the generation process.
  2. Asymmetric Time Intervals: During sampling, the authors found that using a slightly different time step for the network's input versus the actual state transition helps the model denoise more effectively, particularly when taking large steps.
Diagram of the self-conditioning mechanism, where the model's previous estimate of the clean data is used to inform the current refinement step.

Experimental Evaluation

Bit Diffusion was evaluated on major benchmarks including CIFAR-10, ImageNet-64x64, and MS-COCO.

  • Image Generation: On CIFAR-10, Bit Diffusion achieved an FID of 6.93, significantly outperforming the best autoregressive Transformer (FID 12.75).
  • Efficiency: The model achieved these results in only 100 parallel sampling steps, a massive improvement over the 3,072 sequential steps required by autoregressive counterparts.
  • Text Generation: On the MS-COCO image captioning task, Bit Diffusion achieved results competitive with standard Transformers, proving its efficacy for language modeling.

Conclusion

Bit Diffusion demonstrates that continuous diffusion models can be highly effective for discrete data through the simple proxy of analog bits. By incorporating self-conditioning, the model achieves state-of-the-art performance in both quality and sampling speed. While challenges remain regarding bit sensitivity in text and scaling to higher resolutions, this approach provides a powerful alternative to traditional autoregressive modeling.

Summary updated

BibTeX
@inproceedings{chen2023analog,
  author = {Ting Chen and Ruixiang Zhang and Geoffrey E. Hinton},
  title = {{Analog Bits: Generating Discrete Data using Diffusion Models with Self-Conditioning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=3itjR9QxFw},
}
Figure