🧪 AbBiBench: Antibody Binding Benchmarking

May 8, 2026 · View on GitHub

This is the code for AbBiBench (Antibody Binding Benchmarking), a benchmarking framework for optimizing antibody binding affinity. We use experimental antibody–antigen binding affinity measurements to evaluate the performance of widely used computational models for antibody sequence engineering, including ESM-2, AntiBERTy, CurrAb, SaProt, ProSST, ESM-3, ProGen2, ProtGPT2, ProteinMPNN, ESM-IF, Antifold, DiffAb, MEAN, dyMEAN, AF3, and Boltz-2. We also compare several commonly used physics-based metrics, such as −ΔG and −SASA.

Leaderboard

RankModel TypeModel1mhp1mlc1n8z2fjg3gbn_h13gbn_h94fqi_h14fqi_h34d5_her25a12_ang25a12_vegfaayl50aayl49aayl49_MLaayl51aayl52Avg. Spearman ↑
🥇 1Inverse FoldingProteinMPNN-0.02-0.21-0.170.460.590.640.610.420.320.130.540.190.400.340.320.230.30
🥈 2Inverse FoldingESMIF10.01-0.31-0.110.490.590.540.650.490.400.130.240.140.390.270.340.250.28
🥉 3Inverse FoldingAntifold-0.02-0.310.160.410.120.270.420.370.340.180.210.070.390.140.320.240.21
4Structure PredictionBoltz-2-0.220.02-0.060.080.710.560.400.270.03-0.020.31-0.020.020.020.05-0.040.13
5BiophysicsFoldX-0.020.02-0.28-0.020.590.320.640.290.01-0.040.11-0.02-0.010.240.070.090.12
6Diffusiondiffab0.240.01-0.02-0.010.670.610.00-0.01-0.010.030.000.020.150.000.030.010.11
7Diffusiondiffab_fixbb-0.090.010.04-0.020.540.760.000.00-0.010.020.010.000.18-0.010.190.000.10
8Masked LMCurrAb0.120.11-0.390.140.160.230.190.130.140.050.030.010.030.200.040.010.07
9Masked LMESM3-Open-structure0.06-0.28-0.120.17-0.24-0.22-0.200.030.250.160.130.090.390.120.260.220.05
10Masked LMSaProt-0.150.250.11-0.210.530.600.480.28-0.34-0.08-0.14-0.11-0.270.11-0.17-0.270.04
11Masked LMESM20.200.06-0.130.140.230.38-0.02-0.02-0.20-0.070.20-0.03-0.04-0.14-0.11-0.160.02
12Graph ModeldyMEAN_fixbb0.150.010.00-0.02-0.020.000.040.02-0.02-0.010.02-0.010.020.02-0.020.020.01
13Autoregressive LMProtGPT20.14-0.210.150.17-0.39-0.18-0.200.000.050.080.180.020.060.050.10-0.060.00
14Masked LMProSST0.090.02-0.260.08-0.30-0.07-0.070.100.070.16-0.06-0.020.13-0.010.11-0.030.00
15Graph ModeldyMEAN-0.080.020.000.01-0.02-0.020.030.020.030.010.01-0.02-0.03-0.01-0.030.00-0.01
16Graph ModelMEAN_fixbb-0.070.010.16-0.12-0.20-0.04-0.36-0.210.060.020.340.010.060.02-0.050.02-0.02
17Structure PredictionAF3-0.54-0.17-0.160.09-0.050.130.050.050.02-0.11-0.01-0.010.230.000.070.01-0.02
18BiophysicsepitopeSA0.080.090.170.02-0.26-0.20-0.14-0.150.00-0.030.120.010.05-0.180.02-0.18-0.04
19Graph ModelMEAN0.010.010.15-0.12-0.240.00-0.60-0.280.020.010.160.020.070.02-0.050.02-0.05
20Autoregressive LMprogen2-large-0.01-0.28-0.210.26-0.76-0.62-0.45-0.320.070.150.090.110.26-0.110.200.20-0.09
21Masked LMAntiBERTy0.04-0.13-0.240.01-0.72-0.75-0.38-0.200.130.170.020.040.21-0.140.220.01-0.11

