Harmonizing visual representations for unified multimodal understanding and generation

Size Wu, Wenwei Zhang, Lumin Xu, Sheng Jin, Zhonghua Wu, Qingyi Tao, Wentao Liu, Wei Li, Chen Change Loy

TL;DR

This paper introduces "Harmon," a novel unified framework that uses a single, shared visual encoder to excel at both generating images from text and understanding image content through questions. By leveraging masked autoregressive (MAR) modeling, Harmon achieves state-of-the-art image generation while matching dedicated models on understanding tasks, demonstrating the power of a unified representation.

What Problem Does This Paper Address?

The core challenge in multimodal AI is creating a single system that can both understand images (e.g., answer questions about them) and generate images (e.g., create an image from a description). These two tasks are fundamentally different: understanding requires high-level semantic reasoning, while generation needs fine-grained visual details. Existing unified models often use encoders like VQ-VAEs, which are optimized for image reconstruction and tend to prioritize low-level features over semantics, leading to weaker understanding capabilities. This paper aims to bridge this gap by developing a unified framework that can effectively capture both semantic and fine-grained visual information for both tasks.

Methods

Harmon is built around a Masked Autoregressive (MAR) encoder, inspired by masked image modeling (MIM) techniques. The key idea is that MAR, originally developed for image generation, inherently learns rich semantic representations through its mask-and-reconstruct pre-training. The authors hypothesize that this MAR encoder can serve as a powerful shared component for both understanding and generation.

The framework consists of:

  • A Shared MAR Encoder: This encoder processes visual input and produces representations that are then used for both downstream tasks.
  • An LLM (Large Language Model): This component handles text processing and reasoning.
  • A MAR Decoder: Used for image generation.

Harmon employs a three-stage training procedure to progressively optimize the shared encoder for both understanding and generation. This staged approach allows for gradual alignment and enhancement of capabilities.

Datasets

The paper utilizes a variety of datasets for training and evaluation:

  • Training:
    • ImageNet1K: Used for class-conditional generation.
  • 22M images with dense captions: For knowledge-rich training of the MAR encoder.
  • Infinity-MM (20M samples) and 5M dense caption samples: For multimodal understanding.
  • 50M images from public datasets: For text-to-image generation.
  • LLaVA-One-Vision data: For high-quality multimodal question-answering fine-tuning.
  • 6M synthetic images: To enhance visual quality.
  • Evaluation Benchmarks:
    • Text-to-Image Generation: GenEval, MJHQ30K, and WISE.
  • Image Understanding: POPE, MME, MMB, SEED, GQA, and MMMU.

Key Insights and Ideas

  • MAR Encoder's Dual Potential: The core insight is that MAR models, typically used for generation, possess strong semantic understanding capabilities due to their mask-and-reconstruct pre-training. This makes them ideal candidates for a unified visual encoder.
  • Unified Representation for Synergy: By using a single MAR encoder for both tasks, Harmon fosters a synergistic relationship. The paper demonstrates that co-training with understanding tasks can actually improve image generation performance.
  • Progressive Training is Crucial: The three-stage training strategy is vital for harmonizing the capabilities of the shared encoder, moving from basic alignment to comprehensive multimodal training and finally high-quality fine-tuning.
  • Beyond VQ-VAEs: The work highlights the limitations of VQ-VAEs in capturing high-level semantics for understanding tasks, positioning MAR as a superior alternative for unified frameworks.

Key Results

  • State-of-the-Art Generation: Harmon achieves state-of-the-art results on text-to-image generation benchmarks like GenEval and MJHQ30K.
  • Competitive Understanding: On image understanding benchmarks, Harmon matches the performance of models that use dedicated semantic encoders (like Janus), outperforming other unified models that rely on VQ/VAE encoders.
  • Qualitative Improvements: Harmon generates images with better consistency to prompts and higher visual quality compared to other unified models. For example, it accurately generates specific objects like "pink stop signs" and handles complex scenes better.
  • Synergistic Gains: The study shows that unified training with understanding tasks improves generation performance, particularly on controllability metrics.

Limitations and Future Work

  • Model Scale: The paper focuses on models with LLM scales under 2B parameters for comparison, suggesting that larger models might yield further improvements.
  • Training Stages Impact: While all stages contribute, the paper notes that Stage III (high-quality fine-tuning) significantly boosts generation quality, implying that further refinement with high-quality data could be beneficial.
  • Resolution Impact: Increasing image resolution in Stage III improves both understanding and generation, suggesting that exploring even higher resolutions could be a future direction.
  • Future Work: The authors suggest that the synergistic effect observed in Harmon, where understanding tasks boost generation, warrants further investigation. They also implicitly point towards exploring larger MAR models and more advanced training strategies.

Summary updated

BibTeX
@inproceedings{wu2025harmonizing,
  author = {Size Wu and Wenwei Zhang and Lumin Xu and Sheng Jin and Zhonghua Wu and Qingyi Tao and Wentao Liu and Wei Li and Chen Change Loy},
  title = {{Harmonizing visual representations for unified multimodal understanding and generation}},
  booktitle = {ICCV},
  year = {2025},
  url = {https://openreview.net/forum?id=pSNv9PHya1},
}
Figure