Visual Primitives in Experimental Open-Source Multimodal Models

    Visual primitives such as points, bounding boxes, and polygons give multimodal models a structured way to reference objects in images. This article examines special-token design, coordinate-based references, multimodal placeholders, and why explicit markers may not appear in displayed reasoning. It also outlines engineering and evaluation practices for reliable spatial referencing.

    1. From Seeing Objects to Pointing to Them Precisely

    Multimodal models are often described in terms of their ability to understand and describe images. Yet in dense counting, complex object localization, and fine-grained region referencing, the challenge is not simply whether a model can see an object. It is whether the model can identify it precisely within a continuous visual space.

    A common architecture uses an image encoder to extract visual features, followed by a language model for interpretation and generation. This pipeline faces two distinct problems:

    • The perception gap: Image resolution, image tiling strategies, and feature compression can cause the loss of visual detail.
    • The reference gap: Even when sufficient visual information is available, the model may still rely on natural-language descriptions. Expressions such as “the one on the left,” “slightly above the center,” or “the third object” can be ambiguous.

    In simple scenes, context may resolve this ambiguity. In dense scenes, however, occlusion and repeated objects of the same type can make natural-language references unreliable and disrupt subsequent reasoning.

    The idea behind visual primitives is to introduce spatial references—such as points, bounding boxes, and polygons—into the model’s output space. These primitives act as unambiguous pointers within a continuous visual space. Instead of relying on vague directional language, the model supplies coordinates, regions, or boundaries.

    This allows the model to identify an object first, then count, compare, or reason about relationships involving that object, reducing ambiguity in the process.

    2. Special Tokens: Adding Visual References to the Vocabulary

    Public model configurations and tokenizer designs show that experimental multimodal models may register paired special tokens for points, boxes, polygons, and references. For example:

    1. {
    2. "special_tokens": [
    3. "<|point|>", "<|/point|>",
    4. "<|box|>", "<|/box|>",
    5. "<|polygon|>", "<|/polygon|>",
    6. "<|ref|>", "<|/ref|>"
    7. ],
    8. "placeholder_pattern": "place_holder_mm_span_XXXX"
    9. }

    These markers are typically designated as special tokens and excluded from ordinary text normalization during tokenization. Configuration fields may express this through settings such as special=true and normalized=false.

    Their engineering value falls into three main areas:

    1. Structured output constraints: Paired markers delimit the beginning and end of a visual-reference span, making it easier for a parser to extract coordinates or regions.
    2. Training alignment signals: During supervised fine-tuning or preference optimization, special tokens can serve as explicit anchors for learning to reference an object before reasoning about it.
    3. Auditability: Structured markers are easier than free-form language for post-processing systems to validate, transform, and visualize.

    Special tokens alone do not establish a model’s capability. They provide a syntactic framework. The actual results depend on whether training aligns those tokens with image regions and whether inference consistently produces accurate coordinates and region boundaries.

    3. Why Explicit Markers May Be Absent from Displayed Reasoning

    If a vocabulary includes point, box, and polygon tokens, why might they rarely appear in displayed reasoning traces? Several explanations are possible.

    Differences Between Training and Presentation

    During later training stages, a model may learn to express spatial references through coordinate descriptions rather than complete token sequences. For example, instead of producing <|point|>[[x,y]]<|/point|>, it might write “approximately at coordinates (x, y).”

    This form can be more natural and easier for users to understand when displayed.

    Filtering by the Presentation Layer

    Special tokens often serve an internal protocol. A frontend may filter them out, replace them, or retain only readable text.

    Displayed output alone is therefore not a reliable basis for determining whether a model uses visual primitives. Raw output, parsing logs, or structured fields provide a better basis for inspection.

    Inference Templates May Not Enforce the Format

    If an inference prompt does not require special-token output, the model may choose natural language containing coordinates instead.

    Special tokens can be an available protocol without being a mandatory format for every inference request.

    Trade-offs Between Cost and Stability

    Explicit markers increase output length and parsing complexity. Coordinate-based descriptions may already be sufficient to express references in many scenarios.

    One engineering approach is to use explicit markers during training to strengthen alignment, allow coordinate-based expressions during inference, and normalize those expressions through a parser.

    The absence of visible markers does not necessarily mean the approach has failed. It may instead reflect a separation between the internal protocol and the external presentation.

    4. How Coordinate Descriptions Relate to Visual Primitives

    Coordinate-based descriptions can be viewed as semantic equivalents of visual primitives:

    • A point corresponds to a single coordinate pair.
    • A box corresponds to the coordinates of its top-left and bottom-right corners.
    • A polygon corresponds to an ordered sequence of vertices.

    Special tokens define the syntactic boundaries; coordinates supply the spatial content. The output formats offer different trade-offs:

    • Explicit markers with coordinates: The most directly parseable format, suitable for structured evaluation and downstream programmatic use.
    • Natural language with coordinates: More readable, making it suitable for conversational presentation.
    • Natural-language directional expressions alone: The most flexible, but also the most ambiguous and poorly suited to dense scenes.

    A practical strategy is to keep internal representations structured while making external presentation readable. Preserve the structured protocol in raw model output where possible, then convert it into natural language in the presentation layer. This supports both auditability and user experience.

    5. Multimodal Placeholders and Interleaved Images

    In addition to visual-primitive markers, configurations may contain placeholders such as place_holder_mm_span_XXXX.

    These placeholders are typically used when text and images are interleaved. A placeholder inserted into the text sequence points to a corresponding image, image region, or tile.

    The number of placeholders does not necessarily match the number of images. A single image may be divided into multiple regions based on its content, while multiple images may share the same text context.

    Parsing requires maintaining a mapping between placeholders, images, and regions. If that mapping becomes misaligned, the model may reference the wrong image or region.

    Engineering safeguards should include:

    1. Stable bindings between placeholder identifiers and image or region indices.
    2. The same mapping-table version for input preprocessing and output parsing.
    3. Validation for out-of-range, missing, and duplicate placeholders.
    4. Preservation of original layout information in long documents containing multiple images.

    6. Implementation and Evaluation Recommendations

    Teams exploring visual primitives should address the following areas:

    • Protocol versioning: Version special tokens, placeholder formats, and coordinate normalization conventions to prevent mismatches between training and inference.
    • Output validation: Check points, boxes, and polygons for image-boundary violations, vertex-count requirements, and valid coordinate ranges.
    • Evaluation coverage: Supplement standard visual question answering with dense counting, localization under occlusion, references to repeated objects of the same type, and cross-image referencing.
    • Log retention: Keep both raw output and parsed results to distinguish between a model failing to generate markers and a presentation layer filtering them out.
    • Security boundaries: Special tokens may be injected through inputs or maliciously constructed. Parsers should treat them as untrusted input.

    The value of visual primitives lies in turning ambiguous natural-language references into a computable spatial protocol. Whether a system visibly displays special tokens is not the sole measure of success. More important are the model’s ability to produce accurate spatial references consistently and the engineering pipeline’s ability to parse, validate, and handle fallback behavior reliably.