Each value in this table indicates the Spearman correlation between the model's predicted log-likelihood scores and the corresponding experimental measurement from a specific antibody–antigen dataset. They are ranked according to the average Spearman correlation coefficient across multiple datasets.

Installation

We recommend create a conda environment for each tool:


$ conda env create --name ENV_NAME --file envs/ENV_FILE.yml

We have provided requirement files for each tools in envs directory, including diffab.yml, dyMEAN.yml, esmif.yml, MEAN_ProteinMPNN.yml, prosst.yml, SaProt.yml

Data Resource

📂 The dataset used in this project is publicly available on Hugging Face Datasets. Please place the downloaded data in the data folder under the project root directory to ensure the program runs correctly.

The latest AbBiBench dataset can be easily loaded via Hugging face. Below is an example that demonstrates the entire workflow—from listing and loading data, to filtering by antigen and downloading/parsing PDB files. We will also update this example in our GitHub repository and provide a PyTorch dataset version:

from huggingface_hub import list_repo_files, hf_hub_download
from datasets import load_dataset, concatenate_datasets
from tqdm import tqdm
import biotite.structure.io as bsio

REPO = "AbBibench/Antibody_Binding_Benchmark_Dataset"

# 1. List all CSV files in the binding_affinity directory
csv_files = [
    f for f in list_repo_files(REPO, repo_type="dataset")
    if f.startswith("binding_affinity/") and f.endswith("_benchmarking_data.csv")
]

# 2. Load and concatenate all subsets
all_splits = []
for csv in tqdm(csv_files, desc="Loading CSVs"):
    ds = load_dataset(REPO, data_files={ "data": csv }, split="train")
    all_splits.append(ds)
full_ds = concatenate_datasets(all_splits)
print(full_ds)    # overview of the full dataset

# 3. Filter for samples belonging to influenza H1 (3gbn_h1)
h1_ds = full_ds.filter(lambda x: x["antigen_id"].endswith("3gbn_h1"))

# 4. List PDB structure files corresponding to this antigen
antigen_id     = "3gbn_h1"
base_id        = antigen_id.split("_")[0]
structure_files = [
    f for f in list_repo_files(REPO, repo_type="dataset")
    if f.startswith(f"structures/{base_id}") and f.endswith(".pdb")
]

# 5. Download and parse each PDB using Biotite
for pdb_file in structure_files:
    local_pdb = hf_hub_download(
        repo_id=REPO, filename=pdb_file, repo_type="dataset"
    )
    print("Downloaded to:", local_pdb)
    atom_array = bsio.load_structure(local_pdb)
    print("Chains:", atom_array.chain_id)

Model log-likelihood scoring

Run the Script


cd ./scripts
python eval_seq.py --model [MODEL] --data [DATA]

Where MODEL ∈ { diffab, ESM-IF, AntiFold, ESM-2, ESM3-Open, AntiBERTy, CurrAb, dyMEAN, MEAN, ProteinMPNN, ProSST, ProGen2, ProSST, foldx, sasa }, and DATA ∈ { 3gbn, 4fqi, 2fjg, aayl49, aayl49_ml, aayl51, 1mlc, 1n8z , 1mph}

Example


cd ./scripts
python eval_seq.py --model diffab --data 3gbn

This will:

  1. Activate the Conda environment diffab.
  2. Run models/diffab/get_model_log_likelihood.py --name 3gbn.
  3. Save the output to: benchmark/notebooks/scoring_outputs/3gbn_benchmarking_data_diffab_scores.csv

Correlation to antibody-antigen binding affinity

We provide a Jupyter Notebook in notebooks/figure.ipynb to reproduce our correlation results shown in our paper.

🏆 Contribute to the AbBiBench Leaderboard — We Welcome Your Model and Data!

We maintain a public AbBiBench leaderboard and actively invite external submissions that benchmark new models or datasets for antibody–antigen binding affinity.


