Two Approaches to Multimodal Visual Reasoning and Their Engineering Practices
This article examines why multimodal models often underperform their demos on visual tasks, compares two mainstream technical approaches—image-based thinking and visual primitives—and explains why dense counting and maze navigation are especially error-prone. It also provides a practical evaluation workflow with sample code, plus recommendations for configuring and upgrading CLI-based agent toolchains. Readers will learn how to build a fixed test set, attribute failures correctly, and manage versions and configurations in a traceable way.
1. Background: Why Demo Results Differ from Real-World Performance
Image input is now a standard capability of multimodal large models. Developers feed screenshots, tables, and charts to models, expecting them to read images, count objects, locate targets, and plan paths. In practice, however, results often fall noticeably short of what launch materials or papers suggest.
When results diverge, there are three possible causes: the model’s visual capability itself is limited, the server-side inference setup differs from the demo environment, or the client-side version and parameter configuration are incorrect. Each type of problem requires a different troubleshooting method, so they must be isolated before any optimization is discussed.
2. Two Mainstream Technical Approaches
2.1 The Image-Thinking Approach
This approach lets the model invoke image operations during reasoning—cropping local regions, zooming into details, or rotating the image—to focus attention on key areas, and then deliver an answer in natural language. Its strengths are strong generality, reuse of existing vision encoders, and easy integration into existing inference pipelines.
Its main risk is that region pointing relies on natural language descriptions. The model must refer to a target with text like “the red box in the upper-left corner.” Once a description is ambiguous, every subsequent reasoning step drifts off course.
2.2 The Visual Primitives Approach
Recent research decomposes multimodal image understanding into two layers. The first is the perception gap: the vision encoder cannot see fine details clearly. The second is the reference gap: the model still describes images in natural language while reasoning, and the language layer itself introduces ambiguous reference.
To address the second layer, the visual primitives approach has the model output precisely locatable visual pointers, such as point coordinates or bounding boxes. Targets are referenced through structured positional information rather than text descriptions. The benefit is that for dense counting or complex localization, each reasoning step can be bound to an explicit object.
2.3 Comparing the Two Approaches
| Dimension | Image-Thinking Approach | Visual Primitives Approach |
|---|---|---|
| Pointing method | Natural language description plus local cropping | Structured pointers such as point coordinates and bounding boxes |
| Main risk | Ambiguous descriptions cause localization errors | Higher demands on coordinate representation and training data |
| Best-suited tasks | General QA, local detail inspection | Dense counting, precise localization, path planning |
When choosing between them, do not simply pick the more advanced approach—consider the reference requirements of your business task. For general QA scenarios, the image-thinking approach is usually sufficient. For scenarios with hard requirements on counting and localization accuracy, structured reference should be validated first.
3. Why Counting and Navigation Tasks Fail Easily
3.1 Dense Counting
The difficulty of counting lies in occlusion and duplication. When a model enumerates objects one by one, it may miss occluded individuals or count the same object twice. Take a group photo as an example: with many people in varied poses, deviations in the count are common.
Structured pointers can constrain the counting process so that every counted object corresponds to an explicit marker. This constraint reduces both omissions and duplicates—but only if the model’s underlying localization capability is reliable enough.
3.2 Maze Navigation
Navigation tasks require the model to output a continuous sequence of actions, such as up, down, left, and right. A single pointing error at any step accumulates through subsequent steps and eventually invalidates the entire path.
When evaluating these tasks, record not only whether the model reaches the goal, but also at which step the error occurs. This is the only way to tell whether the problem lies in initial spatial understanding or in later action planning.
3.3 Common Gaps Between Demo and Production Performance
The usual causes of the gap include:
- Input images are compressed or downsampled on the server side, losing detail.
- The demo uses a different inference mode from everyday usage.
- Sampling parameters, system prompts, or tool-call settings differ.
- Client and server versions are inconsistent.
Troubleshooting should control variables one at a time; do not draw conclusions from one or two casual trials.
4. How to Verify a Model’s Visual Capability
4.1 Basic Principles
Do not treat launch materials as verification evidence. Build a small, fixed test set tailored to your own business scenarios and measure repeatedly under identical conditions.
4.2 Implementation Steps
- Prepare samples. Prepare twenty to fifty images each for counting, localization, and maze tasks, covering different densities and difficulty levels. Answers must be manually verified.
- Fix conditions. Use the same API, the same input resolution, and the same prompt, and set the sampling temperature to its minimum value to reduce randomness.
- Record structured results. Track accuracy, average response time, and failure types—distinguishing at least counting errors, localization errors, and format errors.
- Attribute failures. Check whether the input was compressed, whether the output was truncated, and whether the prompt steered the model toward a wrong answer.
Below is illustrative code for a counting evaluation; replace the actual API call with whatever service you use:
import refrom dataclasses import dataclass@dataclassclass CountingCase:image_path: strquestion: strexpected: intdef parse_first_int(text: str):"""Extract the first integer from the reply to avoid concatenating multiple numbers."""match = re.search(r"\d+", text)return int(match.group()) if match else Nonedef run_counting_eval(cases, ask_model):records = []for case in cases:reply = ask_model(image_path=case.image_path, prompt=case.question)predicted = parse_first_int(reply)records.append({"image": case.image_path,"expected": case.expected,"predicted": predicted,"correct": predicted == case.expected,})accuracy = sum(r["correct"] for r in records) / len(records)return accuracy, records
This script does exactly one thing: parse the model’s reply into an integer and compare it with the ground truth. The parser takes only the first number so that a reply like “3 rows, 12 people in total” is not misread as 312.
4.3 Interpreting Results
A single run is not enough to conclude anything. Run multiple times, observe the variance, and group statistics by task density. If the model performs well on low-density samples but degrades rapidly on high-density ones, its bottleneck lies in multi-object reference capability rather than basic recognition.
5. Configuring and Upgrading the Agent Toolchain
5.1 Common Problems
When working with command-line tools, the following situations are frequent: an older version does not support a parameter mentioned in the documentation; guidance on where configuration lives and in what format is inconsistent; secondhand write-ups online contradict the official documentation. All of these can make you believe the mistake is yours.
5.2 Recommended Practices
- Confirm the version first. Use
--versionto check the current version, then compare it against the official release notes. - Upgrade uniformly. Globally installed packages should be upgraded through the same package manager to avoid multiple copies coexisting on the system.
- Trust the help output. Use
--helpor subcommand help to see which parameters the current version supports, rather than relying on secondhand documentation. - Understand configuration precedence. Most CLI tools follow the common rule that command-line arguments override environment variables, which in turn override configuration files. If behavior differs from expectations, check whether precedence has been overridden.
- Use official model identifiers. Model names should come from the official API documentation or the server-side model list—do not copy spellings from third-party articles.
Illustrative commands follow; all names are placeholders:
# 1. Check the current version<cli-tool> --version# 2. Upgrade the globally installed package<package-manager> update -g <cli-package># 3. Start with a specified configuration profile<cli-tool> --profile web
5.3 Managing Configuration Changes
Put configuration files under version control and record the reason for every change. When anomalies appear, you can quickly diff before and after to determine whether a configuration change caused the problem.
6. Recommendations for Teams
- Make visual capability testing part of the model selection process, replacing demo samples with a self-built test set.
- Distinguish demo metrics from production metrics—the former only shows what is possible, while the latter determines whether you can ship.
- Rely only on official channels for tools and documentation, and record the version numbers in use within the team.
- Manage configuration and version changes centrally so that problems are traceable and results are reproducible.
