How Scientific Multimodal Inputs Fit into General-Purpose AI Agent Architectures
This article explains why general-purpose AI agents struggle with scientific data such as molecular structures, protein sequences, nucleic acid sequences, and spectral curves, and how a "general backbone plus scientific multimodal perception module" architecture addresses the issue. It walks through the three-layer design, the role of modality projectors, verifiable task design, staged training with supervised learning and reinforcement learning, and key engineering pitfalls around context budget, evaluation, and inference cost.
1. Background: Why General Agents “Cannot Read” Scientific Data
The agent capabilities of general-purpose large models are usually built on “general” modalities such as text, images, and code. These models are good at decomposing tasks, calling tools, and maintaining multi-step state. But once the task object becomes a molecular structure, a protein sequence, a nucleic acid sequence, or a spectral curve, the model often has to reason indirectly through natural language descriptions. For example, when a user hands the model a molecular structure, what the model sees is a connection table or identifier transcribed into text, not the atomic connectivity itself. When a user provides a protein sequence, the model sees a string of letters, not sequence dependencies or structural tendencies.
This “transcription-based understanding” leads to three typical problems:
- Information loss: structured relationships are flattened into text, so bonding relationships, sequence position dependencies, and continuous measurement signals are hard to preserve completely.
- Unstable reasoning: the same data described with different text templates can lead the model to drift in its conclusions.
- Untestable tasks: without automatically判定 objectives, it is hard to improve reliably with reinforcement learning.
The direction the industry is exploring is therefore to let the general model backbone receive representations of scientific data directly in a shared context, instead of first converting them into natural language through an external pipeline. The following sections use a “general backbone + scientific multimodal perception module” architecture as an example to break down its design logic and key engineering implementation points.
2. Overall Architecture: One Backbone, Multiple Representations
The core of this approach is a three-layer structure.
The first layer is the general model backbone. It uses a Mixture-of-Experts (MoE) structure with a total parameter count on the order of about 320 billion. Dynamic expert routing decides which experts are activated for each token, which controls the actual compute used at inference time. The backbone also combines sparse attention with linear attention: sparse attention preserves high-resolution global interactions at key positions, while linear attention handles long-sequence modeling with approximately linear complexity, making long-context processing more manageable.
The second layer is the modality projection layer. Scientific data from different sources is first passed through its own encoder to extract features, then mapped into the language model’s unified representation space by a trainable modality projector. The projector works like a “translation layer”: it does not try to make the backbone understand the internal details of each encoder, and is only responsible for aligning vectors to the semantic space the backbone can consume.
The third layer is the task and training layer. Scientific tasks are designed in verifiable forms, such as molecular property classification, protein interaction site prediction, atom counting, and structural relationship queries, and are aligned with supervised learning and reinforcement learning.
The schematic forward pass can be abstracted as:
# Pseudocode: unified processing pipeline for scientific multimodal inputstext_tokens = tokenizer(text)text_emb = llm.embed(text_tokens)mol_emb = molecule_encoder(mol_graph) # atom-bond graphprot_emb = protein_encoder(aa_sequence) # amino acid sequencespec_emb = spectrum_encoder(wave, intensity) # continuous measurement signal# Project into the backbone's unified representation spacemol_tokens = projector_mol(mol_emb)prot_tokens = projector_prot(prot_emb)spec_tokens = projector_spec(spec_emb)# Concatenate in a shared context and let the backbone reason over all of itinputs = concat([text_emb, mol_tokens, prot_tokens, spec_tokens])logits = backbone(inputs) # MoE dynamic routing + hybrid attention
3. Scientific Multimodal Perception Module: Ingesting Structured Data as Is
The key to the scientific multimodal perception module is choosing a suitable representation for each data type instead of degrading everything to text.
- Molecular structures: based on a graph structure of atoms and chemical bonds, using an encoder pretrained with self-supervision on molecular structures to capture atomic connectivity and substructure patterns.
- Protein sequences: using a protein language model to encode amino acid sequences and learn sequence dependencies and evolutionary information.
- Nucleic acid sequences: DNA and RNA each use encoders pretrained on their respective sequence distributions, avoiding the application of the same statistical assumptions to both types of sequences.
- Spectral data: spectra are continuous measurement signals, suitable for dedicated spectroscopic representations that extract patterns such as peak positions, peak shapes, and relative intensities.
These encoders output high-dimensional vector sequences, and the modality projector maps them linearly or nonlinearly to the backbone’s dimensions and inserts them at designated positions in the context. Three things need particular attention in engineering:
- Position and boundary markers: clearly distinguish text tokens from scientific modality tokens so the backbone does not confuse context ownership.
- Length budget: the number of scientific modality tokens directly affects context usage, so a trade-off between resolution and cost is needed.
- Representation consistency: the projection of the same modality should stay consistent across tasks to prevent cross-task interference.
4. Training Strategy: Supervised Learning as the Base, Verifiable Rewards for RL
One advantage of scientific tasks is that the “answer is decidable.” Classification tasks have labels, counting tasks have exact integers, and relationship queries have ground-truth sets. This makes them well suited to reinforcement learning.
Verifiable rewards usually come from three types of metrics:
- Classification accuracy: whether the property judgment is correct.
- Set overlap: the intersection-over-union between the predicted set of sites or substructures and the ground truth.
- Numerical error: the deviation of a count or measurement from the ground truth.
For training, a staged approach is recommended: first use supervised learning to align the projector and the backbone on basic semantics, then use reinforcement learning on verifiable tasks to tighten the behavior distribution. Reward design should avoid “overfitting to a single metric.” For example, a counting task that looks only at numerical error may cause the model to ignore structural evidence, so a structural consistency constraint can be added.
5. Engineering Notes and Common Pitfalls
- Do not convert all scientific data into text: this amplifies information loss and is hard to reproduce reliably.
- Do not ignore the context budget: long sequences and multimodal tokens together consume the window quickly, so token-level budgeting and truncation strategies are needed.
- Do not skip verifiable evaluation: without automatic criteria, reinforcement learning is hard to converge and iteration costs are high.
- Keep data and evaluation separate: scientific data distributions vary widely, so training and evaluation sets should be split by source and by time to avoid leakage.
- Keep inference cost under control: MoE dynamic routing reduces per-call activation, but routing balance and long-context overhead still need monitoring.
6. Conclusion
Making general-purpose agents understand scientific data is essentially not “adding one more modality,” but preserving structured relationships at the representation layer and anchoring capabilities with verifiable tasks. The Mixture-of-Experts backbone provides capacity and compute elasticity, hybrid attention provides long-context capability, the scientific multimodal perception module handles “ingesting data as is,” and verifiable rewards handle “aligning behavior.” This combination provides a unified reasoning foundation for code execution, complex retrieval, and operating specialized software in scientific scenarios, and leaves room for extending to more scientific modalities later.
