Giter Site home page Giter Site logo

guide's Introduction

GUIDE: Group Equality Informed Individual Fairness in Graph Neural Networks

1. Setup

Installing software

Please run the following commands to install necessary packages. For more details on Pytorch Geometric please refer to install the PyTorch Geometric packages following the instructions from here.

conda create --name guide python==3.7.11
conda activate guide
conda install pytorch==1.10.0 cudatoolkit=11.1 -c pytorch -c conda-forge

pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.0+cu111.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+cu111.html
pip install torch-geometric==2.0.1

pip install aif360==0.3.0

2. Datasets

We ran our experiments on two high-stakes datasets: credit and income and also a larger social network dataset pokec. All the data are present in the './dataset' folder. Due to space constraints, pokec is zipped so please unzip it before use.

3. Usage

The main scripts are listed below: GUIDE, InFoRM, PFR, FairGNN, NIFTY, and vanilla are included.

Examples

run GUIDE: Evaluate fairness and utility performance of GCN and credit dataset

python run_guide.py --model gcn --dataset credit --alpha 5e-6 --beta 1 --seed 1

The AUCROC of estimator: 0.6776
Total Individual Unfairness: 1886.4669
GDIF: 1.0030

run InFoRM: Evaluate fairness and utility performance of InFoRM-GCN and credit dataset

python run_inform.py --model gcn --dataset credit --alpha 5e-6 --opt_if 1 --seed 1

The AUCROC of estimator: 0.6813
Total Individual Unfairness: 2408.4109
GDIF: 1.4903

run PFR: Evaluate fairness and utility performance of PFR-GCN and credit dataset

python run_PFR_gnn.py --model gcn --dataset credit --gamma 0.5 --seed 1

The AUCROC of estimator: 0.6724
Total Individual Unfairness: 12494.9785
GDIF: 1.3037

run FairGNN: Evaluate fairness and utility performance of FairGNN-GCN and credit dataset

python baseline_fairGNN.py --model gcn --dataset credit --alpha 4 --beta 1000 --seed 1

The AUCROC of estimator: 0.6890
Total Individual Unfairness: 43560.7930
GDIF: 1.3326

run NIFTY: Evaluate fairness and utility performance of NIFTY-GCN and credit dataset

python run_nifty.py --encoder gcn --dataset credit --model ssf --sim_coeff 0.5 --seed 1

The AUCROC of estimator: 0.6927
Total Individual Unfairness: 31671.1328
GDIF: 1.2466

run vanilla GNN: Evaluate fairness and utility performance of GCN and credit dataset (note it is using run_inform.py but with opt_if flag off)

python run_inform.py --model gcn --dataset credit --alpha 0 --opt_if 0 --seed 1

The AUCROC of estimator: 0.6984
Total Individual Unfairness: 40829.4336
GDIF: 1.3748

4. Licenses

Note that the code in this repository is licensed under MIT License. Please carefully check them before use.

guide's People

Contributors

michaelweihaosong avatar

Stargazers

 avatar Yzq avatar  avatar Haifeng_Liu avatar

Watchers

 avatar

Forkers

yushundong

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.