Multimodal Agents: Visual Fusion and Parallel Orchestration Explained

    This article explains why native multimodal architectures train vision and language together from the pretraining stage. It covers the three components of a unified design, how native-resolution inputs preserve image detail, how one encoder can handle both images and video, and how decoupled training keeps the two modalities in sync. It also introduces parallel orchestration for multi-step agent tasks.

    1. Why Native Multimodal Architecture Is Needed

    Early multimodal systems usually followed a fixed path. A text-only language model was trained first, and a vision encoder was attached later, aligned with a small amount of image-text data. This approach shortens the development cycle, but it has two drawbacks. First, adding visual data can disturb language capabilities, degrading text reasoning or code generation. Second, each modality forms its own representation space during pretraining, and these spaces do not match well. The model can only align them through a later adapter layer, which limits the stability of cross-modal reasoning.

    The native multimodal approach jointly optimizes text and visual data in a single training pipeline. The model receives image, video, and text tokens from the start of pretraining, so both types of representations constrain each other in a shared semantic space. The cost is more careful design of data mixing ratios, learning rates, and loss weights. In return, vision and language capabilities reinforce each other in both directions. Visual information helps the model understand spatial relationships, and language priors help it interpret charts and scenes.

    2. Three Components of a Unified Architecture

    A typical unified multimodal architecture can be divided into three components.

    1. Vision encoder: converts pixels into a sequence of features. It must preserve fine-grained spatial information and output vectors that the language model can process.
    2. Projection layer: usually a small multilayer perceptron (MLP) that maps visual features into the embedding dimension of the language model, aligning the two spaces.
    3. Language backbone: handles unified modeling and reasoning. With a mixture-of-experts (MoE) architecture, each token activates only a subset of expert sub-networks. The total parameter count can grow while the compute for each forward pass stays manageable.

    The data flow follows a fixed order: visual feature extraction, cross-modal projection, and unified modeling in the language backbone. Image tokens are concatenated with text tokens and passed through the same Transformer stack, where attention handles cross-modal interaction naturally.

    1. # Example: concatenate visual tokens and text tokens for unified modeling
    2. visual_tokens = projector(vision_encoder(image)) # shape [N_v, d]
    3. text_tokens = embed(input_ids) # shape [N_t, d]
    4. sequence = concat(visual_tokens, text_tokens) # concatenate along the sequence dimension
    5. hidden = language_backbone(sequence) # end-to-end modeling

    3. Native Resolution: Avoiding Information Loss from Preprocessing

    Fixed-size inputs are a common practice, but they have clear side effects. Forcing a long image into a square distorts its proportions. Shrinking a high-resolution screenshot to a fixed pixel size makes small text and thin lines disappear. Cropping can cut off key objects.

    The core of the native-resolution approach is patch splitting and sequence packing. An image is divided into fixed-size patches, each patch is flattened into a vector, and all patches are arranged in order into a one-dimensional sequence. Sequences from different images can have different lengths. Attention masks keep them isolated from each other, so a batch can mix several aspect ratios.

    1. def patchify(img, p=14):
    2. """Split an H x W x C image into (H/p * W/p) flattened patches."""
    3. h, w, c = img.shape
    4. # In practice, pad H and W to integer multiples of p first
    5. assert h % p == 0 and w % p == 0, "Image dimensions must align to the patch grid"
    6. x = img.reshape(h // p, p, w // p, p, c)
    7. x = x.transpose(0, 2, 1, 3, 4)
    8. return x.reshape(-1, p * p * c) # shape [num_patches, patch_dim]

    In practice, three issues need attention: how to align the image to the patch grid (padding or resizing), the maximum number of patches per image (to control memory use), and whether the position encoding can handle arbitrary grid sizes, for example by interpolating a two-dimensional position encoding.

    4. Unified Modeling of Images and Video

    A video is essentially a sequence of images with a time dimension. The most direct approach is to design a separate temporal branch for video. However, this adds more modules, and it makes it harder to transfer image capabilities to video.

    A simpler approach groups several consecutive frames into a spatiotemporal volume. For example, every 4 frames form one group. Patches at the same spatial position are stacked along the time dimension, then packed into a sequence together with the spatial patches. The same encoder processes single images, treated as the special case of a time length of 1, and video clips, with weights fully shared.

    This design offers the following benefits:

    • Spatial understanding learned from image training can directly support video tasks;
    • No need to maintain two model structures, which simplifies deployment and version management;
    • Information along the time dimension interacts directly through attention, without relying on a late-fusion step.

    The main risks include the design of temporal position encodings, the trade-off between frame sampling rate and sequence length, and the growth of memory use with long videos. In practice, the number of frames per input is usually capped, and key frames are sampled.

    5. Decoupled Training for Stable Large-Scale Multimodal Training

    Vision encoders and language backbones often converge at different speeds. If all parameters share the same learning rate and schedule, one side may overfit while the other remains undertrained.

    Common engineering practices include the following.

    • Staged training: first freeze the language backbone and align the vision encoder and projection layer separately. Then unfreeze all parameters for joint training.
    • Grouped learning rates: set different learning rates for the vision encoder, the projection layer, and the language backbone.
    • Per-modality monitoring: track the loss curve for each modality separately. When one modality’s loss stalls, adjust its sampling ratio promptly.

    The shared goal of these practices is to let both capabilities grow in sync during training, so that neither one dominates the other for long periods.

    6. Parallel Multi-Agent Orchestration for Lower End-to-End Latency

    Agent tasks usually involve several steps, such as planning, retrieval, tool calling, and result verification. If every step runs sequentially, the total time equals the sum of each step’s duration. When subtasks have no dependencies