ZHANGYUXUAN-zR commited on
Commit
07060ff
·
verified ·
1 Parent(s): b12f525

Add files using upload-large-folder tool

Browse files
parse/dev/-70L8lpp9DF/-70L8lpp9DF.md CHANGED
@@ -110,7 +110,7 @@ $$
110
 
111
  and $\begin{array} { r } { \mathbb { E } \left[ K \right] = \frac { 1 / \gamma - 1 } { \log \left( 1 / \gamma \right) } } \end{array}$ .
112
 
113
- This is called the “negative binomial distribution,” since $\begin{array} { r } { \prod _ { \ell = 0 } ^ { k - 1 } \left( \frac { \ell + \eta } { \ell + 1 } \right) = { \binom { k + \eta - 1 } { k } } } \end{array}$ k+η−1k  if we extend the definition of binomial coefficients to non-integer $\eta$ . The distribution is called “truncated” because $\mathbb { P } \left[ K = 0 \right] = 0$ , whereas the standard negative binomial distribution includes 0 in its support. The $\eta = 0$ case $\mathcal { D } _ { 0 , \gamma }$ is known as the “logarithmic distribution”. The $\eta = 1$ case $\mathcal { D } _ { 1 , \gamma }$ is simply the geometric distribution. Next, we state our main privacy result for this distribution.
114
 
115
  Theorem 2 (Main Privacy Result – Truncated Negative Binomial). Let $Q : { \mathcal { X } } ^ { n } { \mathcal { Y } }$ be a randomized algorithm satisfying $( \lambda , \varepsilon )$ -RDP and $( \hat { \lambda } , \hat { \varepsilon } )$ -RDP for some $\varepsilon , \hat { \varepsilon } \geq 0$ , $\lambda \in ( 1 , \infty )$ , and $\hat { \lambda } \in [ 1 , \infty )$ . 4 Assume $\mathcal { V }$ is totally ordered.
116
 
 
110
 
111
  and $\begin{array} { r } { \mathbb { E } \left[ K \right] = \frac { 1 / \gamma - 1 } { \log \left( 1 / \gamma \right) } } \end{array}$ .
112
 
113
+ This is called the “negative binomial distribution,” since $\begin{array} { r } { \prod _ { \ell = 0 } ^ { k - 1 } \left( \frac { \ell + \eta } { \ell + 1 } \right) = { \binom { k + \eta - 1 } { k } } } \end{array}$ k+η−1k  if we extend the definition of binomial coefficients to non-integer $\eta$ . The distribution is called “truncated” because $\mathbb { P } \left[ K = 0 \right] = 0$ , whereas the standard negative binomial distribution includes 0 in its support. The $\eta = 0$ case $\mathcal { D } _ { 0 , \gamma }$ is known as the “logarithmic distribution”. The $\eta = 1$ case $\mathcal { D } _ { 1 , \gamma }$ is simply the geometric distribution. Next, we state our main privacy result for this distribution.
114
 
115
  Theorem 2 (Main Privacy Result – Truncated Negative Binomial). Let $Q : { \mathcal { X } } ^ { n } { \mathcal { Y } }$ be a randomized algorithm satisfying $( \lambda , \varepsilon )$ -RDP and $( \hat { \lambda } , \hat { \varepsilon } )$ -RDP for some $\varepsilon , \hat { \varepsilon } \geq 0$ , $\lambda \in ( 1 , \infty )$ , and $\hat { \lambda } \in [ 1 , \infty )$ . 4 Assume $\mathcal { V }$ is totally ordered.
116
 
