Let ( X , ∥ ⋅ ∥ ) (\mathcal{X}, \|\cdot\|) ( X , ∥ ⋅ ∥ ) be a metric space.
Definition.
Two elements D , D ′ ∈ X D,D' \in \mathcal{X} D , D ′ ∈ X are neighboring, denoted by D ∼ D ′ D \sim D' D ∼ D ′ , if
∥ D − D ′ ∥ = 1.
\|D-D'\| = 1.
∥ D − D ′ ∥ = 1.
Definition.
A function q : X → R q : \mathcal{X} \to \mathbb{R} q : X → R has sensitivity at most Δ \Delta Δ if
sup D ∼ D ′ ∣ q ( D ) − q ( D ′ ) ∣ ≤ Δ .
\sup_{D \sim D'} |q(D)-q(D')| \le \Delta.
D ∼ D ′ sup ∣ q ( D ) − q ( D ′ ) ∣ ≤ Δ.
Problem
Let
q i : X → R , i ∈ N + ,
q_i : \mathcal{X} \to \mathbb{R},
\qquad i \in \mathbb{N}^+,
q i : X → R , i ∈ N + , be a sequence of functions, each with sensitivity at most Δ \Delta Δ .
Let t ∈ R t \in \mathbb{R} t ∈ R be a threshold.
Our goal is to design an ϵ \epsilon ϵ -differentially private algorithm that reports the first index i ∈ N + i \in \mathbb{N}^+ i ∈ N + for which q i ( D ) q_i(D) q i ( D ) is near or above t t t .
Mechanism One
Definition.
For b > 0 b>0 b > 0 , let Lap ( b ) \operatorname{Lap}(b) Lap ( b ) denote the Laplace distribution with scale parameter b b b , whose density is
p b ( x ) = 1 2 b exp ( − ∣ x ∣ b ) .
p_b(x)
=
\frac{1}{2b}\exp\left(-\frac{|x|}{b}\right).
p b ( x ) = 2 b 1 exp ( − b ∣ x ∣ ) .
The algorithm is as follows.
Algorithm A \mathcal{A} A .
t ^ ← t + Z \hat t \leftarrow t + Z t ^ ← t + Z where Z ∼ L a p ( 3 Δ / ϵ ) Z \sim \mathcal{Lap}(3 \Delta / \epsilon) Z ∼ L a p ( 3Δ/ ϵ )
for i ∈ N + i \in \mathbb{N}^+ i ∈ N + do
\qquad q ^ i ( D ) ← q i ( D ) + X i \hat q_i(D) \leftarrow q_i(D) + X_i q ^ i ( D ) ← q i ( D ) + X i , where X i ∼ L a p ( 3 Δ / ϵ ) X_i \sim \mathcal{Lap}( 3 \Delta / \epsilon) X i ∼ L a p ( 3Δ/ ϵ )
\qquad if q ^ i ( D ) ≥ t ^ \hat q_i(D) \ge \hat t q ^ i ( D ) ≥ t ^ then
\qquad\qquad output ⊥ \bot ⊥
\qquad\qquad halt
\qquad else
\qquad\qquad output ⊤ \top ⊤
Note that it is necessary to add noise to t t t , to obtain t ^ \hat{t} t ^ .
Otherwise, assume that A ( D ) = A ( D ′ ) = ⊤ … ⊤ ⏟ n occurrences ⊥ \mathcal{A} (D) = \mathcal{A} (D') = \underbrace{\top \ldots \top}_{ n \text{ occurrences} } \bot A ( D ) = A ( D ′ ) = n occurrences ⊤ … ⊤ ⊥ for some n ∈ N n \in \mathbb{N} n ∈ N and neighboring datasets D D D and D ′ D' D ′ .
Assume further that t = 0 t = 0 t = 0 , q i ( D ) = Δ q_i(D) = \Delta q i ( D ) = Δ and q i ( D ′ ) = 0 q_i(D') = 0 q i ( D ′ ) = 0 for all i ∈ N i \in \mathbb{N} i ∈ N .
Then
Pr [ A ( D ) = ⊤ … ⊤ ⏟ n occurrences ⊥ ] = ( 1 2 ) n + 1 exp ( − ϵ ⋅ n 3 ) ( 1 − exp ( − ϵ 3 ) ) . Pr [ A ( D ′ ) = ⊤ … ⊤ ⏟ n occurrences ⊥ ] = ( 1 2 ) n + 1 .
\begin{align*}
\Pr[ \mathcal{A} (D) = \underbrace{\top \ldots \top}_{ n \text{ occurrences} } \bot ]
&= \left( \frac{1}{2} \right)^{n + 1} \exp \left( - \frac{\epsilon \cdot n }{3} \right) \left( 1 - \exp \left( - \frac{\epsilon}{3} \right)\right). \\
\Pr[ \mathcal{A} (D') = \underbrace{\top \ldots \top}_{ n \text{ occurrences} } \bot ]
&= \left( \frac{1}{2} \right)^{n + 1}.
\end{align*}
Pr [ A ( D ) = n occurrences ⊤ … ⊤ ⊥ ] Pr [ A ( D ′ ) = n occurrences ⊤ … ⊤ ⊥ ] = ( 2 1 ) n + 1 exp ( − 3 ϵ ⋅ n ) ( 1 − exp ( − 3 ϵ ) ) . = ( 2 1 ) n + 1 . Privacy Guarantee
Let D ′ D' D ′ be a neighboring dataset of D D D .
Theorem. For each i ∈ N + i \in \mathbb{N}^+ i ∈ N + , let s i ≐ ⊤ … ⊤ ⏟ i − 1 occurrences ⊥ s_i \doteq \underbrace{\top \ldots \top}_{ i - 1 \text{ occurrences} } \bot s i ≐ i − 1 occurrences ⊤ … ⊤ ⊥ .
Then
e − ϵ ≤ Pr [ A ( D ) = s i ] Pr [ A ( D ′ ) = s i ] ≤ e ϵ .
e^{-\epsilon}
\le
\frac{\Pr[ \mathcal{A}(D) = s_i ]}{\Pr[ \mathcal{A}(D') = s_i ]}
\le
e^{\epsilon}.
e − ϵ ≤ Pr [ A ( D ′ ) = s i ] Pr [ A ( D ) = s i ] ≤ e ϵ .
Proof 1.
Fix an i ∈ N + i \in \mathbb{N}^+ i ∈ N + .
For each dataset D D D and each x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 , define
M ( D , x ⃗ i − 1 ) = max j ∈ [ i − 1 ] ( q j ( D ) + x j ) .
M(D, \vec x_{i - 1}) = \max_{j \in [i - 1]} \Big( q_j(D) + x_j \Big).
M ( D , x i − 1 ) = j ∈ [ i − 1 ] max ( q j ( D ) + x j ) . Denote X ⃗ i − 1 ≐ ( X 1 , … , X i − 1 ) \vec X_{i - 1} \doteq (X_1, \ldots, X_{i - 1}) X i − 1 ≐ ( X 1 , … , X i − 1 ) , and
the event A ( D ) = s i \mathcal{A}(D) = s_i A ( D ) = s i happens if and only if
M ( D , X ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) .
M(D, \vec X_{i - 1}) < \hat t \le \hat q_i(D).
M ( D , X i − 1 ) < t ^ ≤ q ^ i ( D ) . Fix a sequence x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 .
Let μ \mu μ be a shorthand of L a p ( 3 Δ / ϵ ) \mathcal{Lap}(3 \Delta / \epsilon) L a p ( 3Δ/ ϵ ) , and F F F be its cumulative function.
Since the random variables Z , X ⃗ i − 1 , X i Z, \vec X_{i - 1}, X_i Z , X i − 1 , X i are independent, via Fubini's theorem,
Pr [ A ( D ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = Pr [ M ( D , x ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x ⃗ i − 1 ) < t + Z ≤ q i ( D ) + X i ] = E z ∼ μ [ I [ M ( D , x ⃗ i − 1 ) < t + z ] ⋅ ( 1 − F ( t + z − q i ( D ) ) ) ] = E z ∼ μ [ I [ M ( D , x ⃗ i − 1 ) < t + z ] ⋅ F ( − t − z + q i ( D ) ) ] = ∫ M ( D , x ⃗ i − 1 ) − t ∞ p ( z ) ⋅ F ( − t − z + q i ( D ) ) d z = ∫ M ( D ′ , x ⃗ i − 1 ) − t ∞ p ( z + κ ) ⋅ F ( − t − z − κ + q i ( D ) ) d z ,
\begin{aligned}
\Pr \big[ \mathcal{A}(D) = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \Pr \big[ M(D, \vec x_{i - 1}) < \hat t \le \hat q_i(D) \big] \\
&= \Pr \big[ M(D, \vec x_{i - 1}) < t + Z \le q_i(D) + X_i \big] \\
&= \mathbb{E}_{z \sim \mu} \left[ \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \Big] \cdot \big( 1 - F ( t + z - q_i(D) ) \big) \right] \\
&= \mathbb{E}_{z \sim \mu} \left[ \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \Big] \cdot F \big( - t - z + q_i(D) \big) \right] \\
&= \int_{M(D, \vec x_{i - 1}) - t}^\infty p(z) \cdot F \big( - t - z + q_i(D) \big) \, d z \\
&= \int_{M(D', \vec x_{i - 1}) - t}^\infty p\big( z + \kappa \big) \cdot F \big( - t - z - \kappa + q_i(D) \big) \, d z,
\end{aligned}
Pr [ A ( D ) = s i ∥ X i − 1 = x i − 1 ] = Pr [ M ( D , x i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x i − 1 ) < t + Z ≤ q i ( D ) + X i ] = E z ∼ μ [ I [ M ( D , x i − 1 ) < t + z ] ⋅ ( 1 − F ( t + z − q i ( D )) ) ] = E z ∼ μ [ I [ M ( D , x i − 1 ) < t + z ] ⋅ F ( − t − z + q i ( D ) ) ] = ∫ M ( D , x i − 1 ) − t ∞ p ( z ) ⋅ F ( − t − z + q i ( D ) ) d z = ∫ M ( D ′ , x i − 1 ) − t ∞ p ( z + κ ) ⋅ F ( − t − z − κ + q i ( D ) ) d z , where κ ≐ M ( D , x ⃗ i − 1 ) − M ( D ′ , x ⃗ i − 1 ) \kappa \doteq M(D, \vec x_{i - 1}) - M(D', \vec x_{i - 1}) κ ≐ M ( D , x i − 1 ) − M ( D ′ , x i − 1 ) .
Similarly, the conditional probability density of Pr [ A ( D ′ ) = s i ] \Pr\big[ \mathcal{A}(D') = s_i \big] Pr [ A ( D ′ ) = s i ] is given by
Pr [ A ( D ′ ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = ∫ M ( D ′ , x ⃗ i − 1 ) − t ∞ p ( z ) ⋅ F ( − t − z + q i ( D ′ ) ) d z .
\begin{aligned}
\Pr \big[ \mathcal{A}(D') = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \int_{M(D', \vec x_{i - 1}) - t}^\infty p(z) \cdot F \big( - t - z + q_i(D') \big) \, d z.
\end{aligned}
Pr [ A ( D ′ ) = s i ∥ X i − 1 = x i − 1 ] = ∫ M ( D ′ , x i − 1 ) − t ∞ p ( z ) ⋅ F ( − t − z + q i ( D ′ ) ) d z . Comparing p ( z ) p(z) p ( z ) and p ( z + κ ) p(z + \kappa) p ( z + κ ) , F ( − t − z − κ + q i ( D ) ) F \big( - t - z - \kappa + q_i(D) \big) F ( − t − z − κ + q i ( D ) ) and F ( − t − z + q i ( D ′ ) ) F \big( - t - z + q_i(D') \big) F ( − t − z + q i ( D ′ ) ) finishes the proof.
□ \square □
Proof 2.
Fix an i ∈ N + i \in \mathbb{N}^+ i ∈ N + .
For each dataset D D D and each x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 , define
M ( D , x ⃗ i − 1 ) = max j ∈ [ i − 1 ] ( q j ( D ) + x j ) .
M(D, \vec x_{i - 1}) = \max_{j \in [i - 1]} \Big( q_j(D) + x_j \Big).
M ( D , x i − 1 ) = j ∈ [ i − 1 ] max ( q j ( D ) + x j ) . Denote X ⃗ i − 1 ≐ ( X 1 , … , X i − 1 ) \vec X_{i - 1} \doteq (X_1, \ldots, X_{i - 1}) X i − 1 ≐ ( X 1 , … , X i − 1 ) , and
the event A ( D ) = s i \mathcal{A}(D) = s_i A ( D ) = s i happens if and only if
M ( D , X ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) .
M(D, \vec X_{i - 1}) < \hat t \le \hat q_i(D).
M ( D , X i − 1 ) < t ^ ≤ q ^ i ( D ) . Fix a sequence x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 .
Since the random variables Z , X ⃗ i − 1 , X i Z, \vec X_{i - 1}, X_i Z , X i − 1 , X i are independent,
Pr [ A ( D ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = Pr [ M ( D , x ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x ⃗ i − 1 ) < t + Z ≤ q i ( D ) + X i ] = ∫ ∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x ⃗ i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ,
\begin{aligned}
\Pr \big[ \mathcal{A}(D) = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \Pr \big[ M(D, \vec x_{i - 1}) < \hat t \le \hat q_i(D) \big] \\
&= \Pr \big[ M(D, \vec x_{i - 1}) < t + Z \le q_i(D) + X_i \big] \\
&= \int \int p(z) \cdot p(x_i) \cdot \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \le q_i(D) + x_i \Big] \, d x_i \, dz,
\end{aligned}
Pr [ A ( D ) = s i ∥ X i − 1 = x i − 1 ] = Pr [ M ( D , x i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x i − 1 ) < t + Z ≤ q i ( D ) + X i ] = ∫∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z , where p ( z ) p(z) p ( z ) and p ( x i ) p(x_i) p ( x i ) are probability densities of Z Z Z and X i X_i X i , respectively.
Similarly, the conditional probability density of Pr [ A ( D ′ ) = s i ] \Pr\big[ \mathcal{A}(D') = s_i \big] Pr [ A ( D ′ ) = s i ] is given by
Pr [ A ( D ′ ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = Pr [ M ( D ′ , x ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ′ ) ] = Pr [ M ( D ′ , x ⃗ i − 1 ) < t + Z ≤ q i ( D ′ ) + X i ] = ∫ ∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D ′ , x ⃗ i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] d x i ′ d z ′ .
\begin{aligned}
\Pr \big[ \mathcal{A}(D') = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \Pr \big[ M(D', \vec x_{i - 1}) < \hat t \le \hat q_i(D') \big] \\
&= \Pr \big[ M(D', \vec x_{i - 1}) < t + Z \le q_i(D') + X_i \big] \\
&= \int \int p(z') \cdot p(x_i') \cdot \mathbb{I} \Big[ M(D', \vec x_{i - 1}) < t + z' \le q_i(D') + x_i' \Big] \, d x_i' \, dz'.
\end{aligned}
Pr [ A ( D ′ ) = s i ∥ X i − 1 = x i − 1 ] = Pr [ M ( D ′ , x i − 1 ) < t ^ ≤ q ^ i ( D ′ ) ] = Pr [ M ( D ′ , x i − 1 ) < t + Z ≤ q i ( D ′ ) + X i ] = ∫∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D ′ , x i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] d x i ′ d z ′ . Suppose that the following equations holds:
t + z ′ − M ( D ′ , x ⃗ i − 1 ) = t + z − M ( D , x ⃗ i − 1 ) , q i ( D ′ ) + x i ′ − ( t + z ′ ) = q i ( D ) + x i − ( t + z ) .
\begin{aligned}
t + z' - M(D', \vec x_{i - 1}) &= t + z - M(D, \vec x_{i - 1}), \\
q_i(D') + x_i' - (t + z') &= q_i(D) + x_i - (t + z).
\end{aligned}
t + z ′ − M ( D ′ , x i − 1 ) q i ( D ′ ) + x i ′ − ( t + z ′ ) = t + z − M ( D , x i − 1 ) , = q i ( D ) + x i − ( t + z ) . Then
I [ M ( D ′ , x ⃗ i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] = I [ M ( D , x ⃗ i − 1 ) < t + z ≤ q i ( D ) + x i ] .
\mathbb{I} \Big[ M(D', \vec x_{i - 1}) < t + z' \le q_i(D') + x_i' \Big]
= \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \le q_i(D) + x_i \Big].
I [ M ( D ′ , x i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] = I [ M ( D , x i − 1 ) < t + z ≤ q i ( D ) + x i ] . But this implies that
∣ z ′ − z ∣ = ∣ M ( D ′ , x ⃗ i − 1 ) − M ( D , x ⃗ i − 1 ) ∣ ≤ Δ ∣ x i ′ − x i ∣ = ∣ z ′ − q i ( D ′ ) − z + q i ( D ) ∣ = ∣ M ( D ′ , x ⃗ i − 1 ) − M ( D , x ⃗ i − 1 ) + q i ( D ) − q i ( D ′ ) ∣ ≤ 2 ⋅ Δ .
\begin{aligned}
|z' - z| &= |M(D', \vec x_{i - 1}) - M(D, \vec x_{i - 1})| \le \Delta \\
|x_i' - x_i| &= |z' - q_i(D') - z + q_i(D)| \\
&= |M(D', \vec x_{i - 1}) - M(D, \vec x_{i - 1}) + q_i(D) - q_i(D')| \\
&\le 2 \cdot \Delta.
\end{aligned}
∣ z ′ − z ∣ ∣ x i ′ − x i ∣ = ∣ M ( D ′ , x i − 1 ) − M ( D , x i − 1 ) ∣ ≤ Δ = ∣ z ′ − q i ( D ′ ) − z + q i ( D ) ∣ = ∣ M ( D ′ , x i − 1 ) − M ( D , x i − 1 ) + q i ( D ) − q i ( D ′ ) ∣ ≤ 2 ⋅ Δ. Further, observe that
∣ d x i ′ d x i , d x i ′ d z d z ′ d x i , d z ′ d z ∣ = ∣ 1 , 0 0 , 1 ∣ = 1 ,
\begin{vmatrix}
\begin{aligned}
\frac{d x_i'}{d_{x_i}}, &\frac{d x_i'}{d_z} \\
\frac{d z'}{d_{x_i}}, &\frac{d z'}{d_z}
\end{aligned}
\end{vmatrix}
=
\begin{vmatrix}
1, &0 \\
0, &1
\end{vmatrix} = 1,
d x i d x i ′ , d x i d z ′ , d z d x i ′ d z d z ′ = 1 , 0 , 0 1 = 1 , Therefore, by integration by substitution,
Pr [ A ( D ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] Pr [ A ( D ′ ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = ∫ ∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x ⃗ i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ∫ ∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D ′ , x ⃗ i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] d x i ′ d z ′ = ∫ ∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x ⃗ i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ∫ ∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D , x ⃗ i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ≤ exp ( Δ ⋅ ϵ 3 Δ ) ⋅ exp ( 2 ⋅ Δ ⋅ ϵ 3 Δ ) ≤ exp ( ϵ ) .
\begin{aligned}
\frac{\Pr \big[ \mathcal{A}(D) = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]}{\Pr \big[ \mathcal{A}(D') = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big] }
&= \frac{
\int \int p(z) \cdot p(x_i) \cdot \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \le q_i(D) + x_i \Big] \, d x_i \, dz
}
{
\int \int p(z') \cdot p(x_i') \cdot \mathbb{I} \Big[ M(D', \vec x_{i - 1}) < t + z' \le q_i(D') + x_i' \Big] \, d x_i' \, dz'
} \\
&= \frac{
\int \int p(z) \cdot p(x_i) \cdot \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \le q_i(D) + x_i \Big] \, d x_i \, dz
}
{
\int \int p(z') \cdot p(x_i') \cdot \mathbb{I} \Big[ M(D, \vec x_{i - 1}) < t + z \le q_i(D) + x_i \Big] \, d x_i \, dz
} \\
&\le \exp \Big( \Delta \cdot \frac{\epsilon}{3\Delta}\Big) \cdot \exp \Big( 2 \cdot \Delta \cdot \frac{\epsilon}{3\Delta} \Big) \\
&\le \exp(\epsilon).
\end{aligned}
Pr [ A ( D ′ ) = s i ∥ X i − 1 = x i − 1 ] Pr [ A ( D ) = s i ∥ X i − 1 = x i − 1 ] = ∫∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D ′ , x i − 1 ) < t + z ′ ≤ q i ( D ′ ) + x i ′ ] d x i ′ d z ′ ∫∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z = ∫∫ p ( z ′ ) ⋅ p ( x i ′ ) ⋅ I [ M ( D , x i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ∫∫ p ( z ) ⋅ p ( x i ) ⋅ I [ M ( D , x i − 1 ) < t + z ≤ q i ( D ) + x i ] d x i d z ≤ exp ( Δ ⋅ 3Δ ϵ ) ⋅ exp ( 2 ⋅ Δ ⋅ 3Δ ϵ ) ≤ exp ( ϵ ) . Integrating over X ⃗ i − 1 = x ⃗ i − 1 \vec X_{i - 1} = \vec x_{i - 1} X i − 1 = x i − 1 for all possible x ⃗ i − 1 \vec x_{i - 1} x i − 1 proves that Pr [ A ( D ) = s i ] ≤ e ϵ ⋅ Pr [ A ( D ′ ) = s i ] \Pr\big[ \mathcal{A}(D) = s_i \big] \le e^\epsilon \cdot \Pr\big[ \mathcal{A}(D') = s_i \big] Pr [ A ( D ) = s i ] ≤ e ϵ ⋅ Pr [ A ( D ′ ) = s i ] .
□ \square □
Mechanism Two
Definition. For each b ∈ R + b \in \mathbb{R}^+ b ∈ R + , let E x p ( b ) \mathcal{Exp}(b) E x p ( b ) be the exponential distribution with parameter b b b .
The algorithm is described as follows.
Algorithm A \mathcal{A} A .
t ^ ← t + Z \hat t \leftarrow t + Z t ^ ← t + Z where Z ∼ E x p ( 3 Δ / ϵ ) Z \sim \mathcal{Exp}(3 \Delta / \epsilon) Z ∼ E x p ( 3Δ/ ϵ )
for i ∈ N + i \in \mathbb{N}^+ i ∈ N + do
\qquad q ^ i ( D ) ← q i ( D ) + X i \hat q_i(D) \leftarrow q_i(D) + X_i q ^ i ( D ) ← q i ( D ) + X i , where X i ∼ E x p ( 3 Δ / ϵ ) X_i \sim \mathcal{Exp}( 3 \Delta / \epsilon) X i ∼ E x p ( 3Δ/ ϵ )
\qquad if q ^ i ( D ) ≥ t ^ \hat q_i(D) \ge \hat t q ^ i ( D ) ≥ t ^ then
\qquad\qquad output ⊥ \bot ⊥
\qquad\qquad halt
\qquad else
\qquad\qquad output ⊤ \top ⊤
Privacy Guarantee
Let D ′ D' D ′ be a neighboring dataset of D D D .
Theorem. For each i ∈ N + i \in \mathbb{N}^+ i ∈ N + , let s i ≐ ⊤ … ⊤ ⏟ i − 1 occurrences ⊥ s_i \doteq \underbrace{\top \ldots \top}_{ i - 1 \text{ occurrences} } \bot s i ≐ i − 1 occurrences ⊤ … ⊤ ⊥ .
Then
e − ϵ ≤ Pr [ A ( D ) = s i ] Pr [ A ( D ′ ) = s i ] ≤ e ϵ .
e^{-\epsilon}
\le
\frac{\Pr[ \mathcal{A}(D) = s_i ]}{\Pr[ \mathcal{A}(D') = s_i ]}
\le
e^{\epsilon}.
e − ϵ ≤ Pr [ A ( D ′ ) = s i ] Pr [ A ( D ) = s i ] ≤ e ϵ .
THe analysis is very similar to the one for report noisy max.
Informally speaking, we are applying report noisy max twice, one for t ^ \hat t t ^ being max among ( t ^ , q ^ ( D 1 ) , … , q ^ ( D i − 1 ) ) (\hat t, \hat q(D_1), \ldots, \hat q(D_{i - 1})) ( t ^ , q ^ ( D 1 ) , … , q ^ ( D i − 1 )) , one for q ^ ( D i ) \hat q(D_i) q ^ ( D i ) being max among ( t ^ , q ^ ( D 1 ) , … , q ^ ( D i ) ) (\hat t, \hat q(D_1), \ldots, \hat q(D_{i})) ( t ^ , q ^ ( D 1 ) , … , q ^ ( D i )) .
Proof.
Fix an i ∈ N + i \in \mathbb{N}^+ i ∈ N + .
For each dataset D D D and each x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 , define
M ( D , x ⃗ i − 1 ) = max 1 ≤ j ≤ i − 1 ( q j ( D ) + x j ) .
M(D, \vec x_{i - 1}) = \max_{1 \le j \le i - 1} \Big( q_j(D) + x_j \Big).
M ( D , x i − 1 ) = 1 ≤ j ≤ i − 1 max ( q j ( D ) + x j ) . Denote X ⃗ i − 1 ≐ ( X 1 , … , X i − 1 ) \vec X_{i - 1} \doteq (X_1, \ldots, X_{i - 1}) X i − 1 ≐ ( X 1 , … , X i − 1 ) , and
The event A ( D ) = s i \mathcal{A}(D) = s_i A ( D ) = s i happens if and only if
M ( D , X ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) .
M(D, \vec X_{i - 1}) < \hat t \le \hat q_i(D).
M ( D , X i − 1 ) < t ^ ≤ q ^ i ( D ) . Fix a sequence x ⃗ i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 \vec x_{i - 1} = (x_1, \ldots, x_{i - 1} ) \in \mathbb{R}^{i - 1} x i − 1 = ( x 1 , … , x i − 1 ) ∈ R i − 1 .
Since the random variables Z , X ⃗ i − 1 , X i Z, \vec X_{i - 1}, X_i Z , X i − 1 , X i are independent,
Pr [ A ( D ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = Pr [ M ( D , x ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x ⃗ i − 1 ) < t + Z ≤ q i ( D ) + X i ] = ∫ M ( D , x ⃗ i − 1 ) − t ∞ ( p ( z ) ⋅ ∫ t + z − q i ( D ) ∞ p ( x i ) d x i ) d z = ∫ M ( D , x ⃗ i − 1 ) − t ∞ p ( z ) ⋅ exp ( − ϵ 3 Δ ⋅ max { 0 , t + z − q i ( D ) } ) d z
\begin{aligned}
\Pr \big[ \mathcal{A}(D) = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \Pr \big[ M(D, \vec x_{i - 1}) < \hat t \le \hat q_i(D) \big] \\
&= \Pr \big[ M(D, \vec x_{i - 1}) < t + Z \le q_i(D) + X_i \big] \\
&= \int_{M(D, \vec x_{i - 1}) - t}^\infty \left( p(z) \cdot \int_{t + z - q_i (D)}^\infty p(x_i) \, d x_i \right) \, dz \\
&= \int_{M(D, \vec x_{i - 1}) - t}^\infty
p(z) \cdot
\exp \left( -\frac{\epsilon}{3 \Delta} \cdot \max \big\{ 0, t + z - q_i (D) \big\}
\right) \, dz
\end{aligned}
Pr [ A ( D ) = s i ∥ X i − 1 = x i − 1 ] = Pr [ M ( D , x i − 1 ) < t ^ ≤ q ^ i ( D ) ] = Pr [ M ( D , x i − 1 ) < t + Z ≤ q i ( D ) + X i ] = ∫ M ( D , x i − 1 ) − t ∞ ( p ( z ) ⋅ ∫ t + z − q i ( D ) ∞ p ( x i ) d x i ) d z = ∫ M ( D , x i − 1 ) − t ∞ p ( z ) ⋅ exp ( − 3Δ ϵ ⋅ max { 0 , t + z − q i ( D ) } ) d z where p ( z ) p(z) p ( z ) and p ( x i ) p(x_i) p ( x i ) are probability densities of Z Z Z and X i X_i X i , respectively.
For now, let
κ ≐ M ( D , x ⃗ i − 1 ) − M ( D ′ , x ⃗ i − 1 ) ∈ [ − Δ , Δ ] .
\kappa \doteq M(D, \vec x_{i - 1}) - M(D', \vec x_{i - 1}) \in [- \Delta, \Delta] .
κ ≐ M ( D , x i − 1 ) − M ( D ′ , x i − 1 ) ∈ [ − Δ , Δ ] . Following similar vein, the conditional probability density of Pr [ A ( D ′ ) = s i ] \Pr\big[ \mathcal{A}(D') = s_i \big] Pr [ A ( D ′ ) = s i ] is given by
Pr [ A ( D ′ ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] = Pr [ M ( D ′ , x ⃗ i − 1 ) < t ^ ≤ q ^ i ( D ′ ) ] = Pr [ M ( D ′ , x ⃗ i − 1 ) < t + Z ≤ q i ( D ′ ) + X i ] = ∫ M ( D ′ , x ⃗ i − 1 ) − t ∞ ( p ( z ) ⋅ ∫ t + z − q i ( D ′ ) ∞ p ( x i ) d x i ) d z = ∫ M ( D ′ , x ⃗ i − 1 ) − t ∞ p ( z ) ⋅ exp ( − ϵ 3 Δ ⋅ max { 0 , t + z − q i ( D ′ ) } ) d z = y ≐ z + κ ∫ M ( D , x ⃗ i − 1 ) − t ∞ p ( y − κ ) ⋅ exp ( − ϵ 3 Δ ⋅ max { 0 , t + y − κ − q i ( D ′ ) } ) d y
\begin{aligned}
\Pr \big[ \mathcal{A}(D') = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]
&= \Pr \big[ M(D', \vec x_{i - 1}) < \hat t \le \hat q_i(D') \big] \\
&= \Pr \big[ M(D', \vec x_{i - 1}) < t + Z \le q_i(D') + X_i \big] \\
&= \int_{M(D', \vec x_{i - 1}) - t}^\infty \left( p(z) \cdot \int_{t + z - q_i (D')}^\infty p(x_i) \, d x_i \right) \, dz \\
&= \int_{M(D', \vec x_{i - 1}) - t}^\infty
p(z) \cdot
\exp \left( -\frac{\epsilon}{3 \Delta} \cdot \max \big\{ 0, t + z - q_i (D') \big\}
\right) \, dz \\
&\stackrel{y \doteq z + \kappa}{=} \int_{M(D, \vec x_{i - 1}) - t}^\infty
p(y - \kappa) \cdot
\exp \left( -\frac{\epsilon}{3 \Delta} \cdot \max \big\{ 0, t + y - \kappa - q_i (D') \big\}
\right) \, dy
\end{aligned}
Pr [ A ( D ′ ) = s i ∥ X i − 1 = x i − 1 ] = Pr [ M ( D ′ , x i − 1 ) < t ^ ≤ q ^ i ( D ′ ) ] = Pr [ M ( D ′ , x i − 1 ) < t + Z ≤ q i ( D ′ ) + X i ] = ∫ M ( D ′ , x i − 1 ) − t ∞ ( p ( z ) ⋅ ∫ t + z − q i ( D ′ ) ∞ p ( x i ) d x i ) d z = ∫ M ( D ′ , x i − 1 ) − t ∞ p ( z ) ⋅ exp ( − 3Δ ϵ ⋅ max { 0 , t + z − q i ( D ′ ) } ) d z = y ≐ z + κ ∫ M ( D , x i − 1 ) − t ∞ p ( y − κ ) ⋅ exp ( − 3Δ ϵ ⋅ max { 0 , t + y − κ − q i ( D ′ ) } ) d y Comparing the integrands we have
Pr [ A ( D ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] Pr [ A ( D ′ ) = s i ∥ X ⃗ i − 1 = x ⃗ i − 1 ] ≤ exp ( ϵ ) .
\begin{aligned}
\frac{\Pr \big[ \mathcal{A}(D) = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big]}{\Pr \big[ \mathcal{A}(D') = s_i \Vert \vec X_{i - 1} = \vec x_{i - 1} \big] }
&\le \exp(\epsilon).
\end{aligned}
Pr [ A ( D ′ ) = s i ∥ X i − 1 = x i − 1 ] Pr [ A ( D ) = s i ∥ X i − 1 = x i − 1 ] ≤ exp ( ϵ ) . Integrating over X ⃗ i − 1 = x ⃗ i − 1 \vec X_{i - 1} = \vec x_{i - 1} X i − 1 = x i − 1 for all possible x ⃗ i − 1 \vec x_{i - 1} x i − 1 proves that Pr [ A ( D ) = s i ] ≤ e ϵ ⋅ Pr [ A ( D ′ ) = s i ] \Pr\big[ \mathcal{A}(D) = s_i \big] \le e^\epsilon \cdot \Pr\big[ \mathcal{A}(D') = s_i \big] Pr [ A ( D ) = s i ] ≤ e ϵ ⋅ Pr [ A ( D ′ ) = s i ] .
□ \square □
Utility Guarantee
Suppose that the algorithm outputs ⊤ \top ⊤ at the i i i -th query, we measure the empirical error by max { 0 , q i ( D ) − t } \max \{0, q_i(D) - t \} max { 0 , q i ( D ) − t } , i.e., if q i ( D ) q_i(D) q i ( D ) does not exceed t t t , then we regards the empirical error as 0 0 0 .
Similarly, for an output ⊥ \bot ⊥ , the empirical error is measured by max { 0 , t − q i ( D ) } \max \{0, t - q_i(D) \} max { 0 , t − q i ( D )} .
Theorem. Fix a sequence of k k k queries q 1 , … , q k q_1, \ldots, q_k q 1 , … , q k to be performed by the algorithm. With probability at most β \beta β , the
maximum empirical error exceeds
6 ⋅ Δ ϵ ln k + 1 β .
\frac{6 \cdot \Delta}{\epsilon}\ln \frac{k + 1}{\beta}.
ϵ 6 ⋅ Δ ln β k + 1 .
Proof.
Pr [ ∣ Z ∣ ≥ 2 ⋅ Δ ϵ ln k + 1 β ] ≤ exp ( 2 ⋅ ln k + 1 β ) = β k + 1 .
\Pr \left[ |Z| \ge \frac{2 \cdot \Delta}{\epsilon}\ln \frac{k + 1}{\beta} \right]
\le \exp \left( 2 \cdot \ln \frac{k + 1}{\beta} \right)
= \frac{\beta}{k + 1}.
Pr [ ∣ Z ∣ ≥ ϵ 2 ⋅ Δ ln β k + 1 ] ≤ exp ( 2 ⋅ ln β k + 1 ) = k + 1 β . Similarly, for each i ∈ [ k ] i \in [k] i ∈ [ k ] ,
Pr [ ∣ X i ∣ ≥ 2 ⋅ Δ ϵ ln k + 1 β ] ≤ exp ( 2 ⋅ ln k + 1 β ) = β k + 1 .
\Pr \left[ |X_i| \ge \frac{2 \cdot \Delta}{\epsilon}\ln \frac{k + 1}{\beta} \right]
\le \exp \left( 2 \cdot \ln \frac{k + 1}{\beta} \right)
= \frac{\beta}{k + 1}.
Pr [ ∣ X i ∣ ≥ ϵ 2 ⋅ Δ ln β k + 1 ] ≤ exp ( 2 ⋅ ln β k + 1 ) = k + 1 β . By union bound, with probability at most β \beta β , it holds that
∣ Z ∣ + max i ∈ [ k ] ∣ X i ∣ ≥ 6 ⋅ Δ ϵ ln k + 1 β .
|Z| + \max_{i \in [k]} |X_i| \ge \frac{6 \cdot \Delta}{\epsilon}\ln \frac{k + 1}{\beta}.
∣ Z ∣ + i ∈ [ k ] max ∣ X i ∣ ≥ ϵ 6 ⋅ Δ ln β k + 1 . □ \square □
Reference
[1] C. Dwork and A. Roth, “The Algorithmic Foundations of Differential Privacy,”
← Back to all notes Back to top ↑