Deep Learning on a Healthy Data Diet: Finding Important Examples for Fairness

Abdelrahman Zayed, Prasanna Parthasarathi, Goncalo Mordido, Hamid Palangi, Samira Shabanian, Sarath Chandar · OpenReview

Abstract

Data-driven predictive solutions predominant in commercial applications tend to suffer from biases and stereotypes, which raises equity concerns. Prediction models may discover, use, or amplify spurious correlations based on gender or other protected personal characteristics, thus discriminating against marginalized groups. Mitigating gender bias has become an important research focus in natural language processing (NLP) and is an area where annotated corpora are available. Data augmentation reduces gender bias by adding counterfactual examples to the training dataset. In this work, we show that some of the examples in the augmented dataset can be not important or even harmful to fairness. We hence propose a general method for pruning both the factual and counterfactual examples to maximize the model’s fairness as measured by the demographic parity, equality of opportunity, and equality of odds. The fairness achieved by our method surpasses that of data augmentation on three text classification datasets, using no more than half of the examples in the augmented dataset. Our experiments are conducted using models of varying sizes and pre-training settings.

Introduction

Large language models (LLMs) often inherit and amplify societal biases present in their training data, such as associating specific professions with gendered pronouns. A standard mitigation strategy is Counterfactual Data Augmentation (CDA), which involves generating gender-flipped versions of training sentences (e.g., "He is a doctor" becomes "She is a doctor") to balance the dataset.

However, CDA introduces significant challenges:

  1. Efficiency: Doubling the dataset size increases training time and computational overhead.
  2. Redundancy: Many sentences lack gendered information relevant to debiasing.
  3. Harm: Certain augmented examples may introduce noise or reinforce stereotypes, potentially degrading model performance metrics like AUC.

This research introduces a "healthy data diet" approach, aiming to select a minimal, high-impact subset of data that maximizes fairness without compromising primary model performance.

Methodology: The Gender Equity (GE) Score

The authors propose the Gender Equity (GE) score to quantify an example's importance for fairness. Inspired by the EL2N score used for accuracy-based pruning, the GE score measures the L2 norm between the model's output logits for an original sentence and its counterfactual counterpart.

The process of counterfactual data augmentation followed by healthy data pruning based on GE scores.

A high GE score indicates that the model's prediction is highly sensitive to gender swaps, suggesting a reliance on gendered cues. Conversely, a low score implies the model is already gender-agnostic for that context. The pruning recipe involves:

  • Retaining a random $a\%$ of original factual sentences.
  • Selecting the top $b\%$ of counterfactual sentences based on their GE scores.

This selection process occurs early in training, ensuring computational efficiency.

Experimental Results

The method was evaluated on three text classification benchmarks: Twitter (sexism detection), Wikipedia (toxicity), and Jigsaw (toxicity).

Demographic parity and AUC across Twitter, Wikipedia, and Jigsaw datasets for various data augmentation ratios and scoring methods.

Key findings include:

  • Superior Fairness: The GE-based pruning consistently outperformed full CDA across metrics like Demographic Parity (DP) and Equality of Opportunity.
  • Data Efficiency: Optimal fairness was achieved using less than 50% of the fully augmented dataset.
  • Performance Balance: The approach maintained high AUC, with degradation typically kept under 3% compared to biased baselines.
  • Robustness: The GE score remained effective across different model architectures, including BERT and RoBERTa.

Discussion and Conclusion

The GE score acts as a "bias hotspot" detector, identifying where models have learned stereotypical correlations during pre-training. By focusing on these critical examples, the model effectively "unlearns" unfair associations.

Future work will aim to extend this framework beyond binary gender models to include non-binary identities and other protected attributes like race or religion. Additionally, applying these "data diets" to morphologically rich languages remains a vital area for exploration.

Summary updated

BibTeX
@misc{zayed2022deep,
  author = {Abdelrahman Zayed and Prasanna Parthasarathi and Goncalo Mordido and Hamid Palangi and Samira Shabanian and Sarath Chandar},
  title = {{Deep Learning on a Healthy Data Diet: Finding Important Examples for Fairness}},
  year = {2022},
  eprint = {2211.11109},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.11109},
}
Figure