Giter VIP home page Giter VIP logo

model_complete_attacks's Introduction

label-inference-attacks

Code & supplementary material of the paper Label Inference Attacks Against Federated Learning on Usenix Security 2022.

Prerequisites

Install Python 3.8 and Pytorch 1.7.0 +

Dataset Setup

Dataset Download

Download the following datasets to './Code/datasets'.

CINIC-10 [1]

Yahoo answers dataset:

https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset

Criteo dataset:

https://labs.criteo.com/2014/02/download-kaggle-display-advertising-challenge-dataset/

Breast histopathology images:

https://www.kaggle.com/paultimothymooney/breasthistopathology-images

Tiny ImageNet:

https://www.kaggle.com/c/tiny-imagenet

Breast cancer wisconsin dataset:

https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)

CIFAR-10 or CIFAR-100:

Use pytorch built-in classes.

Dataset Preprocess

Use scripts in './Code/datasets_preprocess' to preprocess the datasets.

Quick Start

For Windows OS

Use batch files in the './Code' folder.

'run_training.bat': train simulated VFL models.

'run_model_completion.bat': run the passive and active label inference attacks.

'run_direct_attack.bat': run the direct label inference attack.

'run_training_possible_defense.bat': test possible defenses against the passive and active label inference attacks.

'run_direct_attack_possible_defense.bat': test possible defenses against the direct label inference attack.

For Linux OS

Use commands in the batch files, e.g., use commands in 'run_training.bat' to train simulated VFL models.

References

[1] L. N. Darlow, E. J. Crowley, A. Antoniou, and A. J. Storkey. CINIC-10 is not ImageNet or CIFAR-10. arXiv preprint arXiv:1810.03505, 2018.

Tips

It seems that many people do not understand the design of "keep_predict_loss" func in utils.py. Actually, this loss func is designed based on the chain rule, with the purpose of making sure that the gradient can be continually back-propagated to the weights of bottom models. Please see the derivation below. image

model_complete_attacks's People

Contributors

chenghr avatar fuchong-cyber avatar jiahuanluo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.