Coder Social home page Coder Social logo

ieat's Introduction

Image Embedding Association Test (iEAT)

License: CC BY-NC-SA 4.0

Ryan Steed, Aylin Caliskan

Read the paper here. View code and data here.

.. info:: iEAT @ FAccT 2021 - Slides - Paper

Installation

# gather the dependencies for running scripts in this repo
conda env update environment.yml
conda activate ieat
# install the weat package locally
pip install -e weat
# install the ieat package locally
pip install -e .

Usage

The ieat package does not have a CLI. Use it programmatically by accessing the API module (ieat.api).

To run a basic test on a set of images, use the test function in ieat.api. SimCLR is downloaded automatically - but you must download a pre-trained version of iGPT yourself.

For an example of how to use the API programmatically, see the documentation and tutorials.

Tutorials and Replications

This repo uses Colab scripts in the notebooks/ directory. Check out notebooks/README.md for a full description.

To open a .ipynb file in Colab, navigate to Colab's Github Interface and search for this repo.

Documentation

Documentation for the ieat API is published at rbsteed.com/ieat.

To generate the documentation, use pdoc3:

pdoc3 --html --output-dir docs --force ieat --template-dir docs/templates
git subtree push --prefix docs/ieat origin gh-pages

Contents

  • data/ - images and other data used for bias tests in the paper
  • embeddings/ - location for caching computed embeddings - includes pre-computed embeddings for convenience; to generate your own, use the from_cache=False option
  • ieat/ - software package for generating image embeddings and testing for bias
  • notebooks/ - Colab notebooks containing tutorials and data exploration
  • output/ - location for storing results tables
  • environment.yml - Conda environment file with dependencies for Jupyter, etc.
  • docs/ieat - source for documentation

ieat's People

Contributors

ryansteed avatar wuthefwasthat avatar

Stargazers

 avatar Alef Iury avatar  avatar Tae-Jin Woo avatar  avatar Jillian Ross avatar  avatar Charlie Griffin avatar saw avatar

Watchers

James Cloos avatar  avatar

Forkers

jr4fs tti440

ieat's Issues

Biases in embeddings extracted by random Resnet

Hi,

I tried your code with a random resnet "torchvision.models.resnet50(pretrained=False)", extracting the embeddings from the AvgPool layer. It still found significant biases in many domains, especially intersectional ones. It found biases even in embeddings extracted by a random MLP with one hidden layer. (see attached screenshot) Do you know why that is the case? Thanks.

image

Seeking clarification on one-sided p-value from the permutation test

Hi Authors,

Thank you so much for the great work! After reading the paper, I have a question regarding the permutation test that tests the significance of the differential association ๐‘ (๐‘‹, ๐‘Œ, ๐ด, ๐ต). I noticed that in both WEAT and IEAT, the one-sided p-value is calculated as ๐‘ƒ๐‘Ÿ[๐‘ (๐‘‹๐‘–, ๐‘Œ๐‘–, ๐ด, ๐ต) > ๐‘ (๐‘‹, ๐‘Œ, ๐ด, ๐ต)], with the null hypothesis that the differential association should be 0. However, since this is a one-tailed test, does this assume that the alternative hypothesis is "the differential association is larger than 0"? But I am wondering why the alternative hypothesis is not "the differential association is not equal to 0"? Because the differential association can be in either direction, positive or negative, (if I understand correctly), and only testing the bias in the positive direction may not be complete. May I know the reason that a two-sided test is not used? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.