Referential Gaps and Visual Coordinate Representations in Multimodal Models
Recent multimodal models still struggle with dense counting, complex object localization, and multi-object comparison. This article examines the referential gap versus the perceptual gap, explains visual primitives such as points, boxes, and polygons, discusses explicit markers versus implicit coordinates, covers placeholder mechanics in interleaved image-text inputs, and provides practical guidance on parsing, evaluation, and deployment.
Why the “Seeing” Ability of Multimodal Models Deserves a Second Look
Recent multimodal models have made clear progress in image understanding, yet their results remain unstable on tasks such as dense counting, complex object localization, and multi-object comparison. Two explanations dominate the discussion. The first attributes the problem to the visual encoder: insufficient resolution or weak feature representation means the model simply cannot “see clearly.” This is the perceptual gap. The second explanation points to the language side: during reasoning, the model still describes the scene in natural language, and natural language references to “which object” are often ambiguous. This is the referential gap.
Distinguishing between the two directly shapes the optimization strategy. If the issue is purely perceptual, increasing input resolution or improving visual encoding will help. If the issue is referential, even perfectly fine-grained visual features will not save the model: once the reasoning chain organizes objects with descriptions like “the person on the left” or “a few cups on the table,” errors in count and position accumulate step by step and eventually corrupt the final conclusion.
The Design Rationale Behind Visual Primitives
A visual primitive can be understood as an unambiguous pointer. It replaces natural-language references to objects with image coordinate representations, which commonly take three forms:
- Point: marks the center or a key position of a single object, suitable for counting and keypoint localization.
- Box: represents a region using diagonal coordinates or a center point plus width and height, suitable for detection-style references.
- Polygon: describes an irregular contour with a sequence of vertices, suitable for scenarios requiring boundary detail.
For output formatting, a common approach is to define a pair of start and end tags for each primitive, with normalized coordinates placed in between. An illustrative format looks like this:
<point>[[0.31, 0.58]]</point><box>[[0.12, 0.20, 0.45, 0.70]]</box>
The tag names and coordinate syntax above are for structural illustration only; the actual format of any specific model should follow its official configuration and examples.
The advantage of this design is that every object in the reasoning process is uniquely anchored. When the model refers to “this object” in a later step, it is actually pointing to a fixed coordinate rather than a potentially ambiguous description.
Explicit Markers vs. Implicit Coordinates
A model’s vocabulary may retain a set of dedicated start and end tags, which indicates that explicit primitives were considered during design. However, these tags may not appear in actual inference outputs. This is not unusual in engineering practice, and there are three common explanations.
- Evolution during training. Explicit tags may only be used in intermediate training stages or during data construction. In later fine-tuning, the model learns to express positions directly with plain coordinate text, and the dedicated tags are gradually weakened.
- Output post-processing. The inference service may convert dedicated tags into coordinate text before returning results, so users only see the converted content.
- Equivalent representations. As long as the output stably contains a parseable coordinate structure, the model has functionally achieved referential anchoring, regardless of whether dedicated tags are used.
Developers can determine which case applies using two methods. First, check whether the output stably contains a parseable coordinate structure. Second, build a set of counting and localization samples and compare the accuracy of “coordinate-based output” against “text-only output.” If coordinate-based output is noticeably more stable in multi-object scenarios, coordinate-based reference is genuinely doing the work.
The Placeholder Mechanism in Interleaved Image-Text Inputs
In interleaved image-text scenarios, the input sequence must reserve a position for each image. A common approach is to insert a placeholder in the text, which the preprocessing pipeline then replaces with the visual feature sequence for that image. Placeholder indices typically correspond to the order of images in the input, making it easy to match visual features during inference.
The relationship between placeholder indices and the number of supported images should be understood in light of three factors.
- Sequence length per image: determined jointly by the visual encoder’s downsampling method, patch strategy, and whether a high-resolution mode is enabled. The same image may consume very different numbers of tokens under different configurations.
- Upper bound of the index space: a placeholder index is essentially an index, and its maximum value does not necessarily equal the maximum number of supported images. A single request may contain multiple text segments or placeholder fragments, and the index space may also include reserved headroom.
- Context window: total input length is bounded by the window, so the number of images that fit is usually determined jointly by window size and per-image token consumption.
Another possible explanation is that if an image is split into multiple sub-regions, each sub-region may correspond to an independent placeholder fragment. In that case, the number of fragment indices exceeds the number of images. This hypothesis can be verified experimentally: fix the number of images, count the placeholders that actually appear in one request, and compare against the tiling parameters.
Therefore, when judging how many images a model can handle, rely on the limits stated in the official documentation and confirm through actual testing, rather than inferring from the index range alone.
Engineering Practice: Parsing and Validation
1. Parsing Coordinate Output
The following generic parsing pseudocode shows how to extract point coordinates from model output and convert them to pixel coordinates:
function parse_points(text, img_width, img_height):pattern = "<point>\[\[([\d.]+),\s*([\d.]+)\]\]</point>"results = []for match in find_all(text, pattern):x_norm = to_float(match[1])y_norm = to_float(match[2])if x_norm < 0 or x_norm > 1 or y_norm < 0 or y_norm > 1:continue // log out-of-range cases for later statisticsresults.append((x_norm * img_width, y_norm * img_height))return results
The parser should tolerate differences in whitespace and capitalization, and should record out-of-range or malformed results separately instead of silently dropping them.
2. Building the Evaluation Set
- Counting evaluation: prepare samples stratified by target count, such as low, medium, and high tiers, and measure accuracy for each tier.
- Localization evaluation: annotate each target with a box or a point. A predicted point is counted as a hit if it falls inside the annotated box; alternatively, compute the distance between the predicted point and the annotated center.
- Consistency evaluation: ask about the same image multiple times with different phrasings and check whether count and position results remain stable.
3. Common Issues and How to Handle Them
- Out-of-range coordinates: normalized coordinates should fall between 0 and 1; out-of-range results need to be tracked separately.
- Missed detections: the model may describe only some of the objects. Track the miss rate and distinguish between perceptual misses and output truncation.
- Format drift: output format may vary across prompts. Handle this at the parsing layer rather than relying on a single template.
Deployment Recommendations
- Use high-resolution annotated samples first to determine whether errors are perceptual or referential, then decide on the optimization direction.
- In applications that require stable localization, store coordinate results as structured fields rather than keeping only natural-language descriptions.
- For the relationship between placeholders and image counts, rely on the official documentation and your own measurements, and add validation for image count and dimensions in your system.
- Record the model version, prompt, and parsing rules used in each evaluation run to ensure results are reproducible.