parse/dev/IJNDyqdRF0m/IJNDyqdRF0m.md CHANGED
@@ -42,10 +42,10 @@ where $\alpha \left( x \right) = 1 - \exp ( - x )$ , and $\delta _ { k } = t _ {
42
 
43
  # 3.2 Pre-trained Models and Zero-shot Segmentation of Images
44
 
45
- Most semantic segmentation models pre-define a closed set of labels, and cannot flexibly change the segmentation categories or boundaries without supervised training. In contrast, zero-shot semantic segmentation predicts target regions given open-set queries. Li et al. [44] proposes LSeg, a model to feature field f and the pretrained text encoder f . Specifically, probability of a label l of a point x in 2 2Rperform zero-shot semantic segmentation by aligning pixel-level features and a text query feature. 182 the 3D space, p(l x), are predicted by dot product of the 3D feature f (x) and text label feature fq(l) = Lp + Lf , Lp = C (r) C(r) 2 , Lf = F(r) fimg(I, r) 1 , (4)4LSeg employs an image feature encoder with the DPT architecture [71] and a CLIP-based text label 183 followed by softmax: 5stency. In addition, importantly for user-friendly interactive editing, w52R 2Rfeature encoder [69], trained via large-scale language-image contrastive learning. The probability of a text label $l$ 4given a pixel $r$ in an image $I$ , $\mathbf { p } ( l | I , r )$ T 4, is then calculated via dot product of pixel-level image feature ${ \bf f } _ { \mathrm { i m g } } ( I , r )$ p(l|x) = Pand queried text feature ${ \bf f } _ { \mathrm { q } } ( l )$ q T . followed by a softmax:
46
 
47
  ![](images/01c5d617234d256546d0bd2a253fa5222d00322fa46decdbdcc409fa1bb32e21.jpg)
48
- as distillation from 2D teacher network to 3D student 4122 k k+1 k ˆ 214 breaks 3D consistency. In addition, importantly f214 breaks 3D consistency. In addition, importantly for usemize f through SGD on minimizing the difference between rendered features F (r) andLp = X Cˆ (r) C(r) , Lf = X Fˆ(r) fimg(I, r) , (4)iginal NeRF [46] for the training objective and the volume rendering strategy. Inps://huggingface.co/sentence-transformers/clip-ViT-B-32-multilingual-v1Figure 1: Left: A Distilled Feature Field (DFF) maps a coordinate x and a viewing direction d to ll this mode 124 work via ther2Rs Fˆ (r) anddensity $\sigma$ eural Perceptual Fields (NePeRF). els and ground-truth pixels of real images. nconsistent supervision with noise could harm reconstruction quality of geometry, although the lume rendering trick. We call this model distilled feature field (DFF).r2Re teacher’s outputs f (I, r). For volume rendering, we use two 4184 , color c, and feature f . It is trained by minimizing the difference between rendered features sformers/clip-ViT-B-32-multilingual-v1178 effect seems negligible in preliminary experiments. d at any 3D point without limiting resolution, so naturally used tog41 It is an interesting direction to introduce view de1 It is an interesting direction to introduce view dependehe original NeRF [46] for the training objective and the volume rendering strategy. Inume rendering with coarse-and-fine hierarchical sampling as well as the original185 and feature loss Lf , in total, L:and features as predicted by a pre-trained image feature encoder, as well as the rendered color and 3t is an interesting direction to introduce view dependency to the segmentation for discriminating view-dependent query like referring expressions (e.g., “the chdependent query like referring expressions (e.g., “the chair lef the photometric loss, we add a new objective for minimizing the difference betweenˆ 4 pLf , in total, L: 2ground-truth pixel color. Right: At test time, we may decompose and edit 3D space via selecting and 4 179 4.2 Query-based Decomposition and Editingdent query like referring expressions (e.g., “the chair left to the table” 2020, Liu et img or volume rendering with coarse-and-fine hierarchical sampling as well as the originalX ˆ 2 X ˆ L = Lp + Lf , Lp manipulating different 3D regions with a variety of queries.
49
 
50
  $$
51
  { \bf p } ( l | I , r ) = \frac { \exp ( { \bf f } _ { \mathrm { i m g } } ( I , r ) { \bf f } _ { \mathrm { q } } ( l ) ^ { \mathrm { T } } ) } { \sum _ { l ^ { \prime } \in \mathcal { L } } \exp ( { \bf f } _ { \mathrm { i m g } } ( I , r ) { \bf f } _ { \mathrm { q } } ( l ^ { \prime } ) ^ { \mathrm { T } } ) } ,
 
42
 
43
  # 3.2 Pre-trained Models and Zero-shot Segmentation of Images
44
 
45
+ Most semantic segmentation models pre-define a closed set of labels, and cannot flexibly change the segmentation categories or boundaries without supervised training. In contrast, zero-shot semantic segmentation predicts target regions given open-set queries. Li et al. [44] proposes LSeg, a model to feature field f and the pretrained text encoder f . Specifically, probability of a label l of a point x in 2 2Rperform zero-shot semantic segmentation by aligning pixel-level features and a text query feature. 182 the 3D space, p(l x), are predicted by dot product of the 3D feature f (x) and text label feature fq(l) = Lp + Lf , Lp = C (r) C(r) 2 , Lf = F(r) fimg(I, r) 1 , (4)4LSeg employs an image feature encoder with the DPT architecture [71] and a CLIP-based text label 183 followed by softmax: 5stency. In addition, importantly for user-friendly interactive editing, w52R 2Rfeature encoder [69], trained via large-scale language-image contrastive learning. The probability of a text label $l$ 4given a pixel $r$ in an image $I$ , $\mathbf { p } ( l | I , r )$ T 4, is then calculated via dot product of pixel-level image feature ${ \bf f } _ { \mathrm { i m g } } ( I , r )$ p(l|x) = Pand queried text feature ${ \bf f } _ { \mathrm { q } } ( l )$ q T . followed by a softmax:
46
 
47
  ![](images/01c5d617234d256546d0bd2a253fa5222d00322fa46decdbdcc409fa1bb32e21.jpg)
48
+ as distillation from 2D teacher network to 3D student 4122 k k+1 k ˆ 214 breaks 3D consistency. In addition, importantly f214 breaks 3D consistency. In addition, importantly for usemize f through SGD on minimizing the difference between rendered features F (r) andLp = X Cˆ (r) C(r) , Lf = X Fˆ(r) fimg(I, r) , (4)iginal NeRF [46] for the training objective and the volume rendering strategy. Inps://huggingface.co/sentence-transformers/clip-ViT-B-32-multilingual-v1Figure 1: Left: A Distilled Feature Field (DFF) maps a coordinate x and a viewing direction d to ll this mode 124 work via ther2Rs Fˆ (r) anddensity $\sigma$ eural Perceptual Fields (NePeRF). els and ground-truth pixels of real images. nconsistent supervision with noise could harm reconstruction quality of geometry, although the lume rendering trick. We call this model distilled feature field (DFF).r2Re teacher’s outputs f (I, r). For volume rendering, we use two 4184 , color c, and feature f . It is trained by minimizing the difference between rendered features sformers/clip-ViT-B-32-multilingual-v1178 effect seems negligible in preliminary experiments. d at any 3D point without limiting resolution, so naturally used tog41 It is an interesting direction to introduce view de1 It is an interesting direction to introduce view dependehe original NeRF [46] for the training objective and the volume rendering strategy. Inume rendering with coarse-and-fine hierarchical sampling as well as the original185 and feature loss Lf , in total, L:and features as predicted by a pre-trained image feature encoder, as well as the rendered color and 3t is an interesting direction to introduce view dependency to the segmentation for discriminating view-dependent query like referring expressions (e.g., “the chdependent query like referring expressions (e.g., “the chair lef the photometric loss, we add a new objective for minimizing the difference betweenˆ 4 pLf , in total, L: 2ground-truth pixel color. Right: At test time, we may decompose and edit 3D space via selecting and 4 179 4.2 Query-based Decomposition and Editingdent query like referring expressions (e.g., “the chair left to the table” 2020, Liu et img or volume rendering with coarse-and-fine hierarchical sampling as well as the originalX ˆ 2 X ˆ L = Lp + Lf , Lp manipulating different 3D regions with a variety of queries.
49
 
50
  $$
51
  { \bf p } ( l | I , r ) = \frac { \exp ( { \bf f } _ { \mathrm { i m g } } ( I , r ) { \bf f } _ { \mathrm { q } } ( l ) ^ { \mathrm { T } } ) } { \sum _ { l ^ { \prime } \in \mathcal { L } } \exp ( { \bf f } _ { \mathrm { i m g } } ( I , r ) { \bf f } _ { \mathrm { q } } ( l ^ { \prime } ) ^ { \mathrm { T } } ) } ,
parse/dev/zGvRdBW06F5/zGvRdBW06F5.md CHANGED
@@ -70,7 +70,7 @@ $$
70
  \tilde { \bf G } _ { \bar { \bf W } } = { \bf G } _ { \bar { \bf W } } \cdot s _ { \bf W } ^ { - 2 } , \quad \tilde { \bf G } _ { \bar { \bf b } } = { \bf G } _ { \bar { \bf b } } \cdot s _ { \bf W } ^ { - 2 } \cdot s _ { \bf x } ^ { - 2 } = { \bf G } _ { \bar { \bf b } } \cdot s ^ { - 2 }
71
  $$
72
 
73
- where s2X is the scaling factor for quantizing input $\mathbf { x }$ (a scalar following [34], note that $s = s _ { \mathbf { W } } \cdot s _ { \mathbf { x } }$ in Equation 1). We plot the $\lVert \mathbf { W } \rVert / \lVert \mathbf { G } \rVert$ curve with QAS in Figure 3 ( $\mathrm { i n t } 8 { + }$ scale). After scaling, the gradient ratios match the floating-point counterpart. QAS enables fully quantized training (int8 for both forward and backward) while matching the accuracy of the floating-point training (Table 1).
74
 
75
  # 2.2 Memory-Efficient Sparse Update
76
 
@@ -82,7 +82,7 @@ However, finding the right sparse update scheme under a memory budget is challen
82
 
83
  ![](images/b73d7eea96e91e24b83597fc49f898c04a88bfd9648656f4adafa4743d487f36.jpg)
84
 
85
- Figure C ribu on analysis o pdating ses and wei a) For as update, the accuracy generally goes higher as more layers are updated, but plateaus soon. (b) For updating the weight of a specific layer, the laterbackward & update layers appear to be more important; the first point-wise conv (pw1) in an inverted bottleneck block [60] appears(a) backward graph gen (b) graph pruning (c) graph reordering (d) deploy to be more important; and the gains are bigger with more channels updated. (c) The automated selection based on contribution analysis is effective: the actual downstream accuracy shows a positive correlation with $\scriptstyle \sum$ acc.
86
 
