TL;DR
When classes are imbalanced, standard classification accuracy fails, forcing us to optimize trickier metrics like the $F_1$-score or Jaccard index. Rather than burning precious labeled data on cross-validation to tune decision thresholds, this paper shows you can find the optimal threshold for a massive family of metrics by solving a simple 1D equation using only unlabeled data. Best of all, it comes with exact finite-sample mathematical guarantees showing how every piece of your pipeline contributes to the final error.
What Problem Does This Paper Address?
If 99% of credit card transactions are legitimate, a lazy classifier that predicts "legitimate" every time achieves 99% accuracy while catching zero fraud. In imbalanced settings like fraud detection or medical diagnosis, practitioners care about metrics like the $F_\beta$-score or the Jaccard index, which balance false positives and false negatives.
Mathematically, these fall into a family called linear-fractional metrics—ratios of linear combinations of confusion matrix entries. Unlike standard accuracy, these metrics are non-decomposable: you cannot calculate them by averaging point-by-point losses across individual examples. They depend on the holistic performance across the entire dataset, which breaks standard empirical risk minimization.
We already know that the optimal classifier for these metrics simply takes the true probability of the positive class, $\eta(x) = \mathbb{P}(Y=1 \mid X=x)$, and applies a specific cutoff threshold $\theta^*$. A standard "plug-in" strategy is to train a probability estimator $\hat{\eta}(x)$ and then hunt for the best threshold. However, finding that threshold usually requires holding out labeled validation data for a computationally clunky grid search, and finite-sample theoretical guarantees have mostly been restricted to specific cases like the $F_1$-score rather than the whole family of metrics.
Methods
The author tackles this from a post-processing perspective, cleanly decoupling probability estimation from threshold tuning:
- Train any probability estimator (Standard): Use your scarce labeled dataset of size $n$ to train a regression model $\hat{\eta}(x)$ (e.g., logistic regression or kernel ridge regression).
- Characterize the threshold via a fixed-point equation (New derivation): While prior work used heavy functional-analytic machinery to find optimal classifiers, the author uses a direct probabilistic argument to show that the optimal threshold $\theta^*$ is the unique root of a 1D fixed-point equation. Crucially, this equation depends only on the metric's coefficients and the marginal distribution of inputs $P_X$—meaning $Y$ labels don't appear in it at all!
- Solve via bisection on unlabeled data (Novel generalization): Plug your trained $\hat{\eta}(x)$ and an unlabeled dataset of size $N$ into the empirical version of this equation. Because the function is well-behaved, a simple bisection algorithm finds the threshold $\hat{\theta}$ in a handful of iterations.
Datasets
No new benchmarks are introduced. The author evaluates the method on:
- Synthetic data: Logistic data-generating processes (both well-specified and a misspecified probit variant) and a 5-dimensional Gaussian mixture model.
- Real-world tabular benchmarks: Seven standard imbalanced/binary classification datasets: German, Spambase, Sonar, Phoneme, Adult, Creditcard, and Mammography.
Key Insights and Ideas
- Labels are for probabilities; unlabeled data is for thresholds: Because the fixed-point equation only averages over input features $X$, you don't need to split your expensive labeled data to validate a threshold. You can throw 100% of your labels at learning $\hat{\eta}(x)$, and tap into cheap, abundant unlabeled data to nail down $\hat{\theta}$.
- A clean, modular error budget: The paper's crown jewel is a finite-sample excess risk bound that splits performance loss into three additive buckets:
- Regression error $\mathbb{E}\|\eta - \hat{\eta}\|_1$ (how good is your base model?).
- Unlabeled sampling error $O(N^{-1/2})$ (how much unlabeled data did you use?).
-
Optimization error $O(2^{-K_{\max}})$ (how many bisection steps $K_{\max}$ did you run?). Because $2^{-K_{\max}}$ vanishes exponentially fast, numerical root-finding is never a bottleneck.
-
Fast rates near clean boundaries: Under Tsybakov's margin assumption—the intuitive idea that data points don't pile up right on top of the decision boundary $\theta^*$—small errors rarely flip predictions. Here, the unlabeled sampling error shrinks even faster, improving from $O(N^{-1/2})$ to $O(N^{-(1+\alpha)/2})$.
Key Results
Across synthetic setups (optimizing $F_1$ and Jaccard), feeding more unlabeled samples $N$ into the fixed-point solver steadily boosts scores, handily beating a fixed $\hat{\theta}=0.5$ cutoff and 10-fold cross-validation.
As seen in the center panel above, the excess risk follows the theoretical $O(N^{-1/2})$ curve as $N$ grows, before hitting a flat floor dictated by the base regression error from the fixed $n=1000$ labeled points.
On the seven real-world datasets, the bisection method matches or beats 10-fold cross-validation on $F_1$-score—without touching labels during threshold tuning—while cutting threshold-selection overhead to practically zero:
- Sonar (with KRR): Bisection achieves 0.878 $F_1$ in 3.7 ms total runtime (only 0.4 ms over the 3.3 ms base model fit), compared to 0.864 in 18.0 ms for 10-fold CV, and 0.869 for fixed $\hat{\theta}=0.5$.
- Mammography (with KRR): Improves $F_1$ from 0.440 (fixed $0.5$) and 0.608 (10-fold CV, 123.6 ms) to 0.619 in 109.1 ms (vs. 108.5 ms base fit).
- When paired with poorly calibrated base models (e.g., standard Logistic Regression on Creditcard), 10-fold CV can still win (0.662 vs. 0.434), underscoring that the fixed-point equation relies on decent probability estimates $\hat{\eta}$.
Limitations and Future Work
- Garbage in, garbage out for $\hat{\eta}$: Both theoretically and empirically, the method's ceiling is tied to how accurately $\hat{\eta}(x)$ estimates true probabilities, which can also be computationally expensive to train in high dimensions.
- Binary only (for now): The guarantees apply strictly to standard binary classification.
For future work, the author points to covariate shift and domain adaptation as a natural playground: if input distributions shift in deployment, you could re-calibrate your decision threshold on the fly using unlabeled target-domain data without retraining your classifier. Extending this post-processing lens to multi-class problems, noisy labels, classification with rejection, and optimal stopping in dynamic programming are also wide open.
Summary updated