This repository is associated with the NeurIPS 2021 paper "An Uncertainty Principle is a Price of Privacy-Preserving Microdata". The code contains two folders
- Nonneg, which is a Julia package that implements the algorithms listed in the paper and contains the data and data processing code,
- Experiments, which reproduces the full experiments, serializes the outputs of the solvers, and generates latex files with the tables.
To run the code, type "julia Experiments/src/runexp.jl" in a shell (if you want to run fewer than 1000 iterations of each experiment, which may take several days, change the call to experiments_go in runexp.jl to experiments_go(number_of_iterations_you_want) ). The dependencies are:
Julia 1.5.2 or higher and the following Julia packages
- Pkg
- Serialization
- Random
- Statistics
- Printf
- COSMO (the default optimizer we use)
- DelimitedFiles
- Distributions
- Gurobi (if you want to use the gurobi optimizer)
- JuMP
- LinearAlgebra
- OSQP (if you want to use the OSQP optimizer)
- Revise
- Test (for running our unit tests)
The appropriate versions of these packages are stored in the machine generated file Nonneg/Manifest.toml and Nonneg/Project.toml
The PUMS histograms are in Nonneg/data and are human-readable CSV files with row and column headers. The synthetic data are generated by Nonneg/src/data.jl (which also reads the PUMS datasets). The can be programmatically obtained by the function get_datasets(), which returns a tuple consisting of 1-d synthetic datasets, 2-d synthetic datasetes, 2-d PUMS data. Each element of this tuple is an array of Dataset structs. The Dataset struct contains a name field and a contents field that is Julia array containing the data.
The unit tests can be run by using the shell to go into the Nonneg directory, opening the Julia repl, activating the package (type "]" and then "acvitate .") and including test/runtests.jl (include("test/runtests.jl")).