Visual Primitives and the Referring Gap in Multimodal Models: A Practical Guide

    This guide explains why multimodal systems fail in open-ended scenes and how to tell perception errors apart from referring errors. It covers points, boxes, and polygons as visual primitives, compares explicit primitives with in-image reasoning, and outlines how to evaluate and engineer both approaches so results can be reproduced.

    Separate the Two Kinds of Failure

    When a multimodal system makes mistakes in open-ended scenes, the errors often look like poor recognition. The underlying causes, however, usually fall into two separate layers.

    The first layer is the perception gap. Low encoder resolution, small targets, heavy occlusion, extreme lighting, or blurry rendered text can stop visual features from reliably passing object boundaries and categories to later reasoning stages. In these cases, even a carefully written prompt cannot recover pixel information that was never captured. The usual fixes are higher-resolution tiling, multi-scale features, specialized heads such as OCR or detection, and letting the model zoom into local regions when needed.

    The second layer is the referring gap. The people or objects in the image are visible, but the reasoning process must describe them in natural language, such as “the third person from the left wearing dark clothes” or “the fork at the top right of the maze.” In dense, repetitive, occluded, or visually similar scenes, these descriptions are highly ambiguous. Counting may double-count or skip items, localization may drift to a neighboring instance, and multi-step planning may lose track of the object referenced in the previous step. The limit is no longer the image itself. The reasoning lacks precise handles that point into a continuous visual space.

    In practice, classify the failure before choosing a fix. If zooming into a crop clearly makes the category and boundaries more accurate, improve perception first. If a human and a detection box can both see the target clearly, yet the narrated reasoning fails to align with the right instance, then visual primitives are worth introducing.

    What Visual Primitives Are

    A visual primitive is an unambiguous pointer that a model uses inside its reasoning chain. Instead of restating an object with adjectives, the model uses a structured geometric reference that anchors “which one I mean” to image coordinates. There are three common types:

    • Point: a normalized coordinate, suited to keypoints, counting clicks, and waypoints along a path.
    • Box: the top-left and bottom-right corners, or the center plus width and height, suited to instance-level localization and region cropping.
    • Polygon: an ordered list of vertices, suited to irregular outlines, lanes, room boundaries, and occluders.

    Primitives do not replace detectors. Their value is that later reasoning, tool calls, and visual verification share one set of references. Natural language still explains why, and geometric markers answer which one. With this division of labor, dense counting no longer needs to translate each instance into confusable directional phrases, and planning no longer reduces a path to vague instructions such as “go right, then up.”

    The following conceptual sequence shows the structure only. It is not the vocabulary or interface of any particular product:

    1. Observation region <region>0.12,0.20,0.48,0.73</region>
    2. Instance click <point>0.31,0.44</point>
    3. Outline <polygon>0.10,0.20 0.40,0.22 0.38,0.60 0.11,0.58</polygon>

    Coordinates should be normalized relative to the original image width and height. The origin, out-of-bounds handling, and polygon closure rules must be stated explicitly. Without these conventions, primitives become another jargon that drifts over time.

    Choose Between the Two Approaches

    The explicit primitive approach writes points, boxes, and polygons into the generated sequence. During decoding, grammar constraints ensure that markers are paired, coordinate counts are valid, and values fall within legal ranges. This approach suits counting, pointing, pre-processing for cutouts, and agents that pass intermediate results to downstream modules. Its advantages are that outputs can be checked, cached, and aligned with detection or segmentation results. Its drawbacks are higher vocabulary and annotation costs, and small models may generate coordinates that look like numbers but do not line up with objects.

    The in-image reasoning approach does not treat geometric symbols as first-class tokens. Instead, it uses cropping, zooming, and multiple looks at the image so the model can keep reasoning in each new visual context. It is closer to classic “look and think”: zoom into a junction when lost, or scan a crowd region by region when counting. Its advantages are that it adds little vocabulary and strengthens perception directly. Its drawbacks are that references stay implicit in pixels and text, making it hard to point reliably back to the same instance across turns. Agents also struggle to hand intermediate geometry to external tools for verification.

    The choice does not have to be either-or. When perception is weak, start with region splitting and zooming. When a task requires auditable instance alignment, add primitives as a reference layer on top. If a model draws boxes well in a demo but fails on a different set of dense samples, the primitives have not entered the training distribution. The model is only imitating a format from the prompt.

    Do Not Judge by Fluent Answers Alone

    Web demos, official examples, and offline benchmarks often disagree. The cause is usually not a hidden switch. It is typically differences in input resolution, whether multiple crops are allowed, whether decoding enforces markers, and whether the system prompt requires geometry before the answer. Write these settings into a fixed evaluation protocol.

    Cover at least four task types, and record both the final answer and the intermediate references:

    1. Dense counting: more than twenty similar instances, with one point per instance. Points must not fall on the background or repeatedly land on the same instance.
    2. Disambiguation among similar targets: objects with close appearances that differ only in position or subtle attributes. Each box must correspond one-to-one with its attribute description.
    3. Irregular regions: use polygons instead of bounding boxes, and check whether the vertices fit the visible outline.
    4. Multi-step spatial planning, such as mazes or indoor paths. Each step’s point must fall in a traversable area and connect to the previous step.

    Score each answer in three parts: whether the model saw the content, whether the reference pointed to the right object, and whether the conclusion follows from the reference. Looking only at the final number hides cases where the model saw correctly but pointed wrongly, or pointed correctly but counted incorrectly. Preprocessing must match between the demo environment and the benchmark environment. Otherwise, a demo failure cannot be attributed to the approach itself, and benchmark success cannot be assumed to carry over to default conversations.

    For manual spot checks, draw the generated points, boxes, and polygons back onto the original image. This step is more effective than reading long reasoning passages. Duplicate points, boxes that drift to a neighboring person, and paths that pass through walls become visible immediately.

    Engineering Constraints

    Primitives must become part of the model, not just part of the prompt. In practice, representation, data, and runtime all need attention.

    For representation, special tokens should be distinct from ordinary text so that coordinate digits are not split by standard tokenization in ways that lose precision. Coordinates can use discrete bins or short digit sequences, but training, inference, and visualization must use the same quantization. Limit the maximum number of polygon vertices to prevent abnormally long outlines from overwhelming the sequence.

    For data, an image paired with only a final answer is not enough. Provide instance-level points, boxes, or polygons, and require the reasoning chain to cite them before drawing conclusions. Negative samples matter just as much. When a target does not exist, the model should decline to output a primitive instead of inventing a plausible-looking box. Counting data must include occlusion, truncation, and dense overlap. Otherwise, the model may learn to estimate a rough range rather than count.

    For runtime, use grammar or finite-state constraints to ensure that markers close properly and parameter counts are correct. Mark out-of-bounds coordinates as invalid, then trigger a retry or fall back to plain-text description. When an agent hands a region to a zoom, detection, or measurement tool, pass only geometry objects that have passed validation. Do not re-parse natural-language directions. Logs should store the image identifier, coordinates, and tool responses so that referring errors can be reviewed later.

    At the configuration level, the model name, whether vision is enabled, maximum resolution, and whether tools are allowed should be recorded in one explicit configuration file. These settings should not be scattered across upgrade notes and example code. When environments differ, check configuration and preprocessing before drawing conclusions about model capability.

    Rollout Steps

    Start with a narrow task instead of requiring open-domain segmentation of everything.

    • Define the protocol: coordinate normalization, field order for each of the three primitive types, and the empty output format for failures.
    • Build an aligned dataset: each image should have both human-checkable geometric annotations and natural-language questions.
    • Evaluate by failure type: separately measure cases where the model did not see the target, pointed to the wrong one, or pointed correctly but reasoned incorrectly.
    • Constrain decoding first, then relax generation. Compare accuracy only after format errors have dropped.
    • Add replay for agents. The same reference must still point to the same instance in a cropped image.

    If referring accuracy on the aligned dataset stays low, check annotation noise and quantization precision before adding more prompt text. If references are accurate but conclusions are still wrong, the problem lies in logic or tools, not vision.

    Summary

    Visual primitives address referring, not visual acuity. Perception gaps call for higher resolution, cropping, and specialized perception modules. Referring gaps call for verifiable points, boxes, and polygons that free instances from vague descriptions. In-image reasoning helps the model look more closely, while primitives let it pass along what it has seen in a stable form. Evaluate by drawing results back onto the original image, separating references from conclusions, and fixing preprocessing and configuration. Building within these boundaries is how multimodal capabilities move from demos to reproducible engineering results.