Skip to content

xyooz/replicate-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replicate Package — Privacy‑Preserving Compressive Sensing Reconstruction

This repository provides a minimal, reproducible evaluation package for the corresponding research paper.
It includes pretrained checkpoints, evaluation scripts, and robustness/attack evaluation code so that reviewers and readers can reproduce the main results without retraining models.


1. Repository Structure

replicate-package/
├── checkpoints/
│   ├── ckpt_recon/
│   │   └── 30/
│   │       ├── epsl-1_c.pt
│   │       └── epsl-1_g.pt
│   │
│   └── ckpt_attack_recon/
│       └── 30/
│           └── epsl-mixed_g.pt
│
├── evaluation/
│   ├── utils.py
│   ├── reconstruction.py
│   ├── attack_reconstruction.py
│   ├── attack_fgsm.py
│   └── robust_gaussian.py
│
├── models/
│   ├── sensing.py
│   └── generator.py
│
├── scripts/
│   ├── eval_reconstruction.py
│   ├── eval_attack_recon.py
│   ├── eval_attack_fgsm.py
│   └── eval_robust_gaussian.py
│
├── requirements.txt
└── README.md

2. Environment Setup

conda create -n privcs python=3.9 -y
conda activate privcs
pip install -r requirements.txt

3. Execution Convention

Always run scripts from the repository root using module mode:

python -m scripts.eval_reconstruction

4. Normal Reconstruction Evaluation

python -m scripts.eval_reconstruction \
  --dataset cifar10 \
  --ckpt_root checkpoints/ckpt_recon \
  --compression_rates 30 \
  --epsilons 1 \
  --batch_size 256

5. Reconstruction Attack Evaluation

python -m scripts.eval_attack_recon \
  --dataset cifar10 \
  --ckpt_root checkpoints \
  --compression_rates 30 \
  --batch_size 256

6. FGSM Attack Evaluation

python -m scripts.eval_attack_fgsm \
  --dataset cifar10 \
  --ckpt_root checkpoints/ckpt_recon \
  --compression_rates 30 \
  --epsilon 1 \
  --adv_scale 0.1

7. Gaussian Noise Robustness Evaluation

python -m scripts.eval_robust_gaussian \
  --dataset cifar10 \
  --ckpt_root checkpoints/ckpt_recon \
  --compression_rates 30 \
  --epsilon 1 \
  --gaussian_scale 0.20

8. Metrics

  • PSNR / SSIM
  • SSIM uses win_size = 3 for CIFAR‑10

9. Checkpoints Policy

Only selected checkpoints are uploaded to ensure reproducibility while keeping the repository lightweight.


10. Contact

Please open an issue if you encounter any problem during reproduction.

About

a replicate-package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages