ZHANGYUXUAN-zR commited on
Commit
4fa1b9e
·
verified ·
1 Parent(s): bffe414

Add files using upload-large-folder tool

Browse files
parse/train/B1gJ1L2aW/B1gJ1L2aW.md CHANGED
@@ -110,7 +110,7 @@ $X$ : a dataset of normal examples $H ( x )$ : a pre-trained DNN with $L$ transf
110
 
111
  # Output:
112
 
113
- Detector(LID) . a detector 1: $\mathrm { L I D } _ { n e g } { = } [ ]$ , $\mathrm { L I D } _ { p o s } { = } [ ]$ 2: for $B _ { n o r m }$ in $X$ do $\textsf { \textsf { D } } B _ { n o r m }$ : a minibatch of normal examples 3: $B _ { a d v } : =$ adversarial attack $B _ { n o r m }$ . $B _ { a d v }$ : a minibatch of adversarial examples 4: $B _ { n o i s y }$ : $: =$ add random noise to $B _ { n o r m }$ . $B _ { n o i s y }$ : a minibatch of noisy examples 5: N = |Bnorm| $\triangleright$ number of examples in $B _ { n o r m }$ 6: LIDnorm, LIDnoisy, $\mathrm { L I D } _ { n o i s y } = \mathrm { z e r o s } [ N , L ]$ 7: for $i$ in $[ 1 , L ]$ do 8: Anorm = Hi(Bnorm) $\triangleright i$ -th layer activations of $B _ { n o r m }$ 9: Aadv = Hi(Badv) $\triangleright i$ -th layer activations of $B _ { a d v }$ 10: $A _ { n o i s y } = H ^ { i } ( B _ { n o i s y } )$ ${ \triangleright } i$ -th layer activations of $B _ { n o i s y }$ 11: for $j$ in $[ 1 , N ]$ do 12: $\begin{array} { r } { \dot { \mathrm { L I D } _ { n o r m } } \dot { [ j , i ] } = - \Big ( \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \log { \frac { r _ { i } ( A _ { n o r m } [ j ] , A _ { n o r m } ) } { r _ { k } ( A _ { n o r m } [ j ] , A _ { n o r m } ) } } \Big ) ^ { - 1 } } \end{array}$ 13: $\begin{array} { r } { \mathbf { L I D } _ { a d v } [ j , i ] = - \Big ( \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \log \frac { r _ { i } ( A _ { a d v } [ j ] , A _ { n o r m } ) } { r _ { k } ( A _ { a d v } [ j ] , A _ { n o r m } ) } \Big ) ^ { - \frac { 1 } { \gamma _ { k } } } } \end{array}$ 1 14: LIDnoisy[j, i] = − 1k Pki=1 log ri(Anoisy[j],Anorm)rk(Anoisy[j],Anorm)  15: $\triangleright r _ { i } ( A [ j ] , A _ { n o r m } )$ : the $L _ { 2 }$ distance of $A _ { - } [ j ]$ to its $i$ -th nearest neighbor in $A _ { n o r m }$ 16: end for 17: end for 18: ${ \mathrm { L I D } } _ { n e g }$ .append $( \mathrm { L I D } _ { n o r m } )$ , ${ \mathrm { L I D } } _ { n e g }$ .append $( \mathrm { L I D } _ { n o i s y } )$ 19: $\mathrm { L I D } _ { p o s }$ .append $\mathrm { L I D } _ { a d v , }$ ) 20: end for 21: Detector $\left( \mathrm { L I D } \right) =$ train a classifier on $( \mathrm { L I D } _ { n e g } , \mathrm { L I D } _ { p o s } )$
114
 
115
  # 5.1 EXPERIMENTAL SETUP
116
 
 
110
 
111
  # Output:
112
 
113
+ Detector(LID) . a detector 1: $\mathrm { L I D } _ { n e g } { = } [ ]$ , $\mathrm { L I D } _ { p o s } { = } [ ]$ 2: for $B _ { n o r m }$ in $X$ do $\textsf { \textsf { D } } B _ { n o r m }$ : a minibatch of normal examples 3: $B _ { a d v } : =$ adversarial attack $B _ { n o r m }$ . $B _ { a d v }$ : a minibatch of adversarial examples 4: $B _ { n o i s y }$ : $: =$ add random noise to $B _ { n o r m }$ . $B _ { n o i s y }$ : a minibatch of noisy examples 5: N = |Bnorm| $\triangleright$ number of examples in $B _ { n o r m }$ 6: LIDnorm, LIDnoisy, $\mathrm { L I D } _ { n o i s y } = \mathrm { z e r o s } [ N , L ]$ 7: for $i$ in $[ 1 , L ]$ do 8: Anorm = Hi(Bnorm) $\triangleright i$ -th layer activations of $B _ { n o r m }$ 9: Aadv = Hi(Badv) $\triangleright i$ -th layer activations of $B _ { a d v }$ 10: $A _ { n o i s y } = H ^ { i } ( B _ { n o i s y } )$ ${ \triangleright } i$ -th layer activations of $B _ { n o i s y }$ 11: for $j$ in $[ 1 , N ]$ do 12: $\begin{array} { r } { \dot { \mathrm { L I D } _ { n o r m } } \dot { [ j , i ] } = - \Big ( \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \log { \frac { r _ { i } ( A _ { n o r m } [ j ] , A _ { n o r m } ) } { r _ { k } ( A _ { n o r m } [ j ] , A _ { n o r m } ) } } \Big ) ^ { - 1 } } \end{array}$ 13: $\begin{array} { r } { \mathbf { L I D } _ { a d v } [ j , i ] = - \Big ( \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \log \frac { r _ { i } ( A _ { a d v } [ j ] , A _ { n o r m } ) } { r _ { k } ( A _ { a d v } [ j ] , A _ { n o r m } ) } \Big ) ^ { - \frac { 1 } { \gamma _ { k } } } } \end{array}$ 1 14: LIDnoisy[j, i] = − 1k Pki=1 log ri(Anoisy[j],Anorm)rk(Anoisy[j],Anorm)  15: $\triangleright r _ { i } ( A [ j ] , A _ { n o r m } )$ : the $L _ { 2 }$ distance of $A _ { - } [ j ]$ to its $i$ -th nearest neighbor in $A _ { n o r m }$ 16: end for 17: end for 18: ${ \mathrm { L I D } } _ { n e g }$ .append $( \mathrm { L I D } _ { n o r m } )$ , ${ \mathrm { L I D } } _ { n e g }$ .append $( \mathrm { L I D } _ { n o i s y } )$ 19: $\mathrm { L I D } _ { p o s }$ .append $\mathrm { L I D } _ { a d v , }$ ) 20: end for 21: Detector $\left( \mathrm { L I D } \right) =$ train a classifier on $( \mathrm { L I D } _ { n e g } , \mathrm { L I D } _ { p o s } )$
114
 
115
  # 5.1 EXPERIMENTAL SETUP
116
 
parse/train/SPrVNsXnGd/SPrVNsXnGd.md CHANGED
@@ -163,7 +163,7 @@ where $\epsilon \left( \lambda \right)$ is the RDP of the subsampled shuffle mec
163
 
164
  The proof outline of Theorem $3$ is as follows: Note that $\mathcal { A } _ { \mathrm { c l d p } }$ is an iterative algorithm, where in each iteration we use the subsampled shuffle mechanism as defined in $\textcircled{3}$ , for which we have computed the RDP guarantees in Theorem $\bigtriangledown$ Now, for the privacy analysis of $\mathcal { A } _ { \mathrm { c l d p } }$ , we use the adaptive composition theorem from $\textcircled { 1 3 7 }$ Proposition 1] and then use the RDP to DP conversion given in Lemma $^ { 1 . }$ For the convergence analysis, we use a standard non-private SGD convergence result and compute the required parameters for that. See Appendix F for a complete proof of Theorem 3.
165
 
166
- Remark 1. Note that our convergence bound is affected by the variance of the $\epsilon _ { \mathrm { 0 } }$ -LDP mechanism $\mathcal { R } _ { p }$ . For example, when $f$ is $L$ -Lipschitz continuous w.r.t. the $\ell _ { 2 }$ -norm, we can use the LDP mechanism $\mathcal { R } _ { 2 }$ proposed in $\boxed { 1 1 }$ that has variance $\begin{array} { r } { G _ { 2 } ^ { 2 } ( L ) = 1 4 L ^ { 2 } d \big ( \frac { e ^ { \epsilon _ { 0 } } + 1 } { e ^ { \epsilon _ { 0 } } - 1 } \big ) ^ { 2 } } \end{array}$ ; and when $f$ is $L$ -Lipschitz continuous w.r.t. the $\ell _ { 1 }$ -norm or $\ell _ { \infty }$ -norm, we can use the LDP mechanisms $\mathcal { R } _ { \infty }$ or $\mathcal { R } _ { 1 }$ , respectively, proposed in $\lVert 2 7 \rVert$ 1 that have variances $\begin{array} { r } { G _ { \infty } ^ { 2 } ( L ) = L ^ { 2 } d ^ { 2 } \big ( \frac { e ^ { \epsilon _ { 0 } } + 1 } { e ^ { \epsilon _ { 0 } } - 1 } \big ) ^ { 2 } } \end{array}$ 2 and G21(L) = L2d e✏0 +1e✏0 1 2 , respectively. By plugging these variances $G _ { p } ^ { 2 } ( L )$ (for $p = 1 , 2 , \infty )$ into Theorem $3 .$ we get the convergence rate of the $L$ -Lipschitz continuous loss function w.r.t. the $\ell _ { p }$ -norm (for $p \equiv \infty , 2 , 1 $ ).
167
 
168
  Remark 2. The privacy parameter in $( 5 )$ is not in a closed form expression and could be obtained by solving an optimization problem. However, we numerically compute it for several interesting regimes of parameters in our numerical experiments; see Section 4 for more details.
169
 
@@ -226,7 +226,7 @@ $$
226
  \begin{array} { r } { \mathcal { D } _ { \mathrm { s a m e } } ^ { m } = \{ ( \mathcal { D } _ { m } , \mathcal { D } _ { m } ^ { \prime } , \mathcal { D } _ { m } ^ { \prime \prime } ) : \mathcal { D } _ { m } = ( d , \ldots , d , d ) \in \mathcal { X } ^ { m } , \mathcal { D } _ { m } ^ { \prime } = ( d , \ldots , d , d ^ { \prime } ) \in \mathcal { X } ^ { m } , \mathrm { ~ a ~ n ~ d ~ } \mathcal { X } = 1 , \ldots , d , 1 \} , } \\ { \mathcal { D } _ { m } ^ { \prime \prime } = ( d , \ldots , d , d ^ { \prime \prime } ) \in \mathcal { X } ^ { m } , \mathrm { ~ w h e r e ~ } d , d ^ { \prime } , d ^ { \prime \prime } \in \mathcal { X } \} } \end{array}
227
  $$
228
 
229
- Consider arbitrary neighboring datasets $\mathcal { D } = \left( d _ { 1 } , \ldots , d _ { k - 1 } , d _ { k } \right)$ , $\mathcal { D } ^ { \prime } = ( d _ { 1 } , \ldots , d _ { k - 1 } , d _ { k } ^ { \prime } )$ , and $\mathcal { D } ^ { \prime \prime } = ( d _ { 1 } , \dots , d _ { k - 1 } ^ { - } , d _ { k } ^ { \overline { { \prime } } \prime } )$ , each having $k$ elements. For any $m \in \{ 0 , \ldots , k - 1 \}$ , we define new neighboring dataeach having = (d00k , . . . , d00k , dk), D0(k)m+1 = (d00k , . . . , d00k , d0k), and D00(k)m+1 $\mathcal { D } _ { m + 1 } ^ { \prime \prime ( k ) } = ( d _ { k } ^ { \prime \prime } , \dots , d _ { k } ^ { \prime \prime } )$ $m + 1$ $( \mathcal { D } _ { m + 1 } ^ { \prime \prime ( k ) } , \mathcal { D } _ { m + 1 } ^ { \prime ( k ) } , \mathcal { D } _ { m + 1 } ^ { ( k ) } ) \in \mathcal { D } _ { \mathrm { s a m e } } ^ { m }$
230
 
231
  The first step of the proof is given in the following theorem.
232
 
 
163
 
164
  The proof outline of Theorem $3$ is as follows: Note that $\mathcal { A } _ { \mathrm { c l d p } }$ is an iterative algorithm, where in each iteration we use the subsampled shuffle mechanism as defined in $\textcircled{3}$ , for which we have computed the RDP guarantees in Theorem $\bigtriangledown$ Now, for the privacy analysis of $\mathcal { A } _ { \mathrm { c l d p } }$ , we use the adaptive composition theorem from $\textcircled { 1 3 7 }$ Proposition 1] and then use the RDP to DP conversion given in Lemma $^ { 1 . }$ For the convergence analysis, we use a standard non-private SGD convergence result and compute the required parameters for that. See Appendix F for a complete proof of Theorem 3.
165
 
166
+ Remark 1. Note that our convergence bound is affected by the variance of the $\epsilon _ { \mathrm { 0 } }$ -LDP mechanism $\mathcal { R } _ { p }$ . For example, when $f$ is $L$ -Lipschitz continuous w.r.t. the $\ell _ { 2 }$ -norm, we can use the LDP mechanism $\mathcal { R } _ { 2 }$ proposed in $\boxed { 1 1 }$ that has variance $\begin{array} { r } { G _ { 2 } ^ { 2 } ( L ) = 1 4 L ^ { 2 } d \big ( \frac { e ^ { \epsilon _ { 0 } } + 1 } { e ^ { \epsilon _ { 0 } } - 1 } \big ) ^ { 2 } } \end{array}$ ; and when $f$ is $L$ -Lipschitz continuous w.r.t. the $\ell _ { 1 }$ -norm or $\ell _ { \infty }$ -norm, we can use the LDP mechanisms $\mathcal { R } _ { \infty }$ or $\mathcal { R } _ { 1 }$ , respectively, proposed in $\lVert 2 7 \rVert$ 1 that have variances $\begin{array} { r } { G _ { \infty } ^ { 2 } ( L ) = L ^ { 2 } d ^ { 2 } \big ( \frac { e ^ { \epsilon _ { 0 } } + 1 } { e ^ { \epsilon _ { 0 } } - 1 } \big ) ^ { 2 } } \end{array}$ 2 and G21(L) = L2d e✏0 +1e✏0 1 2 , respectively. By plugging these variances $G _ { p } ^ { 2 } ( L )$ (for $p = 1 , 2 , \infty )$ into Theorem $3 .$ we get the convergence rate of the $L$ -Lipschitz continuous loss function w.r.t. the $\ell _ { p }$ -norm (for $p \equiv \infty , 2 , 1 $ ).
167
 
168
  Remark 2. The privacy parameter in $( 5 )$ is not in a closed form expression and could be obtained by solving an optimization problem. However, we numerically compute it for several interesting regimes of parameters in our numerical experiments; see Section 4 for more details.
169
 
 
226
  \begin{array} { r } { \mathcal { D } _ { \mathrm { s a m e } } ^ { m } = \{ ( \mathcal { D } _ { m } , \mathcal { D } _ { m } ^ { \prime } , \mathcal { D } _ { m } ^ { \prime \prime } ) : \mathcal { D } _ { m } = ( d , \ldots , d , d ) \in \mathcal { X } ^ { m } , \mathcal { D } _ { m } ^ { \prime } = ( d , \ldots , d , d ^ { \prime } ) \in \mathcal { X } ^ { m } , \mathrm { ~ a ~ n ~ d ~ } \mathcal { X } = 1 , \ldots , d , 1 \} , } \\ { \mathcal { D } _ { m } ^ { \prime \prime } = ( d , \ldots , d , d ^ { \prime \prime } ) \in \mathcal { X } ^ { m } , \mathrm { ~ w h e r e ~ } d , d ^ { \prime } , d ^ { \prime \prime } \in \mathcal { X } \} } \end{array}
227
  $$
228
 
229
+ Consider arbitrary neighboring datasets $\mathcal { D } = \left( d _ { 1 } , \ldots , d _ { k - 1 } , d _ { k } \right)$ , $\mathcal { D } ^ { \prime } = ( d _ { 1 } , \ldots , d _ { k - 1 } , d _ { k } ^ { \prime } )$ , and $\mathcal { D } ^ { \prime \prime } = ( d _ { 1 } , \dots , d _ { k - 1 } ^ { - } , d _ { k } ^ { \overline { { \prime } } \prime } )$ , each having $k$ elements. For any $m \in \{ 0 , \ldots , k - 1 \}$ , we define new neighboring dataeach having = (d00k , . . . , d00k , dk), D0(k)m+1 = (d00k , . . . , d00k , d0k), and D00(k)m+1 $\mathcal { D } _ { m + 1 } ^ { \prime \prime ( k ) } = ( d _ { k } ^ { \prime \prime } , \dots , d _ { k } ^ { \prime \prime } )$ $m + 1$ $( \mathcal { D } _ { m + 1 } ^ { \prime \prime ( k ) } , \mathcal { D } _ { m + 1 } ^ { \prime ( k ) } , \mathcal { D } _ { m + 1 } ^ { ( k ) } ) \in \mathcal { D } _ { \mathrm { s a m e } } ^ { m }$
230
 
231
  The first step of the proof is given in the following theorem.
232