A field guide · Vision-language models

When Language Must Point

A vision-language model can say what it sees. Grounding is how it shows where: as a point, a box, an outline or a mask, typed out as tokens or drawn by a decoder.

Visual groundingSegmentationVision-language models

Saying where, not only what

Show a vision-language model a bank statement and ask: “How much did I pay for electricity in March?” It answers “$84.20”. The answer may well be right. But you cannot tell which number on the page it read. It might have read the March row or the February row. It might have read the amount or the running balance. To check, you have to find the number yourself, and then the model has saved you nothing.

Now ask the model to show its evidence. A useful model highlights the one cell that holds $84.20. You glance at the highlight and see that it sits in the March row, under the Amount column. Checking now takes one second instead of one minute.

That second ability is called grounding. Grounding links a piece of language to a place in the image. The place can be a point, a box, an outline or an exact set of pixels. The language can be a noun (“the mug”), a referring expression (“the mug to the left of the laptop”), an answer, or one step of a longer argument.

This post is about one question. A vision-language model can say what it sees. How does it communicate where it sees it?

The question sounds narrow, but it is not. A language model produces a sequence of tokens. A location is geometry. Every grounding system therefore has to decide how geometry becomes tokens, or how tokens become geometry. That one decision reaches into the tokenizer, the loss, the decoder, the training data, the metrics and the reward. It also limits what kind of evidence the model can show at all. A rectangle cannot follow a curved line of text. A single point cannot cover a table row.

Earlier posts built the pieces we need. One Transformer, Two Modalities showed how an image becomes a sequence of tokens. Inside a Modern Vision Encoder showed how resolution and patch size decide what the model can see. How Models Know Where They Are showed how two-dimensional positions are encoded inside the model, for example with M-RoPE. Those posts move location into the model. Grounding is the other direction. It gets location back out, in a form a person or a program can check.

We will build the topic in order. First we place grounding on a ladder of vision tasks and list the task family. Then we compare four shapes an answer can take: point, box, polygon and mask. Next we look at how coordinates are written as tokens and what that costs. After that comes the main alternative, where the language model hands the location to a dedicated decoder such as SAM. Then come granularity, grounded reasoning, the uses of grounding, and how to measure it. A comparison of models and a short guide to choosing an interface close the post.

From recognising to localising

Vision tasks form a ladder. Each rung asks the model to commit to more about location. It helps to walk up the ladder with one picture and watch what the output gains at each step.

  1. Classification gives one label for the whole image, such as “office desk”. It says nothing about where anything is.
  2. Captioning writes a sentence. Objects now have names, but they still have no positions.
  3. Visual question answering (VQA) answers a question about the image. To answer “What colour is the mug on the left?” the model must find that mug inside its own computation. But the output is still only text, so nobody can see where it looked.
  4. Referring expression comprehension takes a phrase and returns the region it describes. For the first time the location is the output.
  5. Pointing and box grounding return that region as one point or one rectangle.
  6. Segmentation returns the exact pixels of the region.

The localisation ladder

Figure 1The same scene walked up the ladder. Below the referring step, location exists only inside the model. From the referring step upward, it is part of the output, so a reader can check it. Each rung also makes a sharper claim: a box claims an extent, and a mask claims every pixel.

The step from VQA to referring is the one that matters most. Below it, a location exists only as an internal state. Above it, the location is an output that a person, a program or a reward function can check. Everything in this post lives above that line.

Higher rungs do not replace lower ones. To draw a mask on “the mug left of the laptop” the model must still recognise mugs, laptops and the relation “left of”. Grounding adds a commitment. It does not add a new kind of understanding. That is why grounding is a basic multimodal ability and not a niche detection task. It is the part of perception that can be checked.

The family of grounding tasks

“Grounding” covers a family of tasks. They differ in three ways. The language can be the input or the output. There can be one target, many targets or none. The target can be a region in space, a span in time, or both. Here is the family, one task at a time.

Phrase grounding. The input is an image and a sentence. The output is a region for each noun phrase in the sentence. Flickr30k Entities is the standard dataset. It links phrases in Flickr30k captions to boxes in the images.

Referring expression comprehension (REC). The input is one expression that picks out one object, such as “the man in the red shirt on the right”. The output is that object’s box. ReferItGame started this line. RefCOCO, RefCOCO+ and RefCOCOg moved it onto COCO images. RefCOCO+ forbids location words, so the expression must use appearance. RefCOCOg has longer expressions.

Referring expression segmentation (RES). This is the same task with a mask as the output. Classic RES assumes that every expression matches exactly one object. GRES and its dataset gRefCOCO drop that assumption. Their expressions can match several objects, or no object at all.

Referring expression generation (REG). This is the inverse of REC. The input is a region and the output is text that describes it well enough to pick it out. Shikra and Ferret accept regions as input, so a user can point at something and ask about it. Ferret accepts free-form regions such as points, boxes and scribbles.

Grounded VQA and grounded captioning. The model writes an answer or a caption and attaches a region to the phrases it mentions. GLaMM calls the caption version grounded conversation generation. In it, every phrase in a multi-sentence reply gets its own mask.

Reasoning segmentation. The query names no object directly. LISA introduced this task with its ReasonSeg benchmark. A query might be “the part of the kitchen you would use to boil water”. The model has to reason its way to the kettle and then segment it.

