This is the implementation for our paper "GCL-LLeak: Link Membership Inference Attacks against Graph Contrastive Learning", which has been accepted by PoPETs 2024.
The datasets of Cora, Citeseer, Amazon-computer, Amazon-photo can be download with the package of pytroch Geometric,
The datasets of ENZYMES, COX2, Google+ are provided in the file "data"
The dataset of Facebook can be download here: https://snap.stanford.edu/data/ego-Facebook.html
The datasets of Cora, Citeseer with different density are provided in the file "data/density"
The datasets of Facebook - Ego and Google+ with different homophily are provided in the file "data/homophily"
The original implemenations of GCL models we used in the paper can be found here:
Thanks for the authors providing the implementations.
We tested the implementations with the following reqirements:
Python 3.8
dgl-cuda11.3 0.9.0
torch 1.10.0+cu113
torch-geometric 2.0.3
torch-scatter 2.0.9
torch-sparse 0.6.15
python GRACE-mia-white.py
python MVGRL-mia-white.py
python python train-mia-white.py --device cuda:0 --dataset Cora --param local:cora.json --drop_scheme degree
python main-cora-mia-white.py
python train-cora-mia.py
For DP-SGD
python GRACE-mia-white-dpsgd-defense.py
python MVGRL-mia-white-dpsgd-defense.py
python main-cora-mia-white-dpsgd-defense.py
For Noisy embedding
python GRACE-mia-white-lap-defense.py
python MVGRL-mia-white-lap-defense.py
python main-cora-mia-white-lap-defense.py