Prot-LAMBDA is a protein language model boosted with distance awareness for versatile structural understanding of proteins. Built upon this foundation, LAMBDAFold is a single-sequence 3D protein structure prediction pipeline. Additionally, LAMBDAFold-RAG introduces a Retrieval-Augmented Generation protocol that accepts AF2-style structural templates to further improve predicted structures.
License: GPL v3. (If you are interested in a different license, for example, for commercial use, please contact us.)
Contact: Daisuke Kihara (dkihara@purdue.edu)
For technical problems or questions, please reach to Nabil Ibtehaz (nibtehaz@purdue.edu).
Ibtehaz, N., Zhang, Z., Kagaya, Y., Xu, M., Tomii, K., & Kihara, D. Prot-LAMBDA : Protein LAnguage Model Boosted with Distance Awareness improves structure understanding. (In submission)
Protein language models (PLMs) learn evolutionary information from large-scale sequence data, but three-dimensional relationships are encoded only implicitly. Here, we introduce Prot-LAMBDA (Protein LAnguage Model Boosted with Distance Awareness), a PLM that explicitly incorporates spatial relationships by coupling residue embeddings with inter-residue contacts. Prot-LAMBDA improves performance across diverse structure-related tasks, including contact, secondary structure, backbone geometry, solvent accessibility, and protein fold prediction. Notably, it achieves a twofold improvement in long-range contact recall and an 11.7% reduction in ψ-angle prediction error relative to ESM2-3B. Despite having approximately fivefold fewer parameters, Prot-LAMBDA also improves 3D structure prediction over ESM2-3B by 5–7% in TM-score when coupled to the same structure-prediction module. Building on these representations, we developed LambdaFold, a lightweight distance-guided structure prediction framework that achieves performance comparable to ESMFold on proteins strictly non-redundant to the training data. Finally, retrieval-augmented integration of structural templates increases mean TM-score substantially for targets with high template coverage and rescues several incorrect folds. Together, these results demonstrate that explicit spatial constraints enable efficient and generalizable structural representation learning and protein structure prediction.
Prot-LAMBDA bridges protein sequence context with structural distance constraints. The core architecture is a language model partially finetuned from a pretrained ESM2-650M model. The embedding from the final transformer layer serves as the sequence representation, while its pairwise difference forms the pair representation, which are utilized for masked language modeling and contact map prediction, respectively. The lower panel highlights key architectural components: standard multi-head self-attention progressively refines the sequence representation, whereas a single layer of axial attention, integrated with RoPE to account for sequence separation, refines the pair representation.
Sequence and pair representations from Prot-LAMBDA are processed by DistFormer, a compact distance-guided folding trunk with three stages of progressive refinement, generating distograms (4, 16, and 64 bins) and corresponding 3D structures. An example from CASP target T1034 illustrates increasing structural accuracy across stages, with improvements in TM-score, LDDT, and RMSD. The progressive development and refinement of secondary structures in successive stages can be observed. Structures are colored by secondary structure classes: red for alpha helices, yellow for beta sheets, and green for other regions.
Initial structure predicted by LambdaFold is converted into a distogram and fused with a template distogram retrieved from external databases via the Template Fusion Module. The Template Fusion Module utilizes triangular self-attention, triangular cross-attention (incorporating template data), and triangular multiplicative updates, followed by a gating mechanism to produce a refined distogram. The resulting refined distogram guides a Distance-Feedback-Driven Invariant Point Attention (IPA) module to produce the final refined structure.
Python 3.9 : https://www.python.org/downloads/
1. Install git
git clone https://github.com/kiharalab/Prot-LAMBDA && cd Prot-LAMBDA
You have two options to install dependency on your computer:
3.1.1install pip.
pip3 install -r requirements.txt --user
Installing the dependencies only require a few minutes on a standard desktop computer.
3.2.1 install conda.
conda create -n protlambda python=3.9
conda activate protlambda
pip3 install -r requirements.txt
Each time when you want to run this code, simply activate the environment by
conda activate protlambda
conda deactivate (If you want to exit)
Please download the model parameters from zenodo (10.5281/zenodo.21984993) and place them in the params directory.
Our implementation of Prot-LAMBDA, LambdaFold and LambdaFold-RAG is provided in the ProtLAMBDA directory.
We present some tutorials for using our model inside the Example directory.
Here we provide the following functionalities :
Please run the notebook:
contact_map_prediction.ipynb
This usually takes <5 minutes to run.
Please run the notebook:
distogram_prediction.ipynb
This usually takes <10 minutes to run.
Please run the notebook:
protein_structure_prediction.ipynb
This usually takes <10 minutes to run.
Please run the notebook:
template_based_rag.ipynb
This usually takes <10 minutes to run.
Protein sequence in fasta format.
Our example input can be found in the sample_protein directory
This project builds upon and integrates code and models developed by the following open-source projects:
- ESM (Evolutionary Scale Modeling): Developed by Meta AI Research.
- OpenFold: A trainable, PyTorch reproduction of AlphaFold 2 developed by the AlQuraishi Lab.
We are grateful to the authors and contributors of these repositories for making their code and model weights publicly available to the research community.



