Adapting large language models (LLMs) trained on broad organic chemistry to smaller, domain-specific reaction datasets is a key challenge in chemical and pharmaceutical R&D. Effective specialisation requires learning new reaction knowledge while preserving general chemical understanding across related tasks. Here, we evaluate Low-Rank Adaptation (LoRA) as a parameter-efficient alternative to full fine-tuning for organic reaction prediction on limited, complex datasets. Using USPTO reaction classes and challenging C-H functionalisation reactions, we benchmark forward reaction prediction, retrosynthesis and reagent prediction. LoRA achieves accuracy comparable to full fine-tuning while effectively mitigating catastrophic forgetting and better preserving multi-task performance. Both fine-tuning approaches generalise beyond training distributions, producing plausible alternative solvent predictions. Notably, C-H functionalisation fine-tuning reveals that LoRA and full fine-tuning encode subtly different reactivity patterns, suggesting more effective reaction-specific adaptation with LoRA. As LLMs continue to scale, our results highlight the practicality of modular, parameter-efficient fine-tuning strategies for their flexible deployment for chemistry applications.
翻译:将基于广泛有机化学训练的大型语言模型(LLM)适配到规模较小、领域特定的反应数据集,是化学与药物研发中的关键挑战。有效的专业化需要在学习新反应知识的同时,保持跨相关任务的通用化学理解。本文评估了低秩适配(LoRA)作为参数高效方法,替代全参数微调,用于在有限且复杂的数据集上进行有机反应预测。利用USPTO反应类别和具有挑战性的C-H官能化反应,我们对正向反应预测、逆合成及试剂预测进行了基准测试。LoRA在达到与全参数微调相当准确度的同时,有效缓解了灾难性遗忘,并更好地保持了多任务性能。两种微调方法均能泛化至训练分布之外,生成合理的替代溶剂预测。值得注意的是,针对C-H官能化的微调显示,LoRA与全参数微调编码了微妙不同的反应性模式,表明LoRA能实现更有效的反应特异性适配。随着LLM规模的持续扩大,我们的研究结果凸显了模块化、参数高效的微调策略在化学应用中灵活部署的实用性。