# Pate_GroupDP
A Pytorch implementation of Pate to experiment group fairness 

# I. Installation
Install the following dependencies:
```
python==3.7
pytorch==1.5.0
pandas==1.1.3
numpy==1.18.4
```

#II. Running experiments: 
1. Data: 
We have 4 dataset, including: UCI Adult Income, Credit card, Bank, and Parkinsons. Each dataset would have 2 file: `dataset_train.csv` and `dataset_test.csv`

2. Codes: 

This paper have two main modules. To run experiment in each module, locate the corresponding file and run the script in bash shelf. For example:

```
cd script/fairness_analysis/
python bound_param.py --dataset NameDataset --num_iter MaxEpochtoTrainStudentModel --num_teacher kTeacherEnsemble --lambda_reg LambdaRegulizer --sigma NoiseParam
```


1) Fairness Analysis:
- Upper bound of the expected model sensitivity: `bound_param.py`
- The impact of k and $\lambda$ on model fairness: `model_param_effect.py`
- The impact of input norm,  distance to decision boundary and theircorrelation with the excessive risk : `corr_db_er.py`
- The property of flipping probability:
- Relationship between input norm and gradient norm: 


2) Mitigation Solution:
- 


Results are kept in folder `results/`



