{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/grammars-and-reinforcement-learning-for","title":"Grammars and reinforcement learning for molecule optimization","arxiv_id":"1811.11222","date":"2018-11-27","proceeding":null,"authors":["Egor Kraev"],"abstract":"We seek to automate the design of molecules based on specific chemical\nproperties. Our primary contributions are a simpler method for generating\nSMILES strings guaranteed to be chemically valid, using a combination of a new\ncontext-free grammar for SMILES and additional masking logic; and casting the\nmolecular property optimization as a reinforcement learning problem,\nspecifically best-of-batch policy gradient applied to a Transformer model\narchitecture. This approach uses substantially fewer model steps per atom than\nearlier approaches, thus enabling generation of larger molecules, and beats\nprevious state-of-the art baselines by a significant margin. Applying\nreinforcement learning to a combination of a custom context-free grammar with\nadditional masking to enforce non-local constraints is applicable to any\noptimization of a graph structure under a mixture of local and nonlocal\nconstraints.","url_abs":"http://arxiv.org/abs/1811.11222v1","url_pdf":"http://arxiv.org/pdf/1811.11222v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"grammars-and-reinforcement-learning-for","repo_url":"https://github.com/ZmeiGorynych/generative_playground","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}