Multimodal Visual Primitives: Closing the Reference Gap in Vision-Language Reasoning

    This article breaks down visual primitives—points, boxes, and polygons—as a structured intermediate representation for multimodal models. It explains why many complex visual failures stem not from a perception gap but from a reference gap, how primitives differ from the "thinking with images" approach, and how the two can be combined. It also covers practical engineering concerns such as toolchain configuration and observability, plus evaluation strategies that isolate reference stability through dense counting, complex localization, and multi-step planning tests.

    1. The Starting Problem: “Can’t See” and “Can’t Describe Precisely” Are Different

    In discussions of multimodal model capabilities, a common misconception is to attribute every recognition failure to “insufficient resolution” or “a weak visual encoder.” In practice, perception is only the first threshold. Once a model can correctly see the content of an image, the real bottleneck often appears in “how to bring what it sees into the reasoning process.”

    The industry usually calls the first layer the Perception Gap: targets are too small, textures are too dense, or occlusion is too severe, leading to insufficient visual feature extraction. The second layer is called the Reference Gap: even when the model sees a target, it can still only describe the target’s position and identity in natural language during chain-of-thought, for example “the third person on the left” or “the polygon near the red square.” Such descriptions degrade rapidly as the number of targets grows and spatial relationships become complex, producing counting drift, localization errors, and reference mix-ups.

    So a technical judgment worth noting is this: failures on complex visual tasks are often not “didn’t see it,” but “saw it and still couldn’t point to it reliably.”

    2. The Core Idea of Visual Primitives: Replacing Natural-Language Reference with Structured Symbols

    The technical approach of “visual primitives” is essentially about building a structured intermediate representation between the model and the image. It abstracts objects in continuous visual space into a set of symbolic objects that the model can reference directly. Common primitive types include:

    • Point: used to express position, center, or keypoints;
    • Box: used to express a region or bounding range;
    • Polygon: used to express irregular contours and finer shape boundaries.

    On the input side, these primitives are typically wrapped by a set of special markers—for example, appearing in pairs as a start marker and an end marker—forming “visual symbol units” that the tokenizer can recognize. During reasoning, the model no longer outputs vague descriptions like “the third person,” but instead outputs a set of parseable primitive references, which an external execution layer then maps back to image coordinates.

    A schematic intermediate representation can be written as:

    1. <point> (x1, y1) <\point>
    2. <box> (x1, y1, x2, y2) <\box>
    3. <polygon> (x1,y1),(x2,y2),(x3,y3) <\polygon>

    This design brings three direct benefits:

    1. Referential uniqueness: every target has a stable identifier, avoiding natural-language ambiguity;
    2. Composability: operations such as counting, sorting, and path planning can be performed on the set of primitives rather than on text descriptions;
    3. Verifiability: outputs can be parsed and checked by programs, making it easier to build automated evaluation and regression tests.

    3. How It Differs from the “Thinking with Images” Approach: Who “Looks at” the Image and Who “Operates on” It

    Another common technical approach is “Thinking with Images”: the model repeatedly calls visual tools during reasoning to crop, zoom, annotate, and re-input the image, turning “looking at the image” into an iterative tool-calling loop.

    The key difference between the two approaches lies in the level of abstraction:

    • Visual primitives elevate the “object” to a first-class concept, and reasoning operates directly on the set of objects;
    • Thinking with images elevates the “image operation” to a first-class concept, and reasoning indirectly influences observation results through a tool chain.

    From an engineering perspective, the two are not mutually exclusive. More mature implementations are often hybrid: use primitives to guarantee referential stability, and use the tool chain to guarantee sufficient observation. For example, first do coarse-grained box selection, then generate point or polygon primitives within the box, and finally complete counting or path output based on the primitives.

    It is worth noting that there may be inconsistencies between public materials and the web-end experience. For instance, the same model may perform well in paper-style evaluations but fluctuate significantly on dense counting or maze navigation in an interactive product. This usually indicates that model capability, tool availability, context organization, and post-processing validation together determine the final result; the model name alone cannot tell you the real capability boundary.

    4. Engineering Implementation: Configuration, Toolchain, and Observability

    In actual integration, the problem developers run into most often is not the algorithm but an opaque toolchain configuration. A typical symptom is that the examples in the official documentation don’t match the local environment, and users follow the docs but still can’t enable the target capability. A more robust approach is to treat configuration as engineering asset management:

    • Version pinning: lock runtime and dependency versions, and route upgrades through canary releases;
    • Externalized configuration: keep model parameters, tool whitelists, and image preprocessing strategies in version control;
    • Startup self-check: print a summary of the effective configuration when the service starts, avoiding “thought it took effect but it didn’t”;
    • Observability: record the input/output summary, latency, and failure reason of each visual tool call.

    Schematic configuration validation logic:

    1. def assert_runtime(cfg):
    2. assert cfg["model_profile"] in {"vision_exp", "vision_stable"}
    3. assert cfg["image_max_side"] >= 1024
    4. assert set(cfg["allowed_tools"]) >= {"crop", "zoom", "annotate"}
    5. print("[runtime] profile=", cfg["model_profile"],
    6. "tools=", cfg["allowed_tools"])

    When deploying in the cloud, you can use general-purpose capabilities to close the loop: object storage holds raw images and intermediate artifacts, a message queue smooths out traffic spikes, a container platform hosts the inference and tool-execution sandbox, and logging and monitoring services track error rates and latency distributions. This way, even if the model strategy changes, you can quickly pinpoint whether the issue is “insufficient perception” or “unstable reference.”

    5. Evaluation Recommendations: Test “Referential Stability” Separately

    If you only test overall accuracy, it’s easy to mask the reference gap. It’s recommended to add three types of targeted test cases:

    1. Dense counting: increase the number of same-type targets from single digits to dozens, and observe the counting error curve;
    2. Complex localization: targets are occluded or partially out of frame, and you observe the stability of box/polygon regression;
    3. Multi-step planning: maze or path-finding tasks, where you observe whether reference drift and step omissions occur.

    Evaluation output should be structured for easy automated judgment:

    1. {
    2. "task": "dense_count",
    3. "primitives": [{"type": "point", "x": 0.42, "y": 0.61}],
    4. "expected": 27,
    5. "predicted": 25,
    6. "parse_ok": true
    7. }

    6. Conclusion

    The value of visual primitives lies in advancing multimodal reasoning from “describing images in natural language” to “operating on images through structured objects.” It cannot eliminate the perception gap, but it can significantly mitigate the reference gap, giving complex visual tasks the engineering properties of being parseable, verifiable, and regression-testable. For developers, what really matters is not whether a given model is “equipped” with a certain mechanism, but whether the entire pipeline has a stable primitive representation, controllable tool calls, and a complete evaluation system.