Why Multimodal Image Recognition Needs Visual Primitives

    This article explains why natural language alone is an unreliable spatial pointer for multimodal image recognition and how visual primitives—points and bounding boxes—anchor reasoning to verifiable coordinates. It covers a mixed text-and-mark reasoning sequence, sample pseudocode and mark structures, a layered architecture from perception to evaluation, and practical guidance for reducing hallucination through constrained references and consistency checks.

    1. The Starting Problem: Natural Language Is Not a Reliable Spatial Pointer

    The most common failure of multimodal models in image-recognition mode is not that they “cannot see clearly,” but that they “cannot point accurately.” When a user or the model itself describes an object in natural language, the description carries inherent ambiguity: directional words depend on viewpoint, references depend on context, and quantity words depend on segmentation criteria. If the model treats such a vague description as a positioning instruction for a continuous visual space, it loses the visual entity it meant to target. Reasoning then builds on a wrong anchor, and hallucination grows from there.

    A close everyday analogy is chess notation. A beginner says “cannon in the center, horse jumps,” which sounds like two clear moves, but a follow-up question immediately exposes the ambiguity: which side’s cannon, which side’s horse, and does “right” mean red’s right or black’s right. Mature notation switches to structured forms such as “cannon 2 to 5” and “horse 8 to 7,” unifying direction, piece, and action into an unambiguous coordinate system so that replaying a game becomes possible. Image recognition works the same way: the model is like a player reconstructing a position from a third party’s narration, and no amount of skill can recover the board if the narration is muddled. The problem is not reasoning ability but a description protocol that does not fit spatial tasks.

    An industry consensus has therefore formed: visual reasoning needs a spatial marking protocol that anchors linguistic intent to definite coordinates and regions.

    2. The Core Method: Thinking With Visual Primitives

    Visual primitives are the smallest marking units that can precisely locate objects in a continuous visual space. In engineering practice they usually take two forms:

    • Point: marks a center, endpoint, inflection point, or focus of attention.
    • Bounding box: marks a range, a group, or an occlusion relationship.

    The point is not to “make the model say a few more coordinates,” but to interleave visual primitives into the chain of thought so that every reasoning step has a verifiable spatial landing spot. The cognitive motivation comes from human behavior: when counting dense small targets, people naturally point at them one by one. The act of pointing reduces memory and counting load and keeps the logic coherent. A model that uses points for one-by-one enumeration and boxes for group aggregation is effectively pinning abstract linguistic thought to concrete coordinates, forming a “point in order to think” synergy.

    Formally, the reasoning state is no longer just a text sequence but a hybrid sequence in which text and spatial marks alternate.

    1. Hybrid reasoning sequence (illustrative):
    2. [text] First locate the region involved in the question
    3. [box] {x1:120, y1:80, x2:430, y2:360}
    4. [text] Enumerate targets in that region from left to right
    5. [point] (150,220) (205,240) (260,255)
    6. [text] Count is 3, proceed to the next comparison step
    7. [box] {x1:440, y1:90, x2:700, y2:380}

    The pseudocode can be expressed as:

    1. # Pseudocode: expresses the flow only, not bound to any specific product API
    2. def think_with_visual_primitives(image, question):
    3. state = parse_intent(question) # parse intent and constraints
    4. region = state.region or full_image() # use the full image if no region
    5. marks = []
    6. for step in plan_steps(state):
    7. if step.type == "locate":
    8. box = detect_box(image, region, step.target)
    9. marks.append(("box", box))
    10. region = box
    11. elif step.type == "enumerate":
    12. pts = detect_points(image, region, step.target)
    13. marks.extend(("point", p) for p in pts)
    14. # text reasoning may only reference marks that already exist
    15. state = reason_over_text_and_marks(step.text, marks)
    16. return state.answer, marks

    3. Why Visual Primitives Suppress Hallucination

    Hallucination in image-recognition tasks usually comes from three broken links:

    1. Broken reference link: the text says “the one on the left,” but “left” is not bound to a coordinate system or a subject.
    2. Broken counting link: dense targets are not explicitly enumerated, so the quantity estimate drifts.
    3. Broken relation link: relations such as occlusion, adjacency, and containment lack regional evidence.

    Visual primitives turn these three broken links into checkable intermediate artifacts. A box fixes the “scope of discussion,” a point fixes the “individual under discussion,” and text reasoning is constrained to “reference only marks that have already been generated.” This is equivalent to adding type checking to the chain of thought: assertions without a spatial landing spot fail validation. Engineering practice can add consistency checks, for example that the count matches the number of points, that box area is reasonable relative to the visible proportion, and that a point must fall inside its corresponding box, intercepting some errors at the generation stage.

    4. Implementation Architecture: A Closed Loop From Input to Evaluation

    To build similar capability in your own system, a layered design works well:

    • Perception layer: general visual capabilities such as object detection, keypoint/center detection, and region segmentation, producing box and point candidates.
    • Protocol layer: defines the mark data structure and reference rules, ensuring text can reference mark IDs only.
    • Reasoning layer: the multimodal model generates in alternating “text—mark” fashion and backtracks to correct when necessary.
    • Validation layer: geometric consistency, count consistency, and cross-step reference completeness checks.
    • Evaluation layer: separately assess localization error, counting accuracy, relation judgment correctness, and hallucination rate.

    The mark structure can be simplified as:

    1. {
    2. "marks": [
    3. {"id": "b1", "type": "box", "xyxy": [120, 80, 430, 360], "label": "region A"},
    4. {"id": "p1", "type": "point", "xy": [150, 220], "ref": "b1"}
    5. ],
    6. "constraints": ["point.must_inside(ref_box)", "count.answer == len(points)"]
    7. }

    Engineering practice should record the coordinate normalization scheme, image scaling strategy, and box/point precision in configuration and version it, avoiding mark drift caused by inconsistent pre- and post-processing. For high-concurrency scenarios, perception and validation can be built as stateless services, decoupled with container platforms and message queues, with object storage holding intermediate marks and visualization results, and logging services plus monitoring alerts tracking localization error and hallucination rate metrics.

    5. Practical Advice and Common Pitfalls

    • Protocol before model: unify the mark protocol and reference rules first, then tune model prompts and decoding strategies.
    • Keep marks minimal: introduce only the boxes and points needed for the current step, avoiding mark overload that dilutes attention.
    • Constrain text references: forbid “creating points out of thin air”; every assertion must point to an existing mark ID.
    • Visualization regression: draw marks back onto the image for manual spot checks to quickly find systematic offsets.
    • Evaluate per task: build separate evaluation sets for localization, counting, relations, and attributes, so a single aggregate score does not hide weak spots.

    Common pitfalls include treating coordinates as “explainability decoration” that does not participate in validation, continuing to direct spatial operations with natural-language directional words, and optimizing only the final answer while ignoring intermediate mark quality. Improving the reliability of image-recognition mode comes down to upgrading “description” into a “verifiable spatial protocol,” so that every reasoning step can be located, checked, and reproduced.