Multimodal Visual Primitives: Why Models See Clearly but Still Fail at Precise Reference

    This article breaks down visual primitives in multimodal large models, focusing on the gap between perception and unambiguous reference. It explains how paired special tokens encode polygons, points, boxes, and reference spans, why models often ignore them and fall back to raw coordinates, and how interleaved image-text placeholders work. It also offers practical guidance on evaluation sets, strict output parsing, constrained decoding, visual token budgets, and observability for integrating these capabilities reliably.

    1. Where the Problem Starts: Seeing Without Being Able to Explain

    A recurring pattern shows up in the engineering practice of multimodal large models: a model can identify which objects are present in an image, yet it struggles to answer questions that require precise reference, such as “where is the third object” or “how many targets are in the frame.” The root cause is not entirely in the vision encoder; it lies in how the language side expresses spatial relationships.

    Natural language is inherently a fuzzy reference system. Descriptions like “the one on the left” or “the block near the edge” work in sparse scenes, but as tasks move toward dense counting, multi-object localization, and fine-grained comparison, reference relationships degrade quickly. Model outputs become inconsistent from one turn to the next, and the chain of thought shows self-correction or even logical collapse.

    The industry tends to split this phenomenon into two parts. The first is the perception gap: the model has not truly seen the image details. The second is the reference gap: the model has seen the details but can still only “point” with natural language, and it points inaccurately. Visual primitives are a technical approach aimed at the second problem.

    2. Core Design of Visual Primitives: Unambiguous Pointers Instead of Natural Language

    The basic premise of visual primitives is to give the model a set of structured, parseable symbols within continuous visual space, used to precisely anchor object positions and shapes, rather than making the model describe spatial relationships with adjectives.

    From public technical discussions, these schemes typically register a set of paired special markers at the tokenizer level to wrap geometric information. Semantically, they correspond to roughly three types of structures:

    1. Polygon sequence: <|polygon|> ... <|/polygon|>
    2. Point sequence: <|point|> ... <|/point|>
    3. Box region: <|box|> ... <|/box|>
    4. Reference span: <|ref|> ... <|/ref|>

    Typical configuration traits of these markers in the vocabulary are: no case normalization, no prefix or suffix stripping, no splitting into subwords, and designation as special tokens. This configuration ensures they are not broken by ordinary text preprocessing and are not confused with natural language fragments from user input.

    The value comes from three points. First, geometric information enters the context in structured form, so the model does not need to “translate” coordinates into language. Second, the paired markers close cleanly, which makes parsing and validation easier. Third, training and inference share the same symbol system, reducing the risk of inconsistency between representation and decoding.

    3. A Contradiction Worth Digging Into: The Markers Exist but Are Rarely Used Explicitly

    A commonly observed phenomenon in practice is that the vocabulary does register the visual primitive markers above, yet they almost never appear in the model’s chain of thought. Instead, there are large amounts of directly written numeric coordinates.

    There are several plausible explanations, and they are not mutually exclusive:

    • Representation drift occurs in later training stages. Pre-training or mid-training uses explicit markers to build spatial alignment, but during instruction tuning and chain-of-thought data construction, the corpus contains many natural-language-plus-coordinate patterns, and the model gradually converges toward a more colloquial coordinate expression.
    • Data distribution dominates output form. Chain-of-thought corpora are optimized for human readability, so annotators tend to write “located at (x1,y1,x2,y2)” rather than nested markers, and the model learns a smoother expression accordingly.
    • The markers serve as internal scaffolding. Special markers may mainly carry alignment and supervision signals during training, while inference allows the model to freely degrade to coordinate text, reducing the brittleness introduced by decoding constraints.

    The engineering takeaway is direct: if your business depends on structured geometric output, you cannot assume the model will spontaneously produce special markers. You should provide fallbacks at three levels at once: the prompt template, post-processing parsers, and constrained decoding.

    4. Interleaved Image-Text Placeholders: A Count Mismatch Is Not Necessarily a Defect

    Another configuration that easily causes confusion is a sequence of consecutive placeholder markers shaped like place_holder_mm_span_0001 through place_holder_mm_span_0442. Their role is to reserve text slots that can be correctly located for image content in interleaved image-text input, preventing misalignment when image embeddings and text sequences are concatenated.

    Regarding the question of why the count does not match the official description, it can be understood from several angles:

    1. The number of placeholders is usually reserved vocabulary capacity, not the actual usage in a single inference. How much is reserved and how many images are actually supported are two different dimensions.
    2. A single image may occupy multiple slots. When an image is split into multiple visual blocks or encoded at multiple scales, one image mapping to multiple placeholder spans is a common practice.
    3. The per-image token budget and the number of slots are not one-to-one. The maximum visual tokens per image is an encoding-side constraint, while placeholders are text-side indices, and the two do not have to be equal.
    4. Version iteration causes documentation and vocabulary to fall out of sync. In experimental versions, the vocabulary size often updates before the documentation.

    A reliable way to investigate this kind of issue is to treat the actually loaded vocabulary file and configuration as the source of truth, construct a minimal input sample, print the sequence lengths before and after placeholder replacement along with the image embedding alignment result, and replace documentation-based inference with measured data.

    5. Practical Recommendations: How to Evaluate and Integrate These Capabilities

    • Build a reference-focused evaluation set. Cover dense counting, relative position, occlusion scenarios, and unique identification of multiple targets. Metrics should include numeric accuracy and reference consistency, not just description fluency.
    • Apply strict validation in the output parsing layer. Clip coordinates to bounds and check their validity, verify that paired markers are closed, and fall back to retry or structured prompting when parsing fails.
    • Use constrained decoding to improve stability. In steps that require machine-readable output, limiting the candidate token space can significantly reduce format drift.
    • Control the visual token budget. High-resolution input brings detail gains but also context expansion, so trade off resolution and tiling strategies according to the task.
    • Improve observability. Bring input placeholder mapping, visual token consumption, and parsing failure rate into logs and monitoring alerts, making it easier to determine whether the issue is perception or reference.

    6. Conclusion

    The significance of visual primitives is not any particular set of special tokens, but the direction they reveal: the bottleneck of multimodal systems is shifting from “seeing” to “precise reference.” Only by understanding the division of labor and drift patterns among special markers, coordinate-based expressions, and image-text placeholders can you reliably obtain usable spatial understanding in real business scenarios. To build such capabilities in the cloud, you can rely on a container platform to host inference services, object storage to manage image-text data, and log and monitoring services to keep the pipeline observable, turning experimental capabilities into engineering assets that can be operated sustainably.