Integrating Scientific Multimodal Perception into General-Purpose AI Agents: An Architecture Practice

    This article explains how a general-purpose AI agent can gain scientific multimodal perception. It covers a unified backbone built on a Mixture-of-Experts (MoE) architecture of about 320B parameters, a combination of sparse and linear attention for long contexts, dedicated encoders paired with modality projectors for molecules, proteins, nucleic acids, and spectra, a two-stage alignment training approach, and engineering considerations for building similar systems.

    Integrating Scientific Multimodal Perception into General-Purpose AI Agents: An Architecture Practice

    1. Why General-Purpose Agents Need “Scientific Perception”

    Large language models (LLMs) have matured considerably in text understanding and code generation. However, applying them to real research settings exposes a fundamental obstacle: scientific data is not natural language. Molecular structures exist as graphs and atom-connectivity tables. Proteins and nucleic acids are biological sequences with strong sequence dependencies. Spectral data are continuous measurement signals. These data modalities differ greatly from text in their statistical properties and structural organization. Serializing them as text and feeding them to a language model discards much of the structural information, so the model “sees the data but cannot read the science.”

    Making general-purpose agents useful for scientific discovery therefore requires solving two problems. First, the model backbone must process text, images, and scientific data representations within a shared context. Second, a dedicated perception module must map each type of scientific data into a unified representation space that the language model can understand and reason over. This article follows these two layers and breaks down the design approach and engineering practice of a representative unified scientific multimodal architecture in the industry.

    2. Unified Scientific Multimodal Architecture: One Backbone, Multiple Modalities

    2.1 Inference Efficiency Design of a Large-Scale Mixture-of-Experts Architecture

    The backbone uses a Mixture-of-Experts (MoE) structure with approximately 320B total parameters. The core value of MoE is the decoupling of capacity from computation. The model can have a very large total parameter count to hold extensive specialized scientific knowledge, while each forward pass activates only a small subset of expert networks. This keeps the compute cost per inference within a manageable range.

    From an engineering perspective, dynamic expert routing brings three direct benefits:

    • Controllable inference cost: Simple question-answering tokens can be routed to general-purpose experts. Tokens involving scientific notation or structural reasoning activate the relevant specialized experts, so compute is allocated on demand.
    • Domain knowledge isolation: Different experts can naturally specialize in different data distributions, which reduces catastrophic interference between scientific data and general text.
    • Scalable expansion: When new scientific modalities are added, capability can grow by adding experts instead of retraining the full model.

    2.2 Combining Sparse and Linear Attention for Long Contexts

    Scientific tasks often involve very long contexts. A paper together with its experimental data, the complete multiple sequence alignment of a protein family, or the intermediate records of a multi-step computation can reach tens of thousands or even hundreds of thousands of tokens. Standard attention, with its quadratic complexity, becomes unaffordable at this scale.

    The architecture combines sparse attention with linear attention. Sparse attention limits the range each token attends to, preserving precise modeling of key local structures and long-range anchors. Linear attention rewrites the attention computation with kernel functions, reducing complexity to linear and handling the low-cost propagation of global context. The two methods complement each other, allowing the model to see the whole document or sequence and to see the important parts accurately.

    2.3 Unified Reasoning in a Shared Context

    A key design goal of this backbone is to let text, images, and scientific data representations coexist in the same context window and take part in joint reasoning. In a single forward pass, the model can view a natural-language question, experimental charts, and molecular structure representations together. Based on this unified reasoning capability, it can complete multi-step tasks, including scientific data interpretation, code execution, complex retrieval, and professional software operation. The unified design also leaves a clean architectural interface for integrating more scientific modalities later.

    3. Design Principles of the Scientific Multimodal Perception Module

    3.1 A Two-Stage Structure: Dedicated Encoders and Modality Projectors

    For typical scientific data such as molecules, proteins, nucleic acids, and spectra, the common design pattern is a “dedicated encoder plus trainable projector” structure:

    1. Dedicated encoding layer: Each data type uses an encoding method suited to its structure. Molecular structures suit graph neural network methods, which capture atomic connectivity and functional group patterns. Protein sequences suit sequence models pretrained on large protein corpora, which extract evolutionary and structural information. DNA and RNA sequences use pretrained encoders designed for nucleic acid characteristics, which capture base dependencies and regulatory element patterns. Continuous measurement signals such as spectra suit encoding methods built for continuous spectral data, which extract peak positions, intensities, and shapes.
    2. Modality projection layer: The feature space of the encoders differs from the word embedding space of the language model in both dimensionality and distribution. A trainable modality projector therefore maps scientific features into the unified representation space of the language model. Projectors usually have a lightweight structure, such as a multilayer perceptron or a small attention module. During training, the backbone is frozen or fine-tuned with low-rank adaptation, and only the projector parameters are trained. This achieves efficient modality alignment.

    The benefit of this design is decoupling. Scientific encoders can be upgraded or replaced independently while the backbone stays stable. Adding a new modality requires only a new encoder and projector, without changing the rest of the system.

    3.2 Key Considerations in Alignment Training

    Modality alignment training usually has two stages. Stage one applies contrastive learning or generative pretraining on paired “scientific data and text description” corpora, teaching the projector to translate structural features into semantic features. Stage two applies end-to-end fine-tuning on instruction data, teaching the model to invoke scientific representations actively during reasoning.

    Two points need attention in practice. First, the sampling ratio between scientific and text data must prevent any single modality from dominating the gradients. Second, alignment targets must be hierarchical. The model should align global semantics, such as whether a molecule belongs to a certain compound class, and local structure, such as whether a functional group at a specific site determines reactivity.

    4. From Perception to Action: The Capability Loop of Scientific Agents

    Perception alone is not enough. The value of a scientific agent lies in a complete task loop. A typical scientific reasoning workflow includes understanding a research question posed in natural language, parsing attached structural and sequence data, retrieving relevant literature and databases, writing and executing computational code, operating specialized analysis software to run simulations or fits, and finally synthesizing information from multiple sources into conclusions with supporting evidence.

    Approaches that have achieved leading results on several agent benchmarks show why a unified backbone combined with a scientific perception module can support this loop. There are three reasons. The shared context lets intermediate results, such as code output, retrieved passages, and structural features, join the reasoning chain without friction. MoE routing gives each type of subtask matching compute resources. The unified representation space makes it possible to cross-reference scientific data and text conclusions.

    5. Engineering Recommendations and Considerations

    Teams that want to build similar capabilities into their own products can take away several lessons. Prioritize building high-quality paired scientific data and text corpora, which often yields greater returns than changes to model architecture. Keep the modality projector lightweight and reserve capacity for the backbone. On the inference side, general-purpose cloud container platforms and object storage services can orchestrate data preprocessing and model serving, and monitoring and alerting help keep long-running tasks stable. At the same time, scientific agents are still in a fast-developing phase. In areas such as precise numerical computation and experimental reproducibility, they still need to work closely with professional toolchains rather than replace them entirely.

    Summary: Integrating scientific multimodal perception into general-purpose agents is fundamentally an engineering practice of “representation unification.” Dedicated encoders respect the structural characteristics of each scientific data type. Modality projectors bridge the semantic gap with language models. A large-scale MoE backbone and long-context mechanisms then enable joint cross-modal reasoning. This approach provides a practical architectural foundation for scaling scientific intelligence in drug discovery, materials design, bioinformatics, and related fields.