Some questions about (ϵ,δ)-differential privacy guarantee

liuwenshuang0211: <p>Hi all.<br>
I apply the opacus package to Unet training, I don`t know how to judge the privacy guarantee level of Unet. Is it related to the output of ϵ? Does ϵ less than a certain value mean that privacy guarantee is good.</p>
<p>However, ϵ keeps increasing during the training process. Does this mean that the longer the training time, the lower the privacy protection level?</p>
<p>Sincerely looking forward to receiving your reply.</p>

ffuuugor: <p>Hi <a class="mention" href="/u/liuwenshuang0211">@liuwenshuang0211</a>.<br>
First of all, thanks for trying out opacus, we do appreciate it.</p>
<p>To better understand the concept of (ε,𝛿) - differential privacy, I suggest starting with FAQ section on our website, we have a paragraph on that: <a href="https://opacus.ai/docs/faq#what-does-epsilon11-really-mean-how-about-delta" class="inline-onebox" rel="noopener nofollow ugc">FAQ · Opacus</a></p>
<p>tl;dr - Epsilon defines the multiplicative difference between two output distributions based on two datasets, which differ in a single example. In other words, epsilon is a measure of how much difference a single example can make under the worst possible circumstances.<br>
Delta, in turn, defines the probability of failure, in which we don’t uphold privacy guarantee defined by epsilon.</p>
<p>Now, the question about threshold values for “good privacy guarantee” is tricky and hard.<br>
For delta you typically want it to be orders of magnitude less than 1/N, where N is the number of entries in your dataset. Otherwise you don’t protect against full release of one entry.</p>
<p>For epsilon, the answer is “it depends”.<br>
I’d suggest to look at papers to see what’s considered reasonable for your task.<br>
For example, on MNIST we’re able to get acceptable results with ε=1.19 and good results with ε=7.<br>
In another example, paper “Tempered Sigmoid Activations for<br>
Deep Learning with Differential Privacy” by Papernot et al uses ε=3 for MNIST and ε=7 for CIFAR10.</p>
<p>There’re also some evidence, that epsilon values reported by DP-SGD are on a very pessimistic end, and the observed privacy is much better (roughly shrinks epsilon by a factor of 10)</p>
<p>To summarise this part, you’d want to set your 𝛿 &lt;&lt; 1/N, and to have your ε in single digits (but it depends)</p>
<p>As for the training process, the short answer is yes - the more training iterations you perform, the weaker privacy guarantee is. Bear in mind, however, that the relation is sub-linear.<br>
For more math behind it I would suggest looking into the original DP-SGD paper (<a href="https://arxiv.org/pdf/1607.00133.pdf" rel="noopener nofollow ugc">https://arxiv.org/pdf/1607.00133.pdf</a>), specifically section 3.1 Differentially Private SGD Algorithm, subsection “Privacy Accounting”</p>

Darktex: <p>About losing privacy the longer you train, maybe an example can help internalize this concept.</p>
<p>Let’s leave ML aside for now and let’s just imagine we are building something like Google Maps’s feature that tells you <a href="https://wonderoftech.com/google-maps-live-visit-data/#:~:text=To%20see%20how%20busy%20a%20place%20is%20right%20now%20on,a%20place%20is%20right%20now." rel="noopener nofollow ugc">how busy</a> a store is depending on the time of day. To make this privacy-safe, you can use differential privacy and instead of submitting the actual position of a user down to the right centimeter, you instead add some noise and randomize each user’s position within a 3 meter radius. This will not alter your aggregate significantly because if you have many users, you’ll still be able to count correctly as the noise will tend to cancel out over many many users.</p>
<p>Now the problem is that the noise will <em>also</em> cancel out if we keep on asking for your position over and over. This is what happens with DP-SGD too the longer you keep training <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>

touqir: <p>The fact that the more times you release differentially private estimates, the larger the accumulated privacy loss becomes is a common phenomenon in Differential Privacy and is generally attributed due to a very useful property in the differential privacy literature known as composition. Many of the well known differentially private algorithms rely on various composition theorems to actually limit the accumulated privacy loss. If you are interested, you can take a look at this paper : <a href="http://proceedings.mlr.press/v37/kairouz15.pdf" rel="noopener nofollow ugc">http://proceedings.mlr.press/v37/kairouz15.pdf</a> for more information on composition theorems.</p>