Abstract
Large Language Models (LLMs) have demonstrated significant potential in general reasoning tasks, yet they frequently struggle with the structured, multi-step translation of natural language problems into formal mathematical optimization models. This paper presents BPP-Search, a novel reasoning framework that integrates Beam Search, Process Reward Models (PRM), and Pairwise Preference ranking to navigate complex reasoning paths. To support this framework, we introduce StructuredOR, a dataset providing granular, step-by-step annotations of the modeling process. Our evaluation demonstrates that BPP-Search substantially improves accuracy and efficiency over state-of-the-art baselines in operations research tasks.
Introduction
Translating a natural language word problem into a formal mathematical model, such as a Linear Programming (LP) formulation, requires precise identification of sets, parameters, variables, objectives, and constraints. While Chain-of-Thought (CoT) prompting helps, LLMs often fail due to two primary bottlenecks:
- Data Scarcity: Most existing Operations Research (OR) benchmarks only provide final objective values, lacking the intermediate labels necessary to train effective verifiers or reward models.
- Search Inefficiency: Existing methods like Tree-of-Thought (ToT) often explore redundant or erroneous paths without a mechanism to prune "dead-end" logic early.
Methods: The BPP-Search Framework
BPP-Search addresses these challenges through a three-stage algorithmic approach:
- Beam Search: Instead of a single reasoning path, the algorithm maintains the top-$k$ most promising candidates at each step, balancing exploration and exploitation.
- Process Reward Model (PRM): A specialized model (Qwen2.5-Math-1.5B) is fine-tuned to score intermediate reasoning steps. This allows the system to prune incorrect logic before it propagates through the tree.
- Pairwise Preference Model: At the final reasoning stage, where candidates are often highly similar, absolute scoring becomes unreliable. We employ a preference model to compare candidates in pairs, significantly refining the final selection.
The StructuredOR Dataset
A core contribution of this work is the StructuredOR dataset. Unlike traditional benchmarks, StructuredOR provides comprehensive labels for every stage of the modeling process: Sets $\rightarrow$ Parameters $\rightarrow$ Variables $\rightarrow$ Objectives $\rightarrow$ Constraints.
The dataset was constructed using a rigorous pipeline where GPT-4o generated initial instances, which were then verified for mathematical validity using the Gurobi solver. This ensures that the intermediate steps are not only logically consistent but also lead to solvable mathematical models.
Experimental Results
BPP-Search was evaluated against standard baselines using GPT-4o as the base policy model across three datasets: StructuredOR, MAMO-ComplexLP, and NL4OPT.
| Dataset | CoT (Baseline) | BPP-Search (Ours) |
|---|---|---|
| StructuredOR | 0.633 | 0.933 |
| Mamo-ComplexLP | 0.486 | 0.722 |
| NL4OPT | 0.566 | 0.804 |
The results indicate a massive jump in reliability. Notably, BPP-Search is also more efficient, retrieving correct solutions in 15–21 reasoning steps, compared to over 40 steps for exhaustive Tree-of-Thought methods.
Conclusion
BPP-Search demonstrates that supervising the reasoning process is far more effective than outcome-based supervision for complex mathematical modeling. By combining process-level rewards with pairwise preferences, we can significantly enhance the reliability of LLMs in operations research. Future work will focus on improving numerical precision for large-scale industrial problems and expanding the diversity of problem domains in StructuredOR.
Summary updated