87
  ![](images/439dc735f635b7565c542442e4ae34148ae9b001b5fe0108411ff379933e52be.jpg)
88
  Figure 6. The workflow of our Tiny Training Engine (TTE). (a,b) Our engine traces the forward graph for a given model and derives the corresponding backward graph at compile time. The red cycles denote the gradient descent operators. (c) To reduce memory requirements, nodes related with frozen weights (colored in light blue) are pruned from backward computation. (d) To minimize memory footprint, the gradient descent operators are re-ordered to be interlaced with backward computations (colored in yellow). (e) TTE compiles forward and backward graphs using code generation and deploys training on tiny IoT devices (best viewed in colors).
@@ -153,7 +153,7 @@ Tiny Training Engine: faster training. We further measure the training latency p
153
 
154
  Dissecting update schedules. We visualize the update schedule of the MCUNet [47] model searched under 100KB extra memory (analytic) in Figure 11 (lower subfigure (b), with 10 classes). It updates the biases of the last 22 layers, and sparsely updates the weights of 6 layers (some are sub-tensor update). The initial 20 layers are frozen and run forward only. To understand why this scheme makes sense, we also plot the memory cost from activation and weight when updating each layer in the upper subfigure (a). We see a clear pattern: the activation cost is high for the initial layers; the weight cost is high for the ending layers; while the total memory cost is low when we update the middle layers (layer index 18-30). The update scheme matches the memory pattern: to skip the initial stage of high activation memory, we only update biases of the later stage of the network; we update the weights of 4 intermediate layers due to low overall memory cost; we also update the partial weights of two later layers (1/8 and 1/4 weights) due to their high contribution to the downstream accuracy (Figure 5). Interestingly, all the updated weights are from the first point-wise convolution in each inverted residual block [60] as they generally have a higher contribution to accuracy (the peak points on the zigzag curve in Figure 5(b)).
155
 
156
- Effectiveness of contribution analysis. We verify if the update scheme search based on contribution analysis is effective. We collect several data points during the search process (the update scheme and the search criteria, i.e., the sum of acc). We train the model with each update scheme to get the average accuracy on the downstream datasets (the real optimization target) and plot the comparison in Figure 5(c). We observe a positive correlation, indicating the effectiveness of the search.
157
 
158
  Sub-channel selection. Similar to weight pruning, we need to select the subset of channels for sub-tensor update. We update the last two blocks of the MCUNet [47] model and only 1/4 of the weights for each layer to compare the accuracy of different channel selection methods (larger magnitude, smaller magnitude, and random). The results are quite similar (within $0 . 2 \%$ accuracy difference). Channel selection is not very important for transfer learning (unlike pruning). We choose to update the channels with a larger weight magnitude since it has slightly higher accuracy.
159
 
 
70
  \tilde { \bf G } _ { \bar { \bf W } } = { \bf G } _ { \bar { \bf W } } \cdot s _ { \bf W } ^ { - 2 } , \quad \tilde { \bf G } _ { \bar { \bf b } } = { \bf G } _ { \bar { \bf b } } \cdot s _ { \bf W } ^ { - 2 } \cdot s _ { \bf x } ^ { - 2 } = { \bf G } _ { \bar { \bf b } } \cdot s ^ { - 2 }
