Visual Primitives in Multimodal LLMs: Technical Analysis and Evolutionary Practices
Recent advancements in multimodal large models face challenges in dense counting and complex object localization. This article explores the transition from the "perception gap" to the "reference gap" and analyzes the visual primitives technology route. By examining the tokenizer configurations of open-source models, we delve into special token architectures, the shift from explicit geometric markers to implicit coordinate reasoning, and multi-scale placeholder mechanisms, offering valuable engineering insights for developing advanced multimodal applications.
In recent years, multimodal large models have made significant progress in image recognition and image-text generation. However, as application scenarios become more complex, the industry has found that models often experience logic breakdowns when handling dense counting or complex object localization. Behind this phenomenon lies a technical evolution path from the “perception gap” to the “reference gap.” Based on the underlying design of recent open-source experimental multimodal models, this article provides an in-depth analysis of the visual primitives technology route and its engineering practices.
1. The Proposal of the Visual Primitives Technology Route
Previously, solving the problem of LLMs “not seeing clearly” focused on improving image resolution, increasing visual encoder density, or optimizing feature extraction networks—that is, eliminating the “perception gap.” However, academic research indicates that once perception issues are largely resolved, the bottleneck restricting model recognition capabilities shifts to the “reference gap.”
When LLMs process information, they still rely on natural language to describe image content. For instance, when prompted to “point out the red apple in the upper left corner of the image,” natural language is effective in simple, unambiguous scenarios. But when dealing with densely arranged objects or complex spatial relationships (such as a tree full of fruits or a crowded group of people), the ambiguity of natural language causes severe logic breakdowns during reasoning. To address this, the industry introduced the “visual primitives” technology route. Visual primitives serve as “unambiguous pointers” that precisely describe objects in a continuous visual space, directly establishing a mapping between language and pixel coordinates. This thoroughly avoids the ambiguity of natural language in complex recognition tasks.
2. Visual Primitives Architecture Design Based on Special Tokens
By analyzing the tokenizer configuration file of a recent open-source experimental multimodal model, we can clearly observe the engineering implementation of the visual primitives route. The model’s underlying vocabulary includes a series of special tokens used to denote “polygon,” “point,” and “box.”
Specifically, these special tokens have unique attributes in the configuration. Taking <|polygon|>, <|point|>, <|box|>, and their corresponding closing tags as examples, they are typically set as indivisible single tokens marked for special purposes:
- Point: Used to refer to precise pixel coordinates or normalized coordinate points in an image.
- Box: Used to frame a rectangular area, commonly applied in object detection tasks.
- Polygon: Used to depict the contour boundaries of irregular objects, suitable for image segmentation or complex shape recognition.
This design means that when parsing input, the model can directly convert these symbols into high-precision positioning instructions for specific image regions, rather than breaking them down into ordinary character sequences. Embedding discrete geometric elements directly into the LLM vocabulary is a critical step in bridging the semantic barrier between natural language and visual space.
3. Evolution from Explicit Marking to Implicit Coordinates
However, during actual testing and inference of this model, a puzzling phenomenon emerged: the chain of thought output by the model did not explicitly show the special token markers expected in the theoretical framework (such as the <|point|[[a,b]]|/point|> format). Instead, when describing objects, the model directly output natural language text containing specific coordinate values.
This phenomenon prompts deeper reflection on the technology’s evolutionary path. We can infer that during the model’s later alignment and reinforcement learning training phases, the capability to explicitly use special tokens for “visual primitives” may have been internalized and evolved into an implicit ability to describe using coordinates directly.
This evolution brings certain benefits: it makes the model’s output more aligned with human reading habits and reduces the overhead of parsing complex tags for downstream applications. At the same time, it imposes higher requirements on the precision of the model’s internal representations. Without the constraint of explicit symbols, the model is prone to numerical drift when generating long sequences of coordinates. This transition from reliance on explicit symbols to implicit numerical reasoning may represent a new exploratory direction for multimodal models in handling visual reference issues—enabling the model to truly “understand” the mathematical meaning of coordinates, rather than treating them merely as a special syntax.
4. Image-Text Mixed Layout and Multi-scale Placeholder Mechanism
In addition to geometric reference tokens, the model configuration introduces a series of special tokens formatted as “place_holder_mm_span_xxxx,” with indices ranging from 0001 to 0442. Based on their literal meaning and function, these tokens are designed as placeholders for image-text mixed scenarios.
Notably, the term “span” implies that this placeholder mechanism is not a simple “one image, one placeholder” setup. In practice, a content-rich image may be sliced into multiple visual patches by the visual encoder. Therefore, by introducing a large number of span placeholders, the model can flexibly insert feature representations corresponding to specific visual patches within the text stream.
Furthermore, although official documentation might mention support for inputting hundreds of images, the existence of up to 442 span markers indicates that its underlying architecture likely supports more fine-grained multi-scale visual information fusion. This means a single high-resolution image might be decomposed into multiple spans for independent encoding and cross-attention computation, thereby enhancing the joint understanding of minute details and global context without significantly increasing single-pass computational complexity.
5. Engineering Implications and Technical Practices
These underlying design details of multimodal large models offer valuable engineering insights for developers. When building enterprise-grade multimodal applications, relying solely on natural language prompt engineering can no longer meet the demands of complex visual tasks. Developers need to deeply understand the design logic at the model’s tokenizer level and even fine-tune visual reference capabilities accordingly.
Simultaneously, the training and inference of such massive and complex multimodal models depend on robust compute power and infrastructure. Whether it is the cleaning and alignment of massive multimodal datasets or the distributed training of ultra-large-scale parameters, the underlying compute platform faces stringent requirements. By leveraging elastic compute, distributed training frameworks, and high-performance object storage services provided by general cloud platforms like Baidu AI Cloud, development teams can focus more on model algorithm evolution and effectively address the challenges of large-scale image-text data processing and multimodal feature alignment.
Conclusion
In summary, the visual primitives technology route and its engineering practices at the tokenizer level demonstrate an innovative path for multimodal large models to bridge the reference gap. The evolution from explicit geometric markers to implicit coordinate reasoning, along with the introduction of multi-scale image-text mixed placeholders, continuously expands the application boundaries of multimodal technology. In the future, as compute infrastructure continues to upgrade and model architectures optimize, we expect to see more large models with precise visual reasoning capabilities take root in highly complex scenarios such as industrial inspection, autonomous driving, and medical image analysis.
