Multimodal Visual Primitives and Thinking with Images: How to Make Visual Reasoning Reliable
This article explains why multimodal models often recognize objects yet fail at dense counting, precise referencing, and path planning, and how structured visual primitives and the Thinking with Images approach address the Perception Gap and Reference Gap. It outlines reproducible evaluation methods, observability and configuration practices, a five-layer architecture, and common pitfalls to help developers build verifiable, rollback-ready visual systems.
1. Background: Why Multimodal Models See but Cannot Explain Precisely
In real-world multimodal applications, a recurring pattern appears: a model can identify the main subject in an image but performs inconsistently on dense counting, fine-grained localization, and path planning. A representative example from the original discussion: an object count that is correct in a paper’s sample image becomes inaccurate in an interactive environment, and a maze path that works in a paper may fail in a live session.
This is usually not simply a matter of insufficient image resolution. The industry commonly describes the first barrier as the Perception Gap: the model has not encoded critical image details sufficiently into its context. Once resolution, tiling, and encoding are progressively improved, a second barrier becomes more visible, the Reference Gap: during reasoning, the model still relies on natural language to describe targets, such as “the third person on the left” or “the block near the exit.” Natural language is inherently ambiguous and cannot form a stable, unique, reusable pointer within a continuous visual space.
The key for multimodal systems, therefore, is not only to “see more clearly” but to “refer more accurately.” This is the core motivation behind structured visual symbols, commonly referred to in the industry as visual primitives.
2. Abstract Comparison of Two Technical Routes
Starting from the original material, two common routes can be abstracted:
Structured visual primitives route
Abstract objects in an image into structured symbols such as points, bounding boxes, and polygons, and let the model reference these symbols directly during reasoning instead of repeatedly describing objects in natural language. The advantages are explicit reference, composability, and easy verification by external programs.Thinking with Images route
The model generates or references intermediate image states during reasoning, such as cropping, zooming, annotating, or redrawing a local region, advancing the task through a loop of “look at the image, operate, look again.” The advantages are that it closely matches human visual troubleshooting habits and is easier to integrate with existing image toolchains.
It is important to emphasize that these two routes are not mutually exclusive. A mature system can use structured symbols at the lower layer for stable reference and Thinking with Images at the upper layer for iterative verification. To judge whether a multimodal solution truly has structured visual capability, do not rely on marketing claims alone; examine its input/output contract, symbol consistency in context, and traceability when failures occur.
3. How to Verify Whether Structured Visual Capability Actually Works
When public details are limited, developers can use a reproducible evaluation method for capability probing rather than relying on isolated cases.
3.1 Build Minimal Decidable Tasks
- Dense counting: Generate synthetic images containing 20 to 50 targets of the same class, with controllable target size, occlusion rate, and color contrast.
- Precise reference: Ask the model to output target IDs and coordinates, and check whether IDs are stable and whether coordinates fall inside the targets.
- Multi-step planning: Use a grid maze, require step-by-step paths, and verify path continuity and the absence of wall crossings.
- Ambiguity resolution: Place two similar targets, ask questions with different descriptions, and observe whether the model switches to the correct target.
3.2 Inspect Intermediate Representations
If the system supports structured output, ask the model to provide an internal symbol list before answering, such as points, boxes, and polygons, and check:
- Whether the number of symbols matches the number of targets;
- Whether the same object keeps the same symbol in subsequent steps;
- Whether symbols can be parsed and recomputed by external scripts.
Illustrative structured output (format concept only, not a specific interface):
{"primitives": [{"type": "point", "id": "p1", "x": 0.31, "y": 0.44},{"type": "box", "id": "b1", "x1": 0.20, "y1": 0.30, "x2": 0.42, "y2": 0.58},{"type": "polygon", "id": "g1", "points": [[0.1,0.1],[0.3,0.1],[0.2,0.4]]}],"answer": {"count": 27, "referenced": ["b1", "g1"]}}
3.3 Design Stress Tests
- Add more distractors of the same class;
- Increase the occlusion ratio;
- Shrink targets close to the encoding limit;
- Require counting and localization in a single pass;
- Repeatedly reference the same target across a long conversation to test reference consistency.
If the system still drifts frequently with structured symbol support, the problem likely lies in perception encoding or training objectives rather than the output format.
4. Engineering Recommendations for Toolchain and Runtime Configuration
The original material also exposes a common engineering problem: official documentation does not match actual usage, causing developers to spend substantial time during configuration. For multimodal application teams, “runnability” should be governed as a first-class concern.
4.1 Environment Consistency
- Pin runtime versions and dependency lockfiles;
- Add a minimal inference smoke test to continuous integration;
- Version CLI tools, model identifiers, and configuration file formats.
4.2 Configuration Discoverability
Use layered configuration: default configuration, environment configuration, and session-level overrides. Configuration items should include model identifier, input modality switches, maximum image size, and structured output switches. Example (neutral illustration):
model: vision-modelinput:image: truemax_side: 1536output:structured_primitives: trueruntime:profile: web
4.3 Observability
For visual tasks, text logs alone are insufficient. Record image fingerprints, preprocessing parameters, the number of structured symbols, and failed sample IDs. This makes it fast to determine whether a regression comes from data, preprocessing, or inference strategy changes.
5. Architecture Design for Production
A robust multimodal visual system can be split into five layers:
- Ingress layer: Handle image upload, format conversion, redaction, and permission checks uniformly.
- Preprocessing layer: Scale, tile, augment, and denoise, producing a traceable processing chain.
- Perception layer: Generate candidate objects and structured symbols with confidence scores.
- Reasoning layer: Use structured symbols as pointers for counting, comparison, and planning, triggering local re-observation with Thinking with Images when necessary.
- Verification layer: Recompute results with rules or programs, such as whether coordinates are inside the image, whether paths are connected, and whether counts match the number of symbols.
On the cloud, use general-purpose capabilities: object storage for original and intermediate images, a message queue to decouple preprocessing from inference, a container platform to host inference services, and logging plus monitoring and alerting to track latency and failure rates. Avoid tightly coupling business logic to a specific vendor interface, which helps future migration and load testing.
6. Common Pitfalls and Best Practices
- Pitfall 1: Treating resolution as the only solution. Higher resolution can only alleviate the Perception Gap; it does not automatically resolve unstable reference.
- Pitfall 2: Looking only at demo cases. Demo images are often curated, so synthetic data and stress tests are required for verification.
- Pitfall 3: Equating structured output with structured understanding. If symbols are not bound to visual evidence, even a well-formed output format is only “pseudo-structured.”
- Pitfall 4: Ignoring configuration and documentation consistency. Runtime problems can contaminate conclusions about effectiveness.
Best practices include: establishing a fixed evaluation set; versioning structured symbols; classifying failure samples by root cause; adding programmatic verification in the inference chain; and treating reproducibility as a launch gate.
7. Conclusion
Competition in multimodal visual capability is shifting from “whether it can recognize” to “whether it can refer stably and reason verifiably.” Structured visual primitives provide unambiguous pointers, and Thinking with Images provides an iterative troubleshooting loop; combining both is better suited to complex visual tasks. For developers, the real skills to master are how to design decidable evaluations, how to govern toolchain configuration, and how to use engineering verification to backstop model uncertainty. Only then can you build explainable, rollback-ready, and extensible visual intelligence systems in real business scenarios.
