Multimodal Reasoning Spatial Referencing: How to Bridge the Gap with Spatial Markers in Chain-of-Thought
This article examines a common failure mode in multimodal reasoning: models describe single frames accurately but lose track of objects, miscount, or loop on spatial relations during multi-step reasoning. It explains the core fix—making spatial markers (bounding boxes and points) first-class elements of the chain of thought—along with the marker syntax, a classic three-stage architecture, data construction principles, common pitfalls, engineering mitigations, and a cloud-based validation loop. Readers will learn why the real barrier is data and evaluation design rather than the framework itself.
1. Where the Problem Starts: Models Can See, but Cannot Point Precisely
In multimodal reasoning, a recurring failure pattern appears: a model’s overall description of a single frame is not obviously wrong, but as soon as multi-step reasoning begins, it confuses objects, counts the same target repeatedly, misses targets, or goes in circles on spatial relations. This is not simply a lack of visual recognition ability. It is the absence of a stable referential anchor in the reasoning chain—the “it” the model wants to refer to in step two can no longer reliably map back to “that one” it saw in step one.
The industry usually attributes this to the referential gap: there is no precise, reusable mapping between the language symbol space and the image space. When people count dense objects, judge whether a maze is passable, or track the endpoint of a curve, they often unconsciously gesture with their hands. The essence of that gesture is to temporarily “hang” abstract reasoning on concrete spatial coordinates, reducing cognitive load and keeping reasoning consistent from start to finish. Abstracting this intuition into a model yields the core idea of this article: make spatial markers first-class citizens in the chain of thought.
2. The Core Method: Writing Spatial Markers into the Chain of Thought
The key design of this framework is to explicitly insert two types of spatial pointers during reasoning: rectangles (boxes) and points. A box expresses “the object in this region,” while a point expresses “a precise location or a spot along a trajectory.” Neither is an auxiliary output attached to the final answer; both are components of the intermediate reasoning steps.
A schematic marker syntax can be abstracted as follows (the placeholder TARGET stands for the object currently under discussion):
# Box marker: object placeholder + normalized coordinate sequence<|ref|>TARGET<|/ref|><|box|>[[x1,y1,x2,y2],[x3,y3,x4,y4], ...]<|/box|># Point marker: replace the object placeholder with a coordinate sequence<|point|>[[x1,y1],[x2,y2], ...]<|/point|>
This notation brings three direct benefits. First, references become addressable: every subsequent reasoning step can point back to the same set of coordinates instead of relying on vague natural-language terms like “it” or “this one.” Second, state becomes verifiable: coordinate sequences naturally support deduplication, sorting, and count-consistency checks, so rule-based post-hoc validation is feasible in engineering. Third, the process becomes interpretable: an error can be traced to a specific marker in a specific step rather than dismissed with a blanket “the model is just bad.”
It is worth stressing that coordinates should use a consistent normalized scale, kept identical across data construction and inference. Otherwise, even the most elegant framework will fail due to coordinate-system drift.
3. Architecture: A Classic Three-Stage Design, Not Native Multimodality
Based on public descriptions, the overall architecture remains a classic three-stage design rather than a native multimodal route that fully fuses vision and language.
- Visual encoding side: It uses an in-house visual backbone that supports arbitrary-resolution input, avoiding crude cropping to fit aspect ratios. A compression mechanism then applies a further 4x compression to the key-value cache of visual tokens, substantially raising the overall compression rate at high resolution. This is critical in engineering: high resolution brings detail but also token explosion, and the compression rate determines whether long reasoning chains are affordable.
- Language model side: It uses a general-purpose language backbone with a small activated-parameter count, keeping a large gap between total and activated parameters—a typical sparse design. For multimodal reasoning tasks, this means controllable per-inference cost, making it suitable for large-scale batch evaluation and online canary rollouts.
- Alignment and inference side: Visual tokens and text tokens interact within the same sequence space, and spatial markers participate in attention computation as special syntax fragments, so “pointing” and “thinking” share the same context.
4. Data Construction: The Real Dividing Line for Practical Adoption
The framework itself is not complex; the hard part is data. To teach a model to “point while thinking,” the training corpus must combine high-quality spatial annotations with verifiable reasoning chains. Four construction principles can be summarized:
- Annotation and reasoning from the same source: Spatial annotations should not be pasted on after the fact; they should emerge naturally from reasoning steps, ensuring every marker has a linguistic motivation.
- Difficulty stratification: Progress from single-target localization, to multi-target counting, to multi-hop spatial-relation judgment, gradually increasing the number of reasoning steps and the density of distractors.
- Decidable negative samples: Construct clear counterexamples for conclusions such as “the maze is not passable” or “the curve endpoint does not exist,” so the model does not learn to always give affirmative answers.
- Scale and ratio: The pre-training stage relies mainly on open-source datasets and web-collected data, consuming on the order of trillions of tokens; spatial-marker data must be kept at a reasonable ratio to regular image-text data to prevent regression in general capabilities.
A simplified example of data organization:
{"image": "normalized_input_reference","question": "Who is the third person from the left in the image, and roughly how far is he from the right boundary","cot": [{"op": "box", "target": "person", "coords": [[0.11,0.20,0.19,0.78]]},{"op": "sort", "by": "x1", "order": "asc"},{"op": "point", "target": "right_boundary", "coords": [[0.97,0.50]]},{"op": "compare", "relation": "distance"}],"answer": "directly derivable from the marker sequence"}
5. Practical Observations and Common Pitfalls
On complex spatial-logical reasoning, this type of framework can still produce unstable answer quality, for three common reasons. First, coordinate precision is affected by visual-encoding compression, so errors are amplified around dense small targets. Second, overly long reasoning chains dilute mid-chain markers, causing referential failure. Third, insufficient decidable negative samples in training data lead the model to favor plausible-sounding affirmative conclusions.
The corresponding engineering advice is: treat spatial markers as verifiable intermediate artifacts and add a rule layer after inference for deduplication and count-consistency checks; limit the number of reasoning steps for critical scenarios or introduce segmented back-references; and explicitly distinguish “recognition errors” from “referential errors” in evaluation sets, otherwise optimization efforts lose focus.
6. Building a Validation Loop in the Cloud
To reproduce and evaluate this capability in your own business, you can build a loop with general-purpose cloud product categories: use object storage to hold image-text and annotation data, a container platform to host inference services and load testing, a message queue to decouple data construction from training tasks, and logging plus monitoring and alerting to track referential error rate, average reasoning steps, and per-request cost. Baidu AI Cloud offers directly composable product categories for these general capabilities, making it easier for teams to chain “data construction—training—evaluation—canary” into a sustainable iteration pipeline.
7. Conclusion
Embedding spatial markers into the chain of thought essentially adds an addressable referential layer to multimodal reasoning. Its value lies not only in improving accuracy on counting and spatial-relation tasks, but also in turning invisible reasoning states into explicit structures that are verifiable, traceable, and optimizable. For developers, the real barrier is not the framework but data construction and evaluation design; whoever can measure referential errors separately will converge faster toward a stable, usable multimodal reasoning system.
