Reasoning Planning for Language Models

Bao Nguyen, Hieu Trung Nguyen, Ruifeng She, Xiaojin Fu, Viet Anh Nguyen

The Cost of Static Reasoning

Large Language Models (LLMs) often rely on expensive, iterative reasoning methods to solve complex problems. Strategies like Best-of-$N$ (generating $N$ answers and picking the best), Beam Search, or Monte Carlo Tree Search (MCTS) significantly boost performance on math, logic, and coding tasks. However, applying these heavy, "test-time compute" methods to every query wastes massive amounts of compute.

Currently, systems apply these methods statically. If configured to use Best-of-16, an LLM will generate 16 answers for a brutally hard calculus proof, but it will also generate 16 answers for a basic arithmetic question. This one-size-fits-all approach creates a massive computational bottleneck. This paper introduces EPIC (Ensemble PlannIng with Contrastive learning), a framework that dynamically routes each incoming question to the most cost-effective reasoning method, matching top-tier accuracy while cutting computational costs by up to 80%.

The EPIC Framework: A Smart Router for Reasoning

EPIC acts as an intelligent router, predicting the most suitable reasoning method for a specific query before generating the answer to perfectly balance accuracy and inference cost.

Here is how the framework operates:

  1. The Universe of Methods: The authors define a pool of 81 different reasoning configurations, varying the base model, the search strategy (e.g., MCTS vs. Best-of-$N$), the temperature, and the aggregation method.
  2. Utility-Driven Labeling: During training, all methods are tested on a dataset of questions. Each method receives a "utility" score based on a user-defined parameter, $\lambda$, which weighs the trade-off between accuracy (correctness) and cost (token generation volume).
  3. Two-Tower Contrastive Learning: A lightweight sentence transformer (just 22M parameters) embeds the incoming question into a vector space. Simultaneously, an embedding is learned for each of the 81 reasoning methods. A contrastive loss function trains the model to pull the question's embedding closer to the method that yielded the highest utility.
Conceptual overview of EPIC's shared embedding space, mapping queries of varying difficulty to optimal reasoning methods.
  1. Theoretical Regularization: The authors derive strict probabilistic bounds for how accuracy scales as $N$ (the number of candidate answers) increases for different voting methods. These theoretical bounds act as a regularization term during training. This forces the model to logically ground methods that are identical except for their compute budget (e.g., Best-of-4 vs. Best-of-8), making the training highly sample-efficient.

At inference time, a new question is embedded, compared against the method embeddings via similarity search, and routed to the winning strategy.

Key Insights

  • Predicting compute needs is cheap: A tiny 80MB embedding model can accurately predict which heavy LLM reasoning strategy will work best, saving vast amounts of downstream compute.
  • Theory informs practice: The mathematical bounds derived for aggregation methods act as a powerful regularizer. By mathematically defining how compute scales, the model learns the "concept" of scaling compute much faster than it would through raw data alone.
  • Dialing in the trade-off: By tweaking the single $\lambda$ parameter, developers can seamlessly shift an AI system's behavior from "save as much compute as possible" to "get the right answer at all costs," without retraining the underlying LLMs.

Empirical Results

The authors evaluated EPIC across diverse datasets, including MATH (for training and primary evaluation), GSM8K (for out-of-domain transfer), and LiveCodeBench (for code generation).

Cost vs. Accuracy trade-off on the MATH benchmark. EPIC achieves a superior Pareto frontier compared to static methods.
  • Massive Efficiency Gains: On the MATH500 benchmark, EPIC (tuned for a balanced trade-off) matched the accuracy of the expensive Best-of-16 method (~86.4%) while using ~5x fewer tokens (1,859 vs. 10,036 average tokens per query).
  • Higher Accuracy Ceiling: When tuned purely for accuracy ($\lambda=1.0$), EPIC achieved 89.4% accuracy, beating Best-of-16, while still using ~30% fewer tokens (6,921). It achieves this by knowing when to deploy advanced searches like MCTS instead of relying on brute-force sampling.
  • Multi-Model Routing: EPIC successfully routed queries between a small (1.5B) and large (7B) model, maintaining the accuracy of the 7B model while cutting computational costs by over 50%.
  • Cross-Domain Success: The framework generalized well to code generation on LiveCodeBench, outperforming static Best-of-16 baselines while consuming fewer tokens.

Limitations and Future Work

Currently, EPIC learns a fixed embedding for each reasoning method in its predefined universe. If a brand new reasoning strategy is introduced, EPIC cannot zero-shot generalize to it; a new embedding must be trained.

Future work suggests replacing the trainable method embeddings with a secondary neural network that takes a textual description of a reasoning method and outputs its embedding. This would allow the system to instantly understand and route to newly invented reasoning methods, or even allow researchers to reverse-engineer entirely new reasoning algorithms by exploring the embedding space.

Summary updated

BibTeX
@inproceedings{nguyen2025reasoning,
  author = {Bao Nguyen and Hieu Trung Nguyen and Ruifeng She and Xiaojin Fu and Viet Anh Nguyen},
  title = {{Reasoning Planning for Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=QFjssnKdBI},
}
Figure