FragFlex: Fragment-Based Flexible Molecular Generation for Exploring Vast Chemical Space
Organizations: Carnegie Mellon University · University of Pittsburgh
Abstract
Drug discovery requires efficient exploration of an astronomically large chemical space. Molecular graph diffusion models offer a promising approach to this task, but many require graph size to be fixed before generation. Although atom-level insertion and deletion can enable flexible-size generation, jointly modeling molecular size, atom types, and bonds while maintaining chemical validity remains challenging. We introduce FragFlex, a flexible-length discrete diffusion model that performs node insertion and deletion at the fragment level. During denoising, FragFlex jointly learns the size, fragment identities, and inter-fragment connectivity of the fragment graph. A neural attachment-site predictor and valence-aware assembler then convert the generated fragment graph into an atom-level molecule. In large-scale experiments generating 10 million molecules, FragFlex achieves near-perfect chemical validity while maintaining high uniqueness, demonstrating a strong balance between the two.
Figures & tables
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Atom-level molecule. | |
| Fixed vocabulary of molecular fragments. | |
| Clean fragment graph with fragment labels, binary fragment edges, and directed attachment sites. | |
| Fragment graph after structural deletion and categorical corruption at timestep . | |
| Node set of the clean fragment graph. | |
| Number of atoms in the fragment assigned to node . |
| Component | Setting |
|---|---|
| Diffusion | with a cosine noise schedule ( ) |
| Deletion/insertion schedule | Logistic with , |
| Terminal prior | One fragment from the empirical fragment marginal |
| Main denoiser | 7 layers, node width 384, edge width 96, 8 heads |
| Count model | 2 layers, node width 128, edge width 32, 8 heads |
| Maximum graph size | fragments |