Source code for "Preferential CDR masking in paired antibody language models improves binding affinity prediction"

Read full text
Authors: Mahtab Talaei, Kenji C. Walker, Boran Hao, Eliot Jolley, Y. Jin, Dima Kozakov, John Misasi, Sándor Vajda, Ioannis Paschalidis, Diane Joseph-McCarthy
Cited by: 1

Abstract

This archive contains the official source code and environment scripts for the manuscript: Preferential CDR masking in paired antibody language models improves binding affinity prediction. AbCDR provides state-of-the-art antibody language models with CDR-specific training for binding prediction. This repository includes the code used for training, fine-tuning, masked language modeling (MLM) evaluations, and downstream binding prediction tasks. Model Availability The pretrained model checkpoints associated with this code are hosted on the HuggingFace Hub (gated access required for responsible use): AbCDR-ESM2: https://huggingface.co/NOC-Lab/AbCDR-ESM2 AbCDR-ESMC: https://huggingface.co/NOC-Lab/AbCDR-ESMC Repository Structure When you download and extract this archive, you will find the following structure: env/: Conda environment setup files (create_env.sh). data/: Dataset storage directories (OAS paired set and downstream binding datasets). AbCDR-ESM/: Main training and inference code, including scripts for unpaired pretraining (ESM2), paired fine-tuning (ESM2/ESMC), utility functions, and inference examples. mlm_tests/: Model evaluation scripts for Masked Language Modeling. downstream_tasks/: Scripts for binding prediction tasks. Quick Start & Usage To use this code, first set up the environment using the provided bash script (cd env && bash create_env.sh), and activate the conda environment (conda activate antibody_modeling). Detailed instructions and workflow commands for training new models, evaluating MLM, and running inference on new sequences can be found in the README.md file located at the root of the extracted folder, as well as in the sub-directory READMEs. Citation Talaei, M., Walker, K. C., Hao, B. et al. (2026). Preferential CDR masking in paired antibody language models improves binding affinity prediction. Communications AI & Computing, 1, 7. https://doi.org/10.1038/s44488-026-00010-2 Contact: mtalaei@bu.edu

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
29 April 2026