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.
Figures & tables
Figure 1: Property-guided molecular generation framework. (a) Molecules are encoded into the ChemBERTa-2 latent space, optimized by classifier-guided reverse diffusion, decoded to molecular strings, and validated with RDKit. (b) The transformer decoder reconstructs SELFIES from perturbed latent embeddings. (c) The diffusion model predicts noise added to latent representations. (d) The property classifier scores generated molecules, while the guidance head steers sampling toward target properties.
Table 1: Datasets used for generative and property-model training, including their sources and data-splitting strategies.
Metric
Abbrev.
Direction
Definition
Validity
Validity
↑
Fraction of generated molecules that pass RDKit parsing, sanitization, and chemistry-consistency checks.
Uniqueness
Unique
↑
Fraction of valid generated molecules that are unique after canonicalization.
Novelty
Novel
↑
Fraction of valid generated molecules that are absent from the canonicalized training set.
Mean property score
Mean score
↑
Average predicted target-property probability assigned by the trained classifier gϕ to valid generated molecules.
Success rate
Success
↑
Fraction of valid generated molecules with predicted property score greater than 0.5.
Strict success rate
Strict
↑
Fraction of valid generated molecules with predicted property score greater than 0.8.
Table 2: Evaluation metrics for generated molecules. Arrows indicate the preferred direction.
Module
Epochs
Train loss
Val. loss
Train metric
Val. metric
Decoder
10
0.220
0.297
token acc. 0.951
token acc. 0.935
Diffusion
10
0.0789
0.0797
n/a
n/a
Table 3: Training metrics for the shared decoder and latent diffusion model used in both BBBP and BACE-1 guidance experiments. Decoder performance is reported using token accuracy, while diffusion performance is reported using the DDPM noise-prediction loss.
Model
BBBP AUC
BACE-1 AUC
ChemBERTa-2 [ 21 ]
0.701
0.809
MolPLA [ 29 ]
0.702
0.805
GROVER [ 30 ]
0.936
0.878
MolCLR [ 31 ]
0.736
0.890
GraphMVP [ 32 ]
0.724
0.812
MMSA [ 33 ]
0.745
0.824
Table 4: Contextual comparison of property-prediction ROC-AUC with representative molecular property predictors. Higher values are better.
Guidance
Validity
Unique
Novel
Success
Strict
Mean score
Opt.
Int. div.
Scaf. div.
g=0.0
1.000
0.999
1.000
0.892
0.668
0.811
0.117
0.899
0.876
g=0.5
1.000
0.998
1.000
0.915
0.707
0.830
0.136
0.900
0.864
g=1.0
1.000
0.998
1.000
0.902
0.708
0.826
0.132
0.901
0.839
g=2.0
1.000
1.000
1.000
0.934
0.706
0.838
0.144
0.897
0.868
g=3.0
1.000
1.000
1.000
0.947
0.785
0.864
0.169
0.897
0.851
g=5.0
1.000
0.999
1.000
0.947
0.800
0.874
0.180
0.896
0.849
Table 5: BBBP generation results across guidance strengths, obtained from generation using three random sampling seeds.
Table 6: BACE-1 generation results across guidance strengths, obtained from generation using three random sampling seeds.
Figure 3: Mean descriptor and distribution-matching trends across guidance strengths for BBBP and BACE-1. The figure reports average molecular weight, logP, TPSA, and QED, together with descriptor-space KL divergence and maximum mean discrepancy (MMD). Lower KL divergence and MMD indicate closer agreement with the reference distribution.
Molecular generation develops computational methods to create chemical structures and conformations for discovery, optimization, and structure elucidation.
University of Cambridge, Cambridge, UK · Prescient Design (AI for Drug Discovery), Genentech, South San Francisco, USA · Work done during an internship at Prescient Design