---
title: 'SoftBD: Block Diffusion Molecular Model'
url: https://www.emergentmind.com/topics/softbd
type: topic
---

# SoftBD: Block Diffusion Molecular Model

SoftBD, short for **Soft Block Diffusion**, is a molecular generative model introduced as the generative core of the broader **SoftMol** framework. It is described as **the first block-diffusion molecular language model** and is designed for de novo and target-aware molecular generation by combining **local bidirectional diffusion** with **autoregressive generation under molecular structural constraints**. In the formulation presented in "From Tokens to Blocks: A Block-Diffusion Perspective on Molecular Generation" [2601.21964], SoftBD addresses a mismatch between standard sequence language models and the graph-structured nature of molecules by replacing token-level next-token prediction with blockwise generation over a rule-free representation called **soft fragments**.

## 1. Definition and conceptual position

SoftBD is the pretrained molecular generator inside SoftMol. Its role is to model the distribution of valid, drug-like, and synthetically accessible molecules, and it is also used as the proposal prior and rollout policy inside target-aware search [2601.21964]. The model is motivated by two shortcomings attributed to prior molecular language models. First, **standard GPT-style next-token generation is too unidirectional** for molecular structures with strong local mutual dependencies. Second, **pure diffusion models are awkward for molecular strings** because standard discrete diffusion assumes fixed-dimensional tensors and often needs heavy padding or explicit length modeling.

The model addresses this by using a **hybrid semi-autoregressive block-diffusion formulation**. At the global level, it generates blocks autoregressively, preserving simple variable-length termination and global sequence coherence. At the local level, it denoises within each block bidirectionally, enabling the model to capture local chemical dependencies that do not fit a strictly causal left-to-right factorization. The core factorization is
$$
p_\theta(\mathbf{x}) = \prod_{b=1}^{B} p_\theta(\mathbf{x}^b \mid \mathbf{x}^{<b}).
$$

Relative to other molecular generative approaches, SoftBD is positioned as distinct from **GPT-based MLMs**, **graph VAEs / graph RL / graph GAs**, **rule-based fragment methods** such as SAFE, JT-VAE, HierVAE, GEAM, and \(f\)-RAG, and **full-sequence diffusion** such as GenMol. The paper’s framing suggests that SoftBD is intended as a compromise: more molecule-aware than token-level autoregression, more efficient and length-compatible than full diffusion, and less rigid than chemically predefined fragment systems.

## 2. Representation: soft fragments

The representation underlying SoftBD is called **soft fragments**. These are defined as **contiguous fixed-length blocks of a padded SMILES token sequence** [2601.21964]. Given a SMILES string \(\mathbf{s}\), the sequence is tokenized into \(\mathbf{x} = (x_1,\ldots,x_L)\) of uniform fixed length \(L\) by padding with \([PAD]\), and then partitioned into \(B=L/K\) contiguous blocks of length \(K\). The \(b\)-th block is
$$
\mathbf{x}^b := (x_{(b-1)K+1}, \ldots, x_{bK}), \quad b \in \{1, \ldots, B\}.
$$

The conversion pipeline is specified as follows: start from a SMILES string \(\mathbf{s}\); tokenize into atom-level or symbol-level vocabulary elements \(x_i \in \mathcal{V}\), where \(\mathcal{V}\) contains atoms, bonds, ring markers, and control symbols \([BOS], [EOS], [PAD], [MASK]\); wrap the sequence as
$$
([BOS], s_1,\dots,s_n,[EOS]);
$$
pad to a global fixed length \(L\); and partition into contiguous length-\(K\) blocks.

The representation is described as **rule-free** because no BRICS or RECAP heuristics are used, no chemically hand-crafted decomposition boundaries are preserved, no auxiliary fragment-connection tokens are inserted, and there is no static fragment vocabulary. The fragmentation is instead deterministic, computational, fixed-length, and contiguous. It is described as **diffusion-native** because each block has uniform size \(K\), making it naturally compatible with masked discrete diffusion over fixed-size local tensors.

A central property is the decoupling of **training granularity** and **sampling granularity**. The paper distinguishes \(K_{\text{train}}\), the block size used during training, from \(K_{\text{sample}}\), the block size used during inference and search. In practice, it uses finer \(K_{\text{sample}}=2\) for de novo generation and coarser \(K_{\text{sample}}=8\) for target-aware MCTS. This suggests that SoftBD treats block size not as a chemically fixed notion of fragmenthood, but as a computational control parameter.

