Optimizing Reasoning Efficiency through Prompt Difficulty Prediction

Bo Zhao, Berkcan Kapusuzoglu, Kartik Balasubramaniam, Sambit Sahu, Supriyo Chakraborty, Genta Indra Winata

TL;DR

Large reasoning models achieve state-of-the-art accuracy at the cost of massive compute and lengthy reasoning chains. This paper introduces a learned routing framework that predicts problem difficulty and model correctness directly from intermediate hidden layers of an LLM, dispatching each query to the smallest model likely to solve it. On benchmark math tasks, this approach matches the performance of a 32B reasoning model while cutting inference compute by roughly one-third.

What Problem Does This Paper Address?

Applying large reasoning models (such as s1.1-32B) uniformly across all user queries is computationally wasteful. Simpler problems do not require extensive reasoning traces or massive parameter counts; smaller, faster models can handle them just as effectively.

While earlier routing methods relied on manual, hand-crafted heuristics (such as counting obstacles in planning environments) or external scoring agents, this paper addresses the need for a general, automated, and lightweight mechanism to estimate reasoning difficulty and route prompts to the most cost-effective model before generating full answers.

Methods

The authors use internal transformer hidden representations to predict difficulty and route queries:

  1. Feature Extraction: A single "representative" model processes the input prompt up to a specific layer. The authors extract intermediate hidden states (e.g., layer 45 from s1.1-32B or layer 20 from Llama-3.1-Nemotron-Nano-8B).
  2. Lightweight Prediction Heads:
  3. Difficulty Predictor: A 3-layer MLP (hidden dims: 256, 64) trained with cross-entropy loss to predict discrete difficulty levels (1 to 5).
  4. Correctness Predictor: A 4-layer MLP (hidden dims: 8192, 2048, 128) trained with binary cross-entropy to predict whether a specific candidate LLM will answer a given problem correctly.
  5. Routing Policies:
  6. Difficulty-Based Routing: Routes a problem to a larger model if the predicted difficulty exceeds a tuned threshold (between 2.1 and 2.9); otherwise, routes to a smaller model.
  7. Accuracy-Based Routing: Predicts success probabilities across candidate models and routes each query to the weakest (cheapest) model whose predicted probability exceeds a given threshold (between 0.05 and 0.9).

Datasets

  • MATH Dataset: 7,500 competition math problems labeled with ground-truth difficulty ratings from Level 1 (easiest) to Level 5 (hardest). Split into 6,000 problems for training the difficulty classifier and 1,500 for validation.
  • MathCombined (Introduced Benchmark): A newly curated composite evaluation dataset of 3,136 reasoning problems across diverse domains without difficulty annotations. Formed by aggregating:
  • GSM8K (1,319 grade school math tasks)
  • TheoremQA (800 STEM and finance theorem problems)
  • OlympiadBench (675 competition math problems)
  • Minerva (272 undergraduate STEM problems)
  • AMC23 (40 problems from AMC 12)
  • AIME24 (30 problems from AIME I/II)
  • Splits: 1,882 train, 626 validation, and 628 for router evaluation.

Key Insights and Ideas

  • Middle layers contain the best routing signals: Prediction accuracy peaks (and loss bottoms out) when tapping representations from intermediate transformer layers (e.g., layer 45 out of 64 in s1.1-32B, or layer 20 in Nemotron-8B), outperforming final-layer representations.
  • Model capabilities are not strictly hierarchical: Pairwise comparisons show that every single model—even weaker baselines like Mixtral-8x7B-Instruct—correctly solves problems that the strongest reasoning model (s1.1-32B) misses. Consequently, intelligent routing can theoretically outperform any individual model in the pool.
  • Small models can act as routers: Router representations do not strictly require a 32B model; hidden states extracted from an 8B model (Llama-3.1-Nemotron-Nano-8B) perform similarly well at difficulty prediction and routing.

Key Results

  • Comparable Accuracy with 1/3 Compute Reduction: On the MathCombined benchmark, the accuracy-based router matched and slightly exceeded the accuracy of the standalone s1.1-32B flagship model (~76–77% accuracy) while requiring only ~2/3 of the average inference compute time (dropping from ~4.0 seconds/question to ~2.6–3.0 seconds/question).
  • Consistently Beats Random Baselines: In two-model configurations across multiple thresholds (2.1 to 2.9), difficulty-based routing consistently forms a superior Pareto frontier compared to random assignment between small and large models (e.g., between OLMo-2-7B-Instruct, Llama-3.1-8B-Instruct, or Phi-4 and s1.1-32B).

Limitations and Future Work

  • Single-Model Feature Dependency: The routing decisions rely on intermediate representations from a single base model rather than evaluating each candidate model's representation.
  • Limited Domain Scope: Evaluation was conducted exclusively on mathematical and quantitative reasoning benchmarks.
  • Future Directions: The authors highlight several possibilities:
  • Nearest-neighbor routing based on embedding similarity to previously solved problems.
  • Utilizing difficulty classifiers for automatic dataset labeling, curriculum learning, and selective abstention (identifying when a problem is simply too hard for any model in the pool).

Summary updated

BibTeX
@inproceedings{zhao2025optimizing,
  author = {Bo Zhao and Berkcan Kapusuzoglu and Kartik Balasubramaniam and Sambit Sahu and Supriyo Chakraborty and Genta Indra Winata},
  title = {{Optimizing Reasoning Efficiency through Prompt Difficulty Prediction}},
  booktitle = {ER @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=vAFTyX6kbF},
}
Figure