Visual Primitives in Multimodal Models: From the Perception Gap to the Reference Gap

    Visual primitives offer a structured way for multimodal models to refer to image objects during reasoning. This article explains how points, boxes, and polygons can address errors in counting, localization, and spatial reasoning, why research demonstrations may differ from deployed services, and what developers should evaluate before adopting these capabilities.

    1. Why Multimodal Models Can See Objects but Still Miscount Them

    Multimodal large language models have made significant progress in image understanding, document parsing, and visual question answering. Yet they still struggle with some seemingly simple tasks:

    • Dense counting: Determining how many objects of the same type appear in an image.
    • Precise localization: Producing polygon outlines or keypoint coordinates for an irregular object.
    • Spatial reasoning: Planning routes through mazes or floor plans and describing their directions.

    These failures do not necessarily mean that the model failed to perceive the image. At the perception stage, visual encoders can already extract sufficient features for many such tasks. Stronger encoders and higher-resolution inputs have substantially narrowed what is often called the perception gap.

    The remaining problem lies in how the model reasons about what it sees.

    2. The Reference Gap: The Limits of Describing Images in Natural Language

    Research has identified a key issue: models still often use natural language to refer to image objects during reasoning. Natural language is inherently ambiguous and discrete. When a task requires precise references to many objects, this creates a reference gap.

    Consider counting people in a team photo. The model’s reasoning might describe “a few people near the sideline on the left” and “several people in the middle.” These descriptions lack precise spatial anchors. As the number of objects increases, references become harder to track, leading to duplicate counts or omissions.

    The same limitation applies to localization. A description such as “the red object slightly below the upper-left corner” cannot provide the precision needed for a pixel-level task.

    3. Visual Primitives as Structured Pointers

    One approach shown to address the reference gap is to introduce visual primitives: structured representations that locate objects precisely in visual space. Common primitives include:

    • Points: Identify object centers or key locations.
    • Boxes: Define object bounding boxes.
    • Polygons: Describe the detailed outlines of irregular objects.

    Instead of relying solely on natural-language references, the model first outputs primitive coordinates to anchor objects in the image coordinate system. It can then use these pointers for counting, comparison, and spatial reasoning.

    This gives the reasoning process a form of scratchpad that can be traced and checked.

    The approach can also leave visible clues in model artifacts. Released configuration files may contain paired structural tokens such as:

    1. "<|point|>", "<|/point|>",
    2. "<|box|>", "<|/box|>",
    3. "<|polygon|>", "<|/polygon|>"

    These opening and closing tokens wrap coordinate outputs during generation and distinguish primitive types. For developers, inspecting the tokenizer configuration distributed with open model weights is a low-cost way to look for evidence of this design.

    4. From Research to Deployment: Why Independent Validation Matters

    Whether a technical approach works in a product requires independent testing, not just confidence in demonstrations from a paper. Several differences can arise in practice:

    1. Research demonstrations may not match deployed versions. Tasks shown by a research team may behave differently in a deployed inference service because of post-processing, quantization, or prompt-template differences.
    2. Counting can be sensitive. A people-counting example that is correct in a paper may produce an overcount or undercount in a web interface, indicating that the capability is not yet consistently reliable.
    3. Spatial planning can be more fragile. Maze navigation requires multiple steps of primitive-based reasoning. It can be highly sensitive to decoding temperature and reasoning-chain length, so differences in deployment settings may cause it to fail.

    Developers should therefore build their own evaluation sets covering counting, localization, OCR, and spatial reasoning. Comparisons should use consistent prompts and parameters rather than relying only on official demonstrations.

    5. Tooling Usability: Friction in Agent CLIs

    The maturity of the surrounding toolchain matters as much as the model itself. Some newly released models provide access through command-line agent tools, but the onboarding experience can introduce avoidable friction:

    • Launch articles may omit upgrade instructions and configuration syntax, leaving intuitive command-line options ineffective.
    • Switching models may depend on a configuration file, such as a JSON file, without clear documentation.
    • The intended workflow may require upgrading the tool first and then selecting a preset through a profile option, using a command such as dsh --profile web.

    These issues suggest that tooling may be optimized for internal development workflows rather than third-party users.

    When configuration changes do not take effect, developers should first inspect the tool’s help output and configuration format instead of assuming that promotional examples provide complete instructions.

    6. Practical Recommendations for Developers

    1. Prioritize structured visual output. If your application depends on counting or localization, evaluate models that support structured visual representations. Explicitly request point or box coordinates in prompts.

    2. Build a private evaluation set. Use images from real workloads to avoid drawing conclusions from selected demonstration examples.

    3. Record versions and configurations. Hosted services, open model weights, and research environments may differ. Evaluation results should identify the version and settings used.

    4. Combine cloud capabilities for production workflows. Object storage can manage image assets, message queues can connect inference stages, and logging, monitoring, and alerts can support service stability. Together, these components provide the operational foundation for a multimodal application.

    Visual primitives represent an important shift from describing images in language to reasoning about them through structured pointers. Whether these capabilities deliver consistent results across product interfaces will still depend on rigorous evaluation and mature tooling.