Jointly Training Large Autoregressive Multimodal Models

Emanuele Aiello, Lili Yu, Yixin Nie, Armen Aghajanyan, Barlas Oguz

TL;DR

The Joint Autoregressive Mixture (JAM) framework introduces a modular approach to seamlessly fuse pretrained text-only language models with text-to-image autoregressive models. By utilizing a novel bi-directional cross-attention mechanism and data-efficient instruction tuning, the resulting model, JAM-Cross, can generate high-quality, interleaved text and image outputs without degrading the original capabilities of its parent models.

What Problem Does This Paper Address?

While large language models (LLMs) excel at text generation and text-to-image models produce stunning visuals, integrating both modalities into a single model that can coherently generate interleaved text and images remains a significant challenge. Most existing multimodal models are asymmetric—they either focus heavily on visual understanding (processing images to generate text) or generate only one modality at a time.

The authors address this gap by investigating how to deeply fuse two distinct, specialized, decoder-only autoregressive models (one text-only LLM and one text-to-image model) into a unified architecture. They aim to do this efficiently, using less than 1% of the original pretraining data, while avoiding the performance degradation that typically occurs during model merging.

Methods

The authors explore three distinct model fusion strategies under the JAM framework:

  1. JAM-Uniform (Model Merging): A straightforward approach that averages the weights of the LLM and the text-to-image model ($\theta_{average} = \frac{1}{2}\theta_{llm} + \frac{1}{2}\theta_{img}$).
  2. JAM-Width (Width Concatenation): This approach creates a wider architecture by doubling the hidden dimension (from 4096 to 8192) and concatenating the attention weights and feed-forward network (FFN) parameters of both models.
  3. JAM-Cross (Cross Model Fusion): The most sophisticated approach, which embeds bi-directional cross-attention layers between the foundational models. This allows the layers of the LLM to attend to the corresponding layers of the image model and vice versa, facilitating a progressive exchange of information across different representation levels.
Figure 2: JAM-Cross, architecture overview. The cross-attention blocks are interleaved between the original LLM block and the Text-Image blocks, and the output embedding between the two branches are concatenated and then projected to the output embedding dimension.

Following the initial alignment phase (continued pretraining on 50B tokens), the authors apply Multimodal Conversational Instruction Tuning. They use a mixed-modal dataset to teach the model to follow text instructions with contextually relevant, interleaved images, utilizing a multimodal retrieval-augmented strategy to boost image quality.

Datasets

The framework was trained and evaluated using a mix of text, image-caption, and interleaved datasets:

  • Shutterstock: 30B tokens of image-caption pairs used during the continued pretraining phase.
  • Text Corpora: 30B text tokens sampled from CommonCrawl, C4, Wikipedia, Books3, and arXiv.
  • LIMA: A 1k dataset of highly curated text prompts and responses for instruction tuning.
  • wikiHow: A custom-curated interleaved dataset of 3,000 articles with balanced categories and high community ratings, restricted to a maximum of 3 images per sample to fit the 4096 context length.
  • Evaluation Benchmarks: Common sense reasoning tasks (PIQA, ARC, StoryCloze, Winograd, Winogrande) for text evaluation, and the MS-COCO validation set for image-text perplexity (PPL).

Key Insights and Ideas

  • The Multimodal Superficial Alignment Hypothesis: The authors show that LIMA's "Superficial Alignment Hypothesis"—the idea that a model learns its formatting and interaction style from a tiny fraction of curated data—extends to multimodal generation. Training on just 3,000 wikiHow articles successfully taught the model how to interleave text and images coherently.
  • Synergistic Fusion: Deeply fusing models via cross-attention (JAM-Cross) doesn't just preserve capabilities; it actually improves them. JAM-Cross achieved a lower image-text perplexity than its standalone text-to-image parent model, suggesting that the addition of advanced textual capabilities directly benefits image generation context.
  • Retrieval Augmentation as a Quality Preserver: Incorporating retrieval-augmented data during the instruction-tuning phase proved essential for maintaining high-quality image generation.

Key Results

  • Text Modality: On zero-shot common sense reasoning tasks, JAM-Cross (19B parameters) significantly outperformed the other fusion variants, scoring 75.4 on PIQA and 81.0 on Winograd, closely approaching the performance of the original standalone LLM backbone.
  • Image-Text Modality: JAM-Cross achieved an MS-COCO perplexity of 147.6, outperforming its foundational 7B text-to-image model, CM3leon, which scored 149.0. In comparison, the simpler JAM-Uniform and JAM-Width baselines lagged behind at 177.5 and 159.5, respectively.
  • Qualitative Performance: Compared to previous state-of-the-art interleaved generation models like GILL, JAM-Cross generated more complete, exhaustive text answers and contextually precise images.
Qualitative Comparison between JAM-Cross and GILL

Limitations and Future Work

Despite its success, the authors note several limitations:

  • Architectural Constraints: The study was restricted to fusing 7B parameter parent models that shared identical underlying transformer architectures.
  • Context Length Bottleneck: Because each generated image consumes 1024 tokens, the model's 4k token context window makes generating long-form documents with more than two or three images highly challenging.
  • Abstract Concepts: The model struggles to generate meaningful images for abstract topics like "time travel", "music", or "research", occasionally failing to faithfully enrich the text context.
JAM-Cross Failure Cases on Abstract Concepts

Future directions include scaling up the model sizes, exploring asymmetric cross-fusion to bridge models of different sizes, expanding the context length, and extending the framework to handle multi-turn conversational settings.

Summary updated

BibTeX
@inproceedings{aiello2024jointly,
  author = {Emanuele Aiello and Lili Yu and Yixin Nie and Armen Aghajanyan and Barlas Oguz},
  title = {{Jointly Training Large Autoregressive Multimodal Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=5jcav5RcKw},
}
Figure