Jinshuo's Blog

How Private Are Private Algorithms?


The post is a 10 min read and only assumes knowledge about the definition of differential privacy.

We study the question in the title in the context of differential privacy, the most successful quantitative measure of privacy to date. But there are still many versions: , Renyi, concentrated and truncated concentrated… Which one should we use? Maybe it’s time to take a step back and see what is shared by these notions.

A good approach to providing rigorous security/privacy guarantee is by reasoning about the potential adversary:

  1. What is his goal?
  2. How would he achieve it?
  3. How can we design algorithms so that he can’t do that?

Differential privacy (DP) can be thought of in these terms, with the following attack in mind: the adversary is given the (randomized) algorithm and its output , and attempts to infer whether the input database is or . This is often called “differential attack” because his goal is to differentiate two cases.

Next question: how would he achieve differential attack? A valuable feature of DP is that it provides worst case guarantees. So we would like to think about the most powerful adversary. It turns out the most powerful algorithm to identify the input is based on a popular notion in the DP community: privacy loss.

Algorithm 1: Most Powerful Differential Attack

  1. Observe outcome
  2. Compute privacy loss
  3. If then decide it’s . Otherwise decide it’s .

If you can convince yourself that this is the best thing for the adversary to do, congratulations! You have rediscovered the Neyman–Pearson lemma.

So the second question was answered 87 years ago by the founding fathers of statistics, but what we really care about is limiting the “differential power” of the adversary. In other words, we want him to make errors. The two types of errors (mistaking as , and as ) are often called type I and type II errors respectively. It’s often safe to ignore which is which in DP since and are considered symmetric. When the threshold in the above algorithm moves from to , type I error decreases from 1 to 0 and type II error increases from 0 to 1. This yields a curve (see Figure 1) that encodes all possible behaviors of the most powerful adversary. “Differential power” would simply mean how close this curve is to the axes. Alternatively, if we consider it as a function that maps from to , differential power refers to how small this function is. Because of its central importance, we will give it a name as it is determined by the distributions of the possible outcomes and .

A bound on differential power means guaranteed error for the adversary. To provide worst case guarantees for all possible inputs, we should consider the strongest differential power against all neighboring databases, i.e. the pointwise infimum of .

Definition Differential power against a private algorithm is defined to be

At this point you may say:

Wait… I don’t recognize this sh*t… Aren’t you going too far away from differential privacy?

No, not at all.

Theorem [Wasserman-Zhou ‘10, Kairouz et al ‘15] A randomized algorithm is -DP if and only if the following holds pointwise in

where is defined as in the figure.

It is helpful to consider the most private mechanism that ignores the input and always outputs a certain distribution. Among all mechanisms, the adversary has the least differential power working against this one — he can do no better than random guessing, which corresponds to the line type I error type II error . In other words, . Of course, the graph (dashed line) is above that of .

One lesson that I learned from mathematicians is, when someone tells you an inequality (for example ) and you want to act like you care, ask the following

When does equality hold?

It happens to be the question in the title! That’s because, to see if equality holds, we need to know exactly, which is a precise description of how private the algorithm is.

With the above thinking, we can start to answer the question in the title, for some “building block” private algorithms in particular. For each of them, is the true differential power equal to the design goal ? If not, how different are they?

Randomized Response: Equality Holds Exactly

In randomized response, each individual holds one bit of sensitive information and reports the true value with probability and its negation with probability . The randomization procedure has the property that . When is close to 1, with high probability. When , and have exactly the same distribution. The easiest case for the adversary is when two bits are different, i.e.

It is well-known that is -DP if . When we run Algorithm 1 (aka the likelihood ratio test) for the adversary, we can plot the differential power as the blue line. We see , i.e. equality holds exactly.

Laplace Mechanism: Equality Almost Holds

Let be a function that maps a database to a real number. Laplace mechanism adds Laplace noise to . Assuming has sensitivity 1, it is well-known that Laplace mechanism satisfies -DP if .

From the adversary’s perspective, he has to differentiate two shifted Laplace distributions. The easiest case occurs when and differ by 1. That is, the differential power against the Laplace mechanism is

