Sample Efficient Generative Molecular Optimization with Joint Self-Improvement

Serra Korkmaz, Adam Izdebski, Jonathan Pirnay, Rasmus Møller-Larsen, Michal Kmicikiewicz, Pankhil Gawade, Maksim Pavlov, Dominik G. Grimm, Ewa SzczurekNeurIPS 2026

TL;DR

Finding a new drug molecule is like searching for a microscopic needle in a universe-sized chemical haystack—where every single glance costs thousands of dollars in lab tests. This paper introduces Joint Self-Improvement (JSI), an AI framework that pairs molecule generation and property prediction inside a single brain, then uses clever inference-time steering to hunt down high-performing compounds on a shoestring evaluation budget. Remarkably, it can design potent new antimicrobial peptides even when its training dataset contains zero successful examples.

What Problem Does This Paper Address?

Generative molecular optimization (GMO) uses AI to design brand-new molecules with specific, desirable traits—like binding tightly to a disease-causing protein while remaining easy to synthesize. Because testing candidates requires expensive wet-lab experiments or heavy physics simulations (known as querying the "oracle"), sample efficiency—finding winners in as few tests as possible—is everything.

Currently, Reinforcement Learning (RL) dominates this space: a chemical language model generates molecules and gets rewarded when it stumbles upon a good one. Here is the catch: good molecules are astronomically rare. Early in training, an RL model mostly generates duds, starving itself of the positive feedback needed to learn.

Furthermore, real-world drug discovery is often offline: you cannot run new lab tests mid-training, so you train a "surrogate" predictor on an existing static dataset to stand in for the lab. If you run sample-inefficient RL against an imperfect surrogate for too long, the generator learns to exploit the predictor's blind spots—a trap called overoptimization, where predicted scores skyrocket while actual real-world quality plummets.

Methods

JSI sidesteps standard RL headaches by combining two core ideas: a unified architecture and test-time steering.

