Optimal Ridge Regularization for Out-of-Distribution Prediction

Pratik Patil, Jin-Hong Du, Ryan J. Tibshirani
4/1/2024
math.STcs.LGstat.ML

No official code found. Best implementation: jaydu1/ood-ridge (3 stars, MIT, last commit 2024-03-31).

Abstract

We study the behavior of optimal ridge regularization and optimal ridge risk for out-of-distribution prediction, where the test distribution deviates arbitrarily from the train distribution. We establish general conditions that determine the sign of the optimal regularization level under covariate and regression shifts. These conditions capture the alignment between the covariance and signal structures in the train and test data and reveal stark differences compared to the in-distribution setting. For example, a negative regularization level can be optimal under covariate shift or regression shift, even when the training features are isotropic or the design is underparameterized. Furthermore, we prove that the optimally-tuned risk is monotonic in the data aspect ratio, even in the out-of-distribution setting and when optimizing over negative regularization levels. In general, our results do not make any modeling assumptions for the train or the test distributions, except for moment bounds, and allow for arbitrary shifts and the widest possible range of (negative) regularization levels.

View on arXivView PDF

Code Implementations(1)

jaydu1/ood-ridgeCommunity100%
MIT

Optimal Ridge Regularization for Out-of-Distribution Prediction

30Python, Jupyter NotebookMar 31, 20242 years agoMIT

Cite this paper

@article{patil2024optimal,
  title  = {Optimal Ridge Regularization for Out-of-Distribution Prediction},
  author = {Pratik Patil and Jin-Hong Du and Ryan J. Tibshirani},
  year   = {2024},
  eprint = {2404.01233},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.01233v1},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.01233.svg)](https://codeofpaper.com/paper/2404.01233)

Discussion