Let U={x1,x2,...,xn}⊂XnU = \{x_1, x_2, ... , x_n \} \subset \mathcal{X}^n be a set of nn points from a domain X\mathcal{X} and Q={f1,f2,...∣fi:X→[0,1]}Q = \{ f_1, f_2, ... \mid f_i : \mathcal{X} \rightarrow [0, 1] \} be a finite set of queries (functions). For any f∈Qf \in Q and finite set SS with domain X\mathcal{X}, define

f(S)≐1∣S∣∑x∈Sf(x) f(S) \doteq \frac{1}{ |S| }\sum_{x \in S} f(x)

as the average over the values {f(x):x∈S}\{ f(x) : x \in S \}. Our goal is to find a subset SS with size

O(log⁡∣Q∣λ2) O( \frac{\log |Q| }{\lambda^2})

in a (2ϵ,0)(2 \epsilon, 0) differentially private manner, such that with probability at least 1−δ1 - \delta, it holds simultaneously ∀f∈Q\forall f \in Q,

∣f(S)−f(U)∣≤λ+log⁡∣Q∣log⁡∣X∣λ2ϵn+log⁡(1/δ)ϵn |f(S) - f(U) | \le \lambda + \frac{\frac{ }{} \log |Q| \log |\mathcal{X}| } { \lambda^2 \epsilon n } + \frac{ \log (1 / \delta) }{ \epsilon n }

Existence of Small Representative

Let XX be a random element sampled uniformly from UU. Then for a fixed f∈Qf \in Q,

E[f(X)]=f(U) \mathbb{E}[ f(X) ] = f(U)

By Hoeffding, if we take m=ln⁡∣Q∣λ2m = \frac{\ln |Q|}{\lambda^2} independent copies of XX, denoted as X1,X2,...,XmX_1, X_2, ..., X_m, then

Pr⁡[∣1m∑i∈[m]Xi−f(U)∣≥λ]≤2exp⁡(−2mλ2)=2e2ln⁡∣Q∣=2∣Q∣2<1∣Q∣. \Pr[ |\frac{1}{m} \sum_{i \in [m]} X_i - f(U) | \ge \lambda ] \le 2 \exp(- 2m \lambda^2 ) = \frac{2}{e^{2 \ln |Q|}} = \frac{2}{|Q|^2} < \frac{1}{ |Q| }.

By union bound, this happens for some f∈Qf \in Q with probability less than 1. Therefore, if we enumerate over all sets S⊂XmS \subset \mathcal{X}^m (which takes exponential time), then it is guaranteed that we can find one such that

∣f(S)−f(U)∣≤λ. |f(S) - f(U) | \le \lambda.

This is tighter than the bound we would like to prove. The additional error is due to the privacy protection mechanism.

Release Representative Differential-Privately

We can just release the SS blatantly.

Counter Example

Suppose X={0,1}\mathcal{X} = \{0, 1\}, and U={0,0,...,0}⊂XnU = \{0, 0, ..., 0\} \subset \mathcal{X}^n. Further, the set QQ contains two copies of the function ff, defined as

f(0)=0,f(1)=1. f(0) = 0, f(1) = 1.

Assume that λ=2ln⁡2n\lambda = \sqrt{\frac{ 2 \ln 2 }{ n } }. Then m=nln⁡22ln⁡2=n/2m = \frac{n \ln 2}{2 \ln 2} = n / 2. Any S⊂XmS \subset \mathcal{X}^m that contains no more than

⌊m2ln⁡2n⌋=⌊2ln⁡2nn2⌋=⌊nln⁡22⌋ \lfloor m \sqrt{\frac{ 2 \ln 2 }{ n } } \rfloor = \lfloor \sqrt{\frac{ 2 \ln 2 }{ n } } \frac{n}{2} \rfloor = \lfloor \sqrt{\frac{ n \ln 2 }{ 2 } } \rfloor

ones, will satisfies

∣f(S)−f(U)∣≤λ. |f(S) - f(U) | \le \lambda.

Now, consider a neighboring set U′={0,0,...,1}U' = \{0, 0, ..., 1\}, obtained by replacing the last zero with one in UU. Any SS with no more than ⌊nln⁡22+1⌋\lfloor \sqrt{\frac{ n \ln 2 }{ 2 } } + 1 \rfloor ones satisfies ∣f(S)−f(U′)∣≤λ|f(S) - f(U') | \le \lambda.

Consider the scenario where we know the underlying set is either UU or U′U'. If a set in Xm\mathcal{X}^m with exactly ⌊nln⁡22+1⌋\lfloor \sqrt{\frac{ n \ln 2 }{ 2 } } + 1 \rfloor is released as an representative of the underlying set, we can infer immediately that the underlying set is U′U'.

Exponential Mechanism

One remedy for the above problem is that, for a set S⊂XmS \subset \mathcal{X}^m, even if ∃f∈Q\exists f \in Q, s.t., ∣f(S)−f(U)∣>λ|f(S) - f(U)| > \lambda, we output SS as the representative of UU with some probability, because SS might be a feasible solution for UU's neighbors. This motivates the exponential mechanism. In particular,

  1. It outputs the S∈XmS \in \mathcal{X}^m that minimizes max⁡f∈Q∣f(S)−f(U)∣\max_{f \in Q} |f(S) - f(U)| with highest probability.
  2. It outputs other S∈XmS \in \mathcal{X}^m with probability exponentially and inversely proportional to its error max⁡f∈Q∣f(S)−f(U)∣\max_{f \in Q} | f(S) - f(U) |.

The mechanism, termed MM, is as follows.

  1. For S∈XmS \in \mathcal{X}^m, define weight w(U,S)≐exp⁡(−ϵnmax⁡f∈Q∣f(S)−f(U)∣)w(U, S) \doteq \exp(- \epsilon n \max_{f \in Q} | f(S) - f(U) | ).
  2. Sample and output an S∈XmS \in \mathcal{X}^m with probability
w(U,S)∑T∈Xmw(U,T) \frac{ w(U, S) }{ \sum_{T \in \mathcal{X}^m} w(U, T)}
Privacy

The mechanism MM is (2ϵ,0)(2\epsilon, 0) differentially private.

Proof. Let U′∈XnU' \in \mathcal{X}^n be obtained by replacing exactly one element in UU. For any T∈XmT \in \mathcal{X}^m, by definition,

max⁡f∈Q∣f(U)−f(T)∣−max⁡f∈Q∣f(T)−f(U′)∣≤max⁡f∈Q(∣f(U)−f(T)∣−∣f(T)−f(U′)∣)≤max⁡f∈Q(∣f(U)−f(T)+f(T)−f(U′)∣)≤max⁡f∈Q(∣f(U)−f(U′)∣)≤1/n \begin{aligned} \max_{f \in Q} |f(U) - f(T)| - \max_{f \in Q} |f(T) - f(U') | &\le \max_{f \in Q} \big( |f(U) - f(T)| - |f(T) - f(U') | \big) \\ &\le \max_{f \in Q} \big( |f(U) - f(T) + f(T) - f(U') | \big) \\ &\le \max_{f \in Q} \big( |f(U) - f(U') | \big) \\ &\le 1 / n \\ \end{aligned}

