GithubHelp home page GithubHelp logo

minzc / fairadj Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brandeis-machine-learning/fairadj

0.0 0.0 0.0 1.13 MB

Code for ICLR'2021 paper: On Dyadic Fairness: Exploring and Mitigating Bias in Graph Connections

License: MIT License

Python 100.00%

fairadj's Introduction

FairAdj

Peizhao Li, Yifei Wang, Han Zhao, Pengyu Hong, and Hongfu Liu. "On Dyadic Fairness: Exploring and Mitigating Bias in Graph Connections , ICLR 2021.

Disparate impact has raised serious concerns in machine learning applications and its societal impacts. In response to the need of mitigating discrimination, fairness has been regarded as a crucial property in algorithmic designs. In this work, we study the problem of disparate impact on graph-structured data. Specifically, we focus on dyadic fairness, which articulates a fairness concept that a predictive relationship between two instances should be independent of the sensitive attributes. Based on this, we theoretically relate the graph connections to dyadic fairness on link predictive scores in learning graph neural networks, and reveal that regulating weights on existing edges in a graph contributes to dyadic fairness conditionally. Subsequently, we propose our algorithm, FairAdj, to empirically learn a fair adjacency matrix with proper graph structural constraints for fair link prediction, and in the meanwhile preserve predictive accuracy as much as possible. Empirical validation demonstrates that our method delivers effective dyadic fairness in terms of various statistics, and at the same time enjoys a favorable fairness-utility tradeoff.

Figure

Reference

@inproceedings{
li2021on,
title={On Dyadic Fairness: Exploring and Mitigating Bias in Graph Connections},
author={Peizhao Li and Yifei Wang and Han Zhao and Pengyu Hong and Hongfu Liu},
booktitle={International Conference on Learning Representations},
year={2021},
url={https://openreview.net/forum?id=xgGS6PmzNq6}
}

Setup

Please check or adjust the environment configurations in req.txt for PyTorch since the CUDA version may differ.

conda create -n fairadj --file req.txt
conda activate fairadj

Experiment

Data for Cora and Citeseer are stored in ./data.
Execute python file in ./src:

cd src

Experiments on FairAdj:

python main.py --dataset "cora" --device "cuda:0" --eta 0.2 --T2 20
python main.py --dataset "citeseer" --device "cuda:0" --eta 5. --T2 20

You can set T2 to various values, see Figure 1 and 6 in our paper for more results.

Experiments on Adversarial Graph Embedding:

python adv.py --dataset "cora" --device "cuda:0" --lr 0.001 --alpha 10.
python adv.py --dataset "citeseer" --device "cuda:0" --lr 0.001 --alpha 10.

Similarly, alpha can be set to various values, see Figure 1 and 6 in our paper for more results.

Results

We provide all the experimental results and figures in ./res.

fairadj's People

Contributors

peizhaoli05 avatar

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.