Open-vocabulary detection. The input is one or more category names in free text. The output is a box for every instance of each category. MDETR, GLIP, OWL-ViT and Grounding DINO are the specialist models here. Unlike REC, the number of outputs is not known in advance.

Text grounding. Here the regions are pieces of text: characters, words or lines. Text spotting finds and reads text with its location. Region-specific OCR inverts it: “read what is written inside this box”. Kosmos-2.5 writes each text line of a page together with its box.

Document grounding. A question about a page is answered together with the regions that support the answer. The evidence is often a cell, a row, a paragraph, or several scattered places. BoundingDocs, DOGR-Bench and MMDocBench measure this. The next post, How VLMs Read Documents, covers document models in depth.

Chart-element grounding. The targets are parts of a chart: a bar, a pie wedge, a legend entry, an axis label. These shapes are often not rectangles, and they are tied to each other. A legend colour, for example, tells you which wedge to read.

GUI grounding. The input is a screenshot and an instruction such as “open the settings”. The output is a point to click. SeeClick introduced the ScreenSpot benchmark for this task. VLMs That Act covers it further.

Temporal and spatio-temporal grounding. In video, the target can be a time interval (“when does the person open the fridge?”). Charades-STA, built in the TALL paper, is a standard benchmark for this. The target can also be a mask that follows an object across frames, as in Sa2VA. Seeing in Time covers video.

The grounding task family at a glance
TaskInput languageOutputTargetsTypical benchmark
Phrase groundingcaptionbox per phraseone per phraseFlickr30k Entities
RECreferring expressionboxexactly oneRefCOCO, RefCOCO+, RefCOCOg
RES / GRESreferring expressionmaskone (RES); zero or more (GRES)RefCOCO family, gRefCOCO
REGnone (region is the input)textoneRefCOCO family
Grounded captioningnone or instructiontext with a mask per phrasemanyGranDf (GLaMM)
Reasoning segmentationimplicit querymaskusually oneReasonSeg
Open-vocabulary detectioncategory namesboxesall instancesCOCO, LVIS-style sets
Document groundingquestionanswer with evidence regionsone or manyBoundingDocs, DOGR-Bench, MMDocBench
GUI groundinginstructionclick pointoneScreenSpot
Temporal groundingquery about eventstime intervaloneCharades-STA

How to read this table. Read down the “Targets” column. The older benchmarks assume exactly one target. Most real uses have many targets or none. That gap explains several failure modes later in the post.

Point, box, polygon, mask

Before we ask how a model writes a location, we need to decide what kind of location it writes. There are four common shapes. Each one trades precision against cost.

A point is two numbers, (x, y). It is the cheapest answer to annotate: one click. It says “here” but not “how big”. That is enough for clicking a button, counting objects, or telling a robot where to grasp. It is checked with an inside test: does the point fall inside the target?

A box is four numbers, (x1, y1, x2, y2). It adds extent. It is the default of object detection, cheap to draw, and easy to compare with intersection over union. Its weakness is shape. A box always includes the background between the object and the box edges.

A polygon is a list of k vertices, so it costs 2k numbers. It can follow an outline as closely as you like, if you are willing to pay for more vertices. Florence-2 writes polygons as sequences of quantised vertices. PolyFormer predicts them one vertex at a time.

A mask marks every pixel as in or out. It can represent anything: holes, thin curves, and several disconnected parts at once. Masks used to be the most expensive annotation by far. The Segment Anything Model (SAM) changed that. An annotator clicks once or twice and SAM fills in the mask. That is how SAM’s own SA-1B dataset reached over a billion masks on 11 million images.

The cleanest way to compare boxes and masks is to ask a simple question. Suppose a model predicts the best possible box. How good is that box as a description of the region? Let S be the true region and B* its tightest enclosing box. Because S lies inside B*, their intersection is S itself and their union is B*. So:

Best-box quality equals fill ratioIoU(B*, S) = |B* ∩ S| / |B* ∪ S| = |S| / |B*| = f(S)

Here f(S) is the fraction of the box that the region fills. For a full rectangle, f = 1. For an ellipse, f = π/4 ≈ 0.79, because an ellipse fills that share of its bounding box. For a curved line of text, like the one in Figure 2, the figure is about 0.34. For a thin text line at 45 degrees it can fall below 0.1. Even a perfect box can therefore mostly describe background.

Four ways to say where, on one curved line of text

Representation–
Numbers to write–
Approx. text tokens–
IoU with true region–

Figure 2One region, five answers. The centroid of a curved band lies outside the band, so a point must be chosen to sit on the evidence. The tightest box has IoU equal to the band’s fill ratio. Polygons approach the shape as vertices are added, but their cost grows by two numbers per vertex. A mask fits the shape and can be produced from a single token when a decoder draws it. Token counts assume three-digit coordinates and a tokenizer that splits digits.

Figure 2 also shows a trap with points. The obvious point to emit is the centre of mass of the region. For a convex object such as a ball, the centroid lies inside the object. For a curved band, a crescent or a ring, it lies outside. A model that learns to point at centroids will point at background for exactly these shapes. Pointing datasets therefore ask annotators to click on the object, not at its centre.

Output representations compared
RepresentationPrecisionAnnotation costToken cost as textMany regionsIrregular shapesHow it is checked
Pointlocation only, no extentlowest: one click2 numberseasy: a list of pointspoor: says nothing about shapeinside test, hit or miss
Boxextent, plus backgroundlow: two corners4 numbersa list of boxes; order must be chosenpoor: IoU capped by fill ratioIoU against a box
Polygongrows with vertex countmedium to high: many clicks2k numbers for k verticeslong sequencesgood, at a cost in lengthIoU after rasterising
Maskpixel-exacthigh by hand; low with SAM-assisted clicksvery long as raw text; one token with a decodernatural: one mask per region, or one mask covering several partsexact: holes, curves, disconnected partsmask IoU, boundary IoU

How to read this table. Precision rises from top to bottom. As text, cost rises with it. The last row breaks the pattern only because a decoder can turn a single token into a mask. That exception is what the decoder section of this post is about.

Writing coordinates as tokens

Suppose the model must output a box. A language model can only emit tokens, so the box has to become tokens somehow. Here is the same box around a dog, written the way eight different systems write it. The box spans 26.8% to 58.4% of the image width and 37.2% to 81.1% of its height.

One box, eight encodings
SystemWhat the model writesConvention
Shikra[0.268,0.372,0.584,0.811]plain-text decimals in [0, 1], three decimal places
Qwen-VL<ref>the dog</ref><box>(268,372),(584,811)</box>plain-text integers on a 0–1000 grid, special tags
CogVLM[[268,372,584,811]]three-digit integers 000–999
MiniGPT-v2{<27><37><58><81>}integers on a 0–100 grid
Florence-2<loc_268><loc_372><loc_584><loc_811>1,000 dedicated location tokens
PaliGemma<loc0380><loc0274><loc0830><loc0598> dog1,024 location tokens, y before x
Qwen2.5-VL{"bbox_2d": [233, 240, 507, 522], "label": "dog"}absolute pixels of the resized input (here 868 × 644)
Molmo (point)<point x="42.6" y="59.2" alt="dog">dog</point>a point, plain-text decimals on a 0–100 scale

How to read this table. The rows look different, but they make only four choices. The choices are text numbers or new tokens, normalised or absolute, how many bins, and which axis comes first. The rest of this section takes the four choices one at a time.

Text numbers or new location tokens

The first choice is whether a coordinate is ordinary text or a new token. Shikra, Qwen-VL, CogVLM, MiniGPT-v2, Ferret and Molmo all write coordinates as ordinary text. Nothing is added to the vocabulary. The model reuses whatever it already knows about numbers, and the output stays readable by a person and parseable by a regular expression.

The cost is length. Many tokenizers split numbers into single digits. LLaMA’s tokenizer does this, for example. Then “584” is three tokens, and a box with brackets and commas runs to roughly twenty. Each digit is also a separate prediction, which matters for the error analysis in the next section.

The alternative is to add location tokens to the vocabulary. Pix2Seq did this first for detection. It cut each coordinate into a fixed number of bins and gave each bin a token. Those tokens share one vocabulary and one embedding matrix with the class labels. OFA carried the idea into a general vision-language model. Its official training scripts use 1,000 bins. Kosmos-2 split a 224-pixel input into a 32 × 32 grid of cells. That gives 1,024 location tokens, one per cell. A box is two of them: the top-left cell and the bottom-right cell. Florence-2 uses 1,000 bins per coordinate. PaliGemma uses 1,024 tokens named <loc0000> to <loc1023>.

Location tokens make a box short: two tokens in Kosmos-2 and four in PaliGemma. Each coordinate becomes one decision instead of three. But the embeddings of these new tokens start from nothing. The model has to learn from grounding data alone that <loc0500> lies between <loc0499> and <loc0501>. Text digits come with some of that order already learned during language pretraining.

Streaming a box, token by token

Encoding–
Tokens for one box–
IoU with true box–

Figure 3The same box streamed in three encodings: decimals as text, integers on a 0–1000 grid, and four location tokens. An edge appears only when its last token arrives. In the last two steps one digit is wrong. When the hundreds digit is wrong, the right edge moves by 30% of the image. When the units digit is wrong, it barely moves. To the training loss, both mistakes are one wrong token.

Normalised or absolute coordinates

The second choice is the frame of reference. Most systems normalise coordinates by the image size. Shikra uses [0, 1]. Qwen-VL and Qwen2-VL use [0, 1000). MiniGPT-v2 uses 0–100, and so does Molmo for points. Gemini’s documented detection format is also normalised to 0–1000. A normalised box means the same thing at any resolution, so data from many image sizes can be mixed freely.

Qwen2.5-VL broke with this. Its report says it uses coordinates based on the actual size of the input image, for both boxes and points. The argument is that a model which sees images at their native resolution should also learn real scale. The catch is the word “actual”. These are pixels of the resized input that the model receives, not of the original file. The official cookbook rescales outputs using the resized width and height. One model generation later, Qwen3-VL went back. Its report states that, unlike Qwen2.5-VL, it uses a normalised system scaled to [0, 1000].

How many bins: the cost of a coordinate grid

The third choice is the number of bins, N. It sets how finely a coordinate can be stated. The arithmetic is short, and it is worth deriving. Take an image that is W pixels wide. Cut each axis into N bins, so each bin is Δ = W / N pixels wide. If a coordinate is rounded to the nearest bin centre, each edge of a box can be off by at most Δ/2.

What does that do to IoU in the worst case? Take a square object of side s. The worst case is when all four edges move inward by Δ/2. Then the predicted box is a square of side s − Δ that sits inside the true box. Its IoU is the ratio of the two areas. (A brute-force check over every combination of edge errors confirms that this is the minimum.)

Worst-case IoU from quantisation aloneIoUmin = ( (s − Δ) / s )2,   where   Δ = W / N

Two facts follow. First, the error is set by the original image width, not by the resolution the model sees. A 0–1000 grid on a 448-pixel image has bins narrower than a pixel. The same grid on a 3840-pixel screenshot has bins almost four pixels wide. Second, small objects suffer most, because Δ is compared with s. Kosmos-2’s 32-cell grid is fine for a dog that fills half the photo. On a full-page scan 2,000 pixels wide, each cell is 62 pixels, wider than most words on the page. Try it in Figure 4.

Interactive · quantisation error

Bin width Δ–
Max error per edge–
Worst-case IoU–
Acc@0.5, worst case–
Figure 4Bins, image width and object size together decide how much localisation error the coordinate format alone forces on a perfect model. Try 100 bins on a 3840-pixel screenshot with a 24-pixel icon. Each bin is wider than the icon, so even a perfect model cannot name the icon’s edges.

Which axis first, and other conventions

The fourth choice looks trivial: the order of the numbers. Pix2Seq writes [ymin, xmin, ymax, xmax]. PaliGemma and Gemini keep that order. Qwen-VL, Shikra, Ferret and Florence-2 put x first. Kosmos-2 needs only two tokens, because each token already names a cell. A model trained on mixed conventions has to learn the convention from context. A pipeline that mixes conventions will fail silently, as the nuance above warned.

Points need one more convention: which point. A point for a button is its centre. A point for a curved object must be a point on the object, as Figure 2 showed. Molmo writes several points in a fixed order, top to bottom and then left to right. We return to ordering in the next section.

Grounding as next-token prediction

Once a box is a string of tokens, grounding becomes ordinary language modelling. The model reads the image and the question. Then it writes something like <box> 123 084 622 531 </box>, one token at a time. Training is the same cross-entropy loss used for every other token. This idea runs from Pix2Seq through OFA, Kosmos-2, Shikra, Qwen-VL, Florence-2 and PaliGemma to most open models today.

What this buys

What it costs

The costs are less obvious. Each one comes from treating a quantity in space as a sequence of symbols.

The loss is blind to distance. Cross-entropy for one coordinate token is −log p(true bin). It depends only on the probability given to the correct bin. It does not care where the rest of the probability went. Missing by one bin and missing by three hundred bins cost exactly the same. Figure 5 shows this with two predictions that have identical loss and very different boxes.

Cross-entropy cannot tell a near miss from a far miss

Prediction–
Cross-entropy–
IoU of the box–
IoU reward–

Figure 5The true right edge is bin 584. Prediction B puts 90% of its mass one bin away. Prediction C puts 90% of its mass three hundred bins away. Both give 10% to the true bin, so both have the same cross-entropy, 2.30. An IoU reward separates them at once. This is the reason reinforcement learning with IoU rewards helps grounding.

Errors compound digit by digit. With text digits, one coordinate is several predictions in a row. The hundreds digit comes first, and every later digit is conditioned on it. An early mistake is large, and the following digits cannot repair it. Location tokens remove the chain, because each coordinate becomes one decision. They do not remove the blindness to distance.

Many objects need an order. A set of boxes has no natural order, but a token sequence does. Pix2Seq shuffles the object order during training, so the model learns that any order is acceptable. Molmo goes the other way and writes points in a fixed reading order, top to bottom and then left to right. A fixed order is easier to learn. But one skipped object then shifts the position of everything after it. Evaluation has to match predicted and true regions as sets, not as sequences.

Shapes beyond boxes get long. A polygon with 30 vertices is 60 numbers, which can mean more than 200 tokens as text. PolyFormer avoids quantisation altogether by predicting vertex coordinates as continuous values with a regression head. Masks are worse still as raw text. PaliGemma compresses a mask into 16 tokens drawn from a learned codebook of 128 entries, which a small decoder expands back into pixels. Text4Seg labels each cell of a 16 × 16 patch grid with a word and then compresses each row with run-length coding. That compression shortens the text by 74%.

Nothing anchors the numbers to the pixels. A coordinate token is predicted like any other word. The model can write a fluent, well-formed box for an object that is not there, just as it can write a fluent sentence that is false. Aligning Vision-Language Models covers hallucination in general. In grounding it takes the form of a confident box on empty background.

Handing the location to a decoder

Typing coordinates asks a language model to do geometry in text. There is another option. The language model can decide what to localise and leave where to a module built for it. Three interfaces follow from this. The model can type the location, select it from candidates, or emit an embedding that a decoder turns into a location.

Type, select or decode

Type. This is the approach of the previous section. The model writes coordinates as tokens. It is simple and portable, and it carries all the costs listed above.

