Most machine learning models rely on the fundamental assumption that training and test data are independent and identically distributed (IID). In practice, this assumption is frequently violated. When the process used to collect training data differs systematically from the environment where the model is deployed, the result is sample selection bias.
This bias manifests in various ways: a credit scoring model only sees the repayment history of individuals previously approved for loans [Chen (2022)]; a spam filter is trained on public datasets that look nothing like a specific user's private inbox [Bickel et al. (2006)]; or a targeted advertising system is built on opt-in survey data that ignores the broader population [Bickel et al. (2008)]. In all these cases, the model encounters a covariate shift, where the distribution of input features changes between training and deployment, leading to poor generalization.
The Intuition of Distribution Matching
The core strategy for overcoming selection bias is to make the training data "look like" the target distribution. If we know how the training distribution $P_{train}(x)$ differs from the test distribution $P_{test}(x)$, we can reweight the training examples. An example that is rare in the training set but common in the real world should be given a higher weight during the learning process.
However, estimating these probability densities directly is notoriously difficult, especially in high-dimensional spaces. To bypass this, Huang et al. (2006) proposed Kernel Mean Matching (KMM). Instead of calculating densities, KMM finds weights that match the means of the two distributions in a high-dimensional feature space (a Reproducing Kernel Hilbert Space). If the moments of the distributions match in this space, the distributions themselves are likely to be close. This non-parametric approach allows models to be corrected using only unlabeled data from the target domain.
Learning from One-Sided Feedback
A particularly difficult form of selection bias occurs in "one-sided feedback" environments, such as bank lending or medical diagnosis. In these scenarios, we only observe the outcome (e.g., whether a loan was repaid) for the individuals who were selected by a previous policy. We have no data on the "counterfactual"—what would have happened if we had approved the applicants we rejected.
To address this "reject inference" problem, Liu et al. (2022) developed RMT-Net, a multi-task framework that simultaneously predicts whether an applicant will be rejected and whether they will default. By sharing information between these tasks, the model learns to account for the systematic differences between the approved and rejected pools. More recently, Chu et al. (2025) introduced the use of shadow variables and semiparametric efficiency theory to evaluate new policies even when unobserved factors influence both the original selection decision and the eventual outcome.
Robustness When Data is Scarce
Reweighting methods work well when the training and test distributions overlap significantly. But when the bias is extreme or the target data is scarce, simple reweighting can lead to high variance and unstable models.
One solution is to move from simple reweighting to robust optimization. Liu et al. (2014) proposed the Robust Bias-Aware (RBA) classifier, which uses a minimax framework. Instead of assuming a single set of weights, the RBA classifier prepares for the "worst-case" distribution shift within certain constraints, ensuring the model remains reliable even under significant uncertainty.
Alternatively, researchers have found that even minimal information about the target population can be powerful. Bertail et al. (2021) demonstrated that one can correct for massive sampling bias using only summary statistics—such as the average age or income of the target group—rather than requiring individual examples from that population.
Beyond Reweighting: Augmentation and Active Learning
In some domains, such as Natural Language Understanding (NLU), the training data might be so narrow that reweighting existing samples isn't enough to cover the diversity of real-world usage. Ramakrishna et al. (2023) showed that in these "cold-start" scenarios, synthetic data generation via large language models can effectively fill the gaps left by biased datasets.
Furthermore, if we have the ability to collect new data, we can use biased historical logs as a "warm-start." Yan et al. (2018) proposed an active learning strategy that uses importance sampling to identify which regions of the data distribution are under-represented in historical logs, allowing the system to query for new labels only where they are most needed to debias the global classifier.
Key Foundational Work
Transfer Learning by Distribution Matching for Targeted Advertising (2008) — contributed 1 concept elements to this direction.
Reverse testing: an efficient framework to select amongst classifiers under sample selection bias (2006) — contributed 1 concept elements to this direction.
Correcting Sample Selection Bias by Unlabeled Data (2006) — contributed 1 concept elements to this direction.