In this article, we introduce differential privacy, starting with with a story of information leakage.
Twin Drive or Not
Celestial Being is a private military organization known for its cutting-edge technology. Among its four advanced machines, the most powerful one is Gundam 00.
The Gundam 00 is about to engage the enemy.
Under ideal conditions, Gundam 00 is equipped with two engines, known as the twin drive system. However, due to maintenance, this is not always the case. At the moment of deployment:
- With probability 0.5, Gundam 00 has both drives.
- With probability 0.5, it has one drive.
We describe the drive configuration as follows:
- Twin drive: ()
- Single drive: (or )
Let be a random variable representing the drive status. Then,
Raiser Sword
The Raiser Sword is one of Gundam 00's most powerful weapon. Its energy level depends heavily on the machine's drive configuration.
Let be the random variable that denotes the energy level of the Raiser Sword. The distribution, written as , depends on the drive status:
- : energy level given twin drive
- : energy level given single drive
Specifically,
where denotes a binomial distribution. What matters most is the takeaway:
- With the twin drive, the expected energy level is .
- With a single drive, it drops dramatically to .
This dramatic gap is known as the "squaring" phenomenon of the twin drive---the combined system is far more powerful than the sum of its parts.
Now suppose that you're the enemy pilot, flying a mobile suit with just average performance.
Before you even see Gundam 00, it launches a long-range Raiser Sword attack. Against the odds, you survive.
You must now make a critical decision.
- If Gundam 00 is equipped with the twin drive, you stand no chance in close combat. Retreat is the only rational option.
- If it is running on a single drive, you actually outperform it---and engaging could lead to victory.
Having survived the Raiser Sword strike, you now have one crucial piece of information: the observed energy level, denoted by . This single number already tells you something about Gundam 00’s drive system. To turn that intuition into a concrete belief, you use Bayes’ theorem, which updates prior uncertainty using new evidence.
Substituting with , we get
The distributions and are plotted together below.

Immediately, you can draw some conclusions based on single value of , such as
- If , it is likely 00 has only one drive.
- If , it is likely 00 has twin drive.
Or you can conclude based on the range of , such as
- If , it is likely 00 has single drive.
- If , it is likely 00 has twin drive.
Before the observation of , as , you have only random guess over the engine status of 00. After the observation, you might be much more confident about your guess, even though the energy level of the raiser sword is a random variable.
Why does this happen? Because the two distributions are well-separated. They are far from each other. Further, the prior probabilities and play important roles. If you know , even if you observe an energy level of , you had better not engage Gundam 00. You know it could be just a trap!
Differential Privacy
Database managers face similar scenarios in privacy protection. We know define the setting for differential privacy. We view a dataset as a table of rows, each of which comes from a domain . Hence . Instead of releasing the dataset directly, the manager runs a randomized algorithm on , and outputs . Here is called the co-domain of and does not necessarily equal to . Note that the output distribution of may depend on the input . Further, for simplicity of discussion, we believe a uniform prior distribution over datasets in .
In the Gundam 00's story, , and .
Suppose there is another dataset that differs only one row from . The algorithm is said to be differentially private if a malicious user is unlikely to distinguish the input to between and , by merely observing 's output. Simply put, the conditional distributions of and should be similar, where is a variable that denotes the input dataset.
We observe in the previous section that, if the distributions are well separated, then we can infer the underlying input with high confidence when the output value takes specific values or lies in certain ranges.
There are many ways to characterize the closeness of two distributions. We introduce the one proposed in [1].
Algorithm is called differentially private, if for any pair of neighboring datasets and (the ones that differ in only one row), and for any (measurable) subset , it holds that
In other words, we can't find a subset , with which we can distinguish and with high confidence. In the previous example, such exists. E.g., . If lies in , we can infer that Gundam 00 is likely to have twin drive.
Hypothesis Testing
There is alternative view of differential privacy as hypothesis testing. Suppose that we know the underlying dataset is either or with equal probability. After observing the output of , we need to decide which hypothesis of the following holds:
Assume that we adopt a fixed strategy:
- First we choose a fixed subset ,
- If , we choose to accept ,
- Otherwise, we accept .
There are two kinds of errors we can make. The type I error is the one when the true hypothesis is and we accept . Conversely, type II error is the one when the true hypothesis is and we accept . Let and be the probabilities we make type I and II errors respectively. The following theorem holds
Algorithm A is differentially private then
Proof. By definition,
As is differentially private, it holds that
and
therefore,
By symmetry, we also have
Reference
[1] C. Dwork and A. Roth, “The Algorithmic Foundations of Differential Privacy,” Foundations and Trends in Theoretical Computer Science, vol. 9, no. 3–4, pp. 211–407, 2013
[2] L. Wasserman and S. Zhou, “A statistical framework for differential privacy,” arXiv:0811.2501 [math, stat], Oct. 2009, Accessed: Oct. 27, 2020.