Skip to content

paihengxu/GFairHint

Repository files navigation

GFairHint

Install

conda create -n fair_gnn python=3.7

conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch
conda install pyg -c pyg -c conda-forge
pip install ogb
pip install -r requirements.txt

We follow the instructions to install Open Graph Benchmark (OGB) package. Specifically, PyTorch Geometric and Deep Graph Library (DGL).

Run

Step 1: Data

Academic networks

  1. For ACM, coauthor-phy, and coauthor-cs, we could obtain from the REDRESS GitHub repo: (https://github.com/yushundong/REDRESS/tree/main/node%20classification/data) and copy to the data folder
  2. For ogbn-arxiv, we could use the OGB command to download the dataset:
    dataset = PygNodePropPredDataset(name='ogbn-arxiv')
    

Crime network

  1. Download Crime dataset to the data folder.
  2. Follow instructions from Lahoti et al. to get ratings from Niche.com. We cannot share the code and data for this part due to legal issues.
  3. Run
cd data
python crime.py

Step 2: Train Fairness Hint

python fairness_graph.py

Step 3: Train and Evaluate on Original Graph and Task

For example,

python obg-dataset.py --model GCN --hidden 16 --num_layers 2 --graph_name acm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages