Skip to main content

AdaFair: Cumulative Fairness Boosting

Overview

This GitHub repository presents an extended version of the AdaFair algorithm, initially introduced in the paper titled "AdaFair: Cumulative Fairness Adaptive Boosting" (CIKM 2019). This extension incorporates various parity-based fairness notions, enabling a more comprehensive and adaptive approach to fairness in machine learning models.

Key Features

  • Ensemble Approach: Introduces an ensemble method for fairness, modifying the data distribution throughout boosting rounds to emphasize misclassified instances of minority groups.

  • Fairness Cost Calculation: Implements fairness cost, evaluating performance disparities between protected and non-protected groups, ensuring fairness adaptations during model training.

  • Cumulative Notion of Fairness: Evaluates fairness based on the partial ensemble, providing a cumulative perspective rather than individual boosting rounds.

  • Beneficial for Different Notions: Demonstrates the effectiveness of cumulative fairness for various parity-based fairness notions, enhancing model fairness across different dimensions.

Updates

The repository has recently been updated to enhance its functionality and usability:

  • Improved Weak Learner Selection: The selection of weak learners (\theta parameter) is now performed on a dedicated validation set, optimizing the algorithm's performance.

  • Additional Fairness Notions: Introduces two new fairness notions, namely "Statistical Parity" (AdaFairSP.py) and "Equal Opportunity" (AdaFairEQOP.py), expanding the algorithm's applicability to different fairness criteria.

How to Use

To utilize this extended AdaFair algorithm in your machine learning projects, follow these steps:

  • pip install adafair

Preprint

This is an extension of our AdaFair algorithm (KAIS 2022, "Parity-based cumulative fairness-aware boosting") to other parity-based fairness notions. We propose an ensemble approach to fairness that alters the data distribution over the boosting rounds “forcing” the model to pay more attention to misclassified instances of the minority. This is done using the so-called fairness cost which assesses performance differences between the protected and non-protected groups. The performance is evaluated based on the partial ensemble rather than on the weak model of each boosting round. We show that this cumulative notion of fairness is beneficiary for different parity-based notions of fairness. Interestingly, the fairness costs also help with the performance on the minority class (if there is imbalance). Imbalance is also directly tackled at post-processing by selecting the partial ensemble with the lowest balanced error.

Contributions and Issues

Contributions and feedback are welcome. If you encounter any issues or have suggestions for improvement, please feel free to create an issue in the repository or submit a pull request.

Note: This repository is actively maintained and updated to ensure the highest standards of fairness and performance in machine learning models. Thank you for considering AdaFair for your fairness-aware machine learning tasks.

See jupyter notebook (run_example.ipynb) on how to train and use the model.

Metadata

Release files for adafair 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafair 0.1.5
File Size Uploaded
adafair-0.1.5.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adafair 0.1.5
File Interpreter ABI Platform
adafair-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / adafair-0.1.5.tar.gz

Download URL adafair-0.1.5.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cd5ab88e9981a580283ec29ba93e0597b05f1ea402030aa058a9a98660d65991
BLAKE2b-256 checksum
How to use checksums
a5b24b2a9df2b19d62f98b7027e3a7b7af1fb87bfee5abf8d82f2f0400a6d795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.8.2 Windows/10

Release files / adafair-0.1.5-py3-none-any.whl

Download URL adafair-0.1.5-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817f1598f4a7e6a61d503c3fbdee1cf94567d838737acb8aab42bfa220a6179c
BLAKE2b-256 checksum
How to use checksums
60e0b67224314f2340c071a2c5fd5223186d942d9e3896f42deec599f4a7dc8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.8.2 Windows/10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page