Table of Contents
Fetching ...

SolverLLM: Leveraging Test-Time Scaling for Optimization Problem via LLM-Guided Search

Dong Li, Xujiang Zhao, Linlin Yu, Yanchi Liu, Wei Cheng, Zhengzhang Chen, Zhong Chen, Feng Chen, Chen Zhao, Haifeng Chen

TL;DR

SolverLLM addresses the challenge of forming optimization models from natural language without requiring task-specific training. It introduces a training-free, test-time scalable framework that uses LLM-guided Monte Carlo Tree Search to explore a six-element formulation space (Type, Sets, Parameters, Variables, Objective, Constraints) and to generate executable solver code. The approach leverages dynamic expansion, prompt backpropagation, and uncertainty backpropagation to create a reasoning-rich search that improves convergence to high-quality formulations. Across six benchmarks, SolverLLM outperforms prompt-based and learning-based baselines, demonstrating strong generalization and robustness without training data, albeit at the cost of inference time due to search.

Abstract

Large Language Models (LLMs) offer promising capabilities for tackling complex reasoning tasks, including optimization problems. However, existing methods either rely on prompt engineering, which leads to poor generalization across problem types, or require costly supervised training. We introduce SolverLLM, a training-free framework that leverages test-time scaling to solve diverse optimization problems. Rather than solving directly, SolverLLM generates mathematical formulations and translates them into solver-ready code, guided by a novel Monte Carlo Tree Search (MCTS) strategy. To enhance the search process, we modify classical MCTS with (1) dynamic expansion for adaptive formulation generation, (2) prompt backpropagation to guide exploration via outcome-driven feedback, and (3) uncertainty backpropagation to incorporate reward reliability into decision-making. Experiments on six standard benchmark datasets demonstrate that SolverLLM outperforms both prompt-based and learning-based baselines, achieving strong generalization without additional training.

SolverLLM: Leveraging Test-Time Scaling for Optimization Problem via LLM-Guided Search

TL;DR

SolverLLM addresses the challenge of forming optimization models from natural language without requiring task-specific training. It introduces a training-free, test-time scalable framework that uses LLM-guided Monte Carlo Tree Search to explore a six-element formulation space (Type, Sets, Parameters, Variables, Objective, Constraints) and to generate executable solver code. The approach leverages dynamic expansion, prompt backpropagation, and uncertainty backpropagation to create a reasoning-rich search that improves convergence to high-quality formulations. Across six benchmarks, SolverLLM outperforms prompt-based and learning-based baselines, demonstrating strong generalization and robustness without training data, albeit at the cost of inference time due to search.

Abstract

Large Language Models (LLMs) offer promising capabilities for tackling complex reasoning tasks, including optimization problems. However, existing methods either rely on prompt engineering, which leads to poor generalization across problem types, or require costly supervised training. We introduce SolverLLM, a training-free framework that leverages test-time scaling to solve diverse optimization problems. Rather than solving directly, SolverLLM generates mathematical formulations and translates them into solver-ready code, guided by a novel Monte Carlo Tree Search (MCTS) strategy. To enhance the search process, we modify classical MCTS with (1) dynamic expansion for adaptive formulation generation, (2) prompt backpropagation to guide exploration via outcome-driven feedback, and (3) uncertainty backpropagation to incorporate reward reliability into decision-making. Experiments on six standard benchmark datasets demonstrate that SolverLLM outperforms both prompt-based and learning-based baselines, achieving strong generalization without additional training.
Paper Structure (30 sections, 7 equations, 5 figures, 7 tables)

This paper contains 30 sections, 7 equations, 5 figures, 7 tables.

Figures (5)

  • Figure 1: Comparison of the solution pipelines employed by prompt-based approaches, learning-based approaches, and SolverLLM for optimization problems.
  • Figure 2: An illustration of SolverLLM with two MCTS iterations, each consisting of four stages: selection, expansion, evaluation, and backpropagation. Unlike standard MCTS, which performs expansion only on leaf nodes (as in the first iteration), SolverLLM also enables dynamic expansion at non-leaf nodes (as in the second iteration). Beyond rewards, the evaluation phase additionally generates reasoning signals that provide layer-specific guidance via backpropagation for subsequent search steps. Furthermore, this phase estimates both global and local uncertainties for rewards and reasoning signals, which are leveraged in the backpropagation phase to accelerate the search process.
  • Figure 3: The comparison of SA and ER results between AutoFormulation and SolverLLM (Ours) across six real-world dataset. "MamoC." is the abbreviation for MamoComplex.
  • Figure 4: A case study of SolverLLM and its variants w/o PB and w/o UB on a hard TSP optimization problem with their search trees. Node fill colors show changes from SolverLLM; solid lines mean additions, dashed lines mean deletions. The content of nodes A and B (related to the w/o UB variant) and nodes C and D (related to the w/o PB variant) has been indicated by the dotted-dashed line. The local instruction generated by PB are used to guide the generation of the constraints element. The colored paths (violet, blue and orange) represent the optimal formulations, which ultimately point to the results. In this problem, SolverLLM and its w/o UB variant produced correct results, with the former being more efficient.
  • Figure 5: A case study of SolverLLM and its variant w/o TE on a simple IP problem with their search trees. The content of notable nodes has been indicated by the dotted-dashed line. The global instructions generated by TE are used to guide the generation of all elements. The colored paths (red and blue) represent the optimal formulations, which ultimately point to the results.