Spatial Referring in Multimodal Reasoning: A Technical Breakdown

    This article examines how spatial referring techniques address the "Reference Gap" in multimodal reasoning, where long chains of indirect references drift away from concrete visual targets. It explains the core idea of externalizing references as structured spatial markers, breaks down a three-stage architecture with heavy visual compression and sparse language activation, outlines four practical paths for constructing aligned training data, and discusses capability boundaries along with reusable engineering practices.

    1. The Starting Point: Why Complex Visual Reasoning Loses Focus

    In multimodal tasks, models often perform normally during the initial visual perception stage when facing questions such as “count the people in this dense crowd,” “find the endpoint of the curve,” or “determine whether the maze is traversable.” However, as the number of reasoning steps increases, the error rate rises noticeably. Typical failure modes include object confusion, repeated counting, missed counts, and going in circles on spatial relationships.

    The root cause can be abstracted as a “Reference Gap”: the references that continuously emerge in a language reasoning chain, such as “it,” “this one,” or “the previous curve,” lack stable binding to specific targets in the image. Language is a symbolic sequence, while an image is a continuous pixel field; there is no natural precise pointer between the two. The model can only rely on soft attention alignment, and the longer the reasoning, the more severe the drift.

    2. The Core Idea: Abstracting “Pointing With a Finger” Into a Machine-Executable Pointer

    When humans count dense objects or navigate a maze, they instinctively gesture with their hands. The essence of this action is to reduce cognitive load: externalizing an abstract reference into a stable spatial coordinate, so that subsequent reasoning always has a physical anchor to refer back to.

    Transferring this mechanism to the model side means that the chain of thought contains not only text but also structured spatial markers that serve as precise pointers between language and vision. The model “points while reasoning,” with each reference explicitly persisted as coordinates at every step, thereby suppressing object drift in long chains.

    3. Architecture Breakdown: Three Stages Rather Than End-to-End Native Multimodal

    This type of solution follows the classic three-stage structure rather than the native multimodal route that fully fuses vision and language. The advantage is controllable training cost and the ability for each module to evolve independently.

    1. Visual encoder: Uses an in-house developed Vision Transformer that supports arbitrary resolution input, avoiding detail loss from fixed-size cropping. The key improvement is a compression mechanism that applies a further 4x compression to visual tokens in the KV cache, bringing the overall compression ratio to the order of thousands. The point of compression is that high resolution produces a large number of visual tokens; without compression, the long reasoning chain would be overwhelmed by visual context.
    2. Language model: Uses a lightweight general-purpose language model (roughly two hundred billion total parameters and tens of billions of activated parameters), balancing inference cost and capability. Heavy compression on the visual side combined with sparse activation on the language side is a common combination for controlling per-inference cost.
    3. Marker injection layer: Responsible for inserting spatial markers into the chain of thought according to a fixed syntax; it is the “pointer protocol” connecting the first two.

    An illustrative form of the expression is as follows (only describing the general syntax structure):

    1. # Box marker: placeholder + normalized coordinate sequence
    2. <|ref|>TARGET<|/ref|><|box|>[[x1,y1,x2,y2],[x3,y3,x4,y4],...]<|/box|>
    3. # Point marker: replace the placeholder with a coordinate sequence
    4. <|point|>[[x1,y1],[x2,y2],...]<|/point|>

    Here TARGET is the object placeholder, and coordinates are typically normalized values relative to the image width and height, so the same syntax can adapt to arbitrary resolution inputs.

    4. Data Construction: The Real Engineering Challenge

    The marker syntax itself is not complex; the difficulty lies in how to construct training data at scale where the “reasoning process and spatial markers are strictly aligned.” Four practical paths can be summarized:

    • Programmatic generation: Use rules or algorithms to generate controllable scenarios such as mazes, grid counting, and curve endpoints, with coordinates given directly by the generator and naturally noise-free.
    • Back-annotation from detection and segmentation results: Use general detection and segmentation capabilities to obtain candidate boxes and points, then apply consistency filtering to remove low-confidence samples.
    • Reverse construction: First sample target coordinates, then generate the corresponding questions and answers, ensuring that the Q&A and coordinates are mutually causal.
    • Consistency validation: Check whether coordinates fall within image boundaries, whether the same reference always points to the same coordinate throughout the chain, and whether counting questions contain duplicates.

    The core metric of data quality is not quantity but the stability of the “reference-to-coordinate” mapping. Once a training set contains a large number of mislabeled samples, the model will learn reasoning chains that appear fluent but point to the wrong locations.

    5. Capability Boundaries and Practical Testing Notes

    It should be stated objectively that this type of framework offers clear gains for “localizable and enumerable” tasks, such as counting, object localization, and structured chart reading, but offers limited improvement for tasks requiring global spatial deduction (such as complex maze connectivity or multi-step geometric transformations). There are two reasons: first, coordinates only solve “which one to point at,” not “how to derive the conclusion”; second, after visual tokens are heavily compressed, fine-grained spatial information itself is lost.

    For engineering deployment, it is recommended to: route spatial referring tasks and global reasoning tasks separately; perform secondary validation on counting results; and carve out a separate “long-chain referring” subset in the evaluation set, otherwise overall metrics will mask the drift problem.

    6. Reusable Engineering Takeaways

    • Pointer externalization: Writing intermediate references as structured markers yields dual benefits in interpretability and verifiability.
    • Tiered compression: Combining visual-side compression with language-side sparse activation is a cost solution for long-context multimodal scenarios.
    • Data first: The ceiling of structured-marker capabilities is determined by data consistency, not model scale.
    • Cloud implementation path: Training and inference can be hosted on container platforms, data construction and back-annotation can leverage object storage and batch processing jobs, and effect monitoring can rely on logging services and monitoring alerts to form a closed loop.

    Overall, embedding spatial markers into the chain of thought is a paradigm shift that elevates “reference” from implicit attention to an explicit protocol. It may not immediately solve all spatial reasoning problems, but it provides a clear and reproducible engineering handle for the verifiability of multimodal systems.