Catalogue of Tools & Metrics for Trustworthy AI

These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.

GerryFair



GerryFair

Auditing and Learning for Subgroup Fairness

Fairness Gerrymandering: when a classifier appears to be fair on each individual group, but badly violates the fairness constraint on one or more structured subgroups defined over the protected attributes’ (from Kearns et al., https://arxiv.org/abs/1711.05144)

This repository contains python code for:

  • learning fair classifiers subject to subgroup fairness constraints (as described in https://arxiv.org/abs/1711.05144)
  • auditing classifier predictions for fairness violations
  • visualizing tradeoffs between error and fairness metrics
  • fairness sensitive datasets for experiments (as used in https://arxiv.org/abs/1808.08166)

Fairness metrics supported for learning and auditing:

  • False Positive Rate equality
  • False Negative Rate equality

Learner classes supported:

  • Any sklearn binary classifier (defaults to LinearRegression)

Group classes supported:

  • Linear threshold functions over protected attributes

Prerequisites

To install the package and prepare it for use, run:

git clone https://github.com/algowatchPenn/GerryFair.git
pip install -r requirements.txt

The current iteration of the package uses the following python packages: pandas, numpy, sklearn, matplotlib
If you already have these installed, you can forgo the requirements step.

Using our package

For a demonstration of the GerryFair API, please see our jupyter notebook. Other examples of usage are provided as scripts in the examples folder. These should be run from a location that contains the gerryfair folder.

Datasets

communities: http://archive.ics.uci.edu/ml/datasets/communities+and+crime

lawschool: https://eric.ed.gov/?id=ED469370

adult: https://archive.ics.uci.edu/ml/datasets/adult

student: https://archive.ics.uci.edu/ml/datasets/student+performance (math grades)

License

  • GerryFair/license.txt
  • Maintained by: Seth Neel (sethneel@wharton.upenn.edu), William Brown, Adel Boyarsky, Arnab Sarker, Aaron Hallac.
  • Property of: Michael Kearns, Seth Neel, Aaron Roth, Z. Steven Wu.
  • For questions or concerns, contact Algowatch Project (algowatchproject@gmail.com).

About the tool


Tool type(s):


Objective(s):



Country of origin:


Type of approach:







Programming languages:



Github stars:

  • 28

Github forks:

  • 8

Modify this tool

Use Cases

There is no use cases for this tool yet.

Would you like to submit a use case for this tool?

If you have used this tool, we would love to know more about your experience.

Add use case
catalogue Logos

Disclaimer: The tools and metrics featured herein are solely those of the originating authors and are not vetted or endorsed by the OECD or its member countries. The Organisation cannot be held responsible for possible issues resulting from the posting of links to third parties' tools and metrics on this catalogue. More on the methodology can be found at https://oecd.ai/catalogue/faq.