Mol-CycleGAN - a generative model for molecular optimization

1 INTRODUCTION . The principal goal of the drug design process is to find new chemical compounds that are able to modulate the activity of a given target ( typically a protein ) in a desired way ( Ratti & Trist , 2001 ) . However , finding such molecules in high-dimensional chemical space of all molecules without any prior knowledge is nearly impossible . In silico methods have been introduced to leverage the existing chemical , pharmacological and biological knowledge , thus forming a new branch of science - computer-aided drug design ( CADD ) ( Rao & Srinivas , 2011 ; Bajorath , 2002 ) . In particular , the recent advancements in deep learning encouraged its application to CADD ( Chen et al. , 2018 ) . Computer methods are nowadays applied at every stage of drug design pipelines ( Rao & Srinivas , 2011 ) - from the search of new , potentially active compounds ( Lavecchia & Di Giovanni , 2013 ) , through optimization of their activity and physicochemical profile ( Honório et al. , 2013 ) and simulating their scheme of interaction with the target protein ( de Ruyck et al. , 2016 ) , to assisting in planning the synthesis and evaluation of its difficulty ( Segler et al. , 2018 ) . In the center of our interest are the hit-to-lead and lead optimization phases of the compound design process . Their goals are to optimize drug-like molecules identified in previous steps in terms of , respectively , the desired activity profile ( increased potency towards given target protein and provision of inactivity towards undesired proteins ) and the physicochemical and pharmacokinetic properties . The challenge here is to optimize a molecule with respect to multiple properties simultaneously ( Honório et al. , 2013 ) . Our principal contribution is the introduction of Mol-CycleGAN , a generative model based on CycleGAN ( Zhu et al. , 2017 ) with the goal to augment the compound design process . We show that our model can generate molecules that possess desired properties1 while retaining their chemical scaffolds . Given a starting molecule , the model generates a similar one but with a desired characteristics . The similarity between the two molecules is important in the context of multiparameter optimization , as it makes it easier to optimize the selected property without spoiling the previously optimized ones . To the best of our knowledge , this is the first approach to molecule generation that uses the CycleGAN architecture . We evaluate our model on its ability to perform structural transformations and molecular optimization . The former indicates that the model is able to do simple structural modifications such as a change in the presence of halogen groups or number of aromatic rings . In the latter , we aim to 1By molecular property we also mean binding affinity towards target protein . maximize penalized logP to assess the model ’ s utility for compound design . Penalized logP is a physicochemical property often selected as a testing ground for molecule optimization models ( Jin et al. , 2018 ; You et al. , 2018 ) , as it is relevant in the drug design process . In the optimization of penalized logP for drug-like molecules our model significantly outperforms previous results . 2 RELATED WORK . There are two main approaches of applying deep learning in drug design ( see Chen et al . ( 2018 ) for a recent review ) : paq use discriminative models to screen commercial databases and classify molecules as likely active or likely inactive ( virtual screening ) ; pbq use generative models to propose novel molecules that likely possess the desired properties . The former application already proved to give outstanding results ( Duvenaud et al. , 2015 ; Jastrzębski et al. , 2016 ; Coley et al. , 2017 ; Pham et al. , 2018 ) . The latter use case is rapidly emerging . Many generative deep learning models have already been applied in the compound design context . Initial molecule generation models mostly operate on SMILES strings ( Weininger , 1988 ) . Long short-term memory ( LSTM ) network architecture is applied in Segler et al . ( 2017 ) ; Bjerrum & Threlfall ( 2017 ) ; Winter et al . ( 2018 ) ; Gupta et al . ( 2018 ) . Variational Autoencoder ( VAE ) ( Kingma & Welling , 2013 ) is used by Gómez-Bombarelli et al . ( 2018 ) to generate SMILES of new molecules . Unfortunately , these models can generate invalid SMILES that do not correspond to any molecules . Introduction of grammars into the model improved the success rate of valid SMILES generation ( Kusner et al. , 2017 ; Dai et al. , 2018 ) . Maintaining chemical validity within a generative process became possible through VAEs realized directly on molecular graphs ( Simonovsky & Komodakis , 2018 ; Jin et al. , 2018 ) . Generative Adversarial Networks ( GANs ) ( Goodfellow et al. , 2014 ) are an alternative architecture that has been applied to de novo drug design . Guimaraes et al . ( 2017 ) propose GANs and Reinforcement Learning ( RL ) model ( based on SMILES ) , which generates samples that fulfill desired objectives while promoting diversity . De Cao & Kipf ( 2018 ) use GANs and RL , together with graph representation ( adjacency and annotation matrices ) to generate new molecules with the given properties . You et al . ( 2018 ) train convolutional GANs on molecular graphs and use RL to ensure that the proposed molecules have logP and molecular weight in the desired range . Indeed , some of these models can be used to effectively search through the chemical space . Nevertheless , these approaches are not without flaws . The generated compounds can be , e.g. , difficult or impossible to synthesize . We address this issue by proposing Mol-CycleGAN , a generative model designed to generate molecules with the desired properties while retaining their chemical scaffolds . Such a model can prove to be very useful for optimizing active molecules towards a given property , which is essential in compound design . 3 MOL-CYCLEGAN . We introduce Mol-CycleGAN to perform optimization by learning from the sets of molecules with or without the desired molecular property ( denoted by the sets X and Y ) . Our approach is to train a model to perform the transformation G : X Ñ Y and then use this model to perform optimization of molecules . In the context of compound design X ( Y ) can be , e.g. , the set of inactive ( active ) molecules . To represent the sets X and Y our approach requires an embedding of molecules , from which it should be possible to decode the coordinates back into some complete representation ( e.g. , the SMILES representation ) . Here , the latent space of variational autoencoders can be used . This has the added benefit that the distance between molecules ( required to calculate the loss function ) can be defined in the latent space . Essential chemical properties are easier to express on graphs rather than linear SMILES representations ( Weininger , 1988 ) . This is why for molecule representation we use the latent space obtained from Junction Tree Variational Autoencoder ( JT-VAE ) ( Jin et al. , 2018 ) . JT-VAE is based on a graph structure of molecules and shows superior properties compared to SMILES-based VAEs ( cf . also the discussion in Section 2 ) . One could also try formulating the CycleGAN on the SMILES representation directly , but this would raise the problem of defining the intermolecular distance , as the standard manners of measuring similarity between molecules ( Tanimoto similarity ) are non-differentiable . Our approach extends the CycleGAN framework ( Zhu et al. , 2017 ) to molecular embeddings , created by JT-VAE ( Jin et al. , 2018 ) . We represent each molecule with a latent vector , given by the mean of the variational encoding distribution . The inclusion of the cyclic component acts as a regularization and may also help in the regime of low data , as the model can learn from both directions of the transformation . With the cyclic component the resulting model is more robust ( cf . e.g . the comparison of non-cyclic IcGAN ( Perarnau et al. , 2016 ) vs CycleGAN in Choi et al . ( 2017 ) ) . Our model works as follows ( cf . Fig . 1 ) : ( i ) we start by defining the sets X and Y ( e.g. , active/inactive molecules ) ; ( ii ) we introduce the mapping functionsG : X Ñ Y and F : Y Ñ X ; ( iii ) we introduce discriminatorsDX ( andDY ) which force the generator F ( andG ) to generate samples from a distribution close to the distribution of X ( or Y ) . The components F , G , DX , and DY are implemented with neural networks acting in the latent space ( see Appendix A for technical details ) . After training the model we perform optimization of a given molecule by : ( i ) computing its latent space embedding , x ; ( ii ) using the generating function to compute Gpxq ; ( iii ) decoding the latent space coordinates given by Gpxq to obtain the SMILES representation of the optimized molecule . Thereby , any molecule can be cast onto the set of molecules with the desired property , Y . For training the Mol-CycleGAN we use the following loss function : LpG , F , DX , DY q “ LGANpG , DY , X , Y q ` LGANpF , DX , Y , Xq ` λ1LcycpG , F q ` λ2LidentitypG , F q , and aim to solve G˚ , F˚ “ argmin G , F max DX , DY LpG , F , DX , DY q . We use the adversarial loss introduced in LS-GAN ( Mao et al. , 2017 ) LGANpG , DY , X , Y q “ 1 2 Ey „ pdatapyqrpDY pyq ´ 1q 2s ` 1 2 Ex „ pdatapxqrpDY pGpxqqq 2s , which ensures that the generator G ( and F ) generates samples from a distribution close to the distribution of Y ( or X ) . The cycle consistency loss LcycpG , F q “ Ey „ pdatapyqr } GpF pyqq ´ y } 1s ` Ex „ pdatapxqr } F pGpxqq ´ x } 1s is responsible for reducing the space of possible mapping functions , such that for a molecule x from set X , the GAN cycle brings it back to a molecule similar to x , i.e . F pGpxqq is close to x ( and analogously GpF pyqq is close to y ) . Finally , to ensure that the optimized molecule is close to the starting one we use the identity mapping loss ( Zhu et al. , 2017 ) LidentitypG , F q “ Ey „ pdatapyqr } F pyq ´ y } 1s ` Ex „ pdatapxqr } Gpxq ´ x } 1s , which further reduces the space of possible mapping functions and prevents the model from generating molecules that lay far away from the starting molecule in the JT-VAE latent space . In all our experiments we use the values of hyperparameters λ1 “ 0.3 and λ2 “ 0.1 , which were chosen by checking a couple of combinations ( for structural tasks ) and verifying that our optimization process : ( i ) improves the studied property and ( ii ) generates molecules similar to the starting ones . We have not performed a grid search for optimal values of λ1 and λ2 , and hence there could be space for improvement here . Note that these parameters control the balance between improvement in the optimized property and similarity between the generated and the starting molecule . Both the improvement and the similarity can be obtained with our model , as we show in the next section .

Summary: The paper presents an approach for optimizing molecular properties, based on the application of CycleGANs to variational autoencoders for molecules. A recently proposed domain-specific VAE called Junction Tree VAE (JT-VAE) is employed. The optimization of molecules is an important problem for example in drug discovery or materials design, and the development of machine learning approaches for it is therefore an important application.