On the Need for a Language Describing Distribution Shifts: Illustrations on Tabular Datasets

Jiashuo Liu, Tianyu Wang, Peng Cui, Hongseok Namkoong

Abstract

Different distribution shifts require different algorithmic and operational interventions. Methodological research must be grounded by the specific shifts they address. Although nascent benchmarks provide a promising empirical foundation, they implicitly focus on covariate shifts, and the validity of empirical findings depends on the type of shift. For instance, previous observations on algorithmic performance can fail to be valid when the $Y|X$ distribution changes. We conduct a thorough investigation of natural shifts in 5 tabular datasets over 86,000 model configurations and find that $Y|X$-shifts are most prevalent. To encourage researchers to develop a refined language for distribution shifts, we build WhyShift, an empirical testbed of curated real-world shifts where we characterize the type of shift we benchmark performance over. Since $Y|X$-shifts are prevalent in tabular settings, we identify covariate regions that suffer the biggest $Y|X$-shifts and discuss implications for algorithmic and data-based interventions.

Introduction

Machine learning models often fail when the data they encounter in the real world differs from their training data—a problem known as distribution shift. Most research on distribution shifts focuses on computer vision, where "robustness" usually means a model can still recognize an object despite changes in lighting or image quality. In these cases, the underlying "rules" of the data are stable: a cat remains a cat ($X$-shift).

However, in tabular data—such as healthcare records, financial data, or socioeconomic systems—we frequently encounter $Y|X$-shifts. This occurs when the underlying relationship between features and the outcome changes, perhaps due to missing variables or policy shifts over time. For example, the factors predicting high income in California may differ significantly from those in Puerto Rico. This paper argues that the field must move from a deductive approach (inventing mathematical "ambiguity sets") to an inductive approach: observing how shifts actually manifest in real-world data and building algorithms to match those patterns.

The WhyShift Benchmark

To bridge the gap between theoretical robustness and empirical performance, the authors introduced WhyShift. This benchmark is significantly larger and more complex than previous tabular datasets, featuring 172 source-target distribution pairs across 8 real-world systems:

  • Socioeconomic systems: ACS Income, ACS Mobility, and ACS Public Coverage (U.S. Census data).
  • Traffic systems: Taxi (ride duration) and US Accident (severity).
  • Education systems: ASSISTments (student performance) and College Scorecard (completion rates).
  • Healthcare: Diabetes (diagnosis prediction).

Unlike benchmarks that rely on synthetic noise, WhyShift uses natural spatiotemporal shifts, such as training on data from one year and testing on another, or training in one geographic region and testing in another.

Deconstructing Model Performance

The researchers conducted an extensive study involving over 86,000 model configurations, testing 45 different methods including standard Empirical Risk Minimization (ERM) and various flavors of Distributionally Robust Optimization (DRO).

Through an attribution analysis using linear regression, they "deconstructed" model performance to determine which factors contributed most to out-of-distribution (OOD) accuracy. The results were clear: the single biggest factor in a model's robustness is the model class. Expressive models like LightGBM or XGBoost naturally handle shifts better than linear models, even when those linear models are specifically tuned for robustness.

Key Insights

The Breakdown of "Accuracy-on-the-Line"

In computer vision, a model that performs better on training data almost always performs better on shifted data. This paper demonstrates that this phenomenon breaks down in tabular data. Under $Y|X$-shifts, a model’s in-distribution success is a poor predictor of its OOD reliability.

The Prevalence of $Y|X$-Shifts

In pairs where performance dropped significantly, over 87% of that drop was attributed to changes in the conditional relationship ($Y|X$), rather than just changes in the features ($X$). This highlights why standard DRO—which often assumes a "worst-case" scenario that is far more extreme than reality—is often too pessimistic and harms real-world performance.

Inductive Interventions

The authors demonstrated that even a small amount of data from the target domain (as few as 128 samples) can be used to identify which features are shifting. By using a method called Sliced-Marginal-DRO, which focuses robustness on the specific low-dimensional subspace where shifts occur, the researchers were able to make simple linear models match the performance of state-of-the-art tree ensembles.

Conclusion and Future Work

The WhyShift testbed highlights the importance of building a deeper understanding of how distributions differ. While tree-based models like XGBoost are currently superior for tabular shifts, integrating "worst-case" optimization directly into these models remains a mathematical challenge and a primary area for future research. Furthermore, the "inductive" approach requires at least a small amount of labeled target data, suggesting that future work should explore how these lessons apply to scenarios where target data is scarce or entirely unavailable.

Summary updated

Abstract

Different distribution shifts require different algorithmic and operational interventions. Methodological research must be grounded by the specific shifts they address. Although nascent benchmarks provide a promising empirical foundation, they implicitly focus on covariate shifts, and the validity of empirical findings depends on the type of shift, e.g., previous observations on algorithmic performance can fail to be valid when the $Y|X$ distribution changes. We conduct a thorough investigation of natural shifts in 5 tabular datasets over 86,000 model configurations, and find that $Y|X$-shifts are most prevalent. To encourage researchers to develop a refined language for distribution shifts, we build WhyShift, an empirical testbed of curated real-world shifts where we characterize the type of shift we benchmark performance over. Since $Y|X$-shifts are prevalent in tabular settings, we identify covariate regions that suffer the biggest $Y|X$-shifts and discuss implications for algorithmic and data-based interventions. Our testbed highlights the importance of future research that builds an understanding of how distributions differ.
BibTeX
@inproceedings{liu2023need,
  author = {Jiashuo Liu and Tianyu Wang and Peng Cui and Hongseok Namkoong},
  title = {{On the Need for a Language Describing Distribution Shifts: Illustrations on Tabular Datasets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=PF0lxayYST},
}
Figure