Visual Primitives: Bridging the Reference Gap in Multimodal Models

    Multimodal models often fail on fine-grained visual tasks not only because they cannot see enough detail, but because natural-language references are ambiguous. This article separates the perception gap from the reference gap, introduces visual primitives such as points, boxes, polygons, and ref markers as structured pointers, and examines tokenizer design, the observed drift toward numeric coordinates, multimodal placeholder spans, evaluation methods, and practical deployment considerations.

    1. Where the Problem Starts: Beyond the Perception Gap Is the Reference Gap

    Failures of multimodal models on fine-grained visual tasks are often broadly attributed to “not seeing clearly.” But when the problem is broken down, it contains at least two layers.

    The first layer is the Perception Gap: the representation resolution output by the visual encoder is insufficient, details are lost, and the model genuinely does not see the target.

    The second layer is the Reference Gap: the model sees the target, but in chain reasoning it can only use natural language to “point” to it—“the one on the left,” “the second one near the edge.” Natural-language reference is inherently ambiguous. Once a scene contains dense objects of the same type or requires precise localization, the reference chain breaks down, manifesting as counting drift, coordinate misalignment, and self-contradictory descriptions.

    This distinction is critical: if the bottleneck is at the reference layer, simply increasing input resolution or adding visual tokens will quickly yield diminishing returns.

    2. Core Idea of Visual Primitives: An Unambiguous Pointer in Visual Space

    The idea behind Visual Primitives is to introduce a set of structured, parsable symbols into continuous visual space as unambiguous pointers to image regions. Typical mappings between three primitive types and their semantics are as follows:

    • point: locates a position, suitable for keypoints, centers, and anchors;
    • box: constrains a rectangular region, suitable for detection, cropping, and local zooming;
    • polygon: describes an arbitrary contour, suitable for segmentation and counting irregular regions.

    A related type of ref marker is also needed to bind natural-language referents to primitives, forming an explicit mapping between “name” and “coordinates.” Its value is that the reasoning process no longer depends on vague descriptions; instead, “which one” becomes “which set of values,” allowing subsequent steps to be parsed and checked stably.

    An illustrative reasoning fragment structure (showing form only, not a specific implementation):

    1. Question: How many circles are in the image? Where is the center of the leftmost circle?
    2. Reasoning:
    3. <|ref|>Circle A<|/ref|> -> <|point|>[0.21, 0.44]<|/point|>
    4. <|ref|>Circle B<|/ref|> -> <|point|>[0.35, 0.52]<|/point|>
    5. ...
    6. count = 7; leftmost center = [0.21, 0.44]

    3. Reading the Design from the Vocabulary: Engineering Meaning of Paired Special Tokens

    In tokenizer configurations, one can often observe paired special tokens such as <|point|> and <|/point|>, <|box|> and <|/box|>, <|polygon|> and <|/polygon|>, and <|ref|> and <|/ref|>. Their common configuration characteristics are generally: special = true, normalized = false, lstrip/rstrip = false, and single_word = false.

    These settings are not arbitrary; they serve clear engineering purposes:

    1. Not rewritten by normalization: coordinates and markers must be preserved as-is; any case or whitespace normalization can break parsability.
    2. Not split by regular tokenization: markers should not be broken into multiple subwords, ensuring that one primitive corresponds to one stable token.
    3. Participate in attention as independent tokens: this allows the model to handle structural boundaries like punctuation and learn when to open or close a primitive.
    4. Simplify post-processing parsing: on the output side, a state machine or regular expression can directly extract structured results from the generated sequence without a second extraction model.

    4. A Common Confusion: Why Explicit Primitives “Disappear”

    In practice, a common phenomenon occurs: primitive markers are clearly defined in the vocabulary, but they rarely appear in the model’s actual chain-of-thought output. Instead, there are many natural-language descriptions with numeric coordinates.

    One reasonable explanation is representation drift in late training: during supervised fine-tuning and preference optimization, the proportion of explicit primitives in the corpus decreases, while “text + coordinates” descriptions are closer to human annotation habits, so the model converges to an implicit form. The primitives are not invalid; they degrade from “explicit symbols” to “numeric references.” As long as coordinates are generated precisely, the reference gap is still crossed.

    Another possibility is parsing moved earlier: primitives exist in the training objective, but at inference time external logic converts natural-language descriptions into coordinates, and the model side only generates values.

    In either case, the criterion should be verifiability: whether the output coordinates can be parsed stably, land correctly on the image, and remain consistent across multiple samples. If not, the reference problem has not truly been solved.

    5. Placeholder Spans in Interleaved Text and Images

    Another noteworthy type of special token is the sequentially numbered placeholder of the form place_holder_mm_span_XXXX. Its role is to reserve positions for visual content in interleaved text, so that the text sequence length corresponds one-to-one with visual insertion points.

    The reason multiple spans are needed rather than a single placeholder usually falls into two categories:

    • Single image, multiple segments: a high-resolution image is split into multiple subregions (tiles/windows) and encoded separately, with each segment requiring an insertion anchor;
    • Multiple images, multiple turns: when documents, screenshots, and charts are mixed as input, each image and its segments need independent positioning.

    Note that the placeholder count limit, the per-image tiling strategy, and the officially stated maximum image count are not the same dimension. Inconsistency between these numbers is normal and should not be used to infer a capability gap. From an engineering perspective, the focus should be on whether placeholder numbering is continuous, how out-of-bounds cases are degraded, and how long interleaved content is truncated without breaking pairing relationships.

    6. Practical Recommendations

    Data construction: generate samples with primitive annotations for counting, localization, and segmentation tasks, ensuring that positive examples cover both dense and sparse coordinate distributions. Mix in pure natural-language samples to prevent form degradation, but monitor primitive usage rates.

    Evaluation design: split evaluation into three layers—perception (can it see), reference (are coordinates parsable and correctly localized), and reasoning (are multi-step tasks self-consistent). Dense counting and complex localization are the two most sensitive probes.

    Inference and cost: structured output makes rule validation and retries easier, but it also increases decoding length. Stricter stop conditions can be set for primitive segments, with retries on parse failure.

    Deployment form: such models are often released as weights. In deployment, a container platform can host the inference service, object storage can distribute weights and image-text data, and logging and monitoring can track core metrics such as parse failure rate, coordinate out-of-bounds rate, and time to first token, forming a sustainable observability loop.

    7. Summary

    The essence of Visual Primitives is to separate “reference” from natural language and assign it to structured symbols. To judge whether a solution is truly effective, do not look at how many special tokens are defined in the vocabulary; look at whether the references in the output are parsable, localizable, and reproducible.