Classifier-Guided Latent Diffusion for Small-Molecule Generation

Ali Forooghi, Luis Rueda, Alioune NgomarXiv 2026 · arXiv

TL;DR

This paper introduces a latent diffusion framework that leverages pretrained molecular language model embeddings (ChemBERTa) to generate novel small molecules. By applying classifier guidance during the denoising process, the authors demonstrate the ability to steer generation toward specific biological properties, such as blood–brain barrier permeability, while maintaining 100% chemical validity.

What Problem Does This Paper Address?

The chemical search space for potential drugs is astronomically large, making exhaustive experimental screening impossible. Generative models aim to solve this by "designing" molecules that fit specific criteria. However, existing methods face a trade-off:

  1. String-based models (SMILES) often produce syntactically invalid strings (e.g., unclosed rings).
  2. Graph or 3D-based models are chemically expressive but computationally expensive and require specialized architectures to handle symmetry and geometry.

The authors address these gaps by performing diffusion in a latent space—a compressed, continuous representation of molecules. This allows them to use powerful, pretrained language models while ensuring the final outputs are chemically sound.

Methods

The proposed pipeline consists of four main stages:

  1. Encoding: Canonicalized SMILES strings are passed through a frozen ChemBERTa-2 encoder. This maps discrete molecules into a continuous, high-dimensional latent space ($\mathbb{R}^d$).
  2. Latent Diffusion: An unconditional Denoising Diffusion Probabilistic Model (DDPM) is trained to learn the distribution of these latent embeddings. It learns to reverse a Gaussian noising process, effectively learning how to "construct" a valid molecular embedding from pure noise.
  3. Classifier Guidance: To target specific properties, the authors train a differentiable property predictor (a "guidance head") on the latent space. During the sampling process, the gradients from this predictor steer the denoising trajectory toward regions of the latent space associated with the desired property (e.g., high permeability).
  4. Decoding: The generated latent vectors are transformed back into molecular strings using a Transformer-based decoder. Crucially, the decoder outputs SELFIES strings rather than SMILES. SELFIES are a robust representation where every possible string corresponds to a valid molecular graph, virtually eliminating syntactic errors.
The property-guided molecular generation framework, showing the encoding, diffusion, and guided decoding process.

Datasets

  • ZINC250K: A standard dataset of ~250,000 drug-like molecules used to train the core diffusion model and the Transformer decoder.
  • BBBP (Blood-Brain Barrier Penetration): A MoleculeNet dataset used to train the property classifier for predicting whether a molecule can cross the blood-brain barrier.
  • BACE-1 (Beta-secretase 1): A MoleculeNet dataset used to train the classifier for identifying inhibitors of the human $\beta$-secretase 1 enzyme, a target for Alzheimer's disease.

Key Insights and Ideas

  • Pretrained Embeddings as a Shortcut: Instead of training a Variational Autoencoder (VAE) from scratch, the authors show that embeddings from a pretrained molecular language model (ChemBERTa) provide a sufficiently rich latent space for diffusion.
  • The SELFIES Advantage: By decoding to SELFIES, the model bypasses the "invalid string" problem that plagues many SMILES-based generative models. This ensures that the generated "noise" in the latent space still maps to a real molecule.
  • Guidance as a "Dial": The guidance strength ($g$) acts as a tunable hyperparameter. Increasing $g$ improves the predicted property scores but tends to narrow the structural diversity (scaffold diversity) of the generated molecules.
  • Robustness Training: The decoder is trained on both "clean" and "perturbed" (noisy) latent embeddings. This makes the decoder more resilient to the slight imperfections inherent in the diffusion sampling process.

Key Results

  • Perfect Validity: Across all experiments, the model achieved a 1.000 validity score, meaning every single generated molecule was a valid chemical structure according to RDKit.
  • Effective Steering: For the BBBP task, increasing the guidance strength from $g=0$ (unguided) to $g=5$ increased the mean property score from 0.811 to 0.874 and the "strict success rate" (probability > 0.8) from 0.668 to 0.800.
  • Novelty: The model maintained a novelty score of 1.000, indicating that it wasn't just memorizing the ZINC training set but was generating entirely new molecular structures.
  • Task Difficulty: The model performed better on BBBP than BACE-1, highlighting that some biological endpoints are harder to steer toward than others due to the complexity of the underlying chemical distributions.

Limitations and Future Work

  • In Silico vs. In Vitro: The "success" of the molecules is based on model-predicted scores. The authors acknowledge that these results need to be interpreted as model-predicted probabilities rather than experimental confirmation.
  • Diversity Trade-offs: Stronger guidance leads to a shift in the chemical distribution (e.g., lower molecular weight or TPSA). Future work could explore multi-objective optimization to balance property enrichment with chemical diversity.
  • Baselines: The authors suggest that future studies should include direct comparisons against other state-of-the-art graph-based and VAE-based diffusion models to further benchmark performance.

Summary updated

Abstract

Diffusion models have emerged as a promising class of generative models for molecular design because of their ability to learn complex chemical distributions and support conditional or guided generation. In this work, we investigate a latent diffusion pipeline for property-guided small-molecule generation. The proposed framework represents canonicalized SMILES strings using a frozen ChemBERTa encoder, trains a Transformer-based decoder to reconstruct SELFIES strings from molecular latent embeddings, and learns an unconditional denoising diffusion model in the ChemBERTa latent space. To enable property-directed generation, a differentiable latent property predictor is used to guide the diffusion sampling process. Generated SELFIES strings are converted to SMILES, validated using RDKit, and evaluated using molecular validity, uniqueness, novelty, and predicted property scores. We study guidance toward two drug-relevant binary endpoints: blood--brain barrier permeability and inhibition of human $β$-secretase 1. The results suggest that latent diffusion over pretrained molecular embeddings can generate chemically valid and novel molecules while enabling controllable steering toward desired molecular properties.
BibTeX
@misc{forooghi2026classifier,
  author = {Ali Forooghi and Luis Rueda and Alioune Ngom},
  title = {{Classifier-Guided Latent Diffusion for Small-Molecule Generation}},
  year = {2026},
  eprint = {2611.17650},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.17650},
}
Figure