Multimodal Visual Reasoning: How Spatial Referencing Techniques Work
This article analyzes spatial referencing in multimodal visual reasoning, focusing on the reference gap that causes models to lose track of objects during long reasoning chains. It explains a three-stage architecture, a markup syntax that embeds bounding boxes and keypoints directly into the chain of thought, and the data construction and evaluation practices needed to make the approach work in real applications.
1. Background: What a Briefly Withdrawn Technical Report Revealed
A recent industry event drew wide discussion: a research team published a technical report on a multimodal vision model shortly before a holiday, only to withdraw it a few hours after it went live. The community debate centered not on the withdrawal itself, but on the technical approach described in the report—embedding spatial markers (bounding boxes and keypoints) directly into the chain of thought, so the model “points while it reasons.”
From a technical evolution standpoint, the value of such a report is that it brings a long-standing hidden bottleneck in the multimodal field into the open: the problem is not that models “cannot see clearly,” but that they “cannot say clearly where they are looking.” Setting aside specific product attributes, this article focuses on the general technical questions: how to build a precise spatial referencing mechanism in visual reasoning, and how to design a matching model architecture and training data.
2. The Core Problem: The Reference Gap
In complex visual reasoning tasks, model failures are often caused not by insufficient perception, but by reference drift across long reasoning chains. The reference gap refers to the lack of a stable, traceable mapping between language expressions and specific entities in an image.
Three typical failure scenarios stand out:
- Dense counting: When counting crowds or densely packed small objects, the model repeats counts, misses objects, or re-includes items it has already counted in the later stages of reasoning.
- Path and endpoint localization: When judging whether a maze is traversable or locating the end of a curve, the model’s descriptions of spatial relationships become inconsistent.
- Multi-object attribute binding: When determining which of several similar objects has a given attribute, the referenced object is silently swapped.
Humans gesture and point while counting to reduce cognitive load and keep their logic consistent. Abstracting this behavior into model reasoning yields the approach discussed here: embedding spatial markers into the chain of thought.
3. Architecture Overview: A Three-Stage Design, Not Native Multimodality
This approach does not use an end-to-end native multimodal structure. Instead, it follows the mature three-stage design widely used in the industry, which is easier to reuse and tune in engineering practice.
- Vision encoder: An in-house vision Transformer that supports arbitrary-resolution input, avoiding the detail loss caused by fixed-size cropping. A context compression mechanism is introduced at the end of encoding, compressing the key-value cache of visual tokens by roughly four times; combined with an overall encoding strategy, this achieves a high compression ratio for visual information and controls the memory and compute overhead of long sequences.
- Connector and alignment layer: Maps the compressed visual representations into the semantic space of the language model, and is the key to image-text alignment quality.
- Language model backbone: A sparse structure with a large total parameter count but a small number of activated parameters per pass, balancing inference cost and expressive power.
The point of this layering is decoupling: the vision side can iterate on resolution and compression strategies independently, the language side can upgrade reasoning capability independently, and the two connect through a standard interface.
4. Key Mechanism: Writing Spatial Markers into the Chain of Thought
The core innovation is a unified markup syntax that turns spatial references into first-class citizens of the reasoning chain.
A bounding box can be represented as:
<|ref|>TARGET<|/ref|><|box|>[[x1,y1,x2,y2],[x3,y3,x4,y4],...]<|/box|>
A keypoint can be represented as:
TARGET -> <|point|>[[x1,y1],[x2,y2],...]<|/point|>
Here, TARGET is an object placeholder. The design has three key points:
- Placeholders and coordinates appear in pairs, binding the language description to spatial evidence so that every reasoning step can be traced back to an image region.
- Unified coordinate semantics: boxes and points share the same normalized coordinate convention, reducing the model’s learning burden.
- Insertable at any reasoning position: the model can “point” whenever it needs to confirm an object, rather than providing localization only in the final answer.
In implementation, these markers require special handling during decoding, as illustrated below:
SPATIAL_TOKENS = ("<|ref|>", "<|/ref|>", "<|box|>", "<|/box|>", "<|point|>", "<|/point|>")def parse_step(text, image_size):# Extract spatial markers from a reasoning segment and restore normalized coordinatesboxes = extract_between(text, "<|box|>", "<|/box|>")points = extract_between(text, "<|point|>", "<|/point|>")return normalize(boxes, image_size), normalize(points, image_size)
5. Data Construction: The Real Barrier to Deployment
The report devotes substantial space to data, for a straightforward reason: the markup syntax itself is not difficult; the hard part is constructing high-quality reasoning trajectory data with consistent references. Viable approaches include:
- Source mix: Primarily public datasets and web-collected data, covering task types such as counting, localization, path judgment, and attribute comparison.
- Trajectory synthesis: First obtain entity coordinates from a detector or human annotation, then generate chains of thought containing spatial markers in reverse, ensuring that what the model “says” and “points to” are strictly consistent.
- Consistency checks: Filter out samples with out-of-bounds coordinates, mismatched counts of referenced objects, or conflicting references.
- Difficulty stratification: Sample by tiers based on object count, occlusion level, and spatial relationship complexity, so the model learns reasoning rather than only the format on easy samples.
- Scale control: The pre-training stage consumes on the order of trillions of tokens, requiring accompanying data deduplication and quality scoring pipelines.
6. Practical Advice and Common Pitfalls
For teams that want to reproduce similar capabilities in their own applications, a few points are worth attention:
- Build the evaluation set first, then train: Construct a diagnostic set covering dense counting, path connectivity, and reference resolution; otherwise, the phenomenon of “correct format but wrong answer” cannot be explained.
- Balance coordinate precision and compression ratio: Compressing visual tokens too aggressively loses small-object detail and directly hurts performance in dense scenes.
- Estimate inference cost early: A sparse backbone combined with cache compression can significantly reduce cost; elastic inference and observability pipelines can be built on general-purpose cloud container platforms, object storage, and log monitoring services.
- Do not mistake format for capability: A model that has learned to output the markup syntax has not necessarily learned spatial reasoning; acceptance must be based on task metrics, not format compliance rates.
7. Conclusion
What deserves attention in this briefly withdrawn report is not its release cadence, but the problem definition and solution it offers: using explicit spatial markers to bridge the reference gap between language and vision. For multimodal application developers, the architecture is worth borrowing, but data construction and the evaluation system are what ultimately determine success.
