ZHANGYUXUAN-zR commited on
Commit
6b52243
·
verified ·
1 Parent(s): 9f8e6e7

Add files using upload-large-folder tool

Browse files
parse/train/RUQ1zwZR8_/RUQ1zwZR8_.md CHANGED
@@ -73,14 +73,14 @@ Let $m$ be the number of users in a round and let $\gamma \in [ 0 , 1 ]$ denote
73
 
74
  # Algorithm 1 DPFedAvg-M with adaptive clipping
75
 
76
- function $\mathrm { T r a i n } ( m , \gamma , \eta _ { c } , \eta _ { s } , \eta _ { C } , z , \sigma _ { b } , \beta )$ Initialize model $\theta ^ { 0 }$ , clipping bound $C ^ { 0 }$ z∆ ← z−2 − (2σb)−2−1/2 for each round $t = 0 , 1 , 2 , \ldots { \dot { \mathbf { c } } }$ o ${ \mathcal { Q } } ^ { t } \gets$ (sample $m$ users uniformly) for each user $i \in \mathcal { Q } ^ { t }$ in parallel do $\begin{array} { r l } & { \quad ( \Delta _ { i } ^ { t } , b _ { i } ^ { t } ) \gets \mathrm { ~ F e d A v g } ( i , \theta ^ { t } , \eta _ { c } , C ^ { t } ) } \\ & { \sigma _ { \Delta } \gets z _ { \Delta } C ^ { t } } \\ & { \tilde { \Delta } ^ { t } = \frac { 1 } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } \Delta _ { i } ^ { t } + \mathcal { N } ( 0 , I \sigma _ { \Delta } ^ { 2 } ) \right) } \\ & { \bar { \Delta } ^ { t } = \beta \bar { \Delta } ^ { t - 1 } + ( 1 - \beta ) \tilde { \Delta } ^ { t } } \\ & { \theta ^ { t + 1 } \gets \theta ^ { t } + \eta _ { s } \bar { \Delta } ^ { t } } \\ & { \tilde { b } ^ { t } = \frac { 1 } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } b _ { i } ^ { t } + \mathcal { N } ( O , \sigma _ { b } ^ { 2 } ) \right) } \end{array}$
77
 
78
  $C ^ { t + 1 } \gets C ^ { t } \cdot \exp \left( - \eta _ { C } ( \tilde { b } ^ { t } - \gamma ) \right)$ function FedAvg(i, θ0, η, C) θ ← θ0 $\mathcal { G } $ (user i’s local data split into batches) for batch $g \in { \mathcal { G } }$ do $\begin{array} { r l } & { \quad \theta \gets \theta - \eta \nabla \ell ( \theta ; g ) } \\ & { \Delta \gets \theta - \theta ^ { 0 } } \\ & { b \gets \mathbb { I } _ { | | \Delta | | \leq C } } \\ & { \Delta ^ { \prime } \gets \Delta \cdot \operatorname* { m i n } \left( 1 , \frac { C } { | | \Delta | | } \right) } \\ & { \mathrm { ~ r e t u r n } \left( \Delta ^ { \prime } , b \right) } \end{array}$
79
 
80
  ![](images/d1f5d3ef5dfde7726538c717f8da8f80339ce3990f0c0907a44973a4dd5dbc83.jpg)
81
  Figure 2: Evolution of the quantile estimate on data drawn from log-normal distributions. The three plots use data drawn from the exponential of $\mathcal { N } ( 0 . 0 , 1 . 0 )$ , $\mathcal { N } ( \bar { 0 . 0 } , 0 . 1 )$ , and $\mathcal { N } ( \log { 1 0 } , 1 . 0 )$ , respectively. Curves are shown for each of five quantiles: (0.1, 0.3, 0.5, 0.7, 0.9), and the dashed lines show the true value at each quantile. Hyperparameters are as discussed in the text and used in the experiments of Section 3: $\eta _ { C } = 0 . 2 , C ^ { 0 } \stackrel { \sim } { = } 0 . \dot { 1 } , m = 1 0 0 , \sigma _ { b } = m / 2 0$ . After an initial phase of exponential growth, the true quantile is fairly closely tracked. A smaller value of $\eta _ { C }$ would allow more accurate tracking at the cost of slower convergence, but since the quantile value is only used as a heuristic for clipping, a small amount of noise is tolerable. The entire sequence of values estimated for each target quantile satisfy $( 0 . 0 3 4 , n ^ { - 1 . 1 } )$ -differential privacy using RDP composition across the 200 rounds assuming fixed-size samples of $m = 1 0 0$ out of a total population of $\bar { n } = 1 0 ^ { 6 }$ [29].
82
 
