Where to Abstain When the Score Is F1

Many deployed classifiers are allowed to say "I don't know" and pass a case to a human. They are also judged by metrics such as the F1 score (the harmonic mean of precision and recall), which are computed from counts over the whole set of answered cases rather than averaged case by case. The standard abstention rule rejects inputs whose top predicted probability is low, which means inputs near 0.5. Classical results on F1 thresholding say that on imbalanced data the right yes/no cutoff often sits far below 0.5. These two facts collide. A rare-disease patient with predicted risk 0.3 may be a confident positive under an F1-tuned cutoff of 0.1, yet the standard abstention rule treats that patient as one of the most uncertain cases. This proposal derives the decision rule that is actually optimal when a system can predict positive, predict negative, or abstain, and is scored by F1 on the cases it answers. It then builds a threshold-selection procedure with finite-sample guarantees on top of that rule.

The core result we expect is a closed form. Lipton et al. showed that for calibrated probabilities the F1-optimal cutoff is half the optimal F1 value, written $t^* = F^*/2$. Extending their argument to three actions gives an abstention band whose two edges are explicit functions of the achieved selective F1 and the price of coverage. The band is centered on $F^*/2$, not on 0.5, and it is strongly lopsided toward the negative side. That lopsidedness exposes a way that "F1 on the accepted set" can be gamed, which matters for how such systems should be evaluated.

Core Claim

Let $\eta(x)$ be the calibrated probability that input $x$ is positive. Let $F$ be the selective F1 value at the optimum, meaning F1 computed only over accepted cases. Let $\lambda \ge 0$ be the multiplier on a minimum-coverage constraint, which can be read as the price, in F1 units, of abstaining on one more case.

The derivation uses the linear-fractional trick of Consistent Binary Classification with Generalized Performance Metrics. Selective F1 is at least $F$ exactly when $2\,\mathrm{TP}(1-F) - F(\mathrm{FP}+\mathrm{FN}) \ge 0$. That expression decomposes over instances. Each instance then picks the largest of three affine functions of $\eta$:

$$\text{predict 1: } \eta(2-F) - F + \lambda, \qquad \text{predict 0: } \lambda - F\eta, \qquad \text{abstain: } 0.$$

The two prediction lines cross at $\eta = F/2$, which recovers Lipton's threshold. The model abstains exactly when both prediction scores are negative:

$$\frac{\lambda}{F} < \eta(x) < \frac{F-\lambda}{2-F},$$

and this band is non-empty only when $\lambda < F^2/2$.

Three consequences follow, and each can be tested. First, the band surrounds $F/2$ rather than 0.5. Second, the band widens far more into low-probability territory than into high. F1 never rewards true negatives, so handing a probable negative to a human costs the metric nothing beyond coverage, while it removes a possible false negative. Third, as abstention raises $F$, the optimal yes/no cutoff $F/2$ moves upward. The classification threshold and the rejection threshold are therefore coupled and cannot be tuned in sequence.

The same three-line structure holds for every linear-fractional metric covered by Consistent Binary Classification with Generalized Performance Metrics and On the Statistical Consistency of Plug-in Classifiers for Non-decomposable Performance Measures. Only the slopes change. For metrics outside that family, such as G-mean, we would apply the same linearization at each iteration of a Frank-Wolfe-style solver, as in Consistent Plug-in Classifiers for Complex Objectives and Constraints.

Relation to Prior Work

The work that motivates this proposal comes from both directions. On the thresholding side, the papers above, together with Binary Classification with Karmic, Threshold-Quasi-Concave Metrics, establish that a single cutoff on $\eta$ is optimal for two-action classification. None of them considers a third action. On the abstention side, Optimal Strategies for Reject Option Classifiers proves that thresholding an "expected-loss" score is optimal across cost-based and coverage-constrained formulations. Its proof assumes a loss that is averaged point by point, and our rule is what replaces that score when the loss is a ratio of counts. Selective Classification for Deep Neural Networks supplies the method we reuse for guarantees: a binomial-bound binary search for the rejection threshold, which we adapt to a ratio metric.

