Direct Pass@$k$ Optimization for Thought Pruning: Balancing Quality and Diversity in Test-Time Reasoning

Mahdi Salmani, Adel Javanmard, Devansh Gupta, Meisam RazaviyaynarXiv 2026 · arXiv

TL;DR

PKTP (Pass@k Thought Pruning) is a new framework for LLM reasoning that directly optimizes the pass@k metric to select the most promising partial reasoning chains. By modeling the joint distribution of rollout outcomes, PKTP naturally balances solution quality with reasoning diversity, outperforming traditional methods that focus on only one of these aspects.

What Problem Does This Paper Address?

Test-time scaling—generating many candidate reasoning paths (rollouts) to find a correct answer—has become a standard way to boost LLM performance on complex tasks. However, generating and evaluating hundreds of long reasoning chains is computationally expensive.

To save compute, researchers use "thought pruning": they generate $N$ rollouts up to a short prefix (length $T$), select the $k$ most promising ones, and only run those to completion. The challenge lies in the selection criteria.

  • Quality-based methods (exploitation) pick the highest-scoring prefixes, but these often cluster together and fail for the same reason.
  • Diversity-based methods (exploration) pick dissimilar prefixes to cover more ground, but they often waste budget on low-quality "outliers" that are unlikely to ever reach a correct answer.

The authors argue that neither approach directly optimizes what we actually care about: the probability that at least one of the $k$ kept rollouts is correct.

Figure 1: Test-time pruning. Only k of the N rollouts (ringed) continue past the cutoff T, up to the budget B.

Methods

The paper introduces PKTP, which treats pruning as a subset selection problem aimed at maximizing the pass@k of the kept set $S$.

  1. Probabilistic Modeling: They model the latent "correctness score" of a rollout as a combination of its individual quality (predicted by a linear probe on hidden states) and a correlation term. This correlation term uses the similarity between rollout embeddings to model the fact that similar reasoning paths tend to succeed or fail together.
  2. Submodular Approximation: Because calculating the exact pass@k for every possible subset is computationally hard (NP-hard), the authors derive a second-order surrogate objective. Crucially, they prove this surrogate is submodular.
  3. Greedy Selection: Thanks to submodularity, a simple greedy algorithm—adding the rollout that most increases the estimated pass@k at each step—is guaranteed to be near-optimal.
  4. Efficiency: By using rank-one matrix updates, the greedy selection process is highly efficient, making it practical for real-time inference.

Datasets

The authors evaluated PKTP across eight open-weight reasoning models (ranging from 0.6B to 8B parameters), including the Qwen3 series, OpenMath-Nemotron, and DeepSeek-R1-Distill models. To ensure the benchmarks weren't "saturated" (too easy or too hard), they used a pooled set of problems from:

  • AIME (2024–2026)
  • HMMT (2024–2026)
  • RIMO-N
  • BeyondAIME
  • AMO-Bench
  • OlymMATH (Easy and Hard)
  • Omni-MATH (Levels 7–9)

Key Insights and Ideas

  • Natural Balance: The pass@k objective inherently balances quality and diversity. It rewards high-quality paths but penalizes redundancy; if two paths are nearly identical, adding the second one provides diminishing returns to the overall probability of success.
  • The "Exploitation Trap": Quality-only probes often suffer from "pure exploitation," where they confidently select a cluster of rollouts that all happen to be wrong. PKTP avoids this by forcing the selection to spread out across the representation space.
  • Theoretical Unification: The authors show that PKTP is a generalization of existing methods. When rollout correlations are zero, it behaves like a standard linear probe. When all rollouts have equal quality, it reduces to a diversity-based method like RepExp.
Figure 2: Conceptual illustration. The same pool of candidate rollouts, positioned by their partial rollout representations in embedding space, under three pruning strategies. Each rollout is colored by its predicted correctness and marked ✓/✗by its actual outcome; the k = 3 kept rollouts are ringed. (a) Pure exploitation keeps the highest-scoring rollouts, but they are correlated and cluster together, so they miss the correct rollout. (b) Pure exploration keeps a maximally diverse subset yet spends its budget on low-quality rollouts, also missing it. (c) Our method optimizes pass@k directly over the kept subset, balancing quality and diversity, and retains the correct rollout.

Key Results

PKTP consistently outperformed both quality-based (Linear Probe) and diversity-based (RepExp) baselines across all eight models.

  • Performance Gains: The advantage is most pronounced at moderate values of $k$ (e.g., $k=4$). For instance, on the DeepSeek-R1-Distill-Qwen-7B model, PKTP outperformed the Linear Probe by 3.3 percentage points at $k=4$.
  • Scaling with Compute: PKTP's performance improves as the cutoff threshold $T$ increases (more information revealed) and as the initial pool size $N$ grows (more candidates to choose from).
  • Robustness: Unlike the Linear Probe, which sometimes performed worse than random selection at higher $k$ values due to its bias toward correlated failures, PKTP stayed above the random baseline in every tested scenario.

Limitations and Future Work

  • Embedding Quality: The method relies on the quality of the partial rollout representations (currently an EMA of hidden states). If the embeddings don't capture the "correctness signal" well, the pruning will be less effective.
  • Binary Outcomes: The current work focuses on binary (correct/incorrect) outcomes. The authors suggest extending this to continuous rewards (e.g., maximizing the best reward in the set) as a promising future direction.
  • Fixed Cutoff: The paper uses a fixed token cutoff $T$. Future work could explore dynamic pruning, where the model decides when to prune based on the confidence of the current rollout pool.

Summary updated

Abstract

Test-time scaling has emerged as a key inference strategy for reasoning models, where a model generates a large number of candidate solutions in the hope of finding at least one correct solution. Running all candidate solutions to completion can be computationally demanding, so recent work prunes the candidate pool after generating only a short prefix, committing further computation only to the surviving candidates. Existing pruning strategies divide broadly into two categories: Quality-based methods assign a score to each partial solution and discard those predicted to ultimately lead to an incorrect final solution, while diversity-based methods select partial solutions that follow different reasoning trajectories and are therefore likely to cover different final solutions. The tension between these two objectives is an instance of exploration versus exploitation, yet little to no prior work on pruning exposes this trade-off directly, let alone optimizes it. In this paper, we introduce a pruning procedure that addresses this trade-off directly by optimizing pass@$k$ over the selected solution pool. In particular, it chooses the pool to maximize the probability that at least one of its partial solutions, when continued to completion, yields a correct answer. Because this objective simultaneously rewards high-quality partial solutions and penalizes redundancy among them, quality and diversity are naturally balanced by the criterion itself rather than through separate ad-hoc design choices. On eight open-weight reasoning models, our method outperforms existing quality-based and diversity-based pruning strategies. The gains are particularly pronounced when the pruning procedure keeps a moderate number of partial solutions for continued generation, highlighting the value of directly balancing quality and diversity during pruning.
BibTeX
@misc{salmani2026direct,
  author = {Mahdi Salmani and Adel Javanmard and Devansh Gupta and Meisam Razaviyayn},
  title = {{Direct Pass@$k$ Optimization for Thought Pruning: Balancing Quality and Diversity in Test-Time Reasoning}},
  year = {2026},
  eprint = {2610.31667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.31667},
}
Figure