Native Multimodal Agents: Architecture and Training Practices
This article explains why multimodal agents need native vision capabilities rather than bolt-on visual modules, and how to architect and train them. It covers a unified representation space with a closed perception-reasoning-execution toolchain, three core lessons from practice—keeping perception optimization across the entire training cycle, using layered optimization instead of end-to-end training, and relying on verifiable rewards for stable convergence—plus guidance on balancing multimodal gains against text performance and a four-step path to implementation.
1. Why Multimodal Agents Need to Be “Native”
Today’s mainstream text-only large language models are already strong at language understanding, logical reasoning, and code generation. But the information in real business scenarios goes far beyond text. Web interfaces, mobile screenshots, design mockups, PDF documents, monitoring video streams, and industrial quality-inspection images all carry critical semantics in visual form.
A “text model plus a bolt-on vision module” approach splits perception and reasoning across two separate systems. The vectors produced by the visual front end must go through a lossy conversion before they can enter the language model. Semantics get compressed during this handoff and alignment errors get amplified, ultimately showing up as misread interface elements, wrong judgments about spatial relationships, and hallucinated action instructions.
The core premise of a native multimodal agent is that vision is not an after-the-fact patch but a first-class capability built into the model from day one of pretraining. This requires unifying the representation space for images, video, and text at the architecture level, making visual tasks and language tasks reinforce each other during training, and closing the loop from perception to reasoning to execution at the toolchain level. Only then can a model maintain both high accuracy and strong generalization on tasks such as design-to-code, mobile UI operation, and structured document extraction.
2. Architecture: A Unified Representation Space and a Closed Toolchain
A native multimodal architecture typically has three key parts: high-fidelity visual encoding, cross-modal alignment, and an execution-oriented action space.
- Visual encoding no longer chases the single goal of “turning an image into a vector.” Instead, it preserves structural information such as layout, hierarchy, and relative position so that downstream reasoning modules can directly use spatial relationships.
- Cross-modal alignment is carried out on large-scale interleaved image-text corpora, so that visual tokens and language tokens share the same semantic coordinate system and semantic drift during modality switches is reduced.
- The execution loop requires the model to output action sequences that can be verified by the external environment—for example, clicking, typing, or swiping in a graphical interface, or emitting code that compiles and runs. Whether an action is valid is determined by environment feedback, and that feedback flows back as a training signal.
The pseudocode below illustrates the closed loop from perception to execution:
# Pseudocode: perception-reasoning-execution loopobs = env.render() # get a UI screenshot or video frametokens = model.encode(obs, task) # unified visual and language encodingplan = model.reason(tokens) # generate intermediate reasoning and action sequenceaction = executor.parse(plan) # parse into an executable actionresult = env.step(action) # environment executes and returns feedbackreward = verifier.check(result) # verifier decides whether the goal is met
3. Lesson One: Perception Must Run Through the Entire Training Cycle
A common mistake is treating perception as a front-end module: use a visual encoder during pretraining to turn images into vectors, then hand everything off to the language model for reasoning. In practice, perception quality continuously determines the ceiling of higher-level capabilities—it is not something you “finish early and move on from.”
Concretely, you can add a large amount of structured decoding tasks to the pretraining corpus, such as converting images into vector markup languages. On the surface these tasks train front-end code generation, but in substance they force the model to understand layout regions, component hierarchy, and relative position, which in turn improves mathematical and engineering reasoning. Likewise, reinforcing object-grounding tasks during the reinforcement learning stage improves the action accuracy of a GUI agent at the same time.
In addition, introducing discriminative data during instruction tuning—specifically to correct perception errors such as “misreading interface elements” and “clicking the wrong button”—can significantly reduce hallucination rates. The engineering conclusion is that perception optimization should be embedded in layers across all three stages—pretraining, supervised fine-tuning, and reinforcement learning—rather than handled as a one-off effort.
4. Lesson Two: Layered Optimization Beats End-to-End Training
End-to-end training of an agent looks elegant but is extremely difficult to put into practice: environment setup is costly, data labeling is hard, result verification is complex, and the optimization process is unstable. A more workable path is to decompose the problem into layers—splitting GUI agent capability into four levels: element perception, object grounding, single-step action prediction, and trajectory-level planning—and training and validating each level separately across the supervised fine-tuning and reinforcement learning stages.
This design brings two benefits. The first is attributability: when a metric at a given layer drops, you can quickly locate the source of the problem instead of blindly trial-and-erroring against an overall reward signal. The second is data efficiency: different layers can use data from different sources—the perception layer uses large-scale image-text pairs, the grounding layer uses UI screenshots with coordinate annotations, and the planning layer uses verifiable task trajectories—avoiding overreliance on scarce, high-quality trajectory data.
5. Lesson Three: Verifiable Rewards Are Key to Stable Convergence
In multimodal agent training, reward design determines the direction of convergence. A practical approach is to split the reward into three types: format validity, execution validity, and goal attainment. Format validity checks whether the output structure is parseable; execution validity relies on whether the sandbox environment returns an error; goal attainment is decided by a rule-based verifier or state comparison. With all three stacked together, the model cannot game the reward with output that “looks reasonable but cannot be executed.”
Engineering also requires three pieces of general-purpose infrastructure: object storage to accumulate screenshot and trajectory datasets, a container platform to spin up isolated UI and code execution environments in bulk, and logging services with monitoring and alerting to track the success-rate curves of training jobs and catch abnormal rollbacks.
6. Capability Balance: Multimodal Gains Should Not Come at the Cost of Text Ability
Native multimodal approaches are often questioned for weakening text-only ability. The way to avoid this is to impose explicit constraints on the training data mix: keep a sufficient amount of text-only corpus in pretraining and fine-tuning, and track three sets of metrics during evaluation—text reasoning, code generation, and multimodal tasks. When a regression appears, fix it by adjusting the data mix rather than by trimming the architecture. The end goal is to let the model score high on visual tasks such as design-to-code and UI operation while text ability does not degrade noticeably.
7. Implementation Recommendations
For teams that want to build similar capabilities, the recommended path is four steps: first define verifiable tasks and verifiers, then build a layered data pipeline, then train level by level in the order of perception, grounding, single-step, and trajectory, and finally run regression on a unified evaluation set. General-purpose capabilities from Baidu AI Cloud—such as its container platform, object storage, and monitoring and alerting—can serve as infrastructure options for hosting this kind of training and evaluation workflow.
