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).
- 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 - For ogbn-arxiv, we could use the OGB command to download the dataset:
dataset = PygNodePropPredDataset(name='ogbn-arxiv')
- Download Crime dataset to the
data
folder. - 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.
- Run
cd data
python crime.py
python fairness_graph.py
For example,
python obg-dataset.py --model GCN --hidden 16 --num_layers 2 --graph_name acm