The use of some combination of variational autoencoders (VAEs), generative adversarial networks (GANs), and reinforcement learning to generate new small molecules has been an active area of research lately. This paper is an interesting combination of a VAE and GAN.

First, the authors use randomized SMILES representations of molecules with the result that:

the quality of the chemical space generated in both RNNs and VAEs is much higher and the models tend to overfit much less.


the generator and discriminator network do not use SMILES strings as input, but instead n-dimensional vectors derived from the code-layer of an autoencoder trained as a SMILES heteroencoder. This allows the model to focus on optimizing the sampling and not worry about SMILES syntax issues. The decoder part of a pretrained heteroencoder neural network was used to translate the generated n-dimensional vector into molecular structures.

Combining a VAE and GAN in this way, has an interesting effect on the latent space of the AE.

In earlier VAE or AAE based architectures for generative molecular models, the role of the encoder is to forcefully fit the latent space of the training data to a Gaussian prior or at least some continuous distribution, achieved in the latter with a loss function based on Kullback–Leibler (KL) divergence. This requires the assumption that by interpolating in the latent space between two molecules, the decoded molecule would then have either a structure or property that also lies between these molecules. This is not an intuitive representation, as the chemical space is clearly discontinuous—there is nothing between e.g. C4H10 and C5H12. The LatentGAN heteroencoder instead makes no assumption with regards to the latent space as no ground truth exists for this representation. Instead it is trained based strictly on the categorial cross entropy loss of the reconstruction. The result in a space of encoded latent vectors that the GAN later trains on that does not necessarily have to be continuous.

Below is the abstract of A de novo molecular generation method using latent vector based generative adversarial network.

Deep learning methods applied to drug discovery have been used to generate novel structures. In this study, we propose a new deep learning architecture, LatentGAN, which combines an autoencoder and a generative adversarial neural network for de novo molecular design. We applied the method in two scenarios: one to generate random drug-like compounds and another to generate target-biased compounds. Our results show that the method works well in both cases. Sampled compounds from the trained model can largely occupy the same chemical space as the training set and also generate a substantial fraction of novel compounds. Moreover, the drug-likeness score of compounds sampled from LatentGAN is also similar to that of the training set. Lastly, generated compounds differ from those obtained with a Recurrent Neural Network-based generative model approach, indicating that both methods can be used complementarily.