Given a set of n elements S that belongs to some finite domain X={x1,x2,...,xm}, we want to release the (normalized) histogram in a differentially private manner. Define ∀xi∈X:
FS(xi)≐ the number of times xi appears in S;
fS(xi)≐∣S∣FS(xi)=nFS(xi), the frequency of xi in S.
The (normalized) histogram of hS is a frequency vector:
hS≐⟨fS(x1),fS(x2),...,fS(xm)⟩∈Rm
Consider another set S′ obtained by replacing an element xk in S to another element xl, such that
FS′(xk)=FS(xk)−1;
FS′(xl)=FS(xl)+1;
FS′(xi)=FS(xi),∀i∈/{k,l}.
Let hS′ be the histogram of S′. Our goal is to design some mechanism M that adds noise to the normalized so that the output distribution of M(hS) and M(hS′) are indistinguishable.
Naive Laplacian
One way is to add Laplacian noise directly to each dimension of the histogram. For any vector v∈Rm, M outputs a new perturbed vector:
M(v)≐v+L
where L≐⟨l1,l2,...,lm⟩ and each li is sampled independently from Lap(nϵ2).
Privacy
We claim this mechanism is (ϵ,0)-differentially private. For u∈Rn, we have
When ∣X∣=m≫n, we could improve the release mechanism. As shown in the previous section, we would like to achieve error O(n1). This inspire to round the small frequencies (roughly O(n1)) to zero. Of course, we should carry out this in a differentially private manner.
Mechanism M ===============================
INPUT: a set S of n elements.
OUTPUT: a histogram of S in differentially private manner. −−−−−−−−−−−−−−−−−−−−−−−−
For i∈[m] do If fS(xi)=0, then M(hS)i←0 Else M(hS)i←fS(xi)+li, where li∼Lap(nϵ2). If M(hS)i<n1+ϵn2log2/δ, then M(hS)i←0.
Release M(hS)≐⟨M(hS)1,M(hS)2,...,M(hS)n⟩ −−−−−−−−−−−−−−−−−−−−−−−−
Privacy
We claim this mechanism is (ϵ,δ)-differentially private.
Case 1. If S and S′ have the same set of supports, i.e., fS(xi)>0↔fS′(xi)>0, then M is (ϵ,0) differentially private.
Case 2.
FS(xk)=1, then FS′(xk)=FS(xk)−1=0. For S′, it is guaranteed that M(hS′)k=0. For S, as fS(xk)=n1,Pr[M(hS)k=0]=Pr[M(hS)k=M(hS′)k]=2δ
FS(xl)=0, then FS′(xl)=FS(xl)+1=1. For S, it is guaranteed that M(hS)k=0. For S′, by similar argument, we have Pr[M(hS′)k=0]=Pr[M(hS)k=M(hS′)k]=2δ.
There are three combinations such that either FS(xk)=1 or FS(xl)=0 holds, namely
FS(xk)=1,FS(xl)=0,
FS(xk)=1,FS(xl)>0,
FS(xk)>1,FS(xl)=0.
We give a proof for the first case. The proofs for the other two are similar.
Now, for ∀ measurable E⊂Rn,
We prove that ∣M(hS)−hS∣∞=O(nϵ1logδ1) with probability at least 1−δ, if δ≤n1.
If fS(xi)=0, then there is no error.
Otherwise, if M(hS)i is not truncated, with probability at most nδ, it ∣M(hS)i−fS(xi)∣≤nϵ2log1/δ. If it is truncated, this will introduce an additional error of at most n1+ϵn2log2/δ. The overall error is at most n1+ϵn4log2/δ, which is O(ϵnlog1/δ) if ϵ≤logn.
□
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.