ADDP: Learning General Representations for Image Recognition and Generation with Alternating Denoising Diffusion Process

Changyao Tian, Chenxin Tao, Jifeng Dai, Hao Li, Ziheng Li, Lewei Lu, Xiaogang Wang, Hongsheng Li, Gao Huang, Xizhou Zhu · DOI

Introduction

The Alternating Denoising Diffusion Process (ADDP) is a unified framework designed to bridge the gap between image recognition and generation. Historically, these two fields have relied on different data representations: recognition models favor raw pixels for spatial precision, while generative models favor discrete tokens for efficiency. ADDP harmonizes these by alternating between pixel-level denoising and discrete vector-quantized (VQ) token prediction, achieving state-of-the-art results in both domains.

The Pixel-Token Trade-off

In computer vision, "understanding" an image (recognition) and "creating" one (generation) present conflicting requirements. Recognition tasks, such as object detection or segmentation, require high spatial sensitivity to identify fine-grained boundaries. This is best achieved in Pixel Space. Conversely, generative models often operate in Token Space (using VQ-GANs) to focus on high-level structure and ignore imperceptible noise, which makes training more efficient and stable.

Comparison of image recognition and generation paradigms across Pixel Space, Token Space, and the proposed ADDP (Ours).

Previous unified models typically chose one space, leading to performance trade-offs. For instance, token-based models like MAGE excel at generation but struggle with dense recognition tasks because tokenization "smears" spatial information. ADDP addresses this by perceiving in pixels while generating in tokens.

Methodology: Alternating Denoising Diffusion

The core innovation is the Alternating Denoising Diffusion Process (ADDP). Instead of a standard diffusion process that operates on a single representation, ADDP moves back and forth between two spaces in every denoising step:

  1. Token-to-Pixel Decoding: The model takes the current set of VQ tokens and uses a pre-trained VQ decoder to produce a noisy synthesized image in pixel space.
  2. Pixel-to-Token Generation: A learnable ViT-based encoder-decoder then processes this noisy pixel image. The encoder extracts general representations (useful for recognition), and the decoder predicts the next set of VQ tokens (useful for generation).
An example of an intermediate noisy pixel representation $x_t$ generated during the alternating denoising process.

To improve training stability and image quality, the authors use a WeightedSum mapping function. Rather than selecting the single most likely token (ArgMax), the model uses a weighted average of codebook embeddings, providing a richer gradient signal.

Key Results

ADDP sets a new standard for unified models across several benchmarks:

  • Image Generation: On ImageNet-1k (256x256), it achieved an FID of 7.6, significantly outperforming the previous best unified model, MAGE (FID 9.1).
  • Image Recognition: It reached 85.9% top-1 accuracy on ImageNet-1k, matching specialized recognition models like MAE.
  • Dense Recognition Tasks: This is where ADDP's pixel-space perception shines. On COCO object detection, it achieved 54.6 AP (compared to MAGE's 31.4 AP). On ADE20k semantic segmentation, it reached 54.3 mIoU (compared to MAGE's 43.1 mIoU).

Conclusion

ADDP demonstrates that a single pre-trained backbone can achieve competitive results on dense prediction tasks without sacrificing generative quality. By forcing the model to decode pixels and then re-encode them to predict tokens, it learns a representation that is inherently compatible with both recognition and generation. Future work will focus on scaling this process to higher resolutions and reducing dependency on pre-trained VQ-VAE tokenizers.

Summary updated

BibTeX
@inproceedings{tian2024addp,
  author = {Changyao Tian and Chenxin Tao and Jifeng Dai and Hao Li and Ziheng Li and Lewei Lu and Xiaogang Wang and Hongsheng Li and Gao Huang and Xizhou Zhu},
  title = {{ADDP: Learning General Representations for Image Recognition and Generation with Alternating Denoising Diffusion Process}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=cMPm8YFXZe},
}
Figure