Select. A separate detector proposes candidate regions. Each candidate becomes a token that the language model can refer to. Groma works this way. A class-agnostic proposer based on Deformable DETR finds candidate regions. A region encoder turns each one into a region token, registered as <r1> to <rn>. The language model grounds a phrase by writing <p>A dog</p> <roi><r4></roi>. Localisation becomes a choice among candidates. The model never writes a coordinate. The ceiling is the proposer: a region that was never proposed can never be selected.

Ferret uses region features in the other direction, for input. Its hybrid region representation pairs a region’s discrete coordinates with a continuous feature. A spatial-aware visual sampler extracts that feature from inside the region, whatever its shape. That lets a user refer to a scribble or a free-form outline. Ferret’s outputs are still coordinates written as text, on a 0–999 grid.

Decode. The model emits a special token, and that token’s hidden state, not its text, carries the location. LISA introduced this as “embedding as mask”. The recipe has four steps:

  1. Add a token <SEG> to the vocabulary. The language model writes it where a mask is needed: “It is the kettle <SEG>.”
  2. Take that token’s last-layer hidden state, hSEG.
  3. Project it with a small MLP into the prompt space of SAM’s mask decoder.
  4. SAM’s decoder combines this prompt with SAM’s own image features and outputs a mask.
Embedding as maskp = MLP(hSEG),    M = DecSAM(Fimg, p),    L = Ltext + λbceLbce(M, M*) + λdiceLdice(M, M*)

The mask losses compare the predicted mask M with the true mask M* pixel by pixel. Because every step is differentiable, the mask loss flows back through the decoder and the MLP into the language model. The language model therefore learns to put into hSEG exactly what the decoder needs. No coordinate is ever typed.

Three ways to hand over a location

Figure 6One question, three interfaces. Type writes coordinates as tokens and parses them into a box. Select chooses one of a detector’s proposals by emitting its region token. Decode emits a single <SEG> token. Its hidden state becomes a prompt for SAM’s mask decoder, and the mask loss trains the whole chain end to end. In the decode lane the language model decides what, and the segmenter decides where.

The VLM + SAM family

LISA showed that this design gives reasoning segmentation almost for free. The reasoning comes from the language model and the mask comes from SAM. Trained only on data without reasoning queries, LISA still handles reasoning segmentation zero-shot. Its authors report that fine-tuning on just 239 reasoning-segmentation samples improves it further. Many follow-ups change one part of the recipe each.

One hybrid sits between typing and decoding. Seg-Zero lets Qwen2.5-VL-3B write a box and points as text. A frozen SAM 2 then uses them as prompts and draws the mask. The language model is trained with reinforcement learning, with rewards on the box and the points. The output stays parseable text, and the mask still comes from a segmenter.

Grounding documents with masks

My own research applies the decode interface to documents. The framing behind it is simple. A person shows you where something is by pointing, underlining or highlighting. Nobody reads out coordinates. A single point works well in natural images, where the evidence is usually one object. Evidence in a document rarely looks like that. It is a paragraph, a table row, a line of text curving around a seal, a pie wedge, or several cells scattered across a page. For regions like these people reach for a highlighter. A mask is a smart highlighter. It covers exactly the evidence, at any shape and size, and nothing else.

Three models from this line of work share one recipe. A vision-language model writes text and grounding tokens, and SAM turns each token into a mask, trained end to end. M3Grounder (CVPR 2026) answers document questions and attaches masks to every cited span. Each grounding token yields three nested masks: the phrase, its line and its block. DoCoG (ECCV 2026) grounds every reading step of a chain of thought. DocLayout-VL (ECCV 2026) emits a layout token for every node of a page’s layout tree. The full story, with the data engines behind them, is in Building Grounded Document Intelligence.

What counts as one region

So far each query has had one obvious target. Real queries often do not. Look at a single bank statement and three requests about it. “Cite the amount” wants one number. “Redact the transaction” wants the whole row. “Chunk the table for retrieval” wants the whole table. The page is the same in all three. Only the question changed, and with it the right size of region.

This is granularity: the level at which a region is defined. On a document the levels form a ladder of their own:

Natural images have their own ladder: part, object, group of objects, and amorphous regions such as sky or road. A question about the handle of a mug wants a part. A question about “all the mugs” wants a group. That group may be several disconnected regions, which is the multi-target case of gRefCOCO.

One page, many granularities

Figure 7The camera walks down two granularity ladders on one page. In the text column it goes paragraph, line, span, word, character. In the table it goes table, row, cell, then several scattered cells for a single query. The pie wedge at the end is a region that no box describes well. Each step names the request that would want that granularity.

Several systems build granularity into the output. Kosmos-2.5 reads a page as a list of text lines, each with its own box, so its unit is the line. M3Grounder makes granularity explicit. Each grounding token has three small heads, which produce three SAM prompts. Those prompts become three nested masks for the phrase, the line and the block. A hierarchy loss keeps the phrase mask inside the line mask, and the line mask inside the block mask. DocLayout-VL goes further and outputs a whole tree of regions. Its attention module lets each region token look only at its parent, its children and its siblings. A headline therefore stays with its own article.

Multi-region answers need a separate mention. A query such as “which months were over budget?” can point at three cells in three rows. A point list handles this naturally, and so does a list of masks. One box around all three cells would cover most of the table. This is the plainest case where the answer is a set of regions, not one region.

Grounding each reasoning step

