Exploiting Edited Large Language Models as General Scientific Optimizers
Qitan Lv, Tianyu Liu, Hong Wang
TL;DR
This work introduces General Scientific Optimizers (GSO), a bi-level optimization framework that leverages inner-level simulators to generate observational feedback and outer-level LLMs as scientists to propose improved solutions, with bi-level interactions achieved via model editing. By decoupling evaluation from hypothesis generation and enabling dynamic exploitation-exploration, GSO addresses prompt sensitivity and loss-in-the-middle issues common in prompt-based optimization. Across seven scientific tasks and six backbone LLMs, GSO consistently outperforms baselines, including open-source and some closed-source models, and shows substantial gains in molecular property prediction such as HOMO-LUMO gaps. The approach demonstrates robustness to prompt variations and highlights the practical potential of integrating simulations with knowledge-editing LLMs for generalizable scientific optimization.
Abstract
Large language models (LLMs) have been widely adopted in mathematical optimization in scientific scenarios for their extensive knowledge and advanced reasoning capabilities. Existing methods mainly focus on utilizing LLMs to solve optimization problems in a prompt-based manner, which takes observational feedback as additional textual descriptions. However, due to LLM's \textbf{high sensitivity to the prompts} and \textbf{tendency to get lost in lengthy prompts}, these methods struggle to effectively utilize the {observational} feedback from each optimization step, which severely hinders the applications for real-world scenarios. To address these challenges, we propose a conceptually simple and general {bi-level} optimization method, namely \textbf{G}eneral \textbf{S}cientific \textbf{O}ptimizers (GSO). Specifically, GSO first utilizes inner-level simulators as experimental platforms to evaluate the current solution and provide observational feedback. Then, LLMs serve as knowledgeable and versatile scientists, generating new solutions by refining potential errors from the feedback as the outer-level optimization. Finally, simulations together with the expert knowledge in LLMs are jointly updated with bi-level interactions via model editing. Extensive experiments show that GSO consistently outperforms existing state-of-the-art methods using \textit{six} different LLM backbones on \textit{seven} different tasks, demonstrating the effectiveness and a wide range of applications.
