Addressing Fairness, Bias and Class Imbalance in Machine Learning: the FBI-loss

Elisa Ferrari, Davide BacciuarXiv 2021 · arXiv

Abstract

Machine learning models often suffer from performance degradation and ethical concerns due to class imbalance, confounding bias, and unfair classification. While these issues are typically addressed as distinct research problems, this paper introduces the FBI-loss (Fairness, Biases, and Imbalances loss), a unified cost-sensitive loss function. By treating these challenges as variations of data "unbalance," the FBI-loss provides a model-agnostic, computationally efficient alternative to complex adversarial or generative frameworks. Experimental results across synthetic and real-world datasets demonstrate that the FBI-loss achieves competitive performance with significantly lower computational overhead than current state-of-the-art methods.

Introduction

In the development of robust machine learning models, three "unbalance" conditions frequently degrade performance or lead to unethical outcomes:

  1. Class Imbalance (CI): Rare classes (e.g., fraudulent transactions) are ignored in favor of the majority.
  2. Confounding Bias (CB): Models learn spurious correlations, such as identifying a "wolf" based on the presence of snow in the background rather than the animal's features.
  3. Unfair Classification (UC): Models discriminate based on protected attributes like race or gender.

Traditionally, these issues are treated as separate research fields with distinct solutions: CI often uses re-sampling; CB utilizes invariant feature representation; and UC relies on constrained optimization. This paper argues that these are fundamentally the same problem: the training data is unbalanced relative to the target or a secondary variable. The authors propose the FBI-loss as a single, simple mathematical tool to address all three without requiring complex architectural changes or adversarial training loops.

Methodology

The FBI-loss is a modification of the standard cross-entropy loss ($H^*$) that incorporates a dynamic weighting factor to prioritize under-represented or biased samples. The loss is defined as:

$$FBI(y, d, p) = K^{d \cdot |y-p| \cdot \xi} \cdot H^*$$

Key Components

  • $K$ (The Imbalance Ratio): A fixed factor determined by the dataset composition (e.g., the ratio of majority to minority samples).
  • $d$ (The Indicator): A placeholder identifying if a sample belongs to an under-represented group. For CI, this is the minority class. For CB and UC, it identifies samples where the target and confounder are "mismatched" (e.g., $u = |z - y|$).
  • $|y-p|$ (The Modulator): Inspired by Focal Loss, this term reduces the penalty as the model becomes more confident and correct. This prevents "over-correcting" and maintains performance on the majority group once the minority features are learned.
  • $\xi$ (Complexity Hyperparameter): A single tunable parameter that adjusts the correction strength based on the inherent difficulty or overlap of the classes.

Unlike methods like Adversarial Learning or Variational Autoencoders (VAEs), the FBI-loss is a simple loss function that does not require extra sub-networks or complex training schedules.

Experimental Setup

The authors evaluated the FBI-loss on both synthetic and real-world benchmarks:

  • Synthetic Data: Custom datasets designed to control the degree of unbalance and class overlap (complexity).
  • Credit Card Fraud Detection: A standard CI task where fraud instances are extremely rare.
  • ABIDE (Neuroimaging): A CB task involving gender recognition from 3D brain scans, where data acquisition was biased across different machines.
  • UCI Adult Dataset: A UC benchmark for income prediction where gender serves as a protected attribute.

Key Insights and Results

The Unification of Unbalance

The most significant insight of this work is the mathematical mapping of CB and UC onto the CI framework. By defining a new attribute $u = |z - y|$, the authors demonstrate that "bias" is essentially an imbalance in how classes are distributed across confounding variables.

The Role of Complexity

Imbalance is not always detrimental; if two classes are perfectly separated in feature space, a model will learn them regardless of rarity. The FBI-loss explicitly accounts for this via the $\xi$ parameter, which scales the correction based on task difficulty. Furthermore, the self-damping $|y-p|$ term ensures that once the model learns the under-represented samples, the extra penalty fades, preserving overall accuracy.

Performance and Efficiency

On real-world datasets, the FBI-loss achieved results comparable to complex state-of-the-art methods (such as IFR-VAE or Lagrangian Fairness Optimization). Crucially, it was 2x to 10x more computationally efficient to train. While competing methods often require balancing multiple learning rates and penalty terms across different sub-networks, the FBI-loss requires tuning only one hyperparameter ($\xi$).

Conclusion and Future Work

The FBI-loss offers a streamlined, unified solution for addressing fairness, bias, and imbalance in binary classification. By reframing these issues as a single problem of data unbalance, the authors provide a tool that is both powerful and easy to implement.

Future research may extend this formulation to multi-class problems and explore automated ways to tune the $\xi$ hyperparameter. The success of the FBI-loss encourages a shift toward unified solutions in the fairness and bias literature, moving away from the fragmented approaches currently dominating the field.

Summary updated

Abstract

Resilience to class imbalance and confounding biases, together with the assurance of fairness guarantees are highly desirable properties of autonomous decision-making systems with real-life impact. Many different targeted solutions have been proposed to address separately these three problems, however a unifying perspective seems to be missing. With this work, we provide a general formalization, showing that they are different expressions of unbalance. Following this intuition, we formulate a unified loss correction to address issues related to Fairness, Biases and Imbalances (FBI-loss). The correction capabilities of the proposed approach are assessed on three real-world benchmarks, each associated to one of the issues under consideration, and on a family of synthetic data in order to better investigate the effectiveness of our loss on tasks with different complexities. The empirical results highlight that the flexible formulation of the FBI-loss leads also to competitive performances with respect to literature solutions specialised for the single problems.
BibTeX
@misc{ferrari2021addressing,
  author = {Elisa Ferrari and Davide Bacciu},
  title = {{Addressing Fairness, Bias and Class Imbalance in Machine Learning: the FBI-loss}},
  year = {2021},
  eprint = {2105.06345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.06345},
}
Figure