Skip to main content
Fig. 1 | Journal of Cheminformatics

Fig. 1

From: Small molecule autoencoders: architecture engineering to optimize latent space utility and sustainability

Fig. 1

Architecture Overview. Illustration of the general autoencoder architecture used throughout the experiments. Molecules are provided and reconstructed as one-hot encodings of SMILES or SELFIES. The encoder and decoder are either GRUs or LSTMs. In case of GRUs (blue), the encoder returns the hidden state \({h}_{T}\) (after processing the last token of the input molecule), the size of which is controlled by the hidden size. If latent size and hidden size are not the same, an additional linear layer (dashed black rectangle) is introduced after the encoder GRU and before the decoder GRU. If latent size and hidden size are identical, then \(z ={h}_{T}\). If the model is LSTM-based (orange), the encoder not only returns the last hidden state \({h}_{T}\) but also the last cell state \({c}_{T}\). They are concatenated and adapted to the latent size with an additional linear layer and to reconstruct hidden and cell state from the latents, two linear layers are introduced before the decoder (black rectangles). Both encoder and decoder may have additional layers and the encoder may further have an attention layer added to it (as illustrated in insets)

Back to article page