Generating Images with Multimodal Language Models

Jing Yu Koh, Daniel Fried, Ruslan Salakhutdinov

This paper introduces GILL (Generating Images with Large Language Models), a method to bridge the gap between frozen, text-only Large Language Models (LLMs) and pre-trained image generation models. By learning an efficient mapping between their embedding spaces, GILL creates a unified system capable of processing interleaved text and images to produce text, retrieved images, or entirely new generated images.

TL;DR

GILL fuses frozen LLMs with pre-trained image encoders and decoders using a lightweight mapping network, enabling the first model to generate coherent text and images from arbitrarily interleaved multimodal inputs. It leverages the LLM's superior context handling to outperform standard text-to-image models on complex, long-form dialogue and storytelling tasks.

What Problem Does This Paper Address?

While LLMs are masters of text, they are traditionally "blind." Conversely, text-to-image (T2I) models like Stable Diffusion create stunning visuals but often struggle with long, complex, or conversational context. Furthermore, most existing multimodal models focus on understanding (image-to-text) or retrieval (finding an existing image), rather than generation (creating a new one).

The authors tackle the challenge of creating a model that can:

  1. Process interleaved sequences of images and text.
  2. Decide whether to retrieve an existing image or generate a new one.
  3. Maintain coherence over long multimodal dialogues where standard T2I models typically lose the thread.

Methods

GILL keeps the heavy hitters—the LLM (OPT-6.7B), the image generator (Stable Diffusion), and the visual encoder (CLIP)—entirely frozen. The magic happens in the learned "connective tissue":

  • GILLMapper: This is the core innovation. It’s a lightweight 4-layer Transformer that translates the LLM's hidden representations into the embedding space used by the Stable Diffusion text encoder. Instead of training the whole diffusion pipeline, GILL uses distillation: it minimizes the distance between GILLMapper’s output and the frozen SD text encoder's output.
  • Special Tokens: The authors add special [IMG] tokens to the LLM's vocabulary. When the LLM "decides" to output these tokens, their hidden states are passed to GILLMapper to trigger image generation or retrieval.
  • Decision Module: A small linear classifier determines at inference time whether to retrieve a real image (better for common objects) or generate a new one (better for novel/complex prompts).
  • Efficiency: By keeping the base models frozen, GILL only trains 50M parameters (out of ~8B total), making it remarkably efficient to train on modest hardware (2 GPUs for 2 days).
The GILL architecture learns to map between frozen LLM and visual model spaces.

Datasets

  • Training: Conceptual Captions (CC3M), consisting of 3.3M image-text pairs.
  • Evaluation:
    • VIST (Visual Storytelling): Sequential vision-and-language tasks.
  • VisDial (Visual Dialogue): Multi-round Q&A about images.
  • PartiPrompts (P2): Used for benchmarking the retrieval vs. generation decision, including a new set of human annotations introduced by the authors.
  • MS-COCO & VQAv2: Standard benchmarks for captioning and visual Q&A.

Key Insights and Ideas

  • LLMs as Contextual Backbones: The LLM isn't just a text generator; it acts as a powerful "context manager." It can track entities and themes across a long conversation better than the CLIP-based encoders used in standard T2I models.
  • Distillation is Sufficient: You don't need to run a full diffusion model during training to learn how to generate images. Mapping to the input space of a frozen generator is a highly effective shortcut.
  • The Power of Interleaving: Real-world interaction is rarely just "one prompt, one image." GILL’s ability to handle sequences like [Text] -> [Image] -> [Text] -> [Generated Image] opens doors for more natural AI assistants.
Figure 1: Our model is capable of generating text, retrieving images, generating novel images, and interleaving results into coherent multimodal dialogue.

Key Results

  • Contextual Superiority: On the VIST dataset, GILL achieved a CLIP Similarity of 0.641 when given full multimodal context, significantly higher than Stable Diffusion's 0.598.
  • Dialogue Resilience: In Visual Dialogue (VisDial), GILL’s performance steadily improved as more dialogue rounds were added, whereas Stable Diffusion’s performance plateaued after 6 rounds.
  • Retrieval vs. Generation: GILL outperformed the retrieval-only model FROMAGe on contextual retrieval tasks, while also providing the flexibility to generate when the retrieval set fell short.

Limitations and Future Work

  • Inherited Flaws: GILL inherits typical LLM issues, such as hallucinations and occasional text repetitions.
  • Visual Bottleneck: The model currently uses only 4 visual tokens to represent an input image, which may not capture fine-grained details.
  • Dataset Scale: The model was trained on CC3M, which is small by modern standards. Training on larger, higher-quality interleaved datasets would likely yield even better alignment.
  • Future Directions: The authors suggest scaling the LLM backbone and exploring more sophisticated visual mappings to capture a richer set of features.

Summary updated

BibTeX
@inproceedings{koh2023generating,
  author = {Jing Yu Koh and Daniel Fried and Ruslan Salakhutdinov},
  title = {{Generating Images with Multimodal Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Uczck6TlSZ},
}
Figure