The likelihood ratio test for two shifted Laplace distributions is also easy. It turns out that in this case mostly agrees with except in the interval . In that interval it is a reciprocal function . In summary, equality almost holds.

Gaussian Mechanism: Not Even Close!

For a numerical query , the Gaussian mechanism returns . It was known that if then the Gaussian mechanism is -DP. Better formulas exist but the improvement is hardly noticeable in our context.

Similar to the Laplace mechanism, we have For two pairs of , namely and , we use the formula above to determine the corresponding and plot both the design goal (dashed red) and the true differential power (blue). The dashed black line corresponds to perfect privacy. We see the red and blue curves are far from equal in both cases.

We proceed to examine

Composition of Building Block Algorithms

General principles of composition in DP include:

  1. Composition models iterative private algorithms;
  2. In terms of differential power, compostion corresponds to product distributions.

We will illustrate the two principles using randomized response as an example.

Composition of Randomized Response

Suppose each individual holds sensitive bits, say . Each can be randomized independently. The mechanism output is a product distribution. For example, assuming each bit is randomized with the same probability, then . Obviously, the adversary has the most differential power when two individuals have exactly opposite bit vectors. With a bit more argument one can show that the pair is as hard as other opposite bit vectors. That is, when is a composition of randomized response, the differential power satisfies

Likelihood ratio test for Bernoulli products is also not hard. The resulting is a piecewise linear function as the left panel shows. On the right panel we compare two mechanisms: the blue solid line corresponds to the 25-fold composition of randomized response, each being -DP with , and the red dashed line corresponds to the Gaussian mechanism with for a query with sensitivity 1.

Clearly, something is going on here, but how general is it?

Composition of Laplace Mechanisms

Applying the two principles, when is a composition of Laplace mechanisms, we have

This time likelihood ratio test is a bit tricky to do, but with some numerical techniques we can still do it. In the following figure, the left panel shows for , while the right panel shows and compares it again with the Gaussian mechanism with for a query with sensitivity 1.

Composition of Gaussian Mechanisms

Similar to Laplace case above, we have In other words, composition of Gaussian mechanisms is reduced to testing two shifted spherical Gaussians. It is equivalent to testing shifted one-dimensional Gaussians, because a rotation can align the shifted direction to the -axis, and the remaining components are not informative. So

Showing two identical curves is boring, but we still include the figure for completeness.

Observing these figures, we should be fairly confident that

  1. There must exist a general central limit theorem, and
  2. As the limit of the CLT, the differential power of 1-dim Gaussian mechanisms is something universal.

This is the origin of our paper Gaussian Differential Privacy and the deep learning follow-up. The universal object here is a single parameter family of functions

The definition of Gaussian differential privacy (GDP) parallels that of -DP, replacing with the universal object :

Definition A randomized algorithm is said to be -GDP if the following holds pointwise in :

GDP algorithms have a nice interpretation: Determining whether an individual’s data was used in a computation is harder than telling apart two shifted Gaussians. In addition to that, we have developed a complete toolkit for it, including theorems for group privacy, privacy amplification by subsampling and composition. More importantly, we also show the general CLT, which explains why all of the above compositions look like one-dimensional Gaussian mechanisms.

In addition to that, because 1. composition models iterative algorithms, and 2. SGD is iterative, we can apply our CLT to the most important algorithm in modern machine learning — its private version also looks like a Gaussian mechanism!

Take-away

You probably already have your own ideas, but in case that I failed to keep your attention (after all, this is my very first blog post), here is a list for your convenience:

  1. Hypothesis testing is not statisticians’ perspective of DP. IT IS DP;
  2. Iterative private algorithms look like 1-dim Gaussian mechanisms;
  3. -DP does not tightly describe Gaussian mechanisms, nor any iterative algorithm.

This post is based on a talk I gave at the PriML workshop at NeurIPS 2019. Video recording can be found here, starting at 55:00. A more technical talk can be found here at Simons Institute.

15 Jan 2020