Paper commentary
GenMol: A Drug Discovery Generalist with Discrete Diffusion
GenMol uses one discrete diffusion model for many drug discovery tasks
- Problem Existing molecular generators cover only one or two drug discovery tasks. Their left-to-right decoding also fits molecules poorly, since SAFE strings have no fixed token order.
- Method GenMol uses one masked discrete diffusion model over SAFE sequences. Unlike left-to-right GPT, it predicts all masked tokens in parallel, then regenerates masked fragments.
- Results GenMol reaches 84.6 ± 0.8 quality in de novo generation, against 54.7 ± 0.3 for SAFE-GPT.

Figure 2 | (a) GenMol architecture.GenMol adopts the BERT architecture and is trained with the NELBO loss of masked discrete diffusion.(b) Generation process of GenMol.Under masked discrete diffusion, GenMol completes a molecule by simulating backward in time and predicting masked tokens at each time step𝑡 until all tokens are unmasked.(c) Illustration of various drug discovery tasks that can be performed by GenMol.GenMol is endowed with the ability to easily perform (c1)de novo generation, (c2-c5) fragment-constrained generation, and (c6) fragment remasking that can be applied to goal-directed hit generation and lead optimization.
Original paper · CC BY 4.0 · Seul Lee, Karsten Kreis, Srimukh Prasad Veccham, Meng Liu, Danny Reidenbach, Yuxing Peng, Saee Paliwal, Weili Nie, Arash Vahdat · GenMol: A Drug Discovery Generalist with Discrete Diffusion · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why one generator rarely covers the pipeline
Drug discovery runs in stages, from hit generation to lead optimization, and each stage asks something different of a generator. Fragment-constrained molecule generation is a popular strategy that keeps a known substructure with a particular bioactivity while designing the rest of the molecule. A drug discovery process that leads to drug candidates able to enter clinical trials has to consider all of these different scenarios.
Earlier molecular generators usually covered only one or two of these scenarios. Covering more tasks meant retraining a specific architecture for each task, or making other expensive modifications. SAFE-GPT was proposed to cover several of these tasks by formulating them as fragment-constrained generation solved by sequence completion. Sequence-based representations such as SMILES and SAFE assume a token order set by heuristic rules like depth-first search, so a left-to-right GPT model is unnatural for them.
The autoregressive decoding scheme limits computational efficiency, and it makes guidance hard to add during generation. SAFE-GPT also relies on finetuning under expensive reinforcement learning objectives to handle goal-directed molecule generation. SAFE is permutation-invariant on fragments, so the order of fragments in a SAFE string doesn't change the molecular identity.
That order-insensitivity is a poor match for a generator that must commit to one token order at a time.
One diffusion model over SAFE strings
GenMol replaces the left-to-right decoder with masked discrete diffusion over SAFE sequences. The denoiser is the BERT architecture, so every token attends to the full sequence in both directions. The authors expected this to suit SAFE well, because a SAFE string is fragment order-insensitive. SAFE strings are permutation-invariant on fragments, so the order of fragments within a string doesn't change the molecular identity.
A GPT-style model must still impose a left-to-right order that the molecule itself doesn't have. The training scheme follows MDLM, which the authors use to define the masked diffusion.
The authors name three practical benefits that follow from this design. Bidirectional context lets the model use molecular context without a fixed generation order. Parallel decoding fills several masked positions at once, which speeds up sampling. In the paper's own sampling, the model confirms the top-N confident predictions at each time step, where N is the number of tokens to unmask.
Discrete diffusion also makes a remasking strategy possible, and remasking is the main exploration tool in the paper. Fragment remasking replaces fragments in a given molecule with masked tokens, and diffusion then generates new fragments. Discrete diffusion further allows guidance computed from the entire sequence, which becomes MCG.
How masked diffusion fills in tokens
Each SAFE token is a one-hot vector over K categories, and the K-th category stands for the mask token. The forward process mixes each clean token with the mask token through a masking ratio alpha_t that falls from 1 at t = 0 to 0 at t = 1. Formally, q(z_t^l given x^l) equals Cat(z_t^l; alpha_t x^l + (1 - alpha_t) m), so at time t = 1 every token becomes masked.
The corruption is applied to each position independently, so the forward process never looks at neighbouring tokens.
The reverse process runs the other way and infers each token of the less masked sequence z_s from the more masked sequence z_t, with s < t. The denoising network x_theta takes the partly masked sequence and the time step as input and predicts L probability vectors for the clean sequence. The reverse step is built so that it does not change tokens that are already unmasked.
GenMol is trained with the NELBO loss, which the paper describes as a weighted average of masked-token cross-entropy losses over time steps.
At each masked index l, GenMol samples z_s from the reverse unmasking distribution, with logits divided by the softmax temperature tau. All masked tokens are predicted in parallel rather than one after another, which removes the left-to-right ordering that GPT needs. GenMol keeps the top-N most confident predictions per step, where N is the number of tokens unmasked at each time step, and adds randomness r following Chang et al.
(2022). A lower tau sharpens the predicted distribution, while the randomness r and tau together let users trade molecular quality against diversity.
Fragment remasking in practice
Token-level remasking looks like the obvious move, but each SAFE token stands for a single atom or bond. Masking one token at a time produces localized and ineffective exploration, so the authors chose fragments as the unit of change. The authors argue that fragments or functional groups carry the molecular properties, so re-predicting a fragment modifies a molecule in a chemically meaningful way.
Before any remasking, GenMol builds a fragment vocabulary from a set of molecules with known target properties. Each fragment f_k receives the average target property of all molecules that contain it, following Lee et al. (2024a). The score is y(f_k) = (1/|S(f_k)|) times the sum of y(x) over x in S(f_k), where S(f_k) is the set of molecules containing f_k as a subgraph.
The top-V fragments by this score form the vocabulary.
A molecule starts as x_init, built by randomly selecting two fragments from the vocabulary and attaching them. Next, GenMol replaces one fragment of x_init with a mask chunk, so x_mask has the masked region. The chunk length is sampled from the fragment-length distribution of the training set instead of a fixed value. The diffusion model then unmasks the chunk to produce x_new, which is decomposed and scored, and the vocabulary is updated with its fragments.
Because the vocabulary grows with new fragments, the search can move beyond the starting fragments, as the Figure 3 loop shows over iterations.

