| name | think-right-reasoning-allocation-calibration |
| title | Think Right: Learning Adaptive Reasoning Allocation |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2510.01581 |
| keywords | ["reasoning-allocation","difficulty-adaptive","thinking-tokens","efficiency"] |
| description | Dynamically allocate reasoning budgets per-task: 36.8% length reduction while improving accuracy 8.4% by learning which problems warrant deep reasoning vs. quick answers. Use when optimizing reasoning efficiency across variable-difficulty problems. |
Think Right: Learning Adaptive Reasoning Allocation
This work addresses overthinking and underthinking in reasoning models through difficulty-adaptive budget allocation. By learning which problems need extensive reasoning versus quick answers, models achieve both efficiency gains (36.8% length reduction) and accuracy improvements (8.4%).
Core Architecture
- Difficulty estimation: Attention-based features predict task complexity
- Adaptive compression: Prune unnecessary reasoning steps based on estimated difficulty
- Reward structure: Bonus for efficiency on easy problems, bonus for accuracy on hard problems
- Attention-guided selection: Use self-attention patterns to identify important reasoning steps
Implementation Steps
Setup difficulty-adaptive reasoning allocation system:
from traac import AdaptiveReasoningModel, DifficultyEstimator
difficulty_estimator = DifficultyEstimator(
features=["token_uncertainty", "attention_entropy", "problem_type"],
num_difficulty_tiers=3
)
adapter = AdaptiveReasoningModel(
base_model=your_reasoning_llm,
difficulty_estimator=difficulty_estimator,
compression_strategy="attention_guided"
)
budget_config = {
"easy": {"max_thinking_length": 200, "compression_ratio": 0.7},
"medium": {"max_thinking_length": 500, "compression_ratio": 0.5},
"hard": {"max_thinking_length": 1000, "compression_ratio": 0.3}
}
Execute RL training with difficulty-aware rewards:
step, batch (training_dataloader):
problems = batch[]
ground_truth = batch[]
reasoning_full = model.generate_reasoning(
problem=problems,
max_length=,
temperature=
)
difficulty_scores = difficulty_estimator.estimate(
reasoning=reasoning_full,
problem=problems
)
difficulty_tiers = torch.argmax(difficulty_scores, dim=)
compressed_reasoning = []
i, (reasoning, tier) ((reasoning_full, difficulty_tiers)):
budget = budget_config[[, , ][tier]]
compressed = adapter.compress(
reasoning=reasoning,
target_length=((reasoning) * ( - budget[])),
important_tokens_selector=
)
compressed_reasoning.append(compressed)
predictions = model.generate_answer(
problem=problems,
reasoning=compressed_reasoning,
temperature=
)
rewards = []
i, (pred, truth, tier) ((predictions, ground_truth, difficulty_tiers)):
is_correct = verify_answer(pred, truth)
tier == :
reasoning_length = (compressed_reasoning[i])
efficiency_bonus = (, - (reasoning_length / ))
reward = ( is_correct ) + * efficiency_bonus
tier == :
reward = is_correct
:
reward = is_correct -
rewards.append(reward)
rewards = torch.tensor(rewards)
loss = adapter.compute_rl_loss(
reasoning_lengths=[(r) r compressed_reasoning],
answers=predictions,
rewards=rewards,
kl_coefficient=
)
loss.backward()
optimizer.step()
optimizer.zero_grad()