ChatPaper.aiChatPaper

混合巢狀框架:於大型語言模型驅動之最佳化中解耦結構與參數

A Hybrid Nested Harness for Decoupling Structure and Parameters in LLM-Driven Optimization

August 8, 2026
作者: Víctor Gallego
cs.AI

摘要

在由語言模型驅動的演化演算法中,大型語言模型(LLM)充當單一運算子,同時更新結構性元件(如控制流)與連續參數。雖然語言模型擅長前者,但對後者的處理效率不佳,會在試錯迴圈中浪費大量 token 進行離散跳躍。我們透過形式化一種混合嵌套搜尋來解決此問題:外層迴圈由語言模型提出帶有數值空缺的結構草圖,內層數值最佳化器則負責調校該草圖。外層與內層求解器皆可插拔替換:任何基於文字的求解器都可與零階最佳化器(如 CMA-ES)、基於梯度的演算法或 MCMC 取樣器相互組合。我們在三個科學領域驗證了此框架:(i)封閉形式測試函數上的元最佳化器;(ii)應用於系統研究與社會困境的基於程式碼策略;(iii)近似貝氏推論任務。在所有三個領域中,混合最佳化器均優於純語言模型驅動的搜尋及純數值最佳化的基準方法。程式碼位於:https://github.com/vicgalle/hybrid-nested-search
English
In evolutionary algorithms powered by language models, the LLM acts as a single operator that simultaneously updates structural components (like control flow) and continuous parameters. While LLMs can be good at the first, they are not efficient at the second, wasting tokens taking discrete jumps inside a trial and error loop. We resolve this by formalizing a hybrid nested search, in which an outer loop has the LLM propose a structural sketch, with numeric gaps, and an inner numerical optimizer tunes the sketch. Both the outer and inner solvers are pluggable: any text-based optimizer can be combined with a zero-order optimizer (CMA-ES), gradient-based routines, or MCMC samplers. We validate our framework across three scientific domains: (i) meta-optimizers on closed-form test functions, (ii) code-based policies for systems research and social dilemmas; and (iii) approximate Bayesian inference tasks. Across all three, the hybrid optimizer is superior to both vanilla LLM-driven search and pure numerical optimization baselines. Code at: https://github.com/vicgalle/hybrid-nested-search