Visual Primitives: Closing the Referring Gap in Multimodal Models
Multimodal models often fail at dense counting, localization, and spatial reasoning not because they cannot see, but because natural-language referring is ambiguous. This article explains visual primitives—points, boxes, polygons, and refs—how they appear in tokenizers, why they may vanish from chain-of-thought, and how to evaluate coordinate-level consistency.
1. The real bottleneck is referring, not “seeing”
Multimodal large models remain unstable on dense counting, complex object localization, and spatial-relation reasoning. The usual explanations—insufficient resolution or a weak vision encoder—are incomplete. After basic perception is in place, the bottleneck often shifts to language: the model still refers to objects in an image with natural language.
Natural-language referring is inherently ambiguous. Phrases such as “the cup on the left” or “the pedestrian near the edge” depend on context and viewpoint. When objects proliferate or spatial relations become dense, the referring chain breaks and reasoning collapses. That is the referring gap: visual information is already in context, but it cannot be cited stably and uniquely.
2. Visual primitives: referring as pointers
Visual primitives move referring out of natural language and into unambiguous pointers in continuous visual space. Typical primitives include:
- point: a 2D coordinate for an instance or key location
- box: a rectangular region for an object extent
- polygon: a closed contour for fine shape and segmentation
- ref: binding a primitive to a semantic label, forming a label–pointer map
Counting then becomes a set of points rather than a verbal enumeration; localization becomes coordinates rather than directional adjectives. The language model is reduced to generating a structured pointer sequence, and ambiguity is removed.
3. Traces in the tokenizer vocabulary
This approach usually leaves clear evidence in the tokenizer. An illustrative special-token configuration:
[{"id": 129271, "content": "<|/polygon|>", "special": true},{"id": 129272, "content": "<|polygon|>", "special": true},{"id": 129273, "content": "<|/point|>", "special": true},{"id": 129274, "content": "<|point|>", "special": true},{"id": 129275, "content": "<|/box|>", "special": true},{"id": 129276, "content": "<|box|>", "special": true},{"id": 129277, "content": "<|/ref|>", "special": true},{"id": 129278, "content": "<|ref|>", "special": true}]
Paired open/close markers show that these tokens are trained as structural delimiters, not ordinary text; special: true prevents further splitting. It is a low-cost, strongly constrained scheme: no architecture change, only vocabulary and training data, to introduce a new action space.
4. Why explicit primitives “disappear”
A recurring observation: actual chain-of-thought almost never shows paired <|point|>...<|/point|> structures. Instead, coordinates appear inside natural language, e.g. “object A is near (0.42, 0.71)”.
Plausible, non-exclusive explanations:
- Data distribution: if later SFT data is written as “text + coordinates,” the model converges to the more frequent form and special tokens become redundant.
- Token efficiency: paired delimiters lengthen sequences and are implicitly dropped in long reasoning.
- Internalization: the model has learned coordinate semantics and no longer needs wrappers; primitives degrade from syntax to a semantic prior.
For users: do not infer that a capability is used just because a token exists in the vocab; judge by the actual output distribution.
5. Placeholders in interleaved image–text
Another class of special tokens looks like place_holder_mm_span_0001 through place_holder_mm_span_0442. They reserve slots in interleaved text so the text sequence can align with visual token spans. Two common misconceptions:
- The number of placeholders is not the maximum number of images. If documentation claims hundreds of images while there are only hundreds of placeholders, a more likely design is multiple spans per image, split by content complexity.
- Span granularity affects visual compression and the continuity of positional encodings, and is a key variable for long documents and multi-image settings.
6. How to verify and evaluate
A three-step technical due diligence:
- Static check: export the vocabulary; confirm paired structural tokens and contiguous IDs.
- Behavioral probe: construct dense counting and occluded localization samples; measure the ratio of explicit primitives vs. bare coordinates.
- Consistency check: parse coordinates, project them back onto the original image, and compute hit rate and duplication—not whether the language “sounds right.”
Input: N targets in the image; output a point for eachCheck: parse coords -> denormalize -> whether the point lands in the target maskMetrics: precision / recall / duplicate-point ratio / out-of-bound rate
Evaluation sets should cover dense small-object counting, partial localization under occlusion, fine-grained shape segmentation, spatial-relation QA, and high-resolution long images. Without those dimensions, language skill is easily mistaken for visual skill.
7. Engineering notes
- Coordinate normalization: confirm absolute pixels vs. relative ratios; scaling and cropping introduce systematic offset.
- Resolution strategy: tiling improves detail but breaks global coordinate consistency; unify mapping in preprocessing.
- Output constraints: structured parsing and retries to avoid free-text parse failures.
- Observability: log parse-failure and out-of-bound rates; batch regression in your container platform.
- Data loop: store samples and artifacts in object storage as a reusable evaluation baseline.
8. Conclusion
Visual primitives convert referring in multimodal reasoning from fuzzy language to precise pointers. Whether an experimental multimodal model truly has this ability is not decided by the vocabulary, but by output distribution and coordinate back-projection consistency. For developers, a coordinate-level evaluation system is more valuable over time than chasing model names.
