I'm using an LSTM to generate molecules using the Simplified Molecular Input Line Entry System (SMILES) to represent molecules. As an example, Aspirin is represented as O=C(C)Oc1ccccc1C(=O)O

I have 25 million characters corresponding to 450,000 molecules in my dataset and am training an LSTM with 3 layers, hidden size of 1024, and batch size of 75. Following the LSTM layers is a linear layer and a Softmax layer. It's based on the network in this paper.

Around 85% of the molecules generated by the LSTM are valid molecules at a temperature of 0.5, as tested using the cheminformatics library RDKit. This accuracy is less than that of the paper, but I'm mainly worried about it generating so many duplicates. At a temperature of 0.5, about half of the molecules are duplicated. At a temperature of 1, a quarter of the molecules are duplicated. I tried resetting the hidden state in between molecules generated but got the same results. Is there any way of reducing the number of duplicates generated?

  • $\begingroup$ You could provide different starting sequences or have higher temperature for the first few. $\endgroup$
    – Björn
    Commented Apr 6, 2019 at 7:34


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.