RAG-ESM: Improving pretrained protein language models via sequence retrieval
Open accessPreprint — published as 10.1103/db1b-hy16 · Paper page
Abstract
A bstract: Protein language models are significantly advancing the modeling of sequence-function relationships. However, most of them are not directly informed of homology and evolutionary relationships between protein sequences. Here, we propose a method to make them homology-aware. We introduce RAG-ESM, a retrieval-augmented framework that allows to condition pretrained ESM2 protein language models on homologous sequences, using a minimal number of additional cross-attention parameters and minimal computational cost. We show that RAG-ESM models outperform larger ESM2 models for masked amino acid prediction. We find that sequence alignment capabilities spontaneously emerge in specific cross-attention heads of RAG-ESM. By using a discrete diffusion objective for training, and by conditioning on homologs during inference, RAG-ESM reaches state-of-the-art performance for conditional protein sequence generation and motif scaffolding, among sequence-based models. Our method thus possesses strong potential for scalable, efficient and controlled protein engineering.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Highly accurate protein structure prediction with AlphaFold
Jumper, J., Evans, R., Pritzel, A., Green, T., Figurnov, M., Ronneberger, O., Tunyasuvunakool, K., Bates, R., Žídek, A., Potapenko, A., et al. (2021) · Nature · doi:10.1038/s41586-021-03819-2 · Cited by 43,764 · see citing works
Large language models generate functional protein sequences across diverse families
Madani, A., Krause, B., Greene, E. R., Subramanian, S., Mohr, B. P., Holton, J. M., Olmos, J. L., Xiong, C., Sun, Z. Z., Socher, R., et al. (2023) · Nature Biotechnology · doi:10.1038/s41587-022-01618-2 · Cited by 1,078 · cited 3× · see citing works
“Conditioning on sequence provides an alternative to conditioning on control tags, e.g. gene ontology terms (Nijkamp et al., 2023; Madani et al., 2023), and to multimodal pLMs using structural and functional features (Hayes et al., 2024; Wang et al., 2025).”
Flagged first, then by citations
Research works printed but not linked: 45
- Gustaf Ahdritz , Nazim Bouatta , Sachin Kadyan , Qinghui Xia , William Gerecke , Timothy J O’Donnell , Daniel Berenberg , Ian Fisk , Niccolò Zanichelli Bo Zhang , et al. OpenFold: Retraining AlphaFold2 yields new insights into its learning mechanisms and capacity for generalization. Biorxiv, pp. 2022–11, 2022.
- Gustaf Ahdritz , Nazim Bouatta , Sachin Kadyan , Lukas Jarosch , Dan Berenberg , Ian Fisk , Andrew Watkins , Stephen Ra , Richard Bonneau , and Mohammed AlQuraishi . OpenProteinSet: Training data for structural biology at scale. Advances in Neural Information Processing Systems, 36, 2024. · DOI
- 10.1101/2023.09.11.556673 · DOI · Paper page
- Tristan Bepler and Bonnie Berger . Learning protein sequence embeddings using information from structure. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=SygLehCqtm.
- Nicholas Bhattacharya , Neil Thomas , Roshan Rao , Justas Dauparas , Peter K. Koo , David Baker , Yun S. Song , and Sergey Ovchinnikov . Single layers of attention suffice to predict protein contacts. bioRxiv, 10.1101/2020.12.21.423882, 2020. · DOI
- 10.1126/science.add2187 · DOI · Paper page
- 10.18653/v1/N19-1423 · DOI · Paper page
- 10.1109/TPAMI.2021.3095381 · DOI · Paper page
- 10.1016/j.sbi.2023.102594 · DOI
- 10.1038/s41467-022-32007-7 · DOI · Paper page
- Kelvin Guu , Kenton Lee , Zora Tung , Panupong Pasupat , and Ming-Wei Chang . Realm: retrieval-augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, ICML’20. JMLR.org, 2020.
- 10.1371/journal.pcbi.1008129 · DOI
- 10.1126/science.ads0018 · DOI · Paper page
- 10.1093/nargab/lqae150 · DOI · Paper page
- Pranav Kantroo , Günter P. Wagner , and Benjamin B. Machta . Pseudo-perplexity in one fell swoop for protein fitness estimation. arXiv, pp. 2407.07265, 2024. · DOI
- Patrick Lewis , Ethan Perez , Aleksandra Piktus , Fabio Petroni , Vladimir Karpukhin , Naman Goyal , Heinrich Küttler , Mike Lewis , Wen-tau Yih , Tim Rocktäschel , Sebastian Riedel , and Douwe Kiela . Retrieval-augmented generation for knowledge-intensive nlp tasks. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS ‘20, Red Hook, NY, USA, 2020. Curran Associates Inc. ISBN 9781713829546.
- 10.1126/science.ade2574 · DOI · Paper page
- 10.1038/s41467-022-34032-y · DOI · Paper page
- 10.1101/2020.03.07.982272 · DOI
- 10.1371/journal.pone.0016163 · DOI
- 2021, Language models enable zero-shot prediction of the effects of mutations on protein function, Advances in Neural Information Processing Systems, 34, 29287
- 10.48550/arXiv.2502.17294 · DOI
- 10.1093/nar/gkw1081 · DOI
- 10.1073/pnas.1111471108 · DOI · Paper page
- Geraldene Munsamy , Sebastian Lindner , Philipp Lorenz , and Noelia Ferruz . ZymCTRL: a conditional language model for the controllable generation of artificial enzymes. In NeurIPS machine learning in structural biology workshop, 2022. URL https://www.biorxiv.org/content/10.1101/2024.05.03.592223.abstract. · DOI
- 10.1016/j.cels.2023.10.002 · DOI · Paper page
- Samantha Petti , Nicholas Bhattacharya , Roshan Rao , Justas Dauparas , Neil Thomas , Juannan Zhou , Alexander M Rush , Peter K Koo , and Sergey Ovchinnikov . End-to-end learning of multiple sequence alignments with differentiable Smith-Waterman. bioRxiv, pp. 2021.10.23.465204, 2021. · DOI
- 2021, In Proceedings of the 38th International Conference on Machine Learning, 139, 8844
- 10.1073/pnas.2016239118 · DOI · Paper page
- 10.1126/science.aba3304 · DOI · Paper page
- 10.1126/science.aba3304 · DOI · Paper page
- Subham Sekhar Sahoo , Marianne Arriola , Yair Schiff , Aaron Gokaslan , Edgar Marroquin , Justin T Chiu , Alexander Rush , and Volodymyr Kuleshov . Simple and effective masked diffusion language models. arXiv, 2024. URL https://arxiv.org/abs/2406.07524. · arXiv
- 10.1101/2024.05.24.595730 · DOI
- Jin Su , Chenchen Han , Yuyang Zhou , Junjie Shan , Xibin Zhou , and Fajie Yuan . SaProt: Protein Language Modeling with Structure-aware Vocabulary. October 2023. URL https://openreview.net/forum?id=6MRm3G4NiU. · DOI
- 10.1093/nar/gkaa1100 · DOI · Paper page
- 10.1371/journal.pone.0018093 · DOI · Paper page
- Timothy Truong Jr and Tristan Bepler . PoET: A generative model of protein families as sequencesof-sequences. Advances in Neural Information Processing Systems, 36, 2024.
- Jesse Vig , Ali Madani , Lav R. Varshney , Caiming Xiong , Richard Socher , and Nazneen Rajani . BERTology meets biology: Interpreting attention in protein language models. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=YWtLZvLmud7. · DOI · Paper page
- Xinyou Wang , Zaixiang Zheng , Fei Ye , Dongyu Xue , Shujian Huang , and Quanquan Gu . Dplm-2: A multimodal diffusion protein language model, 2024. URL https://arxiv.org/abs/2410.13782. · arXiv
- Xinyou Wang , Zaixiang Zheng , Fei Ye , Dongyu Xue , Shujian Huang , and Quanquan Gu . Diffusion language models are versatile protein learners. In Proceedings of the 41st International Conference on Machine Learning, ICML’24. JMLR.org, 2025.
- 10.1038/s41586-023-06415-8 · DOI · Paper page
- 10.1073/pnas.0805923106 · DOI · Paper page
- Ruidong Wu , Fan Ding , Rui Wang , Rui Shen , Xiwen Zhang , Shitong Luo , Chenpeng Su , Zuofan Wu , Qi Xie , Bonnie Berger , Jianzhu Ma , and Jian Peng . High-resolution de novo structure prediction from primary sequence. bioRxiv, pp. 2022.07.21.500999, 2022.
- 10.1002/prot.20264 · DOI · Paper page
- Zaixiang Zheng , Yifan Deng , Dongyu Xue , Yi Zhou , Fei Ye , and Quanquan Gu . Structure-informed language models are protein designers. In Proceedings of the 40th International Conference on Machine Learning, ICML’23. JMLR.org, 2023. · DOI
- Authors
- Sgarbossa, D., & Bitbol, A.-F.
- Affiliations
- SIB Swiss Institute of Bioinformatics (CH)
- Corresponding author
- Bitbol, Anne-Florence
- Venue
- PRX Life
- Publisher
- openRxiv
- Published
- 2025-04-08
- Volume
- 3
- Issue
- 3
- ISSN
- 2835-8279 (ISSN-L)
- OpenAlex
- W4413345388
- Cited by
- 3
- References
- 2
- Citations by year
- 2026: 1 · 2025: 2
- FWCI
- 0.91
- Type
- journal article
- Language
- en
- Open access
- diamond
- doi.org
- Licence
- Locations
- PRX Life (publishedVersion, cc-by)
- bioRxiv (Cold Spring Harbor Laboratory) (acceptedVersion, cc-by)
- Infoscience (Ecole Polytechnique Fédérale de Lausanne) (submittedVersion)
- Funders
- European Commission (851173, HORIZON2020)
- Horizon 2020 Framework Programme (851173)
- H2020 European Research Council (851173)
- Topics
- Life Sciences › Biochemistry, Genetics and Molecular Biology › Molecular Biology › Machine Learning in Bioinformatics
- Life Sciences › Biochemistry, Genetics and Molecular Biology › Molecular Biology › Protein Structure and Dynamics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Keywords
- protein language models, retrieval-augmented generation, ESM-2, cross-attention, sequence alignment, protein engineering
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review