Skip to main content
QUICK REVIEW

[Paper Review] Accuracy on the Line: On the Strong Correlation Between Out-of-Distribution and In-Distribution Generalization

J. J. Miller, Rohan Taori|arXiv (Cornell University)|Jul 9, 2021
Domain Adaptation and Few-Shot LearningComputer Science30 citations
TL;DR

The paper empirically shows a strong, largely linear correlation between in-distribution and out-of-distribution accuracies across numerous models, datasets, and distribution shifts, and provides a simple Gaussian-based theory to explain the phenomenon.

ABSTRACT

For machine learning systems to be reliable, we must understand their performance in unseen, out-of-distribution environments. In this paper, we empirically show that out-of-distribution performance is strongly correlated with in-distribution performance for a wide range of models and distribution shifts. Specifically, we demonstrate strong correlations between in-distribution and out-of-distribution performance on variants of CIFAR-10 & ImageNet, a synthetic pose estimation task derived from YCB objects, satellite imagery classification in FMoW-WILDS, and wildlife classification in iWildCam-WILDS. The strong correlations hold across model architectures, hyperparameters, training set size, and training duration, and are more precise than what is expected from existing domain adaptation theory. To complete the picture, we also investigate cases where the correlation is weaker, for instance some synthetic distribution shifts from CIFAR-10-C and the tissue classification dataset Camelyon17-WILDS. Finally, we provide a candidate theory based on a Gaussian data model that shows how changes in the data covariance arising from distribution shift can affect the observed correlations.

Motivation & Objective

  • Investigate whether out-of-distribution generalization can be predicted from in-distribution performance across diverse datasets and models.
  • Characterize when precise linear ID-OOD trends emerge and when they fail across different distribution shifts.
  • Assess the robustness of ID-OOD correlations to hyperparameters, training duration, data size, and pretraining.
  • Propose a simple theoretical Gaussian model to explain observed correlations and guide future theory.

Proposed method

  • Train a wide range of models (classical and neural) on in-distribution data D with varying architectures, hyperparameters, seeds, and training settings.
  • Evaluate each model on both ID (D) and out-of-distribution (D′) test sets and visualize with probit-transformed scatter plots to reveal linear trends.
  • Quantify linearity with R^2 in the probit domain across multiple ID/OOD pairs (e.g., CIFAR-10, CIFAR-10.2, CINIC-10, STL-10, ImageNet, ImageNet-V2, YCB-Objects, FMoW-WILDS, iWildCam-WILDS).
  • Examine the effect of pretraining and zero-shot inference on the ID-OOD relationship.
  • Develop a simple Gaussian data model to derive a near-linear relationship between transformed accuracies and identify factors affecting deviations.

Experimental results

Research questions

  • RQ1Do in-distribution accuracies linearly predict out-of-distribution accuracies across diverse datasets and distribution shifts?
  • RQ2How robust is the ID-OOD linear relationship to model architecture, hyperparameters, training duration, and training data size?
  • RQ3What role does pretraining play in the ID-OOD relationship, and how does zero-shot inference affect it?
  • RQ4Under what conditions do linear trends fail or weaken, and why?

Key findings

  • There is a precise linear trend between ID and OOD accuracies for many dataset/model pairs, with R^2 values around 0.98–0.997 in probit domain for several shifts.
  • The linear relationship holds across multiple model families (classical and neural), architectures, hyperparameters, training durations, and training set sizes.
  • Pretraining can preserve or alter the ID-OOD trend depending on the task and setup (e.g., CIFAR-10.2 and FMoW-WILDS align with the trend; iWildCam-WILDS shows deviations with pretrained models).
  • Zero-shot predictions using pretrained models tend to deviate from the basic linear trend and move toward a line closer to x = y, indicating a bias introduced by pretraining rather than ID training alone.
  • Certain shifts show weaker or no precise linear trends (e.g., Camelyon17-WILDS tissue classification and some CIFAR-10-C corruptions like Gaussian noise), highlighting limits of the phenomenon.
  • A simple Gaussian data model explains a near-linear probit relationship with slope α/γ and deviations shrinking as dimension grows, supporting covariance-based intuition for the ID-OOD correlation.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.