Source-linked AI summary
Detecting Errors and Estimating Accuracy on Unlabeled Data with Self-training Ensembles
Jiefeng Chen, Frederick Liu, Besim Avci, Xi Wu, Yingyu Liang, Somesh Jha
TL;DR
Distribution shift makes it important but costly to estimate a deployed model’s accuracy and individual errors without test labels. The paper introduces a self-training ensemble framework with guarantees under mild conditions, achieving state-of-the-art results across 59 tasks, including large iWildCam gains.
Problem
The paper addresses estimating a pretrained classifier’s accuracy and identifying its misclassified inputs when test data are unlabeled and may differ from training data.
Method
The framework iteratively learns ensembles, identifies points that disagree with the pretrained model, pseudo-labels them, and self-trains on the identified points.
Results
The framework achieves state-of-the-art results on 59 tasks; on iWildCam, one instantiation reduces accuracy-estimation error by at least 70% and improves error-detection F1 by at least 4.7%.
Takeaways & Limitations
The framework provides a practical approach for estimating model accuracy and detecting errors without immediately obtaining test labels.
Takeaways & Limitations
Different instantiations have different limitations, and achieving best performance requires some prior knowledge about the data.
Abstract
from arXiv · showhide
When a deep learning model is deployed in the wild, it can encounter test data drawn from distributions different from the training data distribution and suffer drop in performance. For safe deployment, it is essential to estimate the accuracy of the pre-trained model on the test data. However, the labels for the test inputs are usually not immediately available in practice, and obtaining them can be expensive. This observation leads to two challenging tasks: (1) unsupervised accuracy estimation, which aims to estimate the accuracy of a pre-trained classifier on a set of unlabeled test inputs; (2) error detection, which aims to identify mis-classified test inputs. In this paper, we propose a principled and practically effective framework that simultaneously addresses the two tasks. The proposed framework iteratively learns an ensemble of models to identify mis-classified data points and performs self-training to improve the ensemble with the identified points. Theoretical analysis demonstrates that our framework enjoys provable guarantees for both accuracy estimation and error detection under mild conditions readily satisfied by practical deep learning models. Along with the framework, we proposed and experimented with two instantiations and achieved state-of-the-art results on 59 tasks. For example, on iWildCam, one instantiation reduces the estimation error for unsupervised accuracy estimation by at least 70% and improves the F1 score for error detection by at least 4.7% compared to existing methods.
1 Introduction
Deployment under distribution shift can sharply reduce a model’s test performance, while obtaining test labels to measure that drop is costly. The paper therefore targets unlabeled accuracy estimation and individual error detection, addressing limitations of prior assumptions with a self-training ensemble framework.
- Distribution shifts from domain divergence, weather corruption, or out-of-distribution inputs can cause unexpected performance drops after deployment.Test-data annotation can mitigate this degradation but may be costly.
- Unsupervised accuracy estimation measures a pretrained classifier’s accuracy on unlabeled test inputs, while error detection identifies individual misclassified inputs.
- Prior approaches often depend on conditions that may fail in practice, motivating a framework designed for both tasks.
- The proposed framework iteratively learns ensembles, pseudo-labels identified errors, and self-trains to find additional misclassified points.The paper also provides provable guarantees under mild practical conditions.
2 Related Work
Prior work addresses confidence-based error detection and unsupervised accuracy estimation, but these approaches rely on calibration, distributional, or approximation assumptions.
- Modern neural networks can be poorly calibrated, including making incorrect predictions with very high confidence, especially under dataset shift.
- Confidence-based error detectors use maximum softmax probability, True Class Probability, Trust Score [21], or check models [4].These methods require robust confidence estimates and empirically chosen thresholds that depend on the problem and model.
- Unsupervised accuracy estimation has received relatively scant attention, with prior solutions relying on assumptions about marginal output distributions or agreement rates among approximations [31].
3 Problem Statement
The paper formulates unsupervised accuracy estimation and error detection for a model trained on labeled source data but evaluated on unlabeled test inputs. Accuracy estimation targets the model’s overall test accuracy, while error detection targets the misclassified inputs.
- The setup defines test accuracy as the fraction of labeled test examples for which the model prediction equals the true label.Although labels define the target accuracy and errors, the estimation and detection procedures receive the test inputs rather than their labels.
- Unsupervised accuracy estimation seeks an estimate whose absolute error from the model’s true test-set accuracy is small, using the training data and unlabeled test inputs.The model is trained on labeled data D, while only test inputs UX are available for estimation.
- Error detection seeks a subset of unlabeled test inputs that closely matches the set of inputs misclassified by the model.The objective measures the symmetric difference between the true misclassified set WX and the predicted set RX.
4 Algorithmic Framework via Self-Training Ensembles
The framework uses ensemble–model disagreement to identify likely errors, then self-trains on pseudo-labeled detections to expand disagreement and improve coverage. It can use different ensemble-learning methods and is supported by conditions governing correctness and diversity.
- Framework: Disagreement succeeds when the check model agrees with f on correctly classified inputs but disagrees with f on incorrectly classified inputs.The framework focuses on improving disagreement over misclassified test inputs because a check model can otherwise repeat f’s mistakes.
- Self-Training Ensembles: Misclassified points can be exposed either by making the check model correct or by using diverse ensembles when correct prediction is infeasible.The latter is useful when test inputs contain information absent from training data.
- Framework: The method accepts an ensemble-learning procedure that uses training data, unlabeled test data, and pseudo-labeled data to produce a distribution over functions.
- Framework: The framework repeatedly generates an ensemble, flags inputs with low agreement against f, assigns labels different from f(x), and retrains using those pseudo-labeled points.Its output is the estimated misclassified set and the corresponding estimated accuracy.
- Self-Training Ensembles: Unlike prior disagreement methods, the paper combines ensembles for identifying errors with self-training to learn improved ensembles.
5 Theoretical Analysis
The analysis formalizes ensemble conditions under which iterative self-training can identify misclassified points and estimate the pretrained model’s accuracy. Under these conditions, the framework provides provable guarantees without explicit assumptions on data distributions or the pretrained model.
- The analysis defines ν as ensemble error on points where f is correct and γ as ensemble agreement with f on the currently identified errors.
- On remaining misclassified points, the framework separates high-confidence correct points from bad points where ensemble diversity is required.
- The algorithm repeatedly trains an ensemble, marks ensemble–f disagreements as errors, assigns opposite pseudo-labels, and estimates accuracy from points outside the detected set.
- Each iteration can identify more misclassified points than the previous set, so repeated self-training achieves the guarantees.
- For intuition, with τ = 3/4 and δ = γ̃/τ, the theorem bounds estimation error using ν̃, γ̃, and the diversity-related term.
- Under mild ensemble conditions, the framework provably estimates accuracy and identifies misclassified points up to small errors.The conditions require ensembles to be accurate on points where f is correct, disagree with f on identified errors, and be correct or diverse on remaining errors.
6 Instantiations of the Framework
The framework supports multiple ensemble constructions that are trained to satisfy its error, disagreement, and diversity conditions. The paper instantiates it with random-initialization ensembles and representation-matching ensembles, using majority-vote disagreements to form pseudo-labeled errors.
- Algorithm 1 trains an ensemble each iteration, uses majority-vote disagreement with f to detect errors, and returns the detected set and its complement-based accuracy estimate.
- The framework permits different ensemble methods, and the two proposed instantiations are designed around its success conditions.
- Ensemble Method TRI: TRI trains models from different random initializations, then fine-tunes them on the training data and detected set to promote disagreement on identified errors.
- Ensemble Method TRM: TRM fine-tunes a pretrained model while combining training-data and pseudo-labeled losses with representation matching, then uses checkpoint models as the ensemble.
7 Experiments
Experiments across 59 training–test dataset pairs evaluate accuracy estimation and error detection using several architectures and baselines. The proposed method achieves strong results across categories, with ensemble and self-training contributing positively and theoretical conditions approximately supported empirically.
- Experiment Setup: Experiments cover 59 training–test pairs across five categories, using absolute estimation error for accuracy estimation and F1 score for error detection.The categories include Digits, Office-31, CIFAR10-C, iWildCam, and Amazon Review.
- Performance for Accuracy Estimation: The method achieves significantly better accuracy-estimation results than existing methods across dataset categories, reducing error by more than 40% on Digits and CIFAR10-C.It also has a large advantage on pre-trained models using DANN-arch for Office-31 and Amazon Review.
- Performance for Accuracy Estimation: On iWildCam, TRI or TRM reduces accuracy-estimation error by more than 70%, with TRI performing best despite imbalanced and shifted test-label distributions.TRM benefits from ensemble diversity when representation matching fails, while TRI further improves results.
- Performance for Error Detection: The method with TRM outperforms existing error-detection methods across all categories, improving F1 by at least 4.4% overall and by 25.6% on Office-31.The reported minimum improvements are 4.4% on Digits, 2.0% on CIFAR10-C, 4.7% on iWildCam, and 1.4% on Amazon Review.
- Ablation Studies: Increasing ensemble size N and self-training iterations T improves error detection and accuracy estimation, while a broad range of γ values performs well.The ablation varies N and T on Digits, with T = 1 indicating no self-training; γ weights the pseudo-labeled-data loss term.
- Validating the Theoretical Analysis: The theoretical conditions are approximately satisfied empirically, although the analysis is worst-case and performance can remain better than the bound when assumptions are not fully met.For MNIST→MNIST-M, the reported values include ˜ν = 3.39%, ˜γ = 0.73%, and σ2_L = 26.58%.
8 Discussions
The framework is flexible across ensemble methods, but achieving best performance requires prior knowledge about the data and each instantiation has distinct limitations.
- 8 Discussions: Best performance requires some prior knowledge about the data, and different ensemble instantiations have different limitations.On iWildCam, imbalanced classes hurt TRM, whereas TRI is more suitable for such data.
- 8 Discussions: TRM can fail when matching is unsuccessful or overly strong, while TRI may underperform when training-data connections could improve test accuracy.
- 8 Discussions: The identified success conditions guide the design of ensemble instantiations, with deep learning ensembles emphasized because they readily satisfy them.Other ensemble methods remain an avenue for future work.
Checklist
The checklist records affirmative disclosures for the paper’s claims, limitations, theoretical assumptions and proofs, reproducibility materials, experimental details, and asset use, while several ethics items are marked not applicable.
- Checklist: The paper states that its claims and scope are accurately described and that its limitations are discussed in Section 8.
- Checklist: The paper reports full assumptions and complete proofs for its theoretical results, with references to Sections 5 and Appendix B.
- Checklist: The authors state that code, data, instructions, training details, error bars, and compute information are available in supplementary materials or appendices.
- Checklist: Existing assets are cited, while license information is marked not applicable.
- Checklist: Consent, personally identifiable or offensive content, participant instructions, participant risks, and compensation disclosures are marked not applicable where indicated.
Self-training Ensembles
The paper contrasts its self-training ensemble framework with proxy risk by emphasizing different disagreement objectives and a different focus on selected mis-classified points.
- Self-training Ensembles: Both approaches train check models to estimate pretrained-model accuracy on unlabeled data and identify misclassified points.
- Self-training Ensembles: Both use domain-invariant representations in the framework’s Algorithm 3 and Proxy Risk to improve check-model accuracy on the target domain.
- Self-training Ensembles: The framework increases disagreement on mis-classified points during self-training, whereas Proxy Risk seeks maximum disagreement within a good hypothesis class.
- Self-training Ensembles: Proxy Risk applies its objective to the whole unlabeled test set, while this framework applies its objective only to the currently selected subset.
- Self-training Ensembles: The framework’s more specific objective can increase disagreement and potentially improve ensemble prediction, supporting self-training success.
- Self-training Ensembles: The methods also differ in their disagreement losses: Proxy Risk uses an L2-based term, whereas this framework uses cross-entropy loss.
A.2 Comparisons with Standard Self-training and Ensemble
The framework differs from standard self-training and ensembles because it targets disagreement on mis-classified points, using pseudo-labeling and ensemble accuracy or diversity to obtain provable estimation and detection guarantees.
- A.2 Comparisons with Standard Self-training and Ensemble: The method’s goal is to increase disagreement on mis-classified points, rather than simply obtain accurate predictions as standard self-training and ensembles do.
- A.2 Comparisons with Standard Self-training and Ensemble: For each identified error, the framework assigns a pseudo-label different from the pretrained model’s prediction, without requiring that pseudo-label to be correct.
- A.2 Comparisons with Standard Self-training and Ensemble: The theorem bounds false positives through ensemble agreement on points where the pretrained model is correct and relates the resulting sets to accuracy and misclassified points.
- A.2 Comparisons with Standard Self-training and Ensemble: Under its assumptions, the framework adds more than a δ fraction of remaining errors each iteration and reaches the target stage within at most ⌈1/δ⌉ iterations.
- A.2 Comparisons with Standard Self-training and Ensemble: A stated corollary gives an example requiring ν < 1/2 and σ2 > 7/12, with at most ⌈3/(4γ̃)⌉ iterations.
B.2 Discussion on Using Ensembles
The analysis characterizes when ensemble agreement estimates a pretrained model’s accuracy and explains why diversity and appropriate correlation improve estimation. It also compares the framework with proxy risk and calibration, while experiments show consistent improvements over proxy risk.
- Ensemble benefits: Proper ensemble diversity and correlation with the pretrained model can improve accuracy estimation beyond a single check model.The analysis attributes this benefit to ensemble diversity and to correlation that is neither too negative nor overly positive.
- Comparison with Proxy Risk: The framework’s bound is more general and tighter than proxy risk’s, allowing ensembles to handle outlier inputs through disagreement.Proxy risk can be about 10% from true accuracy even when its check-model error exceeds 60%, whereas diverse ensembles can reveal likely errors on outliers.
- Calibration: An ensemble with perfect calibration has an agreement rate equal to the pretrained model’s accuracy.The paper defines ensemble confidence as the probability that ensemble classifiers predict a label and proves this equality under perfect calibration.
- Empirical comparison: The experiments show that the proposed method consistently outperforms proxy risk and generally has lower result variance.Results are measured by average absolute estimation error and average F1 score across five repeated runs.
C.4 Validating the Theoretical Analysis
Experiments test whether the ensemble and self-training satisfy the analysis conditions and improve accuracy estimation and error detection across datasets, architectures, and variants.
- Theoretical conditions: The ensemble models make small errors on points correctly classified by f, mostly disagree with f on RX, and maintain substantial diversity on BX.These are the three conditions underlying the analysis; experiments evaluate their empirical support.
- Theoretical conditions: Self-training rectifies the initial ensemble’s accuracy overestimation, while the reported upper bound on average error over correct points remains small.Table 3 compares actual accuracy with estimates before and after self-training.
- Pseudo-label analysis: 93.89%, 94.02% and 93.82% are the pseudo-label accuracies across three MNIST→MNIST-M iterations, while ensemble accuracy rises from 89.56% to 94.53%.The pseudo-labels are imperfect, but correct pseudo-labels improve the new ensemble; diversity on pseudo-labeled data is comparatively small.
- Ensemble pre-trained classifiers: 0.0009 is the estimation error when the pre-trained classifier is itself an ensemble, with the analysis conditions still roughly satisfied.For this setting, the reported bounds are ν̃ = 2.61%, γ̃ = 0.59%, and σ²_L = 28.94%.
- Architecture robustness: The method consistently outperforms alternatives across CNN, CNN-BN, ResNet18, ResNet34, DenseNet40, and DenseNet100 architectures on Digits.Table 4 reports mean and standard deviation for absolute estimation error and F1 score.
- Ablation studies: On CIFAR10-C, the ablation shows a trend similar to Digits for the effects of ensemble and self-training techniques.The study varies ensemble size N, self-training iterations T, and pseudo-label loss weight γ.
- Target accuracy analysis: The ensemble can outperform f on Digits, whereas diversity supports good performance on iWildCam when the ensemble’s target accuracy is not higher than f’s.This comparison links the method’s behavior to domain-adaptation quality and ensemble diversity.
- Proxy Risk comparison: 0.0230 mean estimation error is reported for the proposed TRM method, versus 0.0814 for the ensemble Proxy Risk variant on Digits.The corresponding mean F1 score for the Proxy Risk variant is 0.8515; the supplied passage truncates the proposed method’s F1 value.