Visual Primitives: Closing the Reference Gap in Multimodal Models

    This article examines why multimodal models can “see” an image yet still fail at dense counting, fine-grained localization, and complex spatial reasoning. It distinguishes the perception gap from the reference gap, introduces visual primitives such as points, boxes, and polygons, and explains how special tokenizer markers and coordinate-based expressions support unambiguous object referencing. It also discusses why explicit primitives may disappear from chain-of-thought outputs, how span-based placeholders work in interleaved image-text inputs, and practical engineering guidelines for building more reliable multimodal systems.

    Introduction: The Real Root Cause Behind Multimodal “Blindness”

    As multimodal large models have evolved, researchers have long been troubled by a recurring phenomenon: even when a model can “see” an image, it often breaks down on tasks such as dense counting, fine-grained localization, and complex spatial relationship judgment. The industry has gradually realized that the key issue is not entirely image resolution or the capability of the visual encoder. Rather, it lies in how the model “references” and “denotes” objects in an image. The technical route followed by an open-source experimental multimodal model is centered on this pain point, and its core approach is abstracted as “Visual Primitives.”

    Two Gaps: Perception Gap and Reference Gap

    To understand the value of visual primitives, it is necessary to clarify two levels of obstacles.

    • Perception Gap: The model’s raw perception capability is insufficient—it does not “see clearly enough.” Such problems are usually mitigated by increasing visual encoder resolution and optimizing image splitting strategies.
    • Reference Gap: Even after perception problems are solved, the model still relies on natural language to describe image content during reasoning. Natural language is vague and ambiguous when expressing spatial positions, quantities, and boundaries. In dense counting scenarios, for example, descriptions such as “the pile of small squares on the left” cannot precisely lock onto a target, causing the reasoning chain to break down logically.

    Research in the field indicates that once the perception gap is crossed, the reference gap often becomes the real constraint on the upper bound of recognition capability. This is the core problem that visual primitives aim to solve.

    Core Idea of Visual Primitives

    The essence of visual primitives is to provide “unambiguous pointers” for objects in continuous visual space. Instead of using natural language to describe objects indirectly, visual primitives use structured spatial markers to anchor objects directly. The three primitives can be understood as three basic geometric abstractions:

    • Point: Used to precisely mark a location, suitable for denoting the center or key anchor of an instance.
    • Box: Used to frame a rectangular region, suitable for expressing an object’s bounding box.
    • Polygon: Used to outline arbitrary shapes, suitable for fine segmentation of irregular objects.

    At the tokenizer level, such primitives are usually carried by paired special markers. For example, a start marker and an end marker wrap coordinate content to form a structure such as <|point|>[x, y]<|/point|>. In addition, a class of “ref” markers is used to establish binding relationships between objects and pronouns in reasoning text. This design allows the model to repeatedly “point to” the same object in a chain of thought without introducing ambiguity.

    Why Explicit Primitives May “Disappear” in Reasoning

    A noteworthy and somewhat counterintuitive engineering phenomenon is that, in the chain-of-thought outputs observed during practical testing, explicit special primitive markers are often absent. Instead, there are many natural language descriptions carrying coordinates.

    A reasonable explanation is that during later training and alignment, the model gradually learns to internalize “primitives that explicitly use special tokens” into the ability to “describe positions directly with coordinate values.” In other words, the semantics of the primitives do not disappear; they converge from an external marker form into an implicit coordinate expression. This suggests that special markers are more like structured scaffolding for the training stage, and at inference time the model may already be capable of directly outputting precise coordinates.

    Placeholder Mechanism in Interleaved Image-Text Input

    When multimodal models process interleaved image-text input, they need a mechanism to mark “where image content should be inserted.” A common approach is to introduce a set of placeholder markers in the form place_holder_mm_span_xxxx, with sequentially increasing IDs.

    There is an interesting matching problem regarding the relationship among the number of such placeholders, the number of images, and the per-image token limit. The maximum number of images supported according to the official documentation, the maximum number of tokens a single image can occupy, and the total number of placeholders often cannot be simply mapped to one another. A more likely explanation is that placeholders use a content-span design: an image is split into multiple spans according to its information density, and multiple placeholders collectively describe it. This span-based mechanism has practical engineering value in interleaved image-text and multi-image long-context scenarios.

    Engineering Practices and Best Practices

    For developers who want to draw on the visual primitive approach, the following practical points are worth considering:

    1. Distinguish the two gaps: First assess whether the bottleneck is perception or reference, so as to avoid optimizing in the wrong direction.
    2. Prefer structured expressions over natural language: In spatial-sensitive tasks, prioritize structured expressions such as coordinates and geometric primitives.
    3. Decouple training scaffolding from inference: Special markers can serve as training-time aids; it is not necessary to require explicit output during inference.
    4. Design placeholders with spans: In interleaved image-text scenarios, reserve scalable, segmented placeholder space for image content.

    At the deployment level, image data can be carried by object storage, multimodal requests can be decoupled through message queues, inference services can be elastically scaled on container platforms, and logging, monitoring, and alerting systems can help ensure stability, thereby forming a complete engineering loop.

    Conclusion

    The value of the visual primitive technical route lies in redefining how multimodal models “reference the world”—moving from vague natural language descriptions to precise structured spatial pointers. Understanding the distinction between the perception gap and the reference gap, the design logic of special markers, and the evolution of primitives from explicit to implicit forms can help developers achieve more reliable model performance on demanding tasks such as dense counting and complex localization.