Where a vision-language model starts putting words to what it sees

Take one patch of a photograph, read it out as vocabulary, and the words you get fire on the right pixels. Inside Gemma 3 27B that works best early, in the first stretch of the language model, not near the answer.

When you show a photograph to a vision-language model, the picture does not arrive as a picture. A vision encoder cuts it into a grid of small squares, called patches, and turns each patch into a long list of numbers. A component called the projector rewrites those lists into the form the language model accepts, and from there they travel through the language model next to your words until an answer comes out.

Somewhere on that path, the fact that a patch shows part of a pizza has to become something the language half of the model can work with. The work behind this page asked where, and how literally. It took one patch's activity at a given point inside Gemma 3 27B, pushed it through a fitted linear map into the space the model uses at the very end when it chooses a word, and read off which vocabulary items score highest for that patch. Then it checked whether the patches a given word fires on are the patches a human would have labelled with that thing.

They often do. Across 133 everyday concepts and 27 points through the model, 1,259 of the 3,591 frozen readouts overlap the labelled region enough to count, on 5,000 held-out photographs they were never fitted on. And the ability rises and falls with depth in a specific way: it climbs through the vision encoder, jumps at the projector, peaks in the early language layers, and fades well before the model produces its answer.

Where each concept becomes readable. Pick a concept and follow it through the model, left to right, in the order a photograph passes through: 27 measurement sites from the tenth vision block to the deepest language layer sampled. The teal line is the held-out overlap of the best readout at each site; the ring marks the concept's best site. Gold diamonds show the comparison method, plain vocabulary decoding, at the three late layers where it was also fitted. Hover or use the arrow keys to see the vocabulary item chosen at each site. The vertical scale is the same for every concept, so weak concepts genuinely look flat.

What is being measured

The readout works because the model's own last step is simple: at the end, a vector in the model's internal space is compared against every item in its vocabulary, and the best-matching items are the candidates for the next word. If you can move a patch's activation from somewhere in the middle of the model into that final space, you can ask the same question of the patch. The fitted linear map that does the moving is called a transport here; it is estimated once, per site, and then held fixed.

Turning that into a test needs labelled pictures. The evaluation uses COCO Panoptic, a set of photographs in which every pixel is labelled with what it belongs to, and 133 of its concepts: people, pizza, zebra, sea, snow, vase, and so on. For each concept and each of the 27 sites, a search over a fitting set of photographs picks the one vocabulary item and one score threshold whose fired patches best cover that concept's labelled pixels. The search may not prefer the concept's own name; any item in the vocabulary can win, and the winner is whichever scores best. The fitting photographs and the held-out photographs come from different halves of COCO, its training and validation splits.

The winning item and threshold are then frozen and scored on all 5,000 held-out photographs, as overlap: of all the pixels that are either labelled as the concept or fired on by the readout, the share where both agree. Overlap of 1 would be a perfect segmentation; overlap near 0 means the two have almost nothing in common. That gives 133 concepts × 27 sites = 3,591 frozen detectors, each with one honest held-out number.

The ability peaks early in the language model

1,259 of the 3,591 detectors clear the 0.04 bar, covering 119 of the 133 concepts; 14 concepts never get there at any site. Taking each concept's best site, the mean overlap is 0.1414 and the median 0.1169. The strongest single detector is sea at language layer 4, at 0.4406 overlap.

The shape with depth is the point. At vision block 10, 13 detectors clear the bar and the average overlap over all candidates is 0.01889. By the last vision blocks it is 43 detectors at block 24 and 43 at block 26. The projector, which exists only to hand patches to the language model, jumps to 65 detectors and 0.06493 average overlap. The peak is 93 detectors at both language layer 12 and language layer 16, with average overlap 0.10911 at layer 12, roughly six times the vision-block-10 figure. From there it falls away, down to 14 detectors at language layer 57, the deepest layer sampled.

