How Multimodal Models Think with Images: Visual Referencing Approaches

    Multimodal models can recognize image content yet still lose track of objects during reasoning. This article compares image manipulation with structured visual references, distinguishes perception gaps from reference gaps, and explains how to evaluate reference consistency, localization accuracy, and computational trade-offs. It also covers common failure modes and practical steps for reproducible deployment and testing.

    1. Why Image Reasoning Goes Wrong

    When multimodal large language models process images, they typically need to do two things: recognize the image content and accurately refer to objects within it during reasoning. The first is a perception problem; the second concerns how reasoning is organized. These problems are often treated as interchangeable, but their failure modes differ.

    Evaluations commonly reveal the following issues:

    • Counts become inaccurate when an image contains many objects with similar appearances.
    • A model can describe an object’s location in semantically plausible terms but cannot provide a consistent spatial position.
    • During multi-step reasoning, a model switches between references such as “the second person from the left” and “that person in the image,” leading to incorrect conclusions.

    These failures suggest that even when image information is encoded correctly, object correspondences can be lost during reasoning.

    2. Two Main Technical Approaches

    Two broad approaches address this problem.

    2.1 Thinking with Images

    This approach allows a model to manipulate images during reasoning—for example, by cropping regions, enlarging details, adding numbered labels, or drawing bounding boxes. The resulting image is then supplied as a new input for further reasoning.

    Its main advantage is relatively straightforward implementation: existing image encoders and tool-calling mechanisms can be reused. However, each operation can require another image-encoding pass, extending the reasoning sequence and potentially introducing errors through intermediate results.

    2.2 Visual Primitives

    Visual primitives represent image locations as structured pointers, such as point coordinates, bounding boxes, or segmentation-region identifiers.

    Instead of referring only to “that red object” in a reasoning trace, the model explicitly references a coordinate structure with a fixed format. Each object under discussion can then have a unique identifier, reducing the ambiguity of natural-language references.

    The underlying assumption is that natural language can be ambiguous when referring to similar objects, especially in dense scenes with repeated appearances.

    3. Perception Gaps vs. Reference Gaps

    Two concepts are particularly important when discussing visual primitives.

    A perception gap occurs when the model’s visual encoding does not adequately represent image details. Common remedies include increasing image resolution, improving the encoder, and expanding visual training data.

    A reference gap occurs when image information has already been encoded, but object correspondences are lost as the model describes objects in natural language during reasoning. Even rich visual features may not prevent counting and localization errors if the reasoning text cannot consistently point to a specific object.

    This distinction guides the choice of intervention. A perception gap calls for better visual representations. A reference gap calls for better ways to represent objects within the reasoning process.

    4. An Example of Structured Visual References

    The following example illustrates structured referencing. Its field names are illustrative, not an interface definition for any specific system.

    1. {
    2. "step": 3,
    3. "reasoning": "Objects [obj_07] and [obj_12] are in the same row and are similar in size.",
    4. "references": [
    5. {"id": "obj_07", "type": "box", "coords": [0.12, 0.40, 0.25, 0.78]},
    6. {"id": "obj_12", "type": "box", "coords": [0.31, 0.42, 0.44, 0.80]}
    7. ]
    8. }

    This representation offers three advantages:

    1. Each object has a stable identifier that later steps can reuse, avoiding vague phrases such as “the person mentioned earlier.”
    2. Coordinates can be checked programmatically—for example, to determine whether a box extends beyond the image or whether two boxes overlap.
    3. Counting can be expressed as an operation on a set of identifiers, making the result easier to audit.

    Structured references do not guarantee correctness. Coordinates still depend on perception quality, and a model can produce a correctly formatted box at the wrong location. Evaluation must therefore check both format validity and spatial accuracy.

    5. Comparing the Approaches

    Dimension Thinking with Images Visual Primitives
    Information representation Modified images Structured coordinates and identifiers
    Reasoning traceability Requires retaining intermediate images References are directly visible in text
    Computational overhead Each step may require additional image encoding Primarily increases text length
    Implementation complexity Requires an image-manipulation toolchain Requires format conventions and parsing
    Main risk Errors accumulate across repeated operations Coordinates are valid in format but inaccurate in location

    The choice should depend on the task. Thinking with images is a natural fit for tasks that require magnifying fine details. Structured references are easier to validate for counting and reasoning about relationships among multiple objects. The approaches can also be combined.

    6. How to Evaluate Whether a Model Uses Visual References

    The presence of a particular output format does not establish that the model actually relies on that mechanism. A reliable evaluation should include the following checks.

    6.1 Control Prompt Variations

    Run the same task with a standard prompt, a prompt requiring structured references, and a prompt imposing an unrelated format. Compare the resulting reasoning traces.

    If structured references appear only when explicitly required, the format is more likely driven by the prompt than by the model’s default behavior.

    6.2 Check Reference Consistency

    Count the identifiers used during reasoning and compare them with the final answer. For a counting task, if the final answer is N but the trace contains M unique identifiers, a mismatch should be recorded as a break in reasoning consistency.

    1. def check_reference_consistency(trace: dict, answer: int) -> dict:
    2. """Check whether structured references match the final count."""
    3. ids = set()
    4. for step in trace.get("steps", []):
    5. for ref in step.get("references", []):
    6. ids.add(ref["id"])
    7. return {
    8. "unique_refs": len(ids),
    9. "final_answer": answer,
    10. "consistent": len(ids) == answer,
    11. }

    This function checks only logical consistency. It does not establish that the coordinates are correct; spatial accuracy requires separate validation.

    6.3 Evaluate Localization Against Ground Truth

    On an annotated dataset, calculate the intersection over union (IoU) between predicted and ground-truth boxes, then report the proportion that meets the chosen threshold.

    For counting tasks, compare predicted counts with annotated counts using absolute error. Evaluation samples should cover different object densities, levels of occlusion, and degrees of visual similarity. Otherwise, the findings may not generalize.

    6.4 Measure Output Length Against Accuracy Gains

    Structured reasoning can substantially increase output length. Record the generated length for each sample and examine whether accuracy gains are proportional to that increase.

    If output length grows substantially while accuracy barely changes, the mechanism offers limited value relative to its cost and may not be suitable for direct use in latency-sensitive applications.

    6.5 Separate Demonstrations from System-Level Performance

    Examples in papers or official demonstrations are often selected. Reproduction efforts should use randomly sampled test sets and report aggregate metrics rather than a handful of successful examples.

    An isolated failure does not invalidate a method, but an isolated success does not establish overall capability either.

    7. Common Failure Modes

    Dense counting tasks frequently expose four types of errors:

    • Undercounting: Occluded objects or objects near image boundaries are omitted.
    • Double counting: The same object receives different identifiers in separate reasoning steps.
    • Category overextension: Similar-looking objects outside the requested category are included.
    • Format drift: Early steps use structured references, but later steps revert to natural-language descriptions.

    Track these error categories separately to identify where improvements are needed. A high double-counting rate suggests a need for identifier deduplication. Frequent format drift indicates a need for stricter output constraints.

    8. Engineering Practice: CLI Version and Configuration Management

    When using model-related command-line tools, configuration problems often surface before model limitations do. The following practices provide a general approach to managing them.

    8.1 Confirm the Version First

    After a tool is upgraded, configuration options from older versions may no longer work. Check the installed version and read the corresponding release notes before use.

    1. # Illustrative: <tool-name> is a placeholder for a command-line tool.
    2. <tool-name> --version
    3. npm update -g <tool-name> # Or use the appropriate package manager's update command.
    4. <tool-name> --version

    8.2 Use Configuration Profiles for Different Environments

    A tool may need to switch between local debugging, testing, and production environments. Create a separate configuration profile for each environment rather than manually changing arguments for every run.

    1. <tool-name> --profile web
    2. <tool-name> --profile batch

    Keep profiles in a consistent location outside version control. Inject sensitive information through environment variables or a secrets service.

    8.3 Do Not Rely on a Single Source of Instructions

    Usage guidance may be spread across official announcements, documentation, community posts, and example code. These sources may describe different versions.

    When configuration fails, check the tool version first, then the configuration format, and finally the runtime environment variables.

    8.4 Run Regression Tests Around Upgrades

    After upgrading a tool or changing the model version, rerun a fixed test set and compare key metrics.

    If performance declines, roll back first, then investigate the cause.

    9. Selection and Implementation Recommendations

    The analysis above leads to five practical recommendations:

    1. Identify the type of problem. If the bottleneck is insufficient visual detail, improve perception first. If counting and localization remain unstable, consider structured references.
    2. Start with a small controlled experiment. Compare the approaches on data resembling the intended workload, recording accuracy, latency, and cost.
    3. Include format validation in the workflow. Validate structured outputs automatically and track noncompliant samples separately.
    4. Maintain a long-term evaluation set. Model versions change frequently; a fixed test set makes results comparable over time.
    5. Keep conclusions appropriately bounded. Individual examples do not represent overall capability. Report sample sizes and margins of error.

    10. Limitations and Future Directions

    Structured visual referencing still has clear limitations. Coordinates depend on perception quality, format constraints can increase output length, and different tasks require different reference representations.

    Directions worth watching include joint training of reference representations and visual encoders, automated detection of reference inconsistencies during reasoning, and mechanisms that maintain stable object identifiers across long reasoning sequences.

    For engineering teams, the practical starting point is a reproducible evaluation workflow. Use measured results to determine whether a reasoning format delivers meaningful benefits before committing to implementation changes.