Abstract
Traditional protein representation learning relies heavily on Multiple Sequence Alignment (MSA) to capture evolutionary information. However, MSA is computationally expensive and struggles with "orphan" or de novo proteins. We present Retrieved Sequence Augmentation (RSA), a framework that replaces explicit alignment with a fast, dense retriever. RSA achieves a 373x speedup in inference time compared to MSA-Transformer while improving performance by an average of 5% across structural and property prediction tasks. Furthermore, RSA demonstrates superior generalization on synthetic proteins and enables seamless integration with Large Language Model (LLM) agents for biological reasoning.
Introduction
Understanding protein function and structure often necessitates analyzing evolutionary homologs. Historically, this has been achieved through Multiple Sequence Alignment (MSA), which aligns a query sequence against a database of known proteins to identify conserved residues. Despite its utility, MSA faces two critical bottlenecks: extreme computational complexity (NP-complete) and a dependency on close evolutionary relatives, which limits its effectiveness for "orphan" or computationally designed de novo proteins.
This work explores whether explicit, row-by-row alignment is a prerequisite for deep learning models. We hypothesize that providing "raw," unaligned related sequences allows Transformers to learn a "soft alignment" through self-attention, potentially surpassing the rigid constraints of traditional MSA.
Methodology: From Alignment to Retrieval
We propose Retrieved Sequence Augmentation (RSA), which frames protein representation as a retrieval-augmented task. Unlike MSA-based models that require pre-computed alignments, RSA utilizes a dense retriever to identify relevant sequences dynamically.
The RSA pipeline consists of three primary components:
- Dense Retriever: Using a pre-trained protein language model (ESM-1b), 44 million sequences from Pfam-A are converted into vector embeddings. Similarity search is performed using Faiss, enabling GPU-accelerated retrieval.
- Transformer Encoder: The query sequence and the top $N$ retrieved (unaligned) sequences are concatenated. The model's self-attention mechanism identifies relevant structural or functional motifs on the fly, effectively performing "soft alignment."
- LLM Integration: RSA is also implemented as a tool for LLM agents (e.g., GPT-4), allowing them to retrieve biological context to answer complex proteomic queries without hallucination.
Experimental Results
RSA was evaluated against the state-of-the-art MSA-Transformer across seven downstream tasks, including secondary structure prediction, contact prediction, and subcellular localization.
Efficiency and Speedup
The most significant advantage of RSA is its computational efficiency. By bypassing the alignment step, RSA achieves massive reductions in both inference and database construction time.
As shown in the figure above, RSA is 373x faster during inference than MSA-Transformer. Furthermore, the construction of the retrieval database is 320x faster than traditional alignment-based database preparation.
Predictive Performance
Despite the lack of explicit alignment, RSA outperformed MSA-Transformer by an average of 5% across all benchmarks. Notably, on a challenging out-of-distribution set of 108 de novo proteins, RSA exceeded MSA-Transformer performance in 63.8% of cases. This suggests that dense retrieval captures semantic and structural similarities that character-based alignment tools like HHblits might overlook.
Discussion and Future Work
RSA demonstrates that explicit alignment is a bottleneck rather than a requirement for protein representation learning. By treating MSA as a subset of retrieval-augmentation, we can leverage efficient algorithms from information retrieval to scale bioinformatics models.
However, limitations remain. The performance of RSA is intrinsically tied to the quality of the retriever's embeddings. If the base model (ESM-1b) has not encountered a specific protein fold, retrieval may fail. Future research will focus on pre-training retrievers specifically for structural similarity and exploring more sophisticated weighting mechanisms for combining retrieved sequences.
Summary updated