SynLlama: Generating Synthesizable Molecules and Their Analogs with Large Language Models
Kunyang Sun, Dorian Bagni, Joseph M. Cavanagh, Yingze Wang, Jacob M. Sawyer, Bo Zhou, Andrew Gritsevskiy, Oufan Zhang, Teresa Head-Gordon
TL;DR
SynLlama addresses the synthetic feasibility gap in de novo molecule generation by fine-tuning a relatively small LLM (Llama3) on reaction-data to predict retrosynthetic routes and align outputs with a large, purchasable reaction-building block space. It defines a practical synthesis space with Enamine BBs and two RXN template sets, and introduces a reconstruction algorithm that maps LLM outputs to valid synthesis pathways or synthesizable analogs. Across unseen drug-like molecules and docking-driven analog generation tasks, SynLlama achieves competitive synthesis planning, improves synthetic accessibility of generated analogs, and enables local hit expansion with validated FEP-guided potency gains. The work demonstrates that data-efficient fine-tuning of an LLM can bridge computational design with experimental synthetic chemistry, enabling actionable and purchasable candidates for medicinal chemistry pipelines.
Abstract
Generative machine learning models for exploring chemical space have shown immense promise, but many molecules they generate are too difficult to synthesize, making them impractical for further investigation or development. In this work, we present a novel approach by fine-tuning Meta's Llama3 Large Language Models (LLMs) to create SynLlama, which generates full synthetic pathways made of commonly accessible building blocks and robust organic reaction templates. SynLlama explores a large synthesizable space using significantly less data, and offers strong performance in both forward and bottom-up synthesis planning compared to other state-of-the-art methods. We find that SynLlama, even without training on external building blocks, can effectively generalize to unseen yet purchasable building blocks, meaning that its reconstruction capabilities extend to a broader synthesizable chemical space than the training data. We also demonstrate the use of SynLlama in a pharmaceutical context for synthesis planning of analog molecules and hit expansion leads for proposed inhibitors of target proteins, offering medicinal chemists a valuable tool for discovery.
