Visual Reasoning in Multimodal Models: Thinking with Images vs. Visual Primitives
This article compares two main technical routes for visual reasoning in multimodal models—visual primitives and thinking with images—and explains why paper results often differ from product behavior. It covers runtime orchestration effects, evaluation methods for counting, localization, planning, and language-prior ablation, and practical guidance for engineering teams building and testing visual reasoning systems.
1. Background: Why Paper Conclusions and Real-World Performance Diverge
Multimodal models receive image and text inputs and output textual conclusions. Whether a model can understand an image depends on the form in which image information enters the model and whether the model can actively revisit local details during reasoning.
Over the past year or two, the technical community has repeatedly encountered the same phenomenon: demo cases from papers are not reproduced reliably in productized chat interfaces. For example, a counting example shown in a paper may produce a different number of people in the interface than the annotated count, and a maze path-planning example from a paper may fail to produce a valid route in the interface. Such differences usually cannot be attributed directly to whether the model has a capability or lacks it. The causes are often distributed across the following stages:
- Image preprocessing: the interface may resize, compress, or tile uploaded images, causing small targets to lose resolution.
- Reasoning workflow: paper experiments may allow multiple rounds of visual operations, while the product interface performs only a single forward inference.
- System prompts and sampling parameters: different entry points have different default settings, which changes output stability.
- Version differences: the paper version, interface version, and canary experiment version may not be the same.
Therefore, when evaluating a model’s visual capability, the first question is whether the test measures “the model itself” or “the model plus a particular runtime environment.”
2. Two Main Technical Routes
2.1 The Visual Primitives Route
Visual primitives are structured visual units that a model can use directly, such as region boxes, key points, coordinate sequences, or predefined graphical elements. During training, the model learns to map image content to these primitives. At inference time, it directly outputs primitives to express “what it sees” and “where it is.”
The advantages of this route are:
- Precise localization: coordinates and region boxes can be compared directly with annotations, and errors can be calculated.
- Structured output: downstream programs can parse and execute it easily.
- Relatively controllable computational cost: multiple rounds of image revisiting are not required.
The limitations of this route are also clear:
- The primitive set is usually finite. When the model encounters structures outside the training distribution, such as complex topologies or dense scenes with severe occlusion, it can easily fail.
- The expressive power of primitives is limited by the training data. Fine-grained counting and long-range spatial relationships are difficult to handle reliably.
2.2 The Thinking with Images Route
Thinking with images means that the model generates visual operations within its reasoning chain, such as cropping and zooming into a region, selecting a target with a box, drawing auxiliary marks, or rotating the image, and then feeds the operation result back as a new image input to continue reasoning. It treats the image as working material that can be reviewed repeatedly, rather than as static information provided once.
The advantages of this route are:
- Strong generality: the same set of operations can cover chart reading, document understanding, detail verification, and many other tasks.
- Sensitivity to detail: key regions can be enlarged and inspected separately.
- Interpretable process: each operation can be recorded and replayed.
The limitations of this route are:
- Multiple rounds of interaction increase latency and cost.
- It depends heavily on the runtime environment: if the orchestration layer does not execute crops correctly, or if the returned image is wrong, the reasoning chain breaks midway.
- Early errors are amplified by later steps.
2.3 Comparison of the Two Routes
| Dimension | Visual Primitives | Thinking with Images |
|---|---|---|
| Information representation | Structured primitives | Alternating images and text |
| Localization accuracy | Usually higher and directly quantifiable | Depends on secondary judgment after cropping |
| Computational cost | Relatively lower | Increases with the number of steps |
| Interpretability | The output itself can be checked | Each operation can be replayed |
| Main dependency | Training distribution and primitive design | Orchestration layer and tool execution |
| Typical failure | Structures not covered by training | Cropping errors and accumulated step errors |
The two routes are not mutually exclusive. In practice, a common approach is to first use structured output for coarse localization, then start a thinking-with-images workflow for key regions to verify details.
3. Why the Runtime Environment Determines Visual Capability Performance
The same set of model weights can perform very differently in different runtime environments. This is especially obvious in the thinking-with-images route, because the visual operations in this route are not completed independently by the model. The orchestration layer must parse the model’s operation instructions, execute crops, and send the results back to the model.
The orchestration layer usually handles the following work:
- Parse operation instructions output by the model and validate whether parameters are legal.
- Execute image cropping, resizing, and other operations, and control output resolution.
- Maintain context and decide which intermediate results are retained and which are truncated.
- Set maximum steps, timeouts, and fallback strategies.
The following is illustrative code for a thinking-with-images workflow. Here, crop_image is a generic image cropping helper function, and the actual implementation can be replaced by any image processing library:
def answer_with_visual_actions(model, image, question, max_steps=5):context = [{"type": "image", "data": image},{"type": "text", "data": question},]for step in range(max_steps):output = model.generate(context)if output.action is None:return output.answer# Validate that the region is within the image bounds to avoid out-of-bounds cropsregion = clamp_region(output.action.bbox, image.size)crop = crop_image(image, region, scale=output.action.scale)context.append({"type": "image", "data": crop})context.append({"type": "text", "data": f"Crop result for step {step + 1} has been returned."})# Force an answer at the step limit to avoid an infinite loopreturn model.generate(context, force_answer=True).answer
This code reflects three engineering points:
- Region parameters must be validated. Otherwise, out-of-bounds coordinates output by the model will directly cause execution failure.
- A maximum step count must be set. Otherwise, reasoning may fall into repeated operations.
- There must be a forced convergence mechanism when the limit is reached, ensuring that the interface can return a result.
This shows that the same model may give different conclusions in a web chat interface, an API call, and an agent workflow. The cause is often in the orchestration layer, not in the model weights themselves.
4. How to Determine Whether a Model Has Visual Primitive Capability
To determine whether a model has a certain visual capability, the key is to design tests that can distinguish “genuinely understanding” from “answering correctly by chance.” The following is an executable evaluation approach.
4.1 Counting Tasks
Construct images with a known number of targets, such as crowds, shelf products, or parts. Sample model outputs multiple times, and calculate the exact-match rate and average deviation. A single result cannot establish the conclusion, because sampling itself is stochastic.
def evaluate_counting(model, cases, runs=5):report = []for image, gold in cases:preds = [parse_int(model.ask(image, "How many objects are in the image?")) for _ in range(runs)]exact_rate = sum(p == gold for p in preds) / runsreport.append({"gold": gold,"mean_pred": sum(preds) / runs,"exact_rate": exact_rate,})return report
The report should include both the exact-match rate and the mean deviation. If the mean is close to the ground truth but the exact-match rate is very low, the model has randomness rather than stable counting capability.
4.2 Spatial Localization Tasks
Ask the model to output a region box for the target, and calculate the intersection over union (IoU) against human annotations:
IoU = intersection area / union area
Usually, an IoU not lower than 0.5 is used as the hit criterion, and the hit rate is counted. This metric avoids misclassifying “correct description but wrong coordinates” as a pass.
4.3 Path and Planning Tasks
Tasks such as mazes and route maps require the model to output a path sequence. During evaluation, programmatic validation should be used to check path validity, for example, whether each step crosses a wall, whether the path is continuous, and whether it reaches the endpoint. Judging only from a textual description that “the route looks reasonable” is not reliable.
4.4 Controlled Environment Experiments
The same set of test cases should be run repeatedly under different conditions, recording the following variables:
- Input image resolution and whether compression was applied
- Whether multiple rounds of visual operations are allowed
- The version of the system prompt
- Sampling temperature and random seed
Only after controlling these variables can conclusions be attributed to the model itself.
4.5 Language-Prior Ablation
Remove the image and keep only the text question, then observe whether the model can still answer correctly. If the model can still give a close answer under the image-free condition, it relies on language priors rather than visual information.
5. Cautious Interpretation of Evaluation Conclusions
Conclusions drawn from a small number of samples are easily distorted. Common problems include the following:
- A single failure cannot prove that a capability is absent, and a single success cannot prove that it exists.
- Demo cases are usually curated and have limited representativeness.
- Models with the same name may correspond to different configurations or versions at different entry points.
- Equating interface behavior directly with the model’s upper bound confuses “model capability” with “product configuration.”
A safer approach is to report the sample size, runtime conditions, version information, and statistical metrics together with the conclusion, and to state the scope to which the conclusion applies.
6. Recommendations for Engineering Teams
- Choose the route by task. For scenarios that require precise localization and structured output, evaluate primitive-type capabilities first. For scenarios that require detail verification and reading complex charts, evaluate the effectiveness and cost of a thinking-with-images workflow.
- Incorporate evaluation into regression testing. After every change to the model or orchestration layer, rerun the fixed test set and observe metric changes.
- Record intermediate steps. Every operation and returned image in a thinking-with-images workflow should be logged so that errors can be traced to the stage where they occur.
- Set resource boundaries. Set upper limits for steps, per-call latency, and image size. When limits are exceeded, use fallback logic, such as directly returning “unable to determine.”
- Treat image content as untrusted input. Text appearing in images may contain instruction-like content. Both the model and the orchestration layer should treat it as data to be analyzed, not as commands to execute.
Evaluating visual reasoning capability is essentially evaluating the overall system of “model plus runtime environment.” Only when test conditions, runtime configuration, and statistical methods are clearly stated can conclusions have reproducible value.
