Code for the paper 'Contrastive Learning-Based privacy metrics in Tabular Synthetic Datasets', Milton Nicolas Plasencia Palacios, Sebastiano Saccani, Gabriele Sgroi, Alexander Theodorus Petrus Boudewijn, Luca Bortolussi.
Installation:
path/to/privacy_eval$ pip install .To use the anonymeter package follow the installation instructions in https://github.com/statice/anonymeter.
The folder tutorial contains the tutorials to run the Anonymeter attack and our implementation for the Contrastive Learning approach to Singling Out attack (py and ipynb for both methods are provided). The tutorials are meant to be run with the Adult dataset that can be downloaded from here. These tutorials uses the leaky synthetizer to create a synthetic dataset using unseen records from the real dataset. The last file named synth_data_tutorial.py is a tutorial that uses a synthetic dataset generated by common generative models to evaluate the attacks. The synthetic data should be inside the project and the path on line 190 should be adapted.