Source code repository for the paper "Automated Privacy Risk Estimation of Limited Fixed Aggregate Statistics" by Yifeng Mao*, Bozhidar Stevanoski*, and Yves-Alexandre de Montjoye (* denotes equal contribution).
We introduce a framework and a method for attribute inference attacks against fixed aggregate statistics. Our source code is organized as follows:
-
main.py: The main entry point to run DeSIA. -
src: Source code folder -
algo: Attack methods, currently containing only the code for our method, DeSIA -
asset: Code to obtain and process the datasets and queries. -
utils: Utility functions, such as functions for data loading and sampling. -
requirements.txt: The python packages required for running the source code.
The code has dependencies on common Python libraries. To run it, first please create a Python environment and install the dependencies in the requirements.txt file as follows:
conda create -n desia python=3.8 pip
conda activate desia
pip install -r requirements.txt # Make sure that the cuda version is compatible with the installed pytorch version!
The deterministic module of DeSIA uses a solver for the constraint integer programming problem. In particular, we use a third-party solver, Gurobi. We gratefully acknowledge Gurobi for providing a free academic licence for students and researchers. Please download your academic license (gurobi.lic) from Gurobi Portal, and move it under your home directory (~/).
Run the two notebooks under ./src/asset to obtain the dataset and queries.
You can develop your method by imporving upon our source code.
BaseAttack is the superclass to instantiate all our attack methods, which is defined in ./src/algo/desia/base.py. The only thing you need to do is creating a new child-class of BaseAttack and instantiating attack, evaluate function of that child-class.
Switch to ./scripts and run the scripts under that folder to obtain empirical results in the paper.
Some of the functions for generating the queries and evaluating them are reused and upgraded from RAP-Rank, DP-Query-Release, QuerySnout and QueryCheetah. We thank the authors for making open-sourcing their code.