Why Multimodal Models Need Visual Primitives

    This article explains why many multimodal models struggle with fine-grained visual tasks, and how visual primitives such as points, bounding boxes, and polygons help close the referring gap. It covers the difference between perception and referring limitations, how visual primitives work as intermediate representations, how they relate to image-based reasoning workflows, and how to apply them in intelligent coding tools. It also provides practical guidance on interface design, engineering considerations, evaluation, and tuning.

    1. The Starting Point: “The Model Cannot See Clearly” Is Only the Surface

    When deploying multimodal applications, developers often run into a counterintuitive pattern: a high-resolution image is handed to the model for dense counting, or the model is asked to locate a tiny target in the scene, and the result is clearly worse than human performance. Many teams respond by increasing the input resolution or switching to a stronger vision encoder, but the gains are often limited. The reason is that the bottleneck for complex visual tasks usually lies not at the pixel level, but in how the model talks about the image.

    The processing pipeline of a mainstream multimodal model can be abstracted as follows: an image is passed through an encoder to produce a visual representation, which enters the language model together with text tokens, and the conclusion is finally emitted as a sequence of natural language tokens. This pipeline works well for coarse-grained recognition such as “what is this,” because the answer can be expressed with a few words. But for tasks like “where is the 17th target” or “do these two targets overlap,” the model is forced to compress precise positions in continuous visual space into natural language descriptions, and a large amount of information is lost in the conversion.

    This leads to two distinct gaps:

    • The perception gap: the visual representation is insufficient to support fine-grained recognition, showing up as low resolution or lost detail.
    • The referring gap: the visual information is already present, but during reasoning the model can only refer to targets in natural language, which causes ambiguity and logical breakdown.

    Visual primitives are meant to solve the second type of problem.

    2. What Visual Primitives Mean and How to Express Them

    Intuitively, visual primitives are a set of unambiguous pointers that can precisely locate objects in continuous visual space. They do not appear as the final answer; instead, they serve as intermediate representations during reasoning, letting the model reference regions in an image the way it references variables.

    Common primitive types include points, bounding boxes, and polygons: a point marks a center or key position, a bounding box expresses an enclosing range, and a polygon describes an irregular contour. Conceptually, they correspond to three basic visual operations: where to point, how large an area to enclose, and how the boundary runs.

    An illustrative form of expression is shown below (for structural explanation only, not a specific interface definition):

    1. <point> (x, y) </point>
    2. <box> (x1, y1, x2, y2) </box>
    3. <polygon> (x1,y1), (x2,y2), ... </polygon>

    The value lies in three points. First, it removes ambiguity: coordinates are definite values and do not depend on adjectives. Second, it supports compositional operations: multiple primitives can be intersected, unioned, counted, and sorted, so the reasoning process can be decomposed and verified. Third, it allows iterative refinement: the model first produces a rough box, then refines it based on the cropped region, forming a loop of observe, annotate, and observe again.

    3. The Relationship with the “Think with Images” Approach

    In engineering practice there is another related but different approach: letting the model actively crop, zoom, and stitch images during reasoning, and feed the intermediate results back as visual input, commonly referred to as thinking with images. The two approaches are not mutually exclusive:

    • Visual primitives focus on precise referring and address the referring gap.
    • Thinking with images focuses on dynamic evidence gathering and addresses insufficient information acquisition.

    A robust implementation usually combines both: the model first outputs boxes for candidate regions, the system crops and enlarges accordingly, the model then outputs finer polygons and points on the new view, and the results are finally aggregated into a count or path. Note that the capability boundaries of different implementations vary widely, and the same model family may behave inconsistently across product forms (such as web interaction versus tool-chain invocation). Evaluation must therefore be tied to a specific invocation method and cannot rely on promotional claims alone.

    4. How It Lands in Intelligent Coding Tools

    For teams using intelligent coding tools or building their own agents, the value of visual primitives shows up mainly in debuggability. Natural language reasoning makes it hard to pinpoint where things fail, whereas intermediate steps with coordinates can be persisted, visualized, and compared in regression tests.

    A minimal usable tool interface design example:

    1. def analyze(image, task, max_rounds=3):
    2. state = {"image": image, "primitives": [], "notes": []}
    3. for _ in range(max_rounds):
    4. step = model.step(state) # outputs primitives and text
    5. state["primitives"].extend(step.primitives)
    6. state["notes"].append(step.note)
    7. if step.done:
    8. break
    9. state["image"] = crop_zoom(state["image"], step.focus_box)
    10. return aggregate(state) # structured results such as count, location, or path

    Engineering practice also requires attention to a few points: define an explicit coordinate normalization convention for primitives; apply a unified transformation for cropping and zooming and record the mapping; write each step’s primitives to a logging service and use monitoring and alerting to observe failure rates; and store datasets and intermediate results in object storage for reproducibility.

    5. Evaluation and Tuning Recommendations

    Evaluation should cover three types of tasks: dense counting, fine-grained localization, and multi-step spatial planning. Metrics should look beyond final answer accuracy and also examine the stability of intermediate primitives, for example the variance in box positions across repeated samples of the same image. For tuning, prioritize constraining the output format, increasing the effective input resolution, and adding more iteration rounds before considering a model switch. If a cloud inference service is used, it is recommended to run preprocessing and cropping logic on a container platform and use a message queue to smooth out peaks, avoiding blocking in a long pipeline.

    6. Conclusion

    The significance of visual primitives is to move visual reasoning from description to pointing. For developers, what really matters is not whether a given model has a built-in capability, but whether their own invocation pipeline can produce verifiable and reproducible intermediate representations. Solving the referring problem at the data structure level is what brings substantive improvements in the stability of complex visual tasks.