TL;DR
Multiple Sequence Alignment (MSA) is the primary computational bottleneck in modern protein structure prediction tools like AlphaFold2. The authors introduce fastMSA, a dense retrieval framework based on protein language models that embeds sequences into a low-dimensional space to filter out irrelevant candidates before running alignment algorithms. By pre-filtering massive databases like UniRef90 down to the top candidates, fastMSA delivers up to a 34-fold speed-up while preserving downstream 3D structure modeling accuracy.
What Problem Does This Paper Address?
Tools like AlphaFold2 and RoseTTAFold rely heavily on Multiple Sequence Alignments (MSAs). By gathering evolutionary homologs of a target protein, these models identify co-evolving amino acid residues that constrain 3D spatial conformation.
However, building an MSA requires querying massive sequence repositories (such as UniProt, containing hundreds of millions of sequences) using profile Hidden Markov Model tools like JackHMMER. Exhaustively scanning and aligning against databases of this magnitude is computationally prohibitive. Because existing acceleration techniques mostly focus on improving the alignment algorithm itself or only operate on smaller databases, database scanning remains a stubborn bottleneck.
Methods
fastMSA tackles this bottleneck not by replacing traditional aligners, but by acting as an orthogonal, rapid pre-filter inspired by Dense Passage Retrieval (DPR) in NLP:
- Bi-Encoder Architecture:
- A query sequence encoder ($f_\Theta$) and a context sequence encoder ($f_\Psi$) are both initialized with the pre-trained transformer protein language model ESM-1b.
- Each encoder projects an amino acid sequence into a fixed $d$-dimensional vector representation (taking the sequence's first token embedding).
- Contrastive Training:
- The model is trained on positive pairs $(q, c)$—where $c$ is a known evolutionary homolog found in an MSA generated for query $q$ via JackHMMER.
- Using in-batch negative sampling across a batch of queries and candidates, the network maximizes the dot product similarity $s_{qc} = h_q^T z_c$ between true query-candidate pairs while minimizing similarity for mismatched pairs.
- Inference Pipeline:
- Offline Indexing: The millions of sequences in UniRef90 are pre-encoded into dense vectors once and indexed using FAISS for fast similarity search.
- Online Retrieval & Alignment: When a new query arrives, it is embedded, and FAISS retrieves the top-$K$ nearest neighbors (e.g., top 100k or 200k).
- Standard JackHMMER is then executed only against this filtered, high-probability candidate pool to generate the final MSA.
Query Sequence ──► Query Encoder ──► Vector
│ (Dot Product / FAISS)
UniRef90 DB ──► Context Encoder──► Top-K Candidates ──► JackHMMER ──► Final MSA ──► AlphaFold2
(Offline) (Offline Vectors) (e.g., 200k)
Datasets
- Training:
- CATH: ~33k representative protein domain sequences. JackHMMER was run against UniRef90 to extract MSAs, yielding a reference sub-database of roughly 11M distinct candidate sequences.
- Evaluation:
- CASP13 (122 domain sequences)
- CASP14 (102 domain sequences)
- CAMEO (297 sequences evaluated between late 2020 and early 2021)
Key Insights and Ideas
- Orthogonal Pipeline Integration: Because fastMSA operates as an upstream filter rather than a bespoke alignment algorithm, it drops directly into existing bioinformatics pipelines (JackHMMER, HHblits, AlphaFold) without modifying downstream tools.
- Inner Product as a Retrieval Mechanism: Enforcing a decomposable dot-product similarity allows dense sequence representations to integrate with fast Approximate Nearest Neighbor (ANN) search libraries like FAISS, enabling logarithmic-time candidate retrieval.
- More Homologs $\ne$ Better Fold: Downstream AlphaFold2 predictions occasionally scored higher when fed top-200k filtered MSAs than when using the larger top-1M set or full ground-truth MSAs. AlphaFold2's attention mechanism plateaus once sufficient evolutionary signal is present; aggressive filtering removes weakly aligned, noisy sequences that can distract the folding network.
Key Results
- Database Reduction & Recall: Filtering an 11M sequence database down to 200k candidates (a 55-fold size reduction) captured $\ge$55–60% of ground truth homologs across CASP13, CASP14, and CAMEO. Expanding retrieval to top-2M captured >80%.
- Search Speed-up: On a ~70M sequence UniRef90 database, fastMSA achieved a 34-fold speed-up using the top-100k retrieved subset, effectively shrinking JackHMMER scanning time to negligible levels.
- Downstream 3D Modeling Performance (AlphaFold2 Global lDDT):
- CASP13: fastMSA (top 200k) achieved 74.47 lDDT (vs. 78.90 for ground truth subset, and 71.83 for raw RoseTTAFold).
- CASP14: fastMSA (top 200k) reached 65.86 lDDT (vs. 71.20 for ground truth subset, and 63.91 for RoseTTAFold).
- CAMEO: fastMSA (top 200k) reached 68.69 lDDT (vs. 73.15 for ground truth subset).
Limitations and Future Work
- Shallow Alignments: Performance suffers noticeably for queries with low effective sequence counts ($\ln(M_{\text{eff}}) < 3$). In data-sparse regimes where true homologs are rare, dense retrieval struggles to recall sufficient sequence diversity.
- Training Scale Constraints: The dual encoder was trained on only ~33k MSAs from CATH due to GPU limits (4 $\times$ NVIDIA V100s). The authors expect recall and embedding sensitivity to improve once scaled to millions of training MSAs.
- Future Directions: Extending the framework to other massive biological search tasks, such as protein–RNA interaction modeling and metagenomic sequence clustering.
Summary updated