All models

GenMol

A BERT trained as a masked discrete diffusion model that writes drug-like molecules as SAFE fragment strings.

Molecules, proteins and genomics · 305 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (29 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
87.3M
Operations
305
Framework
PyTorch
Recurrent
No
Published
ICML 2025
Cited by
4 (as of 18 October 2026)
Authors
Seul Lee, Karsten Kreis, Srimukh Prasad Veccham and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12649
Graph hash
7db528ee83e0166bc2f3eb534cb9547cf6e5178f0dcfa629f0827f1a334fead0
Skeleton hash
56441432b5b08cb5b5967984ab247da9fbb5a2900963ba11cd38bdea545fb471
Architecture hash
50d8d5df5daff5695f545cdc3e19e433bb7c7d9fa60de05b8f7ff1e23bfd272b
Diagram SHA-256
d1c950e4e8c1b5284ef826d58a9a3c004369df543767d762d7266e5b001d2232
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

GenMol is a molecule generator for drug discovery that uses a single masked discrete diffusion model to cover tasks that previously needed separate models. Under the hood it is a BERT: the model card lists the network architecture as BERT, which is why the traced graph looks like a masked language model. Molecules are written as SAFE strings, Sequential Attachment-based Fragment Embedding, and generated by non-autoregressive bidirectional parallel decoding rather than one token after another. The card describes the mechanism plainly: starting from a SAFE sequence with mask tokens, the network predicts valid chemistry-vocabulary tokens to replace the masks until none remain, an unmasking process by discrete diffusion.

Fragments are the building blocks: fragment remasking optimizes a molecule by regenerating masked fragments, which the authors use to explore chemical space. A guidance method tailored to the masked diffusion, molecular context guidance (MCG), rounds out the method. The paper reports that GenMol significantly outperforms the previous GPT-based model in de novo and fragment-constrained generation, and state-of-the-art results in goal-directed hit generation and lead optimization.

The checkpoint traced here is GenMol V2, trained with an extended SAFE syntax that uses angle brackets to mark attachment points between fragments. The motivation was low validity in one-step linker design, where standard SAFE makes intra-fragment and inter-fragment attachment points hard to tell apart. With the new syntax, GenMol V2 reaches 81.8% validity on one-step linker design. The authors note V2 performs slightly worse on hit generation and lead optimization, because fragment remasking there changes only a small part of the sequence. Training V2 from scratch used 8 NVIDIA A100 GPUs. The source code is Apache-2.0, while the model weights are made available under the NVIDIA Open Model License.

Key idea. GenMol replaces task-specific molecular generators with one masked discrete diffusion model over SAFE fragment sequences, adding fragment remasking and molecular context guidance to cover de novo design through lead optimization.

  • GenMol
  • NV-GenMol
  • Generalist Molecular generative model
  • GenMol V2
  • SAFE
  • Sequential Attachment-based Fragment Embedding
  • masked diffusion
  • discrete diffusion
  • molecule generation
  • drug discovery
  • fragment remasking
  • molecular context guidance
  • BertForMaskedLM
  • NVIDIA

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{lee2025genmoldrugdiscoverygeneralist,
      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},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2501.06158}, 
}