Preferential Sampling

Description

Preferential Sampling is a pre-processing method, proposed by Kamiran and Calders, that rebalances a training set so that a protected group and everyone else have the same rate of positive outcomes, such as being hired or approved. A ranking model first scores every example by how likely it is to have a positive label. The method then compares the size of each group-and-outcome combination with the size it would have if group and outcome were unrelated. It adds copies of positive examples from the disadvantaged group and negative examples from the favoured group, and removes negative examples from the disadvantaged group and positive examples from the favoured group, always starting with those closest to the decision boundary. Labels are never changed, so a standard classifier can learn from the rebalanced set.

Example Use Cases

Fairness

A graduate recruiter's historical shortlisting data shows women were shortlisted less often than men with similar scores. The team trains a ranking model, then copies the shortlisted women and rejected men closest to the decision boundary and removes the rejected women and shortlisted men closest to it, until the shortlisting rates match. No label is changed, and the production model is trained on the resampled set.

A bank training a loan-approval model on ten years of decisions finds that applicants under 25 were approved far less often than older applicants. Compliance wants the recorded decisions left untouched, so the model team resamples the training set until approval rates match across age groups and keeps the original labels as the record of what was decided.

Limitations

  • Duplicating examples invites overfitting, and removing them discards information. The method copies the same borderline examples and drops others, so a model may memorise duplicates or lose cases it needed, which matters most when the training set is small or many changes are needed.
  • It assumes the whole gap in positive rates between groups is discrimination. It resamples until outcome and group are unrelated, even where part of the gap has a legitimate explanation such as differing experience, and the original authors note that this constraint is often too strong.
  • The result depends on a ranking model learned from the same biased data. The ranker decides which examples count as borderline, so a weak or biased ranker copies and removes the wrong ones, and in the original experiments the method worked best with unstable learners such as decision trees.
  • It handles one binary protected attribute and a binary outcome. Gender and ethnicity together are not covered, so resampling for one attribute can leave intersectional groups unbalanced, and the authors call multiple combined attributes a harder open problem.
  • Fairness is achieved on the training data, not guaranteed on new data. In the original Census Income experiment with decision trees, discrimination fell from about 16 to about 3 per cent, not to zero, and the protected attribute must be recorded for every training example.

Resources

Research Papers

Data preprocessing techniques for classification without discrimination
Faisal Kamiran and Toon Calders•Jun 1, 2012

Recently, the following Discrimination-Aware Classification Problem was introduced: Suppose we are given training data that exhibit unlawful discrimination; e.g., toward sensitive attributes such as gender or ethnicity. The task is to learn a classifier that optimizes accuracy, but does not have this discrimination in its predictions on test data. This problem is relevant in many settings, such as when the data are generated by a biased decision process or when the sensitive attribute serves as a proxy for unobserved features. In this paper, we concentrate on the case with only one binary sensitive attribute and a two-class classification problem. We first study the theoretically optimal trade-off between accuracy and non-discrimination for pure classifiers. Then, we look at algorithmic solutions that preprocess the data to remove discrimination before a classifier is learned. We survey and extend our existing data preprocessing techniques, being suppression of the sensitive attribute, massaging the dataset by changing class labels, and reweighing or resampling the data to remove discrimination without relabeling instances. These preprocessing techniques have been implemented in a modified version of Weka and we present the results of experiments on real-life data.

Classification with no discrimination by preferential sampling
Faisal Kamiran and Toon Calders•May 27, 2010

Software Packages

fairmodels
Feb 27, 2026

Flexible tool for bias detection, visualization, and mitigation

Tutorials

fairmodels: Advanced tutorial (bias mitigation)

fairmodels

Documentations

resample: Resample data — fairmodels reference

Method of bias mitigation. Similarly to reweight this method computes desired number of observations if the protected variable is independent from y and on this basis decides if this subgroup with certain class (+ or -) should be more or less numerous. Than performs oversampling or undersampling depending on the case. If type of sampling is set to 'preferential' and probs are provided than instead of uniform sampling preferential sampling will be performed. Preferential sampling depending on the case will sample observations close to border or far from border.

Tags

Fairness Dimensions

Other Categories

Data Type:
Technique Type:
Evidence Type: