Skip to content

Balanced Message Passing for Fair Graph Neural Network

License

Notifications You must be signed in to change notification settings

xiaolin-cs/BeMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeMap

BeMap: Balanced Message Passing for Fair Graph Neural Network (LOG 2023)

BeMap is a fair message passing method for solving the unfairness problem on graph machine learning. It is a model-agnostic easy-to-implement solution that is able to effectively mitigate structural bias for most typical GNNs, such as GCN and GAT.

Cite Us

If you find this repository helpful in your work or research, we would greatly appreciate citations to the following paper:

@inproceedings{lin2023bemap,
  title={BeMap: Balanced Message Passing for Fair Graph Neural Network},
  author={Lin, Xiao and Kang, Jian and Cong, Weilin and Tong, Hanghang},
  booktitle={The Second Learning on Graphs Conference},
  year={2023}
}

Background

We introduce a novel fair message passing method named BeMap. It creates a fair graph structure for each epoch by leveraging a balance-aware sampling strategy to balance the number of the 1-hop neighbors of each node among different demographic groups. The intuition of mitigating structural bias is to push the bias residual for all the nodes to converge at the same fair centroid. The figure below gives an overview of BeMap.

Visualization of BeMap

Requirement

Main dependencies:

To install requirements, run:

pip install -r requirements.txt

Usage

1. Datasets

2. Running BeMap

We can run BeMap by the following command:

python train_bemap.py --dataset dataset_name --model model_name

For example, if we want to run BeMap on NBA dataset with GCN, we can excute the following command:

python train_bemap.py --dataset nba --model gcn

3. Experiment results

an example when running BeMap on the Recidivism dataset with GCN:

results of Recidivism with GCN

Overall results on real-world datasets

overall results on four datasets

Ablation study on balance-aware sampling strategy

ablation study

Contact

If you have any questions or want to use the code, feel free to contact:

Releases

No releases published

Packages

No packages published

Languages