Stabilize the Latent Space for Image Autoregressive Modeling: A Unified Perspective

Latent-based image generative models, such as Latent Diffusion Models (LDMs) and Mask Image Models (MIMs), have achieved notable success in image generation tasks. These models typically leverage reconstructive autoencoders like VQGAN or VAE to encode pixels into a more compact latent space and learn the data distribution in the latent space instead of directly from pixels. However, this practice raises a pertinent question: Is it truly the optimal choice? In response, we begin with an intriguing observation: despite sharing the same latent space, autoregressive models significantly lag behind LDMs and MIMs in image generation. This finding contrasts sharply with the field of NLP, where the autoregressive model GPT has established a commanding presence. To address this discrepancy, we introduce a unified perspective on the relationship between latent space and generative models, emphasizing the stability of latent space in image generative modeling. Furthermore, we propose a simple but effective discrete image tokenizer to stabilize the latent space for image generative modeling by applying K-Means on the latent features of self-supervised learning models. Experimental results show that image autoregressive modeling with our tokenizer (DiGIT) benefits both image understanding and image generation with the next token prediction principle, which is inherently straightforward for GPT models but challenging for other generative models. Remarkably, for the first time, a GPT-style autoregressive model for images outperforms LDMs, which also exhibits substantial improvement akin to GPT when scaling up model size. Our findings underscore the potential of an optimized latent space and the integration of discrete tokenization in advancing the capabilities of image generative models. The code is available at \url{https://github.com/DAMO-NLP-SG/DiGIT}.

Paper

References (43)

Scroll for more · 31 remaining

Similar papers

Peer review

Reviewer K39P6/10 · confidence 4/52024-07-08

Summary

This paper designs a better quantized autoencoder on top of VQGAN. It builds an image autoencoder which is able to both achieve good recognition performance for linear probing, and have a latent space which is suitable for training a generative model. It studies the existing autoencoders from a high-level theoretical perspective and proposes design ideas which are targeted to improve them. The paper claims that the modern autoencoders ignore the fact that they will be utilized for downstream generative modelling tasks and mainly focus on reconstruction. The paper argues that adding recognition losses on top of the encoder would help. To fulfill this desiderata, the model takes DINOv2 features and discretizes them via k-means. Then it trains a translation model into VQ-GAN decoder features. For image generation, it trains a LLM in the discrete token space. For classification, it does linear probing on top of discretized DINOv2 features. As a result, it attains reasonable generative capabilities while being able to keep a latent space suitable for linear probing classification.

Strengths

- In terms of the scores, the paper achieves very good results in the sense of discrimination/generation tradeoff (judging by figure 1). - It's an interesting finding that one can discretize dino-v2 via K-means and train a strong generative model on top of such tokens. - The paper studies an important problem of more rigorous understanding of modern autoencoders

Weaknesses

- The paper shows an equivalence between a linear AE and PCA, but it's a well known fact: https://arxiv.org/abs/1804.10253. One can also just google "equivalence between a linear autoencoder and PCA", and find a ton of resources on that. - "A reconstructive autoencoder does not necessarily establish an advantageous latent space for generative model". That's a very well-known fact in the community (e.g., see Fig 5 in https://arxiv.org/pdf/2312.02116). The paper should not claim this observation as a novel contribution. - The proposed stability metric is interesting, but it's unclear whether it will correlate with downstream generative models performance - Proposition 2.4 is extremely vague and seems to be very different from its "rigorous" analogue in the supplementary. - FID metrics for VQGAN on ImageNet are much higher than in the original paper. - It's delusive to compare performance of the developed model vs those trained from scratch, since the developed model starts from strong pre-trained models. - For image generation, the paper shows just 16 random samples, which is extremely little to get a good understanding of the model. It's better to show much more (e.g. stylegan2 provides 100k samples for FFHQ: https://github.com/NVlabs/stylegan2). - Why DiT-XL/2 is included for comparison but not its guided variants? Why more recent papers are not included for comparison? (e.g., EDMv2). - The logical transitions in the paper are unclear, e.g., it's unclear why the proposed training improves D^G, it's unclear, why it follows from the propositions that we should improve the stability of the latent space (where stability is also not defined well), etc.

Questions

- The transition "Drawing from these theoretical insights, we introduce a metric to assess the stability of the latent space induced by different encoder models" on L196 is extremely unclear. How exactly do theoretical results suggest that one should focus on stability of the latent space? Why would LDA lead to a better generative model? Why "separating" distributions class-wise would lead to a better generative model? What exactly do you mathematically define "separation of distributions" for an encoder? - Is linear probing done on top of discretized or non-discretized DINOv2 features?

Rating

6

Confidence

4

Soundness

1

Presentation

2

Contribution

2

Limitations

One limitation that is not explored is whether the model is upper-bounded by the performance of the underlying SSL classifier. In other words, what would be the greater source of improved performance in the future — improving SSL or decoder?

Reviewer Sn2s3/10 · confidence 5/52024-07-10

Summary

Latent-based image generative models, such as LDMs and MIMs, have achieved success, but autoregressive models lag behind in image generation. Our research introduces a unified perspective on latent space stability and proposes a discrete image tokenizer, DiGIT, that significantly improves autoregressive image modeling, outperforming LDMs and benefiting from scaling similar to GPT in NLP.

Strengths

- The results beat some baseline models, though under a specific (and somewhat confused) experimental setting. - The topic of latent space property is worth investigating.

Weaknesses

The paper has several weaknesses: 1. **Factual Errors**: 1.1. The cited MIM models, such as MaskGIT and MAGE, cannot revise previously predicted tokens. This contradicts the claim in line 53 that "iterative models like LDMs and MIMs can correct errors." I recommend the authors to their papers for more details. 1.2. In lines 72-73, the authors state that this work provides "the first evidence that image autoregressive generative models behave analogously to GPT." However, the Parti[1] paper has already demonstrated that image autoregressive models have similar scalability to GPT and successfully scaled the model to 20B. The authors have not cited this work. 2. The writing is poor and lacks rigor. For example, the discussion on the so-called "common misconception" in line 41 is not well-supported. What exactly is meant by the "optimal latent space for reconstruction"? How many studies hold this view? There are no citations provided. 3. The quantitative comparisons are also peculiar. The authors cite many paper results without using CFG, while CFG has become a de-facto practice for augmenting generative models. Why not adopt CFG and perform more apples-to-apples comparisons to other SOTA methods with CFG? 4. Presenting two tables (Table 2 lower and Table 3) for image generation performance is confusing. Why not consolidate the results into a single, clear table? [1] Yu, Jiahui, et al. "Scaling autoregressive models for content-rich text-to-image generation." arXiv preprint arXiv:2206.10789 2.3 (2022): 5.

Questions

See above.

Rating

3

Confidence

5

Soundness

1

Presentation

1

Contribution

2

Limitations

The writing & presentation of this paper seems too rush and lacks rigor. I recommend the authors to refine and polish this paper. The current draft may not be qualified for the publication of NeurIPS.

Authorsrebuttal2024-08-14

Rebuttal Review Required for Accurate Assessment

Dear Reviewer Sn2s, I hope this message finds you well. The discussion period is ending soon, I am writing to emphasize the importance of your review for our submission. Your score is significantly lower than the other three reviewers, and we believe this discrepancy may indicate a misunderstanding or oversight. We have addressed all the concerns in our detailed rebuttal and would appreciate your prompt attention to it. A thorough reassessment is crucial to ensure a fair evaluation. Your expertise is highly valued, and we trust that a reconsidered review will reflect the true merit of our work. Thank you for your immediate attention to this matter. Best regards, Authors

Reviewer eGbB7/10 · confidence 3/52024-07-13

Summary

This paper tries to understand why latent autoregressive image models perform worse than latent diffusion models. The key insight is that existing tokenizers are trained primarily with the reconstruction objective, whose latent space is unstable and thus may not be easy to model autoregressively. To solve this issue, the authors propose first learning a stable latent space, which autoregressive models can model easily, and then learning to reconstruct pixels from this latent space. Experimental results show that this modification enables latent autoregressive image models to match latent diffusion models' performance in terms of image understanding and image generation.

Strengths

1. The paper proposed a new perspective—latent space stability—on understanding latent autoregressive image models, which was neglected in previous works. I think this explanation is intuitive since a fixed-depth autoregressive model may not be able to model very noisy distributions (e.g., the language data have high regularity) 2. The proposed solution is straightforward -- just let image features with similar semantics share the same token. 3. The experiments are comprehensive and interesting. Both image understanding and image generation are evaluated; improvements over previous latent autoregressive models are significant. The ablation study also makes sense to me.

Weaknesses

1. I think there is a tension between how stable the latent space is and how easily we can reconstruct the latent codes to pixels. The impact of the proposed method on reconstruction is not elaborated in this paper. For example, if we only care about reconstruction, how badly does the proposed method perform? This matters greatly if we are modeling high-resolution images and care about the visual details. 2. The theoretical analysis and the proposed algorithm seem loosely connected to me -- I don't see the proposed algorithm as a direct result of the theoretical analysis. The stability analysis is more straightforward, though.

Questions

How negatively does the proposed method impact reconstruction?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

I think the authors adequately addressed the limitations

Authorsrebuttal2024-08-14

Follow-up on Our Rebuttal Submission

Dear Reviewer eGbB, I hope this message finds you well. We are grateful for your valuable feedback on our submission and are pleased to see your positive score. In our responses, we have addressed the points you raised in detail. As the discussion period is coming to a close soon, we kindly ask if you could review our responses at your earliest convenience. We are eager to know if our explanations have alleviated your concerns. If there are still areas needing improvement, your insights would be greatly appreciated and instrumental in enhancing our work. Thank you once again for your thoughtful review and support. Warm regards, Authors

Reviewer Vc7B6/10 · confidence 4/52024-07-15

Summary

The paper propose to disentangle the encoder and decoder learning for image tokenzier which ultimately will be used for providing the latent space of AR generative model. In particular, SSL model such as DinoV2 is used for encoder (plus k-means clustering).

Strengths

1. The idea of disentangling the encoder and decoder learning for image tokenizier is interesting and novel. 2. Strong empirical results can be obtained from the method. The fact that by changing a tokenizer and training the same AR model, FID can be halved to half is really impressive.

Weaknesses

1. The motivation for adopting self-supervised model as encoder/tokenizer is not very clear. Since the method is easy (DinoV2 + kmeans), the motivation of why doing so is the most critical part of the paper. However, I don't think this is presented very clearly and explicitly. Large improvements of the presentation is needed. 2. The term "stability" or ""stablize" is a bit confusing. Explicit explanation is needed. When is a latent space not stable? If it means hard to learn an AR model, probably a better term such as learnability is better. 3. While the argument of "iterative decoding process can stabilize the sampling process by correcting the data falling in the low-density overlap between distributions" makes sense, it still requires justification and evidence, not just conceptual analysis. 4. If you use SSL model as encoder, you need to train a decoder. Not much explicit detail is presented for this part. 5. The metric is not very clearly defined. What's the name of the metric? What is the definition? How to compute it? All these information should be highlighted. Overall the presentation and organization is not very clear, some major rewrite is needed.

Questions

1. In section 2.2, you mentioned that a drawback of auto-regressive image modeling is that each iteration only generate a patch so error in the previous generated patch will accumulate. How is this related to your method? IIUC, your tokenizer is still patch based, so it does not resolve the issue mentioned here.

Rating

6

Confidence

4

Soundness

3

Presentation

1

Contribution

3

Limitations

N/A

Authorsrebuttal2024-08-10

Dear reviewers, towards the end of the discussion phase, we trust that our response has successfully addressed your inquiries. We look forward to receiving your feedback regarding whether our reply sufficiently resolves any concerns you may have, or if further clarification is needed.

Reviewer Vc7B2024-08-12

After rebuttal

Thanks the authors for the response. I will keep my judgement as my concerns are relatively minor and the authors did a good job clarifying.

Authorsrebuttal2024-08-13

Thank you for the time and effort you have dedicated to reviewing our paper. Your thorough review and insightful suggestions have significantly contributed to improving the quality of our work.

Reviewer K39P2024-08-13

Thank you for the detailed response. There are still some parts which I do not understand: - What exactly is "stability of latent space"? How do you define it? - Modern autoencoders are typically trained with a VAE objective, which is a generative objective and takes care of both $\mathcal{D}^H$ and $\mathcal{D}^G$. Or am I missing something? Several of my concerns have been resolved: regarding the SSL pretraining, regarding the small amount of qualitative samples (please, include more in the earliest revision), regarding the VQGAN baseline, and more or less regarding the guided DiT scores. However, I'm still concerned that the paper is written in a fashion like it's the one proposing the equivalence between PCA and linear AEs and also the overall writing quality could be improved.

Authorsrebuttal2024-08-13

Thank you for your comments. We are happy that we were able to clarify some points and thank you for acknowledging it. We will address each question below ## 1. Definition of Stability in Latent Space The stability of latent space can be understood from two perspectives: 1. **Stability of Latent Space for Discrete Tokenizers**: This approach, utilized in our paper, can be mathematically expressed as: $ e = \text{Enc}(x + \epsilon), \quad q = \text{Quantizer}(e) $ where $\epsilon \sim \mathcal{N}(0, \sigma)$ and $\sigma$ can be adjusted to vary the signal-to-noise ratio. Here, the Quantizer may refer to the VQ module or K-means module in our method. The stability metrics can be quantified using $\delta \cos(e)$ and $\delta \mathbb{I}(q) $, which correspond to token cosine similarity and token change in Table 1. Our results align with the intuition that SSL models exhibit greater stability against noise, as they capture high-level semantic features of images, unlike traditional autoencoders that focus on low-level appearance features. 2. **Stability of Latent Space for Autoregressive Models**: As the reviewer Vc7B's suggested, we evaluate the stability of latent space for autoregressive models (learnability) by comparing the negative log-likelihood (NLL) loss of models using different tokenizers, thereby demonstrating the nondeterministic nature of the latent space. We monitor the NLL loss values for both the discriminative tokenizer and VQ tokenizer, both using a vocabulary size of 1024 and the same model size: 3.347 for the discriminative tokenizer versus 7.104 for the VQ tokenizer. A lower NLL loss indicates a more stable latent space for autoregressive models. We will include the loss curve comparison in the revised version. ## 2. VAE Objective in the Framework of $\mathcal{D}^H$ and $\mathcal{D}^G$ In **Remark 2.1** in the paper, we discussed that "the latent space $f(X)$ of the VAE is modeled as a tractable Gaussian distribution, and $D^{\mathcal{G}}(P_{f(X)}, P_{X})$ can be zero by setting the generative model as a Gaussian sampler. If the decoder is sufficiently strong and generates samples independently of the encoder output, $D^{\mathcal{H}}(P_{f(X)}, P_{X})$ can also be zero." While the VAEs can generate images by sampling from the prior Gaussian distribution, it significantly lags behind the learned generative model. Consequently, the VAE has largely evolved into a compression model, losing its generation efficacy, particularly in modern latent diffusion technologies. ## 3. Clarification on PCA and AEs in Our Analysis Framework As emphasized in our rebuttal, the discussion of PCA and AEs serves merely for intuitive understanding of latent space, aiming to make our work more accessible to readers. This part is **NOT** a core contribution of our theoretical framework. To summarize our contributions succinctly: 1. A unified perspective on the relationship between latent space and generative models. 2. A novel method to stabilize latent space by disentangling the training processes of the encoder and decoder, leading to a simple yet effective tokenizer. 3. Remarkable performance of our proposed tokenizer in image autoregressive modeling. We appreciate the response and the discussion and hope we provided information that is helpful to clarifying the points made.

Reviewer K39P2024-08-13

Thank you again for the detailed clarification, it helped me to improve my understanding. The two remaining concerns for me are: - [major] Writing could be improved. Not sure how to fix this in the scope of a rebuttal since one cannot update the manuscript. - [minor] Will the scores improve with CFG? Have you tried it?

Authorsrebuttal2024-08-14

## Revision of the Manuscript We will make revisions to the manuscript to address the comments raised during the review process in the camera-ready submission, should our paper be accepted. The main changes will include: 1. Metrics: We will add a description of the stability metrics used in Table 1. 2. Experiments: We will include the stability of latent space for autoregressive models by adding NLL loss curve comparisons. 3. Experiments: We will add the rFID score of the VQ tokenizer to Table 2 and enhance the overall presentation of the table. 3. Appendix: We will provide more qualitative samples to strengthen our findings. ## Question about CFG We believe that autoregressive models can also significantly benefit from CFG, as demonstrated in LLaMAGen [1], which was submitted to ArXiv in June 2024, but we did not try it in our experiments. LLaMAGen is a VQ + AR model that follows the ViTVQGAN model but explores modern llama architecture and CFG. In the table below, we present experimental results from LLaMAGen and compare them with our model DiGIT. LLaMAGen only reports the results of class-conditional generation, but we contend that unsupervised class-unconditional generation is a compelling feature of GPT, and our model excels in it. As illustrated, our DiGIT model, without CFG, **already** outperforms LLaMAGen with CFG. This outcome highlights the effectiveness of our proposed tokenizer. Additionally, LLaMAGen without CFG still struggles with the VQ tokenizer, as evidenced by significantly worse FID scores even with the larger 3.1B model size, which fails to demonstrate the potential of scaling laws. In contrast, our proposed tokenizer demonstrates significant improvement with increased model size In Table 2 class-unconditional setting, as evidenced by the reduction in FID from 9.13 at 219M parameters to 4.59 at 732M parameters. | Type | Methods | CFG | Params | Epoch | FID | IS | |--|--|--|--|--|--|--| |AR | LLaMAGen | No | 300 | 343M | 13.452 | 82.289 | |AR | LLaMAGen | Yes | 300 | 343M | 3.805 | 248.280 | |AR | **DiGIT (ours)** | **No** | 200 | 219M | **4.79** | 142.87 | |AR | LLaMAGen | No | 50 | 775M | 19.417 | 66.196 | |AR | LLaMAGen | Yes | 50 | 775M | 3.391 | 227.081 |AR | LLaMAGen | No | 50 | 3.1B | 13.581 | 87.902 | |AR | LLaMAGen | Yes | 50 | 3.1B | 3.050 | 222.330 | |AR | **DiGIT (ours)** | **No** | 200 | 732M | **3.39** | 205.96 | [1] Sun, Peize and Jiang, Yi and Chen, Shoufa and Zhang, Shilong and Peng, Bingyue and Luo, Ping and Yuan, Zehuan. Autoregressive Model Beats Diffusion: Llama for Scalable Image Generation. arXiv:2406.06525

Reviewer K39P2024-08-14

I am thankful to the authors for elaborated responses to my pesky inquiries. In terms of writing, my main concern not the absence of some metrics or experiments, but the high-level exposition: I had difficulties figuring out the logical transitions and relating theoretical claims to the main text. As to CFG, I apologize for requesting the results with it, since I realized that it is less common for autoregressive models (i no longer have the concern regarding CFG).

Authorsrebuttal2024-08-14

Thank you for your thoughtful feedback and for taking the time to engage with our work. We appreciate your acknowledgment of our detailed responses. We are committed to making improvements in clarity and coherence to enhance reader comprehension during the revision process.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC