Skip to main content

Algorithms for mitigating unfairness in supervised machine learning

Project description

Build Status MIT license PyPI Gitter StackOverflow

Fairlearn

Fairlearn is a Python package that empowers developers of artificial intelligence (AI) systems to assess their system's fairness and mitigate any observed unfairness issues. Fairlearn contains mitigation algorithms as well as a Jupyter widget for model assessment. Besides the source code, this repository also contains Jupyter notebooks with examples of Fairlearn usage.

Website: https://fairlearn.github.io/

Current release

  • The current stable release is available at Fairlearn v0.6.0.

  • Our current version differs substantially from version 0.2 or earlier. Users of these older versions should visit our onboarding guide.

What we mean by fairness

An AI system can behave unfairly for a variety of reasons. In Fairlearn, we define whether an AI system is behaving unfairly in terms of its impact on people – i.e., in terms of harms. We focus on two kinds of harms:

  • Allocation harms. These harms can occur when AI systems extend or withhold opportunities, resources, or information. Some of the key applications are in hiring, school admissions, and lending.

  • Quality-of-service harms. Quality of service refers to whether a system works as well for one person as it does for another, even if no opportunities, resources, or information are extended or withheld.

We follow the approach known as group fairness, which asks: Which groups of individuals are at risk for experiencing harms? The relevant groups need to be specified by the data scientist and are application specific.

Group fairness is formalized by a set of constraints, which require that some aspect (or aspects) of the AI system's behavior be comparable across the groups. The Fairlearn package enables assessment and mitigation of unfairness under several common definitions. To learn more about our definitions of fairness, please visit our user guide on Fairness of AI Systems.

Note: Fairness is fundamentally a sociotechnical challenge. Many aspects of fairness, such as justice and due process, are not captured by quantitative fairness metrics. Furthermore, there are many quantitative fairness metrics which cannot all be satisfied simultaneously. Our goal is to enable humans to assess different mitigation strategies and then make trade-offs appropriate to their scenario.

Overview of Fairlearn

The Fairlearn Python package has two components:

  • A dashboard for assessing which groups are negatively impacted by a model, and for comparing multiple models in terms of various fairness and accuracy metrics.

  • Algorithms for mitigating unfairness in a variety of AI tasks and along a variety of fairness definitions.

Fairlearn algorithms

For an overview of our algorithms please refer to our website.

Fairlearn dashboard

Check out our in-depth guide on the Fairlearn dashboard.

Install Fairlearn

For instructions on how to install Fairlearn check out our Quickstart guide.

Usage

For common usage refer to the Jupyter notebooks and our user guide. Please note that our APIs are subject to change, so notebooks downloaded from master may not be compatible with Fairlearn installed with pip. In this case, please navigate the tags in the repository (e.g. v0.4.5) to locate the appropriate version of the notebook.

Contributing

To contribute please check our contributor guide.

Maintainers

The Fairlearn project is maintained by:

  • @adrinjalali
  • @hildeweerts
  • @MiroDudik
  • @mmadaio
  • @riedgar-ms
  • @romanlutz

For a full list of contributors refer to the authors page

Issues

Usage Questions

Pose questions and help answer them on Stack Overflow with the tag fairlearn or on Gitter.

Regular (non-security) issues

Issues are meant for bugs, feature requests, and documentation improvements. Please submit a report through GitHub issues. A maintainer will respond promptly as appropriate.

Maintainers will try to link duplicate issues when possible.

Reporting security issues

Please take a look at our guidelines for reporting security issues.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fairlearn-0.6.0.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

fairlearn-0.6.0-py3-none-any.whl (24.6 MB view details)

Uploaded Python 3

File details

Details for the file fairlearn-0.6.0.tar.gz.

File metadata

  • Download URL: fairlearn-0.6.0.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for fairlearn-0.6.0.tar.gz
Algorithm Hash digest
SHA256 24abdb123bc82054c83ca0d69429f745def963bf7fe432d3ffba12f896b5a9c4
MD5 105238e19c3f0685814566c799e60234
BLAKE2b-256 4c4b73ba2c6a96bd785e22bb466ef9126bc391a940fcdab7ce3c03c287122763

See more details on using hashes here.

File details

Details for the file fairlearn-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: fairlearn-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.12

File hashes

Hashes for fairlearn-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f6bf09d99ec1be6663a1c48e09d8b58f52c4799507d80232e1e7c4763e9ecb8
MD5 53abeeae178a7a3b31363c52dc5a23ce
BLAKE2b-256 09f2354cd1ddb030e68dcced6f1932d9ef926ee13bad525faaf2f882e69705aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page