ZHANGYUXUAN-zR commited on
Commit
ba7626d
·
verified ·
1 Parent(s): 4156d9f

Add files using upload-large-folder tool

Browse files
parse/train/HkMCybx0-/HkMCybx0-.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # IMPROVING DEEP LEARNING BY INVERSE SQUARE ROOT LINEAR UNITS (ISRLUS)
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We introduce the “inverse square root linear unit” (ISRLU) to speed up learning in deep neural networks. ISRLU has better performance than ELU but has many of the same benefits. ISRLU and ELU have similar curves and characteristics. Both have negative values, allowing them to push mean unit activation closer to zero, and bring the normal gradient closer to the unit natural gradient, ensuring a noiserobust deactivation state, lessening the over fitting risk. The significant performance advantage of ISRLU on traditional CPUs also carry over to more efficient HW implementations on HW/SW codesign for CNNs/RNNs. In experiments with TensorFlow, ISRLU leads to faster learning and better generalization than ReLU on CNNs. This work also suggests a computationally efficient variant called the “inverse square root unit” (ISRU) which can be used for RNNs. Many RNNs use either long short-term memory (LSTM) and gated recurrent units (GRU) which are implemented with tanh and sigmoid activation functions. ISRU has less computational complexity but still has a similar curve to tanh and sigmoid.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Two popular activation functions for neural networks are the rectified linear unit (ReLU) (Glorot et al., 2011) and the exponential linear unit (ELU) (Clevert et al., 2015). The ReLU activation function is the identity for positive arguments and zero otherwise. The ELU activation function is the identity for positive arguments and has an exponential asymptotic approach to -1 for negative values.
12
+
13
+ From previous analysis of the Fisher optimal learning, i.e., the natural gradient (Amari, 1998; Clevert et al., 2015), we can reduce the undesired bias shift effect without the natural gradient, either by centering the activation of incoming units at zero or by using activation functions with negative values. We introduce the inverse square root linear unit (ISRLU), an activation function like ELU, that has smoothly saturating negative values for negative arguments, and the identity for positive arguments. In addition this activation function can be more efficiently implemented than ELU in a variety of software or purpose-built hardware.
14
+
15
+ # 2 INVERSE SQUARE ROOT LINEAR UNIT (ISRLU)
16
+
17
+ The inverse square root linear unit (ISRLU) with $\alpha$ is
18
+
19
+ $$
20
+ f ( x ) = \left\{ \begin{array} { l l } { x } & { \mathrm { i f ~ } x \geq 0 } \\ { x \left( \frac { 1 } { \sqrt { 1 + \alpha x ^ { 2 } } } \right) } & { \mathrm { i f ~ } x < 0 } \end{array} , \right. \qquad f ^ { \prime } ( x ) = \left\{ \begin{array} { l l } { 1 } & { \mathrm { i f ~ } x \geq 0 } \\ { \left( \frac { 1 } { \sqrt { 1 + \alpha x ^ { 2 } } } \right) ^ { 3 } } & { \mathrm { i f ~ } x < 0 } \end{array} \right.
21
+ $$
22
+
23
+ The ISRLU hyperparameter $\alpha$ controls the value to which an ISRLU saturates for negative inputs (see Fig. 1). ISRLUs and ELUs have very similar curves so at a high level one would expect to see the same general characteristics in most cases. ISRLUs have smooth and continuous first and second derivatives. ELUs are only continuous in the first derivative (see Fig. 1). In contrast, ReLU is non-differentiable at zero. Since ISRLUs and ELUs share most of the same characteristics we use the same weight initialization guidelines as are used for ELUs (Clevert et al., 2015)).
24
+
25
+ ![](images/b0bf76b886af47ff979f04846e225dbfea56978920c35dff134794223ce6a37c.jpg)
26
+ Figure 1: The inverse square root linear unit (ISRLU), ISRLU $( \alpha = 1 ; \alpha = 3 )$ ), ELU $( \alpha = 1 )$ ), and ReLU; and their first derivatives.
27
+
28
+ The primary advantage of ISRLU is in its reduced computational complexity compared to ELU. Inverse square roots are faster to calculate than exponentials. When calculating ISRLU for negative inputs, first one calculates $1 / \sqrt { 1 + \alpha x ^ { 2 } }$ . Multiplying this function by $x$ provides the value for the forward calculation. Multiplying this function by itself twice (i.e. cubing) provides the value for back-propagation.
29
+
30
+ With $\alpha = 1$ , ISRLU saturation approaches -1. With $\alpha = 3$ , the negative saturation is reduced, so a smaller portion of the back-propagated error signal will pass to the next layer. This allows the network to output sparse activations while preserving its ability to reactivate dead neurons. Note that under variations of the $\alpha$ parameter, the ISRLU curve and its derivative remain smooth and continuous. Future work will establish what deeper saturation $( \alpha < 1 )$ ) is appropriate when applying ISRLU to self-normalizing neural networks (Klambauer et al., 2017).
31
+
32
+ In the same manner as parametric ReLUs (PReLUs) only one additional hyperparameter is required and methods can be used to directly learn its value during back-propagation (He et al., 2015). Similarly, ISRLU’s $\alpha$ can be learned during the training phase along with the weights and biases. Indeed for PReLUs, He et al. (2015) have empirically shown that learning the slope parameter “a” gives better performance than manually setting it to a pre-defined value.
33
+
34
+ # 3 ACTIVATION FUNCTION PERFORMANCE
35
+
36
+ Shah et al. (2016) showed that ELU was faster than the combination of ReLU and Batch Normalization for deep neural network (DNN) ResNet architectures. On CIFAR-10 and CIFAR-100 they showed that ELU not only speeds up learning but also improves the accuracy as the depth of the convolutional neural network (CNN) increases.
37
+
38
+ More than learning rate needs to be considered when evaluating the overall performance of CNNs. The amount of time and computational resources required to perform both the convolutions and activation functions combined should be considered.
39
+
40
+ The trend in CNNs is that less time is being spent calculating convolutions. There are three factors that we are seeing. First is that small convolution filters such as 5x5 or $3 { \tt X } 3$ filters are the basis of many architectures. Second, architectures as Inception-v3 and Inception-v4 now decompose 2d filters such as a 3x3 into a 3x1 filter and a 1x3 filter (Szegedy et al., 2016). Third, more efficient calculations of convolution that rely on techniques such as Winograd’s minimal filtering algorithm (Lavin & Gray, 2016; Winograd, 1980) are being used for 3x3 and smaller filters as are FFTs to reduce calculation time in 5x5 or larger filters. All of these techniques reduce the amount of calculations for each element in the convolution output.
41
+
42
+ Table 1 shows “cycles per output element” for an Intel Xeon Platinum 8160 (Skylake).
43
+
44
+ Table 1: Computational complexity of various filter sizes
45
+
46
+ <table><tr><td>Convolution</td><td>FP Multiplies</td><td>FP Adds</td><td>Cycles per output element (CPE)</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>5x5</td><td>25 9</td><td>24 8</td><td>~4.25 ~1.53</td></tr><tr><td>3x3</td><td></td><td>2</td><td></td></tr><tr><td>3x1,1x3 Inception-v3, -v4</td><td>3</td><td></td><td>~0.51</td></tr></table>
47
+
48
+ Due to all of these reductions in convolution computational complexity, activation function performance is now a greater part of overall learning performance.
49
+
50
+ Another characteristic that is changing with the use of smaller filters is the decrease in the compute intensity (Carlile, 1993a;b), which raises the importance of memory systems performance for CNNs. The compute intensity of an algorithm is the ratio of the number of operations divided by number of words accessed. For a given algorithm it is straightforward to calculate the upper bound of the computation rate that can be supported on a given memory bandwidth.
51
+
52
+ # 3.1 ACTIVATION FUNCTION IMPLEMENTATION
53
+
54
+ The main advantage of ISRLU over ELU is that it is based on the inverse square root, which has been faster to evaluate than the exponential for many generations of systems. In the past, whenever it has not been faster, optimization potentials for inverse square root implementation improvement have been found. It is instructive to understand the current CPU performance of the inverse square root intrinsic performance compared to exponentials and tanh.
55
+
56
+ Intel $\mathbf { \boldsymbol { x } } 8 6$ CPUs with SIMD instructions have vector intrinsic functions to accelerate performance. Intel publishes CPE (Clocks per Element) for various vector functions on their “Vector Mathematics (VM) Performance and Accuracy Data” website, see Table 2 (Intel, 2017).
57
+
58
+ Table 2: CPU performance on vector inverse square root, Exp, Tanh (x86).
59
+
60
+ <table><tr><td>Vector Function Single Precision (EP)</td><td>Intel Xeon E5-2699 v3 (Haswell AVX2)</td><td>Intel Xeon E5-2699 v4 (Broadwell AVX2)</td><td>Intel Xeon Platinum 8180 (Skylake AVX-512)</td></tr><tr><td>InvSqrt</td><td>0.66</td><td>0.64</td><td>0.24</td></tr><tr><td>Exp</td><td>0.81</td><td>0.89</td><td>0.52</td></tr><tr><td>Tanh</td><td>4.19</td><td>4.43</td><td>0.78</td></tr><tr><td>Exp/InvSqrt</td><td>1.2×</td><td>1.4×</td><td>2.2×</td></tr><tr><td>Tanh/InvSqrt</td><td>6.3×</td><td>6.9×</td><td>3.3×</td></tr><tr><td></td><td></td><td></td><td></td></tr></table>
61
+
62
+ For example, on a 3x1 filter using ELU in the negative region, approximately the same CPE is required to evaluate the convolution as is required for the exponential (cf. Table 1 and Table 2). Improvements in activation function performance will impact overall time spent in each learning step.
63
+
64
+ We measured the vector performance of AVX2 implementations for the various activation functions.
65
+ The dataset used was $50 \%$ negative and $50 \%$ positive. Results are shown in Table 3.
66
+
67
+ Table 3: Vector ISRLU, ISRU, ELU, and ReLU performance on AVX2 (Intel Core i7-7700 Processor [3.60 GHz “Kaby Lake”] ).
68
+
69
+ <table><tr><td>Activation Function Single Precision</td><td>nsec/ element</td><td>ISRLU Perf Advantage</td><td>ISRLU (approx.) Perf Advantage</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>ReLU</td><td>0.340</td><td>0.62×</td><td>0.99×</td></tr><tr><td>ISRU (approx.)</td><td>0.334 0.344</td><td>0.61× 0.62×</td><td>0.97× 1.00×</td></tr><tr><td>ISRLU (approx.) ISRLU</td><td>0.551</td><td>1.00×</td><td>1.60×</td></tr><tr><td>ELU</td><td>1.447</td><td>2.63×</td><td>4.21×</td></tr></table>
70
+
71
+ These results show that ISRLU ( $\alpha = 1 . 0 $ ) is $2 . 6 \times$ faster than ELU. The fast approximation of ISRLU is within $1 \%$ of the evaluation speed of ReLU while still retaining all of the desired learning curve properties mentioned in this paper. This fast approximation for ISRLU on this processor has only $\bar { 3 } \times 1 0 ^ { - 4 }$ maximum relative error ${ \sim } 1 1 . 6$ accurate bits). One Newton-Raphson iteration doubles that to ${ \sim } 2 3 . 4$ accurate bits out of the 24 bits of mantissa, and two iterations achieves full precision. We plan to evaluate if the fast approximation has similar learning rates of the full precision ISRLU.
72
+
73
+ # 3.2 A PRACTICAL TRICK FOR INVERSE SQUARE ROOT CALCULATION
74
+
75
+ It is instructive to look at a practical trick for the computation of the inverse square root as it may serve as inspiration for those implementing ISRLU in hardware. Software implementations on CPUs can take advantage of floating-point formats for faster evaluation of the inverse square root. John Carmack and Terje Mathisen are often associated with implementing fast inverse square root in 2002 (Lomont, 2003). In 1986, one of the authors of this paper originally invented this method, which was called “The K Method,” to implement vector square root for the production FPS T Series Hypercube Supercomputer (Gustafson, 1986). William Kahan and K.C. $\mathrm { N g }$ at Berkeley also independently discovered this around 1986.
76
+
77
+ Carmack & Mathisen only used one iteration of the Newton method after their fast approximation. One iteration had an error of approximately $0 . 1 7 5 \%$ , which was suitable for their graphics applications. Since various piecewise functions have been used to approximate activation functions for CNNs and RNNs, part of our future research will look into if fast approximations to ISRLUs are suitable for DNNs.
78
+
79
+ Another avenue to look at for hardware implementations of the inverse square root is table-lookup hardware. Our expectation is that an efficient hardware approximation for the inverse square root should take about the same execution time as a fused multiply and add (FMA).
80
+
81
+ # 4 EXPERIMENTS USING ISRLUS
82
+
83
+ We used TensorFlow (Abadi et al., 2016) to train a CNN on the (Lecun) MNIST dataset. We tested the MNIST gray images in 10 classes, 60k train and $1 0 \mathrm { k }$ test.
84
+
85
+ The first CNN architecture (see Table 4) in our experiments used $2 8 \mathbf { x } 2 8$ input, a convolutional layer with 6x6 with 6 feature maps, a convolutional layer with $5 \mathrm { x } 5$ with 12 feature maps, a convolutional layer with $4 \mathbf { x } 4$ with 24 feature maps, a fully connected layer of 1176 hidden units, and a softmax output layer with 10 units. Only a full-precision ISRLU was used in these initial tests due to time constraints.
86
+
87
+ Convolutional neural networks with ISRLUs ( $\alpha = 1 . 0$ , $\alpha = 3 . 0$ ), ELUs $( \alpha = 1 . 0 $ ), and ReLUs were trained on the MNIST digit classification dataset while each hidden units activation was tracked. Each network was trained for 17 epochs by using ADAM optimizer with learning rate 0.003 exponentially decreasing to 0.0001 and mini-batches of size 100. The weights have been initialized to truncated normal with standard deviation 0.1. The training error of ISRLU networks decreases much more rapidly than for the other networks. We also calculated the final cross-entropy loss function for each test.
88
+
89
+ Table 4: Architecture 1 on MNIST with test accuracy and cross-entropy loss with different activation functions.
90
+
91
+ <table><tr><td>Activation Function</td><td>DropOut pkeep</td><td>Max Test Accuracy</td><td>Cross-Entropy Loss</td></tr><tr><td></td><td></td><td></td><td>2.308</td></tr><tr><td>ISRLU α= 3.0 ELU</td><td>0.25 0.40</td><td>99.30 99.29</td><td>2.395</td></tr><tr><td>ISRLU α = 3.0</td><td>0.40</td><td>99.27</td><td>2.530</td></tr><tr><td>ReLU</td><td>0.40</td><td>99.22</td><td>2.644</td></tr><tr><td>ISRLU α = 1.0</td><td>0.40</td><td>99.20</td><td>2.785</td></tr><tr><td>ReLU</td><td>0.25</td><td>99.17</td><td>2.798</td></tr><tr><td>ELU</td><td>0.25</td><td>99.09</td><td>2.892</td></tr><tr><td>ISRLU α = 1.0</td><td>0.25</td><td>99.00</td><td>3.124</td></tr></table>
92
+
93
+ The second CNN architecture (see Table 5) in our experiments used $2 8 \mathbf { x } 2 8$ input, a convolutional layer with $3 { \tt X } 3$ with 64 feature maps, a convolutional layer with $3 { \tt X } 3$ with 64 feature maps, $2 \mathbf { x } 2$ Maxpooling, DropOut, a convolutional layer with 3x3 with 64 feature maps, a convolutional layer with 3x3 with 64 feature maps, 2x2 Maxpooling, DropOut, a fully connected (FC) layer of 512 hidden units, and a softmax output layer with 10 units. Full-precision ISRLU was used.
94
+
95
+ Convolutional neural networks with ISRLUs ( $\alpha = 1 . 0$ , $\alpha = 3 . 0$ ) and ELUs ( $\alpha = 1 . 0$ ) were trained on the MNIST digit classification dataset while each hidden units activation was tracked. The network was trained for 20 epochs by using ADAM optimizer with learning rate 0.003 exponentially decreasing to 0.0001 and mini-batches of size 100. The weights have been initialized to truncated normal with standard deviation 0.1.
96
+
97
+ Table 5: Architecture 2 on MNIST with test accuracy and cross-entropy loss with different activation functions.
98
+
99
+ <table><tr><td>Activation Function</td><td>DropOut pkeep</td><td>Max Test Accuracy</td><td>Cross-Entropy Loss</td></tr><tr><td>ISRLU α = 1.0</td><td>0.7 conv 0.4 FC</td><td>99.32</td><td>2.334</td></tr><tr><td>ISRLU α= 3.0</td><td>0.7 conv 0.4 FC</td><td>99.30</td><td>2.389</td></tr><tr><td>ELU</td><td>0.7 conv 0.4 FC</td><td>99.29</td><td>2.225</td></tr></table>
100
+
101
+ We did not expect significant differences in accuracy in ISRLU and ELU in this test of shallow networks due to the similar nature of the curves. The cross-entropy loss was reasonable, at between 2 and 3.2 for all activation functions. Future testing will be done on deeper networks where we expect larger advantages that are similar to ELU (Clevert et al., 2015; Shah et al., 2016).
102
+
103
+ # 5 INVERSE SQUARE ROOT UNIT (ISRU)
104
+
105
+ The work with ISRLU in this paper suggests that the inverse square root unit (ISRU) may be useful for a variety of neural networks. ISRUs are defined as:
106
+
107
+ $$
108
+ f ( x ) = x \left( { \frac { 1 } { \sqrt { 1 + \alpha x ^ { 2 } } } } \right) , \qquad f ^ { \prime } ( x ) = \left( { \frac { 1 } { \sqrt { 1 + \alpha x ^ { 2 } } } } \right) ^ { 3 }
109
+ $$
110
+
111
+ In RNNs that use LSTM (Hochreiter & Schmidhuber, 1997) and GRU (Chung et al., 2014), the most common activation functions are sigmoid and tanh. We assert that ISRUs can be more efficient calculation than tanh and be more efficient than sigmoid when properly shifted and scaled. As shown above in Table 2, the inverse square root is $3 \mathbf { x }$ to 6x faster than tanh (depending on $\mathbf { \boldsymbol { x } } 8 6$ architecture). ISRUs will be an area of our future research.
112
+
113
+ ![](images/de181dbe6ee3503dc1cfa42f51aea24b2d6b48deef4412c03c493f099d875135.jpg)
114
+ Figure 2: The inverse square root unit (ISRU) and tanh functions.
115
+
116
+ # 6 CONCLUSION
117
+
118
+ Activation function performance is becoming more important overall in convolutional neural networks (CNNs) because of the trending reductions in the computational complexity of the convolutions used in CNNs. We have introduced a new activation function, the inverse square root linear unit (ISRLU) for faster and precise learning in deep convolutional neural networks. ISRLUs have similar activation curves to ELUs, including the negative values. This decreases the forward propagated variation and brings the mean activations to zero. Mean activations close to zero decreases the bias shift for units in the next layer which speeds up learning by bringing the natural gradient closer to the unit natural gradient. Future work may prove the effectiveness of applying ISRLUs and the related ISRUs to other network architectures, such as recurrent neural networks, and to other tasks, such as object detection. ISRLUs have lower computational complexity than ELUs. Even greater savings on computation can be realized by implementing ISRLUs in custom hardware implementations. We expect ISRLU activations to increase the training efficiency of convolutional networks.
119
+
120
+ # REFERENCES
121
+
122
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek G. Murray, Benoit Steiner, Paul Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: A system for large-scale machine learning. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), pp. 265–283, GA, 2016. USENIX Association. ISBN 978-1-931971-33-1. URL https://www.usenix.org/conference/osdi16/ technical-sessions/presentation/abadi.
123
+
124
+ Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2):251– 276, February 1998. ISSN 0899-7667. doi: 10.1162/089976698300017746. URL http://dx. doi.org/10.1162/089976698300017746.
125
+
126
+ Brad Carlile. Parallelism, compute intensity, and data vectorization. Submitted to Supercomputing ’93, Portland, OR., November 1993a.
127
+
128
+ Brad Carlile. Algorithms and design: the CRAY APP shared-memory system. In Digest of Papers. Compcon Spring, pp. 312–320, Feb 1993b. doi: 10.1109/CMPCON.1993.289687.
129
+
130
+ Junyoung Chung, C¸ aglar Gulc¸ehre, KyungHyun Cho, and Yoshua Bengio. Empirical eval ¨ uation of gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. URL http://arxiv.org/abs/1412.3555. NIPS 2014 Workshop on Deep Learning, December 2014.
131
+
132
+ Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast an ´ d accurate deep network learning by exponential linear units (ELUs). CoRR, abs/1511.07289, 2015. URL http:// arxiv.org/abs/1511.07289.
133
+
134
+ Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey Gordon, David Dunson, and Miroslav Dudk (eds.), Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pp. 315–323, Fort Lauderdale, FL, USA, 11–13 Apr 2011. PMLR. URL http://proceedings.mlr.press/v15/glorot11a.html.
135
+
136
+ John L. Gustafson. Programming the FPS T Series. Checkpoint, 4(6):2–8, 1986. URL http:// www.johngustafson.net/pubs/pubt1986.2/FPS.pdf.
137
+
138
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), ICCV ’15, pp. 1026–1034, Washington, DC, USA, 2015. IEEE Computer Society. ISBN 978-1-4673-8391-2. doi: 10.1109/ICCV.2015.123. URL http://dx.doi.org/10.1109/ICCV.2015.123.
139
+
140
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9 (8):1735–1780, November 1997. ISSN 0899-7667. doi: 10.1162/neco.1997.9.8.1735. URL http://dx.doi.org/10.1162/neco.1997.9.8.1735.
141
+
142
+ Vector Mathematics (VM) Performance and Accuracy Data. Intel, Sep 2017. URL https:// software.intel.com/sites/products/documentation/doclib/mkl/vm/ vmdata.htm. Visited 10-19-2017.
143
+
144
+ Gunter Klambauer, Thomas Unterthiner, Andreas Mayr, and Sep ¨ p Hochreiter. Self-normalizing neural networks. CoRR, abs/1706.02515, 2017. URL http://arxiv.org/abs/1706. 02515.
145
+
146
+ Andrew Lavin and Scott Gray. Fast algorithms for convolutional neural networks. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4013–4021, 06 2016.
147
+
148
+ Chris Lomont. Fast inverse square root. https://www.lomont.org/Math/Papers/ 2003/InvSqrt.pdf, Feb 2003.
149
+
150
+ Anish Shah, Eashan Kadam, Hena Shah, Sameer Shinde, and Sandip Shingade. Deep residual networks with exponential linear unit. In Proceedings of the Third International Symposium on Computer Vision and the Internet, VisionNet’16, pp. 59–65, New York, NY, USA, 2016. ACM. ISBN 978-1-4503-4301-5. doi: 10.1145/2983402.2983406. URL http://doi.acm.org/ 10.1145/2983402.2983406.
151
+
152
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Conference: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2818–2826, 06 2016.
parse/train/HkMCybx0-/HkMCybx0-_content_list.json ADDED
@@ -0,0 +1,798 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "IMPROVING DEEP LEARNING BY INVERSE SQUARE ROOT LINEAR UNITS (ISRLUS) ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 174,
20
+ 398,
21
+ 202
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 238,
32
+ 544,
33
+ 253
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We introduce the “inverse square root linear unit” (ISRLU) to speed up learning in deep neural networks. ISRLU has better performance than ELU but has many of the same benefits. ISRLU and ELU have similar curves and characteristics. Both have negative values, allowing them to push mean unit activation closer to zero, and bring the normal gradient closer to the unit natural gradient, ensuring a noiserobust deactivation state, lessening the over fitting risk. The significant performance advantage of ISRLU on traditional CPUs also carry over to more efficient HW implementations on HW/SW codesign for CNNs/RNNs. In experiments with TensorFlow, ISRLU leads to faster learning and better generalization than ReLU on CNNs. This work also suggests a computationally efficient variant called the “inverse square root unit” (ISRU) which can be used for RNNs. Many RNNs use either long short-term memory (LSTM) and gated recurrent units (GRU) which are implemented with tanh and sigmoid activation functions. ISRU has less computational complexity but still has a similar curve to tanh and sigmoid. ",
40
+ "bbox": [
41
+ 233,
42
+ 268,
43
+ 764,
44
+ 463
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 489,
55
+ 336,
56
+ 505
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Two popular activation functions for neural networks are the rectified linear unit (ReLU) (Glorot et al., 2011) and the exponential linear unit (ELU) (Clevert et al., 2015). The ReLU activation function is the identity for positive arguments and zero otherwise. The ELU activation function is the identity for positive arguments and has an exponential asymptotic approach to -1 for negative values. ",
63
+ "bbox": [
64
+ 174,
65
+ 520,
66
+ 825,
67
+ 589
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "From previous analysis of the Fisher optimal learning, i.e., the natural gradient (Amari, 1998; Clevert et al., 2015), we can reduce the undesired bias shift effect without the natural gradient, either by centering the activation of incoming units at zero or by using activation functions with negative values. We introduce the inverse square root linear unit (ISRLU), an activation function like ELU, that has smoothly saturating negative values for negative arguments, and the identity for positive arguments. In addition this activation function can be more efficiently implemented than ELU in a variety of software or purpose-built hardware. ",
74
+ "bbox": [
75
+ 174,
76
+ 595,
77
+ 825,
78
+ 694
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "2 INVERSE SQUARE ROOT LINEAR UNIT (ISRLU) ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 173,
88
+ 713,
89
+ 607,
90
+ 731
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "The inverse square root linear unit (ISRLU) with $\\alpha$ is ",
97
+ "bbox": [
98
+ 174,
99
+ 744,
100
+ 527,
101
+ 760
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "equation",
107
+ "img_path": "images/f19bc023905bd74bb65dbcb1385571720da3d6f3c8c1b7a47ecabf57fa9f79d2.jpg",
108
+ "text": "$$\nf ( x ) = \\left\\{ \\begin{array} { l l } { x } & { \\mathrm { i f ~ } x \\geq 0 } \\\\ { x \\left( \\frac { 1 } { \\sqrt { 1 + \\alpha x ^ { 2 } } } \\right) } & { \\mathrm { i f ~ } x < 0 } \\end{array} , \\right. \\qquad f ^ { \\prime } ( x ) = \\left\\{ \\begin{array} { l l } { 1 } & { \\mathrm { i f ~ } x \\geq 0 } \\\\ { \\left( \\frac { 1 } { \\sqrt { 1 + \\alpha x ^ { 2 } } } \\right) ^ { 3 } } & { \\mathrm { i f ~ } x < 0 } \\end{array} \\right.\n$$",
109
+ "text_format": "latex",
110
+ "bbox": [
111
+ 253,
112
+ 784,
113
+ 748,
114
+ 829
115
+ ],
116
+ "page_idx": 0
117
+ },
118
+ {
119
+ "type": "text",
120
+ "text": "The ISRLU hyperparameter $\\alpha$ controls the value to which an ISRLU saturates for negative inputs (see Fig. 1). ISRLUs and ELUs have very similar curves so at a high level one would expect to see the same general characteristics in most cases. ISRLUs have smooth and continuous first and second derivatives. ELUs are only continuous in the first derivative (see Fig. 1). In contrast, ReLU is non-differentiable at zero. Since ISRLUs and ELUs share most of the same characteristics we use the same weight initialization guidelines as are used for ELUs (Clevert et al., 2015)). ",
121
+ "bbox": [
122
+ 173,
123
+ 839,
124
+ 825,
125
+ 924
126
+ ],
127
+ "page_idx": 0
128
+ },
129
+ {
130
+ "type": "image",
131
+ "img_path": "images/b0bf76b886af47ff979f04846e225dbfea56978920c35dff134794223ce6a37c.jpg",
132
+ "image_caption": [
133
+ "Figure 1: The inverse square root linear unit (ISRLU), ISRLU $( \\alpha = 1 ; \\alpha = 3 )$ ), ELU $( \\alpha = 1 )$ ), and ReLU; and their first derivatives. "
134
+ ],
135
+ "image_footnote": [],
136
+ "bbox": [
137
+ 217,
138
+ 111,
139
+ 777,
140
+ 484
141
+ ],
142
+ "page_idx": 1
143
+ },
144
+ {
145
+ "type": "text",
146
+ "text": "The primary advantage of ISRLU is in its reduced computational complexity compared to ELU. Inverse square roots are faster to calculate than exponentials. When calculating ISRLU for negative inputs, first one calculates $1 / \\sqrt { 1 + \\alpha x ^ { 2 } }$ . Multiplying this function by $x$ provides the value for the forward calculation. Multiplying this function by itself twice (i.e. cubing) provides the value for back-propagation. ",
147
+ "bbox": [
148
+ 174,
149
+ 568,
150
+ 825,
151
+ 640
152
+ ],
153
+ "page_idx": 1
154
+ },
155
+ {
156
+ "type": "text",
157
+ "text": "With $\\alpha = 1$ , ISRLU saturation approaches -1. With $\\alpha = 3$ , the negative saturation is reduced, so a smaller portion of the back-propagated error signal will pass to the next layer. This allows the network to output sparse activations while preserving its ability to reactivate dead neurons. Note that under variations of the $\\alpha$ parameter, the ISRLU curve and its derivative remain smooth and continuous. Future work will establish what deeper saturation $( \\alpha < 1 )$ ) is appropriate when applying ISRLU to self-normalizing neural networks (Klambauer et al., 2017). ",
158
+ "bbox": [
159
+ 174,
160
+ 646,
161
+ 825,
162
+ 729
163
+ ],
164
+ "page_idx": 1
165
+ },
166
+ {
167
+ "type": "text",
168
+ "text": "In the same manner as parametric ReLUs (PReLUs) only one additional hyperparameter is required and methods can be used to directly learn its value during back-propagation (He et al., 2015). Similarly, ISRLU’s $\\alpha$ can be learned during the training phase along with the weights and biases. Indeed for PReLUs, He et al. (2015) have empirically shown that learning the slope parameter “a” gives better performance than manually setting it to a pre-defined value. ",
169
+ "bbox": [
170
+ 174,
171
+ 736,
172
+ 825,
173
+ 806
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "3 ACTIVATION FUNCTION PERFORMANCE ",
180
+ "text_level": 1,
181
+ "bbox": [
182
+ 176,
183
+ 833,
184
+ 537,
185
+ 849
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "Shah et al. (2016) showed that ELU was faster than the combination of ReLU and Batch Normalization for deep neural network (DNN) ResNet architectures. On CIFAR-10 and CIFAR-100 they showed that ELU not only speeds up learning but also improves the accuracy as the depth of the convolutional neural network (CNN) increases. ",
192
+ "bbox": [
193
+ 174,
194
+ 867,
195
+ 823,
196
+ 922
197
+ ],
198
+ "page_idx": 1
199
+ },
200
+ {
201
+ "type": "text",
202
+ "text": "More than learning rate needs to be considered when evaluating the overall performance of CNNs. The amount of time and computational resources required to perform both the convolutions and activation functions combined should be considered. ",
203
+ "bbox": [
204
+ 174,
205
+ 103,
206
+ 823,
207
+ 146
208
+ ],
209
+ "page_idx": 2
210
+ },
211
+ {
212
+ "type": "text",
213
+ "text": "The trend in CNNs is that less time is being spent calculating convolutions. There are three factors that we are seeing. First is that small convolution filters such as 5x5 or $3 { \\tt X } 3$ filters are the basis of many architectures. Second, architectures as Inception-v3 and Inception-v4 now decompose 2d filters such as a 3x3 into a 3x1 filter and a 1x3 filter (Szegedy et al., 2016). Third, more efficient calculations of convolution that rely on techniques such as Winograd’s minimal filtering algorithm (Lavin & Gray, 2016; Winograd, 1980) are being used for 3x3 and smaller filters as are FFTs to reduce calculation time in 5x5 or larger filters. All of these techniques reduce the amount of calculations for each element in the convolution output. ",
214
+ "bbox": [
215
+ 174,
216
+ 152,
217
+ 825,
218
+ 263
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "Table 1 shows “cycles per output element” for an Intel Xeon Platinum 8160 (Skylake). ",
225
+ "bbox": [
226
+ 171,
227
+ 270,
228
+ 740,
229
+ 285
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "table",
235
+ "img_path": "images/87f7b7a2d79891cc3ab05261fc5f36276401b65749ea05e63056a8c4a65075c0.jpg",
236
+ "table_caption": [
237
+ "Table 1: Computational complexity of various filter sizes "
238
+ ],
239
+ "table_footnote": [],
240
+ "table_body": "<table><tr><td>Convolution</td><td>FP Multiplies</td><td>FP Adds</td><td>Cycles per output element (CPE)</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>5x5</td><td>25 9</td><td>24 8</td><td>~4.25 ~1.53</td></tr><tr><td>3x3</td><td></td><td>2</td><td></td></tr><tr><td>3x1,1x3 Inception-v3, -v4</td><td>3</td><td></td><td>~0.51</td></tr></table>",
241
+ "bbox": [
242
+ 192,
243
+ 332,
244
+ 805,
245
+ 422
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "Due to all of these reductions in convolution computational complexity, activation function performance is now a greater part of overall learning performance. ",
252
+ "bbox": [
253
+ 176,
254
+ 446,
255
+ 820,
256
+ 476
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "Another characteristic that is changing with the use of smaller filters is the decrease in the compute intensity (Carlile, 1993a;b), which raises the importance of memory systems performance for CNNs. The compute intensity of an algorithm is the ratio of the number of operations divided by number of words accessed. For a given algorithm it is straightforward to calculate the upper bound of the computation rate that can be supported on a given memory bandwidth. ",
263
+ "bbox": [
264
+ 174,
265
+ 482,
266
+ 825,
267
+ 553
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "3.1 ACTIVATION FUNCTION IMPLEMENTATION ",
274
+ "text_level": 1,
275
+ "bbox": [
276
+ 174,
277
+ 575,
278
+ 511,
279
+ 589
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "The main advantage of ISRLU over ELU is that it is based on the inverse square root, which has been faster to evaluate than the exponential for many generations of systems. In the past, whenever it has not been faster, optimization potentials for inverse square root implementation improvement have been found. It is instructive to understand the current CPU performance of the inverse square root intrinsic performance compared to exponentials and tanh. ",
286
+ "bbox": [
287
+ 174,
288
+ 603,
289
+ 825,
290
+ 674
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "Intel $\\mathbf { \\boldsymbol { x } } 8 6$ CPUs with SIMD instructions have vector intrinsic functions to accelerate performance. Intel publishes CPE (Clocks per Element) for various vector functions on their “Vector Mathematics (VM) Performance and Accuracy Data” website, see Table 2 (Intel, 2017). ",
297
+ "bbox": [
298
+ 176,
299
+ 680,
300
+ 823,
301
+ 722
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "table",
307
+ "img_path": "images/393dd03f067fdf9c27fbd316d0b143a6afd28958b509f1e03900a58ddae5d0a8.jpg",
308
+ "table_caption": [
309
+ "Table 2: CPU performance on vector inverse square root, Exp, Tanh (x86). "
310
+ ],
311
+ "table_footnote": [],
312
+ "table_body": "<table><tr><td>Vector Function Single Precision (EP)</td><td>Intel Xeon E5-2699 v3 (Haswell AVX2)</td><td>Intel Xeon E5-2699 v4 (Broadwell AVX2)</td><td>Intel Xeon Platinum 8180 (Skylake AVX-512)</td></tr><tr><td>InvSqrt</td><td>0.66</td><td>0.64</td><td>0.24</td></tr><tr><td>Exp</td><td>0.81</td><td>0.89</td><td>0.52</td></tr><tr><td>Tanh</td><td>4.19</td><td>4.43</td><td>0.78</td></tr><tr><td>Exp/InvSqrt</td><td>1.2×</td><td>1.4×</td><td>2.2×</td></tr><tr><td>Tanh/InvSqrt</td><td>6.3×</td><td>6.9×</td><td>3.3×</td></tr><tr><td></td><td></td><td></td><td></td></tr></table>",
313
+ "bbox": [
314
+ 196,
315
+ 770,
316
+ 802,
317
+ 916
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "For example, on a 3x1 filter using ELU in the negative region, approximately the same CPE is required to evaluate the convolution as is required for the exponential (cf. Table 1 and Table 2). Improvements in activation function performance will impact overall time spent in each learning step. ",
324
+ "bbox": [
325
+ 174,
326
+ 103,
327
+ 823,
328
+ 160
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "We measured the vector performance of AVX2 implementations for the various activation functions. \nThe dataset used was $50 \\%$ negative and $50 \\%$ positive. Results are shown in Table 3. ",
335
+ "bbox": [
336
+ 173,
337
+ 166,
338
+ 820,
339
+ 195
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "table",
345
+ "img_path": "images/84a7fa3d34c2398bec106794a5c23d753a91e5aa40c8bcdb40c43f6e8d32b70e.jpg",
346
+ "table_caption": [
347
+ "Table 3: Vector ISRLU, ISRU, ELU, and ReLU performance on AVX2 (Intel Core i7-7700 Processor [3.60 GHz “Kaby Lake”] ). "
348
+ ],
349
+ "table_footnote": [],
350
+ "table_body": "<table><tr><td>Activation Function Single Precision</td><td>nsec/ element</td><td>ISRLU Perf Advantage</td><td>ISRLU (approx.) Perf Advantage</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>ReLU</td><td>0.340</td><td>0.62×</td><td>0.99×</td></tr><tr><td>ISRU (approx.)</td><td>0.334 0.344</td><td>0.61× 0.62×</td><td>0.97× 1.00×</td></tr><tr><td>ISRLU (approx.) ISRLU</td><td>0.551</td><td>1.00×</td><td>1.60×</td></tr><tr><td>ELU</td><td>1.447</td><td>2.63×</td><td>4.21×</td></tr></table>",
351
+ "bbox": [
352
+ 176,
353
+ 263,
354
+ 838,
355
+ 380
356
+ ],
357
+ "page_idx": 3
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "These results show that ISRLU ( $\\alpha = 1 . 0 $ ) is $2 . 6 \\times$ faster than ELU. The fast approximation of ISRLU is within $1 \\%$ of the evaluation speed of ReLU while still retaining all of the desired learning curve properties mentioned in this paper. This fast approximation for ISRLU on this processor has only $\\bar { 3 } \\times 1 0 ^ { - 4 }$ maximum relative error ${ \\sim } 1 1 . 6$ accurate bits). One Newton-Raphson iteration doubles that to ${ \\sim } 2 3 . 4$ accurate bits out of the 24 bits of mantissa, and two iterations achieves full precision. We plan to evaluate if the fast approximation has similar learning rates of the full precision ISRLU. ",
362
+ "bbox": [
363
+ 173,
364
+ 400,
365
+ 825,
366
+ 484
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "3.2 A PRACTICAL TRICK FOR INVERSE SQUARE ROOT CALCULATION ",
373
+ "text_level": 1,
374
+ "bbox": [
375
+ 176,
376
+ 501,
377
+ 671,
378
+ 516
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "It is instructive to look at a practical trick for the computation of the inverse square root as it may serve as inspiration for those implementing ISRLU in hardware. Software implementations on CPUs can take advantage of floating-point formats for faster evaluation of the inverse square root. John Carmack and Terje Mathisen are often associated with implementing fast inverse square root in 2002 (Lomont, 2003). In 1986, one of the authors of this paper originally invented this method, which was called “The K Method,” to implement vector square root for the production FPS T Series Hypercube Supercomputer (Gustafson, 1986). William Kahan and K.C. $\\mathrm { N g }$ at Berkeley also independently discovered this around 1986. ",
385
+ "bbox": [
386
+ 174,
387
+ 527,
388
+ 825,
389
+ 638
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "Carmack & Mathisen only used one iteration of the Newton method after their fast approximation. One iteration had an error of approximately $0 . 1 7 5 \\%$ , which was suitable for their graphics applications. Since various piecewise functions have been used to approximate activation functions for CNNs and RNNs, part of our future research will look into if fast approximations to ISRLUs are suitable for DNNs. ",
396
+ "bbox": [
397
+ 174,
398
+ 646,
399
+ 823,
400
+ 715
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "Another avenue to look at for hardware implementations of the inverse square root is table-lookup hardware. Our expectation is that an efficient hardware approximation for the inverse square root should take about the same execution time as a fused multiply and add (FMA). ",
407
+ "bbox": [
408
+ 174,
409
+ 723,
410
+ 825,
411
+ 765
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "4 EXPERIMENTS USING ISRLUS ",
418
+ "text_level": 1,
419
+ "bbox": [
420
+ 178,
421
+ 786,
422
+ 462,
423
+ 803
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "We used TensorFlow (Abadi et al., 2016) to train a CNN on the (Lecun) MNIST dataset. We tested the MNIST gray images in 10 classes, 60k train and $1 0 \\mathrm { k }$ test. ",
430
+ "bbox": [
431
+ 171,
432
+ 818,
433
+ 823,
434
+ 847
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "The first CNN architecture (see Table 4) in our experiments used $2 8 \\mathbf { x } 2 8$ input, a convolutional layer with 6x6 with 6 feature maps, a convolutional layer with $5 \\mathrm { x } 5$ with 12 feature maps, a convolutional layer with $4 \\mathbf { x } 4$ with 24 feature maps, a fully connected layer of 1176 hidden units, and a softmax output layer with 10 units. Only a full-precision ISRLU was used in these initial tests due to time constraints. ",
441
+ "bbox": [
442
+ 176,
443
+ 853,
444
+ 823,
445
+ 924
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Convolutional neural networks with ISRLUs ( $\\alpha = 1 . 0$ , $\\alpha = 3 . 0$ ), ELUs $( \\alpha = 1 . 0 $ ), and ReLUs were trained on the MNIST digit classification dataset while each hidden units activation was tracked. Each network was trained for 17 epochs by using ADAM optimizer with learning rate 0.003 exponentially decreasing to 0.0001 and mini-batches of size 100. The weights have been initialized to truncated normal with standard deviation 0.1. The training error of ISRLU networks decreases much more rapidly than for the other networks. We also calculated the final cross-entropy loss function for each test. ",
452
+ "bbox": [
453
+ 173,
454
+ 103,
455
+ 825,
456
+ 202
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "table",
462
+ "img_path": "images/a90f13bcd8f366eb955666e8b1a91feed57bf1af8635ad6d694c38fa13819765.jpg",
463
+ "table_caption": [
464
+ "Table 4: Architecture 1 on MNIST with test accuracy and cross-entropy loss with different activation functions. "
465
+ ],
466
+ "table_footnote": [],
467
+ "table_body": "<table><tr><td>Activation Function</td><td>DropOut pkeep</td><td>Max Test Accuracy</td><td>Cross-Entropy Loss</td></tr><tr><td></td><td></td><td></td><td>2.308</td></tr><tr><td>ISRLU α= 3.0 ELU</td><td>0.25 0.40</td><td>99.30 99.29</td><td>2.395</td></tr><tr><td>ISRLU α = 3.0</td><td>0.40</td><td>99.27</td><td>2.530</td></tr><tr><td>ReLU</td><td>0.40</td><td>99.22</td><td>2.644</td></tr><tr><td>ISRLU α = 1.0</td><td>0.40</td><td>99.20</td><td>2.785</td></tr><tr><td>ReLU</td><td>0.25</td><td>99.17</td><td>2.798</td></tr><tr><td>ELU</td><td>0.25</td><td>99.09</td><td>2.892</td></tr><tr><td>ISRLU α = 1.0</td><td>0.25</td><td>99.00</td><td>3.124</td></tr></table>",
468
+ "bbox": [
469
+ 197,
470
+ 253,
471
+ 799,
472
+ 411
473
+ ],
474
+ "page_idx": 4
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "The second CNN architecture (see Table 5) in our experiments used $2 8 \\mathbf { x } 2 8$ input, a convolutional layer with $3 { \\tt X } 3$ with 64 feature maps, a convolutional layer with $3 { \\tt X } 3$ with 64 feature maps, $2 \\mathbf { x } 2$ Maxpooling, DropOut, a convolutional layer with 3x3 with 64 feature maps, a convolutional layer with 3x3 with 64 feature maps, 2x2 Maxpooling, DropOut, a fully connected (FC) layer of 512 hidden units, and a softmax output layer with 10 units. Full-precision ISRLU was used. ",
479
+ "bbox": [
480
+ 173,
481
+ 431,
482
+ 825,
483
+ 502
484
+ ],
485
+ "page_idx": 4
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "Convolutional neural networks with ISRLUs ( $\\alpha = 1 . 0$ , $\\alpha = 3 . 0$ ) and ELUs ( $\\alpha = 1 . 0$ ) were trained on the MNIST digit classification dataset while each hidden units activation was tracked. The network was trained for 20 epochs by using ADAM optimizer with learning rate 0.003 exponentially decreasing to 0.0001 and mini-batches of size 100. The weights have been initialized to truncated normal with standard deviation 0.1. ",
490
+ "bbox": [
491
+ 174,
492
+ 508,
493
+ 825,
494
+ 579
495
+ ],
496
+ "page_idx": 4
497
+ },
498
+ {
499
+ "type": "table",
500
+ "img_path": "images/f108e1504e036e2a4ecb5e6ff3d6d2b1bcf6910e3e7b10613b0ab19361c8f337.jpg",
501
+ "table_caption": [
502
+ "Table 5: Architecture 2 on MNIST with test accuracy and cross-entropy loss with different activation functions. "
503
+ ],
504
+ "table_footnote": [],
505
+ "table_body": "<table><tr><td>Activation Function</td><td>DropOut pkeep</td><td>Max Test Accuracy</td><td>Cross-Entropy Loss</td></tr><tr><td>ISRLU α = 1.0</td><td>0.7 conv 0.4 FC</td><td>99.32</td><td>2.334</td></tr><tr><td>ISRLU α= 3.0</td><td>0.7 conv 0.4 FC</td><td>99.30</td><td>2.389</td></tr><tr><td>ELU</td><td>0.7 conv 0.4 FC</td><td>99.29</td><td>2.225</td></tr></table>",
506
+ "bbox": [
507
+ 196,
508
+ 631,
509
+ 799,
510
+ 768
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "We did not expect significant differences in accuracy in ISRLU and ELU in this test of shallow networks due to the similar nature of the curves. The cross-entropy loss was reasonable, at between 2 and 3.2 for all activation functions. Future testing will be done on deeper networks where we expect larger advantages that are similar to ELU (Clevert et al., 2015; Shah et al., 2016). ",
517
+ "bbox": [
518
+ 174,
519
+ 787,
520
+ 825,
521
+ 843
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "5 INVERSE SQUARE ROOT UNIT (ISRU) ",
528
+ "text_level": 1,
529
+ "bbox": [
530
+ 174,
531
+ 863,
532
+ 524,
533
+ 881
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "The work with ISRLU in this paper suggests that the inverse square root unit (ISRU) may be useful for a variety of neural networks. ISRUs are defined as: ",
540
+ "bbox": [
541
+ 174,
542
+ 895,
543
+ 823,
544
+ 924
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "equation",
550
+ "img_path": "images/a0d2a9bdad7cc4227d1ce9d04e57edb3e1c315fb89d2d54a343fb5449cf6a6ec.jpg",
551
+ "text": "$$\nf ( x ) = x \\left( { \\frac { 1 } { \\sqrt { 1 + \\alpha x ^ { 2 } } } } \\right) , \\qquad f ^ { \\prime } ( x ) = \\left( { \\frac { 1 } { \\sqrt { 1 + \\alpha x ^ { 2 } } } } \\right) ^ { 3 }\n$$",
552
+ "text_format": "latex",
553
+ "bbox": [
554
+ 313,
555
+ 126,
556
+ 683,
557
+ 162
558
+ ],
559
+ "page_idx": 5
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "In RNNs that use LSTM (Hochreiter & Schmidhuber, 1997) and GRU (Chung et al., 2014), the most common activation functions are sigmoid and tanh. We assert that ISRUs can be more efficient calculation than tanh and be more efficient than sigmoid when properly shifted and scaled. As shown above in Table 2, the inverse square root is $3 \\mathbf { x }$ to 6x faster than tanh (depending on $\\mathbf { \\boldsymbol { x } } 8 6$ architecture). ISRUs will be an area of our future research. ",
564
+ "bbox": [
565
+ 174,
566
+ 178,
567
+ 825,
568
+ 250
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "image",
574
+ "img_path": "images/de181dbe6ee3503dc1cfa42f51aea24b2d6b48deef4412c03c493f099d875135.jpg",
575
+ "image_caption": [
576
+ "Figure 2: The inverse square root unit (ISRU) and tanh functions. "
577
+ ],
578
+ "image_footnote": [],
579
+ "bbox": [
580
+ 214,
581
+ 272,
582
+ 781,
583
+ 489
584
+ ],
585
+ "page_idx": 5
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "6 CONCLUSION ",
590
+ "text_level": 1,
591
+ "bbox": [
592
+ 174,
593
+ 561,
594
+ 318,
595
+ 578
596
+ ],
597
+ "page_idx": 5
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "Activation function performance is becoming more important overall in convolutional neural networks (CNNs) because of the trending reductions in the computational complexity of the convolutions used in CNNs. We have introduced a new activation function, the inverse square root linear unit (ISRLU) for faster and precise learning in deep convolutional neural networks. ISRLUs have similar activation curves to ELUs, including the negative values. This decreases the forward propagated variation and brings the mean activations to zero. Mean activations close to zero decreases the bias shift for units in the next layer which speeds up learning by bringing the natural gradient closer to the unit natural gradient. Future work may prove the effectiveness of applying ISRLUs and the related ISRUs to other network architectures, such as recurrent neural networks, and to other tasks, such as object detection. ISRLUs have lower computational complexity than ELUs. Even greater savings on computation can be realized by implementing ISRLUs in custom hardware implementations. We expect ISRLU activations to increase the training efficiency of convolutional networks. ",
602
+ "bbox": [
603
+ 174,
604
+ 595,
605
+ 825,
606
+ 762
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "REFERENCES ",
613
+ "text_level": 1,
614
+ "bbox": [
615
+ 174,
616
+ 786,
617
+ 285,
618
+ 801
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek G. Murray, Benoit Steiner, Paul Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: A system for large-scale machine learning. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), pp. 265–283, GA, 2016. USENIX Association. ISBN 978-1-931971-33-1. URL https://www.usenix.org/conference/osdi16/ technical-sessions/presentation/abadi. ",
625
+ "bbox": [
626
+ 176,
627
+ 811,
628
+ 825,
629
+ 924
630
+ ],
631
+ "page_idx": 5
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2):251– 276, February 1998. ISSN 0899-7667. doi: 10.1162/089976698300017746. URL http://dx. doi.org/10.1162/089976698300017746. ",
636
+ "bbox": [
637
+ 173,
638
+ 103,
639
+ 820,
640
+ 146
641
+ ],
642
+ "page_idx": 6
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "Brad Carlile. Parallelism, compute intensity, and data vectorization. Submitted to Supercomputing ’93, Portland, OR., November 1993a. ",
647
+ "bbox": [
648
+ 171,
649
+ 157,
650
+ 821,
651
+ 185
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "Brad Carlile. Algorithms and design: the CRAY APP shared-memory system. In Digest of Papers. Compcon Spring, pp. 312–320, Feb 1993b. doi: 10.1109/CMPCON.1993.289687. ",
658
+ "bbox": [
659
+ 174,
660
+ 195,
661
+ 820,
662
+ 226
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "Junyoung Chung, C¸ aglar Gulc¸ehre, KyungHyun Cho, and Yoshua Bengio. Empirical eval ¨ uation of gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. URL http://arxiv.org/abs/1412.3555. NIPS 2014 Workshop on Deep Learning, December 2014. ",
669
+ "bbox": [
670
+ 173,
671
+ 236,
672
+ 825,
673
+ 292
674
+ ],
675
+ "page_idx": 6
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast an ´ d accurate deep network learning by exponential linear units (ELUs). CoRR, abs/1511.07289, 2015. URL http:// arxiv.org/abs/1511.07289. ",
680
+ "bbox": [
681
+ 171,
682
+ 304,
683
+ 823,
684
+ 347
685
+ ],
686
+ "page_idx": 6
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey Gordon, David Dunson, and Miroslav Dudk (eds.), Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pp. 315–323, Fort Lauderdale, FL, USA, 11–13 Apr 2011. PMLR. URL http://proceedings.mlr.press/v15/glorot11a.html. ",
691
+ "bbox": [
692
+ 173,
693
+ 357,
694
+ 825,
695
+ 429
696
+ ],
697
+ "page_idx": 6
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "John L. Gustafson. Programming the FPS T Series. Checkpoint, 4(6):2–8, 1986. URL http:// www.johngustafson.net/pubs/pubt1986.2/FPS.pdf. ",
702
+ "bbox": [
703
+ 171,
704
+ 438,
705
+ 823,
706
+ 468
707
+ ],
708
+ "page_idx": 6
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), ICCV ’15, pp. 1026–1034, Washington, DC, USA, 2015. IEEE Computer Society. ISBN 978-1-4673-8391-2. doi: 10.1109/ICCV.2015.123. URL http://dx.doi.org/10.1109/ICCV.2015.123. ",
713
+ "bbox": [
714
+ 174,
715
+ 478,
716
+ 825,
717
+ 549
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9 (8):1735–1780, November 1997. ISSN 0899-7667. doi: 10.1162/neco.1997.9.8.1735. URL http://dx.doi.org/10.1162/neco.1997.9.8.1735. ",
724
+ "bbox": [
725
+ 173,
726
+ 560,
727
+ 825,
728
+ 603
729
+ ],
730
+ "page_idx": 6
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Vector Mathematics (VM) Performance and Accuracy Data. Intel, Sep 2017. URL https:// software.intel.com/sites/products/documentation/doclib/mkl/vm/ vmdata.htm. Visited 10-19-2017. ",
735
+ "bbox": [
736
+ 176,
737
+ 613,
738
+ 821,
739
+ 656
740
+ ],
741
+ "page_idx": 6
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "Gunter Klambauer, Thomas Unterthiner, Andreas Mayr, and Sep ¨ p Hochreiter. Self-normalizing neural networks. CoRR, abs/1706.02515, 2017. URL http://arxiv.org/abs/1706. 02515. ",
746
+ "bbox": [
747
+ 173,
748
+ 666,
749
+ 825,
750
+ 709
751
+ ],
752
+ "page_idx": 6
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Andrew Lavin and Scott Gray. Fast algorithms for convolutional neural networks. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4013–4021, 06 2016. ",
757
+ "bbox": [
758
+ 173,
759
+ 720,
760
+ 823,
761
+ 750
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Chris Lomont. Fast inverse square root. https://www.lomont.org/Math/Papers/ 2003/InvSqrt.pdf, Feb 2003. ",
768
+ "bbox": [
769
+ 174,
770
+ 761,
771
+ 821,
772
+ 789
773
+ ],
774
+ "page_idx": 6
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "Anish Shah, Eashan Kadam, Hena Shah, Sameer Shinde, and Sandip Shingade. Deep residual networks with exponential linear unit. In Proceedings of the Third International Symposium on Computer Vision and the Internet, VisionNet’16, pp. 59–65, New York, NY, USA, 2016. ACM. ISBN 978-1-4503-4301-5. doi: 10.1145/2983402.2983406. URL http://doi.acm.org/ 10.1145/2983402.2983406. ",
779
+ "bbox": [
780
+ 174,
781
+ 800,
782
+ 825,
783
+ 869
784
+ ],
785
+ "page_idx": 6
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Conference: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2818–2826, 06 2016. ",
790
+ "bbox": [
791
+ 174,
792
+ 881,
793
+ 825,
794
+ 924
795
+ ],
796
+ "page_idx": 6
797
+ }
798
+ ]
parse/train/HkMCybx0-/HkMCybx0-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkMCybx0-/HkMCybx0-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyxnZh0ct7/HyxnZh0ct7.md ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # META-LEARNING WITH DIFFERENTIABLE CLOSED-FORM SOLVERS
2
+
3
+ Luca Bertinetto FiveAI & University of Oxford luca@robots.ox.ac.uk
4
+
5
+ João Henriques University of Oxford joao@robots.ox.ac.uk
6
+
7
+ Philip H.S. Torr FiveAI & University of Oxford philip.torr@eng.ox.ac.uk
8
+
9
+ Andrea Vedaldi
10
+ University of Oxford
11
+ vedaldi@robots.ox.ac.uk
12
+
13
+ # ABSTRACT
14
+
15
+ Adapting deep networks to new concepts from a few examples is challenging, due to the high computational requirements of standard fine-tuning procedures. Most work on few-shot learning has thus focused on simple learning techniques for adaptation, such as nearest neighbours or gradient descent. Nonetheless, the machine learning literature contains a wealth of methods that learn non-deep models very efficiently. In this paper, we propose to use these fast convergent methods as the main adaptation mechanism for few-shot learning. The main idea is to teach a deep network to use standard machine learning tools, such as ridge regression, as part of its own internal model, enabling it to quickly adapt to novel data. This requires back-propagating errors through the solver steps. While normally the cost of the matrix operations involved in such a process would be significant, by using the Woodbury identity we can make the small number of examples work to our advantage. We propose both closed-form and iterative solvers, based on ridge regression and logistic regression components. Our methods constitute a simple and novel approach to the problem of few-shot learning and achieve performance competitive with or superior to the state of the art on three benchmarks.
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ Humans can efficiently perform fast mapping (Carey, 1978; Carey & Bartlett, 1978), i.e. learning a new concept after a single exposure. By contrast, supervised learning algorithms — and neural networks in particular — typically need to be trained using a vast amount of data in order to generalize well. This requirement is problematic, as the availability of large labelled datasets cannot always be taken for granted. Labels can be costly to acquire: in drug discovery, for instance, campaign budgets often limits researchers to only operate with a small amount of biological data that can be used to form predictions about properties and activities of compounds (Altae-Tran et al., 2017). In other circumstances, data itself can be scarce, as it can happen for example with the problem of classifying rare animal species, whose exemplars are not easy to observe. Such a scenario, in which just one or a handful of training examples is provided, is referred to as one-shot or few-shot learning (Miller et al., 2000; Fei-Fei et al., 2006; Lake et al., 2015; Hariharan & Girshick, 2017) and has recently seen a tremendous surge in interest within the machine learning community (e.g.Vinyals et al. (2016); Bertinetto et al. (2016); Ravi & Larochelle (2017); Finn et al. (2017)).
20
+
21
+ Currently, most methods tackling few-shot learning operate within the general paradigm of metalearning, which allows one to develop algorithms in which the process of learning can improve with the number of training episodes (Thrun, 1998; Vilalta & Drissi, 2002). This can be achieved by distilling and transferring knowledge across episodes. In practice, for the problem of few-shot classification, meta-learning is often implemented using two “nested training loops”. The base learner works at the level of individual episodes, which correspond to learning problems characterised by having only a small set of labelled training images available. The meta learner, by contrast, learns from a collection of such episodes, with the goal of improving the performance of the base learner across episodes.
22
+
23
+ ![](images/c230430419b74e314ba2f6e4d83e7fa422a0a664c44e4863068bffd8eec78fc9.jpg)
24
+ Figure 1: Diagram of the proposed method for one episode, of which several are seen during meta-training. The task is to learn new classes given just a few sample images per class. In this illustrative example, there are 3 classes and 2 samples per class, making each episode a 3-way, 2-shot classification problem. At the base learning level, learning is accomplished by a differentiable ridge regression layer (R.R.), which computes episode-specific weights (referred to as $w \varepsilon$ in Section 3.1 and as $W$ in Section 3.2). At the meta-training level, by back-propagating errors through many of these small learning problems, we train a network whose weights are shared across episodes, together with the hyper-parameters of the R.R. layer. In this way, the R.R. base learner can improve its learning capabilities as the number of experienced episodes increases.
25
+
26
+ Clearly, in any meta-learning algorithm, it is of paramount importance to choose the base learner carefully. On one side of the spectrum, methods related to nearest-neighbours, such as learning similarity functions (Koch et al., 2015; Vinyals et al., 2016; Snell et al., 2017), are fast but rely solely on the quality of the similarity metric, with no additional data-dependent adaptation at test-time. On the other side of the spectrum, methods that optimize standard iterative learning algorithms, such as backpropagating through gradient descent (Finn et al., 2017; Nichol et al., 2018) or explicitly learning the learner’s update rule (Hochreiter et al., 2001; Andrychowicz et al., 2016; Ravi & Larochelle, 2017), are slower but allow more adaptability to different problems/datasets.
27
+
28
+ In this paper, we take a different perspective. As base learners, we propose to adopt simple learning algorithms that admit a closed-form solution such as ridge regression. Crucially, the simplicity and differentiability of these solutions allow us to backpropagate through learning problems. Moreover, these algorithms are particularly suitable for use within a meta-learning framework for few-shot classification for two main reasons. First, their closed-form solution allows learning problems to be solved efficiently. Second, in a data regime characterized by few examples of high dimensionality, the Woodbury’s identity (Petersen et al., 2008, Chapter 3.2) can be used to obtain a very significant gain in terms of computational speed.
29
+
30
+ We demonstrate the strength of our approach by performing extensive experiments on Omniglot (Lake et al., 2015), CIFAR-100 (Krizhevsky & Hinton, 2009) (adapted to the few-shot problem) and miniImageNet (Vinyals et al., 2016). Our base learners are fast, simple to implement, and can achieve performance that is competitive with or superior to the state of the art in terms of accuracy.
31
+
32
+ # 2 RELATED WORK
33
+
34
+ The topic of meta-learning gained importance in the machine learning community several decades ago, with the first examples already appearing in the eighties and early nineties (Utgoff, 1986; Schmidhuber, 1987; Naik & Mammone, 1992; Bengio et al., 1992; Thrun & Pratt, 1998). Utgoff (1986) proposed a framework describing when and how it is useful to dynamically adjust the inductive bias of a learning algorithm, thus implicitly “changing the ordering” of the elements of its hypothesis space (Vilalta & Drissi, 2002). Later, Bengio et al. (1992) interpreted the update rule of a neural network’s weights as a function that is learnable. Another seminal work is the one of Thrun (1996), which presents the so-called lifelong learning scenario, where a learning algorithm gradually encounters an ordered sequence of learning problems. Throughout this course, the learner can benefit from re-using the knowledge accumulated during previous tasks. In later work, Thrun & Pratt (1998) stated that an algorithm is learning to learn if “[...] its performance at each task improves with experience and with the number of tasks”. This characterisation has been inspired by Mitchell et al. (1997)’s definition of a learning algorithm as a computer program whose performance on a task improves with experience. Similarly, Vilalta & Drissi (2002) explained meta-learning as organised in two “nested learning levels”. At the base level, an algorithm is confined within a limited hypothesis space while solving a single learning problem. Contrarily, the meta-level can “accrue knowledge” by spanning multiple problems, so that the hypothesis space at the base level can be adapted effectively.
35
+
36
+ Arguably, the simplest approach to meta-learning is to train a similarity function by exposing it to many matching problems (Bromley et al., 1993; Chopra et al., 2005; Koch et al., 2015). Despite its simplicity, this general strategy is particularly effective and it is at the core of several stateof-the-art few-shot classification algorithms (Vinyals et al., 2016; Snell et al., 2017; Sung et al., 2018). Interestingly, Garcia & Bruna (2018) interpret learning as information propagation from support (training) to query (test) images and propose a graph neural network that can generalize matching-based approaches. Since this line of work relies on learning a similarity metric, one distinctive characteristic is that parameter updates only occur within the long time horizon of the outer training loop. While this can clearly spare costly computations, it also prevents these methods from performing adaptation at test time. A possible way to overcome the lack of adaptability is to train a neural network capable of predicting (some of) its own parameters. This technique has been first introduced in Schmidhuber (1992; 1993) and recently revamped by Bertinetto et al. (2016) and Munkhdalai & Yu (2017). Rebuffi et al. (2017) showed that a similar approach can be used to adapt a neural network, on the fly, to entirely different visual domains.
37
+
38
+ Another popular approach to meta-learning is to interpret the gradient update of SGD as a parametric and learnable function rather than a fixed ad-hoc routine. Younger et al. (2001) and Hochreiter et al. (2001) observed that, because of the sequential nature of a learning algorithm, a recurrent neural network can be considered as a meta-learning system. They identify LSTMs as particularly apt for the task because of their ability to span long-term dependencies, which are essential in order to meta-learn. A modern take on this idea has been presented by Andrychowicz et al. (2016) and Ravi & Larochelle (2017), showing benefits on large-scale classification, style transfer and few-shot learning.
39
+
40
+ A recent and promising research direction is the one set by Maclaurin et al. (2015) and by the MAML algorithm (Finn et al., 2017; Finn & Levine, 2018). Instead of explicitly designing a meta-learner module for learning the update rule, they backpropagate through the very operation of gradient descent to optimize for the hyperparameters or the initial parameters of the learner. However, backpropagation through gradient descent steps is costly in terms of memory, and thus the total number of steps must be kept small.
41
+
42
+ To alleviate the drawback of catastrophic forgetting typical of deep neural networks (McCloskey & Cohen, 1989), several recent methods (Santoro et al., 2016; Kaiser et al., 2017; Munkhdalai & Yu, 2017; Sprechmann et al., 2018) make use of memory-augmented models, which can first retain and then access important and previously unseen information associated with newly encountered episodes. While such memory modules store and retrieve information in the long time range, approaches based on attention like the one of Vinyals et al. (2016) are useful to specify the most relevant pieces of knowledge within an episode. Mishra et al. (2018) complemented soft attention with temporal convolutions (Oord et al., 2016), thus allowing the attention mechanism to access information related to past episodes.
43
+
44
+ In this paper, we instead argue for simple, fast and differentiable base learners such as ridge regression. Compared to nearest-neighbour methods, they allow more flexibility because they produce a different set of parameters for different episodes $W _ { i }$ in Figure 1). Compared to methods that adapt SGD, they exhibit an inherently fast rate of convergence, particularly in cases where a closed form solution exists. A similar idea has been discussed by Bengio (2000), where the analytic formulations of zero-gradient solutions are used to obtain meta-gradients analytically and optimize hyper-parameters. More recently, Ionescu et al. (2015) and Valmadre et al. (2017) have derived backpropagation forms for the SVD and Correlation Filter, so that SGD can be applied, respectively, to a deep neural network that computes the solution to either an eigenvalue problem or a system of linear equations where the data matrix has a circulant structure.
45
+
46
+ # 3 METHOD
47
+
48
+ # 3.1 META-LEARNING
49
+
50
+ According to widely accepted definitions of learning (Mitchell, 1980) and meta-learning (Vilalta & Drissi, 2002; Vinyals et al., 2016), an algorithm is “learning to learn” if it can improve its learning skills with the number of experienced episodes (by progressively and dynamically modifying its inductive bias). There are two main components in a meta-learning algorithm: a base learner and a meta-learner (Vilalta & Drissi, 2002). The base learner works at the level of individual episodes (or tasks), which in the few-shot scenario correspond to learning problems characterised by having only a small set of labelled training images available. The meta-learner learns from several such episodes in sequence with the goal of improving the performance of the base learner across episodes.
51
+
52
+ In other words, the goal of meta-learning is to enable a base learning algorithm to adapt to new episodes efficiently by generalizing from a set of training episodes $\mathcal { E } \in \mathbb { E }$ . $\mathcal { E }$ can be modelled as a probability distribution of example inputs $x \in \mathbb { R } ^ { m }$ and outputs $\boldsymbol { y } \in \mathbb { R } ^ { o }$ , such that we can write $( x , y ) \sim \mathcal { E }$ .
53
+
54
+ In the case of few-shot classification, the inputs are represented by few images belonging to different unseen classes, while the outputs are the (episode-specific) class labels. It is important not to confuse the small sets that are used in an episode $\mathcal { E }$ with the super-set $\mathbb { E }$ (such as Omniglot or miniImageNet, Section 4.1) from which they are drawn.
55
+
56
+ Consider a generic feature extractor, such as commonly used pre-trained networks $\mathbf { \mathbb { \Lambda } } ^ { ! } \phi ( x ) : \mathbb { R } ^ { m } \to \mathbb { R } ^ { e }$ Then, a much simpler episode-specific predictor $f ( \phi ( x ) ; w \varepsilon ) : \mathbb { R } ^ { e } \times \mathbb { R } ^ { p } \mathbb { R } ^ { o }$ can be trained to map input embeddings to outputs. The predictor is parameterized by a set of parameters $w _ { \mathcal { E } } \in \mathbb { R } ^ { p }$ , which are specific to the episode $\mathcal { E }$ .
57
+
58
+ To train and assess the predictor on one episode, we are given access to training samples $Z _ { \mathcal { E } } =$ $\{ ( x _ { i } , y _ { i } ) \} \sim \mathcal { E }$ and test samples $Z _ { \mathcal { E } } ^ { \prime } = \{ ( x _ { i } ^ { \prime } , y _ { i } ^ { \prime } ) \} \sim \mathcal { E }$ , sampled independently from the distribution $\mathcal { E }$ . We can then use a learning algorithm $\Lambda$ to obtain the parameters $w \varepsilon = \Lambda ( \phi ( Z \varepsilon ) )$ , where $\phi ( Z \varepsilon ) \triangleq \{ ( \phi ( x _ { i } ) , y _ { i } ) \}$ . The expected quality of the trained predictor is then computed by a standard loss or error function $\bar { L } : \mathbb { R } ^ { o } \times \mathbb { R } ^ { o } \to \mathbb { R }$ , which is evaluated on the test samples $Z _ { \mathcal { E } } ^ { \prime }$ :
59
+
60
+ $$
61
+ q ( \mathcal { E } ) = \frac { 1 } { | Z _ { \mathcal { E } } ^ { \prime } | } \sum _ { ( x ^ { \prime } , y ^ { \prime } ) \in Z _ { \mathcal { E } } ^ { \prime } } L \left( f \left( \phi \left( x ^ { \prime } \right) ; w _ { \mathcal { E } } \right) , y ^ { \prime } \right) , \quad \mathrm { w i t h } \ w _ { \mathcal { E } } = \Lambda ( \phi ( Z _ { \mathcal { E } } ) ) .
62
+ $$
63
+
64
+ Other than abstracting away the complexities of the learning algorithm as $\Lambda$ , eq. (1) corresponds to the standard train-test protocol commonly employed in machine learning, here applied to a single episode $\mathcal { E }$ . However, simply re-training a predictor for each episode ignores potentially useful knowledge that can be transferred between them. For this reason, we now take the step of parameterizing $\phi$ and $\Lambda$ with two sets of meta-parameters, respectively $\omega$ and $\rho$ , which can aid the training procedure. In particular, $\omega$ affects the representation of the input of the base learner algorithm $\Lambda$ , while $\rho$ corresponds to its hyper-parameters, which here can be learnt by the meta-learner loop instead of being manually set, as it usually happens in a standard training scenario. These meta-parameters will affect the generalization properties of the learned predictors. This motivates evaluating the result of training on a held-out test set $Z _ { \mathcal { E } } ^ { \prime }$ (eq. (1)). In order to learn $\omega$ and $\rho$ , we minimize the expected loss on held-out test sets over all episodes $\mathcal { E } \in \mathbb { E }$ :
65
+
66
+ $$
67
+ \operatorname* { m i n } _ { \omega , \rho } \frac { 1 } { | \mathbb { E } | \cdot | Z _ { \mathcal { E } } ^ { \prime } | } \sum _ { \mathcal { E } \in \mathbb { E } } \sum _ { \left( x ^ { \prime } , y ^ { \prime } \right) \in Z _ { \mathcal { E } } ^ { \prime } } L \left( f \left( \phi \left( x ^ { \prime } ; \omega \right) ; w \varepsilon \right) , y ^ { \prime } \right) , \quad \mathrm { w i t h } \ w _ { \mathcal { E } } = \Lambda ( \phi ( Z _ { \mathcal { E } } ; \omega ) ; \rho ) .
68
+ $$
69
+
70
+ Since eq. (2) consists of a composition of non-linear functions, we can leverage the same tools used successfully in deep learning, namely back-propagation and stochastic gradient descent (SGD), to optimize it. The main obstacle is to choose a learning algorithm $\Lambda$ that is amenable to optimization with such tools. This means that, in practice, $\Lambda$ must be quite simple.
71
+
72
+ Examples of meta-learning algorithms. Using eq. 2, it is possible to describe several of the metalearning methods in the literature, which mostly differ for the choice of $\Lambda$ . The feature extractor $\phi$ is typically a standard CNN, whose intermediate layers are trained jointly as $\omega$ (and thus are not episode-specific). The last layer represents the linear predictor $f$ , with episode-specific parameters $w \varepsilon$ . In Siamese networks (Bromley et al., 1993; Chopra et al., 2005; Koch et al., 2015), $f$ is a nearest neighbour classifier, which becomes soft $k$ -means in the semi-supervised setting proposed by Ren et al. (2018). Ravi & Larochelle (2017) and Andrychowicz et al. (2016) used an LSTM to implement $\Lambda$ , while the Learnet (Bertinetto et al., 2016) uses a factorized CNN and MAML (Finn et al., 2017) implements it using SGD (and furthermore adapts all parameters of the CNN).
73
+
74
+ Instead, we use simple and fast-converging methods as base learner $\Lambda$ , namely least-squares based solutions for ridge regression and logistic regression. In the outer loop, we allow SGD to learn both the parameters $\omega$ of the feature representation of $\Lambda$ and its hyper-parameters $\rho$ .
75
+
76
+ # 3.2 EFFICIENT RIDGE REGRESSION BASE LEARNERS
77
+
78
+ Similarly to the methods discussed in Section 3.1, over the course of a single episode we adapt a linear predictor $f$ , which can be considered as the final layer of a CNN. The remaining layers $\phi$ are trained from scratch (within the outer loop of meta-learning) to generalize between episodes, but for the purposes of one episode they are considered fixed. In this section, we assume that the inputs were pre-processed by the CNN $\phi$ , and that we are dealing only with the final linear predictor $f ( \phi ( x ) ) = \phi ( x ) W \in \mathbb { R } ^ { o }$ , where the parameters $w \varepsilon$ are reorganized into a matrix $W \in \mathbb { R } ^ { e \times o }$ .
79
+
80
+ The motivation for our work is that, while not quite as simple as nearest neighbours, least-squares regressors admit closed-form solutions. Although simple least-squares is prone to overfitting, it is easy to augment it with $L ^ { 2 }$ regularization (controlled by a positive hyper-parameter $\lambda$ ), in what is known as ridge regression:
81
+
82
+ $$
83
+ \begin{array} { c } { \Lambda ( Z ) = \underset { W } { \arg \operatorname* { m i n } } \left\| X W - Y \right\| ^ { 2 } + \lambda \left\| W \right\| ^ { 2 } } \\ { = \big ( X ^ { T } X + \lambda I \big ) ^ { - 1 } X ^ { T } Y , } \end{array}
84
+ $$
85
+
86
+ where $\ b X \in \mathbb R ^ { n \times e }$ and $Y \in \mathbb { R } ^ { n \times o }$ contain the $n$ sample pairs of input embeddings and outputs from $Z$ , stacked as rows.
87
+
88
+ Because ridge regression admits a closed form solution (eq. (4)), it is relatively easy to integrate into meta-learning (eq. (2)) using standard automatic differentiation packages. The only element that may have to be treated more carefully is the matrix inversion. When the matrix to invert is close to singular (which we do not expect when $\lambda > 0$ ), it is possible to achieve more numerically accurate results by replacing the matrix inverse and vector product with a linear system solver (Murphy, 2012, 7.5.2). In our experiments, the matrices were not close to singular and we did not find this necessary.
89
+
90
+ Another concern about eq. (4) is that the intermediate matrix $X ^ { T } X \in \mathbb { R } ^ { e \times e }$ grows quadratically with the embedding size $e$ . Given the high dimensionality of features typically used in deep networks, the inversion could come at a very expensive cost. To alleviate this, we rely on the Woodbury formula (Petersen et al., 2008, Chapter 3.2), obtaining:
91
+
92
+ $$
93
+ W = \Lambda ( Z ) = X ^ { T } ( X X ^ { T } + \lambda I ) ^ { - 1 } Y .
94
+ $$
95
+
96
+ The main advantage of eq. (5) is that the intermediate matrix $X X ^ { T } \in \mathbb { R } ^ { n \times n }$ now grows quadratically with the number of samples in the episode, $n$ . As we are interested in one or few-shot learning, this is typically very small. The overall cost of eq. (5) is only linear in the embedding size $e$ .
97
+
98
+ Although this method was originally designed for regression, we found that it works well also in a (few-shot) classification scenario, where the target outputs are one-hot vectors representing classes. However, since eq. 4 does not directly produce classification labels, it is important to calibrate its output for the cross-entropy loss, which is used to evaluate the episode’s test samples ( $L$ in eq. 2). This can be done by simply adjusting our prediction $X ^ { \prime } W$ with a scale and a bias $\alpha , \beta \in \mathbb { R }$ :
99
+
100
+ $$
101
+ \widehat { Y } = \alpha X ^ { \prime } W + \beta .
102
+ $$
103
+
104
+ Note that $\lambda$ , $\alpha$ and $\beta$ are hyper-parameters of the base learner $\Lambda$ and can be learnt by the outer learning loop represented by the meta-learner, together with the CNN parameters $\omega$ .
105
+
106
+ # 3.3 ITERATIVE BASE LEARNERS AND LOGISTIC REGRESSION
107
+
108
+ It is natural to ask whether other learning algorithms can be integrated as efficiently as ridge regression within our meta-learning framework. In general, a similar derivation is possible for iterative solvers, as long as the operations are differentiable. For linear models with convex loss functions, a better choice than gradient descent is Newton’s method, which uses curvature (second-order) information to reach the solution in very few steps. One learning objective of particular interest is logistic regression, which unlike ridge regression directly produces classification labels, and thus does not require the use of calibration before the (binary) cross-entropy loss.
109
+
110
+ When one applies Newton’s method to logistic regression, the resulting algorithm takes a familiar form — it consists of a series of weighted least squares (or ridge regression) problems, giving it the name Iteratively Reweighted Least Squares (IRLS) (Murphy, 2012, Chapter 8.3.4). Given inputs $\ b X \in \mathbb R ^ { n \times e }$ and binary outputs $y \in \{ - \bar { 1 } , 1 \} ^ { n }$ , the $i$ -th iteration updates the parameters $w _ { i } \in \mathbb { R } ^ { e }$ as:
111
+
112
+ $$
113
+ w _ { i } = \left( X ^ { T } \mathrm { d i a g } ( s _ { i } ) X + \lambda I \right) ^ { - 1 } X ^ { T } \mathrm { d i a g } ( s _ { i } ) z _ { i } ,
114
+ $$
115
+
116
+ where $I$ is an identity matrix, $s _ { i } = \mu _ { i } ( 1 - \mu _ { i } )$ , $z _ { i } = w _ { i - 1 } ^ { T } X + ( y - \mu _ { i } ) / s _ { i }$ , and $\mu _ { i } = \sigma ( w _ { i - 1 } ^ { T } X )$ applies a sigmoid function $\sigma$ to the predictions using the previous parameters $w _ { i - 1 }$ .
117
+
118
+ Since eq. (7) takes a similar form to ridge regression, we can use it for meta-learning in the same way as in section 3.2, with the difference that a small number of steps (eq. (7)) must be performed in order to obtain the final parameters $w \varepsilon$ . Similarly, at each step $i$ , we obtain a solution with a cost which is linear rather than quadratic in the embedding size by employing the Woodbury formula:
119
+
120
+ $$
121
+ w _ { i } = X ^ { T } \Big ( X X ^ { T } + \lambda \mathrm { d i a g } ( s _ { i } ) ^ { - 1 } \Big ) ^ { - 1 } z _ { i } ,
122
+ $$
123
+
124
+ where the inner inverse has negligible cost since it is a diagonal matrix. Note that a similar strategy could be followed for other learning algorithms based on IRLS, such as $L ^ { 1 }$ minimization and LASSO. We take logistic regression to be a sufficiently illustrative example, of particular interest for binary classification in one/few-shot learning, leaving the exploration of other variants for future work.
125
+
126
+ # 3.4 TRAINING POLICY
127
+
128
+ Figure 1 illustrates our overall framework. Like most meta-learning techniques, we organize our training procedure into episodes, each of which corresponds to a few-shot classification problem. In standard classification, training requires sampling from a distribution of images and labels. Instead, in our case we sample from a distribution of episodes, each containing its own training set and test set, with just a few samples per image. Each episode also contains two sets of labels: $Y$ and $Y ^ { \prime }$ . The former is used to train the base learner, while the latter to compute the error of the just-trained base learner, enabling back-propagation in order to learn $\omega$ , $\lambda$ , $\alpha$ and $\beta$ .
129
+
130
+ In our implementation, one episode corresponds to a mini-batch of size $S = N ( K + Q )$ , where $N$ is the number of different classes (“ways”), $K$ the number of samples per classes (“shots”) and $Q$ the number of query (or test) images per class.
131
+
132
+ # 4 EXPERIMENTS
133
+
134
+ In this section, we provide practical details for the two novel methods introduced in Section 3.2 and 3.3, which we dub R2-D2 (Ridge Regression Differentiable Discriminator) and LR-D2 (Logistic Regression Differentiable Discriminator). We analyze their performance against the recent literature on multi-class and binary classification problems using three few-shot learning benchmarks: Omniglot (Lake et al., 2015), miniImageNet (Vinyals et al., 2016) and CIFAR-FS, which we introduce in this paper. The code for both our methods and the splits of CIFAR-FS are available at http://www.robots.ox.ac.uk/\~luca/r2d2.html.
135
+
136
+ # 4.1 FEW-SHOT LEARNING BENCHMARKS
137
+
138
+ Let $I _ { \star }$ and $C _ { \star }$ be respectively the set of images and the set of classes belonging to a certain data split $\star$ . In standard classification datasets, $I _ { \mathrm { t r a i n } } \cap I _ { \mathrm { t e s t } } = \emptyset$ and $C _ { \mathrm { t r a i n } } = C _ { \mathrm { t e s t } }$ . Instead, the few-shot setup requires both $I _ { \mathrm { m e t a - t r a i n } } \cap I _ { \mathrm { m e t a - t e s t } } = \emptyset$ and Cmeta-train $\cap C _ { \mathrm { m e t a - t e s t } } = \emptyset$ , while within an episode we have $C _ { \mathrm { t a s k - t r a i n } } = C _ { \mathrm { t a s k - t } }$ est.
139
+
140
+ Omniglot (Lake et al., 2015) is a dataset of handwritten characters that has been referred to as the “MNIST transpose” for its high number of classes and small number of instances per class. It contains
141
+
142
+ 20 examples of 1623 characters, grouped in 50 different alphabets. In order to be able to compare against the state of the art, we adopt the same setup and data split used in Vinyals et al. (2016). Hence, we resize images to $2 8 \times 2 8$ and we augment the dataset using four rotated versions of the each instance $0 ^ { \circ }$ , $9 0 ^ { \circ }$ , $1 8 0 ^ { \circ }$ , $2 7 0 ^ { \circ }$ ). Including rotations, we use 4800 classes for meta-training and meta-validation and 1692 for meta-testing.
143
+
144
+ miniImageNet (Vinyals et al., 2016) aims at representing a challenging dataset without demanding considerable computational resources. It is randomly sampled from ImageNet (Russakovsky et al., 2015) and it is constituted by a total of 60,000 images from 100 different classes, each with 600 instances. All images are RGB and have been downsampled to $8 4 \times 8 4$ . As all recent work, we adopt the same splits of Ravi & Larochelle (2017), who employ 64 classes for meta-training, 16 for meta-validation and 20 for meta-testing.
145
+
146
+ CIFAR-FS. On the one hand, despite being lightweight, Omniglot is becoming too simple for modern few-shot learning methods, especially with the splits of Vinyals et al. (2016). On the other, miniImageNet is more challenging, but it might still require a model to train for several hours before convergence. Thus, we propose CIFAR-FS (CIFAR100 few-shots), which is randomly sampled from CIFAR-100 (Krizhevsky & Hinton, 2009) by using the same criteria with which miniImageNet has been generated. We observed that the average inter-class similarity is sufficiently high to represent a challenge for the current state of the art. Moreover, the limited original resolution of $3 2 \times 3 2$ makes the task harder and at the same time allows fast prototyping.
147
+
148
+ # 4.2 EXPERIMENTAL RESULTS
149
+
150
+ In order to produce the features $X$ for the base learners (eq. 4 and 7), as many recent methods we use a shallow network of four convolutional “blocks”, each consisting of the following sequence: a $3 { \times } 3$ convolution (padding $^ { = 1 }$ , stride $^ { = 1 }$ ), batch-normalization, $2 \times 2$ max-pooling, and a leaky-ReLU with a factor of 0.1. Max pooling’s stride is 2 for the first three layers and 1 for the last one. The four convolutional layers have [96, 192, 384, 512] filters. Dropout is applied to the last two blocks for the experiments on miniImageNet and CIFAR-FS, respectively with probabilities 0.1 and 0.4. We do not use any fully connected layer. Instead, we flatten and concatenate the output of the third and fourth convolutional blocks and feed it to the base learner. Doing so, we obtain high-dimensional features of size 3584, 72576 and 8064 for Omniglot, miniImageNet and CIFAR-FS respectively. It is important to mention that the use of the Woodbury formula (section 3.2) allows us to make use of high-dimensional features without incurring burdensome computations. In fact, in few-shot problems the data matrix $X$ is particularly “large and short”. As an example, with a 5-way/1-shot problem from miniImageNet we have $X \in \mathbb { R } ^ { 5 \times 7 2 5 7 6 }$ . Applying the Woodbury identity, we obtain significant gains in computation, as in eq. 5 we invert a matrix that is only $5 \times 5$ instead of $7 2 5 7 6 \times 7 2 5 7 6$ .
151
+
152
+ As Snell et al. (2017), we observe that using a higher number of classes during training is important. Hence, despite the few-shot problem at test time being 5 or 20-way, in our multi-class classification experiments we train using 60 classes for Omniglot, 16 for miniImageNet and 20 for CIFAR-FS. Moreover, in order not to train a different model for every single configuration (two for miniImageNet and CIFAR-FS, four for Omniglot), similarly to (Mishra et al., 2018) and differently from previous work, we train our models with a random number of shots, which does not deteriorate the performance and allow us to simply train one model per dataset. We then choose $Q$ (the size of the query or test set) accordingly, so that the batch size $S$ remains constant throughout the episodes. We set $S$ to 600 for Omniglot and 240 for both miniImageNet and CIFAR-FS.
153
+
154
+ At the meta-learning level, we train our methods with Adam (Kingma & Ba, 2015) with an initial learning rate of 0.005, dampened by 0.5 every 2,000 episodes. Training is stopped when the error on the meta-validation set does not decrease meaningfully for 20,000 episodes.
155
+
156
+ As for the base learner, we let SGD learn the parameters $\omega$ of the CNN, as well as the regularization factor $\lambda$ and the scale $\alpha$ and bias $\beta$ of the calibration layer of R2-D2 (end of Section 3.2). In practice, we observed that it is important to use SGD to adapt $\alpha$ and $\beta$ , while it is indifferent whether $\lambda$ is learnt or not. A more detailed analysis can be found in Appendix C.
157
+
158
+ Multi-class classification. Tables 1 and 2 show the performance of our closed-form base learner R2-D2 against the current state of the art for shallow architectures of four convolutional layers. Values represent average classification accuracies obtained by sampling 10,000 episodes from the meta test-set and are presented with $9 5 \%$ confidence intervals. For each column, the best performance is in bold. If more than one value is outlined, it means their intervals overlap. For prototypical networks, we report the results reproduced by the code provided by the authors. For our comparison, we report the results of methods which train their models from scratch for few-shot classification, omitting very recent work of Qiao et al. (2018) and Gidaris & Komodakis (2018), which instead make use of pre-trained embeddings.
159
+
160
+ Table 1: Few-shot multi-class classification accuracies on miniImageNet and CIFAR-FS.
161
+
162
+ <table><tr><td colspan="3">miniImageNet,5-way</td><td colspan="2">CIFAR-FS,5-way</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MATCHING NET (Vinyals et al., 2016)</td><td>44.2%</td><td>57%</td><td></td><td></td></tr><tr><td>MAML (Finn et al., 2017)</td><td>48.7±1.8%</td><td>63.1±0.9%</td><td>58.9±1.9%</td><td>71.5±1.0%</td></tr><tr><td>MAML *</td><td>40.9±1.5%</td><td>58.9±0.9%</td><td>53.8±1.8%</td><td>67.6±1.0%</td></tr><tr><td>META-LSTM (Ravi&amp; Larochelle,2017)</td><td>43.4±0.8%</td><td>60.6±0.7%</td><td></td><td></td></tr><tr><td>PROTO NET (Snell et al., 2017)</td><td>47.4±0.6%</td><td>65.4±0.5%</td><td>55.5±0.7%</td><td>72.0±0.6%</td></tr><tr><td>PROTO NET *</td><td>42.9±0.6%</td><td>65.9±0.6%</td><td>57.9±0.8%</td><td>76.7±0.6%</td></tr><tr><td>RELATION NET (Sung et al., 2018)</td><td>50.4±0.8%</td><td>65.3±0.7%</td><td>55.0±1.0%</td><td>69.3±0.8%</td></tr><tr><td>SNAIL (with ResNet) (Mishra et al.,2018)</td><td>55.7±1.0%</td><td>68.9±0.9%</td><td></td><td></td></tr><tr><td>SNAIL (with 32C) (Mishra et al., 2018)</td><td>45.1%</td><td>55.2%</td><td></td><td></td></tr><tr><td>GNN (Garcia &amp; Bruna,2018)</td><td>50.3%</td><td>66.4%</td><td>61.9%</td><td>75.3%</td></tr><tr><td>GNN*</td><td>50.3%</td><td>68.2%</td><td>56.0%</td><td>72.5%</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>49.5±0.2%</td><td>65.4±0.2%</td><td>62.3±0.2%</td><td>77.4±0.2%</td></tr><tr><td>OURS/R2-D2</td><td>51.8±0.2%</td><td>68.4±0.2%</td><td>65.4±0.2%</td><td>79.4±0.2%</td></tr><tr><td>OURS/LR-D2 (1 iter.)</td><td>51.0±0.2%</td><td>65.6±0.2%</td><td>64.5±0.2%</td><td>75.8±0.2%</td></tr><tr><td>OURS/LR-D2 (5 iter.)</td><td>51.9±0.2%</td><td>68.7±0.2%</td><td>65.3±0.2%</td><td>78.3±0.2%</td></tr></table>
163
+
164
+ In terms of feature embeddings, Vinyals et al. (2016); Finn et al. (2017); Snell et al. (2017); Ravi & Larochelle (2017) use 64 filters per layer (which become 32 for miniImageNet in (Ravi & Larochelle, 2017; Finn et al., 2017) to limit overfitting). On top of this, Sung et al. (2018) also uses a relation module of two convolutional and two fully connected layers. GNN (Garcia & Bruna, 2018) employs an embedding with [64, 96, 128, 256] filters, a fully connected layer and a graph neural network (with its own extra parameters). In order to ensure a fair comparison, we increased the capacity of the architectures of three representative methods (MAML, prototypical networks and GNN) to match ours. The results of these experiments are reported with $^ { \textrm { a * } }$ on Table 1. We make use of dropout on the last two layers for all the experiments on baselines with $^ *$ , as we verified it is helpful to reduce overfitting. Moreover, we report results for experiments on our R2-D2 in which we use a 64 channels embedding.
165
+
166
+ Despite its simplicity, our proposed method achieves an average accuracy that, on miniImageNet and CIFAR-FS, is superior to the state of the art with shallow architectures. For example, on the four problems of Table 1, R2-D2 improves on average of a relative $4 . 3 \%$ w.r.t. GNN (the second best method). R2-D2 shows competitive results also on Omniglot (Table 2), achieving among the best performance for all problems. Furthermore, when we use the “lighter” embedding, we can still observe a performance which is in line with the state of the art. Interestingly, increasing the capacity of the other methods it is not particularly helpful. It is beneficial only for GNN on miniImageNet and prototypical networks on CIFAR-FS, while being detrimental in all the other cases.
167
+
168
+ Our R2-D2 is also competitive against SNAIL, which uses a much deeper architecture (a ResNet with a total of 14 convolutional layers). Despite being outperformed for the 1-shot case, we can match its results on the 5-shot one. Moreover, it is paramount for SNAIL to make use of such deep embedding, as its performance drops significantly with a shallow one.
169
+
170
+ LR-D2 performance on multi-class classification. In order to be able to compare our binary classifier LR-D2 with the state-of-the-art in few-shot $N$ -class classification, it is possible to jointly consider $N$ binary classifiers, each of which discriminates between a specific class and all the remaining ones (Bishop, 2006, Chapter 4.1). In our framework, this can be easily implemented by concatenating together the outputs of $_ \mathrm { N }$ instances of LR-D2, resulting in a single multi-class prediction.
171
+
172
+ Table 2: Few-shot multi-class classification accuracies on Omniglot.
173
+
174
+ <table><tr><td></td><td colspan="2">Omniglot, 5-way</td><td colspan="2">Omniglot, 20-way</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>SIAMESE NET (Koch et al., 2015)</td><td>96.7%</td><td>98.4%</td><td>88%</td><td>96.5%</td></tr><tr><td>MATCHING NET (Vinyals et al., 2016)</td><td>98.1%</td><td>98.9%</td><td>93.8%</td><td>98.5%</td></tr><tr><td>MAML (Finn et al., 2017)</td><td>98.7±0.4%</td><td>99.9±0.1%</td><td>95.8±0.3%</td><td>98.9±0.2%</td></tr><tr><td>PROTO NET (Snell et al., 2017)</td><td>98.5±0.2%</td><td>99.5±0.1%</td><td>95.3±0.2%</td><td>98.7±0.1%</td></tr><tr><td>SNAIL (Mishra et al.,2018)</td><td>99.07±0.16%</td><td>99.77±0.09%</td><td>97.64±0.30%</td><td>99.36±0.18%</td></tr><tr><td>GNN(Garcia&amp; Bruna,2018)</td><td>99.2%</td><td>99.7%</td><td>97.4%</td><td>99.0%</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>98.55±0.05%</td><td>99.66±0.02%</td><td>94.70±0.05%</td><td>98.91±0.02%</td></tr><tr><td>OURS/R2-D2</td><td>98.91±0.05%</td><td>99.74±0.02%</td><td>96.24±0.05%</td><td>99.20±0.02%</td></tr></table>
175
+
176
+ Table 3: Few-shot binary classification accuracies on miniImageNet and CIFAR-FS.
177
+
178
+ <table><tr><td rowspan="2">Method</td><td colspan="2">miniImageNet, 2-way</td><td colspan="2">CIFAR-FS,2-way</td></tr><tr><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MAML (Finn et al.,2017)</td><td>74.9±3.0%</td><td>84.4±1.2%</td><td>82.8±2.7%</td><td>88.3±1.1%</td></tr><tr><td>PROTO NETs (Snell et al., 2017)</td><td>71.7±1.0%</td><td>84.8±0.7%</td><td>76.4±0.9%</td><td>88.5±0.6%</td></tr><tr><td>RELATION NET (Sung et al., 2018)</td><td>76.2±1.2%</td><td>86.8±1.0%</td><td>75.0±1.5%</td><td>86.7±0.9%</td></tr><tr><td>GNN(Garcia &amp; Bruna,2018)</td><td>78.4%</td><td>87.1%</td><td>79.3%</td><td>89.1%</td></tr><tr><td>OURS/R2-D2</td><td>77.4±0.3%</td><td>86.8±0.2%</td><td>84.1±0.3%</td><td>91.7±0.2%</td></tr><tr><td>OURS/LR-D2 (10 iter.)</td><td>78.1±0.3%</td><td>86.5±0.2%</td><td>84.7±0.3%</td><td>91.5±0.2%</td></tr></table>
179
+
180
+ We use the same setup and hyper-parameters of R2-D2 (Section 4), except for the number of classes/ways used at training, which we limit to 10. Interestingly, with five IRLS iterations the accuracy of the 1-vs-all variant of LR-D2 is similar to the one of R2-D2 (Table 1): $5 1 . 9 \%$ and $6 8 . 7 \%$ for miniImageNet (1-shot and 5-shot); $6 5 . 3 \%$ and $7 8 . 3 \%$ for CIFAR-FS. With a single iteration, performance is still very competitive: $5 1 . 0 \%$ and $6 5 . 6 \%$ for miniImageNet; $6 4 . 5 \%$ and $7 5 . 8 \%$ for CIFAR-FS. However, the requirement of solving $N$ binary problems per iteration makes it much less efficient than R2-D2, as evident in Table 4.
181
+
182
+ Binary classification. Finally, in Table 3 we report the performance of both our ridge regression and logistic regression base learners, together with four representative methods. Since LR-D2 is limited to operate in a binary classification setup, we run our R2-D2 and prototypical network without oversampling the number of ways. For both methods and prototypical networks, we report the performance obtained annealing the learning rate by a factor of 0.99, which works better than the schedule used for multi-class classification. Moreover, motivated by the small size of the mini-batches, we replace Batch Normalization with Group Normalization (Wu & He, 2018). For this table, we use the default setup found in the code of MAML, which uses 5 SGD iterations during training and 10 during testing. Table 3 confirms the validity of both our approaches on the binary classification problem.
183
+
184
+ Although different in nature, both MAML and our LR-D2 make use of iterative base learners: the former is based on SGD, while the latter on Newton’s method (under the form of Iteratively Reweighted Least Squares). The use of second-order optimization might suggest that LR-D2 is characterized by computationally demanding steps. However, we can apply the Woodbury identity at every iteration and obtain a significant speedup. In Figure 2 we compare the performance of LR-D2 vs the one of MAML for a different number of steps of the base learner (kept constant between training and testing). LR-D2 is superior to MAML, especially for a higher number of steps.
185
+
186
+ Efficiency. In Table 4 we compare the amount of time required by two representative methods and ours to solve 10,000 episodes (each with 10 images) on a single NVIDIA GTX 1080 GPU. We use miniImageNet (5-way, 1-shot) and adopt, for the lower part of the table, a lightweight embedding network of 4 layers and 32 channels per layer. For reference, in the upper part of the table we also report the timings for R2-D2 with [64, 64, 64, 64] and [96, 192, 384, 512] embeddings.
187
+
188
+ ![](images/d7e91f0475ce708f5ce6ac91568f402d4c6c4a95264c2b850c481b0a30de15b7.jpg)
189
+ Figure 2: Binary classification accuracy on two datasets and two setups at different number of steps of the base learner for MAML, R2-D2 and LR-D2. Shaded areas represent $9 5 \%$ confidence intervals.
190
+
191
+ Interestingly, we can observe how R2-D2 allows us to achieve an efficiency that is comparable to the one of prototypical networks and significantly higher than MAML. Notably, unlike prototypical networks, our methods do allow per-episode adaptation through the weights $W$ of the solver.
192
+
193
+ Table 4: Time required to solve 10,000 miniImageNet episodes of 10 samples each.
194
+
195
+ <table><tr><td></td><td>miniImageNet,5-way,1-shot</td></tr><tr><td>OURS/R2-D2</td><td>1 min 23 sec</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>1 min 4 sec</td></tr><tr><td>MAML (Finn et al.,2017) (with 32C)</td><td>6 min 35 sec</td></tr><tr><td>OURs/LR-D2 (1-vs-all) (1 iter.) (with 32C)</td><td>5 min 48 sec</td></tr><tr><td>OURS/R2-D2 (with 32C)</td><td>57 sec</td></tr><tr><td>PROTO NETs (Snell et al.,2017) (with 32C)</td><td>24 sec</td></tr></table>
196
+
197
+ # 5 CONCLUSIONS
198
+
199
+ With the aim of allowing efficient adaptation to unseen learning problems, in this paper we explored the feasibility of incorporating fast solvers with closed-form solutions as the base learning component of a meta-learning system. Importantly, the use of the Woodbury identity allows significant computational gains in a scenario presenting only a few samples with high dimensionality, like one-shot of few-shot learning. R2-D2, the differentiable ridge regression base learner we introduce, is almost as fast as prototypical networks and strikes a useful compromise between not performing adaptation for new episodes (like metric-learning-based approaches) and conducting a costly iterative approach (like MAML or LSTM-based meta-learners). In general, we showed that our base learners work remarkably well, with excellent results on few-shot learning benchmarks, generalizing to episodes with new classes that were not seen during training. We believe that our findings point in an exciting direction of more sophisticated yet efficient online adaptation methods, able to leverage the potential of prior knowledge distilled in an offline training phase. In future work, we would like to explore Newton’s methods with more complicated second-order structure than ridge regression.
200
+
201
+ # ACKNOWLEDGMENTS
202
+
203
+ We would like to thank Jack Valmadre, Namhoon Lee and the anonymous reviewers for their insightful comments, which have been useful to improve the manuscript. This work was partially supported by the ERC grant 638009-IDIU.
204
+
205
+ # REFERENCES
206
+
207
+ Han Altae-Tran, Bharath Ramsundar, Aneesh S Pappu, and Vijay Pande. Low data drug discovery with one-shot learning. ACS central science, 2017.
208
+
209
+ Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, 2016.
210
+
211
+ Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, pp. 6–8. Univ. of Texas, 1992.
212
+
213
+ Yoshua Bengio. Gradient-based optimization of hyperparameters. Neural computation, 2000.
214
+
215
+ Luca Bertinetto, João F Henriques, Jack Valmadre, Philip Torr, and Andrea Vedaldi. Learning feed-forward one-shot learners. In Advances in Neural Information Processing Systems, 2016.
216
+
217
+ Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer-Verlag, Berlin, Heidelberg, 2006.
218
+
219
+ Jane Bromley, James W Bentz, Léon Bottou, Isabelle Guyon, Yann LeCun, Cliff Moore, Eduard Säckinger, and Roopak Shah. Signature verification using a “Siamese” time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 1993.
220
+
221
+ Susan Carey. Less may never mean more. Recent advances in the psychology of language, 1978.
222
+
223
+ Susan Carey and Elsa Bartlett. Acquiring a single new word. 1978.
224
+
225
+ Rich Caruana. Multitask learning. In Learning to learn. Springer, 1998.
226
+
227
+ Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In IEEE Conference on Computer Vision and Pattern Recognition, 2005.
228
+
229
+ Brian Chu, Vashisht Madhavan, Oscar Beijbom, Judy Hoffman, and Trevor Darrell. Best practices for fine-tuning visual classifiers to new domains. In European Conference on Computer Vision workshops. Springer, 2016.
230
+
231
+ Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006.
232
+
233
+ Chelsea Finn and Sergey Levine. Meta-learning and universality: Deep representations and gradient descent can approximate any learning algorithm. 2018.
234
+
235
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017.
236
+
237
+ Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. In International Conference on Learning Representations, 2018.
238
+
239
+ Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
240
+
241
+ Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2012.
242
+
243
+ Bharath Hariharan and Ross B Girshick. Low-shot visual recognition by shrinking and hallucinating features. In IEEE International Conference on Computer Vision, 2017.
244
+
245
+ Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001.
246
+
247
+ Catalin Ionescu, Orestis Vantzos, and Cristian Sminchisescu. Training deep networks with structured layers by matrix backpropagation. arXiv preprint arXiv:1509.07838, 2015.
248
+
249
+ Łukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. Learning to remember rare events. In International Conference on Learning Representations, 2017.
250
+
251
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. 2015.
252
+
253
+ Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In International Conference on Machine Learning workshops, 2015.
254
+
255
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
256
+
257
+ Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 2015.
258
+
259
+ Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In International Conference on Machine Learning, pp. 2113–2122, 2015.
260
+
261
+ Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation. 1989.
262
+
263
+ Erik G Miller, Nicholas E Matsakis, and Paul A Viola. Learning from one example through shared densities on transforms. In IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2000.
264
+
265
+ Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. In International Conference on Learning Representations, 2018.
266
+
267
+ Tom M Mitchell. The need for biases in learning generalizations. Department of Computer Science, Laboratory for Computer Science Research, Rutgers Univ. New Jersey, 1980.
268
+
269
+ Tom M Mitchell et al. Machine learning. 1997. Burr Ridge, IL: McGraw Hill, 1997.
270
+
271
+ Tsendsuren Munkhdalai and Hong Yu. Meta networks. In International Conference on Machine Learning, 2017.
272
+
273
+ Kevin P. Murphy. Machine Learning: A Probabilistic Perspective. The MIT Press, 2012.
274
+
275
+ Devang K Naik and RJ Mammone. Meta-neural networks that learn by learning. In Neural Networks, 1992. IJCNN., International Joint Conference on. IEEE, 1992.
276
+
277
+ Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. CoRR, 2018. URL http://arxiv.org/abs/1803.02999.
278
+
279
+ Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
280
+
281
+ Kaare Brandt Petersen, Michael Syskind Pedersen, et al. The matrix cookbook. Technical University of Denmark, 2008.
282
+
283
+ Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L. Yuille. Few-shot image recognition by predicting parameters from activations. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
284
+
285
+ Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, 2017.
286
+
287
+ Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, 2017.
288
+
289
+ Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. In International Conference on Learning Representations, 2018.
290
+
291
+ Sebastian Ruder. An overview of multi-task learning in deep neural networks. arXiv preprint arXiv:1706.05098, 2017.
292
+
293
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. 2015.
294
+
295
+ Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International Conference on Machine Learning, 2016.
296
+
297
+ Jürgen Schmidhuber. Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-... hook. PhD thesis, Technische Universität München, 1987.
298
+
299
+ Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 1992.
300
+
301
+ Jürgen Schmidhuber. A neural network that embeds its own meta-levels. In Neural Networks, 1993., IEEE International Conference on. IEEE, 1993.
302
+
303
+ Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, 2017.
304
+
305
+ Pablo Sprechmann, Siddhant M Jayakumar, Jack W Rae, Alexander Pritzel, Adrià Puigdomènech Badia, Benigno Uria, Oriol Vinyals, Demis Hassabis, Razvan Pascanu, and Charles Blundell. Memory-based parameter adaptation. 2018.
306
+
307
+ Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
308
+
309
+ Albert Tarantola. Inverse problem theory and methods for model parameter estimation, volume 89. siam, 2005.
310
+
311
+ Sebastian Thrun. Is learning the n-th thing any easier than learning the first? In Advances in Neural Information Processing Systems, 1996.
312
+
313
+ Sebastian Thrun. Lifelong learning algorithms. In Learning to learn. Springer, 1998.
314
+
315
+ Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 1998.
316
+
317
+ Paul E Utgoff. Shift of bias for inductive concept learning. Machine learning: An artificial intelligence approach, 1986.
318
+
319
+ Jack Valmadre, Luca Bertinetto, João Henriques, Andrea Vedaldi, and Philip HS Torr. End-to-end representation learning for correlation filter based tracking. In IEEE Conference on Computer Vision and Pattern Recognition, 2017.
320
+
321
+ Ricardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial Intelligence Review, 2002.
322
+
323
+ Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, 2016.
324
+
325
+ Yuxin Wu and Kaiming He. Group normalization. CoRR, 2018. URL http://arxiv.org/ abs/1803.08494.
326
+
327
+ Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in Neural Information Processing Systems, 2014.
328
+
329
+ A Steven Younger, Sepp Hochreiter, and Peter R Conwell. Meta-learning with backpropagation. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on. IEEE, 2001.
330
+
331
+ # A EXTENDED DISCUSSION
332
+
333
+ Contributions within the few-shot learning paradigm. In this work, we evaluated our proposed methods R2-D2 and LR-D2 in the few-shot learning scenario (Fei-Fei et al., 2006; Lake et al., 2015; Vinyals et al., 2016; Ravi & Larochelle, 2017; Hariharan & Girshick, 2017), which consists in learning how to discriminate between images given one or very few examples. For methods tackling this problem, it is common practice to organise the training procedure in two nested loops. The inner loop is used to solve the actual few-shot classification problem, while the outer loop serves as a guidance for the former by gradually modifying the inductive bias of the base learner (Vilalta & Drissi, 2002). Differently from standard classification benchmarks, the few-shot ones enforce that classes are disjoint between dataset splits.
334
+
335
+ In the literature (e.g. Vinyals et al. (2016)), the very small classification problems with unseen classes solved within the inner loop have often been referred to as episodes or tasks. Considering the general few-shot learning paradigm just described, methods in the recent literature mostly differ for the type of learner they use in the inner loop and the amount of per-episode adaptability they allow. For example, at the one end of the spectrum in terms of “amount of adaptability”, we can find methods such as MAML Finn et al. (2017), which learns how to efficiently fine-tune the parameters of a neural-network with few iterations of SGD. On the other end, we have methods based on metric learning such as prototypical networks Snell et al. (2017) and relation network Sung et al. (2018), which are fast but do not perform adaptation. Note that the amount of adaptation to a new episode (i.e.a new classification problem with unseen classes) is not at all indicative of the performance in few-shot learning benchmarks. As a matter of fact, both Snell et al. (2017) and Sung et al. (2018) achieve higher accuracy than MAML. Nonetheless, adaptability is a desirable property, as it allows more design flexibility.
336
+
337
+ Within this landscape, our work proposes a novel technique (R2-D2) that does allow per-episode adaptation while at the same time being fast (Table 4) and achieving strong performance (Table 1). The key innovation is to use a simple (and differentiable) solver such as ridge regression within the inner loop, which requires back-propagating through the solution of a learning problem. Crucially, its closed-form solution and the use of the Woodbury identity (particularly advantageous in the low data regime) allow this non-trivial endeavour to be efficient. We further demonstrate that this strategy is not limited to the ridge regression case, but it can also be extended to other solvers (LR-D2) by dividing the problem into a short series of weighted least squares problems ((Murphy, 2012, Chapter 8.3.4)).
338
+
339
+ Disambiguation from the multi-task learning paradigm. Our work – and more generally the few-shot learning literature as a whole – is related to the multi-task learning paradigm (Caruana, 1998; Ruder, 2017). However, several crucial differences exist. In terms of setup, multi-task learning methods are trained to solve a fixed set of $T$ tasks (or domains). At test time, the same $T$ tasks or domains are encountered. For instance, the popular Office-Caltech (Gong et al., 2012) dataset is constructed by considering all the images from 10 classes present in 4 different datasets (the domains). For multi-task learning, the splits span the domains but contain all the 10 classes. Conversely, few-shot learning datasets have splits with disjoint sets of classes (i.e. each split’s classes are not contained in other splits). Moreover, only a few examples (shots) can be used as training data within one episode, while in multi-task learning this limitation is not present. For this reason, meta-learning methods applied to few-shot learning (e.g.ours, (Vinyals et al., 2016; Finn et al., 2017; Ravi & Larochelle, 2017; Mishra et al., 2018)) crucially take into account adaptation already during the training process to mimic the test-time setting, de facto learning how to learn from limited data.
340
+
341
+ The importance of considering adaptation during training. Considering adaptation during training is also one of the main traits that differentiate our approach from basic transfer learning approaches in which a neural network is first pre-trained on one dataset/task and then adapted to a different dataset/task by simply adapting the final layer(s) (e.g. Yosinski et al. (2014); Chu et al. (2016)).
342
+
343
+ To better illustrate this point, we conducted a baseline experiment. First, we pre-trained for a standard classification problem the same 4-layers CNN architecture using the same training datasets. We simply added a final fully-connected layer (with 64 outputs, like the number of classes in the training splits) and used the cross-entropy loss. Then, we used the convolutional part of this trained network as a feature extractor and fed its activations to our ridge-regression layer to produce a per-episode set of weights $W$ . On miniImagenet, the drop in performance w.r.t. our proposed R2-D2 is very significant: $- 1 3 . 8 \%$ and $- 1 1 . 6 \%$ accuracy for the 1 and 5 shot problems respectively. The drop in performance is consistent on CIFAR, though a bit less drastic: $- 1 1 . 5 \%$ and $- 5 . 9 \%$ .
344
+
345
+ These results empirically confirm that simply using basic transfer learning techniques with a shared feature representation and task-specific final layers is not a good strategy to obtain results competitive with the state-of-the-art in few-shot learning. Instead, it is necessary to enforce the generality of the underlying features during training explicitly, which we do by back-propagating through the adaptation procedure (the regressors R2-D2 and LR-D2).
346
+
347
+ # B DIFFERENT GAUSSIAN PRIORS FOR REGULARIZATION
348
+
349
+ The regularization term can be seen as a prior gaussian distribution of the parameters in a Bayesian interpretation, or more simply Tikhonov regularization (Tarantola, 2005). In the most common case of $\lambda I$ , it corresponds to an isotropic gaussian prior on the parameters.
350
+
351
+ In addition to the case in which $\lambda$ is a scalar, we also experiment with the variant $\operatorname { d i a g } ( \lambda )$ , corresponding to an axis-aligned gaussian prior with an independent variance for each parameter, which can potentially exploit the fact that the parameters have different scales. Replacing $\lambda I$ with $\mathrm { d i a g } ( \lambda )$ in 4, the final expression for W after having applied the Woodbury identity becomes:
352
+
353
+ $$
354
+ W = \Lambda ( Z ) = \mathrm { d i a g } ( \lambda ) ^ { - 1 } X ^ { T } ( X \mathrm { d i a g } ( \lambda ) ^ { - 1 } X ^ { T } + I ) ^ { - 1 } Y .
355
+ $$
356
+
357
+ # C BASE LEARNER HYPER-PARAMETERS
358
+
359
+ Figure 3 illustrates the effect of using SGD to learn, together with the parameters $\omega$ of the CNN, also the hyper-parameters ( $\vert \rho \rrangle$ in eq. 2) of the base learner $\Lambda$ . We find that it is very important to learn the scalar $\alpha$ (right plot of Figure 3) used to calibrate the output of R2-D2 in eq. 6, while it is indifferent whether or not to learn $\lambda$ . Note that, by using SGD to update $\alpha$ , it is possible (e.g.in the range $[ 1 0 ^ { - 3 } , 1 0 ^ { 0 } ] )$ to recover from poor initial values and suffer just a little performance loss w.r.t. the optimal value of $\alpha = 1 0$ .
360
+
361
+ The left plot of Figure 3 also shows the performance of R2-D2 with the variant $\operatorname { d i a g } ( \lambda )$ introduced in Appendix B. Unfortunately, despite this formulation allows us to make use of a more expressive prior, it does not improve the results compared to using a simple scalar $\lambda$ . Moreover, performance abruptly deteriorate for $\lambda > 0 . 0 1$ .
362
+
363
+ ![](images/70bb6e6e333a0bb41ad8417d9839ec88dbd7d43df24741d8ddd65f82494a9c78.jpg)
364
+ Figure 3: Shaded areas represent $9 5 \%$ confidence intervals.
parse/train/HyxnZh0ct7/HyxnZh0ct7_content_list.json ADDED
@@ -0,0 +1,1971 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "META-LEARNING WITH DIFFERENTIABLE CLOSED-FORM SOLVERS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 101,
9
+ 678,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Luca Bertinetto FiveAI & University of Oxford luca@robots.ox.ac.uk ",
17
+ "bbox": [
18
+ 184,
19
+ 176,
20
+ 390,
21
+ 218
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "João Henriques University of Oxford joao@robots.ox.ac.uk ",
28
+ "bbox": [
29
+ 477,
30
+ 176,
31
+ 674,
32
+ 218
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Philip H.S. Torr FiveAI & University of Oxford philip.torr@eng.ox.ac.uk ",
39
+ "bbox": [
40
+ 183,
41
+ 232,
42
+ 419,
43
+ 275
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Andrea Vedaldi \nUniversity of Oxford \nvedaldi@robots.ox.ac.uk ",
50
+ "bbox": [
51
+ 477,
52
+ 232,
53
+ 704,
54
+ 273
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 299,
65
+ 544,
66
+ 314
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Adapting deep networks to new concepts from a few examples is challenging, due to the high computational requirements of standard fine-tuning procedures. Most work on few-shot learning has thus focused on simple learning techniques for adaptation, such as nearest neighbours or gradient descent. Nonetheless, the machine learning literature contains a wealth of methods that learn non-deep models very efficiently. In this paper, we propose to use these fast convergent methods as the main adaptation mechanism for few-shot learning. The main idea is to teach a deep network to use standard machine learning tools, such as ridge regression, as part of its own internal model, enabling it to quickly adapt to novel data. This requires back-propagating errors through the solver steps. While normally the cost of the matrix operations involved in such a process would be significant, by using the Woodbury identity we can make the small number of examples work to our advantage. We propose both closed-form and iterative solvers, based on ridge regression and logistic regression components. Our methods constitute a simple and novel approach to the problem of few-shot learning and achieve performance competitive with or superior to the state of the art on three benchmarks. ",
73
+ "bbox": [
74
+ 233,
75
+ 332,
76
+ 766,
77
+ 553
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 579,
88
+ 336,
89
+ 595
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Humans can efficiently perform fast mapping (Carey, 1978; Carey & Bartlett, 1978), i.e. learning a new concept after a single exposure. By contrast, supervised learning algorithms — and neural networks in particular — typically need to be trained using a vast amount of data in order to generalize well. This requirement is problematic, as the availability of large labelled datasets cannot always be taken for granted. Labels can be costly to acquire: in drug discovery, for instance, campaign budgets often limits researchers to only operate with a small amount of biological data that can be used to form predictions about properties and activities of compounds (Altae-Tran et al., 2017). In other circumstances, data itself can be scarce, as it can happen for example with the problem of classifying rare animal species, whose exemplars are not easy to observe. Such a scenario, in which just one or a handful of training examples is provided, is referred to as one-shot or few-shot learning (Miller et al., 2000; Fei-Fei et al., 2006; Lake et al., 2015; Hariharan & Girshick, 2017) and has recently seen a tremendous surge in interest within the machine learning community (e.g.Vinyals et al. (2016); Bertinetto et al. (2016); Ravi & Larochelle (2017); Finn et al. (2017)). ",
96
+ "bbox": [
97
+ 173,
98
+ 611,
99
+ 825,
100
+ 791
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Currently, most methods tackling few-shot learning operate within the general paradigm of metalearning, which allows one to develop algorithms in which the process of learning can improve with the number of training episodes (Thrun, 1998; Vilalta & Drissi, 2002). This can be achieved by distilling and transferring knowledge across episodes. In practice, for the problem of few-shot classification, meta-learning is often implemented using two “nested training loops”. The base learner works at the level of individual episodes, which correspond to learning problems characterised by having only a small set of labelled training images available. The meta learner, by contrast, learns from a collection of such episodes, with the goal of improving the performance of the base learner across episodes. ",
107
+ "bbox": [
108
+ 174,
109
+ 799,
110
+ 825,
111
+ 924
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/c230430419b74e314ba2f6e4d83e7fa422a0a664c44e4863068bffd8eec78fc9.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Diagram of the proposed method for one episode, of which several are seen during meta-training. The task is to learn new classes given just a few sample images per class. In this illustrative example, there are 3 classes and 2 samples per class, making each episode a 3-way, 2-shot classification problem. At the base learning level, learning is accomplished by a differentiable ridge regression layer (R.R.), which computes episode-specific weights (referred to as $w \\varepsilon$ in Section 3.1 and as $W$ in Section 3.2). At the meta-training level, by back-propagating errors through many of these small learning problems, we train a network whose weights are shared across episodes, together with the hyper-parameters of the R.R. layer. In this way, the R.R. base learner can improve its learning capabilities as the number of experienced episodes increases. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 205,
124
+ 98,
125
+ 790,
126
+ 308
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Clearly, in any meta-learning algorithm, it is of paramount importance to choose the base learner carefully. On one side of the spectrum, methods related to nearest-neighbours, such as learning similarity functions (Koch et al., 2015; Vinyals et al., 2016; Snell et al., 2017), are fast but rely solely on the quality of the similarity metric, with no additional data-dependent adaptation at test-time. On the other side of the spectrum, methods that optimize standard iterative learning algorithms, such as backpropagating through gradient descent (Finn et al., 2017; Nichol et al., 2018) or explicitly learning the learner’s update rule (Hochreiter et al., 2001; Andrychowicz et al., 2016; Ravi & Larochelle, 2017), are slower but allow more adaptability to different problems/datasets. ",
133
+ "bbox": [
134
+ 174,
135
+ 476,
136
+ 825,
137
+ 588
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "In this paper, we take a different perspective. As base learners, we propose to adopt simple learning algorithms that admit a closed-form solution such as ridge regression. Crucially, the simplicity and differentiability of these solutions allow us to backpropagate through learning problems. Moreover, these algorithms are particularly suitable for use within a meta-learning framework for few-shot classification for two main reasons. First, their closed-form solution allows learning problems to be solved efficiently. Second, in a data regime characterized by few examples of high dimensionality, the Woodbury’s identity (Petersen et al., 2008, Chapter 3.2) can be used to obtain a very significant gain in terms of computational speed. ",
144
+ "bbox": [
145
+ 174,
146
+ 594,
147
+ 825,
148
+ 707
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "We demonstrate the strength of our approach by performing extensive experiments on Omniglot (Lake et al., 2015), CIFAR-100 (Krizhevsky & Hinton, 2009) (adapted to the few-shot problem) and miniImageNet (Vinyals et al., 2016). Our base learners are fast, simple to implement, and can achieve performance that is competitive with or superior to the state of the art in terms of accuracy. ",
155
+ "bbox": [
156
+ 174,
157
+ 713,
158
+ 825,
159
+ 768
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "2 RELATED WORK ",
166
+ "text_level": 1,
167
+ "bbox": [
168
+ 176,
169
+ 792,
170
+ 344,
171
+ 809
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "The topic of meta-learning gained importance in the machine learning community several decades ago, with the first examples already appearing in the eighties and early nineties (Utgoff, 1986; Schmidhuber, 1987; Naik & Mammone, 1992; Bengio et al., 1992; Thrun & Pratt, 1998). Utgoff (1986) proposed a framework describing when and how it is useful to dynamically adjust the inductive bias of a learning algorithm, thus implicitly “changing the ordering” of the elements of its hypothesis space (Vilalta & Drissi, 2002). Later, Bengio et al. (1992) interpreted the update rule of a neural network’s weights as a function that is learnable. Another seminal work is the one of Thrun (1996), which presents the so-called lifelong learning scenario, where a learning algorithm gradually encounters an ordered sequence of learning problems. Throughout this course, the learner can benefit from re-using the knowledge accumulated during previous tasks. In later work, Thrun & Pratt (1998) stated that an algorithm is learning to learn if “[...] its performance at each task improves with experience and with the number of tasks”. This characterisation has been inspired by Mitchell et al. (1997)’s definition of a learning algorithm as a computer program whose performance on a task improves with experience. Similarly, Vilalta & Drissi (2002) explained meta-learning as organised in two “nested learning levels”. At the base level, an algorithm is confined within a limited hypothesis space while solving a single learning problem. Contrarily, the meta-level can “accrue knowledge” by spanning multiple problems, so that the hypothesis space at the base level can be adapted effectively. ",
178
+ "bbox": [
179
+ 173,
180
+ 825,
181
+ 825,
182
+ 924
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "",
189
+ "bbox": [
190
+ 174,
191
+ 103,
192
+ 825,
193
+ 242
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Arguably, the simplest approach to meta-learning is to train a similarity function by exposing it to many matching problems (Bromley et al., 1993; Chopra et al., 2005; Koch et al., 2015). Despite its simplicity, this general strategy is particularly effective and it is at the core of several stateof-the-art few-shot classification algorithms (Vinyals et al., 2016; Snell et al., 2017; Sung et al., 2018). Interestingly, Garcia & Bruna (2018) interpret learning as information propagation from support (training) to query (test) images and propose a graph neural network that can generalize matching-based approaches. Since this line of work relies on learning a similarity metric, one distinctive characteristic is that parameter updates only occur within the long time horizon of the outer training loop. While this can clearly spare costly computations, it also prevents these methods from performing adaptation at test time. A possible way to overcome the lack of adaptability is to train a neural network capable of predicting (some of) its own parameters. This technique has been first introduced in Schmidhuber (1992; 1993) and recently revamped by Bertinetto et al. (2016) and Munkhdalai & Yu (2017). Rebuffi et al. (2017) showed that a similar approach can be used to adapt a neural network, on the fly, to entirely different visual domains. ",
200
+ "bbox": [
201
+ 174,
202
+ 250,
203
+ 825,
204
+ 444
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Another popular approach to meta-learning is to interpret the gradient update of SGD as a parametric and learnable function rather than a fixed ad-hoc routine. Younger et al. (2001) and Hochreiter et al. (2001) observed that, because of the sequential nature of a learning algorithm, a recurrent neural network can be considered as a meta-learning system. They identify LSTMs as particularly apt for the task because of their ability to span long-term dependencies, which are essential in order to meta-learn. A modern take on this idea has been presented by Andrychowicz et al. (2016) and Ravi & Larochelle (2017), showing benefits on large-scale classification, style transfer and few-shot learning. ",
211
+ "bbox": [
212
+ 174,
213
+ 450,
214
+ 825,
215
+ 549
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "A recent and promising research direction is the one set by Maclaurin et al. (2015) and by the MAML algorithm (Finn et al., 2017; Finn & Levine, 2018). Instead of explicitly designing a meta-learner module for learning the update rule, they backpropagate through the very operation of gradient descent to optimize for the hyperparameters or the initial parameters of the learner. However, backpropagation through gradient descent steps is costly in terms of memory, and thus the total number of steps must be kept small. ",
222
+ "bbox": [
223
+ 174,
224
+ 555,
225
+ 825,
226
+ 638
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "To alleviate the drawback of catastrophic forgetting typical of deep neural networks (McCloskey & Cohen, 1989), several recent methods (Santoro et al., 2016; Kaiser et al., 2017; Munkhdalai & Yu, 2017; Sprechmann et al., 2018) make use of memory-augmented models, which can first retain and then access important and previously unseen information associated with newly encountered episodes. While such memory modules store and retrieve information in the long time range, approaches based on attention like the one of Vinyals et al. (2016) are useful to specify the most relevant pieces of knowledge within an episode. Mishra et al. (2018) complemented soft attention with temporal convolutions (Oord et al., 2016), thus allowing the attention mechanism to access information related to past episodes. ",
233
+ "bbox": [
234
+ 174,
235
+ 645,
236
+ 825,
237
+ 770
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "In this paper, we instead argue for simple, fast and differentiable base learners such as ridge regression. Compared to nearest-neighbour methods, they allow more flexibility because they produce a different set of parameters for different episodes $W _ { i }$ in Figure 1). Compared to methods that adapt SGD, they exhibit an inherently fast rate of convergence, particularly in cases where a closed form solution exists. A similar idea has been discussed by Bengio (2000), where the analytic formulations of zero-gradient solutions are used to obtain meta-gradients analytically and optimize hyper-parameters. More recently, Ionescu et al. (2015) and Valmadre et al. (2017) have derived backpropagation forms for the SVD and Correlation Filter, so that SGD can be applied, respectively, to a deep neural network that computes the solution to either an eigenvalue problem or a system of linear equations where the data matrix has a circulant structure. ",
244
+ "bbox": [
245
+ 174,
246
+ 777,
247
+ 826,
248
+ 916
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 METHOD ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 102,
259
+ 282,
260
+ 118
261
+ ],
262
+ "page_idx": 3
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "3.1 META-LEARNING ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 174,
270
+ 132,
271
+ 336,
272
+ 147
273
+ ],
274
+ "page_idx": 3
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "According to widely accepted definitions of learning (Mitchell, 1980) and meta-learning (Vilalta & Drissi, 2002; Vinyals et al., 2016), an algorithm is “learning to learn” if it can improve its learning skills with the number of experienced episodes (by progressively and dynamically modifying its inductive bias). There are two main components in a meta-learning algorithm: a base learner and a meta-learner (Vilalta & Drissi, 2002). The base learner works at the level of individual episodes (or tasks), which in the few-shot scenario correspond to learning problems characterised by having only a small set of labelled training images available. The meta-learner learns from several such episodes in sequence with the goal of improving the performance of the base learner across episodes. ",
279
+ "bbox": [
280
+ 173,
281
+ 159,
282
+ 825,
283
+ 271
284
+ ],
285
+ "page_idx": 3
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "In other words, the goal of meta-learning is to enable a base learning algorithm to adapt to new episodes efficiently by generalizing from a set of training episodes $\\mathcal { E } \\in \\mathbb { E }$ . $\\mathcal { E }$ can be modelled as a probability distribution of example inputs $x \\in \\mathbb { R } ^ { m }$ and outputs $\\boldsymbol { y } \\in \\mathbb { R } ^ { o }$ , such that we can write $( x , y ) \\sim \\mathcal { E }$ . ",
290
+ "bbox": [
291
+ 174,
292
+ 277,
293
+ 825,
294
+ 333
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "In the case of few-shot classification, the inputs are represented by few images belonging to different unseen classes, while the outputs are the (episode-specific) class labels. It is important not to confuse the small sets that are used in an episode $\\mathcal { E }$ with the super-set $\\mathbb { E }$ (such as Omniglot or miniImageNet, Section 4.1) from which they are drawn. ",
301
+ "bbox": [
302
+ 174,
303
+ 339,
304
+ 825,
305
+ 396
306
+ ],
307
+ "page_idx": 3
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Consider a generic feature extractor, such as commonly used pre-trained networks $\\mathbf { \\mathbb { \\Lambda } } ^ { ! } \\phi ( x ) : \\mathbb { R } ^ { m } \\to \\mathbb { R } ^ { e }$ Then, a much simpler episode-specific predictor $f ( \\phi ( x ) ; w \\varepsilon ) : \\mathbb { R } ^ { e } \\times \\mathbb { R } ^ { p } \\mathbb { R } ^ { o }$ can be trained to map input embeddings to outputs. The predictor is parameterized by a set of parameters $w _ { \\mathcal { E } } \\in \\mathbb { R } ^ { p }$ , which are specific to the episode $\\mathcal { E }$ . ",
312
+ "bbox": [
313
+ 174,
314
+ 402,
315
+ 825,
316
+ 459
317
+ ],
318
+ "page_idx": 3
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "To train and assess the predictor on one episode, we are given access to training samples $Z _ { \\mathcal { E } } =$ $\\{ ( x _ { i } , y _ { i } ) \\} \\sim \\mathcal { E }$ and test samples $Z _ { \\mathcal { E } } ^ { \\prime } = \\{ ( x _ { i } ^ { \\prime } , y _ { i } ^ { \\prime } ) \\} \\sim \\mathcal { E }$ , sampled independently from the distribution $\\mathcal { E }$ . We can then use a learning algorithm $\\Lambda$ to obtain the parameters $w \\varepsilon = \\Lambda ( \\phi ( Z \\varepsilon ) )$ , where $\\phi ( Z \\varepsilon ) \\triangleq \\{ ( \\phi ( x _ { i } ) , y _ { i } ) \\}$ . The expected quality of the trained predictor is then computed by a standard loss or error function $\\bar { L } : \\mathbb { R } ^ { o } \\times \\mathbb { R } ^ { o } \\to \\mathbb { R }$ , which is evaluated on the test samples $Z _ { \\mathcal { E } } ^ { \\prime }$ : ",
323
+ "bbox": [
324
+ 173,
325
+ 465,
326
+ 825,
327
+ 539
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "equation",
333
+ "img_path": "images/48b88f519c30176b05472667ff1c5f9b0f7d715e892dc3ad5d7d5e31c351cdcf.jpg",
334
+ "text": "$$\nq ( \\mathcal { E } ) = \\frac { 1 } { | Z _ { \\mathcal { E } } ^ { \\prime } | } \\sum _ { ( x ^ { \\prime } , y ^ { \\prime } ) \\in Z _ { \\mathcal { E } } ^ { \\prime } } L \\left( f \\left( \\phi \\left( x ^ { \\prime } \\right) ; w _ { \\mathcal { E } } \\right) , y ^ { \\prime } \\right) , \\quad \\mathrm { w i t h } \\ w _ { \\mathcal { E } } = \\Lambda ( \\phi ( Z _ { \\mathcal { E } } ) ) .\n$$",
335
+ "text_format": "latex",
336
+ "bbox": [
337
+ 254,
338
+ 544,
339
+ 743,
340
+ 585
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "Other than abstracting away the complexities of the learning algorithm as $\\Lambda$ , eq. (1) corresponds to the standard train-test protocol commonly employed in machine learning, here applied to a single episode $\\mathcal { E }$ . However, simply re-training a predictor for each episode ignores potentially useful knowledge that can be transferred between them. For this reason, we now take the step of parameterizing $\\phi$ and $\\Lambda$ with two sets of meta-parameters, respectively $\\omega$ and $\\rho$ , which can aid the training procedure. In particular, $\\omega$ affects the representation of the input of the base learner algorithm $\\Lambda$ , while $\\rho$ corresponds to its hyper-parameters, which here can be learnt by the meta-learner loop instead of being manually set, as it usually happens in a standard training scenario. These meta-parameters will affect the generalization properties of the learned predictors. This motivates evaluating the result of training on a held-out test set $Z _ { \\mathcal { E } } ^ { \\prime }$ (eq. (1)). In order to learn $\\omega$ and $\\rho$ , we minimize the expected loss on held-out test sets over all episodes $\\mathcal { E } \\in \\mathbb { E }$ : ",
347
+ "bbox": [
348
+ 173,
349
+ 590,
350
+ 825,
351
+ 743
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "equation",
357
+ "img_path": "images/30fe9feb15979f173ca47f94ec80cd1225081877fd15ac2348b5945a8aa50b79.jpg",
358
+ "text": "$$\n\\operatorname* { m i n } _ { \\omega , \\rho } \\frac { 1 } { | \\mathbb { E } | \\cdot | Z _ { \\mathcal { E } } ^ { \\prime } | } \\sum _ { \\mathcal { E } \\in \\mathbb { E } } \\sum _ { \\left( x ^ { \\prime } , y ^ { \\prime } \\right) \\in Z _ { \\mathcal { E } } ^ { \\prime } } L \\left( f \\left( \\phi \\left( x ^ { \\prime } ; \\omega \\right) ; w \\varepsilon \\right) , y ^ { \\prime } \\right) , \\quad \\mathrm { w i t h } \\ w _ { \\mathcal { E } } = \\Lambda ( \\phi ( Z _ { \\mathcal { E } } ; \\omega ) ; \\rho ) .\n$$",
359
+ "text_format": "latex",
360
+ "bbox": [
361
+ 187,
362
+ 748,
363
+ 789,
364
+ 790
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "Since eq. (2) consists of a composition of non-linear functions, we can leverage the same tools used successfully in deep learning, namely back-propagation and stochastic gradient descent (SGD), to optimize it. The main obstacle is to choose a learning algorithm $\\Lambda$ that is amenable to optimization with such tools. This means that, in practice, $\\Lambda$ must be quite simple. ",
371
+ "bbox": [
372
+ 174,
373
+ 795,
374
+ 825,
375
+ 852
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "Examples of meta-learning algorithms. Using eq. 2, it is possible to describe several of the metalearning methods in the literature, which mostly differ for the choice of $\\Lambda$ . The feature extractor $\\phi$ is typically a standard CNN, whose intermediate layers are trained jointly as $\\omega$ (and thus are not episode-specific). The last layer represents the linear predictor $f$ , with episode-specific parameters $w \\varepsilon$ . In Siamese networks (Bromley et al., 1993; Chopra et al., 2005; Koch et al., 2015), $f$ is a nearest neighbour classifier, which becomes soft $k$ -means in the semi-supervised setting proposed by Ren et al. (2018). Ravi & Larochelle (2017) and Andrychowicz et al. (2016) used an LSTM to implement $\\Lambda$ , while the Learnet (Bertinetto et al., 2016) uses a factorized CNN and MAML (Finn et al., 2017) implements it using SGD (and furthermore adapts all parameters of the CNN). ",
382
+ "bbox": [
383
+ 174,
384
+ 858,
385
+ 825,
386
+ 900
387
+ ],
388
+ "page_idx": 3
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "",
393
+ "bbox": [
394
+ 174,
395
+ 103,
396
+ 825,
397
+ 188
398
+ ],
399
+ "page_idx": 4
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "Instead, we use simple and fast-converging methods as base learner $\\Lambda$ , namely least-squares based solutions for ridge regression and logistic regression. In the outer loop, we allow SGD to learn both the parameters $\\omega$ of the feature representation of $\\Lambda$ and its hyper-parameters $\\rho$ . ",
404
+ "bbox": [
405
+ 174,
406
+ 194,
407
+ 825,
408
+ 237
409
+ ],
410
+ "page_idx": 4
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "3.2 EFFICIENT RIDGE REGRESSION BASE LEARNERS ",
415
+ "text_level": 1,
416
+ "bbox": [
417
+ 174,
418
+ 252,
419
+ 547,
420
+ 267
421
+ ],
422
+ "page_idx": 4
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "Similarly to the methods discussed in Section 3.1, over the course of a single episode we adapt a linear predictor $f$ , which can be considered as the final layer of a CNN. The remaining layers $\\phi$ are trained from scratch (within the outer loop of meta-learning) to generalize between episodes, but for the purposes of one episode they are considered fixed. In this section, we assume that the inputs were pre-processed by the CNN $\\phi$ , and that we are dealing only with the final linear predictor $f ( \\phi ( x ) ) = \\phi ( x ) W \\in \\mathbb { R } ^ { o }$ , where the parameters $w \\varepsilon$ are reorganized into a matrix $W \\in \\mathbb { R } ^ { e \\times o }$ . ",
427
+ "bbox": [
428
+ 173,
429
+ 277,
430
+ 825,
431
+ 363
432
+ ],
433
+ "page_idx": 4
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "The motivation for our work is that, while not quite as simple as nearest neighbours, least-squares regressors admit closed-form solutions. Although simple least-squares is prone to overfitting, it is easy to augment it with $L ^ { 2 }$ regularization (controlled by a positive hyper-parameter $\\lambda$ ), in what is known as ridge regression: ",
438
+ "bbox": [
439
+ 173,
440
+ 368,
441
+ 825,
442
+ 425
443
+ ],
444
+ "page_idx": 4
445
+ },
446
+ {
447
+ "type": "equation",
448
+ "img_path": "images/44bd2eae9551b2c92f759a9b5e4eb5184b4cfaf2e8e3766770c27cff45a4bd32.jpg",
449
+ "text": "$$\n\\begin{array} { c } { \\Lambda ( Z ) = \\underset { W } { \\arg \\operatorname* { m i n } } \\left\\| X W - Y \\right\\| ^ { 2 } + \\lambda \\left\\| W \\right\\| ^ { 2 } } \\\\ { = \\big ( X ^ { T } X + \\lambda I \\big ) ^ { - 1 } X ^ { T } Y , } \\end{array}\n$$",
450
+ "text_format": "latex",
451
+ "bbox": [
452
+ 357,
453
+ 425,
454
+ 638,
455
+ 477
456
+ ],
457
+ "page_idx": 4
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "where $\\ b X \\in \\mathbb R ^ { n \\times e }$ and $Y \\in \\mathbb { R } ^ { n \\times o }$ contain the $n$ sample pairs of input embeddings and outputs from $Z$ , stacked as rows. ",
462
+ "bbox": [
463
+ 173,
464
+ 479,
465
+ 823,
466
+ 507
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "Because ridge regression admits a closed form solution (eq. (4)), it is relatively easy to integrate into meta-learning (eq. (2)) using standard automatic differentiation packages. The only element that may have to be treated more carefully is the matrix inversion. When the matrix to invert is close to singular (which we do not expect when $\\lambda > 0$ ), it is possible to achieve more numerically accurate results by replacing the matrix inverse and vector product with a linear system solver (Murphy, 2012, 7.5.2). In our experiments, the matrices were not close to singular and we did not find this necessary. ",
473
+ "bbox": [
474
+ 173,
475
+ 513,
476
+ 825,
477
+ 598
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "Another concern about eq. (4) is that the intermediate matrix $X ^ { T } X \\in \\mathbb { R } ^ { e \\times e }$ grows quadratically with the embedding size $e$ . Given the high dimensionality of features typically used in deep networks, the inversion could come at a very expensive cost. To alleviate this, we rely on the Woodbury formula (Petersen et al., 2008, Chapter 3.2), obtaining: ",
484
+ "bbox": [
485
+ 174,
486
+ 603,
487
+ 825,
488
+ 661
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "equation",
494
+ "img_path": "images/5d47e88fa89f2bf8bafa3aee1da42624c72e7da5a45bf8319d0bd3aca9e2d836.jpg",
495
+ "text": "$$\nW = \\Lambda ( Z ) = X ^ { T } ( X X ^ { T } + \\lambda I ) ^ { - 1 } Y .\n$$",
496
+ "text_format": "latex",
497
+ "bbox": [
498
+ 375,
499
+ 662,
500
+ 622,
501
+ 683
502
+ ],
503
+ "page_idx": 4
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The main advantage of eq. (5) is that the intermediate matrix $X X ^ { T } \\in \\mathbb { R } ^ { n \\times n }$ now grows quadratically with the number of samples in the episode, $n$ . As we are interested in one or few-shot learning, this is typically very small. The overall cost of eq. (5) is only linear in the embedding size $e$ . ",
508
+ "bbox": [
509
+ 174,
510
+ 684,
511
+ 825,
512
+ 727
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Although this method was originally designed for regression, we found that it works well also in a (few-shot) classification scenario, where the target outputs are one-hot vectors representing classes. However, since eq. 4 does not directly produce classification labels, it is important to calibrate its output for the cross-entropy loss, which is used to evaluate the episode’s test samples ( $L$ in eq. 2). This can be done by simply adjusting our prediction $X ^ { \\prime } W$ with a scale and a bias $\\alpha , \\beta \\in \\mathbb { R }$ : ",
519
+ "bbox": [
520
+ 173,
521
+ 733,
522
+ 825,
523
+ 804
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "equation",
529
+ "img_path": "images/c4465194ef611af83731a5023f7b84225154d9e962f8b2372d1372f885498f90.jpg",
530
+ "text": "$$\n\\widehat { Y } = \\alpha X ^ { \\prime } W + \\beta .\n$$",
531
+ "text_format": "latex",
532
+ "bbox": [
533
+ 439,
534
+ 805,
535
+ 558,
536
+ 823
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "Note that $\\lambda$ , $\\alpha$ and $\\beta$ are hyper-parameters of the base learner $\\Lambda$ and can be learnt by the outer learning loop represented by the meta-learner, together with the CNN parameters $\\omega$ . ",
543
+ "bbox": [
544
+ 174,
545
+ 825,
546
+ 830,
547
+ 854
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "3.3 ITERATIVE BASE LEARNERS AND LOGISTIC REGRESSION ",
554
+ "text_level": 1,
555
+ "bbox": [
556
+ 174,
557
+ 869,
558
+ 606,
559
+ 883
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "It is natural to ask whether other learning algorithms can be integrated as efficiently as ridge regression within our meta-learning framework. In general, a similar derivation is possible for iterative solvers, as long as the operations are differentiable. For linear models with convex loss functions, a better choice than gradient descent is Newton’s method, which uses curvature (second-order) information to reach the solution in very few steps. One learning objective of particular interest is logistic regression, which unlike ridge regression directly produces classification labels, and thus does not require the use of calibration before the (binary) cross-entropy loss. ",
566
+ "bbox": [
567
+ 173,
568
+ 895,
569
+ 823,
570
+ 924
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "",
577
+ "bbox": [
578
+ 174,
579
+ 103,
580
+ 825,
581
+ 174
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "When one applies Newton’s method to logistic regression, the resulting algorithm takes a familiar form — it consists of a series of weighted least squares (or ridge regression) problems, giving it the name Iteratively Reweighted Least Squares (IRLS) (Murphy, 2012, Chapter 8.3.4). Given inputs $\\ b X \\in \\mathbb R ^ { n \\times e }$ and binary outputs $y \\in \\{ - \\bar { 1 } , 1 \\} ^ { n }$ , the $i$ -th iteration updates the parameters $w _ { i } \\in \\mathbb { R } ^ { e }$ as: ",
588
+ "bbox": [
589
+ 174,
590
+ 180,
591
+ 825,
592
+ 237
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "equation",
598
+ "img_path": "images/b57d8c61ea5a9c7c0c850b5ed0c3a8b79d48431cd72b401a3bb31e5b5a20daba.jpg",
599
+ "text": "$$\nw _ { i } = \\left( X ^ { T } \\mathrm { d i a g } ( s _ { i } ) X + \\lambda I \\right) ^ { - 1 } X ^ { T } \\mathrm { d i a g } ( s _ { i } ) z _ { i } ,\n$$",
600
+ "text_format": "latex",
601
+ "bbox": [
602
+ 344,
603
+ 241,
604
+ 651,
605
+ 263
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "where $I$ is an identity matrix, $s _ { i } = \\mu _ { i } ( 1 - \\mu _ { i } )$ , $z _ { i } = w _ { i - 1 } ^ { T } X + ( y - \\mu _ { i } ) / s _ { i }$ , and $\\mu _ { i } = \\sigma ( w _ { i - 1 } ^ { T } X )$ applies a sigmoid function $\\sigma$ to the predictions using the previous parameters $w _ { i - 1 }$ . ",
612
+ "bbox": [
613
+ 173,
614
+ 267,
615
+ 823,
616
+ 297
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Since eq. (7) takes a similar form to ridge regression, we can use it for meta-learning in the same way as in section 3.2, with the difference that a small number of steps (eq. (7)) must be performed in order to obtain the final parameters $w \\varepsilon$ . Similarly, at each step $i$ , we obtain a solution with a cost which is linear rather than quadratic in the embedding size by employing the Woodbury formula: ",
623
+ "bbox": [
624
+ 174,
625
+ 303,
626
+ 825,
627
+ 359
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "equation",
633
+ "img_path": "images/8b90c1a2d21273a51d55bb50c2f3c665c151a75104bfbc8fc16ae21d7f84e16b.jpg",
634
+ "text": "$$\nw _ { i } = X ^ { T } \\Big ( X X ^ { T } + \\lambda \\mathrm { d i a g } ( s _ { i } ) ^ { - 1 } \\Big ) ^ { - 1 } z _ { i } ,\n$$",
635
+ "text_format": "latex",
636
+ "bbox": [
637
+ 366,
638
+ 363,
639
+ 630,
640
+ 393
641
+ ],
642
+ "page_idx": 5
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "where the inner inverse has negligible cost since it is a diagonal matrix. Note that a similar strategy could be followed for other learning algorithms based on IRLS, such as $L ^ { 1 }$ minimization and LASSO. We take logistic regression to be a sufficiently illustrative example, of particular interest for binary classification in one/few-shot learning, leaving the exploration of other variants for future work. ",
647
+ "bbox": [
648
+ 174,
649
+ 396,
650
+ 826,
651
+ 453
652
+ ],
653
+ "page_idx": 5
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "3.4 TRAINING POLICY ",
658
+ "text_level": 1,
659
+ "bbox": [
660
+ 174,
661
+ 468,
662
+ 341,
663
+ 483
664
+ ],
665
+ "page_idx": 5
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "Figure 1 illustrates our overall framework. Like most meta-learning techniques, we organize our training procedure into episodes, each of which corresponds to a few-shot classification problem. In standard classification, training requires sampling from a distribution of images and labels. Instead, in our case we sample from a distribution of episodes, each containing its own training set and test set, with just a few samples per image. Each episode also contains two sets of labels: $Y$ and $Y ^ { \\prime }$ . The former is used to train the base learner, while the latter to compute the error of the just-trained base learner, enabling back-propagation in order to learn $\\omega$ , $\\lambda$ , $\\alpha$ and $\\beta$ . ",
670
+ "bbox": [
671
+ 173,
672
+ 494,
673
+ 825,
674
+ 593
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "In our implementation, one episode corresponds to a mini-batch of size $S = N ( K + Q )$ , where $N$ is the number of different classes (“ways”), $K$ the number of samples per classes (“shots”) and $Q$ the number of query (or test) images per class. ",
681
+ "bbox": [
682
+ 174,
683
+ 599,
684
+ 825,
685
+ 642
686
+ ],
687
+ "page_idx": 5
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "4 EXPERIMENTS ",
692
+ "text_level": 1,
693
+ "bbox": [
694
+ 176,
695
+ 661,
696
+ 326,
697
+ 678
698
+ ],
699
+ "page_idx": 5
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "In this section, we provide practical details for the two novel methods introduced in Section 3.2 and 3.3, which we dub R2-D2 (Ridge Regression Differentiable Discriminator) and LR-D2 (Logistic Regression Differentiable Discriminator). We analyze their performance against the recent literature on multi-class and binary classification problems using three few-shot learning benchmarks: Omniglot (Lake et al., 2015), miniImageNet (Vinyals et al., 2016) and CIFAR-FS, which we introduce in this paper. The code for both our methods and the splits of CIFAR-FS are available at http://www.robots.ox.ac.uk/\\~luca/r2d2.html. ",
704
+ "bbox": [
705
+ 174,
706
+ 693,
707
+ 826,
708
+ 790
709
+ ],
710
+ "page_idx": 5
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "4.1 FEW-SHOT LEARNING BENCHMARKS ",
715
+ "text_level": 1,
716
+ "bbox": [
717
+ 176,
718
+ 806,
719
+ 467,
720
+ 820
721
+ ],
722
+ "page_idx": 5
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "Let $I _ { \\star }$ and $C _ { \\star }$ be respectively the set of images and the set of classes belonging to a certain data split $\\star$ . In standard classification datasets, $I _ { \\mathrm { t r a i n } } \\cap I _ { \\mathrm { t e s t } } = \\emptyset$ and $C _ { \\mathrm { t r a i n } } = C _ { \\mathrm { t e s t } }$ . Instead, the few-shot setup requires both $I _ { \\mathrm { m e t a - t r a i n } } \\cap I _ { \\mathrm { m e t a - t e s t } } = \\emptyset$ and Cmeta-train $\\cap C _ { \\mathrm { m e t a - t e s t } } = \\emptyset$ , while within an episode we have $C _ { \\mathrm { t a s k - t r a i n } } = C _ { \\mathrm { t a s k - t } }$ est. ",
727
+ "bbox": [
728
+ 174,
729
+ 832,
730
+ 825,
731
+ 890
732
+ ],
733
+ "page_idx": 5
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "Omniglot (Lake et al., 2015) is a dataset of handwritten characters that has been referred to as the “MNIST transpose” for its high number of classes and small number of instances per class. It contains ",
738
+ "bbox": [
739
+ 173,
740
+ 895,
741
+ 823,
742
+ 924
743
+ ],
744
+ "page_idx": 5
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "20 examples of 1623 characters, grouped in 50 different alphabets. In order to be able to compare against the state of the art, we adopt the same setup and data split used in Vinyals et al. (2016). Hence, we resize images to $2 8 \\times 2 8$ and we augment the dataset using four rotated versions of the each instance $0 ^ { \\circ }$ , $9 0 ^ { \\circ }$ , $1 8 0 ^ { \\circ }$ , $2 7 0 ^ { \\circ }$ ). Including rotations, we use 4800 classes for meta-training and meta-validation and 1692 for meta-testing. ",
749
+ "bbox": [
750
+ 174,
751
+ 103,
752
+ 825,
753
+ 174
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "miniImageNet (Vinyals et al., 2016) aims at representing a challenging dataset without demanding considerable computational resources. It is randomly sampled from ImageNet (Russakovsky et al., 2015) and it is constituted by a total of 60,000 images from 100 different classes, each with 600 instances. All images are RGB and have been downsampled to $8 4 \\times 8 4$ . As all recent work, we adopt the same splits of Ravi & Larochelle (2017), who employ 64 classes for meta-training, 16 for meta-validation and 20 for meta-testing. ",
760
+ "bbox": [
761
+ 174,
762
+ 180,
763
+ 825,
764
+ 263
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "CIFAR-FS. On the one hand, despite being lightweight, Omniglot is becoming too simple for modern few-shot learning methods, especially with the splits of Vinyals et al. (2016). On the other, miniImageNet is more challenging, but it might still require a model to train for several hours before convergence. Thus, we propose CIFAR-FS (CIFAR100 few-shots), which is randomly sampled from CIFAR-100 (Krizhevsky & Hinton, 2009) by using the same criteria with which miniImageNet has been generated. We observed that the average inter-class similarity is sufficiently high to represent a challenge for the current state of the art. Moreover, the limited original resolution of $3 2 \\times 3 2$ makes the task harder and at the same time allows fast prototyping. ",
771
+ "bbox": [
772
+ 174,
773
+ 270,
774
+ 825,
775
+ 382
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4.2 EXPERIMENTAL RESULTS ",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 176,
785
+ 407,
786
+ 390,
787
+ 421
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "In order to produce the features $X$ for the base learners (eq. 4 and 7), as many recent methods we use a shallow network of four convolutional “blocks”, each consisting of the following sequence: a $3 { \\times } 3$ convolution (padding $^ { = 1 }$ , stride $^ { = 1 }$ ), batch-normalization, $2 \\times 2$ max-pooling, and a leaky-ReLU with a factor of 0.1. Max pooling’s stride is 2 for the first three layers and 1 for the last one. The four convolutional layers have [96, 192, 384, 512] filters. Dropout is applied to the last two blocks for the experiments on miniImageNet and CIFAR-FS, respectively with probabilities 0.1 and 0.4. We do not use any fully connected layer. Instead, we flatten and concatenate the output of the third and fourth convolutional blocks and feed it to the base learner. Doing so, we obtain high-dimensional features of size 3584, 72576 and 8064 for Omniglot, miniImageNet and CIFAR-FS respectively. It is important to mention that the use of the Woodbury formula (section 3.2) allows us to make use of high-dimensional features without incurring burdensome computations. In fact, in few-shot problems the data matrix $X$ is particularly “large and short”. As an example, with a 5-way/1-shot problem from miniImageNet we have $X \\in \\mathbb { R } ^ { 5 \\times 7 2 5 7 6 }$ . Applying the Woodbury identity, we obtain significant gains in computation, as in eq. 5 we invert a matrix that is only $5 \\times 5$ instead of $7 2 5 7 6 \\times 7 2 5 7 6$ . ",
794
+ "bbox": [
795
+ 174,
796
+ 435,
797
+ 825,
798
+ 631
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "As Snell et al. (2017), we observe that using a higher number of classes during training is important. Hence, despite the few-shot problem at test time being 5 or 20-way, in our multi-class classification experiments we train using 60 classes for Omniglot, 16 for miniImageNet and 20 for CIFAR-FS. Moreover, in order not to train a different model for every single configuration (two for miniImageNet and CIFAR-FS, four for Omniglot), similarly to (Mishra et al., 2018) and differently from previous work, we train our models with a random number of shots, which does not deteriorate the performance and allow us to simply train one model per dataset. We then choose $Q$ (the size of the query or test set) accordingly, so that the batch size $S$ remains constant throughout the episodes. We set $S$ to 600 for Omniglot and 240 for both miniImageNet and CIFAR-FS. ",
805
+ "bbox": [
806
+ 174,
807
+ 637,
808
+ 825,
809
+ 762
810
+ ],
811
+ "page_idx": 6
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "At the meta-learning level, we train our methods with Adam (Kingma & Ba, 2015) with an initial learning rate of 0.005, dampened by 0.5 every 2,000 episodes. Training is stopped when the error on the meta-validation set does not decrease meaningfully for 20,000 episodes. ",
816
+ "bbox": [
817
+ 174,
818
+ 770,
819
+ 825,
820
+ 811
821
+ ],
822
+ "page_idx": 6
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "As for the base learner, we let SGD learn the parameters $\\omega$ of the CNN, as well as the regularization factor $\\lambda$ and the scale $\\alpha$ and bias $\\beta$ of the calibration layer of R2-D2 (end of Section 3.2). In practice, we observed that it is important to use SGD to adapt $\\alpha$ and $\\beta$ , while it is indifferent whether $\\lambda$ is learnt or not. A more detailed analysis can be found in Appendix C. ",
827
+ "bbox": [
828
+ 174,
829
+ 819,
830
+ 825,
831
+ 875
832
+ ],
833
+ "page_idx": 6
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Multi-class classification. Tables 1 and 2 show the performance of our closed-form base learner R2-D2 against the current state of the art for shallow architectures of four convolutional layers. Values represent average classification accuracies obtained by sampling 10,000 episodes from the meta test-set and are presented with $9 5 \\%$ confidence intervals. For each column, the best performance is in bold. If more than one value is outlined, it means their intervals overlap. For prototypical networks, we report the results reproduced by the code provided by the authors. For our comparison, we report the results of methods which train their models from scratch for few-shot classification, omitting very recent work of Qiao et al. (2018) and Gidaris & Komodakis (2018), which instead make use of pre-trained embeddings. ",
838
+ "bbox": [
839
+ 176,
840
+ 882,
841
+ 825,
842
+ 924
843
+ ],
844
+ "page_idx": 6
845
+ },
846
+ {
847
+ "type": "table",
848
+ "img_path": "images/c6ebd31e3cc669e1e8de5e5e872a719bf3adb863da207d56feb5084977ad502b.jpg",
849
+ "table_caption": [
850
+ "Table 1: Few-shot multi-class classification accuracies on miniImageNet and CIFAR-FS. "
851
+ ],
852
+ "table_footnote": [],
853
+ "table_body": "<table><tr><td colspan=\"3\">miniImageNet,5-way</td><td colspan=\"2\">CIFAR-FS,5-way</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MATCHING NET (Vinyals et al., 2016)</td><td>44.2%</td><td>57%</td><td></td><td></td></tr><tr><td>MAML (Finn et al., 2017)</td><td>48.7±1.8%</td><td>63.1±0.9%</td><td>58.9±1.9%</td><td>71.5±1.0%</td></tr><tr><td>MAML *</td><td>40.9±1.5%</td><td>58.9±0.9%</td><td>53.8±1.8%</td><td>67.6±1.0%</td></tr><tr><td>META-LSTM (Ravi&amp; Larochelle,2017)</td><td>43.4±0.8%</td><td>60.6±0.7%</td><td></td><td></td></tr><tr><td>PROTO NET (Snell et al., 2017)</td><td>47.4±0.6%</td><td>65.4±0.5%</td><td>55.5±0.7%</td><td>72.0±0.6%</td></tr><tr><td>PROTO NET *</td><td>42.9±0.6%</td><td>65.9±0.6%</td><td>57.9±0.8%</td><td>76.7±0.6%</td></tr><tr><td>RELATION NET (Sung et al., 2018)</td><td>50.4±0.8%</td><td>65.3±0.7%</td><td>55.0±1.0%</td><td>69.3±0.8%</td></tr><tr><td>SNAIL (with ResNet) (Mishra et al.,2018)</td><td>55.7±1.0%</td><td>68.9±0.9%</td><td></td><td></td></tr><tr><td>SNAIL (with 32C) (Mishra et al., 2018)</td><td>45.1%</td><td>55.2%</td><td></td><td></td></tr><tr><td>GNN (Garcia &amp; Bruna,2018)</td><td>50.3%</td><td>66.4%</td><td>61.9%</td><td>75.3%</td></tr><tr><td>GNN*</td><td>50.3%</td><td>68.2%</td><td>56.0%</td><td>72.5%</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>49.5±0.2%</td><td>65.4±0.2%</td><td>62.3±0.2%</td><td>77.4±0.2%</td></tr><tr><td>OURS/R2-D2</td><td>51.8±0.2%</td><td>68.4±0.2%</td><td>65.4±0.2%</td><td>79.4±0.2%</td></tr><tr><td>OURS/LR-D2 (1 iter.)</td><td>51.0±0.2%</td><td>65.6±0.2%</td><td>64.5±0.2%</td><td>75.8±0.2%</td></tr><tr><td>OURS/LR-D2 (5 iter.)</td><td>51.9±0.2%</td><td>68.7±0.2%</td><td>65.3±0.2%</td><td>78.3±0.2%</td></tr></table>",
854
+ "bbox": [
855
+ 183,
856
+ 127,
857
+ 813,
858
+ 361
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "",
865
+ "bbox": [
866
+ 174,
867
+ 409,
868
+ 825,
869
+ 492
870
+ ],
871
+ "page_idx": 7
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "In terms of feature embeddings, Vinyals et al. (2016); Finn et al. (2017); Snell et al. (2017); Ravi & Larochelle (2017) use 64 filters per layer (which become 32 for miniImageNet in (Ravi & Larochelle, 2017; Finn et al., 2017) to limit overfitting). On top of this, Sung et al. (2018) also uses a relation module of two convolutional and two fully connected layers. GNN (Garcia & Bruna, 2018) employs an embedding with [64, 96, 128, 256] filters, a fully connected layer and a graph neural network (with its own extra parameters). In order to ensure a fair comparison, we increased the capacity of the architectures of three representative methods (MAML, prototypical networks and GNN) to match ours. The results of these experiments are reported with $^ { \\textrm { a * } }$ on Table 1. We make use of dropout on the last two layers for all the experiments on baselines with $^ *$ , as we verified it is helpful to reduce overfitting. Moreover, we report results for experiments on our R2-D2 in which we use a 64 channels embedding. ",
876
+ "bbox": [
877
+ 173,
878
+ 498,
879
+ 825,
880
+ 652
881
+ ],
882
+ "page_idx": 7
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Despite its simplicity, our proposed method achieves an average accuracy that, on miniImageNet and CIFAR-FS, is superior to the state of the art with shallow architectures. For example, on the four problems of Table 1, R2-D2 improves on average of a relative $4 . 3 \\%$ w.r.t. GNN (the second best method). R2-D2 shows competitive results also on Omniglot (Table 2), achieving among the best performance for all problems. Furthermore, when we use the “lighter” embedding, we can still observe a performance which is in line with the state of the art. Interestingly, increasing the capacity of the other methods it is not particularly helpful. It is beneficial only for GNN on miniImageNet and prototypical networks on CIFAR-FS, while being detrimental in all the other cases. ",
887
+ "bbox": [
888
+ 174,
889
+ 659,
890
+ 825,
891
+ 770
892
+ ],
893
+ "page_idx": 7
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Our R2-D2 is also competitive against SNAIL, which uses a much deeper architecture (a ResNet with a total of 14 convolutional layers). Despite being outperformed for the 1-shot case, we can match its results on the 5-shot one. Moreover, it is paramount for SNAIL to make use of such deep embedding, as its performance drops significantly with a shallow one. ",
898
+ "bbox": [
899
+ 174,
900
+ 776,
901
+ 823,
902
+ 833
903
+ ],
904
+ "page_idx": 7
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "LR-D2 performance on multi-class classification. In order to be able to compare our binary classifier LR-D2 with the state-of-the-art in few-shot $N$ -class classification, it is possible to jointly consider $N$ binary classifiers, each of which discriminates between a specific class and all the remaining ones (Bishop, 2006, Chapter 4.1). In our framework, this can be easily implemented by concatenating together the outputs of $_ \\mathrm { N }$ instances of LR-D2, resulting in a single multi-class prediction. ",
909
+ "bbox": [
910
+ 173,
911
+ 840,
912
+ 825,
913
+ 924
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "table",
919
+ "img_path": "images/cc4540bda4ddbed152870f3020aba93e76eb7577024ccbc489aacbfccd7a3bfd.jpg",
920
+ "table_caption": [
921
+ "Table 2: Few-shot multi-class classification accuracies on Omniglot. "
922
+ ],
923
+ "table_footnote": [],
924
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Omniglot, 5-way</td><td colspan=\"2\">Omniglot, 20-way</td></tr><tr><td>Method</td><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>SIAMESE NET (Koch et al., 2015)</td><td>96.7%</td><td>98.4%</td><td>88%</td><td>96.5%</td></tr><tr><td>MATCHING NET (Vinyals et al., 2016)</td><td>98.1%</td><td>98.9%</td><td>93.8%</td><td>98.5%</td></tr><tr><td>MAML (Finn et al., 2017)</td><td>98.7±0.4%</td><td>99.9±0.1%</td><td>95.8±0.3%</td><td>98.9±0.2%</td></tr><tr><td>PROTO NET (Snell et al., 2017)</td><td>98.5±0.2%</td><td>99.5±0.1%</td><td>95.3±0.2%</td><td>98.7±0.1%</td></tr><tr><td>SNAIL (Mishra et al.,2018)</td><td>99.07±0.16%</td><td>99.77±0.09%</td><td>97.64±0.30%</td><td>99.36±0.18%</td></tr><tr><td>GNN(Garcia&amp; Bruna,2018)</td><td>99.2%</td><td>99.7%</td><td>97.4%</td><td>99.0%</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>98.55±0.05%</td><td>99.66±0.02%</td><td>94.70±0.05%</td><td>98.91±0.02%</td></tr><tr><td>OURS/R2-D2</td><td>98.91±0.05%</td><td>99.74±0.02%</td><td>96.24±0.05%</td><td>99.20±0.02%</td></tr></table>",
925
+ "bbox": [
926
+ 173,
927
+ 136,
928
+ 834,
929
+ 284
930
+ ],
931
+ "page_idx": 8
932
+ },
933
+ {
934
+ "type": "table",
935
+ "img_path": "images/872baf6ee7fda36ede89d6c883f0556f54c20e327d37210162d0b98efee841fe.jpg",
936
+ "table_caption": [
937
+ "Table 3: Few-shot binary classification accuracies on miniImageNet and CIFAR-FS. "
938
+ ],
939
+ "table_footnote": [],
940
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"2\">miniImageNet, 2-way</td><td colspan=\"2\">CIFAR-FS,2-way</td></tr><tr><td>1-shot</td><td>5-shot</td><td>1-shot</td><td>5-shot</td></tr><tr><td>MAML (Finn et al.,2017)</td><td>74.9±3.0%</td><td>84.4±1.2%</td><td>82.8±2.7%</td><td>88.3±1.1%</td></tr><tr><td>PROTO NETs (Snell et al., 2017)</td><td>71.7±1.0%</td><td>84.8±0.7%</td><td>76.4±0.9%</td><td>88.5±0.6%</td></tr><tr><td>RELATION NET (Sung et al., 2018)</td><td>76.2±1.2%</td><td>86.8±1.0%</td><td>75.0±1.5%</td><td>86.7±0.9%</td></tr><tr><td>GNN(Garcia &amp; Bruna,2018)</td><td>78.4%</td><td>87.1%</td><td>79.3%</td><td>89.1%</td></tr><tr><td>OURS/R2-D2</td><td>77.4±0.3%</td><td>86.8±0.2%</td><td>84.1±0.3%</td><td>91.7±0.2%</td></tr><tr><td>OURS/LR-D2 (10 iter.)</td><td>78.1±0.3%</td><td>86.5±0.2%</td><td>84.7±0.3%</td><td>91.5±0.2%</td></tr></table>",
941
+ "bbox": [
942
+ 205,
943
+ 338,
944
+ 792,
945
+ 459
946
+ ],
947
+ "page_idx": 8
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "We use the same setup and hyper-parameters of R2-D2 (Section 4), except for the number of classes/ways used at training, which we limit to 10. Interestingly, with five IRLS iterations the accuracy of the 1-vs-all variant of LR-D2 is similar to the one of R2-D2 (Table 1): $5 1 . 9 \\%$ and $6 8 . 7 \\%$ for miniImageNet (1-shot and 5-shot); $6 5 . 3 \\%$ and $7 8 . 3 \\%$ for CIFAR-FS. With a single iteration, performance is still very competitive: $5 1 . 0 \\%$ and $6 5 . 6 \\%$ for miniImageNet; $6 4 . 5 \\%$ and $7 5 . 8 \\%$ for CIFAR-FS. However, the requirement of solving $N$ binary problems per iteration makes it much less efficient than R2-D2, as evident in Table 4. ",
952
+ "bbox": [
953
+ 173,
954
+ 498,
955
+ 825,
956
+ 597
957
+ ],
958
+ "page_idx": 8
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "Binary classification. Finally, in Table 3 we report the performance of both our ridge regression and logistic regression base learners, together with four representative methods. Since LR-D2 is limited to operate in a binary classification setup, we run our R2-D2 and prototypical network without oversampling the number of ways. For both methods and prototypical networks, we report the performance obtained annealing the learning rate by a factor of 0.99, which works better than the schedule used for multi-class classification. Moreover, motivated by the small size of the mini-batches, we replace Batch Normalization with Group Normalization (Wu & He, 2018). For this table, we use the default setup found in the code of MAML, which uses 5 SGD iterations during training and 10 during testing. Table 3 confirms the validity of both our approaches on the binary classification problem. ",
963
+ "bbox": [
964
+ 173,
965
+ 603,
966
+ 825,
967
+ 742
968
+ ],
969
+ "page_idx": 8
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "Although different in nature, both MAML and our LR-D2 make use of iterative base learners: the former is based on SGD, while the latter on Newton’s method (under the form of Iteratively Reweighted Least Squares). The use of second-order optimization might suggest that LR-D2 is characterized by computationally demanding steps. However, we can apply the Woodbury identity at every iteration and obtain a significant speedup. In Figure 2 we compare the performance of LR-D2 vs the one of MAML for a different number of steps of the base learner (kept constant between training and testing). LR-D2 is superior to MAML, especially for a higher number of steps. ",
974
+ "bbox": [
975
+ 173,
976
+ 750,
977
+ 825,
978
+ 848
979
+ ],
980
+ "page_idx": 8
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "Efficiency. In Table 4 we compare the amount of time required by two representative methods and ours to solve 10,000 episodes (each with 10 images) on a single NVIDIA GTX 1080 GPU. We use miniImageNet (5-way, 1-shot) and adopt, for the lower part of the table, a lightweight embedding network of 4 layers and 32 channels per layer. For reference, in the upper part of the table we also report the timings for R2-D2 with [64, 64, 64, 64] and [96, 192, 384, 512] embeddings. ",
985
+ "bbox": [
986
+ 174,
987
+ 854,
988
+ 823,
989
+ 924
990
+ ],
991
+ "page_idx": 8
992
+ },
993
+ {
994
+ "type": "image",
995
+ "img_path": "images/d7e91f0475ce708f5ce6ac91568f402d4c6c4a95264c2b850c481b0a30de15b7.jpg",
996
+ "image_caption": [
997
+ "Figure 2: Binary classification accuracy on two datasets and two setups at different number of steps of the base learner for MAML, R2-D2 and LR-D2. Shaded areas represent $9 5 \\%$ confidence intervals. "
998
+ ],
999
+ "image_footnote": [],
1000
+ "bbox": [
1001
+ 256,
1002
+ 107,
1003
+ 718,
1004
+ 351
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Interestingly, we can observe how R2-D2 allows us to achieve an efficiency that is comparable to the one of prototypical networks and significantly higher than MAML. Notably, unlike prototypical networks, our methods do allow per-episode adaptation through the weights $W$ of the solver. ",
1011
+ "bbox": [
1012
+ 176,
1013
+ 409,
1014
+ 825,
1015
+ 452
1016
+ ],
1017
+ "page_idx": 9
1018
+ },
1019
+ {
1020
+ "type": "table",
1021
+ "img_path": "images/cd678d58e3aa8cd40fe62d992713d3b4be6cd8d3ee2962bcd572761255bc4b40.jpg",
1022
+ "table_caption": [
1023
+ "Table 4: Time required to solve 10,000 miniImageNet episodes of 10 samples each. "
1024
+ ],
1025
+ "table_footnote": [],
1026
+ "table_body": "<table><tr><td></td><td>miniImageNet,5-way,1-shot</td></tr><tr><td>OURS/R2-D2</td><td>1 min 23 sec</td></tr><tr><td>OURS/R2-D2 (with 64C)</td><td>1 min 4 sec</td></tr><tr><td>MAML (Finn et al.,2017) (with 32C)</td><td>6 min 35 sec</td></tr><tr><td>OURs/LR-D2 (1-vs-all) (1 iter.) (with 32C)</td><td>5 min 48 sec</td></tr><tr><td>OURS/R2-D2 (with 32C)</td><td>57 sec</td></tr><tr><td>PROTO NETs (Snell et al.,2017) (with 32C)</td><td>24 sec</td></tr></table>",
1027
+ "bbox": [
1028
+ 254,
1029
+ 491,
1030
+ 741,
1031
+ 599
1032
+ ],
1033
+ "page_idx": 9
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "5 CONCLUSIONS ",
1038
+ "text_level": 1,
1039
+ "bbox": [
1040
+ 176,
1041
+ 626,
1042
+ 328,
1043
+ 641
1044
+ ],
1045
+ "page_idx": 9
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "With the aim of allowing efficient adaptation to unseen learning problems, in this paper we explored the feasibility of incorporating fast solvers with closed-form solutions as the base learning component of a meta-learning system. Importantly, the use of the Woodbury identity allows significant computational gains in a scenario presenting only a few samples with high dimensionality, like one-shot of few-shot learning. R2-D2, the differentiable ridge regression base learner we introduce, is almost as fast as prototypical networks and strikes a useful compromise between not performing adaptation for new episodes (like metric-learning-based approaches) and conducting a costly iterative approach (like MAML or LSTM-based meta-learners). In general, we showed that our base learners work remarkably well, with excellent results on few-shot learning benchmarks, generalizing to episodes with new classes that were not seen during training. We believe that our findings point in an exciting direction of more sophisticated yet efficient online adaptation methods, able to leverage the potential of prior knowledge distilled in an offline training phase. In future work, we would like to explore Newton’s methods with more complicated second-order structure than ridge regression. ",
1050
+ "bbox": [
1051
+ 174,
1052
+ 657,
1053
+ 825,
1054
+ 838
1055
+ ],
1056
+ "page_idx": 9
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "ACKNOWLEDGMENTS ",
1061
+ "text_level": 1,
1062
+ "bbox": [
1063
+ 176,
1064
+ 856,
1065
+ 326,
1066
+ 868
1067
+ ],
1068
+ "page_idx": 9
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "We would like to thank Jack Valmadre, Namhoon Lee and the anonymous reviewers for their insightful comments, which have been useful to improve the manuscript. This work was partially supported by the ERC grant 638009-IDIU. ",
1073
+ "bbox": [
1074
+ 176,
1075
+ 881,
1076
+ 825,
1077
+ 921
1078
+ ],
1079
+ "page_idx": 9
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "REFERENCES ",
1084
+ "text_level": 1,
1085
+ "bbox": [
1086
+ 176,
1087
+ 102,
1088
+ 287,
1089
+ 118
1090
+ ],
1091
+ "page_idx": 10
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "Han Altae-Tran, Bharath Ramsundar, Aneesh S Pappu, and Vijay Pande. Low data drug discovery with one-shot learning. ACS central science, 2017. ",
1096
+ "bbox": [
1097
+ 174,
1098
+ 126,
1099
+ 823,
1100
+ 155
1101
+ ],
1102
+ "page_idx": 10
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, 2016. ",
1107
+ "bbox": [
1108
+ 176,
1109
+ 162,
1110
+ 823,
1111
+ 207
1112
+ ],
1113
+ "page_idx": 10
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, pp. 6–8. Univ. of Texas, 1992. ",
1118
+ "bbox": [
1119
+ 176,
1120
+ 214,
1121
+ 826,
1122
+ 257
1123
+ ],
1124
+ "page_idx": 10
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Yoshua Bengio. Gradient-based optimization of hyperparameters. Neural computation, 2000. ",
1129
+ "bbox": [
1130
+ 176,
1131
+ 266,
1132
+ 789,
1133
+ 282
1134
+ ],
1135
+ "page_idx": 10
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Luca Bertinetto, João F Henriques, Jack Valmadre, Philip Torr, and Andrea Vedaldi. Learning feed-forward one-shot learners. In Advances in Neural Information Processing Systems, 2016. ",
1140
+ "bbox": [
1141
+ 173,
1142
+ 290,
1143
+ 823,
1144
+ 320
1145
+ ],
1146
+ "page_idx": 10
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics). Springer-Verlag, Berlin, Heidelberg, 2006. ",
1151
+ "bbox": [
1152
+ 173,
1153
+ 328,
1154
+ 825,
1155
+ 358
1156
+ ],
1157
+ "page_idx": 10
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Jane Bromley, James W Bentz, Léon Bottou, Isabelle Guyon, Yann LeCun, Cliff Moore, Eduard Säckinger, and Roopak Shah. Signature verification using a “Siamese” time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 1993. ",
1162
+ "bbox": [
1163
+ 174,
1164
+ 366,
1165
+ 823,
1166
+ 409
1167
+ ],
1168
+ "page_idx": 10
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Susan Carey. Less may never mean more. Recent advances in the psychology of language, 1978. ",
1173
+ "bbox": [
1174
+ 171,
1175
+ 417,
1176
+ 808,
1177
+ 433
1178
+ ],
1179
+ "page_idx": 10
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Susan Carey and Elsa Bartlett. Acquiring a single new word. 1978. ",
1184
+ "bbox": [
1185
+ 174,
1186
+ 443,
1187
+ 616,
1188
+ 457
1189
+ ],
1190
+ "page_idx": 10
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "Rich Caruana. Multitask learning. In Learning to learn. Springer, 1998. ",
1195
+ "bbox": [
1196
+ 171,
1197
+ 465,
1198
+ 642,
1199
+ 481
1200
+ ],
1201
+ "page_idx": 10
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In IEEE Conference on Computer Vision and Pattern Recognition, 2005. ",
1206
+ "bbox": [
1207
+ 176,
1208
+ 489,
1209
+ 823,
1210
+ 531
1211
+ ],
1212
+ "page_idx": 10
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Brian Chu, Vashisht Madhavan, Oscar Beijbom, Judy Hoffman, and Trevor Darrell. Best practices for fine-tuning visual classifiers to new domains. In European Conference on Computer Vision workshops. Springer, 2016. ",
1217
+ "bbox": [
1218
+ 174,
1219
+ 540,
1220
+ 825,
1221
+ 583
1222
+ ],
1223
+ "page_idx": 10
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. ",
1228
+ "bbox": [
1229
+ 173,
1230
+ 593,
1231
+ 825,
1232
+ 622
1233
+ ],
1234
+ "page_idx": 10
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Chelsea Finn and Sergey Levine. Meta-learning and universality: Deep representations and gradient descent can approximate any learning algorithm. 2018. ",
1239
+ "bbox": [
1240
+ 174,
1241
+ 631,
1242
+ 823,
1243
+ 660
1244
+ ],
1245
+ "page_idx": 10
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, 2017. ",
1250
+ "bbox": [
1251
+ 173,
1252
+ 667,
1253
+ 825,
1254
+ 698
1255
+ ],
1256
+ "page_idx": 10
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. In International Conference on Learning Representations, 2018. ",
1261
+ "bbox": [
1262
+ 176,
1263
+ 705,
1264
+ 823,
1265
+ 736
1266
+ ],
1267
+ "page_idx": 10
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. ",
1272
+ "bbox": [
1273
+ 176,
1274
+ 743,
1275
+ 823,
1276
+ 773
1277
+ ],
1278
+ "page_idx": 10
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2012. ",
1283
+ "bbox": [
1284
+ 174,
1285
+ 781,
1286
+ 823,
1287
+ 810
1288
+ ],
1289
+ "page_idx": 10
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Bharath Hariharan and Ross B Girshick. Low-shot visual recognition by shrinking and hallucinating features. In IEEE International Conference on Computer Vision, 2017. ",
1294
+ "bbox": [
1295
+ 176,
1296
+ 819,
1297
+ 821,
1298
+ 848
1299
+ ],
1300
+ "page_idx": 10
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001. ",
1305
+ "bbox": [
1306
+ 176,
1307
+ 857,
1308
+ 823,
1309
+ 886
1310
+ ],
1311
+ "page_idx": 10
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Catalin Ionescu, Orestis Vantzos, and Cristian Sminchisescu. Training deep networks with structured layers by matrix backpropagation. arXiv preprint arXiv:1509.07838, 2015. ",
1316
+ "bbox": [
1317
+ 174,
1318
+ 895,
1319
+ 823,
1320
+ 924
1321
+ ],
1322
+ "page_idx": 10
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Łukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. Learning to remember rare events. In International Conference on Learning Representations, 2017. ",
1327
+ "bbox": [
1328
+ 171,
1329
+ 103,
1330
+ 825,
1331
+ 132
1332
+ ],
1333
+ "page_idx": 11
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. 2015. ",
1338
+ "bbox": [
1339
+ 176,
1340
+ 142,
1341
+ 750,
1342
+ 157
1343
+ ],
1344
+ "page_idx": 11
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In International Conference on Machine Learning workshops, 2015. ",
1349
+ "bbox": [
1350
+ 173,
1351
+ 166,
1352
+ 823,
1353
+ 196
1354
+ ],
1355
+ "page_idx": 11
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. ",
1360
+ "bbox": [
1361
+ 173,
1362
+ 205,
1363
+ 825,
1364
+ 222
1365
+ ],
1366
+ "page_idx": 11
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 2015. ",
1371
+ "bbox": [
1372
+ 174,
1373
+ 231,
1374
+ 823,
1375
+ 261
1376
+ ],
1377
+ "page_idx": 11
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In International Conference on Machine Learning, pp. 2113–2122, 2015. ",
1382
+ "bbox": [
1383
+ 173,
1384
+ 270,
1385
+ 826,
1386
+ 313
1387
+ ],
1388
+ "page_idx": 11
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation. 1989. ",
1393
+ "bbox": [
1394
+ 173,
1395
+ 321,
1396
+ 823,
1397
+ 353
1398
+ ],
1399
+ "page_idx": 11
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Erik G Miller, Nicholas E Matsakis, and Paul A Viola. Learning from one example through shared densities on transforms. In IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2000. ",
1404
+ "bbox": [
1405
+ 173,
1406
+ 361,
1407
+ 826,
1408
+ 404
1409
+ ],
1410
+ "page_idx": 11
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. In International Conference on Learning Representations, 2018. ",
1415
+ "bbox": [
1416
+ 173,
1417
+ 414,
1418
+ 825,
1419
+ 444
1420
+ ],
1421
+ "page_idx": 11
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Tom M Mitchell. The need for biases in learning generalizations. Department of Computer Science, Laboratory for Computer Science Research, Rutgers Univ. New Jersey, 1980. ",
1426
+ "bbox": [
1427
+ 174,
1428
+ 453,
1429
+ 825,
1430
+ 483
1431
+ ],
1432
+ "page_idx": 11
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Tom M Mitchell et al. Machine learning. 1997. Burr Ridge, IL: McGraw Hill, 1997. ",
1437
+ "bbox": [
1438
+ 176,
1439
+ 492,
1440
+ 727,
1441
+ 508
1442
+ ],
1443
+ "page_idx": 11
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Tsendsuren Munkhdalai and Hong Yu. Meta networks. In International Conference on Machine Learning, 2017. ",
1448
+ "bbox": [
1449
+ 176,
1450
+ 517,
1451
+ 823,
1452
+ 546
1453
+ ],
1454
+ "page_idx": 11
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Kevin P. Murphy. Machine Learning: A Probabilistic Perspective. The MIT Press, 2012. ",
1459
+ "bbox": [
1460
+ 173,
1461
+ 555,
1462
+ 758,
1463
+ 571
1464
+ ],
1465
+ "page_idx": 11
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "Devang K Naik and RJ Mammone. Meta-neural networks that learn by learning. In Neural Networks, 1992. IJCNN., International Joint Conference on. IEEE, 1992. ",
1470
+ "bbox": [
1471
+ 174,
1472
+ 582,
1473
+ 823,
1474
+ 611
1475
+ ],
1476
+ "page_idx": 11
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. CoRR, 2018. URL http://arxiv.org/abs/1803.02999. ",
1481
+ "bbox": [
1482
+ 176,
1483
+ 619,
1484
+ 823,
1485
+ 650
1486
+ ],
1487
+ "page_idx": 11
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 659,
1495
+ 826,
1496
+ 702
1497
+ ],
1498
+ "page_idx": 11
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Kaare Brandt Petersen, Michael Syskind Pedersen, et al. The matrix cookbook. Technical University of Denmark, 2008. ",
1503
+ "bbox": [
1504
+ 174,
1505
+ 712,
1506
+ 825,
1507
+ 741
1508
+ ],
1509
+ "page_idx": 11
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L. Yuille. Few-shot image recognition by predicting parameters from activations. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. ",
1514
+ "bbox": [
1515
+ 174,
1516
+ 750,
1517
+ 825,
1518
+ 792
1519
+ ],
1520
+ "page_idx": 11
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, 2017. ",
1525
+ "bbox": [
1526
+ 171,
1527
+ 803,
1528
+ 823,
1529
+ 833
1530
+ ],
1531
+ "page_idx": 11
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, 2017. ",
1536
+ "bbox": [
1537
+ 171,
1538
+ 842,
1539
+ 823,
1540
+ 872
1541
+ ],
1542
+ "page_idx": 11
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. In International Conference on Learning Representations, 2018. ",
1547
+ "bbox": [
1548
+ 174,
1549
+ 881,
1550
+ 825,
1551
+ 924
1552
+ ],
1553
+ "page_idx": 11
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "Sebastian Ruder. An overview of multi-task learning in deep neural networks. arXiv preprint arXiv:1706.05098, 2017. ",
1558
+ "bbox": [
1559
+ 171,
1560
+ 103,
1561
+ 823,
1562
+ 132
1563
+ ],
1564
+ "page_idx": 12
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. 2015. ",
1569
+ "bbox": [
1570
+ 173,
1571
+ 140,
1572
+ 823,
1573
+ 184
1574
+ ],
1575
+ "page_idx": 12
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International Conference on Machine Learning, 2016. ",
1580
+ "bbox": [
1581
+ 173,
1582
+ 193,
1583
+ 823,
1584
+ 236
1585
+ ],
1586
+ "page_idx": 12
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "Jürgen Schmidhuber. Evolutionary principles in self-referential learning, or on learning how to learn: the meta-meta-... hook. PhD thesis, Technische Universität München, 1987. ",
1591
+ "bbox": [
1592
+ 173,
1593
+ 244,
1594
+ 823,
1595
+ 273
1596
+ ],
1597
+ "page_idx": 12
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 1992. ",
1602
+ "bbox": [
1603
+ 174,
1604
+ 281,
1605
+ 821,
1606
+ 310
1607
+ ],
1608
+ "page_idx": 12
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "Jürgen Schmidhuber. A neural network that embeds its own meta-levels. In Neural Networks, 1993., IEEE International Conference on. IEEE, 1993. ",
1613
+ "bbox": [
1614
+ 173,
1615
+ 319,
1616
+ 821,
1617
+ 349
1618
+ ],
1619
+ "page_idx": 12
1620
+ },
1621
+ {
1622
+ "type": "text",
1623
+ "text": "Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, 2017. ",
1624
+ "bbox": [
1625
+ 174,
1626
+ 357,
1627
+ 821,
1628
+ 387
1629
+ ],
1630
+ "page_idx": 12
1631
+ },
1632
+ {
1633
+ "type": "text",
1634
+ "text": "Pablo Sprechmann, Siddhant M Jayakumar, Jack W Rae, Alexander Pritzel, Adrià Puigdomènech Badia, Benigno Uria, Oriol Vinyals, Demis Hassabis, Razvan Pascanu, and Charles Blundell. Memory-based parameter adaptation. 2018. ",
1635
+ "bbox": [
1636
+ 174,
1637
+ 395,
1638
+ 826,
1639
+ 438
1640
+ ],
1641
+ "page_idx": 12
1642
+ },
1643
+ {
1644
+ "type": "text",
1645
+ "text": "Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. ",
1646
+ "bbox": [
1647
+ 174,
1648
+ 446,
1649
+ 826,
1650
+ 489
1651
+ ],
1652
+ "page_idx": 12
1653
+ },
1654
+ {
1655
+ "type": "text",
1656
+ "text": "Albert Tarantola. Inverse problem theory and methods for model parameter estimation, volume 89. siam, 2005. ",
1657
+ "bbox": [
1658
+ 173,
1659
+ 498,
1660
+ 823,
1661
+ 526
1662
+ ],
1663
+ "page_idx": 12
1664
+ },
1665
+ {
1666
+ "type": "text",
1667
+ "text": "Sebastian Thrun. Is learning the n-th thing any easier than learning the first? In Advances in Neural Information Processing Systems, 1996. ",
1668
+ "bbox": [
1669
+ 171,
1670
+ 535,
1671
+ 823,
1672
+ 565
1673
+ ],
1674
+ "page_idx": 12
1675
+ },
1676
+ {
1677
+ "type": "text",
1678
+ "text": "Sebastian Thrun. Lifelong learning algorithms. In Learning to learn. Springer, 1998. ",
1679
+ "bbox": [
1680
+ 173,
1681
+ 573,
1682
+ 732,
1683
+ 589
1684
+ ],
1685
+ "page_idx": 12
1686
+ },
1687
+ {
1688
+ "type": "text",
1689
+ "text": "Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 1998. ",
1690
+ "bbox": [
1691
+ 173,
1692
+ 597,
1693
+ 805,
1694
+ 613
1695
+ ],
1696
+ "page_idx": 12
1697
+ },
1698
+ {
1699
+ "type": "text",
1700
+ "text": "Paul E Utgoff. Shift of bias for inductive concept learning. Machine learning: An artificial intelligence approach, 1986. ",
1701
+ "bbox": [
1702
+ 173,
1703
+ 621,
1704
+ 825,
1705
+ 650
1706
+ ],
1707
+ "page_idx": 12
1708
+ },
1709
+ {
1710
+ "type": "text",
1711
+ "text": "Jack Valmadre, Luca Bertinetto, João Henriques, Andrea Vedaldi, and Philip HS Torr. End-to-end representation learning for correlation filter based tracking. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. ",
1712
+ "bbox": [
1713
+ 173,
1714
+ 659,
1715
+ 825,
1716
+ 702
1717
+ ],
1718
+ "page_idx": 12
1719
+ },
1720
+ {
1721
+ "type": "text",
1722
+ "text": "Ricardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial Intelligence Review, 2002. ",
1723
+ "bbox": [
1724
+ 173,
1725
+ 710,
1726
+ 823,
1727
+ 739
1728
+ ],
1729
+ "page_idx": 12
1730
+ },
1731
+ {
1732
+ "type": "text",
1733
+ "text": "Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, 2016. ",
1734
+ "bbox": [
1735
+ 173,
1736
+ 748,
1737
+ 825,
1738
+ 779
1739
+ ],
1740
+ "page_idx": 12
1741
+ },
1742
+ {
1743
+ "type": "text",
1744
+ "text": "Yuxin Wu and Kaiming He. Group normalization. CoRR, 2018. URL http://arxiv.org/ abs/1803.08494. ",
1745
+ "bbox": [
1746
+ 173,
1747
+ 786,
1748
+ 825,
1749
+ 815
1750
+ ],
1751
+ "page_idx": 12
1752
+ },
1753
+ {
1754
+ "type": "text",
1755
+ "text": "Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in Neural Information Processing Systems, 2014. ",
1756
+ "bbox": [
1757
+ 173,
1758
+ 824,
1759
+ 823,
1760
+ 853
1761
+ ],
1762
+ "page_idx": 12
1763
+ },
1764
+ {
1765
+ "type": "text",
1766
+ "text": "A Steven Younger, Sepp Hochreiter, and Peter R Conwell. Meta-learning with backpropagation. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on. IEEE, 2001. ",
1767
+ "bbox": [
1768
+ 173,
1769
+ 862,
1770
+ 825,
1771
+ 891
1772
+ ],
1773
+ "page_idx": 12
1774
+ },
1775
+ {
1776
+ "type": "text",
1777
+ "text": "A EXTENDED DISCUSSION ",
1778
+ "text_level": 1,
1779
+ "bbox": [
1780
+ 176,
1781
+ 102,
1782
+ 410,
1783
+ 117
1784
+ ],
1785
+ "page_idx": 13
1786
+ },
1787
+ {
1788
+ "type": "text",
1789
+ "text": "Contributions within the few-shot learning paradigm. In this work, we evaluated our proposed methods R2-D2 and LR-D2 in the few-shot learning scenario (Fei-Fei et al., 2006; Lake et al., 2015; Vinyals et al., 2016; Ravi & Larochelle, 2017; Hariharan & Girshick, 2017), which consists in learning how to discriminate between images given one or very few examples. For methods tackling this problem, it is common practice to organise the training procedure in two nested loops. The inner loop is used to solve the actual few-shot classification problem, while the outer loop serves as a guidance for the former by gradually modifying the inductive bias of the base learner (Vilalta & Drissi, 2002). Differently from standard classification benchmarks, the few-shot ones enforce that classes are disjoint between dataset splits. ",
1790
+ "bbox": [
1791
+ 174,
1792
+ 137,
1793
+ 825,
1794
+ 263
1795
+ ],
1796
+ "page_idx": 13
1797
+ },
1798
+ {
1799
+ "type": "text",
1800
+ "text": "In the literature (e.g. Vinyals et al. (2016)), the very small classification problems with unseen classes solved within the inner loop have often been referred to as episodes or tasks. Considering the general few-shot learning paradigm just described, methods in the recent literature mostly differ for the type of learner they use in the inner loop and the amount of per-episode adaptability they allow. For example, at the one end of the spectrum in terms of “amount of adaptability”, we can find methods such as MAML Finn et al. (2017), which learns how to efficiently fine-tune the parameters of a neural-network with few iterations of SGD. On the other end, we have methods based on metric learning such as prototypical networks Snell et al. (2017) and relation network Sung et al. (2018), which are fast but do not perform adaptation. Note that the amount of adaptation to a new episode (i.e.a new classification problem with unseen classes) is not at all indicative of the performance in few-shot learning benchmarks. As a matter of fact, both Snell et al. (2017) and Sung et al. (2018) achieve higher accuracy than MAML. Nonetheless, adaptability is a desirable property, as it allows more design flexibility. ",
1801
+ "bbox": [
1802
+ 174,
1803
+ 270,
1804
+ 825,
1805
+ 450
1806
+ ],
1807
+ "page_idx": 13
1808
+ },
1809
+ {
1810
+ "type": "text",
1811
+ "text": "Within this landscape, our work proposes a novel technique (R2-D2) that does allow per-episode adaptation while at the same time being fast (Table 4) and achieving strong performance (Table 1). The key innovation is to use a simple (and differentiable) solver such as ridge regression within the inner loop, which requires back-propagating through the solution of a learning problem. Crucially, its closed-form solution and the use of the Woodbury identity (particularly advantageous in the low data regime) allow this non-trivial endeavour to be efficient. We further demonstrate that this strategy is not limited to the ridge regression case, but it can also be extended to other solvers (LR-D2) by dividing the problem into a short series of weighted least squares problems ((Murphy, 2012, Chapter 8.3.4)). ",
1812
+ "bbox": [
1813
+ 174,
1814
+ 458,
1815
+ 825,
1816
+ 582
1817
+ ],
1818
+ "page_idx": 13
1819
+ },
1820
+ {
1821
+ "type": "text",
1822
+ "text": "Disambiguation from the multi-task learning paradigm. Our work – and more generally the few-shot learning literature as a whole – is related to the multi-task learning paradigm (Caruana, 1998; Ruder, 2017). However, several crucial differences exist. In terms of setup, multi-task learning methods are trained to solve a fixed set of $T$ tasks (or domains). At test time, the same $T$ tasks or domains are encountered. For instance, the popular Office-Caltech (Gong et al., 2012) dataset is constructed by considering all the images from 10 classes present in 4 different datasets (the domains). For multi-task learning, the splits span the domains but contain all the 10 classes. Conversely, few-shot learning datasets have splits with disjoint sets of classes (i.e. each split’s classes are not contained in other splits). Moreover, only a few examples (shots) can be used as training data within one episode, while in multi-task learning this limitation is not present. For this reason, meta-learning methods applied to few-shot learning (e.g.ours, (Vinyals et al., 2016; Finn et al., 2017; Ravi & Larochelle, 2017; Mishra et al., 2018)) crucially take into account adaptation already during the training process to mimic the test-time setting, de facto learning how to learn from limited data. ",
1823
+ "bbox": [
1824
+ 173,
1825
+ 589,
1826
+ 826,
1827
+ 770
1828
+ ],
1829
+ "page_idx": 13
1830
+ },
1831
+ {
1832
+ "type": "text",
1833
+ "text": "The importance of considering adaptation during training. Considering adaptation during training is also one of the main traits that differentiate our approach from basic transfer learning approaches in which a neural network is first pre-trained on one dataset/task and then adapted to a different dataset/task by simply adapting the final layer(s) (e.g. Yosinski et al. (2014); Chu et al. (2016)). ",
1834
+ "bbox": [
1835
+ 174,
1836
+ 777,
1837
+ 825,
1838
+ 833
1839
+ ],
1840
+ "page_idx": 13
1841
+ },
1842
+ {
1843
+ "type": "text",
1844
+ "text": "To better illustrate this point, we conducted a baseline experiment. First, we pre-trained for a standard classification problem the same 4-layers CNN architecture using the same training datasets. We simply added a final fully-connected layer (with 64 outputs, like the number of classes in the training splits) and used the cross-entropy loss. Then, we used the convolutional part of this trained network as a feature extractor and fed its activations to our ridge-regression layer to produce a per-episode set of weights $W$ . On miniImagenet, the drop in performance w.r.t. our proposed R2-D2 is very significant: $- 1 3 . 8 \\%$ and $- 1 1 . 6 \\%$ accuracy for the 1 and 5 shot problems respectively. The drop in performance is consistent on CIFAR, though a bit less drastic: $- 1 1 . 5 \\%$ and $- 5 . 9 \\%$ . ",
1845
+ "bbox": [
1846
+ 174,
1847
+ 840,
1848
+ 825,
1849
+ 924
1850
+ ],
1851
+ "page_idx": 13
1852
+ },
1853
+ {
1854
+ "type": "text",
1855
+ "text": "",
1856
+ "bbox": [
1857
+ 171,
1858
+ 103,
1859
+ 823,
1860
+ 132
1861
+ ],
1862
+ "page_idx": 14
1863
+ },
1864
+ {
1865
+ "type": "text",
1866
+ "text": "These results empirically confirm that simply using basic transfer learning techniques with a shared feature representation and task-specific final layers is not a good strategy to obtain results competitive with the state-of-the-art in few-shot learning. Instead, it is necessary to enforce the generality of the underlying features during training explicitly, which we do by back-propagating through the adaptation procedure (the regressors R2-D2 and LR-D2). ",
1867
+ "bbox": [
1868
+ 174,
1869
+ 138,
1870
+ 825,
1871
+ 208
1872
+ ],
1873
+ "page_idx": 14
1874
+ },
1875
+ {
1876
+ "type": "text",
1877
+ "text": "B DIFFERENT GAUSSIAN PRIORS FOR REGULARIZATION ",
1878
+ "text_level": 1,
1879
+ "bbox": [
1880
+ 174,
1881
+ 229,
1882
+ 651,
1883
+ 246
1884
+ ],
1885
+ "page_idx": 14
1886
+ },
1887
+ {
1888
+ "type": "text",
1889
+ "text": "The regularization term can be seen as a prior gaussian distribution of the parameters in a Bayesian interpretation, or more simply Tikhonov regularization (Tarantola, 2005). In the most common case of $\\lambda I$ , it corresponds to an isotropic gaussian prior on the parameters. ",
1890
+ "bbox": [
1891
+ 174,
1892
+ 260,
1893
+ 825,
1894
+ 303
1895
+ ],
1896
+ "page_idx": 14
1897
+ },
1898
+ {
1899
+ "type": "text",
1900
+ "text": "In addition to the case in which $\\lambda$ is a scalar, we also experiment with the variant $\\operatorname { d i a g } ( \\lambda )$ , corresponding to an axis-aligned gaussian prior with an independent variance for each parameter, which can potentially exploit the fact that the parameters have different scales. Replacing $\\lambda I$ with $\\mathrm { d i a g } ( \\lambda )$ in 4, the final expression for W after having applied the Woodbury identity becomes: ",
1901
+ "bbox": [
1902
+ 174,
1903
+ 309,
1904
+ 825,
1905
+ 366
1906
+ ],
1907
+ "page_idx": 14
1908
+ },
1909
+ {
1910
+ "type": "equation",
1911
+ "img_path": "images/281e8ba0d7f8051b96bf2adff3e73311920a0f6c3f8c450af75a8e27a75db239.jpg",
1912
+ "text": "$$\nW = \\Lambda ( Z ) = \\mathrm { d i a g } ( \\lambda ) ^ { - 1 } X ^ { T } ( X \\mathrm { d i a g } ( \\lambda ) ^ { - 1 } X ^ { T } + I ) ^ { - 1 } Y .\n$$",
1913
+ "text_format": "latex",
1914
+ "bbox": [
1915
+ 310,
1916
+ 372,
1917
+ 687,
1918
+ 391
1919
+ ],
1920
+ "page_idx": 14
1921
+ },
1922
+ {
1923
+ "type": "text",
1924
+ "text": "C BASE LEARNER HYPER-PARAMETERS ",
1925
+ "text_level": 1,
1926
+ "bbox": [
1927
+ 174,
1928
+ 410,
1929
+ 519,
1930
+ 426
1931
+ ],
1932
+ "page_idx": 14
1933
+ },
1934
+ {
1935
+ "type": "text",
1936
+ "text": "Figure 3 illustrates the effect of using SGD to learn, together with the parameters $\\omega$ of the CNN, also the hyper-parameters ( $\\vert \\rho \\rrangle$ in eq. 2) of the base learner $\\Lambda$ . We find that it is very important to learn the scalar $\\alpha$ (right plot of Figure 3) used to calibrate the output of R2-D2 in eq. 6, while it is indifferent whether or not to learn $\\lambda$ . Note that, by using SGD to update $\\alpha$ , it is possible (e.g.in the range $[ 1 0 ^ { - 3 } , 1 0 ^ { 0 } ] )$ to recover from poor initial values and suffer just a little performance loss w.r.t. the optimal value of $\\alpha = 1 0$ . ",
1937
+ "bbox": [
1938
+ 173,
1939
+ 440,
1940
+ 826,
1941
+ 525
1942
+ ],
1943
+ "page_idx": 14
1944
+ },
1945
+ {
1946
+ "type": "text",
1947
+ "text": "The left plot of Figure 3 also shows the performance of R2-D2 with the variant $\\operatorname { d i a g } ( \\lambda )$ introduced in Appendix B. Unfortunately, despite this formulation allows us to make use of a more expressive prior, it does not improve the results compared to using a simple scalar $\\lambda$ . Moreover, performance abruptly deteriorate for $\\lambda > 0 . 0 1$ . ",
1948
+ "bbox": [
1949
+ 174,
1950
+ 531,
1951
+ 825,
1952
+ 588
1953
+ ],
1954
+ "page_idx": 14
1955
+ },
1956
+ {
1957
+ "type": "image",
1958
+ "img_path": "images/70bb6e6e333a0bb41ad8417d9839ec88dbd7d43df24741d8ddd65f82494a9c78.jpg",
1959
+ "image_caption": [
1960
+ "Figure 3: Shaded areas represent $9 5 \\%$ confidence intervals. "
1961
+ ],
1962
+ "image_footnote": [],
1963
+ "bbox": [
1964
+ 187,
1965
+ 608,
1966
+ 790,
1967
+ 767
1968
+ ],
1969
+ "page_idx": 14
1970
+ }
1971
+ ]
parse/train/HyxnZh0ct7/HyxnZh0ct7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyxnZh0ct7/HyxnZh0ct7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/l0BP1lHpPW/l0BP1lHpPW.md ADDED
@@ -0,0 +1,509 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Optimal Client Sampling for Federated Learning
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ 1 It is well understood that client-master communication can be a primary bottleneck
11
+ 2 in Federated Learning. In this work, we address this issue with a novel client sub
12
+ 3 sampling scheme, where we restrict the number of clients allowed to communicate
13
+ 4 their updates back to the master node. In each communication round, all partici
14
+ 5 pated clients compute their updates, but only the ones with “important” updates
15
+ 6 communicate back to the master. We show that importance can be measured using
16
+ 7 only the norm of the update and give a formula for optimal client participation.
17
+ 8 This formula minimizes the distance between the full update, where all clients
18
+ 9 participate, and our limited update, where the number of participating clients is
19
+ 10 restricted. In addition, we provide a simple algorithm that approximates the optimal
20
+ 11 formula for client participation which only requires secure aggregation and thus
21
+ 12 does not compromise client privacy. We show both theoretically and empirically
22
+ 13 that our approach leads to superior performance for Distributed SGD (DSGD) and
23
+ 14 Federated Averaging (FedAvg) compared to the baseline where participating clients
24
+ 15 are sampled uniformly. Our approach is orthogonal to and compatible with ex
25
+ 16 isting methods for reducing communication overhead, such as local methods and
26
+ 17 communication compression methods.
27
+
28
+ # 18 1 Introduction
29
+
30
+ 19 We consider the standard cross-device Federated Learning (FL) setting [13], where the objective is of
31
+ 20 the form
32
+
33
+ $$
34
+ \operatorname* { m i n } _ { x \in \mathbb { R } ^ { d } } \left[ f ( x ) : = \sum _ { i = 1 } ^ { n } w _ { i } f _ { i } ( x ) \right] ,
35
+ $$
36
+
37
+ 21 where $\boldsymbol { x } \in \mathbb { R } ^ { d }$ represents the parameters of a statistical model we aim to find, $n$ is the total number of
38
+ 22 23 clients, owned $f _ { i } \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ $i$ ia $f _ { i } = \mathrm { E } _ { \xi \sim D _ { i } } \left[ f ( x , \xi ) \right]$ entiab, and $w _ { i } \geq 0$ loss function which dependsare client weights such that $\textstyle \sum _ { i = 1 } ^ { n } w _ { i } = 1$ $\mathcal { D } _ { i }$
39
+ 24 We assume the classical FL setup in which a central master (server) orchestrates the training by
40
+ 25 securely aggregating updates from clients without seeing the raw data.
41
+
42
+ # 26 1.1 Communication as the Bottleneck
43
+
44
+ 27 It is well understood that cost of communication can be the primary bottleneck in Federated Learning.
45
+ 28 Indeed, wireless links and other end-user internet connections typically operate at lower rates than
46
+ 29 intra-datacenter or inter-datacenter links and can be potentially expensive and unreliable. Moreover,
47
+ 30 the capacity of the aggregating master and other FL system considerations impose direct or indirect
48
+ 31 constrains on the number of clients that are allowed to participate in each communication round.
49
+ 32 These considerations have led to significant interest in reducing the communication bandwidth of FL
50
+ 33 systems.
51
+
52
+ Submitted to 35th Conference on Neural Information Processing Systems (NeurIPS 2021). Do not distribute.
53
+
54
+ 35 One of the most popular strategies is to reduce the frequency of communication and put more
55
+ 36 emphasis on computation. This is usually achieved by asking the devices to perform multiple local
56
+ 37 steps before communicating their updates. A prototype method in this category is the Federated
57
+ 38 Averaging (FedAvg) algorithm [23]. The original work was a heuristic, offering no theoretical
58
+ 39 guarantees, which motivated the community to try to understand the method and various existing and
59
+ 40 new variants theoretically [35, 21, 15, 37, 17, 9].
60
+
61
+ # 41 1.1.2 Communication Compression
62
+
63
+ 42 Another popular approach is to reduce the size of the object (typically gradients) communicated from
64
+ 43 clients to the master. These techniques are usually referred to as gradient/communication compression.
65
+ 44 In this approach, instead of transmitting the full-dimensional gradient/update vector $g \in \mathbf { \mathbb { R } } ^ { d }$ , one
66
+ 45 transmits a compressed vector $\mathcal C ( g )$ , where $\mathcal { C } : \mathbb { R } ^ { d } \mathbb { R } ^ { d }$ is a (possibly random) operator chosen
67
+ 46 such that $\mathcal { C } ( g )$ can be represented using fewer bits, for instance by using limited bit representation
68
+ 47 (quantization) or by enforcing sparsity (sparsification). A particularly popular class of quantization
69
+ 48 operators is based on random dithering [7, 30]; see [1, 41, 42, 28]. A new variant of random dithering
70
+ 49 developed in [10] offers an exponential improvement on standard dithering. Sparse vectors can be
71
+ 50 obtained by random sparsification techniques that randomly mask the input vectors and preserve a
72
+ 51 constant number of coordinates only [40, 18, 36, 24, 39]. There is also a line of work [10, 3] where a
73
+ 52 combination of sparsification and quantization was proposed to obtain a more aggressive combined
74
+ 53 effect.
75
+
76
+ # 54 1.2 Related Work
77
+
78
+ 55 Importance sampling methods for optimization have been studied extensively in the last few years in
79
+ 56 several contexts, including convex optimization and deep learning. LASVM developed in [5], which is
80
+ 57 an online algorithm that uses importance sampling to train kernelized support vector machines. The
81
+ 58 first importance sampling for randomized coordinate descent methods was proposed in a seminal
82
+ 59 paper in [26]. It was showed in [29] that the proposed sampling is optimal. Later, several extensions
83
+ 60 and improvements followed [33, 20, 6, 27, 2, 38]. Another branch of work studies sample complexity.
84
+ 61 In [25, 43], the authors make a connection with the variance of the gradient estimates of SGD and
85
+ 62 show that the optimal sampling distribution is proportional to the per-sample gradient norm. In terms
86
+ 63 of computation, obtaining this distribution is as hard as the computation of the full gradient, thus
87
+ 64 it is not practical. For simpler problems, one can sample proportionally to the norms of the inputs,
88
+ 65 which can be linked to the Lipschitz constants of the per-sample loss function for linear and logistic
89
+ 66 regression. For instance, it was shown in [11] that static optimal sampling can be constructed even
90
+ 67 for mini-batches and the probability is proportional to these Lipschitz constants under the assumption
91
+ 68 that these constants of the per-sample loss function are known. Unfortunately, importance measures
92
+ 69 such as smoothness of the gradient are often hard to compute/estimate for more complicated models
93
+ 70 such as those arising in deep learning, where most of the importance sampling schemes are based
94
+ 71 on heuristics. A manually designed sampling scheme was proposed in [4]. It was inspired by the
95
+ 72 perceived way that human children learn; in practice, they provide the network with examples of
96
+ 73 increasing difficulty in an arbitrary manner. In a diametrically opposite approach, it is common for
97
+ 74 deep embedding learning to sample hard examples because of the plethora of easy non-informative
98
+ 75 ones [32, 34]. Other approaches use a history of losses for previously seen samples to create the
99
+ 76 sampling distribution and sample either proportionally to the loss or based on the loss ranking [31, 22].
100
+ 77 In [16], the authors propose to sample based on the gradient norm of a small uniformly sampled
101
+ 78 subset of samples.
102
+ 79 In our work, we avoid all the aforementioned problems as our motivation is not to reduce computation,
103
+ 80 which is not the main bottleneck of Federated Learning, but to use importance sampling to decrease
104
+ 81 the number of bits communicated. This, as we show in Section 2, allows us to construct optimal
105
+ 82 adaptive sampling; that is, we do not need to rely on any heuristics, historical losses, or partial
106
+ 83 information.
107
+ 85 In this work, we propose a new approach to addressing the communication bandwidth issues appearing
108
+ 86 in FL. Our approach is based on the observation that in the situation where partial participation
109
+ 87 is desired and a budget on the number of participating clients is applied, careful selection of the
110
+ 88 participating clients can lead to better communication complexity, and hence faster training. In other
111
+ 89 words, we claim that in any given communication round, some clients will have “more informative”
112
+ 90 updates than others and that the training procedure will benefit from capitalizing on this fact by
113
+ 91 ignoring some of the worthless updates.
114
+ 92 In particular, we propose a principled optimal client sampling scheme capable of identifying the most
115
+ 93 informative clients in any given communication round. Our scheme works by minimizing the variance
116
+ 94 of the stochastic gradient produced by the partial participation procedure, which then translates to
117
+ 95 a probable reduction in the number of communication rounds. To the best of our knowledge, this
118
+ 96 approach was not considered before. Moreover, our proposal is orthogonal to and hence combinable
119
+ 97 with existing approaches to communication reduction such as communication compression or local
120
+ 98 updates (Section 3.2).
121
+
122
+ 99 Our contributions can be summarized as follows:
123
+
124
+ • we propose a novel adaptive partial participation strategy for reducing communication in FL that works by a careful selection of the clients that are allowed to communicate their updates to the master node in any given communication round;
125
+ our adaptive client sampling procedure is optimal in the sense that it minimizes the variance of the master update;
126
+ • we propose an approximation to our optimal adaptive sampling strategy which only requires aggregation, thus allows for secure aggregation and stateless clients;
127
+ • we show theoretically that our approach allows for larger learning rates for Distributed SGD and FedAvg algorithms than the baseline which performs uniform client sampling, and as a result leads to better communication complexity.
128
+ • we show empirically that the performance of our approach is superior to uniform sampling and is close to full participation.
129
+
130
+ # 112 2 Smart Client Sampling for Reducing Communication
131
+
132
+ 113 We now describe our client sampling strategy for reducing the communication bottleneck in Federated
133
+ 114 Learning. Each client $i$ participating in round $k$ computes an update vector $\mathbf { U } _ { i } ^ { k } \in \mathbb { R } ^ { d }$ . For simplicity
134
+ 115 and ease of exposition, we assume that all clients $i \in [ n ] : = \{ 1 , 2 , \dots , n \}$ are available in each round.
135
+ 116 However, we would like to point out that this is not a limiting factor, and all presented theory can be
136
+ 117 easily extended to the case of partial participation with an arbitrary distribution. In our framework,
137
+ 118 only a subset of clients communicates their updates to the master node in each communication round
138
+ 119 in order to reduce the number of transmitted bits.
139
+ 120 In order to provide analysis in this framework, we consider a general partial participation frame
140
+ 121 work [12], where we assume that the subset of participating clients is determined by an arbitrary
141
+ 122 random set-valued mapping $\mathbb { S }$ (a “sampling”) with values in $\mathbf { \bar { 2 } } ^ { [ n ] }$ . A sampling $\mathbb { S }$ is uniquely defined
142
+ 123 by assigning probabilities to all $2 ^ { n }$ subsets of $[ n ]$ . With each sampling $\mathbb { S }$ we associate a probability
143
+ 124 matrix $\mathbf { \bar { P } } \in \mathbf { \bar { \mathbb { R } } } ^ { n \times n }$ defined by $\mathbf { P } _ { i j } : = \mathrm { P r o b } ( \{ i , j \} \subseteq \mathbb { S } )$ . The probability vector associated with $\mathbb { S }$ is
144
+ 125 the vector composed of the diagonal entries of $\mathbf { P }$ : $p = ( p _ { 1 } , \ldots , p _ { n } ) \in \mathbb { R } ^ { n }$ , where $p _ { i } : = \mathrm { P r o b } ( i \in \mathbb { S } )$ .
145
+ 126 We say that $\mathbb { S }$ is proper if $p _ { i } > 0$ for all $i$ . It is easy to show that $\begin{array} { r } { b : = \operatorname { E } \left[ | \mathbb { S } | \right] = \operatorname { T r a c e } \left( \mathbf { P } \right) = \sum _ { i = 1 } ^ { n } p _ { i } } \end{array}$
146
+ 127 and hence $b$ can be seen as the expected number of clients participating in each communication round.
147
+ 128 Given parameters $p _ { 1 } , \ldots , p _ { n } \in [ 0 , 1 ] .$ , consider a random set $\mathbb { S } \subseteq [ n ]$ generated as follows: for each
148
+ 129 $i \in [ n ]$ , we include $i$ in $\mathbb { S }$ with probability $p _ { i }$ . This is called independent sampling, since the event
149
+ 130 $i \in \mathbb S$ is independent of $j \in \mathbb S$ for any $i \neq j$ .
150
+ 131 While our client sampling strategy can be adapted to essentially any underlying learning method, we
151
+ 132 give details here for DSGD:
152
+
153
+ $$
154
+ x ^ { k + 1 } = x ^ { k } - \eta ^ { k } \mathbf { G } ^ { k } , \quad \mathbf { G } ^ { k } : = \sum _ { i \in S ^ { k } } \frac { w _ { i } } { p _ { i } ^ { k } } \mathbf { U } _ { i } ^ { k } ,
155
+ $$
156
+
157
+ where $S ^ { k } \sim \mathbb { S } ^ { k }$ and $\mathbf { U } _ { i } ^ { k } = g _ { i } ^ { k }$ is an unbiased estimator of $\nabla f _ { i } ( x ^ { k } )$ . The scaling factor $\frac { 1 } { p _ { i } ^ { k } }$ is necessary in order to obtain an unbiased estimator of the true update, i.e., $\begin{array} { r } { \mathrm { E } _ { S ^ { k } } \left[ { \bf G } ^ { k } \right] = \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { \bar { U } } _ { i } ^ { k } } \end{array}$ .
158
+
159
+ # 2.1 Optimal Client Sampling
160
+
161
+ We start with a simple observation that the variance of our gradient estimator 136 $\mathbf { G } ^ { k }$ can be decomposed 137 as
162
+
163
+ $$
164
+ \mathrm { E } \left[ \left. \mathbf { G } ^ { k } - \nabla f ( x ^ { k } ) \right. ^ { 2 } \right] = \mathrm { E } \left[ \left. \mathbf { G } ^ { k } - \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { U } _ { i } ^ { k } \right. ^ { 2 } \right] + \mathrm { E } \left[ \left. \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { U } _ { i } ^ { k } - \nabla f ( x ^ { k } ) \right. ^ { 2 } \right] .
165
+ $$
166
+
167
+ 138 Note that the second term on the right-hand side is independent of the sampling procedure and
168
+ 139 the first term is zero if every client sends its update (i.e., if $p _ { i } ^ { k } = 1$ for all $i$ ). In order to provide
169
+ 140 meaningful results, we restrict the expected number of clients to communicate in each round by
170
+ 141 bounding $\begin{array} { r } { b ^ { k } : = \sum _ { i = 1 } ^ { n } p _ { i } ^ { k } } \end{array}$ by some positive integer $m \leq n$ . This raises the following question: What
171
+ 142 is the sampling procedure that minimizes (3) for any given $m$ ? We answer this question using the
172
+ 143 following technical lemma:
173
+
174
+ Lemma 1. Let 144 $\zeta _ { 1 } , \zeta _ { 2 } , \ldots , \zeta _ { n }$ be vectors in $\mathbb { R } ^ { d }$ and $w _ { 1 } , w _ { 2 } , \ldots , w _ { n }$ be non-negative real numbers such that 145 $\textstyle \sum _ { i = 1 } ^ { n } w _ { i } = 1$ . Define $\textstyle { \tilde { \zeta } } : = \sum _ { i = 1 } ^ { n } w _ { i } \zeta _ { i }$ . Let $S$ be a proper sampling. If $v \in \mathbb { R } ^ { n }$ is such that
175
+
176
+ $$
177
+ \mathbf { P } - p p ^ { \top } \preceq \mathbf { D i a g } ( p _ { 1 } v _ { 1 } , p _ { 2 } v _ { 2 } , \ldots , p _ { n } v _ { n } ) ,
178
+ $$
179
+
180
+ 146 then
181
+
182
+ $$
183
+ \operatorname { E } \left[ \left\| \sum _ { i \in S } { \frac { w _ { i } \zeta _ { i } } { p _ { i } } } - { \tilde { \zeta } } \right\| ^ { 2 } \right] \leq \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } { \frac { v _ { i } } { p _ { i } } } \left\| \zeta _ { i } \right\| ^ { 2 } ,
184
+ $$
185
+
186
+ where the expectation is taken over 147 $S$ . Whenever (3) holds, it must be the case that $v _ { i } \geq 1 - p _ { i }$
187
+
188
+ 148 It turns out that given probabilities $\{ p _ { i } \}$ , among all samplings $S$ satisfying $p _ { i } = { \mathrm { P r o b } } ( i \in S )$ , the
189
+ 149 independent sampling minimizes the left-hand side of (4). This is due to two nice properties: a) any
190
+ 150 independent sampling admits optimal choice of $v$ , i.e., $v _ { i } = 1 - p _ { i }$ for all $i$ , and b) for independent
191
+ 151 sampling (4) holds as equality. In the context of our method, these properties can be written as
192
+
193
+ $$
194
+ \operatorname { E } \left[ \left\| \mathbf { G } ^ { k } - \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { U } _ { i } ^ { k } \right\| ^ { 2 } \right] = \operatorname { E } \left[ \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } { \frac { 1 - p _ { i } ^ { k } } { p _ { i } ^ { k } } } \left\| \mathbf { U } _ { i } ^ { k } \right\| ^ { 2 } \right] .
195
+ $$
196
+
197
+ 152 It now only remains to find the parameters $\{ p _ { i } ^ { k } \}$ defining the optimal independent sampling, i.e., one
198
+ 153 that minimizes (5) subject to the constraints $0 \leq p _ { i } ^ { k } \leq 1$ and $\begin{array} { r } { \bar { b } ^ { k } : = \sum _ { i = 1 } ^ { n } p _ { i } ^ { k } \le m } \end{array}$ . It turns out that
199
+ 154 this problem has the following closed-form solution:
200
+
201
+ $$
202
+ p _ { i } ^ { k } = \left\{ \begin{array} { l l } { ( m + l - n ) \frac { \left\| \tilde { U } _ { i } ^ { k } \right\| } { \sum _ { j = 1 } ^ { l } \left\| \tilde { U } _ { ( j ) } ^ { k } \right\| } , } & { \quad \mathrm { i f } i \notin A ^ { k } , } \\ { 1 , } & { \quad \mathrm { i f } i \in A ^ { k } , } \end{array} \right.
203
+ $$
204
+
205
+ where $\tilde { U } _ { i } ^ { k } : = w _ { i } \mathbf { U } _ { i } ^ { k }$ , and $\left\| \tilde { U } _ { ( j ) } ^ { k } \right\|$ is the $j$ -th largest value in $\left\{ \left\| \tilde { U } _ { i } ^ { k } \right\| \right\} _ { i = 1 } ^ { n } , l$ is the largest integer for which $\begin{array} { r } { 0 < m + l - n \leq \frac { \sum _ { i = 1 } ^ { l } \left. \tilde { U } _ { ( i ) } ^ { k } \right. } { \left. \tilde { U } _ { ( l ) } ^ { k } \right. } } \end{array}$ (note that this inequality at least holds for $l = n - m + 1 ,$ ), and $A ^ { k }$ contains indices $i$ such that $\left\| \tilde { U } _ { i } ^ { k } \right\| \geq \left\| \tilde { U } _ { ( l + 1 ) } ^ { k } \right\|$ . We summarize this procedure in Algorithm 1.
206
+
207
+ # 2.2 Secure Aggregation
208
+
209
+ Note that in the case $l = n$ , the optimal probabilities $p _ { i } ^ { k } = m \frac { \left\| \tilde { U } _ { i } ^ { k } \right\| } { \sum _ { j = 1 } ^ { n } \left\| \tilde { U } _ { j } ^ { k } \right\| }$ can be computed easily: the master aggregates the norm of each update and then sends the sum back to the clients. However, if $l < n$ , in order to compute optimal probabilities, the master would need to identify the norm of every
210
+
211
+ # Algorithm 1 Optimal Client Sampling (OCS).
212
+
213
+ 1: Input: expected batch size $m$
214
+ 2: each client $i$ computes a local update $\mathbf { U } _ { i } ^ { k }$ (in parallel)
215
+ 3: each client $i$ sends the norm of its update $u _ { i } ^ { k } = w _ { i } \left\| \mathbf { U } _ { i } ^ { k } \right\|$ to the master (in parallel)
216
+ 4: master computes optimal probabilities $p _ { i } ^ { k }$ using equation (6)
217
+ 5: master broadcasts $p _ { i } ^ { k }$ to all clients
218
+ 6: each client $i$ sends its update $\begin{array} { r } { \frac { w _ { i } } { p _ { i } ^ { k } } \mathbf { U } _ { i } ^ { k } } \end{array}$ to the master with probability $p _ { i } ^ { k }$ (in parallel)
219
+ 162 update and perform partial sorting, which can be computationally expensive and also slightly violates
220
+ 163 the privacy requirements of clients in $\mathrm { F L }$ .
221
+ 164 Therefore, we develop an algorithm for approximately solving the problem, which only requires to
222
+ 165 perform aggregation at the master node without compromising privacy of any client. The construction
223
+ 166 of this algorithm is similar to [40]. We first set $\begin{array} { r } { \tilde { p } _ { i } ^ { k } = \frac { m \left\| \tilde { U } _ { i } ^ { k } \right\| } { \sum _ { j = 1 } ^ { n } \left\| \tilde { U } _ { j } ^ { k } \right\| } } \end{array}$ and $p _ { i } ^ { k } = \operatorname* { m i n } \{ \tilde { p } _ { i } ^ { k } , 1 \}$ . In an ideal
224
+ 167 situation, this would be sufficient. However, due to the truncation operation, the expected minibatch
225
+ 168 $\begin{array} { r } { b ^ { k } = \sum _ { i = 1 } ^ { n } p _ { i } ^ { k } \leq \sum _ { i = 1 } ^ { n } { \frac { m \left\| g _ { i } ^ { k } \right\| } { \sum _ { j = 1 } ^ { n } \left\| g _ { j } ^ { k } \right\| } } = m } \end{array}$ = m can be strictly less than m if p˜ki > 1 holds true for at
226
+ 169 least one $i$ . Hence, we employ an iterative procedure to fix this gap by rescaling the probabilities
227
+ 170 which are smaller than 1, as summarized in Algorithm 2. This algorithm is much easier to implement
228
+ 171 and computationally more efficient on parallel computing architectures. In addition, it only requires a
229
+ 172 secure aggregation procedure on the master, which is essential in privacy preserving $\mathrm { F L }$ , and thus it is
230
+ 173 compatible with existing FL software and hardware. We realize that Algorithm 2 brings some extra
231
+ 174 communication costs, but this is not an issue as it only requires to communicate $\mathcal { O } ( j _ { \operatorname* { m a x } } )$ extra floats
232
+ 175 for each client. We pick $j _ { \mathrm { m a x } } = \mathcal { O } ( 1 )$ , and thus it is negligible for large models of size $d$ .
233
+ 76 Remark 1. We realize that our algorithm requires two communication rounds per optimization round,
234
+ 77 but the first round is negligible due to the minimal number of communicated bits as argued above.
235
+
236
+ # 178 3 Convergence Guarantees
237
+
238
+ 179 In this section, we provide convergence analysis of DSGD and FedAvg with our optimal client sampling
239
+ 180 technique and compare it with full participation and independent uniform sampling of $m$ clients.
240
+ 181 We use standard assumptions [14] and assume throughout that $f$ has a unique minimizer $x ^ { \star }$ with
241
+ 182 $f ^ { \star } = f ( x ^ { \star } ) > - \infty$ . We further assume that $f$ is $\mu$ -strongly convex and $f _ { i }$ ’s are $L$ -smooth and
242
+ 183 convex. Detailed definitions of convexity and smoothness can be found in the Appendix. Note that
243
+ 184 nothing prevents us from extending the results in this section to convex and non-convex cases with a
244
+ 185 similar standard analysis, since our proposed method only affects the aggregation step as described in
245
+ 186 Section 2, which is independent of the strong convexity assumption.
246
+
247
+ Assumption 1 (Gradient oracle for DSGD). The stochastic gradient estimator 187 $g _ { i } ^ { k } = \nabla f _ { i } ( x ^ { k } ) + \xi _ { i } ^ { k }$ of the local gradient 188 $\nabla f _ { i } ( x ^ { k } )$ , for each round $k$ and all $i = 1 , \ldots , n$ , satisfies
248
+
249
+ $$
250
+ \mathrm { E } \left[ \xi _ { i } ^ { k } \right] = 0
251
+ $$
252
+
253
+ 189 and
254
+
255
+ $$
256
+ \begin{array} { r } { \mathrm { E } \left[ \left. \xi _ { i } ^ { k } \right. ^ { 2 } | x _ { i } ^ { k } \right] \leq M \left. \nabla f _ { i } ( x ^ { k } ) \right. ^ { 2 } + \sigma ^ { 2 } , \mathrm { ~ f o r ~ s o m e ~ } M \geq 0 . } \end{array}
257
+ $$
258
+
259
+ This further implies that 190 $\begin{array} { r } { \mathrm { E } \left[ \frac { 1 } { n } \sum _ { i = 1 } ^ { n } g _ { i } ^ { k } \mid x ^ { k } \right] = \nabla f ( x ^ { k } ) . } \end{array}$
260
+
261
+ Assumption 2 (Gradient oracle for FedAvg). The stochastic gradient estimator 191 $g _ { i } ( y _ { i , r } ^ { k } ) =$ 192 $\nabla f _ { i } ( y _ { i , r } ^ { k } ) + \xi _ { i , r } ^ { k }$ of the local gradient $\nabla f _ { i } ( y _ { i , r } ^ { k } )$ , for each round $k$ , each local step $r = 0 , \ldots , R$ and 193 all $i = 1 , \ldots , n$ , satisfies
262
+
263
+ $$
264
+ \mathrm { E } \left[ \xi _ { i , r } ^ { k } \right] = 0
265
+ $$
266
+
267
+ 194 and
268
+
269
+ $$
270
+ \begin{array} { r } { \mathrm { E } \left[ \left. \xi _ { i , r } ^ { k } \right. ^ { 2 } | y _ { i , r } ^ { k } \right] \leq M \left. \nabla f _ { i } ( y _ { i , r } ^ { k } ) \right. ^ { 2 } + \sigma ^ { 2 } , \mathrm { ~ f o r ~ s o m e ~ } M \geq 0 , } \end{array}
271
+ $$
272
+
273
+ where 195 $y _ { i , 0 } ^ { k } = x ^ { k }$ and $y _ { i , r } ^ { k } = y _ { i , r - 1 } ^ { k } - \eta _ { l } g _ { i } ( y _ { i , r } ^ { k } ) , r = 1 , \cdot \cdot \cdot , R .$
274
+
275
+ # Algorithm 2 Approximate Optimal Client Sampling (AOCS).
276
+
277
+ 1: Input: expected batch size $m$ , maximum number of iteration $j _ { \mathrm { m a x } }$
278
+ 2: each client $i$ computes an update $\mathbf { U } _ { i } ^ { k }$ (in parallel)
279
+ 3: each client $i$ sends the norm of its update $u _ { i } ^ { k } = w _ { i } \left\| \mathbf { U } _ { i } ^ { k } \right\|$ to the master (in parallel)
280
+ 4: master aggregates $\begin{array} { r } { u ^ { k } = \sum _ { i = 1 } ^ { n } u _ { i } ^ { k } } \end{array}$
281
+ 5: master broadcasts $u ^ { k }$ to all clients
282
+ 6: each client $i$ computes $\begin{array} { r } { p _ { i } ^ { k } = \operatorname* { m i n } \{ \frac { m u _ { i } ^ { k } } { u ^ { k } } , 1 \} } \end{array}$ (in parallel)
283
+ 7: for $j = 1 , \cdots , j _ { m a x } \ : \epsilon$ do
284
+ 8: each client $i$ sends $t _ { i } ^ { k } = ( 1 , p _ { i } ^ { k } )$ to the master if $p _ { i } ^ { k } < 1$ ; else sends $t _ { i } ^ { k } = ( 0 , 0 )$ (in parallel)
285
+ 9: master aggregates $\begin{array} { r } { ( I ^ { k } , P ^ { k } ) = \sum _ { i = 1 } ^ { n } t _ { i } ^ { k } } \end{array}$
286
+ 10: master computes Ck = (m−n+Ik)
287
+ 11: master broadcasts $C ^ { k }$ to all clients
288
+ 12: each client $i$ recalibrates $p _ { i } ^ { k } = \operatorname* { m i n } \{ C ^ { k } p _ { i } ^ { k } , 1 \}$ if $p _ { i } ^ { k } < 1$ (in parallel)
289
+ 13: if $C ^ { k } \leq 1$ then
290
+ 14: break
291
+ 15: end if
292
+ 16: end for
293
+ 17: each clients $i$ sends its update $\begin{array} { r } { \frac { w _ { i } } { p _ { i } ^ { k } } \mathbf { U } _ { i } ^ { k } } \end{array}$ to master with probability $p _ { i } ^ { k }$ (in parallel)
294
+
295
+ 196 We also define two quantities, which appear in our convergence guarantees:
296
+
297
+ $$
298
+ R _ { i } : = f _ { i } ( x ^ { \star } ) - f _ { i } ^ { \star } , \quad r ^ { k } : = x ^ { k } - x ^ { \star } ,
299
+ $$
300
+
301
+ where 97 $f _ { i } ^ { \star }$ is the functional value of $f _ { i }$ at its optimum. $R _ { i }$ represents the mismatch between the local and global minimizer, and 98 $r ^ { k }$ captures the distance of the current point to the minimizer of $f$ .
302
+
303
+ 199 Equipped with these assumptions, we are ready to proceed with our convergence guarantees. We start
304
+ 200 with the definition of the improvement factor
305
+
306
+ $$
307
+ \alpha ^ { k } : = \frac { \mathrm { E } \left[ \left. \sum _ { i \in S ^ { k } } \frac { w _ { i } } { p _ { i } ^ { k } } \mathbf { U } _ { i } ^ { k } - \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { U } _ { i } ^ { k } \right. ^ { 2 } \right] } { \mathrm { E } \left[ \left. \sum _ { i \in U ^ { k } } \frac { w _ { i } } { p _ { i } ^ { U } } \mathbf { U } _ { i } ^ { k } - \sum _ { i = 1 } ^ { n } w _ { i } \mathbf { U } _ { i } ^ { k } \right. ^ { 2 } \right] } ,
308
+ $$
309
+
310
+ 201 where $S ^ { k } \sim \mathbb { S } ^ { k }$ with $p _ { i } ^ { k }$ defined in (6) and $U ^ { k } \sim \mathbf { U }$ is an independent uniform sampling with
311
+ 202 $p _ { i } ^ { U } = m / n$ . By construction, $\alpha ^ { k }$ is less than or equal to one, as $\mathbb { S } ^ { k }$ minimizes the variance term. In
312
+ 203 addition, $\alpha ^ { k }$ can reach zero in the case where there are at most $m$ non-zero updates. If $\alpha ^ { k } = 0$ ,
313
+ 204 our method performs as if all updates were communicated. In the worst-case $\hat { \alpha ^ { k } } = 1$ , our method
314
+ 205 performs as if we picked $m$ updates uniformly at random, and one cannot do better due to the
315
+ 206 structure of the updates $\mathbf { U } _ { i } ^ { k }$ . In the following subsections, we analyze specific methods for solving the
316
+ 207 optimization problem (1) under the aforementioned assumptions. The proofs and detailed description
317
+ 208 are deferred to the Appendix.
318
+ 209 Fairness. Based on our sampling strategy, it might be tempting to assume that the obtained solution
319
+ 210 could exhibit fairness issues. In our convergence analysis, we show that this is not the case, as our
320
+ 211 proposed methods converge to the optimal solution. Hence, as long as the original objective has no
321
+ 212 inherent issue with fairness, our methods do not exhibit any fairness issues. Besides, our algorithm
322
+ 213 can be used in conjunction with other “more fair” objectives, e.g., tilted ERM [19].
323
+
324
+ # 214 3.1 Distributed SGD with Optimal Client Sampling
325
+
326
+ 215 We begin with the convergence analysis for DSGD (see (2)) with optimal client sampling.
327
+
328
+ 1: Input: initial global model $x ^ { 1 }$ , global and local step-sizes $\eta _ { g } ^ { k }$ , $\eta _ { l } ^ { k }$
329
+ 2: for each round $k = 1 , \ldots , K$ do
330
+ 3: master broadcasts $x ^ { k }$ to all clients $i \in [ n ]$
331
+ 4: for each client $i \in [ n ]$ (in parallel) do
332
+ 5: initialize local model $y _ { i , 0 } ^ { k } \gets x ^ { k }$
333
+ 6: for $r = 1 , \ldots , R$ do
334
+ 7: compute mini-batch gradient $g _ { i } ( y _ { i , r - 1 } ^ { k } )$
335
+ 8: update $y _ { i , r } ^ { k } y _ { i , r - 1 } ^ { k } - \eta _ { l } ^ { k } g _ { i } ( y _ { i , r - 1 } ^ { k } )$
336
+ 9: end for
337
+ 10: compute $\mathbf { U } _ { i } ^ { k } : = \Delta y _ { i } ^ { k } = x ^ { k } - y _ { i , R } ^ { k }$
338
+ 11: compute $p _ { i } ^ { k }$ using Algorithm 1 or 2
339
+ 12: send $\begin{array} { r } { \frac { w _ { i } } { p _ { i } ^ { k } } \Delta y _ { i } ^ { k } } \end{array}$ to master with probability $p _ { i } ^ { k }$
340
+ 13: end for
341
+ 14: master computes $\begin{array} { r } { \Delta x ^ { k } = \sum _ { i \in S ^ { k } } \frac { w _ { i } } { p _ { i } ^ { k } } \Delta y _ { i } ^ { k } } \end{array}$
342
+ 15: master updates global model $x ^ { k + 1 } \gets x ^ { k } - \eta _ { g } ^ { k } \Delta x ^ { k }$
343
+ 16: end for
344
+
345
+ 216 Theorem 2. Let $f _ { i }$ be $L$ -smooth and convex for all $i = 1 , \ldots , n .$ . Let $f$ be $\mu$ -strongly convex. Suppose that Assumption 1 holds. Choose 217 $\begin{array} { r } { \eta ^ { k } \in \left( 0 , \frac { \gamma ^ { k } } { ( 1 + \operatorname* { m a x } _ { i \in [ n ] } \left\{ w _ { i } \right\} M ) L } \right) } \end{array}$ , where
346
+
347
+ $$
348
+ \gamma ^ { k } : = \frac { m } { \alpha ^ { k } ( n - m ) + m } \in \left[ \frac { m } { n } , 1 \right] , \quad k = 0 , \dots , K - 1 .
349
+ $$
350
+
351
+ 218 Define
352
+
353
+ $$
354
+ \beta _ { 1 } : = \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } \big ( 2 L \big ( 1 + M \big ) R _ { i } + \sigma ^ { 2 } \big ) \quad a n d \quad \beta _ { 2 } : = 2 L \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } R _ { i } .
355
+ $$
356
+
357
+ 219 Then, the iterates of DSGD with optimal client sampling (6) satisfy
358
+
359
+ $$
360
+ \mathrm { E } \left[ \left. r ^ { k + 1 } \right. ^ { 2 } \right] \leq ( 1 - \mu \eta ^ { k } ) \mathrm { E } \left[ \left. r ^ { k } \right. ^ { 2 } \right] + ( \eta ^ { k } ) ^ { 2 } \left( \frac { \beta _ { 1 } } { \gamma ^ { k } } - \beta _ { 2 } \right) .
361
+ $$
362
+
363
+ Interpretation. In order to understand the results of Theorem 2, we first look at the best and worst case scenarios. In the best case scenario, we have $\gamma ^ { k } = 1$ for all $k$ . This implies that there is no loss of speed comparing to the method with full participation. It is indeed confirmed by our theory as our obtained recursion recovers the best-known rate of DSGD in the full participation regime [8]. Similarly, in the worst case, we have $\gamma ^ { k } = m / n$ for all $k$ ’s, which corresponds to uniform sampling with sample size $m$ and our recursion recovers the best-know rate for DSGD in this regime. This is expected as (12) implies that each update $\mathbf { U } _ { i } ^ { k }$ is equivalent, thus we cannot hope for better rate than the uniform sampling. In the general scenario, our obtain recursion sits somewhere between full and uniform partial participation, where the actual position is determined by $\gamma ^ { k }$ which capture the distribution of updates (here gradients) on clients. For instance, with a larger number of $\gamma ^ { k }$ ’s tending to 1, we are closer to full participation regime. Similarly, with more $\gamma ^ { \overline { { k } } }$ ’s tending to $m / n$ , we are closer to the rate of partial participation.
364
+
365
+ # 3.2 FedAvg with Optimal Client Sampling
366
+
367
+ One of the most common approaches to optimization for Federated Learning is Federated Averaging (FedAvg) [23], an adaption of local-update to parallel SGD. In FedAvg, each client runs some number of SGD steps locally, and then local updates are averaged to form the global update which is then used for the global model on the master. Pseudo-code that adapts the standard FedAvg algorithm to our framework is given in Algorithm 3.
368
+
369
+ ![](images/e27d5f26345ad5e75d9e9254e35abb4c6066c02825f73fd68dbb858f25a9d89a.jpg)
370
+ Figure 1: Distributions of the three datasets considered.
371
+
372
+ ![](images/310d7a74ba5ebbd7ec3257553ff3a4f7f5d7acb20a032877500e02452883b19a.jpg)
373
+ Figure 2: (Dataset 1) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master.
374
+
375
+ Theorem 3. Assume that 238 $f _ { i }$ is $L$ -smooth and $\mu$ -strongly convex for all $i = 1 , \ldots , n$ and Assumption 2 holds. Let 239 $\eta ^ { k } : = R \eta _ { l } ^ { k } \eta _ { g } ^ { k }$ be the effective step-size and $\begin{array} { r } { \eta _ { g } ^ { k } \ge \sqrt { \frac { \gamma ^ { k } } { \sum _ { i } w _ { i } ^ { 2 } } } } \end{array}$ , where
376
+
377
+ $$
378
+ \gamma ^ { k } : = \frac { m } { \alpha ^ { k } ( n - m ) + m } \in \left[ \frac { m } { n } , 1 \right] .
379
+ $$
380
+
381
+ If 240 $\begin{array} { r } { \eta ^ { k } \leq \frac { 1 } { 8 } \operatorname* { m i n } \bigg \{ \frac { 1 } { L ( 2 + M / R ) } , \frac { \gamma ^ { k } } { ( 1 + \operatorname* { m a x } _ { i \in [ n ] } \{ w _ { i } \} ( 1 + M / R ) ) L } \bigg \} } \end{array}$ , then the iterates of FedAvg $R \geq 2 ,$ ) with 241 optimal client sampling (6) satisfy
382
+
383
+ $$
384
+ \frac { 3 } { 8 } \mathrm { E } \left[ \left( f ( x ^ { k } ) - f ^ { \star } \right) \right] \leq \frac { 1 } { \eta ^ { k } } \left( 1 - \frac { \mu \eta ^ { k } } { 2 } \right) \mathrm { E } \left[ \left. r ^ { k } \right. ^ { 2 } \right] - \frac { 1 } { \eta ^ { k } } \mathrm { E } \left[ \left. r ^ { k + 1 } \right. ^ { 2 } \right] + \eta ^ { k } \beta _ { 1 } ^ { k } + ( \eta ^ { k } ) ^ { 2 } \beta _ { 2 } ,
385
+ $$
386
+
387
+ 242 where
388
+
389
+ $$
390
+ \beta _ { 1 } ^ { k } : = \frac { 2 \sigma ^ { 2 } } { \gamma ^ { k } R } \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } + 4 L \left( \frac M R + 1 - \gamma ^ { k } \right) \sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } R _ { i } \quad a n d \quad \beta _ { 2 } : = 7 2 L ^ { 2 } \left( 1 + \frac M R \right) \sum _ { i = 1 } ^ { n } w _ { i } R _ { i } .
391
+ $$
392
+
393
+ 243 Interpretation. Similar to DSGD, the convergence guarantees of FedAvg with optimal client sam
394
+ 244 pling (Algorithm 3) sits somewhere between the performances of those with full and uniform partial
395
+ 245 participations, where the actual position is again determined by the distribution of updates which
396
+ 246 directly impact $\alpha ^ { k }$ ’s that are linked to $\gamma ^ { k }$ ’s. In the edge cases, i.e. $\gamma ^ { k } = 1$ (best case) or $\gamma ^ { k } = m / n$
397
+ 247 (worst case), we recover the state-of-the-art complexity guarantees provided in [15] in both regimes.
398
+ 248 Note that our results are slightly more general, as [15] assumes $M = 0$ and $w _ { i } = 1 / n$ .
399
+
400
+ # 249 4 Experiments
401
+
402
+ In this section, we empirically evaluate our optimal client sampling method, comparing it with 1) the baseline where participating clients are sampled uniformly from available clients in each round and 2) full participation where all available clients participate. We simulate the cross-device FL setting and train our models using TensorFlow Federated (TFF)1. For all three methods, we report validation accuracy and (local) training loss (vertical axis) as a function of the number of communication rounds and the number of bits communicated from clients to the master (horizontal axis). Each figure displays the mean performance with standard error over 5 independent runs. For a fair comparison, we use the same random seed for the three compared methods in a single run and vary random seeds across different runs.
403
+
404
+ Setup. We conclude an evaluation on FedAvg where we extend the TFF implementation of FedAvg2 to fit our framework. For the model, we use the two-layer Convolutional Neural Network (CNN)
405
+
406
+ ![](images/af13b86b0eb157411da961c79800fc276fd2f4bb9da9b882eac7a5cb9d1657db.jpg)
407
+ Figure 3: (Dataset 2) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master.
408
+
409
+ ![](images/a6780c14c1aa82a0ac6d133ad228e93217bdc3d214847c3d0db3867668cc9129.jpg)
410
+ Figure 4: (Dataset 3) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master.
411
+
412
+ 261 provided in the implementation. The default dataset is Federated EMNIST with only digits, but as this
413
+ 262 is a well-balanced dataset with mostly the same quality data on each client, we modify it by removing
414
+ 263 some clients or some of their training images, in order to better simulate conditions in which our
415
+ 264 proposed methods bring significant theoretical improvements. As a result, we produce 3 unbalanced
416
+ 265 datasets as summarized in Figure 1, on which we train the CNN model. For validation, we use the
417
+ 266 unchanged validation set in the Federated EMNIST dataset, which consists of 40, 832 validation
418
+ 267 images. In each communication round of FedAvg, $n = 3 2$ clients are sampled uniformly from the
419
+ 268 client pool, each of which then performs several SGD steps on its local training images for 1 epoch
420
+ 269 with batch size 20. For partial participation, the expected number of clients allowed to communicate
421
+ 270 their updates back to the master is set to $m = 3$ for all the experiments. We use constant step sizes,
422
+ 271 where we set $\eta _ { g } = 1$ and tune $\eta _ { l }$ from the set of values $\{ 2 ^ { - 1 } , 2 ^ { - 2 } , 2 ^ { - 3 } , 2 ^ { - 4 } , 2 ^ { - 5 } \}$ using a holdout
423
+ 272 set. We implement our sampling procedure using Algorithm 2, as this supports stateless clients and
424
+ 273 secure aggregation. We include extra communication costs in our results, where we set $j _ { \mathrm { m a x } } = 4$
425
+ 274 More details of the hyper-parameters that we use can be found in the Appendix.
426
+ 275 Results and Discussions. As predicted by our theory, the performance of FedAvg with our proposed
427
+ 276 optimal client sampling strategy is in between the performances of that with full and uniform partial
428
+ 277 participation. Figures 2, 3 and 4 (red curves: optimal sampling; blue curves: uniform sampling; green
429
+ 278 curves: full participation) show that, for all three datasets, the optimal sampling strategy performs
430
+ 279 slightly worse than but is still competitive with the full participation strategy in terms of the number
431
+ 280 of communication rounds – it almost reached the performance of full participation while only less
432
+ 281 than $1 0 \%$ of the available clients communicate their updates back to the master. Note that the uniform
433
+ 282 sampling strategy performs significantly worse, which indicates that a careful choice of sampling
434
+ 283 probabilities can go a long way towards closing the gap between the performance of naive uniform
435
+ 284 sampling and full participation.
436
+ 285 More importantly, and this was the main motivation of our work, our optimal sampling strategy is
437
+ 286 significantly better than both the uniform sampling and full participation strategies when we compare
438
+ 287 validation accuracy as a function of the number of bits communicated from clients to the master.
439
+ 288 For instance, in case of Dataset 1 (Figure 2), while our optimal sampling approach reached around
440
+ 289 $8 5 \%$ validation accuracy after $2 ^ { 6 } \times 1 0 ^ { 8 }$ communicated bits, neither the full nor the uniform sampling
441
+ 290 strategies are able to exceed $40 \%$ validation accuracy within the same communication budget. Indeed,
442
+ 291 to reach the same $85 \%$ validation accuracy, full participation approach needs to communicate more
443
+ 292 than $2 ^ { 9 } \times 1 0 ^ { 8 }$ bits, i.e., $8 \times$ more, and uniform sampling approach needs to communicate about the
444
+ 293 same number of bits as full participation or even more. The results for Datasets 2 and 3 are of a
445
+ 294 similar qualitative nature, showing that these conclusions are robust across the datasets considered.
446
+ 295 In the Appendix, we include additional figures which show the current best validation accuracy as a
447
+ 296 function of the number of communication rounds and the number of bits communicated from clients
448
+ 297 to the master.
449
+
450
+ 98 References [1] Dan Alistarh, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Randomized quantization for communication-optimal stochastic gradient descent. arXiv preprint arXiv:1610.02132, 2016. [2] Zeyuan Allen-Zhu, Zheng Qu, Peter Richtárik, and Yang Yuan. Even faster accelerated coordinate descent using non-uniform sampling. In International Conference on Machine Learning, pages 1110–1119, 2016. [3] Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-SGD: Distributed SGD with quantization, sparsification and local computations. In Advances in Neural Information Processing Systems, pages 14668–14679, 2019. [4] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, pages 41–48, 2009. [5] Antoine Bordes, Seyda Ertekin, Jason Weston, and Léon Bottou. Fast kernel classifiers with online and active learning. Journal of Machine Learning Research, 6(Sep):1579–1619, 2005. [6] Olivier Fercoq and Peter Richtárik. Accelerated, parallel, and proximal coordinate descent. SIAM Journal on Optimization, 25(4):1997–2023, 2015. [7] WM Goodall. Television by pulse code modulation. Bell System Technical Journal, 30(1):33–49, 1951. [8] Robert Mansel Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richtárik. SGD: General analysis and improved rates. Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, 2019. [9] Filip Hanzely and Peter Richtárik. Federated learning of a mixture of global and local models. arXiv:2002.05516, 2020. [10] Samuel Horváth, Chen-Yu Ho, L’udovit Horváth, Atal Narayan Sahu, Marco Canini, and Peter Richtárik. Natural compression for distributed deep learning. arXiv preprint arXiv:1905.10988, 2019. [11] Samuel Horváth and Peter Richtárik. Nonconvex variance reduced optimization with arbitrary sampling. Proceedings of the 36th International Conference on Machine Learning, 2019. [12] Samuel Horváth and Peter Richtárik. A better alternative to error feedback for communicationefficient distributed learning. arXiv preprint arXiv:2006.11077, 2020. [13] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. [14] Hamed Karimi, Julie Nutini, and Mark Schmidt. Linear convergence of gradient and proximalgradient methods under the polyak-łojasiewicz condition. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 795–811. Springer, 2016. [15] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J Reddi, Sebastian U Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for on-device federated learning. arXiv preprint arXiv:1910.06378, 2019. [16] Angelos Katharopoulos and François Fleuret. Not all samples are created equal: Deep learning with importance sampling. arXiv preprint arXiv:1803.00942, 2018. [17] Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local SGD on identical and heterogeneous data. In The 23rd International Conference on Artificial Intelligence and Statistics (AISTATS 2020), 2020. [18] Jakub Konecný and Peter Richtárik. Randomized distributed mean estimation: Accuracy vs. ˇ communication. Frontiers in Applied Mathematics and Statistics, 4:62, 2018.
451
+
452
+ [19] Tian Li, Ahmad Beirami, Maziar Sanjabi, and Virginia Smith. Tilted empirical risk minimization. In International Conference on Learning Representations, 2021.
453
+ [20] Qihang Lin, Zhaosong Lu, and Lin Xiao. An accelerated proximal coordinate gradient method. In Advances in Neural Information Processing Systems, pages 3059–3067, 2014.
454
+ [21] Tao Lin, Sebastian U Stich, Kumar Kshitij Patel, and Martin Jaggi. Don’t use large mini-batches, use local SGD. arXiv preprint arXiv:1808.07217, 2018.
455
+ [22] Ilya Loshchilov and Frank Hutter. Online batch selection for faster training of neural networks. arXiv preprint arXiv:1511.06343, 2015.
456
+ [23] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pages 1273–1282, 2017.
457
+ [24] Konstantin Mishchenko, Filip Hanzely, and Peter Richtárik. $9 9 \%$ of parallel optimization is inevitably a waste of time. arXiv preprint arXiv:1901.09437, 2019.
458
+ [25] Deanna Needell, Rachel Ward, and Nati Srebro. Stochastic gradient descent, weighted sampling, and the randomized kaczmarz algorithm. In Advances in neural information processing systems, pages 1017–1025, 2014.
459
+ [26] Yu Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012.
460
+ [27] Zheng Qu, Peter Richtárik, and Tong Zhang. Quartz: Randomized dual coordinate ascent with arbitrary sampling. In Advances in Neural Information Processing Systems 28, pages 865–873, 2015.
461
+ [28] Ali Ramezani-Kebrya, Fartash Faghri, and Daniel M Roy. NUQSGD: Improved communication efficiency for data-parallel SGD via nonuniform quantization. arXiv preprint arXiv:1908.06077, 2019.
462
+ [29] Peter Richtárik and Martin Takác. Iteration complexity of randomized block-coordinate descent ˇ methods for minimizing a composite function. Mathematical Programming, 144(1-2):1–38, 2014.
463
+ [30] Lawrence Roberts. Picture coding using pseudo-random noise. IRE Transactions on Information Theory, 8(2):145–154, 1962.
464
+ [31] Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
465
+ [32] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815–823, 2015.
466
+ [33] Shai Shalev-Shwartz and Tong Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. In International conference on machine learning, pages 64–72, 2014.
467
+ [34] Edgar Simo-Serra, Eduard Trulls, Luis Ferraz, Iasonas Kokkinos, Pascal Fua, and Francesc Moreno-Noguer. Discriminative learning of deep convolutional feature point descriptors. In Proceedings of the IEEE International Conference on Computer Vision, pages 118–126, 2015.
468
+ [35] Sebastian U Stich. Local SGD converges fast and communicates little. ICLR 2019 - International Conference on Learning Representations, 2019.
469
+ [36] Sebastian U Stich, Jean-Baptiste Cordonnier, and Martin Jaggi. Sparsified SGD with memory. In Advances in Neural Information Processing Systems, pages 4447–4458, 2018.
470
+ [37] Sebastian U Stich and Sai Praneeth Karimireddy. The error-feedback framework: Better rates for SGD with delayed gradients and compressed communication. ICLR 2020 - International Conference on Learning Representations, 2020.
471
+ [38] Sebastian U Stich, Anant Raj, and Martin Jaggi. Safe adaptive importance sampling. In Advances in Neural Information Processing Systems, pages 4381–4391, 2017.
472
+ [39] Thijs Vogels, Sai Praneeth Karimireddy, and Martin Jaggi. PowerSGD: Practical low-rank gradient compression for distributed optimization. In Advances in Neural Information Processing Systems, pages 14236–14245, 2019.
473
+ [40] Jianqiao Wangni, Jialei Wang, Ji Liu, and Tong Zhang. Gradient sparsification for communication-efficient distributed optimization. In Advances in Neural Information Processing Systems, pages 1299–1309, 2018.
474
+ [41] Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. In Advances in Neural Information Processing Systems, pages 1509–1519, 2017.
475
+ [42] Hantian Zhang, Jerry Li, Kaan Kara, Dan Alistarh, Ji Liu, and Ce Zhang. Zipml: Training linear models with end-to-end low precision, and a little bit of deep learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 4035–4043. JMLR. org, 2017.
476
+ [43] Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In international conference on machine learning, pages 1–9, 2015.
477
+
478
+ 1. For all authors...
479
+
480
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
481
+ (b) Did you describe the limitations of your work? [Yes] See Remark 1, where we acknowledge that our algorithm requires two (although the first one is negligible) communication rounds per iteration.
482
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] We discussed potential fairness issues in Section 3.
483
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
484
+
485
+ 2. If you are including theoretical results...
486
+
487
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] See Section 3 and Appendix A.
488
+ (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix C-F for complete proofs. We also provided interpretations of our theorems in the main paper and discussed the relationship between our results and related results in the literature.
489
+
490
+ 3. If you ran experiments...
491
+
492
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See supplemental material.
493
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4 and Appendix B
494
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We ran every experiment 5 times with different random seeds and reported results with error bars.
495
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [N/A] Since we only run simulations, this is not applicable.
496
+
497
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
498
+
499
+ (a) If your work uses existing assets, did you cite the creators? [Yes] See Section 4
500
+ (b) Did you mention the license of the assets? [Yes] All the data and assets we used in this manuscript are open-source.
501
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We included an anonymized URL in the supplemental material for the datasets used.
502
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
503
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
504
+
505
+ 5. If you used crowdsourcing or conducted research with human subjects...
506
+
507
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
508
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
509
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/l0BP1lHpPW/l0BP1lHpPW_content_list.json ADDED
@@ -0,0 +1,1303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Optimal Client Sampling for Federated Learning ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 199,
8
+ 122,
9
+ 797,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 200,
20
+ 580,
21
+ 256
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 292,
32
+ 535,
33
+ 309
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "1 It is well understood that client-master communication can be a primary bottleneck \n2 in Federated Learning. In this work, we address this issue with a novel client sub \n3 sampling scheme, where we restrict the number of clients allowed to communicate \n4 their updates back to the master node. In each communication round, all partici \n5 pated clients compute their updates, but only the ones with “important” updates \n6 communicate back to the master. We show that importance can be measured using \n7 only the norm of the update and give a formula for optimal client participation. \n8 This formula minimizes the distance between the full update, where all clients \n9 participate, and our limited update, where the number of participating clients is \n10 restricted. In addition, we provide a simple algorithm that approximates the optimal \n11 formula for client participation which only requires secure aggregation and thus \n12 does not compromise client privacy. We show both theoretically and empirically \n13 that our approach leads to superior performance for Distributed SGD (DSGD) and \n14 Federated Averaging (FedAvg) compared to the baseline where participating clients \n15 are sampled uniformly. Our approach is orthogonal to and compatible with ex \n16 isting methods for reducing communication overhead, such as local methods and \n17 communication compression methods. ",
40
+ "bbox": [
41
+ 148,
42
+ 323,
43
+ 767,
44
+ 558
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "18 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 148,
54
+ 580,
55
+ 312,
56
+ 598
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "19 We consider the standard cross-device Federated Learning (FL) setting [13], where the objective is of \n20 the form ",
63
+ "bbox": [
64
+ 147,
65
+ 611,
66
+ 823,
67
+ 638
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "equation",
73
+ "img_path": "images/1cd74516e4f01de4ada36b12678714fe0fd8ffb8a1cf4b39f4f4437683f0d9f5.jpg",
74
+ "text": "$$\n\\operatorname* { m i n } _ { x \\in \\mathbb { R } ^ { d } } \\left[ f ( x ) : = \\sum _ { i = 1 } ^ { n } w _ { i } f _ { i } ( x ) \\right] ,\n$$",
75
+ "text_format": "latex",
76
+ "bbox": [
77
+ 395,
78
+ 640,
79
+ 599,
80
+ 684
81
+ ],
82
+ "page_idx": 0
83
+ },
84
+ {
85
+ "type": "text",
86
+ "text": "21 where $\\boldsymbol { x } \\in \\mathbb { R } ^ { d }$ represents the parameters of a statistical model we aim to find, $n$ is the total number of \n22 23 clients, owned $f _ { i } \\colon { \\mathbb { R } ^ { d } } \\to { \\mathbb { R } }$ $i$ ia $f _ { i } = \\mathrm { E } _ { \\xi \\sim D _ { i } } \\left[ f ( x , \\xi ) \\right]$ entiab, and $w _ { i } \\geq 0$ loss function which dependsare client weights such that $\\textstyle \\sum _ { i = 1 } ^ { n } w _ { i } = 1$ $\\mathcal { D } _ { i }$ \n24 We assume the classical FL setup in which a central master (server) orchestrates the training by \n25 securely aggregating updates from clients without seeing the raw data. ",
87
+ "bbox": [
88
+ 147,
89
+ 695,
90
+ 826,
91
+ 766
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "26 1.1 Communication as the Bottleneck ",
98
+ "text_level": 1,
99
+ "bbox": [
100
+ 151,
101
+ 780,
102
+ 447,
103
+ 795
104
+ ],
105
+ "page_idx": 0
106
+ },
107
+ {
108
+ "type": "text",
109
+ "text": "27 It is well understood that cost of communication can be the primary bottleneck in Federated Learning. \n28 Indeed, wireless links and other end-user internet connections typically operate at lower rates than \n29 intra-datacenter or inter-datacenter links and can be potentially expensive and unreliable. Moreover, \n30 the capacity of the aggregating master and other FL system considerations impose direct or indirect \n31 constrains on the number of clients that are allowed to participate in each communication round. \n32 These considerations have led to significant interest in reducing the communication bandwidth of FL \n33 systems. ",
110
+ "bbox": [
111
+ 147,
112
+ 805,
113
+ 825,
114
+ 904
115
+ ],
116
+ "page_idx": 0
117
+ },
118
+ {
119
+ "type": "text",
120
+ "text": "Submitted to 35th Conference on Neural Information Processing Systems (NeurIPS 2021). Do not distribute. ",
121
+ "bbox": [
122
+ 168,
123
+ 922,
124
+ 815,
125
+ 936
126
+ ],
127
+ "page_idx": 0
128
+ },
129
+ {
130
+ "type": "text",
131
+ "text": "35 One of the most popular strategies is to reduce the frequency of communication and put more \n36 emphasis on computation. This is usually achieved by asking the devices to perform multiple local \n37 steps before communicating their updates. A prototype method in this category is the Federated \n38 Averaging (FedAvg) algorithm [23]. The original work was a heuristic, offering no theoretical \n39 guarantees, which motivated the community to try to understand the method and various existing and \n40 new variants theoretically [35, 21, 15, 37, 17, 9]. ",
132
+ "bbox": [
133
+ 147,
134
+ 122,
135
+ 825,
136
+ 207
137
+ ],
138
+ "page_idx": 1
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "41 1.1.2 Communication Compression ",
143
+ "text_level": 1,
144
+ "bbox": [
145
+ 148,
146
+ 238,
147
+ 431,
148
+ 253
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "42 Another popular approach is to reduce the size of the object (typically gradients) communicated from \n43 clients to the master. These techniques are usually referred to as gradient/communication compression. \n44 In this approach, instead of transmitting the full-dimensional gradient/update vector $g \\in \\mathbf { \\mathbb { R } } ^ { d }$ , one \n45 transmits a compressed vector $\\mathcal C ( g )$ , where $\\mathcal { C } : \\mathbb { R } ^ { d } \\mathbb { R } ^ { d }$ is a (possibly random) operator chosen \n46 such that $\\mathcal { C } ( g )$ can be represented using fewer bits, for instance by using limited bit representation \n47 (quantization) or by enforcing sparsity (sparsification). A particularly popular class of quantization \n48 operators is based on random dithering [7, 30]; see [1, 41, 42, 28]. A new variant of random dithering \n49 developed in [10] offers an exponential improvement on standard dithering. Sparse vectors can be \n50 obtained by random sparsification techniques that randomly mask the input vectors and preserve a \n51 constant number of coordinates only [40, 18, 36, 24, 39]. There is also a line of work [10, 3] where a \n52 combination of sparsification and quantization was proposed to obtain a more aggressive combined \n53 effect. ",
155
+ "bbox": [
156
+ 145,
157
+ 270,
158
+ 825,
159
+ 436
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "54 1.2 Related Work ",
166
+ "text_level": 1,
167
+ "bbox": [
168
+ 148,
169
+ 470,
170
+ 310,
171
+ 486
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "55 Importance sampling methods for optimization have been studied extensively in the last few years in \n56 several contexts, including convex optimization and deep learning. LASVM developed in [5], which is \n57 an online algorithm that uses importance sampling to train kernelized support vector machines. The \n58 first importance sampling for randomized coordinate descent methods was proposed in a seminal \n59 paper in [26]. It was showed in [29] that the proposed sampling is optimal. Later, several extensions \n60 and improvements followed [33, 20, 6, 27, 2, 38]. Another branch of work studies sample complexity. \n61 In [25, 43], the authors make a connection with the variance of the gradient estimates of SGD and \n62 show that the optimal sampling distribution is proportional to the per-sample gradient norm. In terms \n63 of computation, obtaining this distribution is as hard as the computation of the full gradient, thus \n64 it is not practical. For simpler problems, one can sample proportionally to the norms of the inputs, \n65 which can be linked to the Lipschitz constants of the per-sample loss function for linear and logistic \n66 regression. For instance, it was shown in [11] that static optimal sampling can be constructed even \n67 for mini-batches and the probability is proportional to these Lipschitz constants under the assumption \n68 that these constants of the per-sample loss function are known. Unfortunately, importance measures \n69 such as smoothness of the gradient are often hard to compute/estimate for more complicated models \n70 such as those arising in deep learning, where most of the importance sampling schemes are based \n71 on heuristics. A manually designed sampling scheme was proposed in [4]. It was inspired by the \n72 perceived way that human children learn; in practice, they provide the network with examples of \n73 increasing difficulty in an arbitrary manner. In a diametrically opposite approach, it is common for \n74 deep embedding learning to sample hard examples because of the plethora of easy non-informative \n75 ones [32, 34]. Other approaches use a history of losses for previously seen samples to create the \n76 sampling distribution and sample either proportionally to the loss or based on the loss ranking [31, 22]. \n77 In [16], the authors propose to sample based on the gradient norm of a small uniformly sampled \n78 subset of samples. \n79 In our work, we avoid all the aforementioned problems as our motivation is not to reduce computation, \n80 which is not the main bottleneck of Federated Learning, but to use importance sampling to decrease \n81 the number of bits communicated. This, as we show in Section 2, allows us to construct optimal \n82 adaptive sampling; that is, we do not need to rely on any heuristics, historical losses, or partial \n83 information. \n85 In this work, we propose a new approach to addressing the communication bandwidth issues appearing \n86 in FL. Our approach is based on the observation that in the situation where partial participation \n87 is desired and a budget on the number of participating clients is applied, careful selection of the \n88 participating clients can lead to better communication complexity, and hence faster training. In other \n89 words, we claim that in any given communication round, some clients will have “more informative” \n90 updates than others and that the training procedure will benefit from capitalizing on this fact by \n91 ignoring some of the worthless updates. \n92 In particular, we propose a principled optimal client sampling scheme capable of identifying the most \n93 informative clients in any given communication round. Our scheme works by minimizing the variance \n94 of the stochastic gradient produced by the partial participation procedure, which then translates to \n95 a probable reduction in the number of communication rounds. To the best of our knowledge, this \n96 approach was not considered before. Moreover, our proposal is orthogonal to and hence combinable \n97 with existing approaches to communication reduction such as communication compression or local \n98 updates (Section 3.2). ",
178
+ "bbox": [
179
+ 145,
180
+ 503,
181
+ 825,
182
+ 835
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "",
189
+ "bbox": [
190
+ 147,
191
+ 842,
192
+ 823,
193
+ 911
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "",
200
+ "bbox": [
201
+ 145,
202
+ 117,
203
+ 825,
204
+ 213
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "",
211
+ "bbox": [
212
+ 145,
213
+ 219,
214
+ 825,
215
+ 318
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "99 Our contributions can be summarized as follows: ",
222
+ "bbox": [
223
+ 147,
224
+ 323,
225
+ 496,
226
+ 338
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "• we propose a novel adaptive partial participation strategy for reducing communication in FL that works by a careful selection of the clients that are allowed to communicate their updates to the master node in any given communication round; \nour adaptive client sampling procedure is optimal in the sense that it minimizes the variance of the master update; \n• we propose an approximation to our optimal adaptive sampling strategy which only requires aggregation, thus allows for secure aggregation and stateless clients; \n• we show theoretically that our approach allows for larger learning rates for Distributed SGD and FedAvg algorithms than the baseline which performs uniform client sampling, and as a result leads to better communication complexity. \n• we show empirically that the performance of our approach is superior to uniform sampling and is close to full participation. ",
233
+ "bbox": [
234
+ 217,
235
+ 348,
236
+ 825,
237
+ 534
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "112 2 Smart Client Sampling for Reducing Communication ",
244
+ "text_level": 1,
245
+ "bbox": [
246
+ 147,
247
+ 551,
248
+ 650,
249
+ 569
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "113 We now describe our client sampling strategy for reducing the communication bottleneck in Federated \n114 Learning. Each client $i$ participating in round $k$ computes an update vector $\\mathbf { U } _ { i } ^ { k } \\in \\mathbb { R } ^ { d }$ . For simplicity \n115 and ease of exposition, we assume that all clients $i \\in [ n ] : = \\{ 1 , 2 , \\dots , n \\}$ are available in each round. \n116 However, we would like to point out that this is not a limiting factor, and all presented theory can be \n117 easily extended to the case of partial participation with an arbitrary distribution. In our framework, \n118 only a subset of clients communicates their updates to the master node in each communication round \n119 in order to reduce the number of transmitted bits. \n120 In order to provide analysis in this framework, we consider a general partial participation frame \n121 work [12], where we assume that the subset of participating clients is determined by an arbitrary \n122 random set-valued mapping $\\mathbb { S }$ (a “sampling”) with values in $\\mathbf { \\bar { 2 } } ^ { [ n ] }$ . A sampling $\\mathbb { S }$ is uniquely defined \n123 by assigning probabilities to all $2 ^ { n }$ subsets of $[ n ]$ . With each sampling $\\mathbb { S }$ we associate a probability \n124 matrix $\\mathbf { \\bar { P } } \\in \\mathbf { \\bar { \\mathbb { R } } } ^ { n \\times n }$ defined by $\\mathbf { P } _ { i j } : = \\mathrm { P r o b } ( \\{ i , j \\} \\subseteq \\mathbb { S } )$ . The probability vector associated with $\\mathbb { S }$ is \n125 the vector composed of the diagonal entries of $\\mathbf { P }$ : $p = ( p _ { 1 } , \\ldots , p _ { n } ) \\in \\mathbb { R } ^ { n }$ , where $p _ { i } : = \\mathrm { P r o b } ( i \\in \\mathbb { S } )$ . \n126 We say that $\\mathbb { S }$ is proper if $p _ { i } > 0$ for all $i$ . It is easy to show that $\\begin{array} { r } { b : = \\operatorname { E } \\left[ | \\mathbb { S } | \\right] = \\operatorname { T r a c e } \\left( \\mathbf { P } \\right) = \\sum _ { i = 1 } ^ { n } p _ { i } } \\end{array}$ \n127 and hence $b$ can be seen as the expected number of clients participating in each communication round. \n128 Given parameters $p _ { 1 } , \\ldots , p _ { n } \\in [ 0 , 1 ] .$ , consider a random set $\\mathbb { S } \\subseteq [ n ]$ generated as follows: for each \n129 $i \\in [ n ]$ , we include $i$ in $\\mathbb { S }$ with probability $p _ { i }$ . This is called independent sampling, since the event \n130 $i \\in \\mathbb S$ is independent of $j \\in \\mathbb S$ for any $i \\neq j$ . \n131 While our client sampling strategy can be adapted to essentially any underlying learning method, we \n132 give details here for DSGD: ",
256
+ "bbox": [
257
+ 142,
258
+ 583,
259
+ 825,
260
+ 680
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "",
267
+ "bbox": [
268
+ 140,
269
+ 686,
270
+ 826,
271
+ 840
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "",
278
+ "bbox": [
279
+ 140,
280
+ 847,
281
+ 828,
282
+ 875
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "equation",
288
+ "img_path": "images/70807be35de6701949261a13e23fd138aeeb0e62449877bcdf61a381e87f03f3.jpg",
289
+ "text": "$$\nx ^ { k + 1 } = x ^ { k } - \\eta ^ { k } \\mathbf { G } ^ { k } , \\quad \\mathbf { G } ^ { k } : = \\sum _ { i \\in S ^ { k } } \\frac { w _ { i } } { p _ { i } ^ { k } } \\mathbf { U } _ { i } ^ { k } ,\n$$",
290
+ "text_format": "latex",
291
+ "bbox": [
292
+ 354,
293
+ 878,
294
+ 642,
295
+ 915
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "where $S ^ { k } \\sim \\mathbb { S } ^ { k }$ and $\\mathbf { U } _ { i } ^ { k } = g _ { i } ^ { k }$ is an unbiased estimator of $\\nabla f _ { i } ( x ^ { k } )$ . The scaling factor $\\frac { 1 } { p _ { i } ^ { k } }$ is necessary in order to obtain an unbiased estimator of the true update, i.e., $\\begin{array} { r } { \\mathrm { E } _ { S ^ { k } } \\left[ { \\bf G } ^ { k } \\right] = \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { \\bar { U } } _ { i } ^ { k } } \\end{array}$ . ",
302
+ "bbox": [
303
+ 165,
304
+ 89,
305
+ 825,
306
+ 127
307
+ ],
308
+ "page_idx": 3
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "2.1 Optimal Client Sampling ",
313
+ "text_level": 1,
314
+ "bbox": [
315
+ 163,
316
+ 141,
317
+ 388,
318
+ 157
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "We start with a simple observation that the variance of our gradient estimator 136 $\\mathbf { G } ^ { k }$ can be decomposed 137 as ",
325
+ "bbox": [
326
+ 147,
327
+ 166,
328
+ 826,
329
+ 196
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "equation",
335
+ "img_path": "images/8f7075943ea9018d8e282ea8e231f8eeede40a8a3f463da1ab3fc9cd576cd480.jpg",
336
+ "text": "$$\n\\mathrm { E } \\left[ \\left. \\mathbf { G } ^ { k } - \\nabla f ( x ^ { k } ) \\right. ^ { 2 } \\right] = \\mathrm { E } \\left[ \\left. \\mathbf { G } ^ { k } - \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { U } _ { i } ^ { k } \\right. ^ { 2 } \\right] + \\mathrm { E } \\left[ \\left. \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { U } _ { i } ^ { k } - \\nabla f ( x ^ { k } ) \\right. ^ { 2 } \\right] .\n$$",
337
+ "text_format": "latex",
338
+ "bbox": [
339
+ 210,
340
+ 210,
341
+ 785,
342
+ 261
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "138 Note that the second term on the right-hand side is independent of the sampling procedure and \n139 the first term is zero if every client sends its update (i.e., if $p _ { i } ^ { k } = 1$ for all $i$ ). In order to provide \n140 meaningful results, we restrict the expected number of clients to communicate in each round by \n141 bounding $\\begin{array} { r } { b ^ { k } : = \\sum _ { i = 1 } ^ { n } p _ { i } ^ { k } } \\end{array}$ by some positive integer $m \\leq n$ . This raises the following question: What \n142 is the sampling procedure that minimizes (3) for any given $m$ ? We answer this question using the \n143 following technical lemma: ",
349
+ "bbox": [
350
+ 140,
351
+ 268,
352
+ 826,
353
+ 353
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "Lemma 1. Let 144 $\\zeta _ { 1 } , \\zeta _ { 2 } , \\ldots , \\zeta _ { n }$ be vectors in $\\mathbb { R } ^ { d }$ and $w _ { 1 } , w _ { 2 } , \\ldots , w _ { n }$ be non-negative real numbers such that 145 $\\textstyle \\sum _ { i = 1 } ^ { n } w _ { i } = 1$ . Define $\\textstyle { \\tilde { \\zeta } } : = \\sum _ { i = 1 } ^ { n } w _ { i } \\zeta _ { i }$ . Let $S$ be a proper sampling. If $v \\in \\mathbb { R } ^ { n }$ is such that ",
360
+ "bbox": [
361
+ 151,
362
+ 356,
363
+ 825,
364
+ 390
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/4d03a2e2ad7a2caa5fbbc95afaf2a1842ea81537138b0bce67472cfd85c0acbb.jpg",
371
+ "text": "$$\n\\mathbf { P } - p p ^ { \\top } \\preceq \\mathbf { D i a g } ( p _ { 1 } v _ { 1 } , p _ { 2 } v _ { 2 } , \\ldots , p _ { n } v _ { n } ) ,\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 357,
375
+ 395,
376
+ 637,
377
+ 414
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "146 then ",
384
+ "bbox": [
385
+ 142,
386
+ 421,
387
+ 205,
388
+ 435
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "equation",
394
+ "img_path": "images/0ae7da908496f922d8b5024d919cb32525d6c8f3ed842d57938a4f18993fd9f7.jpg",
395
+ "text": "$$\n\\operatorname { E } \\left[ \\left\\| \\sum _ { i \\in S } { \\frac { w _ { i } \\zeta _ { i } } { p _ { i } } } - { \\tilde { \\zeta } } \\right\\| ^ { 2 } \\right] \\leq \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } { \\frac { v _ { i } } { p _ { i } } } \\left\\| \\zeta _ { i } \\right\\| ^ { 2 } ,\n$$",
396
+ "text_format": "latex",
397
+ "bbox": [
398
+ 356,
399
+ 430,
400
+ 640,
401
+ 479
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "where the expectation is taken over 147 $S$ . Whenever (3) holds, it must be the case that $v _ { i } \\geq 1 - p _ { i }$ ",
408
+ "bbox": [
409
+ 145,
410
+ 482,
411
+ 797,
412
+ 497
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "148 It turns out that given probabilities $\\{ p _ { i } \\}$ , among all samplings $S$ satisfying $p _ { i } = { \\mathrm { P r o b } } ( i \\in S )$ , the \n149 independent sampling minimizes the left-hand side of (4). This is due to two nice properties: a) any \n150 independent sampling admits optimal choice of $v$ , i.e., $v _ { i } = 1 - p _ { i }$ for all $i$ , and b) for independent \n151 sampling (4) holds as equality. In the context of our method, these properties can be written as ",
419
+ "bbox": [
420
+ 142,
421
+ 506,
422
+ 825,
423
+ 564
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "equation",
429
+ "img_path": "images/5805c8fe9978eeee55e65d009e58f8a02be8592a5dc0889b33687f07b3e3e3ee.jpg",
430
+ "text": "$$\n\\operatorname { E } \\left[ \\left\\| \\mathbf { G } ^ { k } - \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { U } _ { i } ^ { k } \\right\\| ^ { 2 } \\right] = \\operatorname { E } \\left[ \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } { \\frac { 1 - p _ { i } ^ { k } } { p _ { i } ^ { k } } } \\left\\| \\mathbf { U } _ { i } ^ { k } \\right\\| ^ { 2 } \\right] .\n$$",
431
+ "text_format": "latex",
432
+ "bbox": [
433
+ 308,
434
+ 569,
435
+ 689,
436
+ 619
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "152 It now only remains to find the parameters $\\{ p _ { i } ^ { k } \\}$ defining the optimal independent sampling, i.e., one \n153 that minimizes (5) subject to the constraints $0 \\leq p _ { i } ^ { k } \\leq 1$ and $\\begin{array} { r } { \\bar { b } ^ { k } : = \\sum _ { i = 1 } ^ { n } p _ { i } ^ { k } \\le m } \\end{array}$ . It turns out that \n154 this problem has the following closed-form solution: ",
443
+ "bbox": [
444
+ 140,
445
+ 626,
446
+ 826,
447
+ 671
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "equation",
453
+ "img_path": "images/2212a9895ba094f14b5114a84a0feca4d1c9c6c6348f08619b51309230cd8de0.jpg",
454
+ "text": "$$\np _ { i } ^ { k } = \\left\\{ \\begin{array} { l l } { ( m + l - n ) \\frac { \\left\\| \\tilde { U } _ { i } ^ { k } \\right\\| } { \\sum _ { j = 1 } ^ { l } \\left\\| \\tilde { U } _ { ( j ) } ^ { k } \\right\\| } , } & { \\quad \\mathrm { i f } i \\notin A ^ { k } , } \\\\ { 1 , } & { \\quad \\mathrm { i f } i \\in A ^ { k } , } \\end{array} \\right.\n$$",
455
+ "text_format": "latex",
456
+ "bbox": [
457
+ 339,
458
+ 676,
459
+ 656,
460
+ 728
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "where $\\tilde { U } _ { i } ^ { k } : = w _ { i } \\mathbf { U } _ { i } ^ { k }$ , and $\\left\\| \\tilde { U } _ { ( j ) } ^ { k } \\right\\|$ is the $j$ -th largest value in $\\left\\{ \\left\\| \\tilde { U } _ { i } ^ { k } \\right\\| \\right\\} _ { i = 1 } ^ { n } , l$ is the largest integer for which $\\begin{array} { r } { 0 < m + l - n \\leq \\frac { \\sum _ { i = 1 } ^ { l } \\left. \\tilde { U } _ { ( i ) } ^ { k } \\right. } { \\left. \\tilde { U } _ { ( l ) } ^ { k } \\right. } } \\end{array}$ (note that this inequality at least holds for $l = n - m + 1 ,$ ), and $A ^ { k }$ contains indices $i$ such that $\\left\\| \\tilde { U } _ { i } ^ { k } \\right\\| \\geq \\left\\| \\tilde { U } _ { ( l + 1 ) } ^ { k } \\right\\|$ . We summarize this procedure in Algorithm 1. ",
467
+ "bbox": [
468
+ 163,
469
+ 734,
470
+ 825,
471
+ 818
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "2.2 Secure Aggregation ",
478
+ "text_level": 1,
479
+ "bbox": [
480
+ 171,
481
+ 830,
482
+ 349,
483
+ 847
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "Note that in the case $l = n$ , the optimal probabilities $p _ { i } ^ { k } = m \\frac { \\left\\| \\tilde { U } _ { i } ^ { k } \\right\\| } { \\sum _ { j = 1 } ^ { n } \\left\\| \\tilde { U } _ { j } ^ { k } \\right\\| }$ can be computed easily: the master aggregates the norm of each update and then sends the sum back to the clients. However, if $l < n$ , in order to compute optimal probabilities, the master would need to identify the norm of every ",
490
+ "bbox": [
491
+ 161,
492
+ 856,
493
+ 825,
494
+ 912
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "Algorithm 1 Optimal Client Sampling (OCS). ",
501
+ "text_level": 1,
502
+ "bbox": [
503
+ 176,
504
+ 106,
505
+ 470,
506
+ 121
507
+ ],
508
+ "page_idx": 4
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "1: Input: expected batch size $m$ \n2: each client $i$ computes a local update $\\mathbf { U } _ { i } ^ { k }$ (in parallel) \n3: each client $i$ sends the norm of its update $u _ { i } ^ { k } = w _ { i } \\left\\| \\mathbf { U } _ { i } ^ { k } \\right\\|$ to the master (in parallel) \n4: master computes optimal probabilities $p _ { i } ^ { k }$ using equation (6) \n5: master broadcasts $p _ { i } ^ { k }$ to all clients \n6: each client $i$ sends its update $\\begin{array} { r } { \\frac { w _ { i } } { p _ { i } ^ { k } } \\mathbf { U } _ { i } ^ { k } } \\end{array}$ to the master with probability $p _ { i } ^ { k }$ (in parallel) \n162 update and perform partial sorting, which can be computationally expensive and also slightly violates \n163 the privacy requirements of clients in $\\mathrm { F L }$ . \n164 Therefore, we develop an algorithm for approximately solving the problem, which only requires to \n165 perform aggregation at the master node without compromising privacy of any client. The construction \n166 of this algorithm is similar to [40]. We first set $\\begin{array} { r } { \\tilde { p } _ { i } ^ { k } = \\frac { m \\left\\| \\tilde { U } _ { i } ^ { k } \\right\\| } { \\sum _ { j = 1 } ^ { n } \\left\\| \\tilde { U } _ { j } ^ { k } \\right\\| } } \\end{array}$ and $p _ { i } ^ { k } = \\operatorname* { m i n } \\{ \\tilde { p } _ { i } ^ { k } , 1 \\}$ . In an ideal \n167 situation, this would be sufficient. However, due to the truncation operation, the expected minibatch \n168 $\\begin{array} { r } { b ^ { k } = \\sum _ { i = 1 } ^ { n } p _ { i } ^ { k } \\leq \\sum _ { i = 1 } ^ { n } { \\frac { m \\left\\| g _ { i } ^ { k } \\right\\| } { \\sum _ { j = 1 } ^ { n } \\left\\| g _ { j } ^ { k } \\right\\| } } = m } \\end{array}$ = m can be strictly less than m if p˜ki > 1 holds true for at \n169 least one $i$ . Hence, we employ an iterative procedure to fix this gap by rescaling the probabilities \n170 which are smaller than 1, as summarized in Algorithm 2. This algorithm is much easier to implement \n171 and computationally more efficient on parallel computing architectures. In addition, it only requires a \n172 secure aggregation procedure on the master, which is essential in privacy preserving $\\mathrm { F L }$ , and thus it is \n173 compatible with existing FL software and hardware. We realize that Algorithm 2 brings some extra \n174 communication costs, but this is not an issue as it only requires to communicate $\\mathcal { O } ( j _ { \\operatorname* { m a x } } )$ extra floats \n175 for each client. We pick $j _ { \\mathrm { m a x } } = \\mathcal { O } ( 1 )$ , and thus it is negligible for large models of size $d$ . \n76 Remark 1. We realize that our algorithm requires two communication rounds per optimization round, \n77 but the first round is negligible due to the minimal number of communicated bits as argued above. ",
513
+ "bbox": [
514
+ 179,
515
+ 123,
516
+ 743,
517
+ 219
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "",
524
+ "bbox": [
525
+ 145,
526
+ 262,
527
+ 825,
528
+ 290
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "",
535
+ "bbox": [
536
+ 140,
537
+ 296,
538
+ 825,
539
+ 489
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "",
546
+ "bbox": [
547
+ 153,
548
+ 489,
549
+ 826,
550
+ 518
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "178 3 Convergence Guarantees ",
557
+ "text_level": 1,
558
+ "bbox": [
559
+ 148,
560
+ 536,
561
+ 413,
562
+ 554
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "179 In this section, we provide convergence analysis of DSGD and FedAvg with our optimal client sampling \n180 technique and compare it with full participation and independent uniform sampling of $m$ clients. \n181 We use standard assumptions [14] and assume throughout that $f$ has a unique minimizer $x ^ { \\star }$ with \n182 $f ^ { \\star } = f ( x ^ { \\star } ) > - \\infty$ . We further assume that $f$ is $\\mu$ -strongly convex and $f _ { i }$ ’s are $L$ -smooth and \n183 convex. Detailed definitions of convexity and smoothness can be found in the Appendix. Note that \n184 nothing prevents us from extending the results in this section to convex and non-convex cases with a \n185 similar standard analysis, since our proposed method only affects the aggregation step as described in \n186 Section 2, which is independent of the strong convexity assumption. ",
569
+ "bbox": [
570
+ 140,
571
+ 566,
572
+ 826,
573
+ 679
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Assumption 1 (Gradient oracle for DSGD). The stochastic gradient estimator 187 $g _ { i } ^ { k } = \\nabla f _ { i } ( x ^ { k } ) + \\xi _ { i } ^ { k }$ of the local gradient 188 $\\nabla f _ { i } ( x ^ { k } )$ , for each round $k$ and all $i = 1 , \\ldots , n$ , satisfies ",
580
+ "bbox": [
581
+ 147,
582
+ 681,
583
+ 825,
584
+ 712
585
+ ],
586
+ "page_idx": 4
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/64e0df33feacbb4f3d4fd05d570bd3468f5043be457e5d5ee5b3897d7a89493d.jpg",
591
+ "text": "$$\n\\mathrm { E } \\left[ \\xi _ { i } ^ { k } \\right] = 0\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 459,
595
+ 715,
596
+ 539,
597
+ 734
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "189 and ",
604
+ "bbox": [
605
+ 142,
606
+ 738,
607
+ 200,
608
+ 751
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "equation",
614
+ "img_path": "images/80544c7686f24d71334f1d8dbd081980ac259e8d517d0d464ef0319fc3539cb1.jpg",
615
+ "text": "$$\n\\begin{array} { r } { \\mathrm { E } \\left[ \\left. \\xi _ { i } ^ { k } \\right. ^ { 2 } | x _ { i } ^ { k } \\right] \\leq M \\left. \\nabla f _ { i } ( x ^ { k } ) \\right. ^ { 2 } + \\sigma ^ { 2 } , \\mathrm { ~ f o r ~ s o m e ~ } M \\geq 0 . } \\end{array}\n$$",
616
+ "text_format": "latex",
617
+ "bbox": [
618
+ 299,
619
+ 747,
620
+ 697,
621
+ 773
622
+ ],
623
+ "page_idx": 4
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "This further implies that 190 $\\begin{array} { r } { \\mathrm { E } \\left[ \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } g _ { i } ^ { k } \\mid x ^ { k } \\right] = \\nabla f ( x ^ { k } ) . } \\end{array}$ ",
628
+ "bbox": [
629
+ 143,
630
+ 775,
631
+ 547,
632
+ 794
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "Assumption 2 (Gradient oracle for FedAvg). The stochastic gradient estimator 191 $g _ { i } ( y _ { i , r } ^ { k } ) =$ 192 $\\nabla f _ { i } ( y _ { i , r } ^ { k } ) + \\xi _ { i , r } ^ { k }$ of the local gradient $\\nabla f _ { i } ( y _ { i , r } ^ { k } )$ , for each round $k$ , each local step $r = 0 , \\ldots , R$ and 193 all $i = 1 , \\ldots , n$ , satisfies ",
639
+ "bbox": [
640
+ 142,
641
+ 796,
642
+ 826,
643
+ 840
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "equation",
649
+ "img_path": "images/95d09d0a6f1ce7c184a104eaea2ba9e9924cb5daad599c545d7ffc698f9d2fd7.jpg",
650
+ "text": "$$\n\\mathrm { E } \\left[ \\xi _ { i , r } ^ { k } \\right] = 0\n$$",
651
+ "text_format": "latex",
652
+ "bbox": [
653
+ 455,
654
+ 838,
655
+ 542,
656
+ 858
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "text",
662
+ "text": "194 and ",
663
+ "bbox": [
664
+ 142,
665
+ 858,
666
+ 200,
667
+ 872
668
+ ],
669
+ "page_idx": 4
670
+ },
671
+ {
672
+ "type": "equation",
673
+ "img_path": "images/6b845febcfe8ba5e16d10d42dce8b8c6e5a4381671ca97a1a85bf4fed4ea3f05.jpg",
674
+ "text": "$$\n\\begin{array} { r } { \\mathrm { E } \\left[ \\left. \\xi _ { i , r } ^ { k } \\right. ^ { 2 } | y _ { i , r } ^ { k } \\right] \\leq M \\left. \\nabla f _ { i } ( y _ { i , r } ^ { k } ) \\right. ^ { 2 } + \\sigma ^ { 2 } , \\mathrm { ~ f o r ~ s o m e ~ } M \\geq 0 , } \\end{array}\n$$",
675
+ "text_format": "latex",
676
+ "bbox": [
677
+ 289,
678
+ 867,
679
+ 705,
680
+ 893
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "where 195 $y _ { i , 0 } ^ { k } = x ^ { k }$ and $y _ { i , r } ^ { k } = y _ { i , r - 1 } ^ { k } - \\eta _ { l } g _ { i } ( y _ { i , r } ^ { k } ) , r = 1 , \\cdot \\cdot \\cdot , R .$ ",
687
+ "bbox": [
688
+ 142,
689
+ 895,
690
+ 588,
691
+ 914
692
+ ],
693
+ "page_idx": 4
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Algorithm 2 Approximate Optimal Client Sampling (AOCS). ",
698
+ "text_level": 1,
699
+ "bbox": [
700
+ 173,
701
+ 106,
702
+ 570,
703
+ 121
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "1: Input: expected batch size $m$ , maximum number of iteration $j _ { \\mathrm { m a x } }$ \n2: each client $i$ computes an update $\\mathbf { U } _ { i } ^ { k }$ (in parallel) \n3: each client $i$ sends the norm of its update $u _ { i } ^ { k } = w _ { i } \\left\\| \\mathbf { U } _ { i } ^ { k } \\right\\|$ to the master (in parallel) \n4: master aggregates $\\begin{array} { r } { u ^ { k } = \\sum _ { i = 1 } ^ { n } u _ { i } ^ { k } } \\end{array}$ \n5: master broadcasts $u ^ { k }$ to all clients \n6: each client $i$ computes $\\begin{array} { r } { p _ { i } ^ { k } = \\operatorname* { m i n } \\{ \\frac { m u _ { i } ^ { k } } { u ^ { k } } , 1 \\} } \\end{array}$ (in parallel) \n7: for $j = 1 , \\cdots , j _ { m a x } \\ : \\epsilon$ do \n8: each client $i$ sends $t _ { i } ^ { k } = ( 1 , p _ { i } ^ { k } )$ to the master if $p _ { i } ^ { k } < 1$ ; else sends $t _ { i } ^ { k } = ( 0 , 0 )$ (in parallel) \n9: master aggregates $\\begin{array} { r } { ( I ^ { k } , P ^ { k } ) = \\sum _ { i = 1 } ^ { n } t _ { i } ^ { k } } \\end{array}$ \n10: master computes Ck = (m−n+Ik) \n11: master broadcasts $C ^ { k }$ to all clients \n12: each client $i$ recalibrates $p _ { i } ^ { k } = \\operatorname* { m i n } \\{ C ^ { k } p _ { i } ^ { k } , 1 \\}$ if $p _ { i } ^ { k } < 1$ (in parallel) \n13: if $C ^ { k } \\leq 1$ then \n14: break \n15: end if \n16: end for \n17: each clients $i$ sends its update $\\begin{array} { r } { \\frac { w _ { i } } { p _ { i } ^ { k } } \\mathbf { U } _ { i } ^ { k } } \\end{array}$ to master with probability $p _ { i } ^ { k }$ (in parallel) ",
710
+ "bbox": [
711
+ 176,
712
+ 123,
713
+ 812,
714
+ 383
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "196 We also define two quantities, which appear in our convergence guarantees: ",
721
+ "bbox": [
722
+ 142,
723
+ 433,
724
+ 666,
725
+ 448
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "equation",
731
+ "img_path": "images/f0214e87b9872d040ed2722a8dfdfa4ac22e89672fd6e645c2ada1887073e369.jpg",
732
+ "text": "$$\nR _ { i } : = f _ { i } ( x ^ { \\star } ) - f _ { i } ^ { \\star } , \\quad r ^ { k } : = x ^ { k } - x ^ { \\star } ,\n$$",
733
+ "text_format": "latex",
734
+ "bbox": [
735
+ 372,
736
+ 458,
737
+ 622,
738
+ 477
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "where 97 $f _ { i } ^ { \\star }$ is the functional value of $f _ { i }$ at its optimum. $R _ { i }$ represents the mismatch between the local and global minimizer, and 98 $r ^ { k }$ captures the distance of the current point to the minimizer of $f$ . ",
745
+ "bbox": [
746
+ 153,
747
+ 487,
748
+ 825,
749
+ 517
750
+ ],
751
+ "page_idx": 5
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "199 Equipped with these assumptions, we are ready to proceed with our convergence guarantees. We start \n200 with the definition of the improvement factor ",
756
+ "bbox": [
757
+ 143,
758
+ 523,
759
+ 826,
760
+ 553
761
+ ],
762
+ "page_idx": 5
763
+ },
764
+ {
765
+ "type": "equation",
766
+ "img_path": "images/ff0ee76a8cb776228e7c050b44a2743c2aaa0b716ee9e823b72d09946cbf5481.jpg",
767
+ "text": "$$\n\\alpha ^ { k } : = \\frac { \\mathrm { E } \\left[ \\left. \\sum _ { i \\in S ^ { k } } \\frac { w _ { i } } { p _ { i } ^ { k } } \\mathbf { U } _ { i } ^ { k } - \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { U } _ { i } ^ { k } \\right. ^ { 2 } \\right] } { \\mathrm { E } \\left[ \\left. \\sum _ { i \\in U ^ { k } } \\frac { w _ { i } } { p _ { i } ^ { U } } \\mathbf { U } _ { i } ^ { k } - \\sum _ { i = 1 } ^ { n } w _ { i } \\mathbf { U } _ { i } ^ { k } \\right. ^ { 2 } \\right] } ,\n$$",
768
+ "text_format": "latex",
769
+ "bbox": [
770
+ 346,
771
+ 563,
772
+ 651,
773
+ 631
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "201 where $S ^ { k } \\sim \\mathbb { S } ^ { k }$ with $p _ { i } ^ { k }$ defined in (6) and $U ^ { k } \\sim \\mathbf { U }$ is an independent uniform sampling with \n202 $p _ { i } ^ { U } = m / n$ . By construction, $\\alpha ^ { k }$ is less than or equal to one, as $\\mathbb { S } ^ { k }$ minimizes the variance term. In \n203 addition, $\\alpha ^ { k }$ can reach zero in the case where there are at most $m$ non-zero updates. If $\\alpha ^ { k } = 0$ , \n204 our method performs as if all updates were communicated. In the worst-case $\\hat { \\alpha ^ { k } } = 1$ , our method \n205 performs as if we picked $m$ updates uniformly at random, and one cannot do better due to the \n206 structure of the updates $\\mathbf { U } _ { i } ^ { k }$ . In the following subsections, we analyze specific methods for solving the \n207 optimization problem (1) under the aforementioned assumptions. The proofs and detailed description \n208 are deferred to the Appendix. \n209 Fairness. Based on our sampling strategy, it might be tempting to assume that the obtained solution \n210 could exhibit fairness issues. In our convergence analysis, we show that this is not the case, as our \n211 proposed methods converge to the optimal solution. Hence, as long as the original objective has no \n212 inherent issue with fairness, our methods do not exhibit any fairness issues. Besides, our algorithm \n213 can be used in conjunction with other “more fair” objectives, e.g., tilted ERM [19]. ",
780
+ "bbox": [
781
+ 140,
782
+ 641,
783
+ 826,
784
+ 757
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "",
791
+ "bbox": [
792
+ 140,
793
+ 776,
794
+ 825,
795
+ 847
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "214 3.1 Distributed SGD with Optimal Client Sampling ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 148,
805
+ 866,
806
+ 537,
807
+ 882
808
+ ],
809
+ "page_idx": 5
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "215 We begin with the convergence analysis for DSGD (see (2)) with optimal client sampling. ",
814
+ "bbox": [
815
+ 140,
816
+ 893,
817
+ 751,
818
+ 909
819
+ ],
820
+ "page_idx": 5
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "1: Input: initial global model $x ^ { 1 }$ , global and local step-sizes $\\eta _ { g } ^ { k }$ , $\\eta _ { l } ^ { k }$ \n2: for each round $k = 1 , \\ldots , K$ do \n3: master broadcasts $x ^ { k }$ to all clients $i \\in [ n ]$ \n4: for each client $i \\in [ n ]$ (in parallel) do \n5: initialize local model $y _ { i , 0 } ^ { k } \\gets x ^ { k }$ \n6: for $r = 1 , \\ldots , R$ do \n7: compute mini-batch gradient $g _ { i } ( y _ { i , r - 1 } ^ { k } )$ \n8: update $y _ { i , r } ^ { k } y _ { i , r - 1 } ^ { k } - \\eta _ { l } ^ { k } g _ { i } ( y _ { i , r - 1 } ^ { k } )$ \n9: end for \n10: compute $\\mathbf { U } _ { i } ^ { k } : = \\Delta y _ { i } ^ { k } = x ^ { k } - y _ { i , R } ^ { k }$ \n11: compute $p _ { i } ^ { k }$ using Algorithm 1 or 2 \n12: send $\\begin{array} { r } { \\frac { w _ { i } } { p _ { i } ^ { k } } \\Delta y _ { i } ^ { k } } \\end{array}$ to master with probability $p _ { i } ^ { k }$ \n13: end for \n14: master computes $\\begin{array} { r } { \\Delta x ^ { k } = \\sum _ { i \\in S ^ { k } } \\frac { w _ { i } } { p _ { i } ^ { k } } \\Delta y _ { i } ^ { k } } \\end{array}$ \n15: master updates global model $x ^ { k + 1 } \\gets x ^ { k } - \\eta _ { g } ^ { k } \\Delta x ^ { k }$ \n16: end for ",
825
+ "bbox": [
826
+ 176,
827
+ 125,
828
+ 625,
829
+ 362
830
+ ],
831
+ "page_idx": 6
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "216 Theorem 2. Let $f _ { i }$ be $L$ -smooth and convex for all $i = 1 , \\ldots , n .$ . Let $f$ be $\\mu$ -strongly convex. Suppose that Assumption 1 holds. Choose 217 $\\begin{array} { r } { \\eta ^ { k } \\in \\left( 0 , \\frac { \\gamma ^ { k } } { ( 1 + \\operatorname* { m a x } _ { i \\in [ n ] } \\left\\{ w _ { i } \\right\\} M ) L } \\right) } \\end{array}$ , where ",
836
+ "bbox": [
837
+ 140,
838
+ 410,
839
+ 825,
840
+ 448
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "equation",
846
+ "img_path": "images/bfa156d2fe5f9657a6ad84566a11ab0f4913937b5c0690375dead8016aa50761.jpg",
847
+ "text": "$$\n\\gamma ^ { k } : = \\frac { m } { \\alpha ^ { k } ( n - m ) + m } \\in \\left[ \\frac { m } { n } , 1 \\right] , \\quad k = 0 , \\dots , K - 1 .\n$$",
848
+ "text_format": "latex",
849
+ "bbox": [
850
+ 308,
851
+ 455,
852
+ 686,
853
+ 486
854
+ ],
855
+ "page_idx": 6
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "218 Define ",
860
+ "bbox": [
861
+ 140,
862
+ 493,
863
+ 218,
864
+ 507
865
+ ],
866
+ "page_idx": 6
867
+ },
868
+ {
869
+ "type": "equation",
870
+ "img_path": "images/c9310380c785139f68f477b51857321a73f8d0deddf724e318ae8520b33bd774.jpg",
871
+ "text": "$$\n\\beta _ { 1 } : = \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } \\big ( 2 L \\big ( 1 + M \\big ) R _ { i } + \\sigma ^ { 2 } \\big ) \\quad a n d \\quad \\beta _ { 2 } : = 2 L \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } R _ { i } .\n$$",
872
+ "text_format": "latex",
873
+ "bbox": [
874
+ 285,
875
+ 515,
876
+ 710,
877
+ 556
878
+ ],
879
+ "page_idx": 6
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "219 Then, the iterates of DSGD with optimal client sampling (6) satisfy ",
884
+ "bbox": [
885
+ 142,
886
+ 563,
887
+ 602,
888
+ 578
889
+ ],
890
+ "page_idx": 6
891
+ },
892
+ {
893
+ "type": "equation",
894
+ "img_path": "images/83bfe599ef8dec4231578d2b3e4a900a09c06ad4524efc6f371e397ab5025247.jpg",
895
+ "text": "$$\n\\mathrm { E } \\left[ \\left. r ^ { k + 1 } \\right. ^ { 2 } \\right] \\leq ( 1 - \\mu \\eta ^ { k } ) \\mathrm { E } \\left[ \\left. r ^ { k } \\right. ^ { 2 } \\right] + ( \\eta ^ { k } ) ^ { 2 } \\left( \\frac { \\beta _ { 1 } } { \\gamma ^ { k } } - \\beta _ { 2 } \\right) .\n$$",
896
+ "text_format": "latex",
897
+ "bbox": [
898
+ 299,
899
+ 584,
900
+ 699,
901
+ 619
902
+ ],
903
+ "page_idx": 6
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "Interpretation. In order to understand the results of Theorem 2, we first look at the best and worst case scenarios. In the best case scenario, we have $\\gamma ^ { k } = 1$ for all $k$ . This implies that there is no loss of speed comparing to the method with full participation. It is indeed confirmed by our theory as our obtained recursion recovers the best-known rate of DSGD in the full participation regime [8]. Similarly, in the worst case, we have $\\gamma ^ { k } = m / n$ for all $k$ ’s, which corresponds to uniform sampling with sample size $m$ and our recursion recovers the best-know rate for DSGD in this regime. This is expected as (12) implies that each update $\\mathbf { U } _ { i } ^ { k }$ is equivalent, thus we cannot hope for better rate than the uniform sampling. In the general scenario, our obtain recursion sits somewhere between full and uniform partial participation, where the actual position is determined by $\\gamma ^ { k }$ which capture the distribution of updates (here gradients) on clients. For instance, with a larger number of $\\gamma ^ { k }$ ’s tending to 1, we are closer to full participation regime. Similarly, with more $\\gamma ^ { \\overline { { k } } }$ ’s tending to $m / n$ , we are closer to the rate of partial participation. ",
908
+ "bbox": [
909
+ 140,
910
+ 632,
911
+ 825,
912
+ 799
913
+ ],
914
+ "page_idx": 6
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "3.2 FedAvg with Optimal Client Sampling ",
919
+ "text_level": 1,
920
+ "bbox": [
921
+ 163,
922
+ 815,
923
+ 478,
924
+ 832
925
+ ],
926
+ "page_idx": 6
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "One of the most common approaches to optimization for Federated Learning is Federated Averaging (FedAvg) [23], an adaption of local-update to parallel SGD. In FedAvg, each client runs some number of SGD steps locally, and then local updates are averaged to form the global update which is then used for the global model on the master. Pseudo-code that adapts the standard FedAvg algorithm to our framework is given in Algorithm 3. ",
931
+ "bbox": [
932
+ 169,
933
+ 842,
934
+ 823,
935
+ 911
936
+ ],
937
+ "page_idx": 6
938
+ },
939
+ {
940
+ "type": "image",
941
+ "img_path": "images/e27d5f26345ad5e75d9e9254e35abb4c6066c02825f73fd68dbb858f25a9d89a.jpg",
942
+ "image_caption": [
943
+ "Figure 1: Distributions of the three datasets considered. "
944
+ ],
945
+ "image_footnote": [],
946
+ "bbox": [
947
+ 174,
948
+ 88,
949
+ 816,
950
+ 174
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "image",
956
+ "img_path": "images/310d7a74ba5ebbd7ec3257553ff3a4f7f5d7acb20a032877500e02452883b19a.jpg",
957
+ "image_caption": [
958
+ "Figure 2: (Dataset 1) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master. "
959
+ ],
960
+ "image_footnote": [],
961
+ "bbox": [
962
+ 174,
963
+ 214,
964
+ 825,
965
+ 284
966
+ ],
967
+ "page_idx": 7
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Theorem 3. Assume that 238 $f _ { i }$ is $L$ -smooth and $\\mu$ -strongly convex for all $i = 1 , \\ldots , n$ and Assumption 2 holds. Let 239 $\\eta ^ { k } : = R \\eta _ { l } ^ { k } \\eta _ { g } ^ { k }$ be the effective step-size and $\\begin{array} { r } { \\eta _ { g } ^ { k } \\ge \\sqrt { \\frac { \\gamma ^ { k } } { \\sum _ { i } w _ { i } ^ { 2 } } } } \\end{array}$ , where ",
972
+ "bbox": [
973
+ 137,
974
+ 354,
975
+ 821,
976
+ 393
977
+ ],
978
+ "page_idx": 7
979
+ },
980
+ {
981
+ "type": "equation",
982
+ "img_path": "images/55c097828227fdc846cbc41c9e20c393bddecd7ff3aa680455f6d845b25ba85e.jpg",
983
+ "text": "$$\n\\gamma ^ { k } : = \\frac { m } { \\alpha ^ { k } ( n - m ) + m } \\in \\left[ \\frac { m } { n } , 1 \\right] .\n$$",
984
+ "text_format": "latex",
985
+ "bbox": [
986
+ 380,
987
+ 396,
988
+ 616,
989
+ 428
990
+ ],
991
+ "page_idx": 7
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "If 240 $\\begin{array} { r } { \\eta ^ { k } \\leq \\frac { 1 } { 8 } \\operatorname* { m i n } \\bigg \\{ \\frac { 1 } { L ( 2 + M / R ) } , \\frac { \\gamma ^ { k } } { ( 1 + \\operatorname* { m a x } _ { i \\in [ n ] } \\{ w _ { i } \\} ( 1 + M / R ) ) L } \\bigg \\} } \\end{array}$ , then the iterates of FedAvg $R \\geq 2 ,$ ) with 241 optimal client sampling (6) satisfy ",
996
+ "bbox": [
997
+ 138,
998
+ 430,
999
+ 825,
1000
+ 468
1001
+ ],
1002
+ "page_idx": 7
1003
+ },
1004
+ {
1005
+ "type": "equation",
1006
+ "img_path": "images/f3699529712bad0e425684ed480b724b4929966cb198f5b8343e7bbcab2c9616.jpg",
1007
+ "text": "$$\n\\frac { 3 } { 8 } \\mathrm { E } \\left[ \\left( f ( x ^ { k } ) - f ^ { \\star } \\right) \\right] \\leq \\frac { 1 } { \\eta ^ { k } } \\left( 1 - \\frac { \\mu \\eta ^ { k } } { 2 } \\right) \\mathrm { E } \\left[ \\left. r ^ { k } \\right. ^ { 2 } \\right] - \\frac { 1 } { \\eta ^ { k } } \\mathrm { E } \\left[ \\left. r ^ { k + 1 } \\right. ^ { 2 } \\right] + \\eta ^ { k } \\beta _ { 1 } ^ { k } + ( \\eta ^ { k } ) ^ { 2 } \\beta _ { 2 } ,\n$$",
1008
+ "text_format": "latex",
1009
+ "bbox": [
1010
+ 200,
1011
+ 470,
1012
+ 794,
1013
+ 506
1014
+ ],
1015
+ "page_idx": 7
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "242 where ",
1020
+ "bbox": [
1021
+ 140,
1022
+ 507,
1023
+ 217,
1024
+ 521
1025
+ ],
1026
+ "page_idx": 7
1027
+ },
1028
+ {
1029
+ "type": "equation",
1030
+ "img_path": "images/d597b0d396c0a8cc91097cf516d6df8359526c46009e80289acc775b162e2f7e.jpg",
1031
+ "text": "$$\n\\beta _ { 1 } ^ { k } : = \\frac { 2 \\sigma ^ { 2 } } { \\gamma ^ { k } R } \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } + 4 L \\left( \\frac M R + 1 - \\gamma ^ { k } \\right) \\sum _ { i = 1 } ^ { n } w _ { i } ^ { 2 } R _ { i } \\quad a n d \\quad \\beta _ { 2 } : = 7 2 L ^ { 2 } \\left( 1 + \\frac M R \\right) \\sum _ { i = 1 } ^ { n } w _ { i } R _ { i } .\n$$",
1032
+ "text_format": "latex",
1033
+ "bbox": [
1034
+ 186,
1035
+ 521,
1036
+ 812,
1037
+ 563
1038
+ ],
1039
+ "page_idx": 7
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "243 Interpretation. Similar to DSGD, the convergence guarantees of FedAvg with optimal client sam \n244 pling (Algorithm 3) sits somewhere between the performances of those with full and uniform partial \n245 participations, where the actual position is again determined by the distribution of updates which \n246 directly impact $\\alpha ^ { k }$ ’s that are linked to $\\gamma ^ { k }$ ’s. In the edge cases, i.e. $\\gamma ^ { k } = 1$ (best case) or $\\gamma ^ { k } = m / n$ \n247 (worst case), we recover the state-of-the-art complexity guarantees provided in [15] in both regimes. \n248 Note that our results are slightly more general, as [15] assumes $M = 0$ and $w _ { i } = 1 / n$ . ",
1044
+ "bbox": [
1045
+ 138,
1046
+ 570,
1047
+ 825,
1048
+ 655
1049
+ ],
1050
+ "page_idx": 7
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "249 4 Experiments ",
1055
+ "text_level": 1,
1056
+ "bbox": [
1057
+ 142,
1058
+ 672,
1059
+ 312,
1060
+ 690
1061
+ ],
1062
+ "page_idx": 7
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "In this section, we empirically evaluate our optimal client sampling method, comparing it with 1) the baseline where participating clients are sampled uniformly from available clients in each round and 2) full participation where all available clients participate. We simulate the cross-device FL setting and train our models using TensorFlow Federated (TFF)1. For all three methods, we report validation accuracy and (local) training loss (vertical axis) as a function of the number of communication rounds and the number of bits communicated from clients to the master (horizontal axis). Each figure displays the mean performance with standard error over 5 independent runs. For a fair comparison, we use the same random seed for the three compared methods in a single run and vary random seeds across different runs. ",
1067
+ "bbox": [
1068
+ 168,
1069
+ 703,
1070
+ 825,
1071
+ 828
1072
+ ],
1073
+ "page_idx": 7
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Setup. We conclude an evaluation on FedAvg where we extend the TFF implementation of FedAvg2 to fit our framework. For the model, we use the two-layer Convolutional Neural Network (CNN) ",
1078
+ "bbox": [
1079
+ 165,
1080
+ 834,
1081
+ 821,
1082
+ 863
1083
+ ],
1084
+ "page_idx": 7
1085
+ },
1086
+ {
1087
+ "type": "image",
1088
+ "img_path": "images/af13b86b0eb157411da961c79800fc276fd2f4bb9da9b882eac7a5cb9d1657db.jpg",
1089
+ "image_caption": [
1090
+ "Figure 3: (Dataset 2) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master. "
1091
+ ],
1092
+ "image_footnote": [],
1093
+ "bbox": [
1094
+ 174,
1095
+ 89,
1096
+ 823,
1097
+ 159
1098
+ ],
1099
+ "page_idx": 8
1100
+ },
1101
+ {
1102
+ "type": "image",
1103
+ "img_path": "images/a6780c14c1aa82a0ac6d133ad228e93217bdc3d214847c3d0db3867668cc9129.jpg",
1104
+ "image_caption": [
1105
+ "Figure 4: (Dataset 3) validation accuracy and (local) training loss as a function of the number of communication rounds and the number of bits communicated from clients to the master. "
1106
+ ],
1107
+ "image_footnote": [],
1108
+ "bbox": [
1109
+ 174,
1110
+ 222,
1111
+ 823,
1112
+ 290
1113
+ ],
1114
+ "page_idx": 8
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "261 provided in the implementation. The default dataset is Federated EMNIST with only digits, but as this \n262 is a well-balanced dataset with mostly the same quality data on each client, we modify it by removing \n263 some clients or some of their training images, in order to better simulate conditions in which our \n264 proposed methods bring significant theoretical improvements. As a result, we produce 3 unbalanced \n265 datasets as summarized in Figure 1, on which we train the CNN model. For validation, we use the \n266 unchanged validation set in the Federated EMNIST dataset, which consists of 40, 832 validation \n267 images. In each communication round of FedAvg, $n = 3 2$ clients are sampled uniformly from the \n268 client pool, each of which then performs several SGD steps on its local training images for 1 epoch \n269 with batch size 20. For partial participation, the expected number of clients allowed to communicate \n270 their updates back to the master is set to $m = 3$ for all the experiments. We use constant step sizes, \n271 where we set $\\eta _ { g } = 1$ and tune $\\eta _ { l }$ from the set of values $\\{ 2 ^ { - 1 } , 2 ^ { - 2 } , 2 ^ { - 3 } , 2 ^ { - 4 } , 2 ^ { - 5 } \\}$ using a holdout \n272 set. We implement our sampling procedure using Algorithm 2, as this supports stateless clients and \n273 secure aggregation. We include extra communication costs in our results, where we set $j _ { \\mathrm { m a x } } = 4$ \n274 More details of the hyper-parameters that we use can be found in the Appendix. \n275 Results and Discussions. As predicted by our theory, the performance of FedAvg with our proposed \n276 optimal client sampling strategy is in between the performances of that with full and uniform partial \n277 participation. Figures 2, 3 and 4 (red curves: optimal sampling; blue curves: uniform sampling; green \n278 curves: full participation) show that, for all three datasets, the optimal sampling strategy performs \n279 slightly worse than but is still competitive with the full participation strategy in terms of the number \n280 of communication rounds – it almost reached the performance of full participation while only less \n281 than $1 0 \\%$ of the available clients communicate their updates back to the master. Note that the uniform \n282 sampling strategy performs significantly worse, which indicates that a careful choice of sampling \n283 probabilities can go a long way towards closing the gap between the performance of naive uniform \n284 sampling and full participation. \n285 More importantly, and this was the main motivation of our work, our optimal sampling strategy is \n286 significantly better than both the uniform sampling and full participation strategies when we compare \n287 validation accuracy as a function of the number of bits communicated from clients to the master. \n288 For instance, in case of Dataset 1 (Figure 2), while our optimal sampling approach reached around \n289 $8 5 \\%$ validation accuracy after $2 ^ { 6 } \\times 1 0 ^ { 8 }$ communicated bits, neither the full nor the uniform sampling \n290 strategies are able to exceed $40 \\%$ validation accuracy within the same communication budget. Indeed, \n291 to reach the same $85 \\%$ validation accuracy, full participation approach needs to communicate more \n292 than $2 ^ { 9 } \\times 1 0 ^ { 8 }$ bits, i.e., $8 \\times$ more, and uniform sampling approach needs to communicate about the \n293 same number of bits as full participation or even more. The results for Datasets 2 and 3 are of a \n294 similar qualitative nature, showing that these conclusions are robust across the datasets considered. \n295 In the Appendix, we include additional figures which show the current best validation accuracy as a \n296 function of the number of communication rounds and the number of bits communicated from clients \n297 to the master. ",
1119
+ "bbox": [
1120
+ 138,
1121
+ 366,
1122
+ 825,
1123
+ 559
1124
+ ],
1125
+ "page_idx": 8
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "",
1130
+ "bbox": [
1131
+ 140,
1132
+ 565,
1133
+ 825,
1134
+ 704
1135
+ ],
1136
+ "page_idx": 8
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "",
1141
+ "bbox": [
1142
+ 140,
1143
+ 710,
1144
+ 825,
1145
+ 848
1146
+ ],
1147
+ "page_idx": 8
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "",
1152
+ "bbox": [
1153
+ 142,
1154
+ 854,
1155
+ 823,
1156
+ 897
1157
+ ],
1158
+ "page_idx": 8
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "98 References [1] Dan Alistarh, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Randomized quantization for communication-optimal stochastic gradient descent. arXiv preprint arXiv:1610.02132, 2016. [2] Zeyuan Allen-Zhu, Zheng Qu, Peter Richtárik, and Yang Yuan. Even faster accelerated coordinate descent using non-uniform sampling. In International Conference on Machine Learning, pages 1110–1119, 2016. [3] Debraj Basu, Deepesh Data, Can Karakus, and Suhas Diggavi. Qsparse-local-SGD: Distributed SGD with quantization, sparsification and local computations. In Advances in Neural Information Processing Systems, pages 14668–14679, 2019. [4] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, pages 41–48, 2009. [5] Antoine Bordes, Seyda Ertekin, Jason Weston, and Léon Bottou. Fast kernel classifiers with online and active learning. Journal of Machine Learning Research, 6(Sep):1579–1619, 2005. [6] Olivier Fercoq and Peter Richtárik. Accelerated, parallel, and proximal coordinate descent. SIAM Journal on Optimization, 25(4):1997–2023, 2015. [7] WM Goodall. Television by pulse code modulation. Bell System Technical Journal, 30(1):33–49, 1951. [8] Robert Mansel Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richtárik. SGD: General analysis and improved rates. Proceedings of the 36th International Conference on Machine Learning, Long Beach, California, 2019. [9] Filip Hanzely and Peter Richtárik. Federated learning of a mixture of global and local models. arXiv:2002.05516, 2020. [10] Samuel Horváth, Chen-Yu Ho, L’udovit Horváth, Atal Narayan Sahu, Marco Canini, and Peter Richtárik. Natural compression for distributed deep learning. arXiv preprint arXiv:1905.10988, 2019. [11] Samuel Horváth and Peter Richtárik. Nonconvex variance reduced optimization with arbitrary sampling. Proceedings of the 36th International Conference on Machine Learning, 2019. [12] Samuel Horváth and Peter Richtárik. A better alternative to error feedback for communicationefficient distributed learning. arXiv preprint arXiv:2006.11077, 2020. [13] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. [14] Hamed Karimi, Julie Nutini, and Mark Schmidt. Linear convergence of gradient and proximalgradient methods under the polyak-łojasiewicz condition. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 795–811. Springer, 2016. [15] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J Reddi, Sebastian U Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for on-device federated learning. arXiv preprint arXiv:1910.06378, 2019. [16] Angelos Katharopoulos and François Fleuret. Not all samples are created equal: Deep learning with importance sampling. arXiv preprint arXiv:1803.00942, 2018. [17] Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for local SGD on identical and heterogeneous data. In The 23rd International Conference on Artificial Intelligence and Statistics (AISTATS 2020), 2020. [18] Jakub Konecný and Peter Richtárik. Randomized distributed mean estimation: Accuracy vs. ˇ communication. Frontiers in Applied Mathematics and Statistics, 4:62, 2018. ",
1163
+ "bbox": [
1164
+ 151,
1165
+ 69,
1166
+ 830,
1167
+ 919
1168
+ ],
1169
+ "page_idx": 9
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "[19] Tian Li, Ahmad Beirami, Maziar Sanjabi, and Virginia Smith. Tilted empirical risk minimization. In International Conference on Learning Representations, 2021. \n[20] Qihang Lin, Zhaosong Lu, and Lin Xiao. An accelerated proximal coordinate gradient method. In Advances in Neural Information Processing Systems, pages 3059–3067, 2014. \n[21] Tao Lin, Sebastian U Stich, Kumar Kshitij Patel, and Martin Jaggi. Don’t use large mini-batches, use local SGD. arXiv preprint arXiv:1808.07217, 2018. \n[22] Ilya Loshchilov and Frank Hutter. Online batch selection for faster training of neural networks. arXiv preprint arXiv:1511.06343, 2015. \n[23] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pages 1273–1282, 2017. \n[24] Konstantin Mishchenko, Filip Hanzely, and Peter Richtárik. $9 9 \\%$ of parallel optimization is inevitably a waste of time. arXiv preprint arXiv:1901.09437, 2019. \n[25] Deanna Needell, Rachel Ward, and Nati Srebro. Stochastic gradient descent, weighted sampling, and the randomized kaczmarz algorithm. In Advances in neural information processing systems, pages 1017–1025, 2014. \n[26] Yu Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. \n[27] Zheng Qu, Peter Richtárik, and Tong Zhang. Quartz: Randomized dual coordinate ascent with arbitrary sampling. In Advances in Neural Information Processing Systems 28, pages 865–873, 2015. \n[28] Ali Ramezani-Kebrya, Fartash Faghri, and Daniel M Roy. NUQSGD: Improved communication efficiency for data-parallel SGD via nonuniform quantization. arXiv preprint arXiv:1908.06077, 2019. \n[29] Peter Richtárik and Martin Takác. Iteration complexity of randomized block-coordinate descent ˇ methods for minimizing a composite function. Mathematical Programming, 144(1-2):1–38, 2014. \n[30] Lawrence Roberts. Picture coding using pseudo-random noise. IRE Transactions on Information Theory, 8(2):145–154, 1962. \n[31] Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015. \n[32] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 815–823, 2015. \n[33] Shai Shalev-Shwartz and Tong Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized loss minimization. In International conference on machine learning, pages 64–72, 2014. \n[34] Edgar Simo-Serra, Eduard Trulls, Luis Ferraz, Iasonas Kokkinos, Pascal Fua, and Francesc Moreno-Noguer. Discriminative learning of deep convolutional feature point descriptors. In Proceedings of the IEEE International Conference on Computer Vision, pages 118–126, 2015. \n[35] Sebastian U Stich. Local SGD converges fast and communicates little. ICLR 2019 - International Conference on Learning Representations, 2019. \n[36] Sebastian U Stich, Jean-Baptiste Cordonnier, and Martin Jaggi. Sparsified SGD with memory. In Advances in Neural Information Processing Systems, pages 4447–4458, 2018. \n[37] Sebastian U Stich and Sai Praneeth Karimireddy. The error-feedback framework: Better rates for SGD with delayed gradients and compressed communication. ICLR 2020 - International Conference on Learning Representations, 2020. \n[38] Sebastian U Stich, Anant Raj, and Martin Jaggi. Safe adaptive importance sampling. In Advances in Neural Information Processing Systems, pages 4381–4391, 2017. \n[39] Thijs Vogels, Sai Praneeth Karimireddy, and Martin Jaggi. PowerSGD: Practical low-rank gradient compression for distributed optimization. In Advances in Neural Information Processing Systems, pages 14236–14245, 2019. \n[40] Jianqiao Wangni, Jialei Wang, Ji Liu, and Tong Zhang. Gradient sparsification for communication-efficient distributed optimization. In Advances in Neural Information Processing Systems, pages 1299–1309, 2018. \n[41] Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. In Advances in Neural Information Processing Systems, pages 1509–1519, 2017. \n[42] Hantian Zhang, Jerry Li, Kaan Kara, Dan Alistarh, Ji Liu, and Ce Zhang. Zipml: Training linear models with end-to-end low precision, and a little bit of deep learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 4035–4043. JMLR. org, 2017. \n[43] Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In international conference on machine learning, pages 1–9, 2015. ",
1174
+ "bbox": [
1175
+ 161,
1176
+ 54,
1177
+ 828,
1178
+ 919
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "",
1185
+ "bbox": [
1186
+ 148,
1187
+ 90,
1188
+ 828,
1189
+ 378
1190
+ ],
1191
+ "page_idx": 11
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "1. For all authors... ",
1196
+ "bbox": [
1197
+ 214,
1198
+ 116,
1199
+ 339,
1200
+ 130
1201
+ ],
1202
+ "page_idx": 12
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Remark 1, where we acknowledge that our algorithm requires two (although the first one is negligible) communication rounds per iteration. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discussed potential fairness issues in Section 3. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1207
+ "bbox": [
1208
+ 238,
1209
+ 135,
1210
+ 825,
1211
+ 267
1212
+ ],
1213
+ "page_idx": 12
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "2. If you are including theoretical results... ",
1218
+ "bbox": [
1219
+ 215,
1220
+ 272,
1221
+ 493,
1222
+ 286
1223
+ ],
1224
+ "page_idx": 12
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Section 3 and Appendix A. \n(b) Did you include complete proofs of all theoretical results? [Yes] See Appendix C-F for complete proofs. We also provided interpretations of our theorems in the main paper and discussed the relationship between our results and related results in the literature. ",
1229
+ "bbox": [
1230
+ 238,
1231
+ 290,
1232
+ 825,
1233
+ 363
1234
+ ],
1235
+ "page_idx": 12
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "3. If you ran experiments... ",
1240
+ "bbox": [
1241
+ 214,
1242
+ 367,
1243
+ 393,
1244
+ 381
1245
+ ],
1246
+ "page_idx": 12
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See supplemental material. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4 and Appendix B \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We ran every experiment 5 times with different random seeds and reported results with error bars. \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [N/A] Since we only run simulations, this is not applicable. ",
1251
+ "bbox": [
1252
+ 238,
1253
+ 386,
1254
+ 825,
1255
+ 544
1256
+ ],
1257
+ "page_idx": 12
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1262
+ "bbox": [
1263
+ 210,
1264
+ 550,
1265
+ 823,
1266
+ 564
1267
+ ],
1268
+ "page_idx": 12
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] See Section 4 \n(b) Did you mention the license of the assets? [Yes] All the data and assets we used in this manuscript are open-source. \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We included an anonymized URL in the supplemental material for the datasets used. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1273
+ "bbox": [
1274
+ 238,
1275
+ 568,
1276
+ 825,
1277
+ 704
1278
+ ],
1279
+ "page_idx": 12
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1284
+ "bbox": [
1285
+ 214,
1286
+ 707,
1287
+ 705,
1288
+ 722
1289
+ ],
1290
+ "page_idx": 12
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1295
+ "bbox": [
1296
+ 238,
1297
+ 727,
1298
+ 825,
1299
+ 815
1300
+ ],
1301
+ "page_idx": 12
1302
+ }
1303
+ ]
parse/train/l0BP1lHpPW/l0BP1lHpPW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/l0BP1lHpPW/l0BP1lHpPW_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryHM_fbA-/ryHM_fbA-.md ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING DOCUMENT EMBEDDINGS WITH CNNS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ This paper proposes a new model for document embedding. Existing approaches either require complex inference or use recurrent neural networks that are difficult to parallelize. We take a different route and use recent advances in language modeling to develop a convolutional neural network embedding model. This allows us to train deeper architectures that are fully parallelizable. Stacking layers together increases the receptive filed allowing each successive layer to model increasingly longer range semantic dependences within the document. Empirically we demonstrate superior results on two publicly available benchmarks. Full code will be released with the final version of this paper.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Document representation for machine reasoning remains a challenging open problem in natural language processing (NLP). A typical approach is to develop a document embedding model which produces fixed length vector representations that preserve relevant semantic information. These models are trained in unsupervised fashion on unlabeled text, and the resulting embeddings can be used as input for a variety of NLP tasks such as sentiment analysis and information retrieval (Blei et al., 2003; Le & Mikolov, 2014; Kiros et al., 2015). Despite significant research effort in this area the most commonly used methods are still based on the bag-of-words (n-grams) representations.
12
+
13
+ However, recent work has shown that remarkably accurate embedding models can be learned using distributed representations of words (Mikolov et al., 2013). Within this category two popular approaches are doc2vec (Le & Mikolov, 2014) and skip-thought (Kiros et al., 2015). doc2vec extends the distributed word model word2vec (Mikolov et al., 2013) by attaching document-specific vectors to word2vec and learning them jointly with word representations. While accurate, this model requires iterative optimization to be conducted for each new document making it challenging to deploy in high volume production environments. Furthermore, doc2vec is trained using localized contexts of very small size (typically 5 to 10 words) and never sees the whole document. This makes it difficult to capture long range semantic relationships within the document.
14
+
15
+ Skip-thought uses a recurrent neural network (RNN) to sequentially ingest the document one word at a time. Last layer activations after the last word are then taken as document embedding. RNN models have been gaining popularity and a number of other approaches have been proposed (Hill et al., 2016; Lin et al., 2017). Recurrent architecture addresses both problems of the doc2vec approach. During inference only a forward pass through the network is required to produce an embedding that is based on the entire content of the document. However, the sequential nature of the RNN makes it difficult to leverage the full benefits of modern hardware such as GPUs that offer highly scalable parallel execution. This can significantly slow down both training and inference. Consequently most RNN models including skip-thought are relatively shallow with only a few hidden layers. Moreover, many of the commonly used RNN achitectures such as LSTM (Hochreiter & Schmidhuber, 1997) and GRU (Chung et al., 2014), gate information form already seen input at each recurrence step. Repeated gating has an effect where more weight is placed on latter words and the network can “forget” earlier parts of the document (Lai et al., 2015). This is not ideal for document embedding where long range relationships that can occur anywhere in the document need to modeled.
16
+
17
+ In this work we propose an embedding model that addresses the aforementioned problems. We show that there is a direct connection between language and embedding models. We then use recent advances in language modeling to derive a convolutional neural network (CNN) embedding model. Similarly to skip-thought, inference in our model is done via a forward pass through the
18
+
19
+ CNN. However, the CNN architecture allows to process the entire document in parallel significantly accelerating both learning and inference. We show that the variable length input problem can be effectively dealt with using either padding or global pooling in the last convolutional layer. Moreover significant gains can be achieved using deeper architectures where each successive layer captures increasingly longer range dependencies in the document.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ Early work on document embedding primarily focused on bag-of-words (BOW) and bag-of-ngrams representations (Harris, 1954). Despite significant effort in this area bag-of-words still remains one of the most popular and commonly used approaches. However, BOW models suffer from two major disadvantages, first, the dimensionality of BOW embeddings is proportional to the dictionary size often resulting in sparse and high dimensional embeddings. Second, BOW destroys the word order which in turn destroys much of the semantic structure. It is easy to find examples of documents that contain similar words but have very different meaning because of the word order. This makes it evident that BOW approach is limited in the type of semantic structure that it can represent. N-grams partially address this issues but quickly become impractical beyond 2-grams due to dimensionality explosion and rare sequence problems.
24
+
25
+ Many approaches have been proposed to improve the scalability and performance of BOW, including low-rank factorization models such as LSA (Deerwester et al., 1990) and pLSA (Hofmann, 1999), and topic models such as LDA (Blei et al., 2003). These models produce compact dense embeddings that typically outperform BOW. However, training is still done on the BOW view of each document which significantly limits the representational power.
26
+
27
+ Recently, distributed language approaches have become increasingly more popular. Here, words are represented using finite dimensional vectors that are concatenated together to form documents. Embedding models are then trained on these vectors sequences to produce compact fixed size representations that preserve semantic structure. This directly addresses the word order problem of the BOW models while avoiding dimensionality explosion. Approaches in this category include doc2vec (Le & Mikolov, 2014; Dai et al., 2015), skip-thought (Kiros et al., 2015) and others (Hill et al., 2016; Lin et al., 2017). Many of these models achieve state-of-the-art results with embeddings that are only a few hundred dimensions in length. However, they also have several disadvantages. For doc2vec, iterative optimization needs to be conducted during inference which makes it challenging to deploy this model in production. Skip-thought and other recently proposed RNN approaches avoid this problem, but virtually all currently used RNN architectures apply gating which places more weight on later words in the document. Moreover, RNNs are inherently sequential and are difficult to parallelize making them inefficient especially for long documents.
28
+
29
+ # 3 APPROACH
30
+
31
+ Given a document corpus $\mathbb { D } = \{ D _ { 1 } , \ldots , D _ { n } \}$ the goal is to learn an embedding function $f$ that outputs a fixed length embedding for every $D \in \mathbb { D }$ . The embedding needs to be compact and accurately summarize the semantic aspects of each document. It can then be used as input to NLP pipelines such as sentiment/topic classification and information retrieval. Note that besides documents in $\mathbb { D }$ we assume that no additional information is available and all training for $f$ is done in unsupervised fashion.
32
+
33
+ Each document $D$ contains a sequence of words $w _ { 1 } , . . . , w _ { | D | }$ from a fixed dictionary $\nu$ . We use distributed representation and map every word in $\nu$ to an $m$ -dimensional vector. $\phi ( w )$ denotes the vector representation for word $w$ which can be learned together with $f$ or initialized with a distributed word model such as word2vec (Mikolov et al., 2013). Concatenating together all word representations the input to the model becomes:
34
+
35
+ $$
36
+ \phi ( D ) = [ \phi ( w _ { 1 } ) , . . . , \phi ( w _ { | D | } ) ]
37
+ $$
38
+
39
+ where $\phi ( D )$ is an $m \times | D |$ matrix. The embedding function maps $\phi ( D )$ to a fixed length vector $f ( \phi ( D ) , \theta ) = \nu$ and $\theta$ is the set of free parameters to be learned. We use $D _ { i : j } = w _ { i } , w _ { i + 1 } , . . . w _ { j }$ to denote the subsequence of words in $D$ and $f ( \phi ( D _ { i : j } ) , \theta ) = \nu _ { i : j }$ to denote the corresponding embedding.
40
+
41
+ # 3.1 LANGUAGE MODELING
42
+
43
+ Inspired by the recent results in language modeling we explore the similarities between the two areas to derive our model for $f$ . In language modeling the aim is to learn a probability model over the documents, i.e., $P ( D ) = P ( w _ { 1 } , \dots , w _ { | D | } )$ . The probability is typically factored into a product of conditional probabilities using the chain rule:
44
+
45
+ $$
46
+ P ( w _ { 1 } , \dots , w _ { | D | } ) = \prod _ { i = 1 } ^ { | D | } P ( w _ { i } \mid w _ { 1 } , \dots , w _ { i - 1 } ) ,
47
+ $$
48
+
49
+ and the models are trained to predict the next word $w _ { i }$ given the subsequence $w _ { 1 } , \ldots , w _ { i - 1 }$ . Recently, distributed representations have also become increasingly more popular in language modeling and virtually all current state-of-the-art approache use input representation similar to Equation 1 (Merity et al., 2016; Jozefowicz et al., 2016; Dauphin et al., 2016). While seemingly different, there is a close relationship between language modeling and document embedding. In both frameworks, the models are typically trained to predict a portion of the word sequence given a context. We explore this relationship in detail in this work and show that by altering the structure of the language model we get an architecture that can be used for document embedding.
50
+
51
+ To this end two recent advances in language modeling form the basis of our work. First, until recently RNNs were typically used to model $P ( w _ { i } \mid w _ { 1 } , \ldots , w _ { i - 1 } )$ . RNN language models process the word sequence one word at a time and thus require $O ( | D | )$ sequential operations to generate predictions for a given document $D$ . As we discussed above, these models can’t take full advantage of parallel processing and thus scale poorly especially for long sequences. However, recently Dauphin et al. (2016) proposed a CNN-based language model where multiple layers of convolutions are applied to $\phi ( D )$ to output the target probability distribution. CNN models are fully parallelizable, and Dauphin et al. (2016) show that deep CNN architectures with up to 14 layers can produce higher accuracy than leading RNN models while being over $2 0 \mathrm { x }$ more efficient at inference time. These results together with other related work (Kim, 2014; Kalchbrenner et al., 2014; Lai et al., 2015) in this area indicate that CNN models are effective and efficient alternative to RNNs for language tasks.
52
+
53
+ Second, traditionally $P ( w _ { i } \mid w _ { 1 } , \ldots , w _ { i - 1 } )$ is modeled with a softmax layer where a separate weight vector is learned for every word $w \in \mathcal { V }$ . However, given that in the input each word is already represented by a vector $\phi ( w )$ recent work by Press & Wolf (2016) and Inan et al. (2017) simplified this model by reusing the weights:
54
+
55
+ $$
56
+ P ( w _ { i } \mid w _ { 1 } , \dots , w _ { i - 1 } ) = { \frac { \exp ( \phi ( w _ { i } ) ^ { T } \nu _ { 1 : i - 1 } ) } { \sum _ { w \in \mathcal { V } } \exp ( ( \phi ( w ) ^ { T } \nu _ { 1 : i - 1 } ) } }
57
+ $$
58
+
59
+ where $\nu _ { 1 : i - 1 }$ is the $m$ -dimensional output (last layer’s activations) produced by the model after seeing the subsequence $w _ { 1 } , \ldots , w _ { i - 1 }$ . Note that here the word representations $\phi ( w )$ are used both as input and as weights in the softmax layer, and the last hidden layer of the model is fixed to have $m$ hidden units. The model is trained to output a vector $\nu _ { 1 : i - 1 }$ that is “similar” to the representation of the next word $\phi ( w _ { i } )$ . Reusing the representations reduces the number of parameters by close to $30 \%$ while producing comparable or better performance on many language modeling benchmarks (Press & Wolf, 2016; Inan et al., 2017). This indicates that the model is able to generate predictions directly in the $\phi$ space, and learn both $\phi$ and other layer weights simultaneously.
60
+
61
+ In this work we combine these ideas and propose a CNN model for document embedding. In the following sections we outline our model architecture in detail and present both learning and inference procedures.
62
+
63
+ # 3.2 EMBEDDING MODEL
64
+
65
+ At the core of our approach is the notion that a “good” embedding for a word sequence $w _ { 1 } , \ldots , w _ { i - 1 }$ should be an accurate predictor of the words $w _ { i } , w _ { i + 1 } , \ldots$ that follow. This notion similar to language modeling, however instead of predicting only the next word we simultaneously predict multiple words forward. Expanding the prediction to multiple words makes the problem more difficult since the only way to achieve that is by “understanding” the preceding sequence. This in turn forces the model to capture long range semantic structure in the document. To achieve this we note that in the simplified softmax from Equation $3 \nu _ { 1 : i - 1 }$ can be thought of as the embedding prediction for the next word $w _ { i }$ . Furthermore, the probability of $w _ { i }$ is proportional to $\exp ( \phi ( w _ { i } ) ^ { T } \nu _ { 1 : i - 1 } )$ . Expanding this formulation to a window of $h$ words and framing the problem as binary classification we get the embedding loss function:
66
+
67
+ ![](images/3b81ea61431e42eb4477129f3a79586f472891d836ad30b5627b44a9a859e4a3.jpg)
68
+ Figure 1: CNN embedding model diagram. Multiple layers of convolutions are applied to the distributed representation of the word sequence where each word is represented by an $m$ dimensional vector. The first convolutional layer contains kernels of size $m \times d$ that are applied to $d$ words at a time. Fully connected layers combine all activations from convolutions and map them to an $m$ dimensional embedding.
69
+
70
+ $$
71
+ \mathcal { L } ( i , D ) = - \sum _ { \stackrel { j = i } { w _ { j } \in D } } ^ { i + h } \log \left( \frac { 1 } { 1 + \exp ( - \phi ( w _ { j } ) ^ { T } \nu _ { 1 : i - 1 } ) } \right) - \sum _ { w \not \in D } \log \left( 1 - \frac { 1 } { 1 + \exp ( - \phi ( w ) ^ { T } \nu _ { 1 : i - 1 } ) } \right)
72
+ $$
73
+
74
+ where $f ( \phi ( D _ { 1 : i } ) , \theta ) \ = \ \nu _ { 1 : i }$ is the embedding for the subsequence $w _ { 1 } , \ldots , w _ { i }$ . $\mathcal { L }$ aims to raise the probability of the $h$ words $w _ { i } , w _ { i + 1 } \ldots , w _ { i + h }$ that immediately follow $w _ { i - 1 }$ and lower it for all other words. This objective is similar to the negative sampling skip-gram model in word2vec/doc2vec (Mikolov et al., 2013). The main differences are that we only do forward prediction and $\nu _ { 1 : i - 1 }$ is a function of all words up to $w _ { i - 1 }$ . In contrast, doc2vec incorporates backward prediction and uses the same $\nu$ for each $i$ in a given document that is updated directly. This significantly complicates inference for new documents. In contrast, our model addresses only requires a forward pass through $f$ during inference.
75
+
76
+ We discussed that CNN models have recently been shown to perform well on forward word prediction tasks with distributed representations, and are considerably more efficient than RNNs. Inspired by these results we propose to use a CNN model for $f$ . In our approach multiple levels of convolutions are applied to $\phi ( D )$ . All convolutions are computed from left to right, and the first layer is composed of $m \times d$ kernels that operate on $d$ words at a time. Stacking layers together allows upper layers to model long range dependencies with receptive fields that span large sections of the document. Similarly to Dauphin et al. (2016), we found gated linear units (GLUs) to be helpful for learning deeper models, and use activation functions of the form:
77
+
78
+ $$
79
+ h ^ { l } ( x ) = ( h ( x ) ^ { l - 1 } * W ^ { l } + b ^ { l } ) \cdot \sigma ( h ( x ) ^ { l - 1 } * V ^ { l } + c ^ { l } )
80
+ $$
81
+
82
+ where $h ^ { l } ( x )$ is the output of $l ^ { \star }$ th layer, $W ^ { l } , \ : V ^ { l } , \ : b ^ { l } , \ : c ^ { l }$ are convolution parameters and $\sigma$ is the sigmoid function. Linear component of the GLU ensures that the gradient doesn’t vanish through the layers, and sigmoid gating selectively chooses which information should be passed to the next layer. Empirically we found learning with this activation function to converge quickly and produce good results.
83
+
84
+ Traditional CNN models are not designed for variable length input so we investigate two ways to address this problem. The first approach is to apply zero padding to convert the input into fixed length:
85
+
86
+ $$
87
+ \phi ^ { k } ( D _ { 1 : i } ) = [ \underbrace { \mathbf { 0 } , \dots , \mathbf { 0 } } _ { \operatorname* { m a x } ( k - i , 0 ) } , \phi ( w _ { 1 } ) , \phi ( w _ { 2 } ) , \dots , \phi ( w _ { \operatorname* { m i n } ( i , t ) } ) ]
88
+ $$
89
+
90
+ where $k$ is the target length. Sequences shorter than $k$ are left padded with 0 vectors and those longer than $k$ are truncated after $k$ words. Analogous approach has been used by other CNN models for NLP (Dauphin et al., 2016; Conneau et al., 2017). While conceptually simple and easy to implement this approach has a drawback. For imbalanced datasets where document length varies significantly it is difficult to select $k$ . Small $k$ leads to long documents being significantly truncated while large $k$ results in wasted computation on short documents.
91
+
92
+ To address this problem we note that convolutional layers in CNN can be straightforwardly applied to variable length input without modification. The problem arises in fully connected layers that can only operate on fixed length activations. We circumvent this by applying an aggregating function before passing the activations to fully connected layers. Formally, given unpadded representation $\phi ( D )$ the activations from the last convolutional layer $h ^ { l }$ is a matrix where rows corresponds to kernels and columns depend on the length of $\phi ( D )$ . Since the number of kernels is fixed we can convert this matrix to a fixed length output by applying an aggregating function such as mean or max along the columns. This operation corresponds to global mean/max pooling commonly used in computer vision, and produces an output that can be passed to fully connected layers. Applying this approach eliminates the need for fixed length input and document padding/truncation which saves computation and makes the model more flexible. An alternative to global pooling is to use attention layer (Bahdanau et al., 2015), and in particular self attention (Lin et al., 2017) where the rows of $\phi ( D )$ are first passed through a softmax functions and then self gated. However, this is beyond the scope of this paper and we leave it for future work.
93
+
94
+ # 3.3 LEARNING AND INFERENCE
95
+
96
+ During training we learn $f$ by minimizing the loss in Equation 4. Empirically we found that rather than fixing prediction point $i$ for each document, better results can be obtained with stochastic sampling. Specifically given a forward prediction window $h$ we repeatedly alternate between the following steps: (1) sample document $D \in \mathbb { D }$ (2) sample prediction point $i \stackrel { \cdot } { \in } [ \delta , | D | - h ]$ (3) use gradients from $\mathcal { L } ( i , D )$ to update $f$ . Here $\delta > 0$ is an offset parameter to ensure that the model has enough context to do forward prediction. To speed up learning and improve convergence we conduct these steps using document mini batches and averaging the gradients across the mini batch. Note that separate prediction point $i$ is sampled for every document in the mini batch to encourage generalization. Second term in $\mathcal { L } ( i , D )$ requires computing a summation over all words in the vocabulary which is prohibitively expensive. We address this by using a stochastic approximation with negative word samples. In practice we found that using small samples of 50 randomly sampled words is sufficient to achieve good results on all datasets. This learning algorithm is simple and straightforward to implement. Only two parameters $h$ and $\delta$ need to be tuned, and unlike skip-thought no sentence tokenizer is required. During inference $f$ is kept fixed and we conduct forward passes to generate embeddings for new documents.
97
+
98
+ # 4 EXPERIMENTS
99
+
100
+ To validate the proposed architecture, we conducted extensive experiments on two publicly available datasets: IMDB (Maas et al., 2011) and Amazon Fine Food Reviews (McAuley & Leskovec, 2013). We implemented our model using the TensorFlow library (Abadi et al., 2016). All experiments were conducted on a server with 6-core Intel i7-6800K $@$ 3.40GHz CPU, Nvidia GeForce GTX 1080 Ti GPU, and 64GB of RAM.
101
+
102
+ We found that initializing word embeddings with vectors from word2vec resulted in faster learning and often produced better performance than random initialization. This is consistent with other work in this area (Kim, 2014). We use the pre-trained word2vec vectors taken from the word2vec project page 1, and thus fix the input height to $m \ : = \ : 3 0 0$ for all models. Another advantage of training with word2vec is that the large pretrained vocabulary of over a million words and phrases can be used to apply our model to documents that contain previously unseen words. This is especially useful when the training set is small and has limited vocabulary.
103
+
104
+ <table><tr><td>Model</td><td>tokens / s</td></tr><tr><td>skip-thought-uni</td><td>27,493</td></tr><tr><td>skip-thought-bi</td><td>14,374</td></tr><tr><td>CNN-pad</td><td>312,744</td></tr><tr><td>CNN-pool</td><td>277,932</td></tr></table>
105
+
106
+ Table 1: Inference speed in tokens per second.
107
+
108
+ For all experiments, we use a six layer CNN architecture for our model with four convolutional layers and two fully connected layers. For the convolutional layers, we use 600 kernels per layer, residual connections every other layer (He et al., 2016), GLU activations (Dauphin et al., 2016) and batch normalization (Ioffe & Szegedy, 2015). ReLU activations are used in fully connected layers. The code with the full model architecture will be released with the final draft of this paper and we thus omit going into further details here. To address the variable length input problem we experiment with both padding (CNN-pad) and global poling (CNN-pool) approaches proposed in Section 3.2. For global pooling we found that max pooling produces better results than average pooling and use max pooling in all experiments. Max pooling has another advantage where by tracing the indexes of the max values chosen for each row back through the network we can infer which parts of the sequence the model is focusing on.
109
+
110
+ Embeddings from all models including baselines are evaluated by training a shallow classifier using the labeled training instances and we report the test set classification accuracy. This procedure is similar to the one conducted by Le & Mikolov (2014), and evaluates whether the model is able to capture semantic information accurately enough to do NLP tasks such as sentiment classification.
111
+
112
+ Table 1 shows inference speed in tokens (words) per second for uni-directional and bi-directional skip-thought models as well as our model. These results were generated by doing inference with batch size 1 to remove the effects of across batch GPU parallelization. From the table we see that the CNN architecture is over $1 0 \mathrm { x }$ faster than uni-directional skip-thought and over $2 0 \mathrm { x }$ faster than the bi-directional version. Similar results were shown by (Dauphin et al., 2016), and clearly demonstrate the advantage of using CNN over RNN architectures.
113
+
114
+ # 4.1 IMDB
115
+
116
+ The IMDB dataset is one of the largest publicly available sentiment analysis datasets collected from the IMDB database. This dataset consists of 50,000 movie reviews that are split evenly into 25,000 training and 25,000 test sets. There are no more than 30 reviews per movie to prevent the model from learning movie specific review patterns. The target sentiment labels are binarized: review scores $\leq 4$ are treated as negative and scores $\geq 7$ are treated as positive. In addition to labeled reviews, the dataset also contains 50,000 unlabeled reviews that can be used for unsupervised training.
117
+
118
+ The average review in this dataset contains approximately 230 words and we experiment with input length $k \in$ [400, 500, 600] for CNN-pad (see Equation 6). These values roughly correspond to 90’th, 95’th and 97’th percentiles of word length distribution and thus cover a significant portion of the dataset. In our experiments, we found that setting $k = 4 0 0$ produced good results. Furthermore, we were able to match over $90 \%$ of words to word2vec vectors and opt to simply drop the unmatched words.
119
+
120
+ For our experiments, the goal is to evaluate the proposed CNN model and its ability to produce compact representations that accurately capture semantic aspects of documents. We use both labeled and unlabeled training reviews to train our model by using the objective outlined in Section 3.2. Training is done with mini batch gradient descent, using batch size of 100 and Adam optimizer (Kingma & Ba, 2014) with learning rate of 0.0003. For each document in the mini batch we sample prediction point $i$ and a set of negative words to make forward-backward passes through the CNN. Using parameter sweeps, we found that predicting $h = 1 0$ words forward with offset of $\delta \ : = \ : 1 0$ and 50 negative words produced good results.
121
+
122
+ <table><tr><td>Method</td><td>Accuracy</td></tr><tr><td>N-gram RNN-LM</td><td>86.50%</td></tr><tr><td>NBSVM 3gram</td><td>86.60% 91.87%</td></tr><tr><td>Avg. . word2vec skip-thought-2400 skip-thought-600</td><td>86.25% 82.57% 83.44%</td></tr><tr><td>doc2vec-600</td><td>88.73%</td></tr><tr><td>CNN-pad</td><td>88.74%</td></tr><tr><td>CNN-pool</td><td>88.44%</td></tr></table>
123
+
124
+ Table 2: IMDB results. Top row: supervised classifiers; bottom row: embedding models $^ +$ classifier.
125
+
126
+ We compare our model to an extensive set of baselines. These include word2vec, skip-thought and doc2vec. For word2vec (Avg. word2vec) we simply average the representations for all words that appear in a given document. For skip-thought we use the pre-trained model (skip-thought2400) available from the authors’ page, that has been trained on a large book corpus (Kiros et al., 2015). This model outputs significantly larger embeddings of size 2400. We also train another skipthought model (skip-thought-600) on the IMDB training data using the default hyper-parameters and fixing the embedding size to 300 to match our model. In both cases, we report the results from the combined model, which combines the output embeddings from both a unidirectional and bidirectional encoder, as this always yields better results. We further train a doc2vec model using both the distributed bag-of-words and distributed memory methods, setting the encoding dimension to 300 in both cases and using the hyper-parameters from Mesnil et al. (2014). We report results using an embedding that is a concatenation of both methods (doc2vec-600), as this gives the best result. Note that since both skip-thought and doc2vec baselines concatenate embeddings for best results, the final embeddings have dimension 600 and are twice the size of our model. Finally, all baselines are initialized with pre-trained word2vec.
127
+
128
+ Table 4: AFFR results for 2 and 5 class sentiment classification tasks.
129
+
130
+ <table><tr><td>Method</td><td>2-class</td><td>5-class</td></tr><tr><td>Avg. word2vec skip-thought-2400</td><td>81.49%</td><td>46.74%</td></tr><tr><td>skip-thought-600</td><td>86.04% 85.74%</td><td>52.84%</td></tr><tr><td>doc2vec-600</td><td>86.58%</td><td>43.51%</td></tr><tr><td></td><td></td><td>47.34%</td></tr><tr><td>CNN-pad</td><td>86.81%</td><td>52.58%</td></tr><tr><td>CNN-po0l</td><td>86.01%</td><td>51.01%</td></tr></table>
131
+
132
+ ![](images/1df9a6260a73d0516873edb1e50e9ef1fa4d9a0946217c8f1bda418b316af874.jpg)
133
+ Figure 2: t-SNE representation of document embeddings produced by our model for the IMDB test set. Points are colored according to the sentiment label.
134
+
135
+ Results from these experiments are shown in Table 2. For completeness, we also show results for various classification approaches trained in a fully supervised way, these are taken from Mesnil et al. (2014). From the table we see that our approach outperforms both word2vec and skip-thought baselines and performs comparable to doc2vec. Moreover, CNN-pool has comparable performance to CNN-pad suggesting that max pooling can be used to effectively get fixed length representation from variable length input. These results suggest that our model is able to learn a robust embedding function that accurately captures semantic information. Unlike doc2vec, once trained our model can be applied repeatedly to generated embeddings for new documents using a simple forward pass. This is a considerable advantage since inference in the CNN is fully deterministic and can be done in milliseconds on this dataset. It also worth nothing here that CNN language model proposed by Dauphin et al. (2016) used a much shorter context of less than 50 words to generate predictions. These results thus demonstrate that CNN models can also successfully model much longer sequences of over 2K words.
136
+
137
+ # 4.2 AMAZON FINE FOOD REVIEWS
138
+
139
+ The Amazon Fine Food Reviews (AFFR) dataset is a collection of 568,454 reviews of Amazon food products left by users up to October 2012 (McAuley & Leskovec, 2013). Each example contains full text of the review, a short summary, and a rating of 1 to 5, which we use as the labels. This dataset does not come with a train-test split and is highly unbalanced. To address this, we perform our own split where we randomly sample 20,000 documents from each class and from these, we randomly select 16,000 for training and 4,000 for testing. This gives us training and test sets with 80,000 and 20,000 documents, respectively.
140
+
141
+ We train our model using the same architecture and training method as in IMDB experiments, with the only difference being that we set $k = 2 0 0$ for CNN-pad rather than 400. This is due to shorter average length of the AFFR reviews compared to the IMDB reviews. Similarly to IMDB we compare against the same four baselines: word2vec, skip-thought-2400, skip-thought-600 and doc2vec-600. As before, we train a shallow sentiment classifier on top of the generated document embeddings but here we perform both binary 5-class classification. For binary classification, documents labeled 1 and 2 are treated as negative, 4 and 5 as positive, and we discard documents labeled 3. However, all training documents including those labeled 3 are used in the unsupervised phase.
142
+
143
+ Results for the classification task are shown in Table 3. Our approach performs comparably to the best baselines on each task. Highly competitive performance on the 5-way classification task indicates that our method is capable of successfully learning fine-grained differences between sentiment directly from unlabeled text. These results further support the conclusion that our proposed CNN architecture and learning framework produce robust embeddings that generalize well on NLP tasks of various complexity and size.
144
+
145
+ <table><tr><td></td><td>Ifoundverylitlelobsterintecan..IalsofoundIcouldpurchase thesame productatmylocalPublix marketatlesscost. 0.755Thisisadecentcanofherrigalthoughnotmyfavorite..Ifoundtheherringalittlonthesoftsidebutstillenjoy them.</td></tr><tr><td>0.733Ireadabout theoverabundanceoflobsterin Maine..Iamnotpaying 3times theamountofthe lobstertailsforshipping</td><td>0.738Youlvetisifyoupdfodyourselftsastaue.on’tusetyourolypastauce.Tolaing</td></tr><tr><td></td><td>This drink is horrible.Thecoconut watertstes like somereally watereddownmilk..Iwouldnot recommendthis toanyone. 0.842Iwasreallyexcitedthatcoconut watercameinflavors.butitiswaytoostrongandit tastes terible..saveyouroney 0.816wowtsufsdiialltesallthei..I&#x27;swul.mrongwhoesynowos.</td></tr><tr><td></td><td>0.810TisisthefrscoferiedhenIgotyKeurigIwassoisapontedinhefavortastedlikeplastc.wouldotrecoed.</td></tr><tr><td></td><td>All I have to do is get the can out and my cat comes running.</td></tr><tr><td></td><td>0.833Although expensive,these are really good.My cat can’t wait to take his pils..</td></tr><tr><td></td><td>0.787My kity can&#x27;t get enough of&#x27;em.She loves them so much that she does anything to get them..</td></tr><tr><td></td><td>0.770EverytimeIopencan,mycatmeowslikeCRAZY.ThisistheonlykindofoodthatIKNOWhelikes.Anditeepshmealthy.</td></tr><tr><td></td><td></td></tr></table>
146
+
147
+ Table 5: Retrieval results on the AFFR dataset. For each query review shown in bold we retrieve top3 most similar reviews using cosine distance between embeddings produced by our model. Cosine distance score is shown on the left for each retrieved result.
148
+
149
+ # 4.3 ANALYSIS
150
+
151
+ A common application of document embedding is information retrieval (Le & Mikolov, 2014) where the embedding vectors are indexed and used to quickly retrieve results for given a query. We use this approach to asses the quality of the embeddings that our model generates. Using the AFFR dataset we select several reviews as queries and retrieve top-3 most similar results using embedding cosine distance as similarity measure. The results are shown in Table 4.3, from this table we see that all retrieved reviews are highly relevant to each query both in content and in sentiment. The first group complains about seafood products, the second group is unhappy with a drink product and the last group are cat owners that all like a particular cat food product. Interestingly, the product in the retried reviews varies but both topic and sentiment stay consistent. For instance in the first group the three retrieved reviews are about herring, seafood pasta and lobster. However, similar to the query they are all negative and about seafood. This indicates that the model has learned the concepts of topic and sentiment without supervision and is able to successfully encode them into embeddings.
152
+
153
+ To get further visibility into the embeddings produced by our model we applied t-SNE to the embeddings inferred for the IMDB test set. t-SNE compresses the embedding vectors into two dimensions and we plot the corresponding two dimensional points coloring them according to the sentiment label. This plot is shown in Figure 2. From the figure we see a distinct separation between sentiment classes where most negative reviews are near the top and positive reviews are at the bottom. This further validates that the model is able to capture and encode sentiment information making the two classes near linearly separable.
154
+
155
+ # 5 CONCLUSION
156
+
157
+ We presented a CNN model for document embedding. In this approach successive layers of convolutions are applied to distributed word representations to model increasingly longer range semantic relationships within the document. We further proposed a stochastic forward prediction learning algorithm where the model is trained to predict the successive words for randomly chosen subsequences within the document. This learning procedure has few hyper parameters to tune and is straightforward to implement. Our model is able to take full advantage of parallel execution, and achieves better performance while also being significantly faster than current state-of-the-art RNN models.
158
+
159
+ # REFERENCES
160
+
161
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016.
162
+
163
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. International Conference on Learning Representations, 2015.
164
+
165
+ David M Blei, Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ , and Michael I Jordan. Latent dirichlet allocation. Journal of machine Learning research, 3, 2003.
166
+
167
+ Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
168
+
169
+ Alexis Conneau, Holger Schwenk, Lo¨ıc Barrault, and Yann Lecun. Very deep convolutional networks for text classification. In European Chapter of the Association for Computational Linguistics, 2017.
170
+
171
+ Andrew M Dai, Christopher Olah, and Quoc V Le. Document embedding with paragraph vectors. arXiv:1507.07998, 2015.
172
+
173
+ Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. arXiv preprint arXiv:1612.08083, 2016.
174
+
175
+ Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6), 1990.
176
+
177
+ Zellig S Harris. Distributional structure. Word, 10, 1954.
178
+
179
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition, 2016.
180
+
181
+ Felix Hill, Kyunghyun Cho, and Anna Korhonen. Learning distributed representations of sentences from unlabelled data. arXiv preprint arXiv:1602.03483, 2016.
182
+
183
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
184
+
185
+ Thomas Hofmann. Probabilistic latent semantic indexing. In Research and Development in Information Retrieval, 1999.
186
+
187
+ Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. In International Conference on Learning Representations, 2017.
188
+
189
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, 2015.
190
+
191
+ Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
192
+
193
+ Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Association for Computational Linguistics, 2014.
194
+
195
+ Yoon Kim. Convolutional neural networks for sentence classification. In Empirical Methods in Natural Language Processing, 2014.
196
+
197
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
198
+
199
+ Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Neural Information Processing Systems, 2015.
200
+
201
+ Siwei Lai, Liheng Xu, Kang Liu, and Jun Zhao. Recurrent convolutional neural networks for text classification. In AAAI, 2015.
202
+
203
+ Quoc Le and Tomas Mikolov. Distributed representations of sentences and documents. In International Conference on Machine Learning (ICML-14), 2014.
204
+
205
+ Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. International Conference on Learning Representations, 2017.
206
+
207
+ Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Association for Computational Linguistics, 2011.
208
+
209
+ Julian John McAuley and Jure Leskovec. From amateurs to connoisseurs: Modeling the evolution of user expertise through online reviews. In World Wide Web, 2013.
210
+
211
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
212
+
213
+ Gregoire Mesnil, Tomas Mikolov, Marc’Aurelio Ranzato, and Yoshua Bengio. Ensemble of gen-´ erative and discriminative techniques for sentiment analysis of movie reviews. arXiv preprint arXiv:1412.5335, 2014.
214
+
215
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Neural Information Processing Systems, 2013.
216
+
217
+ Ofir Press and Lior Wolf. Using the output embedding to improve language models. arXiv preprint arXiv:1608.05859, 2016.
parse/train/ryHM_fbA-/ryHM_fbA-_content_list.json ADDED
@@ -0,0 +1,1198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING DOCUMENT EMBEDDINGS WITH CNNS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 787,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 209,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "This paper proposes a new model for document embedding. Existing approaches either require complex inference or use recurrent neural networks that are difficult to parallelize. We take a different route and use recent advances in language modeling to develop a convolutional neural network embedding model. This allows us to train deeper architectures that are fully parallelizable. Stacking layers together increases the receptive filed allowing each successive layer to model increasingly longer range semantic dependences within the document. Empirically we demonstrate superior results on two publicly available benchmarks. Full code will be released with the final version of this paper. ",
40
+ "bbox": [
41
+ 233,
42
+ 242,
43
+ 764,
44
+ 367
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 397,
55
+ 336,
56
+ 412
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Document representation for machine reasoning remains a challenging open problem in natural language processing (NLP). A typical approach is to develop a document embedding model which produces fixed length vector representations that preserve relevant semantic information. These models are trained in unsupervised fashion on unlabeled text, and the resulting embeddings can be used as input for a variety of NLP tasks such as sentiment analysis and information retrieval (Blei et al., 2003; Le & Mikolov, 2014; Kiros et al., 2015). Despite significant research effort in this area the most commonly used methods are still based on the bag-of-words (n-grams) representations. ",
63
+ "bbox": [
64
+ 174,
65
+ 429,
66
+ 823,
67
+ 527
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "However, recent work has shown that remarkably accurate embedding models can be learned using distributed representations of words (Mikolov et al., 2013). Within this category two popular approaches are doc2vec (Le & Mikolov, 2014) and skip-thought (Kiros et al., 2015). doc2vec extends the distributed word model word2vec (Mikolov et al., 2013) by attaching document-specific vectors to word2vec and learning them jointly with word representations. While accurate, this model requires iterative optimization to be conducted for each new document making it challenging to deploy in high volume production environments. Furthermore, doc2vec is trained using localized contexts of very small size (typically 5 to 10 words) and never sees the whole document. This makes it difficult to capture long range semantic relationships within the document. ",
74
+ "bbox": [
75
+ 174,
76
+ 535,
77
+ 825,
78
+ 660
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Skip-thought uses a recurrent neural network (RNN) to sequentially ingest the document one word at a time. Last layer activations after the last word are then taken as document embedding. RNN models have been gaining popularity and a number of other approaches have been proposed (Hill et al., 2016; Lin et al., 2017). Recurrent architecture addresses both problems of the doc2vec approach. During inference only a forward pass through the network is required to produce an embedding that is based on the entire content of the document. However, the sequential nature of the RNN makes it difficult to leverage the full benefits of modern hardware such as GPUs that offer highly scalable parallel execution. This can significantly slow down both training and inference. Consequently most RNN models including skip-thought are relatively shallow with only a few hidden layers. Moreover, many of the commonly used RNN achitectures such as LSTM (Hochreiter & Schmidhuber, 1997) and GRU (Chung et al., 2014), gate information form already seen input at each recurrence step. Repeated gating has an effect where more weight is placed on latter words and the network can “forget” earlier parts of the document (Lai et al., 2015). This is not ideal for document embedding where long range relationships that can occur anywhere in the document need to modeled. ",
85
+ "bbox": [
86
+ 174,
87
+ 666,
88
+ 825,
89
+ 861
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this work we propose an embedding model that addresses the aforementioned problems. We show that there is a direct connection between language and embedding models. We then use recent advances in language modeling to derive a convolutional neural network (CNN) embedding model. Similarly to skip-thought, inference in our model is done via a forward pass through the ",
96
+ "bbox": [
97
+ 174,
98
+ 868,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "CNN. However, the CNN architecture allows to process the entire document in parallel significantly accelerating both learning and inference. We show that the variable length input problem can be effectively dealt with using either padding or global pooling in the last convolutional layer. Moreover significant gains can be achieved using deeper architectures where each successive layer captures increasingly longer range dependencies in the document. ",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 825,
111
+ 174
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 RELATED WORK ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 193,
122
+ 344,
123
+ 209
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Early work on document embedding primarily focused on bag-of-words (BOW) and bag-of-ngrams representations (Harris, 1954). Despite significant effort in this area bag-of-words still remains one of the most popular and commonly used approaches. However, BOW models suffer from two major disadvantages, first, the dimensionality of BOW embeddings is proportional to the dictionary size often resulting in sparse and high dimensional embeddings. Second, BOW destroys the word order which in turn destroys much of the semantic structure. It is easy to find examples of documents that contain similar words but have very different meaning because of the word order. This makes it evident that BOW approach is limited in the type of semantic structure that it can represent. N-grams partially address this issues but quickly become impractical beyond 2-grams due to dimensionality explosion and rare sequence problems. ",
130
+ "bbox": [
131
+ 174,
132
+ 224,
133
+ 825,
134
+ 363
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Many approaches have been proposed to improve the scalability and performance of BOW, including low-rank factorization models such as LSA (Deerwester et al., 1990) and pLSA (Hofmann, 1999), and topic models such as LDA (Blei et al., 2003). These models produce compact dense embeddings that typically outperform BOW. However, training is still done on the BOW view of each document which significantly limits the representational power. ",
141
+ "bbox": [
142
+ 174,
143
+ 371,
144
+ 825,
145
+ 440
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Recently, distributed language approaches have become increasingly more popular. Here, words are represented using finite dimensional vectors that are concatenated together to form documents. Embedding models are then trained on these vectors sequences to produce compact fixed size representations that preserve semantic structure. This directly addresses the word order problem of the BOW models while avoiding dimensionality explosion. Approaches in this category include doc2vec (Le & Mikolov, 2014; Dai et al., 2015), skip-thought (Kiros et al., 2015) and others (Hill et al., 2016; Lin et al., 2017). Many of these models achieve state-of-the-art results with embeddings that are only a few hundred dimensions in length. However, they also have several disadvantages. For doc2vec, iterative optimization needs to be conducted during inference which makes it challenging to deploy this model in production. Skip-thought and other recently proposed RNN approaches avoid this problem, but virtually all currently used RNN architectures apply gating which places more weight on later words in the document. Moreover, RNNs are inherently sequential and are difficult to parallelize making them inefficient especially for long documents. ",
152
+ "bbox": [
153
+ 174,
154
+ 446,
155
+ 825,
156
+ 627
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "3 APPROACH",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 176,
166
+ 647,
167
+ 297,
168
+ 662
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Given a document corpus $\\mathbb { D } = \\{ D _ { 1 } , \\ldots , D _ { n } \\}$ the goal is to learn an embedding function $f$ that outputs a fixed length embedding for every $D \\in \\mathbb { D }$ . The embedding needs to be compact and accurately summarize the semantic aspects of each document. It can then be used as input to NLP pipelines such as sentiment/topic classification and information retrieval. Note that besides documents in $\\mathbb { D }$ we assume that no additional information is available and all training for $f$ is done in unsupervised fashion. ",
175
+ "bbox": [
176
+ 174,
177
+ 678,
178
+ 823,
179
+ 762
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Each document $D$ contains a sequence of words $w _ { 1 } , . . . , w _ { | D | }$ from a fixed dictionary $\\nu$ . We use distributed representation and map every word in $\\nu$ to an $m$ -dimensional vector. $\\phi ( w )$ denotes the vector representation for word $w$ which can be learned together with $f$ or initialized with a distributed word model such as word2vec (Mikolov et al., 2013). Concatenating together all word representations the input to the model becomes: ",
186
+ "bbox": [
187
+ 174,
188
+ 768,
189
+ 823,
190
+ 840
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "equation",
196
+ "img_path": "images/b88ca4858e13222398fcd936c10475deb102bbbb5fa83ac079cb49b2194177b8.jpg",
197
+ "text": "$$\n\\phi ( D ) = [ \\phi ( w _ { 1 } ) , . . . , \\phi ( w _ { | D | } ) ]\n$$",
198
+ "text_format": "latex",
199
+ "bbox": [
200
+ 401,
201
+ 844,
202
+ 596,
203
+ 863
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "where $\\phi ( D )$ is an $m \\times | D |$ matrix. The embedding function maps $\\phi ( D )$ to a fixed length vector $f ( \\phi ( D ) , \\theta ) = \\nu$ and $\\theta$ is the set of free parameters to be learned. We use $D _ { i : j } = w _ { i } , w _ { i + 1 } , . . . w _ { j }$ to denote the subsequence of words in $D$ and $f ( \\phi ( D _ { i : j } ) , \\theta ) = \\nu _ { i : j }$ to denote the corresponding embedding. ",
210
+ "bbox": [
211
+ 174,
212
+ 867,
213
+ 823,
214
+ 924
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "3.1 LANGUAGE MODELING ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 174,
224
+ 103,
225
+ 379,
226
+ 118
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Inspired by the recent results in language modeling we explore the similarities between the two areas to derive our model for $f$ . In language modeling the aim is to learn a probability model over the documents, i.e., $P ( D ) = P ( w _ { 1 } , \\dots , w _ { | D | } )$ . The probability is typically factored into a product of conditional probabilities using the chain rule: ",
233
+ "bbox": [
234
+ 174,
235
+ 128,
236
+ 825,
237
+ 185
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/45de591cc4434016cb80e317c6ea98f4f66305ea53956b5101c8409306254b27.jpg",
244
+ "text": "$$\nP ( w _ { 1 } , \\dots , w _ { | D | } ) = \\prod _ { i = 1 } ^ { | D | } P ( w _ { i } \\mid w _ { 1 } , \\dots , w _ { i - 1 } ) ,\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 343,
248
+ 191,
249
+ 653,
250
+ 237
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "and the models are trained to predict the next word $w _ { i }$ given the subsequence $w _ { 1 } , \\ldots , w _ { i - 1 }$ . Recently, distributed representations have also become increasingly more popular in language modeling and virtually all current state-of-the-art approache use input representation similar to Equation 1 (Merity et al., 2016; Jozefowicz et al., 2016; Dauphin et al., 2016). While seemingly different, there is a close relationship between language modeling and document embedding. In both frameworks, the models are typically trained to predict a portion of the word sequence given a context. We explore this relationship in detail in this work and show that by altering the structure of the language model we get an architecture that can be used for document embedding. ",
257
+ "bbox": [
258
+ 173,
259
+ 241,
260
+ 825,
261
+ 353
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "To this end two recent advances in language modeling form the basis of our work. First, until recently RNNs were typically used to model $P ( w _ { i } \\mid w _ { 1 } , \\ldots , w _ { i - 1 } )$ . RNN language models process the word sequence one word at a time and thus require $O ( | D | )$ sequential operations to generate predictions for a given document $D$ . As we discussed above, these models can’t take full advantage of parallel processing and thus scale poorly especially for long sequences. However, recently Dauphin et al. (2016) proposed a CNN-based language model where multiple layers of convolutions are applied to $\\phi ( D )$ to output the target probability distribution. CNN models are fully parallelizable, and Dauphin et al. (2016) show that deep CNN architectures with up to 14 layers can produce higher accuracy than leading RNN models while being over $2 0 \\mathrm { x }$ more efficient at inference time. These results together with other related work (Kim, 2014; Kalchbrenner et al., 2014; Lai et al., 2015) in this area indicate that CNN models are effective and efficient alternative to RNNs for language tasks. ",
268
+ "bbox": [
269
+ 173,
270
+ 359,
271
+ 825,
272
+ 512
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Second, traditionally $P ( w _ { i } \\mid w _ { 1 } , \\ldots , w _ { i - 1 } )$ is modeled with a softmax layer where a separate weight vector is learned for every word $w \\in \\mathcal { V }$ . However, given that in the input each word is already represented by a vector $\\phi ( w )$ recent work by Press & Wolf (2016) and Inan et al. (2017) simplified this model by reusing the weights: ",
279
+ "bbox": [
280
+ 174,
281
+ 518,
282
+ 825,
283
+ 575
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "equation",
289
+ "img_path": "images/90276cedb482e1c8644da9f57da3e48a6aed281b21cc6c33544b576aaf8fcdbc.jpg",
290
+ "text": "$$\nP ( w _ { i } \\mid w _ { 1 } , \\dots , w _ { i - 1 } ) = { \\frac { \\exp ( \\phi ( w _ { i } ) ^ { T } \\nu _ { 1 : i - 1 } ) } { \\sum _ { w \\in \\mathcal { V } } \\exp ( ( \\phi ( w ) ^ { T } \\nu _ { 1 : i - 1 } ) } }\n$$",
291
+ "text_format": "latex",
292
+ "bbox": [
293
+ 323,
294
+ 582,
295
+ 674,
296
+ 618
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "where $\\nu _ { 1 : i - 1 }$ is the $m$ -dimensional output (last layer’s activations) produced by the model after seeing the subsequence $w _ { 1 } , \\ldots , w _ { i - 1 }$ . Note that here the word representations $\\phi ( w )$ are used both as input and as weights in the softmax layer, and the last hidden layer of the model is fixed to have $m$ hidden units. The model is trained to output a vector $\\nu _ { 1 : i - 1 }$ that is “similar” to the representation of the next word $\\phi ( w _ { i } )$ . Reusing the representations reduces the number of parameters by close to $30 \\%$ while producing comparable or better performance on many language modeling benchmarks (Press & Wolf, 2016; Inan et al., 2017). This indicates that the model is able to generate predictions directly in the $\\phi$ space, and learn both $\\phi$ and other layer weights simultaneously. ",
303
+ "bbox": [
304
+ 173,
305
+ 622,
306
+ 825,
307
+ 734
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "In this work we combine these ideas and propose a CNN model for document embedding. In the following sections we outline our model architecture in detail and present both learning and inference procedures. ",
314
+ "bbox": [
315
+ 176,
316
+ 741,
317
+ 823,
318
+ 784
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "3.2 EMBEDDING MODEL ",
325
+ "text_level": 1,
326
+ "bbox": [
327
+ 174,
328
+ 800,
329
+ 357,
330
+ 814
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "At the core of our approach is the notion that a “good” embedding for a word sequence $w _ { 1 } , \\ldots , w _ { i - 1 }$ should be an accurate predictor of the words $w _ { i } , w _ { i + 1 } , \\ldots$ that follow. This notion similar to language modeling, however instead of predicting only the next word we simultaneously predict multiple words forward. Expanding the prediction to multiple words makes the problem more difficult since the only way to achieve that is by “understanding” the preceding sequence. This in turn forces the model to capture long range semantic structure in the document. To achieve this we note that in the simplified softmax from Equation $3 \\nu _ { 1 : i - 1 }$ can be thought of as the embedding prediction for the next word $w _ { i }$ . Furthermore, the probability of $w _ { i }$ is proportional to $\\exp ( \\phi ( w _ { i } ) ^ { T } \\nu _ { 1 : i - 1 } )$ . Expanding this formulation to a window of $h$ words and framing the problem as binary classification we get the embedding loss function: ",
337
+ "bbox": [
338
+ 174,
339
+ 825,
340
+ 825,
341
+ 924
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "image",
347
+ "img_path": "images/3b81ea61431e42eb4477129f3a79586f472891d836ad30b5627b44a9a859e4a3.jpg",
348
+ "image_caption": [
349
+ "Figure 1: CNN embedding model diagram. Multiple layers of convolutions are applied to the distributed representation of the word sequence where each word is represented by an $m$ dimensional vector. The first convolutional layer contains kernels of size $m \\times d$ that are applied to $d$ words at a time. Fully connected layers combine all activations from convolutions and map them to an $m$ dimensional embedding. "
350
+ ],
351
+ "image_footnote": [],
352
+ "bbox": [
353
+ 218,
354
+ 89,
355
+ 779,
356
+ 231
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "",
363
+ "bbox": [
364
+ 174,
365
+ 325,
366
+ 826,
367
+ 368
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "equation",
373
+ "img_path": "images/d4e98aaef8715759bad6a9f4f9464a60b7acd87726dfc1009660207dd246cb1c.jpg",
374
+ "text": "$$\n\\mathcal { L } ( i , D ) = - \\sum _ { \\stackrel { j = i } { w _ { j } \\in D } } ^ { i + h } \\log \\left( \\frac { 1 } { 1 + \\exp ( - \\phi ( w _ { j } ) ^ { T } \\nu _ { 1 : i - 1 } ) } \\right) - \\sum _ { w \\not \\in D } \\log \\left( 1 - \\frac { 1 } { 1 + \\exp ( - \\phi ( w ) ^ { T } \\nu _ { 1 : i - 1 } ) } \\right)\n$$",
375
+ "text_format": "latex",
376
+ "bbox": [
377
+ 191,
378
+ 371,
379
+ 789,
380
+ 421
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "where $f ( \\phi ( D _ { 1 : i } ) , \\theta ) \\ = \\ \\nu _ { 1 : i }$ is the embedding for the subsequence $w _ { 1 } , \\ldots , w _ { i }$ . $\\mathcal { L }$ aims to raise the probability of the $h$ words $w _ { i } , w _ { i + 1 } \\ldots , w _ { i + h }$ that immediately follow $w _ { i - 1 }$ and lower it for all other words. This objective is similar to the negative sampling skip-gram model in word2vec/doc2vec (Mikolov et al., 2013). The main differences are that we only do forward prediction and $\\nu _ { 1 : i - 1 }$ is a function of all words up to $w _ { i - 1 }$ . In contrast, doc2vec incorporates backward prediction and uses the same $\\nu$ for each $i$ in a given document that is updated directly. This significantly complicates inference for new documents. In contrast, our model addresses only requires a forward pass through $f$ during inference. ",
387
+ "bbox": [
388
+ 173,
389
+ 426,
390
+ 825,
391
+ 539
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "We discussed that CNN models have recently been shown to perform well on forward word prediction tasks with distributed representations, and are considerably more efficient than RNNs. Inspired by these results we propose to use a CNN model for $f$ . In our approach multiple levels of convolutions are applied to $\\phi ( D )$ . All convolutions are computed from left to right, and the first layer is composed of $m \\times d$ kernels that operate on $d$ words at a time. Stacking layers together allows upper layers to model long range dependencies with receptive fields that span large sections of the document. Similarly to Dauphin et al. (2016), we found gated linear units (GLUs) to be helpful for learning deeper models, and use activation functions of the form: ",
398
+ "bbox": [
399
+ 173,
400
+ 544,
401
+ 825,
402
+ 656
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "equation",
408
+ "img_path": "images/5ff1669153c4bc7a8d9aee7979a50b545750f52828d7ffc64826d144e7024c7b.jpg",
409
+ "text": "$$\nh ^ { l } ( x ) = ( h ( x ) ^ { l - 1 } * W ^ { l } + b ^ { l } ) \\cdot \\sigma ( h ( x ) ^ { l - 1 } * V ^ { l } + c ^ { l } )\n$$",
410
+ "text_format": "latex",
411
+ "bbox": [
412
+ 323,
413
+ 660,
414
+ 674,
415
+ 679
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "where $h ^ { l } ( x )$ is the output of $l ^ { \\star }$ th layer, $W ^ { l } , \\ : V ^ { l } , \\ : b ^ { l } , \\ : c ^ { l }$ are convolution parameters and $\\sigma$ is the sigmoid function. Linear component of the GLU ensures that the gradient doesn’t vanish through the layers, and sigmoid gating selectively chooses which information should be passed to the next layer. Empirically we found learning with this activation function to converge quickly and produce good results. ",
422
+ "bbox": [
423
+ 174,
424
+ 681,
425
+ 825,
426
+ 753
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Traditional CNN models are not designed for variable length input so we investigate two ways to address this problem. The first approach is to apply zero padding to convert the input into fixed length: ",
433
+ "bbox": [
434
+ 174,
435
+ 760,
436
+ 825,
437
+ 801
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "equation",
443
+ "img_path": "images/f1034a3e918863ae9221538ebb87ac18cd41a9d6f45a46b9b8e9723d5f55fcca.jpg",
444
+ "text": "$$\n\\phi ^ { k } ( D _ { 1 : i } ) = [ \\underbrace { \\mathbf { 0 } , \\dots , \\mathbf { 0 } } _ { \\operatorname* { m a x } ( k - i , 0 ) } , \\phi ( w _ { 1 } ) , \\phi ( w _ { 2 } ) , \\dots , \\phi ( w _ { \\operatorname* { m i n } ( i , t ) } ) ]\n$$",
445
+ "text_format": "latex",
446
+ "bbox": [
447
+ 310,
448
+ 799,
449
+ 686,
450
+ 838
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "where $k$ is the target length. Sequences shorter than $k$ are left padded with 0 vectors and those longer than $k$ are truncated after $k$ words. Analogous approach has been used by other CNN models for NLP (Dauphin et al., 2016; Conneau et al., 2017). While conceptually simple and easy to implement this approach has a drawback. For imbalanced datasets where document length varies significantly it is difficult to select $k$ . Small $k$ leads to long documents being significantly truncated while large $k$ results in wasted computation on short documents. ",
457
+ "bbox": [
458
+ 173,
459
+ 840,
460
+ 825,
461
+ 924
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "To address this problem we note that convolutional layers in CNN can be straightforwardly applied to variable length input without modification. The problem arises in fully connected layers that can only operate on fixed length activations. We circumvent this by applying an aggregating function before passing the activations to fully connected layers. Formally, given unpadded representation $\\phi ( D )$ the activations from the last convolutional layer $h ^ { l }$ is a matrix where rows corresponds to kernels and columns depend on the length of $\\phi ( D )$ . Since the number of kernels is fixed we can convert this matrix to a fixed length output by applying an aggregating function such as mean or max along the columns. This operation corresponds to global mean/max pooling commonly used in computer vision, and produces an output that can be passed to fully connected layers. Applying this approach eliminates the need for fixed length input and document padding/truncation which saves computation and makes the model more flexible. An alternative to global pooling is to use attention layer (Bahdanau et al., 2015), and in particular self attention (Lin et al., 2017) where the rows of $\\phi ( D )$ are first passed through a softmax functions and then self gated. However, this is beyond the scope of this paper and we leave it for future work. ",
468
+ "bbox": [
469
+ 174,
470
+ 103,
471
+ 825,
472
+ 297
473
+ ],
474
+ "page_idx": 4
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "3.3 LEARNING AND INFERENCE ",
479
+ "text_level": 1,
480
+ "bbox": [
481
+ 176,
482
+ 316,
483
+ 408,
484
+ 330
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "During training we learn $f$ by minimizing the loss in Equation 4. Empirically we found that rather than fixing prediction point $i$ for each document, better results can be obtained with stochastic sampling. Specifically given a forward prediction window $h$ we repeatedly alternate between the following steps: (1) sample document $D \\in \\mathbb { D }$ (2) sample prediction point $i \\stackrel { \\cdot } { \\in } [ \\delta , | D | - h ]$ (3) use gradients from $\\mathcal { L } ( i , D )$ to update $f$ . Here $\\delta > 0$ is an offset parameter to ensure that the model has enough context to do forward prediction. To speed up learning and improve convergence we conduct these steps using document mini batches and averaging the gradients across the mini batch. Note that separate prediction point $i$ is sampled for every document in the mini batch to encourage generalization. Second term in $\\mathcal { L } ( i , D )$ requires computing a summation over all words in the vocabulary which is prohibitively expensive. We address this by using a stochastic approximation with negative word samples. In practice we found that using small samples of 50 randomly sampled words is sufficient to achieve good results on all datasets. This learning algorithm is simple and straightforward to implement. Only two parameters $h$ and $\\delta$ need to be tuned, and unlike skip-thought no sentence tokenizer is required. During inference $f$ is kept fixed and we conduct forward passes to generate embeddings for new documents. ",
491
+ "bbox": [
492
+ 174,
493
+ 343,
494
+ 825,
495
+ 550
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "4 EXPERIMENTS ",
502
+ "text_level": 1,
503
+ "bbox": [
504
+ 176,
505
+ 573,
506
+ 326,
507
+ 588
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "To validate the proposed architecture, we conducted extensive experiments on two publicly available datasets: IMDB (Maas et al., 2011) and Amazon Fine Food Reviews (McAuley & Leskovec, 2013). We implemented our model using the TensorFlow library (Abadi et al., 2016). All experiments were conducted on a server with 6-core Intel i7-6800K $@$ 3.40GHz CPU, Nvidia GeForce GTX 1080 Ti GPU, and 64GB of RAM. ",
514
+ "bbox": [
515
+ 173,
516
+ 604,
517
+ 823,
518
+ 674
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "We found that initializing word embeddings with vectors from word2vec resulted in faster learning and often produced better performance than random initialization. This is consistent with other work in this area (Kim, 2014). We use the pre-trained word2vec vectors taken from the word2vec project page 1, and thus fix the input height to $m \\ : = \\ : 3 0 0$ for all models. Another advantage of training with word2vec is that the large pretrained vocabulary of over a million words and phrases can be used to apply our model to documents that contain previously unseen words. This is especially useful when the training set is small and has limited vocabulary. ",
525
+ "bbox": [
526
+ 176,
527
+ 683,
528
+ 581,
529
+ 809
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "table",
535
+ "img_path": "images/d2b0ecebb937d1ed9bca11e3c804dc2053c3bdcd56530204c03e8a498740c28c.jpg",
536
+ "table_caption": [],
537
+ "table_footnote": [
538
+ "Table 1: Inference speed in tokens per second. "
539
+ ],
540
+ "table_body": "<table><tr><td>Model</td><td>tokens / s</td></tr><tr><td>skip-thought-uni</td><td>27,493</td></tr><tr><td>skip-thought-bi</td><td>14,374</td></tr><tr><td>CNN-pad</td><td>312,744</td></tr><tr><td>CNN-pool</td><td>277,932</td></tr></table>",
541
+ "bbox": [
542
+ 601,
543
+ 684,
544
+ 816,
545
+ 770
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "",
552
+ "bbox": [
553
+ 178,
554
+ 808,
555
+ 808,
556
+ 821
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "For all experiments, we use a six layer CNN architecture for our model with four convolutional layers and two fully connected layers. For the convolutional layers, we use 600 kernels per layer, residual connections every other layer (He et al., 2016), GLU activations (Dauphin et al., 2016) and batch normalization (Ioffe & Szegedy, 2015). ReLU activations are used in fully connected layers. The code with the full model architecture will be released with the final draft of this paper and we thus omit going into further details here. To address the variable length input problem we experiment with both padding (CNN-pad) and global poling (CNN-pool) approaches proposed in Section 3.2. For global pooling we found that max pooling produces better results than average pooling and use max pooling in all experiments. Max pooling has another advantage where by tracing the indexes of the max values chosen for each row back through the network we can infer which parts of the sequence the model is focusing on. ",
563
+ "bbox": [
564
+ 174,
565
+ 827,
566
+ 825,
567
+ 897
568
+ ],
569
+ "page_idx": 4
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "",
574
+ "bbox": [
575
+ 174,
576
+ 103,
577
+ 825,
578
+ 188
579
+ ],
580
+ "page_idx": 5
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "Embeddings from all models including baselines are evaluated by training a shallow classifier using the labeled training instances and we report the test set classification accuracy. This procedure is similar to the one conducted by Le & Mikolov (2014), and evaluates whether the model is able to capture semantic information accurately enough to do NLP tasks such as sentiment classification. ",
585
+ "bbox": [
586
+ 174,
587
+ 194,
588
+ 825,
589
+ 251
590
+ ],
591
+ "page_idx": 5
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "Table 1 shows inference speed in tokens (words) per second for uni-directional and bi-directional skip-thought models as well as our model. These results were generated by doing inference with batch size 1 to remove the effects of across batch GPU parallelization. From the table we see that the CNN architecture is over $1 0 \\mathrm { x }$ faster than uni-directional skip-thought and over $2 0 \\mathrm { x }$ faster than the bi-directional version. Similar results were shown by (Dauphin et al., 2016), and clearly demonstrate the advantage of using CNN over RNN architectures. ",
596
+ "bbox": [
597
+ 174,
598
+ 257,
599
+ 825,
600
+ 340
601
+ ],
602
+ "page_idx": 5
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "4.1 IMDB ",
607
+ "text_level": 1,
608
+ "bbox": [
609
+ 174,
610
+ 361,
611
+ 259,
612
+ 375
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "The IMDB dataset is one of the largest publicly available sentiment analysis datasets collected from the IMDB database. This dataset consists of 50,000 movie reviews that are split evenly into 25,000 training and 25,000 test sets. There are no more than 30 reviews per movie to prevent the model from learning movie specific review patterns. The target sentiment labels are binarized: review scores $\\leq 4$ are treated as negative and scores $\\geq 7$ are treated as positive. In addition to labeled reviews, the dataset also contains 50,000 unlabeled reviews that can be used for unsupervised training. ",
619
+ "bbox": [
620
+ 174,
621
+ 388,
622
+ 825,
623
+ 472
624
+ ],
625
+ "page_idx": 5
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "The average review in this dataset contains approximately 230 words and we experiment with input length $k \\in$ [400, 500, 600] for CNN-pad (see Equation 6). These values roughly correspond to 90’th, 95’th and 97’th percentiles of word length distribution and thus cover a significant portion of the dataset. In our experiments, we found that setting $k = 4 0 0$ produced good results. Furthermore, we were able to match over $90 \\%$ of words to word2vec vectors and opt to simply drop the unmatched words. ",
630
+ "bbox": [
631
+ 174,
632
+ 479,
633
+ 549,
634
+ 617
635
+ ],
636
+ "page_idx": 5
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "For our experiments, the goal is to evaluate the proposed CNN model and its ability to produce compact representations that accurately capture semantic aspects of documents. We use both labeled and unlabeled training reviews to train our model by using the objective outlined in Section 3.2. Training is done with mini batch gradient descent, using batch size of 100 and Adam optimizer (Kingma & Ba, 2014) with learning rate of 0.0003. For each document in the mini batch we sample prediction point $i$ and a set of negative words to make forward-backward passes through the CNN. Using parameter sweeps, we found that predicting $h = 1 0$ words forward with offset of $\\delta \\ : = \\ : 1 0$ and 50 negative words produced good results. ",
641
+ "bbox": [
642
+ 174,
643
+ 626,
644
+ 549,
645
+ 708
646
+ ],
647
+ "page_idx": 5
648
+ },
649
+ {
650
+ "type": "table",
651
+ "img_path": "images/60b2fb12ea6524e18de48acb29c69e61cedc915b730f487bae49473570e87c90.jpg",
652
+ "table_caption": [],
653
+ "table_footnote": [
654
+ "Table 2: IMDB results. Top row: supervised classifiers; bottom row: embedding models $^ +$ classifier. "
655
+ ],
656
+ "table_body": "<table><tr><td>Method</td><td>Accuracy</td></tr><tr><td>N-gram RNN-LM</td><td>86.50%</td></tr><tr><td>NBSVM 3gram</td><td>86.60% 91.87%</td></tr><tr><td>Avg. . word2vec skip-thought-2400 skip-thought-600</td><td>86.25% 82.57% 83.44%</td></tr><tr><td>doc2vec-600</td><td>88.73%</td></tr><tr><td>CNN-pad</td><td>88.74%</td></tr><tr><td>CNN-pool</td><td>88.44%</td></tr></table>",
657
+ "bbox": [
658
+ 578,
659
+ 481,
660
+ 805,
661
+ 650
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "",
668
+ "bbox": [
669
+ 174,
670
+ 708,
671
+ 825,
672
+ 777
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "We compare our model to an extensive set of baselines. These include word2vec, skip-thought and doc2vec. For word2vec (Avg. word2vec) we simply average the representations for all words that appear in a given document. For skip-thought we use the pre-trained model (skip-thought2400) available from the authors’ page, that has been trained on a large book corpus (Kiros et al., 2015). This model outputs significantly larger embeddings of size 2400. We also train another skipthought model (skip-thought-600) on the IMDB training data using the default hyper-parameters and fixing the embedding size to 300 to match our model. In both cases, we report the results from the combined model, which combines the output embeddings from both a unidirectional and bidirectional encoder, as this always yields better results. We further train a doc2vec model using both the distributed bag-of-words and distributed memory methods, setting the encoding dimension to 300 in both cases and using the hyper-parameters from Mesnil et al. (2014). We report results using an embedding that is a concatenation of both methods (doc2vec-600), as this gives the best result. Note that since both skip-thought and doc2vec baselines concatenate embeddings for best results, the final embeddings have dimension 600 and are twice the size of our model. Finally, all baselines are initialized with pre-trained word2vec. ",
679
+ "bbox": [
680
+ 173,
681
+ 785,
682
+ 825,
683
+ 924
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "table",
689
+ "img_path": "images/3f4d5c13bc05d396d682500f4286c72040ee694544d765787b6011c9766eaba8.jpg",
690
+ "table_caption": [
691
+ "Table 4: AFFR results for 2 and 5 class sentiment classification tasks. "
692
+ ],
693
+ "table_footnote": [],
694
+ "table_body": "<table><tr><td>Method</td><td>2-class</td><td>5-class</td></tr><tr><td>Avg. word2vec skip-thought-2400</td><td>81.49%</td><td>46.74%</td></tr><tr><td>skip-thought-600</td><td>86.04% 85.74%</td><td>52.84%</td></tr><tr><td>doc2vec-600</td><td>86.58%</td><td>43.51%</td></tr><tr><td></td><td></td><td>47.34%</td></tr><tr><td>CNN-pad</td><td>86.81%</td><td>52.58%</td></tr><tr><td>CNN-po0l</td><td>86.01%</td><td>51.01%</td></tr></table>",
695
+ "bbox": [
696
+ 187,
697
+ 114,
698
+ 473,
699
+ 234
700
+ ],
701
+ "page_idx": 6
702
+ },
703
+ {
704
+ "type": "image",
705
+ "img_path": "images/1df9a6260a73d0516873edb1e50e9ef1fa4d9a0946217c8f1bda418b316af874.jpg",
706
+ "image_caption": [
707
+ "Figure 2: t-SNE representation of document embeddings produced by our model for the IMDB test set. Points are colored according to the sentiment label. "
708
+ ],
709
+ "image_footnote": [],
710
+ "bbox": [
711
+ 542,
712
+ 102,
713
+ 774,
714
+ 236
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "",
721
+ "bbox": [
722
+ 174,
723
+ 309,
724
+ 825,
725
+ 378
726
+ ],
727
+ "page_idx": 6
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "Results from these experiments are shown in Table 2. For completeness, we also show results for various classification approaches trained in a fully supervised way, these are taken from Mesnil et al. (2014). From the table we see that our approach outperforms both word2vec and skip-thought baselines and performs comparable to doc2vec. Moreover, CNN-pool has comparable performance to CNN-pad suggesting that max pooling can be used to effectively get fixed length representation from variable length input. These results suggest that our model is able to learn a robust embedding function that accurately captures semantic information. Unlike doc2vec, once trained our model can be applied repeatedly to generated embeddings for new documents using a simple forward pass. This is a considerable advantage since inference in the CNN is fully deterministic and can be done in milliseconds on this dataset. It also worth nothing here that CNN language model proposed by Dauphin et al. (2016) used a much shorter context of less than 50 words to generate predictions. These results thus demonstrate that CNN models can also successfully model much longer sequences of over 2K words. ",
732
+ "bbox": [
733
+ 173,
734
+ 386,
735
+ 825,
736
+ 566
737
+ ],
738
+ "page_idx": 6
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.2 AMAZON FINE FOOD REVIEWS ",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 176,
746
+ 589,
747
+ 431,
748
+ 603
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "The Amazon Fine Food Reviews (AFFR) dataset is a collection of 568,454 reviews of Amazon food products left by users up to October 2012 (McAuley & Leskovec, 2013). Each example contains full text of the review, a short summary, and a rating of 1 to 5, which we use as the labels. This dataset does not come with a train-test split and is highly unbalanced. To address this, we perform our own split where we randomly sample 20,000 documents from each class and from these, we randomly select 16,000 for training and 4,000 for testing. This gives us training and test sets with 80,000 and 20,000 documents, respectively. ",
755
+ "bbox": [
756
+ 174,
757
+ 617,
758
+ 825,
759
+ 715
760
+ ],
761
+ "page_idx": 6
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "We train our model using the same architecture and training method as in IMDB experiments, with the only difference being that we set $k = 2 0 0$ for CNN-pad rather than 400. This is due to shorter average length of the AFFR reviews compared to the IMDB reviews. Similarly to IMDB we compare against the same four baselines: word2vec, skip-thought-2400, skip-thought-600 and doc2vec-600. As before, we train a shallow sentiment classifier on top of the generated document embeddings but here we perform both binary 5-class classification. For binary classification, documents labeled 1 and 2 are treated as negative, 4 and 5 as positive, and we discard documents labeled 3. However, all training documents including those labeled 3 are used in the unsupervised phase. ",
766
+ "bbox": [
767
+ 174,
768
+ 722,
769
+ 825,
770
+ 833
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Results for the classification task are shown in Table 3. Our approach performs comparably to the best baselines on each task. Highly competitive performance on the 5-way classification task indicates that our method is capable of successfully learning fine-grained differences between sentiment directly from unlabeled text. These results further support the conclusion that our proposed CNN architecture and learning framework produce robust embeddings that generalize well on NLP tasks of various complexity and size. ",
777
+ "bbox": [
778
+ 174,
779
+ 840,
780
+ 825,
781
+ 922
782
+ ],
783
+ "page_idx": 6
784
+ },
785
+ {
786
+ "type": "table",
787
+ "img_path": "images/78b122deeb5c1e3ea1fc6f4d517ef80e1a3249dec4b023f275901e4f9c02c8b6.jpg",
788
+ "table_caption": [],
789
+ "table_footnote": [],
790
+ "table_body": "<table><tr><td></td><td>Ifoundverylitlelobsterintecan..IalsofoundIcouldpurchase thesame productatmylocalPublix marketatlesscost. 0.755Thisisadecentcanofherrigalthoughnotmyfavorite..Ifoundtheherringalittlonthesoftsidebutstillenjoy them.</td></tr><tr><td>0.733Ireadabout theoverabundanceoflobsterin Maine..Iamnotpaying 3times theamountofthe lobstertailsforshipping</td><td>0.738Youlvetisifyoupdfodyourselftsastaue.on’tusetyourolypastauce.Tolaing</td></tr><tr><td></td><td>This drink is horrible.Thecoconut watertstes like somereally watereddownmilk..Iwouldnot recommendthis toanyone. 0.842Iwasreallyexcitedthatcoconut watercameinflavors.butitiswaytoostrongandit tastes terible..saveyouroney 0.816wowtsufsdiialltesallthei..I&#x27;swul.mrongwhoesynowos.</td></tr><tr><td></td><td>0.810TisisthefrscoferiedhenIgotyKeurigIwassoisapontedinhefavortastedlikeplastc.wouldotrecoed.</td></tr><tr><td></td><td>All I have to do is get the can out and my cat comes running.</td></tr><tr><td></td><td>0.833Although expensive,these are really good.My cat can’t wait to take his pils..</td></tr><tr><td></td><td>0.787My kity can&#x27;t get enough of&#x27;em.She loves them so much that she does anything to get them..</td></tr><tr><td></td><td>0.770EverytimeIopencan,mycatmeowslikeCRAZY.ThisistheonlykindofoodthatIKNOWhelikes.Anditeepshmealthy.</td></tr><tr><td></td><td></td></tr></table>",
791
+ "bbox": [
792
+ 174,
793
+ 103,
794
+ 841,
795
+ 246
796
+ ],
797
+ "page_idx": 7
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "Table 5: Retrieval results on the AFFR dataset. For each query review shown in bold we retrieve top3 most similar reviews using cosine distance between embeddings produced by our model. Cosine distance score is shown on the left for each retrieved result. ",
802
+ "bbox": [
803
+ 174,
804
+ 262,
805
+ 826,
806
+ 304
807
+ ],
808
+ "page_idx": 7
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "4.3 ANALYSIS ",
813
+ "text_level": 1,
814
+ "bbox": [
815
+ 174,
816
+ 328,
817
+ 285,
818
+ 342
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "A common application of document embedding is information retrieval (Le & Mikolov, 2014) where the embedding vectors are indexed and used to quickly retrieve results for given a query. We use this approach to asses the quality of the embeddings that our model generates. Using the AFFR dataset we select several reviews as queries and retrieve top-3 most similar results using embedding cosine distance as similarity measure. The results are shown in Table 4.3, from this table we see that all retrieved reviews are highly relevant to each query both in content and in sentiment. The first group complains about seafood products, the second group is unhappy with a drink product and the last group are cat owners that all like a particular cat food product. Interestingly, the product in the retried reviews varies but both topic and sentiment stay consistent. For instance in the first group the three retrieved reviews are about herring, seafood pasta and lobster. However, similar to the query they are all negative and about seafood. This indicates that the model has learned the concepts of topic and sentiment without supervision and is able to successfully encode them into embeddings. ",
825
+ "bbox": [
826
+ 174,
827
+ 353,
828
+ 825,
829
+ 520
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "To get further visibility into the embeddings produced by our model we applied t-SNE to the embeddings inferred for the IMDB test set. t-SNE compresses the embedding vectors into two dimensions and we plot the corresponding two dimensional points coloring them according to the sentiment label. This plot is shown in Figure 2. From the figure we see a distinct separation between sentiment classes where most negative reviews are near the top and positive reviews are at the bottom. This further validates that the model is able to capture and encode sentiment information making the two classes near linearly separable. ",
836
+ "bbox": [
837
+ 174,
838
+ 527,
839
+ 825,
840
+ 625
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "5 CONCLUSION ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 645,
851
+ 318,
852
+ 661
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We presented a CNN model for document embedding. In this approach successive layers of convolutions are applied to distributed word representations to model increasingly longer range semantic relationships within the document. We further proposed a stochastic forward prediction learning algorithm where the model is trained to predict the successive words for randomly chosen subsequences within the document. This learning procedure has few hyper parameters to tune and is straightforward to implement. Our model is able to take full advantage of parallel execution, and achieves better performance while also being significantly faster than current state-of-the-art RNN models. ",
859
+ "bbox": [
860
+ 174,
861
+ 676,
862
+ 825,
863
+ 787
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "REFERENCES ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 174,
873
+ 102,
874
+ 287,
875
+ 117
876
+ ],
877
+ "page_idx": 8
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. ",
882
+ "bbox": [
883
+ 176,
884
+ 126,
885
+ 823,
886
+ 169
887
+ ],
888
+ "page_idx": 8
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. International Conference on Learning Representations, 2015. ",
893
+ "bbox": [
894
+ 171,
895
+ 178,
896
+ 823,
897
+ 208
898
+ ],
899
+ "page_idx": 8
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "David M Blei, Andrew $\\mathrm { ~ Y ~ N ~ g ~ }$ , and Michael I Jordan. Latent dirichlet allocation. Journal of machine Learning research, 3, 2003. ",
904
+ "bbox": [
905
+ 173,
906
+ 215,
907
+ 823,
908
+ 244
909
+ ],
910
+ "page_idx": 8
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. ",
915
+ "bbox": [
916
+ 171,
917
+ 253,
918
+ 823,
919
+ 284
920
+ ],
921
+ "page_idx": 8
922
+ },
923
+ {
924
+ "type": "text",
925
+ "text": "Alexis Conneau, Holger Schwenk, Lo¨ıc Barrault, and Yann Lecun. Very deep convolutional networks for text classification. In European Chapter of the Association for Computational Linguistics, 2017. ",
926
+ "bbox": [
927
+ 173,
928
+ 292,
929
+ 825,
930
+ 335
931
+ ],
932
+ "page_idx": 8
933
+ },
934
+ {
935
+ "type": "text",
936
+ "text": "Andrew M Dai, Christopher Olah, and Quoc V Le. Document embedding with paragraph vectors. arXiv:1507.07998, 2015. ",
937
+ "bbox": [
938
+ 173,
939
+ 344,
940
+ 821,
941
+ 375
942
+ ],
943
+ "page_idx": 8
944
+ },
945
+ {
946
+ "type": "text",
947
+ "text": "Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. arXiv preprint arXiv:1612.08083, 2016. ",
948
+ "bbox": [
949
+ 174,
950
+ 382,
951
+ 821,
952
+ 412
953
+ ],
954
+ "page_idx": 8
955
+ },
956
+ {
957
+ "type": "text",
958
+ "text": "Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6), 1990. ",
959
+ "bbox": [
960
+ 174,
961
+ 420,
962
+ 825,
963
+ 464
964
+ ],
965
+ "page_idx": 8
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "Zellig S Harris. Distributional structure. Word, 10, 1954. ",
970
+ "bbox": [
971
+ 173,
972
+ 473,
973
+ 549,
974
+ 489
975
+ ],
976
+ "page_idx": 8
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition, 2016. ",
981
+ "bbox": [
982
+ 174,
983
+ 497,
984
+ 823,
985
+ 527
986
+ ],
987
+ "page_idx": 8
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "Felix Hill, Kyunghyun Cho, and Anna Korhonen. Learning distributed representations of sentences from unlabelled data. arXiv preprint arXiv:1602.03483, 2016. ",
992
+ "bbox": [
993
+ 173,
994
+ 536,
995
+ 823,
996
+ 565
997
+ ],
998
+ "page_idx": 8
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1003
+ "bbox": [
1004
+ 174,
1005
+ 574,
1006
+ 821,
1007
+ 603
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "Thomas Hofmann. Probabilistic latent semantic indexing. In Research and Development in Information Retrieval, 1999. ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 613,
1017
+ 823,
1018
+ 642
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. In International Conference on Learning Representations, 2017. ",
1025
+ "bbox": [
1026
+ 174,
1027
+ 651,
1028
+ 823,
1029
+ 694
1030
+ ],
1031
+ "page_idx": 8
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, 2015. ",
1036
+ "bbox": [
1037
+ 171,
1038
+ 703,
1039
+ 823,
1040
+ 733
1041
+ ],
1042
+ "page_idx": 8
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. ",
1047
+ "bbox": [
1048
+ 171,
1049
+ 741,
1050
+ 823,
1051
+ 771
1052
+ ],
1053
+ "page_idx": 8
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Association for Computational Linguistics, 2014. ",
1058
+ "bbox": [
1059
+ 173,
1060
+ 780,
1061
+ 823,
1062
+ 810
1063
+ ],
1064
+ "page_idx": 8
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Yoon Kim. Convolutional neural networks for sentence classification. In Empirical Methods in Natural Language Processing, 2014. ",
1069
+ "bbox": [
1070
+ 173,
1071
+ 818,
1072
+ 825,
1073
+ 848
1074
+ ],
1075
+ "page_idx": 8
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1080
+ "bbox": [
1081
+ 173,
1082
+ 857,
1083
+ 823,
1084
+ 886
1085
+ ],
1086
+ "page_idx": 8
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Neural Information Processing Systems, 2015. ",
1091
+ "bbox": [
1092
+ 174,
1093
+ 895,
1094
+ 820,
1095
+ 924
1096
+ ],
1097
+ "page_idx": 8
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Siwei Lai, Liheng Xu, Kang Liu, and Jun Zhao. Recurrent convolutional neural networks for text classification. In AAAI, 2015. ",
1102
+ "bbox": [
1103
+ 171,
1104
+ 103,
1105
+ 823,
1106
+ 132
1107
+ ],
1108
+ "page_idx": 9
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "Quoc Le and Tomas Mikolov. Distributed representations of sentences and documents. In International Conference on Machine Learning (ICML-14), 2014. ",
1113
+ "bbox": [
1114
+ 171,
1115
+ 141,
1116
+ 823,
1117
+ 170
1118
+ ],
1119
+ "page_idx": 9
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang, Bowen Zhou, and Yoshua Bengio. A structured self-attentive sentence embedding. International Conference on Learning Representations, 2017. ",
1124
+ "bbox": [
1125
+ 176,
1126
+ 178,
1127
+ 823,
1128
+ 222
1129
+ ],
1130
+ "page_idx": 9
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Association for Computational Linguistics, 2011. ",
1135
+ "bbox": [
1136
+ 174,
1137
+ 229,
1138
+ 823,
1139
+ 272
1140
+ ],
1141
+ "page_idx": 9
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Julian John McAuley and Jure Leskovec. From amateurs to connoisseurs: Modeling the evolution of user expertise through online reviews. In World Wide Web, 2013. ",
1146
+ "bbox": [
1147
+ 173,
1148
+ 281,
1149
+ 823,
1150
+ 310
1151
+ ],
1152
+ "page_idx": 9
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. ",
1157
+ "bbox": [
1158
+ 174,
1159
+ 319,
1160
+ 820,
1161
+ 349
1162
+ ],
1163
+ "page_idx": 9
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "Gregoire Mesnil, Tomas Mikolov, Marc’Aurelio Ranzato, and Yoshua Bengio. Ensemble of gen-´ erative and discriminative techniques for sentiment analysis of movie reviews. arXiv preprint arXiv:1412.5335, 2014. ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 357,
1171
+ 825,
1172
+ 400
1173
+ ],
1174
+ "page_idx": 9
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Neural Information Processing Systems, 2013. ",
1179
+ "bbox": [
1180
+ 174,
1181
+ 409,
1182
+ 825,
1183
+ 450
1184
+ ],
1185
+ "page_idx": 9
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Ofir Press and Lior Wolf. Using the output embedding to improve language models. arXiv preprint arXiv:1608.05859, 2016. ",
1190
+ "bbox": [
1191
+ 173,
1192
+ 460,
1193
+ 823,
1194
+ 489
1195
+ ],
1196
+ "page_idx": 9
1197
+ }
1198
+ ]
parse/train/ryHM_fbA-/ryHM_fbA-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryHM_fbA-/ryHM_fbA-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryup8-WCW/ryup8-WCW.md ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MEASURING THE INTRINSIC DIMENSION OF OBJECTIVE LANDSCAPES
2
+
3
+ Chunyuan Li ∗ Duke University cl319@duke.edu
4
+
5
+ Heerad Farkhoor, Rosanne Liu, and Jason Yosinski Uber AI Labs {heerad,rosanne,yosinski}@uber.com
6
+
7
+ # ABSTRACT
8
+
9
+ Many recently trained neural networks employ large numbers of parameters to achieve good performance. One may intuitively use the number of parameters required as a rough gauge of the difficulty of a problem. But how accurate are such notions? How many parameters are really needed? In this paper we attempt to answer this question by training networks not in their native parameter space, but instead in a smaller, randomly oriented subspace. We slowly increase the dimension of this subspace, note at which dimension solutions first appear, and define this to be the intrinsic dimension of the objective landscape. The approach is simple to implement, computationally tractable, and produces several suggestive conclusions. Many problems have smaller intrinsic dimensions than one might suspect, and the intrinsic dimension for a given dataset varies little across a family of models with vastly different sizes. This latter result has the profound implication that once a parameter space is large enough to solve a problem, extra parameters serve directly to increase the dimensionality of the solution manifold. Intrinsic dimension allows some quantitative comparison of problem difficulty across supervised, reinforcement, and other types of learning where we conclude, for example, that solving the inverted pendulum problem is 100 times easier than classifying digits from MNIST, and playing Atari Pong from pixels is about as hard as classifying CIFAR-10. In addition to providing new cartography of the objective landscapes wandered by parameterized models, the method is a simple technique for constructively obtaining an upper bound on the minimum description length of a solution. A byproduct of this construction is a simple approach for compressing networks, in some cases by more than 100 times.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Training a neural network to model a given dataset entails several steps. First, the network designer chooses a loss function and a network architecture for a given dataset. The architecture is then initialized by populating its weights with random values drawn from some distribution. Finally, the network is trained by adjusting its weights to produce a loss as low as possible. We can think of the training procedure as traversing some path along an objective landscape. Note that as soon as a dataset and network architecture are specified, the landscape in its entirety is completely determined. It is instantiated and frozen; all subsequent parameter initialization, forward and backward propagation, and gradient steps taken by an optimizer are just details of how the frozen space is explored.
14
+
15
+ Consider a network parameterized by $D$ weights. We can picture its associated objective landscape as a set of “hills and valleys” in $D$ dimensions, where each point in $\mathbb { R } ^ { D }$ corresponds to a value of the loss, i.e., the elevation of the landscape. If $D = 2$ , the map from two coordinates to one scalar loss can be easily imagined and intuitively understood by those living in a three-dimensional world with similar hills. However, in higher dimensions, our intuitions may not be so faithful, and generally we must be careful, as extrapolating low-dimensional intuitions to higher dimensions can lead to unreliable conclusions. The difficulty of understanding high-dimensional landscapes notwithstanding, it is the lot of neural network researchers to spend their efforts leading (or following?) networks over these multi-dimensional surfaces. Therefore, any interpreted geography of these landscapes is valuable.
16
+
17
+ Several papers have shed valuable light on this landscape, particularly by pointing out flaws in common extrapolation from low-dimensional reasoning. Dauphin et al. (2014) showed that, in contrast to conventional thinking about getting stuck in local optima (as one might be stuck in a valley in our familiar $D = 2$ ), local critical points in high dimension are almost never valleys but are instead saddlepoints: structures which are “valleys” along a multitude of dimensions with “exits” in a multitude of other dimensions. The striking conclusion is that one has less to fear becoming hemmed in on all sides by higher loss but more to fear being waylaid nearly indefinitely by nearly flat regions. Goodfellow et al. (2015) showed another property: that paths directly from the initial point to the final point of optimization are often monotonically decreasing. Though dimension is high, the space is in some sense simpler than we thought: rather than winding around hills and through long twisting corridors, the walk could just as well have taken a straight line without encountering any obstacles, if only the direction of the line could have been determined at the outset.
18
+
19
+ In this paper we seek further understanding of the structure of the objective landscape by restricting training to random slices through it, allowing optimization to proceed in randomly generated subspaces of the full parameter space. Whereas standard neural network training involves computing a gradient and taking a step in the full parameter space $\mathbb { R } ^ { D }$ above), we instead choose a random $d$ -dimensional subspace of $\mathbf { \mathbb { R } } ^ { D }$ , where generally $d < D$ , and optimize directly in this subspace. By performing experiments with gradually larger values of $d$ , we can find the subspace dimension at which solutions first appear, which we call the measured intrinsic dimension of a particular problem. Examining intrinsic dimensions across a variety of problems leads to a few new intuitions about the optimization problems that arise from neural network models.
20
+
21
+ We begin in Sec. 2 by defining more precisely the notion of intrinsic dimension as a measure of the difficulty of objective landscapes. In Sec. 3 we measure intrinsic dimension over a variety of network types and datasets, including MNIST, CIFAR-10, ImageNet, and several RL tasks. Based on these measurements, we draw a few insights on network behavior, and we conclude in Sec. 4.
22
+
23
+ # 2 DEFINING AND ESTIMATING INTRINSIC DIMENSION
24
+
25
+ We introduce the intrinsic dimension of an objective landscape with an illustrative toy problem. Let $\boldsymbol { \theta } ^ { ( D ) } \in \mathbb { R } ^ { D }$ be a parameter vector in a parameter space of dimension $D$ , let $\theta _ { 0 } ^ { ( D ) }$ be a randomly chosen initial parameter vector, and let $\theta _ { * } ^ { ( D ) }$ be the final parameter vector arrived at via optimization.
26
+
27
+ Consider a toy optimization problem where $D = 1 0 0 0$ and where $\theta ^ { ( D ) }$ optimized to minimize a squared error cost function that requires the first 100 elements to sum to 1, the second 100 elements to sum to 2, and so on until the vector has been divided into 10 groups with their requisite 10 sums. We may start from a $\theta _ { 0 } ^ { ( D ) }$ that is drawn from a Gaussian distribution and optimize in $\mathbb { R } ^ { D }$ to find a θ(D)∗ that solves the problem with cost arbitrarily close to zero.
28
+
29
+ Solutions to this problem are highly redundant. With a little algebra, one can find that the manifold of solutions is a 990 dimensional hyperplane: from any point that has zero cost, there are 990 orthogonal directions one can move and remain at zero cost. Denoting as $s$ the dimensionality of the solution set, we define the intrinsic dimensionality $d _ { \mathrm { { i n t } } }$ of a solution as the codimension of the solution set inside of $\mathbb { R } ^ { D }$ :
30
+
31
+ $$
32
+ D = d _ { \mathrm { i n t } } + s
33
+ $$
34
+
35
+ Here the intrinsic dimension $d _ { \mathrm { { i n t } } }$ is 10 $( 1 0 0 0 = 1 0 + 9 9 0 )$ , with 10 corresponding intuitively to the number of constraints placed on the parameter vector. Though the space is large $\begin{array} { r } { \langle D = 1 0 0 0 \rangle } \end{array}$ ), the number of things one needs to get right is small $d _ { \mathrm { i n t } } = 1 0$ ).
36
+
37
+ # 2.1 MEASURING INTRINSIC DIMENSION VIA RANDOM SUBSPACE TRAINING
38
+
39
+ The above example had a simple enough form that we obtained $d _ { \mathrm { i n t } } ~ = ~ 1 0$ by calculation. But in general we desire a method to measure or approximate $d _ { \mathrm { { i n t } } }$ for more complicated problems, including problems with data-dependent objective functions, e.g. neural network training. Random subspace optimization provides such a method.
40
+
41
+ ![](images/0b17a78e2dc4ba94c36e738269255e05953066d6a4ac55c2c576e9a3af2f881f.jpg)
42
+ Figure 1: (left) Illustration of parameter vectors for direct optimization in the $D = 3$ case. (middle) Illustration of parameter vectors and a possible random subspace for the $D = 3 , d = 2$ case. (right) Plot of performance vs. subspace dimension for the toy example of toy example of Sec. 2. The problem becomes both $90 \%$ solvable and $100 \%$ solvable at random subspace dimension 10, so $d _ { \mathrm { i n t 9 0 } }$ and $d _ { \mathrm { i n t 1 0 0 } }$ are 10.
43
+
44
+ Standard optimization, which we will refer to hereafter as the direct method of training, entails evaluating the gradient of a loss with respect to $\theta ^ { ( D ) }$ and taking steps directly in the space of $\theta ^ { ( D ) }$ . To train in a random subspace, we instead define $\theta ^ { ( D ) }$ in the following way:
45
+
46
+ $$
47
+ \theta ^ { ( D ) } = \theta _ { 0 } ^ { ( D ) } + P \theta ^ { ( d ) }
48
+ $$
49
+
50
+ where $P$ is a randomly generated $D \times d$ projection matrix1 and $\theta ^ { ( d ) }$ is a parameter vector in a generally smaller space Rd. θ(D)0 a nd $P$ are randomly generated and frozen (not trained), so the system has only $d$ degrees of freedom. We initialize $\theta ^ { ( d ) }$ to a vector of all zeros, so initially $\theta ^ { ( D ) } = \theta _ { 0 } ^ { ( D ) }$ . This convention serves an important purpose for neural network training: it allows the network to benefit from beginning in a region of parameter space designed by any number of good initialization schemes (Glorot & Bengio, 2010; He et al., 2015) to be well-conditioned, such that gradient descent via commonly used optimizers will tend to work well.2
51
+
52
+ Training proceeds by computing gradients with respect to $\theta ^ { ( d ) }$ and taking steps in that space. Columns of $P$ are normalized to unit length, so steps of unit length in ${ \theta } ^ { \left( d \right) }$ chart out unit length motions of $\theta ^ { ( D ) }$ . Columns of $P$ may also be orthogonalized if desired, but in our experiments we relied simply on the approximate orthogonality of high dimensional random vectors. By this construction $P$ forms an approximately orthonormal basis for a randomly oriented $d$ dimensional subspace of $\mathbb { R } ^ { D }$ , with the origin of the new coordinate system at $\theta _ { 0 } ^ { ( D ) }$ . Fig. 1 (left and middle) shows an illustration of the related vectors.
53
+
54
+ Consider a few properties of this training approach. If $d = D$ and $P$ is a large identity matrix, we recover exactly the direct optimization problem. If $d = D$ but $P$ is instead a random orthonormal basis for all of $\mathbb { R } ^ { D }$ (just a random rotation matrix), we recover a rotated version of the direct problem. Note that for some “rotation-invariant” optimizers, such as SGD and SGD with momentum, rotating the basis will not change the steps taken nor the solution found, but for optimizers with axis-aligned assumptions, such as RMSProp (Tieleman & Hinton, 2012) and Adam (Kingma & Ba, 2014), the path taken through $\theta ^ { ( D ) }$ space by an optimizer will depend on the rotation chosen. Finally, in the general case where $d < D$ and solutions exist in $D$ , solutions will almost surely (with probability 1) not be found if $d$ is less than the codimension of the solution. On the other hand, when $d \geq D - s$ , if the solution set is a hyperplane, the solution will almost surely intersect the subspace, but for solution sets of arbitrary topology, intersection is not guaranteed. Nonetheless, by iteratively increasing $d$ , re-running optimization, and checking for solutions, we obtain one estimate of $d _ { \mathrm { i n t } }$ . We try this sweep of $d$ for our toy problem laid out in the beginning of this section, measuring (by convention as described in the next section) the positive performance (higher is better) instead of loss.3 As expected, the solutions are first found at $d = 1 0$ (see Fig. 1, right), confirming our intuition that for this problem, $d _ { \mathrm { i n t } } = 1 0$ .
55
+
56
+ # 2.2 DETAILS AND CONVENTIONS
57
+
58
+ In the rest of this paper, we measure intrinsic dimensions for particular neural network problems and draw conclusions about the associated objective landscapes and solution sets. Because modeling real data is more complex than the above toy example, and losses are generally never exactly zero, we first choose a heuristic for classifying points on the objective landscape as solutions vs. non-solutions. The heuristic we choose is to threshold network performance at some level relative to a baseline model, where generally we take as baseline the best directly trained model. In supervised classification settings, validation accuracy is used as the measure of performance, and in reinforcement learning scenarios, the total reward (shifted up or down such that the minimum reward is 0) is used. Accuracy and reward are preferred to loss to ensure results are grounded to real-world performance and to allow comparison across models with differing scales of loss and different amounts of regularization included in the loss.
59
+
60
+ We define $d _ { \mathrm { i n t 1 0 0 } }$ as the intrinsic dimension of the “ $100 \%$ solution: solutions whose performance is statistically indistinguishable from baseline solutions. However, when attempting to measure $d _ { \mathrm { i n t 1 0 0 } }$ , we observed it to vary widely, for a few confounding reasons: $d _ { \mathrm { i n t 1 0 0 } }$ can be very high — nearly as high as $D$ — when the task requires matching a very well-tuned baseline model, but can drop significantly when the regularization effect of restricting parameters to a subspace boosts performance by tiny amounts. While these are interesting effects, we primarily set out to measure the basic difficulty of problems and the degrees of freedom needed to solve (or approximately solve) them rather than these subtler effects.
61
+
62
+ Thus, we found it more practical and useful to define and measure $d _ { \mathrm { i n t 9 0 } }$ as the intrinsic dimension of the $90 \%$ solution: solutions with performance at least $90 \%$ of the baseline.
63
+
64
+ We chose $90 \%$ after looking at a number of dimension vs. performance plots (e.g. Fig. 2) as a reasonable trade off between wanting to guarantee solutions are as good as possible, but also wanting measured $d _ { \mathrm { { i n t } } }$ values to be robust to small noise in measured performance. If too high a threshold is used, then the dimension at which performance crosses the threshold changes a lot for only tiny changes in accuracy, and we always observe tiny changes in accuracy due to training noise.
65
+
66
+ If a somewhat different (higher or lower) threshold were chosen, we expect most of conclusions in the rest of the paper to remain qualitatively unchanged. In the future, researchers may find it useful to measure $d _ { \mathrm { i n t } }$ using higher or lower thresholds.
67
+
68
+ # 3 RESULTS AND DISCUSSION
69
+
70
+ # 3.1 MNIST
71
+
72
+ We begin by analyzing a fully connected (FC) classifier trained on MNIST. We choose a network with layer sizes 784–200–200–10, i.e. a network with two hidden layers of width 200; this results in a total number of parameters $D = 1 9 9$ , 210. A series of experiments with gradually increasing subspace dimension $d$ produce monotonically increasing performances, as shown in Fig. 2 (left). By checking the subspace dimension at which performance crosses the $90 \%$ mark, we measure this network’s intrinsic dimension $d _ { \mathrm { i n t 9 0 } }$ at about 750.
73
+
74
+ Some networks are very compressible. A salient initial conclusion is that 750 is quite low. At that subspace dimension, only 750 degrees of freedom $( 0 . 4 \% )$ are being used and 198,460 $( 9 9 . 6 \% )$ unused to obtain $90 \%$ of the performance of the direct baseline model. A compelling corollary of this result is a simple, new way of creating and training compressed networks, particularly networks for applications in which the absolute best performance is not critical. To store this network, one need only store a tuple of three items: $( i )$ the random seed to generate the frozen $\theta _ { 0 } ^ { ( D ) }$ , $( i i )$ the random seed to generate $P$ and $( i i i )$ the 750 floating point numbers in $\theta _ { * } ^ { ( d ) }$ . It leads to compression (assuming 32-bit floats) by a factor of $2 6 0 \times$ from $7 9 3 \mathrm { k B }$ to only $3 . 2 \mathrm { k B }$ , or $0 . 4 \%$ of the full parameter size. Such compression could be very useful for scenarios where storage or bandwidth are limited, e.g. including neural networks in downloaded mobile apps or on web pages.
75
+
76
+ ![](images/54ef7c9f0d8793cd24e21d05672b830f48e30756497dbedc594299d4e7394835.jpg)
77
+ Figure 2: Performance (validation accuracy) vs. subspace dimension $d$ for two networks trained on MNIST: (left) a 784–200–200–10 fully-connected (FC) network $( D = 1 9 9 , 2 1 0 )$ ) and (right) a convolutional network, LeNet $( D = 4 4 , 4 2 6 )$ . The solid line shows performance of a well-trained direct (FC or conv) model, and the dashed line shows the $90 \%$ threshold we use to define $d _ { \mathrm { i n t 9 0 } }$ . The standard derivation of validation accuracy and measured $d _ { \mathrm { i n t 9 0 } }$ are visualized as the blue vertical and red horizontal error bars. We oversample the region around the threshold to estimate the dimension of crossing more exactly. We use one-run measurements for $d _ { \mathrm { i n t 9 0 } }$ of 750 and 290, respectively.
78
+
79
+ This compression approach differs from other neural network compression methods in the following aspects. (i) While it has previously been appreciated that large networks waste parameters (Dauphin & Bengio, 2013) and weights contain redundancy (Denil et al., 2013) that can be exploited for posthoc compression (Wen et al., 2016), this paper’s method constitutes a much simpler approach to compression, where training happens once, end-to-end, and where any parameterized model is an allowable base model. (ii) Unlike layerwise compression models (Denil et al., 2013; Wen et al., 2016), we operate in the entire parameter space, which could work better or worse, depending on the network. (iii) Compared to methods like that of Louizos et al. (2017), who take a Bayesian perspective and consider redundancy on the level of groups of parameters (input weights to a single neuron) by using group-sparsity-inducing hierarchical priors on the weights, our approach is simpler but not likely to lead to compression as high as the levels they attain. $( i \nu )$ Our approach only reduces the number of degrees of freedom, not the number of bits required to store each degree of freedom, e.g. as could be accomplished by quantizing weights (Han et al., 2016). Both approaches could be combined. (v) There is a beautiful array of papers on compressing networks such that they also achieve computational savings during the forward pass (Wen et al., 2016; Han et al., 2016; Yang et al., 2015); subspace training does not speed up execution time during inference. $( \nu i )$ Finally, note the relationships between weight pruning, weight tying, and subspace training: weight pruning is equivalent to finding, post-hoc, a subspace that is orthogonal to certain axes of the full parameter space and that intersects those axes at the origin. Weight tying, e.g. by random hashing of weights into buckets (Chen et al., 2015), is equivalent to subspace training where the subspace is restricted to lie along the equidistant “diagonals” between any axes that are tied together.
80
+
81
+ Robustness of intrinsic dimension. Next, we investigate how intrinsic dimension varies across FC networks with a varying number of layers and varying layer width.4 We perform a grid sweep of networks with number of hidden layers $L$ chosen from $\{ 1 , \bar { 2 } , 3 , 4 , 5 \}$ and width $W$ chosen from $\{ 5 0 , 1 0 0 , 2 0 0 , 4 0 0 \}$ . Fig. S6 in the Supplementary Information shows performance vs. subspace dimension plots in the style of Fig. 2 for all 20 networks, and Fig. 3 shows each network’s $d _ { \mathrm { i n t 9 0 } }$ plotted against its native dimension $D$ . As one can see, $D$ changes by a factor of 24.1 between the smallest and largest networks, but $d _ { \mathrm { i n t 9 0 } }$ changes over this range by a factor of only 1.33, with much of this possibly due to noise.
82
+
83
+ Thus it turns out that the intrinsic dimension changes little even as models grown in width or depth! The striking conclusion is that every extra parameter added to the network — every extra dimension added to $D$ — just ends up adding one dimension to the redundancy of the solution, $s$ .
84
+
85
+ ![](images/59e9bd5859d48efc763d62bdc3e9b40cdc96edc63956e7de65aa025fd6bccd79.jpg)
86
+ Figure 3: Measured intrinsic dimension $d _ { \mathrm { i n t 9 0 } }$ vs number of parameters $D$ for $2 0 ~ \mathrm { F C }$ models of varying width (from 50 to 400) and depth (number of hidden layers from 1 to 5) trained on MNIST. The red interval is the standard derivation of the measurement of $d _ { \mathrm { i n t 9 0 } }$ . Though the number of native parameters $D$ varies by a factor of 24.1, $d _ { \mathrm { i n t 9 0 } }$ varies by only 1.33, with much of that factor possibly due to noise, showing that $d _ { \mathrm { i n t 9 0 } }$ is a fairly robust measure across a model family and that each extra parameter ends up adding an extra dimension directly to the redundancy of the solution. Standard deviation was estimated via bootstrap; see Sec. S5.1.
87
+
88
+ ![](images/9d88733171f64ea09cae90915350fadf173a1ea9c868292574ceeafc80af57bd.jpg)
89
+ Figure 4: Performance vs. number of trainable parameters for (left) FC networks and (right) convolutional networks trained on MNIST. Randomly generated direct networks are shown (gray circles) alongside all random subspace training results (blue circles) from the sweep shown in Fig. S6. FC networks show a persistent gap in dimension, suggesting general parameter inefficiency of FC models. The parameter efficiency of convolutional networks varies, as the gray points can be significantly to the right of or close to the blue manifold.
90
+
91
+ Often the most accurate directly trained models for a problem have far more parameters than needed (Zhang et al., 2017); this may be because they are just easier to train, and our observation suggests a reason why: with larger models, solutions have greater redundancy and in a sense “cover” more of the space.5 To our knowledge, this is the first time this phenomenon has been directly measured. We should also be careful not to claim that all FC nets on MNIST will have an intrinsic dimension of around 750; instead, we should just consider that we have found for this architecture/dataset combination a wide plateau of hyperparamter space over which intrinsic dimension is approximately constant.
92
+
93
+ Are random subspaces really more parameter-efficient for FC nets? One might wonder to what extent claiming 750 parameters is meaningful given that performance achieved $( 9 0 \% )$ is far worse than a state of the art network trained on MNIST. With such a low bar for performance, could a directly trained network with a comparable number of trainable parameters be found that achieves the same performance? We generated 1000 small networks (depth randomly chosen from $\{ 1 , 2 , 3 ,$ , $4 , 5 \}$ , layer width randomly from $\{ 2 , 3 , 5 , 8 , 1 0 , 1 5 , 2 0 , 2 5 \}$ , seed set randomly) in an attempt to find high-performing, small FC networks, but as Fig. 4 (left) shows, a gap still exists between the subspace dimension and the smallest direct FC network giving the same performance at most levels of performance.
94
+
95
+ Measuring $d _ { \mathrm { i n t 9 0 } }$ on a convolutional network. Next we measure $d _ { \mathrm { i n t 9 0 } }$ of a convolutional network, LeNet $_ { \mathrm { T } = 4 4 , 4 2 6 }$ ). Fig. 2 (right) shows validation accuracy vs. subspace dimension $d$ , and we find $d _ { \mathrm { i n t 9 0 } } = 2 9 0$ , or a compression rate of about $1 5 0 \times$ for this network. As with the FC case above, we also do a sweep of random networks,
96
+
97
+ but notice that the performance gap of convnets between direct and subspace training methods becomes closer for fixed budgets, i.e., the number of trainable parameters. Further, the performance of direct training varies significantly, depending on the extrinsic design of convet architectures. We interpret these results in terms of the Minimum Description Length below.
98
+
99
+ Relationship between Intrinsic Dimension and Minimum Description Length (MDL). As discussed earlier, the random subspace training method leads naturally to a compressed representation of a network, where only $d$ floating point numbers need to be stored. We can consider this $d$ as an upper bound on the MDL of the problem solution.6 We cannot yet conclude the extent to which this bound is loose or tight, and tightness may vary by problem. However, to the extent that it is tighter than previous bounds (e.g., just the number of parameters $D$ ) and to the extent that it is correlated with the actual MDL, we can use this interpretation to judge which solutions are more well-suited to the problem in a principled way. As developed by Rissanen (1978) and further by Hinton & Van Camp (1993), holding accuracy constant, the best model is the one with the shortest MDL.
100
+
101
+ Thus, there is some rigor behind our intuitive assumption that LeNet is a better model than an FC network for MNIST image classification, because its intrinsic dimension is lower $\scriptstyle d _ { \mathrm { i n t 9 0 } }$ of $2 9 0 \nu s$ . 750). In this particular case we are lead to a predictable conclusion, but as models become larger, more complex, and more heterogeneous, conclusions of this type will often not be obvious. Having a simple method of approximating MDL may prove extremely useful for guiding model exploration, for example, for the countless datasets less well-studied than MNIST and for models consisting of separate sub-models that may be individually designed and evaluated (Ren et al., 2015; Kaiser et al., 2017). In this latter case, considering the MDL for a sub-model could provide a more detailed view of that sub-model’s properties than would be available by just analyzing the system’s overall validation performance.
102
+
103
+ Finally, note that although our approach is related to a rich body of work on estimating the “intrinsic dimension of a dataset” (Camastra & Vinciarelli, 2002; Kegl, 2003; Fukunaga & Olsen, 1971; Lev- ´ ina & Bickel, 2005; Tenenbaum et al., 2000), it differs in a few respects. Here we do not measure the number of degrees of freedom necessary to represent a dataset (which requires representation of a global $p ( X )$ and per-example properties and thus grows with the size of the dataset), but those required to represent a model for part of the dataset (here $p ( y | X )$ , which intuitively might saturate at some complexity even as a dataset grows very large). That said, in the following section we do show measurements for a corner case where the model must memorize per-example properties.
104
+
105
+ Are convnets always better on MNIST? Measuring $d _ { \mathrm { i n t 9 0 } }$ on shuffled data. Zhang et al. (2017) provocatively showed that large networks normally thought to generalize well can nearly as easily be trained to memorize entire training sets with randomly assigned labels or with input pixels provided in random order. Consider two identically sized networks: one trained on a real, non-shuffled dataset and another trained with shuffled pixels or labels. As noted by Zhang et al. (2017), externally the networks are very similar, and the training loss may even be identical at the final epoch. However, the intrinsic dimension of each may be measured to expose the differences in problem difficulty. When training on a dataset with shuffled pixels — pixels for each example in the dataset subject to a random permutation, chosen once for the entire dataset — the intrinsic dimension of an FC network remains the same at 750, because FC networks are invariant to input permutation. But the intrinsic dimension of a convnet increases from 290 to 1400, even higher than an FC network. Thus while convnets are better suited to classifying digits given images with local structure, when this structure is removed, violating convolutional assumptions, our measure can clearly reveal that many more degrees of freedom are now required to model the underlying distribution. When training on MNIST with shuffled labels — the label for each example is randomly chosen — we redefine our measure of $d _ { \mathrm { i n t 9 0 } }$ relative to training accuracy (validation accuracy is always at chance). We find that memorizing random labels on the 50,000 example MNIST training set requires a very high dimension, $d _ { \mathrm { i n t 9 0 } } = 1 9 0 , 0 0 0$ , or 3.8 floats per memorized label. Sec. S5.2 gives a few further results, in particular that the more labels are memorized, the more efficient memorization is in terms of floats per label. Thus, while the network obviously does not generalize to an unseen validation set, it would seem “generalization” within a training set may be occurring as the network builds a shared infrastructure that makes it possible to more efficiently memorize labels.
106
+
107
+ Table 1: Measured $d _ { \mathrm { i n t 9 0 } }$ on various supervised and reinforcement learning problems.
108
+
109
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=2>MNIST</td><td rowspan=1 colspan=2>MNIST (Shuf Pixels)</td><td rowspan=1 colspan=1>MNIST (Shuf Labels)</td></tr><tr><td rowspan=1 colspan=1>Network Type</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=1>LeNet</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=1>LeNet</td><td rowspan=1 colspan=1>FC</td></tr><tr><td rowspan=1 colspan=1>Parameter Dim. D</td><td rowspan=1 colspan=1>199,210</td><td rowspan=1 colspan=1>44,426</td><td rowspan=1 colspan=1>199,210</td><td rowspan=1 colspan=1>44,426</td><td rowspan=1 colspan=1>959,610</td></tr><tr><td rowspan=1 colspan=1>Intrinsic Dim. dint90</td><td rowspan=1 colspan=1>750</td><td rowspan=1 colspan=1>290</td><td rowspan=1 colspan=1>750</td><td rowspan=1 colspan=1>1,400</td><td rowspan=1 colspan=1>190,000</td></tr></table>
110
+
111
+ <table><tr><td rowspan=1 colspan=1>:</td><td rowspan=1 colspan=2>CIFAR-10</td><td rowspan=1 colspan=1>ImageNet</td><td rowspan=1 colspan=1>Inverted Pendulum</td><td rowspan=1 colspan=1>Humanoid</td><td rowspan=1 colspan=1>Atari Pong</td></tr><tr><td rowspan=1 colspan=1>·</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=1>LeNet</td><td rowspan=1 colspan=1>SqueezeNet</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=1>ConvNet</td></tr><tr><td rowspan=1 colspan=1>…</td><td rowspan=1 colspan=1>656,810</td><td rowspan=1 colspan=1>62,006</td><td rowspan=1 colspan=1>1,248,424</td><td rowspan=1 colspan=1>562</td><td rowspan=1 colspan=1>166,673</td><td rowspan=1 colspan=1>1,005,974</td></tr><tr><td rowspan=1 colspan=1>…</td><td rowspan=1 colspan=1>9,000</td><td rowspan=1 colspan=1>2,900</td><td rowspan=1 colspan=1>&gt; 500k</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>700</td><td rowspan=1 colspan=1>6.000</td></tr></table>
112
+
113
+ # 3.2 CIFAR-10 AND IMAGENET
114
+
115
+ We scale to larger supervised classification problems by considering CIFAR-10 (Krizhevsky & Hinton, 2009) and ImageNet (Russakovsky et al., 2015). When scaling beyond MNIST-sized networks with $D$ on the order of $2 0 0 \mathrm { k }$ and $d$ on the order of 1k, we find it necessary to use more efficient methods of generating and projecting from random subspaces. This is particularly true in the case of ImageNet, where the direct network can easily require millions of parameters. In Sec. S7, we describe and characterize scaling properties of three methods of projection: dense matrix projection, sparse matrix projection (Li et al., 2006), and the remarkable Fastfood transform (Le et al., 2013). We generally use the sparse projection method to train networks on CIFAR-10 and the Fastfood transform for ImageNet.
116
+
117
+ Measured $d _ { \mathrm { i n t 9 0 } }$ values for CIFAR-10 and are ImageNet given in Table 1, next to all previous MNIST results and RL results to come. For CIFAR-10 we find qualitatively similar results to MNIST, but with generally higher dimension (9k vs. 750 for FC and $2 . 9 \mathrm { k }$ vs. 290 for LeNet). It is also interesting to observe the difference of $d _ { \mathrm { i n t 9 0 } }$ across network architectures. For example, to achieve a global ${ > } 5 0 \%$ validation accuracy on CIFAR-10, FC, LeNet and ResNet approximately requires $d _ { \mathrm { i n t 9 0 } } = 9 { \bf k }$ , $2 . 9 \mathrm { k }$ and 1k, respectively, showing that ResNets are more efficient. Full results and experiment details are given in Sec. S8 and Sec. S9. Due to limited time and memory issues, training on ImageNet has not yet given a reliable estimate for $d _ { \mathrm { i n t 9 0 } }$ except that it is over $5 0 0 \mathrm { k }$ .
118
+
119
+ # 3.3 REINFORCEMENT LEARNING ENVIRONMENTS
120
+
121
+ Measuring intrinsic dimension allows us to perform some comparison across the divide between supervised learning and reinforcement learning. In this section we measure the intrinsic dimension of three control tasks of varying difficulties using both value-based and policy-based algorithms. The value-based algorithm we evaluate is the Deep Q-Network (DQN) (Mnih et al., 2013), and the policy-based algorithm is Evolutionary Strategies (ES) (Salimans et al., 2017). Training details are given in Sec. S6.2. For all tasks, performance is defined as the maximum-attained (over training iterations) mean evaluation reward (averaged over 30 evaluations for a given parameter setting). In Fig. 5, we show results of ES on three tasks: InvertedPendulum−v1, Humanoid−v1 in MuJoCo (Todorov et al., 2012), and $\mathtt { P o n g - v 0 }$ in Atari. Dots in each plot correspond to the (noisy) median of observed performance values across many runs for each given $d$ , and the vertical uncertainty bar shows the maximum and minimum observed performance values. The dotted horizontal line corresponds to the usual $90 \%$ baseline derived from the best directly-trained network (the solid horizontal line). A dot is darkened signifying the first $d$ that allows a satisfactory performance. We find that the inverted pendulum task is surprisingly easy, with $d _ { \mathrm { i n t 1 0 0 } } = d _ { \mathrm { i n t 9 0 } } = 4$ , meaning that only four parameters are needed to perfectly solve the problem (see Stanley & Miikkulainen (2002) for a similarly small solution found via evolution). The walking humanoid task is more difficult: solutions are found reliably by dimension 700, a similar complexity to that required to model MNIST with an FC network, and far less than modeling CIFAR-10 with a convnet. Finally, to play Pong on Atari (directly from pixels) requires a network trained in a $^ \mathrm { 6 k }$ dimensional subspace, making it on the same order of modeling CIFAR-10. For an easy side-by-side comparison we list all intrinsic dimension values found for all problems in Table 1. For more complete ES results see Sec. S6.2, and Sec. S6.1 for DQN results.
122
+
123
+ ![](images/831b66bffcd0b1cc8fb481af8fc604dca2fe29209025794c2004232b3ec4d8a3.jpg)
124
+ Figure 5: Results using the policy-based ES algorithm to train agents on (left column) InvertedPendulum−v1, (middle column) Humanoid−v1, and (right column) $\mathtt { P o n g - v 0 }$ . The intrinsic dimensions found are 4, 700, and 6k. This places the walking humanoid task on a similar level of difficulty as modeling MNIST with a FC network (far less than modeling CIFAR-10 with a convnet), and Pong on the same order of modeling CIFAR-10.
125
+
126
+ # 4 CONCLUSIONS AND FUTURE DIRECTIONS
127
+
128
+ In this paper, we have defined the intrinsic dimension of objective landscapes and shown a simple method — random subspace training — of approximating it for neural network modeling problems. We use this approach to compare problem difficulty within and across domains. We find in some cases the intrinsic dimension is much lower than the direct parameter dimension, and hence enable network compression, and in other cases the intrinsic dimension is similar to that of the best tuned models, and suggesting those models are better suited to the problem.
129
+
130
+ Further work could also identify better ways of creating subspaces for reparameterization: here we chose random linear subspaces, but one might carefully construct other linear or non-linear subspaces to be even more likely to contain solutions. Finally, as the field departs from single stackof-layers image classification models toward larger and more heterogeneous networks (Ren et al., 2015; Kaiser et al., 2017) often composed of many modules and trained by many losses, methods like measuring intrinsic dimension that allow some automatic assessment of model components might provide much-needed greater understanding of individual black-box module properties.
131
+
132
+ # ACKNOWLEDGMENTS
133
+
134
+ The authors gratefully acknowledge Zoubin Ghahramani, Peter Dayan, Sam Greydanus, Jeff Clune, and Ken Stanley for insightful discussions, Joel Lehman for initial idea validation, Felipe Such, Edoardo Conti and Xingwen Zhang for helping scale the ES experiments to the cluster, Vashisht Madhavan for insights on training Pong, Shrivastava Anshumali for conversations about random projections, and Ozan Sener for discussion of second order methods. We are also grateful to Paul Mikesell, Leon Rosenshein, Alex Sergeev and the entire OpusStack Team inside Uber for providing our computing platform and for technical support.
135
+
136
+ # REFERENCES
137
+
138
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016.
139
+
140
+ Francesco Camastra and Alessandro Vinciarelli. Estimating the intrinsic dimension of data with a fractal-based method. IEEE Transactions on pattern analysis and machine intelligence, 24(10): 1404–1407, 2002.
141
+
142
+ Wenlin Chen, James T. Wilson, Stephen Tyree, Kilian Q. Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. CoRR, abs/1504.04788, 2015. URL http://arxiv. org/abs/1504.04788.
143
+
144
+ Yann Dauphin and Yoshua Bengio. Big neural networks waste capacity. CoRR, abs/1301.3583, 2013. URL http://arxiv.org/abs/1301.3583.
145
+
146
+ Yann Dauphin, Razvan Pascanu, C¸ aglar Gulc¸ehre, Kyunghyun Cho, Surya Ganguli, and Yoshua ¨ Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. CoRR, abs/1406.2572, 2014. URL http://arxiv.org/abs/1406.2572.
147
+
148
+ Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pp. 2148–2156, 2013.
149
+
150
+ Keinosuke Fukunaga and David R Olsen. An algorithm for finding intrinsic dimensionality of data. IEEE Transactions on Computers, 100(2):176–183, 1971.
151
+
152
+ Raja Giryes, Guillermo Sapiro, and Alexander M Bronstein. Deep neural networks with random gaussian weights: a universal classification strategy? IEEE Trans. Signal Processing, 2016.
153
+
154
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Artificial Intelligence and Statistics, 2010.
155
+
156
+ Ian J. Goodfellow, Oriol Vinyals, and Andrew M. Saxe. Qualitatively characterizing neural network optimization problems. In International Conference on Learning Representations (ICLR 2015), 2015. URL http://arxiv.org/abs/1412.6544.
157
+
158
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. ICLR, 2016.
159
+
160
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In CVPR, 2015.
161
+
162
+ Geoffrey E Hinton and Drew Van Camp. Keeping neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, pp. 5–13. ACM, 1993.
163
+
164
+ Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with $5 0 \mathrm { x }$ fewer parameters and¡ $0 . 5 \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
165
+
166
+ Lukasz Kaiser, Aidan N. Gomez, Noam Shazeer, Ashish Vaswani, Niki Parmar, Llion Jones, and Jakob Uszkoreit. One model to learn them all. CoRR, abs/1706.05137, 2017. URL http: //arxiv.org/abs/1706.05137.
167
+
168
+ Balazs K ´ egl. Intrinsic dimension estimation using packing numbers. In ´ Advances in neural information processing systems, pp. 697–704, 2003.
169
+
170
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
171
+
172
+ James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017. doi: 10.1073/pnas.1611835114. URL http://www.pnas.org/content/114/13/ 3521.abstract.
173
+
174
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, 2009.
175
+
176
+ Quoc Le, Tamas Sarl ´ os, and Alex Smola. Fastfood-approximating kernel expansions in loglinear ´ time. In ICML, 2013.
177
+
178
+ Elizaveta Levina and Peter J Bickel. Maximum likelihood estimation of intrinsic dimension. In Advances in neural information processing systems, pp. 777–784, 2005.
179
+
180
+ Ping Li, T. Hastie, and K. W. Church. Very sparse random projections. In KDD, 2006.
181
+
182
+ C. Louizos, K. Ullrich, and M. Welling. Bayesian Compression for Deep Learning. ArXiv e-prints, May 2017.
183
+
184
+ V. Mnih, K. Kavukcuoglu, D. Silver, A. Graves, I. Antonoglou, D. Wierstra, and M. Riedmiller. Playing Atari with Deep Reinforcement Learning. ArXiv e-prints, December 2013.
185
+
186
+ Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99, 2015.
187
+
188
+ Jorma Rissanen. Modeling by shortest data description. Automatica, 14(5):465–471, 1978.
189
+
190
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 2015.
191
+
192
+ T. Salimans, J. Ho, X. Chen, and I. Sutskever. Evolution Strategies as a Scalable Alternative to Reinforcement Learning. ArXiv e-prints, March 2017.
193
+
194
+ Kenneth Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
195
+
196
+ Joshua B Tenenbaum, Vin De Silva, and John C Langford. A global geometric framework for nonlinear dimensionality reduction. science, 290(5500):2319–2323, 2000.
197
+
198
+ Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26– 31, 2012.
199
+
200
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
201
+
202
+ Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In NIPS, 2016.
203
+
204
+ Zichao Yang, Marcin Moczulski, Misha Denil, Nando de Freitas, Alex Smola, Le Song, and Ziyu Wang. Deep fried convnets. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1476–1483, 2015.
205
+
206
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, 2017.
207
+
208
+ # SUPPLEMENTARY INFORMATION FOR: MEASURING THE INTRINSIC DIMENSION OF OBJECTIVE LANDSCAPES
209
+
210
+ S5 ADDITIONAL MNIST RESULTS AND INSIGHTS
211
+
212
+ S5.1 SWEEPING DEPTHS AND WIDTHS; MULTIPLE RUNS TO ESTIMATE VARIANCE
213
+
214
+ In the main paper, we attempted to find $d _ { \mathrm { i n t 9 0 } }$ across $2 0 ~ \mathrm { F C }$ networks with various depths and widths. A grid sweep of number of hidden layers from $\{ 1 , 2 , 3 , 4 , 5 \}$ and width of each hidden layer from $\{ 5 0 , 1 0 0 , 2 0 0 , 4 0 0 \}$ is performed, and all 20 plots are shown in Fig. S6. For each $d$ we take 3 runs and plot the mean and variance with blue dots and blue error bars. $d _ { \mathrm { i n t 9 0 } }$ is indicated in plots (darkened blue dots) by the dimension at which the median of the 3 runs passes $90 \%$ performance threshold. The variance of $d _ { \mathrm { i n t 9 0 } }$ is estimated using 50 bootstrap samples. Note that the variance of both accuracy and measured $d _ { \mathrm { i n t 9 0 } }$ for a given hyper-parameter setting are generally small, and the mean of performance monotonically increases (very similar to the single-run result) as $d$ increases. This illustrates that the difference between lucky vs. unlucky random projections have little impact on the quality of solutions, while the subspace dimensionality has a great impact. We hypothesize that the variance due to different $P$ matrices will be smaller than the variance due to different random initial parameter vectors $\theta _ { 0 } ^ { ( D ) }$ because there are $d D$ i.i.d. samples used to create $P$ (at least in the dense case) but only D samples used to create θ(D)0 , and aspects of the network depending on smaller numbers of random samples will exhibit greater variance. Hence, in some other experiments we rely on single runs to estimate the intrinsic dimension, though slightly more accurate estimates could be obtained via multiple runs.
215
+
216
+ In similar manner to the above, in Fig. S7 we show the relationship between $d _ { \mathrm { i n t 9 0 } }$ and $D$ across 20 networks but using a per-model, directly trained baseline. Most baselines are slightly below $100 \%$ accuracy. This is in contrast to Fig. 3, which used a simpler global baseline of $100 \%$ across all models. Results are qualitatively similar but with slightly lower intrinsic dimension due to slightly lower thresholds.
217
+
218
+ # S5.2 ADDITIONAL DETAILS ON SHUFFLED MNIST DATASETS
219
+
220
+ Two kinds of shuffled MNIST datasets are considered:
221
+
222
+ • The shuffled pixel dataset: the label for each example remains the same as the normal dataset, but a random permutation of pixels is chosen once and then applied to all images in the training and test sets. FC networks solve the shuffled pixel datasets exactly as easily as the base dataset, because there is no privileged ordering of input dimension in FC networks; all orderings are equivalent.
223
+
224
+ • The shuffled label dataset: the images remain the same as the normal dataset, but labels are randomly shuffled for the entire training set. Here, as in (Zhang et al., 2017), we only evaluate training accuracy, as test set accuracy remains forever at chance level (the training set $X$ and $y$ convey no information about test set $p ( y | X )$ , because the shuffled relationship in test is independent of that of training).
225
+
226
+ On the full shuffled label MNIST dataset (50k images), we trained an FC network $( L = 5 , W = 4 0 0$ , which had $d _ { \mathrm { i n t 9 0 } } = 7 5 0$ on standard MNIST), it yields $d _ { \mathrm { i n t 9 0 } } = 1 9 0 \mathbf { k }$ . We can interpret this as requiring 3.8 floats to memorize each random label (at $90 \%$ accuracy). Wondering how this scales with dataset size, we estimated $d _ { \mathrm { i n t 9 0 } }$ on shuffled label versions of MNIST at different scales and found curious results, shown in Table S2 and Fig. S8. As the dataset memorized becomes smaller, the number of floats required to memorize each label becomes larger. Put another way, as dataset size
227
+
228
+ ![](images/22f6cf28b033235f1b0fb73a2c0f79d622ad25d85f701e5880697d52586fbcfe.jpg)
229
+ Figure S6: A sweep of FC networks on MNIST. Each column contains networks of the same depth, and each row those of the same number of hidden nodes in each of its layers. Mean and variance at each $d$ is shown by blue dots and blue bars. $d _ { \mathrm { i n t 9 0 } }$ is found by dark blue dots, and the variance of it is indicated by red bars spanning in the $d$ axis.
230
+
231
+ ![](images/7b13294e6695562738f8de9a1823312052acdd79672c4be7f0cfc415c1876276.jpg)
232
+ Figure S7: Measured intrinsic dimension $d _ { \mathrm { i n t 9 0 } }$ vs number of parameters $D$ for 20 models of varying width (from 50 to 400) and depth (number of hidden layers from 1 to 5) trained on MNIST. The vertical red interval is the standard derivation of measured $d _ { \mathrm { i n t 9 0 } }$ . As opposed to Fig. 3, which used a global, shared baseline across all models, here a per-model baseline is used. The number of native parameters varies by a factor of 24.1, but $d _ { \mathrm { i n t 9 0 } }$ varies by only 1.42. The per-model baseline results in higher measured $d _ { \mathrm { i n t 9 0 } }$ for larger models because they have a higher baseline performance than the shallower models.
233
+
234
+ Table S2: $d _ { \mathrm { i n t 9 0 } }$ required to memorize shuffled MNIST labels. As dataset size grows, memorization becomes more efficient, suggesting a form of “generalization” from one part of the training set to another, even though labels are random.
235
+
236
+ <table><tr><td>Fraction of MNIST training set</td><td>dint90</td><td>Floats per label</td></tr><tr><td>100%</td><td>190k</td><td>3.8</td></tr><tr><td>50%</td><td>130k</td><td>5.2</td></tr><tr><td>10%</td><td>90k</td><td>18.0</td></tr></table>
237
+
238
+ ![](images/5449e19f3a50347a22f167fa33e80a3ffe98a125b190912454ac5fd7a0feb2ad.jpg)
239
+ Figure S8: Training accuracy vs. subspace dimension $d$ for a FC networks $W { = } 4 0 0$ , $L { = } 5$ ) trained on a shuffled label version of MNIST containing $100 \%$ , $50 \%$ , and $10 \%$ of the dataset.
240
+
241
+ increases, the intrinsic dimension also increases, but not as fast as linearly. The best interpretation is not yet clear, but one possible interpretation is that networks required to memorize large training sets make use of shared machinery for memorization. In other words, though performance does not generalize to a validation set, generalization within a training set is non-negligible even though labels are random.
242
+
243
+ # S5.3 TRAINING STABILITY
244
+
245
+ An interesting tangential observation is that random subspace training can in some cases make optimization more stable. First, it helps in the case of deeper networks. Fig. S9 shows training results for FC networks with up to 10 layers. SGD with step 0.1, and ReLUs with He initialization is used. Multiple networks failed at depths 4, and all failed at depths higher than 4, despite the activation function and initialization designed to make learning stable (He et al., 2015). Second, for MNIST with shuffled labels, we noticed that it is difficult to reach high training accuracy using the direct training method with SGD, though both subspace training with SGD and either type of training with Adam reliably reach $100 \%$ memorization as $d$ increases (see Fig. S8).
246
+
247
+ Because each random basis vector projects across all $D$ direct parameters, the optimization problem may be far better conditioned in the subspace case than in the direct case. A related potential downside is that projecting across $D$ parameters which may have widely varying scale could result in ignoring parameter dimensions with tiny gradients. This situation is similar to that faced by methods like SGD, but ameliorated by RMSProp, Adam, and other methods that rescale per-dimension step sizes to account for individual parameter scales. Though convergence of the subspace approach seems robust, further work may be needed to improve network amenability to subspace training: for example by ensuring direct parameters are similarly scaled by clever initialization or by inserting a pre-scaling layer between the projected subspace and the direct parameters themselves.
248
+
249
+ # S5.4 THE ROLE OF OPTIMIZERS
250
+
251
+ Another finding through our experiments with MNIST FC networks has to do with the role of optimizers. The same set of experiments are run with both SGD (learning rate 0.1) and ADAM (learning rate 0.001), allowing us to investigate the impact of stochastic optimizers on the intrinsic dimension achieved.
252
+
253
+ ![](images/9fb71da3a74cbe02b17c47e03b13651c24d1b2ece0ac4352e1133fb9ffb92053.jpg)
254
+ Figure S9: Results of subspace training versus the number of layers in a fully connected network trained on MNIST. The direct method always fail to converge when $L > 5$ , while subspace training yields stable performance across all depths.
255
+
256
+ The intrinsic dimension $d _ { \mathrm { i n t 9 0 } }$ are reported in Fig. S10 (a)(b). In addition to two optimizers we also use two baselines: Global baseline that is set up as $90 \%$ of best performance achieved across all models, and individual baseline that is with regards to the performance of the same model in direct training.
257
+
258
+ # S6 ADDITIONAL REINFORCEMENT LEARNING RESULTS AND DETAILS
259
+
260
+ # S6.1 DQN EXPERIMENTS
261
+
262
+ DQN on Cartpole We start with a simple classic control game CartPole−v0 in OpenAI Gym (Brockman et al., 2016). A pendulum starts upright, and the goal is to prevent it from falling over. The system is controlled by applying a force of LEFT or RIGHT to the cart. The full game ends when one of two failure conditions is satisfied: the cart moves more than 2.4 units from the center (where it started), or the pole is more than 15 degrees from vertical (where it started). A reward of $+ 1$ is provided for every time step as long as the game is going. We further created two easier environments Pole and Cart, each confined by one of the failure modes only.
263
+
264
+ A DQN is used, where the value network is parameterized by an FC $( L = 2 , W = 4 0 0 )$ . For each subspace $d$ at least 5 runs are conducted, the mean of which is used to computed $d _ { \mathrm { i n t 9 0 } }$ , and the baseline is set as $1 9 5 . 0 ^ { 7 }$ . The results are shown in Fig. S11. The solid line connects mean rewards within a run over the last 100 episodes, across different $d \mathrm { s }$ . Due to the noise-sensitiveness of RL games the course is not monotonic any more. The intrinsic dimension for CartPole, Pole and Cart is $d _ { \mathrm { i n t 9 0 } } = 2 5$ , 23 and 7, respectively. This reveals that the difficulty of optimization landscape of these games is remarkably low, as well as interesting insights such as driving a cart is much easier than keeping a pole straight, the latter being the major cause of difficulty when trying to do both.
265
+
266
+ S6.2 EVOLUTIONARY STRATEGIES (ES) COMPLETE RESULTS
267
+
268
+ We carry out with ES 3 RL tasks: InvertedPendulum−v1, Humanoid−v1, Pong−v0. The hyperparameter settings for training are in Table S3.
269
+
270
+ Inverted pendulum The InvertedPendulum−v1 environment uses the MuJoCo physics simulator (Todorov et al., 2012) to instantiate the same problem as CartPole−v0 in a realistic setting. We expect that even with richer environment dynamics, as well as a different RL algorithm – ES – the intrinsic dimensionality should be similar. As seen in Fig. 5, the measured intrinsic dimensionality $d _ { \mathrm { i n t 9 0 } } = 4$ is of the same order of magnitude, but smaller. Interestingly, although the environment dynamics are more complex than in CartPole−v0, using ES rather than DQN seems to induce a simpler objective landscape.
271
+
272
+ ![](images/18f547a380c6784793e8b80e86c12457335df9a17a5ef2d38173c584031cc110.jpg)
273
+ Figure S10: The role of optimizers on MNIST FC networks. The transparent dots indicate SGD results, and opaque dots indicate Adam results. Adam generally yields higher intrinsic dimensions because higher baselines are achieved, especially when individual baselines in (b) are used. Note that the Adam points are slightly different between Fig. 3 and Fig. S7, because in the former we average over three runs, and in the latter we show one run each for all optimization methods.
274
+
275
+ ![](images/ff228f1b6376cfc2f9a6ed83d1e9d04375e4135120c9605b1b405a0f15ef3975.jpg)
276
+ Figure S11: Subspace training of DQN on CartPole game. Shown as dots are rewards collected through a game run averaged over the last 100 episodes, under each subspace training of DQN, and each game environment. The line connects mean rewards across different ds.
277
+
278
+ Learning to walk A more challenging problem is Humanoid−v1 in MuJoCo simulator. Intuitively, one might believe that learning to walk is a more complex task than classifying images. Our results show the contrary – that the learned intrinsic dimensionality of $d _ { \mathrm { i n t 9 0 } } = 7 0 0$ is similar to that of MNIST on a fully-connected network $d _ { \mathrm { i n t 9 0 } } = 6 5 0 $ ) but significantly less than that of even a convnet trained on CIFAR-10 $\ d _ { \mathrm { i n t 9 0 } } = 2 , 5 0 0 $ . Fig. 5 shows the full results. Interestingly, we begin to see training runs reach the threshold as early as $d = 4 0 0$ , with the median performance steadily increasing with $d$ .
279
+
280
+ Table S3: Hyperparameters used in training RL tasks using ES. $\sigma$ refers to the parameter perturbation noise used in ES. Default Adam parameters of $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 \stackrel { } { \times } 1 0 ^ { - 7 }$ were used.
281
+
282
+ <table><tr><td></td><td>l2 penalty</td><td>Adam LR</td><td>ESσ</td><td>Iterations</td></tr><tr><td>InvertedPendulum-v1</td><td>1×10-8</td><td>3×10-1</td><td>2×10-2</td><td>1000</td></tr><tr><td>Humanoid-v1</td><td>5 ×10-3</td><td>3 ×10-2</td><td>2×10-2</td><td>2000</td></tr><tr><td>Pong-v0</td><td>5×10-3</td><td>3 ×10-2</td><td>2×10-2</td><td>500</td></tr></table>
283
+
284
+ Atari Pong Finally, using a base convnet of approximately $D = 1 M$ in the $\mathtt { P o n g - v 0 }$ pixels-toactions environment (using 4-frame stacking). The agent receives an image frame (size of $2 1 0 \times$ $1 6 0 \times 3 )$ and the action is to move the paddle UP or DOWN. We were able to determine $d _ { \mathrm { i n t 9 0 } } =$ $6 , 0 0 0$ .
285
+
286
+ # S7 THREE METHODS OF RANDOM PROJECTION
287
+
288
+ Scaling the random subspace training procedure to large problems requires an efficient way to map from $\mathbb { R } ^ { d }$ into a random $d$ -dimensional subspace of $\mathbb { R } ^ { \breve { D } }$ that does not necessarily include the origin. Algebraically, we need to left-multiply a vector of parameters $v \in \mathbb { R } ^ { d }$ by a random matrix $M \in$ $\mathbb { R } ^ { \breve { D } \times d }$ , whose columns are orthonormal, then add an offset vector $\theta _ { 0 } \in \mathbb { R } ^ { \bar { D } }$ . If the low-dimensional parameter vector in $\mathbb { R } ^ { d }$ is initialized to zero, then specifying an offset vector is equivalent to choosing an initialization point in the original model parameter space $\mathbb { R } ^ { D }$ .
289
+
290
+ A na¨ıve approach to generating the random matrix $M$ is to use a dense $D \times d$ matrix of independent standard normal entries, then scale each column to be of length 1. The columns will be approximately orthogonal if $D$ is large because of the independence of the entries. Although this approach is sufficient for low-rank training of models with few parameters, we quickly run into scaling limits because both matrix-vector multiply time and storage of the matrix scale according to $\mathcal { O } ( D d )$ . We were able to successfully determine the intrinsic dimensionality of MNIST $( d { = } 2 2 5 )$ using a LeNet $( D { = } 4 4 { , } 4 2 6 )$ ), but were unable to increase $d$ beyond 1,000 when applying a LeNet $\scriptstyle D = 6 2 , 0 0 6 )$ t o CIFAR-10, which did not meet the performance criterion to be considered the problems intrinsic dimensionality.
291
+
292
+ Random matrices need not be dense for their columns to be approximately orthonormal. In fact, a method exists for “very sparse” random projections (Li et al., 2006), which achieves a density of $\scriptstyle { \frac { 1 } { \sqrt { D } } }$ To construct the $D \times d$ matrix, each entry is chosen to be nonzero with probability $\scriptstyle { \frac { 1 } { \sqrt { D } } }$ . If chosen, then with equal probability, the entry is either positive or negative with the same magnitude in either√ √ case. The density of $\scriptstyle { \frac { 1 } { \sqrt { D } } }$ implies $\sqrt { D } d$ nonzero entries, or $\mathcal { O } ( \sqrt { D } d )$ time and space complexity. Implementing this procedure allowed us to find the intrinsic dimension of $d { = } 2 , 5 0 0$ for CIFAR-10 using a LeNet mentioned above. Unfortunately, when using Tensorflow’s SparseTensor imple-√ mentation we did not achieve the theoretical $\sqrt { D }$ -factor improvement in time complexity (closer to a constant 10x). Nonzero elements also have a significant memory footprint of 24 bytes, so we could not scale to larger problems with millions of model parameters and large intrinsic dimensionalities.
293
+
294
+ We need not explicitly form and store the transformation matrix. The Fastfood transform (Le et al., 2013) was initially developed as an efficient way to compute a nonlinear, high-dimensional feature map $\phi ( x )$ for a vector $x$ . A portion of the procedure involves implicitly generating a $D \times d$ matrix with approximately uncorrelated standard normal entries, using only $\mathcal { O } ( D )$ space, which can be multiplied by $v$ in ${ \mathcal { O } } ( D \log d )$ time using a specialized method. The method relies on the fact that Hadamard matrices multiplied by Gaussian vectors behave like dense Gaussian matrices. In detail, to implicitly multiply $v$ by a random square Gaussian matrix $M$ with side-lengths equal to a power of two, the matrix is factorized into multiple simple matrices: $M \ = \ H G { \bar { \Pi } } H B$ , where $B$ is a random diagonal matrix with entries $+ - 1$ with equal probability, $H$ is a Hadamard matrix, $\Pi$ is a random permutation matrix, and $G$ is a random diagonal matrix with independent standard normal entries. Multiplication by a Hadamard matrix can be done via the Fast Walsh-Hadamard Transform in ${ \mathcal { O } } ( d \log d )$ time and takes no additional space. The other matrices have linear time and space complexities. When $D > d$ , multiple independent samples of $M$ can be stacked to increase the output dimensionality. When $d$ is not a power of two, we can zero-pad $v$ appropriately. Stacking $\textstyle { \frac { D } { d } }$ samples of $M$ results in an overall time complexity of $\begin{array} { r } { \mathcal { O } ( \frac { D } { d } d \log ^ { * } d ) = \mathcal { O } ( \dot { D } \log d ) } \end{array}$ , and a space complexity of $\begin{array} { r } { \mathcal { O } ( \frac { D } { d } d ) = \mathcal { O } ( D ) } \end{array}$ . In practice, the reduction in space footprint allowed us to scale to much larger problems, including the Pong RL task using a 1M parameter convolutional network for the policy function.
295
+
296
+ Table S4 summarizes the performance of each of the three methods theoretically and empirically.
297
+
298
+ <table><tr><td></td><td>Time complexity</td><td>Space complexity</td><td>D=100k</td><td>D=1M</td><td>D= 60M</td></tr><tr><td>Dense</td><td>O(Dd)</td><td>O(Dd)</td><td>0.0169 s</td><td>1.0742 s*</td><td>4399.1 s*</td></tr><tr><td>Sparse</td><td>O(√Dd)</td><td>0(√Dd)</td><td>0.0002 s</td><td>0.0019 s</td><td>0.5307 s*</td></tr><tr><td>Fastfood</td><td>O(D log d)</td><td>(D)</td><td>0.0181 s</td><td>0.0195 s</td><td>0.7949 s</td></tr></table>
299
+
300
+ Table S4: Comparison of theoretical complexity and average duration of a forward+backward pass through $M$ (in seconds). $d$ was fixed to $1 \%$ of $D$ in each measurement. $D = 1 0 0 \mathrm { k \Omega }$ is approximately the size of an MNIST fully-connected network, and $D = 6 0 \mathbf { M }$ is approximately the size of AlexNet. The Fastfood timings are based on a Tensorflow implementation of the Fast Walsh-Hadamard Transform, and could be drastically reduced with an efficient CUDA implementation. Asterisks mean that we encountered an out-of-memory error, and the values are extrapolated from the largest successful run (a few powers of two smaller). For example, we expect sparse to outperform Fastfood if it didn’t run into memory issues.
301
+
302
+ Figure S4 compares the computational time for direct and subspace training (various projections) methods for each update. Our subspace training is more computational expensive, because the subspace training method has to propagate the signals through two modules: the layers of neural networks, and the projection between two spaces. The direct training only propagates signals in the layers of neural networks. We have made efforts to reduce the extra computational cost. For example, the sparse projection less than doubles the time cost for a large range of subspace dimensions.
303
+
304
+ ![](images/35cb8699491ce3f605ca31abab4812feee854f34f482ea6d96860e11cab612cb.jpg)
305
+ Figure S12: MNIST compute time for direct vs. various projection methods for $1 0 0 \mathrm { k }$ parameters (left) and 1M parameters (right).
306
+
307
+ # S8 ADDITIONAL CIFAR-10 RESULTS
308
+
309
+ FC networks We consider the CIFAR-10 dataset and test the same set of FC and LeNet architectures as on MNIST. For FC networks, $d _ { \mathrm { i n t 9 0 } }$ values for all 20 networks are shown in Fig. S13 (a) plotted against the native dimension $D$ of each network; $D$ changes by a factor of 12.16 between the smallest and largest networks, but $d _ { \mathrm { i n t 9 0 } }$ changes over this range by a factor of 5.0. However, much of this change is due to change of baseline performance. In Fig. S13 (b), we instead compute the intrinsic dimension with respect to a global baseline: $50 \%$ validation accuracy. $d _ { \mathrm { i n t 9 0 } }$ changes over this range by a factor of 1.52. This indicates that various FC networks share similar intrinsic dimension $( d _ { \mathrm { i n t 9 0 } } = 5 0 0 0 \sim 8 0 0 0 )$ to achieve the same level of task performance. For LeNet $( D = 6 2 , 0 0 6 )$ , the validation accuracy vs. subspace dimension $d$ is shown in Fig. S14 (b), the corresponding $d _ { \mathrm { i n t 9 0 } } = 2 9 0 0$ . It yields a compression rate of $5 \%$ , which is 10 times larger than LeNet on MNIST. It shows that CIFAR-10 images are significantly more difficult to be correctly classified than MNIST. In another word, CIFAR-10 is a harder problem than MNIST, especially given the fact that the notion of “problem solved” (baseline performance) is defined as $9 9 \%$ accuracy on MNIST and $58 \%$ accuracy on CIFAR-10. On the CIFAR-10 dataset, as $d$ increases, subspace training tends to overfitting; we study the role of subspace training as a regularizer below.
310
+
311
+ ![](images/f4ff1ad9761393131f5cc6872924e95ca592a7b2b8f7e4bac80460da0b12f265.jpg)
312
+ Figure S13: Intrinsic dimension of FC networks with various width and depth on the CIFAR-10 dataset. In (b), we use a simple $50 \%$ baseline globally.
313
+
314
+ ResNet vs. LeNet We test ResNets, compare to LeNet, and find they make efficient use of parameters. We adopt the smallest 20-layer structure of ResNet with $2 8 0 \mathrm { k }$ parameters, and find out in Fig. S14 (b) that it reaches LeNet baseline with $d _ { \mathrm { i n t 9 0 } } = 1 0 0 0 \sim 2 0 0 0$ (lower than the $d _ { \mathrm { i n t 9 0 } }$ of LeNet), while takes a larger $d _ { \mathrm { i n t 9 0 } }$ $( 2 0 , 0 0 0 \sim 5 0 , 0 0 0 )$ to reach reach its own, much higher baseline.
315
+
316
+ The role of regularizers Our subspace training can be considered as a regularization scheme, as it restricts the solution set. We study and compare its effects with two traditional regularizers with an FC network $\scriptstyle { L = 2 }$ , $W { = } 2 0 0$ ) on CIFAR-10 dataset, including $\ell _ { 2 }$ penalty on the weights (i.e., weight decay) and Dropout.
317
+
318
+ • $\ell _ { 2 }$ penalty Various amount of $\ell _ { 2 }$ penalty from $\{ 1 0 ^ { - 2 } , 1 0 ^ { - 3 } , 5 \times 1 0 ^ { - 4 } , 1 0 ^ { - 4 } , 1 0 ^ { - 5 } , 0 \}$ are considered. The accuracy and negative log-likelihood (NLL) are reported in Fig. S15 (a) (b), respectively. As expected, larger amount of weight decay reduces the gap between training and testing performance for both direct and subspace training methods, and eventually closes the gap (i.e., $\ell _ { 2 }$ penalty $= 0 . 0 1$ ). Subspace training itself exhibits strong regularization ability, especially when $d$ is small, at which the performance gap between training and testing is smaller. Dropout Various dropout rates from $\{ 0 . 5 , 0 . 4 , 0 . 3 , 0 . 2 , 0 . 1 , 0 \}$ are considered. The accuracy and NLL are reported in Fig. S16. Larger dropout rates reduce the gap between training and testing performance for both direct and subspace training methods. When observing testing NLL, subspace training tends to overfit the training dataset less. Subspace training as implicit regularization Subspace training method performs implicit regularization, as it restricts the solution set. We visualized the testing NLL in Fig. S17. Subspace training method outperforms direct method when $d$ is properly chosen (when $\ell _ { 2 }$ penalty $< 5 { \times } 1 0 ^ { - \widetilde { 4 } }$ , or dropout rate $< 0 . 1$ ), suggesting the potential of this method as a better alternative to traditional regularizers. When $d$ is large, the method also overfits the training dataset. Note that the these methods perform regularization in different ways: weight decay enforces the learned weights concentrating around zeros, while subspace training directly reduces the number of dimensions of the solution space.
319
+
320
+ ![](images/6bfb5cffc047146cafef6d9a23f56ab37696897421a91f96f040ee9ef74948e6.jpg)
321
+ Figure S14: Validation accuracy of an FC network, LeNet and ResNet on CIFAR with different subspace dimension $d$ . In (a)(b), the variance of validation accuracy and measured $d _ { \mathrm { i n t 9 0 } }$ are visualized as the blue vertical and red horizontal error bars, respectively. Subspace method surpasses the $90 \%$ baseline on LeNet at $d$ between 1000 and 2000, $90 \%$ of ResNet baseline between $2 0 \mathrm { k }$ and $5 0 \mathrm { k }$ .
322
+
323
+ # S9 IMAGENET
324
+
325
+ To investigate even larger problems, we attempted to measure $d _ { \mathrm { i n t 9 0 } }$ for an ImageNet classification network. We use a relatively smaller network, SqueezeNet by Iandola et al. (2016), with 1.24M parameters. Larger networks suffered from memory issues. A direct training produces Top-1 accuracy of $5 5 . 5 \%$ . We vary intrinsic dimension from 50k, 100k, 200k, 500k, 800k, and record the validation accuracies as shown in Fig. S18. The training of each intrinsic dimension takes about 6 to 7 days, distributed across 4 GPUs. Due to limited time, training on ImageNet has not yet produced a reliable estimate for $d _ { \mathrm { i n t 9 0 } }$ except that it is over $5 0 0 \mathrm { k }$ .
326
+
327
+ # S10 INVESTIGATION OF CONVOLUTIONAL NETWORKS
328
+
329
+ Since the learned $d _ { \mathrm { i n t 9 0 } }$ can be used as a robust measure to study the fitness of neural network architectures for specific tasks, we further apply it to understand the contribution of each component in convolutional networks for image classification task. The convolutional network is a special case of FC network in two aspects: local receptive fields and weight-tying. Local receptive fields force each filter to “look” only at a small, localized region of the image or layer below. Weight-tying enforces that each filter shares the same weights, which reduces the number of learnable parameters. We performed control experiments to investigate the degree to which each component contributes. Four variants of LeNet are considered:
330
+
331
+ ![](images/77f96669cc8f3b5046b896a136ce764ec3439b380166512e2536f2cecf6b51dd.jpg)
332
+ Figure S15: Comparing regularization induced by $\ell _ { 2 }$ penalty and subspace training. Weight decay interacts with $d _ { \mathrm { i n t 9 0 } }$ since it changes the objective landscapes through various loss functions.
333
+
334
+ ![](images/97a93deefc60e256eb72c7bfe3c9b1607890552f3155ab1eefdfed39ef77c69e.jpg)
335
+ Figure S16: Comparing regularization induced by Dropout and subspace training. Dropout interacts with $d _ { \mathrm { i n t 9 0 } }$ since it changes the objective landscapes through randomly removing hidden units of the extrinsic neural networks.
336
+
337
+ ![](images/eff8c49aa9f51992acc39cc90efcb5a7bd587274759a3574ffdbb9f7e1ff6f6a.jpg)
338
+ Figure S17: Comparing regularization induced by $\ell _ { 2 }$ penalty, Dropout and subspace training. The gray surface and black line indicate direct training.
339
+
340
+ ![](images/3fc0f005d34fbef5b3b23db25a6e75a557ad894453d75858b0529b63078a90c6.jpg)
341
+ Figure S18: Validation accuracy of SqueezeNet on ImageNet with different $d$ . At $d = 5 0 0 k$ the accuracy reaches $3 4 . 3 4 \%$ , which is not yet past the threshold required to estimate $d _ { \mathrm { i n t 9 0 } }$ .
342
+
343
+ • Standard LeNet 6 kernels $\left( 5 \times 5 \right)$ – max-pooling $( 2 \times 2 ) - 1 6$ kernels $\left( 5 \times 5 \right)$ – max-pooling $( 2 \times 2 ) - 1 2 0 \ : \mathrm { F C } - 8 4 \ : \mathrm { F C } - 1 0 \ : \mathrm { F C }$
344
+ Untied-LeNet The same architecture with the standard LeNet is employed, except that weights are unshared, i.e., a different set of filters is applied at each different patch of the input. For example in Keras, the LocallyConnected2D layer is used to replace the Conv2D layer.
345
+ • FCTied-LeNet The same set of filters is applied at each different patch of the input. we break local connections by applying filters to global patches of the input. Assume the image size is $H \times H$ , the architecture is 6 kernels $\bar { ( ( 2 H - 1 ) \times ( 2 H - 1 ) ) }$ – max-pooling $( 2 \times 2 )$ – 16 kernels $( ( H - 1 ) \times ( H - 1 ) )$ – max-pooling $( 2 \times 2 ) - 1 2 0 \ : \mathrm { F C } - 8 4 \ : \mathrm { F C } - 1 0$ FC. The padding type is same. FC-LeNet Neither local connections or tied weights is employed, we mimic LeNet with its FC implementation. The same number of hidden units as the standard LeNet are used at each layer.
346
+
347
+ The results are shown in Fig. S19 (a)(b). We set a crossing-line accuracy (i.e., threshold) for each task, and investigate $d _ { \mathrm { i n t 9 0 } }$ needed to achieve it. For MNIST and CIFAR-10, the threshold is $90 \%$ and $45 \%$ , respectively. For the above LeNet variants, $d _ { \mathrm { i n t 9 0 } } = 2 9 0 , 6 0 0 , 4 2 5 , 2 0 0 0$ on MNIST, and $d _ { \mathrm { i n t 9 0 } } = 1 0 0 0 , 2 7 5 0 , 2 5 0 0 , 3 5 0 0 0$ on CIFAR-10. Experiments show both tied-weights and local connections are important to the model. That tied-weights should matter seems sensible. However, models with maximal convolutions (convolutions covering the whole image) may have had the same intrinsic dimension as smaller convolutions, but this turns out not to be the case.
348
+
349
+ ![](images/eaad18c0a6696dd9bc6429a0eb3630db2b6dced6094e85910f9bf3178f0aba13.jpg)
350
+ Figure S19: Validation accuracy of LeNet variants with different subspace dimension $d$ . The conclusion is that convnets are more efficient than FC nets both due to local connectivity and due to weight tying.
351
+
352
+ # S11 SUMMARIZATION OF $d _ { \mathrm { i n t 9 0 } }$
353
+
354
+ We summarize $d _ { \mathrm { i n t 9 0 } }$ of the objective landscape on all different problems and neural network architectures in Table S5 and Fig. S20. “SP” indicates shuffled pixel, and “SL” for shuffled label, and “FC- $. 5 ^ { \mathrm { , } }$ for a 5-layer FC. $d _ { \mathrm { i n t 9 0 } }$ indicates the minimum number of dimensions of trainable parameters required to properly solve the problem, and thus reflects the difficulty level of problems.
355
+
356
+ Table S5: Intrinsic dimension of different objective landscapes, determined by dataset and network.
357
+
358
+ <table><tr><td>Dataset</td><td>Network</td><td>D</td><td>dint90</td></tr><tr><td>MNIST MNIST</td><td>FC LeNet</td><td>199210 44426</td><td>750 275</td></tr><tr><td>CIFAR-10 CIFAR-10</td><td>FC LeNet</td><td>1055610 62006</td><td>9000 2900</td></tr><tr><td>MNIST-SP</td><td>FC</td><td>199210</td><td></td></tr><tr><td>MNIST-SP</td><td></td><td></td><td>750</td></tr><tr><td></td><td>LeNet</td><td>44426</td><td>650</td></tr><tr><td>MNIST-SL-100%</td><td>FC-5</td><td>959610</td><td>190000</td></tr><tr><td>MNIST-SL-50%</td><td>FC-5</td><td>959610</td><td>130000</td></tr><tr><td>MNIST-SL-10%</td><td>FC-5</td><td>959610</td><td>90000</td></tr><tr><td>ImageNet</td><td>SqueezeNet</td><td>1248424</td><td>&gt;500000</td></tr><tr><td>CartPole</td><td>FC</td><td>199210</td><td></td></tr><tr><td>Pole</td><td></td><td></td><td>25</td></tr><tr><td></td><td>FC</td><td>199210</td><td>23</td></tr><tr><td>Cart</td><td>FC</td><td>199210</td><td>7</td></tr><tr><td>Inverted Pendulum</td><td>FC</td><td>562</td><td>4</td></tr><tr><td>Humanoid</td><td>FC</td><td>166673</td><td></td></tr><tr><td>Atari Pong</td><td>ConvNet</td><td>1005974</td><td>700 6000</td></tr></table>
359
+
360
+ ![](images/54ba85776bef21788bbfd07ad60332c062ddee3087fea1b9f0d751c341a4377d.jpg)
361
+ Figure S20: Intrinsic dimension of the objective landscapes created by all combinations of dataset and network we tried in this paper.
parse/train/ryup8-WCW/ryup8-WCW_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryup8-WCW/ryup8-WCW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryup8-WCW/ryup8-WCW_model.json ADDED
The diff for this file is too large to render. See raw diff