Effective sample size, dimensionality, and generalization in covariate shift adaptation

Felipe Maia Polo, Renato Vicente

Introduction

In machine learning, the assumption that training and test data share the same distribution is frequently violated. This phenomenon, known as covariate shift, occurs when input feature distributions change while the conditional distribution of labels remains constant. While importance weighting is a standard remedy, its effectiveness often diminishes in high-dimensional spaces. This paper provides a rigorous mathematical framework connecting Effective Sample Size (ESS), data dimensionality, and generalization error, demonstrating why dimensionality reduction is a critical defense against the failures of domain adaptation.

The Challenge of Covariate Shift

Covariate shift adaptation typically involves weighting training samples by the ratio of target density to source density. However, the success of this approach hinges on the Effective Sample Size (ESS). When weights are highly concentrated on a few points, the effective dataset size collapses, leading to high variance and poor generalization. While empirical evidence has long suggested that high dimensionality exacerbates this issue, a unified theoretical explanation was previously lacking.

Theoretical Framework: ESS and Divergence

The authors establish a formal link between ESS and information theory using the Rényi Divergence of order 2 ($D_2$). They define a population version of ESS, denoted as $ESS^*$, and prove it is the inverse exponential of the divergence:

$$ESS^* = \exp(-D_2(P \| Q))$$

This relationship implies that as the source ($P$) and target ($Q$) distributions become more divergent, the effective sample size available for adaptation vanishes exponentially. Consequently, the generalization bound—the gap between weighted training error and true target error—is directly controlled by $ESS^*$.

The Curse of Dimensionality

A central contribution of the work is proving that adding features never decreases the divergence between distributions. In high-dimensional settings, even irrelevant features can make the source and target domains appear more distinct, causing $ESS^*$ to crash.

Relationship between Rényi Divergence, ESS*, and Test Error as dimensionality increases.

As shown in the figure above, increasing the number of dimensions ($d$) leads to a linear increase in Rényi Divergence, which in turn causes an exponential decay in $ESS^*$ and a corresponding rise in test error. This visualization confirms that the "curse of dimensionality" in adaptation is fundamentally a problem of vanishing effective samples.

Feature Selection as a Solution

The paper demonstrates that dimensionality reduction and feature selection are not merely heuristic "good practices" but mathematically necessary operations to inflate ESS. By focusing on a subset of relevant features, one effectively "overlaps" the source and target distributions, reducing divergence and tightening generalization bounds.

The researchers validated this using the InfoSelect method on 10 standard datasets (e.g., California Housing, Wine Quality) augmented with Gaussian noise. Their results showed that weighting based on selected features consistently outperformed weighting on the full feature set, even when true importance weights for the high-dimensional space were known.

Conclusion

This research provides a theoretical justification for dimensionality reduction in covariate shift scenarios. By proving that high dimensionality inherently suppresses ESS through increased divergence, the authors highlight a critical failure mode for importance weighting. Future work may extend these findings to non-linear transformations and label shift scenarios, further refining our understanding of robust domain adaptation.

Summary updated

BibTeX
@article{polo2023effective,
  author = {Felipe Maia Polo and Renato Vicente},
  title = {{Effective sample size, dimensionality, and generalization in covariate shift adaptation}},
  journal = {Neural Computing and Applications},
  year = {2023},
  doi = {10.1007/s00521-021-06615-1},
}
Figure