All Projects → facebookresearch → fisher_information_loss

facebookresearch / fisher_information_loss

Licence: other
This code reproduces the results of the paper, "Measuring Data Leakage in Machine-Learning Models with Fisher Information"

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Fisher Information Loss

This repository contains code that can be used to reproduce the experimental results presented in the paper:

Awni Hannun, Chuan Guo and Laurens van der Maaten. Measuring Data Leakage in Machine-Learning Models with Fisher Information. arXiv 2102.11673, 2021.

Installation

The code requires Python 3.7+, PyTorch 1.7.1+, and torchvision 0.8.2+.

Create an Anaconda environment and install the dependencies:

conda create --name fil
conda activate fil
conda install -c pytorch pytorch torchvision
pip install gitpython numpy

Usage

The script fisher_information.py computes the per-example FIL for the given dataset and model. An example run is:

python fisher_information.py \
    --dataset mnist \
    --model least_squares

To see usage options for the script run:

python fisher_information.py --help

Other scripts in the repository are:

  • reweighted.py : Run the iteratively reweighted Fisher information loss (IRFIL) algorithm.
  • model_inversion.py : Attribute inversion experiments for a non-private model.
  • private_model_inversion.py : Attribute inversion experiments for a private model.
  • test_jacobians.py : Unit tests.

To run the full set of experiments in the accompanying paper:

cd scripts/ && ./run_experiments.sh

Citing this Repository

If you use the code in this repository, please cite the following paper:

@inproceedings{hannun2021fil,
  title={Measuring Data Leakage in Machine-Learning Models with Fisher
    Information},
  author={Hannun, Awni and Guo, Chuan and van der Maaten, Laurens},
  booktitle={Conference on Uncertainty in Artificial Intelligence},
  year={2021}
}

License

This code is released under a CC-BY-NC 4.0 license. Please see the LICENSE file for more information.

Please review Facebook Open Source Terms of Use and Privacy Policy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].