83
- Theorem 1. One step of $D P$ -FedAvg with adaptive clipping using $\sigma _ { b }$ noise standard deviation on the clipped counts $\sum b _ { i } ^ { t }$ and $z _ { \Delta }$ noise multiplier on the vector sums $\sum \Delta _ { i } ^ { t }$ is equivalent (so far as privacy accounting is concerned) to one step of non-adaptive $D P$ -FedAvg with noise multiplier $z$ if we set z∆ = z−2 − (2σb)−2−1/2.
84
 
85
  Proof. We make a conceptual change to the algorithm that does not change the behavior or privacy properties but allows us to analyze each step as if it were a single private Gaussian sum. Instead of sending $( \Delta _ { i } ^ { t } , b _ { i } ^ { t } )$ , each user sends $( \hat { \Delta } _ { i } ^ { t } , \hat { b } _ { i } ^ { t } ) \triangleq \big ( \Delta _ { i } ^ { t } / \sigma _ { \Delta } , ( b _ { i } ^ { t } - \scriptscriptstyle 1 / 2 ) / \sigma _ { b } \big )$ . The server adds noise with covariance $I$ and averages, then reverses the transformation so $\begin{array} { r } { \tilde { \Delta } ^ { t } = \frac { \sigma _ { \Delta } } { m } \biggl ( \sum _ { i \in \mathcal { Q } ^ { t } } \hat { \Delta } _ { i } ^ { t } + \mathcal { N } ( 0 , I ) \biggr ) } \end{array}$ and $\begin{array} { r } { \tilde { b } ^ { t } = \frac { \sigma _ { b } } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } \hat { b } _ { i } ^ { t } + \mathcal { N } ( 0 , 1 ) \right) + 1 / 2 } \end{array}$ . Noting that $\vert \vert ( \hat { \Delta } _ { i } ^ { t } , \hat { b } _ { i } ^ { t } ) \vert \vert \leq S \triangleq \left( ( C ^ { t } / \sigma _ { \Delta } ) ^ { 2 } + \left( 1 / 2 \sigma _ { b } \right) ^ { 2 } \right) ^ { 1 / 2 }$ , it is clear that the two Gaussian sum queries of Algorithm 1 are equivalent to pre- and post-processing of a single query with sensitivity $S$ and covariance $I$ , or noise multiplier $z = { \overset { \cdot } { 1 } } / s = \overset { \cdot } { \left( z _ { \Delta } ^ { - 2 } + ( 2 \sigma _ { b } ) ^ { - 2 } \right) ^ { - 1 / 2 } }$ Rearranging yields the result.
86
 
 
73
 
74
  # Algorithm 1 DPFedAvg-M with adaptive clipping
75
 
76
+ function $\mathrm { T r a i n } ( m , \gamma , \eta _ { c } , \eta _ { s } , \eta _ { C } , z , \sigma _ { b } , \beta )$ Initialize model $\theta ^ { 0 }$ , clipping bound $C ^ { 0 }$ z∆ ← z−2 − (2σb)−2−1/2 for each round $t = 0 , 1 , 2 , \ldots { \dot { \mathbf { c } } }$ o ${ \mathcal { Q } } ^ { t } \gets$ (sample $m$ users uniformly) for each user $i \in \mathcal { Q } ^ { t }$ in parallel do $\begin{array} { r l } & { \quad ( \Delta _ { i } ^ { t } , b _ { i } ^ { t } ) \gets \mathrm { ~ F e d A v g } ( i , \theta ^ { t } , \eta _ { c } , C ^ { t } ) } \\ & { \sigma _ { \Delta } \gets z _ { \Delta } C ^ { t } } \\ & { \tilde { \Delta } ^ { t } = \frac { 1 } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } \Delta _ { i } ^ { t } + \mathcal { N } ( 0 , I \sigma _ { \Delta } ^ { 2 } ) \right) } \\ & { \bar { \Delta } ^ { t } = \beta \bar { \Delta } ^ { t - 1 } + ( 1 - \beta ) \tilde { \Delta } ^ { t } } \\ & { \theta ^ { t + 1 } \gets \theta ^ { t } + \eta _ { s } \bar { \Delta } ^ { t } } \\ & { \tilde { b } ^ { t } = \frac { 1 } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } b _ { i } ^ { t } + \mathcal { N } ( O , \sigma _ { b } ^ { 2 } ) \right) } \end{array}$
77
 