Figure 3 | (a) Goal-directed hit generation and lead optimization process with GenMol.An initial fragment vocabulary is constructed by decomposing an existing molecular dataset (hit generation) or a seed molecule (lead optimization). Two fragments are randomly sampled from the vocabulary and attached, and GenMol performs fragment remasking. The fragment vocabulary is updated with the generated molecules for the next iteration.(b) Illustration of the molecular optimization trajectory with fragment remasking.With fragment remasking, GenMol can explore beyond the initial fragment vocabulary to find chemical optima.
Original paper · CC BY 4.0The authors also read this loop as Gibbs sampling over fragments. A fragment index is picked uniformly, and that fragment is resampled from its conditional given the other fragments. This makes the walk stay in the neighborhood of the given molecule, so fragment remasking acts as a random walk around the seed.
Molecular context guidance
Classifier-free guidance extrapolates between two predictions of a denoising network, one with the condition and one with the condition dropped. Autoguidance follows the same idea but uses a weaker version of the same model as the second prediction. The idea is that the weaker model amplifies errors, so putting more weight on the stronger output removes them.
Until now, this guidance had only been applied to continuous diffusion, so its use for discrete diffusion remained unexplored.
Nisonoff et al. proposed a CFG scheme for continuous-time Markov chains, a subclass of discrete diffusion models. The authors interpret GenMol's MDLM training as a CTMC, and they treat this interpretation as an assumption that lets them bring autoguidance in. MCG keeps the original denoiser prediction as the strong model and uses a prediction on partially corrupted input as the weak one.
The guided logits are w times the logits on z_t plus (1 - w) times the logits on the corrupted input, with gamma times 100% of the tokens in z_t masked to form that input. The derivation is given in Section C, and the guidance scale w is greater than 1.
The intuition is to compare two outputs of one GenMol model, one given a good input and one given a poorer input. The good input is the given partially masked sequence, and masking a further gamma times 100% of it yields the poor input. The authors apply MCG in fragment-constrained and goal-directed generation.
De novo generation quality
The authors generate 1,000 molecules per setting and score validity, uniqueness, diversity and quality for de novo generation. Quality counts the molecules that are valid, unique, drug-like and synthesizable, so it gives one score for chemically reasonable and unique output. Drug-like here means QED ≥ 0.6, and synthesizable means SA ≤ 4, following Jin et al.
(2020). Diversity is the average pairwise Tanimoto distance between Morgan fingerprints of the generated molecules.
SAFE-GPT is the baseline, and the paper's Table 1 lists its quality as 54.7 ± 0.3 over 3 runs. With one token unmasked per step (N = 1), tau 0.5 and r 0.5, GenMol reaches 84.6 ± 0.8 quality. GenMol with N = 1 keeps validity at 100.0 ± 0.0 and uniqueness at 99.7 ± 0.1 in the same setting. The variant that uses standard diffusion sampling scores 53.8 ± 1.7 quality, close to SAFE-GPT.
So the large quality gain tracks confidence sampling more than the backbone alone.

