Library / SDK
Trusted-AI/AIF360 avatar
Trusted-AI/AIF360

AIF360: IBM's Fairness Toolkit and the Cost of Its Optional Extras

A comprehensive set of fairness metrics for datasets and machine learning models, explanations for these metrics, and algorithms to mitigate bias in datasets and models.

2,865 stars914 forksPythonApache-2.0

At a glance

What is it?
AI Fairness 360 bundles group fairness metrics, metric explanations and bias mitigation algorithms behind a single Python and R package. The core install is small; most of the mitigation algorithms are extras you opt into, and that split is the main thing to understand before adopting it.
Who is it for?
Adopt AIF360 if you need a single library that covers both measurement and mitigation and you are willing to pin a virtual environment around it, since the README itself warns that it requires specific versions of many Python packages that may conflict with other projects.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 92 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What AIF360 Actually Packages

The README describes three deliverables: a set of metrics for datasets and models, explanations for those metrics, and algorithms to mitigate bias in datasets and models. Those are three different jobs that are often split across three different tools, and putting them in one package is the project's main claim. The stated audience is not research alone. The README says the toolkit is designed to translate algorithmic research from the lab into practice in domains including finance, human capital management, healthcare and education. That framing matters, because it tells you the intended user is someone who has to produce a number and then act on it, not someone writing a paper about the number. The package ships in both Python and R, and the R side is a plain CRAN install, which is unusual for a toolkit of this kind and worth noting if your team's analysis layer is not Python.

The Mitigation Algorithms and the Papers Behind Them

The supported mitigation list is long and every entry is tied to a citation: Optimized Preprocessing, Disparate Impact Remover, Equalized Odds Postprocessing, Reweighing, Reject Option Classification, Prejudice Remover Regularizer, Calibrated Equalized Odds Postprocessing, Learning Fair Representations, Adversarial Debiasing, Meta-Algorithm for Fair Classification, Rich Subgroup Fairness, Exponentiated Gradient Reduction, Grid Search Reduction, Fair Data Adaptation, and Sensitive Set Invariance/Sensitive Subspace Robustness. This is the part of the library that most distinguishes it from a metrics-only package. The algorithms also span different intervention points. Some transform the training data before a model sees it, some adjust the model or its loss during training, and some postprocess predictions after the fact. The README does not map each algorithm to its stage in this text, so you have to check the individual entries rather than assume a uniform interface. Treat the list as a menu of published methods, not as a set of interchangeable switches.

Metric Families: Group Rates, Distortion, Entropy and Subset Scan

On the measurement side the README groups things rather than enumerating them. There is a comprehensive set of group fairness metrics derived from selection rates and error rates, and that set includes rich subgroup fairness. There is a separate set of sample distortion metrics, which measure something different from rate parity: they look at how far individual samples are moved by a transformation. Then come three named families with citations: the Generalized Entropy Index, Differential Fairness and Bias Amplification, and Bias Scan with Multi-Dimensional Subset Scan. The last one is the interesting outlier. Most of the list is about comparing rates between defined groups, which requires you to have already decided which groups matter. Subset scan searches for subgroups rather than taking them as given, which is a different question and a different failure mode. If your concern is an unanticipated slice of the population rather than a protected attribute you already track, the scan family is the part of the library that addresses it.

Installing It: Extras, Versions and the Virtual Environment Warning

The supported Python configurations are macOS, Ubuntu and Windows, all on Python 3.10 through 3.13. The README is explicit that AIF360 requires specific versions of many Python packages which may conflict with other projects on your system, and it strongly recommends a virtual environment manager, suggesting you try that first if installation fails. Conda is recommended over Virtualenv, though the README calls them generally interchangeable. The base install is one line:

pip install aif360

with the caveat that some algorithms need additional dependencies while the metrics work out of the box. That split is the single most important operational fact about this package. To pull in algorithm dependencies you name extras, for example:

pip install 'aif360[LFR,OptimPreproc]'

or, for complete functionality:

pip install 'aif360[all]'

The available extras are OptimPreproc, LFR, AdversarialDebiasing, DisparateImpactRemover, LIME, ART, Reductions, FairAdapt, inFairness, LawSchoolGPA, notebooks, tests, docs and all. For a source checkout the README gives git clone of the Trusted-AI/AIF360 repository followed by pip install --editable '.[all]' from the project root, and notes that running the example notebooks requires the manual installation path plus the datasets placed in their respective folders as described in aif360/data/README.md.

The Extras Model Is Also the Main Friction

The extras design is sensible and it is also where adoption goes wrong. A team reads that the metrics work out of the box, installs the base package, builds a pipeline, and then discovers that the mitigation step they planned needs an extra whose dependency tree is heavier than everything else in the project combined. Adversarial Debiasing, for instance, is a neural method, and the extras list implies it drags in a deep learning stack that a scikit-learn shop may not otherwise carry. The README's own warning about conflicting package versions points the same way. The practical consequence is that the decision to use AIF360 for mitigation is a decision about your whole environment, not about one import. There is a second, softer limitation the README admits directly: being a comprehensive set of capabilities, it may be confusing to figure out which metrics and algorithms are most appropriate for a given use case. The project's answer is guidance material hosted on its site rather than something enforced by the API, which means the library will happily compute a metric that is the wrong one for your problem.

What It Is Not: A Drop-In for a Metrics-Only Library

Fairlearn is the obvious comparison and the difference is scope rather than quality. Fairlearn is a Microsoft project that also covers fairness assessment and mitigation, but the practical distinction for a reader deciding today is packaging philosophy. AIF360's identity is breadth: fifteen named mitigation algorithms drawn from the literature, several metric families including subset scan, plus an R package on CRAN. That breadth is why the extras exist and why the dependency warning exists. If your requirement is a small set of parity metrics computed inside an existing scikit-learn pipeline with minimal new dependencies, a narrower library gets you there with less environment surgery. If your requirement is to compare several published mitigation methods against each other on the same dataset, the breadth is the point and the extras cost is the price of it. The README does not claim AIF360 is lighter than alternatives; it claims it is comprehensive, and those are different promises.

Version Cadence and What Upgrade Work Looks Like

The release history is not fast. v0.5.0 landed in September 2022, v0.6.0 in February 2024, and v0.6.1 in April 2024. The repository is not archived and the last push date on the default branch is well after the most recent release, so development has continued between tagged versions. For planning purposes that cadence cuts both ways. You are not chasing a moving target every month, which is good for a component you embed in a regulated workflow. You are also not getting frequent patch releases, which means a dependency conflict introduced by an upstream package may sit unresolved until the next tag. Combined with the README's warning about pinned versions, the sensible upgrade posture is to treat AIF360 as a versioned component with its own environment rather than something you let float inside a shared requirements file. Licence-wise the project is Apache-2.0, which is a permissive licence with an explicit patent grant, but the algorithms it implements come from separate published papers and the licence on this repository does not speak to any rights in those methods. That is a question for your own counsel, not something the README settles.

Editorial conclusion

Adopt AIF360 if you need a single library that covers both measurement and mitigation and you are willing to pin a virtual environment around it, since the README itself warns that it requires specific versions of many Python packages that may conflict with other projects. Do not adopt it if you only need one fairness metric in a service that must stay dependency-light, or if you need a mitigation method that is not on the supported list, because the library will not invent one for you. Before committing, verify three things against your own environment: that your Python version is inside the 3.10 to 3.13 window, that the extras you need (for example LFR or OptimPreproc) install cleanly alongside your existing stack, and that the specific metric you intend to report is in the supported list rather than something you assumed was there.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. Trusted-AI/AIF360 on GitHub
Community notes

Community notes