Multimodal Reasoning and Spatial Reference: A New Paradigm for Visual Chain-of-Thought

    This article explores a new paradigm for multimodal reasoning that embeds structured spatial markers directly into the chain of thought. It explains the "Reference Gap" between language symbols and image pixels, introduces box and point marker syntax, breaks down the classic three-stage architecture (vision encoder, visual token compression, language model backbone), and details a four-layer data construction pipeline. It also covers evaluation metrics, engineering deployment advice, and the limitations of this approach.

    1. The Problem: Why Multimodal Reasoning Fails at Reference

    In multimodal visual reasoning tasks, models often fail not because they “cannot see clearly,” but because they “cannot specify which object they are looking at.” When a user asks questions like “count the people in the image,” “find the endpoint of this curve,” or “determine whether the maze is connected,” the model must repeatedly refer to the same set of visual objects throughout a long reasoning chain. Without a stable way to reference objects, three typical errors emerge: object confusion (assigning A’s attributes to B), missed or duplicate counting, and circular spatial reasoning.

    This can be abstracted as the Reference Gap: there is no verifiable anchor between the language symbol space and the image pixel space. Traditional approaches rely on implicit alignment, and errors accumulate as the number of reasoning steps grows. In contrast, humans instinctively point or draw lines when counting dense objects or tracing a path through a maze, using external actions to reduce cognitive load and maintain logical consistency. Abstracting the “finger” into spatial coordinates that a model can output is the core idea discussed here.

    2. Core Idea: Writing Spatial Markers into the Chain of Thought

    The key change in this framework is a single sentence: the chain of thought contains not only text but also structured markers that point to image locations.

    • Box markers are used to refer to a region or object. Syntactically, they wrap a target placeholder with reference start/end markers, then wrap a set of coordinates with box markers:
      1. <|ref|>TARGET<|/ref|><|box|>[[x1,y1,x2,y2],[x3,y3,x4,y4],...]<|/box|>
    • Point markers are used to refer to precise locations, replacing the target placeholder with a set of point coordinates:
      1. TARGET -> <|point|>[[x1,y1],[x2,y2],...]<|/point|>

    This yields three direct benefits. First, references are verifiable: coordinates can be projected back onto the original image for consistency checks. Second, the reasoning state is externalized, so object identity does not have to be maintained through memory across long chains. Third, supervision signals are denser, since the coordinates themselves serve as fine-grained alignment labels. From an engineering perspective, it is advisable to normalize coordinates (to 0–1 relative to width and height, or to integers in 0–1000) and to constrain output with a restricted grammar during decoding to avoid format drift.

    3. Architecture Breakdown: A Classic Three-Stage Design Rather Than Native Multimodality

    Such solutions typically follow a mature three-stage structure rather than an end-to-end native multimodal design:

    1. Vision encoder: An in-house vision backbone supports arbitrary-resolution input, avoiding detail loss from forced cropping for different aspect ratios.
    2. Visual token compression: A mechanism such as strided attention compresses the key-value cache of visual tokens by roughly 4x at the output end. Combined with a high-resolution tiling strategy, the overall compression ratio can reach the order of thousands, allowing long-image and multi-image scenarios to fit into a limited context.
    3. Language model backbone: A sparse configuration with roughly 284B total parameters and 13B activated parameters balances capacity and inference cost. Spatial markers are added to the vocabulary as special tokens and participate in attention computation.

    It is important to emphasize that the more aggressive the compression, the more necessary it is to validate recall on small objects and dense scenes; otherwise, references may point to the wrong locations. In practice, it is recommended to retain a high-resolution detail channel or to perform feature alignment checks before and after compression.

    4. Data Construction: The Make-or-Break Factor

    The effectiveness of marked chain-of-thought data depends roughly 80% on data. The work can be split into four layers:

    • Pre-training layer: Primarily uses existing public datasets and web-collected data, consuming trillions of tokens, with the goal of teaching the model the basic reflex of “output coordinates when it sees a target.”
    • Instruction construction layer: Rewrites standard visual question answering into marked reasoning traces, for example outputting a candidate point set first, counting them one by one, and then summarizing.
    • Consistency check layer: Projects coordinates back using rules to check whether they fall within the target region, whether there are duplicates, and whether they are out of bounds, filtering out noisy traces.
    • Hard-example layer: Adds targeted augmentation for dense small objects, occlusion, curve endpoints, and path connectivity, so the model does not learn the format only on simple images.

    A minimal usable training sample:

    1. {
    2. "image": "scene.jpg",
    3. "question": "How many people are in the image?",
    4. "trace": [
    5. "Locate candidates first: <|point|>[[0.12,0.31],[0.44,0.28]]<|/point|>",
    6. "Verify and count one by one; after deduplication, the result is 2"
    7. ],
    8. "answer": "2"
    9. }

    5. Evaluation and Engineering Deployment Advice

    Evaluation should not look only at final answer accuracy. It is recommended to split metrics into three layers: format validity rate (whether markers can be correctly parsed), reference accuracy (overlap between coordinates and target regions), and task accuracy (counting, localization, path judgment). It is also useful to log the number of reasoning steps and coordinate invocations to detect ineffective loops that “spam coordinates.”

    For deployment, coordinate projection can be built into a visual verification layer, with logging services and monitoring alerts tracking parse failure rates. Training and inference can rely on container platforms and object storage to manage data and artifacts. If an AI coding tool is used to generate data pipelines, be sure to add schema validation and coordinate boundary checks.

    6. Limitations and Reflections

    These methods are not a cure-all. Degradation can still occur in complex spatial logic reasoning: the coordinate format is correct but points to the wrong place, or early references are lost after multiple reasoning steps. Common causes include detail loss from visual compression, pseudo-reasoning in training traces where the answer is given before the coordinates, and the lack of explicit constraints on spatial relationships. Possible improvements include introducing relational supervision (relative position, occlusion, connectivity), performing backtracking checks on key steps, and using grammar constraints during decoding to keep marker structures stable.

    Overall, embedding spatial markers into the chain of thought is a paradigm-level attempt to turn “implicit alignment” into “explicit verifiable reference.” It raises the bar for data quality, compression strategy, and evaluation design, but it also opens new engineering space for the interpretability and debuggability of multimodal reasoning.