Understanding Visual Primitives in Multimodal Models: From Explicit Tokens to Implicit Coordinates

    This article explains why multimodal large models often fail at dense counting, object localization, and small-object retrieval, and argues that the bottleneck is not only visual resolution but also the ambiguity of natural language references. It covers how visual primitives are implemented as paired special tokens in the tokenizer vocabulary, why explicit primitive wrappers tend to disappear from chain-of-thought output in favor of raw coordinates, how image-text placeholder spans relate to feature injection rather than image count, and a practical checklist for evaluation and troubleshooting.

    1. Where the Problem Starts: Multimodal Models Can See, but Cannot Refer

    On tasks such as dense counting, complex object localization, and small-object retrieval, multimodal large models often show a sharp drop in performance. Early industry explanations attributed this to the LLM “not seeing clearly”: insufficient visual encoder resolution and a limited receptive field cause detail loss. This layer is known as the Perception Gap.

    Once resolution and visual encoding capability are improved, a more fundamental issue emerges. The bottleneck is not entirely on the image side; the model still describes image content in natural language while reasoning. Natural language is inherently ambiguous in reference. Expressions like “the one on the left” or “the object near the edge” break down quickly in multi-object scenes, creating a Reference Gap. Once a reference is no longer unique, the downstream reasoning chain collapses at counting, pairing, and spatial-relation judgments.

    One cloud vendor’s technical response in this direction is to introduce an intermediate representation called Visual Primitives: within continuous visual space, objects are described precisely with unambiguous pointers, decoupling “language description” from “spatial reference”.

    2. How Visual Primitives Are Carried: Special Markers in the Vocabulary

    From an engineering standpoint, such schemes typically register a set of paired special tokens in the tokenizer vocabulary to wrap geometric structures:

    1. <|/polygon|> ... <|polygon|> # polygon closing markers
    2. <|/point|> ... <|point|> # point markers
    3. <|/box|> ... <|/box|> # bounding box markers
    4. <|/ref|> ... <|ref|> # reference markers

    These markers are usually configured in the vocabulary as special=true, normalized=false, lstrip/rstrip=false, single_word=false. The meaning of this configuration is worth spelling out:

    • special=true: the marker is not split into subwords during tokenization, so it enters the model as a single atomic unit;
    • normalized=false: no case or full-width/half-width normalization is applied, preventing the symbols from being rewritten;
    • lstrip/rstrip=false: adjacent whitespace is not swallowed, keeping the format stable when concatenated with coordinate numbers;
    • single_word=false: the marker may appear at non-word boundaries, fitting mixed text-image layouts.

    The design intent is clear: polygon, point, and box primitives cover the most common reference forms in open-world settings—contours, positions, and regions. The reference marker is used to point back to entities already established earlier in the chain of thought, avoiding repeated description.

    3. A Phenomenon Worth Digging Into: Explicit Primitives “Disappear”

    In practice, a counterintuitive phenomenon appears often: explicit primitive wrapping structures are almost invisible in the model’s chain-of-thought output, replaced by coordinates written out directly.

    A reasonable explanation is the evolution of the training strategy. During pre-training or mid-training, special tokens build a strong binding between “geometric structure” and “symbol”, teaching the model structured expression. In later alignment and reinforcement stages, the symbols are internalized into a habitual way of writing coordinates. In other words, visual primitives degrade from an explicit protocol to an implicit habit: the capability remains, but the form changes.

    This leads to an important engineering judgment: you cannot decide whether visual primitive capability is active by checking whether special tokens appear in the output. A more reliable verification is whether the model stably outputs parseable coordinates and keeps references consistent across multiple reasoning turns.

    1. # Implicit expression example (directly parseable)
    2. {"target": "the rightmost cup in the second row", "box": [x1, y1, x2, y2]}
    3. {"target": "counting target", "points": [[x, y], [x, y], ...]}

    4. Image-Text Placeholders and Capacity Reconciliation

    Another class of special markers looks like place_holder_mm_span_0001 through place_holder_mm_span_0442, usually serving as position placeholders for mixed text-image layouts: the text sequence reserves slots first, and visual features are injected into those slots after encoding.

    Two points here need careful reconciliation:

    1. The official documentation states a supported image count far higher than the number of placeholders, which indicates placeholders are not “one slot per image”;
    2. If the per-image visual token limit is 384, then 442 slots cannot be simply explained by “multiple slots per image”.

    A more fitting explanation is that placeholders are a span numbering pool for feature injection, allocated by visual span rather than by image. The pool size relates to the maximum number of concurrent spans and the in-batch layout strategy, and does not have a one-to-one relationship with image count or the per-image token limit. When investigating such questions, rely on actual sequence length, visual span splitting results, and feature injection logs rather than inferring from counts alone.

    5. Practical Recommendations and a Troubleshooting Checklist

    • Prioritize parseability: define a strict schema for coordinate output; treat a parse failure as a reference failure and trigger a retry;
    • Divide labor between primitives and language: leave spatial reference to primitives or coordinates and semantic relations to natural language; avoid mixing them;
    • Coordinate resolution and span budget: when increasing input resolution, evaluate the visual span budget to prevent spans from being truncated;
    • Layered regression evaluation: evaluate perception metrics (whether it sees clearly) and reference metrics (whether it points accurately) separately to locate the bottleneck;
    • Build observability: use general-purpose logging services and monitoring/alerting capabilities to build dashboards for parse success rate, average number of coordinates, and span overflow rate.

    6. Conclusion

    The core value of visual primitives is not a few extra symbols in the vocabulary, but separating spatial reference from ambiguous language. Understanding the evolution path from “explicit symbols to implicit coordinates”, along with the design logic that placeholders are allocated by span rather than by image, is what allows correct engineering evaluation and tuning of such multimodal schemes. To carry large-scale image-text preprocessing and inference pipelines, you can build an elastic architecture with general cloud product categories such as object storage and container platforms.