Visual Primitives: How Structured Geometric Tokens Bridge the Reference Gap in Multimodal Models
This article examines the "reference gap" problem in multimodal models: even when a model can see an image clearly, using natural language to describe what it sees introduces ambiguity that accumulates during spatial reasoning and counting tasks. It introduces the visual primitives approach—special tokens for references, boxes, points, and polygons that let a model bind objects to precise geometric coordinates during inference. The article explains why this works, what engineering changes are required on the vocabulary/training side and parsing side, and practical guidance for developers adopting this capability. It concludes with the broader design principle of introducing more precise intermediate representations when language becomes the bottleneck.
1. Clues in the Tokenizer’s Special Symbols
You can often infer a multimodal model’s technical approach from its smallest details—the tokenizer’s vocabulary. A recent open-source experimental multimodal checkpoint contains a notable set of special tokens:
<|ref|>/<|/ref|>: opening and closing markers for references<|box|>/<|/box|>: rectangular bounding-box annotation<|point|>/<|/point|>: point-coordinate annotation<|polygon|>/<|/polygon|>: polygon-region annotation
These tokens occupy consecutive positions in the vocabulary and are all marked as special symbols, so they are not split by ordinary tokenization. This strongly suggests the model was designed from the ground up with a reserved channel for structured visual output: it can generate composite sequences of the form “an object + a geometric primitive (point/box/polygon).”
Interestingly, in everyday conversational use, users rarely see these explicit symbols—they mostly function inside internal reasoning chains or structured output. This “capability hidden beneath the surface” is the core of this article: the visual primitives approach.
2. The Two Gaps in Multimodal Models
To understand the value of visual primitives, we first need to identify the bottlenecks in current multimodal reasoning. The industry generally recognizes two gaps.
1. The Perception Gap
This is the question of whether the model “sees clearly” after an image is compressed into visual features—for example, recognizing small text or detecting distant, tiny objects. Mainstream solutions include raising input resolution, dynamic image tiling, and image enhancement, and significant progress has been made. This gap is fundamentally about the image itself.
2. The Reference Gap
Even if the model “sees clearly,” it still has to describe image content in natural language while reasoning. A phrase like “the blue object slightly to the right of the upper-left corner” is inherently vague and ambiguous. When tasks escalate to dense counting, precise object localization, or spatial-relation reasoning, this linguistic ambiguity compounds layer by layer, eventually causing the reasoning chain to collapse.
An intuitive analogy: imagine directing a blindfolded person to draw something. You cannot point; you can only speak—“a little more to the left.” Language, as the intermediate medium, inherently loses spatial precision.
3. Visual Primitives: Unambiguous Pointers in Continuous Space
The visual-primitives approach introduces a structured, computable set of geometric symbols into the model’s reasoning process, serving as pointers to objects:
<|ref|>red cup<|/ref|><|box|>(x1, y1, x2, y2)<|/box|>
This sequence binds an object named “red cup” to a precise rectangular bounding box. Compared with a fuzzy expression like “the cup in the upper-left corner,” coordinates are unambiguous.
Why does this work?
- References go from vague to precise. Coordinates, points, and polygons are mathematical objects that don’t depend on resolving linguistic ambiguity. In subsequent reasoning, the model can reference this pointer instead of re-describing the location in words.
- Reasoning chains can self-check. The model can “look back” at the primitives it has already generated—for example, first marking out multiple objects with boxes, then computing counts or spatial layouts from the relative positions of those boxes—much like a human annotating an image with a pen.
- Natural integration with tool calls. Structured primitives can be parsed directly by downstream code and turned into cropping, annotation, or measurement operations, without going through a fragile natural-language parsing step.
4. From Principle to Engineering Practice
1. Vocabulary Extension and Training
Reserving dedicated tokens for primitives means:
- Expanding the vocabulary and initializing the corresponding embeddings;
- Constructing training data that pairs objects with primitives (e.g., detection annotations and GPT-style coordinate-description data);
- Scheduling targeted reinforcement of localization ability during multi-stage training.
2. Supporting Changes on the Parsing Side
The serving side needs to parse this structured output. A simplified pseudocode example:
import rePRIMITIVE = re.compile(r"<\|ref\|>(.*?)" # referenced objectr"<\|/ref\|>"r"<\|(box|point|polygon)\|>(.*?)<\|/\1\|>" # geometric primitive)def parse_visual_primitives(text):refs = []for m in PRIMITIVE.finditer(text):refs.append({"object": m.group(1).strip(),"type": m.group(2),"geometry": parse_geometry(m.group(2), m.group(3)),})return refs
Note: the object-capture group above is illustrative; in a real implementation, the regex groups must align with the surrounding capture structure.
The parsed structured results can be fed directly into drawing, statistics, or spatial-computation modules.
3. Practical Recommendations
Developers who want to implement this capability should pay attention to:
- Coordinate-system consistency: confirm the normalization scheme of the model’s output coordinates (0–1000 or pixels) and keep it consistent between the front end and back end;
- Multi-turn referencing: in complex tasks, encourage the model to first mark regions and then reason, rather than answering in one shot;
- Combining external tools: when primitive precision is insufficient, pass coarse boxes to a specialized detection model or OCR for refinement, forming a “coarse localization + fine matching” pipeline.
5. What This Approach Means
The essence of visual primitives is decoupling “understanding an image” from “describing an image clearly.” Image understanding remains the responsibility of the visual encoder, while spatial reference is handed to a mathematically unambiguous symbol system. It acknowledges the limits of language and gives the model, while thinking, a writing instrument closer to vision itself than language is.
For engineering teams, this points to a more general design principle: when language becomes the bottleneck, introduce a more suitable intermediate representation for the model. Whether coordinate primitives, program traces, or structured tables, the direction is the same—make every step of the reasoning chain rest on precise, verifiable symbols.
As these experimental models continue to iterate, “mark while looking” multimodal reasoning is expected to move from experiment toward mainstream use. Understanding the reference gap behind it is the first step to grasping this trend.
