3D structure generation via denoising — DiffDock / DiffSBDD-style equivariant diffusion for small molecules and binding poses
Denoising diffusion probabilistic models (DDPMs) generate data by learning to reverse a fixed, gradual noising process. For molecule generation, the "data" is a point cloud in joint space: 3D atomic coordinates plus categorical atom/bond features. Sampling always begins at the end of the forward process — pure noise — with no memory of any real molecule.
A DDPM defines a fixed Markov chain that gradually corrupts a real data point x₀ (here: atom coordinates + types of a real molecule) into noise over T steps:
q(x_t | x_{t-1}) = N(x_t; √(1-β_t)·x_{t-1}, β_t·I)
Each step adds a small amount of Gaussian noise, controlled by a variance schedule β_t (linear or cosine). After enough steps, x_T is indistinguishable from an isotropic Gaussian N(0,I) — all trace of the original molecular structure is destroyed. For molecules, this corruption is applied jointly to continuous 3D atom coordinates and, in categorical-feature formulations, to atom/bond type distributions (often via a separate discrete diffusion or a continuous relaxation, e.g. one-hot vectors diffused in ℝⁿ as in EDM).
Crucially, x_t can be sampled in closed form directly from x₀ without simulating every intermediate step, since the chain is Gaussian: x_t = √(ᾱ_t)·x₀ + √(1-ᾱ_t)·ε, with ᾱ_t = ∏(1-β_s). This closed-form reparameterization is what makes DDPM training tractable — a random timestep t and a random true molecule x₀ from the training set are all that is needed to construct a training example.
At t=T, molecular diffusion models are provably at maximum entropy: the noised sample is statistically indistinguishable from unstructured Gaussian noise, meaning literally any molecule (or non-molecule) could be "hiding" underneath — the entire burden of chemistry falls on the reverse process.
Earlier generative approaches to molecules — variational autoencoders (VAEs) over SMILES strings, generative adversarial networks (GANs) over molecular graphs, or autoregressive transformers over token sequences — build a molecule by sampling from a learned latent code or emitting tokens one at a time. Diffusion instead treats generation as iterative refinement of an entire 3D structure at once: every atom's position and identity is present from step one, just badly guessed.
This "whole-structure-at-once" formulation is a natural fit for 3D molecular generation because bond lengths, angles, and steric clashes are inherently global, simultaneous constraints — not sequential ones. An autoregressive model that places atoms one-by-one must commit to early decisions before later context is available; a diffusion model can revise every atom at every step in light of the full current guess.
A subtlety specific to 3D molecular diffusion: translation invariance. If the noise distribution N(0,I) is applied naively to absolute coordinates, the model would need to also learn to generate an arbitrary center of mass, wasting capacity on a physically meaningless degree of freedom. E(3)-equivariant diffusion models (e.g. Hoogeboom et al.'s EDM) solve this by defining the noise process on the zero center-of-mass subspace: the mean atomic position is subtracted out and held at the origin throughout diffusion, so the learned distribution only has to model relative atomic geometry and identity, not absolute placement in space.
| Product | Indication | Trial Design | Key Result |
|---|---|---|---|
| Denoising Diffusion (DDPM) | Full 3D coordinates + types, iterative refinement | Learn to reverse a fixed Gaussian noising process over T steps; E(3)-equivariant GNN denoiser | State-of-the-art 3D validity & diversity; naturally handles pocket conditioning |
| Variational Autoencoder (VAE) | Continuous latent code, often over SMILES/graphs | Encoder maps molecule to latent Gaussian; decoder reconstructs; KL-regularized | Fast single-shot sampling; smooth interpolatable latent space |
| Generative Adversarial Network (GAN) | Molecular graphs or voxelized 3D density | Generator vs. discriminator adversarial training, e.g. MolGAN | Very fast sampling once trained; sharp, non-blurry outputs |
| Autoregressive / Transformer | SMILES / SELFIES token sequences or atom-by-atom graphs | Next-token / next-atom prediction conditioned on prior sequence | Exact likelihood, simple training, strong for 1D/2D chemical language |
| Flow Matching / Continuous Normalizing Flow | Continuous coordinate trajectories via learned vector field | Regress a velocity field transporting noise to data along straight(er) paths | Fewer function evaluations than DDPM for comparable quality; deterministic ODE sampling |
Generation happens by running the noising process backward: starting from x_T ~ N(0,I), a neural network iteratively predicts the noise (or the clean signal) at each step and removes it, gradually sculpting a coherent 3D molecule out of chaos. The network doing this must respect a hard physical symmetry — molecular energy and identity do not change if you rotate or translate the whole structure — which is why E(3)/SE(3)-equivariant graph neural networks (EGNNs) are the architecture of choice.
The reverse process is parameterized as p_θ(x_{t-1} | x_t) = N(x_{t-1}; μ_θ(x_t, t), Σ_t), where a neural network μ_θ predicts either the added noise ε_θ(x_t,t) or the denoised structure x̂₀ directly at every step. Training minimizes a simplified variational bound that reduces to a simple regression loss: L = E‖ε − ε_θ(x_t, t)‖². At sampling time, this same network is applied T times (or fewer, with accelerated samplers like DDIM or DPM-Solver, which reformulate the reverse process as an ODE and can converge in 20–50 steps), each time nudging the noisy structure closer to a plausible molecule.
During the middle portion of the trajectory (roughly t≈500–700 down to t≈150 in a 1000-step schedule) the coarse skeleton first becomes visible: the network has enough signal-to-noise ratio to commit to an approximate atom count, a rough spatial extent, and tentative clustering of atoms that will eventually become rings or chains — but bond identities and exact atom types are still highly uncertain.
A molecule's energy, validity, and identity are invariant to rigid transformations — rotate a benzene ring in space and it is still the same benzene ring. If the denoising network were an ordinary MLP or a non-equivariant GNN, it would have to separately learn to denoise every possible orientation of every molecule, wasting enormous model capacity and data. Equivariant architectures instead guarantee f(Rx+t) = Rf(x)+t for any rotation R and translation t by construction, typically by passing messages that depend only on relative distances and directions between atoms (not absolute coordinates), and by updating vector-valued (type-1) features through equivariant linear combinations rather than arbitrary nonlinear mixing.
EGNN (Satorras et al. 2021), used in EDM, updates coordinates via a weighted sum of relative direction vectors: x_i ← x_i + Σ_j (x_i−x_j)·φ(‖x_i−x_j‖, h_i, h_j), which is manifestly equivariant since it only ever adds multiples of relative displacement vectors. More expressive variants (Tensor Field Networks, e3nn-based networks, or the SE(3)-Transformer used in RoseTTAFold/RFdiffusion and DiffDock) use spherical harmonics to represent and mix higher-order (type-≥1) tensor features while preserving equivariance exactly.
Without built-in equivariance, a model would need to see a molecule in thousands of random orientations during training just to learn a symmetry that E(3)-equivariant architectures get for free — one of the clearest wins of geometric deep learning applied to chemistry.
Real molecules mix continuous data (3D coordinates) with categorical data (atom element, formal charge, bond order). EDM and successors handle this by embedding categorical variables as one-hot vectors and diffusing them in continuous space alongside coordinates, then rounding to the nearest category at the end of sampling — or by running a genuinely discrete diffusion process (absorbing-state or uniform-transition Markov chains, as used in some later variants) for the categorical channels while keeping a Gaussian process for coordinates. Either way, at intermediate timesteps the atom "identity" is a soft, uncertain mixture over element types — visually, an atom might be flickering between looking like carbon and nitrogen until enough denoising steps commit it to one answer.
As the reverse process advances past its midpoint, uncertainty collapses fast: atom types settle into concrete elements, and bonds — inferred either explicitly by a bond-diffusion channel or implicitly from converged interatomic distances — begin to satisfy the valence rules of organic chemistry. Because the denoiser is equivariant, this convergence happens identically regardless of how the noise happened to be oriented in space.
A denoising diffusion model does not explicitly draw bonds as a first-class output in every formulation — some models diffuse only atom positions and types and infer bonds afterward from interatomic distances and standard covalent-radius lookup tables (as in EDM); others (e.g. MolDiff, later DiffSBDD variants) diffuse a bond/edge-type channel jointly with atoms so the model directly outputs a labeled molecular graph. In both cases, the mid-to-late denoising steps are where a fog of approximately-right distances crystallizes into an unambiguous set of single/double/aromatic bonds.
Validity checking, typically performed with RDKit's sanitization routines, verifies that: (1) every atom's bonds sum to a chemically allowed valence given its element and charge, (2) aromatic rings satisfy Hückel-like planarity/conjugation patterns, and (3) no atom has an impossible bond count (e.g. five bonds to carbon). Models trained on datasets like QM9 or GEOM-Drugs report validity rates in the 85–98% range depending on model size, sampler, and dataset complexity — the remainder are usually discarded or passed through corrective post-processing before further use.
Generating 2D molecular graphs (as many earlier VAE/GAN/autoregressive models do) and only afterward embedding them into 3D coordinates via classical conformer generators (e.g. RDKit ETKDG or distance-geometry embedding) can produce graphs that are combinatorially valid but geometrically strained or simply unrealizable at low energy — bond angles that a real molecule could never actually adopt. Diffusion models that generate coordinates and types jointly are implicitly regularized by realistic 3D geometry throughout the entire denoising trajectory, because the training data itself consists of real, energy-minimized 3D conformers. The result is molecules whose bond lengths and angles are close to what a quantum-chemistry geometry optimization would produce, without ever running DFT.
On the QM9 benchmark, E(3) Equivariant Diffusion Models (EDM, Hoogeboom et al. 2022) generate molecules with bond length distributions statistically close to the training distribution and atom stability above 98% — the fraction of individual atoms whose valence exactly matches a chemically valid configuration.
Full chemical validity requires more than connectivity — formal charges must balance, and stereocenters (chiral carbons, double-bond E/Z geometry) must be geometrically consistent with the 3D coordinates the model produced. Because the diffusion process operates natively in 3D, chirality actually falls out naturally from atomic arrangement rather than needing a separate categorical label, unlike graph-only generative models which must predict stereo-descriptors symbolically and risk producing self-contradictory 2D+stereo annotations. Formal charge is typically handled as an additional categorical channel diffused alongside atom element, resolved at the same time atom identity is finalized.
For drug discovery, generating a chemically valid molecule floating in empty space is only half the problem — the molecule must also fit a specific target protein binding pocket, both geometrically (shape complementarity, no steric clashes) and chemically (hydrogen bonds, hydrophobic contacts, electrostatics). DiffDock (Corso et al., ICLR 2023) reframes molecular docking itself as a reverse-diffusion sampling problem over ligand poses; DiffSBDD (Schneuing et al.) goes further and generates the ligand's identity and pose jointly, conditioned on the fixed pocket structure.
Classical docking tools (AutoDock Vina, Glide) treat pose prediction as an optimization problem: search over a scoring function's energy landscape for the pose with lowest predicted binding energy, using techniques like simulated annealing or genetic algorithms. DiffDock instead treats the docking pose itself as a sample from a learned distribution p(pose | ligand, pocket), generated by reverse diffusion over a reduced degree-of-freedom space: rigid-body translation (∈ℝ³), rotation (∈SO(3)), and torsion angles of rotatable bonds (∈ a torus 𝕋ⁿ) — rather than diffusing every atom's Cartesian coordinates independently. This product-space formulation (ℝ³ × SO(3) × 𝕋ⁿ) is dramatically lower-dimensional than full atomic diffusion and lets the model concentrate capacity on the degrees of freedom that actually matter for binding.
A separate confidence model, trained to predict pose quality (RMSD to the true bound structure), is used to rank the ~40 sampled poses per complex — the top-ranked pose is reported as the predicted binding mode.
DiffSBDD (structure-based drug design) pushes further: instead of docking a pre-specified ligand, it generates a novel ligand's atoms and 3D coordinates de novo, conditioned throughout the entire reverse diffusion trajectory on the fixed, un-noised coordinates of the target protein pocket. The pocket atoms act as a permanent geometric and chemical context — every equivariant message-passing step lets ligand atoms "see" nearby pocket residues (their positions and types) and adjust accordingly, so shape complementarity and favorable non-covalent contacts (hydrogen bond donors/acceptors aligned with pocket residues, hydrophobic ligand atoms in hydrophobic sub-pockets) emerge as the joint result of denoising rather than as a separate downstream optimization step.
Two conditioning modes are common: (1) conditional generation, where the pocket is fixed context from the first step, and (2) inpainting-style generation, where a partial ligand scaffold (e.g. a known fragment or hinge-binding motif) is also held fixed while the rest of the molecule is generated around it — useful for fragment-growing and scaffold-hopping campaigns in medicinal chemistry.
DiffSBDD-generated molecules achieve predicted binding affinities (via docking re-scoring) competitive with or exceeding molecules generated by earlier autoregressive structure-based generators like Pocket2Mol, while also producing higher 3D geometric validity — a direct benefit of native 3D diffusion over sequential atom placement.
Both DiffDock-style docking and DiffSBDD-style pocket-conditioned generation expose an effective "guidance strength" knob (whether implemented as classifier-free guidance scaling, cross-attention temperature, or the strength of an auxiliary steric/interaction loss blended into the denoising update). High guidance strength pulls generated poses tightly into the pocket's exact contours — maximizing predicted affinity and complementarity, but risking overfitting to a single rigid pocket conformation and reduced chemical diversity. Lower guidance strength allows more exploration and more diverse chemotypes, at some cost to how snugly any individual sample fits the target, mirroring the classic exploration/exploitation trade-off seen in classifier-free guidance for image diffusion models.
A single completed reverse-diffusion trajectory is rarely the end of the pipeline. Because sampling is cheap (seconds per molecule on a GPU) and stochastic (different random noise seeds give different molecules), practical structure-based design generates large batches of candidates and applies a funnel of computational filters — chemical validity, drug-likeness, synthesizability, and predicted binding affinity — before any molecule is considered for synthesis.
A typical generation campaign samples a batch (tens to hundreds) of independent reverse-diffusion trajectories, each starting from an independent noise draw, optionally conditioned on the same target pocket. Each finished sample then passes through sequential filters:
1. Chemical sanitization (RDKit): reject anything with impossible valence, disconnected fragments, or unparsable structure. 2. Drug-likeness scoring: Quantitative Estimate of Drug-likeness (QED), Lipinski Rule-of-Five compliance (MW<500, logP<5, H-bond donors≤5, acceptors≤10), synthetic accessibility (SA) score. 3. Novelty / diversity filtering: Tanimoto fingerprint similarity against the training set and against other retained candidates, to avoid redundant near-duplicates. 4. Affinity re-scoring: the generated 3D pose is re-scored with an independent physics-based or ML scoring function (e.g. re-docking with Vina, or a trained affinity predictor) as a sanity check against the diffusion model's own implicit preferences.
Only molecules that clear every stage are ranked and forwarded to medicinal chemists for synthesis prioritization — typically a small fraction (10–30%) of the original batch.
Because each diffusion trajectory starts from independent Gaussian noise, batch sampling naturally explores many distinct regions of chemical space in parallel — a structural advantage over methods that must be explicitly driven toward diversity (e.g. genetic algorithms needing mutation operators, or RL policies needing entropy bonuses). The guidance strength and number of diffusion steps both modulate this trade-off: fewer steps (fast samplers) and lower guidance yield more diverse but sometimes lower-quality candidates; more steps and stronger pocket guidance yield more optimized but more homogeneous candidates clustered around a few high-scoring chemotypes. Well-run campaigns typically sweep both parameters and pool results.
In benchmark structure-based generation studies, diffusion models routinely produce batches where over 90% of retained, filtered molecules have no close analog (Tanimoto similarity <0.4) in the training database — evidence that the models are genuinely generalizing chemical space rather than memorizing and recombining training molecules.
Passing every in-silico filter is necessary but not sufficient — the true test remains wet-lab synthesis and binding assay (SPR, ITC, or enzymatic activity depending on target class). Structure-based diffusion generation is increasingly used not to directly propose a final drug candidate, but to rapidly expand and diversify a virtual library for downstream high-throughput or focused physics-based re-scoring (FEP, MM-GBSA), narrowing thousands of computationally cheap diffusion samples down to the tens of compounds worth the far greater expense of synthesis and assay. The net effect is a large reduction in the search space medicinal chemists must explore manually, compressing months of scaffold-hopping intuition into hours of GPU sampling.