78
  $C ^ { t + 1 } \gets C ^ { t } \cdot \exp \left( - \eta _ { C } ( \tilde { b } ^ { t } - \gamma ) \right)$ function FedAvg(i, θ0, η, C) θ ← θ0 $\mathcal { G } $ (user i’s local data split into batches) for batch $g \in { \mathcal { G } }$ do $\begin{array} { r l } & { \quad \theta \gets \theta - \eta \nabla \ell ( \theta ; g ) } \\ & { \Delta \gets \theta - \theta ^ { 0 } } \\ & { b \gets \mathbb { I } _ { | | \Delta | | \leq C } } \\ & { \Delta ^ { \prime } \gets \Delta \cdot \operatorname* { m i n } \left( 1 , \frac { C } { | | \Delta | | } \right) } \\ & { \mathrm { ~ r e t u r n } \left( \Delta ^ { \prime } , b \right) } \end{array}$
79
 
80
  ![](images/d1f5d3ef5dfde7726538c717f8da8f80339ce3990f0c0907a44973a4dd5dbc83.jpg)
81
  Figure 2: Evolution of the quantile estimate on data drawn from log-normal distributions. The three plots use data drawn from the exponential of $\mathcal { N } ( 0 . 0 , 1 . 0 )$ , $\mathcal { N } ( \bar { 0 . 0 } , 0 . 1 )$ , and $\mathcal { N } ( \log { 1 0 } , 1 . 0 )$ , respectively. Curves are shown for each of five quantiles: (0.1, 0.3, 0.5, 0.7, 0.9), and the dashed lines show the true value at each quantile. Hyperparameters are as discussed in the text and used in the experiments of Section 3: $\eta _ { C } = 0 . 2 , C ^ { 0 } \stackrel { \sim } { = } 0 . \dot { 1 } , m = 1 0 0 , \sigma _ { b } = m / 2 0$ . After an initial phase of exponential growth, the true quantile is fairly closely tracked. A smaller value of $\eta _ { C }$ would allow more accurate tracking at the cost of slower convergence, but since the quantile value is only used as a heuristic for clipping, a small amount of noise is tolerable. The entire sequence of values estimated for each target quantile satisfy $( 0 . 0 3 4 , n ^ { - 1 . 1 } )$ -differential privacy using RDP composition across the 200 rounds assuming fixed-size samples of $m = 1 0 0$ out of a total population of $\bar { n } = 1 0 ^ { 6 }$ [29].
82
 
83
+ Theorem 1. One step of $D P$ -FedAvg with adaptive clipping using $\sigma _ { b }$ noise standard deviation on the clipped counts $\sum b _ { i } ^ { t }$ and $z _ { \Delta }$ noise multiplier on the vector sums $\sum \Delta _ { i } ^ { t }$ is equivalent (so far as privacy accounting is concerned) to one step of non-adaptive $D P$ -FedAvg with noise multiplier $z$ if we set z∆ = z−2 − (2σb)−2−1/2.
84
 
85
  Proof. We make a conceptual change to the algorithm that does not change the behavior or privacy properties but allows us to analyze each step as if it were a single private Gaussian sum. Instead of sending $( \Delta _ { i } ^ { t } , b _ { i } ^ { t } )$ , each user sends $( \hat { \Delta } _ { i } ^ { t } , \hat { b } _ { i } ^ { t } ) \triangleq \big ( \Delta _ { i } ^ { t } / \sigma _ { \Delta } , ( b _ { i } ^ { t } - \scriptscriptstyle 1 / 2 ) / \sigma _ { b } \big )$ . The server adds noise with covariance $I$ and averages, then reverses the transformation so $\begin{array} { r } { \tilde { \Delta } ^ { t } = \frac { \sigma _ { \Delta } } { m } \biggl ( \sum _ { i \in \mathcal { Q } ^ { t } } \hat { \Delta } _ { i } ^ { t } + \mathcal { N } ( 0 , I ) \biggr ) } \end{array}$ and $\begin{array} { r } { \tilde { b } ^ { t } = \frac { \sigma _ { b } } { m } \left( \sum _ { i \in \mathcal { Q } ^ { t } } \hat { b } _ { i } ^ { t } + \mathcal { N } ( 0 , 1 ) \right) + 1 / 2 } \end{array}$ . Noting that $\vert \vert ( \hat { \Delta } _ { i } ^ { t } , \hat { b } _ { i } ^ { t } ) \vert \vert \leq S \triangleq \left( ( C ^ { t } / \sigma _ { \Delta } ) ^ { 2 } + \left( 1 / 2 \sigma _ { b } \right) ^ { 2 } \right) ^ { 1 / 2 }$ , it is clear that the two Gaussian sum queries of Algorithm 1 are equivalent to pre- and post-processing of a single query with sensitivity $S$ and covariance $I$ , or noise multiplier $z = { \overset { \cdot } { 1 } } / s = \overset { \cdot } { \left( z _ { \Delta } ^ { - 2 } + ( 2 \sigma _ { b } ) ^ { - 2 } \right) ^ { - 1 / 2 } }$ Rearranging yields the result.
86