Visual Language Models: Technical Highlights of Open-Source Experimental Models Using Visual Primitives

    This article analyzes how open-source experimental vision-language models address the "referential gap" in complex visual tasks by replacing natural-language references with visual primitives such as points, boxes, polygons, and reference markers. It covers the technical motivation, how special tokenizer tokens support structured output, how this approach differs from conventional visual encoding pipelines, and practical guidance for validation, including structured output protocols, dual-track evaluation, visualization replay, and capacity planning. Readers will also find common pitfalls to avoid when assessing these models.

    1. Background: From “Seeing Clearly” to “Pointing Accurately”

    Over the past two years, multimodal large models have made significant progress in general image understanding. However, they still frequently fail on tasks such as dense counting, small-object localization, complex occlusion, and multi-turn reference resolution. A growing consensus in the field is that once basic perception is in place, the bottleneck for complex visual reasoning is not only image resolution or encoder capacity, but the symbols a model uses to refer to objects in a scene while it reasons.

    The traditional approach relies on natural-language descriptions, such as “the third red square from the top-left corner.” This works in sparse scenes but degrades quickly in dense ones: ordinals break down as counts grow, spatial relations become ambiguous as layouts grow more complex, and referents drift across turns of a conversation. The resulting “referential gap” is a major source of instability in complex visual tasks.

    2. Core Idea: Replacing Natural-Language References with Visual Primitives

    Visual primitives can be understood as unambiguous pointers constructed in continuous visual space. Instead of describing what an object is, they first establish where it is, how large an area it covers, and which key points define it, moving the reference problem from language space to geometry space. Common primitive types include:

    • Points: mark centers or key anchors; suitable for counting and localization.
    • Boxes: provide a coarse bounding range; suitable for detection and cropping.
    • Polygons: capture irregular contours; suitable for segmentation and precise measurement.
    • Reference markers: bind the “current object under discussion” across multiple turns to maintain referential consistency.

    The value of this design lies in composability and verifiability. Geometric primitives can be parsed directly by programs, rendered back onto images, and used in numerical computation. Reasoning therefore shifts from “linguistic self-consistency” to “spatial self-consistency,” making errors easier to locate and correct.

    3. Engineering Implementation: The Role of Special Tokens in the Tokenizer

    One notable engineering detail is that the tokenizer of such models typically adds a set of paired special tokens to wrap points, boxes, polygons, and references. These tokens are usually configured as indivisible, standalone markers that do not undergo normal normalization, ensuring the structures remain intact during encoding and decoding.

    An illustrative structure is shown below (format only, not a specific API):

    1. <point> (x, y) </point>
    2. <box> (x1, y1, x2, y2) </box>
    3. <polygon> (x1,y1), (x2,y2), ... </polygon>
    4. <ref> obj_id </ref>

    It is important to note that the presence of special tokens does not mean they must appear explicitly. During inference, a model may complete reference resolution with internal structured state and only render it as natural language or a visualization at the final output stage. Therefore, inferring behavior from the tokenizer alone is unreliable; validation must combine the output protocol, visualization replay, and task metrics.

    4. Differences from Conventional Visual Encoding Approaches

    Common industry approaches fall into three categories: high-resolution tiling with general-purpose visual encoding, emphasizing “seeing more clearly”; attaching detection or segmentation modules, emphasizing “localize first, then understand”; and writing coordinates directly into prompts and outputs as text, emphasizing “parseability.” The visual-primitive route is closer to a structured upgrade of the third category: it does not reject high-resolution input or depend on fixed external modules, but standardizes spatial reference so the model reasons within a unified symbol system.

    Its advantages include a simple pipeline, end-to-end training, and easy integration with tool calls. The challenges lie in data construction and evaluation design: large amounts of geometrically annotated samples are needed, along with benchmarks that can distinguish “fluent language but wrong space.”

    5. Practical Guidance: How to Validate in Your Own Environment

    1. Define task boundaries. Start with scenarios that can be measured directly with geometric metrics, such as counting, localization, contour measurement, and local attribute question answering.
    2. Design a structured output protocol. Constrain coordinate ranges, the maximum number of points, and closure rules; enforce strong server-side validation and fall back to retries on anomalies.
    3. Establish dual-track evaluation. Track both language metrics and spatial metrics, such as center-point hit rate, intersection over union (IoU), and absolute counting error.
    4. Use visualization replay. Render primitives back onto images, manually sample error types, and distinguish perception errors from reference errors.
    5. Plan for cost and capacity. Structured output lengthens sequences, so evaluate context length, concurrency, and caching strategies. On Baidu AI Cloud, inference services can be hosted on the container platform, samples and results can be managed with object storage, and latency and failure rates can be tracked with logging and monitoring alerts.

    6. Common Pitfalls

    • Treating special tokens as proof of capability: tokens are only protocol carriers; capability depends on training and data.
    • Optimizing prompts only: the referential gap is a representation problem, so wording tweaks yield limited gains.
    • Ignoring coordinate normalization: different resolutions and scaling strategies cause systematic offsets, so conventions must be unified.
    • Evaluating with a single aggregate score: in mixed tasks, an overall score masks structural defects, so results should be analyzed by task bucket.

    7. Conclusion

    The biggest lesson from experimental open-source vision-language models is to design “reference” as a first-class citizen. For developers, the reusable takeaway is not a specific implementation but three practices: unify spatial expression with geometric primitives, guarantee parseability with a strongly validated protocol, and drive iteration with dual-track evaluation. Incorporating these three points into engineering standards is what delivers stable, interpretable, and operable capabilities in complex visual tasks.