TL;DR
LLaVA (Large Language and Vision Assistant) is a model that can look at a picture and answer questions about it the way a chat assistant answers text questions. It takes a CLIP image encoder, connects it to the Vicuna language model through one trainable linear layer, and trains the combined system on image-grounded conversations. The conversations were written by a text-only GPT-4 from image captions and object boxes, so no human had to write them.
Where you'll see it: in the design of open vision-language assistants that accept an image in a chat window, and as the starting point for connecting a pretrained image encoder to a chat language model with a small connector.
The problem
Before this paper, two kinds of system existed. Large language models such as ChatGPT followed instructions well, but only in text. Vision models were built for one task at a time: a classifier classifies, a detector detects, and the task is fixed by the model's design rather than by a request. Multimodal models like Flamingo and BLIP-2 could take images, but the authors report that BLIP-2 and OpenFlamingo "focus on describing the image, instead of following the user instruction" (their Section 5.1 comparison).
The obstacle was data. Instruction tuning for language models works because there are many thousands of examples of instruction and good answer. For images, the public data is mostly image-caption pairs, such as CC3M (which the paper filters) and LAION. A caption says what is in a picture. It does not say how to answer "what is unusual about this image?" The paper calls the creation of multimodal instruction-following data "time-consuming and less well-defined" when humans do it.
Key idea
Use a text-only GPT-4 as the annotator. A text model cannot see a picture, so the authors describe the picture to it in a form it can read: a few captions, plus a list of object categories with their bounding boxes and locations. Given that text, GPT-4 writes a question and an answer that a viewer of the picture would recognise as correct. Three kinds of data come out of this loop: conversations about the image, detailed descriptions, and questions that need step-by-step reasoning.
Then train the model on those triples with the image attached as input. The architecture is deliberately plain. The image becomes a short sequence of vectors in the language model's embedding space, and the language model simply continues the text. Because the visual part is one linear layer, the authors could iterate on the data quickly, which the paper says was the point of the simple design.
The method
Data
The seed is COCO images. For each image, the pipeline gives GPT-4 the caption and boxes, plus a few hand-written in-context examples (the only human annotation). The paper collects 158K samples: 58K conversations, 23K detailed descriptions and 77K complex-reasoning items. The paper reports that GPT-4 gave higher-quality data than ChatGPT in its early experiments, especially on spatial reasoning.
Architecture
The model has three parts, shown in the diagram below.
flowchart LR I[Image X_v] --> E[CLIP ViT-L/14 encoder<br/>frozen] E -->|grid features Z_v| P[Linear projection W<br/>trainable] P -->|visual tokens H_v| S[Sequence] T[Instruction text X_instruct] --> S S --> L[Vicuna language model<br/>trainable in stage 2] L --> A[Answer X_a]
The image encoder is CLIP's ViT-L/14 (see Learning Transferable Visual Models From Natural Language Supervision (CLIP)). Its grid features are mapped by a single matrix, written , into the language model's word-embedding size:
Here is the frozen CLIP encoder, is the grid of image features, and is the sequence of visual tokens that the language model reads as if they were words. The paper notes that more elaborate connectors exist (gated cross-attention in Flamingo, the Q-Former in BLIP-2) and leaves them to future work. The language model is Vicuna, which the authors chose because it had the best instruction following among the public checkpoints they considered.
Training objective
A multi-turn conversation is written as one sequence. The image is placed before or after the first question at random, which the paper says makes the model robust to order. Every answer is treated as an assistant response. The probability of the answer tokens given the image and the instruction is
where is a token of the answer, holds the trainable parameters, and means "all tokens before position ". The training loss is the usual next-token cross-entropy, applied only to the answer tokens. The image is never predicted, only conditioned on.
Training happens in two stages.
Stage 1, feature alignment. The authors filter CC3M to about 595K image-caption pairs, using noun-phrase frequency to keep rare concepts. Each caption becomes a single-turn example in which a short "describe the image briefly" question is paired with the original caption. Only is trained; both the CLIP encoder and the language model are frozen. The paper describes this stage as training "a compatible visual tokenizer for the frozen LLM."
Stage 2, end-to-end fine-tuning. The CLIP encoder stays frozen. and the language model are trained on the 158K instruction data, with the chatbot and ScienceQA variants fine-tuned separately.
Worked example: how many optimiser steps
The paper gives batch sizes and epoch counts, so you can count the steps. These are my arithmetic on its numbers, not figures the paper reports.
- Stage 1: 595,000 pairs at batch size 128 gives steps for one epoch.
- Stage 2: 158,000 samples at batch size 32 gives steps per epoch, so about 4,938 per epoch.
- Three epochs of stage 2 gives steps.
Stage 1 therefore takes about a third as many steps as stage 2, but each step updates far fewer parameters.
Results
Multimodal chatbot. On LLaVA-Bench (COCO), the authors take 30 COCO-val images and write 90 questions (three types per image). A GPT-4 judge compares the candidate's answer with a text-only GPT-4 answer that sees the ground-truth captions and boxes, and scores both. The full-data model scores 85.1 relative points, against 21.5 for the same architecture with no instruction tuning. Training on conversation data alone scores 73.8 overall (−11.3 from the full mix), which shows that the detailed-description and reasoning data add to the score.
On the harder LLaVA-Bench (In-the-Wild), with 24 images and 60 questions, LLaVA scores 67.3 ± 2.0 overall and 81.7 on complex reasoning. BLIP-2 scores 38.1 and OpenFlamingo 19.1. The paper describes the gap to BLIP-2 as "+29%"; the difference is 29.2 points on this scale, so that is what the number means here.
ScienceQA. ScienceQA has about 21K multiple-choice questions, split 12,726 / 4,241 / 4,241 for train, validation and test. LLaVA alone reaches 90.92% accuracy, close to the previous best of 91.68% (MM-CoT Large). A text-only GPT-4 with two-shot prompting reaches 82.69%, which the authors compare against GPT-3.5's 75.17%. The best result, 92.53%, comes from using GPT-4 as a judge: when LLaVA and text-only GPT-4 disagree, GPT-4 sees both answers and picks a final one. That is 0.85 points above MM-CoT Large.
Ablations on ScienceQA.
| Change | Accuracy | Difference from 90.92 |
|---|---|---|
| Last-layer CLIP features | 89.96 | −0.96 |
| 7B model instead of 13B | 89.84 | −1.08 |
| No pre-training stage, train on ScienceQA only | 85.81 | −5.11 |
The authors conclude that the pre-training stage matters most of these, and that reasoning-first versus answer-first changes convergence speed more than final accuracy.
Failures. The paper is candid about them. On the In-the-Wild set LLaVA says yes when asked whether strawberry yogurt is in a fridge that holds only yogurt and strawberries. The authors describe this as the model sometimes seeing the image as "a bag of patches".
Why it mattered
The paper's own claim is modest: it is "an initial step in visual instruction tuning". Its concrete contributions are the data pipeline that turns image-caption pairs into instruction data with a text-only model, the demonstration that a linear connector plus that data gives a model that follows visual instructions, and the release of the data, code, and a LLaVA-Bench evaluation. The authors released the data, code and demo, and their conclusion is that the work should "inspire future research on building more capable multimodal models". Nothing here goes beyond what the paper reports.
Reading guide
Read the paper in this order and use these lessons when a section leans on an idea you have not met:
- Introduction (Section 1): Training Language Models to Follow Instructions with Human Feedback for instruction tuning of language models, and Vision-Language Model for what a multimodal model is.
- Related work (Section 2): Visual Instruction Tuning for how the idea is borrowed from text, and LLaMA: Open and Efficient Foundation Language Models for the open language model the paper builds on.
- GPT-assisted data (Section 3): Visual Instruction Tuning for the instruction-following format the data is written in.
- Architecture (Section 4.1): Learning Transferable Visual Models From Natural Language Supervision (CLIP) for the image encoder, and Vision-Language Model for the shared-space idea behind the projection.
- Training (Section 4.2): Visual Instruction Tuning again for the loss, which is ordinary next-token prediction on answer tokens.
- Experiments (Section 5): no new prerequisites beyond the above. The scoring is a GPT-4 judge, and the ScienceQA numbers are accuracies on a fixed split.