Skip to main content
QUICK REVIEW

[Paper Review] Unsupervised Calibration under Covariate Shift

Anusri Pampari, Stefano Ermon|arXiv (Cornell University)|Jun 29, 2020
Anomaly Detection Techniques and ApplicationsComputer Science26 references4 citations
TL;DR

This paper proposes an importance sampling-based method to calibrate machine learning models under covariate shift, where test data distribution differs from training data. By leveraging domain-invariant features and estimating density ratios via a discriminator, the method adapts any existing calibration technique—like temperature scaling—without requiring labeled target data, significantly improving calibration error (e.g., ECE reduced from 20.6% to 7.7%) even when models are trained via domain adaptation.

ABSTRACT

A probabilistic model is said to be calibrated if its predicted probabilities match the corresponding empirical frequencies. Calibration is important for uncertainty quantification and decision making in safety-critical applications. While calibration of classifiers has been widely studied, we find that calibration is brittle and can be easily lost under minimal covariate shifts. Existing techniques, including domain adaptation ones, primarily focus on prediction accuracy and do not guarantee calibration neither in theory nor in practice. In this work, we formally introduce the problem of calibration under domain shift, and propose an importance sampling based approach to address it. We evaluate and discuss the efficacy of our method on both real-world datasets and synthetic datasets.

Motivation & Objective

  • To identify that domain-adapted models, despite high accuracy, remain miscalibrated under covariate shift.
  • To address the lack of calibration in models when test data distribution shifts from training data.
  • To develop a method that enables calibration of models under domain shift without requiring labeled target data.
  • To improve uncertainty quantification in safety-critical applications where model confidence must reflect true prediction reliability.

Proposed method

  • Uses importance sampling to reweight source validation data based on estimated density ratios between source and target distributions.
  • Employs a domain-invariant feature layer from a domain-adversarial network (e.g., CDAN) to train a binary discriminator for density ratio estimation.
  • Applies the estimated density ratios to modify the calibration objective, enabling adaptation of any existing calibration method (e.g., temperature scaling) to the target domain.
  • Uses the discriminator’s output to approximate the likelihood ratio p_target(x)/p_source(x), which is used as importance weights in the calibration loss.
  • Integrates the weighted calibration objective into standard post-hoc calibration techniques, allowing them to generalize under distribution shift.
  • Employs real-world datasets (Office-31, Office-Home, MNIST-USPS) to evaluate the method under diverse domain shift scenarios.

Experimental results

Research questions

  • RQ1Can existing calibration techniques like temperature scaling maintain calibration performance under covariate shift?
  • RQ2To what extent does domain adaptation compromise model calibration, even when accuracy is preserved?
  • RQ3Can unsupervised calibration be achieved under covariate shift without labeled target data?
  • RQ4How effective is importance sampling with estimated density ratios in improving calibration under domain shift?
  • RQ5What factors limit the performance of the proposed method in real-world settings?

Key findings

  • The proposed weighted calibration method significantly reduces expected calibration error (ECE) on domain-shifted data, achieving ECE of 6.0% on A→D in Office-31 (down from 14.7%).
  • On the MNIST-USPS dataset, ECE improved from 20.6% to 7.7% using the proposed method for M→U transfer, demonstrating strong performance under shift.
  • In the Office-Home dataset, Cl→Pr transfer saw ECE drop from 13.3% to 6.4%, showing consistent improvement across diverse domains.
  • The method outperforms unweighted calibration and baseline methods, particularly in cases where source and target data distributions differ substantially.
  • Performance degradation in some settings (e.g., A→W, A→D) is linked to data imbalance and poor density ratio estimation, highlighting a key limitation.
  • The method’s efficacy is highly dependent on accurate density ratio estimation, suggesting that improving this step is critical for future work.

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.