Predictive Feature Caching for Training-free Acceleration of Molecular Geometry Generation

Johanna Sommer, John Rachwan, Nils Fleischmann, Stephan Günnemann, Bertrand Charpentier

TL;DR

Flow matching models generate realistic 3D molecular geometries but suffer from high inference latency because they require hundreds of sequential neural network evaluations. This work introduces the first training-free, drop-in predictive feature caching scheme for molecular geometry generation, exploiting smooth temporal trajectories in intermediate neural representations while strictly preserving geometric equivariance. On the GEOM-Drugs benchmark, it delivers a 2× to 3× speedup with minimal quality loss, and reaches up to a 7.1× end-to-end wall-clock speedup when combined with standard compiler and precision optimizations.

What Problem Does This Paper Address?

In computational drug discovery, generative models must explore massive chemical spaces—often screening anywhere from 500,000 to over a million candidate molecules. State-of-the-art flow matching models generate high-fidelity 3D molecular geometries by integrating ordinary differential equations (ODEs) across dozens to hundreds of discrete time steps.

Because each step queries a computationally intensive neural backbone, generation quickly becomes a major bottleneck. Prior acceleration methods tailored for molecules—such as trajectory straightening, progressive distillation, or latent diffusion—all require expensive retraining, architectural modifications, or specialized data curation. The authors address this by developing a purely post-training, training-free caching method that accelerates inference directly on existing pretrained models.

Methods

Rather than running full backbone forward passes at every step of the ODE solver, the authors exploit the temporal smoothness of network activations:

  • Last-Block Forecasting: Motivated by sequential processing in transformer-based architectures, the method caches and predicts activations entering the final backbone block ($L$). This allows the model to completely bypass the computational burden of all preceding layers ($g_{1:L-1}$) on cached steps.
  • Predictive Caching Schemes: Instead of naive zero-order feature reuse (which accumulates drift), the authors adapt two multi-step forecasting strategies:
  • TaylorSeer: Uses a local Taylor-series expansion approximated via finite differences (order $m$).
  • Adams–Bashforth (AB) Multi-Step: Employs a linear multi-step recursion (order $j$) based on previously materialized cache points.
  • Equivariance Preservation: In 3D molecular generation, the velocity field must obey $E(3) \times S_N$ symmetry (invariance/equivariance under 3D rotations, translations, and atom permutations). Because the caching estimators are scalar linear combinations over time, they commute with the group action, rigorously guaranteeing that equivariance is preserved.
  • System-Level Compatibility: To enable compatibility with PyTorch graph compilation, the authors structure the implementation so that the backbone is compiled while the cache control logic remains outside the compiled computational graph.

Datasets

The authors evaluate their approach on two standard molecular benchmarks:

  • GEOM-Drugs: The primary evaluation benchmark, consisting of medium-to-large drug-like molecules with continuous 3D conformations.
  • QM9: A secondary, simpler benchmark consisting of small organic molecules (evaluated in Appendix A).

Evaluations are performed using pretrained checkpoints from SemlaFlow, an equivariant flow-matching base model.

Key Insights and Ideas

  • Smooth Trajectories in Chemical Space: Principal component analysis reveals that both atom coordinates and atom-type representations evolve along smooth, continuous trajectories during the ODE integration.
  • Diminishing Early Predictability: Linear prediction errors are highest during early integration steps (when features reorient rapidly) and drop significantly in later steps, explaining why feature forecasting closely tracks full trajectory evaluations as generation proceeds.
  • Higher-Order Multi-Step Wins: Adams–Bashforth ($j = 3$) and second-order TaylorSeer ($m = 2$) consistently outperform naive zero-order caching, and AB caching slightly outperforms TaylorSeer across most step budgets.
  • Orthogonal Compounding: Because predictive feature caching is purely algorithmic, it stacks multiplicatively with hardware-level optimizations (TF32 arithmetic and PyTorch graph compilation).

Key Results

Experiments conducted on a single NVIDIA H100 PCIe GPU generating 10,000 molecules demonstrated:

  • Iso-Quality 2× Speedup: Reducing effective solver steps from 100 to 51 using caching matched or slightly improved conformer physical metrics (Energy dropped from $108.8$ to $96.5\text{ kcal}\cdot\text{mol}^{-1}$ with AB $j=3$; validity remained essentially unchanged at $0.87$ vs. $0.88$ for the 100-step baseline). By contrast, simply cutting the ODE solver to 51 steps without caching degraded validity and significantly worsened energy/strain.
  • Aggressive Acceleration: At 26 effective steps, cached models maintained low energy and molecular stability ($0.96$–$0.97$) while boosting throughput from $11.4$ to over $41\text{ molecules/s}$ (~3.6× speedup), with only a small drop in PoseBusters/PRC validity ($0.82$ vs. $0.88$).
  • End-to-End Latency Reduction: Combining AB caching with PyTorch graph compilation and TensorFloat-32 (TF32) yielded a 7.1× wall-clock speedup, slashing the generation time for 10,000 molecules from over 14 minutes down to ~2 minutes with minimal peak memory overhead (~1 GB).

Limitations and Future Work

  • Validity Penalty at Low Step Counts: When pushed to aggressive speedups (e.g., 26 steps), there is a moderate drop in the percentage of generated molecules passing strict stereochemical and steric checks (PoseBusters validity).
  • Early-Step Sensitivity: Features fluctuate more heavily in initial steps; incorporating adaptive step-skipping or confidence-gated caching (rather than fixed step intervals) could further boost stability.
  • Scope: The evaluation focuses primarily on unconditional generation with SemlaFlow under an Euler solver; evaluating across other conditional generation tasks (e.g., structure-based drug design) and higher-order ODE solvers remains open for future research.

Summary updated

BibTeX
@article{sommer2026predictive,
  author = {Johanna Sommer and John Rachwan and Nils Fleischmann and Stephan Günnemann and Bertrand Charpentier},
  title = {{Predictive Feature Caching for Training-free Acceleration of Molecular Geometry Generation}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure