Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020 Jul 29;25(15):3446.
doi: 10.3390/molecules25153446.

VAE-Sim: A Novel Molecular Similarity Measure Based on a Variational Autoencoder

Affiliations

VAE-Sim: A Novel Molecular Similarity Measure Based on a Variational Autoencoder

Soumitra Samanta et al. Molecules. .

Abstract

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.

Keywords: SMILES; cheminformatics; deep learning; molecular similarity; variational autoencoder.

PubMed Disclaimer

Conflict of interest statement

The authors declare that they have no conflicts of interest.

Figures

Figure 1
Figure 1
Tanimoto similarities of various molecules to clozapine using the Torsion encoding from RDKit.
Figure 2
Figure 2
Two kinds of neural architecture. (A) A classical multilayer perceptron representing a supervised learning system in which molecules encoded as SMILES strings can be used as paired inputs with outputs of interest (whether a classification or a regression). The trained model may then be interrogated with further molecules and the output ascertained. (B) A variational autoencoder, is a supervised means of fitting distributions of discrete models in a way that reconstructs them via a vector in a latent space. (C) The variational autoencoder (VAE) architecture used in the present work.
Figure 2
Figure 2
Two kinds of neural architecture. (A) A classical multilayer perceptron representing a supervised learning system in which molecules encoded as SMILES strings can be used as paired inputs with outputs of interest (whether a classification or a regression). The trained model may then be interrogated with further molecules and the output ascertained. (B) A variational autoencoder, is a supervised means of fitting distributions of discrete models in a way that reconstructs them via a vector in a latent space. (C) The variational autoencoder (VAE) architecture used in the present work.
Figure 3
Figure 3
Top similarities between drugs and metabolites as judged by a fingerprint encoding (RDKit patterned) and our new VAE-Sim metric. (A) Rank ordering. (B) Heatmap for Tanimoto similarities using RDKit patterned encoding. (C) Heatmap of Euclidean similarities E-Sim (Equation (1)) for VAE-Sim in the 100-dimensional latent vector). (D) Heatmap of Euclidean similarities EU-Sim (Equation (2)) for VAE-Sim in 2-dimensional uniform manifold approximation and projection (UMAP) space.
Figure 3
Figure 3
Top similarities between drugs and metabolites as judged by a fingerprint encoding (RDKit patterned) and our new VAE-Sim metric. (A) Rank ordering. (B) Heatmap for Tanimoto similarities using RDKit patterned encoding. (C) Heatmap of Euclidean similarities E-Sim (Equation (1)) for VAE-Sim in the 100-dimensional latent vector). (D) Heatmap of Euclidean similarities EU-Sim (Equation (2)) for VAE-Sim in 2-dimensional uniform manifold approximation and projection (UMAP) space.
Figure 4
Figure 4
Comparison of similarities between two RDKit fingerprint methods and VAE-Sim Using Tanimoto similarity for fingerprints and Euclidean d100 similarity for VAE-Sim. (A) Patterned encoding. (B) MACCS encoding.
Figure 5
Figure 5
Similarity of drugs to clozapine as judged by the VAE. (A) Rank order of Euclidean similarity in 100 dimensions (E-Sim) or two UMAP dimensions (EU-Sim) as in Figure 3. Some of the “most similar” drugs are labelled, as are some of those in Table 1. (B) Structures of some of the drugs mentioned, together with their Euclidean distances as judged by VAE-Sim.

References

    1. Gasteiger J. Handbook of Chemoinformatics: From Data to Knowledge. Wiley/VCH; Weinheim, Germany: 2003.
    1. Leach A.R., Gillet V.J. An Introduction to Chemoinformatics. Springer; Dordrecht, The Netherlands: 2007.
    1. Maggiora G., Vogt M., Stumpfe D., Bajorath J. Molecular similarity in medicinal chemistry. J. Med. Chem. 2014;57:3186–3204. - PubMed
    1. Willett P. Similarity-based data mining in files of two-dimensional chemical structures using fingerprint measures of molecular resemblance. Wires Data Min. Knowl. 2011;1:241–251. doi: 10.1002/widm.26. - DOI
    1. Todeschini R., Consonni V. Molecular Descriptors for Cheminformatics. Wiley-VCH; Weinheim, Germany: 2009.

LinkOut - more resources