iGC: Antibody Optimization via Reinforcement Learning over a Learned Somatic Hypermutation Prior
Authors: Thao Nguyen, Robert G. Alberstein, Ewa Nowara, Homa MohammadiPeyhani, Holly R. Steach, Sarah A. Robinson, Yuval Shechter, Donald W. Lee, Jason A. Vander Heiden, Franziska Seeger, Andrew Leaver-Fay, Richard Bonneau, Joshua Yao-Yu Lin
Organizations: University of Illinois at Urbana-Champaign · Genentech · F. Hoffmann-La Roche Ltd.
Antibody affinity maturation is a natural optimization process in which B cells acquire mutations through somatic hypermutation (SHM), undergo selection for improved antigen binding, and iteratively evolve toward higher affinity. Computationally modeling this process requires capturing both biologically plausible mutations and antigen-specific selection. However, existing mutation models do not directly optimize binding, while affinity optimization often neglects realistic mutation trajectories. We introduce iGC (in silico Germinal Centers), a two-stage reinforcement learning (RL) framework for antigen-specific antibody optimization. Stage 1 learns an SHM mutation prior from parent-child pairs in B-cell lineage trees and adapts it to a target affinity-maturation dataset. Stage 2 initializes an RL policy from this prior and optimizes antigen binding with Kullback-Leibler (KL) regularization toward the frozen prior. To prevent reward exploitation, including repetitive high-reward substitutions and structurally tolerated framework mutations, we introduce a Reward-Tax Meta-Gradient objective. RewardNet smooths the affinity landscape, while TaxNet penalizes reward overexploitation, jointly defining a learned meta-reward for policy optimization. We evaluate iGC on mutation prediction, SHM consistency, affinity optimization, and mutation diversity. The mutation prior more than doubles the strongest baseline in mutation-site prediction. Following RL optimization, iGC maintains SHM sequence structure. It also achieves a strong exploration-exploitation balance, yielding competitive reward-diversity products across candidate-selection cutoffs. These results demonstrate that iGC integrates biologically plausible mutation generation with antigen-specific affinity selection, providing an in silico framework for iterative antibody affinity maturation.
Figures & tables
Figure 1: (a) Affinity maturation in germinal centers as a repeated mutation–selection process. (b) Structure of an antibody and the heavy-chain variable region (VH).
Figure 2: Overview of the two-stage iGC framework. Stage 1 learns and domain-adapts an SHM mutation prior, and Stage 2 optimizes the resulting policy for antigen binding while remaining regularized toward that prior. At inference, the learned policy optimizes an input antibody by rolling out successive mutations under a fixed mutation budget.
Figure 3: Reward landscape across antibody structural regions. (a) Raw GCReplay rewards are imbalanced across regions, driving hotspot and safe-region policy collapse. (b) The learned RTMG meta-reward smooths extreme peaks and produces a more balanced reward landscape.
Model
pos@1 ( ↑ )
pos@3 ( ↑ )
pos@5 ( ↑ )
aa@1 ( ↑ )
aa@3 ( ↑ )
aa@5 ( ↑ )
Joint ( ↑ )
S5F
2.433 ± 0.172
7.813 ± 0.293
12.237 ± 0.457
26.130 ± 0.569
64.310 ± 0.601
84.953 ± 0.331
0.637 ± 0.057
Thrifty
4.257 ± 0.183
10.633 ± 0.249
15.533 ± 0.230
32.777 ± 0.367
68.747 ± 0.450
86.813 ± 0.052
1.395 ± 0.066
DASM selection-only
1.070 ± 0.149
3.960 ± 0.163
6.947 ± 0.169
18.043 ± 0.548
38.497 ± 0.649
52.203 ± 0.790
0.194 ± 0.032
DASM (mutation × selection)
5.307 ± 0.058
13.133 ± 0.393
19.197 ± 0.382
40.561 ± 0.555
75.737 ± 0.365
89.435 ± 0.225
2.153 ± 0.052
DeepSHM
5.020 ± 0.302
11.747 ± 0.253
17.467 ± 0.299
38.850 ± 0.653
74.250 ± 0.644
88.470 ± 0.122
1.949 ± 0.105
iGC (Stage 1 pretraining)
11.929 ± 0.141
25.169 ± 0.217
33.836 ± 0.238
40.777 ± 0.323
75.552 ± 0.321
90.027 ± 0.188
4.864 ± 0.052
Table 1: Prediction accuracy of mutation position and amino acid identity for different SHM models. Joint accuracy is the fraction of examples where both the predicted mutation position and amino acid substitution are correct. Values are reported as mean ± standard error over three data splits. Arrows indicate the preferred direction for each metric.
Figure 4: Stage 1 SHM mutation prediction on the Tang test set: top-1 mutation-site accuracy (left), top-1 amino-acid accuracy (middle), and joint accuracy (right) for each model. Bars show the mean over three data splits (in %), with error bars indicating the standard error; values are the same as in Table 1 .
Top 100
Top 30
Top 20
Top 10
Model
DMS
#Dist
Prod
DMS
#Dist
Prod
DMS
#Dist
Prod
DMS
#Dist
Prod
SHMReplay
0.514
257.6
132.4
0.878
99.3
87.2
0.990
70.7
70.0
1.164
38.5
44.8
(0.018)
(2.3)
(5.3)
(0.033)
(1.5)
(3.4)
(0.040)
(0.7)
(3.1)
(0.047)
(0.4)
(1.7)
CoSiNE
0.019
195.3
3.7
0.990
70.4
69.7
1.155
50.0
57.8
1.372
27.5
37.7
(0.078)
(17.0)
(15.7)
(0.073)
(2.5)
(5.6)
(0.077)
(2.3)
(4.5)
(0.058)
(1.6)
(2.7)
Adapted SHM Prior
0.185
166.9
30.9
1.045
62.8
65.6
1.195
44.4
53.1
1.414
25.0
35.4
Table 2: Stage 2 benchmarking results averaged equally over mutation budgets k=2 to 7 , with the same number of generated sequences at each budget, and reported over three data splits. Each model’s mean row is followed by a parenthesized standard-deviation row across splits. DMS is mean reward, #Dist is the number of distinct mutation identities, and Prod=DMS×#Dist . Higher is better for all metrics. Bold and underlined Prod values denote the best and second-best means, respectively. ∗ denotes RL-based methods initialized from the Adapted SHM Prior.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
WRC
WA
GYW
Real mutation positions
26.9%
24.9%
18.7%
iGC predicted positions
57.0%
1.0%
11.1%
Random background
2.0%
19.4%
4.1%
Appendix
Table 3: Canonical SHM motif frequencies for the final iGC policy after Stage 2 fine-tuning.
k
Unseen positives rediscovered
Total unseen positives
Rediscovery rate
2
54
169
32.0%
3
41
375
10.9%
4
15
255
5.9%
Appendix
Table 4: Rediscovery of unseen positive-reward sequences in the held-out test set.
RewardNet input
Avg. DMS reward ( ↑ )
Avg. #distinct mut. ( ↑ )
cum_dms + pos_onehot
0.526
129.3
cum_dms + mut_count
0.743
116.6
cum_dms + mut_count + pos_onehot + region_onehot
1.134
108.0
Appendix
Table 5: RewardNet input selection. The chosen configuration is shown in bold.
Floor
Avg. DMS reward ( ↑ )
Avg. #distinct mut. ( ↑ )
−6.0
0.528
155.9
−5.5
0.263
178.1
−5.0
0.411
129.4
−4.5
1.142
106.3
−4.0
1.134
108.0
−3.5
0.880
127.1
Appendix
Table 6: TaxNet log sequence-score floor selection over mutation budgets k=1 to 7 . The selected floor is shown in bold.
Pipeline
pos@1
aa@1
joint
FR4%
CDR2%
P1: No Stage 1
0.296
0.417
0.124
7.4%
33.7%
P2: Stage 1 pretrain only
0.286
0.512
0.146
26.6% ‡
14.8%
P3: Full Stage 1
0.301
0.539
0.162
1.2%
21.6%
Appendix
Table 7: Pipeline ablation on GCReplay test set. FR4% and CDR2% are argmax region distributions; empirical rates are 1.4% and 26.7% respectively.
Figure 5: Mean attention weight per transformer layer as a function of relative sequence position to the predicted mutation site (position 0, dashed red), aggregated across the Tang BCR test set. Yellow bands highlight the ± 5 position window. All layers consistently attend most strongly to the local neighborhood of the mutation site, consistent with AID’s known short-motif targeting mechanism.
WRC
WA
GYW
Real mutation positions
26.9%
24.9%
18.7%
Adapted SHM Prior predicted positions
54.4%
1.8%
42.1%
Random background
2.0%
19.4%
4.1%
Appendix
Table 8: Canonical SHM motif frequencies for the Stage 1 Adapted SHM Prior.
Training phase
From-scratch
Scaled
AbLang2
(4.8M)
(14.3M)
(44.4M)
Stage 1: Tang pretraining
4.864%
4.86%
4.97%
Stage 1: GCReplay adaptation
15.62%
14.19%
15.87%
Stage 2: GCReplay RL
15.20%
9.47%
13.37%
Appendix
Table 9: Backbone ablation across training phases of the two-stage pipeline. Entries report joint@1 accuracy (%).
Figure 6: Stage 1 scaling law: test-set accuracy versus number of training trajectories for position (left), amino-acid (middle), and joint (right) prediction. Each point is a separate model trained on one PCP dataset (Ford, Rodriguez, Jaffe, Tang; the Jaffe point is labeled “Wyatt” in the right panel). Dashed lines are power-law fits acc=anb extrapolated beyond the largest dataset; fitted exponents are given in the legends.
Figure 7: Reward–tax meta-gradient (RTMG) architecture. RewardNet converts the measured DMS reward and mutation context into a learned benefit, while TaxNet penalizes recurrent or SHM-accessible sequence outcomes according to their evolutionary sequence-probability score. Their difference defines the meta-reward used for a differentiable update of the probe policy; feedback from the probe policy then trains the reward and tax networks to improve affinity while preserving mutation diversity. The deployed policy is updated using the resulting meta-reward.
Component
Hyperparameter
Value
RTMG objective
Entropy weight λH
3.0
Reward fidelity weight λR
1.0
Tax fidelity weight λT
1.0
Net-reward fidelity weight λnet
1.0
RewardNet cap CR
5.0
RewardNet pinned mean μreward
0.9937
Appendix
Table 10: Hyperparameters for the full RTMG model and mutation-policy Transformer.
Apr 13, 2026·Fan Xu, Zhi-an Huang, Haohuai He +5Learning to Rank
Department of Data Science and Artificial Intelligence, The Hong Kong Polytechnic University, Hong Kong SAR, China · Department of Computer Science, City University of Hong Kong (Dongguan), Dongguan, China · School of Computer Science and Engineering, Sun Yat-sen University, Guangzhou, Guangdong, China +1