By symmetry, max⁡f∈Q∣f(U)−f(T)∣−max⁡f∈Q∣f(T)−f(U′)∣∈[−1/n,1/n]\max_{f \in Q} |f(U) - f(T)| - \max_{f \in Q} |f(T) - f(U') | \in [- 1 / n, 1 / n ] and

w(U,T)w(U′,T)∈[e−ϵ,eϵ] \frac{w(U, T)}{ w(U', T)} \in [e^{-\epsilon}, e^\epsilon]

For an S∈XmS \in \mathcal{X}^m, it holds that

Pr⁡[M(U)=S]Pr⁡[M(U′)=S]=w(U,S)w(U,S′)∑T∈Xmw(U′,T)∑T∈Xmw(U,T)≤eϵ⋅∑T∈Xmeϵ⋅w(U,T)∑T∈Xmw(U,T)=e2ϵ \begin{aligned} \frac{\Pr[M(U) = S]}{ \Pr[M(U') = S]} &= \frac{ w(U, S) }{ w(U, S') } \frac{ \sum_{T \in \mathcal{X}^m} w(U', T) }{ \sum_{T \in \mathcal{X}^m} w(U, T) } \\ &\le e^\epsilon \cdot \frac{ \sum_{T \in \mathcal{X}^m} e^\epsilon \cdot w(U, T) }{ \sum_{T \in \mathcal{X}^m} w(U, T) } \\ &= e^{2\epsilon} \end{aligned}
Error

For a set UU, although we might assign probabilities to bad S∈XmS \in \mathcal{X}^m, as long as the probability mass assigned is small, we are unlikely to get a bad representative.

Theorem. With probability at most δ\delta, MM returns an SS, such that

max⁡f∈Q∣f(S)−f(U)∣≥λ+mlog⁡∣X∣+log⁡(1/δ)ϵn \max_{f \in Q} | f(S) - f(U) | \ge \lambda + \frac{m \log |\mathcal{X}| + \log (1 / \delta) } {\epsilon n }

Proof. Let S∗∈XmS^* \in \mathcal{X}^m be the set that minimizes max⁡f∈Q∣f(S)−f(U)∣\max_{f \in Q} |f(S) - f(U)|.

For a S∈XmS \in \mathcal{X}^m, if max⁡f∈Q∣f(S)−f(U)∣≥λ+t\max_{f \in Q} |f(S) - f(U)| \ge \lambda + t for some t>0t > 0, then

Pr⁡[M(U)=S]=w(U,S)∑T∈Xmw(U,T)≤w(U,S)w(U,S∗)≤exp⁡(−ϵn(max⁡f∈Q∣f(S)−f(U)∣−max⁡f∈Q∣f(S∗)−f(U)∣))≤exp⁡(−ϵnt) \begin{aligned} \Pr[M(U) = S] &= \frac{ w(U, S) }{ \sum_{T \in \mathcal{X}^m} w(U, T)} \\ &\le \frac{ w(U, S) }{ w(U, S^*) } \\ &\le \exp( - \epsilon n (\max_{f \in Q} |f(S) - f(U)| - \max_{f \in Q} |f(S^*) - f(U)|)) \\ &\le \exp( - \epsilon n t) \end{aligned}

By union bound,

Pr⁡[M(U)∈{S:max⁡f∈Q∣f(S)−f(U)∣≥λ+t}]≤∣{S:max⁡f∈Q∣f(S)−f(U)∣≥λ+t}∣exp⁡(−ϵnt)≤∣X∣mexp⁡(−ϵnt) \begin{aligned} \Pr[ M(U) \in \{ S : \max_{f \in Q} |f(S) - f(U)| \ge \lambda + t \} ] &\le |\{ S : \max_{f \in Q} |f(S) - f(U)| \ge \lambda + t \} | \exp( - \epsilon n t) \\ &\le |\mathcal{X}|^m \exp( - \epsilon n t) \end{aligned}

By requiring this probability to be bounded by some δ>0\delta > 0, we get

t=mlog⁡∣X∣+log⁡(1/δ)ϵn t = \frac{m \log |\mathcal{X}| + \log (1 / \delta) } {\epsilon n }

□\square.

Substituting mm with log⁡∣Q∣λ2\frac{\log |Q| }{\lambda^2}, the error is then

λ+log⁡∣Q∣λ2log⁡∣X∣+log⁡(1/δ)ϵn \lambda + \frac{\frac{\log |Q| }{\lambda^2} \log |\mathcal{X}| + \log (1 / \delta) } {\epsilon n }

When λ=(log⁡∣Q∣log⁡∣X∣ϵn)1/3\lambda = (\frac{\log |Q| \log |\mathcal{X}| }{ \epsilon n})^{1 / 3}, the error is given by

2(log⁡∣Q∣log⁡∣X∣ϵn)1/3+log⁡(1/δ)ϵn 2(\frac{\log |Q| \log |\mathcal{X}| }{ \epsilon n})^{1 / 3} + \frac{\log (1 / \delta) }{ \epsilon n }

Reference

[1] S. Vadhan, “The Complexity of Differential Privacy,” in Tutorials on the Foundations of Cryptography, Y. Lindell, Ed. Cham: Springer International Publishing, 2017, pp. 347–450.