Code Monkey home page Code Monkey logo

fact-ai's Introduction

Interpretable Complex-Valued Neural Networks for Privacy Protection

Implementation of the work by Xiang et al. (ICLR Poster, Paper PDF). Full report will be available soon at OpenReview.

We examine the reproducibility of the quantitative results reported by Xiang et al. Since no publicly available implementation currently exists, we write our own in PyTorch.

Structure of the complex-valued neural network

Claims

As the authors do not provide training details in their work, we do not aim to obtain the exact reported metrics. Instead, we focus on the claims that the proposed complex-valued networks are secure against inversion and property inference attacks while maintaining similar performance as the real-value counterparts.

Requirements

  • Python 3.6 or greater.
  • Dependencies can be installed by pip install -r requirements.txt

Training

We include several shell scripts with examples on how to train the classification models and the various attacker models.

Evaluation Notebook

Our results can be reproduced by running the provided Jupyter Notebook. The notebook requires the model checkpoints of our trained models, which can be downloaded here. The downloaded zip directory needs to be extracted into the root directory in order for the notebook to work properly. We use both, the CIFAR-10 and CIFAR-100 dataset in the notebook. Both datasets will be automatically downloaded by PyTorch and don't require any further preparation. It takes about 1-2 hours for the whole notebook to run.

fact-ai's People

Contributors

bwconrad avatar romech avatar serwansj avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gnehz john-m24

fact-ai's Issues

Implement complex layers

  • Convolutions
  • ReLU
  • Batch norm
  • Avg/Max pooling
  • Dropout
  • Skip-connections

Additionally:

  • Noise+Rotation function f(a, b, θ) = exp()[a+bi]

Implementer would need to decide whether tensors should be (Re, Im) or (r, φ). I think the latter is better.

Also, having a couple of unit tests would be nice.

Implementation Roadmap

This issue is to layout all the model components and experiments that need to be implemented. This will be updated as tasks are finished and new things emerge.

Complex-Value Network

  • GAN-Encoder
    • WGAN loss
    • Discriminator
  • Complex Layers
    • Conv, ReLU, batch norm, max pool, dropout, residual block [#3, #8]
  • Architectures
    • ResNet 20/32/44/56/110 (alpha + beta variants) [#2] , LeNet [#7], VGG-16 [#5], AlexNet [#6]
  • Baseline Architectures
    • Original, original + additional layers, noisy [#4]

Experiments

  • Measuring performance degradation
    • Accuracy, reconstruction error
  • Feature inversion attacks
    • Attack 1, 2
  • Property inference attacks
    • Attack 1, 2, 3, 4
  • Datasets
    • CIFAR-10, CIFAR-100, CUB-200, CelebA

Write readme

Write up the readme with what the code is and how to run it. To include are:

  • Short description of the project.
  • Installation instructions.
    • Create a requirements.txt to accompany this.
    • Link to pretrained weights.
  • How to run instructions.
    • How to run the notebook (i.e where to put the weights)
    • How to train baseline/complex classifiers.
    • How to train inversion attacks.
    • How to train inference attacks.
  • Add complete collection of shell scripts to run each experiment.
  • Experiment results with tables from the paper and images from the inversion attack.

Extend baseline training pipeline

These things are low priority given the current schedule.

  • When training VGG on CUB-200 the training and validation loss decreases however the training and validation accuracy remains stagnant. This can reproduced with running py train_baseline.py --gpus 1 --precision 16 --dataset cub200 --arch vgg --batch_size 32 --overfit_batches 10.
  • Training CelebA is not implemented. This is a multi-class binary classification task (40 binary attributes) so changes need to be made to the pipeline which is currently only for ordinary multi-class classification.

Completing these are low priority since CIFAR is predominately used in the paper and reproducing at least some experiments for each attack is more important.

Prepare demo notebooks

  • Setup environment, load weights
  • Evaluate baselines
  • Train, evaluate feature inversion attacks
  • Train, evaluate property inference attacks
  • Visualisations

Implement inversion attack 2

This attack reconstructs the input image with the encoder's features using a UNet architecture. The attack corresponds to the reconstruction error in Table 1 and 2.

  • U-Net architecture
  • Regular training pipeline
  • Complex training pipeline

Implement LeNet as (g, Ф, d)

Implementation of the baseline original LeNet split into Encoder, Processing and Decoder modules (see Section 5.1)

Implement ResNet as (g, Ф, d)

In the paper they split models into modules: g (encoder), Ф(processing), and d (decoder). Section 5.1 describes it in details.

We can start by implementing ResNet-20 (alpha or beta). Later we can do the same with the other models (ResNet-NN, LeNet, AlexNet).

Anyone wants to pick this up?

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.