Table 1 | De novo molecule generation results.The results are the means and the standard deviations of 3 runs.𝑁, 𝜏, and 𝑟 is the number of tokens to unmask at each time step, the softmax temperature, and the randomness, respectively. The best results are highlighted in bold.
Original paper · CC BY 4.0Raising N to 2 lowers quality to 76.2 ± 1.3, and raising it to 3 lowers quality to 67.1 ± 0.7. Even at N = 3, quality stays above SAFE-GPT's 54.7 ± 0.3. The authors report that the N = 3 setting runs with 2.5x shorter sampling time than SAFE-GPT and the variant without confidence sampling. Sampling time falls from 21.1 ± 0.4 seconds at N = 1 to 10.1 ± 0.2 seconds at N = 3.
N therefore sets the trade-off between speed and quality, because it controls how many tokens are decoded in parallel.
Fragment-constrained completion with one checkpoint
The fragment-constrained task asks the model to complete a molecule from a set of fixed fragments, so the same checkpoint has to fill in five different shapes. Validity, uniqueness, diversity and quality are the same metrics used for de novo generation.
GenMol beats SAFE-GPT on most metrics across the five tasks, and the authors read this as general applicability to fragment-constrained settings. For superstructure generation, GenMol reaches a quality of 34.8 ± 1.0, compared to 14.3 ± 3.7 for SAFE-GPT. On linker design the gap is small, because GenMol scores 21.9 ± 0.4 quality and SAFE-GPT scores 21.7 ± 1.1.
So the advantage isn't uniform across the tasks, and linker design is nearly a tie.
On scaffold decoration, GenMol keeps a quality of 31.8 ± 0.5 against 10.0 ± 1.4 for SAFE-GPT, with a validity of 96.6 ± 0.8 versus 97.7 ± 0.3. Motif extension shows GenMol at 30.1 ± 0.4 quality, compared to 18.6 ± 2.1 for SAFE-GPT, but GenMol's validity there is 82.9 ± 0.1. The authors credit the balance of quality and diversity, and GenMol's diversity sits near SAFE-GPT's on most tasks.
The authors attribute this to the non-autoregressive parallel decoding that lets GenMol predict several tokens at once.
The results answer the section question with a yes for most tasks, but not for every metric. The paper reports these numbers for one checkpoint, with no task-specific finetuning. The paper doesn't report a fragment-constrained comparison with MCG switched off in this table.
Goal-directed hit generation on PMO
Hit generation asks whether fragment remasking can find molecules with higher property scores on the PMO benchmark. The authors draw the initial fragment vocabulary from the molecules in the ZINC250k dataset, following Lee et al. (2024b) and Lee et al. (2024a). The benchmark is the practical molecular optimization (PMO) benchmark from Gao et al.
(2022), which contains 23 tasks.
The baselines are the recent state-of-the-art methods f-RAG, Genetic GFN and Mol GA. The f-RAG, Genetic GFN and Mol GA numbers are taken from their respective papers, while the other baselines come from Gao et al. (2022). Because these numbers come from original papers, they don't form one controlled comparison across all methods.
On the sum of PMO AUC top-10 values, GenMol reaches 18.362, compared to 16.928 for f-RAG. The next-best baseline, Genetic GFN, reaches 16.213 on the same sum. GenMol gives the best PMO AUC top-10 in 19 of the 23 tasks, by a large margin. The authors credit this result to the fragment remasking strategy, which they say is effective for discovering optimized hits.
The per-task table lists GenMol's score next to f-RAG, Genetic GFN, Mol GA and other baselines for each oracle. GenMol trails on a few oracles, such as mestranol_similarity, where it scores 0.982 against f-RAG's 0.671. Additional baselines appear in Table 13, Table 14 and Table 15.
Lead optimization with docking
The lead optimization task asks whether GenMol can improve a seed molecule's docking score while keeping similarity to the seed above a threshold. Sim is the Tanimoto similarity between Morgan fingerprints of the generated molecule and the seed. Performance is the docking score of the most optimized lead, and lower docking scores are better.
Five target proteins are used, parp1, fa7, 5ht1b, braf, and jak2, with three known active ligands per target as seeds, giving 30 tasks. The initial fragment vocabulary comes from decomposing the seed molecule, and generated leads have their fragments added to the vocabulary. Graph GA and RetMol are the baselines, following Wang et al. (2023).
GenMol outperforms the baselines in most tasks, according to the lead optimization results in Table 4. Baselines often fail to produce a molecule with higher binding affinity than the seed while meeting the constraints. This failure is most frequent under the harsher δ = 0.6 similarity constraint. Table 4 lists the per-target seed scores and the docking scores for both δ values.
GenMol successfully optimized seed molecules in 26 out of 30 tasks. The authors read this as evidence that GenMol can explore chemical space to optimize given molecules.

