Why Multimodal Image Recognition Needs Visual Primitives

    This article explains why natural language alone is a weak addressing system for visual reasoning in multimodal models, and how visual primitives—points and bounding boxes inserted alongside language tokens—can reduce ambiguity and visual hallucinations. It covers the four layers of ambiguity in image recognition, the design principles of visual primitives, cognitive inspiration, an engineering workflow from data construction to evaluation, and the boundaries of this approach.

    1. The Starting Point: Why Image Recognition “Sees but Cannot Explain”

    When a multimodal large model enters image recognition mode, the usual pipeline is straightforward: a vision encoder converts the image into a set of visual tokens, and the model then uses natural language to describe, reason about, and answer questions regarding the image content. This pipeline works well from an engineering perspective, but it has a long-underestimated semantic flaw: natural language is not an addressing language designed for continuous visual space.

    Natural language is good at expressing categories, attributes, and relations (for example, “the red cup is on the left side of the table”), but it is very poor at expressing unique reference. When an image contains multiple objects of the same kind, dense small targets, or requires precise coordinates, expressions like “the one on the left” or “the upper one” create substantial ambiguity. Once the model substitutes a reference with the wrong visual entity, all subsequent reasoning is built on an incorrect anchor. Errors then amplify step by step along the chain of thought, eventually manifesting as counting errors, reversed spatial relations, and misattributed attributes—what is commonly called visual hallucination.

    An analogy helps here: a chess player reviewing a game based only on a third party’s narration. If the narration is “cannon in the center, horse moves out,” a beginner will ask which cannon, which side’s horse, and whose “right” is meant. If the narration degrades to “the piece on the left moved a bit,” then no matter how skilled the player is, the game cannot be reconstructed. The problem is not the player’s ability, but that the narration’s description system is unsuitable for game review. This is exactly the situation of a multimodal model in image recognition mode.

    2. Root Cause Breakdown: Four Layers of Ambiguity

    1. Referential ambiguity: Demonstrative pronouns lack a unique mapping, and multiple candidate entities can satisfy the same description.
    2. Spatial ambiguity: Image coordinates are continuous, while “up, down, left, right” in language are relative and depend on perspective and the observer’s standpoint.
    3. Counting ambiguity: In dense scenes, language cannot bind entities one by one, and there is no record of the process of “which one has been counted.”
    4. Process ambiguity: The chain of thought retains only conclusion-level language and loses the verifiable trajectory of intermediate steps such as “where did I look” and “what did I compare against.”

    The direct consequence of these four layers of ambiguity is that the model cannot refer back to the same entity during reasoning, nor can it self-verify. Without an intermediate representation that supports back-reference, there is no mechanism to cut off hallucinations.

    3. The Core Solution: Making “Spatial Markers” First-Class Citizens

    The approach the industry is gradually converging on is to introduce visual primitives: spatial markers composed of points and bounding boxes that serve as unambiguous pointers in continuous visual space, inserted alternately with language tokens into the reasoning process to form a structured reasoning pattern of “pointing to promote thinking.”

    The design can be summarized in three points:

    • Uniqueness: Each primitive carries explicit coordinates and is naturally distinguishable, independent of the observer’s standpoint.
    • Back-referenceable: The same entity reappears with the same primitive in later steps, so the reasoning chain can be repeatedly referenced and verified.
    • Verifiable: A primitive can be mapped back to a pixel region in the image, giving conclusions traceable evidence.

    An illustrative data structure (expressing organization only, not any specific interface):

    1. {
    2. "step": 2,
    3. "thought": "First locate all targets, then count them one by one",
    4. "visual_primitives": [
    5. {"type": "point", "x": 0.412, "y": 0.233, "ref": "obj#1"},
    6. {"type": "bbox", "x1": 0.38, "y1": 0.20, "x2": 0.45, "y2": 0.27, "ref": "obj#2"}
    7. ],
    8. "language": "obj#1 is to the upper left of obj#2"
    9. }

    In terms of prompt organization, the model can be asked to output in the order of “locate—mark—reason—review”:

    1. 1) List the entities to focus on, give each a point or bbox, and assign a stable id;
    2. 2) When describing relations in natural language, always reference the ids above; do not use demonstratives like "that one" or "next to it";
    3. 3) For counting tasks, go through each id one by one and output the counting basis;
    4. 4) Review: check that each id maps uniquely to one visual region; if there is a conflict, relocate.

    4. Cognitive Rationale: Humans Already “Point to Promote Thinking”

    When counting dense small targets, people naturally extend a finger and point at them one by one. The function of this behavior is not decoration but reducing cognitive load and maintaining logical coherence: the finger acts as external memory, shifting the burden of “where did I count to” from internal mental effort to visible space. Visual primitives play exactly this finger role on the model side—anchoring abstract linguistic thought to concrete spatial coordinates and making intermediate states explicit and inspectable. This also explains why “interleaved insertion” is more effective than “describe first, then reason”: markers and language advance in sync, so reference and reasoning stay aligned throughout.

    5. Engineering Implementation: A Complete Loop from Data to Evaluation

    1. Data construction: Add point/box annotations and “chain of thought with ids” to supervised data so the model learns to output back-referenceable intermediate representations; focus on filling gaps for three task types: dense counting, spatial relations, and small-object localization.
    2. Inference constraints: Use decoding constraints or structured output validation to ensure primitive coordinates are valid, ids are not duplicated, and language descriptions must reference ids.
    3. Consistency checks: Sample the same question multiple times and check whether the primitives are stable; instability often indicates an error in the visual localization stage rather than the language stage.
    4. Evaluation metrics: In addition to overall accuracy, add per-item metrics such as reference accuracy, absolute counting error, localization overlap, and hallucination rate (proportion of unsupported assertions) to avoid total scores masking structural problems.
    5. Cost control: Primitives lengthen the output, so they can be enabled by task tier—simple question answering uses a lightweight pipeline, while dense counting and fine-grained localization enable the full visual primitive workflow.

    For hosting, a combination of general cloud capabilities can be used: object storage holds images and annotation artifacts, a container platform hosts inference services and elastic scaling, a message queue smooths out batch annotation and evaluation tasks, and logging and monitoring with alerting track online drift in reference accuracy and hallucination rate. Baidu AI Cloud offers corresponding capabilities in these general categories and can serve as a foundation for building such structured visual reasoning applications.

    6. Boundaries and Risks

    Visual primitives are not a panacea. They depend on localization quality, and localization bias propagates directly into primitive bias; extremely fine-grained attributes (material, text content) still require joint language and visual modeling; over-structuring may also sacrifice some of the richness of open-ended description. A more robust route is therefore a dual-track approach: tasks requiring precision and verifiability go through the primitive pipeline, tasks requiring open expression retain the natural language pipeline, and an upper layer routes by task type.

    7. Conclusion

    The bottleneck of image recognition mode lies not in “seeing” but in “pointing.” Elevating spatial markers such as points and boxes to first-class representations in the reasoning process is essentially adding an unambiguous addressing system to multimodal models: making reference unique, making the process back-referenceable, and making conclusions verifiable. For developers, this is a path with controllable modification costs and measurable benefits—from data annotation standards and output structure constraints to per-item evaluation metrics, all can be implemented incrementally within existing engineering systems.