Skip to main content
QUICK REVIEW

[Paper Review] Calibrated ensembles can mitigate accuracy tradeoffs under distribution shift

Ananya Kumar, Tengyu Ma|arXiv (Cornell University)|Jul 18, 2022
Machine Learning and Data ClassificationComputer Science7 citations
TL;DR

This paper proposes ID-calibrated ensembles—a method that calibrates standard and robust models on in-distribution (ID) data before ensembling them—resulting in state-of-the-art performance on both ID and out-of-distribution (OOD) accuracy across 11 natural distribution shift datasets. The approach achieves the best of both worlds: 90.3% ID accuracy and 74.5% OOD accuracy, outperforming both individual models and prior self-training methods without using OOD data.

ABSTRACT

We often see undesirable tradeoffs in robust machine learning where out-of-distribution (OOD) accuracy is at odds with in-distribution (ID) accuracy: a robust classifier obtained via specialized techniques such as removing spurious features often has better OOD but worse ID accuracy compared to a standard classifier trained via ERM. In this paper, we find that ID-calibrated ensembles -- where we simply ensemble the standard and robust models after calibrating on only ID data -- outperforms prior state-of-the-art (based on self-training) on both ID and OOD accuracy. On eleven natural distribution shift datasets, ID-calibrated ensembles obtain the best of both worlds: strong ID accuracy and OOD accuracy. We analyze this method in stylized settings, and identify two important conditions for ensembles to perform well both ID and OOD: (1) we need to calibrate the standard and robust models (on ID data, because OOD data is unavailable), (2) OOD has no anticorrelated spurious features.

Motivation & Objective

  • To address the common accuracy tradeoff in robust machine learning where robust models sacrifice in-distribution (ID) accuracy for improved out-of-distribution (OOD) performance.
  • To develop a general, data-efficient method that improves both ID and OOD accuracy without requiring OOD data.
  • To investigate whether ensembling calibrated standard and robust models can mitigate the ID-OOD accuracy tradeoff in natural distribution shifts.
  • To identify conditions under which ID-calibrated ensembles succeed or fail, particularly regarding spurious feature correlations under distribution shift.

Proposed method

  • Calibrate the standard and robust models separately on in-distribution (ID) validation data using temperature scaling to improve confidence calibration.
  • Ensemble the calibrated standard and robust models by simply averaging their predictions, which is theoretically optimal for ID performance after calibration.
  • Use only ID data for calibration, avoiding any reliance on OOD data, which is typically unavailable in practice.
  • Evaluate the ensemble on both ID and OOD test sets to measure performance across distribution shifts.
  • Analyze the method in a stylized setting with independent signals to derive theoretical conditions for success.
  • Compare the ID-calibrated ensemble to alternative ensembling strategies, such as weighted ensembling tuned on ID data, and to self-training baselines.

Experimental results

Research questions

  • RQ1Can ensembling calibrated standard and robust models improve both in-distribution and out-of-distribution accuracy without using OOD data?
  • RQ2Under what distribution shift conditions does the ID-calibrated ensemble outperform individual models and prior state-of-the-art methods?
  • RQ3Why does the ID-calibrated ensemble perform well on natural distribution shifts but fail on adversarially synthesized shifts with anticorrelated spurious features?
  • RQ4What role does model calibration on ID data play in enabling the ensemble to achieve better ID and OOD performance?

Key findings

  • On 11 natural distribution shift datasets, ID-calibrated ensembles achieve 90.3% in-distribution accuracy and 74.5% out-of-distribution accuracy, outperforming both the standard model (88.7% ID, 65.2% OOD) and the robust model (86.8% ID, 72.3% OOD).
  • The method outperforms prior state-of-the-art approaches based on self-training, despite not using any additional unlabeled data.
  • ID-calibrated ensembles eliminate the ID-OOD accuracy tradeoff under natural distribution shifts where spurious features are not anticorrelated OOD.
  • The ensemble fails when spurious features are anticorrelated under OOD shifts—achieving OOD accuracy between the standard and robust models—confirming theoretical expectations.
  • Calibration on ID data significantly reduces expected calibration error (ECE) on ID data, though OOD calibration remains poor, indicating that ID calibration alone is insufficient for OOD calibration.
  • Simple ensembling of calibrated models outperforms tuned weighted ensembles, suggesting that the optimal combination is achieved through calibration rather than hyperparameter tuning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.