Averaged Two-Bin Calibration Error
- Averaged Two-Bin Calibration Error is defined as the expected sum of squared biases over two randomized bins, ensuring that reporting true probabilities minimizes the measure.
- It computes unnormalized bias sums over a uniformly random threshold, achieving efficient calibration testing in O(T log T) time for binary probabilistic predictions.
- ATB resolves finite-sample incentive issues by isolating predictor-dependent error from inherent Bernoulli variance, offering a truthful, continuous, and complete calibration metric.
Averaged Two-Bin Calibration Error (ATB) is a calibration measure for binary probabilistic prediction in the batch setting that averages, over a uniformly random threshold , the squared biases of the two prediction bins and . In the formulation introduced in 2025, ATB was designed to resolve a finite-sample incentive problem in calibration measurement: unlike previously known calibration measures, it is minimized in expectation by reporting the ground-truth probabilities themselves. The same work proves that ATB is truthful, sound, complete, continuous, quadratically related to smooth calibration error and distance to calibration, and computable in time on a sample of size (Hartline et al., 18 Aug 2025).
1. Formal definition
The underlying setting admits two equivalent views. In the distribution view, one considers a joint distribution over , where is a reported probability and is a binary outcome. In the finite-sequence view, one considers reports , ground-truth probabilities 0, and realized labels 1 with 2 independently (Hartline et al., 18 Aug 2025).
For a distribution 3 and threshold 4, the two bin biases are
5
ATB is then
6
On a finite sequence, the induced empirical form is
7
The same paper also introduces an 8 two-bin variant obtained by replacing the squares with absolute values. Jensen’s inequality yields
9
so the squared and 0 forms are linked up to constant factors (Hartline et al., 18 Aug 2025).
Two aspects are structurally distinctive. First, the partition always has exactly two bins. Second, the threshold is not fixed but averaged uniformly over 1. ATB is therefore not a single-threshold diagnostic, but an average over all such binary partitions.
2. Truthfulness and finite-sample incentive alignment
The central notion is truthfulness on sequences. A calibration measure 2 is truthful on sequences if, for every report vector 3,
4
Thus, expected empirical calibration error is minimized by reporting the true probabilities 5 themselves (Hartline et al., 18 Aug 2025).
ATB satisfies this property exactly. The key identity is the decomposition
6
The second term is a predictor-independent variance term. Since 7 for every 8 and 9, one obtains
0
This is the sense in which ATB is perfectly truthful: no approximation, asymptotics, or large-sample caveat is required (Hartline et al., 18 Aug 2025).
The same decomposition yields a stronger rank-preserving property: 1 Hence the ordering of predictors by expected empirical ATB coincides exactly with their ordering under the latent quantity 2. The paper contrasts this with previously known calibration measures, which incentivize predictors to lie in order to appear more calibrated on a finite sample (Hartline et al., 18 Aug 2025).
This behavior is tied to the absence of per-bin normalization by bin size. ATB aggregates unnormalized squared bin biases, globally normalized by 3, and this variance-additive structure is what makes the predictor-dependent term separate cleanly from the Bernoulli noise term.
3. Soundness, completeness, continuity, and zero-calibration characterization
ATB is shown to be sound, complete, and continuous, and these properties are established through constant-factor and quadratic relations to continuous calibration functionals already known in the literature. In particular, for smooth calibration error,
4
and for distance to calibration,
5
Because 6 and 7 are known to be complete and sound, ATB inherits those properties (Hartline et al., 18 Aug 2025).
These inequalities imply the zero-calibration characterization: 8 Thus, although ATB is defined through random two-bin partitions, it does not merely detect a restricted notion of calibration. Zero ATB is equivalent to perfect calibration (Hartline et al., 18 Aug 2025).
The paper also proves Lipschitz continuity. If 9 is a coupling of 0 with induced marginals 1 and 2 on 3 and 4, then
5
In sequence form, for two report vectors 6 with common labels,
7
The paper explicitly contrasts this with ECE and binned ECE, which can be discontinuous in the predictions (Hartline et al., 18 Aug 2025).
4. Relation to ECE, smCal, distCal, and earlier two-bin usage
ATB arose against a background in which calibration was often measured by binned expected calibration error (ECE). Standard ECE compares average confidence and empirical accuracy inside bins, and its behavior depends strongly on the binning scheme. Equal-width binning, equal-mass binning, and continuous alternatives all modify this dependence; fixed-bin ECE is sensitive to the number of bins, can ignore empty bins, and exhibits a bias–variance trade-off that scales with the granularity of discretization (Pavlovic, 31 Jan 2025, Futami et al., 2024).
Earlier expository discussions sometimes used “ATB” informally for an ECE-style two-bin construction or for an average over many two-bin threshold splits. In those formulations, ATB was presented either as ECE with 8 or as an average of two-bin ECE-type quantities over thresholds (Pavlovic, 31 Jan 2025, Matsubara et al., 2023, Karandikar et al., 2021). The 2025 measure is different. Its bin-level objects are not per-bin accuracy–confidence gaps, but squared unnormalized biases of the form
9
followed by averaging over uniformly random 0 (Hartline et al., 18 Aug 2025).
This distinction is substantive rather than terminological. The ECE family was developed as a binned approximation to confidence calibration, and subsequent work emphasized its sensitivity to discretization, instability under rebinning, and lack of consistency unless bins are refined with sample size (Pavlovic, 31 Jan 2025, Futami et al., 2024). ATB, by contrast, was designed to satisfy a truthfulness criterion on finite samples and to admit exact error decompositions unavailable to the standard binned ECE construction (Hartline et al., 18 Aug 2025).
Relative to continuous measures, ATB sits between smooth calibration error and distance to calibration. The paper proves that the 1 two-bin error is a constant-factor approximation to both 2 and 3, and that ATB is quadratically related to them. This is the basis for both its theoretical guarantees and its algorithmic utility (Hartline et al., 18 Aug 2025).
5. Computation and calibration testing
ATB is efficient to compute on a sample of size 4. The algorithm sorts the reports 5, computes prefix and suffix sums of 6, and exploits the fact that the two bin biases are constant on intervals between consecutive sorted report values. If 7 and 8, then
9
so after sorting, the integration over thresholds is a linear scan. The total running time is 0 (Hartline et al., 18 Aug 2025).
This complexity compares favorably with existing continuous measures. The paper states that computing 1 currently costs 2, while computing 3 costs 4. ATB therefore provides a simpler and faster route to quantities that are provably linked to both (Hartline et al., 18 Aug 2025).
The same paper analyzes calibration testing through validity with respect to distance to calibration. ATB is 5-valid with 6, and this rate is stated to be information-theoretically optimal. Concretely, for calibrated 7, with high probability,
8
while for miscalibrated 9 with 0, with high probability,
1
for a sufficiently large constant 2 (Hartline et al., 18 Aug 2025).
The computational consequence is that ATB yields faster calibration tests for 3 and distance to calibration than direct computation of those measures. The paper explicitly frames this as an improvement in running time and simplicity for the calibration testing problem studied by Hu et al. (2024) (Hartline et al., 18 Aug 2025).
6. UBSEs and the broader construction principle
ATB is the simplest instance of a broader family introduced in the same work: Unnormalized Binned Squared Errors (UBSEs). In a UBSE, the indices 4 are partitioned into bins 5; the partition may be randomized and may depend on the reports 6, but not on the ground-truth probabilities 7. For each bin,
8
and the calibration functional is
9
ATB corresponds to the special case 0, with
1
and 2 (Hartline et al., 18 Aug 2025).
The crucial structural constraint is that UBSEs use no per-bin normalization by bin size. The paper identifies this as the mechanism behind truthfulness: variance additivity for independent Bernoulli outcomes produces the decomposition
3
with a predictor-independent second term. ATB is the most elementary nontrivial member of this class (Hartline et al., 18 Aug 2025).
The UBSE framework also yields other truthful measures. The paper gives quantile-binned 4-ECE as an example: if one partitions the sorted reports into equal-size bins and aggregates unnormalized squared bin biases rather than normalized per-bin gaps, the resulting measure is truthful. This suggests that ATB is not an isolated construction but the canonical minimal instance of a larger recipe for incentive-compatible calibration measurement (Hartline et al., 18 Aug 2025).
Historically, this marks a shift from viewing two-bin procedures as merely coarse discretizations of ECE toward viewing them as components of a truthful batch calibration theory. Earlier work on calibration diagnostics emphasized the limitations of coarse binning, bin-choice sensitivity, and the bias inherent in histogram estimators (Pavlovic, 31 Jan 2025, Futami et al., 2024). ATB retains the simplicity of two-bin partitions, but recasts them in a form that supports exact finite-sample incentive alignment, continuity, and efficient testing (Hartline et al., 18 Aug 2025).