Scaling the Prior: Size-Consistent Geometric Diffusion for 3D Molecular Generation

Wenhan Gao, Jingxiang Qu, Yi Liu

Introduction

Diffusion models have emerged as the premier approach for generating 3D molecular structures. These models operate by gradually corrupting data with noise during a forward process and training a neural network to reverse that corruption. However, molecular data presents a unique geometric challenge: molecules vary significantly in size (number of atoms), and in 3D space, a molecule's size inherently dictates its spatial scale.

While modern architectures like Graph Neural Networks (GNNs) and Transformers can handle variable-sized inputs, they often overlook the physical implications of spatial scale. This paper identifies a critical flaw in standard 3D molecular diffusion—size-induced inconsistency—and introduces a novel, mathematically grounded solution called Scaling the Prior (StP) to harmonize generative trajectories across molecules of all sizes.

The Core Issue: Size-Induced Inconsistency

In standard diffusion models, the same level of Gaussian noise is applied regardless of the molecule's size. From a physical standpoint, this creates a severe imbalance. For a tiny molecule, standard noise acts as a catastrophic perturbation that obliterates its structure almost instantly. Conversely, for a massive protein fragment, the exact same noise might only slightly wiggle its atomic coordinates.

Consequently, during the reverse (generative) process, large molecules establish their "coarse structure" much earlier than small ones because their spatial scales are larger relative to the noise. This lack of a unified generative pattern forces the model to learn divergent denoising behaviors for different sizes, leading to suboptimal generation quality, particularly for smaller molecules. Counterintuitively, this phenomenon explains why standard models often generate large molecules with higher fidelity than small ones, as the large molecules are effectively "shielded" by their scale.

Methodology: Quantifying and Solving the Inconsistency

Quantifying the Problem

To rigorously analyze this inconsistency, the authors introduce two novel metrics that track how quickly a molecule settles into its final form during the reverse process:

  • Shape Alignment Coefficient ($\gamma_t$): Measures how well the noisy coordinates align with the final 3D structure at timestep $t$.
  • Atom Type Alignment Ratio ($\beta_t$): Measures the stability of categorical atom identities throughout the denoising trajectory. Using these metrics, the analysis confirms that larger molecules stabilize significantly faster under standard noise schedules.

Scaling the Prior (StP)

To resolve this, the authors propose that the noise variance should be proportional to the molecule's physical scale. Instead of relying on a standard Gaussian prior $\mathcal{N}(0, I)$, StP utilizes a size-dependent variance:

$$ \gamma_N = \frac{\mathbb{E}_{x \sim \mathcal{D}_N}[s(x)]}{Z} $$

Here, $s(x)$ represents the scale of the molecule (calculated via its convex hull), and $Z$ is a dataset-wide normalization factor.

Crucially, the authors prove that Scaling the Prior is mathematically equivalent to normalizing the data coordinates, but it avoids the fatal flaw of "chemical distortion." Directly normalizing coordinates to a fixed scale would alter bond lengths and angles, destroying the molecule's chemical validity. StP achieves the mathematical benefits of normalization while perfectly preserving the underlying physical chemistry.

Experimental Setup and Key Results

The researchers evaluated StP on two industry-standard benchmarks: QM9 (~130k small organic molecules up to 29 atoms) and GEOM-Drugs (complex, drug-like molecules up to 181 atoms). The method was applied to three top-tier diffusion backbones: EDM, RADM (DiT-B), and GeoLDM.

The integration of StP yielded significant improvements across the board:

  • New State-of-the-Art: GeoLDM-StP achieved a new SOTA on the QM9 dataset, reaching 90.70% Molecule Stability (an improvement from the previous 89.40%).
  • Massive Stability Boosts: Simply adding StP to the original EDM model on QM9 caused Molecule Stability to jump from 82.00% to 88.07%.
  • High Structural Fidelity: StP significantly reduced the Jensen-Shannon Divergence (JSD) for bond lengths and angles, indicating that the generated molecules are much more physically plausible.
  • Engineering Efficiency: The paper introduces an optimized sampling algorithm that sorts molecules by size within batches. This avoids padding every batch to the size of the largest molecule in the dataset, accelerating generation by up to 12.21x for EDM on GEOM-Drugs (reducing per-sample time from ~13 seconds to ~1 second).

Limitations and Future Directions

While StP sets a new standard for 3D molecular diffusion, the authors note a few areas for future exploration. First, extending StP to flow-matching models—a popular alternative to diffusion—shows preliminary success but requires a full theoretical treatment for non-Gaussian priors. Second, the current framework focuses on "atom-only" models (generating coordinates and types) and does not explicitly model bond orders or formal charges during diffusion. Finally, future work will explore applying StP to downstream tasks like structure-based drug design and integrating these robust geometric representations with Large Language Models (LLMs) for advanced scientific reasoning.

Summary updated

Abstract

Diffusion models typically operate in fixed-dimensional metric spaces, whereas 3D geometric molecular data vary in dimensionality because molecules differ in size (number of atoms). A common adaptation in diffusion models for 3D molecular generation is to use models that handle variable-sized inputs, such as graph neural networks and transformers. However, these approaches ignore that molecular size also sets the spatial scale of atomic coordinates, causing inconsistent generative trajectories. In 3D molecular diffusion, generation can be seen as forming a coarse structure first and then refining atomic positions. Larger molecules form coarse structures earlier than smaller ones because their spatial scales are larger relative to the noise. This makes the generative process inconsistent across sizes, with trajectories driven by molecular size rather than by a unified generative pattern. We are the first to identify and analyze this size-induced inconsistency by decomposing denoising dynamics, showing how spatial scale shapes formation of both 3D structure and atom types. Based on this, we propose Scaling the Prior (StP), which rescales the prior distribution by molecular size to normalize learning across sizes, harmonize denoising trajectories, and generate high-quality molecules. The code is available at https://github.com/wenhangao21/ICML26-StP.
BibTeX
@inproceedings{gao2026scaling,
  author = {Wenhan Gao and Jingxiang Qu and Yi Liu},
  title = {{Scaling the Prior: Size-Consistent Geometric Diffusion for 3D Molecular Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=5aH5eYIAFQ},
}
Figure