Paper commentary
AI Fairness 360: An Extensible Toolkit for Detecting, Understanding, and Mitigating Unwanted Algorithmic Bias
Open source toolkit AIF360 detects and mitigates unwanted algorithmic bias
- Problem Practitioners struggle to pick a fairness metric and a mitigation method, because many definitions exist and they can give different outcomes. Many existing libraries only detect bias and offer no mitigation.
- Method AIF360 is an open source Python toolkit that wraps fairness metrics and mitigation algorithms so each one takes a dataset and returns a dataset. Each step records which algorithm produced its output.
- Results On Adult, Reweighing improved fairness with little accuracy penalty, while Reject option classification lost a large amount of accuracy.
Why choosing a fairness fix stays hard
Narayanan counted at least 21 mathematical definitions of fairness in the literature. Different definitions can produce entirely different outcomes, as the recidivism debate between ProPublica and Northpointe shows. Not every definition can hold at the same time, so a choice has to be made. So the practical question becomes which metric suits a given application, since no single metric is best everywhere.
Mitigation adds another layer, because methods act at different points in the model life cycle. A developer has to decide whether to correct the data, change the learning algorithm or adjust the predictions. Many existing libraries cover only detection and offer no mitigation at all. Some toolkits cover both, but with fewer methods, so the authors set out to bring these efforts into one place.
One dataset object carries the pipeline
AIF360 treats every stage as a dataset going in and a dataset coming out, which keeps the pipeline uniform. The Dataset class holds features, labels, protected attributes and their names in one structure. Subclasses such as BinaryLabelDataset add rules, for example that a label takes one of two values, favorable or unfavorable. Because raw CSV files differ from one another, StandardDataset asks the user to name the feature, label and protected columns and the favorable values.
Each transformation creates a new object and keeps a pointer to the previous state in its metadata. This provenance record shows which algorithm produced each dataset, so a result can be traced back through the pipeline. The toolkit offers an interface to seven popular datasets, so an experiment can switch datasets through constructor arguments instead of code changes.
One contributor reported that adding a method was quick, but the authors note that one user can't establish general ease of use.
Metrics, explainers and mitigation algorithms
Metric classes take one dataset or a pair of datasets and return fairness or accuracy values. Disparate impact compares the base rate of favorable outcomes across protected groups as a ratio, and statistical parity difference compares them as a difference. Classification metrics are computed from the confusion matrix of true and predicted labels, and the code caches that matrix so that many metrics reuse it.
Average odds difference averages the false positive rate gap and the true positive rate gap.
Explainers sit beside metrics and turn a result into plain text or JSON that includes the metric's definition and its ideal value. Fine-grained localization, which points to the protected-attribute values or feature values driving the bias, is described as a planned extension. Mitigation algorithms are grouped by where they intervene: the training data, the learning procedure or the predictions.
Reweighing changes example weights, while Optimized pre-processing learns a probabilistic transformation of features and labels. Learning fair representations and Disparate impact remover change features, and Adversarial debiasing and Prejudice remover change the training objective. Equalized odds post-processing and Reject option classification change output labels without retraining the classifier.
Evidence from the three-dataset comparison
The authors used Adult Census Income, German Credit and COMPAS, with 45,222, 1,000 and 6,167 records. Each dataset was split 50% for training, 20% for validation and 30% for testing, and each point averages 25 random splits. Only the pre-processing methods changed the dataset itself, so fairness was measured before and after transformation.
Reweighing and Optimized pre-processing improved both metrics on every dataset, with the smallest gain on German Credit, which the authors link possibly to its small size.
For the classifiers, the validation partition set the score threshold to maximize balanced accuracy, and the reported results come from the test partitions. On Adult with race as the protected attribute, Reject option classification raised fairness considerably but cost a large amount of accuracy. Reweighing and Optimized pre-processing improved fairness with little accuracy penalty, while the two equalized odds post-processing methods changed little.
Accuracy was much steadier across splits than the fairness metrics, which the authors saw as correlated with each other.
The authors suggest Reject option classification is a reasonable average choice when only post-processing is available, although its results are brittle. Uncertainty was much higher on German Credit, and the fairness gains on COMPAS were more mixed. The random forest used 100 trees and at least 20 samples per leaf node, so these settings apply only to that classifier.
Web service, testing and what is still open
The Flask service takes a dataset name, protected attributes, groups, metrics and an optional mitigation algorithm. It splits the data, trains a logistic regression classifier, runs the metrics on test data and caches the result. Because the service calls the toolkit code rather than a lookup table, the demo stays in sync with code changes.
The service supports three built-in datasets and only logistic regression, and the authors say both could be expanded.
Travis CI runs pytest on each pull request, and the suite has 23 unit test cases in 13 modules. Code coverage is 65% for helper files and 58% for algorithms. Explanations are limited to plain text and JSON in the first release, and fine-grained localization is left to future releases. The authors also say the toolkit covers distributive justice, while compensatory justice is left as future work.
Paper info
- Authors
- Rachel K. E. Bellamy, Kuntal Dey, Michael Hind, Samuel C. Hoffman, Stephanie Houde, Kalapriya Kannan, Pranay Lohia, Jacquelyn Martino, Sameep Mehta, Aleksandra Mojsilovic, Seema Nagar, Karthikeyan Natesan Ramamurthy, John Richards, Diptikalyan Saha, Prasanna Sattigeri, Moninder Singh, Kush R. Varshney, Yunfeng Zhang
- Venue
- arXiv · Preprint
- First published
- 2018-10-3
- Added
- 2026-11-12
- Updated
- 2018-10-3
- Version
- v1
- arXiv
- 1810.01943
- Category
- cs.AI
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Rachel K. E. Bellamy, Kuntal Dey, Michael Hind, Samuel C. Hoffman, Stephanie Houde, Kalapriya Kannan, Pranay Lohia, Jacquelyn Martino, Sameep Mehta, Aleksandra Mojsilovic, Seema Nagar, Karthikeyan Natesan Ramamurthy, John Richards, Diptikalyan Saha, Prasanna Sattigeri, Moninder Singh, Kush R. Varshney, Yunfeng Zhang (2018). AI Fairness 360: An Extensible Toolkit for Detecting, Understanding, and Mitigating Unwanted Algorithmic Bias. arXiv:1810.01943v1. https://arxiv.org/abs/1810.01943v1
BibTeX
@misc{bellamy2018fairness,
title = {{AI Fairness 360: An Extensible Toolkit for Detecting, Understanding, and Mitigating Unwanted Algorithmic Bias}},
author = {Rachel K. E. Bellamy and Kuntal Dey and Michael Hind and Samuel C. Hoffman and Stephanie Houde and Kalapriya Kannan and Pranay Lohia and Jacquelyn Martino and Sameep Mehta and Aleksandra Mojsilovic and Seema Nagar and Karthikeyan Natesan Ramamurthy and John Richards and Diptikalyan Saha and Prasanna Sattigeri and Moninder Singh and Kush R. Varshney and Yunfeng Zhang},
year = {2018},
eprint = {1810.01943},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1810.01943v1}
}