How Multimodal Models Bridge the Referential Gap: Visual Primitives vs. Thinking with Images
This article examines why multimodal models often fail at tasks that demand spatial precision, such as dense counting, exact localization, and path planning, even when their image descriptions sound fluent. It separates the perception gap from the referential gap, then compares two main responses—visual primitives and thinking with images—along with their engineering trade-offs. It also outlines automatically scorable evaluation methods, prompt and tool-call design practices, and the role of the agent harness in production, closing with selection advice and a practical checklist.
1. Where the Problem Starts: A Counting Failure on a Single Image
Once multimodal capabilities move into everyday engineering practice, a recurring pattern appears: models describe image content fluently, yet they frequently fail on tasks that require spatial precision, such as dense counting, exact localization, and path planning. Given a group photo of more than twenty players, a model may report a count that does not match reality. Given a maze image, the path a model proposes may simply be impassable in the actual image.
These failures are often attributed to “insufficient resolution” or “the model is not large enough,” but the more fundamental cause is that the model still relies on natural language to refer to targets in an image during reasoning. As the number of targets grows, as they occlude one another, and as their boundaries blur, natural-language reference becomes ambiguous and the reasoning chain breaks down. This article takes this “referential gap” as its core and systematically reviews its causes, the two mainstream response routes, evaluation methods, and key engineering practices.
2. Root-Cause Breakdown: The Perception Gap and the Referential Gap
The industry usually splits the difficulty of multimodal recognition into two layers.
The first layer is the perception gap: visual information on the input side is compressed, scaled, or cropped, and details are lost, so the model “cannot see clearly.” Common mitigations include raising input resolution, dynamic tiling, local zooming, and running object detection first before feeding regions into recognition.
The second layer is the referential gap: even when the model “sees clearly,” it still has to describe “that slightly reddish small square in the top-left corner” in natural language during chain-of-thought reasoning. In dense scenes this description is inherently unstable: the referent may not be unique, spatial relations are vaguely expressed, and once one step refers to the wrong target, all subsequent reasoning drifts.
Separating the two layers matters because perception problems can be mitigated through input engineering, whereas the referential problem requires changing the “coordinate system” used during reasoning—letting the model reference visual objects with stable, unambiguous pointers instead of a piece of natural language that may be misunderstood.
3. Two Technical Routes: Visual Primitives and Thinking with Images
3.1 The Visual Primitives Route
The core idea of visual primitives is to establish unambiguous pointers to objects in continuous visual space—for example, using structured markers such as polygons, points, and bounding boxes as the basic objects of operation during reasoning. The model composes, iterates over, and computes on these markers directly while thinking, rather than translating them into language first and then reasoning.
Its advantages are high precision, composability, and easy alignment with external tools; the cost is that the model and the inference framework must stay consistent in generating, parsing, and writing back these markers, which imposes stronger engineering constraints.
Illustrative structured markers can be expressed as:
<point>(x, y)</point><polygon>[(x1,y1), (x2,y2), ...]</polygon><box>(x_min, y_min, x_max, y_max)</box>
3.2 The Thinking with Images Route
“Thinking with images” emphasizes letting the model repeatedly “look at the image—operate—confirm again” during reasoning, forming a closed loop through cropping, zooming, annotating, and re-inputting. It does not necessarily require the model to natively output structured primitives; instead, it treats image operations as part of the reasoning steps.
Its advantages are strong generality, low dependence on internal model capabilities, and ease of implementation in general-purpose agent coding tools or agent frameworks; the cost is more steps, higher context and call costs, and greater demands on the stability of tool calls.
3.3 Engineering Implications of the Two Routes
From an engineering perspective, visual primitives are more like “making spatial references first-class citizens,” suited to precision-first, controllable workflows; thinking with images is more like “trading interaction for precision,” suited to fast integration and broad adaptation. What truly determines results is often not the route label but whether the accompanying harness (the agent runtime framework) handles image operations, state write-back, and verification solidly.
4. Verifiable Evaluation Methods: Trust Use Cases, Not Marketing Claims
For a new model or new capability, the most reliable approach is to build your own small evaluation set and test real performance with automatically scorable tasks.
- Dense counting: generate or collect images containing many targets of the same kind; the ground truth is an integer, compared directly.
- Exact localization: given a target description, require coordinates or a box as output, and measure with intersection over union (IoU).
- Path and planning: maze or grid images where the ground truth is a reachable path, checked for reachability and optimality.
- Referential consistency: ask about the same target multiple times on the same image and observe whether the coordinates stay stable.
- Multi-turn consistency: count first, then localize, then plan, and check whether earlier conclusions contaminate later ones.
A minimal executable evaluation skeleton looks like this:
def evaluate(cases):report = []for c in cases:out = call_model(c.image, c.prompt)score = c.metric(out) # accuracy for counting, IoU for localizationreport.append((c.id, score, out))return summarize(report)
The key point is that the evaluation set must cover difficult distributions such as dense, occluded, low-contrast, and complex backgrounds, and the metrics must be automatically computable to avoid noise from subjective human judgment.
5. Prompt and Tool-Call Design: Confining Uncertainty
Whichever route you take, the design of prompts and tool protocols directly affects stability.
- Define an explicit output contract: require the model to output only structured results and forbid explanatory text, so programs can parse it easily.
- Constrain steps: split “localize first, then count, then plan” into explicit steps whose outputs can be verified individually.
- Local zooming: crop and zoom suspected dense regions before counting or localization.
- Read-back verification: redraw the coordinates or boxes the model produced onto the image and let the model confirm whether they hit the target.
- Failure fallback: when parsing fails or confidence is low, trigger a retry or switch strategies instead of continuing the erroneous reasoning.
An illustrative tool protocol:
{"action": "annotate","primitives": [{"type": "box", "value": [120, 88, 210, 190]},{"type": "point", "value": [165, 139]}],"expect": "recheck"}
6. The Harness and Engineering: The Deciding Factor Beyond Model Capability
Many teams attribute all quality problems to the model while overlooking the role of the runtime framework. A mature harness needs to take on four responsibilities: context management (deciding what to keep among images and intermediate results), tool orchestration (cropping, zooming, annotating, retrieval), state consistency (coordinates and markers not drifting across turns), and observability (every step’s inputs and outputs being traceable).
For cloud deployment, a complete pipeline can be assembled from general-purpose capabilities: object storage holds original and intermediate images, a message queue decouples inference from post-processing, a container platform hosts tool services, and logging plus monitoring and alerting track call success rates and latency. This way, even if model capability fluctuates, the engineering side can still keep the workflow controllable and problems traceable.
Two common pitfalls should also be avoided. One is scattering configuration items across multiple places with no unified entry point, which leads to documentation that does not match actual usage. The other is exposing internal tools directly to end users without guidance or verification, which naturally makes the experience uncontrollable. The recommended practice is to provide a single configuration entry point, clear version notes, and reproducible examples.
7. Selection Advice and a Practical Checklist
- For precision-first scenarios with fixed workflows, prefer structured-primitive approaches and invest effort in protocol alignment.
- For fast integration in varied scenarios, prefer thinking with images combined with a strong harness, trading interaction for stability.
- Whichever route you choose, build the evaluation set before discussing selection, and decide with data rather than impressions.
- Make “read-back verification” and “failure fallback” default capabilities rather than optional ones.
- Govern configuration and versioning uniformly so that documentation, examples, and the runtime environment stay consistent.
8. Conclusion
The bottleneck in multimodal recognition is shifting from “whether it can see” to “whether it can point accurately.” Understanding the distinction between the perception gap and the referential gap, clarifying the applicable boundaries of visual primitives and thinking with images, and then converging uncertainty with automatically scorable evaluation, strict output contracts, and a solid runtime framework is the viable path to bringing multimodal capabilities into production.
