When LLMs Meet Nonlinear Optimization: NED-Tree for End-to-End OR Modeling
Abstract
Automating Operations Research (OR) modeling from natural language to executable solver code remains difficult when problem descriptions contain nonlinear expressions. Existing frameworks can often handle linear problems, but nonlinear terms introduce an additional semantic gap: mathematically plausible expressions must still be converted into solver-compatible expressions. To bridge this gap, we propose a structured LLM modeling framework centered on the Nonlinear Element Decomposition Tree (NED-Tree). By making nonlinear subexpressions and their dependencies explicit, NED-Tree provides a structured construction path from extracted mathematical expressions to solver-compatible code representations.The framework (1) leverages dual-granularity element extraction to build traceable modeling elements from natural language, (2) exploits NED-Tree to decompose complex nonlinear expressions into linear backbones, auxiliary definitions, and atomic operator mappings, and (3) maps the decomposed representation into executable solver code with a repair stage. We also construct NEXTOR, a benchmark designed to evaluate nonlinear OR modeling under long descriptions, redundant information, and diverse nonlinear structures. Experiments on 10 benchmarks show that our framework achieves the best average pass@1 accuracy of 72.51%. On the NEXTOR nonlinear split, the framework reaches 92.11% accuracy and 100.00% pass rate, while also preserving the best accuracy and pass rate on the linear split. The code is released at https://anonymous.4open.science/r/NEXTOR.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.