Table 4 | Lead optimization results (kcal/mol).The results are the mean docking scores of the most optimized leads of 3 runs. Lower is better.
Original paper · CC BY 4.0Attaching (A) is a baseline that attaches two vocabulary fragments without further modification. A + Token remasking re-predicts individual tokens with discrete diffusion, while A + GPT remasking re-predicts a fragment chunk with SAFE-GPT. A + Fragment remasking re-predicts a fragment mask chunk with discrete diffusion, and it scored higher than A + Token remasking.
The authors state that A outperforms other previous baselines in hit generation but fails frequently in lead optimization. They explain that A cannot generate new fragments outside the vocabulary, so applying fragment remasking on top of it largely improves lead optimization.
Which components carry the hit gain
The hit generation ablation keeps attaching as the baseline A and swaps in different remasking steps on top of it. Token remasking re-predicts individual tokens instead of a fragment chunk with discrete diffusion, while GPT remasking re-predicts a randomly chosen fragment chunk with SAFE-GPT instead of diffusion. Attaching alone scored 17.641 in the sum of PMO AUC top-10 values.
Token remasking reached 18.091 and GPT remasking reached 18.074, both above attaching alone. Fragment remasking, which re-predicts a fragment mask chunk with discrete diffusion, reached 18.208. Fragment remasking also beat GPT remasking, which the authors attribute to the bidirectional attention of masked discrete diffusion rather than a fixed token ordering.
Fragment remasking beat token remasking, and the authors tie this to fragments being the chemically meaningful unit for exploration. The gap is small on the summed score, so the per-task results carry more weight for the claim. Adding MCG to fragment remasking raised the sum from 18.208 to 18.362. MCG calibrates GenMol's predictions by comparing logits from the partially masked input and a further masked version of it, with γ set to 0 in the version without MCG.
The full table shows that A + F + MCG achieves the best performance on 19 of 23 tasks.
On lead optimization, attaching alone fails frequently because it can't generate new fragments outside the vocabulary. Applying fragment remasking on top of attaching largely improves lead optimization performance, according to the authors' Table 17. The authors also report that GenMol with MCG outperforms GenMol without MCG across various tasks on fragment-constrained generation.
Limitations and risks
The authors name one risk directly: GenMol could generate harmful drugs if someone uses it maliciously. They propose three safeguards: toxicity-aware target properties, excluding toxic fragments from the vocabulary, or filtering candidates by predicting toxicity. The paper doesn't test any of these safeguards, so their effect stays unknown.
The guidance argument rests on treating MDLM training as a continuous-time Markov chain, which the authors take from Sahoo et al. (2024). Autoguidance for discrete diffusion is new here, since the earlier guidance method had only been applied to continuous diffusion. MCG builds its poor input by masking γ·100% of the tokens, and the derivation sits in Section C.
The hit generation baselines for f-RAG, Genetic GFN and Mol GA come from their respective papers, not from runs under one setup. The other hit generation baselines come from Gao et al. (2022), so the comparison isn't one controlled experiment. Lead optimization compares GenMol only with Graph GA and RetMol, following Wang et al. (2023).
The quality metric counts a molecule only when it passes QED ≥ 0.6 and SA ≤ 4, so its values depend on these cutoffs. The lead optimization results hold only for the harsher and looser similarity thresholds of δ = 0.4 and δ = 0.6.
Paper info
- Authors
- Seul Lee, Karsten Kreis, Srimukh Prasad Veccham, Meng Liu, Danny Reidenbach, Yuxing Peng, Saee Paliwal, Weili Nie, Arash Vahdat
- Venue
- arXiv · Preprint
- First published
- 2025-1-10
- Added
- 2026-10-29
- Updated
- 2025-7-22
- Version
- v3
- arXiv
- 2501.06158
- Category
- cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Drug discovery is a complex process that involves multiple stages and tasks. However, existing molecular generative models can only tackle some of these tasks. We present Generalist Molecular generative model (GenMol), a versatile framework that uses only a single discrete diffusion model to handle diverse drug discovery scenarios. GenMol generates Sequential Attachment-based Fragment Embedding (SAFE) sequences through non-autoregressive bidirectional parallel decoding, thereby allowing the utilization of a molecular context that does not rely on the specific token ordering while having better sampling efficiency. GenMol uses fragments as basic building blocks for molecules and introduces fragment remasking, a strategy that optimizes molecules by regenerating masked fragments, enabling effective exploration of chemical space. We further propose molecular context guidance (MCG), a guidance method tailored for masked discrete diffusion of GenMol. GenMol significantly outperforms the previous GPT-based model in de novo generation and fragment-constrained generation, and achieves state-of-the-art performance in goal-directed hit generation and lead optimization. These results demonstrate that GenMol can tackle a wide range of drug discovery tasks, providing a unified and versatile approach for molecular design. Our code is available at https://github.com/NVIDIA-Digital-Bio/genmol.
Quote from the paper
Seul Lee, Karsten Kreis, Srimukh Prasad Veccham, Meng Liu, Danny Reidenbach, Yuxing Peng, Saee Paliwal, Weili Nie, Arash Vahdat (2025). GenMol: A Drug Discovery Generalist with Discrete Diffusion. arXiv:2501.06158v3. https://arxiv.org/abs/2501.06158v3
BibTeX
@misc{lee2025genmol,
title = {{GenMol: A Drug Discovery Generalist with Discrete Diffusion}},
author = {Seul Lee and Karsten Kreis and Srimukh Prasad Veccham and Meng Liu and Danny Reidenbach and Yuxing Peng and Saee Paliwal and Weili Nie and Arash Vahdat},
year = {2025},
eprint = {2501.06158},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2501.06158v3}
}