From Tokens to Blocks: A Block-Diffusion Perspective on Molecular Generation

Qianwei Yang, Dong Xu, Zhangfan Yang, Sisi Yuan, Zexuan Zhu, Jianqiang Li, Junkai Ji

Abstract

Drug discovery can be viewed as a combinatorial search over an immense chemical space, motivating the development of deep generative models for de novo molecular design. Among these, GPT-based molecular language models (MLM) have shown strong molecular design performance by learning chemical syntax and semantics from large-scale data. However, existing MLMs face two fundamental limitations: they inadequately capture the graph-structured nature of molecules when formulated as next-token prediction problems, and they typically lack explicit mechanisms for target-aware generation. Here, we propose SoftMol, a unified framework that co-designs molecular representation, model architecture, and search strategy for target-aware molecular generation. SoftMol introduces soft fragments, a rule-free block representation of SMILES that enables diffusion-native modeling, and develops SoftBD, the first block-diffusion molecular language model that combines local bidirectional diffusion with autoregressive generation under molecular structural constraints. To favor generated molecules with high drug-likeness and synthetic accessibility, SoftBD is trained on a carefully curated dataset named ZINC-Curated. SoftMol further integrates a gated Monte Carlo tree search to assemble fragments in a target-aware manner. Experimental results show that, compared with current state-of-the-art models, SoftMol achieves 100% chemical validity, improves binding affinity by 9.7%, yields a 2-3x increase in molecular diversity, and delivers a 6.6x speedup in inference efficiency.

Introduction

Finding novel therapeutic agents is essentially a massive combinatorial search problem. Recently, researchers have leveraged GPT-style Molecular Language Models (MLMs) to generate SMILES strings token-by-token. However, this approach has two major flaws. First, molecules are graphs, not simple 1D text; autoregressive generation forces a strict left-to-right order that fails to capture the bidirectional, local chemical context necessary for structural integrity (e.g., ring closures). Second, most MLMs lack target awareness, struggling to explicitly design molecules tailored to bind to specific protein targets. While standard diffusion models can capture bidirectional context, they require fixed-length sequences, which clashes with the variable lengths of real-world molecules. SoftMol addresses these issues by co-designing molecular representation, model architecture, and search strategy.

The SoftMol Framework

Rule-Free Soft-Fragments

SoftMol introduces "soft-fragments" to represent molecules. Instead of relying on rigid, human-defined chemical rules or motifs, SMILES strings are padded and sliced into fixed-length, contiguous blocks. This rule-free approach maintains low token inflation and allows for tunable granularity, providing a more robust foundation for generative modeling than traditional atom-level or rule-based fragmentations.

Comparison of molecular representations: Atom-level, Rule-based, and Soft-Fragment.

SoftBD and Gated MCTS

The core architecture, SoftBD (Block-Diffusion Model), is a hybrid that generates molecules block-by-block. While it maintains an autoregressive structure to handle variable lengths, it utilizes discrete diffusion within each block. This allows atoms to attend to each other bidirectionally, ensuring local chemical validity. To accelerate the denoising process, SoftMol employs "Adaptive Confidence Decoding," specifically a "First-Hitting sampling" technique that skips redundant steps and locks in high-confidence tokens.

For target-specific design, SoftMol utilizes a Gated Monte Carlo Tree Search (MCTS) to assemble these fragments. A "Tunable Feasibility Gate" filters out candidates with poor drug-likeness or synthetic accessibility before they undergo computationally expensive 3D docking simulations, ensuring the search remains efficient and focused on viable candidates.

The SoftMol architecture: (a) Training via block-diffusion, (b) Autoregressive block generation, and (c) Gated Monte Carlo Tree Search for target-aware design.

Experimental Results

SoftMol was evaluated against 17 state-of-the-art baselines across five protein targets (parp1, fa7, 5ht1b, braf, jak2). The model was pretrained on ZINC-Curated, a highly filtered subset of 427 million molecules optimized for drug-likeness.

  • Perfect Validity: SoftMol achieved 100% chemical validity, demonstrating that rule-free block diffusion can perfectly master molecular syntax.
  • Inference Efficiency: The adaptive decoding strategy delivered a 6.6x speedup in inference compared to leading discrete diffusion baselines.
  • Target Binding: SoftMol improved binding affinity (docking scores) by 9.7% on average across all protein targets.
  • Diversity: The framework yielded a 2–3x increase in structural diversity compared to fragment-retrieval methods, indicating it effectively explores the chemical space rather than memorizing scaffolds.

Discussion and Conclusion

SoftMol demonstrates that explicit chemical heuristics are not required for high-quality molecular generation; rather, a well-designed block-diffusion approach can learn syntax and semantics directly from data. While the current framework operates on 1D strings and relies on docking proxies for 3D awareness, its efficiency and validity represent a significant step forward. Future work will focus on bridging the 2D-3D gap and testing the soft-fragment approach on larger macromolecules.

Summary updated

Abstract

Drug discovery can be viewed as a combinatorial search over an immense chemical space, motivating the development of deep generative models for de novo molecular design. Among these, GPT-based molecular language models (MLM) have shown strong molecular design performance by learning chemical syntax and semantics from large-scale data. However, existing MLMs face two fundamental limitations: they inadequately capture the graph-structured nature of molecules when formulated as next-token prediction problems, and they typically lack explicit mechanisms for target-aware generation. Here, we propose SoftMol, a unified framework that co-designs molecular representation, model architecture, and search strategy for target-aware molecular generation. SoftMol introduces soft fragments, a rule-free block representation of SMILES that enables diffusion-native modeling, and develops SoftBD, the first block-diffusion molecular language model that combines local bidirectional diffusion with autoregressive generation under molecular structural constraints. To favor generated molecules with high drug-likeness and synthetic accessibility, SoftBD is trained on a carefully curated dataset named ZINC-Curated. SoftMol further integrates a gated Monte Carlo tree search to assemble fragments in a target-aware manner. Experimental results show that, compared with current state-of-the-art models, SoftMol achieves 100% chemical validity, improves binding affinity by 9.7%, yields a 2-3x increase in molecular diversity, and delivers a 6.6x speedup in inference efficiency. Code is available at https://github.com/szu-aicourse/softmol
BibTeX
@misc{yang2026from,
  author = {Qianwei Yang and Dong Xu and Zhangfan Yang and Sisi Yuan and Zexuan Zhu and Jianqiang Li and Junkai Ji},
  title = {{From Tokens to Blocks: A Block-Diffusion Perspective on Molecular Generation}},
  year = {2026},
  eprint = {2601.21964},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.21964},
}
Figure