MAGE: MAsked Generative Encoder to Unify Representation Learning and Image Synthesis
Tianhong Li, Huiwen Chang, Shlok Kumar Mishra, Han Zhang, Dina Katabi, Dilip Krishnan
Abstract
Generative modeling and representation learning are two key tasks in computer vision. However, these models are typically trained independently, which ignores the potential for each task to help the other, and leads to training and model maintenance overheads. In this work, we propose MAsked Generative Encoder (MAGE), the first framework to unify SOTA image generation and self-supervised representation learning. Our key insight is that using variable masking ratios in masked image modeling pre-training can allow generative training (very high masking ratio) and representation learning (lower masking ratio) under the same training framework. Inspired by previous generative models, MAGE uses semantic tokens learned by a vector-quantized GAN at inputs and outputs, combining this with masking. We can further improve the representation by adding a contrastive loss to the encoder output. We extensively evaluate the generation and representation learning capabilities of MAGE. On ImageNet-1K, a single MAGE ViT-L model obtains 9.10 FID in the task of classunconditional image generation and 78.9% top-1 accuracy for linear probing, achieving state-of-the-art performance in both image generation and representation learning. Code is available at https://github.com/LTH14/mage.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 55bd5aed-6342-424a-b888-9e40a337f558Cited by top-tier papers26
- Autoregressive Image Generation without Vector QuantizationTianhong Li, Yonglong Tian, He Li, Mingyang Deng et al.NeurIPS 2024 · 758 citations
- 4M: Massively Multimodal Masked ModelingDavid Mizrahi, Roman Bachmann, Oguzhan Fatih Kar, Teresa Yeo et al.NeurIPS 2023 · 154 citations
- Machine Unlearning for Image-to-Image Generative ModelsGuihong Li, Hsiang Hsu, Chun-Fu Chen, Radu MarculescuICLR 2024 · 56 citations
- Reinforcement Learning with Maskable Stock Representation for Portfolio Management in Customizable Stock PoolsWentao Zhang, Yilei Zhao, Shuo Sun, Jie Ying et al.WWW 2024 · 18 citations
- Image Understanding Makes for A Good Tokenizer for Image GenerationLuting Wang, Yang Zhao, Zijian Zhang, Jiashi Feng et al.NeurIPS 2024 · 16 citations
Builds on29
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
Related papers
- MergeVQ: A Unified Framework for Visual Generation and Representation with Disentangled Token Merging and QuantizationSiyuan Li, Luyuan Zhang, Zedong Wang, Juanxi Tian et al.CVPR 2025
- Learning from Semantic Dictionaries: Discriminative Codebook Contrastive Learning for Unified Visual Representation and GenerationImanol G. Estepa, Jesús M. Rodríguez-de-Vera, Bhalaji Nagarajan, Petia RadevaCVPR 2026
- Vector-quantized Image Modeling with Improved VQGANJiahui Yu, Xin Li, Jing Yu Koh, Han Zhang et al.ICLR 2022 · 753 citations
- Harmonizing Visual Representations for Unified Multimodal Understanding and GenerationSize Wu, Wenwei Zhang, Lumin Xu, Sheng Jin et al.ICCV 2025 · 3 citations
- Masked Auto-Encoders Meet Generative Adversarial Networks and BeyondZhengcong Fei, Mingyuan Fan, Li Zhu, Junshi Huang et al.CVPR 2023