🚀 Step‑by‑step guide for submitting model results

  1. Fork this repository and create a new branch:

    git clone https://github.com/<your_username>/AbBiBench.git
    cd AbBiBench
    git checkout -b leaderboard-<your_model>
    
  2. Add your code and results

    RequirementDetails
    Project layoutPlace all evaluation code inside models/<your_model>/.
    CLI interfaceYour main script must accept --name $name (dataset name).
    Output formatFor each mutant, write a CSV of scores to notebooks/scoring_outputs/.
    EnvironmentPut any environment.yml or requirements.txt in envs/.
    Leaderboard rowAppend one line to leaderboard/leaderboard.csv (preserve column order).
  3. Commit and push

    git add models/<your_model> envs/ notebooks/scoring_outputs/<file>.csv README.md
    git commit -m "Leaderboard submission: <your_model>"
    git push -u origin leaderboard-<your_model>
    
  4. Open a Pull Request to master

    Title your PR:

    Leaderboard submission: <Your Model Name>
    

    and include the following template in the PR description:

    ### Method name
    <Your model>
    
    ### Short description (≤ 100 words)
    
    
    ### Reference
    arXiv / DOI / blog link (optional)
    
    ### Reproduction command
    python models/<your_model>/run.py --name 1mhp
    
  5. Review and merge
    We will verify your scores and code within ~7 days. Once merged, your model will appear automatically on the leaderboard.

📦 Contribute Data to AbBibench/Antibody_Binding_Benchmark_Dataset

We warmly welcome community contributions of new antibody–antigen binding affinity datasets to the AbBiBench benchmark on the Hugging Face Hub.
Data must be shared under an open license (CC‑BY‑4.0 or a compatible license).


  1. Install Git LFS and sign in to Hugging Face

    conda install -c conda-forge git-lfs
    git lfs install        # one‑time setup
    pip install -U huggingface_hub
    huggingface-cli login  # paste your HF access token
    
  2. Fork and clone the dataset repo

    # Replace <username> with your HF account
    git clone https://huggingface.co/datasets/<username>/Antibody_Binding_Benchmark_Dataset
    cd Antibody_Binding_Benchmark_Dataset
    git remote add upstream https://huggingface.co/datasets/AbBibench/Antibody_Binding_Benchmark_Dataset
    git pull upstream main   # stay up to date
    
  3. Add your data

    • Each CSV inside binding_affinity/ must include at least:

      columndescription
      mut_heavy_chain_seqAmino‑acid sequence for each mutant of heavy chain
      binding_scoreExperimental affinity value
    • Place every PDB/mmCIF file inside complex_structure/.

    • Each study must provide a metadata.json at the root of its folder. The file should be a dictionary keyed by complex ID (typically the PDB code). For each complex include the fields below:

      keytype / exampledescription
      pdb"1mhp_hla"PDB identifier (or custom)
      pdb_path"./data/complex_structure/1mhp_hla.pdb"Relative path to the structure file
      heavy_chain"H"Heavy chain ID of the antibody
      light_chain"L"Light chain ID of the antibody
      antigen_chains["A"]Antigen chain IDs
      affinity_data["./data/binding_affinity/1mhp_benchmarking_data.csv"]Paths to corresponding affinity CSV files
      receptor_chains["A"]Chains treated as receptor in docking (if applicable)
      ligand_chains["H","L"]Chains treated as ligand in docking
      chain_order["H","L","A"]Ordering of chains in the complex file
      epitope_chain"A"Chain containing the epitope residues
      paratope_chain"H"Chain containing the paratope residues
  4. Commit and push

    git checkout -b add-<your_study_name>
    git add data/<your_dataset>.csv metadata.json
    git commit -m "Add <your_study_name> dataset (n=1234 mutants)"
    git push -u origin add-<your_study_name>
    
  5. Open a Pull Request on the HF Hub

    Use Contribute → Pull request on the repo page and fill out:

    ### Study name
    <your_study_name>
    
    ### Description (≤ 100 words)
    Short summary of the experiment, antigen, number of mutants, and assay.
    
    ### Files added
    - data/<your_study_name>/binding_affinity/*.csv
    - data/<your_study_name>/complex_structure/*.pdb
    -
    
    ### License
    CC-BY-4.0
    

We will review your PR—checking format, license, and basic biological plausibility—within about 7 days. Once merged, your data will appear in the next dataset snapshot and can be used immediately by AbBiBench.

🙏 Thanks for contributing and helping improve antibody‑design benchmarks!