TL;DR
SynLlama bridges the gap between AI-driven drug design and experimental reality by fine-tuning Llama 3 to generate fully synthesizable molecules alongside their complete chemical recipes. By learning the underlying rules of organic chemistry, it can even extrapolate to entirely unseen, commercially available building blocks, outperforming existing state-of-the-art methods with a fraction of the training data.
What Problem Does This Paper Address?
Generative AI models excel at dreaming up novel molecules with optimized properties, such as high binding affinity to a target protein. However, these de novo molecules often exist only as digital fantasies because they are nightmarishly difficult or impossible to actually synthesize in a lab.
Existing solutions either rely on crude "synthesizability scores" that penalize complex but viable molecules, or heavy computer-assisted synthesis planning (CASP) software that carries massive computational overhead. The authors address this bottleneck by embedding synthetic feasibility directly into the generative process using Large Language Models (LLMs), ensuring that proposed drug candidates come with realistic, actionable pathways.
Methods
The authors developed SynLlama by fine-tuning Meta's open-source Llama-3.1-8B and Llama-3.2-1B models using Supervised Fine-Tuning (SFT) with Low-Rank Adaptation (LoRA).
- Chemical Translation: Molecules are represented as text strings via SMILES, and chemical reactions are defined using SMARTS templates. The model is trained to perform constrained retrosynthesis, outputting a structured JSON format containing step-by-step reaction sequences and required building blocks (BBs).
- Reconstruction Algorithm: Because LLMs can occasionally output slightly imperfect or novel molecular strings, SynLlama pairs the LLM with a downstream reconstruction algorithm. This algorithm uses TF-IDF string similarity and Morgan fingerprint nearest-neighbor searches to map the predicted fragments to real, commercially available building blocks, ensuring the final proposed pathway is fully actionable.
Datasets
- Training Data: Built from ~230,000 Enamine building blocks (August 2024 release) and two sets of reaction templates: RXN 1 (91 templates) and RXN 2 (115 templates). Synthetic routes of up to 5 steps were simulated to create datasets ranging from 100k to 2M pathways.
- Generalization Testing: A time-split dataset using ~13,000 brand-new Enamine building blocks released in February 2025 (completely unseen during training).
- Evaluation Sets: 1,000 unseen molecules from the Enamine Diversity Set and 1,000 drug-like molecules from the public ChEMBL database.
- De Novo Binders: 500 molecules generated by other AI models (iMiner and Pocket2Mol) targeting proteins like SARS-CoV-2 Main Protease ($M^{\text{pro}}$), Thrombin, and TYK2.
Key Insights and Ideas
- Extrapolation, Not Just Memorization: Unlike traditional rule-based synthesis tools that are locked into a predefined library, SynLlama's generative nature allows it to propose novel building blocks that weren't in its training data but are actually purchasable on the market (via Molport). It learns the logic of the reactions, not just a static vocabulary.
- Small Models, Big Impact: The 1-billion-parameter model (SynLlama-1B-2M) performed on par with the larger 8-billion-parameter model when given sufficient training routes. This means smaller, faster, and computationally cheaper LLMs can be successfully transformed into highly specialized chemical experts.
- The Perfect Post-Processor: Only about 1% of molecules generated by unconstrained de novo models (like Pocket2Mol) are easily synthesizable. SynLlama can act as a powerful post-processing filter, taking these "unsynthesizable" designs and finding structurally similar, easily makeable analogs without losing their target binding affinity.
Key Results
- Data Efficiency: SynLlama outperformed state-of-the-art specialized models (SynNet, ChemProjector, and Synformer) in reconstructing target molecules while requiring 40 to 60 times less training data.
- Higher Reconstruction Rates: When allowed to utilize new purchasable building blocks, SynLlama achieved a top reconstruction rate of 74.1% on the Enamine Diversity Set and 28.7% on the challenging ChEMBL dataset.
- Instruction Following: The fine-tuned models demonstrated exceptional adherence to the requested JSON structure and chemical rules, achieving over 99% template memorization and building block selection accuracy across testing sets.
- Real-World Validation: In a simulated pharmaceutical hit-expansion campaign for a SARS-CoV-2 $M^{\text{pro}}$ inhibitor, SynLlama successfully rediscovered the most potent analog identified in actual wet-lab experiments, validating its practical utility for medicinal chemists.
Limitations and Future Work
- The ChEMBL Gap: While SynLlama handles standard synthetic spaces beautifully, its performance degrades on highly unique or complex chemical structures found in curated databases like ChEMBL, indicating that some drug-like spaces remain outside its current reaction vocabulary.
- Missing Lab Realities: The current framework does not explicitly factor in synthesis costs, specific reaction conditions (temperature, solvents), stereochemical selectivity, or the need for protecting groups.
- Future Directions: The authors envision integrating more realistic chemical constraints into the fine-tuning data and leveraging prompt engineering so medicinal chemists can interact with SynLlama using natural language without needing coding expertise.
Summary updated