The density function of a Laplace distribution (denoted as Laplace(μ , b \mu, b μ , b ) ) with location and scale parameters μ \mu μ and b b b is given by
p ( x ) = 1 2 b exp ( − ∣ x − μ ∣ b )
p(x) = \frac{1}{2 b} \exp \left( -\frac{ | x - \mu | }{ b } \right)
p ( x ) = 2 b 1 exp ( − b ∣ x − μ ∣ ) The density function of the distribution is symmetric with respect to μ \mu μ , where it achieves peak value 1 2 b \frac{1}{2b} 2 b 1 . We plot below a few Laplace distributions with different parameters of μ \mu μ and b b b .
Properties
We list and prove a few properties of the distribution. Let X X X be a random variable that follows Laplace(μ , b \mu, b μ , b ).
E [ X ] = μ \mathbb{E}[X] = \mu E [ X ] = μ .
Proof.
1 2 ∫ − ∞ ∞ 1 2 b x ⋅ exp ( − ∣ x − μ ∣ b ) d x = ∫ − ∞ ∞ 1 2 b ( x − μ ) ⋅ exp ( − ∣ x − μ ∣ b ) d x + ∫ − ∞ ∞ 1 2 b μ ⋅ exp ( − ∣ x − μ ∣ b ) d x = ∫ μ ∞ μ b exp ( − x − μ b ) d x = ∫ 0 ∞ μ b exp ( − x b ) d x = μ . \small
\begin{aligned}
\frac{1}{2} \int_{ - \infty }^\infty \frac{1}{2b} x \cdot \exp \left( -\frac{ | x - \mu | }{b} \right) \ dx
&= \int_{ - \infty }^\infty \frac{1}{2b} ( x - \mu ) \cdot \exp \left( -\frac{ | x - \mu |}{b} \right) \ dx \\
&+ \int_{ - \infty }^\infty \frac{1}{2b} \mu \cdot \exp \left( -\frac{ | x - \mu |}{b} \right) \ dx
\\
&= \int_{\mu }^\infty \frac{\mu}{b} \exp \left( -\frac{x - \mu}{b} \right) \ dx \\
&= \int_{0 }^\infty \frac{ \mu }{b} \exp \left( -\frac{x}{b} \right) \ dx \\
&= \mu.
\end{aligned}
2 1 ∫ − ∞ ∞ 2 b 1 x ⋅ exp ( − b ∣ x − μ ∣ ) d x = ∫ − ∞ ∞ 2 b 1 ( x − μ ) ⋅ exp ( − b ∣ x − μ ∣ ) d x + ∫ − ∞ ∞ 2 b 1 μ ⋅ exp ( − b ∣ x − μ ∣ ) d x = ∫ μ ∞ b μ exp ( − b x − μ ) d x = ∫ 0 ∞ b μ exp ( − b x ) d x = μ .
∀ t ≥ 0 , Pr [ ∣ X − μ ∣ ≥ b ⋅ t ] ≤ exp ( − t ) \forall t \ge 0, \Pr[| X - \mu | \ge b \cdot t] \le \exp(-t) ∀ t ≥ 0 , Pr [ ∣ X − μ ∣ ≥ b ⋅ t ] ≤ exp ( − t ) .
Proof.
Pr [ ∣ X − μ ∣ ≥ t ] = ∫ μ + b ⋅ t ∞ 1 b exp ( − x − μ b ) d x = ∫ b ⋅ t ∞ exp ( − x ) d x = exp ( − t ) . \small
\begin{aligned}
\Pr[ | X - \mu | \ge t]
&= \int_{\mu + b \cdot t }^\infty \frac{1}{b} \exp \left( -\frac{x - \mu}{b} \right) \ dx \\
&= \int_{ b \cdot t }^\infty \exp( -x ) \ dx \\
&= \exp(-t).
\end{aligned}
Pr [ ∣ X − μ ∣ ≥ t ] = ∫ μ + b ⋅ t ∞ b 1 exp ( − b x − μ ) d x = ∫ b ⋅ t ∞ exp ( − x ) d x = exp ( − t ) . □ \square □
V a r [ X ] = 2 b 2 \mathbb{Var}[X] = 2b^2 V a r [ X ] = 2 b 2 .
Proof. First, for an integer n ≥ 0 n \ge 0 n ≥ 0 , we define
Γ ( n ) = ∫ 0 ∞ x n exp ( − x ) d x
\Gamma(n) = \int_{0 }^\infty x^n \exp( -x ) \ dx
Γ ( n ) = ∫ 0 ∞ x n exp ( − x ) d x Therefore, Γ ( 0 ) = 1 \Gamma(0) = 1 Γ ( 0 ) = 1 . Suppose n ≥ 1 n \ge 1 n ≥ 1 , we have
Γ ( n ) = − ∫ 0 ∞ x n d exp ( − x ) = − x n exp ( − x ) ∣ 0 ∞ + ∫ 0 ∞ exp ( − x ) d x n = n ∫ 0 ∞ x n − 1 exp ( − x ) d x = n Γ ( n − 1 )
\begin{aligned}
\Gamma(n)
&= -\int_{0 }^\infty x^n \ d \exp( -x ) \\
&= - x^n \exp(-x) \mid_0^\infty + \int_{0 }^\infty \exp( -x ) \ d x^n \\
&= n\int_{0 }^\infty x^{n - 1} \exp( -x ) \ dx \\
&= n \Gamma(n - 1)
\end{aligned}
Γ ( n ) = − ∫ 0 ∞ x n d exp ( − x ) = − x n exp ( − x ) ∣ 0 ∞ + ∫ 0 ∞ exp ( − x ) d x n = n ∫ 0 ∞ x n − 1 exp ( − x ) d x = n Γ ( n − 1 ) By induction, we conclude Γ ( n ) = n ! \Gamma(n) = n! Γ ( n ) = n ! . Now, consider
1 2 ∫ μ ∞ 1 b ( x − μ ) 2 exp ( − x − μ b ) d x = 1 2 ∫ 0 ∞ 1 b x 2 exp ( − x b ) d x = b 2 2 ∫ 0 ∞ x 2 exp ( − x ) d x = b 2 2 Γ ( 2 ) = b 2
\begin{aligned}
\frac{1}{2} \int_{\mu }^\infty \frac{1}{b} (x - \mu)^2 \exp \left( -\frac{x - \mu}{b} \right) \ dx
&= \frac{1}{2} \int_{0 }^\infty \frac{1}{b} x^2 \exp \left( -\frac{x}{b} \right) \ dx \\
&= \frac{b^2}{2} \int_{0 }^\infty x^2 \exp( -x ) \ dx \\
&= \frac{b^2}{2} \Gamma(2) \\
&= b^2
\end{aligned}
2 1 ∫ μ ∞ b 1 ( x − μ ) 2 exp ( − b x − μ ) d x = 2 1 ∫ 0 ∞ b 1 x 2 exp ( − b x ) d x = 2 b 2 ∫ 0 ∞ x 2 exp ( − x ) d x = 2 b 2 Γ ( 2 ) = b 2 The proof follows from symmetry of Laplace(μ , b \mu, b μ , b ) at μ \mu μ .
Let X ′ ∼ L a p l a c e ( μ , b ) X' \sim Laplace(\mu, b) X ′ ∼ L a pl a ce ( μ , b ) and define another random variable Y = X ′ + b Y = X' + b Y = X ′ + b , then the density function of Y Y Y shares the same shape with that of X ′ X' X ′ , with its center shifted to the right by distance b b b . To distinguish their density function, denote p X ′ ( ⋅ ) p_{X'} (\cdot) p X ′ ( ⋅ ) the one for random variable X ′ X' X ′ and p Y ( ⋅ ) p_Y(\cdot) p Y ( ⋅ ) the one for Y Y Y . For any t ∈ R t \in \mathbb{R} t ∈ R ,
p X ′ ( t ) p Y ( t ) = exp ( − ∣ t − μ ∣ − ∣ t − ( μ + b ) ∣ b ) ∈ [ exp ( − 1 ) , exp ( 1 ) ]
\frac{ p_{X'} (t) }{ p_Y(t) } = \exp( - \frac{ |t - \mu | - | t - ( \mu + b ) | }{ b }) \in [ \exp(-1), \exp(1) \ ]
p Y ( t ) p X ′ ( t ) = exp ( − b ∣ t − μ ∣ − ∣ t − ( μ + b ) ∣ ) ∈ [ exp ( − 1 ) , exp ( 1 ) ]
If X , X ′ ∼ L a p l a c e ( μ , b ϵ ) X, X' \sim Laplace(\mu, \frac{b}{\epsilon} ) X , X ′ ∼ L a pl a ce ( μ , ϵ b ) be a pair of independent random variables, and Y = X ′ + b Y = X' + b Y = X ′ + b , then
p X ( t ) p Y ( t ) = exp ( − ϵ ∣ t − μ ∣ − ∣ t − ( μ + b ) ∣ b ) ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
\frac{ p_X(t) }{ p_Y(t) } = \exp \left( - \epsilon \frac{ |t - \mu | - | t - ( \mu + b ) | }{ b } \right) \in [ \exp( -\epsilon ), \exp( \epsilon ) \ ]
p Y ( t ) p X ( t ) = exp ( − ϵ b ∣ t − μ ∣ − ∣ t − ( μ + b ) ∣ ) ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
Continued. Let S S S be any interval in R \mathbb{R} R .
Pr [ X ∈ S ] Pr [ Y ∈ S ] = ∫ t ∈ S p X ( t ) d t ∫ t ∈ S p Y ( t ) d t ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
\frac{ \Pr[X \in S] }{ \Pr[Y \in S] } = \frac{ \int_{t \in S} p_X(t) \ dt }{ \int_{t \in S} p_Y(t) \ dt } \in [ \exp( -\epsilon ), \exp( \epsilon ) \ ]
Pr [ Y ∈ S ] Pr [ X ∈ S ] = ∫ t ∈ S p Y ( t ) d t ∫ t ∈ S p X ( t ) d t ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
Continued. Denote P X P_X P X and P Y P_Y P Y the probability functions of X X X and Y Y Y respectively. Let S S S be any Borel set in R \mathbb{R} R .
Pr [ X ∈ S ] Pr [ Y ∈ S ] = ∫ S 1 d P X ∫ S 1 d P Y ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
\frac{ \Pr[X \in S] }{ \Pr[Y \in S] } = \frac{ \int_S 1 \ d P_X }{ \int_S 1 \ d P_Y } \in [ \exp( -\epsilon ), \exp( \epsilon ) \ ]
Pr [ Y ∈ S ] Pr [ X ∈ S ] = ∫ S 1 d P Y ∫ S 1 d P X ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
Let X = ( X 1 , X 2 , . . . , X n ) , X ′ = ( X 1 ′ , X 2 ′ , . . . , X n ′ ) X = (X_1, X_2, ..., X_n), X' = (X_1', X_2', ..., X_n') X = ( X 1 , X 2 , ... , X n ) , X ′ = ( X 1 ′ , X 2 ′ , ... , X n ′ ) be independent random vectors with dimension n n n , where X i , X i ′ ∼ L a p l a c e ( 0 , Δ / ϵ ) X_i, X_i' \sim Laplace(0, \Delta / \epsilon ) X i , X i ′ ∼ L a pl a ce ( 0 , Δ/ ϵ ) (for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n ) are independent random variables. Let Y ≐ X ′ + μ = ( Y 1 , Y 2 , . . . , Y n ) Y \doteq X' + \mu = (Y_1, Y_2, ..., Y_n) Y ≐ X ′ + μ = ( Y 1 , Y 2 , ... , Y n ) be another random vector, such that Y i = X i ′ + μ i Y_i = X_i' + \mu_i Y i = X i ′ + μ i for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n and ∣ μ ∣ = ∑ i ∈ [ n ] μ i ≤ Δ |\mu| = \sum_{i \in [n] } \mu_i \le \Delta ∣ μ ∣ = ∑ i ∈ [ n ] μ i ≤ Δ . For any t ∈ R n t \in \mathbb{R}^n t ∈ R n ,
p X ( t ) p Y ( t ) = exp ( − ( ϵ / Δ ) ⋅ ∑ i ∈ [ n ] ∣ t i ∣ ) exp ( − ( ϵ / Δ ) ⋅ ∑ i ∈ [ n ] ∣ t i − μ i ∣ ) = exp ( − ϵ ∣ t ∣ − ∣ t − μ ∣ Δ ) ∈ [ exp ( − ϵ ∣ μ ∣ Δ ) , exp ( ϵ ∣ μ ∣ Δ ) ] ⊂ [ exp ( − ϵ ) , exp ( ϵ ) ]
\begin{aligned}
\frac{ p_X(t) }{ p_Y(t) } &= \frac{ \exp \Big( - \big( \epsilon / \Delta \big) \cdot \sum_{i \in [n] } |t_i| \Big) }{ \exp \Big( - \big( \epsilon / \Delta \big) \cdot \sum_{i \in [n] } |t_i - \mu_i| \Big) } \\
&= \exp \left( - \epsilon \frac{ |t | - | t - \mu| }{ \Delta } \right) \\
&\in \Big[ \exp \Big( - \epsilon \frac{ |\mu| }{ \Delta } \Big) , \exp \Big( \epsilon \frac{ |\mu| }{ \Delta } \Big) \Big] \\
&\subset [ \exp( -\epsilon ), \exp( \epsilon ) \ ]
\end{aligned}
p Y ( t ) p X ( t ) = exp ( − ( ϵ /Δ ) ⋅ ∑ i ∈ [ n ] ∣ t i − μ i ∣ ) exp ( − ( ϵ /Δ ) ⋅ ∑ i ∈ [ n ] ∣ t i ∣ ) = exp ( − ϵ Δ ∣ t ∣ − ∣ t − μ ∣ ) ∈ [ exp ( − ϵ Δ ∣ μ ∣ ) , exp ( ϵ Δ ∣ μ ∣ ) ] ⊂ [ exp ( − ϵ ) , exp ( ϵ ) ]
Continued. Let S ⊂ R n S \subset \mathbb{R}^n S ⊂ R n be any Borel set. Then
Pr [ X ∈ S ] Pr [ Y ∈ S ] ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
\frac{ \Pr[X \in S] }{ \Pr[Y \in S] } \in [ \exp( -\epsilon ), \exp( \epsilon ) \ ]
Pr [ Y ∈ S ] Pr [ X ∈ S ] ∈ [ exp ( − ϵ ) , exp ( ϵ ) ]
Laplacian Mechanism
Let ( X , d ) (\mathcal{X}, d) ( X , d ) be a metric space and f : X → R n f: \mathcal{X} \rightarrow \mathbb{R}^n f : X → R n a function defined on X \mathcal{X} X .
Definition. x , x ′ ∈ X x, x' \in \mathcal{X} x , x ′ ∈ X are called neighboring points if d ( x , x ′ ) = 1 d(x, x') = 1 d ( x , x ′ ) = 1 .
Definition. The sensitivity Δ \Delta Δ of f f f is defined as
Δ ≐ max x , x ′ ∈ X , d ( x , x ′ ) = 1 ∥ f ( x ) − f ( x ′ ) ∥ 1
\Delta \doteq \max_{x, x' \in \mathcal{X}, d(x, x') = 1} \Vert f(x) - f(x') \Vert_1
Δ ≐ x , x ′ ∈ X , d ( x , x ′ ) = 1 max ∥ f ( x ) − f ( x ′ ) ∥ 1 where ∥ ⋅ ∥ 1 \Vert \cdot \Vert_1 ∥ ⋅ ∥ 1 is the ℓ 1 \ell_1 ℓ 1 distance. In other words, Δ \Delta Δ is the maximum ℓ 1 \ell_1 ℓ 1 distance between the images of two neighboring points.
We now construct a new randomized function, called Laplacian mechanism from f f f , as follows.
Definition. The Laplacian mechanism of f f f is defined as
g ( x ) = f ( x ) + Y
g(x) = f(x) + Y
g ( x ) = f ( x ) + Y where Y = ( Y 1 , Y 2 , . . . , Y n ) Y = (Y_1, Y_2, ..., Y_n) Y = ( Y 1 , Y 2 , ... , Y n ) is a random vector with independent random variables Y i ∼ L a p l a c e ( Δ / ϵ ) Y_i \sim Laplace(\Delta / \epsilon) Y i ∼ L a pl a ce ( Δ/ ϵ ) .
□ \square □
Theorem. g g g is ( ϵ , 0 ) (\epsilon, 0) ( ϵ , 0 ) -differentially private.
Proof. Let S ⊂ R n S \subset \mathbb{R}^n S ⊂ R n be an arbitrary Borel set. We need to prove for any pair of neighboring x , x ′ ∈ X x, x' \in \mathcal{X} x , x ′ ∈ X ,
Pr [ g ( x ) ∈ S ] Pr [ g ( x ′ ) ∈ S ] ≤ exp ( ϵ )
\frac{ \Pr[ g(x) \in S]}{ \Pr[ g(x') \in S] } \le \exp(\epsilon)
Pr [ g ( x ′ ) ∈ S ] Pr [ g ( x ) ∈ S ] ≤ exp ( ϵ ) Denote p x p_x p x and p x ′ p_{x'} p x ′ the density functions for g ( x ) g(x) g ( x ) and g ( x ′ ) g(x') g ( x ′ ) respectively. It reduces to prove the following property of the density function
p x ( t ) p x ′ ( t ) ≤ exp ( ϵ ) , ∀ t ∈ R n
\frac{ p_x(t) }{ p_{x'} (t) } \le \exp(\epsilon), \qquad \forall t \in \mathbb{R}^n
p x ′ ( t ) p x ( t ) ≤ exp ( ϵ ) , ∀ t ∈ R n But
p x ( t ) p x ′ ( t ) = exp ( − ϵ ∥ t − f ( x ) ∥ 1 / Δ ) exp ( − ϵ ∥ t − f ( x ′ ) ∥ 1 / Δ ) = exp ( − ϵ Δ ( ∥ t − f ( x ) ∥ 1 − ∥ t − f ( x ′ ) ∥ 1 ) ) ≤ exp ( ϵ Δ ∥ f ( x ) − f ( x ′ ) ∥ ) = exp ( ϵ )
\begin{aligned}
\frac{ p_x(t) }{ p_{x'} (t) }
&= \frac{ \exp( - {\epsilon \Vert t - f(x) \Vert_1 } / {\Delta} ) }{ \exp( - {\epsilon \Vert t - f(x') \Vert_1 } /{\Delta} ) } \\
&= \exp\Big( - \frac{\epsilon }{\Delta} \big( \Vert t - f(x)\Vert_1 - \Vert t - f(x') \Vert_1 \big) \Big) \\
&\le \exp \Big( \frac{\epsilon }{\Delta} \Vert f(x) - f(x') \Vert \Big) \\
&= \exp( \epsilon )
\end{aligned}
p x ′ ( t ) p x ( t ) = exp ( − ϵ ∥ t − f ( x ′ ) ∥ 1 / Δ ) exp ( − ϵ ∥ t − f ( x ) ∥ 1 / Δ ) = exp ( − Δ ϵ ( ∥ t − f ( x ) ∥ 1 − ∥ t − f ( x ′ ) ∥ 1 ) ) ≤ exp ( Δ ϵ ∥ f ( x ) − f ( x ′ ) ∥ ) = exp ( ϵ ) □ \square □
← Back to all notes Back to top ↑