Unsupervised Recalibration

Albert Ziegler, Pawel Czyz

TL;DR

This paper introduces Unsupervised Recalibration (URC), a novel method to improve the accuracy of deployed machine learning models without requiring new ground truth data. URC identifies and corrects for biases introduced by shifts in data distribution between training and application environments, particularly benefiting scenarios with distinct subpopulations.

What Problem Does This Paper Address?

Machine learning models are often trained on a specific dataset and then deployed in the real world. However, the real-world data can differ significantly from the training data in ways that degrade model performance. This "data shift" can occur due to various reasons, including changes in the underlying data distribution or the emergence of previously unencountered subpopulations. Traditionally, addressing such shifts requires retraining the model with new, labeled data, which is often expensive, time-consuming, or even impossible if ground truth is unavailable. This paper tackles the challenge of recalibrating deployed models to maintain accuracy in the face of these distribution shifts, specifically when ground truth for the new data is unknown.

Methods

The core of the proposed method is Unsupervised Recalibration (URC). URC operates in two main ways:

  • Global Unsupervised Recalibration: This approach aims to recalibrate the entire model by assuming that while the overall data distribution might have shifted, the relationship between the model's predictions and the true labels remains consistent across different subpopulations. It leverages the observed predictions on field data and the model's behavior on the training data to estimate the true underlying distribution. A key component is the "consistency assumption" (Axiom 3), which states that the distribution of model predictions conditioned on the true label is the same for both training and application data. This allows for the estimation of the true prevalence of classes in the field data.
  • Local Unsupervised Recalibration: This method extends URC by applying it to specific subpopulations identified in the field data. If the model was not trained with these subpopulations as explicit features, they might exhibit different base rates (prevalence of classes). Local URC recalibrates the model for each subpopulation independently, assuming the consistency assumption holds within each subpopulation. This is particularly useful when subpopulations have significantly different class distributions.

The method involves defining partitions of the classifier's output space and then using optimization techniques (specifically, minimizing a regularized negative log-likelihood loss) to estimate the true class probabilities for these partitions.

Datasets

The paper uses the iNaturalist Challenge dataset for its experiments. This dataset consists of low-resolution images of insects, specifically beetles and butterflies. The authors downscaled images from this dataset to create various resolutions for their experiments. They also generated artificial binary datasets for evaluating quantification algorithms.

Key Insights and Ideas

  • Recalibration without Ground Truth: The most significant insight is the development of a method that can improve model accuracy without needing new labeled data from the deployment environment. This is a major practical advantage.
  • Exploiting Subpopulations: URC effectively leverages the existence of distinct subpopulations, even if they were not explicitly considered during model training. This allows for tailored improvements based on observed data characteristics.
  • Consistency Assumption is Key: The "consistency assumption" (Axiom 3) is crucial. It posits that the relationship between model predictions and true labels is invariant across subpopulations, allowing for the estimation of true prevalences.
  • Bias Underestimation: The paper highlights that naive aggregation methods (like averaging predictions) tend to underestimate the true magnitude of bias when data distributions shift. URC aims to correct this.
  • Trade-off for Rare Classes: URC may sacrifice performance on rare classes to improve performance on more common classes, which is a deliberate trade-off for overall accuracy improvement.

Key Results

The experimental results demonstrate that Unsupervised Recalibration significantly improves classifier performance:

  • Global URC: Improved log-likelihood, Brier score, and hard classification accuracy, especially at low resolutions where the original classifier was weakest. For instance, at 30-pixel resolution, classification accuracy increased by at least 6% (mean increase of 7%).
  • Local URC: Showed benefits when subpopulations had substantially different class membership distributions. It improved the refinement component of the Brier score.
  • Comparison with Quantification Algorithms: URC performed comparably to state-of-the-art quantification algorithms like Expectation Maximization (EM) and Adjusted Classify and Count (ACC), particularly in recovering true prevalences. Naive Classify and Count (CC) was found to be less reliable.
  • Robustness: URC was found to be robust against the number of partitions and the choice of evaluation set.

Limitations and Future Work

  • Contraindications: The paper explicitly lists two contraindications for local URC:
  • If the original classifier already has a bias for subpopulations, local URC can exacerbate this bias.
  • If the goal is to have bias-free classification across subpopulations, local URC might introduce bias.
  • Performance on Rare Classes: URC may reduce performance on rare classes to boost performance on common ones.
  • Consistency Assumption: The effectiveness of URC relies on the plausibility of the consistency assumption. If this assumption is violated, the method may not perform well.
  • Future Work: The authors suggest that URC can be extended to regression problems and that further research could explore different regularization strategies and more sophisticated partition selection methods. They also note that while the method is generally robust, its performance can be sensitive to the amount of data available for estimating parameters.

Summary updated

Abstract

Unsupervised recalibration (URC) is a general way to improve the accuracy of an already trained probabilistic classification or regression model upon encountering new data while deployed in the field. URC does not require any ground truth associated with the new field data. URC merely observes the model's predictions and recognizes when the training set is not representative of field data, and then corrects to remove any introduced bias. URC can be particularly useful when applied separately to different subpopulations observed in the field that were not considered as features when training the machine learning model. This makes it possible to exploit subpopulation information without retraining the model or even having ground truth for some or all subpopulations available. Additionally, if these subpopulations are the object of study, URC serves to determine the correct ground truth distributions for them, where naive aggregation methods, like averaging the model's predictions, systematically underestimate their differences.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 (Platt-scaled, before global URC)negative log likelihood0.399 per sampleImage Classification
Source quote
L470: \makecell{0.399 \\to 0.357}
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 + global unsupervised recalibration (after Platt scaling)negative log likelihood0.357 per sampleImage Classification
Source quote
L470: \makecell{0.399 \\to 0.357}
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 (Platt-scaled, before global URC)Brier score0.126Image Classification
Source quote
L478: \makecell{0.126 \\to 0.091}
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 + global unsupervised recalibration (after Platt scaling)Brier score0.091Image Classification
Source quote
L478: \makecell{0.126 \\to 0.091}
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 (Platt-scaled, before global URC)hard classification accuracy0.826Image Classification
Source quote
L494: \makecell{0.826 \\to 0.893}
Beetle-or-butterfly classification on iNaturalist Challenge images, 30-pixel maximum dimensionWolfram ImageIdentify Net V1 + global unsupervised recalibration (after Platt scaling)hard classification accuracy0.893Image Classification
Source quote
L494: \makecell{0.826 \\to 0.893}
BibTeX
@misc{ziegler2019unsupervised,
  author = {Albert Ziegler and Pawel Czyz},
  title = {{Unsupervised Recalibration}},
  year = {2019},
  eprint = {1908.09157},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.09157},
}
Figure