Visual Primitives in Multimodal Large Language Models: Mechanisms and Practical Use
Visual primitives address a key limitation in multimodal reasoning: reliably referring to specific objects and regions across multiple steps. This article explains how coordinates, geometric primitives, and reference identifiers can reduce ambiguity, examines the role of special tokens and image placeholders, and outlines practical techniques, limitations, and future directions for coordinate-based visual reasoning.
1. The Bottleneck Is Shifting from Seeing to Precise Reference
Over the past two years, improvements in general image understanding have largely come from higher-resolution visual encoders and expanded training datasets. Yet performance can drop sharply when a task shifts from “What is in this image?” to “Count every bird in the scene” or “Locate the top of the third pole from the left.”
These failures do not necessarily mean the model missed the target entirely. Instead, it may be unable to keep its attention anchored to a specific pixel region throughout the reasoning process.
This problem can be separated into two layers:
- Perception gap: Visual information is compressed or downsampled before reaching the language model. Small objects and densely packed targets may be lost in the resulting representation.
- Reference gap: Even with sufficient perception, the model may describe objects in natural language during intermediate reasoning—for example, “the smaller bird in the upper-left corner.” Such descriptions can be ambiguous. Across multiple steps, the intended referent may drift, undermining the subsequent reasoning.
The second distinction is especially important: complex visual reasoning is often constrained not by the amount of information in an image, but by how intermediate representations express that information.
2. Visual Primitives: Replacing Ambiguous Descriptions with Explicit Pointers
The central idea behind visual primitives is to use structured symbols that point directly to objects in continuous visual space, rather than relying on natural-language references. A typical design includes three geometric primitives and one reference primitive:
| Primitive | Meaning | Typical uses |
|---|---|---|
point |
A single coordinate point | Keypoints, anchors, counting markers |
box |
A rectangular bounding box | Object localization, region cropping |
polygon |
A sequence defining a polygon | Irregular contours, segmentation |
ref |
A reference identifier | Naming primitives for reuse in later steps |
The key element is ref. It lets the model name a region and reuse that identifier later, instead of repeatedly describing the region’s appearance. An illustrative intermediate reasoning structure might look like this:
<ref>a</ref><|point|[[0.31, 0.72]]|/point|><ref>b</ref><|box|[[0.10,0.20,0.28,0.55]]|/box|>Check: Is a inside b? → Yes → Therefore, a belongs to the left-hand group.Count: Iterate over all <|point|> markers and deduplicate them → 7.
The benefit is that coordinates are computable. Geometric relationships can be evaluated through deterministic numerical comparisons rather than ambiguous verbal reasoning. Explicit coordinates also help resist reference drift: later steps can refer to the same numerical location.
At the implementation level, these primitives are often introduced by extending the tokenizer vocabulary with paired opening and closing markers configured as indivisible special tokens:
{"id": 129271, "content": "<|/polygon|>", "special": true, "normalized": false}{"id": 129273, "content": "<|/point|>", "special": true, "normalized": false}{"id": 129275, "content": "<|/box|>", "special": true, "normalized": false}{"id": 129277, "content": "<|/ref|>", "special": true, "normalized": false}
These special tokens do more than add notation. They prevent the markers from being split by byte-pair encoding (BPE), allowing the model to learn associations between individual tokens and geometric semantics.
3. Why Explicit Primitive Markers May Disappear from Outputs
One phenomenon reported in community observations is that a model’s vocabulary contains a complete set of primitive markers, yet its visible reasoning rarely uses them. Instead, the model writes coordinate values directly.
Several explanations are plausible:
- Representation collapse during later training: If supervision is predominantly natural language, the model may learn that writing coordinates in ordinary text is an easier equivalent representation, making explicit markers less likely to appear.
- Side effects of distillation and data construction: If reasoning data comes from a stronger teacher model that expresses coordinates in natural language, the student may inherit that convention.
- Coordinates themselves serve as primitives: Functionally, an
(x, y)pair already provides an explicit pointer. The markers may be syntactic sugar rather than a prerequisite for reducing reference ambiguity.
These are possible explanations, not established conclusions about a particular model.
The third interpretation is especially useful for engineering: the benefit may come from coordinate-based representation, not from the markers themselves. This suggests that prompting a general-purpose multimodal model to return normalized coordinates can provide some of the same benefits, even when dedicated primitive markers are unavailable.
4. Image Placeholders and Token Budgets: An Unresolved Implementation Detail
Another category of special markers consists of sequences such as place_holder_mm_span_0001 through place_holder_mm_span_0442. These are generally used to mark where visual content is inserted into multimodal inputs containing interleaved text and images.
Two apparent mismatches deserve attention:
- Documentation may state that a single request supports hundreds of images, while the number of placeholders appears lower than the stated maximum.
- If one assumes that a single image uses at most 384 visual tokens, a set of 442 placeholders does not align with that figure.
A plausible interpretation is that placeholders correspond to spans of visual content, rather than mapping one-to-one to images. An image might be divided into multiple spans, or additional spans might be expanded only when high-resolution detail is needed.
However, this remains an implementation hypothesis. Without public details, it should not be treated as a confirmed explanation.
The practical takeaway is straightforward: do not infer image limits or resolution strategies from placeholder counts. Use the official documentation or the relevant API documentation instead.
5. Practical Techniques for Coordinate-Based Visual Reasoning
- Define the coordinate system explicitly. Specify, for example, that coordinates are normalized to
[0,1]and that the origin is the upper-left corner. This helps prevent the model from mixing pixel coordinates with normalized values. - Require structured output. Ask for coordinates in a list or JSON structure so application code can deduplicate targets, count them, and validate geometric relationships.
- Separate the task into stages. Localize first, evaluate relationships second, and summarize last. Breaking a long reasoning sequence into smaller, verifiable steps makes errors easier to identify.
- Use deterministic post-processing. Let code handle counting and containment checks, while the model produces the coordinates.
- Evaluate each layer separately. Test perception—whether targets are found; reference—whether coordinates remain stable; and reasoning—whether relationships are evaluated correctly. A single accuracy score can conceal the actual bottleneck.
- Manage image budgets and inference costs. High-resolution and multi-image inputs can substantially increase token consumption. Store original images in object storage, crop and upload regions as needed, and use container platforms to scale batch inference. Logging services, monitoring, and alerts can track per-request token usage.
6. Limitations and Future Directions
Coordinate-based representation is not a complete solution. It depends on the model maintaining a stable understanding of spatial scale. In extremely dense scenes containing hundreds of similar objects, coordinates may still be duplicated or omitted.
Geometric primitives also have limited ability to describe non-rigid objects and occlusion relationships. Cross-image references introduce additional coordinate ambiguity, and there is not yet a uniform convention for handling them.
Likely directions for further development include:
- Hybrid representations combining primitives and coordinates.
- Differentiable training objectives for primitive outputs.
- Explicit tool calls that move geometric computation outside the model.
For developers, the most practical conclusion is that visual primitives move visual reasoning from language-based descriptions toward numerical representations. Whether expressed through special tokens or plain-text coordinates, computable and verifiable references can meaningfully reduce the reference gap.
