Compare projection-adapter, cross-attention, and early-fusion as ways to combine vision and language
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A VLM has to merge vision-encoder features with a text LLM. Compare projection-adapter (LLaVA-style), cross-attention (Flamingo-style), and unified early fusion (Fuyu / native GPT-4o), and explain the tradeoff each one makes around sequence length, training cost, and capability.
Fusion trades off on one triangle: projection-adapter is cheap but spends context per image, cross-attention decouples image count at higher training cost, and early fusion mixes tightest but needs full joint training.
Imagine teaching a fluent storyteller to also use pictures. The quick way: turn each picture into a paragraph of words and slip it into the story — easy, but long pictures make the story balloon. The flexible way: leave the story untouched and let the storyteller peek at a gallery on the wall whenever needed — you can hang any number of pictures without lengthening the story, but you have to train that peeking habit carefully. The deepest way: raise the storyteller from birth to think in pictures and words as one thing — the most natural blend, but you cannot reuse a storyteller who already learned words only. Choosing a fusion strategy means picking which of those costs you can afford.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Set up the comparison as one triangle: sequence-length cost, training cost, and depth of modality mixing. Walk projection-adapter (cheap training, context scales with images), cross-attention (decoupled context, harder training), and early fusion (tightest mixing, heaviest training, no reusable encoder). Quantify the projection context cost as image count times tokens per image, add the resampler lever, then map each strategy to the workload it fits.
| Axis | Projection-adapter (LLaVA) | Cross-attention (Flamingo) | Early fusion (Fuyu / GPT-4o) |
|---|---|---|---|
| Visual feature placement | Inside the token sequence | Outside, via inserted attention layers | One stream, no separate encoder |
| Sequence-length cost | Scales with image count and resolution | Decoupled from image count | Moderate, tightest mixing |
| Training cost | Low — MLP on frozen towers | Medium — added params, harder to train | High — joint training from scratch |
| Best fit | Single-image chat, cheap iteration | Many-image and interleaved inputs | Frontier native multimodal models |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Recommending a projection-adapter for a many-image product because it is cheap to train, ignoring that each image multiplies the context length until requests overflow the window.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.