bargavj / EvaluatingDPML

This project's goal is to evaluate the privacy leakage of differentially private machine learning models.
MIT License
129 stars 49 forks source link

Enquire about batch clipping and per-instance clipping #22

Closed HongshengHu closed 4 years ago

HongshengHu commented 4 years ago

Hi Dr.Bargavj,

I am reading your paper "Evaluating Differentially Private Machine Learning in Practice" and have some questions as follows.

clipping

I noticed that you did experiments comparing effects on batch clipping and per-instance clipping, however, I did not find how to set parameters in your code to do this experiment. Does just setting "--target_batch_size=1" in evaluating_dpml.py file means per-instance clipping?

Many thanks if you can kindly reply to it.

bargavj commented 4 years ago

Hi,

The code now only performs per-instance clipping. We no longer do batch-clipping as it does not provide any useful model utility. However, you can still make the code do batch-clipping by varying the num_microbatches in https://github.com/bargavj/EvaluatingDPML/blob/92137df443fb469dae99604047ac862ff49b7440/classifier.py#L67. For instance, you can set num_microbatches = 1.

HongshengHu commented 4 years ago

Hi,

The code now only performs per-instance clipping. We no longer do batch-clipping as it does not provide any useful model utility. However, you can still make the code do batch-clipping by varying the num_microbatches in

https://github.com/bargavj/EvaluatingDPML/blob/92137df443fb469dae99604047ac862ff49b7440/classifier.py#L67

. For instance, you can set num_microbatches = 1.

Thanks for your reply.