finds new molecules
play

Finds New Molecules Kazuki Yoshizoe Search and Parallel Computing - PowerPoint PPT Presentation

Deep Learning and Tree Search Finds New Molecules Kazuki Yoshizoe Search and Parallel Computing Unit, RIKEN AIP Feb. 24, 2019 The Second Korea-Japan Machine Learning Workshop February 22 (Fri) - 24 (Sun), 2019, Haevichi Hotel/Resort, Jeju,


  1. Deep Learning and Tree Search Finds New Molecules Kazuki Yoshizoe Search and Parallel Computing Unit, RIKEN AIP Feb. 24, 2019 The Second Korea-Japan Machine Learning Workshop February 22 (Fri) - 24 (Sun), 2019, Haevichi Hotel/Resort, Jeju, Korea ... ... 1 2003 nicolas p. rougier (CC BY-SA 4.0)

  2. de novo Molecular Generation Discovering new molecules which has high “score”. This problem is similar to the game of Go in our formulation 2 2003 nicolas p. rougier (CC BY-SA 4.0)

  3. String Representation of Molecules Need to define a search space could be… of molecules to apply AlphaGo approach - graph based ? - grammar based ? - string based ? According to chemists, there are approx. 10 60 candidates of molecules simple idea using string like, “H -O- H” is water cf. Game chess Go search space size Actually chemists have 10 45 10 170 there own sophisticated way of string based representation 3 2003 nicolas p. rougier (CC BY-SA 4.0)

  4. SMILES Simplified Molecular-Input Line-Entry System O Water (H and single bond omitted) O=C=O Carbon dioxide N#N Nitrogen c1=cc=cc=c1 Benzene (c1 and c1 connect) [Cu+2].[O-]S(=O)(=O)[O-] Copper sulfate Cc3ccc(c2nc(CCCCO/N=C(CCC(O)=O)c1ccccc1)c(C)o2)cc3 Defined based on the following grammar Each symbol mean Atoms / Bonds / Rings Atom: {C, c, o, O, N, F, [C@@H], n, -, S,Cl, [O-],[C@H], [NH+],[C@], s, Br, [nH], [NH3+], [NH2+], [C@@], [N+], [nH+], [S@], [N-], [n+],[S@@], [S-], I, [n-], P, [OH+],[NH-], [P@@H], [P@@], [PH2], [P@], [P+], [S+],[o+], [CH2-], [CH-], [SH+], [O+], [s+], [PH+], [PH], [S@@+] } Bonds: { /,=, \# } Note: Ring: { 1,2,3,4,5,6,7,8,9 } Branch: { (, )} - Correct grammar does not guarantee valid molecules - Does not cover all possible molecules - Canonical SMILES can be defined 4

  5. The Goal: Finding “Good” Strings feed to simulator Finding SMILES which achieve high “score” O=C(Nc1cc(Nc2c(Cl)cccc2NCc2ccc(Cl)cc2 Cl)c2ccccc2c1OC(F)F)c1cccc2ccccc12 We tackle this problem computational chemistry using AlphaGo-like tools / simulators algorithms (e.g. RDKit, Gaussian ) generate molecules described in SMILES calculate some property and use as the “score” 5

  6. AlphaGo’s two key AlphaGo Zero techniques uses RL in addition We are using the techniques in the first We didn’t use RL, so far version of AlphaGo, DL + MCTS Reinforcement MCTS Deep Learning Learning Recognize / Evaluate Go Monte-Carlo Tree Search Learn from board probabilistic tree search State, Action, and Reward (applied to Go on 2014) (invented on 2006) (old invention, combined with DNN) https://deepmind.com/research/dqn/ Arcade Learning Environment https://github.com/mgbellemare/Arcade-Learning-Environment https://www.youtube.com/watch?v=nzUiEkasXZI [Coulom 2006] [Silver, Huang et al. 2016] Fig. 1b 6

  7. How to Search large space? chess ChemTS Go 10 45 10 60 10 170 2003 nicolas p. rougier (CC BY-SA 4.0) Search spaces too large for brute force exhaustive search Pruning is necessary! Don’t search unpromising Brute force search is - possible if 10 20 or smaller, branches! - impossible if 10 30 or greater 7

  8. How to Prune Branches? Prioritize nodes with some function! Prepare Evaluation Function ! popular approach, succeeded for many domains shortest path / puzzles / combinatorial optimization For game AI, machine learning based (non DL) Evaluation Function succeeded for many games 8

  9. What if we can’t make Evaluation Function? This was the difficulty of Go and the reason Google DeepMind had focused on this game 2003 nicolas p. rougier (CC BY-SA 4.0) Nobody had succeeded to make accurate enough evaluation function for Go before 2014 The first version of AlphaGo had used two approaches 1, Deep Neural Network based evaluation (demo) 2, Rollout based evaluation (MCTS) 9

  10. ChemTS: An Efficient Python Library for de novo Molecular Generation X. Yang, J. Zhang, K. Yoshizoe, K. Terayama, and K. Tsuda It uses three components - MCTS (UCT) - RNN based rollout - Computational chemistry simulator ... ... 10 2003 nicolas p. rougier (CC BY-SA 4.0)

  11. AlphaGo ChemTS O=C (Nc1cc(Nc2c(Cl)cccc2NCc2ccc(Cl)cc2Cl) c2ccccc2c1OC(F)F)c1cccc2ccccc12 CNN (ResNet) RNN (GRU) ML based rollout RNN based rollout reward from simulator win / loss rewards (computational chemistry) Monte-Carlo Tree Search Monte-Carlo Tree Search O N C (vanilla UCT) (P-UCT) F c s n = C F 11

  12. Search space pruning: Go, SMILES root N C S F O Cl F c = c C N Search space can be pruned using the probability 12

  13. Train RNN using Chemical DB Input: partial String s 1 , … ,s T • Output: Distribution of the next symbol P(y 1 ), … ,P(y T ) • Training data: one dataset in ZINC database (250,000 • compounds) – a curated collection of commercially available chemical compounds – http://zinc.docking.org/ P(y t ) O=C(Nc1cc( N O=C(Nc1cc( Softmax activation O h h t+1 Given a partial SMILES , Gated Recurrent samples possible t Unit x 2 next symbol for SMILES One-hot coding O=C(Nc1cc( s t 13

  14. Rollout based evaluation: Go Let both players play randomly until the end ( rollout ), and count the score (demo) Get the winning rate This simple approach works well if combined with MCTS 14

  15. RNN based Rollout for Chemistry Output of our RNN was root the probability distribution of the next symbols . So, we can do Rollout. N C O F c s n = Input: a partial SMILES (e.g. “ O=C ”) C N Output: a complete SMILES … RNN Rollout (e.g. O=C(Nc1cc(Nc2c(Cl)cccc2NCc2ccc(Cl)cc2Cl)c2ccccc2c1OC(F)F)c1cccc2ccccc12) 2 O=C(Nc1cc(Nc2c(Cl)cccc2NCc2ccc(Cl)cc2 Cl)c2ccccc2c1OC(F)F)c1cccc2ccccc12 15

  16. ChemTS combines MCTS and RNN • Define search space based on root SMILES … C O N – N th letter on N th level … … F s n = c • Use MCTS to search the space C – we used vanilla UCT N … RNN (AlphaGo used P-UCT) Completion 2 • Rollout – Search tree defines first N letters of Simulator SMILES. RNN completes the rest of the score string (reward) – Reward is given by a simulator • returns a physical property of the given 16 molecule

  17. Monte-Carlo Tree Search (UCT) U pper C onfidence bound applied to T rees • starts with root-node-only tree – depth n symbols represent n -th letter of SMILES • search tree grows following the 4 steps shown below 17

  18. 1. Selection • Traverse the branch with the highest UCB1 value and select a leaf node • UCB1 is shown on the left. ➢ Random tie-breaking for branch i , 𝑥 𝑗 2 ln 𝑢 𝑡 𝑗 + w : total reward s : nu. visits 𝑡 𝑗 t : sum of s i AlphaGo uses a different variation of UCT (P-UCT) 18

  19. 2. Expansion • Expand the selected leaf node ➢ Generate top- k children based on probability 19

  20. 3. Simulation • RNN generates the SMILES string starting from the symbols in the path ➢ “O=C” in this case (shown at the bottom) ➢ Also converted to molecular structure • Call external computational physics simulator and calculate reward ➢ If the generated SMILES were invalid, return small reward O=C (Nc1cc(Nc2c(Cl)cccc2NCc2ccc(Cl)cc2Cl)c2ccccc2c1OC(F)F)c1cccc2ccccc12 20

  21. 4. Backpropagation • Update the values of the nodes on the path ➢ nu. visits ➢ total reward • Recalculate UCB1 Value Repeat the 4-steps until timeout 21

  22. Experimental Settings: Score definition 1, “drug - likeliness” score (a benchmark problem) 𝐾 𝑛 = 𝑚𝑝𝑕𝑄 𝑛 − 𝑇𝐵 𝑛 − 𝑆𝑗𝑜𝑕𝑄𝑓𝑜𝑏𝑚𝑢𝑧(𝑛) logP(S): octanol-water partition coefficient SA(S) : synthesizability RingPenalty(S) : penalty for unrealistically large rings 2, UV absorption score (for peak absorbed wave length) Gaussian simulates the spectrum 𝛽 ∗ : target wave length 𝛽 : simulated wave length −0.01 𝛽 ∗ −𝛽 reward: 𝑠 = 1+0.01 𝛽 ∗ −𝛽 22 Gaussian is a compute chemistry software

  23. Related Work for De novo Molecular Generation • Most existing methods make molecules by combining predetermined fragments • De novo generation by deep neural networks – Variational autoencoder (Gómez-Bombarelli et al., Arxiv 2016, Kusner et al., ICML 2017) – Recurrent neural network + Feedback from external ML model (Segler et al., Nature 555, 2018) • ChemTS (https://github.com/tsudalab/ChemTS) – Monte Carlo tree search + Recurrent neural 23 network

  24. 1, Drug-likeliness results (speed) Comparison with existing methods (our method in bold ) Methods 2 h 4 h 6 h 8 h Mol./min. 4.9 ± 0.4 5.4 ± 0.5 5.5 ± 0.4 5.6 ± 0.5 41 ± 1.6 ChemTS [3] 3.5 ± 0.3 4.5 ± 0.2 4.5 ± 0.2 4.5 ± 0.2 8.3 ± 0.0 RNN+BO 4.5 ± 0.3 4.6 ± 0.3 4.8 ± 0.3 4.8 ± 0.3 41 ± 1.4 Only RNN −30 ± 27 −1.4 ± 2.2 −0.6 ± 1.1 −0.0 ± 0.9 0.1 ± 0.1 CVAE+BO [2] −4.3 ± 3.1 −1.3 ± 1.7 −0.2 ± 1.0 0.3 ± 1.3 1.4 ± 0.9 GVAE+BO [1] avg. and s.d. of the score molecules generated per minute References [1] M. J. Kusner, B. Paige, and J. M. Hernândez-Lobato. “Grammar variational autoencoder”. ICML2017. [2] R. Gômez-Bombarelli, D. Duvenaud, J. Miguel Hernândez-Lobato, J. Aguilera-Iparraguirre, T. D. Hirzel, R. P. Adams, and A. Aspuru-Guzik. “Automatic chemical design using a data-drive continuous representation of molecules”. arXiv:1610.02415, 2016. [3] X. Yang, J. Zhang, K. Yoshizoe, K. Terayama, K. Tsuda. “ChemTS: an efficient python library for de novo molecular generation”. Science and Technology of Advanced Materials (STAM), 2017 Dec 31;18(1):972-6. 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend