Fragment-based molecular generation by masked discrete diffusion over SAFE strings, covering de novo design, linker design, and lead optimization.
A SMILES string linearizes a molecular graph by depth-first traversal, so the atoms of one chemically meaningful fragment can end up scattered across the sequence — awkward for what medicinal chemists actually do, which is hold a known active substructure fixed and rebuild the chemistry around it. Sequential Attachment-based Fragment Embedding (SAFE) repairs this: a molecule becomes a dot-separated sequence of BRICS fragment blocks with explicit attachment points, each fragment a contiguous span. An autoregressive model reading that string left to right, though, reimposes exactly the ordering SAFE was built to remove.
GenMol, from NVIDIA with KAIST, instead trains a masked discrete diffusion model over SAFE strings and decodes them non-autoregressively. Generation is an unmasking process: starting from a sequence of mask tokens, the model predicts all of them at once under bidirectional attention, commits only the most confident predictions, and repeats. Any subset of the string can therefore be pinned while the rest is filled in, so one checkpoint covers the whole fragment-constrained family without task-specific fine-tuning, and de novo generation is the case where everything is masked.
The same mechanism supplies an optimization strategy. Fragment remasking replaces one fragment of a molecule with a mask chunk and regenerates it, a random walk through chemical space whose step is a fragment rather than an atom — the unit chemists reason about, and the unit that carries the property being optimized. Scoring the results against an oracle and folding high scorers back into the vocabulary turns the frozen checkpoint into a hit generator and lead optimizer.
GenMol is an 89M-parameter BERT encoder in the HuggingFace Transformers default configuration, changed only in its 256-token position limit and the SAFE tokenizer's 1,880-token vocabulary. It trains under the masked diffusion NELBO — a weighted average of masked-language-model losses across diffusion times — on the SAFE corpus of ZINC and UniChem molecules, roughly 1.1 billion strings of which 945 million form the training split, for 50,000 steps at batch size 2,048: about five hours on eight A100 GPUs.
On de novo generation it reaches 100% validity, 99.7% uniqueness, and 84.6% quality — the share of molecules that are valid, unique, drug-like (QED ≥ 0.6) and synthesizable (SA ≤ 4) — against 54.7% for the autoregressive SAFE-GPT baseline, while sampling faster. On PMO it reaches a summed top-10 AUC of 18.362 across 23 oracles under a 10,000-call budget, leading on 19, ahead of f-RAG at 16.928 and Genetic GFN at 16.213; ablations attribute 0.567 of that sum to fragment remasking and molecular context guidance. Lead optimization improves docking on 26 of 30 seed-target pairs across parp1, fa7, 5ht1b, braf, and jak2. The V2 checkpoint raises de novo quality to 89.7% and improves every fragment-constrained task, but scores lower on PMO (17.943) and lead optimization (80.0% versus 86.7%), where remasking edits too small a span to benefit.
One deployed model serves a whole discovery pipeline: enumerate drug-like starting points,
hold a hit's core scaffold while growing substituents at named attachment points, then
optimize a lead against a docking oracle under a Tanimoto similarity constraint — without
swapping architectures between stages. NVIDIA distributes the genmol_v1 and genmol_v2
checkpoints on NGC and serves V2 as a BioNeMo NIM microservice with an OpenAPI endpoint,
reachable from the research code or a self-hosted container.
GenMol shows that masked discrete diffusion, developed for text, transfers to fragment-based molecular design, and that it buys generality rather than speed alone: constrained generation, unconstrained generation, and optimization become one operation on one set of weights. Its PMO score is now a standard reference point for later fragment-based generators such as InVirtuoGen. Every result is in-silico — PMO oracles and docking scores, not assays — and docking is a weak proxy for binding. Unmasking more than one token per step degrades quality, bounding the parallel-decoding speedup. The split: the code is Apache-2.0 while the weights fall under the NVIDIA Open Model License, which is not OSI-approved, and the NIM container carries separate terms.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.