Some questions cannot be answered by pointing at one place. Take a pie chart of revenue by region and ask: “By how many points does Asia’s share exceed Europe’s?” The answer, 24 points, is printed nowhere. The model must find Asia in the legend, then find the wedge with that colour, then read its label, and then do the same for Europe. Only then can it subtract. Grounding only the final answer gives nothing to point at. Chain-of-thought alone says “Asia is 42%” without showing which label it read.

The fix is to ground the steps. Step 1 points at region A. Step 2 points at region B. Each later reading step points at its own region, up to the answer. Steps that only do arithmetic point at nothing. Thinking in Tokens explains why written reasoning steps help a language model. Grounded steps add one thing: each reading step becomes checkable against the image.

A grounded chain of thought

    Figure 8Each reading step carries its own region, and the arithmetic step carries none. The last frame shows why the regions of one chain must agree. The chain points at Europe’s wedge but reads Asia’s label. The text alone looks fine. The regions expose the error.

    Three lines of work show the range of designs.

    Visual CoT builds a dataset of 438K question-answer pairs, each with a box around the key region. About 98K of them also have detailed reasoning steps. The model first predicts the box, then looks again at that region, and then answers. Here grounding is a step that decides where to look, which is the theme of Thinking With Images.

    GRIT (Fan and colleagues, 2025) trains a model to interleave boxes inside its reasoning text. It uses reinforcement learning with only two rewards: a correct final answer and a well-formed grounded reasoning format. The paper reports that as few as 20 training samples are enough to learn the behaviour. (This GRIT is a method. Ferret’s dataset is also called GRIT, and Kosmos-2’s dataset is called GrIT. They are three different things.)

    DoCoG, from my own work, grounds every reading step of a document chain with masks across text, tables, charts and flowcharts. It adds a module that sees all grounding tokens of one chain together before they reach SAM. That lets related pointers agree, such as a legend entry and its wedge, or a value and its column. The language model is causal: when it writes the first pointer, it cannot yet see the second, so it cannot make them agree itself. Training starts with supervised fine-tuning on step-wise data and continues with preference training over whole chains.

    Why grounding matters beyond explanation

    Grounding is often presented as explainability: the model shows its work. That is true, but it undersells it. A location is also an input to the next step, whether that step is taken by a program, a robot or a training loop. Here are the main uses, each with what it needs from the representation.

    Verifiable perception. A grounded claim can be checked in seconds, and an ungrounded one cannot. This is the bank-statement example from the start. It needs regions at the right granularity. A box around a whole table does not verify a number.

    Region-specific reading. “Read the text inside this box” turns grounding into a tool for OCR. Kosmos-2.5 reads a page as text lines paired with their boxes. The location tells you where each piece of text came from. It also lets later steps read one region again at higher resolution.

    Crop and zoom. A box is an action as well as an answer. A model that can name a small region can crop it, zoom in, and look again with more visual tokens. Visual CoT trains exactly this. Thinking With Images covers how reasoning models use it at test time.

    Clicking in interfaces. A GUI agent acts by clicking points. SeeClick showed that GUI grounding is the bottleneck for visual GUI agents and built ScreenSpot to measure it. ScreenSpot has over 600 screenshots and about 1,200 instructions across mobile, desktop and web. UGround scaled the training data to 10M GUI elements on 1.3M screenshots. Here precision is measured in pixels of a large screen, so the grid arithmetic of Figure 4 applies directly. See VLMs That Act.

    Robotics. A robot needs a target in the image: where to grasp, where to place, where to go. RoboPoint predicts sets of image points as spatial affordances. The Molmo authors expect pointing to let models act by pointing at waypoints, objects and buttons. From VLMs to VLAs picks this up.

    Rewards for reinforcement learning. A box or a mask can be scored against a reference with IoU, without a learned judge. That makes perception a verifiable reward, much like a math answer checked by a program. VLM-R1, Visual-RFT and Seg-Zero all use this. Rewarding What the Model Sees covers the method.

    Visual citations. A document assistant that cites the cell it read can be audited by its users. This is the strongest argument for mask-level, multi-region grounding on documents. How VLMs Read Documents and Searching With Pixels cover documents and visual retrieval.

    Less hallucination. A model that must place every object it mentions has a harder time mentioning objects that are not there. Ferret’s authors report that training with GRIT, including its hard negatives, reduces object hallucination. The mechanism matters more than the size of the effect. Grounding turns “is there a dog?” into “where is the dog?”, and “nowhere” must be a valid answer.

    Measuring grounding

    Each output shape comes with its own metric, and each metric rewards something slightly different. Measuring What a VLM Can Do covers VLM benchmarks in general. This section goes deeper on grounding.

    Points

    A point is scored with an inside test. The pointing game, introduced to evaluate attention maps, counts a hit when the maximum of the map falls on an annotated instance, allowing a tolerance of 15 pixels. GUI grounding uses the same idea as click accuracy: a click counts if it lands inside the target element’s box. Point metrics say nothing about extent, and they are lenient for large targets.

    Boxes

    Boxes are scored with intersection over union, IoU = |A ∩ B| / |A ∪ B|. Referring expression comprehension on the RefCOCO family reports Acc@0.5: the share of expressions whose predicted box has IoU of at least 0.5 with the true box. Phrase grounding on Flickr30k Entities reports a similar recall at the same threshold. Detection reports average precision. In the COCO style, AP is averaged over IoU thresholds from 0.5 to 0.95, which rewards tight boxes more than Acc@0.5 does.

    Masks

    Masks are also scored with IoU, but at the pixel level, and there are two ways to average it. Referring segmentation papers such as LISA report both.

    Two averages of mask IoUgIoU = (1/n) ∑i |Pi ∩ Gi| / |Pi ∪ Gi|     cIoU = ∑i |Pi ∩ Gi| / ∑i |Pi ∪ Gi|

    Here Pi is the predicted mask and Gi the true mask for example i. gIoU is the mean of per-example IoUs, so every example counts equally. cIoU adds up all intersections and all unions before dividing. Large objects contribute many pixels, so they dominate cIoU. LISA prefers gIoU for exactly this reason. IoU over a whole mask is also forgiving at the edges, because a large interior hides a ragged boundary. Boundary IoU computes IoU only in a thin band around the contours, so it rewards sharp edges.

    Many regions, no region, and phrases

    When an answer has several regions, a single IoU no longer works. The usual approach is to match predicted regions to true regions first, typically one-to-one at an IoU threshold. Then precision, recall and F1 are computed over the matches. M3Grounder and DoCoG report grounding scores of this matched kind. When a query may have no target, as in gRefCOCO, the metric must also reward the model for correctly answering “nothing”. Grounded captioning has to score two things together: the text and whether each phrase got the right mask. GLaMM therefore evaluates grounded conversation generation with caption metrics and mask metrics side by side.

    Time

    Temporal grounding uses the same idea in one dimension. Temporal IoU compares the predicted interval with the true interval. Charades-STA results are usually reported as recall at temporal IoU thresholds such as 0.5 and 0.7.

    Interactive · box IoU versus mask IoU

    Drag the box to move it. Drag its corner to resize. Arrow keys move it; Shift + arrows resize.
    IoU vs true box–
    IoU vs true mask–
    Shape fill ratio–
    Acc@0.5: box / mask–
    Figure 9Box IoU and mask IoU agree for compact objects and disagree for everything else. Snap to the tightest box on the diagonal text line. Box IoU reads 1.00, while mask IoU equals the fill ratio of the shape. A box metric would call this prediction perfect, even though most of the box is background.

    Benchmarks

    Grounding benchmarks and what they score
    BenchmarkTaskOutputMain metricWhat it does not test
    ReferItGameREC on natural photosboxAcc@0.5multiple or absent targets
    RefCOCO / + / gREC and RES on COCObox or maskAcc@0.5; mask IoUmultiple or absent targets; RefCOCO+ removes location words
    Flickr30k Entitiesphrase groundingbox per phraserecall at IoU 0.5masks
    gRefCOCOgeneralised RESmask, possibly emptymask IoU; no-target accuracyreasoning queries
    ReasonSegreasoning segmentationmaskgIoU, cIoUscale: 1,218 samples in total
    GranDfgrounded conversationtext with maskscaption and mask metricsdocuments
    ScreenSpotGUI groundingclick pointclick accuracyextent of elements
    Charades-STAtemporal groundingtime intervalrecall at tIoU 0.5 / 0.7spatial location
    BoundingDocsdocument QA with locationsanswer and boxanswer and location scoresnon-rectangular evidence
    DOGR-Benchdocument grounding and referringboxes and texttask-specificmasks; 3.6K samples over charts, posters, PDFs
    MMDocBenchfine-grained document understandinganswer and supporting regionsanswer and region scoresmasks; 4,338 QA pairs, 11,353 regions
    GDQA-Bench, DoCoG-Benchmask-grounded document QA; grounded chainsmasks, many per answer or stepgrounding F1; answer and grounding scoresnatural images

    How to read this table. The last column matters most. Most benchmarks fix one output shape and one target count. A model that is good at the benchmark’s shape can still be weak at the shape your application needs. The shaded row is from the author’s own work.

    Comparing grounding models

    We can now compare the main grounding models along the aspects this post introduced: output shape, coordinate encoding, decoder, granularity, multi-region ability and training data. Per-family details such as model sizes, encoders and training stages are in How the Open VLM Families Were Built. Entries say “not reported” where the primary source does not state them.

    Grounding approaches compared
    ModelOutput typeCoordinate encodingDecoderGranularityMulti-regionGrounding training data
    Pix2Seq (2021)boxeslocation tokens; 2,000 bins (COCO from scratch) or 1,000; y before x; shared vocabulary with classesnoneobjectyes; order shuffled in trainingCOCO; Objects365 for pretraining
    OFA (2022)boxeslocation tokens in a unified vocabulary; 1,000 bins in official scriptsnoneobjectone per querypublic data, including the RefCOCO family
    Kosmos-2 (2023)boxes1,024 location tokens (32 × 32 grid); two tokens per boxnonephrase to objectyes, joined by a delimiter tokenGrIT: about 91M images, 115M phrases, 137M boxes
    Shikra (2023)boxes, pointsdecimals in [0, 1] as text, three placesnoneobjectyes, inline in dialoguepublic REC and phrase-grounding sets; GPT-4-generated referential dialogue (Shikra-RD)
    MiniGPT-v2 (2023)boxesintegers on a 0–100 grid as textnoneobjectyespublic multi-task mix
    Ferret (2023)boxes (in and out)integers on a 0–999 grid as text; region inputs add a sampled featurevisual sampler for region inputsobject, free-form regions as inputyesGRIT: about 1.1M samples including 95K hard negatives
    CogVLM (2023)boxesthree-digit integers 000–999 as textnoneobjectyesREC data in stage-2 pretraining
    Qwen-VL / Qwen2-VLboxesintegers on a 0–1000 grid as text, inside box and ref tagsnonephrase to objectyesGrIT, Visual Genome, RefCOCO family (Qwen-VL); later versions not itemised
    Qwen2.5-VL (2025)boxes, pointsabsolute pixels of the resized input; JSON outputnoneobjectyesnot itemised
    Qwen3-VL (2025)boxes, pointsback to a normalised 0–1000 grid; JSON outputnoneobjectyesnot itemised
    Florence-2 (2023)boxes, quad boxes, polygons1,000 location tokens; polygons as vertex sequencesnoneobject, region, text lineyesFLD-5B: 5.4B annotations on 126M images
    PaliGemma (2024)boxes, masks1,024 location tokens, y before x; masks as 16 codebook tokens (128-entry VQ-VAE)small VQ-VAE mask decoderobjectyesmultitask pretraining mix including detection and referring segmentation
    Molmo (2024)pointsdecimals on a 0–100 scale as text, in XML-like tagsnoneobject, partyes, in reading orderPixMo-Points: about 2.3M question-point pairs on 223K images
    Groma (2024)boxes (selected)none typed; region tokens <r1>…Deformable-DETR region proposerobjectyesnot reported here
    LISA (2023)masksnone; <SEG> hidden stateSAM (ViT-H)object, reasoning targetsone per <SEG>semantic and referring segmentation, VQA; 239 ReasonSeg samples
    GLaMM (2023)masks, region inputsnone; <SEG> per phraseSAM-based pixel decoderphrase to objectyes, many per replyGranD: 810M masked regions on 11M images; GranDf
    PixelLM (2023)masksnone; codebook tokenslightweight pixel decoder, no SAMobjectyesMUSE: 246K QA pairs, 0.9M instances
    Sa2VA (2025)masks in images and videonone; [SEG] tokenSAM 2 with memoryobject across framesyesimage and video referring segmentation; Ref-SAV
    Text4Seg (2024)masks as texta word per patch on a 16 × 16 grid, row-wise run-length codingoptional SAM refinerobjectyesnot reported here
    M3Grounder, DoCoG, DocLayout-VLmasksnone; grounding tokensSAM, with an interaction module (DoCoG, DocLayout-VL)phrase, line, block; reasoning steps; layout treeyes, many per answer, step or pageabout 2M grounded QA; 1.5M step-wise QA plus 20K preference pairs; 80M masks on 2.5M pages

    How to read this table. Read the “Decoder” column first. It splits the table into two groups. Models with no decoder type their locations and almost all output boxes or points. Models with a decoder output masks and type no coordinates at all. Then read the “Coordinate encoding” column within the first group. The bin count and the order of the axes change from model to model, and even across versions of one family. The shaded row is the author’s own work.

    Choosing a grounding interface

    There is no single best interface. The right choice follows from the shape of the evidence, the number of regions, and what consumes the output.

    The thread through all of this is a division of labour. Language models are good at deciding what a question refers to and at what granularity. Geometry is better handled by something that works in pixels, whether that is a fine coordinate grid, a proposer, or a promptable segmenter. The next posts build on this. How VLMs Read Documents applies grounding to pages. Rewarding What the Model Sees turns IoU into a training signal.

    Key insights and nuances

    1. InsightGrounding can be a means as well as an output. Molmo’s point-then-count beats counting directly, and the points make the count checkable. From recognising to localising
    2. NuanceData in which every query has exactly one target teaches the model to always draw a box. Training needs queries whose answer is “no such region”. The family of grounding tasks
    3. InsightThe best possible box has IoU equal to the shape’s fill ratio. That is about 0.34 for a curved text line and below 0.1 for a thin diagonal one. Point, box, polygon, mask
    4. InsightQuantisation error is set by the original image width divided by the bin count. A 0–100 grid cannot localise a 24-pixel icon on a 4K screen. Writing coordinates as tokens
    5. NuanceCoordinate conventions change across models and even across versions of one family. Qwen2.5-VL uses absolute pixels, while Qwen3-VL returned to a 0–1000 grid. Wrong parsers fail silently. Writing coordinates as tokens
    6. InsightCross-entropy cannot tell a near miss from a far miss. IoU rewards can, which is why RL helps grounding. Grounding as next-token prediction
    7. InsightFor irregular, multi-region evidence, changing the interface from typed boxes to a segmentation decoder helps more than more data on the same backbone. Handing the location to a decoder
    8. InsightGranularity belongs to the question. The same pixels are right for “cite” and wrong for “redact”. What counts as one region
    9. NuanceBoxes inside reasoning chains are not evidence unless something checks them. Answer accuracy and grounding accuracy can differ by 70 points. Grounding each reasoning step
    10. Nuance“gIoU” means a per-example mean in segmentation and generalised IoU in detection. cIoU favours large objects. Measuring grounding

    References

    Grouped by topic. Every entry links to its primary source.