Multimodal Visual Primitives: How Structured Geometric Pointers Improve Image Understanding
Multimodal large models can describe images, answer questions, and perform simple localization, but they often break down in dense scenes or when object relationships get complex. This article explains the two underlying gaps—perception gaps and reference gaps—that cause these failures, and how visual primitives (points, bounding boxes, and polygons) provide a structured, machine-parseable solution. It covers special token design, span placeholders for multi-image inputs, benefits for counting and spatial reasoning, a two-stage training strategy, and practical pitfalls developers should avoid when adopting visual primitives in their own multimodal pipelines.
Multimodal Visual Primitives: How Structured Geometric Pointers Improve Image Understanding
The Two Gaps Behind Image Understanding Failures
Multimodal large models have made substantial progress in image understanding, handling tasks such as captioning, question answering, and simple object localization. However, when scenes become dense or object relationships grow complex, these models often suffer logical breakdowns. Two deep gaps lie behind this problem:
- Perception gap: Visual encoders struggle to capture fine textures, occluded objects, or small targets.
- Reference gap: During reasoning, models still describe objects using natural language. Expressions like “the red thing in the upper left” become severely ambiguous in scenes with multiple, overlapping, or visually similar objects.
What Are Visual Primitives?
Visual primitives are a structured solution aimed directly at the reference gap. Instead of natural language phrases, they abstract an object’s position and shape in continuous visual space into a set of unambiguous geometric pointers. Common primitives include:
- Points: precise coordinates
- Bounding boxes: rectangular regions
- Polygons: arbitrary contours
By adding dedicated special tokens to the tokenizer in advance, the model can insert these primitives directly into its generated sequences, transforming visual reference from vague text into parseable structured data.
Special Token Design
A typical design uses paired start and end symbols. For example, a point primitive wraps a coordinate pair in one pair of tokens, a box primitive wraps four numeric values in another, and a polygon represents a vertex list as a token sequence. These markers are set as special tokens and excluded from normal text normalization, guaranteeing their atomicity during encoding and decoding.
In actual inference, a model may no longer explicitly output complete marker pairs and instead directly generate coordinate sequences. This is usually the result of later-stage training internalizing explicit primitives into implicit coordinate descriptions. In either form, the output remains machine-parseable, which facilitates subsequent rendering, validation, or secondary computation.
Span Placeholders for Mixed-Content Inputs
Mixed image-text scenarios require an additional placeholder mechanism. When the input contains multiple images, or a single image is divided into multiple regions, span placeholders are inserted into the text stream to anchor where visual content should go. These placeholders correspond one-to-one with the feature vectors produced by the image encoder, ensuring the language model correctly aligns visual and linguistic information during generation.
The number of placeholders is usually much larger than the actual supported image limit, leaving room for flexible image splitting or high-resolution tiling.
Where Visual Primitives Deliver Direct Gains
Visual primitives bring clear benefits in three categories of difficult tasks:
- Dense counting: Instead of vague statements like “about twenty,” the model outputs precise coordinates for every instance. Counts can then be derived through simple deduplication or clustering, significantly reducing missed and duplicate counts.
- Complex localization and relational reasoning: Polygon or box primitives can precisely describe irregular object contours, supporting fine-grained spatial judgments such as “object A’s bottom-right corner intersects object B’s top-left corner.”
- Interpretability and post-processing: Structured output can be consumed directly by external programs for visualization, error analysis, or fusion with downstream detectors, enabling closed-loop verification.
A Two-Stage Training Strategy
Introducing visual primitives typically happens in two stages. In the early stage, the model is forced to explicitly use marker pairs in its chain of thought so it learns the grammar of geometric description. In the later stage, constraints are gradually relaxed, allowing direct coordinate output to reduce generation length and improve fluency.
This evolution explains why some models show no raw markers in their final reasoning traces yet still produce precise coordinates—the primitive capability has been internalized. When fine-tuning, developers can first use synthetic data with markers to reinforce the grammar, then gradually transition to pure coordinate data, balancing controllability with efficiency.
Practical Considerations
Several points deserve attention in practice:
- Tokenizer completeness: The tokenizer must contain all primitive markers and their terminators; otherwise, unknown tokens or truncation will occur.
- Coordinate normalization consistency: The normalization scheme (pixel coordinates, relative coordinates, or values normalized to [0, 1]) must match the training data, or localization will shift systematically.
- Long polygons: For very long polygons, limit the vertex count or apply a simplification algorithm to prevent excessively long sequences from diluting attention.
- Multi-image alignment: In multi-image scenarios, the mapping order between placeholders and actual image features must match strictly. Generating an explicit mapping table during preprocessing is recommended.
Conclusion
Visual primitives effectively close a critical weakness of multimodal models by shifting reference from the linguistic space to the geometric space. They do not replace a strong visual encoder; rather, they give the language model a precise, parseable set of “visual pointers.” As model scale grows and training strategies improve, this kind of structured visual representation is likely to become a standard component in complex image understanding tasks, helping systems achieve higher accuracy and stronger interpretability in scenarios such as industrial inspection, document parsing, and robot navigation.
Developers can start from existing open-source tokenizer configurations, gradually introduce primitive markers, and combine them with a coordinate validation module to quickly verify the gains on their own business data.
