OptiTree: Hierarchical Thoughts Generation with Tree Search for LLM Optimization Modeling
Haoyang Liu, Jie Wang, Yuyang Cai, Xiongwei Han, Yufei Kuang, Jianye Hao
TL;DR
OptiTree presents a novel approach to optimization modeling with large language models by organizing modeling knowledge into a hierarchical modeling tree and guiding modeling through tree search. By adaptively decomposing complex OR problems into subproblems and synthesizing global modeling thoughts from hierarchical patterns, it achieves significant improvements over state-of-the-art baselines on challenging benchmarks. The method generalizes across multiple LLMs and datasets, and the authors release code to enable reproducibility. Ablation studies reveal the critical roles of tree search and modeling thoughts, and highlight the benefits of deeper search and statement-based subproblem identification. Overall, OptiTree offers a scalable, reasoning-driven path to more accurate and reliable LLM-based optimization modeling in operations research.
Abstract
Optimization modeling is one of the most crucial but technical parts of operations research (OR). To automate the modeling process, existing works have leveraged large language models (LLMs), prompting them to break down tasks into steps for generating variables, constraints, and objectives. However, due to the highly complex mathematical structures inherent in OR problems, standard fixed-step decomposition often fails to achieve high performance. To address this challenge, we introduce OptiTree, a novel tree search approach designed to enhance modeling capabilities for complex problems through adaptive problem decomposition into simpler subproblems. Specifically, we develop a modeling tree that organizes a wide range of OR problems based on their hierarchical problem taxonomy and complexity, with each node representing a problem category and containing relevant high-level modeling thoughts. Given a problem to model, we recurrently search the tree to identify a series of simpler subproblems and synthesize the global modeling thoughts by adaptively integrating the hierarchical thoughts. Experiments show that OptiTree significantly improves the modeling accuracy compared to the state-of-the-art, achieving over 10\% improvements on the challenging benchmarks. The code is released at https://github.com/MIRALab-USTC/OptiTree/tree/main.