Figure 1: Overview of JSI. In the offline setting, a joint generative-predictive model, with a lan- guage modeling (LM) head for next-token probability prediction and a predictive head for property prediction, is fine-tuned on an offline dataset of molecules and their property scores, and the model self-improves by iteratively biasing next-token probabilities (blue) using predicted property scores (green), steering generation towards high-scoring molecules at inference time. In the online setting, ground-truth oracle evaluations are used in place of the predictive head.
  1. A Joint Generative-Predictive Model: Building on the Hyformer backbone, JSI uses a single Transformer with shared parameters, topped with two heads: an autoregressive language modeling head to generate molecular sequences token-by-token, and a predictive head to estimate property scores. Training both simultaneously via a joint likelihood-based loss gives stable gradients (no waiting around to sample rare winners) and naturally aligns the generator's chemical intuition with the predictor's worldview.
  2. Inference-Time Self-Improvement (What's New): Instead of relying on naive rejection sampling—which stays stuck in safe, familiar regions of chemical space—JSI actively steers generation at test time. It uses Stochastic Beam Search (with the Gumbel-Top-$k$ trick) to sample $K$ distinct molecules without replacement. It then scores these completed sequences—using real oracle calls in the online setting, or its own predictive head in the offline setting—to calculate a global advantage (how much better a molecule is than the batch average). Finally, it iteratively tilts the model's next-token probabilities toward those high-scoring branches, pushing exploration into promising, low-density territory.

Datasets

  • Small Molecule Docking: A pre-trained backbone on ZINC250K, evaluated on docking score optimization across five standard protein targets (PARP1, FA7, 5HT1B, BRAF, and JAK2) under drug-likeness (QED) and synthetic accessibility (SA) constraints. In the offline setup, models only see 1,500 randomly sampled ZINC molecules.
  • Antimicrobial Peptides (AMPs): A backbone pre-trained on 3.5M general peptides and 1M AMPs, fine-tuned on an offline dataset of 3,444 peptides with Minimum Inhibitory Concentration (MIC) values against E. coli. To test extreme data scarcity, the authors introduce a tough new benchmark variant: imbalanced subsets where active "hit" peptides are restricted to just 1% (13 peptides) or 0% (zero hits).

Key Insights and Ideas

  • Shared brains prevent surrogate hallucinations: Decoupling the generator and predictor (e.g., pairing the generator with a standalone Chemprop network) causes offline performance to plummet. Sharing parameters keeps the generator anchored to regions where the surrogate actually knows what it's talking about.
  • Test-time steering avoids error accumulation: Because offline JSI steers probabilities at inference time rather than permanently warping weights over thousands of RL steps, surrogate errors don't snowball into catastrophic overoptimization.
  • Extrapolating from zero winners: By treating peptide activity as continuous regression rather than binary "hit/no-hit" labels, JSI learns the direction of improvement from mediocre molecules alone—allowing it to generate potent hits even when trained on 0% active compounds.

Key Results

Under a strict budget of 3,000 oracle evaluations, JSI outperforms state-of-the-art methods across all tasks:

Figure 3: Hit ratio versus oracle budget across five protein targets. Curves show the mean across 10 seeds for JSI (purple) and SATURN (gray); shaded regions indicate ±1 standard deviation over seeds.
  • Online Docking: JSI beats 14 baselines on all five targets. On challenging targets like FA7 and BRAF, JSI achieves Hit Ratios of 36.6% and 58.5%, decisively topping the reigning champion SATURN (14.5% and 39.0%) while requiring far fewer oracle calls to find its first 100 hits.
  • Offline Docking: Given 1,500 pre-evaluated molecules and 1,500 test evaluations, JSI leads across the board—for instance, doubling the strong RaM baseline on BRAF (21.6% vs. 10.7%).
  • Offline AMP Optimization: Under a 1,000-sequence budget, JSI achieves an 0.84 score on the strict $\text{HydrAMP}_{\text{MIC}}$ oracle (beating Hyformer's 0.78). In the 0% hits regime, JSI still scores 0.66, more than tripling Hyformer's 0.17.

Limitations and Future Work

  • Surrogate degradation out-of-distribution: While the predictive head correlates well with ground truth on held-out data, accuracy still degrades as JSI pushes deep into novel chemical space. Building more robust offline surrogates remains an open frontier.
  • The diversity trade-off: Aggressively biasing generation toward high scores narrows the model's focus, resulting in slightly lower internal structural diversity compared to unsteered sampling or SATURN. Explicitly controlling this quality-diversity knob is left for future work.

Summary updated

Abstract

Generative molecular optimization aims to design molecules with properties surpassing those of existing compounds. However, evaluating candidate molecules is expensive, so sample efficiency, i.e., generating optimized molecules within a fixed evaluation budget, is essential. Moreover, in the offline setting, where a surrogate model approximates candidate evaluation, sample inefficiency compounds with surrogate error, further limiting performance. To address these challenges, we introduce Joint Self-Improvement (JSI), a framework for sample-efficient online and offline molecular optimization. JSI combines **(i) a joint generative-predictive model** trained via a joint likelihood-based loss, which aligns molecule generation and surrogate modeling, and **(ii) inference-time self-improvement**, which iteratively biases the generative component of the joint model toward higher-scoring molecules, using direct objective function evaluations in the online setting and the predictive component in the offline setting. Experiments across docking score optimization in both online and offline settings, as well as antimicrobial peptide optimization, demonstrate that JSI outperforms state-of-the-art methods under limited evaluation budgets. Code is available at https://github.com/szczurek-lab/jsi.
BibTeX
@inproceedings{korkmaz2026sample,
  author = {Serra Korkmaz and Adam Izdebski and Jonathan Pirnay and Rasmus Møller-Larsen and Michal Kmicikiewicz and Pankhil Gawade and Maksim Pavlov and Dominik G. Grimm and Ewa Szczurek},
  title = {{Sample Efficient Generative Molecular Optimization with Joint Self-Improvement}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=y7uiomPrHK},
}
Figure