vision encoderprojectorlanguage model0255075100detectors above the 0.04 bar00.040.080.12mean overlapv10v18v26projL4L12L21L33L45L57
Detectors and average overlap at each site. Top: how many of the 133 concepts have a readout above the 0.04 overlap bar at that site. Bottom: the mean held-out overlap over every concept's best candidate at that site, including the weak ones. Both peak in the early language layers, after a step up at the projector. Site labels are abbreviated: v10 is vision block 10, L12 is language layer 12.

Image content is most word-like not where the vision encoder finishes and not where the model speaks, but a short way into the language model, once the patches have been rewritten into language-model form and mixed for a few layers.

What it looks like on real photographs

Aggregate overlap hides how a readout succeeds or fails, so here are individual held-out photographs with the readout's fired region drawn against the human labels.

both agreelabelled, missedfired, not labelledneither

The transport earns its keep early, not late

There is a simpler thing to try. At a late layer the model is nearly finished, so you can skip the fitted transport and compare the patch's activation against the vocabulary directly, the same way the model picks its next word. That comparison was run at three late language layers, 49, 53 and 57, with the same search, the same fitting set and the same held-out scoring.

At those three layers, plain decoding is the better method, and clearly so: it has higher overlap in 361 of the 399 concept-and-layer comparisons, by 0.0438 overlap on average. But allowing each method its own best site tells the opposite story, because the transport can use sites plain decoding cannot reach: the transport wins 102 concepts to 31, by 0.0546 overlap on average and 0.0358 at the median, against a best-per-concept mean of 0.0868 for plain decoding.

Those two results are the same fact seen twice. Late in the model, where the residual stream is already close to vocabulary space, the fitted map is an unnecessary detour. Its value is that it reads patches early, where the direct comparison has nothing to say. Pizza makes the contrast concrete: 0.4108 overlap at language layer 12 against 0.1109 for plain decoding at its own best late layer, and zebra is readable at the projector at 0.3834, before the language model has seen it at all.

The words the search picked are not always the concepts' names

Because the search was free to choose any vocabulary item, what it chose is itself a result. Sometimes it picks the obvious word, sometimes an emoji, sometimes an ingredient or a texture rather than the object.

ConceptRead atVocabulary item pickedHeld-out overlap
sealanguage layer 4🌊0.4406
pizzalanguage layer 12 mozzarella0.4108
zebraprojector striped0.3834
orangelanguage layer 4 tangerine0.3635
elephantlanguage layer 16🐘0.3547
snowlanguage layer 12 Snow0.3431
bananalanguage layer 16🍌0.3430
tree-mergedlanguage layer 8 Tree0.3358

The concept names are COCO's own, including merged classes such as tree-merged. Zebra is read as a stripe, pizza as an ingredient, sea and elephant and banana as emoji. The readout is not looking up a label; it is finding whichever piece of the model's vocabulary happens to point in the same direction as those patches.

The failures are just as informative. These readouts did fit their fitting set, then did not survive the held-out photographs.

ConceptRead atVocabulary item pickedHeld outFitting set
blanketlanguage layer 16 Blanket0.03950.1021
towellanguage layer 16Laundry0.03860.0869
kitelanguage layer 29 triangle0.03410.0866
appleprojectorPear0.02300.0916
traffic lightlanguage layer 12 GFP0.01090.0631
vaselanguage layer 12 antiqu0.00560.0670
fruitlanguage layer 0 Coconut0.00280.0508
frisbeevision block 20 blanchâtre0.00280.0604

Apple is read as Pear, vase as a fragment of antique, traffic light as GFP (a green fluorescent protein), frisbee as a French word for whitish. Each one lost most of its overlap between the fitting set and held-out data, which is what picking a single item and threshold out of a very large vocabulary does when the underlying signal is weak.

What this shows, and what it does not

The finding is a claim about where information sits and how legible it is, not a claim about how Gemma works when it answers you.

What survives all of that is the shape of the curve. Every concept in the explorer above is scored on held-out photographs with a detector frozen beforehand, and the 1,259 that clear the bar are concentrated at the projector and the first stretch of the language model. If you want to find where a vision-language model has turned a picture into something word-shaped, that is where to look, and it is not where the model is about to speak.