VAE-Sim: A novel molecular similarity measure based on a variational autoencoder

Soumitra Samanta, Steve O’Hagan, Neil Swainston, Timothy J. Roberts, Douglas B. Kell*

*Corresponding author for this work

Research output: Contribution to journalJournal articleResearchpeer-review

115 Downloads (Pure)


Molecular similarity is an elusive but core “unsupervised” cheminformatics concept, yet different “fingerprint” encodings of molecular structures return very different similarity values, even when using the same similarity metric. Each encoding may be of value when applied to other problems with objective or target functions, implying that a priori none are “better” than the others, nor than encoding-free metrics such as maximum common substructure (MCSS). We here introduce a novel approach to molecular similarity, in the form of a variational autoencoder (VAE). This learns the joint distribution p(z|x) where z is a latent vector and x are the (same) input/output data. It takes the form of a “bowtie”-shaped artificial neural network. In the middle is a “bottleneck layer” or latent vector in which inputs are transformed into, and represented as, a vector of numbers (encoding), with a reverse process (decoding) seeking to return the SMILES string that was the input. We train a VAE on over six million druglike molecules and natural products (including over one million in the final holdout set). The VAE vector distances provide a rapid and novel metric for molecular similarity that is both easily and rapidly calculated. We describe the method and its application to a typical similarity problem in cheminformatics.

Original languageEnglish
Article number3446
Issue number15
Publication statusPublished - 2020


  • Cheminformatics
  • Deep learning
  • Molecular similarity
  • Variational autoencoder


Dive into the research topics of 'VAE-Sim: A novel molecular similarity measure based on a variational autoencoder'. Together they form a unique fingerprint.

Cite this