TL;DR
Current test-time compute scaling methods for large language models (LLMs), such as Best-of-N sampling, are highly inefficient because they allocate a fixed budget of samples regardless of a problem's difficulty. This paper introduces ZIP-RC, a framework that repurposes unused vocabulary logits to predict a joint distribution of final correctness and remaining generation length at every token step with zero computational overhead. By optimizing a custom sampling utility, ZIP-RC dynamically allocates compute—pruning unpromising paths and branching successful ones—improving accuracy by up to 12% over majority voting at equal or lower cost.
What Problem Does This Paper Address?
When tackling complex reasoning tasks, generating multiple reasoning paths and selecting the best one (test-time scaling) significantly boosts LLM performance. However, standard approaches like Best-of-N (BoN) sampling are rigid: every generated path is run to completion, wasting massive amounts of compute on easy queries and inflating latency on hard ones.
While early-stopping and pruning methods exist, they typically rely on simple scalar confidence scores. A scalar cannot capture the central reward-cost trade-off: a low-confidence path might be worth pursuing if it is nearly finished, whereas a high-confidence path might be impractical if it requires thousands more tokens. Furthermore, existing verification or reward models introduce substantial computational overhead because they require extra forward passes or entirely separate models.
The authors address this by equipping LLMs with zero-overhead introspection—the real-time ability to predict their own future success (reward) and the remaining tokens required to get there (cost).
Methods
The authors introduce two core concepts: ZIP (Zero-overhead Introspective Prediction) and its application to reward-cost tracking, ZIP-RC.
- Logit Repurposing (ZIP): Modern LLMs have large vocabularies that often contain reserved or unused tokens. ZIP repurposes these unused logits in the output head to parameterize auxiliary predictions within the exact same forward pass used for next-token prediction. During inference, these reserved logits are simply masked out so they don't interfere with standard text generation.
- Joint Reward-Cost Distribution (ZIP-RC): ZIP-RC maps these reserved logits to a 2D grid representing a discretized joint distribution over the expected final reward (correctness) and the remaining generation length (cost).
- Meta-MDP Search Framework: The authors formalize test-time search as a high-level Markov Decision Process (a Meta-MDP). The state is the prefix tree (trie) of all generated tokens. At each step, the model selects a "meta-action"—a multiset of token prefixes to continue, branch, or prune.
- Sampling Utility Optimization: To choose the best meta-action without simulating future rollouts, the framework maximizes a sampling utility derived from the joint distribution. This utility explicitly balances accuracy, compute, and latency: $$\text{Sampling Utility} = E[\text{Reward}] - E[\text{Compute}] - E[\text{Latency}]$$ Using order-statistics calculations over the full joint distribution, the model can quantify the exact marginal benefit of spawning an extra sample or pruning an active one.
Datasets
- Training Corpus: The authors generated a mathematical training dataset of approximately 100,000 on-policy rollouts by combining prompts from DeepScaleR, the MATH training split, and the GSM8K training split. Each rollout was labeled for correctness to train the model-specific ZIP-RC heads.
- Evaluation Benchmarks: The approach was validated on several challenging math benchmarks: AIME 2024, AMC 2023, MATH-500, and GSM8K. Additionally, they evaluated performance on a Concatenated Mixed-Difficulty Benchmark to specifically measure how effectively the model adaptively allocates compute across problems of varying difficulty.
Key Insights and Ideas
- Exploiting Vocabulary Slack: The realization that auxiliary heads are architecturally unnecessary; we can extract complex, multi-dimensional introspective signals for free by tapping into the model's native vocabulary space.
- The Power of the Joint Distribution: Predicting reward and cost together is fundamentally superior to predicting them independently. It allows the model to perform "planned pruning" by evaluating how a specific truncation horizon alters both the expected correctness and the total token cost.
- Variance-Driven Branching: Access to the full distribution allows the model to recognize when a trajectory has high variance. If the reward distribution is highly uncertain, the model intelligently chooses to branch (generate parallel samples) because the expected maximum of multiple samples scales favorably with variance.
Key Results
- Substantial Accuracy Boosts: At matched generation costs, ZIP-RC sampling consistently outperformed majority voting and weighted BoN baselines. On the highly difficult AIME 2024 benchmark, it achieved up to a 12% absolute accuracy gain while utilizing less average compute.
- Smooth Pareto Frontiers: By adjusting control coefficients ($\alpha$ to balance compute vs. latency, and $\beta$ to balance quality vs. cost), ZIP-RC successfully traces smooth Pareto frontiers that strictly dominate standard inference baselines.
- Dynamic Resource Allocation: ZIP-RC naturally shifts compute where it is needed most. It aggressively prunes trajectories on easy problems or when using stronger models, while allocating more parallel samples to harder tasks and weaker models.
Limitations and Future Work
- Dependency on Sample Diversity: ZIP-RC's search strategy relies on the underlying LLM's ability to generate diverse reasoning paths. If the model suffers from low generation diversity (i.e., generating highly correlated or identical prefixes), scaling up the sample pool via meta-actions yields diminishing returns.
- Future Directions: The authors note that an important next step is investigating methods to actively encourage sample diversity during inference, potentially through prompt mutations or by utilizing a mixture of different models. They also suggest extending zero-overhead introspection to non-mathematical domains.
Summary updated