One Sequence, Many Decodings: CAGenMol-2 Recasts Drug Design as Masked Molecular Inference
Organizations: The Hong Kong University of Science and Technology (Guangzhou) · Jinan University, Guangzhou
Abstract
Drug design couples property evaluation, conditional generation, structure-based design, and local optimization, yet machine learning systems typically address these capabilities with separate task-specific models. We introduce CAGenMol-2, a masked diffusion molecular language model that represents molecules, continuous scalar properties, and 3D protein pockets within a single wrapped sequence. Within this pretrained interface, downstream operations are selected by which sequence regions are observed or masked at inference, allowing one checkpoint to perform property prediction, property- and pocket-conditioned generation, and partial-constraint design without task-specific architectures or backbone fine-tuning. We further propose Adaptive Fragment Optimization (AdaFO), a gradient-free mask-and-refill search that turns the masked decoder into an iterative local molecular optimizer. On CrossDocked2020, AdaFO increases Success Rate from 30.2% to 70.8%, the best reported under this protocol, while largely preserving drug-likeness and diversity. Finally, scaffold-preserving directional editing and CRBN/VHL case studies demonstrate its use in compound design workflows spanning local molecular editing, structure-based prioritization, and downstream simulation-based screening.
Figures & tables
| Property | Hit-ID | Hit-OOD | MAE-ID | MAE-OOD | Shift |
|---|---|---|---|---|---|
| logP | 0.96 | 0.86 | 0.13 | 0.27 | +1.07 |
| MW | 0.93 | 0.47 | 0.14 | 0.95 | +0.59 |
| QED | 0.81 | 0.68 | 0.31 | 0.46 | +1.27 |
| SA | 0.94 | 0.89 | 0.20 | 0.25 | +1.58 |
| MR | 0.84 | 0.69 | 0.21 | 0.43 | +0.92 |
| Mean | 0.89 | 0.72 | 0.20 | 0.48 | +1.09 |
| Method | Macro | Macro Pearson |
|---|---|---|
| Morgan + GBR | 0.525 | 0.720 |
| GIN + GBR | 0.219 | 0.550 |
| GIN + MLP | 0.477 | 0.678 |
| ChemBERTa + MLP | 0.762 | 0.880 |
| CAGenMol-2 (native) | 0.910 | 0.974 |
| Property | Full MAE | Top-25% MAE | Relative drop |
|---|---|---|---|
| logP | 0.235 | 0.167 | 29.1% |
| MW | 3.89 | 2.10 | 46.0% |
| QED | 0.036 | 0.014 | 59.9% |
| SA | 0.364 | 0.223 | 38.9% |
| MR | 0.981 | 0.683 | 30.3% |
| Method | BBBP | Tox21 | HIV | ESOL | Lipo |
|---|---|---|---|---|---|
| ChemBERTa3 | 0.758 | ||||
| GenMol | 0.725 | ||||
| CAGenMol-2 | 0.931 | 0.789 | 0.792 |
| Method | Vina | HA (%) | QED | SA | Div | SR (%) |
|---|---|---|---|---|---|---|
| Reference | -7.45 | – | 0.48 | 0.73 | – | 25.0 |
| Pocket2Mol | -7.15 | 48.4 | 0.56 | 0.74 | 0.69 | 24.4 |
| DecompDiff | -8.39 | 64.4 | 0.45 | 0.61 | 0.68 | 24.5 |
| MolCRAFT | -9.25 | 59.1 | 0.46 | 0.62 | 0.61 | 36.1 |
| RGA + Vina | -8.01 | 64.4 | 0.57 | 0.71 | 0.41 | 46.2 |
| DecompOpt | -8.98 | 73.5 | 0.48 | 0.65 | 0.60 | 52.5 |
Appendix figures & tables37 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| SAFE token sequence of a molecule, length | |
| raw / -normalised value of property | |
| number of scalar property slots | |
| diffusion time ( clean, fully masked) | |
| survival probability at time | |
| mask token |
| Slot | Mol-only position | Pocket position |
|---|---|---|
| pocket ( ) | — | |
| logP | ||
| MW | ||
| QED | ||
| SA | ||
| MR |
| Property | Mean | Std |
|---|---|---|
| logP | ||
| MW | ||
| QED | ||
| SA | ||
| MR |
| Group / parameter | Value |
|---|---|
| Backbone | |
| layers / hidden / heads | / / |
| intermediate size | |
| activation | GELU |
| dropout (hidden / attn) | / |
| max position / vocab | / |
| Method / | Validity | Uniqueness | Quality | Diversity |
|---|---|---|---|---|
| SAFE-GPT | ||||
| GenMol w/o conf. | ||||
| GenMol ( ) | ||||
| Prop | Target (label) | mean std | MAE | bias | hit | shift |
|---|---|---|---|---|---|---|
| logP | (ood-lo) | |||||
| logP | (p10) | |||||
| logP | (p50) | |||||
| logP | (p90) | |||||
| logP | (ood-hi) | |||||
| MW | (ood-lo) |
| Combo | Targets | valid/500 | joint hit | regime |
|---|---|---|---|---|
| Lipinski | logP 2.5, MW 350, QED 0.75 | 497 | ID | |
| Lead-like | QED 0.7, SA 2.5 | 500 | ID | |
| Big-lipo | logP 5, MW 550, QED 0.5, SA 4 | 493 | OOD | |
| Tiny-drug | MW 200, QED 0.85 | 495 | OOD |
| hit@ | MAE | validity | |
|---|---|---|---|
| Method | Metric | logP | MW | QED | SA | MR | Macro |
| CAGenMol-2 | MAE | — | |||||
| RMSE | — | ||||||
| Pears. | |||||||
| ChemBERTa+MLP | MAE | — | |||||
| Prop | RMSE/ std | Top-50% (rel. drop) | Top-25% (rel. drop) |
|---|---|---|---|
| logP | ( ) | ( ) | |
| MW | ( ) | ( ) | |
| QED | ( ) | ( ) | |
| SA | ( ) | ( ) | |
| MR | ( ) | ( ) |
| Classification (ROC-AUC ) | |||||||
|---|---|---|---|---|---|---|---|
| Method | BACE | BBBP | ClinTox | SIDER | Tox21 | HIV | MUV |
| D-MPNN | |||||||
| AttentiveFP | |||||||
| GROVER | |||||||
| MolCLR | |||||||
| GEM | |||||||
| Metric | Baseline | AdaFO | |
|---|---|---|---|
| Vina (kcal/mol) | |||
| High Affinity (%) | |||
| Success Rate (%) | |||
| QED | |||
| SA (norm) | |||
| Diversity |
| Setting | Vina | SR (%) | Diversity |
|---|---|---|---|
| Full AdaFO | |||
| annealing | |||
| MMR | |||
| elite |
| Vina | SR (%) | QED | SA | |
|---|---|---|---|---|
| Config | Random-span SR/Sim | AdaFO-S SR/Sim |
| QED | 34 / 0.81 | 40 / 0.78 |
| QED | 28 / 0.76 | 24 / 0.79 |
| QED | 44 / 0.78 | 42 / 0.75 |
| QED | 66 / 0.64 | 72 / 0.60 |
| SA | 8 / 0.92 | 10 / 0.91 |
| SA | 56 / 0.73 | 62 / 0.70 |
| DIR-only % | Sim | |||||
|---|---|---|---|---|---|---|
| Axis | Rand | AdaFO-S | Rand | AdaFO-S | Rand | AdaFO-S |
| QED | 12.5 | 33.3 | 0.21 | 0.50 | 0.82 | 0.65 |
| QED | 32.7 | 81.2 | 0.27 | 0.74 | 0.81 | 0.64 |
| SA | 51.1 | 91.4 | 0.33 | 0.44 | 0.79 | 0.67 |
| SA | 29.8 | 59.1 | 0.31 | 0.67 | 0.76 | 0.58 |
| logP | 47.9 | 100.0 | 0.16 | 0.52 | 0.81 | 0.63 |
| ID | BSA | Polar contact | RMSD | Ref. sim. | QED | Raw SA | ||
|---|---|---|---|---|---|---|---|---|
| 11 | -26.73 | 2.99 | 0.992 | 0.95 | 8.1 | 0.143 | 0.648 | 3.89 |
| 2 | -24.13 | 5.59 | 1.04 | 0.96 | 11.18 | 0.143 | 0.754 | 2.67 |
| 10 | -24.12 | 5.6 | 0.987 | 0.89 | 13.48 | 0.145 | 0.763 | 3.24 |
| 22 | -22.52 | 7.2 | 0.97 | 0.69 | 9.02 | 0.15 | 0.748 | 3.19 |
| 25 | -22.52 | 7.2 | 0.996 | 0.91 | — | 0.129 | 0.922 | 2.92 |
| 29 | -21.78 | 7.94 | 0.873 | 0.82 | — | 0.143 | 0.826 | 3.46 |
| ID | BSA | Polar contact | RMSD | Ref. sim. | QED | Raw SA | ||
|---|---|---|---|---|---|---|---|---|
| 35 | -27.01 | 3.57 | 0.934 | 0.99 | 3.41 | 0.105 | 0.558 | 3.09 |
| 13 | -26.69 | 3.89 | 0.953 | 0.94 | 4.26 | 0.133 | 0.729 | 3.17 |
| 6 | -25.15 | 5.43 | 0.889 | 0.98 | 3.38 | 0.102 | 0.771 | 2.92 |
| 4 | -24.3 | 6.28 | 0.876 | 1 | 4.37 | 0.124 | 0.503 | 3.04 |
| 40 | -23.89 | 6.69 | 0.901 | 0.99 | 3.89 | 0.108 | 0.745 | 2.23 |
| 23 | -22.56 | 8.02 | 1.043 | 0.79 | 4.44 | 0.119 | 0.439 | 4.12 |