Source-linked AI summary
Context-Adaptive Thresholding for Conditionally Representative Monitoring and Classification
Ansgar Steland
TL;DR
Thresholding classifiers by a single cutoff can leave predicted labels unrepresentative of ground-truth conditional distributions across context values. The paper adapts thresholds to context and develops nonparametric estimation and inference; on FICO, its rule is competitive with state-of-the-art classifiers, including transformers.
Problem
Thresholding based on objectives such as misclassification error may not ensure that predicted labels match the ground-truth conditional distribution given an important covariate Z.
Source: §1 · p. 2Method
The paper adapts a classifier's threshold to covariate Z to match the conditional probability π(z), and proposes a nonparametric sliding-window estimator with theoretical guarantees.
Source: §1 · p. 2, §2.2 · p. 5Results
72.3% in-sample accuracy and 72.2% out-of-sample accuracy on FICO make the adaptive rule competitive with state-of-the-art classifiers, including transformers.
Source: §1 · p. 3Takeaways & Limitations
The estimator's functional sequential central limit results support uniform confidence bands, functional tests, and sequential change-point testing.
Source: §1 · p. 2Representative calibration can transfer historical bias in Y to predictions when protected variable A is a function of context Z.
Source: §2.3 · p. 7
Abstract
from arXiv · showhide
Commonly, classifiers and monitoring procedures are trained from labeled data by optimizing an objective such as the misclassification rate. This may lead to unrepresentative conditional distributions of the outcome (the labels) given important external variables, different from the conditional laws in the population. We show how to modify any given threshold-type classifier resp. monitoring rule to achieve representative conditional label prediction by using adapting the threshold to a covariate $Z$ (the context) to distribute sensitivity while maintaining the false alarm rate. In case that the alarm event is unknown, this approach also allows to (approximately) infer the event in terms of a thresholding rule. The approach is implemented by a computationally cheap nonparametric estimation procedure, and its properties are studied in terms of nonasymptotic error bounds and asymptotic distribution theory including empirical process theory. These results allow to construct uniform confidence bands, functional hypothesis tests and change-detection procedures. For the well known FICOS credit scoring example, often used in interpretable machine learning, threshold adaptation leads to an easily interpretable decision rule which can compete with state of the art methods including transformers, in terms of common classification metrics.
1 Introduction
The paper adapts thresholds to context Z so predicted labels can match the ground-truth conditional law, addressing limits of globally fixed thresholds. It develops estimation and inference methods and illustrates the approach on FICO credit scoring.
1 Introduction
- For monitoring, a threshold is chosen to keep the probability of an alarm under baseline conditions below a prespecified level, controlling the false-alarm rate.The threshold is estimated from nominal data before applying the rule to a sequential stream.Source: §1 · p. 1
- When context Z affects the outcome, representative fairness requires the predicted label's conditional law given Z to match the ground-truth law, which a global threshold is generally insufficient to achieve.The paper describes this as probabilistic calibration given Z.Source: §1 · p. 2
- Under mild conditions, a measurable threshold function matches the conditional probability π(z), and a computationally cheap nonparametric sliding-window estimator is proposed.The paper establishes nonasymptotic error bounds and asymptotic distribution results for the estimator.Source: §1 · p. 2
- Functional sequential central limit theorems support uniform confidence bands, functional tests, and sequential inference such as testing for a change point.The paper also provides a central limit theorem for pointwise asymptotic confidence intervals.Source: §1 · p. 2
- Earlier Z-based thresholds targeted increased sensitivity for Z-defined classes while controlling type-I error (Steland et al. (2024)); this paper instead aligns conditional alarm rates to a reference population or sample.Steland (2026a) extended theory to unknown Ψ and studied an estimator based on the sample quantile function.Source: §1 · pp. 2–3
- 72.3% in-sample accuracy and 72.2% out-of-sample accuracy make the adaptive FICO rule competitive with state-of-the-art classifiers, including transformers.The rule thresholds the FICO score as a function of loan amount.Source: §1 · p. 3
2 Preliminaries and method
The section establishes that a context-dependent threshold can match the conditional label probability, then gives a sliding-window plug-in estimator. It defines representative fairness and distinguishes conditional label matching from histogram-based probability calibration.
2.1 Conditional calibrated thresholding is always possible
- Under a continuous, strictly increasing predictor CDF, a threshold function can match the conditional event probability even when the outcome is not generated by thresholding the predictor.The threshold is a degree of freedom for aligning the predictor's conditional alarm probability with the outcome's conditional probability.Source: §2.1 · pp. 4–5
2.2 Threshold estimation and decision rules
- The proposed estimator plugs a sliding-window estimate of the conditional event probability into the inverse predictor CDF to estimate the context-dependent threshold.The local estimate averages binary outcomes for observations whose context lies within a fixed window around z.Source: §2.2 · p. 5
2.3 Representative fairness by calibration
- Representative fairness requires the classifier's conditional label distribution given Z to equal the ground-truth distribution, but can transfer historical bias when Z refines a protective variable.The section notes that curated, unbiased samples can avoid this inheritance problem.Source: §2.3 · pp. 6–7
- Threshold adaptation may mitigate difficulties in low-probability context regions by copying the conditional event probability into the classifier rule.The section links sparse representation in Z to sparse regions of classifier outputs.Source: §2.3 · pp. 7–8
2.4 Relation to probabilistic calibration by histogram binning
- The method differs from histogram calibration because it smooths over context and converts estimated label frequencies into thresholds, rather than recalibrating a score as a probability.Their objectives also differ: conditional label-distribution matching versus probability calibration.Source: §2.4 · p. 8
3 Asymptotic theory
The section develops finite-sample error bounds and pointwise and functional asymptotic inference for the conditional-probability and threshold estimators. Functional weak convergence requires fixed bandwidth: shrinking bandwidth can force any weak limit to be degenerate.
3.1 Nonasymptotic error bounds and consistency
- The exact-moment-generating-function Okamoto and Hoeffding bounds are much tighter than the simpler b1 bound; Figure 1 compares the bounds as sample size varies.The stated comparison uses pB(z) = 0.1, π(z, h) = 0.05, and δ = 0.1.Source: Figure 1 · p. 9, §3.1 · p. 9
- Consistency for the conditional probability holds when npB(z, h) → ∞; with a bounded positive density for Z, this reduces to the usual smoothing condition nh → ∞.At an atom, the effective rate remains of order n^-1/2.Source: §3.1 · p. 10
3.2 Asymptotic normality and confidence interval
- With fixed h and n → ∞, the pointwise CLT results provide asymptotic confidence intervals for π(z, h) and c(z, h).The section fixes h because shrinking bandwidth prevents a non-degenerate weak limit for the empirical process.Source: §3.2 · p. 11
3.3 Empirical process theory
- These empirical-process results support functional inference, including uniform confidence bands.Source: §3 · p. 8, §3.3 · p. 12
- When h → 0 and nh → ∞, any weak limit of the scaled estimator process described in the impossibility result must be zero.The paper notes that this degeneracy carries over from the numerator estimator to its setting.Source: §3.3 · p. 12
- At fixed h, the conditional-probability estimator process has a tight centered Gaussian limit, with sequential weak convergence also stated under the section’s conditions.Source: §3.3 · p. 13
- The threshold estimator process likewise has a tight centered Gaussian limit, including the sequential process under the stated conditions.Source: §3.3 · p. 14
4 Local bandwidth selection with a bias allowance
The section proposes a data-driven, local Lepski-type bandwidth choice using comparisons among estimates at candidate bandwidths. A bias allowance and a noise bound underpin the selection and its error guarantee.
4 Local bandwidth selection with a bias allowance
- The Lepski-type procedure selects the largest candidate bandwidth compatible with all finer estimates, aiming to minimize the error bound.A candidate is accepted when its estimate differs from every finer-bandwidth estimate by no more than the combined allowances.Source: §4 · pp. 14–15
- The selection criterion combines a bias allowance Bh(z) with a noise error bound sh(z).The paper also gives Lh as a simplified bias allowance.Source: §4 · p. 15
- Theorem 4.1 gives a probability-at-least-1 − α error guarantee for the selected bandwidth under its stated assumptions.Source: §4 · p. 15
5 Applications: Uniform confidence bands, testing and change detection
The section uses asymptotic results for uniform confidence bands, threshold-hypothesis tests, and change detection. It describes band inversion for testing constant thresholds and a split-sample statistic for detecting a threshold change.
5 Applications: Uniform confidence bands, testing and change detection
- Uniform confidence bands support inference on an estimator’s functional form and are constructed using a simulated quantile of the standardized process supremum.Source: §5 · pp. 15–16
- A reference threshold function can be tested with a Kolmogorov-Smirnov-type statistic and an asymptotic critical value.Source: §5 · p. 16
- Confidence-band inversion tests a constant-threshold hypothesis by rejecting when no horizontal line lies within the band; the procedure has asymptotic size at most α and may be conservative.Source: §5 · p. 17
- The change-point procedure splits the sample at candidate times, compares estimated thresholds before and after each split, and maximizes a weighted distance over split points and z.Source: §5 · p. 17
6 Real data example and simulation experiments
On the FICO credit dataset, a loan-amount-adapted FICO threshold achieves 72.3% in-sample and 72.2% test accuracy, while its estimated threshold is significantly nonconstant. A simulation study reports good confidence-band coverage and accuracy above 95% at about 500 observations.
6 Real data example and simulation experiments
- The FICO analysis uses 9,860 observations after missing-value removal and retains the dataset as-is despite noted biases.The authors state that a curated dataset should be used to ensure algorithmic fairness distinct from representative fairness; this analysis is illustrative.Source: §6 · p. 18
- 72.3% in-sample accuracy and 72.2% test accuracy were obtained with the manually selected fixed bandwidth.The test accuracy was averaged over 10 runs using a 75%/25% estimation/test split.Source: §6 · p. 18
- No constant threshold lies within the uniform confidence band, and the adapted rule requires higher FICO scores for small loans than for large loans.The band supports non-constancy at the 5% level.Source: §6 · p. 18, Figure 3 · p. 19
- Lepski bandwidth selection gives nearly the same accuracy, true positive rate (73.97%), and true negative rate (70.45%) as the manually selected bandwidth.Its local adaptation also makes the fit and confidence bands smoother in sparse tails; more irregular tail thresholds do not materially improve classification.Source: §6 · p. 18, Figure 4 · p. 20, Figure 5 · p. 20
- The adapted rule is reported on par with tested classifiers and outperforming some, including a neural network, KNN, CART, and linear SVM.The comparison also reports transformer accuracy of 71.5%, which does not improve on the adapted rule.Source: §6 · p. 21
6.1 Simulation
- The simulation reports good confidence-band coverage and classification accuracy exceeding 95% at a sample size of about 500.Coverage, accuracy, true positive rate, and true negative rate were estimated across sample sizes using 1,000 Monte Carlo runs.Source: §6.1 · pp. 21–22, Table 1 · p. 22
7 Proofs
The proofs establish concentration bounds for the local conditional-probability estimator by viewing it as an empirical measure of observations inside a covariate window. They also derive asymptotic weak convergence results for threshold-related processes using empirical-process arguments and uniform linearization.
7.1 Nonasymptotic Bounds
- Conditioning on the number of observations in a covariate window makes the local conditional-probability estimator an empirical measure of Bernoulli variables with the window-conditional success probability.The proof then applies concentration inequalities to bound estimator error.Source: §7.1 · pp. 23–24
7.2 (Functional) central limit theorems
- Uniform asymptotic linearity, under the stated positive-window-probability conditions, supports weak convergence of the sequential probability and threshold processes to Gaussian limits.The arguments use Donsker classes, the central limit theorem, and Slutsky’s lemma.Source: §7.2 · pp. 27, 29, 30
Appendix A. Degeneracy of the weak limit
This appendix explains why the weak limit of a scaled Nadaraya–Watson-type estimator process degenerates in L2(R), even though its finite-dimensional distributions converge to non-degenerate Gaussian laws. It notes that some functionals can still have non-degenerate limits because they converge at a different rate.
Appendix A. Degeneracy of the weak limit
- The scaled process has a degenerate weak limit in L2(R) as h → 0 and nh → ∞, despite non-degenerate Gaussian finite-dimensional limits.Integral means may nevertheless converge to non-degenerate limits because infinite-dimensional integrals have a different convergence rate.Source: Appendix A · p. 33
- The proof establishes degeneracy by showing that inner products of the process with each weighted Hermite polynomial converge to zero in probability.The weighted Hermite polynomials span L2(R).Source: Appendix A · p. 33
- The appendix concludes the argument by bounding the variances of the resulting terms.The excerpt supplies no further bound values.Source: Appendix A · p. 34
Appendix B. Additional proofs
The additional proofs condition on which observations fall in a set to show that the associated empirical conditional measure has a binomial form. A Taylor expansion is also used under a stated smallness condition.
Appendix B. Additional proofs
- Given that exactly k observations fall in E, their indices form a uniformly distributed k-element subset of the sample.Conditioning on a particular selected subset preserves the conditional distribution of the observations in that subset.Source: Appendix B · p. 34
- Conditional on the selected indices, the indicators that those observations fall in A are independent Bernoulli variables with success probability P(X ∈ A | X ∈ E).Their sum therefore has the corresponding conditional binomial probabilities.Source: Appendix B · pp. 34–35
- A Taylor expansion of (1+x)^(1/n) is applied when u(1 − q_n)/q_n < 1.The passage states this condition for the expansion used in the derivation.Source: Appendix B · p. 35
Appendix C. Transformer network
The transformer network uses a network ensemble with k = 1, 2, 3 and extracts the final CLS representation. Its blocks use two-head self-attention, residual connections, and dropout that is disabled at prediction time.
- The network ensemble uses k = 1, 2, 3.Source: Appendix C · p. 36
- The input prepends a learned classification token to t1 and t2, and the model extracts the final CLS representation.Source: Appendix C · p. 36
- Each Transformer block uses two-head self-attention with head dimension 32 and residual connections; attention-weight dropout is 0.1, and all dropout is disabled at prediction time.Source: Appendix C · p. 36