Thinking in Visual Primitives: A New Paradigm for Multimodal Spatial Reasoning
This article explores a new paradigm for multimodal spatial reasoning that treats coordinates as reasoning anchors rather than final answer annotations. It explains the structural "referential gap" in language-based reasoning, the core idea of interleaving natural language with points and bounding boxes, key architecture and implementation practices, data construction and training methodology, evaluation dimensions, and known limitations. Readers will gain a practical understanding of how explicit coordinate supervision can improve grounding, auditability, and stability in spatial reasoning tasks.
Thinking in Visual Primitives: A New Paradigm for Multimodal Spatial Reasoning
1. Where the Problem Starts: Models Can “See” but Cannot “Point” Accurately
Recent progress in multimodal large models has mainly been in recognition and description. Given an image, a model can state what is in the scene, what colors appear, and what category the scene belongs to. But once the task shifts from description to reasoning, the weaknesses become clear.
Suppose an image contains a dozen or so objects of similar size and color, and the user asks: “How much taller is the third-largest object from left to right than the rightmost one?” The model must maintain a set of referential relationships internally using language. Natural language lacks sufficient resolution in such dense scenes. A phrase like “the big red object on the left” may match multiple candidates at once. Once the reference drifts, every subsequent reasoning step is built on a false premise.
These failures are not occasional “hallucinations” but structural problems. Language is a discrete symbol system and inherently lacks precise addressing for continuous two-dimensional space. When visual input is encoded into the model’s representation space, spatial relationships are heavily abstracted, and the model can only rely on attention weights to “softly” look back at the image. As the reasoning chain grows longer, attention is diluted, and the referential relationships established early gradually lose their anchor. The industry often summarizes this as the “referential gap”: there is no stable, verifiable link between language concepts and physical coordinates.
2. Core Idea: Upgrading Coordinates from “Answer Annotation” to “Reasoning Anchor”
The key abstraction of “thinking in visual primitives” is to redefine the role of coordinates in the workflow. In traditional approaches, coordinates appear only at the output layer, used for bounding-box regression or region localization, as part of the final answer. All intermediate reasoning steps are still handled entirely in natural language. The new paradigm elevates point coordinates and bounding boxes to the basic units of reasoning, allowing the model to insert coordinates at any step of the chain of thought, so that language concepts and physical positions alternate and validate each other.
This brings three direct benefits. First, references become explicit. The model no longer needs to “remember” which object is the Nth one; it can write back coordinates at any time, and later steps can simply reference those coordinates, reducing ambiguity to zero. Second, the reasoning process becomes auditable. The coordinate sequence itself is a traceable evidence chain. When an error occurs, it is possible to pinpoint which specific step’s anchoring went wrong, rather than facing an unverifiable natural-language narrative. Third, it matches human cognitive habits. When people count, navigate a maze, or compare the heights of two objects, they instinctively use a finger or gaze to mark positions, converting abstract counting into repeated confirmation of concrete locations. Having the model imitate this behavior gives it an externally verifiable “working memory.”
3. Architecture and Implementation Essentials
3.1 Visual Encoding and Extreme Compression
Spatial reasoning is highly sensitive to visual detail, but sending all raw visual tokens into the model is not cost-effective. A feasible path is to build a multi-level compression pipeline: first perform local region aggregation, then cross-scale fusion, and finally merge the key-value caches of several visual tokens into a single entry, greatly reducing the visual token budget while preserving spatial layout information. Two engineering points deserve attention: compression must be spatially aware and must not lose small objects through pooling; and the compression ratio must be systematically calibrated against downstream task accuracy to find the inflection point rather than blindly pursuing the extreme.
3.2 Coordinate Representation and Output Protocol
Coordinates need a strict and compact serialization format that is easy for the model to generate and for a parser to validate. The following is an illustrative output fragment (showing structure only, not a specific interface):
Step 1: Need to locate "the leftmost red square" -> POINT(0.12, 0.46)Step 2: Filter candidate regions to three -> BOX(0.10,0.40,0.18,0.52) / BOX(0.33,0.41,0.41,0.53) / BOX(0.55,0.39,0.63,0.51)Step 3: Compare heights one by one; the largest is the second -> BOX(0.33,0.41,0.41,0.53)Step 4: Compute the height difference -> 0.12 - 0.09 = 0.03Answer: 0.03
For implementation, it is recommended to use normalized coordinates, a fixed number of decimal places, and constrained decoding (limiting the value range and format of coordinate tokens), plus a lightweight validator on the inference side: out-of-bounds coordinates, non-positive box width or height, and references to nonexistent anchors should trigger resampling rather than proceeding directly to the next step.
3.3 Integration with General Cloud Capabilities
To reproduce similar capabilities in your own business, you usually do not need to build infrastructure from scratch. During data construction, object storage can host massive image-text samples, and message queues can decouple annotation and cleaning tasks. During training, container platforms can elastically schedule heterogeneous compute. After launch, logging services and monitoring alerts can track metrics such as coordinate parsing failure rate, average number of reasoning steps, and first-token latency. Baidu AI Cloud’s general cloud product categories can cover the above stages; specific choices should be evaluated based on data scale and compliance requirements.
4. Data Construction and Training Methodology
Data is the decisive factor for this paradigm. The construction process generally includes four steps. First, task taxonomy design, covering tasks that require explicit spatial operations such as counting, sorting, path tracking, spatial relationship comparison, and occlusion judgment. Second, automatic annotation, using mature detection and segmentation capabilities to generate candidate coordinates, followed by consistency filtering. Third, reasoning-chain synthesis, interleaving “natural language steps” and “coordinate steps,” and ensuring that the coordinates in each step can be derived from the previous step, avoiding unfounded jumps. Fourth, difficulty stratification, bucketing by target density, scale difference, and occlusion ratio to prevent the model from converging only on simple samples.
For training, a staged strategy is advisable: first warm up spatial awareness mainly with coordinate prediction, then introduce the complete reasoning chain for joint optimization, and finally use preference alignment to suppress the pseudo-reasoning pattern of “giving the answer first and adding coordinates afterward.” It is important to emphasize that coordinate supervision must be dense and visible in intermediate steps; supervising only at the final answer will cause the model to degenerate into treating coordinates as decorative output.
5. Evaluation Dimensions and Known Limitations
Evaluating such a framework should not look only at final answer accuracy. It is recommended to also observe: reference success rate (whether coordinates hit the target), reasoning-chain self-consistency rate (whether references between steps are valid), the compression-ratio versus accuracy curve, and performance degradation speed on long-chain tasks.
The limitations are equally clear. First, coordinate accuracy is constrained by the resolution of the visual encoder, and tiny targets and densely occluded scenes are still prone to inaccuracy. Second, extreme compression may lose texture details, affecting judgments that rely on fine-grained appearance. Third, coordinate sequences lengthen the output, increasing latency and cost, so techniques such as cache reuse and speculative decoding are needed for optimization. Fourth, coordinate system design for cross-image references (multi-image comparison) remains immature.
6. Conclusion
Writing coordinates into the chain of thought is essentially replacing unreliable internal memory with verifiable external symbols. This idea has transferable value for any multimodal application that requires precise spatial operations: defect localization in industrial quality inspection, object counting in remote sensing imagery, path planning for maps and street views, and block association in document layout understanding. For developers, the key to implementation is not chasing a specific framework but establishing the engineering habit of “coordinates as evidence” — rigorous data synthesis, a strongly constrained output protocol, and a traceable validation chain. With all three in place, the stability of spatial reasoning will improve substantially.
