Visual Primitives and Reasoning Paths in Multimodal Agents
This article breaks down why multimodal agents struggle with tasks like dense counting, precise localization, and spatial planning, and how structured visual primitives (points, boxes, and polygons) can replace ambiguous natural-language references. It compares image-based reasoning with structured pointers, outlines a reproducible evaluation design, and lists practical engineering guidance for preprocessing, output validation, context assembly, observability, and troubleshooting.
1. Where the Real Bottleneck Is
Multimodal agents are expected to handle a full pipeline in scenarios such as intelligent coding tools, document understanding, and UI automation: see the image, locate the target, count, plan, and execute. Two gaps show up consistently:
- Perception Gap: Once input images are compressed, resized, or tiled, fine details are lost and the model effectively “cannot see clearly.”
- Reference Gap: Even when details are visible, the model still refers to targets in natural language (for example, “the third button in the top-left corner”). Natural language is inherently ambiguous for dense targets, heavy occlusion, and long-horizon planning, which breaks the reasoning chain.
Two common symptoms in the original discussion—unstable crowd counting and failed maze path planning on the interactive side—are not caused by insufficient model size. They are caused by unstable references and inconsistent context assembly. This distinction matters because evaluation must separate capability problems from engineering pipeline problems.
2. Modeling Visual Primitives
The core idea behind visual primitives is to introduce unambiguous pointers into continuous visual space instead of natural-language references. Common forms are three structured objects: points, boxes, and polygons. They act as precisely addressable “variable names” within the reasoning chain.
The advantages come down to three points:
- Addressability: Coordinates are deterministic values and do not drift with phrasing.
- Composability: Points anchor locations, boxes constrain regions, and polygons capture irregular boundaries.
- Verifiability: Structured output is easy to validate programmatically, which supports automatic scoring and regression testing.
At the representation layer, these schemes typically add paired structured markers (start/end) to the vocabulary so the model can generate and reference a visual structure as a single unit. A schematic form (format only, not any specific implementation):
<point> (x_norm, y_norm) </point><box> (x1, y1, x2, y2) </box><polygon> [(x1,y1), (x2,y2), ...] </polygon>
Three engineering details determine whether pointing is accurate: the normalization strategy (normalize by the short side or the long side), coordinate precision (number of floating-point digits), and global coordinate mapping after tiling.
3. Comparing Two Technical Routes
| Dimension | Thinking with Images | Structured Visual Primitives |
|---|---|---|
| Intermediate representation | Natural language plus image region references | Explicit pointers such as points/boxes/polygons |
| Dense counting | Prone to missed and duplicate counts | More stable |
| Complex localization | High phrasing ambiguity | Ambiguity significantly reduced |
| Explainability | Relies on textual narration | Can be visualized and validated directly |
| Implementation cost | Lower | Requires vocabulary and training data changes |
The conclusion is not “pick one.” The more reasonable engineering judgment is: enable structured pointers on subtasks that require precise spatial operations, and keep natural language for steps that require semantic explanation and summarization, mixing both within the same reasoning chain.
4. A Reproducible Evaluation Design
Evaluation must be automatable and regression-friendly. At minimum, cover four task categories:
- Dense counting: crowds, shelf products, bacterial colonies, and similar cases. Metrics: absolute counting error and duplicate counting rate.
- Precise localization: small targets and occluded targets. Metrics: normalized coordinate error and hit rate.
- Spatial planning: mazes and obstacle avoidance. Metrics: number of steps, number of collisions, and success rate.
- UI operation: control localization and clicking. Metrics: first-attempt success rate and fallback rate.
The key principle is that the same task must use exactly the same input assembly logic on the interactive side and in batch evaluation (resolution, tiling, number of history frames, coordinate mapping). In the original discussion, the mismatch between in-paper performance and interactive performance usually comes from pipeline differences here, not from model capability differences.
5. Engineering Implementation Notes
- Input side: unify the preprocessing pipeline, fix the resize and tiling strategy, and keep a global coordinate mapping table.
- Output side: apply schema validation to structured fields, and retry directly on invalid coordinates instead of degrading to text-based guessing.
- Context side: control the number of history image frames so referenced objects are not overwritten across turns.
- Observability: use general-purpose logging services and monitoring/alerting capabilities available in the cloud to record intermediate coordinates and validation results for each localization, making it faster to tell whether the issue is “cannot see clearly” or “cannot point accurately.”
- Cost side: structured output is usually shorter, and archiving intermediate images to object storage can balance quality against overhead.
6. Common Pitfalls and Troubleshooting Checklist
- Attributing interactive-side performance differences directly to model capability.
- Ignoring systematic offsets caused by inconsistent coordinate normalization baselines.
- Adding new vocabulary markers without sufficient training, so the model tends to “fabricate” structures.
- Running only end-to-end metrics without intermediate step validation, which makes root-cause attribution impossible.
- Using natural-language references in dense scenes and still expecting stable results.
Recommended troubleshooting order: preprocessing consistency → coordinate mapping correctness → structured output validity → context assembly → model capability.
7. Conclusion
The competitiveness of multimodal agents is shifting from “can it see” to “can it point stably and reason from that.” Structured visual primitives offer a verifiable, regression-friendly path, and the rigor of the engineering pipeline often determines final results more than model selection does. For development teams, the safer order of practice is to make evaluation and the pipeline solid first, then discuss route trade-offs.
