Multimodal Agent Visual Reasoning: From Visual Primitives to Thinking with Images
This article examines why multimodal agents often fail at tasks that require stable visual reference, such as dense counting, localization under occlusion, and path planning, and compares two technical routes: structured visual primitives with unambiguous reference, and thinking with images through repeated image operations. It also covers practical harness concerns around configuration, versioning, defaults, and reproducibility, outlines an evaluation workflow for verifying real visual capability, and offers platform-level deployment advice for running multimodal agents in production.
1. Background: Why Multimodal Agents See but Cannot Explain
Recent multimodal research has focused heavily on the “perception gap”—whether a model can truly see and capture all targets in an image. As resolution, tiling strategies, and visual encoders have matured, however, the industry has found that recognition failures are not always caused by the image side. The main issue is that the model still relies on natural language to describe the scene while reasoning. For tasks such as dense counting, localization under complex occlusion, and path planning, once the model is required to explain targets clearly in sentences, the reference chain breaks down quickly.
These failures typically show three patterns:
- Counting drift: the same target is repeatedly counted or missed across reasoning steps, producing contradictions.
- Reference ambiguity: expressions like “the pillar farther back on the left” point to unstable targets across multiple reasoning turns.
- Planning failure: in maze or grid environments, the intermediate states described in language fall out of sync with the real state, and the path breaks over long chains.
The conclusion is that what is needed is a stable, reusable, and unambiguous reference mechanism in a continuous visual space—not longer natural language descriptions.
2. Route One: Visual Primitives and Unambiguous Reference
One approach, often called “visual primitives” in the industry, abstracts targets in an image into structured pointers that can be addressed precisely. Reasoning then operates directly on these pointers instead of translating the scene into text first. The design usually has four layers:
- Target instantiation: assign a stable identifier and coordinate region to each recognized target.
- Explicit relations: express relative position, containment, occlusion, and other relations as structured fields.
- Operational primitives: provide a minimal operation set for selection, counting, comparison, and movement.
- Traceable state: bind each reasoning step to a specific primitive for verification and rollback.
An illustrative structured intermediate representation can be:
{"objects": [{"id": "o1", "bbox": [120, 88, 210, 260], "role": "blocker"},{"id": "o2", "bbox": [300, 120, 360, 300], "role": "target"}],"relations": [{"type": "left_of", "from": "o1", "to": "o2"}],"ops": [{"name": "count", "filter": {"role": "target"}}]}
The value of this representation is that it decouples “seeing” from “reasoning”: the visual side produces stable references, and the language side only orchestrates operations. The cost is high implementation complexity, requiring additional annotation-style training objectives and supporting tooling.
3. Route Two: Thinking with Images
Another, more classic and engineering-friendly route is to let the model repeatedly call image operation tools during reasoning—cropping, zooming, annotating, overlaying grids, and local resampling—and write intermediate results back into the context, forming an “operate–observe–operate again” loop. It does not force the introduction of a new reference grammar; instead, it treats the image itself as a writable scratchpad.
Its strengths are strong generality and low migration cost, with almost no changes to the model structure. Its weakness is that each step consumes context and compute, and long-chain tasks are prone to error accumulation. In engineering practice, it usually needs explicit stopping conditions and budget limits, such as capping the number of crops per task and the maximum zoom factor.
The two routes are not mutually exclusive: structured reference suits strongly constrained tasks like counting and localization, while thinking with images suits exploratory, open-ended visual reasoning. A common practice is layered composition—using structured state at the upper layer to maintain global consistency, and image operations at the lower layer for local evidence gathering.
4. Engineering Reality at the Agent Framework Level
Whichever route is chosen, it ultimately lands on an execution harness. The harness determines whether model capabilities can be released reliably, and common problems concentrate in four areas:
- Inconsistent configuration entry points: documentation examples do not match the configuration format that actually takes effect, so users who edit according to the examples see no change.
- Version drift: the framework and model capabilities upgrade in sync, and new features silently fail under old versions without explicit notice.
- Mismatched default profiles and scenarios: default parameters meant for server-side calls are used directly in interactive scenarios, producing unpredictable behavior.
- Missing reproducibility: without complete records of prompts, tool returns, and random seeds, problems are hard to replay.
The corresponding improvements are: consolidate configuration into a single readable format with validation; print the effective configuration and version at startup; provide validated presets for different scenarios; and enable structured logging by default to record the tool call chain and intermediate artifacts.
5. Evaluation: How to Tell Whether Visual Capability Is Real
A mismatch between claimed visual capability and actual behavior on the web is the most common point of contention for these models. Building an executable verification process is more effective than arguing:
- Build a small regression set: several cases each for dense counting, occluded localization, grid navigation, and chart reading.
- Fix inputs and parameters: unify resolution and prompt templates to eliminate interfering variables.
- Record intermediate trajectories: save each image operation and model output to locate whether failure occurs in perception or reasoning.
- Dual-track comparison: run the same task with structured reference and with thinking with images, comparing stability and cost.
- Quantitative metrics: counting accuracy, localization hit rate, path success rate, average steps, and timeout rate.
An illustrative evaluation skeleton:
def evaluate(cases, runner):report = {}for c in cases:traj = runner.run(c.image, c.prompt)report[c.id] = {"correct": c.verify(traj.final_answer),"steps": len(traj.ops),"failed_stage": classify_failure(traj)}return summarize(report)
6. Platform-Level Deployment Advice
To support multimodal agents in production, it is advisable to build in layers on general cloud capabilities: use object storage to host images and intermediate artifacts, use a container platform to run inference and tool services, use a message queue for task decoupling and peak shaving, and use logging services and monitoring alerts to observe the latency and failure distribution of long-chain tasks. In such scenarios, Baidu AI Cloud is typically used to provide the general capability categories above, helping teams turn experimental scripts into operable services.
7. Conclusion
Competition in visual capability has shifted from “whether it can see clearly” to “how it can reference stably while reasoning.” Structured visual primitives provide determinism under strong constraints, thinking with images provides flexibility in open scenarios, and the harness’s configuration consistency, version transparency, and reproducibility are the hidden variables that decide success or failure. The advice for developers is straightforward: first build a replayable evaluation loop, then decide the technical route, and finally use platform-level means to solidify the capability into a service.
