# Gotta be SAFE: A New Framework for Molecular Design

arXiv: https://arxiv.org/abs/2310.10773 · HTML: https://mlsanity.com/paper/2310.10773/

## Key facts

- Cited by 48 papers in the map (data through 14 Oct 2026).
- Builds on 16 of its 42 references that are in the map.
- First posted on arXiv 16 Oct 2023.

## Builds on (most cited first, 16 of 16)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [Proximal Policy Optimization Algorithms](https://mlsanity.com/paper/1707.06347/) (2017)
- [Automatic chemical design using a data-driven continuous representation of molecules](https://mlsanity.com/paper/1610.02415/) (2016)
- [Junction Tree Variational Autoencoder for Molecular Graph Generation](https://mlsanity.com/paper/1802.04364/) (2018)
- [Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models](https://mlsanity.com/paper/1811.12823/) (2018)
- [Therapeutics Data Commons: Machine Learning Datasets and Tasks for Drug Discovery and Development](https://mlsanity.com/paper/2102.09548/) (2021)
- [Learning Deep Generative Models of Graphs](https://mlsanity.com/paper/1803.03324/) (2018)
- [Molecular Transformer - A Model for Uncertainty-Calibrated Chemical Reaction Prediction](https://mlsanity.com/paper/1811.02633/) (2018)
- [Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translation](https://mlsanity.com/paper/1804.06609/) (2018)
- [Multi-Objective De Novo Drug Design with Conditional Graph Generative Model](https://mlsanity.com/paper/1801.07299/) (2018)
- [SELFIES and the future of molecular string representations](https://mlsanity.com/paper/2204.00056/) (2022)
- [Learning to Extend Molecular Scaffolds with Structural Motifs](https://mlsanity.com/paper/2103.03864/) (2021)
- [MolGenSurvey: A Systematic Survey in Machine Learning Models for Molecule Design](https://mlsanity.com/paper/2203.14500/) (2022)
- [Group SELFIES: A Robust Fragment-Based Molecular String Representation](https://mlsanity.com/paper/2211.13322/) (2022)
- [Scaffold-constrained molecular generation](https://mlsanity.com/paper/2009.07778/) (2020)
- [Probabilistic Generative Transformer Language models for Generative Design of Molecules](https://mlsanity.com/paper/2209.09406/) (2022)

## Built on by (most cited first, 30 of 48)

- [GenMol: A Drug Discovery Generalist with Discrete Diffusion](https://mlsanity.com/paper/2501.06158/) (2025)
- [Molecule Generation with Fragment Retrieval Augmentation](https://mlsanity.com/paper/2411.12078/) (2024)
- [ACEGEN: Reinforcement learning of generative chemical agents for drug discovery](https://mlsanity.com/paper/2405.04657/) (2024)
- [Less can be more for predicting properties with large language models](https://mlsanity.com/paper/2406.17295/) (2024)
- [mCLM: A Modular Chemical Language Model that Generates Functional and Makeable Molecules](https://mlsanity.com/paper/2505.12565/) (2025)
- [FragFM: Hierarchical Framework for Efficient Molecule Generation via Fragment-Level Discrete Flow Matching](https://mlsanity.com/paper/2502.15805/) (2025)
- [Virtual Cells: Predict, Explain, Discover](https://mlsanity.com/paper/2505.14613/) (2025)
- [Zero Shot Molecular Generation via Similarity Kernels](https://mlsanity.com/paper/2402.08708/) (2024)
- [Refine Drugs, Don't Complete Them: Uniform-Source Discrete Flows for Fragment-Based Drug Discovery](https://mlsanity.com/paper/2509.26405/) (2025)
- [FROGENT: An End-to-End Full-process Drug Design Multi-Agent System](https://mlsanity.com/paper/2508.10760/) (2025)
- [FRIGID: Scaling Diffusion-Based Molecular Generation from Mass Spectra at Training and Inference Time](https://mlsanity.com/paper/2604.16648/) (2026)
- [Toward Closed-loop Molecular Discovery via Language Model, Property Alignment and Strategic Search](https://mlsanity.com/paper/2512.09566/) (2025)
- [Advancements in Molecular Property Prediction: A Survey of Single and Multimodal Approaches](https://mlsanity.com/paper/2408.09461/) (2024)
- [SAFE setup for generative molecular design](https://mlsanity.com/paper/2410.20232/) (2024)
- [CAGenMol: Condition-Aware Diffusion Language Model for Goal-Directed Molecular Generation](https://mlsanity.com/paper/2604.11483/) (2026)
- [A2D2: Fine-Tuning Any-Length Discrete Diffusion for Adaptive Decoding](https://mlsanity.com/paper/2606.13565/) (2026)
- [Hierarchical Structure Enhances the Convergence and Generalizability of Linear Molecular Representation](https://mlsanity.com/paper/2402.02164/) (2024)
- [MolEditRL: Structure-Preserving Molecular Editing via Discrete Diffusion and Reinforcement Learning](https://mlsanity.com/paper/2505.20131/) (2025)
- [Conditional Chemical Language Models are Versatile Tools in Drug Discovery](https://mlsanity.com/paper/2507.10273/) (2025)
- [TSSR: Two-Stage Swap-Reward-Driven Reinforcement Learning for Character-Level SMILES Generation](https://mlsanity.com/paper/2601.04521/) (2026)
- [Unveiling Scaling Behaviors in Molecular Language Models: Effects of Model Size, Data, and Representation](https://mlsanity.com/paper/2601.22757/) (2026)
- [Insertion Based Sequence Generation with Learnable Order Dynamics](https://mlsanity.com/paper/2602.18695/) (2026)
- [De novo molecular structure elucidation from mass spectra via flow matching](https://mlsanity.com/paper/2602.19912/) (2026)
- [Augmenting Molecular Language Models with Local n-gram Memory](https://mlsanity.com/paper/2606.12113/) (2026)
- [A Hitchhiker's Guide to Deep Chemical Language Processing for Bioactivity Prediction](https://mlsanity.com/paper/2407.12152/) (2024)
- [Generative Model for Small Molecules with Latent Space RL Fine-Tuning to Protein Targets](https://mlsanity.com/paper/2407.13780/) (2024)
- [T- Hop: A framework for studying the importance path information in molecular graphs for chemical property prediction](https://mlsanity.com/paper/2407.14270/) (2024)
- [MODA: A Unified 3D Diffusion Framework for Multi-Task Target-Aware Molecular Generation](https://mlsanity.com/paper/2507.07201/) (2025)
- [NovoMolGen: Rethinking Molecular Language Model Pretraining](https://mlsanity.com/paper/2508.13408/) (2025)
- [From Tokens to Blocks: A Block-Diffusion Perspective on Molecular Generation](https://mlsanity.com/paper/2601.21964/) (2026)

## Abstract (arXiv)

Traditional molecular string representations, such as SMILES, often pose challenges for AI-driven molecular design due to their non-sequential depiction of molecular substructures. To address this issue, we introduce Sequential Attachment-based Fragment Embedding (SAFE), a novel line notation for chemical structures. SAFE reimagines SMILES strings as an unordered sequence of interconnected fragment blocks while maintaining compatibility with existing SMILES parsers. It streamlines complex generative tasks, including scaffold decoration, fragment linking, polymer generation, and scaffold hopping, while facilitating autoregressive generation for fragment-constrained design, thereby eliminating the need for intricate decoding or graph-based models. We demonstrate the effectiveness of SAFE by training an 87-million-parameter GPT2-like model on a dataset containing 1.1 billion SAFE representations. Through targeted experimentation, we show that our SAFE-GPT model exhibits versatile and robust optimization performance. SAFE opens up new avenues for the rapid exploration of chemical space under various constraints, promising breakthroughs in AI-driven molecular design.
