Cross-Modal Execution for Multimodal Agents: From Perception to Verified Action

    This article breaks down cross-modal execution in multimodal agents, the ability to turn pixels from financial report screenshots or gameplay recordings into structured semantics and then into executable action sequences. It defines the capability as four layers (perception, understanding, decision, execution) and explains why most failures come from missing explicit contracts between them. Two abstracted cases show how it works in practice: structuring and reconciling financial statement images, and reproducing a game mechanic from video as a single-file implementation. It also covers four reusable practices that cut hallucination by making generation verifiable, plus deployment and model selection guidance with a three-layer evaluation system.

    1. From Answering to Executing: Defining Cross-Modal Agents

    Over the past two years, most evaluations of large models have stayed at the level of text question answering and code generation. But once the task target becomes a financial report screenshot, a screen recording of an operation, or a desktop application, the model has to do two things that used to be downplayed: convert pixels into structured semantics, and convert that semantics into an executable sequence of actions. Only when these two steps are chained together do you get what the industry calls cross-modal execution.

    The agent behavior shown in the source material is not fundamentally about “computing fast.” It completes a full loop: perceive the input (image/video) → parse the semantics (layout, metrics, rules) → reason and decide (compare, attribute, judge) → output actions (code, scripts, UI operations) → verify the result (read back, compare, correct). Split apart for engineering purposes, this breaks into four capability layers:

    • Perception layer: layout detection, text recognition, chart structure reconstruction, video frame extraction and shot segmentation;
    • Understanding layer: mapping unstructured input into computable structures (tables, state machines, rule sets);
    • Decision layer: task decomposition, tool selection, plan orchestration, and fallback on failure;
    • Execution layer: code generation, browser/desktop automation, file read/write, and result self-checking.

    Most failure cases are not caused by a model that “isn’t smart enough.” They come from the absence of explicit contracts between the four layers: perception results carry no confidence score, structure mapping has no schema validation, execution actions have no precondition checks, and final results have no read-back verification. Filling in these contracts is the key to improving stability.

    2. Case Abstraction One: Structuring and Attributing a Financial Report Image

    Handing a listed company’s financial report screenshot to an agent looks like “recognizing numbers,” but it is actually three tasks stacked on top of each other.

    The first is layout reconstruction. A financial report usually contains three structures: the balance sheet, the income statement, and the cash flow statement. Column hierarchies run deep, merged cells are common, units are inconsistent (yuan vs. ten-thousand yuan), and minus signs and parentheses are mixed. The reliable approach is to segment the layout into blocks first, run table structure recognition on each block separately, and then normalize everything into one set of field names and one unit convention.

    1. # Illustration: converge recognition output into unified structured records
    2. def normalize(rows, unit="CNY"):
    3. out = []
    4. for r in rows:
    5. out.append({
    6. "item": r["label"].strip(),
    7. "value": parse_amount(r["raw"], unit), # handle parenthesized negatives, thousands separators, units
    8. "period": r["period"],
    9. "confidence": r["score"],
    10. })
    11. return [x for x in out if x["confidence"] > 0.85]

    The second is reconciliation checking. Deterministic relationships exist across the three statements: net profit against changes in retained earnings, depreciation and amortization against the supplementary information in the cash flow statement, operating receivables against revenue growth, and so on. Writing these relationships as executable assertions, so the model must prove itself after computing, significantly suppresses hallucination:

    1. assert abs(assets - (liabilities + equity)) < 1e-6
    2. assert abs(net_profit - retained_earnings_delta) < tolerance

    The third is attribution judgment. The value point emphasized in the original is “not only getting the math right, but also reading the situation correctly”: a slight increase in reported profit, a sharp drop in profit attributable to the parent, cash bleeding out, and minority interest supporting performance. Conclusions like these come from multi-period trend comparison and structural share analysis, not from a single data point. In engineering terms, the model should be required to output a three-part structure of “conclusion—evidence—counter-evidence,” with every conclusion tied to specific fields and periods.

    3. Case Abstraction Two: Reproducing a Runnable Implementation from Video

    The second case gives a game recording and asks the agent to extract frames on its own, identify the gameplay mechanics, and reimplement them with a single-file graphics approach, aiming for mechanical consistency rather than pixel-level fidelity. This kind of task tests a combined ability: rule induction plus code delivery.

    A workable pipeline looks like this:

    1. Shot segmentation and frame extraction: detect scene changes by frame differencing, deduplicate key frames, and keep the segments with dense state changes;
    2. Mechanic hypothesis generation: induce from the frame sequence the movement model (grid-based or free), collection and trigger logic, and win/lose conditions;
    3. State machine formalization: write the hypotheses as explicit states and transition conditions so they translate directly into code;
    4. Single-file implementation: use Canvas2D or a lightweight 3D approach, avoiding external resource dependencies;
    5. Automated regression: script a run through “start—operate—judge—restart” and compare the state sequence against the video’s key frames for consistency.
    1. // Illustration: write the induced rules as an explicit state machine
    2. const S = { idle: 0, running: 1, won: 2, lost: 3 };
    3. function step(state, input, world) {
    4. if (state.status !== S.running) return state;
    5. const next = move(state.pos, input, world.grid);
    6. const got = world.collectibles.filter(c => hit(next, c));
    7. world.collectibles = world.collectibles.filter(c => !hit(next, c));
    8. if (world.collectibles.length === 0) return { ...state, pos: next, status: S.won };
    9. if (hit(next, world.hazard)) return { ...state, pos: next, status: S.lost };
    10. return { ...state, pos: next };
    11. }

    It is worth stating objectively that such long-chain tasks can take hours, because frame extraction, hypothesis validation, compile-and-run, and retries after failure stack up serially. Engineering optimizations include prioritizing key frames, screening mechanic hypotheses early, incremental compilation, and parallel candidate implementations.

    4. Why the Hallucination Rate Drops: Turning Generation into Something Verifiable

    Halving the hallucination rate is not magic; it is the result of process constraints. Four reusable practices:

    • Structure first: produce the table or state machine before writing natural-language conclusions, avoiding guess-and-write in one pass;
    • Explicit assertions: encode accounting identities, unit conventions, and boundary conditions as validation code;
    • Read-back verification: for UI operation tasks, re-read the interface or file state after execution to confirm the result;
    • Evidence citation: tag every judgment with its source field and period, and draw no conclusion without evidence.

    5. Engineering Implementation and Selection Guidance

    To build similar capabilities in your own system, the recommendation is to assemble general-purpose cloud capabilities: object storage to hold input material, a message queue to decouple long-running tasks, a container platform to host sandboxed execution environments, and logging plus monitoring and alerting services to handle long-chain tracing and timeout governance. On the model side, focus on three points first: whether native visual understanding covers the target layouts, whether UI-operation actions are supported, and whether structured output is stable and verifiable.

    The evaluation system should have three layers: the perception layer looks at field-level accuracy and unit error rate; the reasoning layer looks at the reconciliation assertion pass rate and the completeness of conclusion evidence; the execution layer looks at first-run success rate, average latency, and fallback success rate. Measuring the three layers separately is what lets you locate whether the bottleneck is “can’t see clearly” or “does it wrong.”

    Overall, the focus of competition in cross-modal execution has shifted from single-point scores to closed-loop reliability. Whoever can chain perception, verification, and execution into a pipeline with assertions can deliver reliably in real business scenarios.