Conditionally Site-Independent Neural Evolution of Antibody Sequences
Authors: Stephen Zhewen Lu, Aakarsh Vermani, Kohei Sanno, Jiarui Lu, Frederick A Matsen, Milind Jagota, Yun S. Song
Organizations: University of California, Berkeley · Mila - Québec AI Institute · Université de Montréal · Fred Hutchinson Cancer Research Center · University of Washington · Howard Hughes Medical Institute · Columbia University
Common deep learning approaches for antibody engineering focus on modeling the marginal distribution of sequences. By treating sequences as independent samples, however, these methods overlook affinity maturation as a rich and largely untapped source of information about the evolutionary process by which antibodies explore the underlying fitness landscape. In contrast, classical phylogenetic models explicitly represent evolutionary dynamics but lack the expressivity to capture complex epistatic interactions. We bridge this gap with CoSiNE, a continuous-time Markov chain parameterized by a deep neural network. Mathematically, we prove that CoSiNE provides a first-order approximation to the intractable sequential point mutation process, capturing epistatic effects with an error bound that is quadratic in branch length. Empirically, CoSiNE outperforms state-of-the-art language models in zero-shot variant effect prediction by explicitly disentangling selection from context-dependent somatic hypermutation. Finally, we introduce Guided Gillespie, a classifier-guided sampling scheme that steers CoSiNE at inference time, enabling efficient optimization of antibody binding affinity toward specific antigens.
Figures & tables
Figure 1: Overview of CoSiNE . Given an antibody sequence x , the neural network outputs site-specific rate matrices conditioned on the full sequence. Each matrix is evolved for duration t to yield a per-site transition distribution p(yl∣x,t) . Assuming conditional independence, we take the product of the per-site transition probabilities to yield the full sequence transition probability p(y∣x,t) .
Figure 2: Mean per-site likelihood of CoSiNE versus DASM+Thrifty on held out evolutionary transitions from the test set . CoSiNE achieves better model fit, especially on transitions with longer branch lengths ( t≥0.25 ).
Figure 3: Categorical Jacobian for antibody 47D11 from CoV-AbDab. The heatmap displays the sensitivity of the model’s output predictions (y-axis) to specific mutations in the input sequence ( x -axis). Sensitivity is measured as the Frobenius norm of the change in predicted rate matrix, averaged over all possible mutations. Cyan squares denote the CDR regions for both chains.
Model
Expression
Binding
Koenig (H)
Koenig (L)
Adams
Koenig (H)
Koenig (L)
Shaneh. (119)
Shaneh. (120)
AbLang-2
+0.096
−0.127
−0.097
−0.090
−0.011
0.253
0.209
DASM
+0.596
+0.474
+0.270
+0.415
+0.327
0.450
0.536
PRISM
+0.069
+0.129
+0.297
+0.005
+0.061
0.348
0.286
ESM2-150M
+0.413
+0.485
−0.112
+0.112
+0.266
0.236
0.205
ESM2-650M
+0.326
+0.429
+0.124
+0.063
+0.265
0.227
0.360
Table 1: Comparison of deep protein models on VEP benchmarks across expression and binding landscapes as measured by Spearman correlation. The Koenig assays are split depending on which chain is mutated, denoted by (H) and (L) for the heavy and light chains respectively. To maintain the same sequence length across samples, the Shanehsazzadeh (Shaneh.) assay is split into two datasets with heavy chains of lengths 119 and 120. Best performing models are shown in bold ; second-best are underlined .
Figure 4: DMS evaluation results for CoSiNE across expression (green) and binding (purple) assays. A solid color indicates the log-likelihood, logpθ(y∣x,t) , and hatching indicates the selection score defined in Equation 5 , which utilizes Thrifty likelihoods to separate selection from neutral mutation.
Figure 5: Guided Gillespie consistently steers the predicted binding affinity of sampled leaf sequences. We plot the change in predicted binding affinity from the naive root sequence used to start sampling. Known SARS-CoV-1 binders are in red.
Figure 6: Antibodies sampled by CoSiNE under guidance ( γ=5 ) maintain high structural quality (AbodyBuilder3 pLDDT) and humanness (OASis). We compare against unguided leaf samples (black) and CoV-AbDab binders (red).
Method
Unique ↑
Edist
IntDiv ↑
OASis ↑
ΔBindmean↑
ΔBindmax↑
Noracle↓
Greedy*
0.996
5.00
6.21
0.807
0.385
0.466
2756
Genetic Algo.
0.991
4.47
7.30
0.789
0.196
0.363
4.81
AbLang-1 -PoE
0.999
4.97
7.71
0.849
0.167
0.390
0.58
ESM2 -PoE
1.000
4.98
8.47
0.802
0.149
0.355
0.58
CoSiNE (ours)
0.988
4.56
6.83
0.822
0.198
0.395
5.00
Table 2: Constrained CDR optimization of a SARS-CoV-1 binder. Each variant is limited to 5 mutations within the CDR regions and is generated using at most 5 oracle calls. Greedy * is exempt from the oracle-call budget and serves as a reference upper bound. Edist reports the mean edit distance from the seed sequence; IntDiv reports the mean pairwise edit distance between generated variants; Noracle reports the average number of oracle calls per generated sequence. Best results are bolded ; second-best underlined .
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9
Chain Length
Original Source
Assay Type
Dataset Name
Mutated Chain
Heavy
Light
Num. Seqs
Avg. Subs
Koenig et al. (2017)
Expression
Koenig Expression (H)
Heavy
120
108
2261
1
Koenig Expression (L)
Light
120
108
2014
1
Binding (VEGF)
Koenig Binding (H)
Heavy
120
108
2261
1
Koenig Binding (L)
Light
120
108
2014
1
Adams et al. (2016)
Expression
Adams
Heavy
117
112
2803
1.98
Appendix
Table S1: Overview of Deep Mutational Scanning (DMS) Datasets. Avg. Subs denotes the average number of amino acid substitutions per mutant relative to wildtype.
Figure S1 : Clonal Tree used for Guided Affinity Maturation Experiment in Section 5.4
Figure S2 : As ε increases, SNR-weighting (green) reduces the relative Frobenius norm error between the estimated and true rate matrices compared to unweighted MLE (blue), while the Full MLE (yellow) is constant.
Figure S3 : Gillespie samples are more consistent with the true transition probability distribution than samples from the factorized CoSiNE likelihood at all levels of epistasis. The difference increases smoothly with the epistasis strength ε in the underlying rate matrix. Ground truth matrix generation and estimation protocols are in Section B.1 .
Figure S4 : Gillespie sampling exhibits lower sampling error and better preserves evolutionary distances on real antibody clonal families. a) Comparison of sampling fidelity: Gillespie samples are closer (in Hamming distance) to the true held-out leaf sequence in 52.0% of cases, compared to 38.8% for the factorized matrix exponential. b, c) Correlation between the root-to-leaf Hamming distances of real versus simulated leaf sequences. Gillespie sampling (b) achieves a higher Pearson correlation ( r=0.62 ) with the observed evolutionary distances than the factorized matrix exponential (c) approach ( r=0.53 ).
Figure S5 : Per-site entropy across increasing branch lengths. Entropy profiles for branch lengths 0.01, 0.05, and 0.1 (top to bottom). Red bars denote CDRs. Entropy scales with branch length, showing higher mutational variability in CDRs.
Branch Length
WAG NLL
CoSiNE NLL
[0,0.01)
0.0717
0.0663
[0.01,0.05)
0.171
0.147
[0.05,0.15)
0.454
0.378
[0.15,∞)
0.836
0.676
Appendix
Table S2 : Comparison of WAG and CoSiNE per-token NLL on test transitions by branch length.
Model
Val NLL
Test NLL
WAG
1.170
1.200
LG+G4
1.139
1.168
CoSiNE
1.005
1.027
Appendix
Table S3 : Comparison of WAG, LG+G4, and CoSiNE per token NLL on held out transitions from TrRosetta.
Figure S6 : Analysis of CoSiNE scoring methods against log Enrichment Ratios for the Koenig DMS assay measuring expression (Light Chain). Left : Log-Likelihood performance ( ρ=0.439 ). Right : Selection Score performance ( ρ=0.509 ). Points are colored by the edit distance from wildtype codon to mutant codon. We assume the mutant codon is the one which requires the smallest number of nucleotide edits.
Model
Petersen (319-345)
Petersen (222-1C06)
AbLang-2
0.199
+0.060
DASM
0.395
+0.286
PRISM
0.312
−0.073
ESM2-150M
0.250
−0.139
ESM2-650M
0.278
+0.013
ProGen2-Small
0.329
+0.024
Appendix
Table S4 : VEP Performance of CoSiNE against baselines on Petersen binding datasets (Spearman).
Model
Expression
Binding
Koenig (H)
Koenig (L)
Adams
Koenig (H)
Koenig (L)
Shaneh. (119)
Shaneh. (120)
CoSiNE-Paired
0.613
0.508
0.464
0.456
0.371
0.498
0.536
CoSiNE-Single
0.545
0.509
0.234
0.390
0.375
0.504
0.549
Appendix
Table S5 : Comparison of CoSiNE on zero-shot VEP with both the heavy and light chains provided as context (Paired) versus just the chain with the mutations (Single). Blue indicates datasets with mutations on the heavy chain, and red indicates mutations on the light chain.
Model
Expression
Binding
Koenig (H)
Koenig (L)
Adams
Koenig (H)
Koenig (L)
Shaneh. (119)
Shaneh. (120)
AbLang-2
+0.153
−0.109
−0.096
−0.114
−0.108
0.263
0.166
DASM
0.688
+0.674
+0.221
+0.335
+0.316
0.458
0.518
PRISM
+0.055
+0.145
+0.243
−0.001
+0.000
0.346
0.251
ESM2-150M
+0.476
+0.539
−0.119
+0.044
+0.266
0.215
0.197
ESM2-650M
+0.384
+0.416
+0.097
+0.009
+0.243
0.191
0.308
Appendix
Table S6 : Comparison of deep protein models on VEP benchmarks across expression and binding landscapes as measured by Pearson correlation.
Figure S7 : Spearman correlation ρ between the CoSiNE selection score and experimental fitness evaluated over branch lengths t∈{0.01,0.1,0.2,0.3,0.4,10} . Expression assays are shown in green and binding assays are shown in purple.
Model
Expression
Binding
Koenig (H)
Koenig (L)
Adams
Koenig (H)
Koenig (L)
Shaneh. (119)
Shaneh. (120)
CoSiNE ( t=0.01 )
0.370
0.349
0.284
0.240
0.217
0.486
0.537
CoSiNE ( t=0.1 )
0.584
0.487
0.441
0.427
0.352
0.505
0.549
CoSiNE ( t=0.2 )
0.613
0.508
0.464
0.456
0.371
0.498
0.536
CoSiNE ( t=0.3 )
0.624
0.500
0.463
0.471
0.375
0.503
0.533
CoSiNE ( t=0.4 )
0.605
0.509
0.425
0.472
0.378
0.505
0.530
Appendix
Table S7 : Underlying Spearman correlation values for Figure S7 . CoSiNE results are bolded where they tie or exceed all non- CoSiNE baselines ( Table 1 ).
Model
Expression
Binding
Koenig (H)
Koenig (L)
Adams
Koenig (H)
Koenig (L)
Shaneh. (119)
Shaneh. (120)
DASM
0.596
0.474
0.270
0.415
0.327
0.450
0.536
ESM2-650M
0.326
0.429
0.124
0.063
0.265
0.227
0.360
ProGen2-Small
0.407
0.513
-0.024
0.098
0.332
0.119
0.070
CoSiNE-ESM2
0.613
0.508
0.464
0.456
0.371
0.498
0.536
CoSiNE-8M
0.503
0.474
0.447
0.363
0.330
0.508
0.531
Appendix
Table S8 : Ablation of the pretrained ESM2 backbone on VEP benchmarks. Spearman correlation ( ρ ) is reported across expression and binding datasets. Best performing models are shown in bold ; second-best are underlined .
Figure S8 : TAG guidance matches exact guidance performance with 500–900× speedup . (Left) Fitness improvements and (right) runtime comparison across branch lengths. No significant fitness differences ( p>0.05 ), but TAG is orders of magnitude faster.
Sequence Length ( L )
Guided Runtime (s)
Unguided Runtime (s)
50
5.16
3.54
100
5.94
3.51
250
8.53
3.51
500
12.20
3.65
Appendix
Table S9 : Runtime analysis of Guided vs. Unguided Gillespie sampling. Left: Runtime scaling by sequence length L with a fixed N=50 sampling steps. Right: Runtime scaling by sampling steps N with a fixed sequence length of L=100 .
Figure S9 : Guided affinity maturation results for additional naive antibody sequences using CoV-1 (top) and CoV-2 (bottom) oracles. We randomly selected naive IgM heavy sequences from the OAS database and recursively sampled down the tree in Figure S1 .
Antibody therapeutics are among the most successful modern medicines, yet computationally designing antibodies with desirable binding and developability properties remains challenging. While protein language models (pLMs) have emerged as powerful tools for antibody sequence design, existing approaches largely suffer from two key limitations: they predominantly memorize germline sequences rather than modeling biologically meaningful somatic variation, and they offer limited support for flexible classifier-guided conditional generation. We address these challenges through two primary contributions. First, we demonstrate that discrete diffusion fine-tuning achieves strong language modeling performance on antibody sequences while allowing for generation conditioned on any off-the-shelf classifier. Second, we introduce germline absorbing diffusion, a novel modification of the discrete diffusion noise process in which the germline sequence - rather than a masked sequence - serves as the absorbing state. This biologically motivated inductive bias restricts the model to learning the trajectory from germline to observed sequence, effectively excluding genetic variation and V(D)J recombination statistics from the learned distribution and dramatically mitigating germline bias. We show that germline diffusion improves non-germline residue prediction accuracy from 26 percent to 46 percent, approaching the theoretical upper bound set by true biological variability. We then demonstrate the utility of our germline diffusion model on the conditional generation tasks of sampling antibodies with improved hydrophobicity and predicted binding affinity. On both tasks our model shows an improved tradeoff between class adherence and sample quality, significantly outperforming EvoProtGrad, a popular strategy to sample from pLMs with gradient-based discrete Markov Chain Monte Carlo.
Justin Sanders, Luca Giancardo, Lan Guo +4
Paul G. Allen School of Computer Science and Engineering, University of Washington · ∗Work performed during internship at Amazon Web Services · Life Sciences, Amazon Web Services
Antibody design methods condition on antigen structure to generate complementarity-determining regions (CDR), yet a systematic evaluation of baseline methods reveals that they largely ignore the antigen input. We identify three failure modes that explain this behavior. Antigen blindness arises because models derive predictions from antibody framework context rather than antigen information, producing nearly identical CDRs regardless of the target. Vocabulary collapse reduces predicted amino acids to three to five per position, far below the ground truth distribution in native sequences. Moreover, any model trained with standard per-position cross-entropy converges to the positional marginal distribution, making it provably unable to produce antigen-specific sequence predictions. We propose a novel encoder-decoder architecture called AgForce, that uses a graph neural network (GNN) as the encoder and specialized decoders for sequence-structure co-design. Specifically, we apply framework dropout, gated bottlenecks, and hyperbolic cross attention that prevent the antibody shortcut path. In the decoder, a Mixture Density Network (MDN) sequence head with Potts-like pairwise coupling and annealed Multiple Choice Learning (aMCL) replaces the cross-entropy objective with a multi-component distribution whose optimal solution differs from the positional marginal. An antigen cycle consistency head routes gradients through the sequence decoder, forcing predicted distributions to encode antigen identity. AgForce achieves the best binding quality and sequence recovery simultaneously on the CHIMERA-Bench dataset, improving amino acid recovery by 8% over the strongest sequence baseline while surpassing the baselines across all interface metrics, and nearly doubling the effective vocabulary of GNN methods. The source code is available at: https://github.com/mansoor181/ag-force.git
Mansoor Ahmed, Murray Patterson
1Georgia State University, Atlanta, GA, USA · 2Georgia Institute of Technology, Atlanta, GA, USA
DuaDeep-SeqAffinity is a sequence-only deep learning framework that predicts antibody--antigen binding affinity directly from primary amino acid sequences, avoiding the cost and scarcity of resolved three-dimensional structures. The antigen and the antibody heavy and light chains are processed as three independent streams, each embedded with a frozen ESM-2 protein language model and passed through parallel Transformer and convolutional neural network (CNN) branches before late fusion, a decoupled design intended to preserve local complementarity-determining region (CDR) signal that monolithic encoders can dilute. On a sequence-disjoint split of the AbRank benchmark, the model achieves a Pearson correlation of 0.683, an R^2 of 0.460, and a pairwise ranking AUC of 0.895, significantly outperforming single-branch ablations (paired t-test, p < 0.05). Attention-map and gradient-based saliency analyses further show that the model preferentially attends to CDR loops and candidate epitope residues, supporting its use as a scalable, structure-free tool for high-throughput antibody screening.
Aicha Boutorh, Soumia Bouyahiaoui, Manel Kara Laouar +3
National School of Artificial Intelligence (ENSIA) Sidi Abdallah Campus, Algiers, Algeria · Lamine Debaghine University Hospital Center, CHU Bab El Oued, Algiers, Algeria