Exponential mechanism (differential privacy)
The exponential mechanism is a technique for designing differentially private algorithms. It was developed by Frank McSherry[1] and Kunal Talwar[2] in 2007. Their work was recognized as a co-winner of the 2009 PET Award for Outstanding Research in Privacy Enhancing Technologies.[3]
Most of the initial research in the field of differential privacy revolved around real-valued functions which have relatively low sensitivity to change in the data of a single individual and whose usefulness is not hampered by small additive perturbations. A natural question is what happens in the situation when one wants to preserve more general sets of properties. The exponential mechanism helps to extend the notion of differential privacy to address these issues. Moreover, it describes a class of mechanisms that includes all possible differentially private mechanisms.
The exponential mechanism [4]
Algorithm
In very generic terms, a privacy mechanism maps a set of [math]\displaystyle{ n\,\! }[/math] inputs from domain [math]\displaystyle{ \mathcal{D}\,\! }[/math] to a range [math]\displaystyle{ \mathcal{R}\,\! }[/math]. The map may be randomized, in which case each element of the domain [math]\displaystyle{ \mathcal{D}\,\! }[/math] corresponds to a probability distribution over the range [math]\displaystyle{ \mathcal{R}\,\! }[/math]. The privacy mechanism makes no assumption about the nature of [math]\displaystyle{ \mathcal{D}\,\! }[/math] and [math]\displaystyle{ \mathcal{R}\,\! }[/math] apart from a base measure [math]\displaystyle{ \mu\,\! }[/math] on [math]\displaystyle{ \mathcal{R}\,\! }[/math]. Let us define a function [math]\displaystyle{ q:\mathcal{D}^n\times\mathcal{R}\rightarrow\mathbb{R}\,\! }[/math]. Intuitively this function assigns a score to the pair [math]\displaystyle{ (d,r)\,\! }[/math], where [math]\displaystyle{ d\in\mathcal{D}^n\,\! }[/math] and [math]\displaystyle{ r\in\mathcal{R}\,\! }[/math]. The score reflects the appeal of the pair [math]\displaystyle{ (d,r)\,\! }[/math], i.e. the higher the score, the more appealing the pair is.
Given the input [math]\displaystyle{ d\in\mathcal{D}^n\,\! }[/math], the mechanism's objective is to return an [math]\displaystyle{ r\in\mathcal{R}\,\! }[/math] such that the function [math]\displaystyle{ q(d,r)\,\! }[/math] is approximately maximized. To achieve this, set up the mechanism [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d)\,\! }[/math] as follows:
Definition: For any function [math]\displaystyle{ q:(\mathcal{D}^n\times\mathcal{R})\rightarrow\mathbb{R}\,\! }[/math], and a base measure [math]\displaystyle{ \mu\,\! }[/math] over [math]\displaystyle{ \mathcal{R}\,\! }[/math], define:
- [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d):=\,\! }[/math] Choose [math]\displaystyle{ r\,\! }[/math] with probability proportional to [math]\displaystyle{ e^{\varepsilon q(d,r)}\times\mu(r)\,\! }[/math], where [math]\displaystyle{ d\in\mathcal{D}^n,r\in \mathcal{R}\,\! }[/math].
This definition implies the fact that the probability of returning an [math]\displaystyle{ r\,\! }[/math] increases exponentially with the increase in the value of [math]\displaystyle{ q(d,r)\,\! }[/math]. Ignoring the base measure [math]\displaystyle{ \mu\,\! }[/math] then the value [math]\displaystyle{ r\,\! }[/math] which maximizes [math]\displaystyle{ q(d,r)\,\! }[/math] has the highest probability. Moreover, this mechanism is differentially private. Proof of this claim will follow. One technicality that should be kept in mind is that in order to properly define [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d)\,\! }[/math] the [math]\displaystyle{ \int_r e^{\varepsilon q(d,r)}\times\mu(r)\,\! }[/math] should be finite.
Theorem (differential privacy): [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d)\,\! }[/math] gives [math]\displaystyle{ (2\varepsilon\Delta q)\,\! }[/math]-differential privacy.
Proof: The probability density of [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d)\,\! }[/math] at [math]\displaystyle{ r\,\! }[/math] equals
- [math]\displaystyle{ \frac{e^{\varepsilon q(d,r)}\mu(r)}{\int e^{\varepsilon q(d,r)} \mu(r) \, dr}.\,\! }[/math]
Now, if a single change in [math]\displaystyle{ d\,\! }[/math] changes [math]\displaystyle{ q\,\! }[/math] by at most [math]\displaystyle{ \Delta q\,\! }[/math] then the numerator can change at most by a factor of [math]\displaystyle{ e^{\varepsilon\Delta q}\,\! }[/math] and the denominator minimum by a factor of [math]\displaystyle{ e^{-\varepsilon\Delta q}\,\! }[/math]. Thus, the ratio of the new probability density (i.e. with new [math]\displaystyle{ d\,\! }[/math]) and the earlier one is at most [math]\displaystyle{ \exp(2\varepsilon\Delta q)\,\! }[/math].
Accuracy
We would ideally want the random draws of [math]\displaystyle{ r\,\! }[/math] from the mechanism [math]\displaystyle{ \mathcal{E}_q^\varepsilon(d)\,\! }[/math] to nearly maximize [math]\displaystyle{ q(d,r)\,\! }[/math]. If we consider [math]\displaystyle{ \max_rq(d,r)\,\! }[/math] to be [math]\displaystyle{ OPT\,\! }[/math] then we can show that the probability of the mechanism deviating from [math]\displaystyle{ OPT\,\! }[/math] is low, as long as there is a sufficient mass (in terms of [math]\displaystyle{ \mu }[/math]) of values [math]\displaystyle{ r\,\! }[/math] with value [math]\displaystyle{ q\,\! }[/math] close to the optimum.
Lemma: Let [math]\displaystyle{ S_{t}=\{r:q(d,r)\gt OPT-t\}\,\! }[/math] and [math]\displaystyle{ \bar{S}_{2t}=\{r:q(d,r)\leq OPT-2t\}\,\! }[/math], we have [math]\displaystyle{ p(\bar{S}_{2t})\,\! }[/math] is at most [math]\displaystyle{ \exp(-\varepsilon t)/\mu(S_{t})\,\! }[/math]. The probability is taken over [math]\displaystyle{ \mathcal{R}\,\! }[/math].
Proof: The probability [math]\displaystyle{ p(\bar{S}_{2t})\,\! }[/math] is at most [math]\displaystyle{ p(\bar{S}_{2t})/p(S_t)\,\! }[/math], as the denominator can be at most one. Since both the probabilities have the same normalizing term so,
- [math]\displaystyle{ \frac{p(\bar{S}_{2t})}{p(S_t)} = \frac{\int_{\bar{S}_{2t}}\exp(\varepsilon q(d,r))\mu(r) \, dr}{\int_{S_t} \exp(\varepsilon q(d,r))\mu(r) \, dr} \leq \exp(-\varepsilon t) \frac{\mu(\bar{S}_{2t})}{\mu(S_t)}. }[/math]
The value of [math]\displaystyle{ \mu(\bar{S}_{2t})\,\! }[/math] is at most one, and so this bound implies the lemma statement.
Theorem (Accuracy): For those values of [math]\displaystyle{ t\geq \ln \left( \frac{OPT}{t\mu(S_t)} \right) / \varepsilon\,\! }[/math], we have [math]\displaystyle{ E[q(d,\mathcal{E}_q^\varepsilon(d))]\geq OPT-3t\,\! }[/math].
Proof: It follows from the previous lemma that the probability of the score being at least [math]\displaystyle{ OPT-2t\,\! }[/math] is [math]\displaystyle{ 1-\exp(-\varepsilon t)/\mu(S_{t})\,\! }[/math]. By hypothesis, [math]\displaystyle{ t\geq \ln\left(\frac{OPT}{t\mu(S_t)}\right)/\varepsilon\,\! }[/math]. Substituting the value of [math]\displaystyle{ t\,\! }[/math] we get this probability to be at least [math]\displaystyle{ 1-t/OPT\,\! }[/math]. Multiplying with [math]\displaystyle{ OPT-2t\,\! }[/math] yields the desired bound.
We can assume [math]\displaystyle{ \mu(A)\,\! }[/math] for [math]\displaystyle{ A\subseteq \mathcal{R}\,\! }[/math] to be less than or equal to one in all the computations, because we can always normalize with [math]\displaystyle{ \mu(\mathcal{R})\,\! }[/math] .
Example application of the exponential mechanism [5]
Before we get into the details of the example let us define some terms which we will be using extensively throughout our discussion.
Definition (global sensitivity): The global sensitivity of a query [math]\displaystyle{ Q\,\! }[/math] is its maximum difference when evaluated on two neighbouring datasets [math]\displaystyle{ D_1,D_2\in\mathcal{D}^n\,\! }[/math]:
- [math]\displaystyle{ GS_Q = \max_{D_1,D_2:d(D_1,D_2)=1}|(Q(D_1)-Q(D_2))|.\,\! }[/math]
Definition: A predicate query [math]\displaystyle{ Q_\varphi\,\! }[/math] for any predicate [math]\displaystyle{ \varphi\,\! }[/math] is defined to be
- [math]\displaystyle{ Q_{\varphi}=\frac{|\{x\in D:\varphi(x)\}|}{|D|}.\,\! }[/math]
Note that [math]\displaystyle{ GS_{Q_\varphi}\leq 1/n\,\! }[/math] for any predicate [math]\displaystyle{ \varphi\,\! }[/math].
Release mechanism
The following is due to Avrim Blum, Katrina Ligett and Aaron Roth.
Definition (Usefulness): A mechanism[yes|permanent dead link|dead link}}] [math]\displaystyle{ \mathcal{A}\,\! }[/math] is [math]\displaystyle{ (\alpha,\delta)\,\! }[/math]-useful for queries in class [math]\displaystyle{ H\,\! }[/math] with probability [math]\displaystyle{ 1-\delta\,\! }[/math], if [math]\displaystyle{ \forall h\in H\,\! }[/math] and every dataset [math]\displaystyle{ D\,\! }[/math], for [math]\displaystyle{ \widehat{D}=\mathcal{A}(D)\,\! }[/math], [math]\displaystyle{ |Q_h(\widehat{D})-Q_h(D)|\leq \alpha\,\! }[/math].
Informally, it means that with high probability the query [math]\displaystyle{ Q_{h}\,\! }[/math] will behave in a similar way on the original dataset [math]\displaystyle{ D\,\! }[/math] and on the synthetic dataset [math]\displaystyle{ \widehat{D}\,\! }[/math].
Consider a common problem in Data Mining. Assume there is a database [math]\displaystyle{ D\,\! }[/math] with [math]\displaystyle{ n\,\! }[/math] entries. Each entry consist of [math]\displaystyle{ k\,\! }[/math]-tuples of the form [math]\displaystyle{ (x_1,x_2,\dots,x_k)\,\! }[/math] where [math]\displaystyle{ x_{i}\in\{0,1\}\,\! }[/math]. Now, a user wants to learn a linear halfspace of the form [math]\displaystyle{ \pi_1 x_1 + \pi_2 x_2+\cdots+\pi_{k-1}x_{k-1}\geq x_{k}\,\! }[/math]. In essence the user wants to figure out the values of [math]\displaystyle{ \pi_1,\pi_2,\dots,\pi_{k-1}\,\! }[/math] such that maximum number of tuples in the database satisfy the inequality. The algorithm we describe below can generate a synthetic database [math]\displaystyle{ \widehat{D}\,\! }[/math] which will allow the user to learn (approximately) the same linear half-space while querying on this synthetic database. The motivation for such an algorithm being that the new database will be generated in a differentially private manner and thus assure privacy to the individual records in the database [math]\displaystyle{ D\,\! }[/math].
In this section we show that it is possible to release a dataset which is useful for concepts from a polynomial VC-Dimension class and at the same time adhere to [math]\displaystyle{ \varepsilon\,\! }[/math]-differential privacy as long as the size of the original dataset is at least polynomial on the VC-Dimension of the concept class. To state formally:
Theorem: For any class of functions [math]\displaystyle{ H\,\! }[/math] and any dataset [math]\displaystyle{ D\subset \{0,1\}^k\,\! }[/math] such that
- [math]\displaystyle{ |D|\geq O\left(\frac{k\cdot \operatorname{VCDim}(H)\log(1/\alpha)}{\alpha^3\varepsilon}+\frac{\log(1/\delta)}{\alpha\varepsilon}\right)\,\! }[/math]
we can output an [math]\displaystyle{ (\alpha,\delta)\,\! }[/math]-useful dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] that preserves [math]\displaystyle{ \varepsilon\,\! }[/math]-differential privacy. As we had mentioned earlier the algorithm need not be efficient.
One interesting fact is that the algorithm which we are going to develop generates a synthetic dataset whose size is independent of the original dataset; in fact, it only depends on the VC-dimension of the concept class and the parameter [math]\displaystyle{ \alpha\,\! }[/math]. The algorithm outputs a dataset of size [math]\displaystyle{ \tilde{O}(\operatorname{VCDim}(H)/\alpha^2)\,\! }[/math]
We borrow the Uniform Convergence Theorem from combinatorics and state a corollary of it which aligns to our need.
Lemma: Given any dataset [math]\displaystyle{ D\,\! }[/math] there exists a dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] of size [math]\displaystyle{ =O(\operatorname{VCDim}(H)\log(1/\alpha))/\alpha^2\,\! }[/math] such that [math]\displaystyle{ \max_{h\in H}|Q_{h}(D)-Q_{h}(\widehat{D})|\leq \alpha/2\,\! }[/math].
Proof:
We know from the uniform convergence theorem that
- [math]\displaystyle{ \begin{align} & \Pr\left[ \, \left|Q_h(D)-Q_h(\widehat{D})\right| \geq \frac \alpha 2 \text{ for some } h\in H \right] \\[5pt] \leq {} & 2 \left( \frac{em}{\operatorname{VCDim}(H)} \right)^{\operatorname{VCDim}(H)} \cdot e^{-\alpha^2 m/8}, \end{align} }[/math]
where probability is over the distribution of the dataset. Thus, if the RHS is less than one then we know for sure that the data set [math]\displaystyle{ \widehat{D}\,\! }[/math] exists. To bound the RHS to less than one we need [math]\displaystyle{ m\geq\lambda(\operatorname{VCDim}(H)\log(m/\operatorname{VCDim}(H))/\alpha^2)\,\! }[/math], where [math]\displaystyle{ \lambda\,\! }[/math] is some positive constant. Since we stated earlier that we will output a dataset of size [math]\displaystyle{ \tilde{O}(\operatorname{VCDim}(H)/\alpha^2)\,\! }[/math], so using this bound on [math]\displaystyle{ m\,\! }[/math] we get [math]\displaystyle{ m\geq\lambda(\operatorname{VCDim}(H) \log( 1/\alpha) / \alpha^2) \,\! }[/math]. Hence the lemma.
Now we invoke the exponential mechanism.
Definition: For any function [math]\displaystyle{ q:((\{0,1\}^k)^n \times(\{0,1\}^k)^m) \rightarrow \mathbb{R}\,\! }[/math] and input dataset [math]\displaystyle{ D\,\! }[/math], the exponential mechanism outputs each dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] with probability proportional to [math]\displaystyle{ e^{q(D,\widehat{D})\varepsilon n/2}\,\! }[/math].
From the exponential mechanism we know this preserves [math]\displaystyle{ (\varepsilon nGS_q)\,\! }[/math]-differential privacy. Let's get back to the proof of the Theorem.
We define [math]\displaystyle{ (q(D),q(\widehat{D}))=-\max_{h\in H}|Q_h(D)-Q_h(\widehat{D})|\,\! }[/math].
To show that the mechanism satisfies the [math]\displaystyle{ (\alpha,\delta)\,\! }[/math]-usefulness, we should show that it outputs some dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] with [math]\displaystyle{ q(D,\widehat{D})\geq -\alpha\,\! }[/math] with probability [math]\displaystyle{ 1-\delta\,\! }[/math]. There are at most [math]\displaystyle{ 2^{km}\,\! }[/math] output datasets and the probability that [math]\displaystyle{ q(D,\widehat{D})\leq -\alpha\,\! }[/math] is at most proportional to [math]\displaystyle{ e^{-\varepsilon\alpha n/2}\,\! }[/math]. Thus by union bound, the probability of outputting any such dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] is at most proportional to [math]\displaystyle{ 2^{km}e^{-\varepsilon\alpha n/2}\,\! }[/math]. Again, we know that there exists some dataset [math]\displaystyle{ \widehat{D}\in(\{0,1\}^k)^m\,\! }[/math] for which [math]\displaystyle{ q(D,\widehat{D})\geq -\alpha/2\,\! }[/math]. Therefore, such a dataset is output with probability at least proportional to [math]\displaystyle{ e^{-\alpha\varepsilon n/4}\,\! }[/math].
Let [math]\displaystyle{ A:=\,\! }[/math] the event that the exponential mechanism outputs some dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] such that [math]\displaystyle{ q(D,\widehat{D})\geq-\alpha/2\,\! }[/math].
[math]\displaystyle{ B:=\,\! }[/math] the event that the exponential mechanism outputs some dataset [math]\displaystyle{ \widehat{D}\,\! }[/math] such that [math]\displaystyle{ q(D,\widehat{D})\leq-\alpha\,\! }[/math].
- [math]\displaystyle{ \therefore \frac{\Pr[A]}{\Pr[B]}\geq \frac{e^{-\alpha\varepsilon n/4}}{2^{km}e^{-\alpha\varepsilon n/2}}=\frac{e^{\alpha\varepsilon n/4}}{2^{km}}.\,\! }[/math]
Now setting this quantity to be at least [math]\displaystyle{ 1/\delta\geq(1-\delta)/\delta\,\! }[/math], we find that it suffices to have
- [math]\displaystyle{ n\geq\frac 4 {\varepsilon\alpha}\left(km+\ln\frac 1 \delta \right)\geq O\left(\frac{d\cdot \operatorname{VCDim}(H)\log(1/\alpha)}{\alpha^3\varepsilon}+\frac{\log(1/\delta)}{\alpha\varepsilon}\right).\,\! }[/math]
And hence we prove the theorem.
The exponential mechanism in other domains
In the above example of the usage of exponential mechanism, one can output a synthetic dataset in a differentially private manner and can use the dataset to answer queries with good accuracy. Other private mechanisms, such as posterior sampling,[6] which returns parameters rather than datasets, can be made equivalent to the exponential one.[7]
Apart from the setting of privacy, the exponential mechanism has also been studied in the context of auction theory and classification algorithms.[8] In the case of auctions the exponential mechanism helps to achieve a truthful auction setting.
References
- ↑ Frank McSherry
- ↑ Kunal Talwar
- ↑ "Past Winners of the PET Award". https://www.petsymposium.org/award/winners.php.
- ↑ F.McSherry and K.Talwar. Mechanism Design via Differential Privacy. Proceedings of the 48th Annual Symposium of Foundations of Computer Science, 2007.
- ↑ Avrim Blum,Katrina Ligett,Aaron Roth. A Learning Theory Approach to Non-Iteractive Database Privacy.In Proceedings of the 40th annual ACM symposium on Theory of computing, 2008
- ↑ Christos Dimitrakakis, Blaine Nelson, Aikaterini Mitrokotsa, Benjamin Rubinstein. Robust and Private Bayesian Inference. Algorithmic Learning Theory 2014
- ↑ Yu-Xiang Wang, Stephen E. Fienberg, Alex Smola Privacy for Free: Posterior Sampling and Stochastic Gradient Monte Carlo. International Conference on Machine Learning, 2015.
- ↑ Shiva Prasad Kasiviswanathan, Homin K. Lee, Kobbi Nissim, Sofya Raskhodnikova, Adam Smith. What Can We Learn Privately? Proceedings of the 2008 49th Annual IEEE Symposium on Foundations of Computer Science. arXiv:0803.0924
External links
- The Algorithmic Foundations of Differential Privacy by Cynthia Dwork and Aaron Roth, 2014.