| name | eager-entropy-scaling |
| title | EAGER: Entropy-Aware GEneRation for Adaptive Inference-Time Scaling |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2510.11170 |
| keywords | ["inference-scaling","entropy","adaptive-computation","token-level-uncertainty","test-time"] |
| description | Monitor token-wise entropy to adaptively allocate compute during inference. Branch into multiple paths at high-entropy tokens, reducing token generation by up to 65% while improving accuracy by up to 37% on reasoning tasks. |
EAGER: Adaptive Computation via Entropy Monitoring
Parallel sampling and test-time scaling apply uniform compute to all prompts. EAGER recognizes that different problems require different computational effort: straightforward queries waste compute with extensive branching, while complex problems benefit from exploration.
Core insight: token-wise entropy reveals where the model is uncertain. By allocating compute resources only at high-entropy decision points, you reduce redundant computation while improving reasoning on hard problems.
Core Concept
Token-Level Entropy Monitoring: Track entropy of token probability distributions as generation progresses. High entropy = decision point where exploration helps.
Adaptive Branching: Dynamically branch into multiple reasoning paths at high-entropy tokens, skip branching at low-entropy tokens.
Budget-Aware Allocation: Redirect computational savings from simple problems to complex ones that need more exploration.
Architecture Overview
- Entropy Tracker: Computes entropy at each token position
- Branch Controller: Decides when to spawn multiple paths based on entropy
- Path Manager: Tracks parallel reasoning paths
- Result Aggregator: Combines results from multiple paths
Implementation Steps
Stage 1: Token-Level Entropy Computation
Monitor entropy throughout generation:
import torch
import torch.nn.functional as F
import numpy as np
class EntropyMonitor:
def __init__(self, entropy_threshold=0.8):
"""
Monitor entropy and detect high-entropy tokens.
Args:
entropy_threshold: percentile of entropy to trigger branching
"""
self.entropy_threshold = entropy_threshold
self.entropy_history = []
def compute_token_entropy(self, logits):
probs = F.softmax(logits, dim=-)
entropy = -(
probs * torch.log(probs + )
).(dim=-)
entropy
():
running_entropy_history :
running_entropy_history = .entropy_history
(running_entropy_history) > :
entropy_percentile = np.percentile(
running_entropy_history,
.entropy_threshold *
)
:
entropy_percentile =
should_branch = entropy > entropy_percentile
should_branch
():
.entropy_history.append(entropy.item())
:
():
.model = model
.entropy_monitor = entropy_monitor
():
input_ids = prompt
active_paths = [{
: input_ids,
: ,
:
}]
entropy_monitor = EntropyMonitor()
step (max_length):
new_paths = []
path active_paths:
torch.no_grad():
logits = .model(
path[]
).logits[:, -, :]
entropy = entropy_monitor.compute_token_entropy(logits)
entropy_monitor.update_history(entropy)
entropy_monitor.should_branch(entropy):
num_branches = (
num_candidate_branches,
// ( + path[])
)
log_probs = F.log_softmax(logits, dim=-)
top_log_probs, top_tokens = torch.topk(
log_probs,
k=num_branches,
dim=-
)
k (num_branches):
next_token = top_tokens[, k].unsqueeze().unsqueeze()
next_logprob = top_log_probs[, k].item()
new_path = {
: torch.cat(
[path[], next_token],
dim=-
),
: path[] + next_logprob,
: path[] +
}
new_paths.append(new_path)
:
log_probs = F.log_softmax(logits, dim=-)
next_token = log_probs.argmax(dim=-).unsqueeze()
next_logprob = log_probs[, next_token[, ]].item()
new_path = {
: torch.cat(
[path[], next_token.unsqueeze()],
dim=-
),
: path[] + next_logprob,
: path[]
}
new_paths.append(new_path)
(new_paths) > :
new_paths.sort(
key= p: p[],
reverse=
)
new_paths = new_paths[:]
active_paths = new_paths
best_path = (
active_paths,
key= p: p[] / (, (p[]))
)
best_path[]