Detecting Errors and Estimating Accuracy on Unlabeled Data with Self-training Ensembles

Jiefeng Chen, Frederick Liu, Besim Avci, Xi Wu, Yingyu Liang, Somesh Jha

When deep learning models are deployed in the real world, they frequently encounter data that differs significantly from their training distribution. Changes in lighting, weather, sensor types, or user demographics can cause a model's performance to plummet. For safe deployment in high-stakes fields like autonomous driving or medical imaging, practitioners must be able to evaluate a model's reliability on new, unlabeled data.

This challenge breaks down into two critical tasks:

  1. Unsupervised Accuracy Estimation: Determining the overall accuracy of a pre-trained classifier on a new dataset without ground-truth labels.
  2. Error Detection: Identifying the specific data points the model is likely misclassifying.

Existing solutions often fall short. Relying on confidence-based metrics (like softmax outputs) is notoriously unreliable because modern neural networks tend to be overconfident even when they are wrong. Other methods require labeled data from multiple distributions to train a "performance predictor," which is often impractical. To address this, researchers have proposed a principled framework that leverages self-training ensembles to estimate accuracy and detect errors simultaneously.

The Proposed Framework: Self-Training Ensembles

The core intuition behind this approach is that while a single model might be confidently wrong about an out-of-distribution input, an ensemble of diverse models is likely to exhibit high disagreement on those same "difficult" points.

The framework operationalizes this intuition through an iterative loop:

  1. Ensemble Generation: Train or fine-tune an ensemble of "check models."
  2. Disagreement Identification: Identify data points where the ensemble's majority vote disagrees with the original model's prediction.
  3. Pseudo-labeling: Assign these disputed points a pseudo-label that is different from the original model's prediction.
  4. Self-training: Retrain the ensemble using these pseudo-labels.

Unlike standard self-training, which typically aims to increase a model's confidence in its own predictions, this framework uses self-training to "increase disagreement" on misclassified points. It effectively pushes the ensemble to hunt for the original model's blind spots.

The authors provide two concrete instantiations of this framework:

  • $\mathcal{T}_{RI}$ (Random Initialization): Relies on the inherent diversity of models trained from different random starting weights.
  • $\mathcal{T}_{RM}$ (Representation Matching): Incorporates Domain-Adversarial Neural Networks (DANN) to better align the ensemble's feature representations with the test distribution.

Key Insights and Theoretical Grounding

The "aha moment" of this research is recognizing that the ensemble does not need to be perfectly accurate to be useful; it merely needs to be diverse enough to disagree with the original model on its errors.

Furthermore, the authors provide theoretical analysis demonstrating that under mild conditions—which practical deep learning ensembles typically satisfy—this framework enjoys provable guarantees. It is mathematically guaranteed to produce an accurate estimate of the model's error, bridging the gap between empirical success and theoretical reliability.

Experimental Results Across 59 Tasks

The framework was rigorously evaluated on 59 different task pairs spanning five major categories: Digits (MNIST, SVHN, USPS), Office-31 (domain adaptation across Amazon, Webcams, DSLRs), CIFAR10-C (synthetic corruptions), Amazon Reviews (sentiment classification), and iWildCam (a massive real-world dataset of wildlife camera trap images).

The proposed method consistently outperformed existing baselines like "Proxy Risk" and "Average Confidence." * Accuracy Estimation: On the highly challenging iWildCam dataset, the method reduced unsupervised accuracy estimation error by at least 70%. On Digits and CIFAR10-C, it reduced error by over 40%. * Error Detection: The framework achieved significantly higher F1 scores for identifying specific misclassified points, improving the F1 score by 4.7% on iWildCam compared to previous state-of-the-art methods. * Robustness: The method proved remarkably effective even when test data featured imbalanced labels or outlier feature vectors—scenarios where traditional domain-invariant methods often collapse.

Limitations and Future Directions

While highly effective, the framework does come with computational overhead. Training and iteratively updating an ensemble of models is significantly more resource-intensive than simple confidence-based thresholding.

Additionally, the framework requires some prior knowledge or intuition to select the right ensemble variant. For instance, while $\mathcal{T}_{RM}$ is powerful for domain adaptation, it struggles with extreme label imbalance, a scenario where the simpler $\mathcal{T}_{RI}$ performs better.

Looking forward, the authors suggest exploring other types of ensemble methods beyond deep learning architectures. There is also promising potential to integrate this framework into an active learning loop, using the detected errors to automatically "repair" and fine-tune the original model in production.

Summary updated

BibTeX
@inproceedings{chen2021detecting,
  author = {Jiefeng Chen and Frederick Liu and Besim Avci and Xi Wu and Yingyu Liang and Somesh Jha},
  title = {{Detecting Errors and Estimating Accuracy on Unlabeled Data with Self-training Ensembles}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=-RWN5RZznb},
}
Figure