Three papers are closest to this idea, and each differs in a specific way. Multi-label classification with a reject option already optimizes rejection thresholds for micro- and macro-F1 and reports large gains. Its thresholds come from heuristic cost approximations, with no optimality form, no consistency result, and no finite-sample control. We supply all three, and its method is a primary baseline. AUC Optimization with a Reject Option derives a Bayes-optimal rule with abstention, but for pairwise ranking, so it must reject pairs of instances. Our rule decides one instance at a time. Act or Defer uses class-stratified conformal selection to control false-discovery rates on rare clinical outcomes. That is a precision-type guarantee, close in spirit, but it does not target F1 or trade recall against coverage.

Two papers constrain the design. Towards Better Selective Classification finds that learned selection heads do not beat thresholding a well-trained model's softmax output, so we build only post-hoc rules on a fixed probability model. F1-Optimal Thresholding in the Multi-Label Setting shows that macro-F1 drives uninformative labels toward predicting positive everywhere. Our rule must be checked against that failure.

Research Program

The theory component has three parts. The first is to prove the three-action Bayes rule above for linear-fractional metrics under a coverage constraint, including the randomized tie-breaking required when $\eta$ puts mass on a band edge. The second is to show that a plug-in version, which fits $\hat\eta$ on one split and picks $(F, \lambda)$ on another, is consistent, with regret controlled by the calibration error of $\hat\eta$. This follows the surrogate-regret route of Surrogate regret bounds for generalized classification performance metrics. The third is to characterize the "free negatives" effect: under coverage-constrained selective F1, the optimal rule sends predicted negatives to the human before it touches ambiguous positives. We will then contrast this with a deferral-aware objective in which a rejected case keeps a fraction of its error cost. That objective shifts $t_{lo}$ upward in closed form.

The algorithm component follows from the closed form. Both band edges are fixed once $(F, \lambda)$ is known, and $F$ is a fixed point, so selection reduces to a one-dimensional search over coverage. For each candidate $\lambda$, we iterate $F \leftarrow$ empirical selective F1 of the induced band until it stops changing. For a certified version, we bound the true-positive, false-positive, and false-negative rates on held-out data with simultaneous binomial bounds. These give a lower confidence bound on selective F1, and an SGR-style search returns the largest-coverage band whose bound exceeds a user target $F_0$ with probability $1-\delta$.

For multilabel micro-F1, all labels share one $(F, \lambda)$ pair. The search therefore stays one-dimensional even with thousands of labels, where a joint grid over two thresholds per label is impossible. For macro-F1, each label gets its own band, and we test whether abstention removes Lipton's over-prediction pathology or, as the linearization suggests, swaps it for mass abstention on rare labels.

Baselines

The naive reference point is the usual two-stage pipeline. We train the probability model, reject the least-confident fraction by softmax response ($\max(\hat\eta, 1-\hat\eta)$), and then tune the F1 cutoff by one-dimensional search on the accepted validation cases, as in Selective Classification for Deep Neural Networks followed by Consistent Binary Classification with Generalized Performance Metrics. It is what a practitioner would do by default. To beat it, our method must give higher selective F1 at matched coverage across the whole F1-coverage curve, with the largest gap expected at low prevalence.

The strongest existing method is the rejection-threshold optimizer of Multi-label classification with a reject option, which reports average F-measure rising from 0.87 to 0.97 on Reuters-21578 when 5% of decisions are rejected. We will reimplement it on the same probability model, splits, and labels, and first confirm that we reproduce its Reuters-21578 figure. Beating it means matching or exceeding its uncertified F1 at equal rejection rates while also meeting a stated $1-\delta$ guarantee, and showing lower variance across resampled calibration sets of 500 to 2000 cases.

A further strong competitor is exhaustive two-dimensional grid search over $(t_{lo}, t_{hi})$ on validation data. This family is equivalent to Chow's rule with tuned asymmetric costs. It gets the same validation budget and a grid fine enough to contain our solution.

