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

Introduction

Solving complex optimization problems—such as logistics scheduling, supply chain management, or resource allocation—is a cornerstone of industrial efficiency. Traditionally, this process requires human experts to translate natural language descriptions into formal mathematical models, which are then solved using specialized software like Gurobi or CPLEX. This "formulation gap" remains a significant bottleneck. While Large Language Models (LLMs) show promise in bridging this gap, they often struggle with complex logic and lack the consistency required for industrial-scale tasks.

SolverLLM introduces a training-free framework that treats mathematical formulation not as a single-shot generation task, but as a structured search process. By integrating LLMs with a modified Monte Carlo Tree Search (MCTS), SolverLLM achieves state-of-the-art results across diverse benchmarks, demonstrating that scaling compute at "test-time" can effectively substitute for expensive supervised fine-tuning.

The Formulation Challenge

Existing approaches to LLM-based optimization typically fall into two categories: prompt-based methods and learning-based methods. Both face significant hurdles:

  1. Generalization: Prompt-based models often fail when encountering problem types outside their immediate context or when the complexity of the constraints increases.
  2. Data Scarcity: Learning-based methods require massive, high-quality datasets of paired natural language problems and mathematical formulations. Such datasets are expensive and difficult to produce at scale.

SolverLLM addresses these issues by allowing the model to explore, self-correct, and refine its mathematical logic through a structured search space, effectively "reasoning" its way to a valid formulation.

The SolverLLM Framework

At the heart of SolverLLM is an LLM-guided Monte Carlo Tree Search (MCTS). Rather than generating a complete model in one go, the framework decomposes the formulation into a standardized six-element schema:

  • Type: Identifying the problem category (e.g., Linear Programming, TSP).
  • Sets: Defining the indices and domains.
  • Parameters: Identifying the given constants.
  • Variables: Defining the decision variables.
  • Objective: Formulating the goal function.
  • Constraints: Establishing the mathematical boundaries.

Technical Innovations

To optimize this search process, the authors introduced three key innovations to the standard MCTS algorithm:

  • Dynamic Expansion: Traditional MCTS typically expands only at leaf nodes. SolverLLM allows the system to revisit and refine earlier decisions. For instance, if a constraint formulation fails, the model can backtrack to modify a variable type defined in an earlier step.
  • Prompt Backpropagation: Instead of relying on simple numerical rewards (0 or 1), SolverLLM utilizes "reasoning signals." When a branch fails, the LLM generates a textual explanation of the error, which is propagated back up the tree to guide subsequent search iterations.
  • Uncertainty Backpropagation: The framework employs "semantic entropy" to measure the LLM's confidence. If the model provides inconsistent reasoning for a specific node, that branch is down-weighted, ensuring the search focuses on the most reliable logical paths.

Evaluation and Results

SolverLLM was evaluated against six standard benchmarks, including NL4Opt (natural language to linear programming), Mamo (mixed-integer problems), and IndustryOR (industrial-scale optimization tasks).

The results demonstrate a significant performance leap over both general-purpose models and specialized agents:

  • State-of-the-Art Accuracy: On the NL4Opt benchmark, SolverLLM achieved 97% accuracy, significantly outperforming GPT-4o (81%) and specialized agents like OptiMUS (78.8%).
  • Robust Generalization: On the challenging IndustryOR dataset, which features high-complexity operations research problems, SolverLLM reached 56% accuracy. This outperformed the leading learning-based model, LLMOPT (46%), without requiring any task-specific training.
  • Efficiency through Pruning: Despite being a search-based method, SolverLLM proved more token-efficient than competitors like AutoFormulation, thanks to its uncertainty-aware pruning which avoids unproductive search paths.

Discussion: Test-Time Scaling

A primary insight of the paper is the "compute-performance trade-off." SolverLLM proves that by allowing a model to run more iterations at inference time (spending more tokens to explore the search tree), it can solve problems that even much larger, fine-tuned models cannot.

Furthermore, the inclusion of the "Type" anchor proved vital. By forcing the model to first categorize the problem, the LLM generates a global set of instructions that keeps the subsequent formulation grounded in the correct mathematical logic. The use of textual feedback as a reward signal also proved far more effective for symbolic math than traditional scalar rewards.

Conclusion and Future Work

SolverLLM represents a shift in how we approach symbolic reasoning with LLMs, moving from "generation" to "guided search." While the framework shows remarkable accuracy and generalization, it does introduce higher inference latency due to the multiple LLM calls required by MCTS. Additionally, the system remains dependent on the quality of the "judger" LLM used to provide feedback.

Future research will focus on applying SolverLLM to ambiguous or "noisy" real-world data where problem descriptions may be incomplete. There is also significant potential in hybrid models that combine this search-based strategy with lightweight fine-tuning to reduce latency while maintaining high reasoning performance.

Summary updated

BibTeX
@inproceedings{li2025solverllm,
  author = {Dong Li and Xujiang Zhao and Linlin Yu and Yanchi Liu and Wei Cheng and Zhengzhang Chen and Zhong Chen and Feng Chen and Chen Zhao and Haifeng Chen},
  title = {{SolverLLM: Leveraging Test-Time Scaling for Optimization Problem via LLM-Guided Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=mN3CMpfWR6},
}
Figure