Reformulating nonlinear optimization problems into solver-ready linear optimization problems is often necessary for practical applications, but the process is often manual and requires domain expertise. We propose LinearizeLLM, an agent-based LLM framework that produces solver-ready linear reformulations of nonlinear optimization problems. Agents first detect the nonlinearity pattern (e.g., bilinear products) and apply nonlinearity pattern-aware reformulation techniques, selecting the most suitable linearization technique. We benchmark on 40 instances: 27 derived from ComplexOR by injecting exactly-linearizable operators, and 13 automatically generated instances with deeply nested nonlinearities. LinearizeLLM achieves 73\% mean end-to-end overall success (OSR) across nonlinearity depths (8.3x higher than a one-shot LLM baseline; 4.3x higher than Pyomo). The results suggest that a set of pattern-specialized agents can automate linearization, supporting natural-language-based modeling of nonlinear optimization.
翻译:将非线性优化问题重构为可直接求解的线性优化问题在实际应用中通常是必要的,但该过程往往依赖人工操作且需要领域专业知识。我们提出了LinearizeLLM,一种基于智能体的大语言模型框架,能够针对非线性优化问题生成可直接求解的线性重构形式。智能体首先检测非线性模式(例如双线性乘积),并应用非线性模式感知的重构技术,从中选择最合适的线性化方法。我们在40个实例上进行了基准测试:其中27个实例源自ComplexOR数据集并通过注入完全可线性化的算子生成,另外13个为自动生成的具有深度嵌套非线性结构的实例。LinearizeLLM在不同非线性深度下实现了73%的平均端到端总体成功率(OSR)(比单次提示的大语言模型基线高8.3倍;比Pyomo高4.3倍)。结果表明,一组专门针对非线性模式的智能体能够实现线性化过程的自动化,从而支持基于自然语言的非线性优化建模。