On EHRSHOT pancreatic cancer, we also compare against Act or Defer's class-stratified conformal selection. That paper reports that unstratified conformal prediction at $\alpha = 0.10$ selected only about 10% of positives correctly, while the stratified method stayed within its error budget. Since the reported results concern false discovery rather than F1, we will compute selective F1 for both methods ourselves.

The key ablation is a symmetric band of tuned width centered on the tuned cutoff $t^*$, with the cutoff tuned first and frozen. It keeps the correct center but drops the asymmetry and the coupling between cutoff and band. A second ablation replaces calibrated $\hat\eta$ with raw scores, to measure how much the closed form depends on calibration.

Why not just…?

Why not just reject by softmax confidence and then tune the F1 cutoff? This rejects cases near 0.5, while the optimal band sits near $F/2$, often 0.1 to 0.3 on imbalanced tasks. It therefore throws away confident positives and keeps ambiguous ones. The evidence from Act or Defer, where population-level selection failed badly on the rare class, and from Selective Classification via One-Sided Prediction, where class-decoupled acceptance beat softmax gating (64.1% vs 59.3% coverage at 0.5% error on CIFAR-10), points the same way. Our prevalence sweep measures the gap directly.

Why not just grid-search two thresholds on validation data? This is a real threat. For binary tasks with large validation sets, we expect grid search to find nearly the same band, and we will say so if it does. The proposal's value then lies elsewhere. It explains why the band takes the shape it does. It provides a certified version, which raw grid search lacks because searching many cells overfits the calibration set. It reduces micro-F1 multilabel selection to one dimension where a grid cannot run. The small-calibration and Medline experiments are designed to settle whether these advantages are real.

Why not just center a symmetric band on the tuned F1 cutoff? This captures the first-order fix, the correct center, cheaply. If it matched our rule, the asymmetry result would be of theoretical interest only. The linearization predicts that the symmetric band loses most when $F$ is low, because the edges $\lambda/F$ and $(F-\lambda)/(2-F)$ then diverge most. The ablation reports the loss as a function of $F$.

Why not just use stratified conformal selection? It controls precision of the cases acted on, which constrains only one side of F1. It can therefore reach high precision by deferring away most positives. We will report recall at matched precision to show whether this happens on EHRSHOT.

Proposed Experiments

Binary experiments use imbalanced LibSVM/UCI sets (w8a, ijcnn, codrna, covtype one-vs-rest) with logistic models and temperature-scaled networks, plus the SCENE task. On SCENE, Consistent Binary Classification with Generalized Performance Metrics reports F1 of 0.6891 for plug-in thresholding versus 0.3953 at a 0.5 cutoff, which anchors our zero-abstention point. We also subsample positives to sweep prevalence from 20% down to 1%. The clinical test uses EHRSHOT pancreatic cancer and length-of-stay tasks with the frozen CLMBR-T-base model. Multilabel tests use Reuters-21578, RCV1v2, and Medline/MeSH.

The primary output is the F1-coverage curve and its area. We report it alongside AUGRC from Overcoming Common Flaws in the Evaluation of Selective Classification Systems, to show how often the accuracy-based summary ranks methods differently. We also report the empirical violation rate of the certified F1 target over 1000 resampled calibration sets.

Four checks are decisive. First, on synthetic data with known $\eta$, the empirically optimal band must match the closed-form edges. Second, the fitted band's center must track $F/2$ as prevalence falls, while softmax rejection stays at 0.5. Third, the certified procedure must hold violation at or below $\delta$ while losing little coverage relative to the uncertified band. Fourth, on Medline we test whether macro-F1 with abstention still assigns rare labels such as "Platypus" to a large share of documents, or instead abstains on them en masse. Either outcome is informative about whether abstention cures or merely relocates Lipton's pathology.

The idea fails if the symmetric-band ablation or grid search matches our rule everywhere, including small calibration sets and micro-F1 multilabel. In that case the contribution shrinks to the guarantee alone.