adversarial-attack-from-leakage

Jiaqi0602 a6d045501f modify readme 4 år sedan
data ed4dd791b5 first commit 4 år sedan
image ed4dd791b5 first commit 4 år sedan
inversefed ed4dd791b5 first commit 4 år sedan
output_rec_images 0f05ec2520 added .gitignore 4 år sedan
utils ed4dd791b5 first commit 4 år sedan
.gitignore ed4dd791b5 first commit 4 år sedan
README.md a6d045501f modify readme 4 år sedan
demo - CIFAR10.ipynb ed4dd791b5 first commit 4 år sedan
demo - VGGFACE2.ipynb ed4dd791b5 first commit 4 år sedan
main.py ed4dd791b5 first commit 4 år sedan

README.md

From Gradient Leakage to Adversarial Attacks in Federated Learning

By utilizing an existing privacy breaking algorithm which inverts gradients of models to reconstruct the input data, the data reconstructed from inverting gradients algorithm reveals the vulnerabilities of models in representation learning.

In this work, we utilize the inverting gradients algorithm proposed in Inverting Gradients - How easy is it to break Privacy in Federated Learning? to reconstruct the data that could lead to possible threats in classification task. By stacking one wrongly predicted image into different batch sizes, then use the stacked images as input of the existing gradients inverting algorithm will result in reconstruction of distorted images that can be correctly predicted by the attacked model.

Prerequisites

Required libraries:

Python>=3.7
pytorch=1.5.0
torchvision=0.6.0

Code

python main.py --model "resnet18" --data "cifar10" stack_size 4 -ls 1001,770,123 --save True --gpu True

Implementation for ResNet-18 trained with CIFAR10 can be found HERE and with VGGFACE2 can be found HERE

Quick reproduction for CIFAR10 dataset:

You can download pretrained model from HERE then replace the torchvision models.

Reference: