TL;DR
Designing novel drugs requires optimizing molecules for target properties like high protein binding affinity, but generative models often break down when asked to generate values outside their training distribution. This paper introduces the Latent Prompt Transformer (LPT), a generative framework that models molecular strings and their chemical properties using a continuous latent prompt learned via a 1D UNet. Combined with an iterative Sampling with Gradual Distribution Shifting (SGDS) strategy, LPT sets a new state-of-the-art for single- and multi-objective binding affinity optimization.
What Problem Does This Paper Address?
Navigating chemical space to discover effective drug candidates is computationally challenging. Standard latent space generative models map discrete molecules into continuous vectors, optimize those vectors, and decode them back into molecular structures.
However, if you simply ask a model to produce a molecule with an extreme, highly desirable property (such as extraordinarily strong protein binding), the query falls far out of the training distribution. This out-of-distribution (OOD) extrapolation often leads to nonsensical or chemically invalid molecules. The authors aim to design a model architecture that scales efficiently to complex sequence data and can progressively navigate toward extreme target property values without succumbing to OOD hallucinations.
Methods
The framework consists of two main parts: the Latent Prompt Transformer (LPT) architecture and a distribution-shifting algorithm.
[ Gaussian Noise z0 ] ──( 1D UNet )──> [ Latent Prompt z ]
│
┌─────────────────────────────────┴─────────────────┐
▼ ▼
[ Multi-Layer Perceptron ] [ Causal Transformer ]
│ │
▼ ▼
Predicted Property (y) SELFIES Tokens (x)
- Latent Prompt Transformer (LPT):
- Prior Distribution: Instead of an unconstrained latent space, a latent vector $z$ is parameterized via an expressive neural transport: $z = U_\alpha(z_0)$, where $z_0 \sim \mathcal{N}(0, I_d)$ passes through a 1D UNet.
- Molecular Generator: A 3-layer causal Transformer takes $z$ as a continuous "latent prompt" via cross-attention, autoregressively decoding 100% chemically valid SELFIES string tokens.
- Property Predictor: A 3-layer MLP performs non-linear regression directly on $z$ to estimate scalar chemical or biological properties $y$.
- Inference and Training: Training follows a two-stage approach: first pre-training on molecules alone, then fine-tuning jointly with properties. Training uses approximate maximum likelihood via short-run Langevin dynamics (an MCMC sampling method) to infer the posterior over the latent vector.
- Sampling with Gradual Distribution Shifting (SGDS):
- To avoid OOD generation, the model initializes a dataset with top-performing molecules from a baseline set.
- At each iteration $t$, target properties are incremented by a tiny step $\Delta y$. The model generates new molecules conditioned on this slightly shifted property, scores them using ground-truth simulators (e.g., AutoDock-GPU), updates the top-$n$ dataset, and re-trains the model to catch up.
Datasets
- Pre-training / Training: The ZINC dataset (250,000 drug-like molecules).
- Property Benchmarks:
- Target property scores were calculated with standard computational tools: RDKit for drug-likeness (QED), synthetic accessibility (SA), and penalized logP.
- AutoDock-GPU for molecular docking dissociation constants ($K_D$) against two human target proteins:
- Human estrogen receptor (ESR1).
- Human peroxisomal acetyl-CoA acyl transferase 1 (ACAA1).
Key Insights and Ideas
- Latent Vectors as Prompts: By injecting the latent vector $z$ directly through cross-attention into a causal Transformer, the latent code acts as a persistent soft prompt influencing every autoregressive step, yielding stronger sequence modeling than prior recurrent models (like LSTMs).
- Direct UNet Transport Avoids EBM Complexity: Prior work (Kong et al., 2023) used a latent Energy-Based Model (EBM), requiring Langevin dynamics during prior sampling. By defining the prior as an explicit 1D UNet mapping from white noise, LPT simplifies prior sampling while maintaining high expressiveness.
- Continuous "Closed-Loop" Extrapolation: The SGDS pipeline treats generation as an active feedback loop. By verifying generated samples with simulation software and immediately fine-tuning, the generative boundary moves dynamically without drifting into invalid chemical regions.
Key Results
The method was evaluated against leading molecule generation baselines including GCPN, MolDQN, MARS, GraphDF, LIMO, and LEBM-SGDS:
- Single-Objective Optimization ($K_D$ in nmol/L, lower is better):
- ESR1: LPT-SGDS reached top-3 $K_D$ scores of 0.004 nM, 0.005 nM, and 0.014 nM, significantly outperforming the previous best (LEBM-SGDS at 0.03 nM; baseline GCPN at 6.4 nM).
- ACAA1: LPT-SGDS achieved top-3 scores of 0.037 nM, 0.046 nM, and 0.084 nM (compared to LEBM-SGDS at 0.11 nM; GCPN at 75 nM).
- Multi-Objective Optimization (Binding Affinity + QED $\ge 0.4$ + SA $\le 5.5$):
- For ESR1, LPT-SGDS maintained high drug-likeness (QED = 0.46–0.60) and synthetic feasibility (SA = 3.24–5.02) while achieving a $K_D$ of 0.05 nM (compared to standard drugs like Tamoxifen at $87\text{ nM}$).
- For ACAA1, it maintained high property scores with top-2 average $K_D$ values of 0.06 nM and 0.08 nM, far surpassing LEBM-SGDS (4.55 nM).
Limitations and Future Work
- Surrogate Docking vs. In Vitro Validation: The ground truth used in experiments relies entirely on computational docking proxies (AutoDock-GPU). Docking simulations do not always perfectly translate to wet-lab biological binding assays.
- Computational Cost: Although lightweight in total parameter count (~4.33M parameters), the iterative MCMC posterior sampling and online querying of docking software across 25 shift iterations requires around 42 total GPU hours on an NVIDIA A6000.
- Generalization Beyond Sequences: The authors note that the core formulation of LPT and SGDS can be applied to general online black-box optimization problems across science and engineering where solutions can be represented as sequences (or adapted beyond tokenized string structures).
Summary updated