71
  $$
72
 
73
+ where s2X is the scaling factor for quantizing input $\mathbf { x }$ (a scalar following [34], note that $s = s _ { \mathbf { W } } \cdot s _ { \mathbf { x } }$ in Equation 1). We plot the $\lVert \mathbf { W } \rVert / \lVert \mathbf { G } \rVert$ curve with QAS in Figure 3 ( $\mathrm { i n t } 8 { + }$ scale). After scaling, the gradient ratios match the floating-point counterpart. QAS enables fully quantized training (int8 for both forward and backward) while matching the accuracy of the floating-point training (Table 1).
74
 
75
  # 2.2 Memory-Efficient Sparse Update
76
 
 
82
 
83
  ![](images/b73d7eea96e91e24b83597fc49f898c04a88bfd9648656f4adafa4743d487f36.jpg)
84
 
85
+ Figure C ribu on analysis o pdating ses and wei a) For as update, the accuracy generally goes higher as more layers are updated, but plateaus soon. (b) For updating the weight of a specific layer, the laterbackward & update layers appear to be more important; the first point-wise conv (pw1) in an inverted bottleneck block [60] appears(a) backward graph gen (b) graph pruning (c) graph reordering (d) deploy to be more important; and the gains are bigger with more channels updated. (c) The automated selection based on contribution analysis is effective: the actual downstream accuracy shows a positive correlation with $\scriptstyle \sum$ acc.
86
 
87
  ![](images/439dc735f635b7565c542442e4ae34148ae9b001b5fe0108411ff379933e52be.jpg)
88
  Figure 6. The workflow of our Tiny Training Engine (TTE). (a,b) Our engine traces the forward graph for a given model and derives the corresponding backward graph at compile time. The red cycles denote the gradient descent operators. (c) To reduce memory requirements, nodes related with frozen weights (colored in light blue) are pruned from backward computation. (d) To minimize memory footprint, the gradient descent operators are re-ordered to be interlaced with backward computations (colored in yellow). (e) TTE compiles forward and backward graphs using code generation and deploys training on tiny IoT devices (best viewed in colors).
 
153
 
154
  Dissecting update schedules. We visualize the update schedule of the MCUNet [47] model searched under 100KB extra memory (analytic) in Figure 11 (lower subfigure (b), with 10 classes). It updates the biases of the last 22 layers, and sparsely updates the weights of 6 layers (some are sub-tensor update). The initial 20 layers are frozen and run forward only. To understand why this scheme makes sense, we also plot the memory cost from activation and weight when updating each layer in the upper subfigure (a). We see a clear pattern: the activation cost is high for the initial layers; the weight cost is high for the ending layers; while the total memory cost is low when we update the middle layers (layer index 18-30). The update scheme matches the memory pattern: to skip the initial stage of high activation memory, we only update biases of the later stage of the network; we update the weights of 4 intermediate layers due to low overall memory cost; we also update the partial weights of two later layers (1/8 and 1/4 weights) due to their high contribution to the downstream accuracy (Figure 5). Interestingly, all the updated weights are from the first point-wise convolution in each inverted residual block [60] as they generally have a higher contribution to accuracy (the peak points on the zigzag curve in Figure 5(b)).
155
 
156
+ Effectiveness of contribution analysis. We verify if the update scheme search based on contribution analysis is effective. We collect several data points during the search process (the update scheme and the search criteria, i.e., the sum of acc). We train the model with each update scheme to get the average accuracy on the downstream datasets (the real optimization target) and plot the comparison in Figure 5(c). We observe a positive correlation, indicating the effectiveness of the search.
157
 
158
  Sub-channel selection. Similar to weight pruning, we need to select the subset of channels for sub-tensor update. We update the last two blocks of the MCUNet [47] model and only 1/4 of the weights for each layer to compare the accuracy of different channel selection methods (larger magnitude, smaller magnitude, and random). The results are quite similar (within $0 . 2 \%$ accuracy difference). Channel selection is not very important for transfer learning (unlike pruning). We choose to update the channels with a larger weight magnitude since it has slightly higher accuracy.
159