Fairness-aware Class Imbalanced Learning

Shivashankar Subramanian, Afshin Rahimi, Timothy Baldwin, Trevor Cohn, Lea Frermann

Introduction

In the field of Natural Language Processing (NLP), models often struggle with two pervasive issues: class imbalance and demographic bias. Class imbalance occurs when certain labels are significantly rarer than others, leading models to neglect minority classes. Demographic bias arises when models learn to associate specific labels with protected attributes (like race or gender) due to skewed training data. This paper bridges the gap between these challenges, proposing a unified framework that treats them as deeply linked phenomena.

The Intertwined Challenges of Imbalance and Bias

Standard machine learning approaches often treat label-level imbalance (e.g., more "Happy" tweets than "Sad" ones) and subgroup-level bias (e.g., stereotyping occupations by gender) as separate problems. However, the authors argue that improving minority class performance without considering internal subgroup distributions can actually exacerbate unfairness. Conversely, debiasing methods that ignore overall class skew may fail to maintain utility. This research introduces fairness-aware extensions to the Label-Distribution-Aware Margin (LDAM) loss to address both issues simultaneously.

Methodology: Extending LDAM for Fairness

The core of the proposed approach is the LDAM (Label-Distribution-Aware Margin) loss. LDAM is designed for imbalanced learning by enforcing a larger "margin"—essentially a safety buffer in the decision space—for minority classes, which encourages better generalization.

Figure 1: The LDAM approach encourages a larger decision margin for minority classes to improve generalization.

To incorporate fairness, the authors propose three specific extensions:

  • LDAM$_{iw}$ (Instance Weighting): Re-weights training examples based on the frequency of specific class-group combinations, ensuring the model attends to underrepresented demographic subgroups within each class.
  • LDAM$_{adv}$ (Adversarial): Integrates an adversarial component that penalizes the model if a secondary network can predict protected attributes from the model's internal representations, effectively "unlearning" bias.
  • LDAM$_{reg}$ (Regularization): Adds a soft penalty based on Maximum Mean Discrepancy (MMD) to encourage "equalized odds," ensuring the model's prediction probability for a class is consistent across different demographic groups.

Experimental Evaluation

The methods were tested on two distinct NLP tasks:

  1. Emoji Prediction: A Twitter dataset labeled for sentiment (Happy/Sad) with race (Black/White) as the protected attribute. The authors simulated extreme "stereotyped" skews (up to 95%) to test robustness.
  2. Occupation Classification: A dataset of professional biographies where the task is to distinguish between gendered occupations (e.g., surgeon vs. nurse).

Key Results and the Pareto Frontier

The primary finding is that these fairness-aware LDAM extensions allow researchers to navigate the "Pareto frontier"—the optimal trade-off between raw performance (F-score) and fairness (measured as 1 - GAP).

Figure 3: Comparison of F-score vs. Fairness (1-GAP) across different datasets and skew levels. LDAM variants (lines) generally outperform baselines (points) by providing a better trade-off frontier.

LDAM$_{reg}$ emerged as the most robust method, consistently achieving the best balance across both datasets. In the most extreme 95% skew settings for emoji prediction, LDAM$_{reg}$ maintained a fairness score (1-GAP) above 0.8, whereas the standard "vanilla" model plummeted to nearly 0.4. Crucially, these gains in fairness did not come at the cost of utility; the LDAM extensions maintained competitive macro-averaged F-scores compared to standard imbalanced learning techniques.

Conclusion and Future Work

This work demonstrates that fairness and class-imbalanced learning are not mutually exclusive goals. By focusing on subgroup distributions within classes, the proposed LDAM variants provide a powerful toolset for building more equitable NLP systems. Future research will look to extend these methods to multi-class scenarios and intersectional fairness, where individuals belong to multiple protected groups simultaneously.

Summary updated

BibTeX
@inproceedings{subramanian2021fairness,
  author = {Shivashankar Subramanian and Afshin Rahimi and Timothy Baldwin and Trevor Cohn and Lea Frermann},
  title = {{Fairness-aware Class Imbalanced Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.155},
}
Figure