The paper explicitly acknowledges that arbitrary fixed-length cuts may split rings, branches, bracketed atoms, or bonds. Its empirical claim is that SoftBD can repair such discontinuities with near-perfect validity in broken-prefix completion experiments. A plausible implication is that the learned denoising dynamics compensate for the absence of chemistry-specific segmentation rules.

## 3. Probabilistic formulation and architecture

SoftBD uses a two-level generative structure: **autoregressive over blocks** and **diffusion within block** [2601.21964]. The appendix restates the log-likelihood as
$$
\log p_\theta(\mathbf{x}) = \sum_{b=1}^{B} \log p_\theta(\mathbf{x}^b \mid \mathbf{x}^{<b}).
$$
Each conditional \(p_\theta(\mathbf{x}^b \mid \mathbf{x}^{<b})\) is modeled by a discrete masked diffusion denoiser.

The defining architectural mechanism is a **hybrid attention mask** over concatenated noised and clean sequences. The paper states that **intra-block interactions are bidirectional, inter-block interactions are causal**. The training-time full mask is written as
$$
\mathcal{M}_{\text{full}} =
\begin{bmatrix}
\mathcal{M}_{\text{BD}} & \mathcal{M}_{\text{OBC}} \\
\mathbf{0} & \mathcal{M}_{\text{BC}}
\end{bmatrix}.
$$
Here, \(\mathcal{M}_{\text{BD}}\) is a block-diagonal mask giving bidirectional self-attention within the same noised block, \(\mathcal{M}_{\text{OBC}}\) allows each noised token to attend to clean tokens from strictly earlier blocks, and \(\mathcal{M}_{\text{BC}}\) is a block-causal mask on the clean sequence. This mask structure is the architecture-level definition of **local bidirectional diffusion** in SoftBD.

The forward process is an absorbing-mask corruption process. For each block \(b\), a diffusion time \(t \sim \mathcal{U}[0,1]\) is sampled; tokens in that block are masked with probability \(1-\alpha_t\), where \(\alpha_t\) denotes the probability that a token remains unmasked. The reverse model predicts clean block tokens conditioned on the corrupted block and previous clean blocks:
$$
p_\theta(\cdot \mid \mathbf{x}_t^b, \mathbf{x}^{<b}).
$$

SoftMol uses the **SUBS-parameterization** from BD3-LM. The key constraint is that once a token is unmasked, it is never remasked in reverse time:
$$
p_\theta(\mathbf{x}_{s,i}^b = \mathbf{x}_{t,i}^b \mid \mathbf{x}_{t,i}^b \neq [MASK]) = 1,
$$
for \(s < t\). Under this parameterization, the prior and reconstruction terms vanish in the continuous-time NELBO derivation, leaving only the diffusion loss.

The training objective is given as
$$
\mathcal{L}_{\text{BD}}(\mathbf{x}; \theta) := \sum_{b=1}^{B} \mathbb{E}_{t, \mathbf{x}_t^b} \left[ -\frac{\alpha'_t}{1 - \alpha_t} \mathcal{L}_{\text{CE}} \bigl( \mathbf{x}^b, p_\theta(\cdot \mid \mathbf{x}_t^b, \mathbf{x}^{<b}) \bigr) \right].
$$
The interpretation stated in the paper is direct: sample a corruption time \(t\), mask a subset of tokens in block \(b\), predict original tokens at masked positions, and weight cross-entropy by \(-\alpha_t'/(1-\alpha_t)\).

The appendix specifies that SoftBD instantiates **the DDiT backbone of BD3-LM** with a stack of Transformer decoder blocks, masked self-attention on concatenated history and current block, positionwise feed-forward layers, residual connections, tied input embedding and output projection weights, dropout \(0.1\), diffusion timestep conditioning via a **128-dimensional conditioning embedding**, and scale-by-\(\sigma\) parameterization from BD3-LM. The main 89M model uses 11 layers, hidden size 784, 8 attention heads, and max context length 512.

## 4. Generation, decoding, and structural constraints

SoftBD generates molecules **semi-autoregressively**: block by block, with iterative denoising inside each block [2601.21964]. The decoding process begins from \([BOS]\). For each block \(b\), it initializes the block tokens as \([MASK]\), conditions on cached history \(\mathbf{x}^{<b}\), iteratively denoises until all positions in the block are resolved, freezes that block as part of the context, and continues to the next block. Generation stops when \([EOS]\) has been produced for all sequences.

The paper’s inference contribution is termed **Adaptive Confidence Decoding**, which integrates three mechanisms.

First, **First-Hitting Sampling** replaces a fixed diffusion schedule \(T\) with an analytical time update based on the number of currently masked tokens \(m_t^{(i)}\):
$$
t^{(i)}_{\text{next}} = t^{(i)}_{\text{curr}} \cdot (u^{(i)})^{1 / m^{(i)}_t}, \quad u^{(i)} \sim \mathcal{U}[0, 1].
$$
This is intended to skip no-op denoising steps and adapt temporal resolution to uncertainty.

Second, **Greedy Confidence Decoding (GCD)** identifies the masked position and token with highest confidence:
$$
j^\star = \operatorname*{argmax}_{j \in \mathcal{M}_t} \left( \max_{v \in \mathcal{V}} p_\theta(x_j = v \mid \mathbf{x}_t^b, \mathbf{x}^{<b}) \right).
$$
The corresponding token is then deterministically revealed. The paper argues that this helps chemical validity by avoiding premature commitment to ambiguous tokens.

Third, **batched blockwise inference with caching** freezes the decoded prefix and denoises only the current block. With a sliding window, active attention cost becomes tied to local context rather than total molecule length.

The structural constraints attributed to SoftBD itself are fourfold: **intra-block bidirectional denoising**, **inter-block causal history**, **Greedy Confidence Decoding**, and the absorbing \([EOS]\) token for variable-length termination. The paper also identifies training on **ZINC-Curated** as a source of bias toward drug-like and synthetically accessible outputs. Its strongest evidence for effective structural control is empirical: near-100% validity, near-perfect repair of broken prefixes, and the inability of \(K=1\) or overly coarse \(K \ge 24\) to match the best granularity range.

## 5. Training setup and empirical performance

SoftBD is trained mainly on **ZINC-Curated (427M)**, described as a high-quality subset of ZINC-22 constructed to bias the prior toward pharmaceutically relevant molecules [2601.21964]. The curation pipeline has four stages: physicochemical filtering using \(\mathrm{QED}\) and \(\mathrm{SA}\); structural validity filters excluding, among other cases, molecules containing Si or Sn, non-neutral molecules, radicals, and large rings; medicinal chemistry rules including \(100 \le \mathrm{MW} \le 500\), \(\log P \le 5\), HBD \(\le 5\), and HBA \(\le 10\); and diversity-aware stratification by heavy atom count with a Tanimoto similarity threshold below \(0.5\) within each bucket. The resulting corpus contains about **427M drug-like molecules** with max SMILES length \(L=72\).

All SoftBD models use **AdamW**, learning rate \(3\times 10^{-4}\), \(\beta_1=0.9\), \(\beta_2=0.999\), \(\epsilon=10^{-8}\), weight decay \(=0\), linear warmup over the first 2,500 steps, constant learning rate afterward, mixed precision with bfloat16 activations and FP32 master weights, dropout \(0.1\), EMA decay \(0.9999\), and antithetic diffusion noise sampling. The main de novo model is trained for **6 epochs** on ZINC-Curated.

The main de novo baselines are **SAFE-GPT** and **GenMol**. Evaluation metrics include **Validity**, **Uniqueness**, **Diversity**, **Quality**, and **Docking-Filter**. Representative reported SoftBD settings are summarized below.

| Model setting | Selected metrics | Reported values |
|---|---|---|
| SoftBD \((p=0.9,\tau=0.9)\) | Validity, Quality, Docking-Filter, Diversity | 100.0%, 94.9%, 99.9%, 0.829 |
| SoftBD \((p=0.95,\tau=0.9)\) | Validity, Uniqueness, Quality, Diversity | 100.0%, 98.4%, 93.5%, 0.844 |
| SoftBD \((p=1.0,\tau=1.3)\) | Validity, Uniqueness, Quality, Diversity | 96.7%, 100.0%, 72.9%, 0.893 |
| SAFE-GPT | Validity, Quality, Diversity | 93.2%, 54.4%, 0.879 |
| GenMol | Validity, Quality, Diversity | 99.9%, 85.2%, 0.817 |

In these experiments, SoftBD generally matches or exceeds GenMol on drug-likeness metrics, decisively exceeds SAFE-GPT on validity and quality, and maintains strong diversity. The paper reports about **6.6× faster sampling** than GenMol for 10k molecules.

The ablations are central to the interpretation of SoftBD. For **Adaptive Confidence Decoding**, Table 6 reports the following progression: no FH/GCD/Batch gives validity \(88.6\%\), quality \(55.4\%\), and time \(1308.4\) s; FH only gives \(90.1\%\), \(55.2\%\), and \(512.5\) s; FH+GCD gives \(100.0\%\), \(80.4\%\), and \(471.6\) s; FH+Batch gives \(90.6\%\), \(55.7\%\), and \(9.6\) s; FH+GCD+Batch gives \(100.0\%\), \(81.9\%\), and \(10.3\) s. The paper interprets this as showing that FH mainly improves speed, GCD is the main quality and validity correction mechanism, batching provides massive throughput, and the full combination yields about **130× acceleration** over naive decoding while restoring perfect validity.

The corpus ablation reports that **SMILES-trained SoftBD** attains quality around \(61.4\%\), **SAFE-trained SoftBD** yields validity \(91.9\%\) and quality \(59.0\%\), and **ZINC-Curated-trained SoftBD** yields quality around \(81.0\%-81.9\%\) with validity near \(100\%\). The granularity ablation identifies a best plateau at approximately
$$
K_{\text{train}} \in [4,12], \quad K_{\text{sample}} \in [2,12].
$$
At \(K_{\text{train}}=1\), validity degrades; at \(K_{\text{train}}\ge 24\), quality degrades.

## 6. Role inside SoftMol, limitations, and naming

Within **SoftMol**, SoftBD is not itself the protein-aware scoring system. Target-awareness is introduced by using SoftBD as a generative prior inside a **gated MCTS** search over soft-fragment actions [2601.21964]. The target-specific optimization objective is
$$
\begin{split}
\mathbf{x}^* &= \operatorname*{argmin}_{\mathbf{x}} \mathrm{DS}(\mathbf{x}) \\
\text{s.t. } &\quad \mathrm{QED}(\mathbf{x}) > \tau_{\text{QED}}, \; \mathrm{SA}(\mathbf{x}) < \tau_{\text{SA}}.
\end{split}
$$
In this MDP, a state \(s_b\) is a partial molecule with \(b\) soft fragments, and an action \(a\) is generation of the next block:
$$
\mathbf{x}^{b+1} \sim p_\theta(\cdot \mid s_b).
$$
SoftBD therefore provides the action distribution, while target information enters through docking-based reward and a **Tunable Feasibility Gate**:
$$
R(\mathbf{x}) =
\begin{cases}
-\mathrm{DS}(\mathbf{x}) & \text{if } \mathrm{QED}(\mathbf{x}) \ge \tau_{\text{QED}} \;\land\; \mathrm{SA}(\mathbf{x}) \le \tau_{\text{SA}},\\
R_{\mathrm{pen}} & \text{otherwise.}
\end{cases}
$$
The default constrained setting is \((\tau_{\text{QED}},\tau_{\text{SA}})=(0.5,5.0)\), and the unconstrained setting is \((0,+\infty)\).

On five targets—parp1, fa7, 5ht1b, braf, and jak2—the reported system-level result is that SoftMol achieves state-of-the-art novel top-hit 5% docking scores, with the abstract summarizing the effect as a **9.7% improvement in binding affinity**, **2–3× more structural diversity**, **100% chemical validity**, and a **6.6× speedup in inference efficiency**. The paper attributes these gains only partly to SoftBD, but it explicitly connects them to the **generative soft-fragment action space** created by SoftBD: it is open-ended rather than retrieval-limited, tunable in granularity, and more expressive than rigid fragment libraries.

The limitations relevant to SoftBD are also explicit. The model operates on **1D molecular strings** and does not directly reason about **3D conformation, steric fit, or pocket geometry** during generation. It depends on proxy objectives such as **QED**, **SA**, and docking scores. Granularity extremes fail: too-small blocks reduce the benefit to nearly token-level autoregression and hurt validity, whereas too-large blocks make diffusion reconstruction too hard and increase latency due to quadratic attention cost. The method is developed for **bounded-length small molecules**, and its suitability for macromolecules, polymers, or domains with much longer-range structural dependencies is stated as unproven. In addition, target-awareness is indirect: SoftBD itself is not target-conditioned via protein input.

The term **SoftBD** should also be distinguished from superficially similar names in unrelated arXiv papers. "Introducing Business Language Driven Development" [1011.2238] concerns **Business Language Driven Development (BLDD)**, an extension of BDD for enterprise systems, and does not use the term SoftBD. "Hard and Soft Spherical-Bound Stack decoder for MIMO systems" [0811.1000] uses the term **soft SB-Stack decoder**, not SoftBD. In the arXiv material considered here, **SoftBD** refers specifically to the **Soft Block Diffusion** model introduced within SoftMol.

Source: https://www.emergentmind.com/topics/softbd