Why Multimodal Recognition Needs Visual Primitives
This article explains why many multimodal models fail at dense counting, precise localization, and spatial reasoning, and how visual primitives address the gap. It breaks the problem into a perception gap and a reference gap, shows how paired geometric tokens in the tokenizer enable parseable, supervisable, and verifiable outputs, and explains why coding tools and AI agents depend on coordinate-level precision. It also includes a reproducibility checklist, sample parsing and validation pseudocode, and layered engineering recommendations.
1. Where the Problem Starts: Models Can See, but They Cannot Describe Precisely
In real-world multimodal deployments, the most common complaint is not that a model cannot recognize an image at all. It is that the model frequently fails at dense counting, precise localization, and complex spatial relationship judgments. Given a group photo with more than twenty people, the model may produce a count that does not match reality. Given a maze navigation task, the model may output a path that cannot actually be traversed on the grid.
These failures suggest that the bottleneck is usually not the pixel input itself. It is the step where the model converts visual information back into natural language and then reasons over it.
2. Two Gaps: The Perception Gap and the Reference Gap
The industry commonly splits the difficulty of multimodal recognition into two layers.
The first is the perception gap, caused by input resolution, image tiling strategy, and encoding capability, which lead to loss of detail. Small objects, densely packed elements, and low-contrast regions may effectively disappear after encoding.
The second is the reference gap. Even if the model “sees” a target, it still has to describe its position and quantity in natural language, such as “the third person from the left” or “the block near the red marker.” Natural language is inherently ambiguous, context-dependent, and non-unique. As the number of targets grows or spatial relationships become more complex, reference breaks down and the reasoning chain falls apart.
The core idea of visual primitives is to solve the second problem: instead of asking the model to describe objects in sentences, provide a set of structured pointers that can be precisely addressed within a continuous visual space, such as points, polygons, and bounding boxes. They act like unambiguous pointers, letting the model directly reference coordinate regions while thinking, rather than repeatedly rewriting natural language descriptions.
3. Design Trade-offs Through the Lens of the Tokenizer
One observable clue for judging whether a multimodal solution truly adopts structured visual capability is whether the vocabulary introduces paired geometric markers: open and close markers for points, open and close markers for polygons, and open and close markers for bounding boxes. The paired design is not redundant. It gives the sequence clear boundaries and nesting levels, so the model can reliably generate region references instead of free-form text.
This design brings three direct benefits:
- Parseable output: content between geometric markers can be parsed directly into coordinates by a program, making post-processing and validation easier.
- Supervisable training: boxes, points, and polygons in annotated data can be mapped losslessly into marker sequences, reducing format conversion loss.
- Closed-loop reasoning: the model can “outline first, then judge,” decoupling localization from counting and reducing the burden of generating long text in a single pass.
It is worth noting that engineering implementations often waver between two routes. One emphasizes built-in visual primitives. The other favors the classic “think while looking at the image” paradigm, where the model repeatedly crops, zooms, and re-examines the image across multiple reasoning turns. The two are not mutually exclusive. The former is strong in reference precision, while the latter is strong in workflow flexibility. Mature systems are often a hybrid of both.
4. Why Coding Tools and Agent Scenarios Depend on It More
In scenarios such as intelligent coding tools and automation agents, common inputs include UI screenshots, charts, log images, and design mockups. The task is not to “describe roughly” but to “click this button, read this value, align this control.” Here, errors in natural language reference are amplified by tool calls: a single coordinate deviation can cause a mis-click or break the workflow.
The value of structured visual primitives is therefore amplified:
- Executable actions: coordinate-level output can be mapped directly to mouse, keyboard, or API parameters.
- Verifiable results: region coordinates can be cross-checked against the UI element tree, DOM structure, or templates.
- Traceable failures: a localization error can be traced to a specific primitive, instead of being vaguely attributed to the model “not being smart enough.”
5. Why Evaluations Do Not Match: A Reproducibility Checklist
Many teams find that web results do not match the descriptions in papers when reproducing reported performance. The cause is usually not model capability but differences in the pipeline. Use the following checklist to investigate:
- Input preprocessing: whether resolution, tiling strategy, and compression quality are consistent.
- Prompts and templates: whether the system prompt and output format constraints are consistent.
- Decoding parameters: whether temperature, maximum length, and structured markers are correctly truncated by post-processing.
- Tool permissions: whether multi-turn visual operations such as cropping, zooming, and re-examining are allowed.
- Version consistency: whether the client, runtime, and model versions are upgraded in sync.
Illustrative call and validation logic (pseudocode):
# Expect the model to output structured primitives, not free-form textraw = model.generate(image=img, prompt=PROMPT_WITH_PRIMITIVES)points = parse_pairs(raw, open_tag="<point>", close_tag="</point>")boxes = parse_pairs(raw, open_tag="<box>", close_tag="</box>")# Post-processing validation: reject out-of-bounds, overlapping, or abnormal-count resultsboxes = [b for b in boxes if in_bounds(b, img.size)]if len(points) != expected_count_hint(img):trigger_retry_with_crop(img)
6. Implementation Advice: Treat Visual Capability as Layered Engineering
- Layered design: the perception layer handles encoding and tiling, the reference layer handles primitive output, and the reasoning layer handles planning and tool calls. Avoid compressing all three into a single generation.
- Dual-track redundancy: produce structured primitives and free-form descriptions in parallel. The former is used for execution, and the latter for explanation and manual review.
- Observability: record primitive parsing success rate, out-of-bounds rate, and retry counts, and feed them into monitoring, alerting, and logging to form a continuously optimizable loop.
- Data loop: feed manually corrected coordinates back as training and evaluation samples to gradually close the reference gap.
7. Conclusion
The dividing line for multimodal capability is shifting from “whether it can see” to “whether it can reference accurately.” Visual primitives replace ambiguous natural language reference with geometric, parseable structured pointers, providing a stable foundation for dense counting, precise localization, and agent operations. For developers, the real practical point is not to chase a specific implementation, but to understand the layered logic of perception and reference, and to maintain consistency across preprocessing, prompts, decoding, and validation, so that multimodal capability can be reliably reproduced in real business scenarios.
