Abstract
Current Large Language Models (LLMs) for understanding proteins primarily treat amino acid sequences as a text modality. Meanwhile, Protein Language Models (PLMs), such as ESM-2, have learned massive sequential evolutionary knowledge from the universe of natural protein sequences. Furthermore, structure-based encoders like ProteinMPNN learn the structural information of proteins through Graph Neural Networks. However, whether the incorporation of protein encoders can enhance the protein understanding of LLMs has not been explored. To bridge this gap, we propose EvoLlama, a multimodal framework that connects a structure-based encoder, a sequence-based protein encoder and an LLM for protein understanding. EvoLlama consists of a ProteinMPNN structure encoder, an ESM-2 protein sequence encoder, a multimodal projector to align protein and text representations and a Llama-3 text decoder. To train EvoLlama, we fine-tune it on protein-oriented instructions and protein property prediction datasets verbalized via natural language instruction templates. Our experiments show that EvoLlama's protein understanding capabilities have been significantly enhanced, outperforming other fine-tuned protein-oriented LLMs in zero-shot settings by an average of 1%-8% and surpassing the state-of-the-art baseline with supervised fine-tuning by an average of 6%. On protein property prediction datasets, our approach achieves promising results that are competitive with state-of-the-art task-specific baselines.
Introduction
While general-purpose Large Language Models (LLMs) like Llama-3 exhibit remarkable reasoning capabilities, they often struggle with biological data because they treat protein amino acid sequences as simple text strings. This approach overlooks two fundamental aspects of biology: evolutionary context and three-dimensional geometry. Protein Language Models (PLMs) like ESM-2 capture evolutionary patterns from billions of sequences, while structure-based encoders like ProteinMPNN extract geometric features essential for understanding function.
EvoLlama addresses this "modality gap" by integrating specialized protein encoders with a powerful text decoder. By aligning structural and sequential protein representations with the LLM’s embedding space, EvoLlama gains the specialized "eyes" necessary to interpret biological data while retaining the reasoning and instruction-following capabilities of a modern LLM.
Methodology and Architecture
The EvoLlama architecture is a multimodal framework comprising four primary components: a sequence encoder (ESM-2 650M), a structure encoder (ProteinMPNN), a multimodal projector (MLP), and a text decoder (Llama-3 8B).
As illustrated in Figure 2, the model is trained using a two-stage strategy:
- Stage 1: Projection Tuning (Optional): This stage aligns protein representations with text using protein-description pairs. The encoders and the LLM remain frozen, while only the MLP projector is updated to map protein features into the text embedding space.
- Stage 2: Supervised Fine-Tuning (SFT): The model is trained on specific protein-oriented instructions. During this stage, both the projection layers and the protein encoders are updated to refine the model's biological intuition for tasks such as property prediction.
A key technical innovation in EvoLlama is the feature fusion method. Rather than concatenating sequence and structure features—which would increase token count and computational overhead—the model uses element-wise addition. This approach maintains a compact input representation and reduces inference latency by approximately 20%.
Datasets and Training
To facilitate training and evaluation, the researchers utilized a diverse set of biological data. The Swiss-Prot dataset, containing approximately 369,000 manually annotated records, served as the foundation for projection tuning. For more complex tasks, the model utilized Mol-Instructions (PMol) for functional and catalytic activity prediction, and the PEER benchmark for property predictions such as solubility and subcellular localization.
As shown in Figure 6, the data is verbalized using natural language templates. For instance, a prompt might ask the model to "Examine the provided protein sequence and determine the catalytic activity of the enzyme it represents." Because experimental 3D structures are not always available, the framework incorporates predicted structures from AlphaFold-2 and ESMFold to ensure broad coverage across datasets.
Key Results and Insights
EvoLlama demonstrates significant improvements across multiple benchmarks:
- Protein Understanding: On tasks involving functional and catalytic activity prediction, EvoLlama outperformed previous state-of-the-art models by an average of 6% in ROUGE-L scores.
- Property Prediction: The model achieved highly competitive results on the PEER benchmark, including 72.37% accuracy on solubility and 99.73% on binary localization, often surpassing specialized, non-LLM baselines.
- Zero-Shot Generalization: Following projection tuning, EvoLlama exhibited a robust ability to generalize to unseen protein tasks, outperforming other protein-oriented LLMs by 1-8% in zero-shot settings.
The research highlights that combining sequence and structure representations is strictly superior to using either modality in isolation. While ESM-2 implicitly captures some structural information, the explicit addition of geometric features from structure encoders provides a necessary "physical" grounding for the model's reasoning.
Limitations and Future Work
Despite its success, EvoLlama faces challenges in tasks with extremely large label spaces, such as Fold Classification, where distinguishing between over 1,000 fine-grained categories remains difficult for generative models. Additionally, the model's performance is partially dependent on the accuracy of predicted 3D structures. Future research will focus on expanding the framework to include other biomolecular modalities, such as DNA and small molecules, to develop a more universal biological foundation model.
Summary updated