Skip to content

Wazhee/GCA

Repository files navigation

Generative Counterfactual Augmentation (GCA)

We explore how to construct unbiased Chest X-Ray datasets using StyleGAN!
Checkout our pytorch version [Code]

Chest X-Ray Interpolation using StyleGAN3
male2female m2f

Our method effectively mitigates the effects of adversarial label poisoning attacks.

Performance Evaluation - False Negative Rate (FNR)

fnr_baseline

Performance Evaluation - Area under the receiver operating characteristic curve (AUROC)

auroc_baseline Full-Synth-RSNA-AUROC

GCA Architecture

architecture diagram

Installation

git clone "https://github.com/<anonymous>/Debiasing-Chest-X-Rays-with-StyleGAN.git"
cd Debiasing-Chest-X-Rays-with-StyleGAN

Simulating Adversarial Attacks

We used code from HiddenInPlainSight [Code][Paper] to simulate adversarial attacks. Specifically we demonstrate how our augmentation method improves the robustness of CXR classifiers against label poisoning attacks.

Link to the sample section: Link Text. All code for simulating adversarial label poisoning is found in HiddenIPS folder

cd HiddenIPS

To run original HiddenInPlainSight Code

python src/main.py -train

To simulate adversarial attacks on augmented dataset

python src/main.py -train -model densenet -augment True

To specify the attack rate

python src/main.py -train -model densenet -augment True -rate 0.05 -gpu 0

Testing HiddenIPS

python src/main.py -analyze -test_ds rsna
python src/main.py -analyze -test_ds rsna -augment True

Recreate Age Results

conda activate ada
cd Fall\ 2024/CXR\ Project/HiddenInPlainSight/
python src/main.py -train -model densenet -augment True -demo age -rate 0 -gpu 0

Recreate Random Results

conda activate ada
cd Fall\ 2024/CXR\ Project/HiddenInPlainSight/
python src/main.py -train_random -json 'src/random_F&0-20_0.15&0.73.json' -model densenet -gpu 0

Recreate w/ run.ai

cd jiezy/CXR/Debiasing-Chest-X-Rays-with-StyleGAN/HiddenIPS/src/
python main2.py -rate 0.05 -demo sex -gpu 0

Test CheXpert Dataset

conda activate ada
cd Fall\ 2024/CXR\ Project/HiddenInPlainSight/
python src/main.py -test -test_ds cxpt -model densenet -augment True -gpu 0

Cite this work

Kulkarni et al, Hidden in Plain Sight, MIDL 2024.

@article{kulkarni2024hidden,
  title={Hidden in Plain Sight: Undetectable Adversarial Bias Attacks on Vulnerable Patient Populations},
  author={Kulkarni, Pranav and Chan, Andrew and Navarathna, Nithya and Chan, Skylar and Yi, Paul H and Parekh, Vishwa S},
  journal={arXiv preprint arXiv:2402.05713},
  year={2024}
}

About

This repository is code for debiasing large chest X-ray datasets using StyleGAN3. We use code from HiddenInPlainSight repository to demonstrate our methods robustness agains adversarial attacks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors