Pass@$k$ Failure Rate in LLM Evaluation
- Pass@$k$ failure rate is a key metric that quantifies the probability that all k model attempts fail, reflecting model coverage and reliability.
- The metric is mathematically defined to show exponential decay with increased sampling and serves as a diagnostic for exploration collapse in reinforcement learning.
- Mitigation methods like SimKO empirically reduce failure rates for small k values, enhancing output diversity and reliability in tasks such as code generation.
The Pass@ failure rate is a key metric for evaluating the probabilistic success or failure of machine learning models, especially LLMs, in tasks such as code generation, mathematical reasoning, and logic where the outcome is verifiable. The metric quantifies the likelihood that none out of independent model-generated solutions to a given task are correct, encoding both the coverage and reliability of a model under a finite sampling budget.
1. Formal Definition and Mathematical Formulation
Given a model with an (unknown) per-trial success probability for each of tasks, the Pass@ metric is defined as the expected fraction of problems solved by obtaining at least one correct solution in independent samples:
The Pass@ failure rate, denoted , is the complementary probability that all samples fail:
0
In code/NLG settings with 1 candidates and 2 correct, for any 3,
4
representing the probability that none of the 5 sampled programs are correct (Lyu et al., 2024).
2. Statistical Properties and Limiting Behavior
For 6, 7 decays exponentially as 8 increases, i.e., 9 as 0. Consequently, for any task where the model has nonzero probability of success, 1 and 2 in the large-sample limit, regardless of how small 3 is. On tasks with discrete or small-support output spaces, this implies that performance metrics at large 4 may reflect only the existence of nonzero probability mass on the correct answer rather than substantive reasoning ability. This effect can inflate apparent reasoning boundaries and mask brittle model behavior (Dragoi et al., 9 Oct 2025).
3. Diagnostic Role and Exploration Collapse
Pass@5 failure rate serves as a diagnostic tool for latent coverage and diversity in the model’s output distribution. However, analysis shows that optimizing Pass@6 directly as a reinforcement learning (RL) objective provides no additional exploration signal over Pass@7, because its gradient is collinear with that of Pass@8:
9
where 0 (Yu, 20 Nov 2025). In low-success regimes (1), the gradient vanishes, while in high-success regimes (2), 3. Also, RL policies tend to concentrate probability mass on a single mode, causing multi-sample gains to collapse (4 for a small residual error 5), and further draws add little coverage. Thus, multi-sample utility diminishes under exploitation-biased training and exploration collapse.
4. Impact of Training Dynamics and Mitigation Methods
Standard RLVR methods such as GRPO and PPO increase Pass@6 but often do so at the expense of higher failure rates for 7, owing to over-concentration of probability on the top-1 candidate and suppression of alternative modes:
- Token-level metrics show 8 (dominant token), 9 (all probability mass squeezed out) (Peng et al., 16 Oct 2025).
- Stronger concentration yields higher 0 for 1.
Mitigation strategies such as SimKO introduce asymmetric updates: for correct responses, positive gradient is shared among the top-2 tokens; for incorrect responses, a stronger penalty is applied to the top-1 token, but only at high-entropy ("forking") steps. This reduces fail@3 by maintaining greater posterior support over multiple valid continuations. Empirical data (Qwen2.5-Math-7B, 4) show, for 5:
- GRPO: 6
- SimKO: 7 (a reduction of 8 percentage points, or 9 relative) Similar benefits are reported for larger 0 and on other benchmarks (Peng et al., 16 Oct 2025).
| K | GRPO fail@K | SimKO fail@K | Reduction (pp, %) |
|---|---|---|---|
| 1 | 58.3% | 56.6% | 1.7, 2.9% |
| 8 | 41.9% | 38.6% | 3.3, 7.9% |
| 256 | 23.9% | 19.5% | 4.4, 18.4% |
5. Alternative Breadth-Depth Metrics: Cover@1 and Failure@2
Pass@3 and its failure rate can be interpreted as a Beta(4)-weighted average over the "breadth-depth" curve Cover@5, which measures the fraction of tasks for which the per-trial success rate meets or exceeds a reliability threshold 6:
7
Accordingly,
8
Large-9 Pass@0 places all weight near 1, so the resulting curves overestimate model reasoning boundaries by counting essentially any nonzero chance of success. By contrast, plotting Failure@2 for high 3 reveals tasks on which model coverage collapses as the threshold tightens. This distinguishes genuine reasoning skill (consistent reliability) from random guessing. Empirical studies (OMEGA, Reasoning Gym) show that base models may outperform exploration-regularized models only for large 4 (random-guessing regime), while the latter maintain superior coverage for high-reliability thresholds (Dragoi et al., 9 Oct 2025).
6. Applications in Code Generation and Ranking
Failure@k has practical implications in scenarios such as code generation, where the objective is to maximize the likelihood that a user identifies a correct solution within their top-5 reviewed candidates. Methods like Top Pass optimize the Pass@6 loss directly through neural ranking, systematically minimizing Failure@7 at small k (e.g., 1–10) — a regime aligned with real-world user tolerance for reviewing multiple code suggestions. For instance, on CodeContests (n=200, DeepSeek-Coder), Top Pass reduces the one-shot failure rate from 92.7% (random order) to 90.3%, and consistently delivers higher coverage across k (Lyu et al., 2024).
| Method | pass@1 | fail@1 |
|---|---|---|
| Random (DeepSeek) | 5.2% | 94.8% |
| Top Pass | 9.7% | 90.3% |
7. Best Practices and Interpretive Guidance
Empirical and theoretical analyses warn against reporting Pass@8 or Failure@9 in isolation, especially at large sampling budgets where degeneracy and random guessing can distort true model capabilities. Recommended best practices include:
- Reporting both Pass@0, Failure@1 and the full breadth-depth curve via Cover@2/Failure@3.
- Aggregating coverage at multiple 4 values (e.g., 0.2, 0.8) or via area-under-curve (AUC5) to robustly assess reasoning reliability (Dragoi et al., 9 Oct 2025).
- Avoiding the use of Pass@6 as the sole RL optimization target; instead, employ objectives or regularizers that explicitly promote solution diversity and healthy exploration (e.g., SimKO, PKPO, KL-regularization) (Yu, 20 Nov 2025, Peng et al., 16 Oct 2025).
This approach grants a more rigorous and nuanced characterization of both "breadth" (fraction of problems ever solved) and "depth" (fraction consistently solved) in model evaluation, and mitigates overestimation due to chance success.