Density ratio estimation improves regression under changing output distributions

Learning under Target Shift: Optimal Density Ratio Estimation and Importance-Weighted Regression

Machine Learning

Summary

When a system's outputs change their overall pattern but the way inputs relate to outputs stays the same, it can be tricky to adapt models trained before the change. The authors study this problem for continuous outputs and propose a new method to estimate the difference between the old and new data distributions from available data. Their method comes with guarantees on how well it works for finite samples. Using these estimates, the authors improve regression models to better predict new data under such shifts.

What this means in practice

  • For machine learning engineers: Improve prediction models when the distribution of outputs shifts but inputs given outputs remain stable across training and test phases.
  • For medical data teams: Adjust regression models for patient outcomes when the characteristics of the patient group change but the relationship between measurements and outcomes stays consistent.

Authors

Ren-Rui Liu, Zheng-Chu Guo

Abstract

We study density ratio estimation and importance-weighted regression under target shift with continuous outputs. Under target shift, the conditional distribution of the inputs given the outputs remains invariant across the training and test distributions, while the output marginal distribution may change. Although this problem has been extensively studied for discrete outputs, the continuous setting is substantially less understood: the importance weights are determined by an unknown density ratio function, for which existing estimation methods lack explicit finite-sample convergence rates. We propose a spectral regularization method in a reproducing kernel Hilbert space (RKHS) for estimating the continuous density ratio from labeled training samples and unlabeled test inputs. Under a source condition with regularity parameter $ι>0$, we establish high-probability finite-sample guarantees and show that the estimator achieves the capacity-independent minimax-optimal RKHS-norm rate $O(n_η^{-ι/(2ι+2)})$. We then incorporate the estimated density ratio into importance-weighted regression and characterize the propagation of density-ratio estimation error to the final predictor. When sufficiently many samples are available for density ratio estimation, the resulting regression estimator attains the minimax-optimal rates of standard kernel regression. These results establish a finite-sample theory for continuous density ratio estimation and importance-weighted learning under target shift.