[Paper Review] Generating Images with Multimodal Language Models
GILL fuses a frozen text-only LLM with a pretrained image encoder/decoder via a mapping network to process interleaved image-text inputs, enabling text generation, image retrieval, and novel image generation in multimodal dialogue.
We propose a method to fuse frozen text-only large language models (LLMs) with pre-trained image encoder and decoder models, by mapping between their embedding spaces. Our model demonstrates a wide suite of multimodal capabilities: image retrieval, novel image generation, and multimodal dialogue. Ours is the first approach capable of conditioning on arbitrarily interleaved image and text inputs to generate coherent image (and text) outputs. To achieve strong performance on image generation, we propose an efficient mapping network to ground the LLM to an off-the-shelf text-to-image generation model. This mapping network translates hidden representations of text into the embedding space of the visual models, enabling us to leverage the strong text representations of the LLM for visual outputs. Our approach outperforms baseline generation models on tasks with longer and more complex language. In addition to novel image generation, our model is also capable of image retrieval from a prespecified dataset, and decides whether to retrieve or generate at inference time. This is done with a learnt decision module which conditions on the hidden representations of the LLM. Our model exhibits a wider range of capabilities compared to prior multimodal language models. It can process image-and-text inputs, and produce retrieved images, generated images, and generated text -- outperforming non-LLM based generation models across several text-to-image tasks that measure context dependence.
Motivation & Objective
- Leverage frozen text-only LLMs for multimodal tasks without retraining the LLM.
- Map LLM embeddings to a pretrained image generator to synthesize novel images.
- Enable processing of arbitrarily interleaved image and text inputs for coherent multimodal outputs.
- Develop a decision mechanism to choose between image retrieval and generation at inference.
- Demonstrate improved performance on long-form language contexts and multimodal dialogue.
Proposed method
- Introduce GILL: a framework that keeps the LLM and image generator frozen and tunes a small set of adapters and mappings.
- Learn a captioning mapping W_cap to project image features into the LLM's embedding space for caption generation.
- Add multiple [IMG] tokens with an embedding matrix E_img to represent visual outputs in the LLM.
- Develop GILLMapper, a lightweight Transformer that distills the LLM's [IMG] outputs into the input space of the image generator (Stable Diffusion).
- Train a retrieval pathway with linear projections W_t2i and W_i2t using InfoNCE loss to align images and captions.
- Train a decision model to choose between retrieval and generation based on LLM hidden states (trained after other components converge).
- Optimize a joint multitask loss combining captioning, image token prediction, generation, and retrieval losses (l_c, l_p, l_g, l_r).
- Use CC3M for training with two-example packing; backbone LLM is OPT-6.7B; visual backbone is CLIP ViT-L; generation backbone is Stable Diffusion v1.5; 50M trainable parameters; two GPUs; 2 days.
Experimental results
Research questions
- RQ1Can a frozen text-only LLM be effectively grounded to an image generator to produce novel images conditioned on interleaved image-text prompts?
- RQ2Is it possible to retrieve or generate images and interleave them with text outputs in coherent multimodal dialogue using a minimal set of trainable components?
- RQ3Does grounding through GILLMapper improve image generation in long-context or multimodal scenarios compared to standard text-to-image models?
- RQ4How does contextual multimodal input affect image retrieval versus generation decisions?
Key findings
- GILL enables generation of text, retrieval of images, and generation of novel images conditioned on interleaved image-text inputs.
- On VIST, with longer multimodal context, GILL outperforms Stable Diffusion in CLIP similarity and LPIPS, especially when full multimodal context is provided.
- On VisDial, GILL improves image generation quality as dialogue rounds increase, outperforming text-only baselines at longer contexts.
- GILLMapper substantially outperforms baselines (linear/MLP/4-layer encoder) in mapping LLM embeddings to the image generator input space, achieving better FID and CLIP-based metrics.
- Retrieval vs generation decision model can be learned post-training and yields competitive retrieval performance while enabling generation when appropriate.
- Using r = 4 [IMG] tokens provides a balance between generation quality and efficiency; increasing r improves performance up to a plateau.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.