ZHANGYUXUAN-zR commited on
Commit
88fef88
·
verified ·
1 Parent(s): 6c80697

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/HkGSniC9FQ/HkGSniC9FQ.md +432 -0
  2. parse/train/HkGSniC9FQ/HkGSniC9FQ_content_list.json +0 -0
  3. parse/train/HkGSniC9FQ/HkGSniC9FQ_middle.json +0 -0
  4. parse/train/HkGSniC9FQ/HkGSniC9FQ_model.json +0 -0
  5. parse/train/Hyl9ahVFwH/Hyl9ahVFwH.md +0 -0
  6. parse/train/Hyl9ahVFwH/Hyl9ahVFwH_content_list.json +0 -0
  7. parse/train/Hyl9ahVFwH/Hyl9ahVFwH_middle.json +0 -0
  8. parse/train/Hyl9ahVFwH/Hyl9ahVFwH_model.json +0 -0
  9. parse/train/SkgGCkrKvH/SkgGCkrKvH.md +631 -0
  10. parse/train/SkgGCkrKvH/SkgGCkrKvH_content_list.json +0 -0
  11. parse/train/SkgGCkrKvH/SkgGCkrKvH_middle.json +0 -0
  12. parse/train/SkgGCkrKvH/SkgGCkrKvH_model.json +0 -0
  13. parse/train/SkgsACVKPH/SkgsACVKPH.md +277 -0
  14. parse/train/SkgsACVKPH/SkgsACVKPH_content_list.json +1377 -0
  15. parse/train/SkgsACVKPH/SkgsACVKPH_middle.json +0 -0
  16. parse/train/SkgsACVKPH/SkgsACVKPH_model.json +0 -0
  17. parse/train/jB0Nlbwlybm/jB0Nlbwlybm.md +319 -0
  18. parse/train/jB0Nlbwlybm/jB0Nlbwlybm_content_list.json +1455 -0
  19. parse/train/jB0Nlbwlybm/jB0Nlbwlybm_middle.json +0 -0
  20. parse/train/jB0Nlbwlybm/jB0Nlbwlybm_model.json +0 -0
  21. parse/train/jEYKjPE1xYN/jEYKjPE1xYN.md +407 -0
  22. parse/train/jEYKjPE1xYN/jEYKjPE1xYN_content_list.json +0 -0
  23. parse/train/jEYKjPE1xYN/jEYKjPE1xYN_middle.json +0 -0
  24. parse/train/jEYKjPE1xYN/jEYKjPE1xYN_model.json +0 -0
  25. parse/train/px0-N3_KjA/px0-N3_KjA.md +315 -0
  26. parse/train/px0-N3_KjA/px0-N3_KjA_content_list.json +0 -0
  27. parse/train/px0-N3_KjA/px0-N3_KjA_middle.json +0 -0
  28. parse/train/px0-N3_KjA/px0-N3_KjA_model.json +0 -0
  29. parse/train/r1lYRjC9F7/r1lYRjC9F7.md +275 -0
  30. parse/train/r1lYRjC9F7/r1lYRjC9F7_content_list.json +1511 -0
  31. parse/train/r1lYRjC9F7/r1lYRjC9F7_middle.json +0 -0
  32. parse/train/r1lYRjC9F7/r1lYRjC9F7_model.json +0 -0
  33. parse/train/rJNwDjAqYX/rJNwDjAqYX.md +278 -0
  34. parse/train/rJNwDjAqYX/rJNwDjAqYX_middle.json +0 -0
  35. parse/train/rkHVZWZAZ/rkHVZWZAZ.md +450 -0
  36. parse/train/rkHVZWZAZ/rkHVZWZAZ_content_list.json +0 -0
  37. parse/train/rkHVZWZAZ/rkHVZWZAZ_middle.json +0 -0
  38. parse/train/rkHVZWZAZ/rkHVZWZAZ_model.json +0 -0
  39. parse/train/rydeCEhs-/rydeCEhs-_content_list.json +1629 -0
  40. parse/train/rydeCEhs-/rydeCEhs-_model.json +0 -0
  41. vlm/train/4Nt1F3qf9Gn/0.png +3 -0
  42. vlm/train/4Nt1F3qf9Gn/1.png +3 -0
  43. vlm/train/4Nt1F3qf9Gn/2.png +3 -0
  44. vlm/train/4Nt1F3qf9Gn/4.png +3 -0
  45. vlm/train/4Nt1F3qf9Gn/5.png +3 -0
  46. vlm/train/4Nt1F3qf9Gn/7.png +3 -0
  47. vlm/train/4Nt1F3qf9Gn/8.png +3 -0
  48. vlm/train/4Nt1F3qf9Gn/9.png +3 -0
  49. vlm/train/8twKpG5s8Qh/0.png +3 -0
  50. vlm/train/8twKpG5s8Qh/1.png +3 -0
parse/train/HkGSniC9FQ/HkGSniC9FQ.md ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AN ANALYSIS OF COMPOSITE NEURAL NETWORK PERFORMANCE FROM FUNCTION COMPOSITION PERSPECTIVE
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ This work investigates the performance of a composite neural network, which is composed of pre-trained neural network models and non-instantiated neural network models, connected to form a rooted directed graph. A pre-trained neural network model is generally a well trained neural network model targeted for a specific function. The advantages of adopting such a pre-trained model in a composite neural network are two folds. One is to benefit from other’s intelligence and diligence, and the other is saving the efforts in data preparation and resources and time in training. However, the overall performance of composite neural network is still not clear. In this work, we prove that a composite neural network, with high probability, performs better than any of its pre-trained components under certain assumptions. In addition, if an extra pre-trained component is added to a composite network, with high probability the overall performance will be improved. In the empirical evaluations, distinctively different applications support the above findings.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep learning has been a great success in dealing with natural signals, e.g., images and voices, as well as artifact signals, e.g., nature language, while it is still in the early stage in handling sophisticated social and natural applications shaped by very diverse factors (e.g., stock market prediction), or resulted from complicated processes (e.g., pollution level prediction). One of distinctive features of the complicated applications is their applicable data sources are boundless. Consequently, their solutions need frequent revisions. Although neural networks can approximate arbitrary functions as close as possible (Hornik, 1991), the major reason for not existing such competent neural networks for those complicated applications is their problems are hardly fully understood and their applicable data sources cannot be identified all at once. By far the best practice is the developers pick a seemly neural network with available data to hope for the best. The apparent drawbacks, besides the performance, are the lack of flexibility in new data source emergence, better problem decomposition, and the opportunity of employing proven efforts from others. On the other hand, some adopts a composition of several neural network models, based on function composition using domain knowledge.
12
+
13
+ An emerging trend of deep learning solution development is to employ well crafted pre-trained neural networks (i.e., neural network models with instantiated weights), especially used as a component in a composited neural network model. Most popular pre-trained neural network models are well fine tuned with adequate training data, and made available to the public, either free or as a commercial product. During the training phase of composite neural network, the weights of pre-trained models are frozen to maintain its good quality and save the training time, while the weights of their outgoing edges are trainable. In some cases as in the transfer learning, the weights of pre-trained neural network are used as initial values in the training phase of composite neural network. It is intuitive that a composite neural network should perform better than any of its components. The ensemble learning (Freund & Schapire, 1997; Zhou, 2012) and the transfer learning (Galanti et al., 2016) have great success and are popular when pre-trained models are considered. However, the following example shows some aspects missed by these two methods, and requests for more complicated composite function.
14
+
15
+ Example 1. Assume there is a set of locations indexed as $X \ = \ \{ ( 0 , 0 ) , ( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 0 ) \}$ with the corresponding values ${ Y } = ( 0 , 1 , 1 , 0 )$ . Obviously, the observed function is the XOR (Goodfellow et al., 2016). Now consider three models: $f _ { 1 } ( x _ { 1 } , x _ { 2 } ) : = x _ { 1 }$ , $f _ { 2 } ( x _ { 1 } , x _ { 2 } ) : = x _ { 2 }$ , and $f _ { 3 } ( x _ { 1 } , x _ { 2 } ) : = x _ { 1 } x _ { 2 }$ . Their corresponding output vectors are $( 0 , 0 , 1 , 1 ) , ( 0 , 1 , 0 , 1 ) , ( 0 , 0 , 0 , 1 )$ with bit-wise accuracy $5 0 \%$ , $5 0 \%$ , $2 5 \%$ , respectively. This means that the AdaBoosting algorithm will exclude the tran $f _ { 1 }$ and r lear $f _ { 2 }$ inng, e ensemble since their coefficients are is fine-tuned by applying the gradient $\begin{array} { r } \frac { 1 } { 2 } \ln { \frac { 1 - 5 0 \% } { 5 0 \% } } = 0 \end{array}$ . On the other hand, in with respect to L2 loss $f _ { 3 }$
16
+ on $w f _ { 3 } = w x _ { 1 } x _ { 2 }$ to transfer the source task distribution to that of the target task. The result comes to $w = 0$ , and d wi $f _ { 3 }$ is excluded. Now consider respect to the L2 loss. Th $g _ { 1 } ( x _ { 1 } , x _ { 2 } ) = \alpha _ { 1 } f _ { 1 } + \alpha _ { 2 } f _ { 2 }$ and apply t, with loss back-propagation. If further define $\alpha _ { 1 } = \alpha _ { 2 } = \textstyle { \frac { 1 } { 3 } }$ $\textstyle { \frac { 4 } { 3 } }$
17
+ $g _ { 2 } ( x _ { 1 } , x _ { 2 } ) = w _ { 1 } g _ { 1 } + w _ { 2 } f _ { 3 }$ , the back-propagation yields $g _ { 2 } = 3 g _ { 1 } - 2 f _ { 3 } = x _ { 1 } + \bar { x } _ { 2 } - 2 x _ { 1 } x _ { 2 }$ output $( 0 , 1 , 1 , 0 )$ . The final $g _ { 2 }$ computes $Y$ with loss 0. This example shows the power of composite function.
18
+
19
+ Composite Neural Network. In the transfer learning, how to overcome the negative transfer (a phenomenon of a pre-trained model has negative impact on the target task) is an important issue (Seah et al., 2013). In the ensemble learning, it is well known that the adding more pre-trained models, it is not always true to have the better accuracy of the ensemble (Zhou et al., 2002). Furthermore, Opitz & Maclin (1999) pointed that the ensemble by boosting having less accuracy than a single pre-trained model often happens for neural networks. In the unsupervised learning context, some experimental research concludes that although layer-wise pre-training can be significantly helpful, on average it is slightly harmful (Goodfellow et al., 2016). These empirical evidences suggest that in spite of the success of the ensemble learning and the transfer learning, the conditions that composite neural network can perform better is unclear, especially in the deep neural networks training process. The topology of a composite neural network can be represented as a rooted directed graph. For instance, an ensemble learning can be represented as 1-level graph, while a composite neural network with several pre-trained models that each is designed to solve a certain problem corresponds to a more complicated graph. It is desired to discover a mathematical theory, in addition to employing domain knowledge, to construct a composite neural network with guaranteed overall performance. In this work, we investigate the mathematical theory to ensure the overall performance of a composite neural network is better than any a pre-trained component, regardless the way of composition, to allow deep learning application developer great freedom in constructing a high performance composite neural network.
20
+
21
+ Contributions. In this work, we proved that a composite neural network with high probability performs better than any of its pre-trained components under certain assumptions. In addition, if extra pre-trained component is added into a composite network, with high probability the overall performance will be improved. In the empirical evaluations, distinctively different applications support the above findings.
22
+
23
+ # 2 PRELIMINARIES
24
+
25
+ In this Section, we introduce some notations and definitions about composite neural network. Parameters $N , K , d , d _ { j } ,$ $d _ { j _ { 1 } }$ , and $d _ { j _ { 2 } }$ are positive integers. Denote $\{ 1 , . . . , K \}$ as $[ K ]$ and $[ K ] \cup \{ 0 \}$ as $[ K ] ^ { + }$ . Let $\sigma : \mathbb { R } \mathbb { R }$ be a differentiable activation function, such as the Logistic function $\sigma ( \acute { z } ) \dot { = } 1 / ( 1 + e ^ { - z } )$ and the hyperbolic tangent $\sigma ( z ) = ( e ^ { z } - e ^ { - z } ) / ( e ^ { z } + e ^ { - z } )$ . For simplicity of notation, we sometimes abuse $\sigma$ as a vector value function. A typical one hidden layer neural network can be formally presented as $\begin{array} { r } { w _ { 1 , 1 } \sigma \left( \sum _ { i = 1 } ^ { d } w _ { 0 , i } \mathbf { x } _ { i } + w _ { 0 , 0 } \right) + w _ { 1 , 0 } } \end{array}$ .We abbreviate it as $f _ { \sigma , { \bf W } } ( { \bf x } )$ , where $\mathbf { W }$ is the matrix defined $) \mathsf { y w } _ { 1 , 1 } , w _ { 1 , 0 } , . . . , w _ { 0 , 1 } , w _ { 0 , 0 }$ . Recursively applying this representation can obtain the neural network with more hidden layers. If there is no ambiguity on the activation function, then it can be skipped as $f _ { \mathbf { W } } ( \mathbf { x } )$ . Now assume a set of neural networks $\{ f _ { \mathbf { W } _ { j } } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ is given, where $\mathbf { W } _ { j }$ is the real number matrix defining the neural network $f _ { \mathbf { W } _ { j } } : \mathbb { R } ^ { d _ { j _ { 1 } } \times d _ { j _ { 2 } } } \mathbb { R } ^ { \bar { d _ { j } } }$ , and $\mathbf { x } _ { j } \in \mathbb { R } ^ { d _ { j _ { 1 } } \times d _ { j _ { 2 } } }$ $d _ { j } , d _ { j _ { 1 } }$ and $d _ { j _ { 2 } }$ is the input matrix of the can be different. For each th neural network. For different $j \in [ K ]$ , let $D _ { j } = \{ ( \mathbf { x } _ { j } ^ { ( i ) } , \mathbf { y } _ { j } ^ { ( i ) } ) \in \mathbb { R } ^ { ( d _ { j _ { 1 } } \times d _ { j _ { 2 } } ) \times d _ { j } } \} _ { i = 1 } ^ { N }$ $f _ { \mathbf { W } _ { j } }$ , the corresponding be a set of labeled data (for the $j$ th neural network). For each $i \in [ N ]$ , let $\mathbf { x } ^ { ( i ) } = ( \mathbf { x } _ { 1 } ^ { ( i ) } , \ldots , \mathbf { x } _ { K } ^ { ( i ) } )$ $\mathbf { y } ^ { ( i ) } = ( \mathbf { y } _ { 1 } ^ { ( i ) } , \ldots , \mathbf { y } _ { K } ^ { ( i ) } )$ , and $D = \{ ( \mathbf { x } ^ { ( i ) } , \mathbf { y } ^ { ( i ) } ) \} _ { i = 1 } ^ { N }$ .
26
+
27
+ For a pre-trained model (component), we mean $\mathbf { W } _ { j }$ is fixed after its training process, and then we denote $f _ { \mathbf { W } _ { j } }$ as $f _ { j }$ for simplicity. On the other hand, a component $f _ { \mathbf { W } _ { j } }$ is non-instantiated means $\mathbf { W } _ { j }$ is still free. A deep feedforward neural network is a hierarchical acyclic graph, i.e. a directed tree. In this viewpoint, a feedforward neural network can be presented as a series of function compositions. For given $\{ f _ { \mathbf { W } _ { j } } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ , we assume $\theta _ { j } \in \mathbb { R } ^ { d _ { j } }$ , $j \in [ K ]$ , which make the product $\theta _ { j } f _ { \mathbf { W } _ { j } } ( \mathbf { x } _ { j } )$ is well-defined. Denote $f _ { 0 }$ as the constant function 1, then the liner combination with a bias is defined as as $\begin{array} { r } { \Theta ( f _ { 1 } , . . . , f _ { K } ) = \sum _ { j \in [ K ] ^ { + } } \theta _ { j } f _ { j } ( { \bf x } _ { j } ) } \end{array}$ . Hence, an $L$ layers of neural network can be denoted as $\Theta _ { ( L ) } \circ \sigma \circ \cdot \cdot \cdot \circ \Theta _ { ( 0 ) } \left( \mathbf { x } \right)$ . A composite neural network defined by components $f _ { \mathbf { W } _ { i } } ( \mathbf { x } _ { j } )$ can be designed as an directed tree. For instance, a composite neural network $\sigma _ { 2 } ( \bar { \theta } _ { 1 , 0 } + \theta _ { 1 , 1 } f _ { 4 } ^ { ' } ( \mathbf { x } _ { 4 } ^ { * } ) + \theta _ { 1 , 2 } \sigma _ { 1 } ( \bar { \theta _ { 0 , 0 } } + \theta _ { 0 , 1 } f _ { 1 } ( \mathbf { x } _ { 1 } ) + \theta _ { 0 , 2 } f _ { \mathbf { W } _ { 2 } } ( \mathbf { x } _ { 2 } ) + \theta _ { 0 , 3 } f _ { 3 } ( \mathbf { x } _ { 3 } ^ { - } ) )$ ) can be denoted as $\sigma _ { 2 } \circ \Theta _ { 1 } \left( f _ { 4 } , \sigma _ { 1 } \circ \Theta _ { 0 } ( f _ { 1 } , f _ { \mathbf { W } _ { 2 } } , f _ { 3 } ) \right)$ , where $f _ { 1 }$ and $f _ { 3 }$ are pre-trained and $f _ { \mathbf { W } _ { 2 } }$ is non-instantiated. Note that in this work $D _ { j }$ is the default training data of component $f _ { j }$ of composite neural network, but $D _ { j }$ can be different from the training data deciding the frozen weights in the pre-trained $f _ { j }$ .
28
+
29
+ Let $\langle \vec { a } , \vec { b } \rangle$ be the standard inner product of $\vec { a }$ and $\vec { b }$ , and $| | \cdot | |$ be the corresponding norm. For a composite neural network, the training algorithm is the gradient descent back-propagation algorithm and the loss function is the $L _ { 2 }$ -norm of the difference vector. In particular, for a composite neural network $g _ { \vec { \theta } }$ the total loss on the data set $D$ is
30
+
31
+ $$
32
+ L _ { \vec { \theta } } \left( \mathbf { x } ; g _ { \vec { \theta } } \right) = \langle \vec { g } _ { \vec { \theta } } \left( \mathbf { x } \right) - \vec { y } , \vec { g } _ { \vec { \theta } } \left( \mathbf { x } \right) - \vec { y } \rangle = | | \vec { g } _ { \vec { \theta } } \left( \mathbf { x } \right) - \vec { y } | | ^ { 2 }
33
+ $$
34
+
35
+ This in fact is $\begin{array} { r } { \sum _ { i = 1 } ^ { N } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) ^ { 2 } } \end{array}$ . By the definition of $g _ { \vec { \theta } } ( \cdot )$ , this total loss in fact depends on the given data $\mathbf { x }$ , the components defined by $\{ \Theta _ { j } \} _ { j = 1 } ^ { K }$ , the output activation $\sigma$ , and the weight vector $\vec { w }$ . Similarly, let $L ( f _ { j } ( \mathbf { x } _ { j } ) )$ be the loss function of a single component $f _ { i }$ . Our goal is to find a feasible $\vec { \theta }$ s.t. $L _ { \vec { \theta } } ( \mathbf { x } ; g ) < \mathrm { m i n } _ { j \in [ K ] } L ( f _ { j } ( \mathbf { x } _ { j } ) )$ .
36
+
37
+ # 3 PROBLEM SETTINGS AND RESULTS OVERVIEW
38
+
39
+ The problems considered in this work are as follows:
40
+
41
+ P1. What are the conditions that the pre-trained components must satisfy so that them can strictly improve the accuracy of the whole composition? P2. Will more pre-trained components improve the accuracy of the whole composition?
42
+
43
+ Let $\vec { f } _ { j }$ be the output vector of the $j$ th pre-trained component, and $\boldsymbol { B } _ { K }$ be the set of unit vectors in $\mathbb { R } ^ { K }$
44
+
45
+ A1. Linearly Independent components (LIC) Assumption: $\forall t \in [ K ] , \nexists \{ \beta _ { j } \} \subset \mathbb { R }$ , s.t. $\begin{array} { r } { \vec { f } _ { t } = \sum _ { j \in [ K ] \backslash \{ t \} } \beta _ { j } \vec { f } _ { j } } \end{array}$ .
46
+ A2. No Perfect component (NPC) Assumption: $\begin{array} { r } { \operatorname* { m i n } _ { j \in [ K ] } \left\{ \sum _ { i \in [ N ] } f _ { j } ( \mathbf { x } _ { j } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right\} > \epsilon ^ { * } } \end{array}$ , where $\epsilon ^ { * } > 0$ is constant.
47
+
48
+ Our results are as follows:
49
+
50
+ Theorem 1. Assume the set of components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies LIC. Let g be $\Theta ( f _ { 1 } , . . . , f _ { K } )$ . With probability at least $1 - { \frac { K } { \pi e ^ { N } } }$ , there is a vector $\vec { \theta } \in \mathbb { R } ^ { K } \setminus B _ { K }$ s.t. $\begin{array} { r } { L _ { \vec { \theta } } ( \mathbf { x } ; g ) < \operatorname* { m i n } _ { j \in [ K ] } \{ L ( f _ { j } ( \mathbf { x } _ { j } ) ) \} } \end{array}$
51
+
52
+ Theorem 2. Assume the set of pre-trained components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies both NPC and LIC, and g be $\sigma \circ \Theta ( f _ { 1 } , . . . , f _ { K } )$ . Then with probability at least $1 - { \frac { K } { \pi e ^ { N } } }$ there exists w\~ s.t. $L _ { \vec { \mathbf { w } } } \left( \mathbf { x } ; g \right) <$ $\begin{array} { r } { \operatorname* { m i n } _ { j \in [ K ] } L \big ( f _ { j } ( \mathbf { x } _ { j } ) \big ) } \end{array}$ .
53
+
54
+ Theorem 3. Assume the set of components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies LIC. Let $g _ { K - 1 } = \Theta ( f _ { 1 } , . . . f _ { K - 1 } )$ and $g _ { K } = \Theta ( f _ { 1 } , . . . f _ { K } )$ . With probability at least $1 - { \frac { K } { \pi e ^ { N } } }$ KπeN , there is a vector w\~ ∈ RK \ BRK s.t. $L _ { \vec { \mathbf { w } } } \left( \mathbf { x } ; g _ { K } \right) < L _ { \vec { \mathbf { w } } } \left( \mathbf { x } ; g _ { K - 1 } \right)$ .
55
+
56
+ Theorem 1, and 2 together answer Problem P1, and Theorem 3 answers Problem P2.
57
+
58
+ # 4 RELATED WORK
59
+
60
+ Our framework is related but not the same with the models such as transfer learning. (Erhan et al., 2010; Kandaswamy et al., 2014; Yao & Doretto, 2010) and ensemble leaning (Zhou, 2012).
61
+
62
+ Transfer Learning. Typically transfer learning deals with two data sets with different distributions, source and target domains. A neural network, such as an auto-encoder, is trained with source domain data and corresponding task, and then part of its weights are taken out and plugged into other neural network, which will be trained with target domain data and task. The transplanted weights can be kept fixed during the consequent steps or trainable for the fine-tune purpose (Erhan et al., 2010). For multi-source transfer, algorithms of boosting based are studied in the paper (Yao & Doretto, 2010). Kandaswamy et al. (Kandaswamy et al., 2014) proposed a method of cascading several pre-trained layers to improve the performance. Transfer learning is considered as a special case of composite neural network that the transfered knowledge can be viewed as a pre-trained component.
63
+
64
+ Ensemble (Bagging and Boosting). Since the Bagging needs to group data by sampling and the Boosting needs to tune the probability of data (Zhou et al., 2002), these frameworks are different from composite neural network. However, there are fine research results revealing many properties for accuracy improvement (Dzeroski & ˇ Zenko, 2004; Gashler et al., 2008; Zhou et al., 2002). For ˇ example, it is known that in the ensemble framework, low diversity between members can be harmful to the accuracy of their ensemble (Dzeroski & ˇ Zenko, 2004; Gashler et al., 2008). In this work, we ˇ consider neural network training, but not data processing.
65
+
66
+ Ensemble (Stacking). Among the ensemble methods, the stacking is closely related to our framework. The idea of stacked generalization (Wolpert, 1992), in Wolpert’s terminology, is to combine two levels of generalizers. The original data are taken by several level 0 generalizers, then their outputs are concatenated as an input vector to the level 1 generalizer. According to the empirical study of Ting and Witten (Ting & Witten, 1999), the probability of the outputs of level 0, instead of their values, is critical to accuracy. Besides, multi-linear regression is the best level 1 generalizer, and non-negative weights restriction is necessary for regression problem while not for classification problem. In (Breiman, 1996), it restricts non-negative combination weights to prevent from poor generalization error and concludes the restriction of the sum of weights equals to 1 is not necessary (Breiman, 1996). In (Hashem, 1997), Hashem showed that linear dependence of components could be, but not always, harmful to ensemble accuracy, while in our work, it allows a mix of pre-defined and undefined components as well as negative weights to provide flexibility in solution design.
67
+
68
+ Recently Proposed Frameworks. In You et al. (2017), Shan You et al. proposed a student-teacher framework where the outputs of pre-trained teachers are averaged as the knowledge for the student network. A test time combination of multiple trained predictors was proposed by Kim, Tompkin, and Richardt In Kim et al. (2017), that the combination weights are decided during test time. In above frameworks, the usage of pre-trained neural networks generally improves the accuracy of their combination.
69
+
70
+ # 5 THEORETICAL ANALYSIS
71
+
72
+ This section provides analyses of the loss function of composite neural network with the introduction of pre-trained components. For the complete proofs, please refer to Supplementary Material. Observe that for given pre-trained components $\{ \stackrel { . } { f } _ { j } \} _ { j = 1 } ^ { K }$ , a composite neural network can be defined recursively by postorder subtrees search. For instance, $\sigma _ { 2 } \circ \Theta _ { 1 } \left( f _ { 4 } , \sigma _ { 1 } \circ \Theta _ { 0 } ( f _ { 1 } , f _ { 2 } , f _ { 3 } ) \right)$ can be presented as $\sigma _ { 2 } \circ \varTheta _ { 1 } ( f _ { 4 } , g _ { 1 } )$ , and $g _ { 1 } = \sigma _ { 1 } \circ \Theta _ { 0 } ( f _ { 1 } , f _ { 2 } , f _ { 3 } )$ . Without loss of generality, we assume $d _ { j } = d = 1$ for all $j \in [ K ]$ in the following proofs. We denote ${ \vec { f } } _ { j }$ the vector $( f _ { j } ( { \bf x } ^ { ( 1 ) } ) , \cdot \cdot \cdot , f _ { j } ( { \bf x } ^ { ( N ) } ) )$ , as the sequence of $f _ { j }$ during the training phase. Similarly, $\bar { y } : = ( y ^ { ( 1 ) } , \cdot \cdot \cdot \bar { , } y ^ { ( N ) } )$ . Let $\vec { e } _ { j }$ be an unit vector in the standard basis of $\mathbb { R } ^ { K }$ for each $j \in [ K ]$ , i.e. $\vec { e } _ { 1 } = ( 1 , 0 , \cdots , 0 )$ and $\vec { e } _ { 2 } = ( 0 , 1 , 0 , \cdots , 0 )$ , etc. Let $\boldsymbol { B } _ { K }$ be the set containing all these standard unit-length basis of $\check { \mathbb { R } } ^ { K }$ .
73
+
74
+ Theorem 1. Assume the set of components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies LIC. Let g be $\Theta ( f _ { 1 } , . . . , f _ { K } )$ . With probability at least $1 - { \frac { K } { \pi e ^ { N } } }$ , there is a vector $\vec { \theta } \in \mathbb { R } ^ { K } \setminus B _ { K }$ s.t. $L _ { \vec { \theta } } \left( \mathbf { x } ; g \right) < \operatorname* { m i n } _ { j \in [ K ] } \{ L ( f _ { j } ( \mathbf { x } _ { j } ) ) \}$
75
+
76
+ Proof. (Proof Sketch) The whole proof is split to Lemma 5.1,5.2,5.3. Note that $g ( \cdot )$ is the linear combination of $\vec { \theta }$ and $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ . It is well known (Friedman et al., 2001) that to search the minimizer $\vec { \theta }$ for $L _ { \vec { \theta } }$ , i.e. to solve a least square error problem, is equivalent to find an inverse matrix defined by $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ . Since $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfy LIC, the inverse matrix can be written down concretely, which proves the existence. Furthermore, if this solved minimizer $\vec { \theta ^ { * } }$ is not $\vec { e } _ { s }$ for some $s \in [ K ]$ then the $g _ { \vec { \theta } ^ { * } }$ has lower loss than $f _ { s }$ . Lemma 5.3 argues that the probability of $\vec { \theta ^ { * } } = \vec { e } _ { s }$ is at most the probability of the event $\langle { \vec { f } } - { \vec { y } } , { \vec { f } } \rangle = 0$ , where $\vec { f }$ is uniformly taken from the vector set of the same length of ${ \vec { f } } - { \vec { y } }$ . □
77
+
78
+ The statements of Lemmas needed by previous Theorem are as follows.
79
+
80
+ Lemma 5.1. There exists $\vec { \theta } \in \mathbb { R } ^ { K + 1 }$ $\begin{array} { r } { \mathrm { \Large { ? } } ^ { K + 1 } s . t . { \cal L } _ { \vec { \theta } } \left( { \bf x } ; \Theta _ { ( 0 ) } ( f _ { 1 } , . . . f _ { K } ) \right) \leq \operatorname* { m i n } _ { j \in [ K ] ^ { + } } \{ { \cal L } ( f _ { j } ( { \bf x } _ { j } ) ) \} . } \end{array}$
81
+
82
+ This Lemma deals with the existence of the solution of the inequality. But our goal is to find a solution such that the loss is strictly less than any pre-trained component.
83
+
84
+ Lemma 5.2. Denote $\mathbb { I } _ { L _ { \Vec { \theta } } }$ the indicator variable for the event that at least one of $\vec { e } _ { j } \in \boldsymbol { B } _ { \mathbb { R } ^ { K } }$ is the θminimizer of Lθ\~. Then Pr ILθ\~ = 1 < KπeN , i.e. Pr ILθ\~ = 0 ≥ 1 − π eN .
85
+
86
+ $$
87
+ \begin{array} { r l } & { \mathrm { L e m m a } 5 . 3 . \ D e f i n e \ \widetilde { \mathfrak { F } } ( \overrightarrow { y } , L ( f ) ) = \left\{ \overrightarrow { f } \in \mathbb { R } ^ { N } : \left\| \overrightarrow { f } - \overrightarrow { y } \right\| ^ { 2 } = L _ { f } \right\} f o r \ g i v e n \ \overrightarrow { y } a n d \ \overrightarrow { f } . \ T h e n \ w e \ h a v } \\ & { \mathrm { P r } _ { \overrightarrow { f } \in \widetilde { \mathcal { Y } } ( \overrightarrow { y } , L ( f ) ) } \left\{ \langle \overrightarrow { f } - \overrightarrow { y } , \overrightarrow { f } \rangle = 0 \right\} < \frac { 1 } { \pi e ^ { N } } . } \end{array}
88
+ $$
89
+
90
+ The above Lemmas prove Theorem 1. The following corollary is the closed from of the optimal weights.
91
+
92
+ Corollary 5.1. The closed form of the minimizer is:
93
+
94
+ $$
95
+ \left[ \theta _ { t } \right] _ { t \in [ K ] ^ { + } } = \left[ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \right] _ { s , t \in [ K ] ^ { + } } ^ { - 1 } \times \left[ \langle \vec { f } _ { s } , \vec { y } \rangle \right] _ { s \in [ K ] ^ { + } } .
96
+ $$
97
+
98
+ In the following, we deal with $\sigma \circ \Theta ( f _ { 1 } , . . . , f _ { K } )$ and $\Theta _ { 1 } \circ \sigma \circ \Theta ( f _ { 1 } , . . . , f _ { K } )$ .
99
+
100
+ Theorem 2. Assume the set of pre-trained components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies both NPC and LIC, and $g$ be $\sigma \circ \Theta ( f _ { 1 } , . . . , f _ { K } )$ . Then with probability at least $1 - { \frac { K } { \pi e ^ { N } } }$ there exists $\vec { \theta }$ s.t. $L _ { \vec { \theta } } ( \mathbf { x } ; g ) <$ $\begin{array} { r } { \operatorname* { m i n } _ { j \in [ K ] } L \big ( f _ { j } ( \mathbf { x } _ { j } ) \big ) } \end{array}$ .
101
+
102
+ Proof. (Proof Sketch) The whole proof is split to Lemma 5.4,5.5, and 5.6. The idea is to find an interval in the domain of $\sigma$ such that the output can approximate linear function as well as possible. Then in this interval, the activation $\sigma$ can approximate any given pre-trained component. However, under the assumptions LIC and NPC the gradient of the loss $L$ is not zero with high probability. Since the training is based on the gradient descent algorithm, this none-zero gradient leads the direction of updating process to obtain a lower loss. □
103
+
104
+ Lemma 5.4. Let $N , K$ and $j \in [ K ]$ be fixed. For small enough , there exists $\vec { \theta } \in Z _ { F , 1 , \epsilon }$ and 0 < α ∈ R s.t. |σ ◦ Θ(0)(f1, ..., fK ) − fj (x)α | .
105
+
106
+ Lemma 5.5. Assume NPC holds with $\epsilon ^ { * } > 0$ . If $\vec { \theta } _ { \epsilon ^ { * } / 3 }$ satisfies $| \sigma \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) ( \mathbf { x } ) - f _ { j } ( \mathbf { x } ) | <$ $\frac { \epsilon ^ { * } } { 3 N }$ for any $j \in [ K ] ^ { + }$ , then $\nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \neq \vec { 0 }$ .
107
+
108
+ Lemma 5.6. If $\vec { \theta } _ { \epsilon ^ { * } / 3 }$ makes $\nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \quad \neq \quad \vec { 0 } _ { \epsilon }$ , then there exist $\vec { \theta }$ s.t. $L _ { \vec { \theta } } ( \mathbf { x } ; g ) \quad <$
109
+ $\begin{array} { r } { \operatorname* { m i n } _ { j \in [ K ] ^ { + } } L \bigl ( f _ { j } ( \mathbf { x } _ { j } ) \bigr ) } \end{array}$ .
110
+
111
+ Now we consider the difference of losses of $\sigma \circ \Theta ^ { \prime } ( f _ { 1 } , . . . , f _ { K } )$ and $\sigma \circ \Theta ( f _ { 1 } , . . . , f _ { K - 1 } )$ .
112
+
113
+ Theorem 3. Assume the set of components $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies LIC. Let $g _ { K - 1 } = \Theta ( f _ { 1 } , . . . f _ { K - 1 } )$ and $g _ { K } = \Theta ( f _ { 1 } , . . . f _ { K } )$ . With probability at least $1 - \frac { K } { \pi e ^ { N } }$ KπeN , there is a vector \~θ ∈ RK \ BRK s.t. ${ \cal L } _ { \vec { \theta } } ( { \bf x } ; g _ { K } ) < { \cal L } _ { \vec { \theta } } ( { \bf x } ; g _ { K - 1 } )$ .
114
+
115
+ Table 1: Validation Error of Image Classification
116
+
117
+ <table><tr><td></td><td>ResNet50</td><td>SIFT</td><td>composite</td></tr><tr><td>number of parameter</td><td>25636712</td><td>2884200</td><td>3000</td></tr><tr><td>Validation Error (%)</td><td>70.1184</td><td>13.1252</td><td>71.5079</td></tr></table>
118
+
119
+ Proof. (Proof Sketch) The idea is directly solve the inequality for the case of $K = 2$ , and then generalize the result to larger $K$ . □
120
+
121
+ The following provides a generalized error bound for a composite neural network.
122
+
123
+ Theorem 4. Assume pre-trained components $\{ f _ { j } \} _ { j = 1 } ^ { K }$ satisfy LIC and NPC. Let $\{ G E ( f _ { j } ) \} _ { j = 1 } ^ { K } \ : k$ e corresponding generalization errors of $\{ f _ { j } \} _ { j = 1 } ^ { K }$ , and $\Theta _ { ( L ) } \circ \sigma _ { ( L ) } \circ \cdot \cdot \cdot \circ \sigma _ { ( 1 ) } \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) b e$ the composite neural network. Denote the generalization error, $\mathbf { E } \{ L ( \Theta _ { ( L ) } \circ \sigma _ { ( L ) } \circ \cdot \cdot \cdot \circ \sigma _ { ( 1 ) } \circ$ $\Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) ) \}$ , of the composite neural network as $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , \dots , f _ { K } } \}$ . Then with high probability, there exist a setting of $\{ \Theta _ { ( L ) } ^ { * } , . . . , \Theta _ { ( 0 ) } ^ { * } \}$ such that $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , . . . , f _ { K } } \} \le \Theta _ { ( L ) } ^ { * } ( G E ( f _ { 1 } ) , . . . G _ { E } ( f _ { K } ) )$ .
124
+
125
+ Proof. (Proof Sketch) We apply the idea similar to Kawaguchi (2016): the exception of non-liner activations is same with the exception of liner activations. Previous theorems provide that with high probability there exists the solution of $\Theta _ { ( i ) } , \forall i \in [ L ] ^ { + }$ s.t. each $\Theta _ { ( i ) + 1 } \sigma \Theta _ { ( i ) }$ approximates a degree one polynomial $A _ { \Theta _ { ( i ) + 1 } \sigma \Theta _ { ( i ) } , 1 }$ as well as possible. If the weights are obey the normal distribution, then $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , . . . , f _ { K } } \} \le \Theta _ { ( L ) } ^ { * } ( G E ( f _ { 1 } ) , . . . G _ { E } ( f _ { K } ) ) .$ . □
126
+
127
+ # 6 EMPIRICAL STUDIES
128
+
129
+ This section is to numerically verify the performance of composite network for two distinctively different applications, image classification and PM2.5 prediction. For image classification, we examined two pre-trained components, the ResNet50 (He et al., 2016) from Keras and the SIFT algorithm(Lowe, 1999) from OpenCV, running on the benchmark of ImageNet competition(Russakovsky et al., 2015). For PM2.5 prediction, we implemented several models running on the open data of local weather bureau and environment protection agency to predict the PM2.5 level in the future hours.
130
+
131
+ # 6.1 IMAGENET CLASSIFICATION
132
+
133
+ We chose Resnet50 as the pre-trained baseline model and the SIFT model as an auxiliary model to form a composite neural network to validate the proposed theory. The experiments are conducted on the 1000-class single-label classification task of the ImageNet dataset, which has been a well received benchmark for image classification applications. A reason to choose the SIFT (Scale-Invariant Feature Transform) algorithm is that its function is very different from ResNet and it is interesting to see if the performance of ResNet50 can be improved as predicted from our theory.
134
+
135
+ We trained the SIFT model using the images of ImageNet, and directed the output to a CNN to extract useful features before merging with ResNet50 output. In the composite model, the softmax functions of both ResNet50 and SIFT model are removed that the outputs of length 1000 of both models are merged before the final softmax stage. During the training process of composite network, the weights of ResNet50 and SIFT model are fixed, and only the connecting weights and bias are trained.
136
+
137
+ The ResNet50 was from He et al. that its Top-1 accuracy in our context was lower than reported in (He et al., 2016) since we did not do any fine tuning and data preprocessing. In the Figure 1, it shows the composite network has higher accuracy than ResNet50 during almost the complete testing run. Table 1 shows the same result that the composite network performs better too. The experiment results support the claims of this work that a composite network performs better than any of its components, and more components work better than less components.
138
+
139
+ ![](images/37632db424ad320bc8b46df5ffbb0ffddc5aee0b6db76d09c203d266ebcef4a1.jpg)
140
+ Figure 1: Image Classification Validation Accuracy
141
+
142
+ # 6.2 PM2.5 PREDICTION
143
+
144
+ The PM2.5 prediction problem is to forecast the particle density of fine atmospheric matter with the diameter at most 2.5 µm (PM2.5) in the future hours, mainly, for the next 12, 24, 48, 72 hours. The datasets used are open data provided by two sources including Environmental Protection Administration (EPA)1 , and Center Weather Bureau (CWB)2. The EPA dataset contains 21 observed features, including the speed and direction of wind, temperature, relative humidity, PM2.5 and PM10 density, etc., from 18 monitoring stations, with one record per hour. The CWB has seventy monitoring stations, one record per 6 hours, containing 26 features, such as temperature, dew point, precipitation, wind speed and direction, etc. We partitioned the observed area into a grid of $1 1 4 0 \mathrm { k m ^ { 2 } }$ with $1 \mathrm { k m } \times 1$ km blocks and aligned the both dataset into one-hour period. We called the two datasets as air quality and weather condition dataset.
145
+
146
+ We selected ConvLSTM (Convolution LSTM) and FNN (fully connected neural network) as the components used in this experiment. The reason to select ConvLSTM is that the dispersion of PM2.5 is both spatially and temporally dependent and ConvLSTM is considered capable of catching the dependency, and FNN is a fundamental neural network that acts as the auxiliary component in the experiment.
147
+
148
+ The prediction models were trained with the data of 2014 and 2015 years, then the 2016 data was used for testing. We considered two function compositions, the linear combination $\Theta$ and the Logistic function $\sigma _ { 1 }$ (as Theorem 2), to combine the two components to examine the applicability of the proposed theorems.
149
+
150
+ We trained and tested both ConvLSTM and FNN using air quality dataset (Dataset A) and weather condition dataset (Dataset B) separately as the baselines (denoted as $f _ { 1 }$ , $f _ { 2 }$ , $f _ { 3 }$ and $f _ { 4 , }$ ) and their training error and testing error in MSE are list in the first part of Table 2. Then we composited FNNs using Dataset A and Dataset B, each FNN can be pre-trained (denoted as $\mathbf { X }$ ) or non-instantiated (denoted as o). In addition, we used both linear and Sigmoid activation functions. As a result, we had eight combinations, as list in the part two. We treated ConvLSTM in the same way and the outcomes were in the part 3. Finally, we composited using one FNN and one ConvLSTM that each was the best in their category, and the resulting composite network was a tree of depth 2. For instance, the candidate of ConvLSTM of part 4 for 12 hours prediction was the 4th row (i.e., $\Theta ( f _ { 3 } ^ { \circ } , f _ { 4 } ^ { \circ } ) )$ of part 3. Their training and testing errors in MSE were listed in the part 4.
151
+
152
+ From the empirical study results, it shows mostly the proposed theorems are followed. While the composite networks with all pre-trained components may not perform better than others in their category, (which is not a surprise), what we expect to see is after adding a new component, the composite network has improvement over the previous one. For example, the $\sigma \circ \Theta ( \bar { f } _ { 3 } ^ { \times } , f _ { 4 } ^ { \times } )$ has strictly better accuracy than both $f _ { 3 }$ and $f _ { 4 }$ for all future predictions. Another example is the NEXT $4 8 { \mathrm { ~ h r } }$ , $\sigma \circ \Theta ( \dot { C } ^ { \times } , F ^ { \times } )$ also has strictly better accuracy than both $C = \sigma \circ \Theta ( f _ { 3 } ^ { \circ } , f _ { 4 } ^ { \circ } )$ and $F = \sigma \circ \Theta ( f _ { 3 } ^ { \circ } , f _ { 4 } ^ { \circ } )$ .
153
+
154
+ Table 2: Training and Testing Errors of PM2.5 Prediction
155
+
156
+ <table><tr><td rowspan="2">Model (input)</td><td colspan="2">Next 12 hr</td><td colspan="2">Next 24 hr</td><td colspan="2">Next 48 hr</td><td colspan="2">Next 72 hr</td></tr><tr><td>TarinError</td><td>TestError</td><td>TarinError</td><td>TestError</td><td>TarinError</td><td>TestError</td><td>TarinError</td><td>TestError</td></tr><tr><td>f1:FNN-A</td><td>100.1812</td><td>92.8528</td><td>134.7095</td><td>118.6065</td><td>141.6287</td><td>136.8358</td><td>148.1807</td><td>143.9980</td></tr><tr><td>f2:FNN-B</td><td>134.1137</td><td>120.0019</td><td>139.8016</td><td>128.5960</td><td>136.7693</td><td>134.9001</td><td>142.7637</td><td>140.8650</td></tr><tr><td>f3: ConvLSTM-A</td><td>54.2775</td><td>88.8156</td><td>57.5677</td><td>111.9122</td><td>74.8937</td><td>129.7418</td><td>77.7394</td><td>132.8923</td></tr><tr><td>f4: ConvLSTM-B</td><td>67.8625</td><td>118.4351</td><td>73.1519</td><td>125.6062</td><td>68.7069</td><td>137.0789</td><td>84.9656</td><td>138.6642</td></tr><tr><td>(fx,f)</td><td>99.7005</td><td>F:90.0214</td><td>130.7800</td><td>115.9283</td><td>139.9744</td><td>F:132.4764</td><td>144.6826</td><td>F:137.8403</td></tr><tr><td>0(fx,f)</td><td>95.6804</td><td>93.0173</td><td>120.3185</td><td>117.9781</td><td>134.3893</td><td>134.0270</td><td>139.6226</td><td>140.5209</td></tr><tr><td>(fi,f)</td><td>95.8110</td><td>93.1131</td><td>121.9737</td><td>117.7771</td><td>134.0676</td><td>135.2255</td><td>136.2009</td><td>144.0116</td></tr><tr><td>0(fi,f)</td><td>101.1584</td><td>90.2671</td><td>126.6807</td><td>114.5264</td><td>132.6726</td><td>132.8069</td><td>139.2339</td><td>139.3322</td></tr><tr><td>go0(fi,f)</td><td>102.7556</td><td>90.6280</td><td>133.1453</td><td>117.7397</td><td>135.9256</td><td>133.2544</td><td>145.1052</td><td>139.2513</td></tr><tr><td>go0(fx,f)</td><td>98.1241</td><td>93.1098</td><td>127.4999</td><td>118.8107</td><td>135.1553</td><td>134.1469</td><td>137.7562</td><td>142.1778</td></tr><tr><td>go0(fi,f)</td><td>94.9931</td><td>91.4667</td><td>124.5461</td><td>117.7332</td><td>131.2684</td><td>135.1281</td><td>140.1604</td><td>144.5220</td></tr><tr><td>go0(fi,f)</td><td>98.2596</td><td>91.3646</td><td>124.4182</td><td>F:114.2274</td><td>134.5078</td><td>132.8316</td><td>138.0456</td><td>139.8351</td></tr><tr><td>0(f)</td><td>27.1760</td><td>85.8922</td><td>49.1624</td><td>108.3157</td><td>37.2116</td><td>123.2186</td><td>60.6415</td><td>131.0565</td></tr><tr><td>0(f,)</td><td>27.1519</td><td>81.7688</td><td>42.7932</td><td>104.2375</td><td>33.2831</td><td>C:110.4213</td><td>74.3055</td><td>C:110.9952</td></tr><tr><td>0(f)</td><td>27.4436</td><td>78.5360</td><td>44.3214</td><td>107.0898</td><td>31.4910</td><td>129.1829</td><td>68.4413</td><td>139.5661</td></tr><tr><td>0(f,f)</td><td>26.3063</td><td>C:70.8670</td><td>40.1879</td><td>100.8474</td><td>25.3312</td><td>119.1634</td><td>76.1782</td><td>120.6814</td></tr><tr><td>go0(ff)</td><td>28.3844</td><td>84.9029</td><td>43.2981</td><td>109.3709</td><td>31.2413</td><td>123.0041</td><td>63.7286</td><td>130.4122</td></tr><tr><td>go0(f)</td><td>27.5981</td><td>80.7848</td><td>44.4197</td><td>98.1051</td><td>29.7649</td><td>111.6793</td><td>69.3182</td><td>117.0719</td></tr><tr><td>go0(f,f)</td><td>26.4125</td><td>78.3990</td><td>42.3181</td><td>103.3361</td><td>30.4183</td><td>128.4138</td><td>64.4193</td><td>136.6043</td></tr><tr><td>go0(f8,f4)</td><td>26.5131</td><td>75.5778</td><td>42.3912</td><td>C:94.6242</td><td>27.5812</td><td>112.8075</td><td>70.5132</td><td>117.6480</td></tr><tr><td>0(C×,F×)</td><td>26.6556</td><td>70.1159</td><td>34.6885</td><td>92.2737</td><td>29.6484</td><td>107.6833</td><td>52.0060</td><td>H:110.1283</td></tr><tr><td>(C×,F°)</td><td>24.2349</td><td>67.4414</td><td>31.7202</td><td>90.7795</td><td>30.1328</td><td>H:105.1804</td><td>46.9994</td><td>111.2227</td></tr><tr><td>0(C,Fx)</td><td>22.7651</td><td>75.9468</td><td>24.2132</td><td>96.3126</td><td>24.4488</td><td>114.1803</td><td>49.0663</td><td>117.2747</td></tr><tr><td>(C°,F°)</td><td>21.9103</td><td>68.0660</td><td>20.9072</td><td>91.9323</td><td>23.2868</td><td>112.8605</td><td>30.6875</td><td>113.6968</td></tr><tr><td>goΘ(C×,Fx)</td><td>26.5950</td><td>69.1897</td><td>34.7400</td><td>92.4715</td><td>29.9215</td><td>108.7482</td><td>52.3708</td><td>111.5474</td></tr><tr><td>goΘ(C×,Fo)</td><td>24.0223</td><td>H:66.4733</td><td>28.8401</td><td>H:90.7257</td><td>28.5033</td><td>108.8896</td><td>46.2711</td><td>110.1613</td></tr><tr><td>goΘ(C°,Fx)</td><td>22.4443</td><td>83.5953</td><td>22.5040</td><td>96.4027</td><td>28.4714</td><td>112.0727</td><td>35.3947</td><td>114.5947</td></tr><tr><td>gΘ(C,F</td><td>38.4899</td><td>67.1819</td><td>17.6041</td><td>92.2343</td><td>33.9710</td><td>105.7977</td><td>40.2934</td><td>110.3585</td></tr><tr><td colspan="9">Let f5 be non-instantiated CNN with future rain fall input.</td></tr><tr><td>σoΘ(H×,f5)</td><td>24.1487</td><td>65.5776</td><td>30.6243</td><td>87.2777</td><td>55.9261</td><td>102.2878</td><td>50.5158</td><td>108.8087</td></tr><tr><td>σΘ(H°,f)</td><td>58.0852</td><td>68.8111</td><td>22.8776</td><td>90.2324</td><td>39.0996</td><td>112.1639</td><td>36.0659</td><td>109.8240</td></tr></table>
157
+
158
+ Part 1: pre-trained components $\overline { { f _ { i } } }$ , $\overline { { i \in [ 4 ] } }$ . Part 2: composite $\overline { { f _ { 1 } } }$ and $\overline { { f _ { 2 } } }$ by linear $\overline { { \Theta ( \cdot ) } }$ or logistic $\overline { { \sigma \circ \Theta ( \cdot ) } }$ ; similar for Part 3-5 ×: un-trainable component, i.e. pre-trained. ◦: trainable component (original weights was deleted). The best model of Part 2 (/Part 3) was assigned as composite model $F$ $( / C )$ which will be used in Part 4. The best model of Part 4 was assigned as composite model $H$ which will be used in Part 5.
159
+
160
+ # 7 CONCLUSION
161
+
162
+ In this work, we investigated the composite neural network with pre-trained components problem and showed that the overall performance of a composite neural network is better than any of its components, and more components perform better than less components. In addition, the developed theory consider all differentiable activation functions.
163
+
164
+ While the proposed theory ensures the overall performance improvement, it is still not clear how to decompose a complicated problem into components and how to construct them into a composite neural network in order to have an acceptable performance. Another problem worth some thinking is when the performance improvement will diminish (by power law or exponentially decay) even adding more components. However, in the real world applications, the amount of data, data distribution and data quality will highly affect the performance.
165
+
166
+ # REFERENCES
167
+
168
+ Leo Breiman. Stacked regressions. Machine learning, 24(1):49–64, 1996.
169
+
170
+ Saso Dzeroski and Bernard ˇ Zenko. Is combining classifiers with stacking better than selecting the ˇ best one? Machine learning, 54(3):255–273, 2004.
171
+
172
+ Dumitru Erhan, Yoshua Bengio, Aaron Courville, Pierre-Antoine Manzagol, Pascal Vincent, and Samy Bengio. Why does unsupervised pre-training help deep learning? Journal of Machine Learning Research, 11(Feb):625–660, 2010.
173
+
174
+ Yoav Freund and Robert E Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of computer and system sciences, 55(1):119–139, 1997.
175
+
176
+ Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics New York, 2001.
177
+
178
+ Tomer Galanti, Lior Wolf, and Tamir Hazan. A theoretical framework for deep transfer learning. Information and Inference: A Journal of the IMA, 5(2):159–209, 2016.
179
+
180
+ Mike Gashler, Christophe Giraud-Carrier, and Tony Martinez. Decision tree ensemble: Small heterogeneous is better than large homogeneous. In Machine Learning and Applications, 2008. ICMLA’08. Seventh International Conference on, pp. 900–905. IEEE, 2008.
181
+
182
+ Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016.
183
+
184
+ Sherif Hashem. Optimal linear combinations of neural networks. Neural networks, 10(4):599–614, 1997.
185
+
186
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
187
+
188
+ Roger A Horn and Charles R Johnson. Matrix analysis. Cambridge university press, second edition, 2012.
189
+
190
+ Kurt Hornik. Approximation capabilities of multilayer feedforward networks. Neural networks, 4(2): 251–257, 1991.
191
+
192
+ Kwang In Kim, James Tompkin, and Christian Richardt. Predictor combination at test time. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3553–3561, 2017.
193
+
194
+ Chetak Kandaswamy, Lu´ıs M Silva, Lu´ıs A Alexandre, Ricardo Sousa, Jorge M Santos, and Joaquim Marques de Sa. Improving transfer learning accuracy by reusing stacked denoising ´ autoencoders. In Systems, Man and Cybernetics (SMC), 2014 IEEE International Conference on, pp. 1380–1387. IEEE, 2014.
195
+
196
+ Kenji Kawaguchi. Deep learning without poor local minima. In Advances in Neural Information Processing Systems, pp. 586–594, 2016.
197
+
198
+ Yann LeCun, D Touresky, G Hinton, and T Sejnowski. A theoretical framework for back-propagation. In Proceedings of the 1988 connectionist models summer school, pp. 21–28. CMU, Pittsburgh, Pa: Morgan Kaufmann, 1988.
199
+
200
+ David G Lowe. Object recognition from local scale-invariant features. In Computer vision, 1999. The proceedings of the seventh IEEE international conference on, volume 2, pp. 1150–1157. Ieee, 1999.
201
+
202
+ David Opitz and Richard Maclin. Popular ensemble methods: An empirical study. Journal of artificial intelligence research, 11:169–198, 1999.
203
+
204
+ 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, 115(3):211–252, 2015.
205
+
206
+ Chun-Wei Seah, Yew-Soon Ong, and Ivor W Tsang. Combating negative transfer from predictive distribution differences. IEEE transactions on cybernetics, 43(4):1153–1165, 2013.
207
+
208
+ Kai Ming Ting and Ian H Witten. Issues in stacked generalization. Journal of artificial intelligence research, 10:271–289, 1999.
209
+
210
+ David H Wolpert. Stacked generalization. Neural networks, 5(2):241–259, 1992.
211
+
212
+ Yi Yao and Gianfranco Doretto. Boosting for transfer learning with multiple sources. In Computer vision and pattern recognition (CVPR), 2010 IEEE conference on, pp. 1855–1862. IEEE, 2010.
213
+
214
+ Shan You, Chang Xu, Chao Xu, and Dacheng Tao. Learning from multiple teacher networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1285–1294. ACM, 2017.
215
+
216
+ Zhi-Hua Zhou. Ensemble methods: foundations and algorithms. CRC press, 2012.
217
+
218
+ Zhi-Hua Zhou, Jianxin Wu, and Wei Tang. Ensembling neural networks: many could be better than all. Artificial intelligence, 137(1-2):239–263, 2002.
219
+
220
+ For self-contained, we list some common Taylor expansion in the following.
221
+
222
+ Logistic: S(z) := 11+e−z $\begin{array} { r } { S ( z ) : = \frac { 1 } { 1 + e ^ { - z } } = \frac { 1 } { 2 } + \frac { 1 } { 4 } z - \frac { 1 } { 4 8 } z ^ { 3 } \overset { } { + } \frac { 1 } { 4 8 0 } z ^ { 5 } - \frac { 1 7 } { 8 0 6 4 0 } z ^ { 7 } + O ( z ^ { 9 } ) , \breve { \forall } z \in \mathbb { R } , } \end{array}$ Hyperbolic Tan: $\begin{array} { r } { t a n H ( z ) = \frac { e ^ { z } - e ^ { - z } } { e ^ { z } + e ^ { - z } } = z - \frac { 1 } { 3 } z ^ { 3 } + \frac { 2 } { 1 5 } z ^ { 5 } + O ( z ^ { 7 } ) , \forall | z | \leq \frac { \pi } { 2 } } \end{array}$ arcTan: arctan $\begin{array} { r } { ( z ) = z - \frac { 1 } { 3 } z ^ { 3 } + \frac { 1 } { 5 } z ^ { 5 } + + O ( z ^ { 7 } ) , \forall | z | \leq 1 . } \end{array}$
223
+
224
+ Definition 1. Given an activation $\sigma ( z )$ and its Taylor expansion $T _ { \sigma } ( z )$ , let $A _ { { \boldsymbol { \sigma } } , D } ( z )$ be the truncated the monomials of degree at most $D$ from $T _ { \sigma } ( z )$ . We define $A _ { \sigma , D } ( z )$ as the $D$ -degree Taylor approximation polynomial, and $R _ { \sigma , D + 1 } ( z )$ as the remainder part such that $T _ { \sigma } ( z ) = \dot { A _ { \sigma , D } ( z ) } + R _ { \sigma , D + 1 } ( z )$
225
+
226
+ For instance, if weapproximation part $D = 3$ pansion of Logistic funand the remainder part $S ( z )$ $\begin{array} { r } { A _ { S ( z ) , 3 } ( z ) = \frac { 1 } { 2 } + \frac { 1 } { 4 } z ^ { \underline { { \cdot } } } - \frac { 1 } { 4 8 } z ^ { 3 } } \end{array}$ $\begin{array} { r } { R _ { S ( z ) , 4 } \dot { ( z ) } = \frac { 1 } { 4 8 0 } z ^ { 5 } + O ( z ^ { 7 } ) } \end{array}$
227
+
228
+ Proposition 8.1. (Error Bound of The Remainder)
229
+ Let $S ( z )$ be the Logistic function. Consider the approximation $A _ { S ( z ) , \leq D } ( z )$ and the remainder $R _ { S ( z ) , D + 1 } ( z )$ defined as above. For given $\epsilon \in ( 0 , \frac { 1 } { 1 0 0 0 } )$ and $D \in \mathbb { N }$ , if $| z | < \epsilon ^ { 1 / ( D + 2 ) }$ , then $| S ( z ) - A _ { S ( z ) , D } ( z ) | = | R _ { S ( z ) , D + 1 } ( z ) | < \epsilon .$ .
230
+
231
+ Proof. Note that if $\epsilon < 1$ then for all $D \in \mathbb { N }$ , $\epsilon ^ { 1 / ( D + 1 ) } < 1$ . If $| z | < \epsilon ^ { 1 / 3 }$ and $D = 1$ , then
232
+
233
+ $$
234
+ | R _ { S ( z ) , D + 1 } ( z ) | \leq \left| - \frac { 1 } { 4 8 } z ^ { 3 } + \frac { 1 } { 4 8 0 } z ^ { 5 } - \frac { 1 7 } { 8 0 6 4 0 } z ^ { 7 } + O ( z ^ { 9 } ) \right| < \frac { 1 } { 2 4 } \epsilon < \epsilon .
235
+ $$
236
+
237
+ The general case $( D \geq 2 )$ can be proven by the same argument as above.
238
+
239
+ This Proposition means that for a suitable range of $z$ , the Logistic function can be seen as a linear function with the error at most $\epsilon$ .
240
+
241
+ Definition 2. For the Logistic activation $\sigma ( z ) = S ( z )$ , $\epsilon > 0$ and given polynomial degree $D$ , we define $\mathcal { Z } _ { D , \epsilon } = \left\{ z \in \mathbb { R } : | \sigma ( z ) - A _ { \sigma , D } ( z ) | < \epsilon \right\}$ . Furthermore, for given components $\{ f _ { j } : j \in$ $[ K ] \} = F$ , we consider the variable $z = \Theta ( f _ { 1 } , . . . , f _ { K } )$ and define
242
+
243
+ $$
244
+ \mathcal { Z } _ { F , D , \epsilon } = \left\{ \vec { \theta } \in \mathbb { R } ^ { K + 1 } : z = \Theta ( f _ { 1 } , . . . , f _ { K } ) , | \sigma ( z ) - A _ { \sigma , D } ( z ) | < \epsilon \right\} .
245
+ $$
246
+
247
+ Observe that if the parameters $\epsilon$ , $F$ ,and $| F | = K$ are fixed, then $\mathcal { Z } _ { F , D , \epsilon } \subset \mathcal { Z } _ { F , D + 1 , \epsilon } \subset \mathbb { R } ^ { K + 1 }$ .
248
+
249
+ # 8.1 FUNCTION COMPOSITION BY LINEAR COMBINATION
250
+
251
+ Recall that for a set of pre-trained components $\{ f _ { j } ( \mathbf { x } _ { j } ) \ : \ j \ \in \ [ K ] \}$ , $\Theta _ { ( 0 ) } \left( f _ { 1 } , . . . f _ { K } \right) =$ $\textstyle \sum _ { j \in [ K ] ^ { + } } \theta _ { 0 , j } f _ { j }$ , where $f _ { 0 } ~ = ~ 1$ . For simplicity, we consider $\Theta _ { ( 1 ) } ( \mathbf { z } ) ~ = ~ \alpha \mathbf { z }$ . This means $\begin{array} { r } { \Theta _ { ( 1 ) } ^ { } \circ \sigma \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . f _ { K } ) = \theta _ { 1 , 1 } \sigma ( \sum _ { j \in [ K ] ^ { + } } \theta _ { 0 , j } f _ { j } ) + \theta _ { 1 , 0 } . } \end{array}$ .
252
+
253
+ Theorem 1 is a consequence of the following lemmas:
254
+
255
+ Proof. (of Lemma 5.1)
256
+
257
+ For simplicity of notations, let $g ( \mathbf { x } ) = \Theta _ { ( 0 ) } ( f _ { 1 } , . . . f _ { K } )$ , hence $\begin{array} { r } { g ( \mathbf { x } ) = \sum _ { j \in [ K ] ^ { + } } \theta _ { j } f _ { j } ( \mathbf { x } _ { j } ) } \end{array}$ . Also recall that $\begin{array} { r } { L _ { \vec { \theta } } \left( \mathbf { x } ; g \right) = \sum _ { i = 1 } ^ { N } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) ^ { 2 } } \end{array}$ . To prove the existence of the minimizer, it is enough to solve the equations of critical points, in the case of a quadratic object function. That is, to solve the set of equations:
258
+
259
+ $$
260
+ \nabla _ { \vec { \theta } } L \left( \mathbf { x } ; g \right) = \left( \frac { \partial L } { \partial \theta _ { 0 } } , \ldots , \frac { \partial L } { \partial \theta _ { K } } \right) ^ { T } = \left( 0 , \ldots , 0 \right) ^ { T } ,
261
+ $$
262
+
263
+ where for each $s , t \in [ K ] ^ { + }$ ,
264
+
265
+ $$
266
+ \begin{array} { l } { \displaystyle \frac { \partial L } { \partial \theta _ { s } } = 2 \sum _ { i = 1 } ^ { N } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) \cdot f _ { s } ( \mathbf { x } ^ { ( i ) } ) = 2 \sum _ { i = 1 } ^ { N } \left( \sum _ { j \in [ K ] ^ { + } } \theta _ { j } f _ { j } ( \mathbf { x } _ { j } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) \cdot f _ { s } ( \mathbf { x } ^ { ( i ) } ) } \\ { \displaystyle \qquad = 2 \left( \sum _ { j \in [ K ] ^ { + } } \theta _ { j } \langle \vec { f } _ { s } , \vec { f } _ { j } \rangle - \langle \vec { f } _ { s } , \vec { y } \rangle \right) . } \end{array}
267
+ $$
268
+
269
+ Hence, to solve $\nabla _ { \vec { \theta } } L \left( \mathbf { x } ; g \right) \ = \ \vec { 0 }$ is equivalent to solve $\begin{array} { r l } { \left[ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \right] _ { s , t \in [ K ] ^ { + } } \times \left[ \theta _ { t } \right] _ { t \in [ K ] ^ { + } } = } & { { } } \end{array}$ $\big [ \langle \vec { f } _ { s } , \vec { y } \rangle \big ] _ { s \in [ K ] ^ { + } }$ \~yiis∈[K]+ , where hh \~fs, \~ftiis, $\Big [ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \Big ] _ { s , t \in [ K ] ^ { + } }$ is a $( K + 1 )$ by $( K + 1 )$ matrix, $[ \theta _ { t } ] _ { t \in [ K ] ^ { + } }$ and $\Big [ \langle \vec { f } _ { s } , \vec { y } \rangle \Big ] _ { s \in [ K ] ^ { + } }$ are both 1 by $( K + 1 )$ .
270
+
271
+ Note that linear independence of $\{ \vec { f } _ { j } \} _ { j \in [ K ] ^ { + } }$ makes $\Big [ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \Big ] _ { s , t \in [ K ] ^ { + } }$ a positive-definite Gram matrix (Horn & Johnson, 2012) , which means the inversion $\begin{array} { r } { \left[ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \right] _ { s , t \in [ K ] ^ { + } } ^ { - 1 } } \end{array}$ exists. Then $\vec { \theta }$ is solved:
272
+
273
+ $$
274
+ [ \theta _ { t } ] _ { t \in [ K ] ^ { + } } = \left[ \langle \vec { f } _ { s } , \vec { f } _ { t } \rangle \right] _ { s , t \in [ K ] ^ { + } } ^ { - 1 } \times \left[ \langle \vec { f } _ { s } , \vec { y } \rangle \right] _ { s \in [ K ] ^ { + } }
275
+ $$
276
+
277
+ The above shows the existence of the critical points. On the other hand, since $L _ { \vec { \theta } } ( \mathbf { x } ; g )$ is the summation of square terms, i.e. paraboloid, the the critical points can only be the minimum. $\boxed { \begin{array} { r l } \end{array} }$
278
+
279
+ The meaning of the gradient on a function surface is the direction that increases the function value most efficiently. Hence, if the gradient is not the zero vector then the corresponding point can not be the minimizer of the function surface. Recall for any $s \in [ k ]$ ,
280
+
281
+ $$
282
+ \begin{array} { r } { \left[ \frac { \partial L } { \partial \theta _ { t } } \right] _ { t \in [ K ] ^ { + } } \big | _ { \vec { \theta } = \vec { e } _ { s } } = 2 \left[ \langle \vec { f _ { s } } - \vec { \bf y } , \vec { f _ { t } } \rangle \right] _ { t \in [ K ] ^ { + } } . } \end{array}
283
+ $$
284
+
285
+ Before the proof of Lemma 5.2, we need the upper bound of the probability of some events. Note that $\vec { y }$ is defined according to the given training data, and for each $j \in [ K ] ^ { + }$ the length of $\vec { f } _ { j } - \vec { \bf y }$ , i.e. $\left\| { \vec { f } } - { \vec { y } } \right\|$ , is also given. The question is, for fixed $\vec { y }$ what is the probability of selected $\vec { f }$ is perpendicular to $\vec { f } - \vec { y } \smash { \mathrm { ? } }$ A folklore approach is considering that $\{ \vec { f } = ( f ( \mathbf { x } ^ { ( 1 ) } ) , . . . , f ( \mathbf { x } ^ { ( N ) } ) ) \}$ obeys the normal distribution, and setting the mean of $f ( \mathbf { x } ^ { ( i ) } )$ as $\mathbf { y } ^ { ( i ) }$ for each $i \in [ N ]$ . In the following we propose another simple probability argument to obtain a loose upper bound.
286
+
287
+ Proof. (of Lemma 5.3) Observe that $\langle \vec { f } - \vec { \bf y } , \vec { f } \rangle = 0 \Leftrightarrow ( \vec { f } - \vec { \bf y } ) \perp \bar { f } ,$ , which implies the angle between them, ${ \mathcal { L } } _ { ( { \vec { f } } - { \vec { \mathbf { y } } } ) , { \vec { f } } } ,$ is in the interval $\textstyle [ { \frac { \pi - \epsilon } { 2 } } , { \frac { \pi + \epsilon } { 2 } } ]$ for small $\epsilon \in \mathbb { R } ^ { + }$ , as shown in the left part of Figure 2. The red, orange, and blue vectors show three possibles of the pair of $\vec { f }$ and ${ \vec { f } } - { \vec { y } }$ . The length of $\vec { f } - \vec { y }$ is fixed since $\bar { f }$ and $\vec { y }$ are given, but the angle between $\vec { f } - \vec { y }$ and $\vec { y }$ can decide whether $( { \vec { f } } - { \vec { \mathbf { y } } } ) \perp { \bar { f } }$ . The gray circle collects all possible end-point of the vector ${ \vec { f } } - { \vec { y } }$ emission from the end-point of $\vec { y }$ . Although on the whole circle there are exactly two specific angles 3 can satisfy $( { \vec { f } } - { \vec { \mathbf { y } } } ) \bot { \vec { f } }$ , we give a loose small interval $\epsilon$ with respect to $\pi$ . In particularly, we set $0 < \epsilon < e ^ { - N }$ .
288
+
289
+ $$
290
+ \operatorname* { P r } _ { \vec { f } \in \mathfrak { F } ( \vec { y } , L _ { f } ) } \left\{ \mathcal { L } _ { ( \vec { f } - \vec { y } ) , \vec { f } } = \frac { \pi } { 2 } \right\} \le \operatorname* { P r } _ { \vec { f } \in \mathfrak { F } ( \vec { y } , L _ { f } ) } \left\{ \frac { \pi - \epsilon } { 2 } \le \mathcal { L } _ { ( \vec { f } - \vec { y } ) , \vec { f } } \le \frac { \pi + \epsilon } { 2 } \right\} & = \frac { \epsilon } { \pi } < \frac { 1 } { \pi e ^ { N } } .
291
+ $$
292
+
293
+ Now we are ready to proof Lemma 5.2.
294
+
295
+ ![](images/a5c1e0785c0351f5517470c0c51bc1f1cb1475e735aacc421e02a91b1c0d879d.jpg)
296
+ Figure 2: An illustration of Lemma 5.3 (the left) and Lemma 5.4 (the right)
297
+
298
+ Proof. (of Lemma 5.2)
299
+
300
+ We denote $\mathcal { A }$ the event that at least one of $\vec { e } _ { j } \in \boldsymbol { B } _ { \mathbb { R } ^ { K } }$ is the minimizer of $L ( \vec { \theta } )$ for convenience.
301
+
302
+ $$
303
+ \begin{array} { r l } { ^ { \mathrm { a } _ { L } } ( w ) - \dot { \bar { \mathbf { \xi } } } \overset { \mathrm { a v e ~ s v a m e ~ \overset { } { \mathrm { s o } } \mathrm { { \ u s } } } } { } } & { } \\ { } & { \Rightarrow [ \frac { \partial L } { \partial \theta _ { t } } ] _ { t \in [ K ] ^ { + } } | \check { \vec { \theta } } _ { \vec { \theta } \vec { e } _ { s } } = 2 [ \bigl \langle \vec { f } _ { s } - \vec { \mathbf { y } } , \vec { f } _ { t } \bigr \rangle ] _ { t \in [ K ] ^ { + } } = [ \boldsymbol { 0 } ] _ { K \times 1 } \mathrm { f o r ~ s o m e } s \in [ K ] ^ { + } } \\ { } & { \Rightarrow \bigl \langle \vec { f } _ { 1 } ^ { + } - \vec { \mathbf { y } } , \vec { f } _ { 1 } ^ { + } \bigr \rangle = 0 \wedge \bigl \langle \vec { f } _ { 1 } ^ { + } - \vec { \mathbf { y } } , \vec { f } _ { 2 } ^ { + } \bigr \rangle = 0 \wedge \dots \wedge \bigl \langle \vec { f } _ { 1 } ^ { + } - \vec { y } , \vec { f } _ { K } ^ { * } \bigr \rangle = 0 } \\ { } & { \qquad \mathrm { o r ~ } \cdot \cdot \cdot \mathrm { \ o r ~ } \bigl \langle \vec { f } _ { K } ^ { + } - \vec { \mathbf { y } } , \vec { f } _ { 1 } ^ { + } \bigr \rangle = 0 \wedge \bigl \langle \vec { f } _ { K } - \vec { \mathbf { y } } , \vec { f } _ { 2 } ^ { + } \bigr \rangle = 0 \wedge \cdot \cdot \cdot \wedge \bigl \langle \vec { f } _ { K } - \vec { \mathbf { y } } , \vec { f } _ { K } ^ { - } \bigr \rangle = 0 } \end{array}
304
+ $$
305
+
306
+ Hence, for given $\vec { \bf y }$ and $L ( f _ { j } ) = \Big \| \vec { f } _ { j } - \vec { y } \Big \| ^ { 2 } , \forall \in [ K ] ^ { + }$ , we have
307
+
308
+ $$
309
+ \begin{array} { r l } & { \operatorname* { P r } \left\{ \mathbb { I } _ { L ( \vec { w } ) } = 1 \right\} \underset { j \in [ K ] ^ { + } } { \le } \underset { f \in [ K ] ^ { + } } { \sum } \operatorname* { P r } \left\{ \langle \vec { f } _ { j } - \vec { \bf y } , \vec { f } _ { 1 } \rangle = 0 \land \langle \vec { f } _ { j } - \vec { \bf y } , \vec { f } _ { 2 } \rangle = 0 \land \cdots \land \langle \vec { f } _ { j } - \vec { \bf y } , \vec { f } _ { K } \rangle = 0 \right\} } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad < \frac { K } { \pi e ^ { N } } , } \end{array}
310
+ $$
311
+
312
+ where the second inequality is based on the symmetry between $\vec { f _ { s } }$ and $\vec { f } _ { t }$ for any $s , t \in [ K ] ^ { + }$ , and the last inequality is by Lemma 5.3. 厂
313
+
314
+ Proof. (of Theorem 3) We start from a simple case:
315
+
316
+ Claim: $\exists \beta \in \mathbb { R }$ s.t.
317
+
318
+ $$
319
+ \sum _ { i \in [ N ] } { ( f _ { 1 } ( x _ { i } ) - y _ { i } ) ^ { 2 } } - \sum _ { i \in [ N ] } { ( f _ { 1 } ( x _ { i } ) + \beta f _ { 2 } ( x _ { i } ) - y _ { i } ) ^ { 2 } } > 0 .
320
+ $$
321
+
322
+ Proof.
323
+
324
+ $$
325
+ \begin{array} { r l } { \displaystyle \sum _ { i \in [ N ] } \left( f _ { 1 } ( x _ { i } ) - y _ { i } \right) ^ { 2 } - \sum _ { i \in [ N ] } \left( f _ { 1 } ( x _ { i } ) + \beta f _ { 2 } ( x _ { i } ) - y _ { i } \right) ^ { 2 } } & { } \\ { = \displaystyle \sum _ { i \in [ N ] } \left[ \left( f _ { 1 } ( x _ { i } ) - y _ { i } \right) ^ { 2 } - \left( f _ { 1 } ( x _ { i } ) + \beta f _ { 2 } ( x _ { i } ) - y _ { i } \right) ^ { 2 } \right] } & { } \\ { = \left[ - \displaystyle \sum _ { i \in [ N ] } f _ { 1 } ( x _ { i } ) ^ { 2 } \right] \beta ^ { 2 } + \left[ 2 \displaystyle \sum _ { i \in [ N ] } \left( f _ { 2 } ( x _ { i } ) y _ { i } - f _ { 2 } ( x _ { i } ) f _ { 1 } ( x _ { i } ) \right) \right] \beta } \end{array}
326
+ $$
327
+
328
+ Observe that the above is a quadratic equation of $\beta$ with negative leading coefficient. Hence, to obtain the maximum of the difference, we can set
329
+
330
+ $$
331
+ \beta = \frac { \sum _ { i \in [ N ] } \big ( f _ { 2 } ( x _ { i } ) y _ { i } - f _ { 2 } ( x _ { i } ) f _ { 1 } ( x _ { i } ) \big ) } { \sum _ { i \in [ N ] } f _ { 1 } ( x _ { i } ) ^ { 2 } } = \frac { \langle \vec { y } - \vec { f _ { 1 } } , \vec { f _ { 2 } } \rangle } { \langle \vec { f _ { 2 } } , \vec { f _ { 2 } } \rangle }
332
+ $$
333
+
334
+ Note that if $\langle \vec { y } - \vec { f } _ { 1 } , \vec { f } _ { 2 } \rangle = 0$ then the last pre-trained component is no need to be added. We aim to calculate the probability of this case. Observe that $\langle \vec { y } - \vec { f _ { 1 } } , \vec { f _ { 2 } } \rangle = 0 \Leftrightarrow ( \vec { y } - \vec { f _ { 1 } } ) \perp \vec { f _ { 2 } }$ . This condition is different from previous Lemma. Here we have to find the upper bound of the probability of $( \vec { y } - \vec { f } _ { 1 } ) \perp \vec { f } _ { 2 }$ for given $\vec { f } _ { 1 }$ and ${ \vec { y } } .$ . As shown in the left part of Figure 2), the angle between $\vec { f } _ { 2 }$ and $\vec { y }$ must be in a specific interval, say $\textstyle [ { \frac { \pi - \epsilon } { 2 } } , { \frac { \pi + \epsilon } { 2 } } ]$ for small $\epsilon \in \mathbb { R } ^ { + }$ . In order to be concrete, we set $0 < \epsilon < e ^ { - N }$ .
335
+
336
+ $$
337
+ \operatorname* { P r } _ { \vec { f } \in \mathfrak { F } ( \vec { \mathfrak { y } } , 1 ) } \left\{ \big ( \vec { y } - \vec { f _ { 1 } } \big ) \perp \vec { f _ { 2 } } \right\} \leq \frac { \epsilon } { \pi } < \frac { 1 } { \pi e ^ { N } } .
338
+ $$
339
+
340
+ The general case can be reduced to the above claim by considering $g _ { K - 1 }$ as $f _ { 1 }$ and $\theta _ { k } f _ { K }$ as $\beta f _ { 2 }$ . Furthermore, since there there $K$ possibles the be selected as the least pre-trained component, the probability is upper bounded by $\frac { \star } { \pi e ^ { N } }$ . □
341
+
342
+ # 8.2 FUNCTION COMPOSITION BY NON-LINEAR ACTIVATION
343
+
344
+ Proof. (of Lemma 5.4) Although the lemma is an existence statement, we give a constructive proof here. By setting $D = 1$ in Proposition 8.1, we know that for Logistic $S ( z )$ and $0 < \epsilon < 1 / 1 0 0 0$ , the degree-one Taylor approximation $\begin{array} { r } { A _ { S ( z ) , 1 } = \frac { 1 } { 2 } + \frac { 1 } { 4 } z } \end{array}$ with the remainder $| R _ { S ( z ) , 2 } | < \epsilon$ . Define $M : =$ $1 0 \cdot \operatorname* { m a x } _ { j \in [ K ] ^ { + } , i \in [ N ] } \left\{ | f _ { j } ( x _ { i } ) | \right\}$ . Hence by setting $\begin{array} { r } { z = \frac { f _ { j } ( \mathbf { x } _ { j } ) } { M } } \end{array}$ , we have $\begin{array} { r } { \left| S \left( \frac { f _ { j } ( \mathbf { x } _ { j } ) } { M } \right) - \frac { 1 } { 2 } - \frac { f _ { j } ( \mathbf { x } _ { j } ) } { 4 M } \right| < } \end{array}$ $\epsilon$ . This means that for the given $j \in [ K ]$ , $\textstyle \theta _ { j } = { \frac { 1 } { M } }$ , $\theta _ { 0 } =$ and for all $j ^ { \prime } \ne j$ , $\theta _ { j ^ { \prime } } = 0$ . Furthermore, $\alpha = 4 M$ . □
345
+
346
+ This lemma implies that the $S ( z )$ can approximate linear function as possible in a non-zero length interval, hence if the scaling of $\vec { \theta }$ is allowed then Theorem 1 can be applied.
347
+
348
+ Corollary 8.1. If the activation function is the Logistic, $S ( z )$ , and $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies LIC, then with high probability there is a vector $\vec { \theta }$ s.t. $\begin{array} { r } { L _ { \vec { \theta } } \left( \mathbf { x } ; \sigma \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) \right) < \operatorname* { m i n } _ { j \in [ K ] ^ { + } } L ( f _ { j } ( \mathbf { x } _ { j } ) ) } \end{array}$ .
349
+
350
+ Proof. Set $\epsilon$ of above Lemma as $\frac { \epsilon ^ { * } } { 3 N }$ , then previous Lemma shows that there exists $\theta$ which maps $\{ f _ { j } \}$ into $\mathcal { Z } _ { \sigma \circ \Theta _ { ( 0 ) } , 1 , \frac { \epsilon ^ { * } } { 3 N } }$ . Since the output of $\sigma \circ \Theta _ { ( 0 ) }$ is a linear function with error at most 3N , we have the same conclusion. □
351
+
352
+ Proof. Let $g ( \mathbf { x } ) = \sigma \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) ( \mathbf { x } )$ for short. First observe that $\begin{array} { r } { | g ( \mathbf { x } ) - f _ { j } ( \mathbf { x } ) | < \frac { \epsilon ^ { * } } { 3 N } \Rightarrow } \end{array}$ $\begin{array} { r } { \forall i \in [ N ] , g ( \mathbf { x } ^ { ( i ) } ) - f _ { j } ( \mathbf { x } ^ { ( i ) } ) > \frac { - \epsilon ^ { * } } { 3 N } } \end{array}$ . Then
353
+
354
+ $$
355
+ \sum _ { i \in [ N ] } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) = \sum _ { i \in [ N ] } \left\{ \left( g ( \mathbf { x } ^ { ( i ) } ) - f _ { j } ( \mathbf { x } ^ { ( i ) } ) \right) + \left( f _ { j } ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) \right\} > N \cdot \frac { - \epsilon ^ { * } } { 3 N } + \epsilon ^ { * } = \frac { 2 \epsilon ^ { * } } { 3 } > 0 .
356
+ $$
357
+
358
+ On the other hand, it can be calculated that
359
+
360
+ $$
361
+ \nabla _ { \vec { \theta } } L \left( \mathbf { x } ; g \right) | _ { \vec { \theta } = \vec { \theta } _ { \epsilon ^ { * } / 3 } } = \left( \frac { \partial L } { \partial w _ { 0 } } , \frac { \partial L } { \partial \theta _ { 1 } } , . . . , \frac { \partial L } { \partial \theta _ { K } } , \frac { \partial L } { \partial b _ { 0 } } \right) ^ { T } | _ { \vec { \theta } = \vec { \theta } _ { \epsilon ^ { * } / 3 } } ,
362
+ $$
363
+
364
+ where $[ a ] ^ { T }$ is the transpose of the matrix $[ a ]$ . Also note that ∂L∂w0 |θ\~=θ\~∗/3 = 2 · $\begin{array} { r } { \sum _ { i \in [ N ] } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) \cdot S ( z ) } \end{array}$ , and $\begin{array} { r l r } { \frac { \partial L } { \partial b _ { 0 } } | _ { \vec { \theta } = \vec { \theta } _ { \epsilon ^ { * } / 3 } } } & { = } & { 2 \mathbf { \nabla } \cdot \sum _ { i \in [ N ] } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) \cdot 1 } \end{array}$ . Since $\begin{array} { r } { \sum _ { i \in [ N ] } \left( g ( \mathbf { x } ^ { ( i ) } ) - \mathbf { y } ^ { ( i ) } \right) > 0 } \end{array}$ , we can conclude $\nabla _ { \vec { \theta } } L \left( \mathbf { x } ; g \right) | _ { \vec { \theta } = \vec { \theta } _ { \epsilon ^ { * } / 3 } } \neq \vec { 0 }$ . □
365
+
366
+ Proof. (of Lemma 5.6 ) By previous Lemma, it is valid to consider the best performance component, $f _ { j ^ { * } }$ ; i.e. $\begin{array} { r } { L ( f _ { j ^ { * } } ) = \operatorname* { m i n } _ { j \in [ K ] ^ { + } } L ( f _ { j } ( \mathbf { x } _ { j } ) ) } \end{array}$ . Since $\nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \neq \vec { 0 }$ , by definition of the gradient, moving along the direction of $- \nabla _ { \vec { \theta } } L ( \vec { \theta _ { \epsilon ^ { * } / 3 } } ) / \left. \nabla _ { \vec { \theta } } L ( \vec { \theta _ { \epsilon ^ { * } / 3 } } ) \right.$ with a step-size $\alpha > 0$ must strictly decrease the value of $L _ { \vec { \theta } } ( \mathbf { x } ; g )$ . W.L.O.G, we can assume this $\alpha$ is optimal; that is, if $\alpha > r > 0$ then $L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) > L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) - r \cdot \nabla _ { \vec { \theta } } L ( \vec { \theta _ { \epsilon ^ { * } / 3 } } ) / \left. \nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \right.$ , while if $r = \alpha + \delta$ for some $\delta > 0$ then
367
+
368
+ $L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \leq L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) - r \cdot \nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) / \left\| \nabla _ { \vec { \theta } } L ( \vec { \theta } _ { \epsilon ^ { * } / 3 } ) \right\| .$ . The issue is how to find a proper step-size $r > 0 ?$ We consider the line search approach such that:
369
+
370
+ $$
371
+ r ^ { * } = \arg \operatorname* { m i n } _ { r \in \mathbb { R } } \left\{ L \left( \vec { \theta _ { 0 } } - r \cdot \frac { \nabla _ { \vec { \theta } } L ( \vec { \theta _ { 0 } } ) } { \left\| \nabla _ { \vec { \theta } } L ( \vec { \theta _ { 0 } } ) \right\| } \right) \right\}
372
+ $$
373
+
374
+ This outputs $F ^ { * }$ then we can make sure that $L \left( \vec { \theta _ { 0 } } \right) > L \left( \vec { \theta _ { 0 } } \right) - r \cdot \nabla _ { \vec { \theta } } L ( \vec { \theta _ { 0 } } ) / \left. \nabla _ { \vec { \theta } } L ( \vec { \theta _ { 0 } } ) \right.$ . Since the underlining $\theta _ { 0 }$ is $\vec { \theta _ { \epsilon ^ { * } / 3 } }$ that makes the loss is the same with the best one. Hence, we have $( \vec { \theta _ { 0 } } - r ^ { * } \cdot \nabla _ { \vec { \theta } } L ( \vec { \theta _ { \epsilon ^ { * } / 3 } } ) / \left\| \nabla _ { \vec { \theta } } L ( \vec { \theta _ { \epsilon ^ { * } / 3 } } ) \right\| )$ to fit our goal (beating the best one). □
375
+
376
+ Combining these lemmas can obtain the conclusion of Theorem 2.
377
+
378
+ Corollary 8.2. The process of Lemma 5.5 converges.
379
+
380
+ Proof. (of 8.2) It is know that if a monotone decreasing sequence is bounded below, then this sequence convergences. ..... (revising) Repeating the process of Lemma 2, we can obtain a strictly decreasing sequence: $L ( \vec { \theta _ { 0 } } ) > L ( \vec { \theta _ { 1 } } ) > L ( \vec { \theta _ { 2 } } ) > . . . .$ . Note that $\forall i , ( \vec { \theta _ { i } } ) \geq 0$ . This means the sequence is monotone decreasing and bounded below, so theoretically it converges by monotone convergence theorem of mathematical analysis. Algorithmically, the gradient descent based sequence finding process stops at some term with $\nabla _ { \vec { \theta } } { \cal L } ( \vec { \theta ^ { \prime } } ) = 0$ , which is a (local) minimum or a saddle point. □
381
+
382
+ Corollary 8.3. If the assumptions in Theorem 2 are satisfied, then with height probability there exists $ { \vec { \theta ^ { \prime } } }$ s.t. $L _ { \vec { \theta ^ { \prime } } }$ is a (local) minimum or a saddle point, while $\begin{array} { r } { L _ { \vec { \theta ^ { \prime } } } \left( \mathbf { x } ; g \right) < \operatorname* { m i n } _ { j \in [ K ] ^ { + } } \left| L \bigl ( f _ { j } ( \mathbf { x } _ { j } ) \bigr ) \right| } \end{array}$ still holds.
383
+
384
+ Assume the pre-trained component set $\{ f _ { j } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ satisfies both NPC and LIC, then there exists $\vec { \theta }$ s.t. $\begin{array} { r } { L _ { \vec { \theta } } ( \mathbf { x } ; g ) < \operatorname* { m i n } _ { j \in [ K ] ^ { + } } L ( f _ { j } ( \mathbf { x } _ { j } ) ) } \end{array}$ .
385
+
386
+ In the previous proof, the critical properties of activations are local linearity and differentiability. Hence, it is not hard to check that if we replace $\sigma ( \cdot )$ in Eq. (1) with other common activations, the conclusion still holds. By local linearity we mean that on a non-zero length interval in its domain, the function can approximate the linear mapping as well as possible.
387
+
388
+ Corollary 8.4. Theorem 1 and 2 can apply on any activations with local linearity and differentiability.
389
+
390
+ Based on Corollary 5.1 and Lemma 5.6, it is natural to obtain the process of finding $\vec { \theta }$ : by gradient descent or the closed form of Corollary 5.1. We can compute the optimal weights for the bottom Sigmiod block. On the other hand, after random initializing, the parameters of un-trained components in the Relu or Tanh blocks are assigned. This implies they can be treated as the all pre-trained case in Theorem 1 or 2. In fact, given the outputs from bottom level block then Corollary 5.1 provides weights improving the accuracy. Then it goes to the next up level block until the top, which is the forwarding steps of Back-propagation LeCun et al. (1988). Hence with initialization for un-trained component, Corollary 5.1 is essentially the same as Back-propagation.
391
+
392
+ # 8.3 A MIX OF PRE-TRAINED AND UN-TRAINED COMPONENTS
393
+
394
+ Now we first consider some of $\{ f _ { \Theta _ { j } } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ are pre-trained and some are un-trained, and then investigate the hierarchical combination of both kinds of components. In particularly, Eq. (1) can be re-written as $g ( \mathbf { x } ) = w _ { 0 } \cdot \sigma \left( \theta _ { 1 } f _ { 1 } + \theta _ { 2 } f _ { \Theta _ { 2 } } \right) + b _ { 0 }$ , where $f _ { 1 }$ is a pre-trained component and $f _ { \Theta _ { 2 } }$ is un-trained. Since $\Theta _ { 2 }$ is not fixed, it can not be checked that LIC and NPC assumptions are satisfied. On the other hand, after initialization, $f _ { \Theta _ { 2 } }$ can be seen as a pre-trained component at any a snapshot during training phase.
395
+
396
+ Theorem 5. In the end of an weight updating iteration, if the components $f _ { 1 }$ and $f _ { \Theta _ { 2 } }$ satisfy LIC and NPC assumptions, then with high probability w\~ updated in the next iteration can improve the loss.
397
+
398
+ Proof. Recall the training algorithm is the backpropagation algorithm. Also note that according to Eq. (1), the order of updating is $\vec { \theta }$ first and then $\Theta _ { 2 }$ . We denote in the end of iteration $i$ the value of $\vec { \theta }$ and $\Theta _ { 2 }$ as $\scriptstyle { \vec { \theta ^ { ( { i t e r = i } ) } } }$ and $\Theta _ { 2 } ^ { ( i t e r = i ) }$ , respectively. With randomized initialization, $\Theta _ { 2 }$ is assigned as Θ(iter=0)2 before the execution of the iteration 1. Then in each iteration i ≥ 1, g(x) is a combination of fixed parameter components. Hence this can reduce to the all pre-trained cases, and can apply Theorem 1 and 2. □
399
+
400
+ Lemma 8.1. For a given data set $X$ , let $\vec { g } : = ( g _ { 1 } , . . . , g _ { N } )$ and $\vec { y } = ( y _ { 1 } , . . . , y _ { N } )$ . If $\langle \vec { g } , \vec { g } - \vec { y } \rangle \neq 0 ,$ then there exists $\alpha \in \mathbb { R }$ s.t.
401
+
402
+ $$
403
+ \sum _ { i \in [ N ] } \left( \alpha g ( x _ { i } ) - y _ { i } \right) ^ { 2 } < \sum _ { i \in [ N ] } \left( g ( x _ { i } ) - y _ { i } \right) ^ { 2 }
404
+ $$
405
+
406
+ Proof. It is equivalent to show the inequality
407
+
408
+ $$
409
+ \sum _ { i \in [ N ] } \left( \alpha g ( x _ { i } ) - y _ { i } \right) ^ { 2 } - \sum _ { i \in [ N ] } \left( g ( x _ { i } ) - y _ { i } \right) ^ { 2 } < 0
410
+ $$
411
+
412
+ has a real number solution.
413
+
414
+ $$
415
+ \begin{array} { l } { { \displaystyle \sum _ { i \in [ N ] } \left[ ( \alpha g ( x _ { i } ) - y _ { i } ) ^ { 2 } - ( g ( x _ { i } ) - y _ { i } ) ^ { 2 } \right] } } \\ { { \displaystyle \qquad = \left( \sum _ { i \in [ N ] } g ( x _ { i } ) ^ { 2 } \right) \alpha ^ { 2 } + \left( - 2 \sum _ { i \in [ N ] } g ( x _ { i } ) y _ { i } \right) \alpha + \left( - \sum _ { i \in [ N ] } g ( x _ { i } ) ^ { 2 } + 2 g ( x _ { i } ) y _ { i } \right) } } \\ { { \displaystyle \qquad = \langle \vec { g } , \vec { g } \rangle \alpha ^ { 2 } + ( - 2 \langle \vec { g } , \vec { y } \rangle ) \alpha + \left( - \langle \vec { g } , \vec { g } \rangle + 2 \langle \vec { g } , \vec { y } \rangle \right) . } } \end{array}
416
+ $$
417
+
418
+ This is a quadratic inequality of $\alpha$ , hence if
419
+
420
+ $$
421
+ \begin{array} { r } { \left( - 2 \langle \vec { g } , \vec { y } \rangle \right) ^ { 2 } - 4 \left( \langle \vec { g } , \vec { g } \rangle \right) \left( - \langle \vec { g } , \vec { g } \rangle + 2 \langle \vec { g } , \vec { y } \rangle \right) \geq 0 , } \end{array}
422
+ $$
423
+
424
+ then there exists at least one real solution.
425
+
426
+ Now we first consider some of $\{ f _ { \Theta _ { j } } ( \mathbf { x } _ { j } ) \} _ { j = 1 } ^ { K }$ are pre-trained and some are un-trained, and then investigate the hierarchical combination of both kinds of components. In particularly, Eq. (1) can be re-written as $g ( \mathbf { x } ) = w _ { 0 } \cdot \sigma \left( \theta _ { 1 } f _ { 1 } + \theta _ { 2 } f _ { \Theta _ { 2 } } \right) + b _ { 0 }$ , where $f _ { 1 }$ is a pre-trained component and $f _ { \Theta _ { 2 } }$ is un-trained. Since $\Theta _ { 2 }$ is not fixed, it can not be checked that LIC and NPC assumptions are satisfied. On the other hand, after initialization, $f _ { \Theta _ { 2 } }$ can be seen as a pre-trained component at any a snapshot during training phase.
427
+
428
+ # 8.4 GENERALIZATION ERROR ANALYSIS
429
+
430
+ Theorem 4. Assume pre-trained components $\{ f _ { j } \} _ { j = 1 } ^ { K }$ satisfy LIC and NPC. Let $\{ G E ( f _ { j } ) \} _ { j = 1 } ^ { K }$ be corresponding generalization errors of $\{ f _ { j } \} _ { j = 1 } ^ { K }$ , and $\Theta _ { ( L ) } \circ \sigma _ { ( L ) } \circ \cdot \cdot \cdot \circ \sigma _ { ( 1 ) } \circ \Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) b e$ the composite neural network. Denote the generalization error, $\mathbf { E } \{ L ( \Theta _ { ( L ) } \circ \sigma _ { ( L ) } \circ \cdot \cdot \cdot \circ \sigma _ { ( 1 ) } \circ$ $\Theta _ { ( 0 ) } ( f _ { 1 } , . . . , f _ { K } ) ) \}$ , of the composite neural network as $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , \dots , f _ { K } } \}$ . Suppose the learned weights obey the normal distribution. Then with high probability, there exist a setting of $\{ \Theta _ { ( L ) } ^ { * } , . . . , \Theta _ { ( 0 ) } ^ { * } \}$ such that $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , . . . , f _ { K } } \} \le \Theta _ { ( L ) } ^ { * } ( G E ( f _ { 1 } ) , . . . G _ { E } ( f _ { K } ) ) ,$ .
431
+
432
+ Proof. (of Theorem 4) (Proof Sketch) We apply the idea similar to Kawaguchi (2016): the exception of non-liner activations is same with the exception of liner activations. Previous theorems provide that with high probability there exists the solution of $\Theta _ { ( i ) } , \forall i \in [ L ] ^ { + }$ s.t. each $\Theta _ { ( i ) + 1 } \sigma \Theta _ { ( i ) }$ approximates a degree one polynomial $A _ { \Theta _ { ( i ) + 1 } \sigma \Theta _ { ( i ) } , 1 }$ as well as possible. If the weights are obey the normal distribution, then $\mathbf { E } \{ L _ { \Theta , f _ { 1 } , . . . , f _ { K } } \} \le \Theta _ { ( L ) } ^ { * } ( G E ( f _ { 1 } ) , . . . G _ { E } ( f _ { K } ) )$ . □
parse/train/HkGSniC9FQ/HkGSniC9FQ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkGSniC9FQ/HkGSniC9FQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkGSniC9FQ/HkGSniC9FQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyl9ahVFwH/Hyl9ahVFwH.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyl9ahVFwH/Hyl9ahVFwH_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyl9ahVFwH/Hyl9ahVFwH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyl9ahVFwH/Hyl9ahVFwH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgGCkrKvH/SkgGCkrKvH.md ADDED
@@ -0,0 +1,631 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DECENTRALIZED DEEP LEARNING WITH ARBITRARY COMMUNICATION COMPRESSION
2
+
3
+ Anastasia Koloskova∗ anastasia.koloskova@epfl.ch
4
+
5
+ Tao Lin∗ tao.lin@epfl.ch
6
+
7
+ Sebastian U. Stich sebastian.stich@epfl.ch
8
+
9
+ Martin Jaggi martin.jaggi@epfl.ch
10
+
11
+ EPFL Lausanne, Switzerland
12
+
13
+ # ABSTRACT
14
+
15
+ Decentralized training of deep learning models is a key element for enabling data privacy and on-device learning over networks, as well as for efficient scaling to large compute clusters. As current approaches are limited by network bandwidth, we propose the use of communication compression in the decentralized training context. We show that CHOCO-SGD achieves linear speedup in the number of workers for arbitrary high compression ratios on general non-convex functions, and non-IID training data. We demonstrate the practical performance of the algorithm in two key scenarios: the training of deep learning models (i) over decentralized user devices, connected by a peer-to-peer network and (ii) in a datacenter.
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ Distributed machine learning—i.e. the training of machine learning models using distributed optimization algorithms—has recently enabled many successful applications in research and industry. Such methods offer two of the key success factors: 1) computational scalability by leveraging the simultaneous computational power of many devices, and 2) data-locality, the ability to perform joint training while keeping each part of the training data local to each participating device. Recent theoretical results indicate that decentralized schemes can be as efficient as the centralized approaches, at least when considering convergence of training loss vs. iterations (Scaman et al., 2017; 2018; Lian et al., 2017; Tang et al., 2018; Koloskova et al., 2019; Assran et al., 2019).
20
+
21
+ Gradient compression techniques have been proposed for the standard distributed training case (Alistarh et al., 2017; Wen et al., 2017; Lin et al., 2018; Wangni et al., 2018; Stich et al., 2018), to reduce the amount of data that has to be sent over each communication link in the network. For decentralized training of deep neural networks, Tang et al. (2018) introduce two algorithms (DCD, ECD) which allow for communication compression. However, both these algorithms are restrictive with respect to the used compression operators, only allowing for unbiased compressors and—more significantly— so far not supporting arbitrarily high compression ratios. We here study CHOCO-SGD—recently introduced for convex problems only (Koloskova et al., 2019)—which overcomes these constraints.
22
+
23
+ For the evaluation of our algorithm we in particular focus on the generalization performance (on the test-set) on standard machine learning benchmarks, hereby departing from previous work such as e.g. (Tang et al., 2018; Wang et al., 2019; Tang et al., 2019; Reisizadeh et al., 2019) that mostly considered training performance (on the train-set). We study two different scenarios: firstly, (i) training on a challenging peer-to-peer setting, where the training data is distributed over the training devices (and not allowed to move), similar to the federated learning setting (McMahan et al., 2017). We are again able to show speed-ups for CHOCO-SGD over the decentralized baseline (Lian et al., 2017) with much less communication overhead. Secondly, (ii) training in a datacenter setting, where decentralized communication patterns allow better scalability than centralized approaches. For this setting we show that communication efficient CHOCO-SGD can improve time-to-accuracy on large tasks, such as e.g. ImageNet training. However, when investigating the scaling of decentralized algorithms to larger number of nodes we observe that (all) decentralized schemes encounter difficulties and often do not reach the same (test and train) performance as centralized schemes. As these findings point out some deficiencies of current decentralized training schemes (and are not particular to our scheme) we think that reporting these results is a helpful contribution to the community to spur further research on decentralized training schemes that scale to large number of peers.
24
+
25
+ Contributions. Our contributions can be summarized as:
26
+
27
+ • On the theory side, we are the first to show that CHOCO-SGD converges at rate $\mathcal { O } \big ( { 1 } / { \sqrt { n T } } + { 1 } / ( { \bar { \rho } ^ { 2 } } \delta T ) ^ { 2 / 3 } \big )$ on non-convex smooth functions, where $n$ denotes the number of nodes, $T$ the number of iterations, $\rho$ the spectral gap of the mixing matrix and $\delta$ the compression ratio. The main term, $\mathcal { O } \big ( \sqrt [ 1 ] { \sqrt { n T } } \big )$ , matches with the centralized baselines with exact communication and shows a linear speedup in the number of workers $n$ . Both $\rho$ and $\delta$ only affect the asymptotically smaller second term.
28
+ On the practical side, we present a version of CHOCO-SGD with momentum and analyze its practical performance on two relevant scenarios: $\circ$ for on-device training over a realistic peer-to-peer social network, where lowering the bandwidth requirements of joint training is especially impactful $\circ$ in a datacenter setting for computational scalability of training deep learning models for resource efficiency and improved time-to-accuracy
29
+ • Lastly, we systematically investigate performance of the decentralized schemes when scaling to larger number of nodes and we point out some (shared) difficulties encountered by current decentralized learning approaches.
30
+
31
+ # 2 RELATED WORK
32
+
33
+ For the training in communication restricted settings a variety of methods have been proposed. For instance, decentralized schemes (Lian et al., 2017; Nedic et al., 2018; Koloskova et al., 2019), ´ gradient compression (Seide et al., 2014; Strom, 2015; Alistarh et al., 2017; Wen et al., 2017; Lin et al., 2018; Wangni et al., 2018; Bernstein et al., 2018; Lin et al., 2018; Alistarh et al., 2018; Stich et al., 2018; Karimireddy et al., 2019), asynchronous methods (Recht et al., 2011; Assran et al., 2019) or performing multiple local SGD steps before averaging (Zhang et al., 2016; McMahan et al., 2017; Lin et al., 2020). This especially covers learning over decentralized data, as extensively studied in the federated learning literature for the centralized algorithms (McMahan et al., 2016). In this paper we advocate for combining decentralized SGD schemes with gradient compression.
34
+
35
+ Decentralized SGD. We in particular focus on approaches based on gossip averaging (Kempe et al., 2003; Xiao & Boyd, 2004; Boyd et al., 2006) whose convergence rate typically depends on the spectral gap $\rho \ge 0$ of the mixing matrix (Xiao & Boyd, 2004). Lian et al. (2017) combine SGD with gossip averaging and show that the leading term in the convergence rate $\mathcal { O } \big ( \sqrt [ 1 ] { \sqrt { n T } } \big )$ is consistent with the convergence of the centralized mini-batch SGD (Dekel et al., 2012) and the spectral gap only affects the asymptotically smaller terms. Similar results have been observed very recently for related schemes (Scaman et al., 2017; 2018; Koloskova et al., 2019; Yu et al., 2019).
36
+
37
+ Quantization. Communication compression with quantization has been popularized in the deep learning community by the reported successes in (Seide et al., 2014; Strom, 2015). Theoretical guarantees were first established for schemes with unbiased compression (Alistarh et al., 2017; Wen et al., 2017; Wangni et al., 2018) but soon extended to biased compression (Bernstein et al., 2018) as well. Schemes with error correction work often best in practice and give the best theoretical gurantees (Lin et al., 2018; Alistarh et al., 2018; Stich et al., 2018; Karimireddy et al., 2019). Recently, also proximal updates and variance reduction have been studied in combination with quantized updates (Mishchenko et al., 2019; Horváth et al., 2019).
38
+
39
+ Decentralized Optimization with Quantization. It has been observed that gossip averaging can diverge (or not converge to the correct solution) in the presence of quantization noise (Xiao et al., 2005; Carli et al., 2007; Nedic et al., 2008; Dimakis et al., 2010; Carli et al., 2010b; Yuan et al., 2012). ´ Reisizadeh et al. (2018) propose an algorithm that can still converge, though at a slower rate than the exact scheme. Another line of work proposed adaptive schemes (with increasing compression accuracy) that converge at the expense of higher communication cost (Carli et al., 2010a; Doan et al.,
40
+
41
+ 2018; Berahas et al., 2019). For deep learning applications, Tang et al. (2018) proposed the DCD and ECD algorithms that converge at the same rate as the centralized baseline though only for constant compression ratio. The CHOCO-SGD algorithm that we consider in this work can deal with arbitrary high compression, and has been introduced in (Koloskova et al., 2019) but only been analyzed for convex functions. For non-convex functions we show a rate of $\mathcal { O } \big ( { } ^ { 1 / \sqrt { n T } } + { } ^ { 1 / \vert } ( \rho ^ { 2 } \delta T ) ^ { \frac { 2 } { 3 } } \big )$ , where $\delta > 0$ measures the compression quality. Simultaneous work of Tang et al. (2019) introduced DeepSqueeze, an alternative method which also converges with arbitrary compression ratio. In our experiments, under the same amount of tuning, CHOCO-SGD achieves higher test accuracy.
42
+
43
+ # 3 CHOCO-SGD
44
+
45
+ In this section we formally introduce the decentralized optimization problem, compression operators, and the gossip-based stochastic optimization algorithm CHOCO-SGD from (Koloskova et al., 2019).
46
+
47
+ Distributed Setup. We consider optimization problems distributed across $n$ nodes of the form
48
+
49
+ $$
50
+ f ^ { \star } : = \operatorname* { m i n } _ { { \bf x } \in \mathbb { R } ^ { d } } \left[ f ( { \bf x } ) : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } f _ { i } ( { \bf x } ) \right] , \qquad f _ { i } ( { \bf x } ) : = \mathbb { E } _ { \xi _ { i } \sim D _ { i } } F _ { i } ( { \bf x } , \xi _ { i } ) , \qquad \forall i \in [ n ] ,
51
+ $$
52
+
53
+ where $D _ { 1 } , \ldots D _ { n }$ are local distributions for sampling data which can be different on every node, $F _ { i } \colon \mathbb { R } ^ { d } \times \Omega \mathbb { R }$ are possibly non-convex (and non-identical) loss functions. This setting covers the important case of empirical risk minimization in distributed machine learning and deep learning applications.
54
+
55
+ Communication. Every device is only allowed to communicate with its local neighbours defined by the network topology, given as a weighted graph $G = ( [ n ] , E )$ , with edges $E$ representing the communication links along which messages (e.g. model updates) can be exchanged. We assign a positive weight $w _ { i j }$ to every edge $\mathbf { \nabla } _ { w _ { i j } } = 0$ for disconnected nodes $\{ i , j \} \not \in E )$ .
56
+
57
+ Assumption 1 (Mixing matrix). We assume that $W \in [ 0 , 1 ] ^ { n \times n }$ , $( W ) _ { i j } = w _ { i j }$ is a symmetric $( W = W ^ { \top }$ ) doubly stochastic $( W \mathbf { 1 } = \mathbf { 1 } , \mathbf { 1 } ^ { \top } W = \mathbf { 1 } ^ { \top }$ ) matrix with eigenvalues $1 = | \lambda _ { 1 } ( W ) | >$ $| \lambda _ { 2 } ( W ) | \ge \cdots \ge | \dot { \lambda } _ { n } ( W ) |$ and spectral gap $\rho : = 1 - | \lambda _ { 2 } ( W ) | \in ( 0 , 1 ]$ .
58
+
59
+ In our experiments we set the weights based on the local node degrees: $\begin{array} { r l } { w _ { i j } } & { { } = } \end{array}$ $\operatorname* { m a x } \{ \deg ( i ) , \deg ( j ) \} ^ { - 1 }$ for $\{ i , j \} \in E$ . This will not only guarantee $\rho > 0$ but these weights can easily be computed in a local fashion on each node (Xiao & Boyd, 2004).
60
+
61
+ Compression. We aim to only transmit compressed (e.g. quantized or sparsified) messages. We formalized this through the notion of compression operators that was e.g. also used in (Tang et al., 2018; Stich et al., 2018).
62
+
63
+ Definition 3.1 (Compression operator). $Q \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } ^ { d } }$ is a compression operator if it satisfies
64
+
65
+ $$
66
+ \begin{array} { r } { \mathbb { E } _ { Q } \left\| Q ( \mathbf { x } ) - \mathbf { x } \right\| ^ { 2 } \leq \left( 1 - \delta \right) \left\| \mathbf { x } \right\| ^ { 2 } , } \end{array}
67
+ $$
68
+
69
+ $$
70
+ \forall \mathbf { x } \in \mathbb { R } ^ { d } ,
71
+ $$
72
+
73
+ for a parameter $\delta > 0$ . Here $\mathbb { E } _ { Q }$ denotes the expectation over the internal randomness of operator $Q$
74
+
75
+ In contrast to the quantization operators used in e.g. (Alistarh et al., 2017; Horváth et al., 2019), compression operators defined as in (2) are not required to be unbiased and therefore supports a larger class of compression operators. Some examples can be found in (Koloskova et al., 2019) and we further discuss specific compression schemes in Section 5.
76
+
77
+ Algorithm. CHOCO-SGD is summarized in Algorithm 1. Every worker $i$ stores its own private variable $\mathbf { x } _ { i } \in \mathbb { R } ^ { d }$ that is updated by a stochastic gradient step in part $\textcircled{2}$ and a modified gossip averaging step on line 2. This step is a key element of the algorithm as it preserves the averages of the iterates even in presence of quantization noise (the compression errors are not discarded, but aggregated in the local variables $\mathbf { x } _ { i }$ , see also (Koloskova et al., 2019)). The nodes communicate with their neighbors in part $\textcircled{1}$ and update the variables $\hat { \mathbf { x } } _ { j } \in \mathbb { R } ^ { d }$ for all their neighbors $\{ i , j \} \in E$ only using compressed updates. These $\hat { \mathbf { x } } _ { i }$ are available to all the neighbours of the node $i$ and represent the ‘publicly available’ copies of the private $\mathbf { x } _ { i }$ , in general $\mathbf { x } _ { i } \neq \hat { \mathbf { x } } _ { i }$ , due to the communication restrictions.
78
+
79
+ From an implementation aspect, it is worth highlighting that the communication part $\textcircled{1}$ and the gradient computation part $\textcircled{2}$ can both be executed in parallel because they are independent. Moreover,
80
+
81
+ # Algorithm 1 CHOCO-SGD (Koloskova et al., 2019)
82
+
83
+ input: Initial value $\overline { { \mathbf { x } } } ^ { ( - \frac { 1 } { 2 } ) } \in \mathbb { R } ^ { d } , \mathbf { x } _ { i } ^ { ( - \frac { 1 } { 2 } ) } = \overline { { \mathbf { x } } } ^ { ( - \frac { 1 } { 2 } ) }$ on each node $i \in [ n ]$ , consensus stepsize $\gamma$ , SGD stepsize $\eta$ communication graph $G = ( [ n ] , E )$ and mixing matrix $W$ , initialize $\hat { \mathbf { x } } _ { i } ^ { ( 0 ) } : = \mathbf { 0 } \forall i \in [ n ]$ 1: for $t$ in $0 \dots T - 1$ do {in parallel for all workers $i \in [ n ]$ } 2: $\begin{array} { r } { \mathbf { x } _ { i } ^ { ( t ) } : = \mathbf { x } _ { i } ^ { ( t - \frac { 1 } { 2 } ) } + \gamma \sum _ { j : \{ i , j \} \in E } w _ { i j } \big ( \hat { \mathbf { x } } _ { j } ^ { ( t ) } - \hat { \mathbf { x } } _ { i } ^ { ( t ) } \big ) } \end{array}$ / modified gossip averaging 3: $\mathbf { q } _ { i } ^ { ( t ) } : = { Q } ( \mathbf { x } _ { i } ^ { ( t ) } - \hat { \mathbf { x } } _ { i } ^ { ( t ) } )$ / compression 4: for neighbors $j \colon \{ i , j \} \in E$ (including $\{ i \} \in E )$ ) do
84
+ $\textcircled{1}$ 5: Send $\mathbf { q } _ { i } ^ { ( t ) }$ and receive $\mathbf { q } _ { j } ^ { ( t ) }$ / communication 6: $\hat { \mathbf { x } } _ { j } ^ { ( t + 1 ) } : = \mathbf { q } _ { j } ^ { ( t ) } + \hat { \mathbf { x } } _ { j } ^ { ( t ) }$ / local update 7: end for 8: Sample $\xi _ { i } ^ { ( t ) }$ , compute gradient $\mathbf { g } _ { i } ^ { ( t ) } : = \nabla F _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } )$
85
+ 2 9: i x(t+ 12 ) : = x (t) − ηg(t)i / stochastic gradient update 10: end for
86
+
87
+ each node only needs to store 3 vectors at most, independent of the number of neighbors (this might not be obvious from the notation used here for additinal clarity, for further details c.f. (Koloskova et al., 2019)). We further propose a momentum-version of CHOCO-SGD in Algorithm 2 (see also Section D for further details).
88
+
89
+ # 4 CONVERGENCE OF CHOCO-SGD ON SMOOTH NON-CONVEX PROBLEMS
90
+
91
+ As the first main contribution, we here extend the analysis of CHOCO-SGD to non-convex problems. For this we make the following technical assumptions:
92
+
93
+ Assumption 2. Each function $f _ { i } \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ for $i \in [ n ]$ is $L$ -smooth, that is
94
+
95
+ $$
96
+ \begin{array} { r } { \| \nabla f _ { i } ( \mathbf { y } ) - \nabla f _ { i } ( \mathbf { x } ) \| \leq L \left\| \mathbf { y } - \mathbf { x } \right\| , \qquad \forall \mathbf { x } , \mathbf { y } \in \mathbb { R } ^ { d } , i \in [ n ] , } \end{array}
97
+ $$
98
+
99
+ and the variance of the stochastic gradients is bounded on each worker:
100
+
101
+ $\begin{array} { r } { \mathbb { E } _ { \xi _ { i } } \left\| \nabla F _ { i } ( \mathbf { x } , \xi _ { i } ) - \nabla f _ { i } ( \mathbf { x } ) \right\| ^ { 2 } \leq \sigma _ { i } ^ { 2 } , \quad \mathbb { E } _ { \xi _ { i } } \left\| \nabla F _ { i } ( \mathbf { x } , \xi _ { i } ) \right\| ^ { 2 } \leq G ^ { 2 } , \quad \forall \mathbf { x } \in \mathbb { R } ^ { d } , i \in [ n ] , } \end{array}$ (3) where $\mathbb { E } _ { \xi _ { i } } [ \cdot ]$ denotes the expectation over $\xi _ { i } \sim \mathcal { D } _ { i }$ . We also denote $\textstyle { \overline { { \sigma } } } ^ { 2 } : = { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } \sigma _ { i } ^ { 2 }$ for convenience. Theorem 4.1. Under Assumptions $_ { I - 2 }$ there exists a constant stepsize $\eta$ and the consensus stepsize from (Koloskova et al., 2019), $\begin{array} { r } { \gamma : = \frac { \rho ^ { 2 } \delta } { 1 6 \rho + \rho ^ { 2 } + 4 \beta ^ { 2 } + 2 \rho \beta ^ { 2 } - 8 \rho \delta } } \end{array}$ with $\beta = \| I - W \| _ { 2 } \in [ 0 , 2 ]$ , such that the averaged iterates $\begin{array} { r } { \overline { { \mathbf { x } } } ^ { ( t ) } : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbf { x } _ { i } ^ { ( t ) } } \end{array}$ of Algorithm $I$ satisfy:
102
+
103
+ $$
104
+ \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left. \nabla f \left( \overline { { \mathbf { x } } } ^ { ( t ) } \right) \right. _ { 2 } ^ { 2 } = \mathcal { O } \left( \left( \frac { L F _ { 0 } \overline { { \sigma } } ^ { 2 } } { n ( T + 1 ) } \right) ^ { 1 / 2 } + \left( \frac { G L F _ { 0 } } { c ( T + 1 ) } \right) ^ { 2 / 3 } + \frac { L F _ { 0 } } { T + 1 } \right)
105
+ $$
106
+
107
+ where $c : = \frac { \rho ^ { 2 } \delta } { 8 2 }$ denotes the convergence rate of the underlying consensus averaging scheme of (Koloskova et al., 2019), $F _ { 0 } : = f ( \overline { { \mathbf { x } } } ^ { ( 0 ) } ) - f ^ { \star }$ .
108
+
109
+ This result shows that CHOCO-SGD converges as $\mathcal { O } \big ( { 1 } / { \sqrt { n T } } + { 1 } / ( { \rho ^ { 2 } } \delta T ) ^ { 2 / 3 } \big )$ . The first term shows a linear speed-up compared to SGD on a single node, while compression and graph topology affect only the higher order second term. By differently choosing the stepsize $\eta : = \sqrt { n } / \sqrt { T + 1 }$ we can recover asymptotic convergence rate of $\mathcal { O } \big ( 1 / \sqrt { n T } + n / ( \rho ^ { 4 } \delta ^ { 2 } T ) \big )$ . For the proofs and convergence of the individual iterates $\mathbf { x } _ { i }$ we refer to Appendix A.
110
+
111
+ # 5 COMPARISON TO BASELINES FOR VARIOUS COMPRESSION SCHEMES
112
+
113
+ In this section we experimentally compare CHOCO-SGD to the relevant baselines for a selection of commonly used compression operators. For the experiments we further leverage momentum in all implemented algorithms. The newly developed momentum version of CHOCO-SGD is given as Algorithm 2.
114
+
115
+ <table><tr><td>Algorithm2 CHoCO-SGD with Momentum</td></tr><tr><td>input: Same as for Algorithm 1,additionally: weight decay factor 入,momentum factor β, ():=0∀i ∈[n] local momentum memory</td></tr><tr><td>Lines1-8 in Algorithm1are leftunmodified</td></tr><tr><td>Line 9 in Algorithm 1 is replaced with the following two lines</td></tr><tr><td>(t+1) (t)</td></tr><tr><td>(gi &lt; local momentum with weight decay</td></tr><tr><td>10:Xi (t+) (t) (t+1) 一 &lt; stochastic gradient update</td></tr></table>
116
+
117
+ Setup. In order to match the setting in (Tang et al., 2018) for our first set of experiments, we use a ring topology with $n = 8$ nodes and train the ResNet20 architecture (He et al., 2016) on the Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012). We randomly split the training data between workers and shuffle it after every epoch, following standard procedure as e.g. in (Goyal et al., 2017). We implement DCD and ECD with momentum (Tang et al., 2018), DeepSqueeze with momentum (Tang et al., 2019), CHOCO-SGD with momentum (Algorithm 2) and standard (all-reduce) mini-batch SGD with momentum and without compression (Dekel et al., 2012). Our implementations are open-source and available at https://github.com/epfml/ ChocoSGD. The momentum factor is set to 0.9 without dampening. For all algorithms we fine-tune the initial learning rate and gradually warm it up from a relative small value (0.1) (Goyal et al., 2017) for the first 5 epochs. The learning rate is decayed by 10 twice, at 150 and 225 epochs, and stop training at 300 epochs. For CHOCO-SGD and DeepSqueeze the consensus learning rate $\gamma$ is also tuned. The detailed hyper-parameter tuning procedure refers to Appendix F. Every compression scheme is applied to every layer of $\mathtt { R e s N e t 2 0 }$ separately. We evaluate the top-1 test accuracy on every node separately over the whole dataset and report the average performance over all nodes.
118
+
119
+ Compression Schemes. We implement two unbiased compression schemes: (i) ${ \mathrm { g s g d } } _ { b }$ quantization that randomly rounds the weights to $b$ -bit representations (Alistarh et al., 2017), and (ii) random $^ { - a }$ sparsification, which preserves a randomly chosen $a$ fraction of the weights and sets the other ones to zero (Wangni et al., 2018). Further two biased compression schemes: (iii) $\mathrm { t o p } _ { a }$ , which selects the $a$ fraction of weights with the largest magnitude and sets the other ones to zero (Alistarh et al., 2018; Stich et al., 2018), and (iv) sign compression, which compresses each weight to its sign scaled by the norm of the full vector (Bernstein et al., 2018; Karimireddy et al., 2019). We refer to Appendix C for exact definitions of the schemes.
120
+
121
+ DCD and ECD have been analyzed only for unbiased quantization schemes, thus the combination with the two biased schemes is not supported by theory. In converse, CHOCO-SGD and DeepSqueeze has been studied only for biased schemes according to Definition 2. However, both unbiased compression schemes can be scaled down in order to meet the specification (cf. discussions in (Stich et al., 2018; Koloskova et al., 2019)) and we adopt this for the experiments.
122
+
123
+ Results. The results are summarized in Tab. 1. For unbiased compression schemes, ECD and DCD only achieve good performance when the compression ratio is small, and sometimes even diverge when the compression ratio is high. This is consistent1 with the theoretical and experimental results in (Tang et al., 2018). We further observe that the performance of DCD with the biased $\mathrm { t o p } _ { a }$ sparsification is much better than with the unbiased random $^ a$ counterpart, though this operator is not yet supported by theory.
124
+
125
+ CHOCO-SGD can generalize reasonably well in all scenarios (at most $1 . 6 5 \%$ accuracy drop) for fixed training budget. The sign compression achieves state-of-the-art accuracy and requires approximately $3 2 \times$ less bits per weight than the full precision baseline.
126
+
127
+ Table 1: Top-1 test accuracy for decentralized DCD, ECD, DeepSqueeze and CHOCO-SGD with different compression schemes. Reported top-1 test accuracies are averaged over three runs with fine-tuned hyperparameters (learning rate, weight decay, consensus stepsize). The fine-tuned all-reduce baseline reaches accuracy 92.64, with 1.04 MB gradient transmission per iteration. ( $\star$ indicates that 2 out of 3 runs diverged).
128
+
129
+ <table><tr><td rowspan="2">Algorithm</td><td rowspan="2">Error- feedback</td><td colspan="4">Quantization (QSGD)</td><td colspan="3">Sparsification (random-%)</td></tr><tr><td>16 bits</td><td>8 bits</td><td>4 bits</td><td>2 bits</td><td>50%</td><td>10%</td><td>1%</td></tr><tr><td colspan="2">transmitted data/iteration</td><td>0.52MB</td><td>0.26MB</td><td>0.13MB</td><td>0.065MB</td><td>1.04 MB</td><td>0.21MB</td><td>0.031MB</td></tr><tr><td>DCD-PSGD</td><td></td><td>92.51 ± 0.05</td><td>92.36 ±0.28</td><td>23.56 ± 2.97</td><td>diverges</td><td>92.05 ± 0.25</td><td>diverges</td><td>diverges</td></tr><tr><td>ECD-PSGD</td><td></td><td>92.02 ± 0.14</td><td>59.11 ± 1.57</td><td>diverges</td><td>diverges</td><td>diverges</td><td>diverges</td><td>diverges</td></tr><tr><td>DeepSqueeze CHOCO-SGD</td><td>xx&lt;/</td><td>92.27 ± 0.21</td><td>91.83 ± 0.35</td><td>91.47 ± 0.21</td><td>90.96 ± 0.19</td><td>91.46 ± 0.09</td><td>90.96±0.16</td><td>88.55 ± 0.11</td></tr><tr><td></td><td></td><td>92.34± 0.19</td><td>92.30±0.08</td><td>91.92 ± 0.27</td><td>91.41 ± 0.11</td><td>92.54± 0.26</td><td>91.87 ± 0.21</td><td>91.32 ± 0.17</td></tr><tr><td rowspan="2">Algorithm</td><td>Error-</td><td colspan="3">Sparsification (top-%)</td><td>Sign+Norm</td><td colspan="3"></td></tr><tr><td>feedback</td><td>50%</td><td>10%</td><td>1%</td><td>=</td><td></td><td></td><td></td></tr><tr><td colspan="2">transmitted data/iteration</td><td>1.04 MB</td><td>0.21MB</td><td>0.031MB</td><td>0.032MB</td><td></td><td></td><td></td></tr><tr><td colspan="2">DCD-PSGD</td><td>92.40 ± 0.11</td><td>91.97 ± 0.14</td><td>89.79 ± 0.40</td><td>92.40 ± 0.14</td><td></td><td></td><td></td></tr><tr><td colspan="2">ECD-PSGD</td><td>17.03*</td><td>16.78*</td><td>18.03*</td><td>diverges</td><td></td><td></td><td></td></tr><tr><td colspan="2">DeepSqueeze</td><td></td><td>91.31 ± 0.25</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td colspan="2">CHOCO-SGD</td><td>公</td><td>91.55 ± 0.28 92.54 ± 0.26</td><td>92.29 ± 0.05</td><td>90.47 ± 0.17 91.73 ± 0.11</td><td>91.38 ± 0.19 92.46 ± 0.10</td><td></td><td></td></tr></table>
130
+
131
+ # 6 USE CASE I: ON-DEVICE PEER-TO-PEER LEARNING
132
+
133
+ We now shift our focus to challenging real-world scenarios which are intrinsically decentralized, i.e. each part of the training data remains local to each device, and thus centralized methods either fail or are inefficient to implement. Typical scenarios comprise e.g. sensor networks, or mobile devices or hospitals which jointly train a machine learning model. Common to these applications is that i) each device has only access to locally stored or acquired data, ii) communication bandwidth is limited (either physically, or artificially for e.g. metered connections), iii) the global network topology is typically unknown to a single device, and iv) the number of connected devices is typically large. Additionally, this fully decentralized setting is also strongly motivated by privacy aspects, enabling to keep the training data private on each device at all times.
134
+
135
+ Modeling. To simulate this scenario, we permanently split the training data between the nodes, i.e. the data is never shuffled between workers during training, and every node has distinct part of the dataset. To the best of our knowledge, no prior works studied this scenario for decentralized deep learning. For the centralized approach, gathering methods such as all-reduce are not efficiently implementable in this setting, hence we compare to the centralized baseline where all nodes route their updates to a central coordinator for aggregation. For the comparison we consider CHOCO-SGD with sign compression (this combination achieved the compromise between accuracy and compression level in Tab. 1)), decentralized SGD without compression (Lian et al., 2017), and centralized SGD without compression.
136
+
137
+ Scaling to Large Number of Nodes. To study the scaling properties of CHOCOSGD, we train on 4, 16, 36 and 64 number of nodes. We compare decentralized algorithms on two different topologies: ring as the worst possible topology, and on the torus with much larger spectral gap. Their parameters are listed in the table 2.
138
+
139
+ We train ResNet8 (He et al., 2016) (78K parameters), on Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012). For the simplicity, we keep the learning rate constant and separately tune it for all methods. We tune consensus learning rate for CHOCO-SGD.
140
+
141
+ Table 2: Summary of communication topologies.
142
+
143
+ <table><tr><td>Topology</td><td></td><td colspan="4">spectral gapp</td></tr><tr><td></td><td>max. node degree</td><td>n=4</td><td>n=16</td><td>n=36</td><td>n=64</td></tr><tr><td>ring</td><td>2</td><td>0.67</td><td>0.05</td><td>0.01</td><td>0.003</td></tr><tr><td>torus</td><td>4</td><td>0.67</td><td>0.4</td><td>0.2</td><td>0.12</td></tr><tr><td>fully-connected</td><td>d</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
144
+
145
+ The results are summarized in Fig. 1 (and Fig. 6, Tabs. 7–8 in Appendix G). First we compare the testing accuracy reached after 300 epochs (Fig. 1, Left). CentralizedSGD has a good performance for all the considered number of nodes. CHOCO-SGD slows down due to the influence of graph topology (Decentralized curve), which is consistent with the spectral gaps order (see Tab. 2), and also influenced by the communication compression (CHOCO curve), which slows down training uniformly for both topologies. We observed that the train performance is similar to the test on Fig. 1, therefore the performance degradation is explained by the slower convergence (Theorem 4.1) and is not a generalization issue. Increasing the number of epochs improves the performance of the decentralized schemes. However, even using 10 times more epochs, we were not able to perfectly close the gap between centralized and decentralized algorithms for both train and test performance.
146
+
147
+ ![](images/345b6a0f121c3a279e076e0ed91edd56e9d8d570dc99a893fe5ea599cf1d452c.jpg)
148
+ Figure 1: Scaling of CHOCO-SGD with sign compression to large number of devices on Cifar10 dataset. Left: best testing accuracy of the algorithms reached after 300 epochs. Right: best testing accuracy reached after communicating $1 0 0 0 \mathbf { M B }$ .
149
+
150
+ In the real decentralized scenario, the interest is not to minimize the epochs number, but the amount of communication to reduce the cost of the user’s mobile data. We therefore fix the number of transmitted bits to $1 0 0 0 { \mathrm { M B } }$ and compare the best testing accuracy reached (Fig. 1, Right). CHOCOSGD performs the best while having slight degradation due to increasing number of nodes. It is beneficial to use torus topology when the number of nodes is large because it has good mixing properties, for small networks there is not much difference between these two topologies—the benefit of large spectral gap is canceled by the increased communication due larger node degree for torus topology. Both Decentralized and Centralized SGD requires significantly larger number of bits to reach reasonable accuracy.
151
+
152
+ Experiments on a Real Social Network Graph. We simulate training models on user devices (e.g. mobile phones), connected by a real social network. We chosen Davis Southern women social network (Davis et al., 1941) with 32 nodes. We train ResNet20 (0.27 million parameters) model on the Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012) for image classification and a three-layer LSTM architecture (Hochreiter & Schmidhuber, 1997) (28.95 million parameters) for a language modeling task on WikiText-2 (600 training and 60 validation articles with a total of $2 ^ { \prime } 0 8 8 ^ { \prime } 6 2 8$ and $2 1 7 ^ { \prime } 6 \hat { 4 } 6$ tokens respectively) (Merity et al., 2016). The depicted curves of the training loss are the averaged local loss over all workers (local model with fixed local data); the test performance uses the mean of the evaluations for local models on whole test dataset. For more detailed experimental setup we refer to Appendix F.
153
+
154
+ The results are summarized in Figs. 2–3 and in Tab. 3. For the image classification task, when comparing the training accuracy reached after the same number of epochs, we observe that the decentralized algorithm performs best, follows by the centralized and lastly the quantized decentralized. However, the test accuracy is highest for the centralized scheme. When comparing the test accuracy reached for the same transmitted data2, CHOCO-SGD significantly outperforms the exact decentralized scheme, with the centralized performing worst. We note a slight accuracy drop, i.e. after the same number of epochs (but much less transmitted data), CHOCO-SGD does not reach the same level of test accuracy than the baselines.
155
+
156
+ For the language modeling task, both decentralized schemes suffer a drop in the training loss when the evaluation reaching the epoch budget; while our CHOCO-SGD outperforms the centralized SGD in test perplexity. When considering perplexity for a fixed data volume (middle and right subfigure of Fig. 3), CHOCO-SGD performs best, followed by the exact decentralized and centralized algorithms.
157
+
158
+ On Figure 4 we additionally depict the test accuracy of the averaged model $\begin{array} { r } { \overline { { \mathbf { x } } } ^ { ( t ) } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbf { x } _ { i } ^ { ( t ) } } \end{array}$ (left) and averaged distance of the local models from the averaged model (right), for CHOCO-SGD on image classification task. Towards the end of the optimization the local models reach consensus (Figure 4, right), and their individual test performances are the same as performance of averaged model. Interestingly, before decreasing the stepsize at the epoch 225, the local models are in general diverging from the averaged model, while decreasing only when the stepsize decreases. The same behavior was also reported in Assran et al. (2019).
159
+
160
+ ![](images/b42f450209e3634b091031515777263141ce939df94cd920f2b516bdb38bea6e.jpg)
161
+ Figure 2: Image classification: ResNet-20 on CIFAR-10 on social network topology.
162
+
163
+ ![](images/69fb0c5de0d6ca416f328814602fc6e44a04f7931ddbf5f433437e994f80800a.jpg)
164
+ Figure 3: Language modeling: LSTM on WikiText-2 on social network topology.
165
+
166
+ ![](images/71f89a79e2ee2e901ca995efa02d18fe1e48f1960defbdc38c92f07250062b6e.jpg)
167
+ Figure 4: Parameter deviations for Resnet20 trained on Cifar10 (using CHOCO-SGD) on social network topology (32 workers). (Left) performance of the averaged model compared to the average of performances of local models. (Right) parameters divergence: averaged $L _ { 2 }$ consensus distance between local models $\mathbf { x } _ { i }$ and the averaged model $\begin{array} { r } { \overline { { \mathbf { x } } } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbf { x } _ { i } } \end{array}$ , i.e., $\begin{array} { r } { \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \| \mathbf { x } _ { i } - \bar { \mathbf { x } } \| _ { 2 } ^ { 2 } } \end{array}$ .
168
+
169
+ # 7 USE CASE II: EFFICIENT LARGE-SCALE TRAINING IN A DATACENTER
170
+
171
+ Decentralized optimization methods offer a way to address scaling issues even for well connected devices, such as e.g. in datacenter with fast InfiniBand (100Gbps) or Ethernet (10Gbps) connections. Lian et al. (2017) describe scenarios when decentralized schemes can outperform centralized ones, and recently, Assran et al. (2019) presented impressive speedups for training on 256 GPUs, for the setting when all nodes can access all training data. The main differences of their algorithm to CHOCO-SGD are the asynchronous gossip updates, time-varying communication topology and most importantly exact communication, making their setup not directly comparable to ours. We note that these properties of asynchronous communication and changing topology for faster mixing are orthogonal to our contribution, and offer promise to be combined.
172
+
173
+ Setup. We train ImageNet $- 1 \mathrm { k }$ (1.28M/50K training/validation) (Deng et al., 2009) with Resnet-50 (He et al., 2016). We perform our experiments on 8 machines (n1-standard-32 from Google Cloud with Intel Ivy Bridge CPU platform), where each of machines has 4 Tesla P100
174
+
175
+ ![](images/7fdaa3434c9668988857381c622ccca300d544547af8de646a4b2f76acf8117e.jpg)
176
+ Figure 5: Large-scale training: Resnet-50 on ImageNet $- 1 \mathrm { k }$ in the datacenter setting. The topology has 8 nodes (each accesses 4 GPUs). We use sign as the compression scheme, for CHOCOSGD and Centralized SGD. For centralized SGD baseline without compression, we use all-reduce to aggregate the gradients; we use all-gather for centralized SGD with sign gradients quantization. The benefits of CHOCO-SGD can be further pronounced when scaling to more nodes.
177
+
178
+ GPUs and each machine interconnected via 10Gbps Ethernet. Within one machine communication is fast and we rely on the local data parallelism to aggregate the gradients for the later gradients communication (over the machines). Between different machines we consider centralized (fully connected topology) and decentralized (ring topology) communication, with and without compressed communication (sign compression). Several methods categorized by communication schemes are evaluated: (i) centralized SGD (full-precision communication), (ii) error-feedback centralized SGD with compressed communications Karimireddy et al. (2019) through sign compression, (iii) decentralized SGD (Lian et al., 2017) with parallelized forward pass and gradients communication (full-precision communication), and (iv) CHOCO-SGD with sign compressed communications. The mini-batch size on each GPU is 128, and we follow the general SGD training scheme in (Goyal et al., 2017) and directly use all their hyperparameters for all evaluated methods. Due to the limitation of the computational resource, we did not heavily tune the consensus stepsize for CHOCO-SGD3.
179
+
180
+ Results. We depict the training loss and top-1 test accuracy in terms of epochs and time in Fig. 5. CHOCO-SGD benefits from its decentralized and parallel structure and takes less time than all-reduce to perform the same number of epochs, while having only a slight $1 . 5 \%$ accuracy loss4. In terms of time per epoch, our speedup does not match that of (Assran et al., 2019), as the used hardware and the communication pattern5 are very different. Their scheme is orthogonal to our approach and could be integrated for better training efficiency. Nevertheless, we still demonstrate a time-wise $20 \%$ gain over the common all-reduce baseline, on our used commodity hardware cluster.
181
+
182
+ # 8 CONCLUSION
183
+
184
+ We propose the use of CHOCO-SGD (and its momentum version) for enabling decentralized deep learning training in bandwidth-constrained environments. We provide theoretical convergence guarantees for the non-convex setting and show that the algorithm enjoys linear speedup in the number of nodes. We empirically study the performance of the algorithm in a variety of settings on the image classification (ImageNet-1k, Cifar10) and on the language modeling task (WikiText-2). Whilst previous work successfully demonstrated that decentralized methods can be a competitive alternative to centralized training schemes when no communication constraints are present (Lian et al., 2017; Assran et al., 2019), our main contribution is to enable training in strongly communicationrestricted environments, and while respecting the challenging constraint of locality of the training data. We theoretically and practically demonstrate the performance of decentralized schemes for arbitrary high communication compression, and under data-locality, and thus significantly expand the reach of potential applications of fully decentralized deep learning.
185
+
186
+ # ACKNOWLEDGEMENTS
187
+
188
+ We acknowledge funding from SNSF grant 200021_175796, as well as a Google Focused Research Award.
189
+
190
+ # REFERENCES
191
+
192
+ Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Communication-efficient SGD via gradient quantization and encoding. In NIPS - Advances in Neural Information Processing Systems 30, pp. 1709–1720. Curran Associates, Inc., 2017.
193
+
194
+ Dan Alistarh, Torsten Hoefler, Mikael Johansson, Nikola Konstantinov, Sarit Khirirat, and Cedric Renggli. The convergence of sparsified gradient methods. In NeurIPS - Advances in Neural Information Processing Systems 31, pp. 5977–5987. Curran Associates, Inc., 2018.
195
+
196
+ Mahmoud Assran, Nicolas Loizou, Nicolas Ballas, and Mike Rabbat. Stochastic gradient push for distributed deep learning. In ICML - Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 344–353. PMLR, 09–15 Jun 2019.
197
+
198
+ Albert S. Berahas, Charikleia Iakovidou, and Ermin Wei. Nested distributed gradient methods with adaptive quantized communication. arXiv preprint, pp. arXiv:1903.08149, 2019.
199
+
200
+ Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Animashree Anandkumar. signSGD: Compressed optimisation for non-convex problems. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 560–569, Stockholmsmässan, Stockholm Sweden, 10–15 Jul 2018. PMLR.
201
+
202
+ Stephen Boyd, Arpita Ghosh, Balaji Prabhakar, and Devavrat Shah. Randomized gossip algorithms. IEEE/ACM Trans. Netw., 14(SI):2508–2530, June 2006.
203
+
204
+ R. Carli, F. Fagnani, P. Frasca, T. Taylor, and S. Zampieri. Average consensus on networks with transmission noise or quantization. In 2007 European Control Conference (ECC), pp. 1852–1857, July 2007.
205
+
206
+ R. Carli, F. Bullo, and S. Zampieri. Quantized average consensus via dynamic coding/decoding schemes. International Journal of Robust and Nonlinear Control, 20:156–175, 2010a.
207
+
208
+ R. Carli, P. Frasca, F. Fagnani, and S. Zampieri. Gossip consensus algorithms via quantized communication. Automatica, 46:70–80, 2010b.
209
+
210
+ A. Davis, B. B. Gardner, and M. R. Gardner. Deep South. University of Chicago Press, Chicago, IL., May 1941.
211
+
212
+ Ofer Dekel, Ran Gilad-Bachrach, Ohad Shamir, and Lin Xiao. Optimal distributed online prediction using mini-batches. J. Mach. Learn. Res., 13(1):165–202, January 2012.
213
+
214
+ J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
215
+
216
+ A. G. Dimakis, S. Kar, J. M. F. Moura, M. G. Rabbat, and A. Scaglione. Gossip algorithms for distributed signal processing. Proceedings of the IEEE, 98(11):1847–1864, Nov 2010.
217
+
218
+ Thinh T. Doan, Siva Theja Maguluri, and Justin Romberg. Accelerating the Convergence Rates of Distributed Subgradient Methods with Adaptive Quantization. arXiv e-prints, art. arXiv:1810.13245, Oct 2018.
219
+
220
+ Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: Training ImageNet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
221
+
222
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, 2016.
223
+
224
+ Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9:1735–80, 12 1997.
225
+
226
+ Samuel Horváth, Dmitry Kovalev, Konstantin Mishchenko, Peter Richtárik, and Sebastian Urban Stich. Stochastic distributed learning with gradient quantization and variance reduction. arXiv preprint, pp. arXiv:1904.05115, 2019.
227
+
228
+ Sai Praneeth Karimireddy, Quentin Rebjock, Sebastian Stich, and Martin Jaggi. Error feedback fixes SignSGD and other gradient compression schemes. In ICML - Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 3252–3261. PMLR, 09–15 Jun 2019.
229
+
230
+ David Kempe, Alin Dobra, and Johannes Gehrke. Gossip-based computation of aggregate information. In Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’03, pp. 482–, Washington, DC, USA, 2003. IEEE Computer Society.
231
+
232
+ Anastasia Koloskova, Sebastian Stich, and Martin Jaggi. Decentralized stochastic optimization and gossip algorithms with compressed communication. In ICML - Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 3478–3487. PMLR, 2019.
233
+
234
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. University of Toronto, 05 2012.
235
+
236
+ Xiangru Lian, Ce Zhang, Huan Zhang, Cho-Jui Hsieh, Wei Zhang, and Ji Liu. Can decentralized algorithms outperform centralized algorithms? a case study for decentralized parallel stochastic gradient descent. In NIPS - Advances in Neural Information Processing Systems 30, pp. 5330–5340. Curran Associates, Inc., 2017.
237
+
238
+ Tao Lin, Sebastian U. Stich, Kumar Kshitij Patel, and Martin Jaggi. Don’t use large mini-batches, use local SGD. In ICLR - International Conference on Learning Representations, 2020.
239
+
240
+ Yujun Lin, Song Han, Huizi Mao, Yu Wang, and Bill Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. In ICLR 2018 - International Conference on Learning Representations, 2018.
241
+
242
+ Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. CommunicationEfficient Learning of Deep Networks from Decentralized Data. In AISTATS 2017 - Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, pp. 1273–1282, 2017.
243
+
244
+ H. Brendan McMahan, Eider Moore, Daniel Ramage, and Blaise Agüera y Arcas. Federated learning of deep networks using model averaging. CoRR, abs/1602.05629, 2016.
245
+
246
+ Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
247
+
248
+ Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing LSTM language models. arXiv preprint, pp. arXiv:1708.02182, 2017.
249
+
250
+ Konstantin Mishchenko, Eduard Gorbunov, Martin Takác, and Peter Richtárik. Distributed learning with ˇ compressed gradient differences. arXiv e-prints, pp. arXiv:1901.09269, 2019.
251
+
252
+ A. Nedic, A. Olshevsky, and M. G. Rabbat. Network topology and communication-computation tradeoffs in ´ decentralized optimization. Proceedings of the IEEE, 106(5):953–976, May 2018.
253
+
254
+ Angelia Nedic, Alex Olshevsky, Asuman Ozdaglar, and John N. Tsitsiklis. Distributed subgradient methods and ´ quantization effects. In Proceedings of the 47th IEEE Conference on Decision and Control, CDC 2008, pp. 4177–4184, 2008.
255
+
256
+ Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In NIPS - Advances in Neural Information Processing Systems 24, pp. 693–701. Curran Associates, Inc., 2011.
257
+
258
+ Amirhossein Reisizadeh, Aryan Mokhtari, Hamed Hassani, and Ramtin Pedarsani. An exact quantized decentralized gradient descent algorithm. arXiv e-prints, pp. arXiv:1806.11536, 2018.
259
+
260
+ Amirhossein Reisizadeh, Hossein Taheri, Aryan Mokhtari, Hamed Hassani, and Ramtin Pedarsani. Robust and communication-efficient collaborative learning. arXiv e-prints, pp. arXiv:1907.10595, 2019.
261
+
262
+ Kevin Scaman, Francis Bach, Sébastien Bubeck, Yin Tat Lee, and Laurent Massoulié. Optimal algorithms for smooth and strongly convex distributed optimization in networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 3027–3036, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR.
263
+
264
+ Kevin Scaman, Francis Bach, Sebastien Bubeck, Laurent Massoulié, and Yin Tat Lee. Optimal algorithms for non-smooth distributed optimization in networks. In NeurIPS - Advances in Neural Information Processing Systems 31, pp. 2745–2754. Curran Associates, Inc., 2018.
265
+
266
+ Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs. In INTERSPEECH, pp. 1058–1062. ISCA, 2014.
267
+
268
+ Sebastian U Stich and Sai Praneeth Karimireddy. The error-feedback framework: Better rates for SGD with delayed gradients and compressed communication. arXiv preprint, pp. arXiv:1909.05350, 2019.
269
+
270
+ Sebastian U Stich, Jean-Baptiste Cordonnier, and Martin Jaggi. Sparsified SGD with memory. In NeurIPS - Advances in Neural Information Processing Systems 31, pp. 4452–4463. 2018.
271
+ Nikko Strom. Scalable distributed DNN training using commodity GPU cloud computing. In INTERSPEECH, pp. 1488–1492. ISCA, 2015.
272
+ Hanlin Tang, Shaoduo Gan, Ce Zhang, Tong Zhang, and Ji Liu. Communication compression for decentralized training. In NeurIPS - Advances in Neural Information Processing Systems 31, pp. 7663–7673. Curran Associates, Inc., 2018.
273
+ Hanlin Tang, Xiangru Lian, Shuang Qiu, Lei Yuan, Ce Zhang, Tong Zhang, and Ji Liu. Deepsqueeze: Decentralization meets error-compensated compression. arXiv preprint, pp. arXiv:1907.07346, 2019.
274
+ Jianyu Wang, Anit Kumar Sahu, Zhouyi Yang, Gauri Joshi, and Soummya Kar. An exact quantized decentralized gradient descent algorithm. arXiv e-prints, pp. arXiv:1905.09435, 2019.
275
+ Jianqiao Wangni, Jialei Wang, Ji Liu, and Tong Zhang. Gradient sparsification for communication-efficient distributed optimization. In NeurIPS - Advances in Neural Information Processing Systems 31, pp. 1306–1316. Curran Associates, Inc., 2018.
276
+ 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 NIPS - Advances in Neural Information Processing Systems 30, pp. 1509–1519. Curran Associates, Inc., 2017.
277
+ L. Xiao, S. Boyd, and S. Lall. A scheme for robust distributed sensor fusion based on average consensus. In IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005., pp. 63–70, April 2005.
278
+ Lin Xiao and Stephen Boyd. Fast linear iterations for distributed averaging. Systems & Control Letters, 53(1): 65–78, 2004.
279
+ Hao Yu, Rong Jin, and Sen Yang. On the linear speedup analysis of communication efficient momentum SGD for distributed non-convex optimization. In ICML - Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 7184–7193. PMLR, 09–15 Jun 2019.
280
+ Deming Yuan, Shengyuan Xu, Huanyu Zhao, and Lina Rong. Distributed dual averaging method for multi-agent optimization with quantized communication. Systems & Control Letters, 61(11):1053 – 1061, 2012.
281
+ Jian Zhang, Christopher De Sa, Ioannis Mitliagkas, and Christopher Ré. Parallel SGD: When does averaging help? arxiv preprint, 2016.
282
+
283
+ # A CONVERGENCE OF CHOCO-SGD
284
+
285
+ In this section we present the proof of Theorem 4.1. For this, we will first derive a slightly more general statement: in Theorem A.3 we analyze CHOCO-SGD for arbitrary stepsizes $\eta$ , and then derive Theorem 4.1 as a special case.
286
+
287
+ The structure of the proof follows Koloskova et al. (2019). That is, we first show that Algorithm 1 is a special case of a more general class of algorithms (given in Algorithm 3): Observe that Algorithm 1 consists of two main components: $\textcircled{2}$ the stochastic gradient update, performed locally on each node, and $\textcircled{1}$ the (quantized) averaging among the nodes. We can show convergence of all algorithms of this type—i.e. stochastic gradient updates $\textcircled{2}$ followed by an arbitrary averaging step $\textcircled{1}$ —as long as the averaging scheme exhibits linear convergence. For the specific averaging used in CHOCO-SGD, linear convergence has been shown in (Koloskova et al., 2019) and we will use their estimate of the convergence rate of the averaging scheme.
288
+
289
+ A.1 A GENERAL FRAMEWORK FOR DECENTRALIZED SGD WITH ARBITRARY AVERAGING
290
+
291
+ For convenience, we use the following matrix notation in this subsection.
292
+
293
+ $$
294
+ \begin{array} { r } { X ^ { ( t ) } : = \left[ \mathbf { x } _ { 1 } ^ { ( t ) } , \ldots , \mathbf { x } _ { n } ^ { ( t ) } \right] \in \mathbb { R } ^ { d \times n } , \qquad \overline { { X } } ^ { ( t ) } : = \left[ \overline { { \mathbf { x } } } ^ { ( t ) } , \ldots , \overline { { \mathbf { x } } } ^ { ( t ) } \right] \in \mathbb { R } ^ { d \times n } , } \\ { \partial F ( X ^ { ( t ) } , \xi ^ { ( t ) } ) : = \left[ \nabla F _ { 1 } ( \mathbf { x } _ { 1 } ^ { ( t ) } , \xi _ { 1 } ^ { ( t ) } ) , \ldots , \nabla F _ { n } ( \mathbf { x } _ { n } ^ { ( t ) } , \xi _ { n } ^ { ( t ) } ) \right] \in \mathbb { R } ^ { d \times n } . } \end{array}
295
+ $$
296
+
297
+ Decentralized SGD with arbitrary averaging is given in Algorithm 3.
298
+
299
+ # Algorithm 3 DECENTRALIZED SGD WITH ARBITRARY AVERAGING SCHEME
300
+
301
+ input: $X ^ { ( 0 ) } = \left[ \mathbf { x } ^ { ( 0 ) } , \ldots , \mathbf { x } ^ { ( 0 ) } \right]$ , stepsize $\eta$ , averaging function $h : \mathbb { R } ^ { d \times n } \times \mathbb { R } ^ { d \times n } \mathbb { R } ^ { d \times n } \times \mathbb { R } ^ { d \times n }$ initialize $Y ^ { ( 0 ) } = 0$ 1: for $t$ in $0 \dots T - 1$ do {in parallel for all workers $i \in [ n ]$ }
302
+ $\textcircled{2}$ 2: { $X ^ { ( t + \frac { 1 } { 2 } ) } = X ^ { ( t ) } - \eta \partial F _ { i } ( X ^ { ( t ) } , \xi ^ { ( t ) } )$ / stochastic gradient updates
303
+ $\textcircled{1}$ 3: { $( X ^ { ( t + 1 ) } , Y ^ { ( t + 1 ) } ) = h ( X ^ { ( t + \frac { 1 } { 2 } ) } , Y ^ { ( t ) } )$ / blackbox averaging/gossip 4: end for
304
+
305
+ Assumption 3. For an averaging scheme $h \colon \mathbb R ^ { d \times n } \times \mathbb R ^ { d \times n } \to \mathbb R ^ { d \times n } \times \mathbb R ^ { d \times n }$ let $( X ^ { + } , Y ^ { + } ) : =$ $h ( X , Y )$ for $X , Y \in \mathbb { R } ^ { d \times n }$ . Assume that $h$ preserves the average of iterates:
306
+
307
+ $$
308
+ X ^ { + } { \frac { \mathbf { 1 1 } ^ { \top } } { n } } = X { \frac { \mathbf { 1 1 } ^ { \top } } { n } } ,
309
+ $$
310
+
311
+ $$
312
+ \forall X , Y \in \mathbb { R } ^ { d \times n } ,
313
+ $$
314
+
315
+ and that it converges with linear rate for a parameter $0 < c \leq 1$
316
+
317
+ $$
318
+ \begin{array} { r } { \mathbb { E } _ { h } \Psi ( X ^ { + } , Y ^ { + } ) \leq ( 1 - c ) \Psi ( X , Y ) , } \end{array}
319
+ $$
320
+
321
+ $$
322
+ \forall X , Y \in \mathbb { R } ^ { d \times n } ,
323
+ $$
324
+
325
+ and Laypunov function $\Psi ( X , Y ) : = \| X - \overline { { X } } \| _ { F } ^ { 2 } + \| X - Y \| _ { F } ^ { 2 }$ with $\begin{array} { r } { \overline { { X } } : = \frac { 1 } { n } X \mathbf { 1 1 } ^ { \top } } \end{array}$ , where $\mathbb { E } _ { h }$ denotes the expectation over internal randomness of averaging scheme $h$ .
326
+
327
+ Example: Exact Averaging. Setting $X ^ { + } ~ = ~ X W$ and $Y ^ { + } = X ^ { + }$ gives an exact consensus averaging algorithm with mixing matrix $W$ (Xiao & Boyd, 2004). It converges at the rate $c = \rho$ where $\rho$ is an eigengap of mixing matrix $W$ , defined in Assumption 1. Substituting it into the Algorithm 3 we recover D-PSGD algorithm, analyzed in Lian et al. (2017).
328
+
329
+ Example: CHOCO-SGD. To recover CHOCO-SGD, we need to choose CHOCOGOSSIP (Koloskova et al., 2019) as consensus averaging scheme, which is defined as $X ^ { + } ~ = ~ X + \gamma Y ( W - I )$ and $Y ^ { + } ~ = ~ Y + Q ( X ^ { + } - Y )$ (in the main text we write $\hat { X }$ instead of $Y$ ). This scheme converges with $\begin{array} { r } { c = \frac { \rho ^ { 2 } \delta } { 8 2 } } \end{array}$ . The results from the main part can be recovered by substituting this $\begin{array} { r } { c = \frac { \rho ^ { 2 } \delta } { 8 2 } } \end{array}$ in the more general results below. It is important to note that for Algorithm 1 given in the main text, the order of the communication part $\textcircled{1}$ and the gradient computation part $\textcircled{2}$ is exchanged. We did this to better illustrate that both these parts are independent and that they can be executed in parallel. The effect of this change can be captured by changing the initial values but does not affect the convergence rate.
330
+
331
+ # A.2 PROOFS
332
+
333
+ Remark A.1 (Mini-batch variance). If for functions $f _ { i } , F _ { i }$ defined in (1) Assumption 2 holds, i.e. $\mathbb { E } _ { \xi } \left\| \nabla F _ { i } ( \mathbf { x } , \xi ) - \nabla f _ { i } ( \mathbf { x } ) \right\| ^ { 2 } \leq \sigma _ { i } ^ { 2 } , i \in [ n ]$ , then
334
+
335
+ $$
336
+ \mathbb { E } _ { \boldsymbol { \xi } _ { 1 } ^ { ( t ) } , \dots , \boldsymbol { \xi } _ { n } ^ { ( t ) } } \left\| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( \nabla f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } ) - \nabla F _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } , \boldsymbol { \xi } _ { i } ^ { ( t ) } ) \right) \right\| ^ { 2 } \leq \frac { \overline { { \sigma } } ^ { 2 } } { n } ,
337
+ $$
338
+
339
+ where σ2 = Pni=1
340
+
341
+ Proof. This follows from
342
+
343
+ $$
344
+ \mathbb { E } \Bigg \Vert \frac { 1 } { n } \sum _ { i = 1 } ^ { n } Y _ { i } \Bigg \Vert ^ { 2 } = \frac { 1 } { n ^ { 2 } } \left( \sum _ { i = 1 } ^ { n } \mathbb { E } \Vert Y _ { i } \Vert ^ { 2 } + \sum _ { i \neq j } \mathbb { E } \langle Y _ { i } , Y _ { j } \rangle \right) = \frac { 1 } { n ^ { 2 } } \sum _ { i = 1 } ^ { n } \mathbb { E } \Vert Y _ { i } \Vert ^ { 2 } \leq \frac { 1 } { n ^ { 2 } } \sum _ { i = 1 } ^ { n } \sigma _ { i } ^ { 2 } = \frac { \overline { { \sigma } } ^ { 2 } } { n }
345
+ $$
346
+
347
+ for $Y _ { i } = f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } ) - \nabla F _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } , \boldsymbol { \xi } _ { i } ^ { ( t ) } )$ . Expectation of scalar product is equal to zero because $\xi _ { i }$ is independent of $\xi _ { j }$ since $i \neq j$ . □
348
+
349
+ Lemma A.2. Under Assumptions $_ { I - 3 }$ the iterates of the Algorithm 3 with constant stepsize $\eta$ satisfy
350
+
351
+ $$
352
+ \sum _ { i = 1 } ^ { n } \left\| { \overline { { \mathbf { x } } } } ^ { ( t ) } - \mathbf { x } _ { i } ^ { ( t ) } \right\| _ { 2 } ^ { 2 } \leq \eta ^ { 2 } { \frac { 1 2 n G ^ { 2 } } { c ^ { 2 } } } .
353
+ $$
354
+
355
+ Proof of Lemma A.2. We start by following the proof of Lemma 21 from Koloskova et al. (2019).
356
+
357
+ Define $r _ { t } = \mathbb { E } \Big \lVert X ^ { ( t ) } - \overline { { X } } ^ { ( t ) } \Big \rVert ^ { 2 } + \mathbb { E } \Big \lVert X ^ { ( t ) } - Y ^ { ( t ) } \Big \rVert ^ { 2 }$
358
+
359
+ $$
360
+ \begin{array} { r l } & { \quad \gamma _ { \tau + 1 } \overset { \phi ^ { * } } { \leq } ( 1 - \epsilon ) \mathbb { E } \bigg \| X ^ { ( k + \frac { 1 } { 2 } ) } - X ^ { ( k + \frac { 1 } { 2 } ) } \bigg \| _ { F } ^ { 2 } + ( 1 - \epsilon ) \mathbb { E } \bigg \| Y ^ { ( k ) } - X ^ { ( k + \frac { 1 } { 2 } ) } \bigg \| _ { F } ^ { 2 } } \\ & { \qquad = ( 1 - \epsilon ) \mathbb { E } \bigg \| \widetilde X ^ { ( k ) } - X ^ { ( k ) } + \eta \delta \mathcal { H } X ( X ^ { ( k ) } , \epsilon \delta ) \bigg ( \frac { 1 1 } { N } - I \bigg ) \bigg \| _ { F } ^ { 2 } } \\ & { \qquad + ( 1 - \epsilon ) \mathbb { E } \bigg \| Y ^ { ( k ) } - X ^ { ( k ) } + \eta \delta \mathcal { H } ( X ^ { ( k ) } , \epsilon \delta ^ { ( k ) } ) \bigg \| _ { F } ^ { 2 } } \\ & { \qquad \overset { \phi ^ { * } } { \leq } ( 1 - \epsilon ) ( 1 + \alpha ^ { - 1 } ) \mathbb { E } \bigg ( \bigg \| X ^ { ( k ) } - X ^ { ( k ) } \bigg \| _ { F } ^ { 2 } + \bigg \| Y ^ { ( k ) } - X ^ { ( k ) } \bigg \| _ { F } ^ { 2 } \bigg ) \bigg \| _ { F } ^ { 2 } } \\ & { \qquad + ( 1 - \epsilon ) ( 1 + \alpha ) \beta ^ { 2 } \mathbb { E } \bigg ( \bigg \| \mathcal { D } Y ( X ^ { ( k ) } , \epsilon \delta ^ { ( k ) } ) \bigg ( \frac { 1 1 } { N } - I \bigg ) \bigg \| _ { F } ^ { 2 } + \bigg \| \partial F ( X ^ { ( k ) } , \epsilon ^ { ( k ) } ) \bigg \| _ { F } ^ { 2 } \bigg ) } \\ & { \qquad \leq ( 1 - \epsilon ) \bigg ( ( 1 + \alpha ^ { - 1 } ) \mathbb { E } \bigg ( \bigg \| X ^ { ( k ) } - X ^ { ( k ) } \bigg \| _ { F } ^ { 2 } + \bigg \| Y ^ { ( k ) } - X ^ { ( k ) } \bigg \| _ { F } ^ { 2 } \bigg ) + 2 n ( 1 + \alpha ) \eta ^ { 2 } \mathcal { E } ^ { 2 } \bigg ) \bigg \| _ { F } ^ { 2 } } \\ & \qquad \leq \bigg ( 1 + \alpha ^ { - 1 } \bigg ) \mathbb { E } \bigg ( \bigg \| X ^ { ( k ) } - X ^ { ( k ) } \bigg \| _ { F } ^ { 2 } + \end{array}
361
+ $$
362
+
363
+ Define $A = 3 n G ^ { 2 }$ , we got a recursion
364
+
365
+ $$
366
+ r _ { t + 1 } \leq \left( 1 - \frac { c } { 2 } \right) r _ { t } + \frac { 2 } { c } \eta ^ { 2 } A ,
367
+ $$
368
+
369
+ Verifying that $\begin{array} { r } { r _ { t } \le \eta ^ { 2 } \frac { 4 A } { c ^ { 2 } } } \end{array}$ satisfy recursion completes the proof as $\mathbb { E } \Big \| X ^ { ( t ) } - \overline { { X } } ^ { ( t ) } \Big \| ^ { 2 } \leq r _ { t }$
370
+
371
+ Indeed, r0 = 0 ≤ η2 4Ac2 as X(0) = X(0) and $Y ^ { ( 0 ) } = 0$
372
+
373
+ $$
374
+ r _ { t + 1 } \leq \left( 1 - { \frac { c } { 2 } } \right) r _ { t } + \eta ^ { 2 } { \frac { 2 A } { c } } \leq \left( 1 - { \frac { c } { 2 } } \right) \eta ^ { 2 } { \frac { 4 A } { c ^ { 2 } } } + \eta ^ { 2 } { \frac { 2 A } { c } } = \eta ^ { 2 } { \frac { 4 A } { c ^ { 2 } } } .
375
+ $$
376
+
377
+ Theorem A.3. Under Assumptions $_ { I - 3 }$ with constant stepsize $\eta \ : < \ : \frac { 1 } { 4 L }$ , the averaged iterates $\begin{array} { r } { \overline { { \mathbf { x } } } ^ { ( t ) } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbf { x } _ { i } ^ { ( t ) } } \end{array}$ of Algorithm 3 satisfy:
378
+
379
+ $$
380
+ \displaystyle \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left\| \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } \leq \frac { 4 } { \eta ( T + 1 ) } \left( f ( \overline { { \mathbf { x } } } ^ { ( 0 ) } ) - f ^ { \star } \right) + \eta \frac { 2 { \overline { { \sigma } } } ^ { 2 } L } { n } + \eta ^ { 2 } \frac { 3 6 G ^ { 2 } L ^ { 2 } } { c ^ { 2 } }
381
+ $$
382
+
383
+ where c denotes convergence rate of underlying averaging scheme.
384
+
385
+ Proof of Theorem A.3. By $L$ -smoothness
386
+
387
+ $$
388
+ \begin{array} { r l } & { \bar { \boldsymbol { \mathfrak { z } } } _ { t + 1 } ~ f ( \overline { { \mathbf { x } } } ^ { ( t + 1 ) } ) = \mathbb { E } _ { t + 1 } ~ f \left( \overline { { \mathbf { x } } } ^ { ( t ) } - \frac { \eta } { n } \displaystyle \sum _ { i = 1 } ^ { n } \nabla F _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } ) \right) } \\ & { \leq f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \underbrace { - \mathbb { E } _ { t + 1 } ~ \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) , \displaystyle \frac { \eta } { n } \sum _ { i = 1 } ^ { n } \nabla F _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } ) \right. } _ { = : T _ { 1 } } + \mathbb { E } _ { t + 1 } ~ \frac { L } { 2 } \eta ^ { 2 } \underbrace { \left. \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \nabla F _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } ) \right. } _ { = : T _ { 2 } } , } \end{array}
389
+ $$
390
+
391
+ To estimate the second term, we add and subtract $\nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } )$
392
+
393
+ $$
394
+ \begin{array} { c } { { \displaystyle T _ { 1 } = - \eta \left\| \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right\| ^ { 2 } + \eta \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) , \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \nabla f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } ) \right. } } \\ { { \displaystyle \quad \stackrel { ( 8 ) , \gamma = 1 } { \leq } - \frac { \eta } { 2 } \left\| \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right\| ^ { 2 } + \frac { \eta } { 2 n } \sum _ { i = 1 } ^ { n } \left\| \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \nabla f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } ) \right\| ^ { 2 } } } \end{array}
395
+ $$
396
+
397
+ For the last term, we add and subtract $\nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } )$ and the sum of $\nabla f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } )$
398
+
399
+ $$
400
+ \begin{array} { r l } & { T _ { 2 } = \mathbb { E } _ { t + 1 } \left\| \displaystyle \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( \nabla F _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } ) - \nabla f _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } ) \right) \right\| _ { 2 } ^ { 2 } + \left\| \displaystyle \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \nabla f _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } ) \pm \nabla f ( \overline { { \mathbf x } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } } \\ & { \quad \stackrel { ( 6 ) , ( 9 ) , ( 7 ) } { \le } \displaystyle \frac { \overline { { \sigma } } ^ { 2 } } { n } + \displaystyle \frac { 2 } { n } \sum _ { i = 1 } ^ { n } \left\| f ( \overline { { \mathbf x } } ^ { ( t ) } ) - \nabla f _ { i } ( { \mathbf x } _ { i } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } + 2 \left\| \nabla f ( \overline { { \mathbf x } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } } \end{array}
401
+ $$
402
+
403
+ Combining this together and using $L$ -smoothness to estimate $\Big \| f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \nabla f _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } ) \Big \| _ { 2 } ^ { 2 } ;$
404
+
405
+ $$
406
+ \mathfrak { c } _ { t + 1 } ~ f ( \overline { { \mathbf { x } } } ^ { ( t + 1 ) } ) \leq f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \eta \left( \frac { 1 } { 2 } - L \eta \right) \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right. _ { 2 } ^ { 2 } + \left( \frac { 1 } { 2 } \eta L ^ { 2 } + \eta ^ { 2 } L ^ { 3 } \right) \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left. \overline { { \mathbf { x } } } ^ { ( t ) } - { \mathbf { x } } _ { i } ^ { ( t ) } \right. _ { 2 } ^ { 2 } +
407
+ $$
408
+
409
+ Using Lemma A.2 to bound the third term and using that $\begin{array} { r } { \eta \le \frac { 1 } { 4 L } } \end{array}$ in the second and in the third terms
410
+
411
+ $$
412
+ \mathbb { E } _ { t + 1 } ~ f ( \overline { { \mathbf { x } } } ^ { ( t + 1 ) } ) \leq f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \frac { \eta } { 4 } \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right. _ { 2 } ^ { 2 } + \eta ^ { 3 } \frac { 9 L ^ { 2 } G ^ { 2 } } { c ^ { 2 } } + \eta ^ { 2 } \frac { L \overline { { \sigma } } ^ { 2 } } { 2 n } ,
413
+ $$
414
+
415
+ Rearranging terms and averaging over $t$
416
+
417
+ $$
418
+ \begin{array} { r l } & { \displaystyle \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left\| \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } \leq \frac { 4 } { \eta } \displaystyle \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left( \mathbb { E } f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) - \mathbb { E } f ( \overline { { \mathbf { x } } } ^ { ( t + 1 ) } ) \right) + \eta ^ { 2 } \displaystyle \frac { 3 6 G ^ { 2 } L ^ { 2 } } { c ^ { 2 } } + \eta \frac { 2 L \overline { { \sigma } } ^ { 2 } } { n } } \\ & { \qquad \leq \displaystyle \frac { 4 } { \eta ( T + 1 ) } \left( f ( \overline { { \mathbf { x } } } ^ { ( 0 ) } ) - f ^ { \star } \right) + \eta \frac { 2 \overline { { \sigma } } ^ { 2 } L } { n } + \eta ^ { 2 } \displaystyle \frac { 3 6 G ^ { 2 } L ^ { 2 } } { c ^ { 2 } } } \end{array}
419
+ $$
420
+
421
+ Corollary A.4. Under Assumptions $_ { I - 3 }$ with constant stepsize $\begin{array} { r } { \eta = \sqrt { \frac { n } { T + 1 } } } \end{array}$ for $T \geq 1 6 n L ^ { 2 }$ , the averaged iterates $\begin{array} { r } { \overline { { \mathbf { x } } } ^ { ( t ) } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathbf { x } _ { i } ^ { ( t ) } } \end{array}$ of Algorithm 3 satisfy:
422
+
423
+ $$
424
+ \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right. _ { 2 } ^ { 2 } \leq \frac { 4 \left( f ( \overline { { { \bf x } } } ^ { ( 0 ) } ) - f ^ { \star } \right) + 2 \overline { { \sigma } } ^ { 2 } L } { \sqrt { n ( T + 1 ) } } + \frac { 3 6 G ^ { 2 } n L ^ { 2 } } { ( T + 1 ) c ^ { 2 } }
425
+ $$
426
+
427
+ where c denotes convergence rate of underlying averaging scheme.
428
+
429
+ The first term shows a linear speed up compared to SGD on one node, whereas the underlying averaging scheme affects only the second-order term. Substituting the convergence rate for exact averaging with $W$ gives the rate $\mathcal { O } ( 1 / \sqrt { n T } + n / ( T \rho ^ { 2 } ) )$ .
430
+
431
+ CHOCO-SGD with the underlying CHOCO-GOSSIP averaging scheme converges at the rate $\mathcal { O } ( 1 / \sqrt { n T } + n / ( T \rho ^ { 4 } \delta ^ { 2 } ) )$ . The dependence on $\rho$ (eigengap of the mixing matrix $W$ ) is worse than in the exact case. This might either just be an artifact of our proof technique or a consequence of supporting arbitrary high compression.
432
+
433
+ # A.3 CONVERGENCE FOR ARBITRARY $T$
434
+
435
+ The previous result holds only for $T$ larger than $1 6 n L ^ { 2 }$ . This is not necessary and can be relaxed by carefully tuning the stepsize.
436
+
437
+ Lemma A.5. For any parameters $r _ { 0 } \ge 0 , b \ge 0 , e \ge 0 , d \ge 0$ there exists constant stepsize $\begin{array} { r } { \eta \le \frac { 1 } { d } } \end{array}$ such that
438
+
439
+ $$
440
+ \Psi _ { T } : = \frac { r _ { 0 } } { \eta ( T + 1 ) } + b \eta + e \eta ^ { 2 } \leq 2 \left( \frac { b r _ { 0 } } { T + 1 } \right) ^ { \frac { 1 } { 2 } } + 2 e ^ { 1 / 3 } \left( \frac { r _ { 0 } } { T + 1 } \right) ^ { \frac { 2 } { 3 } } + \frac { d r _ { 0 } } { T + 1 }
441
+ $$
442
+
443
+ Proof. Choosing $\begin{array} { r } { \eta = \operatorname* { m i n } \left\{ \left( \frac { r _ { 0 } } { b ( T + 1 ) } \right) ^ { \frac { 1 } { 2 } } , \left( \frac { r _ { 0 } } { e ( T + 1 ) } \right) ^ { \frac { 1 } { 3 } } , \frac { 1 } { d } \right\} \le \frac { 1 } { d } } \end{array}$ we have three cases
444
+
445
+ • $\begin{array} { r } { \eta = \frac { 1 } { d } } \end{array}$ and is smaller than both $\begin{array} { r } { \left( \frac { r _ { 0 } } { b ( T + 1 ) } \right) ^ { \frac { 1 } { 2 } } } \end{array}$ and $\scriptstyle \left( { \frac { r _ { 0 } } { e ( T + 1 ) } } \right) ^ { \frac { 1 } { 3 } }$ , then
446
+
447
+ $$
448
+ \Psi _ { T } \leq \frac { d r _ { 0 } } { T + 1 } + \frac { b } { d } + \frac { e } { d ^ { 2 } } \leq \left( \frac { b r _ { 0 } } { T + 1 } \right) ^ { \frac { 1 } { 2 } } + \frac { d r _ { 0 } } { T + 1 } + e ^ { 1 / 3 } \left( \frac { r _ { 0 } } { T + 1 } \right) ^ { \frac { 2 } { 3 } }
449
+ $$
450
+
451
+ $\begin{array} { r } { \eta = \left( \frac { r _ { 0 } } { b ( T + 1 ) } \right) ^ { \frac { 1 } { 2 } } < \left( \frac { r _ { 0 } } { e ( T + 1 ) } \right) ^ { \frac { 1 } { 3 } } } \end{array}$
452
+
453
+ $$
454
+ \Psi _ { T } \leq 2 \left( \frac { r _ { 0 } b } { T + 1 } \right) ^ { \frac { 1 } { 2 } } + e \left( \frac { r _ { 0 } } { b ( T + 1 ) } \right) \leq 2 \left( \frac { r _ { 0 } b } { T + 1 } \right) ^ { \frac { 1 } { 2 } } + e ^ { \frac { 1 } { 3 } } \left( \frac { r _ { 0 } } { ( T + 1 ) } \right) ^ { \frac { 2 } { 3 } } ,
455
+ $$
456
+
457
+ • The last case, $\begin{array} { r } { \eta = \left( \frac { r _ { 0 } } { e ( T + 1 ) } \right) ^ { \frac { 1 } { 3 } } < \left( \frac { r _ { 0 } } { b ( T + 1 ) } \right) ^ { \frac { 1 } { 2 } } } \end{array}$
458
+
459
+ $$
460
+ \Psi _ { T } \leq 2 e ^ { \frac { 1 } { 3 } } \left( \frac { r _ { 0 } } { ( T + 1 ) } \right) ^ { \frac { 2 } { 3 } } + b \left( \frac { r _ { 0 } } { e ( T + 1 ) } \right) ^ { \frac { 1 } { 3 } } \leq 2 e ^ { \frac { 1 } { 3 } } \left( \frac { r _ { 0 } } { ( T + 1 ) } \right) ^ { \frac { 2 } { 3 } } + \left( \frac { b r _ { 0 } } { T + 1 } \right) ^ { \frac { 1 } { 2 } }
461
+ $$
462
+
463
+ Corollary A.6 (Generalized Theorem 4.1). Under Assumptions $_ { I - 3 }$ with constant stepsize η tuned as in Lemma A.5, the averaged iterates x(t) = 1n Pni=1 x(t)i of Algorithm 3 satisfy:
464
+
465
+ $$
466
+ \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \left. \nabla f ( \overline { { \mathbf { x } } } ^ { ( t ) } ) \right. _ { 2 } ^ { 2 } \leq 4 \sqrt { \frac { 2 L \overline { { \sigma } } ^ { 2 } } { n ( T + 1 ) } } + 1 7 \left( \frac { G L F _ { 0 } } { c ( T + 1 ) } \right) ^ { \frac { 2 } { 3 } } + \frac { 1 6 L F _ { 0 } } { T + 1 }
467
+ $$
468
+
469
+ where c denotes convergence rate of underlying averaging scheme, $F _ { 0 } = f ( \overline { { \mathbf { x } } } ^ { ( 0 ) } ) - f ^ { \star }$ .
470
+
471
+ Proof. The result follows from Theorem A.3 and Lemma A.5 with $r _ { 0 } = 4 \Big ( f ( \overline { { \mathbf { x } } } ^ { ( 0 ) } ) - f ^ { \star } \Big ) , b =$ $\frac { 2 { \overline { { \sigma } } } ^ { 2 } L } { n }$ , $\begin{array} { r } { e = \frac { 3 6 G ^ { 2 } L ^ { 2 } } { c ^ { 2 } } } \end{array}$ and $d = 4 L$ .
472
+
473
+ The corollary gives guarantees for the averaged vector of parameters $\overline { { \mathbf { x } } }$ , however in a decentralized setting it is very expensive and sometimes impossible to average all the parameters distributed across several machines, especially when the number of machines and the model size is large. We can get similar guarantees on the individual iterates $\mathbf { x } _ { i }$ as e.g. in (Assran et al., 2019). We summarize these briefly below.
474
+
475
+ Corollary A.7 (Convergence of local weights). Under the same setting as in Corollary A.6,
476
+
477
+ $$
478
+ \frac { 1 } { T + 1 } \sum _ { t = 0 } ^ { T } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left. \nabla f \bigl ( \mathbf { x } _ { i } ^ { ( t ) } \bigr ) \right. _ { 2 } ^ { 2 } \leq 8 \sqrt { \frac { 2 L \overline { { \sigma } } ^ { 2 } } { n ( T + 1 ) } } + 3 7 \left( \frac { G L F _ { 0 } } { c ( T + 1 ) } \right) ^ { \frac { 2 } { 3 } } + \frac { 3 2 L F _ { 0 } } { T + 1 }
479
+ $$
480
+
481
+ Proof of Corollary A.7.
482
+
483
+ $$
484
+ \begin{array} { r l } & { \displaystyle \frac { 1 } { { \cal T } + 1 } \sum _ { t = 0 } ^ { T } \displaystyle \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left\| \nabla f ( { \mathbf x } _ { i } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } \leq \displaystyle \frac { 1 } { { \cal T } + 1 } \sum _ { t = 0 } ^ { T } \displaystyle \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( 2 \left\| \nabla f ( { \mathbf x } _ { i } ^ { ( t ) } ) - \nabla f ( \overline { { { \mathbf x } } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } + 2 \left\| \nabla f ( \overline { { { \mathbf x } } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } \right) } \\ & { \qquad \leq \displaystyle \frac { 1 } { { \cal T } + 1 } \sum _ { t = 0 } ^ { T } \displaystyle \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( 2 L ^ { 2 } \left\| { \mathbf x } _ { i } ^ { ( t ) } - \overline { { { \mathbf x } } } ^ { ( t ) } \right\| _ { 2 } ^ { 2 } + 2 \left\| \nabla f ( \overline { { { \mathbf x } } } ^ { ( t ) } ) \right\| _ { 2 } ^ { 2 } \right) } \end{array}
485
+ $$
486
+
487
+ where we used $L$ -smoothness of $f$ . Using Theorem A.3 and tuning the stepsize as in Lemma A.5 we get the statement of the corollary. □
488
+
489
+ # B USEFUL INEQUALITIES
490
+
491
+ Lemma B.1. For arbitrary set of $n$ vectors $\{ \mathbf { a } _ { i } \} _ { i = 1 } ^ { n } , \mathbf { a } _ { i } \in \mathbb { R } ^ { d }$
492
+
493
+ $$
494
+ \left\| \sum _ { i = 1 } ^ { n } \mathbf { a } _ { i } \right\| ^ { 2 } \leq n \sum _ { i = 1 } ^ { n } \left\| \mathbf { a } _ { i } \right\| ^ { 2 } .
495
+ $$
496
+
497
+ Lemma B.2. For given two vectors a, $\mathbf { b } \in \mathbb { R } ^ { d }$
498
+
499
+ $$
500
+ \begin{array} { r } { 2 \left. \mathbf { a } , \mathbf { b } \right. \leq \gamma \left\| \mathbf { a } \right\| ^ { 2 } + \gamma ^ { - 1 } \left\| \mathbf { b } \right\| ^ { 2 } , \ } \end{array} \quad \quad \quad \forall \gamma > 0 .
501
+ $$
502
+
503
+ Lemma B.3. For given two vectors a, $\mathbf { b } \in \mathbb { R } ^ { d }$
504
+
505
+ $$
506
+ \left\| \mathbf { a } + \mathbf { b } \right\| ^ { 2 } \leq \left( 1 + \alpha \right) \left\| \mathbf { a } \right\| ^ { 2 } + \left( 1 + \alpha ^ { - 1 } \right) \left\| \mathbf { b } \right\| ^ { 2 } , \qquad \forall \alpha > 0 .
507
+ $$
508
+
509
+ This inequality also holds for the sum of two matrices $A , B \in \mathbb { R } ^ { n \times d }$ in Frobenius norm.
510
+
511
+ # C COMPRESSION SCHEMES
512
+
513
+ We implement the compression schemes detailed below.
514
+
515
+ • ${ \mathrm { g s g d } } _ { b }$ (Alistarh et al., 2017). The unbiased $\mathrm { g s g d } _ { b } \colon \mathbb { R } ^ { d } \to \mathbb { R } ^ { d }$ compression operator (for $b > 1$ ) is given as
516
+
517
+ $$
518
+ \mathrm { g s g d } _ { b } ( \mathbf { x } ) : = \left\| \mathbf { x } \right\| _ { 2 } \cdot \mathrm { s i g } ( \mathbf { x } ) \cdot 2 ^ { - ( b - 1 ) } \cdot \left\lfloor { \frac { 2 ^ { ( b - 1 ) } \left| \mathbf { x } \right| } { \left\| \mathbf { x } \right\| _ { 2 } } } + \mathbf { u } \right\rfloor
519
+ $$
520
+
521
+ where $\mathbf { 1 } \sim _ { u . a . r . } ~ [ 0 , 1 ] ^ { d }$ is a random dithering vector and $\mathrm { s i g } ( \mathbf { x } )$ assigns the element-wise sign: $( \mathrm { s i g } ( \mathbf { x } ) ) _ { i } = 1$ if $( { \bf x } ) _ { i } \geq 0$ and $( \mathrm { s i g } ( \mathbf { x } ) ) _ { i } = - 1$ if $( { \bf x } ) _ { i } < 0$ . As the value in the right bracket will be rounded to an integer in $\{ 0 , \ldots , 2 ^ { ( b - 1 ) } - 1 \}$ , each coordinate can be encoded with at most $( b - 1 ) + 1$ bits (1 for the sign). For more efficent encoding schemes cf. Alistarh et al. (2017).
522
+
523
+ A biased version is given as
524
+
525
+ $$
526
+ \operatorname { g s g d } _ { b } ( \mathbf { x } ) : = { \frac { \left\| \mathbf { x } \right\| _ { 2 } } { \tau } } \cdot \operatorname { s i g } ( \mathbf { x } ) \cdot 2 ^ { - ( b - 1 ) } \cdot \left\lfloor { \frac { 2 ^ { ( b - 1 ) } \left| \mathbf { x } \right| } { \left\| \mathbf { x } \right\| _ { 2 } } } + \mathbf { u } \right\rfloor
527
+ $$
528
+
529
+ for $\begin{array} { r } { \tau = 1 + \operatorname* { m i n } \left\{ \frac { d } { 2 ^ { 2 ( b - 1 ) } } , \frac { \sqrt { d } } { 2 ^ { ( b - 1 ) } } \right\} } \end{array}$ and is a $\begin{array} { r } { \delta = \frac { 1 } { \tau } } \end{array}$ compression operator (Koloskova et al., 2019).
530
+
531
+ • $\operatorname { r a n d o m } _ { a }$ (Wangni et al., 2018). Let $\mathbf { u } \in \{ 0 , 1 \} ^ { d }$ be a masking vector, sampled uniformly at random from the set $\{ \mathbf { u } \in \{ 0 , 1 \} ^ { d } : \| \mathbf { u } \| _ { 1 } = \left\lfloor a d \right\rfloor \}$ . Then the unbiased $\dot { \mathrm { r a n d o m } } _ { a } \colon { \mathbb { R } } ^ { \bar { d } } $ $\mathbb { R } ^ { d }$ operator is defined as
532
+
533
+ $$
534
+ \operatorname { r a n d o m } _ { a } ( \mathbf { x } ) : = { \frac { d } { \lfloor a d \rfloor } } \cdot \mathbf { x } \odot \mathbf { u } .
535
+ $$
536
+
537
+ The biased version is given as
538
+
539
+ $$
540
+ \operatorname { r a n d o m } _ { a } ( \mathbf { x } ) : = \mathbf { x } \odot \mathbf { u } ,
541
+ $$
542
+
543
+ and is a $\delta = a$ compression operator (Stich et al., 2018).
544
+
545
+ Only $3 2 \lfloor a d \rfloor$ bits are required to send $\operatorname { r a n d o m } _ { a } ( \mathbf { x } )$ to another node—all the values of non-zero entries (we assume that entries are represented as float32 numbers). Receiver can recover positions of these entries if it knows the random seed of uniform sampling operator used to select these entries. This random seed could be communicated once on preprocessing stage (before starting the algorithm).
546
+
547
+ • $\mathrm { t o p } _ { a }$ (Alistarh et al., 2018; Stich et al., 2018). The biased $\mathrm { t o p } _ { a } \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } ^ { d } }$ operator is defined as
548
+
549
+ $$
550
+ \mathrm { t o p } _ { a } ( { \bf x } ) : = { \bf x } \odot { \bf u } ( { \bf x } ) ,
551
+ $$
552
+
553
+ where ${ \mathbf u } ( { \mathbf x } ) \in \{ 0 , 1 \} ^ { d }$ , $\left\| \mathbf { u } \right\| _ { 1 } = \lfloor a d \rfloor$ is a masking vector with $( { \bf u } ) _ { i } = 1$ for indices $i \in \pi ^ { - 1 } ( \{ 1 , \ldots , \lfloor a d \rfloor \} )$ where the permutation $\pi$ is such that $\left| ( \mathbf { x } ) _ { \pi ( 1 ) } \right| \geq \left| ( \mathbf { x } ) _ { \pi ( 2 ) } \right| \geq$ $\cdots \geq \left| ( \mathbf { x } ) _ { \pi ( d ) } \right|$ . The $\mathrm { t o p } _ { a }$ operator is a $\delta = a$ compression operator (Stich et al., 2018). In the case of $\mathrm { t o p } _ { a }$ compression $2 \cdot 3 2 \lfloor a d \rfloor$ bits are required because along with the values we need to send positions of these values.
554
+
555
+ • sign (Bernstein et al., 2018; Karimireddy et al., 2019). The biased (scaled) sign : $\mathbb { R } ^ { d } \to \mathbb { R }$ compression operator is defined as
556
+
557
+ $$
558
+ \operatorname { s i g n } ( \mathbf { x } ) : = { \frac { \| \mathbf { x } \| _ { 1 } } { d } } \cdot \operatorname { s g n } ( \mathbf { x } ) .
559
+ $$
560
+
561
+ The sign operator is a δ = kxk21k k2 compression operator (Karimireddy et al., 2019).
562
+
563
+ In total for the sign compression we need to send only $d + 3 2$ bits—one bit for every entry in $\mathbf { x }$ and 32 bits for $\left\| \mathbf { x } \right\| _ { 1 }$ .
564
+
565
+ # D CHOCO-SGD WITH MOMENTUM
566
+
567
+ Algorithm 2 demonstrates how to combine CHOCO-SGD with weight decay and momentum. Nesterov momentum can be analogously adapted for our decentralized setting.
568
+
569
+ # E ERROR FEEDBACK INTERPRETATION OF CHOCO-SGD
570
+
571
+ To better understand how does CHOCO-SGD work, we can interpret it as an error feedback algorithm (Stich et al., 2018; Karimireddy et al., 2019; Stich & Karimireddy, 2019). We can equivalently rewrite CHOCO-SGD (Algorithm 1) as Algorithm 4. The common feature of error feedback algorithms is that quantization errors are saved into the internal memory, which is added to the compressed value at the next iteration. In CHOCO-SGD the value we want to transmit is the difference $\bar { \mathbf { x } } _ { i } ^ { ( t ) } - \mathbf { x } _ { i } ^ { ( t - 1 ) }$ , which represents the evolution of local variable $\mathbf { x } _ { i }$ at step $t$ . Before compressing this value on line 4, the internal memory is added on line 3 to correct for the errors. Then, on line 5 internal memory is updated. Note that $\mathbf { \dot { m } } _ { i } ^ { ( t ) } = \mathbf { x } _ { i } ^ { ( t - 1 ) } - \hat { \mathbf { x } } _ { i } ^ { ( t ) }$ in the old notation.
572
+
573
+ input: Initial values $\mathbf { x } _ { i } ^ { ( 0 ) } \in \mathbb { R } ^ { d }$ on each node $i \in [ n ]$ , consensus stepsize $\gamma$ , SGD stepsize $\eta$ , communication graph G = ([n], E) and mixing matrix W , initialize xˆ(0)i $\hat { \mathbf { x } } _ { i } ^ { ( 0 ) } = \mathbf { x } _ { i } ^ { ( - 1 ) } : = \mathbf { 0 }$ , $\forall i \in [ n ]$ 1: for $t$ in $0 \dots T - 1$ do {in parallel for all workers $i \in [ n ]$ } 2: $\begin{array} { r } { \mathbf { x } _ { i } ^ { ( t ) } : = \mathbf { x } _ { i } ^ { ( t - \frac { 1 } { 2 } ) } + \gamma \sum _ { j : \{ i , j \} \in E } w _ { i j } \big ( \hat { \mathbf { x } } _ { j } ^ { ( t ) } - \hat { \mathbf { x } } _ { i } ^ { ( t ) } \big ) } \end{array}$ / modified gossip averaging 3: $\mathbf { v } _ { i } ^ { ( t ) } = \mathbf { x } _ { i } ^ { ( t ) } - \mathbf { x } _ { i } ^ { ( t - 1 ) } + \mathbf { \bar { m } } _ { i } ^ { ( { t } ) }$ − x(t−1)i + 4: $\mathbf { q } _ { i } ^ { ( t ) } : = Q ( \mathbf { v } _ { i } ^ { ( t ) } )$ / compression 5: $\mathbf { m } _ { i } ^ { ( t + 1 ) } = \mathbf { v } _ { i } ^ { ( t ) } - \mathbf { q } _ { i } ^ { ( t ) }$ / memory update 6: for neighbors $j \colon \{ i , j \} \in E$ (including $\{ i \} \in E$ ) do 7: Send q(t)i and receive $\mathbf { q } _ { j } ^ { ( t ) }$ / communication 8: $\hat { \mathbf { x } } _ { j } ^ { ( t + 1 ) } : = \mathbf { q } _ { j } ^ { ( t ) } + \hat { \mathbf { x } } _ { j } ^ { ( t ) }$ / local update 9: end for 10: Samp le ξ(t) , compute gradient $\mathbf { g } _ { i } ^ { ( t ) } : = \nabla F _ { i } ( \mathbf { x } _ { i } ^ { ( t ) } , \xi _ { i } ^ { ( t ) } )$ 11: $\mathbf { x } _ { i } ^ { ( t + \frac { 1 } { 2 } ) } : = \mathbf { x } _ { i } ^ { ( t ) } - \eta \mathbf { g } _ { i } ^ { ( t ) }$ / stochastic gradient update 12: end for
574
+
575
+ # F DETAILED EXPERIMENTAL SETUP AND TUNED HYPERPARAMETERS
576
+
577
+ We precise the procedure of model training as well as the hyper-parameter tuning in this section.
578
+
579
+ Social Network Setup. For the comparison we consider CHOCO-SGD with sign compression (this combination achieved the compromise between accuracy and compression level in Table 1)), decentralized SGD without compression, and centralized SGD without compression. We train two models, firstly ResNet20 (He et al., 2016) (0.27 million parameters) for image classification on the Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012) and secondly, a three-layer LSTM architecture (Hochreiter & Schmidhuber, 1997) (28.95 million parameters) for a language modeling task on WikiText-2 (600 training and 60 validation articles with a total of $2 ^ { \prime } 0 8 8 ^ { \prime } 6 2 8$ and $2 1 7 ^ { \prime } 6 4 6$ tokens respectively) (Merity et al., 2016). For the language modeling task, we borrowed and adapted the general experimental setup of Merity et al. (2017), where we use a three-layer LSTM with hidden dimension of size 650. The loss is averaged over all examples and timesteps. The BPTT length is set to 30. We fine-tune the value of gradient clipping (0.4), and the dropout (0.4) is only applied on the output of LSTM.
580
+
581
+ We train both of ResNet20 and LSTM for 300 epochs, unless mentioned specifically. The per node mini-batch size is 32 for both datasets. The momentum (with factor 0.9) is only applied on the ResNet20 training.
582
+
583
+ Social Network and a Datacenter details. For all algorithms, we gradually warmup (Goyal et al., 2017) the learning rate from a relative small value (0.1) to the fine-tuned initial learning rate for the first 5 training epochs. During the training procedure, the tuned initial learning rate is decayed by the factor of 10 when accessing $5 0 \%$ and $7 5 \%$ of the total training epochs. The learning rate is tuned by finding the optimal initial learning rate (after the scaling).
584
+
585
+ The optimal $\hat { \eta }$ is searched in a pre-defined grid and we ensure that the best performance was contained in the middle of the grids. For example, if the best performance was ever at one of the extremes of the grid, we would try new grid points. Same searching logic applies to the consensus stepsize.
586
+
587
+ Table 4 demonstrates the fine-tuned hpyerparameters of CHOCO-SGD for training ResNet-20 on Cifar10, while Table 6 reports our fine-tuned hpyerparameters of our baselines. Table 5 demonstrates the fine-tuned hpyerparameters of CHOCO-SGD for training ResNet-20/LSTM on a social network topology.
588
+
589
+ We estimate the runtime information (depicted in Figure 5) of different methods from three trials of the evaluation on Google Cloud (Kubernetes Engine). More precisely, we create the cluster on
590
+
591
+ Google Cloud for three times and each time we estimate the time per mini-batch of different methods (through the first two training epochs).
592
+
593
+ Table 4: Tuned hyper-parameters of CHOCO-SGD for training ResNet-20 on Cifar10, corresponding to the ring topology with 8 nodes in Table 1. We randomly split the training data between nodes and shuffle it after every epoch. The per node mini-batch size is 128 and the degree of each node is 3.
594
+
595
+ <table><tr><td>Compression schemes</td><td>Learning rate</td><td>Consensus stepsize</td></tr><tr><td>QSGD (16-bit)</td><td>1.60</td><td>0.2</td></tr><tr><td>QSGD (8-bit)</td><td>0.96</td><td>0.2</td></tr><tr><td>QSGD (4-bit)</td><td>1.60</td><td>0.075</td></tr><tr><td>QSGD D (2-bit)</td><td>0.96</td><td>0.025</td></tr><tr><td>Sparsification ( (random-50%)</td><td>2.40</td><td>0.45</td></tr><tr><td>Sparsification (random-10%)</td><td>1.20</td><td>0.075</td></tr><tr><td>Sparsification (random-1%)</td><td>0.48</td><td>0.00625</td></tr><tr><td>Sparsification (top-50%)</td><td>1.60</td><td>0.45</td></tr><tr><td>Sparsification (top-10%)</td><td>1.60</td><td>0.15</td></tr><tr><td>Sparsification (top-1%)</td><td>1.20</td><td>0.0375</td></tr><tr><td>Sign+Norm</td><td>1.60</td><td>0.45</td></tr></table>
596
+
597
+ Table 5: Tuned hyper-parameters of CHOCO-SGD, corresponding to the social network topology with 32 nodes in Table 3. We randomly split the training data between the nodes and keep this partition fixed during the entire training (no shuffling). The per node mini-batch size is 32 and the maximum degree of the node is 14.
598
+
599
+ <table><tr><td>Configuration</td><td>Learning rate</td><td>Consensus stepsize</td></tr><tr><td>ResNet-20, Cifar10, Sign+Norm</td><td>1.0</td><td>0.5</td></tr><tr><td>LSTM,WikiText-2, Sign+Norm</td><td>25</td><td>0.6</td></tr></table>
600
+
601
+ Table 6: Tuned hyper-parameters of DCD, ECD, and DeepSqueeze for training ResNet $^ { - 2 0 }$ on Cifar10, corresponding to the ring topology with 8 nodes in Table 1. We randomly split the training data between nodes and shuffle it after every epoch. The per node mini-batch size is 128 and the degree of each node is 3. We only report the hpyerparameters corresponding to results that can reach to reasonable performance in our experiments.
602
+
603
+ <table><tr><td>Compression schemes</td><td>Learning rate</td><td>Consensus stepsize</td></tr><tr><td>DCD, QSGD (16-bit)</td><td>2.40</td><td></td></tr><tr><td>DCD, QSGD (8-bit)</td><td>1.20</td><td></td></tr><tr><td>DCD, Sparsification (random-50%)</td><td>0.80</td><td></td></tr><tr><td>DCD, Sparsification (top-50%)</td><td>1.20</td><td></td></tr><tr><td>DCD, Sparsification (top-10%)</td><td>1.60</td><td></td></tr><tr><td>DCD, Sparsification (top-1%)</td><td>2.40</td><td></td></tr><tr><td>ECD, QSGD (16-bit)</td><td>0.96</td><td></td></tr><tr><td>ECD, QSGD (8-bit)</td><td>1.20</td><td></td></tr><tr><td>DeepSqueeze, QSGD (4-bit)</td><td>0.60</td><td>0.01</td></tr><tr><td>DeepSqueeze, QSGD (2-bit)</td><td>0.80</td><td>0.005</td></tr><tr><td>DeepSqueeze, Sparsification (top-50%)</td><td>0.80</td><td>0.05</td></tr><tr><td>DeepSqueeze, Sparsification (top-10%)</td><td>0.60</td><td>0.01</td></tr><tr><td>DeepSqueeze, Sparsification (top-1%)</td><td>0.40</td><td>0.005</td></tr><tr><td>DeepSqueeze, Sparsification (random-1%)</td><td>0.80</td><td>0.0005</td></tr><tr><td>DeepSqueeze, Sign+Norm</td><td>0.48</td><td>0.01</td></tr></table>
604
+
605
+ # G ADDITIONAL PLOTS
606
+
607
+ To complement our results for scaling to a large number of nodes, we here additionally depict the learning curves (e.g. test accuracy) for the training on 64 nodes. We also mark the levels used for Fig. 1.
608
+
609
+ ![](images/291f242d0c09c7f2a4a9aa3cdb27b9dcf6ebb7dfea490cae823a3e88beabfeb7.jpg)
610
+ Figure 6: Scaling of CHOCO-SGD with sign compression to large number of devices on Cifar10 dataset. Convergence curves for 64 nodes. Vertical lines corresponds to the epoch/bits budget used in Fig. 1.
611
+
612
+ Table 7: The exact epoch for the same bits budget in Fig. 1.
613
+
614
+ <table><tr><td></td><td>n=4</td><td>n =16</td><td>n=36</td><td>n=64</td></tr><tr><td>Centralized</td><td>5</td><td>6</td><td>6</td><td>6</td></tr><tr><td>Decentralized (Ring)</td><td>7</td><td>17</td><td>32</td><td>54</td></tr><tr><td>Decentralized (Torus)</td><td>6</td><td>10</td><td>18</td><td>29</td></tr><tr><td>CHOCO (Ring)</td><td>105</td><td>408</td><td>904</td><td>1588</td></tr><tr><td>CHOCO (Torus)</td><td>55</td><td>206</td><td>454</td><td>796</td></tr></table>
615
+
616
+ able 8: The exact transmitted bits (in MB) for the same epoch budget in Fig. 1.
617
+
618
+ <table><tr><td></td><td>n=4</td><td>n=16</td><td>n=36</td><td>n=64</td></tr><tr><td>Centralized</td><td>139683</td><td>140041</td><td>144299</td><td>142899</td></tr><tr><td>Decentralized (Ring)</td><td>69841</td><td>17505</td><td>8016</td><td>4554</td></tr><tr><td>Decentralized (Torus)</td><td>139683</td><td>35010</td><td>16033</td><td>9109</td></tr><tr><td>CHOCO (Ring)</td><td>2208</td><td>564</td><td>253</td><td>144</td></tr><tr><td>CHOCO (Torus)</td><td>4417</td><td>1129</td><td>506</td><td>288</td></tr></table>
619
+
620
+ We additionally visualize the learning curves for the social network topology in Fig. 7 and Fig. 8.
621
+
622
+ ![](images/5fedcc5e5b143bc4d80bdbef98522e9808e6e4469abc50cf5bac0d7bd20576d9.jpg)
623
+ Figure 7: Training ResNet $^ { - 2 0 }$ on CIFAR-10 with decentralized algorithm on a real world social network topology. The topology has 32 nodes and we assume each node can only access a disjoint subset of the whole dataset. The local mini-batch size is 32.
624
+
625
+ We additionally provide the learning curves of training top-1, top-5 accuracy and test top-5 accuracy for the datacenter experiment in Fig. 9.
626
+
627
+ ![](images/b9b241bf2e6979e7e3f2871463e8fd1aafc51bd57dbd665ac2c610a20dbd5c41.jpg)
628
+ Figure 8: Training LSTM on WikiText2 with decentralized algorithm on a real world social network topology. The topology has 32 nodes and we assume each node can only access a disjoint subset of the whole dataset. The local mini-batch size is 32.
629
+
630
+ ![](images/ed0703c5379c390e60972af78e676435a6e3d97225d619b1572f2ac2f2267f9d.jpg)
631
+ Figure 9: Large-scale training: ResNet-50 on ImageNet in the datacenter.
parse/train/SkgGCkrKvH/SkgGCkrKvH_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgGCkrKvH/SkgGCkrKvH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgGCkrKvH/SkgGCkrKvH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgsACVKPH/SkgsACVKPH.md ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PICKING WINNING TICKETS BEFORE TRAINING BY PRESERVING GRADIENT FLOW
2
+
3
+ Chaoqi Wang, Guodong Zhang, Roger Grosse University of Toronto, Vector Institute {cqwang, gdzhang, rgrosse}@cs.toronto.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Overparameterization has been shown to benefit both the optimization and generalization of neural networks, but large networks are resource hungry at both training and test time. Network pruning can reduce test-time resource requirements, but is typically applied to trained networks and therefore cannot avoid the expensive training process. We aim to prune networks at initialization, thereby saving resources at training time as well. Specifically, we argue that efficient training requires preserving the gradient flow through the network. This leads to a simple but effective pruning criterion we term Gradient Signal Preservation (GraSP). We empirically investigate the effectiveness of the proposed method with extensive experiments on CIFAR-10, CIFAR-100, Tiny-ImageNet and ImageNet, using VGGNet and ResNet architectures. Our method can prune $80 \%$ of the weights of a VGG-16 network on ImageNet at initialization, with only a $1 . 6 \%$ drop in top-1 accuracy. Moreover, our method achieves significantly better performance than the baseline at extreme sparsity levels. Our code is made public at: https://github.com/alecwangcq/GraSP.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep neural networks exhibit good optimization and generalization performance in the overparameterized regime (Zhang et al., 2016; Neyshabur et al., 2019; Arora et al., 2019; Zhang et al., 2019b), but both training and inference for large networks are computationally expensive. Network pruning (LeCun et al., 1990; Hassibi et al., 1993; Han et al., 2015b; Dong et al., 2017; Zeng & Urtasun, 2019; Wang et al., 2019) has been shown to reduce the test-time resource requirements with minimal performance degradation. However, as the pruning is typically done to a trained network, these methods don’t save resources at training time. Moreover, it has been argued that it is hard to train sparse architectures from scratch while maintaining comparable performance to their dense counterparts (Han et al., 2015a; Li et al., 2016). Therefore, we ask: can we prune a network prior to training, so that we can improve computational efficiency at training time?
12
+
13
+ Recently, Frankle & Carbin (2019) shed light on this problem by proposing the Lottery Ticket Hypothesis (LTH), namely that there exist sparse, trainable sub-networks (called “winning tickets”) within the larger network. They identify the winning tickets by taking a pre-trained network and removing connections with weights smaller than a pre-specificed threshold. They then reset the remaining weights to their initial values, and retrain the sub-network from scratch. Hence, they showed that the pre-trained weights are not necessary, only the pruned architecture and the corresponding initial weight values. Nevertheless, like traditional pruning methods, the LTH approach still requires training the full-sized network in order to identify the sparse sub-networks.
14
+
15
+ Can we identify sparse, trainable sub-networks at initialization? This would allow us to exploit sparse computation with specified hardware for saving computation cost. (For instance, Dey et al. (2019) demonstrated ${ 5 } \mathbf { x }$ efficiency gains for training networks with pre-specified sparsity.) At first glance, a randomly initialized network seems to provide little information that we can use to judge the importance of individual connections, since the choice would seem to depend on complicated training dynamics. However, recent work suggests this goal is attainable. Lee et al. (2018) proposed the first algorithm for pruning at initialization time: Single-shot Network Pruning (SNIP), which uses a connection sensitivity criterion to prune weights with both small magnitude and small gradients.
16
+
17
+ Their empirical results are promising in the sense that they can find sparse, trainable sub-networks at initialization. However, connection sensitivity is sub-optimal as a criterion because the gradient of each weight might change dramatically after pruning due to complicated interactions between weights. Since SNIP only considers the gradient for one weight in isolation, it could remove connections that are important to the flow of information through the network. Practically, we find that this blocking of information flow manifests as a reduction in the norm of the gradient.
18
+
19
+ Therefore, we aim to prune connections in a way that accounts for their role in the network’s gradient flow. Specifically, we take the gradient norm after pruning as our criterion, and prune those weights whose removal will result in least decrease in the gradient norm after pruning. Because we rely on preserving the gradient flow to prune the network, we name our method Gradient Signal Preservation (GraSP). Our approach is easy to implement and conceptually simple. Moreover, the recently introduced Neural Tangent Kernel (NTK) (Jacot et al., 2018) provides tools for studying the learning dynamics in the output space. Building on the analysis of Arora et al. (2019), we show that our pruning criterion tends to keep those weights which will be beneficial for optimization. We evaluate GraSP on CIFAR-10, CIFAR-100 (Krizhevsky, 2009), Tiny-ImageNet and ImageNet (Deng et al., 2009) with modern neural networks, such as VGGNet (Simonyan & Zisserman, 2014) and ResNet (He et al., 2016). GraSP significantly outperforms SNIP in the extreme sparsity regime.
20
+
21
+ # 2 RELATED WORK AND BACKGROUND
22
+
23
+ In this section, we review the literature on neural network pruning including pruning after training, pruning during training, dynamic sparse training and pruning before training. We then discuss propagation of signals in deep neural networks and recent works in dynamical isometry and meanfield theory. Lastly, we also review the Neural Tangent Kernel (NTK) (Jacot et al., 2018), which builds up the foundation for justifying our method in Section 4.
24
+
25
+ # 2.1 NETWORK PRUNING
26
+
27
+ After training. Most pruning algorithms (LeCun et al., 1990; Hassibi et al., 1993; Dong et al., 2017; Han et al., 2015b; Li et al., 2016; Molchanov et al., 2016) operate on a pre-trained network. The main idea is to identify those weights which are most redundant, and whose removal will therefore least degrade the performance. Magnitude based pruning algorithms (Han et al., 2015b;a) remove those weights which are smaller than a threshold, which may incorrectly measure the importance of each weight. In contrast, Hessian-based pruning algorithms (LeCun et al., 1990; Hassibi et al., 1993) compute the importance of each weight by measuring how its removal will affect the loss. More recently, Wang et al. (2019) proposed a network reparameterization based on the Kroneckerfactored Eigenbasis for further boosting the performance of Hessian-based methods. However, all the aforementioned methods require pre-training, and therefore aren’t applicable at initialization.
28
+
29
+ During training. There are also some works which attempt to incorporate pruning into the training procedure itself. Srinivas & Babu (2016) proposed generalized dropout, allowing for tuning the individual dropout rates during training, which can result in a sparse network after training. Louizos et al. (2018) proposed a method for dealing with discontinuity in training $L _ { 0 }$ norm regularized networks in order to obtain sparse networks. Both methods require roughly the same computational cost as training the full network.
30
+
31
+ Dynamic Sparse Training Another branch of pruning algorithms is Dynamic Sparse Training methods, which will dynamically change the weight sparsity during training. Representative works, such as Bellec et al. (2018); Mocanu et al. (2018); Mostafa & Wang (2019); Dettmers & Zettlemoyer (2019), follow a prune-redistribute-regrowth cycle for pruning. Among them, Dettmers & Zettlemoyer (2019), proposed the sparse momentum algorithm, which dynamically determines the sparse mask based on the mean momentum magnitude during training. However, their method requires maintaining the momentum of all the weights during training, and thus does not save memory. These techniques generally achieve higher accuracy compared with fixed sparse connectivity, but change the standard training procedure and therefore do not enjoy the potential hardware acceleration.
32
+
33
+ Before training. Pruning at initialization is more challenging because we need to account for the effect on the training dynamics when removing each weight. There have been several attempts to conduct pruning before training. Frankle & Carbin (2019); Frankle et al. (2019) proposed and validated the Lottery Ticket Hypothesis (LTH), namely that the network structure found by traditional pruning algorithms and the corresponding initialization are together sufficient for training the subnetwork from scratch. Lee et al. (2018) proposed the SNIP algorithm, which was the first attempt to directly identify trainable and sparse sub-networks at initialization time. Their method was based on connection sensitivity, which aims to preserve the loss after pruning, and achieved impressive results. Concurrently to our work, Lee et al. (2019b) studied the pruning problem from a signal propagation perspective, and proposed to use an orthogonal initialization to ensure faithful signal propagation. Though their work shares the same spirit as our GraSP algorithm, they focused on the weight initialization scheme, while we focus on the pruning criterion.
34
+
35
+ # 2.2 SIGNAL PROPAGATION AT INITIALIZATION
36
+
37
+ Our pruning criteria shares the same spirit as recent works in dynamical isometry and mean-field theory (Saxe et al., 2013; Xiao et al., 2018; Yang & Schoenholz, 2017; Poole et al., 2016) where they derived initialization scheme theoretically by developing a mean field theory for signal propagation and by characterizing singular values of the input-output Jacobian matrix. Particularly, Xiao et al. (2018) successfully train 10,000-layers vanilla ConvNets with specific initialization scheme. Essentially, this line of work shows that the trainability of a neural network at initialization is crucial for final performance and convergence. While they focus on address the trainability issue of very deep networks, we aim to solve the issue of sparse neural networks. Besides, they measure the trainability by examining the input-output Jacobian while we do that by checking the gradient norm. Though different, gradient norm is closely related to the input-output Jacobian.
38
+
39
+ # 2.3 NEURAL TANGENT KERNEL AND CONVERGENCE ANALYSIS
40
+
41
+ Jacot et al. (2018) analyzed the dynamics of neural net training by directly analyzing the evolution of the network’s predictions in output space. Let $\mathcal { L }$ denote the cost function, $\mathcal { X }$ the set of all training samples, $\mathcal { Z } = \mathbf { \bar { \Phi } } _ { f ( \mathcal { X } ; \pmb { \theta } ) } \in \mathbb { R } ^ { n k \times \bar { 1 } }$ the outputs of the neural network, and $k$ and $n$ the output space dimension and the number of training examples. For a step of gradient descent, the change to the network’s predictions can be approximated with a first-order Taylor approximation:
42
+
43
+ $$
44
+ f ( \mathcal { X } ; \pmb { \theta } _ { t + 1 } ) = f ( \mathcal { X } ; \pmb { \theta } _ { t } ) - \eta \pmb { \Theta } _ { t } ( \mathcal { X } , \mathcal { X } ) \nabla _ { \mathcal { Z } } \mathcal { L } ,
45
+ $$
46
+
47
+ where the matrix $\Theta _ { t } ( \mathcal { X } , \mathcal { X } )$ is the Neural Tangent Kernel (NTK) at time step $t$ :
48
+
49
+ $$
50
+ \begin{array} { r } { \Theta _ { t } ( \mathcal { X } , \mathcal { X } ) = \nabla _ { \theta } f ( \mathcal { X } ; \pmb { \theta } _ { t } ) \nabla _ { \theta } f ( \mathcal { X } ; \pmb { \theta } _ { t } ) ^ { \top } \in \mathbb { R } ^ { n k \times n k } , } \end{array}
51
+ $$
52
+
53
+ where $\nabla _ { \pmb { \theta } } f ( \mathcal { X } ; \pmb { \theta } )$ denotes the network Jacobian over the whole training set. Jacot et al. (2018) showed that for infinitely wide networks, with proper initialization, the NTK exactly captures the output space dynamics throughout training. In particular, $\Theta _ { t } ( \mathcal { X } , \mathcal { X } )$ remains constant throughout training. Arora et al. (2019) used the NTK to analyze optimization and generalization phenomena, showing that under the assumptions of constant NTK and squared error loss, the training dynamics can be analyzed in closed form:
54
+
55
+ $$
56
+ \| \mathcal { V } - f ( \mathcal { X } ; \pmb { \theta } _ { t } ) \| _ { 2 } = \sqrt { \sum _ { i = 1 } ^ { n } ( 1 - \eta \lambda _ { i } ) ^ { 2 t } ( \mathbf { u } _ { i } ^ { \top } \mathcal { Y } ) ^ { 2 } } \pm \epsilon
57
+ $$
58
+
59
+ where $\mathcal { V } \in \mathbb { R } ^ { n k \times 1 }$ is all the targets, $\begin{array} { r } { \Theta = \mathbf { U } \pmb { \Lambda } \mathbf { U } ^ { \top } = \sum _ { i = 1 } ^ { n } \lambda _ { i } \mathbf { u } _ { i } \mathbf { u } _ { i } ^ { \top } } \end{array}$ is the eigendecomposition, and $\epsilon$ is a bounded error term. Although the constant NTK assumption holds only in the infinite width limit, Lee et al. (2019a) found close empirical agreement between the NTK dynamics and the true dynamics for wide but practical networks, such as wide ResNet architectures (Zagoruyko & Komodakis, 2016).
60
+
61
+ # 3 REVISITING SINGLE-SHOT NETWORK PRUNING (SNIP)
62
+
63
+ Single-shot network pruning was introduced by Lee et al. (2018), who used the term to refer both to the general problem setting and to their specific algorithm. To avoid ambiguity, we refer to the general problem of pruning before training as foresight pruning. For completeness, we first revisit the formulation of foresight pruning, and then point out issues of SNIP for motivating our method.
64
+
65
+ Require: Pruning ratio $p$ , training data $\mathcal { D }$ , network $f$ with initial parameters $\pmb { \theta } _ { 0 }$
66
+ 1: $\mathcal { D } _ { b } = \{ ( \mathbf { x } _ { i } , \mathbf { \bar { y } } _ { i } ) \} _ { i = 1 } ^ { b } \sim \mathcal { D }$ $\triangleright$ Sample a collection of training examples
67
+ 2: Compute the Hessian-gradient product $\mathbf { H } \mathbf { g }$ (see Eqn. (8)) $\triangleright$ See Algorithm 2
68
+ 3: $\mathbf { S } ( - \bar { \pmb { \theta } } _ { 0 } ) = - \pmb { \theta } _ { 0 } \odot \mathbf { H } \mathbf { g }$ $\triangleright$ Compute the importance of each weight
69
+ 4: Compute $p _ { \mathrm { t h } }$ percentile of $\mathbf { S } ( - \pmb \theta _ { 0 } )$ as $\tau$
70
+ 5: $\mathbf { m } = \mathbf { S } ( - \pmb { \theta } _ { 0 } ) < \tau$ $\triangleright$ Remove the weights with smallest importance
71
+ 6: Train the network $f _ { \mathrm { m } \odot \theta }$ on $\mathcal { D }$ until convergence.
72
+
73
+ Problem Formulation. Suppose we have a neural network $f$ parameterized by $\pmb \theta \in \mathbb R ^ { d }$ , and our objective is to minimize the empirical risk $\begin{array} { r } { \mathcal { L } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { i } \big [ \bar { \ell } ( \hat { f } ( \mathbf { x } _ { i } ; \pmb { \theta } ) , y _ { i } ) \big ] } \end{array}$ given a training set $\mathcal { D } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N }$ . Then, the foresight pruning problem can be formulated as:
74
+
75
+ $$
76
+ \operatorname* { m i n } _ { \mathbf { m } \in \{ 0 , 1 \} ^ { d } } \mathbb { E } _ { ( \mathbf { x } , y ) \sim \mathcal { D } } \left[ \ell \left( f \left( \mathbf { x } ; \mathcal { A } ( \mathbf { m } , \pmb { \theta } _ { 0 } ) \right) , y \right) \right] \quad \mathrm { s . t . } \ \| \mathbf { m } \| _ { 0 } / d = 1 - p
77
+ $$
78
+
79
+ where $\left\lceil p \cdot d \right\rceil$ is the number of weights to be removed, and $\mathcal { A }$ is a known training algorithm (e.g. SGD), which takes the mask $\mathbf { m }$ (here we marginalize out the initial weights $\pmb { \theta } _ { 0 }$ for simplicity), and returns the trained weights. Since globally minimizing Eqn. 4 is intractable, we are instead interested in heuristics that result in good practical performance.
80
+
81
+ Revisiting SNIP. SNIP (Lee et al., 2018) was the first algorithm proposed for foresight pruning, and it leverages the notion of connection sensitivity to remove unimportant connections. They define this in terms of how removing a single weight $\theta _ { q }$ in isolation will affect the loss:
82
+
83
+ $$
84
+ S ( \theta _ { q } ) = \operatorname* { l i m } _ { \epsilon \to 0 } \left| { \frac { { \mathcal { L } } ( \theta _ { 0 } ) - { \mathcal { L } } ( \theta _ { 0 } + \epsilon \delta _ { q } ) } { \epsilon } } \right| = \left| \theta _ { q } { \frac { \partial { \mathcal { L } } } { \partial \theta _ { q } } } \right|
85
+ $$
86
+
87
+ where $\theta _ { q }$ is the $q _ { t h }$ element of $\pmb { \theta } _ { 0 }$ , and $\delta _ { q }$ is a one-hot vector whose $q _ { t h }$ element equals $\theta _ { q }$ . Essentially, SNIP aims to preserve the loss of the original randomly initialized network.
88
+
89
+ Preserving the loss value motivated several classic methods for pruning a trained network, such as optimal brain damage (LeCun et al., 1990) and optimal brain surgery (Hassibi et al., 1993). While the motivation for loss preservation of a trained network is clear, it is less clear why this is a good criterion for foresight pruning. After all, at initialization, the loss is no better than chance. We argue that at the beginning of training, it is more important to preserve the training dynamics than the loss itself. SNIP does not do this automatically, because even if removing a particular connection doesn’t affect the loss, it could still block the flow of information through the network. For instance, we noticed in our experiments that SNIP with a high pruning ratio (e.g. $9 9 \%$ ) tends to eliminate nearly all the weights in a particular layer, creating a bottleneck in the network. Therefore, we would prefer a pruning criterion which accounts for how the presence or absence of one connection influences the training of the rest of the network.
90
+
91
+ # 4 GRADIENT SIGNAL PRESERVATION
92
+
93
+ We now introduce and motivate our foresight pruning criterion, Gradient Signal Preservation (GraSP). To understand the problem we are trying to address, observe that the network after pruning will have fewer parameters and sparse connectivity, hindering the flow of gradients through the network and potentially slowing the optimization. This is reflected in Figure 2, which shows the reduction in gradient norm for random pruning with various pruning ratios. Moreover, the performance of the pruned networks is correspondingly worse (see Table 1).
94
+
95
+ Mathematically, a larger gradient norm indicates that, to the first order, each gradient update achieves a greater loss reduction, as characterized by the following directional derivative:
96
+
97
+ $$
98
+ \Delta \mathcal { L } ( \pmb \theta ) = \operatorname* { l i m } _ { \epsilon 0 } \frac { \mathcal { L } ( \pmb \theta + \epsilon \nabla \mathcal { L } ( \pmb \theta ) ) - \mathcal { L } ( \pmb \theta ) } { \epsilon } = \nabla \mathcal { L } ( \pmb \theta ) ^ { \top } \nabla \mathcal { L } ( \pmb \theta )
99
+ $$
100
+
101
+ We would like to preserve or even increase (if possible) the gradient flow after pruning (i.e., the gradient flow of the pruned network). Following LeCun et al. (1990), we cast the pruning operation
102
+
103
+ # Algorithm 2 Hessian-gradient Product.
104
+
105
+ <table><tr><td rowspan="2">Require: A batch of training data Db,network f with initial parameters 0o,loss function L 1: L(0o)=E(x,y)~Db[e(f(x;00),y)]</td><td colspan="3"></td></tr><tr><td>&gt; Compute the loss and build the computation graph</td><td></td><td></td></tr><tr><td>2: g= grad(L(00),00)</td><td></td><td>&gt; Compute the gradient of loss function with respect to 0o</td><td></td></tr><tr><td>3: Hg = grad(gTstop_grad(g),00) 4: Return Hg</td><td></td><td> Compute the Hessian vector product of Hg</td><td></td></tr></table>
106
+
107
+ as adding a perturbation $\pmb { \delta }$ to the initial weights. We then use a Taylor approximation to characterize how removing one weight will affect the gradient flow after pruning:
108
+
109
+ $$
110
+ \begin{array} { r l } & { \mathbf { S } \left( \delta \right) = \Delta \mathcal { L } ( \pmb { \theta } _ { 0 } + \delta ) - \underbrace { \Delta \mathcal { L } ( \pmb { \theta } _ { 0 } ) } _ { \mathrm { C o n s t } } = 2 \delta ^ { \top } \nabla ^ { 2 } \mathcal { L } ( \pmb { \theta } _ { 0 } ) \nabla \mathcal { L } ( \pmb { \theta } _ { 0 } ) + \mathcal { O } ( \Vert \delta \Vert _ { 2 } ^ { 2 } ) } \\ & { \quad \quad = 2 \delta ^ { \top } \mathbf { H } \mathbf { g } + \mathcal { O } ( \Vert \delta \Vert _ { 2 } ^ { 2 } ) , } \end{array}
111
+ $$
112
+
113
+ where $\mathbf { S } ( \delta )$ approximately measures the change to (6). The Hessian matrix $\mathbf { H }$ captures the dependencies between different weights, and thus helps predict the effect of removing multiple weights. When $\mathbf { H }$ is approximated as the identity matrix, the above criterion recovers SNIP up to the absolute value (recall the SNIP criterion is $| \delta ^ { \top } \mathbf { g } | )$ ). However, it has been observed that different weights are highly coupled (Hassibi et al., 1993), indicating that $\mathbf { H }$ is in fact far from the identity.
114
+
115
+ GraSP uses eqn. (7) as the measure of the importance of each weight. Specifically, if $S ( \delta )$ is negative, then removing the corresponding weights will reduce the gradient flow, while if it is positive, it will increase the gradient flow. We prefer to first remove those weights whose removal will not reduce the gradient flow. For each weight, the importance can be computed in the following way (by an abuse of notation, we use bold S to denote vectorized importance):
116
+
117
+ $$
118
+ \mathbf { S } ( - \pmb { \theta } ) = - \pmb { \theta } \odot \mathbf { H } \mathbf { g }
119
+ $$
120
+
121
+ For a given pruning ratio $p$ , we obtain the resulting pruning mask by computing the importance score of every weight, and removing the bottom $p$ fraction of the weights (see Algorithm 1). Hence, GraSP takes the gradient flow into account for pruning. GraSP is efficient and easy to implement; the Hessian-gradient product can be computed without explicitly constructing the Hessian using higher-order automatic differentiation (Pearlmutter, 1994; Schraudolph, 2002).
122
+
123
+ # 4.1 UNDERSTANDING GRASP THROUGH LINEARIZED TRAINING DYNAMICS
124
+
125
+ The above discussion concerns only the training dynamics at initialization time. To understand the longer-term dynamics, we leverage the recently proposed Neural Tangent Kernel (NTK), which has been shown to be able to capture the training dynamics throughout training for practical networks (Lee et al., 2019a). Specifically, as we introduced in section 2.3, eqn. (3) characterizes how the training error changes throughout the training process, which only depends on time step $t$ , training targets $\mathcal { V }$ and the NTK $\Theta$ . Since the NTK stays almost constant for wide but practical networks (Lee et al., 2019a), e.g., wide ResNet (Zagoruyko & Komodakis, 2016), eqn. 3 is fairly accurate in those settings. This shows that NTK captures the training dynamics throughout the training process. Now we decompose eqn. (6) in the following form:
126
+
127
+ $$
128
+ \nabla \mathcal { L } ( \pmb { \theta } ) ^ { \top } \nabla \mathcal { L } ( \pmb { \theta } ) = \nabla _ { \mathcal { Z } } \mathcal { L } ^ { \top } \Theta ( \mathcal { X } , \mathcal { X } ) \nabla _ { \mathcal { Z } } \mathcal { L } = ( \mathbf { U } ^ { \top } \nabla _ { \mathcal { Z } } \mathcal { L } ) ^ { \top } \mathbf { A } ( \mathbf { U } ^ { \top } \nabla _ { \mathcal { Z } } \mathcal { L } ) = \sum _ { i = 1 } ^ { n } \lambda _ { i } ( \mathbf { u } _ { i } ^ { \top } \mathcal { Y } ) ^ { 2 }
129
+ $$
130
+
131
+ By relating it to eqn. (3), we can see that GraSP implicitly encourages $\Theta$ to be large in the directions corresponding to output space gradients. Since larger eigenvalue directions of $\Theta$ train faster according to eqn. (3), this suggests that GraSP should result in efficient training. In practice, the increasing of gradient norm might be achieved by increasing the loss. Therefore, we incorporate a temperature term on the logits to smooth the prediction, and so as to reduce the effect introduced by the loss.
132
+
133
+ # 5 EXPERIMENTS
134
+
135
+ In this section, we conduct various experiments to validate the effectiveness of our proposed singleshot pruning algorithm in terms of the test accuracy vs. pruning ratios by comparing against
136
+
137
+ Table 1: Comparisons with Random Pruning with VGG19 and ResNet32 on CIFAR-10/100.
138
+
139
+ <table><tr><td>Dataset</td><td colspan="4">CIFAR-10</td><td colspan="4">CIFAR-100</td></tr><tr><td>Pruning ratio</td><td>95%</td><td>98%</td><td>99%</td><td>99.5%</td><td>95%</td><td>98%</td><td>99%</td><td>99.5%</td></tr><tr><td>Random Pruning (VGG19) GraSP (VGG19)</td><td>89.47(0.5) 93.04(0.2)</td><td>86.71(0.7) 92.19(0.1)</td><td>82.21(0.5) 91.33(0.1)</td><td>72.89(1.6) 88.61(0.7)</td><td>66.36(0.3) 71.23(0.1)</td><td>61.33(0.1) 68.90(0.5)</td><td>55.18(0.6) 66.15(0.2)</td><td>36.88(6.8) 60.21(0.1)</td></tr><tr><td>Random Pruning (ResNet32) GraSP (ResNet32)</td><td>89.75(0.1) 91.39(0.3)</td><td>85.90(0.4) 88.81(0.1)</td><td>71.78(9.9) 85.43(0.5)</td><td>50.08(7.0) 80.50(0.3)</td><td>64.72(0.2) 66.50(0.1)</td><td>50.92(0.9) 58.43(0.4)</td><td>34.62(2.8) 48.73(0.3)</td><td>18.51(0.43) 35.55(2.4)</td></tr></table>
140
+
141
+ Table 2: Test accuracy of pruned VGG19 and ResNet32 on CIFAR-10 and CIFAR-100 datasets. The bold number is the higher one between the accuracy of GraSP and that of SNIP.
142
+
143
+ <table><tr><td>Dataset</td><td colspan="3">CIFAR-10</td><td colspan="3">CIFAR-100</td></tr><tr><td>Pruning ratio</td><td>90%</td><td>95%</td><td>98%</td><td>90%</td><td>95%</td><td>98%</td></tr><tr><td>VGG19 (Baseline)</td><td>94.23</td><td>-</td><td>-</td><td>74.16</td><td>=</td><td>-</td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>93.74</td><td>93.58</td><td>93.49</td><td>73.83</td><td>71.98</td><td>67.79</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun,2019)</td><td>93.83</td><td>93.69</td><td>93.49</td><td>73.79</td><td>73.07</td><td>71.69</td></tr><tr><td>LT(original initialization)</td><td>93.51</td><td>92.92</td><td>92.34</td><td>72.78</td><td>71.44</td><td>68.95</td></tr><tr><td>LT (reset to epoch 5)</td><td>93.82</td><td>93.61</td><td>93.09</td><td>74.06</td><td>72.87</td><td>70.55</td></tr><tr><td>DSR (Mostafa &amp; Wang,2019)</td><td>93.75</td><td>93.86</td><td>93.13</td><td>72.31</td><td>71.98</td><td>70.70</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>92.46</td><td>91.73</td><td>89.18</td><td>72.36</td><td>69.81</td><td>65.94</td></tr><tr><td>Deep-R (Bellec et al., 2018)</td><td>90.81</td><td>89.59</td><td>86.77</td><td>66.83</td><td>63.46</td><td>59.58</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>93.63±0.06</td><td>93.43±0.20</td><td>92.05±0.28</td><td>72.84±0.22</td><td>71.83±0.23</td><td>58.46±1.10</td></tr><tr><td>GraSP</td><td>93.30±0.14</td><td>93.04±0.18</td><td>92.19±0.12</td><td>71.95±0.18</td><td>71.23±0.12</td><td>68.90±0.47</td></tr><tr><td>ResNet32 (Baseline)</td><td>94.80</td><td></td><td>=</td><td>74.64</td><td>=</td><td></td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>94.17</td><td>93.29</td><td>90.31</td><td>71.96</td><td>68.73</td><td>60.65</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun,2019)</td><td>94.21</td><td>93.02</td><td>89.65</td><td>72.34</td><td>67.58</td><td>59.02</td></tr><tr><td>LT(original initialization)</td><td>92.31</td><td>91.06</td><td>88.78</td><td>68.99</td><td>65.02</td><td>57.37</td></tr><tr><td>LT (reset to epoch 5)</td><td>93.97</td><td>92.46</td><td>89.18</td><td>71.43</td><td>67.28</td><td>58.95</td></tr><tr><td>DSR (Mostafa &amp; Wang,2019)</td><td>92.97</td><td>91.61</td><td>88.46</td><td>69.63</td><td>68.20</td><td>61.24</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>92.30</td><td>90.76</td><td>88.29</td><td>69.66</td><td>67.41</td><td>62.25</td></tr><tr><td>Deep-R (Bellec et al.,2018)</td><td>91.62</td><td>89.84</td><td>86.45</td><td>66.78</td><td>63.90</td><td>58.47</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>92.59±0.10</td><td>91.01±0.21</td><td>87.51±0.31</td><td>68.89±0.45</td><td>65.22±0.69</td><td></td></tr><tr><td>GraSP</td><td>92.38±0.21</td><td>91.39±0.25</td><td>88.81±0.14</td><td>69.24±0.24</td><td>66.50±0.11</td><td>54.81±1.43 58.43±0.43</td></tr></table>
144
+
145
+ SNIP. We also include three Dynamic Sparse Training methods, DSR (Mostafa & Wang, 2019), SET (Mocanu et al., 2018) and Deep-R (Bellec et al., 2018). We further include two traditional pruning algorithms (LeCun et al., 1990; Zeng & Urtasun, 2019), which operate on the pre-trained networks, for serving as an upper bound for foresight pruning. Besides, we study the convergence performance of the sub-networks obtained by different pruning methods for investigating the relationship between gradient norm and final performance. Lastly, we study the role of initialization and batch sizes in terms of the performance of GraSP for ablation study.
146
+
147
+ # 5.1 PRUNING RESULTS ON MODERN CONVNETS
148
+
149
+ To evaluate the effectiveness of GraSP on real world tasks, we test GraSP on four image classification datasets, CIFAR-10/100, Tiny-ImageNet and ImageNet, with two modern network architectures, VGGNet and ResNet1. For the experiments on CIFAR-10/100 and Tiny-ImageNet, we use a minibatch with ten times of the number of classes for both GraSP and $\mathrm { S N I P } ^ { 2 }$ according to Lee et al. (2018). The pruned network is trained with Kaiming initialization (He et al., 2015) using SGD for 160 epochs for CIFAR-10/100, and 300 epochs for Tiny-ImageNet, with an initial learning rate of 0.1 and batch size 128. The learning rate is decayed by a factor of 0.1 at $1 / 2$ and $3 / 4$ of the total number of epochs. Moreover, we run each experiment for 3 trials for obtaining more stable results. For ImageNet, we adopt the Pytorch (Paszke et al., 2017) official implementation, but we used more epochs for training according to Liu et al. (2019). Specifically, we train the pruned networks with SGD for 150 epochs, and decay the learning rate by a factor of 0.1 every 50 epochs.
150
+
151
+ We first compre GraSP against random pruning, which generates the mask randomly for a given pruning ratio. The test accuracy is reported in Table 1. We can observe GraSP clearly outperforms random pruning, and the performance gap can be up to more than $3 0 \%$ in terms of test accuracy. We further compare GraSP with more competitive baselines on CIFAR-10/100 and Tiny-ImageNet for pruning ratios $\{ 8 5 \% , 9 0 \% , 9 5 \% , 9 8 \% \}$ , and the results can be referred in Table 2 and 4. When the pruning ratio is low, i.e. $8 5 \%$ , $9 0 \%$ , both SNIP and GraSP can achieve very close results to the baselines, though still do not outperform pruning algorithms that operate on trained networks, as expected. However, GraSP achieves significant better results for higher pruning ratios with more complicated networks (e.g. ResNet) and datasets (e.g. CIFAR-100 and Tiny-ImageNet), showing the advantages of directly relating the pruning criteria with the gradient flow after pruning. Moreover, in most cases, we notice that either SNIP or GraSP can match or even slightly outperform LT with original initialization, which indicates that both methods can identify meaningful structures. We further experiment with the late resetting as suggested in Frankle et al. (2019) by resetting the weights of the winning tickets to their values at 5 epoch. By doing so, we observe a boost in the performance of the LT across all the settings, which is consistent with (Frankle et al., 2019). As for the comparisons with Dynamic Sparse Training (DST) methods, DSR is the best performing one, and also we can observe that GraSP is still quite competitive to them even though without the flexibility to change the sparsity during training. In particular, GraSP can outperform Deep-R in almost all the settings, and surpasses SET in more than half of the settings.
152
+
153
+ Table 4: Test accuracy of pruned VGG19 and ResNet32 on Tiny-ImageNet dataset. The bold number is the higher one between the accuracy of GraSP and that of SNIP.
154
+
155
+ <table><tr><td>Network</td><td colspan="3">VGG19</td><td colspan="3">ResNet32</td></tr><tr><td>Pruning ratio</td><td>90%</td><td>95%</td><td>98%</td><td>85%</td><td>90%</td><td>95%</td></tr><tr><td>VGG19/ResNet32 (Baseline)</td><td>61.38</td><td>■</td><td>=</td><td>62.89</td><td>1</td><td>-</td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>61.21</td><td>60.49</td><td>54.98</td><td>58.55</td><td>56.80</td><td>51.00</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun, 2019)</td><td>60.23</td><td>59.23</td><td>55.55</td><td>58.86</td><td>57.62</td><td>51.70</td></tr><tr><td>LT(original initialization)</td><td>60.32</td><td>59.48</td><td>55.12</td><td>56.52</td><td>54.27</td><td>49.47</td></tr><tr><td>LT (reset to epoch 5)</td><td>61.19</td><td>60.57</td><td>56.18</td><td>60.31</td><td>57.77</td><td>51.21</td></tr><tr><td>DSR (Mostafa&amp; Wang,2019)</td><td>62.43</td><td>59.81</td><td>58.36</td><td>57.08</td><td>57.19</td><td>56.08</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>62.49</td><td>59.42</td><td>56.22</td><td>57.02</td><td>56.92</td><td>56.18</td></tr><tr><td>Deep-R (Bellec et al., 2018)</td><td>55.64</td><td>52.93</td><td>49.32</td><td>53.29</td><td>52.62</td><td>52.00</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>61.02±0.41</td><td>59.27±0.39</td><td>48.95±1.73</td><td>56.33±0.24</td><td>55.43±0.14</td><td>49.57±0.44</td></tr><tr><td>GraSP</td><td>60.76±0.23</td><td>59.50±0.33</td><td>57.28±0.34</td><td>57.25±0.11</td><td>55.53±0.11</td><td>51.34±0.29</td></tr></table>
156
+
157
+ Table 3: Test accuracy of ResNet-50 and VGG16 on ImageNet with pruning ratios $60 \%$ , $80 \%$ and $90 \%$ .
158
+
159
+ <table><tr><td>Pruning ratios</td><td colspan="2">60%</td><td colspan="2">80%</td><td colspan="2">90%</td></tr><tr><td>Accuracy</td><td>top-1</td><td>top-5</td><td>top-1</td><td>top5</td><td>top-1</td><td>top5</td></tr><tr><td>ResNet-50 (Baseline)</td><td>75.70</td><td>92.81</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>73.95</td><td>91.97</td><td>69.67</td><td>89.24</td><td>61.97</td><td>82.90</td></tr><tr><td>GraSP</td><td>74.02</td><td>91.86</td><td>72.06</td><td>90.82</td><td>68.14</td><td>88.67</td></tr><tr><td>VGG16 (Baseline)</td><td>73.37</td><td>91.47</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>72.95</td><td>91.39</td><td>69.96</td><td>89.71</td><td>65.27</td><td>86.14</td></tr><tr><td>GraSP</td><td>72.91</td><td>91.18</td><td>71.65</td><td>90.58</td><td>69.94</td><td>89.48</td></tr></table>
160
+
161
+ However, the above three datasets are overly simple and small-scale to draw robust conclusions, and thus we conduct further experiments on ImageNet using ResNet-50 and VGG16 with pruning ratios $\{ 6 0 \% , 8 0 \% , 9 0 \% \}$ to validate the effectiveness of GraSP. The results are shown in Table 3, we can see that when the pruning ratio is $6 0 \%$ , both SNIP and GraSP can achieve very close performance to the original one, and these two methods perform
162
+
163
+ almost the same. However, as we increase the pruning ratio, we observe that GraSP surpasses SNIP more and more. When the pruning ratio is $9 0 \%$ , GraSP can beat SNIP by $6 . 2 \%$ for ResNet-50 and $4 . 7 \%$ for VGG16 in top-1 accuracy, showing the advantages of GraSP at larger pruning ratios. We seek to investigate the reasons behind in Section 5.2 for obtaining a better understanding on GraSP.
164
+
165
+ # 5.2 ANALYSIS ON CONVERGENCE PERFORMANCE AND GRADIENT NORM
166
+
167
+ Based on our analysis in Section 4.1 and the observations in the previous subsection, we conduct further experiments on CIFAR-100 with ResNet32 to investigate where the performance gains come from in the high sparsity regions. We present the training statistics in terms of the training and test loss in Figure 1. We observe that the main bottleneck of pruned neural networks is underfitting, and thus support our optimization considerations when deriving the pruning criteria. As a result, the network pruned with GraSP can achieve much lower loss for both training and testing and the decrease in training loss is also much faster than SNIP.
168
+
169
+ ![](images/b7542313403f9708c12c64d27ce2e96a4be8323c3f63ce09dac0d333d16614d0.jpg)
170
+ Figure 1: The training and testing loss on CIFAR-100 of SNIP and GraSP with ResNet32 and a pruning ratio of $9 8 \%$ .
171
+ Bengio, 2010), as well as different mini-batch sizes. We present the mean and standard variance
172
+
173
+ ![](images/ef89a263c3550772962c5d52a621f11826fd9abf219e05253199ccc470652f43.jpg)
174
+ Figure 2: The gradient norm of ResNet32 after pruning on CIFAR-100 of various pruning ratios. Shaded area is the $9 5 \%$ confidence interval calculated with 10 trials.
175
+
176
+ ![](images/4d380df33762432a87531311a5f63dbd58fb19496d10387a98bfbbcefcc1173c.jpg)
177
+ Figure 3: The portion of remaining weights at each layer after pruning with a pruning ratio of $9 5 \%$ .
178
+
179
+ Besides, we also plot the gradient norm of pruned networks at initialization for a ResNet32 on CIFAR-100. The gradient norm is computed as the average of the gradients over the entire dataset, and we normalize the gradient of the original network to be 1. We run each experiment for 10 trials in order to obtain more stable results. We observe that both SNIP and GraSP result in a lower gradient norm at high sparsity (e.g. $9 8 \%$ ), but GraSP can better preserve the gradient norm after pruning, and also yield better results than SNIP at the high sparsity regions. Moreover, in these high sparsity regions, the pruned network usually underfits the training data, and thus the optimization will be a problem. The randomly pruned network has a much lower gradient norm and performs the worst. In contrast, the network pruned by GraSP can start with a higher gradient norm and thus hopefully more training progress can be made as evidenced by our results in Figure 1.
180
+
181
+ # 5.3 VISUALIZING THE NETWORK AFTER PRUNING
182
+
183
+ In order to probe the difference of the network pruned by SNIP and GraSP, we present the portion of the remaining weights at each layer of the sparse network obtained by SNIP and GraSP in Figure. 3. We observe that these two pruning methods result in different pruning strategies. Specifically, GraSP aims for preserving the gradient flow after pruning, and thus will not prune too aggressively for each layer. Moreover, it has been known that those convolutional layers at the top usually learn highly sparse features and thus more weights can be pruned (Zhang et al., 2019a). As a result, both methods prune most of the weights at the top layers, but GraSP will preserve more weights than SNIP due to the consideration of preserving the gradient flow. In contrast, SNIP is more likely to prune nearly all the weights in top layers, and thus those layers will be the bottleneck of blocking the information flow from the output layer to the input layer.
184
+
185
+ # 5.4 EFFECT OF BATCH SIZE AND INITIALIZATION
186
+
187
+ We also study how the batch size and initialization will affect GraSP on CIFAR-10 and CIFAR100 with ResNet32 for showing the robustness to different hyperparameters. Specifically, we test GraSP with three different initialization methods: Kaiming normal (He et al., 2015), Normal $\mathcal { N } ( 0 , 0 . 1 \bar { ) }$ , and Xavier normal (Glorot &
188
+
189
+ Table 5: Mean and standard variance of the test accuracy on CIFAR-10 and CIFAR-100 with ResNet32.
190
+
191
+ <table><tr><td rowspan="2">Dataset</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>60%</td><td>90%</td><td>60%</td><td>90%</td></tr><tr><td>Kaiming</td><td>93.42 ± 0.39</td><td>92.12 ± 0.39</td><td>71.60 ± 0.65</td><td>68.93 ± 0.36</td></tr><tr><td>Normal</td><td>93.31± 0.36</td><td>92.13 ± 0.36</td><td>71.48 ± 0.60</td><td>67.98 ± 0.83</td></tr><tr><td>Xavier</td><td>93.32 ± 0.25</td><td>92.22 ± 0.50</td><td>71.10 ± 1.27</td><td>68.11 ± 0.93</td></tr></table>
192
+
193
+ of the test accuracy obtained with different initialization methods and by varying the batch sizes in Table 5. For CIFAR-10 and CIFAR-100, we use batch sizes $\{ 1 0 0 , 4 0 0 , \cdot \cdot \cdot , 2 5 6 0 0 , 5 0 0 0 0 \}$ and $\{ 1 0 0 0 , 4 0 0 0 , 1 6 0 0 0 , 3 2 0 0 0 , 5 0 0 0 0 \}$ respectively. We observe that GraSP can achieve reasonable performance with different initialization methods, and also the effect of batch size is minimal for networks pruned with Kaiming initialization, which is one of the most commonly adopted initialization techniques in training neural networks.
194
+
195
+ # 6 DISCUSSION AND CONCLUSION
196
+
197
+ We propose Gradient Signal Preservation (GraSP), a pruning criterion motivated by preserving the gradient flow through the network after pruning. It can also be interpreted as aligning the large eigenvalues of the Neural Tangent Kernel with the targets. Empirically, GraSP is able to prune the weights of a network at initialization, while still performing competitively to traditional pruning algorithms, which requires first training the network. More broadly, foresight pruning can be a way for enabling training super large models that no existing GPUs can fit in, and also reduce the training cost by adopting sparse matrices operations. Readers may notice that there is still a performance gap between GraSP and traditional pruning algorithms, and also the LT with late resetting performs better than LT with original initialization. However, this does not negate the possibility that foresight pruning can match the performance of traditional pruning algorithms while still enjoying cheaper training cost. As evidence, Evci et al. (2019) show that there exists a linear and monotonically decreasing path from the sparse initialization to the solution found by pruning the fully-trained dense network, but current optimizers fail to achieve this. Therefore, designing better gradient-based optimizers that can exploit such paths will also be a good direction to explore.
198
+
199
+ # REFERENCES
200
+
201
+ Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. In Proceedings of the 36th International Conference on Machine Learning, pp. 322–332, 2019.
202
+ Guillaume Bellec, David Kappel, Wolfgang Maass, and Robert Legenstein. Deep rewiring: Training very sparse deep networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id ${ \underline { { \underline { { \mathbf { \Pi } } } } } } =$ BJ_wN01C-.
203
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255, 2009.
204
+ Tim Dettmers and Luke Zettlemoyer. Sparse networks from scratch: Faster training without losing performance. arXiv preprint arXiv:1907.04840, 2019.
205
+ Sourya Dey, Kuan-Wen Huang, Peter A Beerel, and Keith M Chugg. Pre-defined sparse neural networks with hardware acceleration. IEEE Journal on Emerging and Selected Topics in Circuits and Systems, 2019.
206
+ Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. In Advances in Neural Information Processing Systems, pp. 4857–4867, 2017.
207
+ Utku Evci, Fabian Pedregosa, Aidan Gomez, and Erich Elsen. The difficulty of training sparse neural networks. arXiv preprint arXiv:1906.10732, 2019.
208
+ Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id=rJl-b3RcF7.
209
+ Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. The lottery ticket hypothesis at scale. arXiv preprint arXiv:1903.01611, 2019.
210
+
211
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249–256, 2010.
212
+
213
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. International Conference on Learning Representations, 2015a.
214
+
215
+ Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pp. 1135–1143, 2015b.
216
+
217
+ Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. In IEEE international conference on neural networks, pp. 293–299. IEEE, 1993.
218
+
219
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
220
+
221
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
222
+
223
+ Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in neural information processing systems, pp. 8571–8580, 2018.
224
+
225
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
226
+
227
+ Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In Advances in neural information processing systems, pp. 598–605, 1990.
228
+
229
+ Jaehoon Lee, Lechao Xiao, Samuel S Schoenholz, Yasaman Bahri, Jascha Sohl-Dickstein, and Jeffrey Pennington. Wide neural networks of any depth evolve as linear models under gradient descent. arXiv preprint arXiv:1902.06720, 2019a.
230
+
231
+ Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. International Conference on Learning Representations, 2018.
232
+
233
+ Namhoon Lee, Thalaiyasingam Ajanthan, Stephen Gould, and Philip HS Torr. A signal propagation perspective for pruning neural networks at initialization. arXiv preprint arXiv:1906.06307, 2019b.
234
+
235
+ Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. International Conference on Learning Representations, 2016.
236
+
237
+ Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. International Conference on Learning Representations, 2019.
238
+
239
+ Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l_0 regularization. International Conference on Learning Representations, 2018.
240
+
241
+ Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu, and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science. Nature communications, 9(1):2383, 2018.
242
+
243
+ Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. International Conference on Learning Representations, 2016.
244
+
245
+ Hesham Mostafa and Xin Wang. Parameter efficient training of deep convolutional neural networks by dynamic sparse reparameterization. International Conference on Machine Learning, 2019.
246
+
247
+ Behnam Neyshabur, Zhiyuan Li, Srinadh Bhojanapalli, Yann LeCun, and Nathan Srebro. The role of over-parametrization in generalization of neural networks. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\equiv$ BygfghAcYX.
248
+
249
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.
250
+
251
+ Barak A Pearlmutter. Fast exact multiplication by the Hessian. Neural computation, 6(1):147–160, 1994.
252
+
253
+ Ben Poole, Subhaneil Lahiri, Maithra Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances in neural information processing systems, pp. 3360–3368, 2016.
254
+
255
+ Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
256
+
257
+ Nicol N Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural computation, 14(7):1723–1738, 2002.
258
+
259
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. International Conference on Learning Representations, 2014.
260
+
261
+ Suraj Srinivas and R Venkatesh Babu. Generalized dropout. arXiv preprint arXiv:1611.06791, 2016.
262
+
263
+ Chaoqi Wang, Roger Grosse, Sanja Fidler, and Guodong Zhang. EigenDamage: Structured pruning in the Kronecker-factored eigenbasis. In Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 6566–6575. PMLR, 2019. URL http://proceedings. mlr.press/v97/wang19g.html.
264
+
265
+ Lechao Xiao, Yasaman Bahri, Jascha Sohl-Dickstein, Samuel Schoenholz, and Jeffrey Pennington. Dynamical isometry and a mean field theory of cnns: How to train 10,000-layer vanilla convolutional neural networks. In International Conference on Machine Learning, pp. 5393–5402, 2018.
266
+
267
+ Ge Yang and Samuel Schoenholz. Mean field residual networks: On the edge of chaos. In Advances in neural information processing systems, pp. 7103–7114, 2017.
268
+
269
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016.
270
+
271
+ Wenyuan Zeng and Raquel Urtasun. MLPrune: Multi-layer pruning for automated neural network compression, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ r1g5b2RcKm.
272
+
273
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. International Conference on Learning Representations, 2016.
274
+
275
+ Chiyuan Zhang, Samy Bengio, and Yoram Singer. Are all layers created equal? arXiv preprint arXiv:1902.01996, 2019a.
276
+
277
+ Guodong Zhang, James Martens, and Roger Grosse. Fast convergence of natural gradient descent for overparameterized neural networks. arXiv preprint arXiv:1905.10961, 2019b.
parse/train/SkgsACVKPH/SkgsACVKPH_content_list.json ADDED
@@ -0,0 +1,1377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "PICKING WINNING TICKETS BEFORE TRAINING BY PRESERVING GRADIENT FLOW ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 751,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Chaoqi Wang, Guodong Zhang, Roger Grosse University of Toronto, Vector Institute {cqwang, gdzhang, rgrosse}@cs.toronto.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 586,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 250,
32
+ 544,
33
+ 263
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Overparameterization has been shown to benefit both the optimization and generalization of neural networks, but large networks are resource hungry at both training and test time. Network pruning can reduce test-time resource requirements, but is typically applied to trained networks and therefore cannot avoid the expensive training process. We aim to prune networks at initialization, thereby saving resources at training time as well. Specifically, we argue that efficient training requires preserving the gradient flow through the network. This leads to a simple but effective pruning criterion we term Gradient Signal Preservation (GraSP). We empirically investigate the effectiveness of the proposed method with extensive experiments on CIFAR-10, CIFAR-100, Tiny-ImageNet and ImageNet, using VGGNet and ResNet architectures. Our method can prune $80 \\%$ of the weights of a VGG-16 network on ImageNet at initialization, with only a $1 . 6 \\%$ drop in top-1 accuracy. Moreover, our method achieves significantly better performance than the baseline at extreme sparsity levels. Our code is made public at: https://github.com/alecwangcq/GraSP. ",
40
+ "bbox": [
41
+ 233,
42
+ 281,
43
+ 766,
44
+ 488
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 516,
55
+ 336,
56
+ 532
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep neural networks exhibit good optimization and generalization performance in the overparameterized regime (Zhang et al., 2016; Neyshabur et al., 2019; Arora et al., 2019; Zhang et al., 2019b), but both training and inference for large networks are computationally expensive. Network pruning (LeCun et al., 1990; Hassibi et al., 1993; Han et al., 2015b; Dong et al., 2017; Zeng & Urtasun, 2019; Wang et al., 2019) has been shown to reduce the test-time resource requirements with minimal performance degradation. However, as the pruning is typically done to a trained network, these methods don’t save resources at training time. Moreover, it has been argued that it is hard to train sparse architectures from scratch while maintaining comparable performance to their dense counterparts (Han et al., 2015a; Li et al., 2016). Therefore, we ask: can we prune a network prior to training, so that we can improve computational efficiency at training time? ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 825,
67
+ 686
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recently, Frankle & Carbin (2019) shed light on this problem by proposing the Lottery Ticket Hypothesis (LTH), namely that there exist sparse, trainable sub-networks (called “winning tickets”) within the larger network. They identify the winning tickets by taking a pre-trained network and removing connections with weights smaller than a pre-specificed threshold. They then reset the remaining weights to their initial values, and retrain the sub-network from scratch. Hence, they showed that the pre-trained weights are not necessary, only the pruned architecture and the corresponding initial weight values. Nevertheless, like traditional pruning methods, the LTH approach still requires training the full-sized network in order to identify the sparse sub-networks. ",
74
+ "bbox": [
75
+ 174,
76
+ 694,
77
+ 825,
78
+ 805
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Can we identify sparse, trainable sub-networks at initialization? This would allow us to exploit sparse computation with specified hardware for saving computation cost. (For instance, Dey et al. (2019) demonstrated ${ 5 } \\mathbf { x }$ efficiency gains for training networks with pre-specified sparsity.) At first glance, a randomly initialized network seems to provide little information that we can use to judge the importance of individual connections, since the choice would seem to depend on complicated training dynamics. However, recent work suggests this goal is attainable. Lee et al. (2018) proposed the first algorithm for pruning at initialization time: Single-shot Network Pruning (SNIP), which uses a connection sensitivity criterion to prune weights with both small magnitude and small gradients. ",
85
+ "bbox": [
86
+ 174,
87
+ 811,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Their empirical results are promising in the sense that they can find sparse, trainable sub-networks at initialization. However, connection sensitivity is sub-optimal as a criterion because the gradient of each weight might change dramatically after pruning due to complicated interactions between weights. Since SNIP only considers the gradient for one weight in isolation, it could remove connections that are important to the flow of information through the network. Practically, we find that this blocking of information flow manifests as a reduction in the norm of the gradient. ",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 186
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Therefore, we aim to prune connections in a way that accounts for their role in the network’s gradient flow. Specifically, we take the gradient norm after pruning as our criterion, and prune those weights whose removal will result in least decrease in the gradient norm after pruning. Because we rely on preserving the gradient flow to prune the network, we name our method Gradient Signal Preservation (GraSP). Our approach is easy to implement and conceptually simple. Moreover, the recently introduced Neural Tangent Kernel (NTK) (Jacot et al., 2018) provides tools for studying the learning dynamics in the output space. Building on the analysis of Arora et al. (2019), we show that our pruning criterion tends to keep those weights which will be beneficial for optimization. We evaluate GraSP on CIFAR-10, CIFAR-100 (Krizhevsky, 2009), Tiny-ImageNet and ImageNet (Deng et al., 2009) with modern neural networks, such as VGGNet (Simonyan & Zisserman, 2014) and ResNet (He et al., 2016). GraSP significantly outperforms SNIP in the extreme sparsity regime. ",
107
+ "bbox": [
108
+ 174,
109
+ 194,
110
+ 825,
111
+ 347
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 RELATED WORK AND BACKGROUND ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 174,
121
+ 367,
122
+ 511,
123
+ 383
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "In this section, we review the literature on neural network pruning including pruning after training, pruning during training, dynamic sparse training and pruning before training. We then discuss propagation of signals in deep neural networks and recent works in dynamical isometry and meanfield theory. Lastly, we also review the Neural Tangent Kernel (NTK) (Jacot et al., 2018), which builds up the foundation for justifying our method in Section 4. ",
130
+ "bbox": [
131
+ 174,
132
+ 400,
133
+ 825,
134
+ 469
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "2.1 NETWORK PRUNING ",
141
+ "text_level": 1,
142
+ "bbox": [
143
+ 176,
144
+ 487,
145
+ 356,
146
+ 501
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "After training. Most pruning algorithms (LeCun et al., 1990; Hassibi et al., 1993; Dong et al., 2017; Han et al., 2015b; Li et al., 2016; Molchanov et al., 2016) operate on a pre-trained network. The main idea is to identify those weights which are most redundant, and whose removal will therefore least degrade the performance. Magnitude based pruning algorithms (Han et al., 2015b;a) remove those weights which are smaller than a threshold, which may incorrectly measure the importance of each weight. In contrast, Hessian-based pruning algorithms (LeCun et al., 1990; Hassibi et al., 1993) compute the importance of each weight by measuring how its removal will affect the loss. More recently, Wang et al. (2019) proposed a network reparameterization based on the Kroneckerfactored Eigenbasis for further boosting the performance of Hessian-based methods. However, all the aforementioned methods require pre-training, and therefore aren’t applicable at initialization. ",
153
+ "bbox": [
154
+ 174,
155
+ 512,
156
+ 825,
157
+ 652
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "During training. There are also some works which attempt to incorporate pruning into the training procedure itself. Srinivas & Babu (2016) proposed generalized dropout, allowing for tuning the individual dropout rates during training, which can result in a sparse network after training. Louizos et al. (2018) proposed a method for dealing with discontinuity in training $L _ { 0 }$ norm regularized networks in order to obtain sparse networks. Both methods require roughly the same computational cost as training the full network. ",
164
+ "bbox": [
165
+ 174,
166
+ 660,
167
+ 823,
168
+ 742
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Dynamic Sparse Training Another branch of pruning algorithms is Dynamic Sparse Training methods, which will dynamically change the weight sparsity during training. Representative works, such as Bellec et al. (2018); Mocanu et al. (2018); Mostafa & Wang (2019); Dettmers & Zettlemoyer (2019), follow a prune-redistribute-regrowth cycle for pruning. Among them, Dettmers & Zettlemoyer (2019), proposed the sparse momentum algorithm, which dynamically determines the sparse mask based on the mean momentum magnitude during training. However, their method requires maintaining the momentum of all the weights during training, and thus does not save memory. These techniques generally achieve higher accuracy compared with fixed sparse connectivity, but change the standard training procedure and therefore do not enjoy the potential hardware acceleration. ",
175
+ "bbox": [
176
+ 174,
177
+ 750,
178
+ 825,
179
+ 875
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Before training. Pruning at initialization is more challenging because we need to account for the effect on the training dynamics when removing each weight. There have been several attempts to conduct pruning before training. Frankle & Carbin (2019); Frankle et al. (2019) proposed and validated the Lottery Ticket Hypothesis (LTH), namely that the network structure found by traditional pruning algorithms and the corresponding initialization are together sufficient for training the subnetwork from scratch. Lee et al. (2018) proposed the SNIP algorithm, which was the first attempt to directly identify trainable and sparse sub-networks at initialization time. Their method was based on connection sensitivity, which aims to preserve the loss after pruning, and achieved impressive results. Concurrently to our work, Lee et al. (2019b) studied the pruning problem from a signal propagation perspective, and proposed to use an orthogonal initialization to ensure faithful signal propagation. Though their work shares the same spirit as our GraSP algorithm, they focused on the weight initialization scheme, while we focus on the pruning criterion. ",
186
+ "bbox": [
187
+ 176,
188
+ 882,
189
+ 823,
190
+ 924
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "",
197
+ "bbox": [
198
+ 174,
199
+ 103,
200
+ 825,
201
+ 229
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "2.2 SIGNAL PROPAGATION AT INITIALIZATION ",
208
+ "text_level": 1,
209
+ "bbox": [
210
+ 174,
211
+ 246,
212
+ 509,
213
+ 261
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "Our pruning criteria shares the same spirit as recent works in dynamical isometry and mean-field theory (Saxe et al., 2013; Xiao et al., 2018; Yang & Schoenholz, 2017; Poole et al., 2016) where they derived initialization scheme theoretically by developing a mean field theory for signal propagation and by characterizing singular values of the input-output Jacobian matrix. Particularly, Xiao et al. (2018) successfully train 10,000-layers vanilla ConvNets with specific initialization scheme. Essentially, this line of work shows that the trainability of a neural network at initialization is crucial for final performance and convergence. While they focus on address the trainability issue of very deep networks, we aim to solve the issue of sparse neural networks. Besides, they measure the trainability by examining the input-output Jacobian while we do that by checking the gradient norm. Though different, gradient norm is closely related to the input-output Jacobian. ",
220
+ "bbox": [
221
+ 174,
222
+ 272,
223
+ 825,
224
+ 412
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "2.3 NEURAL TANGENT KERNEL AND CONVERGENCE ANALYSIS ",
231
+ "text_level": 1,
232
+ "bbox": [
233
+ 174,
234
+ 430,
235
+ 632,
236
+ 445
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "Jacot et al. (2018) analyzed the dynamics of neural net training by directly analyzing the evolution of the network’s predictions in output space. Let $\\mathcal { L }$ denote the cost function, $\\mathcal { X }$ the set of all training samples, $\\mathcal { Z } = \\mathbf { \\bar { \\Phi } } _ { f ( \\mathcal { X } ; \\pmb { \\theta } ) } \\in \\mathbb { R } ^ { n k \\times \\bar { 1 } }$ the outputs of the neural network, and $k$ and $n$ the output space dimension and the number of training examples. For a step of gradient descent, the change to the network��s predictions can be approximated with a first-order Taylor approximation: ",
243
+ "bbox": [
244
+ 174,
245
+ 455,
246
+ 825,
247
+ 526
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "equation",
253
+ "img_path": "images/47835cd29057dabbae29342fcb47bf23e92b1b1c267259b0bf15b71ee4ed7139.jpg",
254
+ "text": "$$\nf ( \\mathcal { X } ; \\pmb { \\theta } _ { t + 1 } ) = f ( \\mathcal { X } ; \\pmb { \\theta } _ { t } ) - \\eta \\pmb { \\Theta } _ { t } ( \\mathcal { X } , \\mathcal { X } ) \\nabla _ { \\mathcal { Z } } \\mathcal { L } ,\n$$",
255
+ "text_format": "latex",
256
+ "bbox": [
257
+ 349,
258
+ 534,
259
+ 647,
260
+ 551
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "where the matrix $\\Theta _ { t } ( \\mathcal { X } , \\mathcal { X } )$ is the Neural Tangent Kernel (NTK) at time step $t$ : ",
267
+ "bbox": [
268
+ 176,
269
+ 559,
270
+ 689,
271
+ 574
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "equation",
277
+ "img_path": "images/2d518a4de18fc444b3a9c914ce122e22ae9fcfe2bfabff2bfe50c58eae5a050e.jpg",
278
+ "text": "$$\n\\begin{array} { r } { \\Theta _ { t } ( \\mathcal { X } , \\mathcal { X } ) = \\nabla _ { \\theta } f ( \\mathcal { X } ; \\pmb { \\theta } _ { t } ) \\nabla _ { \\theta } f ( \\mathcal { X } ; \\pmb { \\theta } _ { t } ) ^ { \\top } \\in \\mathbb { R } ^ { n k \\times n k } , } \\end{array}\n$$",
279
+ "text_format": "latex",
280
+ "bbox": [
281
+ 325,
282
+ 580,
283
+ 669,
284
+ 601
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "where $\\nabla _ { \\pmb { \\theta } } f ( \\mathcal { X } ; \\pmb { \\theta } )$ denotes the network Jacobian over the whole training set. Jacot et al. (2018) showed that for infinitely wide networks, with proper initialization, the NTK exactly captures the output space dynamics throughout training. In particular, $\\Theta _ { t } ( \\mathcal { X } , \\mathcal { X } )$ remains constant throughout training. Arora et al. (2019) used the NTK to analyze optimization and generalization phenomena, showing that under the assumptions of constant NTK and squared error loss, the training dynamics can be analyzed in closed form: ",
291
+ "bbox": [
292
+ 174,
293
+ 607,
294
+ 825,
295
+ 691
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "equation",
301
+ "img_path": "images/ffe1ccb9f5e3fe65f96dbc3c1edbe974949144040ff2e085c048c2dfa66ca0ac.jpg",
302
+ "text": "$$\n\\| \\mathcal { V } - f ( \\mathcal { X } ; \\pmb { \\theta } _ { t } ) \\| _ { 2 } = \\sqrt { \\sum _ { i = 1 } ^ { n } ( 1 - \\eta \\lambda _ { i } ) ^ { 2 t } ( \\mathbf { u } _ { i } ^ { \\top } \\mathcal { Y } ) ^ { 2 } } \\pm \\epsilon\n$$",
303
+ "text_format": "latex",
304
+ "bbox": [
305
+ 330,
306
+ 699,
307
+ 669,
308
+ 751
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "where $\\mathcal { V } \\in \\mathbb { R } ^ { n k \\times 1 }$ is all the targets, $\\begin{array} { r } { \\Theta = \\mathbf { U } \\pmb { \\Lambda } \\mathbf { U } ^ { \\top } = \\sum _ { i = 1 } ^ { n } \\lambda _ { i } \\mathbf { u } _ { i } \\mathbf { u } _ { i } ^ { \\top } } \\end{array}$ is the eigendecomposition, and $\\epsilon$ is a bounded error term. Although the constant NTK assumption holds only in the infinite width limit, Lee et al. (2019a) found close empirical agreement between the NTK dynamics and the true dynamics for wide but practical networks, such as wide ResNet architectures (Zagoruyko & Komodakis, 2016). ",
315
+ "bbox": [
316
+ 174,
317
+ 756,
318
+ 826,
319
+ 815
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "3 REVISITING SINGLE-SHOT NETWORK PRUNING (SNIP)",
326
+ "text_level": 1,
327
+ "bbox": [
328
+ 176,
329
+ 834,
330
+ 669,
331
+ 852
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "Single-shot network pruning was introduced by Lee et al. (2018), who used the term to refer both to the general problem setting and to their specific algorithm. To avoid ambiguity, we refer to the general problem of pruning before training as foresight pruning. For completeness, we first revisit the formulation of foresight pruning, and then point out issues of SNIP for motivating our method. ",
338
+ "bbox": [
339
+ 176,
340
+ 867,
341
+ 825,
342
+ 924
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "Require: Pruning ratio $p$ , training data $\\mathcal { D }$ , network $f$ with initial parameters $\\pmb { \\theta } _ { 0 }$ \n1: $\\mathcal { D } _ { b } = \\{ ( \\mathbf { x } _ { i } , \\mathbf { \\bar { y } } _ { i } ) \\} _ { i = 1 } ^ { b } \\sim \\mathcal { D }$ $\\triangleright$ Sample a collection of training examples \n2: Compute the Hessian-gradient product $\\mathbf { H } \\mathbf { g }$ (see Eqn. (8)) $\\triangleright$ See Algorithm 2 \n3: $\\mathbf { S } ( - \\bar { \\pmb { \\theta } } _ { 0 } ) = - \\pmb { \\theta } _ { 0 } \\odot \\mathbf { H } \\mathbf { g }$ $\\triangleright$ Compute the importance of each weight \n4: Compute $p _ { \\mathrm { t h } }$ percentile of $\\mathbf { S } ( - \\pmb \\theta _ { 0 } )$ as $\\tau$ \n5: $\\mathbf { m } = \\mathbf { S } ( - \\pmb { \\theta } _ { 0 } ) < \\tau$ $\\triangleright$ Remove the weights with smallest importance \n6: Train the network $f _ { \\mathrm { m } \\odot \\theta }$ on $\\mathcal { D }$ until convergence. ",
349
+ "bbox": [
350
+ 176,
351
+ 122,
352
+ 825,
353
+ 223
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "Problem Formulation. Suppose we have a neural network $f$ parameterized by $\\pmb \\theta \\in \\mathbb R ^ { d }$ , and our objective is to minimize the empirical risk $\\begin{array} { r } { \\mathcal { L } ( \\pmb { \\theta } ) = \\frac { 1 } { N } \\sum _ { i } \\big [ \\bar { \\ell } ( \\hat { f } ( \\mathbf { x } _ { i } ; \\pmb { \\theta } ) , y _ { i } ) \\big ] } \\end{array}$ given a training set $\\mathcal { D } = \\{ ( \\mathbf { x } _ { i } , y _ { i } ) \\} _ { i = 1 } ^ { N }$ . Then, the foresight pruning problem can be formulated as: ",
360
+ "bbox": [
361
+ 173,
362
+ 250,
363
+ 825,
364
+ 295
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/a33452c46558a0009089bb150deb5aa72e4ec37e97e58371a31ffa91205a5533.jpg",
371
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { m } \\in \\{ 0 , 1 \\} ^ { d } } \\mathbb { E } _ { ( \\mathbf { x } , y ) \\sim \\mathcal { D } } \\left[ \\ell \\left( f \\left( \\mathbf { x } ; \\mathcal { A } ( \\mathbf { m } , \\pmb { \\theta } _ { 0 } ) \\right) , y \\right) \\right] \\quad \\mathrm { s . t . } \\ \\| \\mathbf { m } \\| _ { 0 } / d = 1 - p\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 269,
375
+ 299,
376
+ 720,
377
+ 325
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "where $\\left\\lceil p \\cdot d \\right\\rceil$ is the number of weights to be removed, and $\\mathcal { A }$ is a known training algorithm (e.g. SGD), which takes the mask $\\mathbf { m }$ (here we marginalize out the initial weights $\\pmb { \\theta } _ { 0 }$ for simplicity), and returns the trained weights. Since globally minimizing Eqn. 4 is intractable, we are instead interested in heuristics that result in good practical performance. ",
384
+ "bbox": [
385
+ 174,
386
+ 330,
387
+ 825,
388
+ 388
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Revisiting SNIP. SNIP (Lee et al., 2018) was the first algorithm proposed for foresight pruning, and it leverages the notion of connection sensitivity to remove unimportant connections. They define this in terms of how removing a single weight $\\theta _ { q }$ in isolation will affect the loss: ",
395
+ "bbox": [
396
+ 173,
397
+ 401,
398
+ 823,
399
+ 445
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "equation",
405
+ "img_path": "images/a8608f145a30b78739c6caba0e8939a902107a680e8d242eae0c40b9d5da7228.jpg",
406
+ "text": "$$\nS ( \\theta _ { q } ) = \\operatorname* { l i m } _ { \\epsilon \\to 0 } \\left| { \\frac { { \\mathcal { L } } ( \\theta _ { 0 } ) - { \\mathcal { L } } ( \\theta _ { 0 } + \\epsilon \\delta _ { q } ) } { \\epsilon } } \\right| = \\left| \\theta _ { q } { \\frac { \\partial { \\mathcal { L } } } { \\partial \\theta _ { q } } } \\right|\n$$",
407
+ "text_format": "latex",
408
+ "bbox": [
409
+ 334,
410
+ 450,
411
+ 663,
412
+ 486
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "where $\\theta _ { q }$ is the $q _ { t h }$ element of $\\pmb { \\theta } _ { 0 }$ , and $\\delta _ { q }$ is a one-hot vector whose $q _ { t h }$ element equals $\\theta _ { q }$ . Essentially, SNIP aims to preserve the loss of the original randomly initialized network. ",
419
+ "bbox": [
420
+ 173,
421
+ 489,
422
+ 823,
423
+ 518
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Preserving the loss value motivated several classic methods for pruning a trained network, such as optimal brain damage (LeCun et al., 1990) and optimal brain surgery (Hassibi et al., 1993). While the motivation for loss preservation of a trained network is clear, it is less clear why this is a good criterion for foresight pruning. After all, at initialization, the loss is no better than chance. We argue that at the beginning of training, it is more important to preserve the training dynamics than the loss itself. SNIP does not do this automatically, because even if removing a particular connection doesn’t affect the loss, it could still block the flow of information through the network. For instance, we noticed in our experiments that SNIP with a high pruning ratio (e.g. $9 9 \\%$ ) tends to eliminate nearly all the weights in a particular layer, creating a bottleneck in the network. Therefore, we would prefer a pruning criterion which accounts for how the presence or absence of one connection influences the training of the rest of the network. ",
430
+ "bbox": [
431
+ 173,
432
+ 523,
433
+ 826,
434
+ 678
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "4 GRADIENT SIGNAL PRESERVATION ",
441
+ "text_level": 1,
442
+ "bbox": [
443
+ 174,
444
+ 696,
445
+ 498,
446
+ 713
447
+ ],
448
+ "page_idx": 3
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "We now introduce and motivate our foresight pruning criterion, Gradient Signal Preservation (GraSP). To understand the problem we are trying to address, observe that the network after pruning will have fewer parameters and sparse connectivity, hindering the flow of gradients through the network and potentially slowing the optimization. This is reflected in Figure 2, which shows the reduction in gradient norm for random pruning with various pruning ratios. Moreover, the performance of the pruned networks is correspondingly worse (see Table 1). ",
453
+ "bbox": [
454
+ 173,
455
+ 728,
456
+ 825,
457
+ 814
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "Mathematically, a larger gradient norm indicates that, to the first order, each gradient update achieves a greater loss reduction, as characterized by the following directional derivative: ",
464
+ "bbox": [
465
+ 171,
466
+ 819,
467
+ 823,
468
+ 848
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "equation",
474
+ "img_path": "images/faa00864228833ba3d55381ce6915b477586ff5ff5d5c900b6b1692736058999.jpg",
475
+ "text": "$$\n\\Delta \\mathcal { L } ( \\pmb \\theta ) = \\operatorname* { l i m } _ { \\epsilon 0 } \\frac { \\mathcal { L } ( \\pmb \\theta + \\epsilon \\nabla \\mathcal { L } ( \\pmb \\theta ) ) - \\mathcal { L } ( \\pmb \\theta ) } { \\epsilon } = \\nabla \\mathcal { L } ( \\pmb \\theta ) ^ { \\top } \\nabla \\mathcal { L } ( \\pmb \\theta )\n$$",
476
+ "text_format": "latex",
477
+ "bbox": [
478
+ 300,
479
+ 852,
480
+ 697,
481
+ 883
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "We would like to preserve or even increase (if possible) the gradient flow after pruning (i.e., the gradient flow of the pruned network). Following LeCun et al. (1990), we cast the pruning operation ",
488
+ "bbox": [
489
+ 173,
490
+ 895,
491
+ 823,
492
+ 924
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "Algorithm 2 Hessian-gradient Product. ",
499
+ "text_level": 1,
500
+ "bbox": [
501
+ 174,
502
+ 103,
503
+ 433,
504
+ 117
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "table",
510
+ "img_path": "images/ccf9685d6e4dc449779a82c784272edf8a6df251885d766b27dbe003ce7004f5.jpg",
511
+ "table_caption": [],
512
+ "table_footnote": [],
513
+ "table_body": "<table><tr><td rowspan=\"2\">Require: A batch of training data Db,network f with initial parameters 0o,loss function L 1: L(0o)=E(x,y)~Db[e(f(x;00),y)]</td><td colspan=\"3\"></td></tr><tr><td>&gt; Compute the loss and build the computation graph</td><td></td><td></td></tr><tr><td>2: g= grad(L(00),00)</td><td></td><td>&gt; Compute the gradient of loss function with respect to 0o</td><td></td></tr><tr><td>3: Hg = grad(gTstop_grad(g),00) 4: Return Hg</td><td></td><td> Compute the Hessian vector product of Hg</td><td></td></tr></table>",
514
+ "bbox": [
515
+ 173,
516
+ 122,
517
+ 825,
518
+ 196
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "as adding a perturbation $\\pmb { \\delta }$ to the initial weights. We then use a Taylor approximation to characterize how removing one weight will affect the gradient flow after pruning: ",
525
+ "bbox": [
526
+ 173,
527
+ 222,
528
+ 823,
529
+ 251
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "equation",
535
+ "img_path": "images/ac1e3db306c896bd023d724190ce359812370a723056765e83560c2a108c7a32.jpg",
536
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { S } \\left( \\delta \\right) = \\Delta \\mathcal { L } ( \\pmb { \\theta } _ { 0 } + \\delta ) - \\underbrace { \\Delta \\mathcal { L } ( \\pmb { \\theta } _ { 0 } ) } _ { \\mathrm { C o n s t } } = 2 \\delta ^ { \\top } \\nabla ^ { 2 } \\mathcal { L } ( \\pmb { \\theta } _ { 0 } ) \\nabla \\mathcal { L } ( \\pmb { \\theta } _ { 0 } ) + \\mathcal { O } ( \\Vert \\delta \\Vert _ { 2 } ^ { 2 } ) } \\\\ & { \\quad \\quad = 2 \\delta ^ { \\top } \\mathbf { H } \\mathbf { g } + \\mathcal { O } ( \\Vert \\delta \\Vert _ { 2 } ^ { 2 } ) , } \\end{array}\n$$",
537
+ "text_format": "latex",
538
+ "bbox": [
539
+ 266,
540
+ 253,
541
+ 732,
542
+ 314
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "where $\\mathbf { S } ( \\delta )$ approximately measures the change to (6). The Hessian matrix $\\mathbf { H }$ captures the dependencies between different weights, and thus helps predict the effect of removing multiple weights. When $\\mathbf { H }$ is approximated as the identity matrix, the above criterion recovers SNIP up to the absolute value (recall the SNIP criterion is $| \\delta ^ { \\top } \\mathbf { g } | )$ ). However, it has been observed that different weights are highly coupled (Hassibi et al., 1993), indicating that $\\mathbf { H }$ is in fact far from the identity. ",
549
+ "bbox": [
550
+ 174,
551
+ 316,
552
+ 826,
553
+ 388
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "GraSP uses eqn. (7) as the measure of the importance of each weight. Specifically, if $S ( \\delta )$ is negative, then removing the corresponding weights will reduce the gradient flow, while if it is positive, it will increase the gradient flow. We prefer to first remove those weights whose removal will not reduce the gradient flow. For each weight, the importance can be computed in the following way (by an abuse of notation, we use bold S to denote vectorized importance): ",
560
+ "bbox": [
561
+ 173,
562
+ 393,
563
+ 825,
564
+ 464
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "equation",
570
+ "img_path": "images/34b29f00d3eec9e723caff721d35dbe4e13d97a480eb6d7c93e4e1bc4fe6394d.jpg",
571
+ "text": "$$\n\\mathbf { S } ( - \\pmb { \\theta } ) = - \\pmb { \\theta } \\odot \\mathbf { H } \\mathbf { g }\n$$",
572
+ "text_format": "latex",
573
+ "bbox": [
574
+ 429,
575
+ 468,
576
+ 568,
577
+ 486
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "For a given pruning ratio $p$ , we obtain the resulting pruning mask by computing the importance score of every weight, and removing the bottom $p$ fraction of the weights (see Algorithm 1). Hence, GraSP takes the gradient flow into account for pruning. GraSP is efficient and easy to implement; the Hessian-gradient product can be computed without explicitly constructing the Hessian using higher-order automatic differentiation (Pearlmutter, 1994; Schraudolph, 2002). ",
584
+ "bbox": [
585
+ 173,
586
+ 489,
587
+ 825,
588
+ 559
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "4.1 UNDERSTANDING GRASP THROUGH LINEARIZED TRAINING DYNAMICS ",
595
+ "text_level": 1,
596
+ "bbox": [
597
+ 174,
598
+ 575,
599
+ 715,
600
+ 590
601
+ ],
602
+ "page_idx": 4
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "The above discussion concerns only the training dynamics at initialization time. To understand the longer-term dynamics, we leverage the recently proposed Neural Tangent Kernel (NTK), which has been shown to be able to capture the training dynamics throughout training for practical networks (Lee et al., 2019a). Specifically, as we introduced in section 2.3, eqn. (3) characterizes how the training error changes throughout the training process, which only depends on time step $t$ , training targets $\\mathcal { V }$ and the NTK $\\Theta$ . Since the NTK stays almost constant for wide but practical networks (Lee et al., 2019a), e.g., wide ResNet (Zagoruyko & Komodakis, 2016), eqn. 3 is fairly accurate in those settings. This shows that NTK captures the training dynamics throughout the training process. Now we decompose eqn. (6) in the following form: ",
607
+ "bbox": [
608
+ 173,
609
+ 601,
610
+ 825,
611
+ 727
612
+ ],
613
+ "page_idx": 4
614
+ },
615
+ {
616
+ "type": "equation",
617
+ "img_path": "images/529ae53d5fa4952a6359c6af672926e7aa6ab70552d9a4c4adc48902516fd409.jpg",
618
+ "text": "$$\n\\nabla \\mathcal { L } ( \\pmb { \\theta } ) ^ { \\top } \\nabla \\mathcal { L } ( \\pmb { \\theta } ) = \\nabla _ { \\mathcal { Z } } \\mathcal { L } ^ { \\top } \\Theta ( \\mathcal { X } , \\mathcal { X } ) \\nabla _ { \\mathcal { Z } } \\mathcal { L } = ( \\mathbf { U } ^ { \\top } \\nabla _ { \\mathcal { Z } } \\mathcal { L } ) ^ { \\top } \\mathbf { A } ( \\mathbf { U } ^ { \\top } \\nabla _ { \\mathcal { Z } } \\mathcal { L } ) = \\sum _ { i = 1 } ^ { n } \\lambda _ { i } ( \\mathbf { u } _ { i } ^ { \\top } \\mathcal { Y } ) ^ { 2 }\n$$",
619
+ "text_format": "latex",
620
+ "bbox": [
621
+ 194,
622
+ 729,
623
+ 782,
624
+ 771
625
+ ],
626
+ "page_idx": 4
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "By relating it to eqn. (3), we can see that GraSP implicitly encourages $\\Theta$ to be large in the directions corresponding to output space gradients. Since larger eigenvalue directions of $\\Theta$ train faster according to eqn. (3), this suggests that GraSP should result in efficient training. In practice, the increasing of gradient norm might be achieved by increasing the loss. Therefore, we incorporate a temperature term on the logits to smooth the prediction, and so as to reduce the effect introduced by the loss. ",
631
+ "bbox": [
632
+ 173,
633
+ 775,
634
+ 825,
635
+ 844
636
+ ],
637
+ "page_idx": 4
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "5 EXPERIMENTS ",
642
+ "text_level": 1,
643
+ "bbox": [
644
+ 176,
645
+ 864,
646
+ 326,
647
+ 880
648
+ ],
649
+ "page_idx": 4
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "In this section, we conduct various experiments to validate the effectiveness of our proposed singleshot pruning algorithm in terms of the test accuracy vs. pruning ratios by comparing against ",
654
+ "bbox": [
655
+ 173,
656
+ 895,
657
+ 825,
658
+ 924
659
+ ],
660
+ "page_idx": 4
661
+ },
662
+ {
663
+ "type": "table",
664
+ "img_path": "images/7b91bfa065ed7474a9823945aa668f05d927901fb4c6ae4ef58d0026536a35b6.jpg",
665
+ "table_caption": [
666
+ "Table 1: Comparisons with Random Pruning with VGG19 and ResNet32 on CIFAR-10/100. "
667
+ ],
668
+ "table_footnote": [],
669
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"4\">CIFAR-10</td><td colspan=\"4\">CIFAR-100</td></tr><tr><td>Pruning ratio</td><td>95%</td><td>98%</td><td>99%</td><td>99.5%</td><td>95%</td><td>98%</td><td>99%</td><td>99.5%</td></tr><tr><td>Random Pruning (VGG19) GraSP (VGG19)</td><td>89.47(0.5) 93.04(0.2)</td><td>86.71(0.7) 92.19(0.1)</td><td>82.21(0.5) 91.33(0.1)</td><td>72.89(1.6) 88.61(0.7)</td><td>66.36(0.3) 71.23(0.1)</td><td>61.33(0.1) 68.90(0.5)</td><td>55.18(0.6) 66.15(0.2)</td><td>36.88(6.8) 60.21(0.1)</td></tr><tr><td>Random Pruning (ResNet32) GraSP (ResNet32)</td><td>89.75(0.1) 91.39(0.3)</td><td>85.90(0.4) 88.81(0.1)</td><td>71.78(9.9) 85.43(0.5)</td><td>50.08(7.0) 80.50(0.3)</td><td>64.72(0.2) 66.50(0.1)</td><td>50.92(0.9) 58.43(0.4)</td><td>34.62(2.8) 48.73(0.3)</td><td>18.51(0.43) 35.55(2.4)</td></tr></table>",
670
+ "bbox": [
671
+ 181,
672
+ 119,
673
+ 818,
674
+ 198
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "table",
680
+ "img_path": "images/dcd582d6f03b1bc9b5c7080fcdf83ca53be47f81fa02c66546d001f65c163ea0.jpg",
681
+ "table_caption": [
682
+ "Table 2: Test accuracy of pruned VGG19 and ResNet32 on CIFAR-10 and CIFAR-100 datasets. The bold number is the higher one between the accuracy of GraSP and that of SNIP. "
683
+ ],
684
+ "table_footnote": [],
685
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"3\">CIFAR-10</td><td colspan=\"3\">CIFAR-100</td></tr><tr><td>Pruning ratio</td><td>90%</td><td>95%</td><td>98%</td><td>90%</td><td>95%</td><td>98%</td></tr><tr><td>VGG19 (Baseline)</td><td>94.23</td><td>-</td><td>-</td><td>74.16</td><td>=</td><td>-</td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>93.74</td><td>93.58</td><td>93.49</td><td>73.83</td><td>71.98</td><td>67.79</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun,2019)</td><td>93.83</td><td>93.69</td><td>93.49</td><td>73.79</td><td>73.07</td><td>71.69</td></tr><tr><td>LT(original initialization)</td><td>93.51</td><td>92.92</td><td>92.34</td><td>72.78</td><td>71.44</td><td>68.95</td></tr><tr><td>LT (reset to epoch 5)</td><td>93.82</td><td>93.61</td><td>93.09</td><td>74.06</td><td>72.87</td><td>70.55</td></tr><tr><td>DSR (Mostafa &amp; Wang,2019)</td><td>93.75</td><td>93.86</td><td>93.13</td><td>72.31</td><td>71.98</td><td>70.70</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>92.46</td><td>91.73</td><td>89.18</td><td>72.36</td><td>69.81</td><td>65.94</td></tr><tr><td>Deep-R (Bellec et al., 2018)</td><td>90.81</td><td>89.59</td><td>86.77</td><td>66.83</td><td>63.46</td><td>59.58</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>93.63±0.06</td><td>93.43±0.20</td><td>92.05±0.28</td><td>72.84±0.22</td><td>71.83±0.23</td><td>58.46±1.10</td></tr><tr><td>GraSP</td><td>93.30±0.14</td><td>93.04±0.18</td><td>92.19±0.12</td><td>71.95±0.18</td><td>71.23±0.12</td><td>68.90±0.47</td></tr><tr><td>ResNet32 (Baseline)</td><td>94.80</td><td></td><td>=</td><td>74.64</td><td>=</td><td></td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>94.17</td><td>93.29</td><td>90.31</td><td>71.96</td><td>68.73</td><td>60.65</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun,2019)</td><td>94.21</td><td>93.02</td><td>89.65</td><td>72.34</td><td>67.58</td><td>59.02</td></tr><tr><td>LT(original initialization)</td><td>92.31</td><td>91.06</td><td>88.78</td><td>68.99</td><td>65.02</td><td>57.37</td></tr><tr><td>LT (reset to epoch 5)</td><td>93.97</td><td>92.46</td><td>89.18</td><td>71.43</td><td>67.28</td><td>58.95</td></tr><tr><td>DSR (Mostafa &amp; Wang,2019)</td><td>92.97</td><td>91.61</td><td>88.46</td><td>69.63</td><td>68.20</td><td>61.24</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>92.30</td><td>90.76</td><td>88.29</td><td>69.66</td><td>67.41</td><td>62.25</td></tr><tr><td>Deep-R (Bellec et al.,2018)</td><td>91.62</td><td>89.84</td><td>86.45</td><td>66.78</td><td>63.90</td><td>58.47</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>92.59±0.10</td><td>91.01±0.21</td><td>87.51±0.31</td><td>68.89±0.45</td><td>65.22±0.69</td><td></td></tr><tr><td>GraSP</td><td>92.38±0.21</td><td>91.39±0.25</td><td>88.81±0.14</td><td>69.24±0.24</td><td>66.50±0.11</td><td>54.81±1.43 58.43±0.43</td></tr></table>",
686
+ "bbox": [
687
+ 181,
688
+ 234,
689
+ 816,
690
+ 513
691
+ ],
692
+ "page_idx": 5
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "SNIP. We also include three Dynamic Sparse Training methods, DSR (Mostafa & Wang, 2019), SET (Mocanu et al., 2018) and Deep-R (Bellec et al., 2018). We further include two traditional pruning algorithms (LeCun et al., 1990; Zeng & Urtasun, 2019), which operate on the pre-trained networks, for serving as an upper bound for foresight pruning. Besides, we study the convergence performance of the sub-networks obtained by different pruning methods for investigating the relationship between gradient norm and final performance. Lastly, we study the role of initialization and batch sizes in terms of the performance of GraSP for ablation study. ",
697
+ "bbox": [
698
+ 174,
699
+ 537,
700
+ 825,
701
+ 635
702
+ ],
703
+ "page_idx": 5
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "5.1 PRUNING RESULTS ON MODERN CONVNETS ",
708
+ "text_level": 1,
709
+ "bbox": [
710
+ 179,
711
+ 655,
712
+ 522,
713
+ 669
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "To evaluate the effectiveness of GraSP on real world tasks, we test GraSP on four image classification datasets, CIFAR-10/100, Tiny-ImageNet and ImageNet, with two modern network architectures, VGGNet and ResNet1. For the experiments on CIFAR-10/100 and Tiny-ImageNet, we use a minibatch with ten times of the number of classes for both GraSP and $\\mathrm { S N I P } ^ { 2 }$ according to Lee et al. (2018). The pruned network is trained with Kaiming initialization (He et al., 2015) using SGD for 160 epochs for CIFAR-10/100, and 300 epochs for Tiny-ImageNet, with an initial learning rate of 0.1 and batch size 128. The learning rate is decayed by a factor of 0.1 at $1 / 2$ and $3 / 4$ of the total number of epochs. Moreover, we run each experiment for 3 trials for obtaining more stable results. For ImageNet, we adopt the Pytorch (Paszke et al., 2017) official implementation, but we used more epochs for training according to Liu et al. (2019). Specifically, we train the pruned networks with SGD for 150 epochs, and decay the learning rate by a factor of 0.1 every 50 epochs. ",
720
+ "bbox": [
721
+ 173,
722
+ 681,
723
+ 825,
724
+ 834
725
+ ],
726
+ "page_idx": 5
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "We first compre GraSP against random pruning, which generates the mask randomly for a given pruning ratio. The test accuracy is reported in Table 1. We can observe GraSP clearly outperforms random pruning, and the performance gap can be up to more than $3 0 \\%$ in terms of test accuracy. We further compare GraSP with more competitive baselines on CIFAR-10/100 and Tiny-ImageNet for pruning ratios $\\{ 8 5 \\% , 9 0 \\% , 9 5 \\% , 9 8 \\% \\}$ , and the results can be referred in Table 2 and 4. When the pruning ratio is low, i.e. $8 5 \\%$ , $9 0 \\%$ , both SNIP and GraSP can achieve very close results to the baselines, though still do not outperform pruning algorithms that operate on trained networks, as expected. However, GraSP achieves significant better results for higher pruning ratios with more complicated networks (e.g. ResNet) and datasets (e.g. CIFAR-100 and Tiny-ImageNet), showing the advantages of directly relating the pruning criteria with the gradient flow after pruning. Moreover, in most cases, we notice that either SNIP or GraSP can match or even slightly outperform LT with original initialization, which indicates that both methods can identify meaningful structures. We further experiment with the late resetting as suggested in Frankle et al. (2019) by resetting the weights of the winning tickets to their values at 5 epoch. By doing so, we observe a boost in the performance of the LT across all the settings, which is consistent with (Frankle et al., 2019). As for the comparisons with Dynamic Sparse Training (DST) methods, DSR is the best performing one, and also we can observe that GraSP is still quite competitive to them even though without the flexibility to change the sparsity during training. In particular, GraSP can outperform Deep-R in almost all the settings, and surpasses SET in more than half of the settings. ",
731
+ "bbox": [
732
+ 174,
733
+ 842,
734
+ 821,
735
+ 869
736
+ ],
737
+ "page_idx": 5
738
+ },
739
+ {
740
+ "type": "table",
741
+ "img_path": "images/5f91d493499f42e3b113a1fd1b43fdc60d7e1688b07372c23acccea9a6c3def4.jpg",
742
+ "table_caption": [
743
+ "Table 4: Test accuracy of pruned VGG19 and ResNet32 on Tiny-ImageNet dataset. The bold number is the higher one between the accuracy of GraSP and that of SNIP. "
744
+ ],
745
+ "table_footnote": [],
746
+ "table_body": "<table><tr><td>Network</td><td colspan=\"3\">VGG19</td><td colspan=\"3\">ResNet32</td></tr><tr><td>Pruning ratio</td><td>90%</td><td>95%</td><td>98%</td><td>85%</td><td>90%</td><td>95%</td></tr><tr><td>VGG19/ResNet32 (Baseline)</td><td>61.38</td><td>■</td><td>=</td><td>62.89</td><td>1</td><td>-</td></tr><tr><td>OBD (LeCun et al., 1990)</td><td>61.21</td><td>60.49</td><td>54.98</td><td>58.55</td><td>56.80</td><td>51.00</td></tr><tr><td>MLPrune (Zeng &amp; Urtasun, 2019)</td><td>60.23</td><td>59.23</td><td>55.55</td><td>58.86</td><td>57.62</td><td>51.70</td></tr><tr><td>LT(original initialization)</td><td>60.32</td><td>59.48</td><td>55.12</td><td>56.52</td><td>54.27</td><td>49.47</td></tr><tr><td>LT (reset to epoch 5)</td><td>61.19</td><td>60.57</td><td>56.18</td><td>60.31</td><td>57.77</td><td>51.21</td></tr><tr><td>DSR (Mostafa&amp; Wang,2019)</td><td>62.43</td><td>59.81</td><td>58.36</td><td>57.08</td><td>57.19</td><td>56.08</td></tr><tr><td>SET Mocanu et al. (2018)</td><td>62.49</td><td>59.42</td><td>56.22</td><td>57.02</td><td>56.92</td><td>56.18</td></tr><tr><td>Deep-R (Bellec et al., 2018)</td><td>55.64</td><td>52.93</td><td>49.32</td><td>53.29</td><td>52.62</td><td>52.00</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>61.02±0.41</td><td>59.27±0.39</td><td>48.95±1.73</td><td>56.33±0.24</td><td>55.43±0.14</td><td>49.57±0.44</td></tr><tr><td>GraSP</td><td>60.76±0.23</td><td>59.50±0.33</td><td>57.28±0.34</td><td>57.25±0.11</td><td>55.53±0.11</td><td>51.34±0.29</td></tr></table>",
747
+ "bbox": [
748
+ 181,
749
+ 117,
750
+ 816,
751
+ 275
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "",
758
+ "bbox": [
759
+ 174,
760
+ 314,
761
+ 825,
762
+ 550
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "table",
768
+ "img_path": "images/57e0cbc611a0d9934b489b2685c9f12af77e512da0861622ff83f8804f2aaa70.jpg",
769
+ "table_caption": [
770
+ "Table 3: Test accuracy of ResNet-50 and VGG16 on ImageNet with pruning ratios $60 \\%$ , $80 \\%$ and $90 \\%$ . "
771
+ ],
772
+ "table_footnote": [],
773
+ "table_body": "<table><tr><td>Pruning ratios</td><td colspan=\"2\">60%</td><td colspan=\"2\">80%</td><td colspan=\"2\">90%</td></tr><tr><td>Accuracy</td><td>top-1</td><td>top-5</td><td>top-1</td><td>top5</td><td>top-1</td><td>top5</td></tr><tr><td>ResNet-50 (Baseline)</td><td>75.70</td><td>92.81</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>73.95</td><td>91.97</td><td>69.67</td><td>89.24</td><td>61.97</td><td>82.90</td></tr><tr><td>GraSP</td><td>74.02</td><td>91.86</td><td>72.06</td><td>90.82</td><td>68.14</td><td>88.67</td></tr><tr><td>VGG16 (Baseline)</td><td>73.37</td><td>91.47</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>SNIP (Lee et al., 2018)</td><td>72.95</td><td>91.39</td><td>69.96</td><td>89.71</td><td>65.27</td><td>86.14</td></tr><tr><td>GraSP</td><td>72.91</td><td>91.18</td><td>71.65</td><td>90.58</td><td>69.94</td><td>89.48</td></tr></table>",
774
+ "bbox": [
775
+ 179,
776
+ 594,
777
+ 526,
778
+ 691
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "However, the above three datasets are overly simple and small-scale to draw robust conclusions, and thus we conduct further experiments on ImageNet using ResNet-50 and VGG16 with pruning ratios $\\{ 6 0 \\% , 8 0 \\% , 9 0 \\% \\}$ to validate the effectiveness of GraSP. The results are shown in Table 3, we can see that when the pruning ratio is $6 0 \\%$ , both SNIP and GraSP can achieve very close performance to the original one, and these two methods perform ",
785
+ "bbox": [
786
+ 547,
787
+ 558,
788
+ 825,
789
+ 709
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "almost the same. However, as we increase the pruning ratio, we observe that GraSP surpasses SNIP more and more. When the pruning ratio is $9 0 \\%$ , GraSP can beat SNIP by $6 . 2 \\%$ for ResNet-50 and $4 . 7 \\%$ for VGG16 in top-1 accuracy, showing the advantages of GraSP at larger pruning ratios. We seek to investigate the reasons behind in Section 5.2 for obtaining a better understanding on GraSP. ",
796
+ "bbox": [
797
+ 174,
798
+ 710,
799
+ 825,
800
+ 765
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "5.2 ANALYSIS ON CONVERGENCE PERFORMANCE AND GRADIENT NORM ",
807
+ "text_level": 1,
808
+ "bbox": [
809
+ 176,
810
+ 795,
811
+ 694,
812
+ 809
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "Based on our analysis in Section 4.1 and the observations in the previous subsection, we conduct further experiments on CIFAR-100 with ResNet32 to investigate where the performance gains come from in the high sparsity regions. We present the training statistics in terms of the training and test loss in Figure 1. We observe that the main bottleneck of pruned neural networks is underfitting, and thus support our optimization considerations when deriving the pruning criteria. As a result, the network pruned with GraSP can achieve much lower loss for both training and testing and the decrease in training loss is also much faster than SNIP. ",
819
+ "bbox": [
820
+ 174,
821
+ 825,
822
+ 825,
823
+ 922
824
+ ],
825
+ "page_idx": 6
826
+ },
827
+ {
828
+ "type": "image",
829
+ "img_path": "images/b7542313403f9708c12c64d27ce2e96a4be8323c3f63ce09dac0d333d16614d0.jpg",
830
+ "image_caption": [
831
+ "Figure 1: The training and testing loss on CIFAR-100 of SNIP and GraSP with ResNet32 and a pruning ratio of $9 8 \\%$ . ",
832
+ "Bengio, 2010), as well as different mini-batch sizes. We present the mean and standard variance "
833
+ ],
834
+ "image_footnote": [],
835
+ "bbox": [
836
+ 176,
837
+ 98,
838
+ 490,
839
+ 204
840
+ ],
841
+ "page_idx": 7
842
+ },
843
+ {
844
+ "type": "image",
845
+ "img_path": "images/ef89a263c3550772962c5d52a621f11826fd9abf219e05253199ccc470652f43.jpg",
846
+ "image_caption": [
847
+ "Figure 2: The gradient norm of ResNet32 after pruning on CIFAR-100 of various pruning ratios. Shaded area is the $9 5 \\%$ confidence interval calculated with 10 trials. "
848
+ ],
849
+ "image_footnote": [],
850
+ "bbox": [
851
+ 506,
852
+ 101,
853
+ 815,
854
+ 200
855
+ ],
856
+ "page_idx": 7
857
+ },
858
+ {
859
+ "type": "image",
860
+ "img_path": "images/4d380df33762432a87531311a5f63dbd58fb19496d10387a98bfbbcefcc1173c.jpg",
861
+ "image_caption": [
862
+ "Figure 3: The portion of remaining weights at each layer after pruning with a pruning ratio of $9 5 \\%$ . "
863
+ ],
864
+ "image_footnote": [],
865
+ "bbox": [
866
+ 179,
867
+ 268,
868
+ 818,
869
+ 388
870
+ ],
871
+ "page_idx": 7
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Besides, we also plot the gradient norm of pruned networks at initialization for a ResNet32 on CIFAR-100. The gradient norm is computed as the average of the gradients over the entire dataset, and we normalize the gradient of the original network to be 1. We run each experiment for 10 trials in order to obtain more stable results. We observe that both SNIP and GraSP result in a lower gradient norm at high sparsity (e.g. $9 8 \\%$ ), but GraSP can better preserve the gradient norm after pruning, and also yield better results than SNIP at the high sparsity regions. Moreover, in these high sparsity regions, the pruned network usually underfits the training data, and thus the optimization will be a problem. The randomly pruned network has a much lower gradient norm and performs the worst. In contrast, the network pruned by GraSP can start with a higher gradient norm and thus hopefully more training progress can be made as evidenced by our results in Figure 1. ",
876
+ "bbox": [
877
+ 173,
878
+ 444,
879
+ 826,
880
+ 584
881
+ ],
882
+ "page_idx": 7
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "5.3 VISUALIZING THE NETWORK AFTER PRUNING ",
887
+ "text_level": 1,
888
+ "bbox": [
889
+ 174,
890
+ 602,
891
+ 535,
892
+ 616
893
+ ],
894
+ "page_idx": 7
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "In order to probe the difference of the network pruned by SNIP and GraSP, we present the portion of the remaining weights at each layer of the sparse network obtained by SNIP and GraSP in Figure. 3. We observe that these two pruning methods result in different pruning strategies. Specifically, GraSP aims for preserving the gradient flow after pruning, and thus will not prune too aggressively for each layer. Moreover, it has been known that those convolutional layers at the top usually learn highly sparse features and thus more weights can be pruned (Zhang et al., 2019a). As a result, both methods prune most of the weights at the top layers, but GraSP will preserve more weights than SNIP due to the consideration of preserving the gradient flow. In contrast, SNIP is more likely to prune nearly all the weights in top layers, and thus those layers will be the bottleneck of blocking the information flow from the output layer to the input layer. ",
899
+ "bbox": [
900
+ 173,
901
+ 628,
902
+ 825,
903
+ 767
904
+ ],
905
+ "page_idx": 7
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "5.4 EFFECT OF BATCH SIZE AND INITIALIZATION ",
910
+ "text_level": 1,
911
+ "bbox": [
912
+ 174,
913
+ 786,
914
+ 529,
915
+ 800
916
+ ],
917
+ "page_idx": 7
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "We also study how the batch size and initialization will affect GraSP on CIFAR-10 and CIFAR100 with ResNet32 for showing the robustness to different hyperparameters. Specifically, we test GraSP with three different initialization methods: Kaiming normal (He et al., 2015), Normal $\\mathcal { N } ( 0 , 0 . 1 \\bar { ) }$ , and Xavier normal (Glorot & ",
922
+ "bbox": [
923
+ 174,
924
+ 813,
925
+ 485,
926
+ 910
927
+ ],
928
+ "page_idx": 7
929
+ },
930
+ {
931
+ "type": "table",
932
+ "img_path": "images/0471a6b803d713f6c9a14c6fce33fe7942dfa696f0ffa5902e95c128b8229071.jpg",
933
+ "table_caption": [
934
+ "Table 5: Mean and standard variance of the test accuracy on CIFAR-10 and CIFAR-100 with ResNet32. "
935
+ ],
936
+ "table_footnote": [],
937
+ "table_body": "<table><tr><td rowspan=\"2\">Dataset</td><td colspan=\"2\">CIFAR-10</td><td colspan=\"2\">CIFAR-100</td></tr><tr><td>60%</td><td>90%</td><td>60%</td><td>90%</td></tr><tr><td>Kaiming</td><td>93.42 ± 0.39</td><td>92.12 ± 0.39</td><td>71.60 ± 0.65</td><td>68.93 ± 0.36</td></tr><tr><td>Normal</td><td>93.31± 0.36</td><td>92.13 ± 0.36</td><td>71.48 ± 0.60</td><td>67.98 ± 0.83</td></tr><tr><td>Xavier</td><td>93.32 ± 0.25</td><td>92.22 ± 0.50</td><td>71.10 ± 1.27</td><td>68.11 ± 0.93</td></tr></table>",
938
+ "bbox": [
939
+ 501,
940
+ 851,
941
+ 818,
942
+ 905
943
+ ],
944
+ "page_idx": 7
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "of the test accuracy obtained with different initialization methods and by varying the batch sizes in Table 5. For CIFAR-10 and CIFAR-100, we use batch sizes $\\{ 1 0 0 , 4 0 0 , \\cdot \\cdot \\cdot , 2 5 6 0 0 , 5 0 0 0 0 \\}$ and $\\{ 1 0 0 0 , 4 0 0 0 , 1 6 0 0 0 , 3 2 0 0 0 , 5 0 0 0 0 \\}$ respectively. We observe that GraSP can achieve reasonable performance with different initialization methods, and also the effect of batch size is minimal for networks pruned with Kaiming initialization, which is one of the most commonly adopted initialization techniques in training neural networks. ",
949
+ "bbox": [
950
+ 174,
951
+ 103,
952
+ 825,
953
+ 186
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "6 DISCUSSION AND CONCLUSION ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 176,
963
+ 209,
964
+ 468,
965
+ 226
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "We propose Gradient Signal Preservation (GraSP), a pruning criterion motivated by preserving the gradient flow through the network after pruning. It can also be interpreted as aligning the large eigenvalues of the Neural Tangent Kernel with the targets. Empirically, GraSP is able to prune the weights of a network at initialization, while still performing competitively to traditional pruning algorithms, which requires first training the network. More broadly, foresight pruning can be a way for enabling training super large models that no existing GPUs can fit in, and also reduce the training cost by adopting sparse matrices operations. Readers may notice that there is still a performance gap between GraSP and traditional pruning algorithms, and also the LT with late resetting performs better than LT with original initialization. However, this does not negate the possibility that foresight pruning can match the performance of traditional pruning algorithms while still enjoying cheaper training cost. As evidence, Evci et al. (2019) show that there exists a linear and monotonically decreasing path from the sparse initialization to the solution found by pruning the fully-trained dense network, but current optimizers fail to achieve this. Therefore, designing better gradient-based optimizers that can exploit such paths will also be a good direction to explore. ",
972
+ "bbox": [
973
+ 174,
974
+ 242,
975
+ 825,
976
+ 436
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "REFERENCES ",
983
+ "text_level": 1,
984
+ "bbox": [
985
+ 176,
986
+ 459,
987
+ 285,
988
+ 474
989
+ ],
990
+ "page_idx": 8
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. In Proceedings of the 36th International Conference on Machine Learning, pp. 322–332, 2019. \nGuillaume Bellec, David Kappel, Wolfgang Maass, and Robert Legenstein. Deep rewiring: Training very sparse deep networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id ${ \\underline { { \\underline { { \\mathbf { \\Pi } } } } } } =$ BJ_wN01C-. \nJia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255, 2009. \nTim Dettmers and Luke Zettlemoyer. Sparse networks from scratch: Faster training without losing performance. arXiv preprint arXiv:1907.04840, 2019. \nSourya Dey, Kuan-Wen Huang, Peter A Beerel, and Keith M Chugg. Pre-defined sparse neural networks with hardware acceleration. IEEE Journal on Emerging and Selected Topics in Circuits and Systems, 2019. \nXin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. In Advances in Neural Information Processing Systems, pp. 4857–4867, 2017. \nUtku Evci, Fabian Pedregosa, Aidan Gomez, and Erich Elsen. The difficulty of training sparse neural networks. arXiv preprint arXiv:1906.10732, 2019. \nJonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id=rJl-b3RcF7. \nJonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. The lottery ticket hypothesis at scale. arXiv preprint arXiv:1903.01611, 2019. ",
995
+ "bbox": [
996
+ 171,
997
+ 478,
998
+ 826,
999
+ 930
1000
+ ],
1001
+ "page_idx": 8
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249–256, 2010. ",
1006
+ "bbox": [
1007
+ 176,
1008
+ 103,
1009
+ 823,
1010
+ 146
1011
+ ],
1012
+ "page_idx": 9
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. International Conference on Learning Representations, 2015a. ",
1017
+ "bbox": [
1018
+ 174,
1019
+ 156,
1020
+ 825,
1021
+ 199
1022
+ ],
1023
+ "page_idx": 9
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pp. 1135–1143, 2015b. ",
1028
+ "bbox": [
1029
+ 173,
1030
+ 209,
1031
+ 826,
1032
+ 251
1033
+ ],
1034
+ "page_idx": 9
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. In IEEE international conference on neural networks, pp. 293–299. IEEE, 1993. ",
1039
+ "bbox": [
1040
+ 174,
1041
+ 262,
1042
+ 823,
1043
+ 291
1044
+ ],
1045
+ "page_idx": 9
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "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 IEEE international conference on computer vision, pp. 1026–1034, 2015. ",
1050
+ "bbox": [
1051
+ 176,
1052
+ 301,
1053
+ 823,
1054
+ 344
1055
+ ],
1056
+ "page_idx": 9
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
1061
+ "bbox": [
1062
+ 174,
1063
+ 354,
1064
+ 825,
1065
+ 397
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in neural information processing systems, pp. 8571–8580, 2018. ",
1072
+ "bbox": [
1073
+ 174,
1074
+ 407,
1075
+ 826,
1076
+ 450
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009. ",
1083
+ "bbox": [
1084
+ 173,
1085
+ 460,
1086
+ 823,
1087
+ 489
1088
+ ],
1089
+ "page_idx": 9
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In Advances in neural information processing systems, pp. 598–605, 1990. ",
1094
+ "bbox": [
1095
+ 173,
1096
+ 500,
1097
+ 825,
1098
+ 530
1099
+ ],
1100
+ "page_idx": 9
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "Jaehoon Lee, Lechao Xiao, Samuel S Schoenholz, Yasaman Bahri, Jascha Sohl-Dickstein, and Jeffrey Pennington. Wide neural networks of any depth evolve as linear models under gradient descent. arXiv preprint arXiv:1902.06720, 2019a. ",
1105
+ "bbox": [
1106
+ 176,
1107
+ 540,
1108
+ 823,
1109
+ 582
1110
+ ],
1111
+ "page_idx": 9
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. International Conference on Learning Representations, 2018. ",
1116
+ "bbox": [
1117
+ 169,
1118
+ 592,
1119
+ 825,
1120
+ 622
1121
+ ],
1122
+ "page_idx": 9
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "Namhoon Lee, Thalaiyasingam Ajanthan, Stephen Gould, and Philip HS Torr. A signal propagation perspective for pruning neural networks at initialization. arXiv preprint arXiv:1906.06307, 2019b. ",
1127
+ "bbox": [
1128
+ 173,
1129
+ 631,
1130
+ 821,
1131
+ 661
1132
+ ],
1133
+ "page_idx": 9
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. International Conference on Learning Representations, 2016. ",
1138
+ "bbox": [
1139
+ 173,
1140
+ 670,
1141
+ 821,
1142
+ 700
1143
+ ],
1144
+ "page_idx": 9
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. International Conference on Learning Representations, 2019. ",
1149
+ "bbox": [
1150
+ 174,
1151
+ 710,
1152
+ 821,
1153
+ 739
1154
+ ],
1155
+ "page_idx": 9
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l_0 regularization. International Conference on Learning Representations, 2018. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 750,
1163
+ 823,
1164
+ 779
1165
+ ],
1166
+ "page_idx": 9
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu, and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science. Nature communications, 9(1):2383, 2018. ",
1171
+ "bbox": [
1172
+ 174,
1173
+ 789,
1174
+ 825,
1175
+ 832
1176
+ ],
1177
+ "page_idx": 9
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. International Conference on Learning Representations, 2016. ",
1182
+ "bbox": [
1183
+ 173,
1184
+ 842,
1185
+ 825,
1186
+ 885
1187
+ ],
1188
+ "page_idx": 9
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Hesham Mostafa and Xin Wang. Parameter efficient training of deep convolutional neural networks by dynamic sparse reparameterization. International Conference on Machine Learning, 2019. ",
1193
+ "bbox": [
1194
+ 173,
1195
+ 895,
1196
+ 823,
1197
+ 924
1198
+ ],
1199
+ "page_idx": 9
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "Behnam Neyshabur, Zhiyuan Li, Srinadh Bhojanapalli, Yann LeCun, and Nathan Srebro. The role of over-parametrization in generalization of neural networks. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\\equiv$ BygfghAcYX. ",
1204
+ "bbox": [
1205
+ 176,
1206
+ 103,
1207
+ 823,
1208
+ 146
1209
+ ],
1210
+ "page_idx": 10
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. ",
1215
+ "bbox": [
1216
+ 174,
1217
+ 155,
1218
+ 823,
1219
+ 196
1220
+ ],
1221
+ "page_idx": 10
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "Barak A Pearlmutter. Fast exact multiplication by the Hessian. Neural computation, 6(1):147–160, 1994. ",
1226
+ "bbox": [
1227
+ 171,
1228
+ 207,
1229
+ 825,
1230
+ 234
1231
+ ],
1232
+ "page_idx": 10
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Ben Poole, Subhaneil Lahiri, Maithra Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances in neural information processing systems, pp. 3360–3368, 2016. ",
1237
+ "bbox": [
1238
+ 174,
1239
+ 244,
1240
+ 826,
1241
+ 287
1242
+ ],
1243
+ "page_idx": 10
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013. ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 295,
1251
+ 823,
1252
+ 325
1253
+ ],
1254
+ "page_idx": 10
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Nicol N Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural computation, 14(7):1723–1738, 2002. ",
1259
+ "bbox": [
1260
+ 174,
1261
+ 333,
1262
+ 823,
1263
+ 363
1264
+ ],
1265
+ "page_idx": 10
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. International Conference on Learning Representations, 2014. ",
1270
+ "bbox": [
1271
+ 173,
1272
+ 371,
1273
+ 821,
1274
+ 401
1275
+ ],
1276
+ "page_idx": 10
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Suraj Srinivas and R Venkatesh Babu. Generalized dropout. arXiv preprint arXiv:1611.06791, 2016. ",
1281
+ "bbox": [
1282
+ 171,
1283
+ 409,
1284
+ 823,
1285
+ 425
1286
+ ],
1287
+ "page_idx": 10
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Chaoqi Wang, Roger Grosse, Sanja Fidler, and Guodong Zhang. EigenDamage: Structured pruning in the Kronecker-factored eigenbasis. In Proceedings of the 36th International Conference on Machine Learning, volume 97, pp. 6566–6575. PMLR, 2019. URL http://proceedings. mlr.press/v97/wang19g.html. ",
1292
+ "bbox": [
1293
+ 174,
1294
+ 433,
1295
+ 826,
1296
+ 489
1297
+ ],
1298
+ "page_idx": 10
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Lechao Xiao, Yasaman Bahri, Jascha Sohl-Dickstein, Samuel Schoenholz, and Jeffrey Pennington. Dynamical isometry and a mean field theory of cnns: How to train 10,000-layer vanilla convolutional neural networks. In International Conference on Machine Learning, pp. 5393–5402, 2018. ",
1303
+ "bbox": [
1304
+ 173,
1305
+ 498,
1306
+ 826,
1307
+ 554
1308
+ ],
1309
+ "page_idx": 10
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Ge Yang and Samuel Schoenholz. Mean field residual networks: On the edge of chaos. In Advances in neural information processing systems, pp. 7103–7114, 2017. ",
1314
+ "bbox": [
1315
+ 173,
1316
+ 564,
1317
+ 823,
1318
+ 593
1319
+ ],
1320
+ "page_idx": 10
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016. ",
1325
+ "bbox": [
1326
+ 173,
1327
+ 602,
1328
+ 728,
1329
+ 617
1330
+ ],
1331
+ "page_idx": 10
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Wenyuan Zeng and Raquel Urtasun. MLPrune: Multi-layer pruning for automated neural network compression, 2019. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ r1g5b2RcKm. ",
1336
+ "bbox": [
1337
+ 174,
1338
+ 626,
1339
+ 825,
1340
+ 655
1341
+ ],
1342
+ "page_idx": 10
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. International Conference on Learning Representations, 2016. ",
1347
+ "bbox": [
1348
+ 174,
1349
+ 662,
1350
+ 825,
1351
+ 705
1352
+ ],
1353
+ "page_idx": 10
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "Chiyuan Zhang, Samy Bengio, and Yoram Singer. Are all layers created equal? arXiv preprint arXiv:1902.01996, 2019a. ",
1358
+ "bbox": [
1359
+ 173,
1360
+ 714,
1361
+ 825,
1362
+ 743
1363
+ ],
1364
+ "page_idx": 10
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "Guodong Zhang, James Martens, and Roger Grosse. Fast convergence of natural gradient descent for overparameterized neural networks. arXiv preprint arXiv:1905.10961, 2019b. ",
1369
+ "bbox": [
1370
+ 171,
1371
+ 752,
1372
+ 823,
1373
+ 781
1374
+ ],
1375
+ "page_idx": 10
1376
+ }
1377
+ ]
parse/train/SkgsACVKPH/SkgsACVKPH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkgsACVKPH/SkgsACVKPH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jB0Nlbwlybm/jB0Nlbwlybm.md ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification
2
+
3
+ Yongming Rao1 Wenliang Zhao1 Benlin Liu2,3 Jiwen $\mathbf { L u } ^ { 1 * }$ Jie Zhou1 Cho-Jui Hsieh2
4
+
5
+ 1 Tsinghua University 2 UCLA 3 University of Washington
6
+
7
+ # Abstract
8
+
9
+ Attention is sparse in vision transformers. We observe the final prediction in vision transformers is only based on a subset of most informative tokens, which is sufficient for accurate image recognition. Based on this observation, we propose a dynamic token sparsification framework to prune redundant tokens progressively and dynamically based on the input. Specifically, we devise a lightweight prediction module to estimate the importance score of each token given the current features. The module is added to different layers to prune redundant tokens hierarchically. To optimize the prediction module in an end-to-end manner, we propose an attention masking strategy to differentiably prune a token by blocking its interactions with other tokens. Benefiting from the nature of self-attention, the unstructured sparse tokens are still hardware friendly, which makes our framework easy to achieve actual speed-up. By hierarchically pruning $66 \%$ of the input tokens, our method greatly reduces $3 1 \% \sim 3 7 \%$ FLOPs and improves the throughput by over $40 \%$ while the drop of accuracy is within $0 . 5 \%$ for various vision transformers. Equipped with the dynamic token sparsification framework, DynamicViT models can achieve very competitive complexity/accuracy trade-offs compared to state-of-the-art CNNs and vision transformers on ImageNet. Code is available at https://github.com/ raoyongming/DynamicViT.
10
+
11
+ # 1 Introduction
12
+
13
+ These years have witnessed the great progress in computer vision brought by the evolution of CNNtype architectures [12, 18]. Some recent works start to replace CNN by using transformer for many vision tasks, like object detection [36, 20] and classification [25]. Just like what has been done to the CNN-type architectures in the past few years, it is also desirable to accelerate the transformer-like models to make them more suitable for real-time applications.
14
+
15
+ One common practice for the acceleration of CNN-type networks is to prune the filters that are of less importance. The way input is processed by the vision transformer and its variants, i.e. splitting the input image into multiple independent patches, provides us another orthogonal way to introduce the sparsity for the acceleration. That is, we can prune the tokens of less importance in the input instance, given the fact that many tokens contribute very little to the final prediction. This is only possible for the transformer-like models where the self-attention module can take the token sequence of variable length as input, and the unstructured pruned input will not affect the self-attention module, while dropping a certain part of the pixels can not really accelerate the convolution operation since the unstructured neighborhood used by convolution would make it difficult to accelerate through parallel computing. Since the hierarchical architecture of CNNs with structural downsampling has improved model efficiency in various vision tasks, we hope to explore the unstructured and data-dependent downsampling strategy for vision transformers to further leverage the advantages of self-attention (our experiments also show unstructured sparsification can lead to better performance for vision transformers compared to structural downsampling). The basic idea of our method is illustrated in Figure 1.
16
+
17
+ ![](images/d4271a07b0ae3b36791a37a66e78570f014f99e6cd4733f82c9e1ff2750057fc.jpg)
18
+ (c) Attention Visualization
19
+ Figure 1: Illustration of our main idea. CNN models usually leverage the structural downsampling strategy to build hierarchical architectures as shown in (a). unstructured and data-dependent downsampling method in (b) can better exploit the sparsity in the input data. Thanks to the nature of the self-attention operation, the unstructured token set is also easy to accelerate through parallel computing. (c) visualizes the impact of each spatial location on the final prediction in the DeiT-S model [25] using the visualization method proposed in [3]. These results demonstrate the final prediction in vision transformers is only based on a subset of most informative tokens, which suggests a large proportion of tokens can be removed without hurting the performance.
20
+
21
+ In this work, we propose to employ a lightweight prediction module to determine which tokens to be pruned in a dynamic way, dubbed as DynamicViT. In particular, for each input instance, the prediction module produces a customized binary decision mask to decide which tokens are uninformative and need to be abandoned. This module is added to multiple layers of the vision transformer, such that the sparsification can be performed in a hierarchical way as we gradually increase the amount of pruned tokens after each prediction module. Once a token is pruned after a certain layer, it will not be ever used in the feed-forward procedure. The additional computational overhead introduced by this lightweight module is quite small, especially considering the computational overhead saved by eliminating the uninformative tokens.
22
+
23
+ This prediction module can be optimized jointly in an end-to-end manner together with the vision transformer backbone. To this end, two specialized strategies are adopted. The first one is to adopt Gumbel-Softmax [15] to overcome the non-differentiable problem of sampling from a distribution so that it is possible to perform the end-to-end training. The second one is about how to apply this learned binary decision mask to prune the unnecessary tokens. Considering the number of zero elements in the binary decision mask is different for each instance, directly eliminating the uninformative tokens for each input instance during training will make parallel computing impossible. Moreover, this would also hinder the back-propagation for the prediction module, which needs to calculate the probability distribution of whether to keep the token even if it is finally eliminated. Besides, directly setting the abandoned tokens as zero vectors is also not a wise idea since zero vectors will still affect the calculation of the attention matrix. Therefore, we propose a strategy called attention masking where we drop the connection from abandoned tokens to all other tokens in the attention matrix based on the binary decision mask. By doing so, we can overcome the difficulties described above. We also modify the original training objective of the vision transformer by adding a term to constrain the proportion of pruned tokens after a certain layer. During the inference phase, we can directly abandon a fixed amount of tokens after certain layers for each input instance as we no longer need to consider whether the operation is differentiable, and this will greatly accelerate the inference.
24
+
25
+ We illustrate the effectiveness of our method on ImageNet using DeiT [25] and LV-ViT [16] as backbone. The experimental results demonstrate the competitive trade-off between speed and accuracy. In particular, by hierarchically pruning $66 \%$ of the input tokens, we can greatly reduce $31 \%$ $\sim 3 7 \%$ GFLOPs and improve the throughput by over $40 \%$ while the drop of accuracy is within $0 . 5 \%$ for all different vision transformers. Our DynamicViT demonstrates the possibility of exploiting the sparsity in space for the acceleration of transformer-like model. We expect our attempt to open a new path for future work on the acceleration of transformer-like models.
26
+
27
+ # 2 Related Work
28
+
29
+ Vision transformers. Transformer model is first widely studied in NLP community [26]. It proves the possibility to use self-attention to replace the recurrent neural networks and their variants. Recent progress has demonstrated the variants of transformers can also be a competitive alternative to CNNs and achieve promising results on different vision tasks including image classification [8, 25, 20, 35, 23], object detection [2], semantic segmentation [34, 5] and 3D analysis [31, 33]. DETR [2] is the first work to apply the transformer model to vision tasks. It formulates the object detection task as a set prediction problem and follows the encoder-decoder design in the transformer to generate a sequence of bounding boxes. ViT [8] is the first work to directly apply transformer architecture on non-overlapping image patches for the image classification task, and the whole framework contains no convolution operation. Compared to CNN-type models, ViT can achieve better performance with large-scale pre-training. It is really preferred if the architecture can achieve the state-of-the-art without any pre-training. DeiT [25] proposes many training techniques so that we can train the convolutionfree transformer only on ImageNet1K [7] and achieve better performance than ViT. LV-ViT [16] further improves the performance by introducing a new training objective called token labeling. Both ViT and its follow-ups split the input image into multiple independent image patches and transform these image patches into tokens for further process. This makes it feasible to incorporate the sparsity in space dimension for these transformer-like models.
30
+
31
+ Model acceleration. Model acceleration techniques are important for the deployment of deep models on edge devices. There are many techniques can be used to accelerate the inference speed of deep model, including quantization [9, 27], pruning [13, 22], low-rank factorization [30], knowledge distillation [14, 19] and so on. There are also many works aims at accelerating the inference speed of transformer models. For example, TinyBERT [17] proposes a distillation method to accelerate the inference of transformer. Star-Transformer [10] reduces quadratic space and time complexity to linear by replacing the fully connected structure with a star-shaped topology. However, all these works focus on NLP tasks, and few works explore the possibility of making use of the characteristic of vision tasks to accelerate vision transformer. Furthermore, the difference between the characteristics of Transformer and CNN also makes it possible to adopt another way for acceleration rather than the methods used for CNN acceleration like filter pruning [13], which removes non-critical or redundant neurons from a deep model. Our method aims at pruning the tokens of less importance instead of the neurons by exploiting the sparsity of informative image patches.
32
+
33
+ # 3 Dynamic Vision Transformers
34
+
35
+ # 3.1 Overview
36
+
37
+ The overall framework of our DynamicViT is illustrated in Figure 2. Our DynamicViT consists of a normal vision transformer as the backbone and several prediction modules. The backbone network can be implemented as a wide range of vision transformer (e.g., ViT [8], DeiT [25], LV-ViT [16]). The prediction modules are responsible for generating the probabilities of dropping/keeping the tokens. The token sparsification is performed hierarchically through the whole network at certain locations. For example, given a 12-layer transformer, we can conduct token sparsification before the 4th, 7th, and 10th blocks. During training, the prediction modules and the backbone network can be optimized in an end-to-end manner thanks to our newly devised attention masking strategy. During inference, we only need to select the most informative tokens according to a predefined pruning ratio and the scores computed by the prediction modules.
38
+
39
+ ![](images/60c84b61353b60447abb0291fa5feca07f0a78e5f57fdd197aacba080f24b0c4.jpg)
40
+ Figure 2: The overall framework of the proposed approach. The proposed prediction module is inserted between the transformer blocks to selectively prune less informative token conditioned on features produced by the previous layer. By doing so, less tokens are processed in the followed layers.
41
+
42
+ # 3.2 Hierarchical Token Sparsification with Prediction Modules
43
+
44
+ An important characteristic of our DynamicViT is that the token sparsification is performed hierarchically, i.e., we gradually drop the uninformative tokens as the computation proceeds. To achieve this, we maintain a binary decision mask $\hat { \bf D } \in \{ 0 , 1 \} ^ { N }$ to indicate whether to drop or keep each token, where $N = H W$ is the number of patch embeddings2. We initialize all elements in the decision mask to 1 and update the mask progressively. The prediction modules take the current decision $\hat { \bf D }$ and the tokens $\mathbf { x } \in \mathbb { R } ^ { N \times C }$ as input. We first project the tokens using an MLP:
45
+
46
+ $$
47
+ \begin{array} { r } { \mathbf { z } ^ { \mathrm { l o c a l } } = \mathrm { M L P } ( \mathbf { x } ) \in \mathbb { R } ^ { N \times C ^ { \prime } } , } \end{array}
48
+ $$
49
+
50
+ where $C ^ { \prime }$ can be a smaller dimension and we use $C ^ { \prime } = C / 2$ in our implementation. Similarly, we can compute a global feature by:
51
+
52
+ $$
53
+ \begin{array} { r } { \mathbf { z } ^ { \mathrm { g l o b a l } } = \mathrm { A g g } ( \mathrm { M L P } ( \mathbf { x } ) , \hat { \mathbf { D } } ) \in \mathbb { R } ^ { C ^ { \prime } } , } \end{array}
54
+ $$
55
+
56
+ where Agg is the function which aggregate the information all the existing tokens and can be simply implemented as an average pooling:
57
+
58
+ $$
59
+ \operatorname { A g g } ( \mathbf { u } , \hat { \mathbf { D } } ) = \frac { \sum _ { i = 1 } ^ { N } \hat { \mathbf { D } } _ { i } \mathbf { u } _ { i } } { \sum _ { i = 1 } ^ { N } \hat { \mathbf { D } } _ { i } } , \quad \mathbf { u } \in \mathbb { R } ^ { N \times C ^ { \prime } } .
60
+ $$
61
+
62
+ The local feature encodes the information of a certain token while the global feature contains the context of the whole image, thus both of them are informative. Therefore, we combine both the local and global features to obtain local-global embeddings and feed them to another MLP to predict the probabilities to drop/keep the tokens:
63
+
64
+ $$
65
+ \begin{array} { r } { \mathbf { z } _ { i } = [ \mathbf { z } _ { i } ^ { \mathrm { l o c a l } } , \mathbf { z } _ { i } ^ { \mathrm { g l o b a l } } ] , \quad 1 \leq i \leq N , } \\ { \pi = \mathrm { S o f t m a x } ( \mathrm { M L P } ( \mathbf { z } ) ) \in \mathbb { R } ^ { N \times 2 } , } \end{array}
66
+ $$
67
+
68
+ where $\pi _ { i , 0 }$ denotes the probability of dropping the $i$ -th token and $\pi _ { i , 1 }$ is the probability of keeping it. We can then generate current decision $\mathbf { D }$ by sampling from $\pi$ and update $\hat { \bf D }$ by
69
+
70
+ $$
71
+ \hat { \mathbf { D } } \hat { \mathbf { D } } \odot \mathbf { D } ,
72
+ $$
73
+
74
+ where $\odot$ is the Hadamard product, indicating that once a token is dropped, it will never be used.
75
+
76
+ # 3.3 End-to-end Optimization with Attention Masking
77
+
78
+ Although our target is to perform token sparsification, we find it non-trivial to implement in practice during training. First, the sampling from $\pi$ to get binary decision mask $\mathbf { D }$ is is non-differentiable, which impedes the end-to-end training. To overcome this, we apply the Gumbel-Softmax technique [15] to sample from the probabilities $\pi$ :
79
+
80
+ $$
81
+ \mathbf { D } = \mathrm { G u m b e l - S o f t m a x } ( \pi ) _ { * , 1 } \in \{ 0 , 1 \} ^ { N } ,
82
+ $$
83
+
84
+ where we use the index “1” because $\mathbf { D }$ represents the mask of the kept tokens. The output of GumbelSoftmax is a one-hot tensor, of which the expectation equals $\pi$ exactly. Meanwhile, Gumbel-Softmax is differentiable thus makes it possible for end-to-end training.
85
+
86
+ The second obstacle comes when we try to prune the tokens during training. The decision mask $\hat { \bf D }$ is usually unstructured and the masks for different samples contain various numbers of 1’s. Therefore, simply discarding the tokens where $\hat { \bf D } _ { i } = 0$ would result in a non-uniform number of tokens for samples within a batch, which makes it hard to parallelize the computation. Thus, we must keep the number of tokens unchanged, while cut down the interactions between the pruned tokens and other tokens. We also find that merely zero-out the tokens to be dropped using the binary mask $\hat { \bf D }$ is not feasible, because in the calculation of self-attention matrix [26]
87
+
88
+ $$
89
+ \mathbf { A } = \mathrm { S o f t m a x } \left( { \frac { \mathbf { Q } \mathbf { K } ^ { T } } { \sqrt { C } } } \right)
90
+ $$
91
+
92
+ the zeroed tokens will still influence other tokens through the Softmax operation. To this end, we devise a strategy called attention masking which can totally eliminate the effects of the dropped tokens. Specifically, we compute the attention matrix by:
93
+
94
+ $$
95
+ \begin{array} { r l } & { \mathbf { P } = \mathbf { Q } \mathbf { K } ^ { T } / \sqrt { C } \in \mathbb { R } ^ { N \times N } , } \\ & { \mathbf { G } _ { i j } = \{ 1 , \quad \quad i = j , } \\ & { \hat { \mathbf { D } } _ { j } , \quad i \neq j . } \\ & { \quad \tilde { \mathbf { A } } _ { i j } = \frac { \exp ( \mathbf { P } _ { i j } ) \mathbf { G } _ { i j } } { \sum _ { k = 1 } ^ { N } \exp ( \mathbf { P } _ { i k } ) \mathbf { G } _ { i k } } , } \end{array}
96
+ $$
97
+
98
+ $$
99
+ \begin{array} { l } { 1 \leq i , j \leq N , } \\ { ~ } \\ { 1 \leq i , j \leq N . } \end{array}
100
+ $$
101
+
102
+ By Equation (10) we construct a graph where $\mathbf { G } _ { i j } = 1$ means the $j$ -th token will contribute to the update of the $i$ -th token. Note that we explicitly add a self-loop to each token to improve numerically stability. It is also easy to show the self-loop does not influence the results: if $\bar { \mathbf { D } } _ { j } = 0$ , the $j$ -th token will not contribute to any tokens other than itself. Equation (11) computes the masked attention matrix $\tilde { \mathbf { A } }$ , which is equivalent to the attention matrix calculated by considering only the kept tokens but has a constant shape $N \times N$ during training.
103
+
104
+ # 3.4 Training and Inference
105
+
106
+ We now describe the training objectives of our DynamicViT. The training of DynamicViT includes training the prediction modules such that they can produce favorable decisions and fine-tuning the backbone to make it adapt to token sparsification. Assuming we are dealing with a minibatch of $B$ samples, we adopt the standard cross-entropy loss:
107
+
108
+ $$
109
+ \mathcal { L } _ { \mathrm { c l s } } = \mathrm { C r o s s E n t r o p y } ( \mathbf { y } , \bar { \mathbf { y } } ) ,
110
+ $$
111
+
112
+ where $\mathbf { y }$ is the prediction of the DynamicViT (after softmax) and $\bar { \mathbf { y } }$ is the ground truth.
113
+
114
+ To minimize the influence on performance caused by our token sparsification, we use the original backbone network as a teacher model and hope the behavior of our DynamicViT as close to the teacher model as possible. Specifically, we consider this constraint from two aspects. First, we make the finally remaining tokens of the DynamicViT close to the ones of the teacher model, which can be viewed as a kind of self-distillation:
115
+
116
+ $$
117
+ \mathcal { L } _ { \mathrm { d i s t i l l } } = \frac { 1 } { \sum _ { b = 1 } ^ { B } \sum _ { i = 1 } ^ { N } \hat { \mathbf { D } } _ { i } ^ { b , S } } \sum _ { b = 1 } ^ { B } \sum _ { i = 1 } ^ { N } \hat { \mathbf { D } } _ { i } ^ { b , S } ( \mathbf { t } _ { i } - \mathbf { t } _ { i } ^ { \prime } ) ^ { 2 } ,
118
+ $$
119
+
120
+ Table 1: Main results on ImageNet. We apply our method on three representative vision transformers: DeiT-S, LV-ViT-S and LV-ViT-M. DeiT-S [25] is a widely used vision transformer with the simple architecture. LV-ViT-S and LV-ViT-M [16] are the state-of-the-art vision transformers. We report the top-1 classification accuracy, theoretical complexity in FLOPs and throughput for different ratio $\rho$ . The throughput is measured on a single NVIDIA RTX 3090 GPU with batch size fixed to 32.
121
+
122
+ <table><tr><td rowspan="2">Base Model</td><td rowspan="2">Metrics</td><td colspan="4">Keeping Ratio ρ at each stage</td></tr><tr><td>1.0</td><td>0.9</td><td>0.8</td><td>0.7</td></tr><tr><td rowspan="3">DeiT-S [25]</td><td>ImageNet Acc. (%)</td><td>79.8</td><td>79.8 (-0.0)</td><td>79.6 (-0.2)</td><td>79.3 (-0.5)</td></tr><tr><td>GFLOPs</td><td>4.6</td><td>4.0 (-14%)</td><td>3.4 (-27%)</td><td>2.9 (-37%)</td></tr><tr><td>Throughput (im/s)</td><td>1337.7</td><td>1524.8 (+14%)</td><td>1774.6 (+33%)</td><td>2062.1 (+54%)</td></tr><tr><td rowspan="3">LV-ViT-S [16]</td><td>ImageNet Acc. (%)</td><td>83.3</td><td>83.3 (-0.0)</td><td>83.2 (-0.1)</td><td>83.0 (-0.3)</td></tr><tr><td>GFLOPs</td><td>6.6</td><td>5.8 (-12%)</td><td>5.1 (-22%)</td><td>4.6 (-31%)</td></tr><tr><td>Throughput (im/s)</td><td>993.3</td><td>1108.3 (+12%)</td><td>1255.6 (+26%)</td><td>1417.6 (+43%)</td></tr><tr><td rowspan="3">LV-ViT-M[16]</td><td>ImageNet Acc. (%)</td><td>84.0</td><td>83.9 (-0.1)</td><td>83.9 (-0.1)</td><td>83.8 (-0.2)</td></tr><tr><td>GFLOPs</td><td>12.7</td><td>11.1 (-13%)</td><td>9.6 (-24%)</td><td>8.5 (-33%)</td></tr><tr><td>Throughput (im/s)</td><td>589.5</td><td>688.5 (+17%)</td><td>791.2 (+34%)</td><td>888.2 (+50%)</td></tr></table>
123
+
124
+ where $\mathbf { t } _ { i }$ and $\mathbf { t } _ { i } ^ { \prime }$ denotes the $i$ -th token after the last block of the DynamicViT and the teacher model, respectively. $\hat { \bf D } ^ { b , s }$ is the decision mask for the $b$ -th sample at the $s$ -th sparsification stage. Second, we minimize the difference of the predictions between our DynamicViT and its teacher via the KL divergence:
125
+
126
+ $$
127
+ \begin{array} { r } { \mathcal { L } _ { \mathrm { K L } } = \mathrm { K L } \left( \mathbf { y } \| \mathbf { y } ^ { \prime } \right) , } \end{array}
128
+ $$
129
+
130
+ where $\mathbf { y } ^ { \prime }$ is the prediction of the teacher model.
131
+
132
+ Finally, we want to constrain the ratio of the kept tokens to a predefined value. Given a set of target ratios for $S$ stages $\pmb { \rho } = [ \rho ^ { ( 1 ) } , \dots , \rho ^ { ( S ) } ]$ , we utilize an MSE loss to supervise the prediction module:
133
+
134
+ $$
135
+ \mathcal { L } _ { \mathrm { r a t i o } } = \frac { 1 } { B S } \sum _ { b = 1 } ^ { B } \sum _ { s = 1 } ^ { S } \left( \rho ^ { ( s ) } - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \hat { \mathbf { D } } _ { i } ^ { b , s } \right) ^ { 2 } .
136
+ $$
137
+
138
+ The full training objective is a combination of the above objectives:
139
+
140
+ $$
141
+ \mathcal { L } = \mathcal { L } _ { \mathrm { c l s } } + \lambda _ { \mathrm { K L } } \mathcal { L } _ { \mathrm { K L } } + \lambda _ { \mathrm { d i s t i l l } } \mathcal { L } _ { \mathrm { d i s t i l l } } + \lambda _ { \mathrm { r a t i o } } \mathcal { L } _ { \mathrm { r a t i o } } ,
142
+ $$
143
+
144
+ where we set $\lambda _ { \mathrm { K L } } = 0 . 5 , \lambda _ { \mathrm { d i s t i l l } } = 0 . 5 , \lambda _ { \mathrm { r a t i o } } = 2$ in all our experiments.
145
+
146
+ During inference, given the target ratio $\rho$ , we can directly discard the less informative tokens via the probabilities produced by the prediction modules such that only exact $m ^ { s } = \lfloor \rho ^ { s } N \rfloor$ tokens are kept at the $s$ -th stage. Formally, for the $s$ -th stage, let
147
+
148
+ $$
149
+ \begin{array} { r } { \mathcal { T } ^ { s } = \mathop { \mathrm { a r g s o r t } } ( \pi _ { * , 1 } ) } \end{array}
150
+ $$
151
+
152
+ be the indices sorted by the keeping probabilities $\pi _ { * , 1 }$ , we can then keep the tokens of which the indices lie in $\mathcal { T } _ { 1 : m ^ { s } } ^ { s }$ while discarding the others. In this way, our DynamicViT prunes less informative tokens dynamically at runtime, thus can reduce the computational costs during inference.
153
+
154
+ # 4 Experimental Results
155
+
156
+ In this section, we will demonstrate the superiority of the proposed DynamicViT through extensive experiments. In all of our experiments, we fix the number of sparsification stages $S = 3$ and apply the target keeping ratio $\rho$ as a geometric sequence $[ \rho , \rho ^ { 2 } , \rho ^ { 3 } ]$ where $\rho$ ranges from $( 0 , 1 )$ . During training DynamicViT models, we follow most of the training techniques used in DeiT [25]. We use the pre-trained vision transformer models to initialize the backbone models and jointly train the whole model for 30 epochs. We set the learning rate of the prediction module to batch size × 0.001 and use $0 . 0 1 \times$ learning rate for the backbone model. We fix the weights of the backbone models in the first 5 epochs. All of our models are trained on a single machine with 8 GPUs. Other training setups and details can be found in the supplementary material.
157
+
158
+ ![](images/3c4ee26faf688f1b0a579c8588783656070e3c3e9b22df42205e8677fd7b8ae5.jpg)
159
+ Figure 3: Model complexity (FLOPs) and top-1 accuracy trade-offs on ImageNet. We compare DynamicViT with the state-of-the-art image classification models. Our models achieve better trade-offs compared to the various vision transformers as well as carefully designed CNN models.
160
+
161
+ ![](images/4ea76cd205a92c4a57c3350183bb6731151d04057f2d04017a636bd911c7d0cb.jpg)
162
+ Figure 4: Comparison of our dynamic token sparsification method with model width scaling. We train our DynamicViT based on DeiT models with embedding dimension varying from 192 to 384 and fix ratio $\rho = 0 . 7$ . We see dynamic token sparsification is more efficient than commonly used model width scaling.
163
+
164
+ # 4.1 Main results
165
+
166
+ One of the most advantages of the DynamicViT is that it can be applied to a wide range of vision transformer architectures to reduce the computational complexity with minor loss of performance. In Table 1, we summarize the main results on ImageNet [7] where we evaluate our DynamicViT used three base models (DeiT-S [25], LV-ViT-S [16] and LV-ViT-M [16]). We report the top-1 accuracy, FLOPs, and the throughput under different keeping ratios $\rho$ . Note that our token sparsification is performed hierarchically in three stages, there are only $\lfloor N \rho ^ { 3 } \rfloor$ tokens left after the last stage. The throughput is measured on a single NVIDIA RTX 3090 GPU with batch size fixed to 32. We demonstrate that our DynamicViT can reduce the computational costs by $3 1 \% \sim 3 7 \%$ and accelerate the inference at runtime by $4 3 \% \sim 5 4 \%$ , with the neglectable influence of performance $( - 0 . 2 \% \sim - 0 . 5 \% )$ .
167
+
168
+ # 4.2 Comparisons with the-state-of-the-arts
169
+
170
+ In Table 2, we compare the DynamicViT with the state-of-the-art models in image classification, including convolutional networks and transformer-like architectures. We use the DynamicViT with LV-ViT [16] as the base model and use the $^ { 6 6 } / \rho ^ { 9 }$ to indicate the keeping ratio. We observe that our DynamicViT exhibits favorable complexity/accuracy trade-offs at all three complexity levels. Notably, we find our DynamicViT-LV-M/0.7 beats the EfficientNet-B5 [24] and NFNet-F0 [1], which are two of the current state-of-the-arts CNN architectures. This can also be shown clearer in Figure 3, where we plot the FLOPS-accuracy curve of DynamicViT series (where we use DyViT for short), along with other state-of-the-art models. We can also observe that DynamicViT can achieve better trade-offs than LV-ViT series, which strongly demonstrates the effectiveness of our method.
171
+
172
+ # 4.3 Analysis
173
+
174
+ DynamicViT for model scaling. The success of EfficientNet [24] shows that we can obtain a model with better complexity/accuracy tradeoffs by scaling the model along different dimensions. While in vision transformers, the most commonly used method to scale the model is to change the number of channels, our DynamicViT provides another powerful tool to perform token sparsification. We analysis this nice property of DynamicViT in Figure 4. First, we train several DeiT [25] models with the embedding dimension varying from 192 (DeiT-Ti) to 384 (DeiT-S). Second, we train our DynamicViT based on those models with the keeping ratio $\rho = 0 . 7$ . We find that after performing token sparsification, the complexity of the model is reduced to be similar to its variant with a smaller embedding dimension. Specifically, we observe that by applying our DynamicViT to DeiT-256, we obtain a model that has a comparable computational complexity to DeiT-Ti, but enjoys around $4 . 3 \%$ higher ImageNet top-1 accuracy.
175
+
176
+ Table 2: Comparisons with the state-of-the-arts on ImageNet. We compare our DynamicViT models with state-of-the-art image classifciation models with comparable FLOPs and number of parameters. We use the DynamicViT with LV-ViT [16] as the base model and use the $" / \rho "$ to indicate the keeping ratio. We also include the results of LV-ViT models as references.
177
+
178
+ <table><tr><td>Model</td><td>Params (M)</td><td>GFLOPs</td><td>Resolution</td><td>Top-1 Acc (%)</td></tr><tr><td>DeiT-S [25]</td><td>22.1</td><td>4.6</td><td>224</td><td>79.8</td></tr><tr><td>PVT-Small [28]</td><td>24.5</td><td>3.8</td><td>224</td><td>79.8</td></tr><tr><td>CoaTMini [29]</td><td>10.0</td><td>6.8</td><td>224</td><td>80.8</td></tr><tr><td>CrossViT-S [4]</td><td>26.7</td><td>5.6</td><td>224</td><td>81.0</td></tr><tr><td>PVT-Medium [28]</td><td>44.2</td><td>6.7</td><td>224</td><td>81.2</td></tr><tr><td>Swin-T [20]</td><td>29.0</td><td>4.5</td><td>766</td><td>81.3</td></tr><tr><td>T2T-ViT-14 [32]</td><td>22.0</td><td>5.2</td><td>224</td><td>81.5</td></tr><tr><td>CPVT-Small-GAP [6]</td><td>23.0</td><td>4.6</td><td>817</td><td>81.5</td></tr><tr><td>CoaT-Lite Small [29]</td><td>20.0</td><td>4.0</td><td>224</td><td>81.9</td></tr><tr><td>LV-ViT-S [16]</td><td>26.2</td><td>6.6</td><td>224</td><td>83.3</td></tr><tr><td>DynamicViT-LV-S/0.5</td><td>26.9</td><td>3.7</td><td>224</td><td>82.0</td></tr><tr><td>DynamicViT-LV-S/0.7</td><td>26.9</td><td>4.6</td><td>224</td><td>83.0</td></tr><tr><td>RegNetY-8G [21]</td><td>39.0</td><td>8.0</td><td>224</td><td>81.7</td></tr><tr><td>T2T-ViT-19 [32]</td><td>39.2</td><td>8.9</td><td>224</td><td>81.9</td></tr><tr><td>Swin-S [20]</td><td>50.0</td><td>8.7</td><td>224</td><td>83.0</td></tr><tr><td>EfficientNet-B5 [24]</td><td>30.0</td><td>9.9</td><td>456</td><td>83.6</td></tr><tr><td>NFNet-F0 [1]</td><td>72.0</td><td>12.4</td><td>256</td><td>83.6</td></tr><tr><td>DynamicViT-LV-M/0.7</td><td>57.1</td><td>8.5</td><td>224</td><td>83.8</td></tr><tr><td>ViT-Base/16 [8]</td><td>86.6</td><td>17.6</td><td>224</td><td>77.9</td></tr><tr><td>DeiT-Base/16 [25]</td><td>86.6</td><td>17.6</td><td>224</td><td>81.8</td></tr><tr><td>CrossViT-B 3[4]</td><td>104.7</td><td>21.2</td><td>224</td><td>82.2</td></tr><tr><td>T2T-ViT-24 [32]</td><td>64.1</td><td>14.1</td><td>224</td><td>82.3</td></tr><tr><td>TNT-B [11]</td><td>66.0</td><td>14.1</td><td>224</td><td>82.8</td></tr><tr><td>RegNetY-16G [21]</td><td>84.0</td><td>16.0</td><td>224</td><td>82.9</td></tr><tr><td>Swin-B [20]</td><td>88.0</td><td>15.4</td><td>224</td><td>83.3</td></tr><tr><td>LV-ViT-M [16]</td><td>55.8</td><td>12.7</td><td>224</td><td>84.0</td></tr><tr><td>Dynamic ViT-LV-M/0.8</td><td>57.1</td><td>9.6</td><td>224</td><td>83.9</td></tr></table>
179
+
180
+ Visualizations. To further investigate the behavior of DynamicViT, we visualize the sparsification procedure in Figure 5. We show the original input image and the sparsification results after the three stages, where the masks represent the corresponding tokens are discarded. We find that through the hierarchically token sparsification, our DynamicViT can gradually drop the uninformative tokens and finally focus on the objects in the images. This phenomenon also suggests that the DynamicViT leads to better interpretability, i.e., it can locate the important parts in the image which contribute most to the classification step-by-step.
181
+
182
+ Besides the sample-wise visualization we have shown above, we are also interested in the statistical characteristics of the sparsification decisions, i.e., what kind of general patterns does the DynamicViT learn from the dataset? We then use the DynamicViT to generate the decisions for all the images in the ImageNet validation set and compute the keep probability of each token in all three stages, as shown in Figure 6. We average pool the probability maps into $7 \times 7$ such that they can be visualized more easily. Unsurprisingly, we find the tokens in the middle of the image tend to be kept, which is reasonable because in most images the objects are located in the center. We can also find that the later stage generally has lower probabilities to be kept, mainly because that the keeping ratio at the $s$ stage is $\rho ^ { s }$ , which decreases exponentially as $s$ increases.
183
+
184
+ ![](images/55b80e501904076240ede75eeecf0aef021e7ba2d7c6f06c24f7b7b13b800a40.jpg)
185
+ Figure 5: Visualization of the progressively sparsified tokens. We show the original input image and the sparsification results after the three stages, where the masks represent the corresponding tokens are discarded. We see our method can gradually focus on the most representative regions in the image. This phenomenon suggests that the DynamicViT has better interpretability.
186
+
187
+ Table 3: Effects of different losses. We provide the results after removing the distillation loss and the KL loss.
188
+
189
+ <table><tr><td>Base Model</td><td>DeiT-S</td><td>LVViT-S</td></tr><tr><td>DynamicViT</td><td>79.3(-0.5)</td><td>83.0(-0.3)</td></tr><tr><td>w/o distill (Eq.13)</td><td>79.3(-0.5)</td><td>82.7(-0.6)</td></tr><tr><td>w/o KL (Eq.14)</td><td>79.2(-0.6)</td><td>82.9(-0.4)</td></tr><tr><td>w/o distill&amp; KL</td><td>79.2(-0.6)</td><td>82.5(-0.8)</td></tr></table>
190
+
191
+ ![](images/d74529d91dbe960e8424f69c73c1efe7a7dcc985e463fd2fa07bb979b059cb31.jpg)
192
+ Figure 6: The keep probabilities of the tokens at each stage.
193
+
194
+ Effects of different losses. We show the effects of different losses in Table 3. We see the improvement brought by the distillation loss and the KL loss is not very significant, but it can consistently further boost the performance of various models.
195
+
196
+ Comparisons of different sparsification strategies. As illustrated in Figure 2, the dynamic token sparsification is unstructured. To discuss whether the dynamic sparsification is better than other strategies, we perform ablation experiments and the results are shown in Table 4. For the structural downsampling, we perform an average pooling with kernel size $2 \times 2$ after the sixth block of the baseline DeiT-S [25] model, which has similar FLOPs to our DynamicViT. The static token sparsification means that the sparsification decisions are not conditioned on the input tokens. We also compare our method with other token removal methods like randomly removing tokens or removing
197
+
198
+ (a) Dynamic sparsification static/structural downsampling.
199
+
200
+ Table 4: Comparisons of different sparsification strategies. We investigate different methods to select redundant tokens based on the DeiT-S model. We report the top-1 accuracy on ImageNet for different methods. We fix the complexity of the accelerated models to 2.9G FLOPs for fair comparisons.
201
+
202
+ <table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Random</td><td>77.5 (-2.3)</td></tr><tr><td>Attention</td><td>78.1 (-1.7)</td></tr><tr><td>Prediction</td><td>79.3 (-0.5)</td></tr></table>
203
+
204
+ (b) Different redundant token removal methods.
205
+
206
+ <table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Structural</td><td>78.2 (-1.6)</td></tr><tr><td>Static</td><td>73.4 (-6.4)</td></tr><tr><td>Dynamic</td><td>79.3 (-0.5)</td></tr></table>
207
+
208
+ (c) Effects of number of sparsification stages.
209
+ Table 5: Results on larger models. We apply our method to the model with larger width (i.e., DeiT-B) and the model with larger input size (i.e., DeiT-S with $3 8 4 \times 3 8 4$ input).
210
+
211
+ <table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Single-stage</td><td>77.4 (-2.4)</td></tr><tr><td>Two-stage</td><td>79.2 (-0.6)</td></tr><tr><td>Three-stage</td><td>79.3 (-0.5)</td></tr></table>
212
+
213
+ (a) Results on DeiT-B.
214
+
215
+ (b) Results on the $3 8 4 \times 3 8 4$ input.
216
+
217
+ <table><tr><td>Model</td><td>GFLOPs</td><td>Acc. (%)</td></tr><tr><td>DeiT-S</td><td>15.5</td><td>81.6</td></tr><tr><td>Dynamic ViT-S/0.7</td><td>9.5 (-39%)</td><td>81.4 (-0.2)</td></tr><tr><td>DynamicViT-S/0.5</td><td>7.0 (-55%)</td><td>80.3 (-1.3)</td></tr></table>
218
+
219
+ <table><tr><td>Model</td><td>GFLOPs</td><td>Acc. (%)</td></tr><tr><td>DeiT-B</td><td>17.5</td><td>81.8</td></tr><tr><td>Dynamic ViT-B/0.7</td><td>11.2 (-36%)</td><td>81.3 (-0.5)</td></tr></table>
220
+
221
+ tokens based the attention score of the class token. We find through the experiments that although other strategies have similar computational complexities, the proposed dynamic token sparsification method achieves the best accuracy. We also show that the progressive sparsification method is significantly better than one-stage sparsification.
222
+
223
+ Accelerating larger models. To show the effectiveness of our method on larger models, we apply our method to the model with larger width (i.e., DeiT-B) and models with larger input size (i.e., DeiT-S with $3 8 4 \times 3 8 4$ input). The results are presented in Table 5. We see our method also works well on the larger DeiT model. The accuracy drop become less significant when we apply our method to the model with larger feature maps. Notably, we can reduce the complexity of the DeiT-S model with $3 8 4 \times 3 8 4$ input by over $50 \%$ with only $1 . 3 \%$ accuracy drop.
224
+
225
+ # 5 Conclusion
226
+
227
+ In this work, we open a new path to accelerate vision transformer by exploiting the sparsity of informative patches in the input image. For each input instance, our DynamicViT model prunes the tokens of less importance in a dynamic way according to the customized binary decision mask output from the lightweight prediction module, which fuses the local and global information containing in the tokens. The prediction module is added to multiple layers such that the token pruning is performed in a hierarchical way. Gumbel-Softmax and attention masking techniques are also incorporated for the end-to-end training of the transformer model together with the prediction module. During the inference phase, our approach can greatly improves the efficiency by gradually pruning $66 \%$ of the input tokens, while the drop of accuracy is less than $0 . 5 \%$ for different transformer backbone. In this paper, we focus on the image classification task. Extending our method to other scenarios like video classification and dense prediction tasks can be interesting directions.
228
+
229
+ # Acknowledgment
230
+
231
+ This work was supported in part by the National Key Research and Development Program of China under Grant 2017YFA0700802, in part by the National Natural Science Foundation of China under Grant 62125603, Grant 61822603, Grant U1813218, Grant U1713214, in part by Beijing Academy of Artificial Intelligence (BAAI), in part by National Science Foundation under grant IIS-1901527, IIS-2008173, IIS-2048280, and in part by a grant from the Institute for Guo Qiang, Tsinghua University.
232
+
233
+ # References
234
+
235
+ [1] Andrew Brock, Soham De, Samuel L Smith, and Karen Simonyan. High-performance largescale image recognition without normalization. arXiv preprint arXiv:2102.06171, 2021. 7, 8
236
+ [2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213–229, 2020. 3
237
+ [3] Hila Chefer, Shir Gur, and Lior Wolf. Transformer interpretability beyond attention visualization. arXiv preprint arXiv:2012.09838, 2020. 2
238
+ [4] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. Crossvit: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021. 8
239
+ [5] Bowen Cheng, Alexander G. Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for semantic segmentation. NeurIPS, 2021. 3
240
+ [6] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021. 8
241
+ [7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. 3, 7
242
+ [8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. 3, 8
243
+ [9] Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. 3
244
+ [10] Qipeng Guo, Xipeng Qiu, Pengfei Liu, Yunfan Shao, Xiangyang Xue, and Zheng Zhang. Star-transformer. arXiv preprint arXiv:1902.09113, 2019. 3
245
+ [11] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. 8
246
+ [12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. 1
247
+ [13] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, pages 1389–1397, 2017. 3
248
+ [14] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 3
249
+ [15] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. 2, 5
250
+ [16] Zihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou, Xiaojie Jin, Anran Wang, and Jiashi Feng. Token labeling: Training a $8 5 . 5 \%$ top-1 accuracy vision transformer with 56m parameters on imagenet. arXiv preprint arXiv:2104.10858, 2021. 3, 6, 7, 8
251
+ [17] Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019. 3
252
+ [18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. NeurIPS, 25:1097–1105, 2012. 1
253
+ [19] Benlin Liu, Yongming Rao, Jiwen Lu, Jie Zhou, and Cho-Jui Hsieh. Metadistiller: Network self-boosting via meta-learned top-down distillation. In European Conference on Computer Vision, pages 694–709. Springer, 2020. 3
254
+
255
+ [20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. 1, 3, 8
256
+
257
+ [21] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In CVPR, pages 10428–10436, 2020. 8
258
+
259
+ [22] Yongming Rao, Jiwen Lu, Ji Lin, and Jie Zhou. Runtime network routing for efficient image classification. IEEE transactions on pattern analysis and machine intelligence, 41(10):2291– 2304, 2018. 3
260
+
261
+ [23] Yongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu, and Jie Zhou. Global filter networks for image classification. In NeurIPS, 2021. 3
262
+
263
+ [24] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, pages 6105–6114. PMLR, 2019. 7, 8
264
+
265
+ [25] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. 1, 2, 3, 6, 7, 8, 9
266
+
267
+ [26] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. 3, 5
268
+
269
+ [27] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: Hardware-aware automated quantization with mixed precision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8612–8620, 2019. 3
270
+
271
+ [28] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. 8
272
+
273
+ [29] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers. arXiv preprint arXiv:2104.06399, 2021. 8
274
+
275
+ [30] Xiyu Yu, Tongliang Liu, Xinchao Wang, and Dacheng Tao. On compressing deep models by low rank and sparse decomposition. In CVPR, pages 7370–7379, 2017. 3
276
+
277
+ [31] Xumin Yu, Yongming Rao, Ziyi Wang, Zuyan Liu, Jiwen Lu, and Jie Zhou. Pointr: Diverse point cloud completion with geometry-aware transformers. In ICCV, 2021. 3
278
+
279
+ [32] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021. 8
280
+
281
+ [33] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021. 3
282
+
283
+ [34] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 3
284
+
285
+ [35] Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer. arXiv preprint arXiv:2103.11886, 2021. 3 [36] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. 1
286
+
287
+ # Checklist
288
+
289
+ 1. For all authors...
290
+
291
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
292
+ (b) Did you describe the limitations of your work? [Yes] See Section 5. In this paper, we only study the dynamic token sparsification problem on the image classification task. Extending our method to a wider range of scenarios like video classification and dense prediction tasks can be interesting future directions.
293
+ (c) Did you discuss any potential negative societal impacts of your work? [N/A] We study a general framework for deep model acceleration. Our method is not for specific applications, which does not directly involve societal issues.
294
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
295
+
296
+ 2. If you are including theoretical results...
297
+
298
+ (a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
299
+
300
+ 3. If you ran experiments...
301
+
302
+ (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]
303
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
304
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] We follow the common practice in previous works, where they didn’t report the error bars.
305
+ (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)? [Yes] See our implementation details in the experiment part.
306
+
307
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
308
+
309
+ (a) If your work uses existing assets, did you cite the creators? [Yes]
310
+ (b) Did you mention the license of the assets? [N/A]
311
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
312
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
313
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
314
+
315
+ 5. If you used crowdsourcing or conducted research with human subjects...
316
+
317
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
318
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
319
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/jB0Nlbwlybm/jB0Nlbwlybm_content_list.json ADDED
@@ -0,0 +1,1455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsification ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 205,
8
+ 122,
9
+ 792,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yongming Rao1 Wenliang Zhao1 Benlin Liu2,3 Jiwen $\\mathbf { L u } ^ { 1 * }$ Jie Zhou1 Cho-Jui Hsieh2 ",
17
+ "bbox": [
18
+ 325,
19
+ 224,
20
+ 674,
21
+ 258
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 Tsinghua University 2 UCLA 3 University of Washington ",
28
+ "bbox": [
29
+ 284,
30
+ 266,
31
+ 714,
32
+ 281
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 316,
43
+ 535,
44
+ 333
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Attention is sparse in vision transformers. We observe the final prediction in vision transformers is only based on a subset of most informative tokens, which is sufficient for accurate image recognition. Based on this observation, we propose a dynamic token sparsification framework to prune redundant tokens progressively and dynamically based on the input. Specifically, we devise a lightweight prediction module to estimate the importance score of each token given the current features. The module is added to different layers to prune redundant tokens hierarchically. To optimize the prediction module in an end-to-end manner, we propose an attention masking strategy to differentiably prune a token by blocking its interactions with other tokens. Benefiting from the nature of self-attention, the unstructured sparse tokens are still hardware friendly, which makes our framework easy to achieve actual speed-up. By hierarchically pruning $66 \\%$ of the input tokens, our method greatly reduces $3 1 \\% \\sim 3 7 \\%$ FLOPs and improves the throughput by over $40 \\%$ while the drop of accuracy is within $0 . 5 \\%$ for various vision transformers. Equipped with the dynamic token sparsification framework, DynamicViT models can achieve very competitive complexity/accuracy trade-offs compared to state-of-the-art CNNs and vision transformers on ImageNet. Code is available at https://github.com/ raoyongming/DynamicViT. ",
51
+ "bbox": [
52
+ 233,
53
+ 348,
54
+ 766,
55
+ 597
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 621,
66
+ 310,
67
+ 638
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "These years have witnessed the great progress in computer vision brought by the evolution of CNNtype architectures [12, 18]. Some recent works start to replace CNN by using transformer for many vision tasks, like object detection [36, 20] and classification [25]. Just like what has been done to the CNN-type architectures in the past few years, it is also desirable to accelerate the transformer-like models to make them more suitable for real-time applications. ",
74
+ "bbox": [
75
+ 174,
76
+ 651,
77
+ 825,
78
+ 720
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "One common practice for the acceleration of CNN-type networks is to prune the filters that are of less importance. The way input is processed by the vision transformer and its variants, i.e. splitting the input image into multiple independent patches, provides us another orthogonal way to introduce the sparsity for the acceleration. That is, we can prune the tokens of less importance in the input instance, given the fact that many tokens contribute very little to the final prediction. This is only possible for the transformer-like models where the self-attention module can take the token sequence of variable length as input, and the unstructured pruned input will not affect the self-attention module, while dropping a certain part of the pixels can not really accelerate the convolution operation since the unstructured neighborhood used by convolution would make it difficult to accelerate through parallel computing. Since the hierarchical architecture of CNNs with structural downsampling has improved model efficiency in various vision tasks, we hope to explore the unstructured and data-dependent downsampling strategy for vision transformers to further leverage the advantages of self-attention (our experiments also show unstructured sparsification can lead to better performance for vision transformers compared to structural downsampling). The basic idea of our method is illustrated in Figure 1. ",
85
+ "bbox": [
86
+ 174,
87
+ 728,
88
+ 825,
89
+ 880
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/d4271a07b0ae3b36791a37a66e78570f014f99e6cd4733f82c9e1ff2750057fc.jpg",
96
+ "image_caption": [
97
+ "(c) Attention Visualization ",
98
+ "Figure 1: Illustration of our main idea. CNN models usually leverage the structural downsampling strategy to build hierarchical architectures as shown in (a). unstructured and data-dependent downsampling method in (b) can better exploit the sparsity in the input data. Thanks to the nature of the self-attention operation, the unstructured token set is also easy to accelerate through parallel computing. (c) visualizes the impact of each spatial location on the final prediction in the DeiT-S model [25] using the visualization method proposed in [3]. These results demonstrate the final prediction in vision transformers is only based on a subset of most informative tokens, which suggests a large proportion of tokens can be removed without hurting the performance. "
99
+ ],
100
+ "image_footnote": [],
101
+ "bbox": [
102
+ 179,
103
+ 92,
104
+ 810,
105
+ 308
106
+ ],
107
+ "page_idx": 1
108
+ },
109
+ {
110
+ "type": "text",
111
+ "text": "",
112
+ "bbox": [
113
+ 174,
114
+ 483,
115
+ 825,
116
+ 539
117
+ ],
118
+ "page_idx": 1
119
+ },
120
+ {
121
+ "type": "text",
122
+ "text": "In this work, we propose to employ a lightweight prediction module to determine which tokens to be pruned in a dynamic way, dubbed as DynamicViT. In particular, for each input instance, the prediction module produces a customized binary decision mask to decide which tokens are uninformative and need to be abandoned. This module is added to multiple layers of the vision transformer, such that the sparsification can be performed in a hierarchical way as we gradually increase the amount of pruned tokens after each prediction module. Once a token is pruned after a certain layer, it will not be ever used in the feed-forward procedure. The additional computational overhead introduced by this lightweight module is quite small, especially considering the computational overhead saved by eliminating the uninformative tokens. ",
123
+ "bbox": [
124
+ 174,
125
+ 545,
126
+ 825,
127
+ 670
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "This prediction module can be optimized jointly in an end-to-end manner together with the vision transformer backbone. To this end, two specialized strategies are adopted. The first one is to adopt Gumbel-Softmax [15] to overcome the non-differentiable problem of sampling from a distribution so that it is possible to perform the end-to-end training. The second one is about how to apply this learned binary decision mask to prune the unnecessary tokens. Considering the number of zero elements in the binary decision mask is different for each instance, directly eliminating the uninformative tokens for each input instance during training will make parallel computing impossible. Moreover, this would also hinder the back-propagation for the prediction module, which needs to calculate the probability distribution of whether to keep the token even if it is finally eliminated. Besides, directly setting the abandoned tokens as zero vectors is also not a wise idea since zero vectors will still affect the calculation of the attention matrix. Therefore, we propose a strategy called attention masking where we drop the connection from abandoned tokens to all other tokens in the attention matrix based on the binary decision mask. By doing so, we can overcome the difficulties described above. We also modify the original training objective of the vision transformer by adding a term to constrain the proportion of pruned tokens after a certain layer. During the inference phase, we can directly abandon a fixed amount of tokens after certain layers for each input instance as we no longer need to consider whether the operation is differentiable, and this will greatly accelerate the inference. ",
134
+ "bbox": [
135
+ 173,
136
+ 676,
137
+ 825,
138
+ 911
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "We illustrate the effectiveness of our method on ImageNet using DeiT [25] and LV-ViT [16] as backbone. The experimental results demonstrate the competitive trade-off between speed and accuracy. In particular, by hierarchically pruning $66 \\%$ of the input tokens, we can greatly reduce $31 \\%$ $\\sim 3 7 \\%$ GFLOPs and improve the throughput by over $40 \\%$ while the drop of accuracy is within $0 . 5 \\%$ for all different vision transformers. Our DynamicViT demonstrates the possibility of exploiting the sparsity in space for the acceleration of transformer-like model. We expect our attempt to open a new path for future work on the acceleration of transformer-like models. ",
145
+ "bbox": [
146
+ 174,
147
+ 92,
148
+ 825,
149
+ 188
150
+ ],
151
+ "page_idx": 2
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "2 Related Work ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 174,
159
+ 213,
160
+ 321,
161
+ 231
162
+ ],
163
+ "page_idx": 2
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "Vision transformers. Transformer model is first widely studied in NLP community [26]. It proves the possibility to use self-attention to replace the recurrent neural networks and their variants. Recent progress has demonstrated the variants of transformers can also be a competitive alternative to CNNs and achieve promising results on different vision tasks including image classification [8, 25, 20, 35, 23], object detection [2], semantic segmentation [34, 5] and 3D analysis [31, 33]. DETR [2] is the first work to apply the transformer model to vision tasks. It formulates the object detection task as a set prediction problem and follows the encoder-decoder design in the transformer to generate a sequence of bounding boxes. ViT [8] is the first work to directly apply transformer architecture on non-overlapping image patches for the image classification task, and the whole framework contains no convolution operation. Compared to CNN-type models, ViT can achieve better performance with large-scale pre-training. It is really preferred if the architecture can achieve the state-of-the-art without any pre-training. DeiT [25] proposes many training techniques so that we can train the convolutionfree transformer only on ImageNet1K [7] and achieve better performance than ViT. LV-ViT [16] further improves the performance by introducing a new training objective called token labeling. Both ViT and its follow-ups split the input image into multiple independent image patches and transform these image patches into tokens for further process. This makes it feasible to incorporate the sparsity in space dimension for these transformer-like models. ",
168
+ "bbox": [
169
+ 174,
170
+ 250,
171
+ 825,
172
+ 483
173
+ ],
174
+ "page_idx": 2
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Model acceleration. Model acceleration techniques are important for the deployment of deep models on edge devices. There are many techniques can be used to accelerate the inference speed of deep model, including quantization [9, 27], pruning [13, 22], low-rank factorization [30], knowledge distillation [14, 19] and so on. There are also many works aims at accelerating the inference speed of transformer models. For example, TinyBERT [17] proposes a distillation method to accelerate the inference of transformer. Star-Transformer [10] reduces quadratic space and time complexity to linear by replacing the fully connected structure with a star-shaped topology. However, all these works focus on NLP tasks, and few works explore the possibility of making use of the characteristic of vision tasks to accelerate vision transformer. Furthermore, the difference between the characteristics of Transformer and CNN also makes it possible to adopt another way for acceleration rather than the methods used for CNN acceleration like filter pruning [13], which removes non-critical or redundant neurons from a deep model. Our method aims at pruning the tokens of less importance instead of the neurons by exploiting the sparsity of informative image patches. ",
179
+ "bbox": [
180
+ 174,
181
+ 505,
182
+ 825,
183
+ 684
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "3 Dynamic Vision Transformers ",
190
+ "text_level": 1,
191
+ "bbox": [
192
+ 176,
193
+ 710,
194
+ 455,
195
+ 727
196
+ ],
197
+ "page_idx": 2
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "3.1 Overview ",
202
+ "text_level": 1,
203
+ "bbox": [
204
+ 174,
205
+ 744,
206
+ 279,
207
+ 760
208
+ ],
209
+ "page_idx": 2
210
+ },
211
+ {
212
+ "type": "text",
213
+ "text": "The overall framework of our DynamicViT is illustrated in Figure 2. Our DynamicViT consists of a normal vision transformer as the backbone and several prediction modules. The backbone network can be implemented as a wide range of vision transformer (e.g., ViT [8], DeiT [25], LV-ViT [16]). The prediction modules are responsible for generating the probabilities of dropping/keeping the tokens. The token sparsification is performed hierarchically through the whole network at certain locations. For example, given a 12-layer transformer, we can conduct token sparsification before the 4th, 7th, and 10th blocks. During training, the prediction modules and the backbone network can be optimized in an end-to-end manner thanks to our newly devised attention masking strategy. During inference, we only need to select the most informative tokens according to a predefined pruning ratio and the scores computed by the prediction modules. ",
214
+ "bbox": [
215
+ 174,
216
+ 772,
217
+ 825,
218
+ 911
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "image",
224
+ "img_path": "images/60c84b61353b60447abb0291fa5feca07f0a78e5f57fdd197aacba080f24b0c4.jpg",
225
+ "image_caption": [
226
+ "Figure 2: The overall framework of the proposed approach. The proposed prediction module is inserted between the transformer blocks to selectively prune less informative token conditioned on features produced by the previous layer. By doing so, less tokens are processed in the followed layers. "
227
+ ],
228
+ "image_footnote": [],
229
+ "bbox": [
230
+ 243,
231
+ 93,
232
+ 754,
233
+ 318
234
+ ],
235
+ "page_idx": 3
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "3.2 Hierarchical Token Sparsification with Prediction Modules ",
240
+ "text_level": 1,
241
+ "bbox": [
242
+ 173,
243
+ 393,
244
+ 622,
245
+ 409
246
+ ],
247
+ "page_idx": 3
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "An important characteristic of our DynamicViT is that the token sparsification is performed hierarchically, i.e., we gradually drop the uninformative tokens as the computation proceeds. To achieve this, we maintain a binary decision mask $\\hat { \\bf D } \\in \\{ 0 , 1 \\} ^ { N }$ to indicate whether to drop or keep each token, where $N = H W$ is the number of patch embeddings2. We initialize all elements in the decision mask to 1 and update the mask progressively. The prediction modules take the current decision $\\hat { \\bf D }$ and the tokens $\\mathbf { x } \\in \\mathbb { R } ^ { N \\times C }$ as input. We first project the tokens using an MLP: ",
252
+ "bbox": [
253
+ 173,
254
+ 419,
255
+ 826,
256
+ 507
257
+ ],
258
+ "page_idx": 3
259
+ },
260
+ {
261
+ "type": "equation",
262
+ "img_path": "images/6c448fa800006946b1e937ea51fae6a73b3db4725b9dc8806780ffff4d8921fe.jpg",
263
+ "text": "$$\n\\begin{array} { r } { \\mathbf { z } ^ { \\mathrm { l o c a l } } = \\mathrm { M L P } ( \\mathbf { x } ) \\in \\mathbb { R } ^ { N \\times C ^ { \\prime } } , } \\end{array}\n$$",
264
+ "text_format": "latex",
265
+ "bbox": [
266
+ 401,
267
+ 513,
268
+ 594,
269
+ 534
270
+ ],
271
+ "page_idx": 3
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "where $C ^ { \\prime }$ can be a smaller dimension and we use $C ^ { \\prime } = C / 2$ in our implementation. Similarly, we can compute a global feature by: ",
276
+ "bbox": [
277
+ 173,
278
+ 540,
279
+ 825,
280
+ 570
281
+ ],
282
+ "page_idx": 3
283
+ },
284
+ {
285
+ "type": "equation",
286
+ "img_path": "images/0d06b5360c6389f4b27d3a83f16d4d36bc15fe8afc2532d8dcc182329fd52f61.jpg",
287
+ "text": "$$\n\\begin{array} { r } { \\mathbf { z } ^ { \\mathrm { g l o b a l } } = \\mathrm { A g g } ( \\mathrm { M L P } ( \\mathbf { x } ) , \\hat { \\mathbf { D } } ) \\in \\mathbb { R } ^ { C ^ { \\prime } } , } \\end{array}\n$$",
288
+ "text_format": "latex",
289
+ "bbox": [
290
+ 375,
291
+ 577,
292
+ 619,
293
+ 597
294
+ ],
295
+ "page_idx": 3
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "where Agg is the function which aggregate the information all the existing tokens and can be simply implemented as an average pooling: ",
300
+ "bbox": [
301
+ 173,
302
+ 603,
303
+ 823,
304
+ 632
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "equation",
310
+ "img_path": "images/b57b00e3d785508e3f958b8cfd4808c667adbe66e8b3149b4ff22b6b13b0ef53.jpg",
311
+ "text": "$$\n\\operatorname { A g g } ( \\mathbf { u } , \\hat { \\mathbf { D } } ) = \\frac { \\sum _ { i = 1 } ^ { N } \\hat { \\mathbf { D } } _ { i } \\mathbf { u } _ { i } } { \\sum _ { i = 1 } ^ { N } \\hat { \\mathbf { D } } _ { i } } , \\quad \\mathbf { u } \\in \\mathbb { R } ^ { N \\times C ^ { \\prime } } .\n$$",
312
+ "text_format": "latex",
313
+ "bbox": [
314
+ 354,
315
+ 638,
316
+ 643,
317
+ 680
318
+ ],
319
+ "page_idx": 3
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "The local feature encodes the information of a certain token while the global feature contains the context of the whole image, thus both of them are informative. Therefore, we combine both the local and global features to obtain local-global embeddings and feed them to another MLP to predict the probabilities to drop/keep the tokens: ",
324
+ "bbox": [
325
+ 173,
326
+ 684,
327
+ 825,
328
+ 741
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "equation",
334
+ "img_path": "images/e27a66eb943efbcad1af4050e558b54f770f6ab8e853d3ae8874d62d25b7cb2a.jpg",
335
+ "text": "$$\n\\begin{array} { r } { \\mathbf { z } _ { i } = [ \\mathbf { z } _ { i } ^ { \\mathrm { l o c a l } } , \\mathbf { z } _ { i } ^ { \\mathrm { g l o b a l } } ] , \\quad 1 \\leq i \\leq N , } \\\\ { \\pi = \\mathrm { S o f t m a x } ( \\mathrm { M L P } ( \\mathbf { z } ) ) \\in \\mathbb { R } ^ { N \\times 2 } , } \\end{array}\n$$",
336
+ "text_format": "latex",
337
+ "bbox": [
338
+ 382,
339
+ 747,
340
+ 614,
341
+ 790
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "where $\\pi _ { i , 0 }$ denotes the probability of dropping the $i$ -th token and $\\pi _ { i , 1 }$ is the probability of keeping it. We can then generate current decision $\\mathbf { D }$ by sampling from $\\pi$ and update $\\hat { \\bf D }$ by ",
348
+ "bbox": [
349
+ 173,
350
+ 794,
351
+ 830,
352
+ 827
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "equation",
358
+ "img_path": "images/0400b793adaf81a12c1f902c47db3f44a9ede021e4260b761f7c2398c2483cec.jpg",
359
+ "text": "$$\n\\hat { \\mathbf { D } } \\hat { \\mathbf { D } } \\odot \\mathbf { D } ,\n$$",
360
+ "text_format": "latex",
361
+ "bbox": [
362
+ 449,
363
+ 833,
364
+ 547,
365
+ 852
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "where $\\odot$ is the Hadamard product, indicating that once a token is dropped, it will never be used. ",
372
+ "bbox": [
373
+ 169,
374
+ 859,
375
+ 799,
376
+ 875
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "3.3 End-to-end Optimization with Attention Masking ",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 173,
386
+ 90,
387
+ 558,
388
+ 107
389
+ ],
390
+ "page_idx": 4
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Although our target is to perform token sparsification, we find it non-trivial to implement in practice during training. First, the sampling from $\\pi$ to get binary decision mask $\\mathbf { D }$ is is non-differentiable, which impedes the end-to-end training. To overcome this, we apply the Gumbel-Softmax technique [15] to sample from the probabilities $\\pi$ : ",
395
+ "bbox": [
396
+ 173,
397
+ 116,
398
+ 826,
399
+ 172
400
+ ],
401
+ "page_idx": 4
402
+ },
403
+ {
404
+ "type": "equation",
405
+ "img_path": "images/c1827288923b26a380aac7719beae6585bd68cde80eb8d9ecd3f760fb1c5f59f.jpg",
406
+ "text": "$$\n\\mathbf { D } = \\mathrm { G u m b e l - S o f t m a x } ( \\pi ) _ { * , 1 } \\in \\{ 0 , 1 \\} ^ { N } ,\n$$",
407
+ "text_format": "latex",
408
+ "bbox": [
409
+ 357,
410
+ 179,
411
+ 637,
412
+ 199
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "where we use the index “1” because $\\mathbf { D }$ represents the mask of the kept tokens. The output of GumbelSoftmax is a one-hot tensor, of which the expectation equals $\\pi$ exactly. Meanwhile, Gumbel-Softmax is differentiable thus makes it possible for end-to-end training. ",
419
+ "bbox": [
420
+ 173,
421
+ 205,
422
+ 826,
423
+ 248
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "The second obstacle comes when we try to prune the tokens during training. The decision mask $\\hat { \\bf D }$ is usually unstructured and the masks for different samples contain various numbers of 1’s. Therefore, simply discarding the tokens where $\\hat { \\bf D } _ { i } = 0$ would result in a non-uniform number of tokens for samples within a batch, which makes it hard to parallelize the computation. Thus, we must keep the number of tokens unchanged, while cut down the interactions between the pruned tokens and other tokens. We also find that merely zero-out the tokens to be dropped using the binary mask $\\hat { \\bf D }$ is not feasible, because in the calculation of self-attention matrix [26] ",
430
+ "bbox": [
431
+ 173,
432
+ 256,
433
+ 826,
434
+ 358
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "equation",
440
+ "img_path": "images/8b82a651e11c695341eca63ad8d1925a9297ad50a996e8632cbc1c9bb994791e.jpg",
441
+ "text": "$$\n\\mathbf { A } = \\mathrm { S o f t m a x } \\left( { \\frac { \\mathbf { Q } \\mathbf { K } ^ { T } } { \\sqrt { C } } } \\right)\n$$",
442
+ "text_format": "latex",
443
+ "bbox": [
444
+ 415,
445
+ 364,
446
+ 583,
447
+ 400
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "the zeroed tokens will still influence other tokens through the Softmax operation. To this end, we devise a strategy called attention masking which can totally eliminate the effects of the dropped tokens. Specifically, we compute the attention matrix by: ",
454
+ "bbox": [
455
+ 174,
456
+ 406,
457
+ 823,
458
+ 449
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "equation",
464
+ "img_path": "images/26149df89b68b8f2c79a27a2d881a938904e35600aafa3c6899552d7c18e4465.jpg",
465
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { P } = \\mathbf { Q } \\mathbf { K } ^ { T } / \\sqrt { C } \\in \\mathbb { R } ^ { N \\times N } , } \\\\ & { \\mathbf { G } _ { i j } = \\{ 1 , \\quad \\quad i = j , } \\\\ & { \\hat { \\mathbf { D } } _ { j } , \\quad i \\neq j . } \\\\ & { \\quad \\tilde { \\mathbf { A } } _ { i j } = \\frac { \\exp ( \\mathbf { P } _ { i j } ) \\mathbf { G } _ { i j } } { \\sum _ { k = 1 } ^ { N } \\exp ( \\mathbf { P } _ { i k } ) \\mathbf { G } _ { i k } } , } \\end{array}\n$$",
466
+ "text_format": "latex",
467
+ "bbox": [
468
+ 294,
469
+ 455,
470
+ 488,
471
+ 555
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/db9b900bc9697725c16f3abdfb2a785b66e8387bbead51ae261b7037b6542e1d.jpg",
478
+ "text": "$$\n\\begin{array} { l } { 1 \\leq i , j \\leq N , } \\\\ { ~ } \\\\ { 1 \\leq i , j \\leq N . } \\end{array}\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 607,
482
+ 455,
483
+ 702,
484
+ 545
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "By Equation (10) we construct a graph where $\\mathbf { G } _ { i j } = 1$ means the $j$ -th token will contribute to the update of the $i$ -th token. Note that we explicitly add a self-loop to each token to improve numerically stability. It is also easy to show the self-loop does not influence the results: if $\\bar { \\mathbf { D } } _ { j } = 0$ , the $j$ -th token will not contribute to any tokens other than itself. Equation (11) computes the masked attention matrix $\\tilde { \\mathbf { A } }$ , which is equivalent to the attention matrix calculated by considering only the kept tokens but has a constant shape $N \\times N$ during training. ",
491
+ "bbox": [
492
+ 173,
493
+ 559,
494
+ 825,
495
+ 647
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "3.4 Training and Inference ",
502
+ "text_level": 1,
503
+ "bbox": [
504
+ 174,
505
+ 662,
506
+ 374,
507
+ 678
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "We now describe the training objectives of our DynamicViT. The training of DynamicViT includes training the prediction modules such that they can produce favorable decisions and fine-tuning the backbone to make it adapt to token sparsification. Assuming we are dealing with a minibatch of $B$ samples, we adopt the standard cross-entropy loss: ",
514
+ "bbox": [
515
+ 173,
516
+ 689,
517
+ 825,
518
+ 744
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "equation",
524
+ "img_path": "images/afc40a7f28283cdf7f8ae58eba8c674e3ea9f5fa75947c89852cf72650bfae81.jpg",
525
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { c l s } } = \\mathrm { C r o s s E n t r o p y } ( \\mathbf { y } , \\bar { \\mathbf { y } } ) ,\n$$",
526
+ "text_format": "latex",
527
+ "bbox": [
528
+ 401,
529
+ 753,
530
+ 596,
531
+ 770
532
+ ],
533
+ "page_idx": 4
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "where $\\mathbf { y }$ is the prediction of the DynamicViT (after softmax) and $\\bar { \\mathbf { y } }$ is the ground truth. ",
538
+ "bbox": [
539
+ 176,
540
+ 776,
541
+ 740,
542
+ 792
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "To minimize the influence on performance caused by our token sparsification, we use the original backbone network as a teacher model and hope the behavior of our DynamicViT as close to the teacher model as possible. Specifically, we consider this constraint from two aspects. First, we make the finally remaining tokens of the DynamicViT close to the ones of the teacher model, which can be viewed as a kind of self-distillation: ",
549
+ "bbox": [
550
+ 174,
551
+ 797,
552
+ 825,
553
+ 867
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "equation",
559
+ "img_path": "images/3a27b1c60e0b36e7e03cce741e306d47753120c7cf04550ade70c93ec64fb770.jpg",
560
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { d i s t i l l } } = \\frac { 1 } { \\sum _ { b = 1 } ^ { B } \\sum _ { i = 1 } ^ { N } \\hat { \\mathbf { D } } _ { i } ^ { b , S } } \\sum _ { b = 1 } ^ { B } \\sum _ { i = 1 } ^ { N } \\hat { \\mathbf { D } } _ { i } ^ { b , S } ( \\mathbf { t } _ { i } - \\mathbf { t } _ { i } ^ { \\prime } ) ^ { 2 } ,\n$$",
561
+ "text_format": "latex",
562
+ "bbox": [
563
+ 323,
564
+ 872,
565
+ 673,
566
+ 916
567
+ ],
568
+ "page_idx": 4
569
+ },
570
+ {
571
+ "type": "table",
572
+ "img_path": "images/005793ee79eb15d42cb6a6d0165a9e46983bee4c921279a8152aa4262337efae.jpg",
573
+ "table_caption": [
574
+ "Table 1: Main results on ImageNet. We apply our method on three representative vision transformers: DeiT-S, LV-ViT-S and LV-ViT-M. DeiT-S [25] is a widely used vision transformer with the simple architecture. LV-ViT-S and LV-ViT-M [16] are the state-of-the-art vision transformers. We report the top-1 classification accuracy, theoretical complexity in FLOPs and throughput for different ratio $\\rho$ . The throughput is measured on a single NVIDIA RTX 3090 GPU with batch size fixed to 32. "
575
+ ],
576
+ "table_footnote": [],
577
+ "table_body": "<table><tr><td rowspan=\"2\">Base Model</td><td rowspan=\"2\">Metrics</td><td colspan=\"4\">Keeping Ratio ρ at each stage</td></tr><tr><td>1.0</td><td>0.9</td><td>0.8</td><td>0.7</td></tr><tr><td rowspan=\"3\">DeiT-S [25]</td><td>ImageNet Acc. (%)</td><td>79.8</td><td>79.8 (-0.0)</td><td>79.6 (-0.2)</td><td>79.3 (-0.5)</td></tr><tr><td>GFLOPs</td><td>4.6</td><td>4.0 (-14%)</td><td>3.4 (-27%)</td><td>2.9 (-37%)</td></tr><tr><td>Throughput (im/s)</td><td>1337.7</td><td>1524.8 (+14%)</td><td>1774.6 (+33%)</td><td>2062.1 (+54%)</td></tr><tr><td rowspan=\"3\">LV-ViT-S [16]</td><td>ImageNet Acc. (%)</td><td>83.3</td><td>83.3 (-0.0)</td><td>83.2 (-0.1)</td><td>83.0 (-0.3)</td></tr><tr><td>GFLOPs</td><td>6.6</td><td>5.8 (-12%)</td><td>5.1 (-22%)</td><td>4.6 (-31%)</td></tr><tr><td>Throughput (im/s)</td><td>993.3</td><td>1108.3 (+12%)</td><td>1255.6 (+26%)</td><td>1417.6 (+43%)</td></tr><tr><td rowspan=\"3\">LV-ViT-M[16]</td><td>ImageNet Acc. (%)</td><td>84.0</td><td>83.9 (-0.1)</td><td>83.9 (-0.1)</td><td>83.8 (-0.2)</td></tr><tr><td>GFLOPs</td><td>12.7</td><td>11.1 (-13%)</td><td>9.6 (-24%)</td><td>8.5 (-33%)</td></tr><tr><td>Throughput (im/s)</td><td>589.5</td><td>688.5 (+17%)</td><td>791.2 (+34%)</td><td>888.2 (+50%)</td></tr></table>",
578
+ "bbox": [
579
+ 176,
580
+ 167,
581
+ 826,
582
+ 328
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "where $\\mathbf { t } _ { i }$ and $\\mathbf { t } _ { i } ^ { \\prime }$ denotes the $i$ -th token after the last block of the DynamicViT and the teacher model, respectively. $\\hat { \\bf D } ^ { b , s }$ is the decision mask for the $b$ -th sample at the $s$ -th sparsification stage. Second, we minimize the difference of the predictions between our DynamicViT and its teacher via the KL divergence: ",
589
+ "bbox": [
590
+ 173,
591
+ 354,
592
+ 826,
593
+ 412
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "equation",
599
+ "img_path": "images/827a5719d43d344fee2d20714205436a1da46a99fb60551c90e2ad4d1ed39458.jpg",
600
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { K L } } = \\mathrm { K L } \\left( \\mathbf { y } \\| \\mathbf { y } ^ { \\prime } \\right) , } \\end{array}\n$$",
601
+ "text_format": "latex",
602
+ "bbox": [
603
+ 431,
604
+ 411,
605
+ 565,
606
+ 430
607
+ ],
608
+ "page_idx": 5
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "where $\\mathbf { y } ^ { \\prime }$ is the prediction of the teacher model. ",
613
+ "bbox": [
614
+ 174,
615
+ 433,
616
+ 485,
617
+ 449
618
+ ],
619
+ "page_idx": 5
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "Finally, we want to constrain the ratio of the kept tokens to a predefined value. Given a set of target ratios for $S$ stages $\\pmb { \\rho } = [ \\rho ^ { ( 1 ) } , \\dots , \\rho ^ { ( S ) } ]$ , we utilize an MSE loss to supervise the prediction module: ",
624
+ "bbox": [
625
+ 171,
626
+ 454,
627
+ 825,
628
+ 484
629
+ ],
630
+ "page_idx": 5
631
+ },
632
+ {
633
+ "type": "equation",
634
+ "img_path": "images/84ad2b52e7f6083ed43a99e4d8417d4e00e6dd52285f2b8d9386f641c40fbffb.jpg",
635
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { r a t i o } } = \\frac { 1 } { B S } \\sum _ { b = 1 } ^ { B } \\sum _ { s = 1 } ^ { S } \\left( \\rho ^ { ( s ) } - \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } \\hat { \\mathbf { D } } _ { i } ^ { b , s } \\right) ^ { 2 } .\n$$",
636
+ "text_format": "latex",
637
+ "bbox": [
638
+ 341,
639
+ 492,
640
+ 655,
641
+ 539
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "The full training objective is a combination of the above objectives: ",
648
+ "bbox": [
649
+ 173,
650
+ 551,
651
+ 616,
652
+ 566
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "equation",
658
+ "img_path": "images/22d76f1cee8b7da047b6245831d0d23e153d256e97dfdf9cce3aa2d1ed546ba4.jpg",
659
+ "text": "$$\n\\mathcal { L } = \\mathcal { L } _ { \\mathrm { c l s } } + \\lambda _ { \\mathrm { K L } } \\mathcal { L } _ { \\mathrm { K L } } + \\lambda _ { \\mathrm { d i s t i l l } } \\mathcal { L } _ { \\mathrm { d i s t i l l } } + \\lambda _ { \\mathrm { r a t i o } } \\mathcal { L } _ { \\mathrm { r a t i o } } ,\n$$",
660
+ "text_format": "latex",
661
+ "bbox": [
662
+ 323,
663
+ 574,
664
+ 671,
665
+ 590
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "where we set $\\lambda _ { \\mathrm { K L } } = 0 . 5 , \\lambda _ { \\mathrm { d i s t i l l } } = 0 . 5 , \\lambda _ { \\mathrm { r a t i o } } = 2$ in all our experiments. ",
672
+ "bbox": [
673
+ 174,
674
+ 598,
675
+ 653,
676
+ 614
677
+ ],
678
+ "page_idx": 5
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "During inference, given the target ratio $\\rho$ , we can directly discard the less informative tokens via the probabilities produced by the prediction modules such that only exact $m ^ { s } = \\lfloor \\rho ^ { s } N \\rfloor$ tokens are kept at the $s$ -th stage. Formally, for the $s$ -th stage, let ",
683
+ "bbox": [
684
+ 174,
685
+ 618,
686
+ 823,
687
+ 661
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "equation",
693
+ "img_path": "images/bd5b19b2abc85a8cf3ee2493620909df382c5225537a46070d35c9b02cc8225c.jpg",
694
+ "text": "$$\n\\begin{array} { r } { \\mathcal { T } ^ { s } = \\mathop { \\mathrm { a r g s o r t } } ( \\pi _ { * , 1 } ) } \\end{array}\n$$",
695
+ "text_format": "latex",
696
+ "bbox": [
697
+ 429,
698
+ 667,
699
+ 566,
700
+ 685
701
+ ],
702
+ "page_idx": 5
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "be the indices sorted by the keeping probabilities $\\pi _ { * , 1 }$ , we can then keep the tokens of which the indices lie in $\\mathcal { T } _ { 1 : m ^ { s } } ^ { s }$ while discarding the others. In this way, our DynamicViT prunes less informative tokens dynamically at runtime, thus can reduce the computational costs during inference. ",
707
+ "bbox": [
708
+ 174,
709
+ 693,
710
+ 825,
711
+ 736
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "4 Experimental Results ",
718
+ "text_level": 1,
719
+ "bbox": [
720
+ 174,
721
+ 753,
722
+ 385,
723
+ 772
724
+ ],
725
+ "page_idx": 5
726
+ },
727
+ {
728
+ "type": "text",
729
+ "text": "In this section, we will demonstrate the superiority of the proposed DynamicViT through extensive experiments. In all of our experiments, we fix the number of sparsification stages $S = 3$ and apply the target keeping ratio $\\rho$ as a geometric sequence $[ \\rho , \\rho ^ { 2 } , \\rho ^ { 3 } ]$ where $\\rho$ ranges from $( 0 , 1 )$ . During training DynamicViT models, we follow most of the training techniques used in DeiT [25]. We use the pre-trained vision transformer models to initialize the backbone models and jointly train the whole model for 30 epochs. We set the learning rate of the prediction module to batch size × 0.001 and use $0 . 0 1 \\times$ learning rate for the backbone model. We fix the weights of the backbone models in the first 5 epochs. All of our models are trained on a single machine with 8 GPUs. Other training setups and details can be found in the supplementary material. ",
730
+ "bbox": [
731
+ 173,
732
+ 786,
733
+ 825,
734
+ 912
735
+ ],
736
+ "page_idx": 5
737
+ },
738
+ {
739
+ "type": "image",
740
+ "img_path": "images/3c4ee26faf688f1b0a579c8588783656070e3c3e9b22df42205e8677fd7b8ae5.jpg",
741
+ "image_caption": [
742
+ "Figure 3: Model complexity (FLOPs) and top-1 accuracy trade-offs on ImageNet. We compare DynamicViT with the state-of-the-art image classification models. Our models achieve better trade-offs compared to the various vision transformers as well as carefully designed CNN models. "
743
+ ],
744
+ "image_footnote": [],
745
+ "bbox": [
746
+ 184,
747
+ 88,
748
+ 475,
749
+ 304
750
+ ],
751
+ "page_idx": 6
752
+ },
753
+ {
754
+ "type": "image",
755
+ "img_path": "images/4ea76cd205a92c4a57c3350183bb6731151d04057f2d04017a636bd911c7d0cb.jpg",
756
+ "image_caption": [
757
+ "Figure 4: Comparison of our dynamic token sparsification method with model width scaling. We train our DynamicViT based on DeiT models with embedding dimension varying from 192 to 384 and fix ratio $\\rho = 0 . 7$ . We see dynamic token sparsification is more efficient than commonly used model width scaling. "
758
+ ],
759
+ "image_footnote": [],
760
+ "bbox": [
761
+ 519,
762
+ 89,
763
+ 810,
764
+ 304
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "4.1 Main results ",
771
+ "text_level": 1,
772
+ "bbox": [
773
+ 174,
774
+ 415,
775
+ 299,
776
+ 430
777
+ ],
778
+ "page_idx": 6
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "One of the most advantages of the DynamicViT is that it can be applied to a wide range of vision transformer architectures to reduce the computational complexity with minor loss of performance. In Table 1, we summarize the main results on ImageNet [7] where we evaluate our DynamicViT used three base models (DeiT-S [25], LV-ViT-S [16] and LV-ViT-M [16]). We report the top-1 accuracy, FLOPs, and the throughput under different keeping ratios $\\rho$ . Note that our token sparsification is performed hierarchically in three stages, there are only $\\lfloor N \\rho ^ { 3 } \\rfloor$ tokens left after the last stage. The throughput is measured on a single NVIDIA RTX 3090 GPU with batch size fixed to 32. We demonstrate that our DynamicViT can reduce the computational costs by $3 1 \\% \\sim 3 7 \\%$ and accelerate the inference at runtime by $4 3 \\% \\sim 5 4 \\%$ , with the neglectable influence of performance $( - 0 . 2 \\% \\sim - 0 . 5 \\% )$ . ",
783
+ "bbox": [
784
+ 173,
785
+ 440,
786
+ 826,
787
+ 579
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "4.2 Comparisons with the-state-of-the-arts ",
794
+ "text_level": 1,
795
+ "bbox": [
796
+ 174,
797
+ 595,
798
+ 482,
799
+ 609
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "In Table 2, we compare the DynamicViT with the state-of-the-art models in image classification, including convolutional networks and transformer-like architectures. We use the DynamicViT with LV-ViT [16] as the base model and use the $^ { 6 6 } / \\rho ^ { 9 }$ to indicate the keeping ratio. We observe that our DynamicViT exhibits favorable complexity/accuracy trade-offs at all three complexity levels. Notably, we find our DynamicViT-LV-M/0.7 beats the EfficientNet-B5 [24] and NFNet-F0 [1], which are two of the current state-of-the-arts CNN architectures. This can also be shown clearer in Figure 3, where we plot the FLOPS-accuracy curve of DynamicViT series (where we use DyViT for short), along with other state-of-the-art models. We can also observe that DynamicViT can achieve better trade-offs than LV-ViT series, which strongly demonstrates the effectiveness of our method. ",
806
+ "bbox": [
807
+ 173,
808
+ 619,
809
+ 826,
810
+ 746
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "4.3 Analysis ",
817
+ "text_level": 1,
818
+ "bbox": [
819
+ 174,
820
+ 761,
821
+ 271,
822
+ 775
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "DynamicViT for model scaling. The success of EfficientNet [24] shows that we can obtain a model with better complexity/accuracy tradeoffs by scaling the model along different dimensions. While in vision transformers, the most commonly used method to scale the model is to change the number of channels, our DynamicViT provides another powerful tool to perform token sparsification. We analysis this nice property of DynamicViT in Figure 4. First, we train several DeiT [25] models with the embedding dimension varying from 192 (DeiT-Ti) to 384 (DeiT-S). Second, we train our DynamicViT based on those models with the keeping ratio $\\rho = 0 . 7$ . We find that after performing token sparsification, the complexity of the model is reduced to be similar to its variant with a smaller embedding dimension. Specifically, we observe that by applying our DynamicViT to DeiT-256, we obtain a model that has a comparable computational complexity to DeiT-Ti, but enjoys around $4 . 3 \\%$ higher ImageNet top-1 accuracy. ",
829
+ "bbox": [
830
+ 174,
831
+ 786,
832
+ 825,
833
+ 911
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "table",
839
+ "img_path": "images/9f1d8e38fa26d5082d3eef474206545b69bb249c0b8b1ab34676c04ea0bf2498.jpg",
840
+ "table_caption": [
841
+ "Table 2: Comparisons with the state-of-the-arts on ImageNet. We compare our DynamicViT models with state-of-the-art image classifciation models with comparable FLOPs and number of parameters. We use the DynamicViT with LV-ViT [16] as the base model and use the $\" / \\rho \"$ to indicate the keeping ratio. We also include the results of LV-ViT models as references. "
842
+ ],
843
+ "table_footnote": [],
844
+ "table_body": "<table><tr><td>Model</td><td>Params (M)</td><td>GFLOPs</td><td>Resolution</td><td>Top-1 Acc (%)</td></tr><tr><td>DeiT-S [25]</td><td>22.1</td><td>4.6</td><td>224</td><td>79.8</td></tr><tr><td>PVT-Small [28]</td><td>24.5</td><td>3.8</td><td>224</td><td>79.8</td></tr><tr><td>CoaTMini [29]</td><td>10.0</td><td>6.8</td><td>224</td><td>80.8</td></tr><tr><td>CrossViT-S [4]</td><td>26.7</td><td>5.6</td><td>224</td><td>81.0</td></tr><tr><td>PVT-Medium [28]</td><td>44.2</td><td>6.7</td><td>224</td><td>81.2</td></tr><tr><td>Swin-T [20]</td><td>29.0</td><td>4.5</td><td>766</td><td>81.3</td></tr><tr><td>T2T-ViT-14 [32]</td><td>22.0</td><td>5.2</td><td>224</td><td>81.5</td></tr><tr><td>CPVT-Small-GAP [6]</td><td>23.0</td><td>4.6</td><td>817</td><td>81.5</td></tr><tr><td>CoaT-Lite Small [29]</td><td>20.0</td><td>4.0</td><td>224</td><td>81.9</td></tr><tr><td>LV-ViT-S [16]</td><td>26.2</td><td>6.6</td><td>224</td><td>83.3</td></tr><tr><td>DynamicViT-LV-S/0.5</td><td>26.9</td><td>3.7</td><td>224</td><td>82.0</td></tr><tr><td>DynamicViT-LV-S/0.7</td><td>26.9</td><td>4.6</td><td>224</td><td>83.0</td></tr><tr><td>RegNetY-8G [21]</td><td>39.0</td><td>8.0</td><td>224</td><td>81.7</td></tr><tr><td>T2T-ViT-19 [32]</td><td>39.2</td><td>8.9</td><td>224</td><td>81.9</td></tr><tr><td>Swin-S [20]</td><td>50.0</td><td>8.7</td><td>224</td><td>83.0</td></tr><tr><td>EfficientNet-B5 [24]</td><td>30.0</td><td>9.9</td><td>456</td><td>83.6</td></tr><tr><td>NFNet-F0 [1]</td><td>72.0</td><td>12.4</td><td>256</td><td>83.6</td></tr><tr><td>DynamicViT-LV-M/0.7</td><td>57.1</td><td>8.5</td><td>224</td><td>83.8</td></tr><tr><td>ViT-Base/16 [8]</td><td>86.6</td><td>17.6</td><td>224</td><td>77.9</td></tr><tr><td>DeiT-Base/16 [25]</td><td>86.6</td><td>17.6</td><td>224</td><td>81.8</td></tr><tr><td>CrossViT-B 3[4]</td><td>104.7</td><td>21.2</td><td>224</td><td>82.2</td></tr><tr><td>T2T-ViT-24 [32]</td><td>64.1</td><td>14.1</td><td>224</td><td>82.3</td></tr><tr><td>TNT-B [11]</td><td>66.0</td><td>14.1</td><td>224</td><td>82.8</td></tr><tr><td>RegNetY-16G [21]</td><td>84.0</td><td>16.0</td><td>224</td><td>82.9</td></tr><tr><td>Swin-B [20]</td><td>88.0</td><td>15.4</td><td>224</td><td>83.3</td></tr><tr><td>LV-ViT-M [16]</td><td>55.8</td><td>12.7</td><td>224</td><td>84.0</td></tr><tr><td>Dynamic ViT-LV-M/0.8</td><td>57.1</td><td>9.6</td><td>224</td><td>83.9</td></tr></table>",
845
+ "bbox": [
846
+ 171,
847
+ 150,
848
+ 825,
849
+ 594
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "",
856
+ "bbox": [
857
+ 176,
858
+ 628,
859
+ 823,
860
+ 657
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "Visualizations. To further investigate the behavior of DynamicViT, we visualize the sparsification procedure in Figure 5. We show the original input image and the sparsification results after the three stages, where the masks represent the corresponding tokens are discarded. We find that through the hierarchically token sparsification, our DynamicViT can gradually drop the uninformative tokens and finally focus on the objects in the images. This phenomenon also suggests that the DynamicViT leads to better interpretability, i.e., it can locate the important parts in the image which contribute most to the classification step-by-step. ",
867
+ "bbox": [
868
+ 174,
869
+ 683,
870
+ 825,
871
+ 781
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "Besides the sample-wise visualization we have shown above, we are also interested in the statistical characteristics of the sparsification decisions, i.e., what kind of general patterns does the DynamicViT learn from the dataset? We then use the DynamicViT to generate the decisions for all the images in the ImageNet validation set and compute the keep probability of each token in all three stages, as shown in Figure 6. We average pool the probability maps into $7 \\times 7$ such that they can be visualized more easily. Unsurprisingly, we find the tokens in the middle of the image tend to be kept, which is reasonable because in most images the objects are located in the center. We can also find that the later stage generally has lower probabilities to be kept, mainly because that the keeping ratio at the $s$ stage is $\\rho ^ { s }$ , which decreases exponentially as $s$ increases. ",
878
+ "bbox": [
879
+ 174,
880
+ 786,
881
+ 825,
882
+ 911
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "image",
888
+ "img_path": "images/55b80e501904076240ede75eeecf0aef021e7ba2d7c6f06c24f7b7b13b800a40.jpg",
889
+ "image_caption": [
890
+ "Figure 5: Visualization of the progressively sparsified tokens. We show the original input image and the sparsification results after the three stages, where the masks represent the corresponding tokens are discarded. We see our method can gradually focus on the most representative regions in the image. This phenomenon suggests that the DynamicViT has better interpretability. "
891
+ ],
892
+ "image_footnote": [],
893
+ "bbox": [
894
+ 178,
895
+ 90,
896
+ 820,
897
+ 522
898
+ ],
899
+ "page_idx": 8
900
+ },
901
+ {
902
+ "type": "table",
903
+ "img_path": "images/989ff6efe53fb621a56cbcbdf0098d1d97696a922c57eca464b5614e94159fc8.jpg",
904
+ "table_caption": [
905
+ "Table 3: Effects of different losses. We provide the results after removing the distillation loss and the KL loss. "
906
+ ],
907
+ "table_footnote": [],
908
+ "table_body": "<table><tr><td>Base Model</td><td>DeiT-S</td><td>LVViT-S</td></tr><tr><td>DynamicViT</td><td>79.3(-0.5)</td><td>83.0(-0.3)</td></tr><tr><td>w/o distill (Eq.13)</td><td>79.3(-0.5)</td><td>82.7(-0.6)</td></tr><tr><td>w/o KL (Eq.14)</td><td>79.2(-0.6)</td><td>82.9(-0.4)</td></tr><tr><td>w/o distill&amp; KL</td><td>79.2(-0.6)</td><td>82.5(-0.8)</td></tr></table>",
909
+ "bbox": [
910
+ 176,
911
+ 655,
912
+ 434,
913
+ 722
914
+ ],
915
+ "page_idx": 8
916
+ },
917
+ {
918
+ "type": "image",
919
+ "img_path": "images/d74529d91dbe960e8424f69c73c1efe7a7dcc985e463fd2fa07bb979b059cb31.jpg",
920
+ "image_caption": [
921
+ "Figure 6: The keep probabilities of the tokens at each stage. "
922
+ ],
923
+ "image_footnote": [],
924
+ "bbox": [
925
+ 450,
926
+ 606,
927
+ 807,
928
+ 699
929
+ ],
930
+ "page_idx": 8
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Effects of different losses. We show the effects of different losses in Table 3. We see the improvement brought by the distillation loss and the KL loss is not very significant, but it can consistently further boost the performance of various models. ",
935
+ "bbox": [
936
+ 174,
937
+ 752,
938
+ 823,
939
+ 795
940
+ ],
941
+ "page_idx": 8
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Comparisons of different sparsification strategies. As illustrated in Figure 2, the dynamic token sparsification is unstructured. To discuss whether the dynamic sparsification is better than other strategies, we perform ablation experiments and the results are shown in Table 4. For the structural downsampling, we perform an average pooling with kernel size $2 \\times 2$ after the sixth block of the baseline DeiT-S [25] model, which has similar FLOPs to our DynamicViT. The static token sparsification means that the sparsification decisions are not conditioned on the input tokens. We also compare our method with other token removal methods like randomly removing tokens or removing ",
946
+ "bbox": [
947
+ 174,
948
+ 814,
949
+ 825,
950
+ 911
951
+ ],
952
+ "page_idx": 8
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "(a) Dynamic sparsification static/structural downsampling. ",
957
+ "bbox": [
958
+ 173,
959
+ 147,
960
+ 361,
961
+ 174
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "table",
967
+ "img_path": "images/3b6e1e1efbb3d21a66344d6c0ef15525a5d7ed5046abcb76a9feb68e4bbd17b7.jpg",
968
+ "table_caption": [
969
+ "Table 4: Comparisons of different sparsification strategies. We investigate different methods to select redundant tokens based on the DeiT-S model. We report the top-1 accuracy on ImageNet for different methods. We fix the complexity of the accelerated models to 2.9G FLOPs for fair comparisons. "
970
+ ],
971
+ "table_footnote": [],
972
+ "table_body": "<table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Random</td><td>77.5 (-2.3)</td></tr><tr><td>Attention</td><td>78.1 (-1.7)</td></tr><tr><td>Prediction</td><td>79.3 (-0.5)</td></tr></table>",
973
+ "bbox": [
974
+ 395,
975
+ 179,
976
+ 593,
977
+ 248
978
+ ],
979
+ "page_idx": 9
980
+ },
981
+ {
982
+ "type": "table",
983
+ "img_path": "images/e0b74bfcd0f163e3e698feb4a7179eb23d1f4de15dd62cd7f6a37cfa9d917904.jpg",
984
+ "table_caption": [
985
+ "(b) Different redundant token removal methods. "
986
+ ],
987
+ "table_footnote": [],
988
+ "table_body": "<table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Structural</td><td>78.2 (-1.6)</td></tr><tr><td>Static</td><td>73.4 (-6.4)</td></tr><tr><td>Dynamic</td><td>79.3 (-0.5)</td></tr></table>",
989
+ "bbox": [
990
+ 176,
991
+ 180,
992
+ 372,
993
+ 248
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "table",
999
+ "img_path": "images/e33a9ba23d7616783b67ccbae153174582a68170f6433d040c1c21e287df265e.jpg",
1000
+ "table_caption": [
1001
+ "(c) Effects of number of sparsification stages. ",
1002
+ "Table 5: Results on larger models. We apply our method to the model with larger width (i.e., DeiT-B) and the model with larger input size (i.e., DeiT-S with $3 8 4 \\times 3 8 4$ input). "
1003
+ ],
1004
+ "table_footnote": [],
1005
+ "table_body": "<table><tr><td>Model</td><td>Acc. (%)</td></tr><tr><td>Single-stage</td><td>77.4 (-2.4)</td></tr><tr><td>Two-stage</td><td>79.2 (-0.6)</td></tr><tr><td>Three-stage</td><td>79.3 (-0.5)</td></tr></table>",
1006
+ "bbox": [
1007
+ 614,
1008
+ 179,
1009
+ 813,
1010
+ 248
1011
+ ],
1012
+ "page_idx": 9
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "(a) Results on DeiT-B. ",
1017
+ "bbox": [
1018
+ 264,
1019
+ 308,
1020
+ 398,
1021
+ 320
1022
+ ],
1023
+ "page_idx": 9
1024
+ },
1025
+ {
1026
+ "type": "table",
1027
+ "img_path": "images/7e63ba686915b1d35cd856154f3cfdaa8845e6291df5a02bcb9b11f31d73aaa6.jpg",
1028
+ "table_caption": [
1029
+ "(b) Results on the $3 8 4 \\times 3 8 4$ input. "
1030
+ ],
1031
+ "table_footnote": [],
1032
+ "table_body": "<table><tr><td>Model</td><td>GFLOPs</td><td>Acc. (%)</td></tr><tr><td>DeiT-S</td><td>15.5</td><td>81.6</td></tr><tr><td>Dynamic ViT-S/0.7</td><td>9.5 (-39%)</td><td>81.4 (-0.2)</td></tr><tr><td>DynamicViT-S/0.5</td><td>7.0 (-55%)</td><td>80.3 (-1.3)</td></tr></table>",
1033
+ "bbox": [
1034
+ 516,
1035
+ 327,
1036
+ 821,
1037
+ 404
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "table",
1043
+ "img_path": "images/ef0b844477da8a3e02e8cce8e808660a5c0f907ffe523b5997469147c02bb6a5.jpg",
1044
+ "table_caption": [],
1045
+ "table_footnote": [],
1046
+ "table_body": "<table><tr><td>Model</td><td>GFLOPs</td><td>Acc. (%)</td></tr><tr><td>DeiT-B</td><td>17.5</td><td>81.8</td></tr><tr><td>Dynamic ViT-B/0.7</td><td>11.2 (-36%)</td><td>81.3 (-0.5)</td></tr></table>",
1047
+ "bbox": [
1048
+ 184,
1049
+ 327,
1050
+ 488,
1051
+ 387
1052
+ ],
1053
+ "page_idx": 9
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "tokens based the attention score of the class token. We find through the experiments that although other strategies have similar computational complexities, the proposed dynamic token sparsification method achieves the best accuracy. We also show that the progressive sparsification method is significantly better than one-stage sparsification. ",
1058
+ "bbox": [
1059
+ 174,
1060
+ 424,
1061
+ 825,
1062
+ 479
1063
+ ],
1064
+ "page_idx": 9
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Accelerating larger models. To show the effectiveness of our method on larger models, we apply our method to the model with larger width (i.e., DeiT-B) and models with larger input size (i.e., DeiT-S with $3 8 4 \\times 3 8 4$ input). The results are presented in Table 5. We see our method also works well on the larger DeiT model. The accuracy drop become less significant when we apply our method to the model with larger feature maps. Notably, we can reduce the complexity of the DeiT-S model with $3 8 4 \\times 3 8 4$ input by over $50 \\%$ with only $1 . 3 \\%$ accuracy drop. ",
1069
+ "bbox": [
1070
+ 174,
1071
+ 496,
1072
+ 825,
1073
+ 579
1074
+ ],
1075
+ "page_idx": 9
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "5 Conclusion ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 174,
1083
+ 599,
1084
+ 299,
1085
+ 617
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "In this work, we open a new path to accelerate vision transformer by exploiting the sparsity of informative patches in the input image. For each input instance, our DynamicViT model prunes the tokens of less importance in a dynamic way according to the customized binary decision mask output from the lightweight prediction module, which fuses the local and global information containing in the tokens. The prediction module is added to multiple layers such that the token pruning is performed in a hierarchical way. Gumbel-Softmax and attention masking techniques are also incorporated for the end-to-end training of the transformer model together with the prediction module. During the inference phase, our approach can greatly improves the efficiency by gradually pruning $66 \\%$ of the input tokens, while the drop of accuracy is less than $0 . 5 \\%$ for different transformer backbone. In this paper, we focus on the image classification task. Extending our method to other scenarios like video classification and dense prediction tasks can be interesting directions. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 632,
1095
+ 825,
1096
+ 785
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Acknowledgment ",
1103
+ "text_level": 1,
1104
+ "bbox": [
1105
+ 174,
1106
+ 803,
1107
+ 297,
1108
+ 816
1109
+ ],
1110
+ "page_idx": 9
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "This work was supported in part by the National Key Research and Development Program of China under Grant 2017YFA0700802, in part by the National Natural Science Foundation of China under Grant 62125603, Grant 61822603, Grant U1813218, Grant U1713214, in part by Beijing Academy of Artificial Intelligence (BAAI), in part by National Science Foundation under grant IIS-1901527, IIS-2008173, IIS-2048280, and in part by a grant from the Institute for Guo Qiang, Tsinghua University. ",
1115
+ "bbox": [
1116
+ 174,
1117
+ 827,
1118
+ 825,
1119
+ 911
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "References ",
1126
+ "text_level": 1,
1127
+ "bbox": [
1128
+ 174,
1129
+ 90,
1130
+ 266,
1131
+ 106
1132
+ ],
1133
+ "page_idx": 10
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "[1] Andrew Brock, Soham De, Samuel L Smith, and Karen Simonyan. High-performance largescale image recognition without normalization. arXiv preprint arXiv:2102.06171, 2021. 7, 8 \n[2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, pages 213–229, 2020. 3 \n[3] Hila Chefer, Shir Gur, and Lior Wolf. Transformer interpretability beyond attention visualization. arXiv preprint arXiv:2012.09838, 2020. 2 \n[4] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. Crossvit: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021. 8 \n[5] Bowen Cheng, Alexander G. Schwing, and Alexander Kirillov. Per-pixel classification is not all you need for semantic segmentation. NeurIPS, 2021. 3 \n[6] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021. 8 \n[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. 3, 7 \n[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020. 3, 8 \n[9] Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. 3 \n[10] Qipeng Guo, Xipeng Qiu, Pengfei Liu, Yunfan Shao, Xiangyang Xue, and Zheng Zhang. Star-transformer. arXiv preprint arXiv:1902.09113, 2019. 3 \n[11] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021. 8 \n[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. 1 \n[13] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, pages 1389–1397, 2017. 3 \n[14] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 3 \n[15] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. 2, 5 \n[16] Zihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou, Xiaojie Jin, Anran Wang, and Jiashi Feng. Token labeling: Training a $8 5 . 5 \\%$ top-1 accuracy vision transformer with 56m parameters on imagenet. arXiv preprint arXiv:2104.10858, 2021. 3, 6, 7, 8 \n[17] Xiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. Tinybert: Distilling bert for natural language understanding. arXiv preprint arXiv:1909.10351, 2019. 3 \n[18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. NeurIPS, 25:1097–1105, 2012. 1 \n[19] Benlin Liu, Yongming Rao, Jiwen Lu, Jie Zhou, and Cho-Jui Hsieh. Metadistiller: Network self-boosting via meta-learned top-down distillation. In European Conference on Computer Vision, pages 694–709. Springer, 2020. 3 ",
1138
+ "bbox": [
1139
+ 171,
1140
+ 103,
1141
+ 828,
1142
+ 916
1143
+ ],
1144
+ "page_idx": 10
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "[20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021. 1, 3, 8 ",
1149
+ "bbox": [
1150
+ 173,
1151
+ 90,
1152
+ 823,
1153
+ 133
1154
+ ],
1155
+ "page_idx": 11
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "[21] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In CVPR, pages 10428–10436, 2020. 8 ",
1160
+ "bbox": [
1161
+ 171,
1162
+ 146,
1163
+ 823,
1164
+ 175
1165
+ ],
1166
+ "page_idx": 11
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "[22] Yongming Rao, Jiwen Lu, Ji Lin, and Jie Zhou. Runtime network routing for efficient image classification. IEEE transactions on pattern analysis and machine intelligence, 41(10):2291– 2304, 2018. 3 ",
1171
+ "bbox": [
1172
+ 173,
1173
+ 186,
1174
+ 825,
1175
+ 229
1176
+ ],
1177
+ "page_idx": 11
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "[23] Yongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu, and Jie Zhou. Global filter networks for image classification. In NeurIPS, 2021. 3 ",
1182
+ "bbox": [
1183
+ 169,
1184
+ 242,
1185
+ 825,
1186
+ 271
1187
+ ],
1188
+ "page_idx": 11
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "[24] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, pages 6105–6114. PMLR, 2019. 7, 8 ",
1193
+ "bbox": [
1194
+ 174,
1195
+ 282,
1196
+ 823,
1197
+ 313
1198
+ ],
1199
+ "page_idx": 11
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "[25] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. 1, 2, 3, 6, 7, 8, 9 ",
1204
+ "bbox": [
1205
+ 173,
1206
+ 324,
1207
+ 823,
1208
+ 367
1209
+ ],
1210
+ "page_idx": 11
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "[26] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. 3, 5 ",
1215
+ "bbox": [
1216
+ 176,
1217
+ 378,
1218
+ 825,
1219
+ 422
1220
+ ],
1221
+ "page_idx": 11
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "[27] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: Hardware-aware automated quantization with mixed precision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8612–8620, 2019. 3 ",
1226
+ "bbox": [
1227
+ 173,
1228
+ 434,
1229
+ 823,
1230
+ 478
1231
+ ],
1232
+ "page_idx": 11
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "[28] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. 8 ",
1237
+ "bbox": [
1238
+ 173,
1239
+ 489,
1240
+ 823,
1241
+ 532
1242
+ ],
1243
+ "page_idx": 11
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "[29] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers. arXiv preprint arXiv:2104.06399, 2021. 8 ",
1248
+ "bbox": [
1249
+ 173,
1250
+ 544,
1251
+ 823,
1252
+ 574
1253
+ ],
1254
+ "page_idx": 11
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "[30] Xiyu Yu, Tongliang Liu, Xinchao Wang, and Dacheng Tao. On compressing deep models by low rank and sparse decomposition. In CVPR, pages 7370–7379, 2017. 3 ",
1259
+ "bbox": [
1260
+ 173,
1261
+ 585,
1262
+ 825,
1263
+ 616
1264
+ ],
1265
+ "page_idx": 11
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "[31] Xumin Yu, Yongming Rao, Ziyi Wang, Zuyan Liu, Jiwen Lu, and Jie Zhou. Pointr: Diverse point cloud completion with geometry-aware transformers. In ICCV, 2021. 3 ",
1270
+ "bbox": [
1271
+ 173,
1272
+ 627,
1273
+ 823,
1274
+ 656
1275
+ ],
1276
+ "page_idx": 11
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "[32] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021. 8 ",
1281
+ "bbox": [
1282
+ 173,
1283
+ 667,
1284
+ 823,
1285
+ 712
1286
+ ],
1287
+ "page_idx": 11
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "[33] Hengshuang Zhao, Li Jiang, Jiaya Jia, Philip Torr, and Vladlen Koltun. Point transformer. In ICCV, 2021. 3 ",
1292
+ "bbox": [
1293
+ 173,
1294
+ 723,
1295
+ 823,
1296
+ 752
1297
+ ],
1298
+ "page_idx": 11
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "[34] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 3 ",
1303
+ "bbox": [
1304
+ 171,
1305
+ 765,
1306
+ 823,
1307
+ 808
1308
+ ],
1309
+ "page_idx": 11
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "[35] Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Qibin Hou, and Jiashi Feng. Deepvit: Towards deeper vision transformer. arXiv preprint arXiv:2103.11886, 2021. 3 [36] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020. 1 ",
1314
+ "bbox": [
1315
+ 171,
1316
+ 820,
1317
+ 825,
1318
+ 849
1319
+ ],
1320
+ "page_idx": 11
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "",
1325
+ "bbox": [
1326
+ 176,
1327
+ 862,
1328
+ 825,
1329
+ 904
1330
+ ],
1331
+ "page_idx": 11
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Checklist ",
1336
+ "text_level": 1,
1337
+ "bbox": [
1338
+ 174,
1339
+ 89,
1340
+ 254,
1341
+ 106
1342
+ ],
1343
+ "page_idx": 12
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "1. For all authors... ",
1348
+ "bbox": [
1349
+ 214,
1350
+ 116,
1351
+ 339,
1352
+ 130
1353
+ ],
1354
+ "page_idx": 12
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "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 Section 5. In this paper, we only study the dynamic token sparsification problem on the image classification task. Extending our method to a wider range of scenarios like video classification and dense prediction tasks can be interesting future directions. \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] We study a general framework for deep model acceleration. Our method is not for specific applications, which does not directly involve societal issues. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1359
+ "bbox": [
1360
+ 238,
1361
+ 136,
1362
+ 825,
1363
+ 295
1364
+ ],
1365
+ "page_idx": 12
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "2. If you are including theoretical results... ",
1370
+ "bbox": [
1371
+ 214,
1372
+ 299,
1373
+ 493,
1374
+ 314
1375
+ ],
1376
+ "page_idx": 12
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
1381
+ "bbox": [
1382
+ 238,
1383
+ 318,
1384
+ 738,
1385
+ 349
1386
+ ],
1387
+ "page_idx": 12
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "3. If you ran experiments... ",
1392
+ "bbox": [
1393
+ 214,
1394
+ 353,
1395
+ 393,
1396
+ 367
1397
+ ],
1398
+ "page_idx": 12
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "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] \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] We follow the common practice in previous works, where they didn’t report the 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)? [Yes] See our implementation details in the experiment part. ",
1403
+ "bbox": [
1404
+ 238,
1405
+ 372,
1406
+ 825,
1407
+ 517
1408
+ ],
1409
+ "page_idx": 12
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1414
+ "bbox": [
1415
+ 210,
1416
+ 522,
1417
+ 823,
1418
+ 536
1419
+ ],
1420
+ "page_idx": 12
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \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] ",
1425
+ "bbox": [
1426
+ 238,
1427
+ 541,
1428
+ 823,
1429
+ 648
1430
+ ],
1431
+ "page_idx": 12
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1436
+ "bbox": [
1437
+ 214,
1438
+ 652,
1439
+ 705,
1440
+ 667
1441
+ ],
1442
+ "page_idx": 12
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "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] ",
1447
+ "bbox": [
1448
+ 238,
1449
+ 671,
1450
+ 825,
1451
+ 761
1452
+ ],
1453
+ "page_idx": 12
1454
+ }
1455
+ ]
parse/train/jB0Nlbwlybm/jB0Nlbwlybm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jB0Nlbwlybm/jB0Nlbwlybm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jEYKjPE1xYN/jEYKjPE1xYN.md ADDED
@@ -0,0 +1,407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SYMMETRY-AWARE ACTOR-CRITIC FOR 3D MOLECULAR DESIGN
2
+
3
+ Gregor N. C. Simm,1 Robert Pinsler,1 Gábor Csányi,1 & José Miguel Hernández-Lobato $^ { 1 , 2 }$
4
+
5
+ 1Department of Engineering, University of Cambridge, Cambridge, UK 2Alan Turing Institute, London, UK {gncs2,rp586,gc121,jmh233}@cam.ac.uk
6
+
7
+ # ABSTRACT
8
+
9
+ Automating molecular design using deep reinforcement learning (RL) has the potential to greatly accelerate the search for novel materials. Despite recent progress on leveraging graph representations to design molecules, such methods are fundamentally limited by the lack of three-dimensional (3D) information. In light of this, we propose a novel actor-critic architecture for 3D molecular design that can generate molecular structures unattainable with previous approaches. This is achieved by exploiting the symmetries of the design process through a rotationally covariant state-action representation based on a spherical harmonics series expansion. We demonstrate the benefits of our approach on several 3D molecular design tasks, where we find that building in such symmetries significantly improves generalization and the quality of generated molecules.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ The search for molecular structures with desirable properties is a challenging task with important applications in de novo drug design and materials discovery (Schneider et al., 2019). There exist a plethora of machine learning approaches to accelerate this search, including generative models based on variational autoencoders (VAEs) (Gómez-Bombarelli et al., 2018), recurrent neural networks (RNNs) (Segler et al., 2018), and generative adversarial networks (GANs) (De Cao & Kipf, 2018). However, the reliance on a sufficiently large dataset for exploring unknown regions of chemical space is a severe limitation of such supervised models. Recent RL-based methods (e.g., Olivecrona et al. (2017), Jørgensen et al. (2019), Simm et al. (2020)) mitigate the need for an existing dataset of molecules as they only require access to a reward function.
14
+
15
+ Most approaches rely on graph representations of molecules, where atoms and bonds are represented by nodes and edges, respectively. This is a strongly simplified model designed for the description of single organic molecules. It is unsuitable for encoding metals and molecular clusters as it lacks information about the relative position of atoms in 3D space. Further, geometric constraints on the design process cannot be included, e.g. those given by the active site of an enzyme. A more general representation closer to the physical system is one in which a molecule is described by its atoms’ positions in Cartesian coordinates. However, it would be very inefficient to naively learn a model based on this representation. That is because molecular properties such as the energy are invariant (i.e. unchanged) under symmetry operations like translation or rotation of all atomic positions. A model without the right inductive bias would thus have to learn those symmetries from scratch.
16
+
17
+ In this work, we develop a novel RL approach for designing molecules in Cartesian coordinates that explicitly encodes these symmetry operations. The agent builds molecules by consecutively placing atoms such that if the generated structure is rotated or translated, the agent’s action is rotated and translated accordingly; this way, the reward remains the same (see Fig. 1 (a)). We achieve this through a rotationally covariant state representation based on spherical harmonics, which we integrate into a novel actor-critic network architecture with an auto-regressive policy that maintains the desired covariance. Building in this inductive bias enables us to generate molecular structures with more complex coordination geometry than the class of molecules that were attainable with previous approaches. Finally, we perform experiments on several 3D molecular design tasks, where we find that our approach significantly improves the generalization capabilities of the RL agent and the quality of the generated molecules.
18
+
19
+ ![](images/18a04ec249cb6ecdec5703b90ffb0bbf79c595261b6e5bf80830c805976505db.jpg)
20
+ Figure 1: (a) Illustration of a rotation-covariant state-action representation. If the structure is rotated by $\mathcal { R }$ , the position $x$ of the action transforms accordingly. (b) Rollout with bag $B _ { 0 } = \mathrm { S O F _ { 4 } }$ . The agent builds a molecule by repeatedly taking atoms from the bag and placing them onto the 3D canvas. Bonds connecting atoms are only for illustration and not part of the MDP.
21
+
22
+ In summary, our contributions are as follows:
23
+
24
+ • we propose the first approach for 3D molecular design that exploits symmetries of the design process by leveraging a rotationally covariant state representation; • we integrate this state representation into an actor-critic neural network architecture with a rotationally covariant auto-regressive policy, where the orientation of the atoms to be placed is modeled through a flexible distribution based on spherical harmonics; • we demonstrate the benefits of our approach on several 3D molecular design tasks, including a newly proposed task that showcases the generalization capabilities of our agent.
25
+
26
+ # 2 BACKGROUND
27
+
28
+ # 2.1 REINFORCEMENT LEARNING FOR MOLECULAR DESIGN
29
+
30
+ In the standard RL setting (Sutton & Barto, 2018), an agent interacts with the environment to max
31
+ imize its reward. Formally, such an environment is described by a Markov decision process (MDP)
32
+ $\mathcal { M } = ( S , \mathcal { A } , \mathcal { T } , \mu _ { 0 } , \gamma , r )$ with states $s _ { t } \in S$ , actions $a _ { t } \in \mathcal A$ , transition dynamics $\mathcal { T } : \mathcal { S } \times \mathcal { A } \mapsto S$ ,
33
+ initial state distribution $\mu _ { 0 }$ , discount factor $\gamma \in \mathsf { \Gamma } ( 0 , 1 ]$ , and reward function $r : \mathcal { S } \times \mathcal { A } \mapsto \mathbb { R }$ . tochastic policy , where the value $\pi ( a _ { t } | s _ { t } )$ ted returnis defined
34
+ $J ( \theta ) = \mathbb { E } _ { s _ { 0 } \sim \mu _ { 0 } } [ V ^ { \pi } ( s _ { 0 } ) ]$ $\begin{array} { r } { V ^ { \pi } ( s _ { t } ) = \mathbb { E } _ { \pi } [ \sum _ { t ^ { \prime } = t } ^ { T } \gamma ^ { t ^ { \prime } } r ( s _ { t ^ { \prime } } , a _ { t ^ { \prime } } ) | s _ { t } ] } \end{array}$ $s _ { t }$ $\pi$
35
+
36
+ Following Simm et al. (2020), we design molecules by iteratively picking atoms from a bag and positioning them on a 3D canvas. Such a sequential decision-making problem is described by an MDP where the state $s _ { t } ~ = ~ ( \mathcal { C } _ { t } , B _ { t } )$ comprises both the canvas $\mathcal { C } _ { t }$ and the bag $B _ { t }$ . The canvas $\mathcal { C } _ { t } = \mathcal { C } _ { 0 } \cup \{ ( e _ { i } , x _ { i } ) \} _ { i = 0 } ^ { t - 1 }$ is a set of atoms with chemical element $e _ { i } \in \{ \mathrm { H } , \mathrm { C } , \mathrm { N } , \mathrm { O } , \dots \}$ and position $x _ { i } \in \mathbb { R } ^ { 3 }$ placed up to time $t - 1$ , where $\mathcal { C } _ { 0 }$ can either be empty or contain a set of initially placed atoms. The number of atoms on the canvas is denoted by $| \mathcal { C } _ { t } |$ . The bag $\boldsymbol { B _ { t } } = \{ ( e , m ( \boldsymbol { \dot { e } } ) ) \}$ is a multi-set of atoms yet to be placed, where $m ( e )$ is the multiplicity of the element $e$ . Each action $\boldsymbol a _ { t } = ( e _ { t } , x _ { t } )$ consists of the element $e _ { t } \in B _ { t }$ and position $\bar { \boldsymbol { x _ { t } } } \in \bar { \mathbb { R } } ^ { 3 }$ of the next atom to be added to the canvas. Placing an atom through action $a _ { t }$ in state $s _ { t }$ is modeled by a deterministic transition function $\textstyle T ( s _ { t } , a _ { t } )$ that yields the next state $\boldsymbol { s } _ { t + 1 } = ( \boldsymbol { \mathcal { C } } _ { t + 1 } , \boldsymbol { B } _ { t + 1 } )$ with $\tilde { B _ { t + 1 } } = B _ { t } \backslash e _ { t }$ .
37
+
38
+ The reward function $r ( s _ { t } , a _ { t } ) = - \Delta E ( s _ { t } , a _ { t } )$ is given by the negative energy difference between the resulting structure described by $\mathcal { C } _ { t + 1 }$ , and the sum of energies of the current structure $\mathcal { C } _ { t }$ and a new atom of element $e _ { t }$ placed at the origin, i.e. $\Delta E ( s _ { t } , a _ { t } ) \stackrel { - } { = } E ( \mathcal { C } _ { t + 1 } ) - [ E ( \mathcal { C } _ { t } ) + E ( \{ ( e , \mathbf { 0 } ) \} ) ]$ . Intuitively, the reward encourages the agent to build stable, low-energy structures. We evaluate the energy using the fast semi-empirical Parametrized Method 6 (PM6) (Stewart, 2007) as implemented in SPARROW (Husch et al., 2018; Bosia et al., 2020); see Appendix A for details.
39
+
40
+ An example of a rollout is shown in Fig. 1 (b). At the beginning of the episode, the agent observes the initial state $( \mathcal { C } _ { 0 } , \mathcal { B } _ { 0 } ) \sim \mu _ { 0 } ( s _ { 0 } )$ , e.g. $\mathcal { C } _ { 0 } ~ = ~ \emptyset$ and $\bar { B } _ { 0 } = \mathrm { \bar { S } O F _ { 4 } } ^ { 1 }$ . The agent then iteratively constructs a molecule by placing atoms from the bag onto the canvas until the bag is empty.2
41
+
42
+ # 2.2 ROTATIONALLY COVARIANT NEURAL NETWORKS
43
+
44
+ A function $f : \mathcal X \mapsto \mathcal y$ is invariant under a transformation operator $T _ { g } : \mathcal { X } \mapsto \mathcal { X }$ if $f ( T _ { g } [ x ] ) =$ $f ( x )$ for all $x \in \mathcal { X } , g \in G$ , where $G$ is a mathematical group. In contrast, $f$ is covariant with respect to $T _ { g }$ if there exists an operator $T _ { g } ^ { \prime } : \mathcal { V } \mapsto \mathcal { V }$ such that $f ( T _ { g } [ x ] ) = T _ { g } ^ { \prime } [ f ( x ) ]$ . To achieve rotational covariance, it is natural to work with spherical harmonics. They are a set of complexvalued functions $Y _ { \ell } ^ { m } : \mathbb { S } ^ { 2 } \mapsto \mathbb { C }$ with $\ell = 0 , 1 , 2 , \ldots$ and $m = - \ell , - \ell + 1 , \dots , \ell - 1 , \ell$ on the unit sphere $\mathbb { S } ^ { 2 }$ in $\mathbb { R } ^ { 3 }$ . The first few spherical harmonics are in Appendix B. They are defined by
45
+
46
+ $$
47
+ Y _ { \ell } ^ { m } ( \vartheta , \varphi ) = ( - 1 ) ^ { m } \sqrt { \frac { 2 \ell + 1 } { 4 \pi } \frac { ( \ell - m ) ! } { ( \ell + m ) ! } } P _ { l } ^ { m } ( \cos ( \vartheta ) ) e ^ { i m \varphi } , \quad \varphi \in [ 0 , 2 \pi ] , \quad \vartheta \in [ 0 , \pi ] ,
48
+ $$
49
+
50
+ where $P _ { \ell } ^ { m }$ denotes the associated normalized Legendre polynomials of the first kind (Bateman, 1953), and each $Y _ { \ell } ^ { m }$ is normalized such that $\begin{array} { r } { \iint \lvert Y _ { \ell } ^ { \bar { m } } ( \vartheta , \varphi ) \rvert ^ { 2 } \sin \vartheta d \vartheta d \varphi = 1 } \end{array}$ . Any square-integrable function $f : \mathbb { S } ^ { 2 } \mapsto \mathbb { C }$ can be written as a series expansion in terms of the spherical harmonics,
51
+
52
+ $$
53
+ f ( \tilde { x } ) = \sum _ { \ell = 0 } ^ { \infty } \sum _ { m = - \ell } ^ { \ell } \hat { f } _ { \ell } ^ { m } Y _ { \ell } ^ { m } ( \tilde { x } ) ,
54
+ $$
55
+
56
+ where $\tilde { x } = ( \vartheta , \varphi ) \in \mathbb { S } ^ { 2 }$ . The complex-valued coefficients $\{ \hat { f } _ { \ell } ^ { m } \}$ are the analogs of Fourier coefficients and are given by $\begin{array} { r } { \hat { f } _ { \ell } ^ { m } = \int f ( \tilde { x } ) Y _ { \ell } ^ { m * } ( \tilde { x } ) \Omega ( d \tilde { x } ) } \end{array}$ . Such a function $f$ can be modeled by learning the coefficients $\{ \hat { f } _ { \ell } ^ { m } \}$ using CORMORANT (Anderson et al., 2019), a neural network architecture for predicting properties of chemical systems that works entirely in Fourier space. A key feature is that each neuron is covariant to rotation but invariant to translation; further, each neuron explicitly corresponds to a subset of atoms in the molecule. The input of CORMORANT is a spherical function $f ^ { 0 } : \mathbb { S } ^ { 2 } \mapsto \mathbb { C } ^ { d }$ and the output is a collection of vectors $\hat { f } = \{ \hat { f } _ { 0 } , \hat { f } _ { 1 } , \dots , \hat { f } _ { L } \}$ , where each $\hat { f } _ { \ell } \in \tau \times ( 2 \ell + 1 )$ is a rotationally covariant vector with $\tau$ channels. That is, if the input is rotated by $\mathcal { R } \in { \mathrm { S O } } ( 3 )$ , then each $\hat { f } _ { \ell }$ transforms as $\hat { f } _ { \ell } \mapsto D ^ { \ell } ( \mathcal { R } ) \hat { f } _ { \ell }$ , where $D ^ { \ell } ( \mathcal { R } ) : { \mathrm { S O } } ( 3 ) \mapsto \mathbb { C } ^ { ( 2 \ell + 1 ) \times ( 2 \ell + 1 ) }$ are the irreducible representations of $\mathrm { S O ( 3 ) }$ , also called the Wigner D-matrices.
57
+
58
+ # 3 COVARIANT POLICY FOR MOLECULAR DESIGN
59
+
60
+ An efficient RL agent needs to exploit the symmetries of the molecular design process. Therefore, we require a policy $\pi ( a | s )$ with actions $a \doteq ( e , x )$ that is covariant under translation and rotation with respect to the position $x$ , i.e., $x$ should rotate (or translate) accordingly if the atoms on the canvas $\mathcal { C }$ are rotated (or translated). In contrast, the policy needs to be invariant to the element $e$ , i.e. the chosen element remains unchanged under such transformations (see Fig. 1 (a)). Since learning such a policy is difficult when working directly in global Cartesian coordinates, we instead follow Simm et al. (2020) and use an action representation that is local with respect to an already placed focal atom. If the next atom is placed relative to the focal atom, covariance under translation of $x$ is automatically achieved and only the rotational covariance remains to be dealt with.
61
+
62
+ As shown in Fig. 2, we model the action $a$ through a sequence of sub-actions: (1) the index $\textit { f } \in \ \{ 1 , \ldots , | \mathcal { C } | \}$ of the focal atom around which the next atom is placed,3 (2) the element $e \in \{ 1 , \ldots , N _ { e } \}$ of the next atom from the set of available elements, (3) a distance $d \in \mathbb { R } _ { + }$ between the focal atom and the next atom, and (4) the orientation $\tilde { x } = ( \vartheta , \varphi ) \in \mathbb { S } ^ { 2 }$ of the atom on a unit sphere around the focal atom. Denoting $x _ { f }$ as the position of the focal atom, we obtain action $a = ( e , x )$ by mapping the local coordinates $( \bar { \tilde { x } } , d , f )$ to global coordinates $x = x _ { f } + d \cdot \tilde { x }$ , where $x$ is now covariant under translation and rotation. We choose these sub-actions using the following auto-regressive policy:
63
+
64
+ $$
65
+ \pi ( a | s ) = \pi ( \tilde { x } , d , e , f | s ) = p ( \tilde { x } | d , e , f , s ) p ( d | e , f , s ) p ( e | f , s ) p ( f | s ) .
66
+ $$
67
+
68
+ ![](images/f9a056c99bb86880f445167a46f0f5b5b377902fe049a16586735cbd812addad.jpg)
69
+ Figure 2: Action representation of the auto-regressive policy. The agent chooses focal atom $f$ , element $e$ , distance $d$ , and orientation $\tilde { x }$ . We then map back to global coordinates $x$ to obtain action $a = ( e , x )$ . Bonds between atoms are only for illustration.
70
+
71
+ A novel actor-critic neural network architecture that implements this policy is illustrated in Fig. 3.
72
+ In the following, we discuss its state embedding, actor, and critic networks in more detail.
73
+
74
+ # 3.1 STATE EMBEDDING
75
+
76
+ The state embedding network transforms canvas $\mathcal { C }$ and bag $\boldsymbol { B }$ to obtain a rotationally covariant and translationally invariant representation. For that, we concatenate a vectorized representation of the bag with each atom on the canvas and feed it into CORMORANT, i.e. $s ^ { \mathrm { c o v } } \gets \mathbf { C o R M O R A N T } ( \mathcal { C } , \mathcal { B } )$ , where $s ^ { \mathrm { c o v } } = \{ s _ { \ell } ^ { \mathrm { c o v } } \} _ { \ell = 0 } ^ { L _ { \mathrm { m a x } } }$ , $s _ { \ell } ^ { \mathrm { c o v } } \in \mathbb { C } ^ { | \mathcal { C } | \times \tau \times ( 2 \ell + 1 ) }$ , and $\tau$ is the number of channels. For the sake of exposition, we assume a single channel for each element in the bag, i.e. practice, we use up to four channels per element.
77
+
78
+ However, not every sub-action in Eq. (3) should transform equally under rotation and translation. While the orientation $\tilde { x }$ needs to be covariant under rotation, the choice of focal atom $f$ , element $e$ , and distance $d$ have to be invariant to rotation and translation. For these sub-actions, we additionally require an invariant state representation. To obtain such a representation $s ^ { \mathrm { i n v } } \in \mathbb { R } ^ { | \mathcal { C } | \times k }$ , we employ a combination of transformations from Anderson et al. (2019) as listed in Appendix C (e.g. for $\ell = 0$ , one can simply select the $s _ { \ell = 0 } ^ { \mathrm { c o v } }$ component), which we collectively denote as $\mathcal { T } _ { \mathrm { i n v } }$ .
79
+
80
+ # 3.2 ACTOR
81
+
82
+ Focal Atom and Element The distribution $p ( f | s )$ over the focal atom $f$ is modeled as categorical, $f \sim \operatorname { C a t } ( f ; h _ { f } ) $ , where $h _ { f }$ are the logits for each atom in $\mathcal { C }$ predicted by a multi-layer perceptron (MLP). Likewise, the distribution over the element $e$ is given by $p ( e | f , s ) = \mathbf { C a t } ( e ; h _ { e } )$ with $h _ { e } = \mathbf { M } \mathbf { L } \mathbf { P } _ { e } ( s _ { f } ^ { \mathrm { i n v } } )$ , where $s _ { f } ^ { \mathrm { i n v } }$ is the invariant representation for the focal atom. Since the number of possible focal atoms $f$ increases and the set of available elements $e$ decreases during a rollout, we mask out invalid focal atoms $f \notin \{ 1 , \ldots , | { \mathcal { C } } _ { t } | \}$ and elements $e \notin B _ { t }$ by setting their probabilities to zero and re-normalizing the categorical distributions. The agent does not make use of chemical concepts like bond connectivity to aid the choice of the focal atom.
83
+
84
+ Distance We select the channel $\tau _ { e }$ corresponding to element $e$ from $s _ { f } ^ { \mathrm { c o v } }$ to obtain $s _ { f , e } ^ { \mathrm { c o v } } : =$ $\{ s _ { \ell _ { f , e } } ^ { \mathrm { c o v } } \} _ { \ell = 0 , \dots , L _ { \mathrm { m a x } } }$ and $s _ { f , e } ^ { \mathrm { i n v } } \mathcal { T } _ { \mathrm { i n v } } ( s _ { f , e } ^ { \mathrm { c o v } } )$ . Then we model the distribution over the distance $d$ bed the n, where the m atom to be placed as a mixturis the mixing coefficient of the s are predicted by a mixture d f -tsi $M$ Gaussiaaussian network $p ( d | e , f , s ) =$ $\begin{array} { r } { \sum _ { m = 1 } ^ { M } \pi _ { m } \mathcal { N } ( \mu _ { m } , \sigma _ { m } ^ { 2 } ) } \end{array}$ $\pi _ { m }$ $m$ $\mathcal { N } ( \mu _ { m } , \sigma _ { m } ^ { 2 } )$ 1994), i.e. $\{ \pi _ { m } , \mu _ { m } \} _ { m = 1 } ^ { M } = \mathbf { M D N } ( s _ { f , e } ^ { \mathrm { i n v } } )$ . The standard deviations $\{ \sigma _ { m } \} _ { m = 1 } ^ { M }$ are global parameters. We guarantee that the sampled distances are positive by clipping values below zero.
85
+
86
+ Combining Invariant and Covariant Features The choice of distance $d$ can significantly affect the orientation $\tilde { x }$ of the atom. For example, if $d$ has the length of a triple bond, then $\tilde { x }$ will be very different from if it was a single bond. Thus, we condition $s _ { f , e } ^ { \mathrm { c o v } }$ on distance $d$ through a non-linear and learnable transformation that preserves rotational covariance. We then use this representation to model a spherical distribution over $\tilde { x }$ . Kondor $\&$ Trivedi (2018) showed that a linear transformation with learnable parameters is only covariant if the operation combines fragments with the same $\ell$ . Further, the Clebsch-Gordan (CG) non-linearity allows one to combine two covariant features such that the result is still covariant. Thus, we obtain a rotationally covariant representation $\hat { r } : = \{ \hat { r } _ { \ell } \} _ { \ell = 0 , \dots , L _ { \mathrm { m a x } } } \mathcal { T } _ { \mathrm { c o v } } ( d , s _ { f , e } ^ { \mathrm { c o v } } )$ conditioned on all previous sub-actions as follows:
87
+
88
+ ![](images/43f61d9813de35546848ee82e62813bcc5af853eaf051f1452a3c4e2a8e24bbe.jpg)
89
+ Figure 3: Illustration of the state embedding, actor, and critic networks. Both canvas $\mathcal { C }$ and bag $\boldsymbol { B }$ are fed to the state embedding network CORMORANT to obtain rotation-covariant $( s ^ { \mathrm { c o v } } )$ and -invariant $( s ^ { \mathrm { i n v } } )$ state representations. The actor network then samples the different sub-actions highlighted in bold. The critic takes the invariant representation $s ^ { \mathrm { i n v } }$ to compute a value $V$ .
90
+
91
+ $$
92
+ \begin{array} { r } { \hat { r } _ { \ell } = \Bigl [ s _ { \ell _ { f , e } } ^ { \mathrm { c o v } } \oplus d \cdot s _ { \ell _ { f , e } } ^ { \mathrm { c o v } } \oplus \bigl ( d \cdot s _ { f , e } ^ { \mathrm { c o v } } \otimes _ { \mathrm { c g } } d \cdot s _ { f , e } ^ { \mathrm { c o v } } \bigr ) _ { \ell } \Bigr ] \cdot W _ { \ell } \quad \forall \ell , } \end{array}
93
+ $$
94
+
95
+ where $\oplus$ denotes the appropriate concatenation of matrices, and $W _ { \ell }$ is a learnable complex-valued matrix. As in Anderson et al. (2019), we perform the CG product ${ \otimes } _ { \mathrm { c g } }$ only channel-wise to reduce computational complexity.
96
+
97
+ Orientation Next, we utilize $\hat { r }$ to obtain a rotationally covariant spherical distribution for the orientation $\tilde { x }$ based on the series expansion in Eq. (2). Taking inspiration from commonly used distributions (Jammalamadaka & Terdik, 2019), we propose to use the following expression:
98
+
99
+ $$
100
+ p ( \tilde { x } | d , e , f , s ) = \frac { 1 } { Z } \exp \left( - \beta \left| \frac { 1 } { \sqrt { k } } \sum _ { \ell = 0 } ^ { L _ { \mathrm { m a x } } } \sum _ { m = - \ell } ^ { \ell } \hat { r } _ { \ell } ^ { m } Y _ { \ell } ^ { m } ( \tilde { x } ) \right| ^ { 2 } \right) ,
101
+ $$
102
+
103
+ where $\beta \in \mathbb { R }$ is a scaling parameter, and the term $1 / \sqrt { k }$ with $\begin{array} { r } { k = \sum _ { \ell = 0 } ^ { L _ { \mathrm { m a x } } } \sum _ { m = - \ell } ^ { \ell } \lvert \hat { r } _ { \ell } ^ { m } \rvert ^ { 2 } } \end{array}$ r ularizes $Z$ mated via Lebedev quadrature (Lebedev, 1975; 1977). We sample from the distribution in Eq. (5) using rejection sampling (Bishop, 2009) with a uniform proposal distribution $q ( \tilde { x } ) = ( 4 \pi ) ^ { - 1 }$ . Note that in contrast to more commonly used parametric distributions (e.g. von Mises-Fisher), this formulation allows to model multi-modalities. We discuss alternatives to Eq. (5) in Appendix $\mathrm { D }$ .
104
+
105
+ # 3.3 CRITIC
106
+
107
+ The critic needs to compute a value $V$ for the state $s$ that is invariant under translation and rotation.
108
+ Given $s ^ { \mathrm { i n v } }$ , we apply a permutation-invariant set encoding (Zaheer et al., 2017) of the atoms, i.e.
109
+
110
+ $$
111
+ V ( s ) = \mathrm { M L P } _ { \rho } \left( \sum _ { i = 1 } ^ { | { \mathcal C } | } \mathrm { M L P } _ { \phi } ( s _ { i } ^ { \mathrm { i n v } } ) \right) .
112
+ $$
113
+
114
+ Finally, we use PPO (Schulman et al., 2017) to learn the parameters of the actor-critic architecture. To encourage sufficient exploration, we add an entropy regularization term over the categorical subaction distributions of the auto-regressive policy. For offline evaluation, we evaluate the policy without any exploration by choosing the most probable action. While the mode of the distributions for $f$ and $e$ is available in closed form, we approximate the global mode of the distributions over $d$ and $\tilde { x }$ by evaluating the density at $S$ samples and picking the one with the highest density.
115
+
116
+ # 4 RELATED WORK
117
+
118
+ Reinforcement Learning for Molecular Design There exists a large variety of RL-based approaches for molecular design using either string- or graph-based representations of molecules (Olivecrona et al., 2017; Guimaraes et al., 2018; Putin et al., 2018; Neil et al., 2018; Popova et al., 2018; You et al., 2018; Zhou et al., 2019). However, the choice of representation limits the molecules that can be generated to a (small) region of chemical space for which the representation is applicable, i.e., single organic molecules. Such representations also prohibit the use of reward functions based on quantum-mechanical properties; instead, heuristics are often used. Lastly, geometric constraints on the design process cannot be imposed as the representation does not include any 3D information.
119
+
120
+ Molecular Design in Cartesian Coordinates Another downside of string- and graph-based approaches is their neglect of information encoded in the interatomic distances. In light of this, Gebauer et al. (2018; 2019) proposed a supervised generative neural network for sequentially placing atoms in Cartesian coordinates. While the model respects local symmetries by construction, atoms are placed on a 3D grid. Similar to other supervised approaches, one further requires a dataset that covers the particular class of molecules to be generated. Hammer and coworkers (Jørgensen et al., 2019; Meldgaard et al., 2020) employed a Deep Q-Network (Mnih et al., 2015) to build planar compounds and crystalline surfaces by placing atoms on a grid. Recently, Simm et al. (2020) presented an RL formulation for molecular design in continuous 3D space. The agent models the position of the next atom to be placed in internal coordinates— i.e. the distance, angle, and dihedral angle with respect to already existing atoms—which are invariant under translation and rotation. By mapping from internal to Cartesian coordinates, they then obtain a policy that is covariant under these symmetry operations. However, as shown in Fig 4, the angle and dihedral angle are only defined with respect to two reference points, which are chosen to be the two closest points to a focal atom. In highly symmetric states, e.g. as commonly encountered in materials, this representation fails to distinguish different configurations as one cannot uniquely select the two closest atoms as reference points anymore. In contrast, we do not rely on such reference points as the agent directly samples the orientation from a spherical distribution.
121
+
122
+ ![](images/f04016a3bae87ef65860b141f4b138fd84b8c77bc924c0bdf98e62de23330ff6.jpg)
123
+ Figure 4: Example of two configurations (a) and (b) that the agent by Simm et al. (2020) cannot distinguish. While the values for distance $d$ , angle $\alpha$ and dihedral angle $\psi$ are the same, choosing different reference points (in red) leads to a different action. This is particularly problematic in symmetric states, where one cannot uniquely determine these reference points.
124
+
125
+ Covariant Neural Networks in Chemical Science Prior work employed rotationally covariant neural networks to predict translation- and rotation-invariant physical properties (Thomas et al., 2018; Kondor et al., 2018; Weiler et al., 2018; Anderson et al., 2019; Miller et al., 2020; Finzi et al., 2020; Fuchs et al., 2020), e.g. scalars such as the electronic energy. In contrast, we propose a translation-invariant and rotation-covariant neural network architecture for generating molecules. For a more general treatment of covariance (or equivariance) in RL, see van der Pol et al. (2020).
126
+
127
+ # 5 EXPERIMENTS
128
+
129
+ We perform experiments to answer the following questions: (1) is the agent able to learn how to build highly symmetric molecules in Cartesian coordinates from scratch, (2) can we increase the validity, diversity, and stability of generated molecules, and (3) does our approach lead to improved generalization? We address (1) and (2) by evaluating the agent on a diverse range of tasks from the MOLGYM benchmark suite (Simm et al., 2020), and (3) on a newly proposed stochastic-bag task (see Section 5.1) where bags are sampled from a distribution over bags. In Appendix G, we show with an additional experiment that the agent can learn to place water molecules around a given solute to form a solvation shell.4
130
+
131
+ We compare our approach (COVARIANT) against the RL agent proposed by Simm et al. (2020), which iteratively builds molecules on a 3D canvas by working in internal coordinates (INTERNAL). As an additional baseline, we consider a classical, optimization-based agent (OPT) with access to a black-box function that yields the energy $E ( \mathcal { C } )$ and the atomic forces $F ( \mathcal { C } )$ for a given canvas.5 The agent constructs molecules by alternating between randomly placing an atom and optimizing the structure. Moreover, the agent applies several heuristics inspired by fundamental chemical concepts to guide the placement of atoms. To make the comparisons fair, we grant OPT a comparable computational budget in terms of the total number of energy computations. Finally, for some experiments, the best possible performance based on quantum-chemical calculations can be reported. See Appendices E and F for more details on the baselines and experimental settings, and Appendix H for an additional runtime comparison between the agents.
132
+
133
+ # 5.1 STOCHASTIC-BAG TASK
134
+
135
+ In Simm et al. (2020), a set of molecular design tasks was introduced: the single-bag task assesses an agent’s ability to build single stable molecules, whereas the multi-bag task focuses on building several molecules of different composition and size at the same time. A limitation of these tasks is that the initial bags were selected such that they correspond to known formulas, which in practice might not be known a priori. In the stochastic-bag task, we relax this assumption by sampling from a more general distribution over bags. Before each episode, we construct a bag $\bar { B } = \{ ( e , \bar { m } ( e ) ) \}$ by sampling counts $( m ( e _ { 1 } ) , . . . , m ( e _ { \mathrm { m a x } } ) ) \sim \mathbf { M u l t } ( \zeta , p _ { e } )$ , where the bag size $\zeta$ is sampled uniformly from the interval $[ \zeta _ { \mathrm { m i n } } , \zeta _ { \mathrm { m a x } } ]$ . Here, we obtain an empirical distribution $p _ { e }$ from the multiplicities $m ( e )$ of a given bag $B ^ { * }$ . For example, with $B ^ { * } = \{ ( \mathrm { H } , 2 ) , ( \mathrm { O } , 1 ) \}$ we obtain $\begin{array} { r } { p _ { \mathrm { H } } = \frac { 2 } { 3 } } \end{array}$ and $\begin{array} { r } { { \dot { p } } _ { 0 } = \frac { 1 } { 3 } } \end{array}$ . Since sampled bags might no longer correspond to valid molecules when placed completely, we discard bags where the sum of valence electrons over all atoms contained in the bag is odd. This ensures that the agent can build a closed-shell system.
136
+
137
+ # 5.2 RESULTS
138
+
139
+ Building Highly Symmetric Molecules First, we evaluate the ability to build stable molecules featuring high symmetry and coordination numbers (e.g. trigonal bipyramidal, square pyramidal, and octahedral) on the single-bag task with bags $\mathrm { S O F _ { 4 } }$ , $\mathrm { { I F } _ { 5 } }$ , $\mathrm { S O F _ { 6 } }$ , and $\mathrm { S F _ { 6 } }$ . As shown in Fig. 5 (a), COVARIANT can solve the task for $\mathrm { S O F _ { 4 } }$ and $\mathrm { { I F } _ { 5 } }$ within 30 000 to 40 000 steps, whereas INTERNAL fails to build low-energy configurations as it cannot distinguish highly symmetric intermediates (cf. Fig. 4). Further results in Fig. 5 (b) for $\mathrm { S O F _ { 6 } }$ and $\mathrm { S F _ { 6 } }$ show that COVARIANT is capable of building such structures. Likewise, OPT found the optimal structures for all four bags. While the constructed molecules are small in size, they would be unattainable with graph- or string-based methods as such representations lack important 3D information. For example, RDKIT (Landrum, 2019), a state-of-the-art library for 3D structure generation of organic molecules, failed at this task.
140
+
141
+ Validity, Diversity, and Stability of Generated Molecules Since string and graph representations are not well-suited for designing molecules with complex 3D structure, it is difficult to directly compare to most prior work. To still enable comparisons, we follow the GuacaMol benchmark (Brown et al., 2019) and report the chemical validity, diversity, and stability of the molecules generated by the agents for different experiments. A generated structure is considered valid if it can be successfully converted to a molecular graph by the tool XYZ2MOL (Jensen, 2019; Kim & Kim,
142
+
143
+ ![](images/eec1c216370cf9b129830a32a688faad0b6b61b7918c2cbb8896cf85ef27e47f.jpg)
144
+ Figure 5: (a) Average offline performance on the single-bag task with bags $\mathrm { S O F _ { 4 } }$ (left) and $\mathrm { { I F } _ { 5 } }$ (right) across 10 seeds. In the lower right, molecular structures generated by the agents are shown. Dashed lines denote the optimal return for each experiment. Error bars show two standard deviations. (b) Further molecular structures generated by COVARIANT, namely ${ \mathrm { S O F } } _ { 6 }$ and $\mathrm { S F } _ { 6 }$ .
145
+
146
+ Table 1: Validity, diversity, and stability (RMSD in $\mathring \mathrm { A }$ ) of generated structures.
147
+
148
+ <table><tr><td rowspan="2">Task</td><td rowspan="2">Experiment</td><td colspan="3">Validity (↑ is better)</td><td colspan="2">Diversity (↑)</td><td colspan="2">RMSD (↓)</td></tr><tr><td>OPT</td><td>INTERNAL</td><td>COVARIANT</td><td>OPT INTERNAL</td><td>COVARIANT</td><td>INTERNAL</td><td>COVARIANT</td></tr><tr><td rowspan="5">Single-bag</td><td>C3H5NO3</td><td>0.06</td><td>0.70</td><td>0.90</td><td>19</td><td>65</td><td>0.32</td><td>0.30</td></tr><tr><td>C4H7N</td><td>0.10</td><td>0.80</td><td>0.70</td><td>35</td><td>25</td><td>0.26</td><td>0.29</td></tr><tr><td>CH8O</td><td>0.06</td><td>0.90</td><td>0.80</td><td>2</td><td></td><td>0.42</td><td>0.22</td></tr><tr><td>C7HoO2</td><td>0.05</td><td>0.50</td><td>0.80</td><td>10</td><td></td><td>0.80</td><td>0.76</td></tr><tr><td>C7H8N2O2</td><td>0.03</td><td>0.60</td><td>0.70</td><td>5</td><td>118</td><td>0.57</td><td>0.52</td></tr><tr><td>Multi-bag</td><td></td><td>0.54</td><td>0.78</td><td>0.89</td><td>22</td><td></td><td>0.04</td><td>0.04</td></tr><tr><td rowspan="2">Stochastic-bag</td><td>C7H10O</td><td>0.05</td><td>0.40</td><td>0.60</td><td>10</td><td></td><td>0.65</td><td>0.71</td></tr><tr><td>C7H8NO2</td><td>0.03</td><td>0.10</td><td>0.80</td><td>5</td><td>59 84</td><td>0.95</td><td>0.88</td></tr><tr><td rowspan="2">Stochastic-bag (gen.)</td><td>C7H10O</td><td>0.00</td><td>0.00</td><td>0.13</td><td>0</td><td>28 38 227</td><td>n/a</td><td>1.02</td></tr><tr><td>C7H8NO2</td><td>0.00</td><td>0.05</td><td>0.30</td><td>0</td><td>40</td><td>1.24</td><td>1.15</td></tr></table>
149
+
150
+ 2015). The validity reported in Table 1 is the ratio of valid molecules generated during offline evaluation at the end of training over 10 seeds. Two molecules are considered identical if their molecular graphs yield the same SMILES strings under RDKIT. The diversity shown in Table 1 is the total number of unique and valid structures generated during offline evaluation during training over 10 seeds.6 In the two stochastic-bag experiments, the agents are trained on bags of sizes from the interval [16, 22] sampled with ${ \cal B } ^ { * } = \mathrm { C _ { 7 } H _ { 8 } N _ { 2 } O _ { 2 } }$ and $\mathrm { C } _ { 7 } \mathrm { H } _ { 1 0 } \mathrm { O } _ { 2 }$ , respectively. Finally, to assess the stability of the generated molecules, valid structures generated in the last iteration underwent a structure optimization using the PM6 method (see Appendix A for details). Then, the root-mean-square deviation of atomic positions (RMSD, in $\mathring \mathrm { A }$ ) between the original and the optimized structure was computed. In Table 1, the median RMSD is given per experiment.
151
+
152
+ Results are listed in Table 1. We observe that COVARIANT significantly outperforms the other agents on most experiments both in terms of validity and diversity. The difference is particularly large for the more challenging stochastic-bag tasks, where COVARIANT does similarly well as on the singlebag experiments. This finding is confirmed in Fig. 6 (a), showing that the exact stoichiometry does not need to be known a priori for the agent to build valid molecules. Moreover, the structures generated by COVARIANT are overall slightly more stable compared to INTERNAL. In contrast, OPT often fails to build valid structures. Inspection of the generated structures reveals that for larger bags the agent tends to build multi-molecular clusters, which are considered invalid in this experiment. The stability for OPT is omitted as all of its valid structures are stable by definition.
153
+
154
+ Compared to graph-based approaches (e.g., Jin et al. (2017); Bradshaw et al. (2019a); Li et al. (2018b;a); Liu et al. (2018); De Cao & Kipf (2018); Bradshaw et al. (2019b)), the average validity and diversity achieved by COVARIANT are still relatively low. This can partly be explained by the fact that state-of-the-art graph-based approaches have the strict rules of chemical bonding in organic molecules encoded into their models. But as a result, they are limited to generating single organic molecules and cannot build molecules for which these rules do not apply (e.g., hypervalent iodine compounds such as $\mathrm { I F } _ { 5 }$ ). In terms of stability, the supervised generative model by Gebauer et al. (2019) reported an average RMSD of approximately $\mathrm { { \dot { 0 } . 2 5 \mathrm { { \AA } } } }$ . While their approach and the considered molecules are significantly different from ours, this suggests that the generated structures are more stable compared to COVARIANT. Nonetheless, the RL approach presented in this work remains particularly attractive if no dataset exists on which such a supervised model can be trained.
155
+
156
+ Generalization To evaluate the generalization capabilities of all agents to unseen bags, we train on a distribution over bags with $B ^ { * } = \mathrm { C } _ { 7 } \mathrm { H } _ { 1 0 } \mathrm { O } _ { 2 }$ and $\mathrm { C } _ { 7 } \mathrm { H } _ { 8 } \mathrm { N } _ { 2 } \mathrm { O } _ { 2 }$ , and test on sets of larger, outof-distribution bags $\{ \mathrm { C _ { 6 } H _ { 1 4 } O _ { 3 } , C _ { 7 } H _ { 1 6 } O , C _ { 7 } H _ { 1 6 } O _ { 2 } , C _ { 8 } H _ { 1 8 } O } \}$ , and $\mathrm { \{ C _ { 8 } H _ { 1 2 } N _ { 2 } O , C _ { 6 } H _ { 1 2 } N _ { 2 } O _ { 3 } }$ , $\mathrm { C _ { 7 } H _ { 1 4 } N _ { 2 } O , C _ { 7 } H _ { 1 4 } ^ { - } N _ { 2 } O _ { 2 } \} }$ respectively. As shown in Fig. 6 (b), COVARIANT obtains higher average returns with lower variance compared to INTERNAL on $\mathrm { C } _ { 7 } \mathrm { H } _ { 1 0 } \mathrm { O } _ { 2 }$ , while performing only slightly worse than the agent trained directly on the test bags (purple). Results for $\mathrm { C } _ { 7 } \mathrm { H } _ { 8 } \mathrm { N } _ { 2 } \mathrm { O } _ { 2 }$ are in Appendix G. Although the difference in performance seems to be marginal, we stress that chemical validity is often determined by the last $1 0 \%$ of the returns. Indeed, Table 1 and Fig. 9 in Appendix G highlight the higher quality of the structures generated by COVARIANT, indicating better generalization to unseen bags of larger size. OPT fails at this task.
157
+
158
+ ![](images/2200776acf613baf79016c7502cb6358c980347ed984de7cb981d47e6cd84d2d.jpg)
159
+ Figure 6: Average offline performance on the stochastic-bag task with $B ^ { * } = \mathrm { C } _ { 7 } \mathrm { H } _ { 1 0 } \mathrm { O } _ { 2 }$ evaluated on (a) $\mathrm { C } _ { 7 } \mathrm { H } _ { 1 0 } \mathrm { O } _ { 2 }$ and (b) larger, unseen bags $\mathrm { \{ C _ { 6 } H _ { 1 4 } O _ { 3 } } $ , $\mathrm { C _ { 7 } H _ { 1 6 } O }$ , $\mathrm { C _ { 7 } H _ { 1 6 } O _ { 2 } }$ , $\mathrm { C _ { 8 } H _ { 1 8 } O } \}$ over 10 seeds. For comparison, we show an agent trained only on the test bags (purple). Error bars are two standard deviations. Molecular structures generated by COVARIANT (Stochastic) are shown.
160
+
161
+ # 6 CONCLUSION
162
+
163
+ We proposed a novel covariant actor-critic architecture based on spherical harmonics for designing highly symmetric molecules in 3D. We showed empirically that exploiting symmetries of the molecular design process improves the quality of the generated molecules and leads to better generalization. In future work, we aim to employ more accurate quantum-chemical methods (e.g., density functional theory) required for building transition metal complexes or structures in which weak intermolecular interactions are important. For that, however, the sample-efficiency of our agent needs to be improved. Finally, we aim to explore reward functions specifically tailored towards drug design.
164
+
165
+ # ACKNOWLEDGEMENTS
166
+
167
+ We thank A. J. Tripp and K. T. Jensen for useful discussions and feedback. RP receives funding from iCASE grant #1950384 with support from Nokia. JMHL acknowledges support from a Turing AI Fellowship under grant EP/V023756/1. This work has been performed using resources operated by the University of Cambridge Research Computing Service (funded by grant EP/P020259/1).
168
+
169
+ # REFERENCES
170
+
171
+ Brandon Anderson, Truong Son Hy, and Risi Kondor. Cormorant: Covariant Molecular Neural Networks. In Advances in Neural Information Processing Systems 32, pp. 14537–14546. Curran Associates, Inc., 2019.
172
+
173
+ Harry Bateman. Higher Transcendental Functions, volume I-III. McGraw-Hill Book Company, New York, 1953.
174
+
175
+ Christopher M Bishop. Mixture density networks. Technical report, Aston University, 1994.
176
+
177
+ Christopher M. Bishop. Rejection sampling. In Pattern Recognition and Machine Learning, Information Science and Statistics, pp. 528–530. Springer, New York, 2009. ISBN 978-0-387-31073-2.
178
+
179
+ Francesco Bosia, Tamara Husch, Alain C. Vaucher, and Markus Reiher. QCScine Sparrow: Release 2.0.1. https://doi.org/10.5281/zenodo.3907313, 2020.
180
+
181
+ John Bradshaw, Matt J. Kusner, Brooks Paige, Marwin H. S. Segler, and José Miguel HernándezLobato. A generative model for electron paths. In International Conference on Learning Representations, 2019a.
182
+
183
+ John Bradshaw, Brooks Paige, Matt J Kusner, Marwin Segler, and José Miguel Hernández-Lobato. A Model to Search for Synthesizable Molecules. In Advances in Neural Information Processing Systems, pp. 7935–7947, 2019b.
184
+
185
+ Nathan Brown, Marco Fiscato, Marwin H.S. Segler, and Alain C. Vaucher. GuacaMol: Benchmarking Models for de Novo Molecular Design. J. Chem. Inf. Model., 59(3):1096–1108, 2019.
186
+
187
+ Nicola De Cao and Thomas Kipf. MolGAN: An implicit generative model for small molecular graphs. arXiv preprint arXiv:1805.11973, 2018.
188
+
189
+ Marc Finzi, Samuel Stanton, Pavel Izmailov, and Andrew Gordon Wilson. Generalizing Convolutional Neural Networks for Equivariance to Lie Groups on Arbitrary Continuous Data. arXiv preprint arXiv:2002.12880, 2020.
190
+
191
+ Fabian B Fuchs, Daniel E Worrall, Volker Fischer, and Max Welling. SE (3)-transformers: 3D roto-translation equivariant attention networks. arXiv preprint arXiv:2006.10503, 2020.
192
+
193
+ Niklas W. A. Gebauer, Michael Gastegger, and Kristof T. Schütt. Generating equilibrium molecules with deep neural networks. arXiv preprint arXiv:1810.11347, 2018.
194
+
195
+ Niklas W. A. Gebauer, Michael Gastegger, and Kristof T. Schütt. Symmetry-adapted generation of 3D point sets for the targeted discovery of molecules. In Advances in Neural Information Processing Systems, pp. 7564–7576, 2019.
196
+
197
+ Rafael Gómez-Bombarelli, Jennifer N. Wei, David Duvenaud, José Miguel Hernández-Lobato, Benjamín Sánchez-Lengeling, Dennis Sheberla, Jorge Aguilera-Iparraguirre, Timothy D. Hirzel, Ryan P. Adams, and Alán Aspuru-Guzik. Automatic Chemical Design Using a Data-Driven Continuous Representation of Molecules. ACS Cent. Sci., 4(2):268–276, 2018.
198
+
199
+ Gabriel Lima Guimaraes, Benjamin Sanchez-Lengeling, Carlos Outeiral, Pedro Luis Cunha Farias, and Alán Aspuru-Guzik. Objective-Reinforced Generative Adversarial Networks (ORGAN) for Sequence Generation Models. arXiv preprint arXiv:1705.10843, 2018.
200
+
201
+ J. D. Hunter. Matplotlib: A 2D graphics environment. Comput. Sci. Eng., 9(3):90–95, 2007.
202
+
203
+ Tamara Husch and Markus Reiher. Comprehensive Analysis of the Neglect of Diatomic Differential Overlap Approximation. J. Chem. Theory Comput., 14(10):5169–5179, 2018.
204
+
205
+ Tamara Husch, Alain C. Vaucher, and Markus Reiher. Semiempirical molecular orbital models based on the neglect of diatomic differential overlap approximation. Int. J. Quantum Chem., 118 (24):e25799, 2018.
206
+
207
+ S. Rao Jammalamadaka and György H. Terdik. Harmonic analysis and distribution-free inference for spherical distributions. J. Multivar. Anal, 171:436–451, 2019.
208
+
209
+ Jan Jensen. XYZ2Mol. https://github.com/jensengroup/xyz2mol, 2019.
210
+
211
+ Wengong Jin, Connor Coley, Regina Barzilay, and Tommi Jaakkola. Predicting Organic Reaction Outcomes with Weisfeiler-Lehman Network. In Advances in Neural Information Processing Systems, pp. 2607–2616, 2017.
212
+
213
+ Mathias S. Jørgensen, Henrik L. Mortensen, Søren A. Meldgaard, Esben L. Kolsbjerg, Thomas L. Jacobsen, Knud H. Sørensen, and Bjørk Hammer. Atomistic structure learning. J. Chem. Phys., 151(5):054111, 2019.
214
+
215
+ Yeonjoon Kim and Woo Youn Kim. Universal Structure Conversion Method for Organic Molecules: From Atomic Connectivity to Three-Dimensional Geometry. Bull. Korean Chem. Soc., 36(7): 1769–1777, 2015.
216
+
217
+ Risi Kondor and Shubhendu Trivedi. On the Generalization of Equivariance and Convolution in Neural Networks to the Action of Compact Groups. In International Conference on Machine Learning, pp. 2747–2755. PMLR, 2018.
218
+
219
+ Risi Kondor, Zhen Lin, and Shubhendu Trivedi. Clebsch– Gordan Nets: A Fully Fourier Space Spherical Convolutional Neural Network. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 10117–10126. Curran Associates, Inc., 2018.
220
+
221
+ Gregory Landrum. RDKit 2019.09.3. http://www.rdkit.org/, 2019. (Accessed: 22. January 2019).
222
+
223
+ V. I. Lebedev. Values of the nodes and weights of ninth to seventeenth order gauss-markov quadrature formulae invariant under the octahedron group with inversion. Zh. Vychisl. Mat. Mat. Fiz., 15(1):44–51, 1975.
224
+
225
+ V. I. Lebedev. Spherical quadrature formulas exact to orders 25–29. Sibirsk. Mat. Zh., 18(1):99–107, 1977.
226
+
227
+ Yibo Li, Liangren Zhang, and Zhenming Liu. Multi-objective de novo drug design with conditional graph generative model. J. Cheminf., 10(1):33, 2018a.
228
+
229
+ Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning Deep Generative Models of Graphs. arXiv preprint arXiv:1803.03324, 2018b.
230
+
231
+ Qi Liu, Miltiadis Allamanis, Marc Brockschmidt, and Alexander Gaunt. Constrained Graph Variational Autoencoders for Molecule Design. In Advances in Neural Information Processing Systems, pp. 7795–7804, 2018.
232
+
233
+ Wes McKinney. Data Structures for Statistical Computing in Python. In Stéfan van der Walt and Jarrod Millman (eds.), Proceedings of the 9th Python in Science Conference, pp. 51–56, 2010.
234
+
235
+ Søren A. Meldgaard, Henrik L. Mortensen, Mathias S. Jørgensen, and Bjørk Hammer. Structure prediction of surface reconstructions by deep reinforcement learning. J. Phys.: Condens. Matter, 32(40):404005, 2020.
236
+
237
+ Benjamin Kurt Miller, Mario Geiger, Tess E. Smidt, and Frank Noé. Relevance of Rotationally Equivariant Convolutions for Predicting Molecular Properties. arXiv preprint arXiv:2008.08461, 2020.
238
+
239
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
240
+
241
+ Daniel Neil, Marwin Segler, Laura Guasch, Mohamed Ahmed, Dean Plumbley, Matthew Sellwood, and Nathan Brown. Exploring Deep Recurrent Models with Reinforcement Learning for Molecule Design. OpenReview, 2018. URL https://openreview.net/forum?id ${ . } =$ HkcTe-bR-.
242
+
243
+ Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de-novo design through deep reinforcement learning. J. Cheminf., 9(1):48, 2017.
244
+
245
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp. 8026–8037. Curran Associates, Inc., 2019.
246
+
247
+ Mariya Popova, Olexandr Isayev, and Alexander Tropsha. Deep reinforcement learning for de novo drug design. Sci. Adv., 4(7):eaap7885, 2018.
248
+
249
+ Evgeny Putin, Arip Asadulaev, Yan Ivanenkov, Vladimir Aladinskiy, Benjamin Sanchez-Lengeling, Alán Aspuru-Guzik, and Alex Zhavoronkov. Reinforced Adversarial Neural Computer for de Novo Molecular Design. J. Chem. Inf. Model., 58(6):1194–1204, 2018.
250
+
251
+ Petra Schneider, W. Patrick Walters, Alleyn T. Plowright, Norman Sieroka, Jennifer Listgarten, Robert A. Goodnow, Jasmin Fisher, Johanna M. Jansen, José S. Duca, Thomas S. Rush, Matthias Zentgraf, John Edward Hill, Elizabeth Krutoholow, Matthias Kohler, Jeff Blaney, Kimito Funatsu, Chris Luebkemann, and Gisbert Schneider. Rethinking drug design in the artificial intelligence era. Nat. Rev. Drug Discovery, pp. 1–12, 2019.
252
+
253
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
254
+
255
+ Marwin H. S. Segler, Thierry Kogej, Christian Tyrchan, and Mark P. Waller. Generating Focused Molecule Libraries for Drug Discovery with Recurrent Neural Networks. ACS Cent. Sci., 4(1): 120–131, 2018.
256
+
257
+ Gregor NC Simm, Robert Pinsler, and José Miguel Hernández-Lobato. Reinforcement learning for molecular design guided by quantum mechanics. In International Conference on Machine Learning, 2020. URL http://arxiv.org/abs/2002.07717.
258
+
259
+ James J. P. Stewart. Optimization of parameters for semiempirical methods V: Modification of NDDO approximations and application to 70 elements. J. Mol. Model., 13(12):1173–1213, 2007.
260
+
261
+ Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
262
+
263
+ Nathaniel Thomas, Tess Smidt, Steven Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor field networks: Rotation- and translation-equivariant neural networks for 3D point clouds. arXiv prepint arXiv:1802.08219, 2018.
264
+
265
+ Elise van der Pol, Daniel E Worrall, Herke van Hoof, Frans A Oliehoek, and Max Welling. MDP homomorphic networks: Group symmetries in reinforcement learning. arXiv preprint arXiv:2006.16908, 2020.
266
+
267
+ Maurice Weiler, Mario Geiger, Max Welling, Wouter Boomsma, and Taco S Cohen. 3D Steerable CNNs: Learning Rotationally Equivariant Features in Volumetric Data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 10381–10392. Curran Associates, Inc., 2018.
268
+
269
+ Jiaxuan You, Bowen Liu, Zhitao Ying, Vijay Pande, and Jure Leskovec. Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation. In Advances in Neural Information Processing Systems, pp. 6410–6421, 2018.
270
+
271
+ Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in Neural Information Processing Systems, pp. 3391–3401, 2017.
272
+
273
+ Zhenpeng Zhou, Steven Kearnes, Li Li, Richard N. Zare, and Patrick Riley. Optimization of Molecules via Deep Reinforcement Learning. Sci. Rep., 9(1):1–10, 2019.
274
+
275
+ # A REWARD CALCULATION
276
+
277
+ In the reward function, the energy $E$ has to be computed using quantum-chemical methods. For that, we use the fast semi-empirical Parametrized Method 6 (PM6) (Stewart, 2007). In particular, we use the implementation in the software package SPARROW (Husch et al., 2018; Bosia et al., 2020). For each calculation, a molecular charge of zero and the lowest possible spin multiplicity are chosen. All calculations are spin-unrestricted.
278
+
279
+ Limitations of semi-empirical methods are highlighted in, for example, recent work by Husch & Reiher (2018). More accurate methods such as approximate density functionals need to be employed especially for systems containing transition metals.
280
+
281
+ Further, we enforce that atoms are not placed too close $( < 0 . 6 \mathring \mathrm { A } )$ nor too far away from each other $( > 2 . 0 \mathring \mathrm { A } )$ . If the agent places an atom outside these boundaries, the minimum reward of $- 0 . 6$ is awarded and the episode terminates. Further, the environment encourages the agents to build single molecular structures by terminating the episode and return a reward of $- 0 . 6$ if elements forming stable bimolecular compounds (e.g, $\mathrm { H } _ { 2 }$ ) are placed too far away from other atoms on the canvas.
282
+
283
+ # B SPHERICAL HARMONICS
284
+
285
+ The spherical harmonics form an orthonormal basis of the Hilbert space of square-integrable functions $\dot { L } _ { \mathbb { C } } ^ { 2 } ( S ^ { 2 } )$ . The first few spherical harmonics are given by:
286
+
287
+ $$
288
+ Y _ { 0 } ^ { 0 } ( \vartheta , \varphi ) = \frac { 1 } { 2 \sqrt { \pi } } ,
289
+ $$
290
+
291
+ $$
292
+ Y _ { 1 } ^ { - 1 } ( \vartheta , \varphi ) = \sqrt { \frac { 3 } { 8 \pi } } \sin \vartheta e ^ { - i \varphi } , \quad Y _ { 1 } ^ { 0 } ( \vartheta , \varphi ) = \sqrt { \frac { 3 } { 4 \pi } } \cos \vartheta , \quad Y _ { 1 } ^ { 1 } ( \vartheta , \varphi ) = - \sqrt { \frac { 3 } { 8 \pi } } \sin \vartheta e ^ { i \varphi } ,
293
+ $$
294
+
295
+ $$
296
+ \begin{array} { l } { { \displaystyle Y _ { 2 } ^ { - 2 } ( \vartheta , \varphi ) = \sqrt { \frac { 1 5 } { 3 2 \pi } } \sin ^ { 2 } \vartheta e ^ { - i 2 \varphi } , \quad Y _ { 2 } ^ { - 1 } ( \vartheta , \varphi ) = \sqrt { \frac { 1 5 } { 8 \pi } } \cos \vartheta \sin \vartheta e ^ { - i \varphi } , } } \\ { { \displaystyle Y _ { 2 } ^ { 0 } ( \vartheta , \varphi ) = \sqrt { \frac { 5 } { 1 6 \pi } } \left( 3 \cos ^ { 2 } \vartheta - 1 \right) , } } \\ { { \displaystyle Y _ { 2 } ^ { 1 } ( \vartheta , \varphi ) = - \sqrt { \frac { 1 5 } { 8 \pi } } \cos \vartheta \sin \vartheta e ^ { i \varphi } , \quad Y _ { 2 } ^ { 2 } ( \vartheta , \varphi ) = \sqrt { \frac { 1 5 } { 3 2 \pi } } \sin ^ { 2 } \vartheta e ^ { i 2 \varphi } . } } \end{array}
297
+ $$
298
+
299
+ The spherical harmonics are normalized such that:
300
+
301
+ $$
302
+ \int _ { 0 } ^ { 2 \pi } \int _ { 0 } ^ { \pi } | Y _ { \ell } ^ { m } ( \vartheta , \varphi ) | ^ { 2 } \sin \vartheta d \vartheta d \varphi = 1 \qquad \forall \ell , m .
303
+ $$
304
+
305
+ # C CALCULATION OF INVARIANT FEATURES
306
+
307
+ One can obtain scalar invariats from the covariant features $\hat { f }$ (Anderson et al., 2019):
308
+
309
+ • Take the component $\ell = 0$ : $\xi _ { 1 } ( \hat { f } ) = \hat { f } _ { \ell = 0 }$ .
310
+ • Calculate the scalar product with itself: $\xi _ { 2 } ( \hat { f } _ { \ell } ) = \mathrm { R e } [ \tilde { \xi } _ { 2 } ( \hat { f } ) ] + \mathrm { I m } [ \tilde { \xi } _ { 2 } ( \hat { f } ) ]$ , where $\tilde { \xi } _ { 2 } ( \hat { f } ) =$ $\begin{array} { r } { \sum _ { m = - \ell } ^ { \ell } ( - 1 ) ^ { m } \hat { f } _ { \ell } ^ { m } \hat { f } _ { \ell } ^ { - m } } \end{array}$ .
311
+ • Calculate the SO(3)-invariant norm: $\begin{array} { r } { \xi _ { 3 } ( \hat { f } _ { \ell } ) = \sum _ { m = - \ell } ^ { \ell } \hat { f } _ { \ell } ^ { m } \left( \hat { f } _ { \ell } ^ { m } \right) ^ { * } } \end{array}$ , where $^ *$ denotes the complex conjugate.
312
+
313
+ The invariant components are then concatenated $f ^ { \mathrm { i n v } } \gets \mathcal { T } _ { \mathrm { i n v } } = \xi _ { 1 } ( \hat { f } ) \oplus \left( \bigoplus _ { \ell = 0 } ^ { L } \xi _ { 2 } ( \hat { f } _ { \ell } ) \oplus \xi _ { 3 } ( \hat { f } _ { \ell } ) \right)$ .
314
+
315
+ # D PROBABILITY DISTRIBUTION FOR ORIENTATION
316
+
317
+ In the main paper, we propose the expression in Eq. (5) for the distribution $p ( \tilde { { \boldsymbol { x } } } | d , e , f , s )$ . An alternative, equally valid expression is
318
+
319
+ $$
320
+ p ( \tilde { x } | d , e , f , s ) = \left| \sum _ { \ell = 0 } ^ { L _ { \mathrm { m a x } } } \sum _ { m = - \ell } ^ { \ell } \frac { 1 } { \sqrt { k } } \hat { r } _ { \ell } ^ { m } Y _ { \ell } ^ { m } ( \tilde { x } ) \right| ^ { 2 } ,
321
+ $$
322
+
323
+ where the term $1 / \sqrt { k }$ with $\begin{array} { r } { k = \sum _ { \ell = 0 } ^ { L _ { \mathrm { m a x } } } \sum _ { m = - \ell } ^ { \ell } \lvert \hat { r } _ { \ell } ^ { m } \rvert ^ { 2 } } \end{array}$ normalizes the distribution. We found experimentally that an agent using this expression performs worse when generating molecular structures featuring complex geometries. We hypothesize that this is because the distribution cannot get peaked enough for $L _ { \mathrm { m a x } } \le 5$ . As larger $L _ { \mathrm { m a x } }$ would result in a significant increase in computational complexity, we chose the expression in Eq. (5) over that in Eq. (11).
324
+
325
+ The normalization constant $Z$ in Eq. (5) is estimated via Lebedev quadrature with 1730 angular grid points (Lebedev, 1975; 1977). We sample from the distribution in Eq. (5) using rejection sampling (Bishop, 2009) with a uniform proposal distribution $\begin{array} { r } { q ( \tilde { x } ) = \frac { 1 } { 4 \pi } } \end{array}$ . In rejection sampling, one first draws a sample from $\tilde { x } _ { 0 }$ from $q ( \tilde { x } )$ . Then, one generates a random number $u _ { 0 }$ from the uniform distribution over $[ 0 , M q ( \tilde { x } _ { 0 } ) ]$ , where $M$ is such that $M q ( \tilde { x } ) \geq p ( \tilde { x } | d , e , f , s )$ . We determine $M$ by evaluating $p ( \tilde { { \boldsymbol { x } } } | d , e , f , s )$ on a uniform grid on $S ^ { 2 }$ employing a Fibonacci ‘sunflower’ grid. Finally, if $u _ { 0 } > p ( \tilde { x } | d , e , f , s )$ then the sample is accepted.
326
+
327
+ We ran an experiment to compare the COVARIANT agent as described in the main paper with an agent employing Eq. 11 for the distribution $p ( \tilde { { \boldsymbol { x } } } | d , e , f , s )$ . In Fig. 7, the hypothesis that the distribution in Eq. 11 cannot get narrow enough is confirmed. After 40 000 steps, the online performance of the alternative agent COVARIANT (ALT.) converges to around 0.5, which is significantly lower compared to COVARIANT. Note that the difference is smaller when considering the offline return because the estimated global mode for each distribution could still be similar.
328
+
329
+ ![](images/87842188616feb1dfa279ad2ec31e8be448e5f0645174fc3670ee81470804049.jpg)
330
+ Figure 7: Comparison of COVARIANT agent (red) with an agent employing alternative distribution for the orientation $\tilde { x }$ (green). The average online performance on the single-bag task with $B = \mathrm { S F _ { 6 } }$ across 5 seeds is shown. Dashed lines denote the optimal return for the experiment. Error bars indicate two standard deviations.
331
+
332
+ # E BASELINES
333
+
334
+ # E.1 OPT AGENT
335
+
336
+ Below, we detail the algorithm of the OPT agent. At the beginning of each experiment, the agent is given a canvas $\mathcal { C } _ { 0 }$ , a bag $B _ { 0 }$ , and a black-box function that can compute the energy $E ( \mathcal { C } )$ and the atomic forces $F ( \mathcal { C } )$ for a given canvas. We assume a total charge of zero and a low-spin configuration. At the end of each experiment, we compute the total reward obtained for the final structure on canvas $\mathcal { C } _ { T }$ and report the total number of energy and gradient computations.
337
+
338
+ 1. If the canvas $\mathcal { C } _ { t }$ is not empty, randomly choose a focal atom $f$ from the list of available atoms on the canvas. An atom is considered available if its number of neighbors is less than a predefined number that depends on its element (e.g., one for hydrogen and four for carbon). Two atoms on the canvas are neighbors if their Euclidean distance is below $1 . 5 \mathrm { \AA }$ . If there are no available atoms on the canvas, a focal atom is randomly chosen from the list of atoms on the canvas.
339
+
340
+ 2. Randomly choose an element $e _ { t }$ from the bag $B _ { t }$ .
341
+
342
+ 3. Randomly place the atom $\boldsymbol a _ { t } = ( e _ { t } , x _ { t } )$ on a sphere with radial distance $d = 1 . 1 \mathring \mathrm { A }$ around $x _ { f }$ to obtain $\mathcal { C } _ { t + 1 , \mathrm { r a w } }$ . If the canvas is empty, place the atom at the origin.
343
+
344
+ 4. Optimize only the position of $a _ { t }$ using $F$ to obtain $\mathcal { C } _ { t + 1 , \mathrm { { o p t } } }$
345
+
346
+ 5. Compute the energy difference $\Delta E ( t ) = E ( \mathcal C _ { t + 1 , \mathrm { o p t } } ) - [ E ( \mathcal C _ { t } ) + E ( \{ e _ { t } , \bf 0 \} ) ] .$
347
+
348
+ 6. If $\Delta E ( t ) > 0$ , return $e _ { t }$ to the bag and go back to step 1.
349
+
350
+ 7. Optimize canvas $\mathcal { C } _ { t + 1 , \mathrm { o p t } }$ using $F$ to obtain $\mathcal { C } _ { t + 1 }$
351
+
352
+ 8. Increment $t$ by 1.
353
+
354
+ 9. If the bag is not empty, go back to step 1.
355
+
356
+ In the experiments, the different agents need to be given a comparable computational budget to ensure a meaningful comparison of their performance. This is difficult as they use different computational resources: OPT runs on a CPU whereas INTERNAL and COVARIANT perform many of their computations on a GPU. However, we found experimentally that the quantum-chemical calculations are the most computationally expensive ones. These calculations are performed in the same way for all approaches. Therefore, we believe that by granting each approach the same number of PM6 calculations we achieve a fair comparison.
357
+
358
+ # E.2 OPTIMAL RETURN
359
+
360
+ The optimal return for the single-bag tasks was derived in the following way. First, we obtained molecular structures for the complexes $\mathrm { S O F _ { 4 } }$ $_ { 4 } , { \mathrm { I F } } _ { 5 } , { \mathrm { S I } }$ $\mathrm { S F } _ { 6 }$ , and ${ \mathrm { S O F } } _ { 6 }$ . Subsequently, we performed a structure optimization using the PM6 method. Since the undiscounted return is path-independent, we determined the return $R ( s )$ by computing the total interaction energy in the canvas $\mathcal { C }$ , i.e.
361
+
362
+ $$
363
+ R ( s ) = \left\{ \sum _ { i = 1 } ^ { | { \mathcal { C } } | } E ( \{ e _ { i } , \mathbf { 0 } \} ) \right\} - E ( \mathcal { C } ) .
364
+ $$
365
+
366
+ # F EXPERIMENTAL DETAILS
367
+
368
+ # F.1 COMPUTING INFRASTRUCTURE
369
+
370
+ Experiments were run on an Intel Xeon E5-2650 v4 2.2GHz 12-core processor (96GiB RAM) and an Nvidia P100 GPU (16GiB). Our agent is implemented in the deep learning framework PyTorch (Paszke et al., 2019). Data analysis was performed with the Python libraries matplotlib (Hunter, 2007) and pandas (McKinney, 2010).
371
+
372
+ # F.2 IMPLEMENTATION DETAILS
373
+
374
+ The model architecture is summarized in Table 2, where the dimensions of $s ^ { \mathrm { i n v } }$ and $s _ { f , e } ^ { \mathrm { i n v } }$ are $d ^ { \mathrm { i n v } } = ( L _ { \mathrm { m a x } } + 2 ) \cdot \tau \cdot 2$ and $d _ { f , e } ^ { \mathrm { i n v } } = ( L _ { \mathrm { m a x } } + 2 ) \cdot \tau _ { e } \cdot 2 \nonumber$ , respectively. If possible, we made similar architectural choices as Simm et al. (2020), e.g. regarding the number of hidden units/layers, activation functions, and initialization schemes. We initialize the biases of each network with 0 and each weight matrix as a (semi-)orthogonal matrix. After each hidden layer, a ReLU non-linearity is employed. As explained in the main text, both ${ \mathrm { M L P } } _ { f }$ and $\mathbf { M L P } _ { e }$ use a masked softmax activation function to guarantee that only valid actions are chosen. To model the distance $d$ , we employ a Gaussian mixture model consisting of $M = 3$ Gaussians. As we treat the standard deviations $\{ \sigma _ { m } \} _ { m = 1 } ^ { 3 }$ as global parameters, the MDN has 6 outputs. Further, we rescale the means $\mu _ { m } \in [ - 1 , 1 ]$ to $\bar { \mu _ { m } } \bar { \bf \Phi } \in [ d _ { \operatorname* { m i n } } , d _ { \operatorname* { m a x } } ]$ . If the sampled distance is negative, we clip the value at 0.001.
375
+
376
+ Table 2: Model architecture for actor and critic networks.
377
+
378
+ <table><tr><td>Network</td><td>Dimensions per layer</td><td>Output activation</td></tr><tr><td>MLP f</td><td>dinv,128,1</td><td>masked softmax</td></tr><tr><td>MLPe</td><td>dinv,128,emax</td><td>masked softmax</td></tr><tr><td>MDN</td><td></td><td>linear (πm),tanh (μm)</td></tr><tr><td>MLPΦ</td><td>dinv,128,128</td><td>linear</td></tr><tr><td>MLPp</td><td>128,128,1</td><td>linear</td></tr></table>
379
+
380
+ Hyperparameters for CORMORANT are listed in Table 3. In our experiments, we found it important to use multiple filters $\tau _ { e }$ per element (e.g. 4) and to set $L _ { \operatorname* { m a x } } = 4$ . This gives the model enough flexibility to represent complex spherical distributions while remaining computationally tractable. For more details on CORMORANT, see the original work (Anderson et al., 2019). Further hyperparameters used in our experiments are in Table 4. PPO is known to be relatively robust with respect to the choice of hyperparameters, and we found the default values to be sufficient in most cases. Within the actor, the scaling parameter $\beta$ is important to avoid that the spherical distribution approaches a delta distribution. Note that values of $\beta$ can vary significantly across experiments and might require some tuning. Lastly, the right number of samples $S$ for the global mode estimation of the spherical distribution generally depends on the shape of the distribution. In particular, we would expect that more samples are required as the distribution becomes more peaked. Since we avoid pathological behaviors by scaling the distribution with $\beta$ , we found $S = 1 0 2 4$ to be sufficient for all our experiments.
381
+
382
+ Table 3: Hyperparameters for CORMORANT (Anderson et al., 2019) used in all experiments.
383
+
384
+ <table><tr><td>Hyperparameter</td><td>Value</td></tr><tr><td>Number of Clebsch-Gordan layers</td><td>3</td></tr><tr><td>Lmax in spherical harmonics series expansion</td><td>4</td></tr><tr><td>Number of filters Te per element</td><td>4</td></tr><tr><td>Number of filters T</td><td>Te·Ne</td></tr></table>
385
+
386
+ Table 4: Hyperparameters for the single-bag, multi-bag and stochastic-bag tasks. Values in parentheses were only used for the single-bag task. For further details on how the PPO hyperparameters are defined, please refer to Schulman et al. (2017).
387
+
388
+ <table><tr><td>Hyperparameter</td><td>Search Set</td><td>Value</td></tr><tr><td>Range [dmin, dmax] (A) Number of workers</td><td></td><td>[0.95,1.80] 10</td></tr><tr><td>PPO clipping e</td><td></td><td>0.2</td></tr><tr><td>PPO gradient clipping</td><td></td><td>0.5</td></tr><tr><td>PPO GAE parameter 入</td><td></td><td>0.95</td></tr><tr><td>PPO value function coeficient C1</td><td></td><td>1</td></tr><tr><td>PPO entropy coefficient C2</td><td>{0.01, 0.05}</td><td>0.01</td></tr><tr><td>Number of optimization epochs</td><td></td><td>7</td></tr><tr><td></td><td></td><td>3·10-4</td></tr><tr><td>Adam stepsize</td><td></td><td>0.99</td></tr><tr><td>Discount factor y</td><td></td><td>20 · |B|</td></tr><tr><td>Time horizon T</td><td></td><td></td></tr><tr><td>Distance clipping</td><td>{−100,−10,−1,1,10,100}</td><td>0.001</td></tr><tr><td>Scaling factor β</td><td></td><td>100 (-10)</td></tr><tr><td>Number of samples S for mode estimation</td><td></td><td>1024</td></tr></table>
389
+
390
+ ![](images/5abec0b59f70b100b7fe81477792545c23610fc2ae0143ff2184a0f7ada39780.jpg)
391
+ Figure 8: Average offline performance on the stochastic-bag task with $B ^ { * } = \mathrm { C _ { 7 } H _ { 8 } N _ { 2 } O _ { 2 } }$ evaluated on (a) $\mathrm { C } _ { 7 } \mathrm { H } _ { 8 } \mathrm { N } _ { 2 } \mathrm { O } _ { 2 }$ and (b) larger, unseen bags $\mathrm { \{ C _ { 6 } H _ { 1 4 } O _ { 3 } } $ , $\mathrm { C _ { 7 } H _ { 1 6 } O }$ , $\mathrm { C _ { 7 } H _ { 1 6 } O _ { 2 } }$ , $\mathrm { C _ { 8 } H _ { 1 8 } O } \}$ across 10 seeds. For comparison, we show an agent that is trained only on the test bags (purple). Error bars indicate two standard deviations.
392
+
393
+ In Fig. 9, a selection of molecular structures generated by the three agents during offline evaluation is shown. The agents are trained on a distribution over bags with $\bar { B ^ { * } } = \mathrm { C _ { 7 } H _ { 1 0 } } \mathrm { \bar { O } _ { 2 } }$ and tested on sets of larger, out-of-distribution bags $\{ \mathrm { C _ { 6 } H _ { 1 4 } O _ { 3 } , C _ { 7 } H _ { 1 6 } O , C _ { 7 } H _ { 1 6 } O _ { 2 } , C _ { 8 } H _ { 1 8 } O } \}$ (cf. Fig. 6 in the main text). From visual inspection of the structures, it can be seen why OPT fails at this task: it tends to generate molecular clusters, often containing $\mathrm { H } _ { 2 }$ . Similarly, INTERNAL commonly builds $_ { \mathrm { H } _ { 2 } \mathrm { O } }$ molecules instead of constructing a single organic molecule out of the atoms in the bag. By contrast, COVARIANT often builds valid molecules. Further, its generated structures are more often “branched” than those of INTERNAL, indicating a higher degree of complexity.
394
+
395
+ ![](images/db6f11b98aa3af0d3a1a063755f4869c4bd9677af4248518c2fcd41f9c2eedcd.jpg)
396
+ Figure 9: Selection of molecular structures generated by (a) OPT, (b) INTERNAL, and (c) COVARIANT during the last offline evaluation. The agents are trained on a distribution over bags with $B ^ { * } =$ $\mathrm { C _ { 7 } H _ { 1 0 } O _ { 2 } }$ and tested on the out-of-distribution bags $\mathrm { \{ C _ { 6 } H _ { 1 4 } O _ { 3 } } $ , $\mathrm { C _ { 7 } H _ { 1 6 } O }$ , $\mathrm { C _ { 7 } H _ { 1 6 } O _ { 2 } }$ , $\mathrm { C _ { 8 } H _ { 1 8 } O } \}$ .
397
+
398
+ Next, we assess the ability of COVARIANT to generate solvation clusters—a type of molecular structure that cannot be built with graph-based approaches. Following Simm et al. (2020), we task the agent to place 5 water molecules around a formaldehyde molecule that is already on the canvas at the beginning of each episode. In addition, the reward function is augmented with a penalty term for placing atoms far away from the center, i.e. $\boldsymbol { r } ( s _ { t } , a _ { t } ) = - \Delta _ { E } - \rho \| \boldsymbol { x } \| _ { 2 }$ , where $\rho$ is a hyper-parameter that is set to 0.01 (see Simm et al. (2020) for details). Therefore, the agent needs to place the water molecules such that hydrogen bonds can be formed between water molecules and between water molecules and the solute.
399
+
400
+ ![](images/afc4ae97a54b9c3b9324c4db3269ce7ce7460698594910777cd7889d51250b3c.jpg)
401
+ Figure 10: Average offline performance on the solvation task with 5 $_ { \mathrm { H } _ { 2 } \mathrm { O } }$ molecules and formaldehyde as the solute across 10 seeds. Error bars show two standard errors. The dashed line denotes the optimal return. A selection of molecular clusters generated by the COVARIANT agent is shown.
402
+
403
+ From Fig. 10, it can be seen that COVARIANT can solve this task by constructing stable $_ { \mathrm { H } _ { 2 } \mathrm { O } }$ molecules and placing them in the vicinity of the solute. From visual inspection of the generated structures, it can be observed that in many cases COVARIANT arranges the molecules such that intermolecular bonds can be formed. However, it should be noted that the quantum-chemical method used in the reward function is not very well suited for modeling these interactions. Finally, Fig. 10 shows that while INTERNAL learns faster at the beginning of training, COVARIANT is slightly outperforming INTERNAL towards the end.
404
+
405
+ # H RUNTIME EVALUATION
406
+
407
+ We compared the runtimes between OPT, INTERNAL, and COVARIANT. For instance, for the singlebag task with the bag ${ \mathrm { C } } _ { 3 } { \mathrm { H } } _ { 5 } { \mathrm { N O } } _ { 3 }$ , $T = 2 4 0$ steps of the last rollout took COVARIANT and INTERNAL on average 12 and 11 seconds (s), respectively. The final offline evaluation took the agents on average 4 and 1s, respectively. This speed difference is mainly due to the relatively slow rejection sampling procedure in COVARIANT. Each iteration, policy optimization took on average 2 and 6s for the agents COVARIANT and INTERNAL, respectively. In this case, INTERNAL is slower than COVARIANT as it performed around twice as many epochs during optimization due to early stopping. Since there is no training for OPT, this agent was overall faster than the others. Further, we note that the largest fraction of time was spent on the quantum-chemical calculations which are the same for all agents. The time the quantum-chemical calculation takes to converge depends not only on the size but also on the geometry of the input structure. The entire experiment took COVARIANT approximately 4 hours, INTERNAL 5 hours, and OPT 3 hours.
parse/train/jEYKjPE1xYN/jEYKjPE1xYN_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jEYKjPE1xYN/jEYKjPE1xYN_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/jEYKjPE1xYN/jEYKjPE1xYN_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/px0-N3_KjA/px0-N3_KjA.md ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # D4RL: DATASETS FOR DEEP DATA-DRIVEN REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The offline reinforcement learning (RL) setting (also known as full batch RL), where a policy is learned from a static dataset, is compelling as progress enables RL methods to take advantage of large, previously-collected datasets, much like how the rise of large datasets has fueled results in supervised learning. However, existing online RL benchmarks are not tailored towards the offline setting and existing offline RL benchmarks are restricted to data generated by partially-trained agents, making progress in offline RL difficult to measure. In this work, we introduce benchmarks specifically designed for the offline setting, guided by key properties of datasets relevant to real-world applications of offline RL. With a focus on dataset collection, examples of such properties include: datasets generated via hand-designed controllers and human demonstrators, multitask datasets where an agent performs different tasks in the same environment, and datasets collected with mixtures of policies. By moving beyond simple benchmark tasks and data collected by partially-trained RL agents, we reveal important and unappreciated deficiencies of existing algorithms. To facilitate research, we have released our benchmark tasks and datasets with a comprehensive evaluation of existing algorithms, an evaluation protocol, and open-source examples. This serves as a common starting point for the community to identify shortcomings in existing offline RL methods and a collaborative route for progress in this emerging area.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Impressive progress across a range of machine learning applications has been driven by high-capacity neural network models with large, diverse training datasets (Goodfellow et al., 2016). While reinforcement learning (RL) algorithms have also benefited from deep learning (Mnih et al., 2015), active data collection is typically required for these algorithms to succeed, limiting the extent to which large, previously-collected datasets can be leveraged. Offline RL (Lange et al., 2012) (also known as full batch RL), where agents learn from previously-collected datasets, provides a bridge between RL and supervised learning. The promise of offline RL is leveraging large, previously-collected datasets in the context of sequential decision making, where reward-driven learning can produce policies that reason over temporally extended horizons. This could have profound implications for a range of application domains, such as robotics, autonomous driving, and healthcare.
12
+
13
+ ![](images/204843bf80394ab135b0e6b1d64748bede36c69ff7c32c8a435917f975ddbe5a.jpg)
14
+ Figure 1: A selection of proposed benchmark tasks.
15
+
16
+ Current offline RL methods have not fulfilled this promise yet. While recent work has investigated technical reasons for this (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019), a major challenge in addressing these issues has been the lack of standard evaluation benchmarks. Ideally, such a benchmark should: a) be composed of tasks that reflect challenges in real-world applications of data-driven RL, b) be widely accessible for researchers and define clear evaluation protocols for reproducibility, and c) contain a range of difficulty to differentiate between algorithms, especially challenges particular to the offline RL setting.
17
+
18
+ Most recent works (Fujimoto et al., 2018b; Wu et al., 2019; Kumar et al., 2019; Peng et al., 2019; Agarwal et al., 2019b) use existing online RL benchmark domains and data collected from training runs of online RL methods. However, these benchmarks were not designed with offline RL in mind and such datasets do not reflect the heterogenous nature of data collected in practice. Wu et al. (2019) find that existing benchmark datasets are not sufficient to differentiate between simple baseline approaches and recently proposed algorithms. Furthermore, the aforementioned works do not propose a standard evaluation protocol, which makes comparing methods challenging.
19
+
20
+ Why simulated environments? While relying on (existing) real-world datasets is appealing, evaluating a candidate policy is challenging because it weights actions differently than the data collection and may take actions that were not collected. Thus, evaluating a candidate policy requires either collecting additional data from the real-world system, which is hard to standardize and make broadly available, or employing off-policy evaluation, which is not yet reliable enough (e.g., the NeurIPS 2017 Criteo Ad Placement Challenge used off-policy evaluation, however, in spite of an unprecedentedly large dataset because of the variance in the estimator, top entries were not statistically distinguishable from the baseline). Both options are at odds with a widely-accessible and reproducible benchmark. As a compromise, we use high-quality simulations that have been battle-tested in prior domain-specific work, such as in robotics and autonomous driving. These simulators allow researchers to evaluate candidate policies accurately.
21
+
22
+ Our primary contribution is the introduction of Datasets for Deep Data-Driven Reinforcement Learning (D4RL): a suite of tasks and datasets for benchmarking progress in offline RL. We focus our design around tasks and data collection strategies that exercise dimensions of the offline RL problem likely to occur in practical applications, such as partial observability, passively logged data, or human demonstrations. To serve as a reference, we benchmark state-of-theart offline RL algorithms (Haarnoja et al., 2018b; Kumar et al., 2019; Wu et al., 2019; Agarwal et al., 2019b; Fujimoto et al., 2018a; Nachum et al., 2019; Peng et al., 2019; Kumar et al., 2020) and provide reference implementations as a starting point for future work. While previous studies (e.g., (Wu et al., 2019)) found that all methods including simple baselines performed well on the limited set of tasks used in prior work, we find that most algorithms struggle to perform well on tasks with properties crucial to real-world applications such as passively logged data, narrow data distributions, and limited human demonstrations. By moving beyond simple benchmark tasks and data collected by partially-trained RL agents, we reveal important and unappreciated deficiencies of existing algorithms. To facilitate adoption, we provide an easy-to-use API for tasks, datasets, and a collection of benchmark implementations of existing algorithms (https://sites.google.com/view/d4rl-anonymous/). This is a common starting point for the community to identify shortcomings in existing offline RL methods, and provides a meaningful metric for progress in this emerging area.
23
+
24
+ # 2 RELATED WORK
25
+
26
+ Recent work in offline RL has primarily used datasets generated by a previously trained behavior policy, ranging from a random initial policy to a near-expert online-trained policy. This approach has been used for continuous control for robotics (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019; Gulcehre et al., 2020), navigation (Laroche et al., 2019), industrial control (Hein et al., 2017), and Atari video games (Agarwal et al., 2019b). To standardize the community around common datasets, several recent works have proposed benchmarks for offline RL algorithms. Agarwal et al. (2019b); Fujimoto et al. (2019) propose benchmarking based on the discrete Atari domain. Concurrently to our work, Gulcehre et al. (2020) proposed a benchmark1 based on locomotion and manipulation tasks with perceptually challenging input and partial observability. While these are important contributions, both benchmarks suffer from the same shortcomings as prior evaluation protocols: they rely on data collected from online RL training runs. In contrast, with D4RL, in addition to collecting data from online RL training runs, we focus on a range of dataset collection procedures inspired by real-world applications, such as human demonstrations, exploratory agents, and hand-coded controllers. As alluded to by Wu et al. (2019) and as we show in our experiments, the performance of current methods depends strongly on the data collection procedure, demonstrating the importance of modeling realistic data collection procedures in a benchmark.
27
+
28
+ Offline RL using large, previously-collect datasets has been successfully applied to real-world systems such as in robotics (Cabi et al., 2019), recommender systems (Li et al., 2010; Strehl et al., 2010; Thomas et al., 2017), and dialogue systems (Henderson et al., 2008; Pietquin et al., 2011; Jaques et al., 2019). These successes point to the promise of offline RL, however, they rely on private real-world systems or expensive human labeling for evaluation which is not scalable or accessible for a benchmark. Moreover, significant efforts have been made to incorporate large-scale datasets into off-policy RL (Kalashnikov et al., 2018; Mo et al., 2018; Gu et al., 2017), but these works use large numbers of robots to collect online interaction during training. Pure online systems for realworld learning have included model-based approaches (Hester et al., 2011), or approaches which collect large amounts of data in parallel (Gu et al., 2017). While we believe these are promising directions for future research, the focus of this work is to provide a varied and accessible platform for developing algorithms.
29
+
30
+ # 3 BACKGROUND
31
+
32
+ The offline reinforcement learning problem statement is formalized within a Markov decision process (MDP), defined by a tuple $\bar { ( \boldsymbol { S } , A , P , R , \rho _ { 0 } , \gamma ) }$ , where $s$ denotes the state space, $\mathcal { A }$ denotes the action space, $P ( s ^ { \prime } | s , a )$ denotes the transition distribution, $\rho _ { 0 } ( s )$ denotes the initial state distribution, $R ( s , a )$ denotes the reward function, and $\gamma \in \mathsf { \Gamma } ( 0 , 1 )$ denotes the discount factor. The $\pi ( a | s )$ that maximizes the expected cumulative discounted rewardslso known as the discounted returns. $\begin{array} { r } { \bar { \boldsymbol { J } } ( \pi ) = E _ { \pi , P , \rho _ { 0 } } [ \sum _ { t = 0 } ^ { \infty } \bar { \boldsymbol { \gamma } } ^ { t } R ( \bar { s } _ { t } , \dot { a _ { t } } ) ] } \end{array}$
33
+
34
+ In episodic RL, the algorithm is given access to the MDP via trajectory samples for arbitrary $\pi$ of the algorithm’s choosing. Off-policy methods may use experience replay (Lin, 1992) to store these trajectories in a replay buffer $\mathcal { D }$ of transitions $( s _ { t } , a _ { t } , s _ { t + 1 } , r _ { t } )$ , and use an off-policy algorithm such as Q-learning (Watkins $\&$ Dayan, 1992) to optimize $\pi$ . However, these methods still iteratively collect additional data, and omitting this collection step can produce poor results. For example, running state-of-the-art off-policy RL algorithms on trajectories collected from an expert policy can result in diverging Q-values (Kumar et al., 2019).
35
+
36
+ In offline $R L$ , the algorithm no longer has access to the MDP, and is instead presented with a fixed dataset of transitions $\mathcal { D }$ . The (unknown) policy that generated this data is referred to as a behavior policy $\pi _ { B }$ . Effective offline RL algorithms must handle distribution shift, as well as data collected via processes that may not be representable by the chosen policy class. Levine et al. (2020) provide a comprehensive discussion of the problems affecting offline RL.
37
+
38
+ # 4 TASK DESIGN FACTORS
39
+
40
+ In order to design a benchmark that provides a meaningful measure of progress towards realistic applications of offline RL, we choose datasets and tasks to cover a range of properties designed to challenge existing RL algorithms. We discuss these properties as follows:
41
+
42
+ Narrow and biased data distributions, such as those from deterministic policies, are problematic for offline RL algorithms and may cause divergence both empirically (Fujimoto et al., 2018a; Kumar et al., 2019) and theoretically (Munos, 2003; Farahmand et al., 2010; Kumar et al., 2019; Agarwal et al., 2019a; Du et al., 2020). Narrow datasets may arise in human demonstrations, or when using hand-crafted policies. An important challenge in offline RL is to be able to gracefully handle diverse data distributions without algorithms diverging or producing performance worse than the provided behavior. A common approach for dealing with such data distributions is to adopt a conservative approach which tries to keep the behavior close to the data distribution (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019).
43
+
44
+ Undirected and multitask data naturally arises when data is passively logged, such as recording user interactions on the internet or recording videos of a car for autonomous driving. This data may not necessarily be directed towards the specific task one is trying to accomplish. However, pieces of trajectories can still provide useful information to learn from. For example, one may be able to combine sub-trajectories to accomplish a task. In the figure to the upper-right, if an agent is given trajectories from A-B and B-C in a dataset (left image), it can form a trajectory from AC by combining the corresponding halves of the original trajectories. We refer to this property as stitching, since the agent can use portions of existing trajectories in order to solve a task, rather than relying on generalization outside of the dataset.
45
+
46
+ Sparse rewards. Sparse reward problems pose challenges to traditional RL methods due to the difficulty of credit assignment and exploration. Because offline RL considers fixed datasets without exploration, sparse reward problems provide an unique opportunity to isolate the ability of algorithms to perform credit assignment decoupled from exploration.
47
+
48
+ ![](images/ba07cf2a7c183e919566af637c298c608191dcf1a691ca8953ddb04ee6effd43.jpg)
49
+ Figure 2: An example of stitching together subtrajectories to solve a task.
50
+
51
+ Suboptimal data. For tasks with a clear objective, the datasets may not contain behaviors from optimal agents. This represents a challenge for approaches such as imitation learning, which generally require expert demonstrations. We note prior work (e.g., (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019)) predominantly uses data with this property.
52
+
53
+ Non-representable behavior policies, non-Markovian behavior policies, and partial observability. When the dataset is generated from a partially-trained agent, we ensure that the behavior policy can be realized within our model class. However, real-life behavior may not originate from a policy within our model class, which can introduce additional representational errors. For example, data generated from human demonstrations or hand-crafted controllers may fall outside of the model class. More generally, non-Markovian policies and tasks with partial observability can introduce additional modeling errors when we estimate action probabilities under the assumption that the data was generated from a Markovian policy. These errors can cause additional bias for offline RL algorithms, especially in methods that assume access to action probabilities from a Markovian policy such as importance weighting (Precup et al., 2000).
54
+
55
+ Realistic domains. As we discussed previously, real-world evaluation is the ideal setting for benchmarking offline RL, however, it is at odds with a widely-accessible and reproducible benchmark. To strike a balance, we opted for simulated environments which have been previously studied and are broadly accepted by the research community. These simulation packages (such as MuJoCo, Flow, and CARLA) have been widely used to benchmark online RL methods and are known to fit well into that role. Moreover, on several domains we utilize human demonstrations or mathematical models of human behavior in order to provide datasets generated from realistic processes. However, this did have the effect of restricting our choice of tasks. While recent progress has been made on simulators for recommender systems (e.g., (Ie et al., 2019)), they use “stylized” user models and they have not been thoroughly evaluated by the community yet. In the future as simulators mature, we hope to include additional tasks.
56
+
57
+ In addition, we include a variety of qualitatively different tasks to provide broad coverage of the types of domains where offline RL could be used. We include locomotion, traffic management, autonomous driving, and robotics tasks. We also provide tasks with a wide range in difficulty, from tasks current algorithms can already solve to harder problems that are currently out of reach. Finally, for consistency with prior works, we also include the OpenAI Gym robotic locomotion tasks and similar datasets used by Fujimoto et al. (2018a); Kumar et al. (2019); Wu et al. (2019).
58
+
59
+ # 5 TASKS AND DATASETS
60
+
61
+ Given the properties outlined in Section 4, we assembled the following tasks and datasets. All tasks consist of an offline dataset (typically $1 0 ^ { 6 }$ steps) of trajectory samples for training, and a simulator for evaluation. The mapping is not one-to-one – several tasks use the same simulator with different datasets. Appendix C lists domains and dataset types along with their sources and Appendix A contains a more comprehensive table of statistics such as size. Our code and datasets have been released open-source and are on our website at https://sites.google.com/view/ d4rl-anonymous/.
62
+
63
+ Maze2D. (Non-markovian policies, undirected and multitask data) The Maze2D domain is a navigation task requiring a 2D agent to reach a fixed goal location. The tasks are designed to provide a simple test of the ability of offline RL algorithms to stitch together previously collected subtrajectories to find the shortest path to the evaluation goal. Three maze layouts are provided. The “umaze” and “medium” mazes are shown to the right, and the “large” maze is shown below.
64
+
65
+ ![](images/f8e9bd9413c8c6f357e6e9a95162ecee34027e4ab5d6a373adb2eb29e88bae96.jpg)
66
+
67
+ ![](images/7faa87c5a2b6188e0ec11cd42fe8cbbcf0dbcca32fb7dd618ae45308831489fb.jpg)
68
+
69
+ The data is generated by selecting goal locations at random and then using a planner that generates sequences of waypoints that are followed using a PD controller. In the figure on the left, the waypoints, represented by circles, are planned from the starting location (1) along the path to a goal (2). Upon reaching a threshold distance to a waypoint, the controller updates its internal state to track the next waypoint along the path to the goal. Once a goal is reached, a new goal is selected (3) and the process continues. The trajectories in the dataset are visualized in Appendix G. Because the controllers memorize the reached waypoints, the data collection policy is non-Markovian.
70
+
71
+ AntMaze. (Non-markovian policies, sparse rewards, undirected and multitask data) The AntMaze domain is a navigation domain that replaces the 2D ball from Maze2D with the more complex 8-DoF “Ant” quadraped robot. We introduce this domain to test the stitching challenge using a morphologically complex robot that could mimic real-world robotic navigation tasks. Additionally, for this task we use a sparse 0-1 reward which is activated upon reaching the goal.
72
+
73
+ The data is generated by training a goal reaching policy and using it in conjunction with the same high-level waypoint generator from Maze2D to provide subgoals that guide the agent to the goal. The same 3 maze layouts are used: “umaze”, “medium”, and “large”. We introduce three flavors of datasets: 1) the ant is commanded to reach a specific goal from a fixed start location (antmaze-umaze-v0), 2) in the “diverse” datasets, the ant is commanded to a random goal from a random start location, 3) in the “play” datasets, the ant is commanded to specific hand-picked locations in the maze (which are not necessarily the goal at evaluation), starting from a different set of hand-picked start locations. As in Maze2D, the controllers for this task are non-Markovian as they rely on tracking visited waypoints. Trajectories in the dataset are visualized in Appendix G.
74
+
75
+ ![](images/4c8de5d5c8898f3bb103a09b8c7662cd8958e6eb32d64de5bd189b46bc4dcb14.jpg)
76
+
77
+ Gym-MuJoCo. (Suboptimal agents, narrow data distributions) The Gym-MuJoCo tasks (Hopper, HalfCheetah, Walker2d) are popular benchmarks used in prior work in offline deep RL (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019). For consistency, we provide standardized datasets similar to previous work, and additionally propose mixing datasets to test the impact of heterogenous policy mixtures. We expect that methods that rely on regularizing to the behavior policy may fail when the data contains poorly performing trajectories.
78
+
79
+ The “medium” dataset is generated by first training a policy online using Soft Actor-Critic (Haarnoja et al., 2018a), early-stopping the training, and collecting 1M samples from this partially-trained policy. The “random” datasets are generated by unrolling a randomly initialized policy on these three domains. The “medium-replay” dataset consists of recording all samples in the replay buffer observed during training until the policy reaches the “medium” level of performance. Datasets similar to these three have been used in prior work, but in order to evaluate algorithms on mixtures of policies, we further introduce a “medium-expert” dataset by mixing equal amounts of expert demonstrations and suboptimal data, generated via a partially trained policy or by unrolling a uniform-at-random policy.
80
+
81
+ ![](images/574bc49332c7e072a31e492d630457b390d7b9149e94ac99433cf9e6f1173d89.jpg)
82
+
83
+ Adroit. (Non-representable policies, narrow data distributions, sparse rewards, realistic) The Adroit domain (Rajeswaran et al., 2018) (pictured left) involves controlling a 24-DoF simulated Shadow Hand robot tasked with hammering a nail, opening a door, twirling a pen, or picking up and moving a ball. This domain was selected to measure the effect of a narrow expert data distributions and human demonstrations on a sparse reward, high-dimensional robotic manipulation task.
84
+
85
+ ![](images/08047324d92867d1b3ad3ee01c388889cbafd40758edfe135a2178ffdc4d5e9b.jpg)
86
+
87
+ While Rajeswaran et al. (2018) propose utilizing human demonstrations, in conjunction with online RL fine-tuning, our benchmark adapts these tasks for evaluating the fully offline RL setting. We include three types of datasets for each task, two of which are included from the original paper: a small amount of demonstration data from a human (“human”) (25 trajectories per task) and a large amount of expert data from a fine-tuned RL policy (“expert”). To mimic the use-case where a practitioner collects a small amount of additional data from a policy trained on the demonstrations, we introduce a third dataset generated by training an imitation policy on the demonstrations, running the policy, and mixing data at a 50-50 ratio with the demonstrations, referred to as “cloned.” The Adroit domain has several unique properties that make it qualitatively different from the Gym MuJoCo tasks. First, the data is collected in from human demonstrators. Second, each task is difficult to solve with online RL, due to sparse rewards and exploration challenges, which make cloning and online RL alone insufficient. Lastly, the tasks are high dimensional, presenting a representation learning challenge.
88
+
89
+ FrankaKitchen. (Undirected and multitask data, realistic) The Franka Kitchen domain, first proposed by Gupta et al. (2019), involves controlling a 9-DoF Franka robot in a kitchen environment containing several common household items: a microwave, a kettle, an overhead light, cabinets, and an oven. The goal of each task is to interact with the items in order to reach a desired goal configuration. For example, one such state is to have the microwave and sliding cabinet door open with the kettle on the top burner and the overhead light on. This domain benchmarks the effect of multitask behavior on a realistic, non-navigation environment in which the “stitching” challenge is non-trivial because the collected trajectories are complex paths through the state space. As a result, algorithms must rely on generalization to unseen states in order to solve the task, rather than relying purely on trajectories seen during training.
90
+
91
+ ![](images/07148367f2a9ad735faa92f0fe7f537a3ef310d4d4d2e67d9df1669fc7fb6227.jpg)
92
+
93
+ In order to study the effect of “stitching” and generalization, we use 3 datasets of human demonstrations, originally proposed by Gupta et al. (2019). The “complete” dataset consists of the robot performing all of the desired tasks in order. This provides data that is easy for an imitation learning method to solve. The “partial” and “mixed” datasets consist of undirected data, where the robot performs subtasks that are not necessarily related to the goal configuration. In the “partial” dataset, a subset of the dataset is guaranteed to solve the task, meaning an imitation learning agent may learn by selectively choosing the right subsets of the data. The “mixed” dataset contains no trajectories which solve the task completely, and the RL agent must learn to assemble the relevant sub-trajectories. This dataset requires the highest degree of generalization in order to succeed.
94
+
95
+ ![](images/80c8476f51390edf1c5d4ce8bd37d1a3d34fe8184dca45bc2c567d361179971c.jpg)
96
+
97
+ Flow. (Non-representable policies, realistic) The Flow benchmark (Vinitsky et al., 2018) is a framework for studying traffic control using deep reinforcement learning. We use two tasks in the Flow benchmark which involve controlling autonomous vehicles to maximize the flow of traffic through a ring or merge road configuration (left).
98
+
99
+ We use the Flow domain in order to provide a task that simulates real-world traffic dynamics. A large challenge in autonomous driving is to be able to directly learn from human behavior. Thus, we include “human” data from agents controlled by the intelligent driver model (IDM) (Treiber et al., 2000), a hand-designed model of human driving behavior. In order to provide data with a wider distribution as a reference, we also include “random” data generated from an agent that commands random vehicle accelerations.
100
+
101
+ Offline CARLA. (Partial observability, non-representable policies, undirected and multitask data, realistic) CARLA (Dosovitskiy et al., 2017) is a high-fidelity autonomous driving simulator that has previously been used with imitation learning approaches (Rhinehart et al., 2018; Codevilla et al., 2018) from large, static datasets. The agent controls the throttle (gas pedal), the steering, and the break pedal for the car, and receives $4 8 \mathbf { x } 4 8$ RGB images from the driver’s perspective as observations. We propose two tasks for offline RL: lane following within a figure eight path (shown to the right, top picture), and navigation within a small town (bottom picture). The principle challenge of the CARLA domain is partial observability and visual complexity, as all observations are provided as first-person RGB images.
102
+
103
+ The datasets in both tasks are generated via hand-designed controllers meant to emulate human driving - the lane-following task uses simple heuristics to avoid cars and keep the car within lane boundaries, whereas the navigation task layers an additional high-level controller on top that takes turns randomly at intersections. Similarly to the Maze2D and AntMaze domains, this dataset consists of undirected navigation data in order to test the “stitching” property, however, it is in a more perceptually challenging domain.
104
+
105
+ ![](images/48da1059e526a5bfb3f938a24e44bdf4910cfae66d6e0c521b1f236183fc63bd.jpg)
106
+
107
+ Evaluation protocol. Previous work tunes hyperparameters with online evaluation inside the simulator, and as Wu et al. (2019) show, the hyperparameters have a large impact on performance. Unfortunately, extensive online evaluation is not practical in real-world applications and this leads to over optimistic performance expectations when the system is deployed in a truly offline setting. To rectify this problem, we designate a subset of tasks in each domain as “training” tasks, where hyperparameter tuning is allowed, and another subset as “evaluation” tasks on which final performance is measured (See Appendix D Table 5).
108
+
109
+ To facilitate comparison across tasks, we normalize scores for each environment roughly to the range between 0 and 100, by computing normalized $\mathtt { s c o r e } = 1 0 0 * \frac { \mathtt { s c o r e } - \mathtt { r a n d o m } \mathtt { s c o r e } } { \mathtt { e x p e r t } \mathtt { s c o r e } - \mathtt { r a n d o m } \mathtt { s c o r e } }$ . A normalized score of 0 corresponds to the average returns (over 100 episodes) of an agent taking actions uniformly at random across the action space. A score of 100 corresponds to the average returns of a domain-specific expert. For Maze2D, and Flow domains, this corresponds to the performance of the hand-designed controller used to collect data. For CARLA, AntMaze, and FrankaKitchen, we used an estimate of the maximum score possible. For Adroit, this corresponds to a policy trained with behavioral cloning on human-demonstrations and fine-tuned with RL. For Gym-MuJoCo, this corresponds to a soft-actor critic (Haarnoja et al., 2018b) agent.
110
+
111
+ # 6 BENCHMARKING PRIOR METHODS
112
+
113
+ We evaluated recently proposed offline RL algorithms and several baselines on our offline RL benchmarks. This evaluation (1) provides baselines as a reference for future work, and (2) identifies shortcomings in existing offline RL algorithms in order to guide future research. The average normalized performance for all tasks is plotted in the figure to the right. It is clear that as we move beyond simple tasks and data collection strategies, differences between algorithms are exacerbated and deficiencies in all algorithms are revealed. See Appendix Table 2 for
114
+
115
+ ![](images/f310841db94c8abe0aecfe7036a7249e96268f59a53ed79bfd687654da9c79d3.jpg)
116
+
117
+ normalized results for all tasks, Appendix Table 3 for unnormalized scores, and Appendix E for experimental details.
118
+
119
+ We evaluated behavioral cloning (BC), online and offline soft actor-critic (SAC) (Haarnoja et al., 2018b), bootstrapping error reduction (BEAR) (Kumar et al., 2019), and behavior-regularized actorcritic (BRAC) (Wu et al., 2019), advantage-weighted regression (AWR) (Peng et al., 2019), batchconstrained Q-learning (BCQ) (Fujimoto et al., 2018a), continuous action random ensemble mixtures (cREM) (Agarwal et al., 2019b), and AlgaeDICE (Nachum et al., 2019). We note that REM was originally designed for discrete action spaces, and the continuous action version has not been developed extensively. In most domains, we expect online SAC to outperform offline algorithms when given the same amount of data because this baseline is able to collect on-policy data. There are a few exceptions, such as for environments where exploration challenges make it difficult to find high-reward states, such as the Adroit and maze domains.
120
+
121
+ Overall, the benchmarked algorithms obtained the most success on datasets generated from an RLtrained policy, such as in the Adroit and Gym-MuJoCo domains. In these domains, offline RL algorithms are able to match the behavior policy when given expert data, and outperform when given suboptimal data. This positive result is expected, as it is the predominant setting in which these prior algorithms have been benchmarked in past work.
122
+
123
+ Another positive result comes in the form of sparse reward tasks. In particular, many methods were able to outperform the baseline online SAC method on the Adroit and AntMaze domains. This indicates that offline RL is a promising paradigm for overcoming exploration challenges, which has also been confirmed in recent work (Nair et al., 2020). We also find that conservative methods that constrain the policy to the dataset, such as BEAR, AWR, CQL, and BCQ, are able to handle biased and narrow data distributions well on domains such as Flow and Gym-MuJoCo.
124
+
125
+ Tasks with undirected data, such as the Maze2D, FrankaKitchen, CARLA and AntMaze domains, are challenging for existing methods. Even in the simpler Maze2D domain, the large maze provides a surprising challenge for most methods. However, the smaller instances of Maze2D and AntMaze are very much within reach of current algorithms. Mixture distributions (a form of non-representable policies) were also challenging for all algorithms we evaluated. For MuJoCo, even though the medium-expert data contains expert data, the algorithms performed roughly on-par with medium datasets, except for hopper. The same pattern was found in the cloned datasets for Adroit, where the algorithms mostly performed on-par with the limited demonstration dataset, even though they had access to additional data.
126
+
127
+ We find that many algorithms were able to succeed to some extent on tasks with controller-generated data, such as Flow and carla-lane. We also note that tasks with limited data, such as human demonstrations in Adroit and FrankaKitchen, remain challenging. This potentially points to the need for more sample-efficient methods, as big datasets may not be always be available.
128
+
129
+ # 7 DISCUSSION
130
+
131
+ We have proposed an open-source benchmark for offline RL. The choice of tasks and datasets were motivated by properties reflected in real-world applications, such as narrow data distributions and undirected, logged behavior. Existing benchmarks have largely concentrated on robotic control using data produced by policies trained with RL (Fujimoto et al., 2018a; Kumar et al., 2019; Wu et al., 2019; Gulcehre et al., 2020; Dulac-Arnold et al., 2020). This can give a misleading sense of progress, as we have shown in our experiments that many of the more challenging properties that we expect real-world datasets to have appear to result in a substantial challenge for existing methods.
132
+
133
+ We believe that offline RL holds great promise as a potential paradigm to leverage vast amounts of existing sequential data within the flexible decision making framework of reinforcement learning. We hope that providing a benchmark that is representative of potential problems in offline RL, but that still can be accessibly evaluated in simulation, will greatly accelerate progress in this field and create new opportunities to apply RL in many real-world application areas.
134
+
135
+ There are several important properties exhibited in some real-world applications of RL that are not explored in-depth in our benchmark. One is stochasticity of the environment, which can occur in systems such as financial markets, healthcare, or advertisement. And while we explore domains with large observation spaces, some domains such recommender systems can exhibit large action spaces. Finally, our tasks are predominantly in the robotics, autonomous driving, and traffic control. There are several other areas (e.g. in finance, industrial, or operations research) which could provide simulated, yet still challenging, benchmarks.
136
+
137
+ Ultimately, we would like to see offline RL applications move from simulated domains to real-world domains, using real-world datasets. This includes exciting areas such as recommender systems, where user behavior can be easily logged, and medicine, where doctors must keep complete medical records for each patient. A key challenge in these domains is that reliable evaluation must be done in a real system or using off-policy evaluation (OPE) methods. We believe that both reliable OPE methods and real-world benchmarks which are standardized across different research groups, will be important to establish for future benchmarks in offline RL.
138
+
139
+ # REFERENCES
140
+
141
+ Alekh Agarwal, Sham M Kakade, Jason D Lee, and Gaurav Mahajan. Optimality and approximation with policy gradient methods in markov decision processes. arXiv preprint arXiv:1908.00261, 2019a.
142
+
143
+ Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. Striving for simplicity in off-policy deep reinforcement learning. CoRR, abs/1907.04543, 2019b. URL http://arxiv.org/ abs/1907.04543.
144
+
145
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
146
+
147
+ Serkan Cabi, Sergio Gomez Colmenarejo, Alexander Novikov, Ksenia Konyushkova, Scott Reed, ´ Rae Jeong, Konrad Zołna, Yusuf Aytar, David Budden, Mel Vecerik, et al. A framework for ˙ data-driven robotics. arXiv preprint arXiv:1909.12200, 2019.
148
+
149
+ Felipe Codevilla, Matthias Miiller, Antonio Lopez, Vladlen Koltun, and Alexey Dosovitskiy. End- ´ to-end driving via conditional imitation learning. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018.
150
+
151
+ Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Proceedings of the 1st Annual Conference on Robot Learning, pp. 1–16, 2017.
152
+
153
+ Simon S. Du, Sham M. Kakade, Ruosong Wang, and Lin F. Yang. Is a good representation sufficient for sample efficient reinforcement learning? In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id ${ . } =$ r1genAVKPB.
154
+
155
+ Gabriel Dulac-Arnold, Daniel Mankowitz, and Todd Hester. Challenges of real-world reinforcement learning. arXiv preprint arXiv:1904.12901, 2019.
156
+
157
+ Gabriel Dulac-Arnold, Nir Levine, Daniel J Mankowitz, Jerry Li, Cosmin Paduraru, Sven Gowal, and Todd Hester. An empirical investigation of the challenges of real-world reinforcement learning. arXiv preprint arXiv:2003.11881, 2020.
158
+
159
+ Amir-massoud Farahmand, Csaba Szepesvari, and R ´ emi Munos. Error propagation for approximate ´ policy and value iteration. In Advances in Neural Information Processing Systems, pp. 568–576, 2010.
160
+
161
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. arXiv preprint arXiv:1812.02900, 2018a.
162
+
163
+ Scott Fujimoto, Herke van Hoof, and David Meger. Addressing function approximation error in actor-critic methods. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 1587–1596. PMLR, 2018b.
164
+
165
+ Scott Fujimoto, Edoardo Conti, Mohammad Ghavamzadeh, and Joelle Pineau. Benchmarking batch deep reinforcement learning algorithms. arXiv preprint arXiv:1910.01708, 2019.
166
+
167
+ Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep learning. MIT press, 2016.
168
+
169
+ Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In 2017 IEEE international conference on robotics and automation (ICRA), pp. 3389–3396. IEEE, 2017.
170
+
171
+ Caglar Gulcehre, Ziyu Wang, Alexander Novikov, Tom Le Paine, Sergio Gomez Colmenarejo, Kon- ´ rad Zolna, Rishabh Agarwal, Josh Merel, Daniel Mankowitz, Cosmin Paduraru, Gabriel DulacArnold, Jerry Li, Mohammad Norouzi, Matt Hoffman, Ofir Nachum, George Tucker, Nicolas Heess, and Nando de Freitas. Rl unplugged: Benchmarks for offline reinforcement learning, 2020.
172
+
173
+ Abhishek Gupta, Vikash Kumar, Corey Lynch, Sergey Levine, and Karol Hausman. Relay policy learning: Solving long-horizon tasks via imitation and reinforcement learning. arXiv preprint arXiv:1910.11956, 2019.
174
+
175
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. CoRR, abs/1801.01290, 2018a. URL http://arxiv.org/abs/1801.01290.
176
+
177
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018b.
178
+
179
+ Daniel Hein, Steffen Udluft, Michel Tokic, Alexander Hentschel, Thomas A Runkler, and Volkmar Sterzing. Batch reinforcement learning on the industrial benchmark: First experiences. In 2017 International Joint Conference on Neural Networks (IJCNN), pp. 4214–4221. IEEE, 2017.
180
+
181
+ James Henderson, Oliver Lemon, and Kallirroi Georgila. Hybrid reinforcement/supervised learning of dialogue policies from fixed data sets. Computational Linguistics, 34(4):487–511, 2008.
182
+
183
+ Todd Hester, Michael Quinlan, and Peter Stone. A real-time model-based reinforcement learning architecture for robot control. arXiv preprint arXiv:1105.1749, 2011.
184
+
185
+ Eugene Ie, Chih-wei Hsu, Martin Mladenov, Vihan Jain, Sanmit Narvekar, Jing Wang, Rui Wu, and Craig Boutilier. Recsim: A configurable simulation platform for recommender systems. arXiv preprint arXiv:1909.04847, 2019.
186
+
187
+ Natasha Jaques, Asma Ghandeharioun, Judy Hanwen Shen, Craig Ferguson, Agata Lapedriza, Noah \` Jones, Shixiang Gu, and Rosalind W. Picard. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog. CoRR, abs/1907.00456, 2019. URL http://arxiv. org/abs/1907.00456.
188
+
189
+ Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning, pp. 651– 673, 2018.
190
+
191
+ Aviral Kumar, Justin Fu, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, 2019. URL http://arxiv.org/abs/1906.00949.
192
+
193
+ Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. arXiv preprint arXiv:2006.04779, 2020.
194
+
195
+ Sascha Lange, Thomas Gabel, and Martin Riedmiller. Batch reinforcement learning. In Reinforcement learning, pp. 45–73. Springer, 2012.
196
+
197
+ Romain Laroche, Paul Trichelair, and Remi Tachet Des Combes. Safe policy improvement with baseline bootstrapping. In International Conference on Machine Learning (ICML), 2019.
198
+
199
+ Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
200
+
201
+ Lihong Li, Wei Chu, John Langford, and Robert E Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th international conference on World wide web, pp. 661–670, 2010.
202
+
203
+ Long-Ji Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3-4):293–321, 1992.
204
+
205
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, February 2015. ISSN 00280836.
206
+
207
+ Kaichun Mo, Haoxiang Li, Zhe Lin, and Joon-Young Lee. The adobeindoornav dataset: Towards deep reinforcement learning based real-world indoor robot visual navigation. 2018.
208
+
209
+ Remi Munos. Error bounds for approximate policy iteration. In ´ Proceedings of the Twentieth International Conference on International Conference on Machine Learning, pp. 560–567. AAAI Press, 2003.
210
+
211
+ Ofir Nachum, Bo Dai, Ilya Kostrikov, Yinlam Chow, Lihong Li, and Dale Schuurmans. Algaedice: Policy gradient from arbitrary experience. arXiv preprint arXiv:1912.02074, 2019.
212
+
213
+ Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets. arXiv preprint arXiv:2006.09359, 2020.
214
+
215
+ Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. arXiv preprint arXiv:1910.00177, 2019.
216
+
217
+ Olivier Pietquin, Matthieu Geist, Senthilkumar Chandramohan, and Herve Frezza-Buet. Sample- ´ efficient batch reinforcement learning for dialogue management optimization. ACM Transactions on Speech and Language Processing (TSLP), 7(3):1–21, 2011.
218
+
219
+ Doina Precup, Richard S Sutton, and Satinder Singh. Eligibility traces for off-policy policy evaluation. In ICML’00 Proceedings of the Seventeenth International Conference on Machine Learning, 2000.
220
+
221
+ Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning complex dexterous manipulation with deep reinforcement learning and demonstrations. In Robotics: Science and Systems, 2018.
222
+
223
+ Nicholas Rhinehart, Rowan McAllister, and Sergey Levine. Deep imitative models for flexible inference, planning, and control. arXiv preprint arXiv:1810.06544, 2018.
224
+
225
+ Alex Strehl, John Langford, Lihong Li, and Sham M Kakade. Learning from logged implicit exploration data. In Advances in neural information processing systems, pp. 2217–2225, 2010.
226
+
227
+ Philip S Thomas, Georgios Theocharous, Mohammad Ghavamzadeh, Ishan Durugkar, and Emma Brunskill. Predictive off-policy policy evaluation for nonstationary decision problems, with applications to digital marketing. In AAAI, pp. 4740–4745, 2017.
228
+
229
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012.
230
+
231
+ Martin Treiber, Ansgar Hennecke, and Dirk Helbing. Congested traffic states in empirical observations and microscopic simulations. Physical review E, 62(2):1805, 2000.
232
+
233
+ Eugene Vinitsky, Aboudy Kreidieh, Luc Le Flem, Nishant Kheterpal, Kathy Jang, Cathy Wu, Fangyu Wu, Richard Liaw, Eric Liang, and Alexandre M Bayen. Benchmarks for reinforcement learning in mixed-autonomy traffic. In Conference on Robot Learning, pp. 399–409, 2018.
234
+
235
+ Christopher J.C.H. Watkins and Peter Dayan. Q-learning. Machine Learning, 8:279–292, 1992.
236
+
237
+ Cathy Wu, Aboudy Kreidieh, Kanaad Parvate, Eugene Vinitsky, and Alexandre M Bayen. Flow: Architecture and benchmarking for reinforcement learning in traffic control. arXiv preprint arXiv:1710.05465, pp. 10, 2017.
238
+
239
+ Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. arXiv preprint arXiv:1911.11361, 2019.
240
+
241
+ # Appendices
242
+
243
+ A TASK PROPERTIES
244
+
245
+ The following is a full list of task properties and dataset statistics for all tasks in the benchmark. Note that the full dataset for “carla-town” requires over 30GB of memory to store, so we also provide a subsampled version of the dataset which we used in our experiments.
246
+
247
+ Table 1: Statistics for each task in the benchmark. For the controller type, “planner” refers to a hand-designed navigation planner, “human” refers to human demonstrations, and “policy” refers to random or neural network policies. The number of samples refers to the number of environment transitions recorded in the dataset.
248
+
249
+ <table><tr><td>Domain</td><td>Task Name</td><td>Controller Type</td><td># Samples</td></tr><tr><td rowspan="3">Maze2D</td><td>maze2d-umaze</td><td>Planner</td><td>106</td></tr><tr><td>maze2d-medium</td><td>Planner</td><td>2*106</td></tr><tr><td>maze2d-large</td><td>Planner</td><td>4*106</td></tr><tr><td rowspan="6">AntMaze</td><td>antmaze-umaze</td><td>Planner</td><td>106</td></tr><tr><td>antmaze-umaze-diverse</td><td>Planner</td><td>106</td></tr><tr><td>antmaze-medium-play</td><td>Planner</td><td>106</td></tr><tr><td>antmaze-medium-diverse</td><td>Planner</td><td>106</td></tr><tr><td>antmaze-large-play</td><td>Planner</td><td>106</td></tr><tr><td>antmaze-large-diverse</td><td>Planner</td><td>106</td></tr><tr><td rowspan="11">Gym-MuJoCo</td><td>hopper-random</td><td>Policy</td><td>106</td></tr><tr><td>hopper-medium</td><td>Policy</td><td>106</td></tr><tr><td>hopper-medium-replay</td><td>Policy</td><td>200920</td></tr><tr><td>hopper-medium-expert</td><td>Policy</td><td>2×106</td></tr><tr><td>halfcheetah-random</td><td>Policy</td><td>106</td></tr><tr><td>halfcheetah-medium</td><td>Policy</td><td>106</td></tr><tr><td>halfcheetah-medium-replay</td><td>Policy</td><td>101000</td></tr><tr><td>halfcheetah-medium-expert</td><td>Policy</td><td>2×106</td></tr><tr><td>walker2d-random</td><td>Policy</td><td>106</td></tr><tr><td>walker2d-medium</td><td>Policy</td><td>106</td></tr><tr><td>walker2d-medium-replay</td><td>Policy</td><td>100930</td></tr><tr><td rowspan="11">Adroit</td><td>walker2d-medium-expert</td><td>Policy</td><td>2×106</td></tr><tr><td>pen-human</td><td>Human</td><td>5000</td></tr><tr><td>pen-cloned</td><td>Policy</td><td>5*105</td></tr><tr><td>pen-expert</td><td>Policy</td><td>5*105</td></tr><tr><td>hammer-human</td><td>Human</td><td>11310</td></tr><tr><td>hammer-cloned</td><td>Policy</td><td>106</td></tr><tr><td>hammer-expert</td><td>Policy</td><td>106</td></tr><tr><td>door-human</td><td>Human</td><td>6729</td></tr><tr><td>door-cloned</td><td>Policy</td><td>106</td></tr><tr><td>door-expert</td><td>Policy</td><td>106</td></tr><tr><td>relocate-human</td><td>Human</td><td>9942</td></tr><tr><td rowspan="4"></td><td>relocate-cloned</td><td>Policy</td><td>106</td></tr><tr><td>relocate-expert</td><td>Policy</td><td>106</td></tr><tr><td>flow-ring-random</td><td>Policy</td><td>106</td></tr><tr><td>flow-ring-controller</td><td>Policy</td><td>106</td></tr><tr><td rowspan="3">FrankaKitchen</td><td>flow-merge-random flow-merge-controller</td><td>Policy</td><td>106 106</td></tr><tr><td>kitchen-complete</td><td>Policy</td><td>3680</td></tr><tr><td>kitchen-partial</td><td>Policy Policy</td><td>136950</td></tr><tr><td rowspan="3">CARLA</td><td>kitchen-mixed</td><td>Policy</td><td>136950</td></tr><tr><td>carla-lane</td><td>Planner</td><td>105</td></tr><tr><td>carla-town</td><td>Planner</td><td>2 * 10 full 105 subsampled</td></tr></table>
250
+
251
+ # B RESULTS BY DOMAIN
252
+
253
+ The following tables summarize performance for each domain (excluding CARLA, due to all algorithms performing poorly), sorted by the best performing algorithm to the worst.
254
+
255
+ ![](images/a188c83f14b358449ed2a7d6182663793ff921476cbc1e55a71c68191b2fcd0e.jpg)
256
+
257
+ ![](images/79e7c0c5987e12927f614c047953fd5a0d7881d52d3e61d12633f64a3f0a64ce.jpg)
258
+
259
+ ![](images/ba71f57a34cabc77456baefdd1c4550b46509f99b85b79c2d2a24828bf9b586a.jpg)
260
+
261
+ ![](images/4c4269414b1df33c5af6693ef985a02631c6ff244541a7bc0c7e7afa08c124cf.jpg)
262
+
263
+ ![](images/7dd8df093183e61ba273de91a0dcef30c666500cdd4a0f259a6e7411d3a4bda0.jpg)
264
+
265
+ ![](images/a3c068b2889babbae3bf9a4399f50b0a22df8043e13e31de84356c1ffbe22767.jpg)
266
+
267
+ <table><tr><td rowspan=2 colspan=1>TO5</td><td rowspan=2 colspan=1>5501</td><td rowspan=2 colspan=1>0325584</td><td rowspan=2 colspan=1>317188436208641</td><td rowspan=2 colspan=1>34231400813</td><td></td><td></td><td></td></tr><tr><td rowspan=1 colspan=2>5850388850</td><td rowspan=1 colspan=1>226</td></tr><tr><td rowspan=1 colspan=1>PICTE</td><td rowspan=1 colspan=1>L&#x27;SI-1000</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>328业101841</td><td rowspan=1 colspan=1>3800028033800</td><td rowspan=1 colspan=1>523047</td><td rowspan=1 colspan=1>002</td><td rowspan=1 colspan=1>T1</td></tr><tr><td rowspan=1 colspan=1>BCO</td><td rowspan=1 colspan=1>28386</td><td rowspan=1 colspan=1>500672</td><td rowspan=1 colspan=1>2491040333503450</td><td rowspan=1 colspan=1>5004040802040</td><td rowspan=1 colspan=1>6082</td><td rowspan=1 colspan=1>88</td><td rowspan=1 colspan=1>09</td></tr><tr><td rowspan=1 colspan=1>RRER</td><td rowspan=1 colspan=1>81-02</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>2302000030082620</td><td rowspan=1 colspan=1>3200342008200</td><td rowspan=1 colspan=1>821</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>000</td></tr><tr><td rowspan=1 colspan=1>AAR</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>5030000</td><td rowspan=1 colspan=1>212N33B24531</td><td rowspan=1 colspan=1>3240304021306.7043</td><td rowspan=1 colspan=1>53500</td><td rowspan=1 colspan=1>0410</td><td rowspan=1 colspan=1>1049</td></tr><tr><td rowspan=1 colspan=1>PAAAAY</td><td rowspan=1 colspan=1>0&#x27;91-30</td><td rowspan=1 colspan=1>00300000</td><td rowspan=1 colspan=1>31m33314004308</td><td rowspan=1 colspan=1>02882503308304</td><td rowspan=1 colspan=1>716-36.1443</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>626</td></tr><tr><td rowspan=1 colspan=1>FRPAAC</td><td rowspan=1 colspan=1>4344</td><td rowspan=1 colspan=1>5000000</td><td rowspan=1 colspan=1>2018龙34300419</td><td rowspan=1 colspan=1>81833168033838</td><td rowspan=1 colspan=1>S588</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>40</td></tr><tr><td rowspan=1 colspan=1>FAAA</td><td rowspan=1 colspan=1>343046</td><td rowspan=1 colspan=1>500800</td><td rowspan=1 colspan=1>513445A3233403</td><td rowspan=1 colspan=1>1883380359315548</td><td rowspan=1 colspan=1>E330</td><td rowspan=1 colspan=1>032</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>JJA-ACS</td><td rowspan=1 colspan=1>21</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>34B40824D358016</td><td rowspan=1 colspan=1>639002652158</td><td rowspan=1 colspan=1>2010</td><td rowspan=1 colspan=1>50025</td><td rowspan=1 colspan=1>08</td></tr><tr><td rowspan=1 colspan=1>B</td><td rowspan=1 colspan=1>38350</td><td rowspan=1 colspan=1>50500000</td><td rowspan=1 colspan=1>2168363034B838646</td><td rowspan=1 colspan=1>41505800519.55531101</td><td rowspan=1 colspan=1>O&#x27;LS-411</td><td rowspan=1 colspan=1>334</td><td rowspan=1 colspan=1>38</td></tr><tr><td rowspan=1 colspan=1>SAC</td><td rowspan=1 colspan=1>T317</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>0&#x27;0010&#x27;0010&#x27;0011001001000&#x27;0010&#x27;0010&#x27;0010&#x27;0010&#x27;0010&#x27;001</td><td rowspan=1 colspan=1>T22010202222</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>84</td></tr><tr><td rowspan=1 colspan=1>Tae saeg</td><td rowspan=1 colspan=1>wzzn-preeaaampraeearpraeeee</td><td rowspan=1 colspan=1>aaernrssef-niprrereinaarir-inirlicerenre ipereeeenaefrerereegarn-neeeane</td><td rowspan=1 colspan=1>frrrreriewrpataat retreereetwartraetrprrnprrarstrrmaeuiniprgesdtrlereeeeertenreeeetttaetwarrrriaranwarprrararanioprrr-nredoninprr-nrrdon</td><td rowspan=1 colspan=1>raanarian Trerneaeeean prrrrrretrr Prrrrereeeerer greeertrruounn-.iorn rreeceeeegernannn-nndpenore-eedpouora-iorepgrdee-eeeJuadxe-rort</td><td rowspan=1 colspan=1>ronnrnBn-rng reneeererrtioprr-nmonnirrrerern</td><td rowspan=1 colspan=1>ahareteseeraetrreetrtrrretregr</td><td rowspan=1 colspan=1>GaraaaeCelaeaaenn</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>M zze</td><td rowspan=1 colspan=1>Araaee</td><td rowspan=1 colspan=1>U</td><td rowspan=1 colspan=1>Aiipt</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>rrrtra</td><td rowspan=1 colspan=1>CCAAA</td></tr></table>
268
+
269
+ <table><tr><td rowspan=1 colspan=1>T05</td><td rowspan=1 colspan=1>面340</td><td rowspan=1 colspan=1>0802i</td><td rowspan=1 colspan=1>544142333333217499453555555512711121236&#x27;9944£16053.5550</td><td rowspan=1 colspan=1>144143m320749449/:4-99&#x27;01-598521194448976766104</td><td rowspan=1 colspan=1>&#x27;99-5160559447</td><td rowspan=1 colspan=2>81207312710085-</td></tr><tr><td rowspan=1 colspan=1>AeeE</td><td rowspan=1 colspan=1>2306</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>08103100915515518:045-301.449&#x27;LL$-05</td><td rowspan=1 colspan=1>08235-588558695235558</td><td rowspan=1 colspan=1>3935-8633587</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>411-1004-</td></tr><tr><td rowspan=1 colspan=1>PCC</td><td rowspan=1 colspan=1>43022</td><td rowspan=1 colspan=1>8800000</td><td rowspan=1 colspan=1>B285033236&#x27;L9L4244441754462944L&#x27;8898&#x27;15518&#x27;0SLL2445558355</td><td rowspan=1 colspan=1>2.64401015-588:11444444355-S&#x27;L1-33523131315225579&#x27;6551</td><td rowspan=1 colspan=1>L07-453513</td><td rowspan=1 colspan=1>888</td><td rowspan=1 colspan=1>46</td></tr><tr><td rowspan=1 colspan=1>REER</td><td rowspan=1 colspan=1>1588</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>9&#x27;L65-1400&#x27;009-381&#x27;55958588&#x27;009-831</td><td rowspan=1 colspan=1>L&#x27;6617544-54682450&#x27;85-691-0&#x27;4001247-6&#x27;09-L&#x27;I[-</td><td rowspan=1 colspan=1>055533308.5555</td><td rowspan=1 colspan=1>0000</td><td rowspan=1 colspan=1>1004211-</td></tr><tr><td rowspan=1 colspan=1>AAR</td><td rowspan=1 colspan=1>531</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>31423139955L&#x27;008614444417120&#x27;4062979269470&#x27;798</td><td rowspan=1 colspan=1>43554115-44441333569571&#x27;95-9&#x27;91-3.9540677842495555533</td><td rowspan=1 colspan=1>9.714443353</td><td rowspan=1 colspan=1>004</td><td rowspan=1 colspan=1>48&#x27;59-</td></tr><tr><td rowspan=1 colspan=1>PAPAAY</td><td rowspan=1 colspan=1>14104111</td><td rowspan=1 colspan=1>0000000</td><td rowspan=1 colspan=1>335513439538.31458255540669.059448995665344551</td><td rowspan=1 colspan=1>854-6L&#x27;6[-m69570&#x27;65-3641141-9&#x27;99-444</td><td rowspan=1 colspan=1>53335-G22</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>9&#x27;6611181-</td></tr><tr><td rowspan=1 colspan=1>BPARS</td><td rowspan=1 colspan=1>83</td><td rowspan=1 colspan=1>540000</td><td rowspan=1 colspan=1>92137238855535655314441335551383713335120</td><td rowspan=1 colspan=1>3.3305337-6041441357-58844444499-907-</td><td rowspan=1 colspan=1>&#x27;881-665567</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>7331</td></tr><tr><td rowspan=1 colspan=1>FAAR</td><td rowspan=1 colspan=1>5800</td><td rowspan=1 colspan=1>07000000</td><td rowspan=1 colspan=1>2333439336.6504.16842.211714956141483888&#x27;9L01965591148153133</td><td rowspan=1 colspan=1>£&#x27;992444&#x27;99-6&#x27;81-5588441-6&#x27;09-9&#x27;L1-354551165951086781115</td><td rowspan=1 colspan=1>£94-302355</td><td rowspan=1 colspan=1>01</td><td rowspan=1 colspan=1>0017855</td></tr><tr><td rowspan=1 colspan=1>JA-ACS</td><td rowspan=1 colspan=1>9144315</td><td rowspan=1 colspan=1>000000</td><td rowspan=1 colspan=1>3.555001409&#x27;808-4571185-88357539</td><td rowspan=1 colspan=1>8587744145149&#x27;L6L14134LL4535358.3957&#x27;81-</td><td rowspan=1 colspan=1>L141-3433</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>36.655-</td></tr><tr><td rowspan=1 colspan=1>B</td><td rowspan=1 colspan=1>0320</td><td rowspan=1 colspan=1>0000000000</td><td rowspan=1 colspan=1>3046644964448.5405354464498115554469444016753571</td><td rowspan=1 colspan=1>11711484458&#x27;16L1L&#x27;09-10233578&#x27;14191469616855</td><td rowspan=1 colspan=1>112547865508</td><td rowspan=1 colspan=1>441</td><td rowspan=1 colspan=1>5423191-</td></tr><tr><td rowspan=1 colspan=1>SAS</td><td rowspan=1 colspan=1>401134</td><td rowspan=1 colspan=1>1000000</td><td rowspan=1 colspan=1>1.23350155553235312315035555323231.2115535555323231.211551555433333</td><td rowspan=1 colspan=1>31847-8113331847-8&#x27;19-313331847-8&#x27;19-1&#x27;31-</td><td rowspan=1 colspan=1>8854</td><td rowspan=1 colspan=1>000</td><td rowspan=1 colspan=1>8L&#x27;6L-</td></tr><tr><td rowspan=1 colspan=1>Tae nsee</td><td rowspan=1 colspan=1>wzen-prezeanipr-preeawrpraete</td><td rowspan=1 colspan=1>aarap-nrrencnrreste hap-iripliinrrseerrr-aaipraaeagrdnrereeennetrpeereerrrn-neeezee</td><td rowspan=1 colspan=1>frrrplreeaalrtaelwrrirtraat pareeerrltrrelretaerwripepeaaepprrairprrraiitirhaeinilrardtrarrrereeetttaetirereeieettanwarrsrraraemwwiprrpraraen&quot;nioprrr-giddoningper-grsdon</td><td rowspan=1 colspan=1>rarrn-ariian rrernceeerran prrire-rreirr Prlreceeeeeger warea-aerr reeereeeeretrpgnn-annueunn-oonpruoge-uedpouora-iorppgedeeceeewuadxe-.iorr</td><td rowspan=1 colspan=1>reneenereeernrainiiringiiniiprrrnrnmnmirrrerreeeon</td><td rowspan=1 colspan=1>aeeeoeseereeed-etrtrrrrerrrer</td><td rowspan=1 colspan=1>errreateEelrcaaiin</td></tr><tr><td rowspan=1 colspan=1>Donaig</td><td rowspan=1 colspan=1>Mzzea</td><td rowspan=1 colspan=1>AAaae</td><td rowspan=1 colspan=1>N</td><td rowspan=1 colspan=1>1iipr</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Trrrertein</td><td rowspan=1 colspan=1>OOTACCATHA</td></tr></table>
270
+
271
+ # C TASK AND DATASETS
272
+
273
+ The following table lists the tasks and dataset types included in the benchmark, including sources for each.
274
+
275
+ Table 4: Domains and dataset types contained within our benchmark. Maze2D and AntMaze are new domains we propose. For each dataset, we also include references to the source if originally proposed in another work. Datasets borrowed from prior work include MuJoCo (Expert, Random, Medium), Adroit (Human, Expert), and FrankaKitchen (Complete, Partial, Mixed). All other datasets are datasets proposed by this work.
276
+
277
+ <table><tr><td rowspan=1 colspan=1>Domain</td><td rowspan=1 colspan=1> Source</td><td rowspan=1 colspan=1>Dataset Types</td></tr><tr><td rowspan=1 colspan=1>Maze2D</td><td rowspan=1 colspan=1>N/A</td><td rowspan=1 colspan=1>UMaze, Medium,Large</td></tr><tr><td rowspan=1 colspan=1>AntMaze</td><td rowspan=1 colspan=1>N/A</td><td rowspan=1 colspan=1>UMaze,Diverse, Play</td></tr><tr><td rowspan=1 colspan=1>Gym-MuJoCo</td><td rowspan=1 colspan=1>Brockman et al. (2016)Todorov et al. (2012)</td><td rowspan=1 colspan=1>Expert,Random,Medium(Various)Medium-Expert,Medium-Replay</td></tr><tr><td rowspan=1 colspan=1>Adroit</td><td rowspan=1 colspan=1>Rajeswaran et al. (2018)</td><td rowspan=1 colspan=1>Human, Expert (Rajeswaran et al., 2018)Cloned</td></tr><tr><td rowspan=1 colspan=1>Flow</td><td rowspan=1 colspan=1>Wu et al. (2017)</td><td rowspan=1 colspan=1>Random, Controller</td></tr><tr><td rowspan=1 colspan=1>Franka Kitchen</td><td rowspan=1 colspan=1>Gupta et al. (2019)</td><td rowspan=1 colspan=1>Complete, Partial, Mixed (Gupta et al., 2019)</td></tr><tr><td rowspan=1 colspan=1>CARLA</td><td rowspan=1 colspan=1>Dosovitskiy et al. (2017)</td><td rowspan=1 colspan=1>Controller</td></tr></table>
278
+
279
+ # D TRAINING AND EVALUATION TASK SPLIT
280
+
281
+ The following table lists our recommended protocol for hyperparameter tuning. Hyperparameters should be tuned on the tasks listed on the left in the “Training” column, and algorithms should be evaluated without tuning on the tasks in the right column labeled “Evaluation”.
282
+
283
+ Table 5: Our recommended partition of tasks into “training” tasks where hyperparameter tuning is allowed, and “evaluation” tasks where final algorithm performance should be reported.
284
+
285
+ <table><tr><td rowspan=1 colspan=1>Domain</td><td rowspan=1 colspan=2>Training</td><td rowspan=1 colspan=1>Evaluation</td></tr><tr><td rowspan=1 colspan=1>Maze2D</td><td rowspan=1 colspan=2>maze2d-umazemaze2d-mediummaze2d-large</td><td rowspan=1 colspan=1>maze2d-eval-umazemaze2d-eval-mediummaze2d-eval-large</td></tr><tr><td rowspan=1 colspan=1>AntMaze</td><td rowspan=1 colspan=2>ant-umazeant-umaze-diverseant-medium-playant-medium-diverseant-large-playant-large-diverse</td><td rowspan=1 colspan=1>ant-eval-umazeant-eval-umaze-diverseant-eval-medium-playant-eval-medium-diverseant-eval-large-playant-eval-large-diverse</td></tr><tr><td rowspan=1 colspan=1>Adroit</td><td rowspan=1 colspan=2>pen-humanpen-clonedpen-expertdoor-humandoor-cloneddoor-expert</td><td rowspan=1 colspan=1>hammer-humanhammer-clonedhammer-expertrelocate-humanrelocate-clonedrelocate-expert</td></tr><tr><td rowspan=2 colspan=1>Gym</td><td rowspan=2 colspan=2>halfcheetah-randomhalfcheetah-mediumhalfcheetah-mixedhalfcheetah-medium-expertwalker2d-randomwalker2d-mediumwalker2d-mixedwalker2d-medium-expert</td><td rowspan=2 colspan=1>hopper-randomhopper-mediumhopper-mixedhopper-medium-expertant-randomant-mediumant-mixedand-medium-expert</td></tr><tr><td rowspan=1 colspan=1></td></tr></table>
286
+
287
+ # E EXPERIMENT DETAILS
288
+
289
+ For all experiments, we used default hyperparameter settings and minimal modifications to public implementations wherever possible, using 500K training iterations or gradient steps. The code bases we used for evaluation are listed below. The most significant deviation from original published algorithms was that we used an unofficial continuous-action implementation of REM (Agarwal et al., 2019b), which was originally implemented for discrete action spaces. We ran our experiments using Google cloud platform (GCP) on n1-standard-4 machines.
290
+
291
+ • BRAC and AlgaeDICE: https://github.com/google-research/ google-research
292
+ • AWR: https://github.com/xbpeng/awr
293
+ • SAC: https://github.com/vitchyr/rlkit
294
+ • BEAR: https://github.com/aviralkumar2907/BEAR
295
+ • Continuous-action REM: https://github.com/theSparta/off_policy_ mujoco
296
+ • BCQ: https://github.com/sfujim/BCQ
297
+ • CQL: https://github.com/aviralkumar2907/CQL
298
+
299
+ # F ASSESSING THE FEASIBILITY OF HARD TASKS
300
+
301
+ Few prior methods were able to successfully solve carlatown or the larger AntMaze tasks. While including tasks that present a challenge for current methods is important to ensure that our benchmark has room for improvement, it is also important to provide some confidence that the tasks are actually solvable. We verified this in two ways. First, we ensured that the trajectories observed in these tasks have adequate coverage of the state space. An illustration of the trajectories in the CARLA and AntMaze tasks are shown below, where trajectories are shown as different colored lines and the goal state is marked with a star. We see that in carla-town and AntMaze, each lane or corridor is traversed multiple times by the agent.
302
+
303
+ Second, the data in AntMaze was generated by having the ant follow the same high-level planner in the maze as in Maze2D. Because Maze2D is solvable by most methods, we would expect this to mean that AntMaze is potentially solvable as well. This While the dynamics of the ant itself are much more complex, its walking gait is a relatively regular periodic motion, and since the high-level waypoints are similar, we would expect the AntMaze data to provide similar coverage as in the 2D mazes, as shown in the figures on the right. While the Ant has more erratic motion, both datasets cover the the majority of the maze thoroughly. A comparison of the state coverage between Maze2D and AntMaze on all tasks is shown in the following Appendix section G.
304
+
305
+ ![](images/e3b4c6ad762aad0af8c978e1a3c95390259a9ccf66efeecca66c5aae5e18c678.jpg)
306
+
307
+ # G MAZE DOMAIN TRAJECTORIES
308
+
309
+ In this section, we visualized trajectories for the datasets in the Maze2D and AntMaze domains. Each image plots the states visited along each trajectory as a different colored line, overlaid on top of the maze. The goal state is marked as a white star.
310
+
311
+ ![](images/439b1bf2b702e91267e4eb58af53dbd6c98540b3e0c8b95a03fcba981d816c65.jpg)
312
+ Figure 4: Trajectories visited in the Maze2D domain. From left-to-right: maze2d-umaze, maze2dmedium, and maze2d-large.
313
+
314
+ ![](images/ec0d50d66a590cb4b8b8b6d1f56c22be27240eeee0fbc7edace9e19a3ffb4233.jpg)
315
+ Figure 5: Trajectories visited in the AntMaze domain. Top row, from left-to-right: antmaze-umaze, antmaze-medium-play, and antmaze-large-play. Bottom row, from left-to-right: antmaze-umazediverse, antmaze-medium-diverse, and antmaze-large-diverse.
parse/train/px0-N3_KjA/px0-N3_KjA_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/px0-N3_KjA/px0-N3_KjA_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/px0-N3_KjA/px0-N3_KjA_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1lYRjC9F7/r1lYRjC9F7.md ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ENABLING FACTORIZED PIANO MUSIC MODELING AND GENERATION WITH THE MAESTRO DATASET
2
+
3
+ Curtis Hawthorne?, Andriy Stasyuk?, Adam Roberts?, Ian Simon?, Cheng-Zhi Anna Huang?, Sander Dieleman†, Erich Elsen?, Jesse Engel? & Douglas Eck? ?Google Brain, †DeepMind
4
+
5
+ {fjord,astas,adarob,iansimon,annahuang,sedielem,eriche,jesseengel,deck}@google.com
6
+
7
+ # ABSTRACT
8
+
9
+ Generating musical audio directly with neural networks is notoriously difficult because it requires coherently modeling structure at many different timescales. Fortunately, most music is also highly structured and can be represented as discrete note events played on musical instruments. Herein, we show that by using notes as an intermediate representation, we can train a suite of models capable of transcribing, composing, and synthesizing audio waveforms with coherent musical structure on timescales spanning six orders of magnitude ${ \sim } 0 . 1 ~ \mathrm { m s }$ to ${ \sim } 1 0 0$ s), a process we call Wave2Midi2Wave. This large advance in the state of the art is enabled by our release of the new MAESTRO (MIDI and Audio Edited for Synchronous TRacks and Organization) dataset, composed of over 172 hours of virtuosic piano performances captured with fine alignment $( \approx 3 { \mathrm { ~ m s } } )$ between note labels and audio waveforms. The networks and the dataset together present a promising approach toward creating new expressive and interpretable neural models of music.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Since the beginning of the recent wave of deep learning research, there have been many attempts to create generative models of expressive musical audio de novo. These models would ideally generate audio that is both musically and sonically realistic to the point of being indistinguishable to a listener from music composed and performed by humans.
14
+
15
+ However, modeling music has proven extremely difficult due to dependencies across the wide range of timescales that give rise to the characteristics of pitch and timbre (short-term) as well as those of rhythm (medium-term) and song structure (long-term). On the other hand, much of music has a large hierarchy of discrete structure embedded in its generative process: a composer creates songs, sections, and notes, and a performer realizes those notes with discrete events on their instrument, creating sound. The division between notes and sound is in many ways analogous to the division between symbolic language and utterances in speech.
16
+
17
+ The WaveNet model by van den Oord et al. (2016) may be the first breakthrough in generating musical audio directly with a neural network. Using an autoregressive architecture, the authors trained a model on audio from piano performances that could then generate new piano audio sample-bysample. However, as opposed to their highly convincing speech examples, which were conditioned on linguistic features, the authors lacked a conditioning signal for their piano model. The result was audio that sounded very realistic at very short time scales (1 or 2 seconds), but that veered off into chaos beyond that.
18
+
19
+ Dieleman et al. (2018) made great strides towards providing longer term structure to WaveNet synthesis by implicitly modeling the discrete musical structure described above. This was achieved by training a hierarchy of VQ-VAE models at multiple time-scales, ending with a WaveNet decoder to generate piano audio as waveforms. While the results are impressive in their ability to capture long-term structure directly from audio waveforms, the resulting sound suffers from various artifacts at the fine-scale not present in the unconditional WaveNet, clearly distinguishing it from real musical audio. Also, while the model learns a version of discrete structure from the audio, it is not directly reflective of the underlying generative process and thus not interpretable or manipulable by a musician or user.
20
+
21
+ ![](images/41090d5a14a7564e35104023d0c7d0f04538a62b22b9b6242dc23121681e6279.jpg)
22
+ Figure 1: Wave2Midi2Wave system architecture for our suite of piano music models, consisting of (a) a conditional WaveNet model that generates audio from MIDI, (b) a Music Transformer language model that generates piano performance MIDI autoregressively, and (c) a piano transcription model that “encodes” piano performance audio as MIDI.
23
+
24
+ Manzelli et al. (2018) propose a model that uses a WaveNet to generate solo cello music conditioned on MIDI notation. This overcomes the inability to manipulate the generated sequence. However, their model requires a large training corpus of labeled audio because they do not train a transcription model, and it is limited to monophonic sequences.
25
+
26
+ In this work, we seek to explicitly factorize the problem informed by our prior understanding of the generative process of performer and instrument:
27
+
28
+ $$
29
+ P ( a u d i o ) = \mathbb { E } _ { n o t e s } \left[ P ( a u d i o | n o t e s ) \right]
30
+ $$
31
+
32
+ which can be thought of as a generative model with a discrete latent code of musical notes. Since the latent representation is discrete, and the scale of the problem is too large to jointly train, we split the model into three separately trained modules that are each state-of-the-art in their respective domains:
33
+
34
+ 1. Encoder, $P ( n o t e s | a u d i o )$ : An Onsets and Frames (Hawthorne et al., 2018) transcription model to produce a symbolic representation (MIDI) from raw audio. 2. Prior, $P ( n o t e s )$ : A self-attention-based music language model (Huang et al., 2018) to generate new performances in MIDI format based on those transcribed in (1). 3. Decoder, $P ( a u d i o | n o t e s )$ : A WaveNet (van den Oord et al., 2016) synthesis model to generate audio of the performances conditioned on MIDI generated in (2).
35
+
36
+ We call this process Wave2Midi2Wave.
37
+
38
+ One hindrance to training such a stack of models is the lack of large-scale annotated datasets like those that exist for images. We overcome this barrier by curating and publicly releasing alongside this work a piano performance dataset containing well-aligned audio and symbolic performances an order of magnitude larger than the previous benchmarks.
39
+
40
+ In addition to the high quality of the samples our method produces (see https://goo.gl/ magenta/maestro-examples), training a suite of models according to the natural musician/instrument division has a number of other advantages. First, the intermediate representation used is more suitable for human interpretation and manipulation. Similarly, factorizing the model in this way provides better modularity: it is easy to independently swap out different performance and instrument models. Using an explicit performance representation with modern language models also allows us to model structure at much larger time scales, up to a minute or so of music. Finally, we can take advantage of the large amount of prior work in the areas of symbolic music generation and conditional audio generation. And by using a state-of-the-art music transcription model, we can make use of the same wealth of unlabeled audio recordings previously only usable for training end-to-end models by transcribing unlabeled audio recordings and feeding them into the rest of our model.
41
+
42
+ # 2 CONTRIBUTIONS OF THIS PAPER
43
+
44
+ Our contributions are as follows:
45
+
46
+ 1. We combine a transcription model, a language model, and a MIDI-conditioned WaveNet model to produce a factorized approach to musical audio modeling capable of generating about one minute of coherent piano music.
47
+ 2. We provide a new dataset of piano performance recordings and aligned MIDI, an order of magnitude larger than previous datasets.
48
+ 3. Using an existing transcription model architecture trained on our new dataset, we achieve state-of-the-art results on a piano transcription benchmark.
49
+
50
+ # 3 DATASET
51
+
52
+ We partnered with organizers of the International Piano-e-Competition1 for the raw data used in this dataset. During each installment of the competition, virtuoso pianists perform on Yamaha Disklaviers which, in addition to being concert-quality acoustic grand pianos, utilize an integrated high-precision MIDI capture and playback system. Recorded MIDI data is of sufficient fidelity to allow the audition stage of the competition to be judged remotely by listening to contestant performances reproduced over the wire on another Disklavier instrument.
53
+
54
+ The dataset introduced in this paper, which we name MAESTRO (“MIDI and Audio Edited for Synchronous TRacks and Organization”), contains over a week of paired audio and MIDI recordings from nine years of International Piano-e-Competition events.2 The MIDI data includes key strike velocities and sustain pedal positions. Audio and MIDI files are aligned with ${ \approx } 3$ ms accuracy and sliced to individual musical pieces, which are annotated with composer, title, and year of performance. Uncompressed audio is of CD quality or higher $\mathrm { 4 4 . 1 - 4 8 \ k H z \ 1 6 }$ -bit PCM stereo). A train/validation/test split configuration is also proposed, so that the same composition, even if performed by multiple contestants, does not appear in multiple subsets. Repertoire is mostly classical, including composers from the $1 7 ^ { \mathrm { t h } }$ to early $\bar { 2 } 0 ^ { \mathrm { t h } }$ century. Table 1 contains aggregate statistics of the MAESTRO dataset.
55
+
56
+ Table 1: Statistics of the MAESTRO dataset.
57
+
58
+ <table><tr><td>Split</td><td>Performances</td><td>Compositions (approx.)</td><td>Duration, hours</td><td>Size, GB</td><td>Notes, millions</td></tr><tr><td>Train</td><td>954</td><td>295</td><td>140.1</td><td>83.6</td><td>5.06</td></tr><tr><td rowspan="3">Validation Test</td><td>105</td><td>60</td><td>15.3</td><td>9.1</td><td>0.54</td></tr><tr><td>125</td><td>75</td><td>16.9</td><td>10.1</td><td>0.57</td></tr><tr><td>1184</td><td>430</td><td>172.3</td><td>102.8</td><td>6.18</td></tr></table>
59
+
60
+ We make the new dataset (MIDI, audio, metadata, and train/validation/test split configuration) available at https://g.co/magenta/maestro-datasetunder a Creative Commons Attribution Non-Commercial Share-Alike 4.0 license.
61
+
62
+ Several datasets of paired piano audio and MIDI have been published previously and have enabled significant advances in automatic piano transcription and related topics. We are making MAESTRO available because we believe it provides several advantages over existing datasets. Most significantly, as evident from table 2, MAESTRO is around an order of magnitude larger. Existing datasets also have different properties than MAESTRO that affect model training:
63
+
64
+ MusicNet (Thickstun et al., 2017) contains recordings of human performances, but separatelysourced scores. As discussed in Hawthorne et al. (2018), the alignment between audio and score is not fully accurate. One advantage of MusicNet is that it contains instruments other than piano (not counted in table 2) and a wider variety of recording environments.
65
+
66
+ MAPS (Emiya et al., 2010) contains Disklavier recordings and synthesized audio created from MIDI files that were originally entered via sequencer. As such, the “performances” are not as natural as the MAESTRO performances captured from live performances. In addition, synthesized audio makes up a large fraction of the MAPS dataset. MAPS also contains syntheses and recordings of individual notes and chords, not counted in table 2.
67
+
68
+ Saarland Music Data (SMD) (Muller et al., 2011) is similar to MAESTRO in that it contains¨ recordings and aligned MIDI of human performances on a Disklavier, but is 30 times smaller.
69
+
70
+ Table 2: Comparison with other datasets.
71
+
72
+ <table><tr><td>Dataset</td><td>Performances</td><td>Compositions</td><td>Duration, hours</td><td>Notes, millions</td></tr><tr><td>SMD</td><td>50</td><td>50</td><td>4.7</td><td>0.15</td></tr><tr><td>MusicNet</td><td>156</td><td>60</td><td>15.3</td><td>0.58</td></tr><tr><td>MAPS</td><td>270</td><td>208</td><td>17.9</td><td>0.62</td></tr><tr><td>MAESTRO</td><td>1184</td><td>~430</td><td>172.3</td><td>6.18</td></tr></table>
73
+
74
+ # 3.1 ALIGNMENT
75
+
76
+ Our goal in processing the data from International Piano-e-Competition was to produce pairs of audio and MIDI files time-aligned to represent the same musical events. The data we received from the organizers was a combination of MIDI files recorded by Disklaviers themselves and WAV audio captured with conventional recording equipment. However, because the recording streams were independent, they differed widely in start times and durations, and they were also subject to jitter. Due to the large volume of content, we developed an automated process for aligning, slicing, and time-warping provided audio and MIDI to ensure a precise match between the two.
77
+
78
+ Our approach is based on globally minimizing the distance between CQT frames from the real audio and synthesized MIDI (using FluidSynth3). Obtaining a highly accurate alignment is non-trivial, and we provide full details in the appendix.
79
+
80
+ # 3.2 DATASET SPLITTING
81
+
82
+ For all experiments in this paper, we use a single train/validation/test split designed to satisfy the following criteria:
83
+
84
+ • No composition should appear in more than one split.
85
+ • Train/validation/test should make up roughly 80/10/10 percent of the dataset (in time), respectively. These proportions should be true globally and also within each composer. Maintaining these proportions is not always possible because some composers have too few compositions in the dataset.
86
+ • The validation and test splits should contain a variety of compositions. Extremely popular compositions performed by many performers should be placed in the training split.
87
+
88
+ For comparison with our results, we recommend using the splits which we have provided. We do not necessarily expect these splits to be suitable for all purposes; future researchers are free to use alternate experimental methodologies.
89
+
90
+ # 4 PIANO TRANSCRIPTION
91
+
92
+ The large MAESTRO dataset enables training an automatic piano music transcription model that achieves a new state of the art. We base our model on Onsets and Frames, with several modifications informed by a coarse hyperparameter search using the validation split. For full details of the base model architecture and training procedure, refer to Hawthorne et al. (2018).
93
+
94
+ One important modification was adding an offset detection head, inspired by Kelz et al. (2018). The offset head feeds into the frame detector but is not directly used during decoding. The offset labels are defined to be the $3 2 \mathrm { m s }$ following the end of each note.
95
+
96
+ We also increased the size of the bidirectional LSTM layers from 128 to 256 units, changed the number of filters in the convolutional layers from 32/32/64 to 48/48/96, and increased the units in the fully connected layer from 512 to 768. We also stopped gradient propagation into the onset subnetwork from the frame network, disabled weighted frame loss, and switched to HTK frequency spacing (Young et al., 2006) for the mel-frequency spectrogram input. In general, we found that the best ways to get higher performance with the larger dataset were to make the model larger and simpler.
97
+
98
+ The final important change we made was to start using audio augmentation during training using an approach similar to the one described in McFee et al. (2017). During training, every input sample was modified using random parameters for the $S o X ^ { 4 }$ audio tool using pysox (Bittner et al., 2016). The parameters, ranges, and random sampling methods are described in table 3. We found that this was particularly important when evaluating on the MAPS dataset, likely because the audio augmentation made the model more robust to differences in recording environment and piano qualities. The differences in training results are summarized in table 6. When evaluating against the MAESTRO dataset, we found that audio augmentation made results slightly worse, so results in table 5 are presented without audio augmentation.
99
+
100
+ Table 3: Audio augmentation parameters.
101
+
102
+ <table><tr><td rowspan=1 colspan=2>Description</td><td rowspan=1 colspan=1>Scale</td><td rowspan=1 colspan=1>Range</td><td rowspan=1 colspan=1>Sampling</td></tr><tr><td rowspan=6 colspan=2>pitch shiftcontrast (compression)equalizer 1equalizer 2reverbpinknoise</td><td rowspan=1 colspan=1>semitones</td><td rowspan=1 colspan=1>-0.1-0.1</td><td rowspan=1 colspan=1>linear</td></tr><tr><td rowspan=1 colspan=1>amount</td><td rowspan=1 colspan=1>0.0-100.0</td><td rowspan=1 colspan=1>linear</td></tr><tr><td rowspan=1 colspan=1>frequency</td><td rowspan=1 colspan=1>32.0-4096.0</td><td rowspan=2 colspan=1>loglog</td></tr><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=1>frequency</td><td rowspan=1 colspan=1>32.0-4096.0</td></tr><tr><td rowspan=1 colspan=1>reverberance</td><td rowspan=1 colspan=1>0.0-70.0</td><td rowspan=1 colspan=1>log</td></tr><tr><td rowspan=1 colspan=1>volume</td><td rowspan=1 colspan=1>0.0-0.04</td><td rowspan=1 colspan=1>linear</td></tr></table>
103
+
104
+ After training on the MAESTRO training split for $6 7 0 \mathrm { k }$ steps, we achieved state of the art results described in table 4 for the MAPS dataset. We also present our results on the train, validation, and test splits of the MAESTRO dataset as a new baseline score in table 5. Note that for calculating the scores of the train split, we use the full duration of the files without splitting them into 20-second chunks as is done during training.
105
+
106
+ <table><tr><td rowspan="2"></td><td colspan="3">Frame</td><td colspan="3">Note</td><td colspan="3">Note w/ offset</td><td colspan="3">Note w/offset &amp; velocity</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Hawthorne et al. (2018)</td><td>88.53</td><td>70.89</td><td>78.30</td><td>84.24</td><td>80.67</td><td>82.29</td><td>51.32</td><td>49.31</td><td>50.22</td><td>35.52</td><td>30.80</td><td>35.39</td></tr><tr><td>Kelz et al. (2018)</td><td>90.73</td><td>67.85</td><td>77.16</td><td>90.15</td><td>74.78</td><td>81.38</td><td>61.93</td><td>51.66</td><td>56.08</td><td></td><td></td><td></td></tr><tr><td>Onsets&amp; Frames (MAESTRO)</td><td>92.86</td><td>78.46</td><td>84.91</td><td>87.46</td><td>85.58</td><td>86.44</td><td>68.22</td><td>66.75</td><td>67.43</td><td>52.41</td><td>51.22</td><td>51.77</td></tr></table>
107
+
108
+ Table 4: Transcription Precision, Recall, and F1 Results on MAPS configuration 2 test dataset (ENSTDkCl and ENSTDkAm full-length .wav files). Training was done on the MAESTRO trianing set with audio augmentation. Scores are calculated using the same method as in Hawthorne et al. (2018). Note-based scores calculated by the mir eval library, frame-based scores as defined in Bay et al. (2009). Final metric is the mean of scores calculated per piece.
109
+
110
+ In sections 5 and 6, we demonstrate how using this transcription model enables training language and synthesis models on a large set of unlabeled piano data. To do this, we transcribe the audio in the MAESTRO training set, although in theory any large set of unlabeled piano music would work. We
111
+
112
+ <table><tr><td rowspan="2"></td><td colspan="3">Frame</td><td colspan="3">Note</td><td colspan="3">Note w/offset</td><td colspan="3">Note W/offset &amp; velocity</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Train</td><td>94.23</td><td>92.58</td><td>93.35</td><td>98.88</td><td>94.41</td><td>96.56</td><td>88.13</td><td>84.19</td><td>86.09</td><td>84.98</td><td>81.20</td><td>83.02</td></tr><tr><td>Validation</td><td>91.69</td><td>87.80</td><td>89.58</td><td>98.42</td><td>92.61</td><td>95.38</td><td>82.93</td><td>78.17</td><td>80.44</td><td>80.36</td><td>75.75</td><td>77.95</td></tr><tr><td>Test</td><td>92.11</td><td>88.41</td><td>90.15</td><td>98.27</td><td>92.61</td><td>95.32</td><td>82.95</td><td>78.24</td><td>80.50</td><td>79.89</td><td>75.37</td><td>77.54</td></tr></table>
113
+
114
+ Table 5: Results from training the modified Onsets and Frames model on the MAESTRO train split without audio augmentation. Precision, Recall, and F1 Results on the splits of the MAESTRO dataset. Calculations done in the same manner as table 4.
115
+
116
+ <table><tr><td></td><td>Frame F1</td><td>Note F1</td><td>Note w/ offset F1</td><td>Note w/ offset &amp; velocity F1</td></tr><tr><td>WithAudio Augmentation (MAPS)</td><td>84.91</td><td>86.44</td><td>67.43</td><td>51.77</td></tr><tr><td>Without Audio Augmentation (MAPS)</td><td>82.02</td><td>83.04</td><td>61.84</td><td>48.07</td></tr><tr><td>WithAudio Augmentation (MAESTRO)</td><td>89.19</td><td>94.80</td><td>79.67</td><td>76.04</td></tr><tr><td>Without Audio Augmentation (MAESTRO)</td><td>90.15</td><td>95.32</td><td>80.50</td><td>77.54</td></tr></table>
117
+
118
+ Table 6: Comparisons between results of training the same model with the same number of steps (670k) with and without audio augmentation. Training was done on the MAESTRO training set and evaluation was on either the MAPS configuration 2 test set as in table 4 or the MAESTRO test set as in table 5.
119
+
120
+ call this new, transcribed version of the training set MAESTRO-T. While it is true that the audio transcribed for MAESTRO-T was also used to train the transcription model, table 5 shows that the model performance is not significantly different between the training split and the validation or test splits, and we needed the larger split to enable training the other models.
121
+
122
+ # 5 MUSIC TRANSFORMER TRAINING
123
+
124
+ For our generative language model, we use the decoder portion of a Transformer (Vaswani et al., 2017) with relative self-attention, which has previously shown compelling results in generating music with longer-term coherence (Huang et al., 2018). We trained two models, one on MIDI data from the MAESTRO dataset and another on MIDI transcriptions inferred by Onsets and Frames from audio in MAESTRO, referred to as MAESTRO-T in section 4. For full details of the model architecture and training procedure, refer to Huang et al. (2018).
125
+
126
+ We used the same training procedure for both datasets. We trained on random crops of 2048 events and employed transposition and time compression/stretching data augmentation. The transpositions were uniformly sampled in the range of a minor third below and above the original piece. The time stretches were at discrete amounts and uniformly sampled from the set $\{ 0 . 9 \mathrm { { 5 } , 0 . 9 7 5 , 1 . 0 , 1 . 0 2 5 , 1 . 0 5 } \}$ .
127
+
128
+ We evaluated both of the models on their respective validation splits.
129
+
130
+ Table 7: Validation Negative Log-Likelihood, with event-based representation.
131
+
132
+ <table><tr><td>Model variation</td><td>NLL on their respective validation splits</td></tr><tr><td>Music TransformertrainedonMAESTRO</td><td>1.84</td></tr><tr><td>Music Transformer trained on MAESTRO-T</td><td>1.72</td></tr></table>
133
+
134
+ Samples outputs from the Music Transformer model can be heard in the Online Supplement (https://goo.gl/magenta/maestro-examples).
135
+
136
+ # 6 PIANO SYNTHESIS
137
+
138
+ Most commercially available systems that are able to synthesize a MIDI sequence into a piano audio signal are concatenative: they stitch together snippets of audio from a large library of recordings of individual notes. While this stitching process can be quite ingenious, it does not optimally capture the various interactions between notes, whether they are played simultaneously or in sequence. An alternative but less popular strategy is to simulate a physical model of the instrument. Constructing an accurate model constitutes a considerable engineering effort and is a field of research by itself (Bank et al., 2010; Valimaki et al., 2012).
139
+
140
+ WaveNet (van den Oord et al., 2016) is able to synthesize realistic instrument sounds directly in the waveform domain, but it is not as adept at capturing musical structure at timescales of seconds or longer. However, if we provide a MIDI sequence to a WaveNet model as conditioning information, we eliminate the need for capturing large scale structure, and the model can focus on local structure instead, i.e., instrument timbre and local interactions between notes. Conditional WaveNets are also used for text-to-speech (TTS), and have been shown to excel at generating realistic speech signals conditioned on linguistic features extracted from textual data. This indicates that the same setup could work well for music audio synthesis from MIDI sequences.
141
+
142
+ Our WaveNet model uses a similar autoregressive architecture to van den Oord et al. (2016), but with a larger receptive field: 6 (instead of 3) sequential stacks with 10 residual block layers each. We found that a deeper context stack, namely 2 stacks with 6 layers each arranged in a series, worked better for this task. We also updated the model to produce 16-bit output using a mixture of logistics as described in van den Oord et al. (2018).
143
+
144
+ The input to the context stack is an onset “piano roll” representation, a size-88 vector signaling the onset of any keys on the keyboard, with 4ms bins $( 2 5 0 \mathrm { H z } )$ . Each element of the vector is a float that represents the strike velocity of a piano key in the $4 \mathrm { m s }$ frame, scaled to the range [0, 1]. When there is no onset for a key at a given time, the value is 0.
145
+
146
+ We initially trained three models:
147
+
148
+ Unconditioned Trained only with the audio from the combined MAESTRO training/validation splits with no conditioning signal.
149
+
150
+ Ground Trained with the ground truth audio/MIDI pairs from the combined MAESTRO training/validation splits.
151
+
152
+ Transcribed Trained with ground truth audio and MIDI inferred from the audio using the Onsets and Frames method, referred to as MAESTRO-T in section 4.
153
+
154
+ The resulting losses after 1M training steps were 3.72, 3.70 and 3.84, respectively. Due to teacher forcing, these numbers do not reflect the quality of conditioning, so we rely on human judgment for evaluation, which we address in the following section.
155
+
156
+ It is interesting to note that the WaveNet model recreates non-piano subtleties of the recording, including the response of the room, breathing of the player, and shuffling of listeners in their seats. These results are encouraging and indicate that such methods could also capture the sound of more dynamic instruments (such as string and wind instruments) for which convincing synthesis/sampling methods lag behind piano.
157
+
158
+ Due to the heterogeneity of the ground truth audio quality in terms of microphone placement, ambient noise, etc., we sometime notice “timbral shifts” during longer outputs from these models. We therefore additionally trained a model conditioned on a one-hot year vector at each timestep (similar to speaker conditioning in TTS), which succeeds in producing consistent timbres and ambient qualities during long outputs (see Online Supplement).
159
+
160
+ A side effect of arbitrary windowing of the training data across note boundaries is a sonic crash that often occurs at the beginning of generated outputs. To sidestep this issue, we simply trim the first 2 seconds of all model outputs reported in this paper, and in the Online Supplement (https: //goo.gl/magenta/maestro-examples).
161
+
162
+ # 7 LISTENING TESTS
163
+
164
+ Since our ultimate goal is to create realistic musical audio, we carried out a listening study to determine the perceived quality of our method. To separately assess the effects of transcription, language modeling, and synthesis on the listeners’ responses, we presented users with two 20-second clips5 drawn from the following sets, each relying on an additional model from our factorization:
165
+
166
+ Ground Truth Recordings Clips randomly selected from the MAESTRO validation audio split.
167
+
168
+ WaveNet Unconditioned Clips generated by the Unconditioned WaveNet model described in section 6.
169
+
170
+ WaveNet Ground/Test Clips generated by the Ground WaveNet model described in section 6, conditioned on random 20-second MIDI subsequences from the MAESTRO test split.
171
+
172
+ WaveNet Transcribed/Test Clips generated by the Transcribed WaveNet model described in section 6, conditioned on random 20-second subsequences from the MAESTRO test split.
173
+
174
+ WaveNet Transcribed/Transformer Clips generated by the Transcribed WaveNet model described in section 6, conditioned on random 20-second subsequences from the Music Transformer model described in section 5 that was trained on MAESTRO-T.
175
+
176
+ The final set of samples demonstrates the full end-to-end ability of taking unlabeled piano performances, inferring MIDI labels via transcription, generating new performances with a language model trained on the inferred MIDI, and rendering new audio as though it were played on a similar piano—all without any information other than raw audio recordings of piano performances.
177
+
178
+ Participants were asked which clip they thought sounded more like a recording of somebody playing a musical piece on a real piano, on a Likert scale. 640 ratings were collected, with each source involved in 128 pair-wise comparisons. Figure 2 shows the number of comparisons in which performances from each source were selected as more realistic.
179
+
180
+ ![](images/9a79aaaa18e43122bd304f43d676e5c34e5ce20a15183d37a0cb440eccc640c6.jpg)
181
+ Figure 2: Results of our listening tests, showing the number of times each source won in a pairwise comparison. Black error bars indicate estimated standard deviation of means.
182
+
183
+ A Kruskal-Wallis H test of the ratings showed that there is at least one statistically significant difference between the models: $\chi ^ { 2 } ( 2 ) \stackrel { - } { = } 6 7 . 6 3 , p < 0 . 0 0 1$ . A post-hoc analysis using the Wilcoxon signed-rank test with Bonferroni correction showed that there was not a statistically significant difference in participant ratings between real recordings and samples from the WaveNet Ground/Test and WaveNet Transcribed/Test models with $p > 0 . 0 1 / 1 0$ .
184
+
185
+ Audio of some of the examples used in the listening tests is available in the Online Supplement (https://goo.gl/magenta/maestro-examples).
186
+
187
+ # 8 CONCLUSION
188
+
189
+ We have demonstrated the Wave2Midi2Wave system of models for factorized piano music modeling, all enabled by the new MAESTRO dataset. In this paper we have demonstrated all capabilities on the same dataset, but thanks to the new state-of-the-art piano transcription capabilities, any large set of piano recordings could be used,6 which we plan to do in future work. After transcribing the recordings, the transcriptions could be used to train a WaveNet and a Music Transformer model, and then new compositions could be generated with the Transformer and rendered with the WaveNet. These new compositions would have similar musical characteristics to the music in the original dataset, and the audio renderings would have similar acoustical characteristics to the source piano.
190
+
191
+ The most promising future work would be to extend this approach to other instruments or even multiple simultaneous instruments. Finding a suitable training dataset and achieving sufficient transcription performance will likely be the limiting factors.
192
+
193
+ The new dataset (MIDI, audio, metadata, and train/validation/test split configurations) is available at https://g.co/magenta/maestro-datasetunder a Creative Commons Attribution NonCommercial Share-Alike 4.0 license. The Online Supplement, including audio examples, is available at https://goo.gl/magenta/maestro-examples.
194
+
195
+ # ACKNOWLEDGMENTS
196
+
197
+ We would like to thank Michael E. Jones and Stella Sick for their help in coordinating the release of the source data and Colin Raffel for his careful review and comments on this paper.
198
+
199
+ # REFERENCES
200
+
201
+ B. Bank, S. Zambon, and F. Fontana. A modal-based real-time piano synthesizer. IEEE Transactions on Audio, Speech, and Language Processing, 18(4):809–821, May 2010. ISSN 1558-7916. doi: 10.1109/TASL.2010.2040524.
202
+
203
+ Mert Bay, Andreas F Ehmann, and J Stephen Downie. Evaluation of multiple-f0 estimation and tracking systems. In ISMIR, pp. 315–320, 2009.
204
+
205
+ Rachel Bittner, Eric Humphrey, and Juan Bello. Pysox: Leveraging the audio signal processing power of sox in python. In Proceedings of the International Society for Music Information Retrieval Conference Late Breaking and Demo Papers, 2016.
206
+
207
+ Judith C. Brown. Calculation of a constant q spectral transform. The Journal of the Acoustical Society of America, 89(1):425–434, 1991. doi: 10.1121/1.400476.
208
+
209
+ Sander Dieleman, Aaron van den Oord, and Karen Simonyan. The challenge of realistic music ¨ generation: modelling raw audio at scale. arXiv preprint arXiv:1806.10474, 2018.
210
+
211
+ Valentin Emiya, Nancy Bertin, Bertrand David, and Roland Badeau. MAPS - A piano database for multipitch estimation and automatic transcription of music. Research report, July 2010. URL https://hal.inria.fr/inria-00544155.
212
+
213
+ Curtis Hawthorne, Erich Elsen, Jialin Song, Adam Roberts, Ian Simon, Colin Raffel, Jesse Engel, Sageev Oore, and Douglas Eck. Onsets and frames: Dual-objective piano transcription. In Proceedings of the 19th International Society for Music Information Retrieval Conference, 2018.
214
+
215
+ Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, and Douglas Eck. An improved relative self-attention mechanism for transformer with application to music generation. arXiv preprint arXiv:1809.04281, 2018.
216
+
217
+ Rainer Kelz, Sebastian Bock, and Gerhard Widmer. Deep polyphonic adsr piano note transcription. In Late Breaking/Demos, Proceedings of the 19th International Society for Music Information Retrieval Conference, 2018.
218
+
219
+ Thakkar Vijay Manzelli, Rachel and, Ali Siahkamari, and Brian Kulis. Combining deep generative raw audio models for structured automatic music. In 19th International Society for Music Information Retrieval Conference, ISMIR, 2018.
220
+
221
+ Brian McFee, Matt McVicar, Oriol Nieto, Stefan Balke, Carl Thome, Dawen Liang, Eric Battenberg, Josh Moore, Rachel Bittner, Ryuichi Yamamoto, Dan Ellis, Fabian-Robert Stoter, Douglas Repetto, Simon Waloschek, CJ Carr, Seth Kranzler, Keunwoo Choi, Petr Viktorin, Joao Felipe Santos, Adrian Holovaty, Waldir Pimenta, Hojin Lee, and Paul Brossier. librosa 0.5.1, May 2017. URL https://doi.org/10.5281/zenodo.1022770.
222
+
223
+ Meinard Muller. ¨ Fundamentals of music processing: Audio, analysis, algorithms, applications. Springer, 2015.
224
+
225
+ Meinard Muller, Verena Konz, Wolfgang Bogler, and Vlora Arifi-M ¨ uller. Saarland music data ¨ (SMD). 2011.
226
+
227
+ Colin Raffel and Daniel P W Ellis. Intuitive analysis, creation and manipulation of midi data with pretty midi. 2014.
228
+
229
+ Hiroaki Sakoe and Seibi Chiba. Dynamic programming algorithm optimization for spoken word recognition. IEEE transactions on acoustics, speech, and signal processing, 26(1):43–49, 1978.
230
+
231
+ Christian Schorkhuber and Anssi Klapuri. Constant-q transform toolbox for music processing. In ¨ Proceedings of the 7th Sound and Music Computing Conference, Barcelona, Spain, July 2010.
232
+
233
+ John Thickstun, Zaid Harchaoui, and Sham Kakade. Learning features of music from scratch. In International Conference on Learning Representations (ICLR), 2017.
234
+
235
+ Vesa Valimaki, Julian D Parker, Lauri Savioja, Julius O Smith, and Jonathan S Abel. Fifty years of artificial reverberation. IEEE Transactions on Audio, Speech, and Language Processing, 20(5): 1421–1448, 2012.
236
+
237
+ Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, ¨ Nal Kalchbrenner, Andrew W Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. In SSW, pp. 125, 2016.
238
+
239
+ Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray ¨ Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis Cobo, Florian Stimberg, Norman Casagrande, Dominik Grewe, Seb Noury, Sander Dieleman, Erich Elsen, Nal Kalchbrenner, Heiga Zen, Alex Graves, Helen King, Tom Walters, Dan Belov, and Demis Hassabis. Parallel WaveNet: Fast high-fidelity speech synthesis. In Proceedings of the 35th International Conference on Machine Learning, 2018.
240
+
241
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017.
242
+
243
+ S Young, G Evermann, M Gales, T Hain, D Kershaw, X Liu, G Moore, J Odell, D Ollason, D Povey, et al. The htk book (v3. 4). Cambridge University, 2006.
244
+
245
+ # APPENDIX
246
+
247
+ In this appendix, we describe in detail how the MAESTRO dataset from section 3 was aligned and segmented.
248
+
249
+ # COARSE ALIGNMENT
250
+
251
+ The key idea for the alignment process was that even an untrained human can recognize whether two performances are of the same score based on raw audio, disregarding differences in the instrument or recording equipment used. Hence, we synthesized the provided MIDI (using FluidSynth with a SoundFont sampled from recordings of a Disklavier7) and sought to define an audio-based difference metric that could be minimized to find the best-alignment shift for every audio/MIDI pair.
252
+
253
+ We wanted the metric to take harmonic features into account, so as a first step we used librosa (McFee et al., 2017) to compute the Constant-Q Transform (Brown, 1991; Schorkhuber & Klapuri, ¨ 2010) of both original and synthesized audio. For the initial alignment stage we picked a hop length of 4096 samples $( \sim 9 0 ~ \mathrm { m s } )$ as a trade-off between speed and accuracy, which proved reasonable for most of the repertoire.8 Microphone setup varied between competition years and stages, resulting in varying frequency response and overall amplitude levels in recordings, especially in the lower and higher ends of the piano range. To account for that, we limited the CQT to 48 buckets aligned with MIDI notes C2–B5, and also converted amplitude levels to dB scale with maximum absolute amplitude as a reference point and a hard cut-off at -80 dB. Original and synthesized audio also differed in sound decay rate, so we normalized the resulting CQT arrays time-wise by dividing each hop column by its minimum value (averaged over a 5-hop window).
254
+
255
+ A single MIDI file from a Disklavier typically covered several hours of material corresponding to a sequence of shorter audio files from several seconds up to an hour long. We slid the normalized CQT of each such original audio file against a window of synthesized MIDI CQT of the same length and used mean squared error (MSE) between the two as the difference metric.9 Minimum error determined best alignment, after which we attempted to align the next audio file in sequence with the remaining length of the corresponding MIDI file. Due to the length of MIDI files, it was impractical to calculate MSE at each possible shift, so instead we trimmed silence at the beginning of audio, and attempted to align it with the first “note on” event of the MIDI file, within $\pm 1 2$ minutes tolerance. If the minimum error was still high, we attempted alignment at the next “note on” event after a 30-second silence.
256
+
257
+ This approach allowed us to skip over unusable sections of MIDI recordings that did not correspond to audio, e.g., instrument tuning and warm-ups, and also non-musical segments of audio such as applause and announcements. Non-piano sounds also considerably increased the MSE metric for very short audio files, so we had to either concatenate those with their longer neighbors if they had any musical material or exclude them completely. Events that were present at the beginning of audio files beyond the chosen shift tolerance which did not correspond to MIDI had to be cut off manually. In order to recover all musically useful data we also had to manually repair several MIDI files where the clock had erroneously jumped, causing the remainder of the file to be out of sync with corresponding audio.
258
+
259
+ After tuning process parameters and addressing the misaligned audio/MIDI pairs detected by unusually high CQT MSE, we have reached the state where each competition year (i.e., different audio recording setup) has final metric values for all pairs within a close range. Spot-checking the pairs with the highest MSE values for each year confirmed proper alignment, which allowed us to proceed to the segmentation stage.
260
+
261
+ # SEGMENTATION
262
+
263
+ Since certain compositions were performed by multiple contestants,10 we needed to segment the aligned audio/MIDI pairs further into individual musical pieces, so as to enable splitting the data into train, validation, and test sets disjoint on compositions. While the organizers provided the list of composition metadata for each audio file, for some competition years timing information was missing. In such cases we greedily sliced audio/MIDI pairs at the longest silences between MIDI notes up to the expected number of musical pieces.
264
+
265
+ Where expected piece duration data was available, we applied search with backtracking roughly as follows. As an invariant, the segmentation algorithm maintained a list of intervals as start–end time offsets along with a list of expected piece durations, so that the total length of the piece durations corresponding to each interval was less than the interval duration (within a certain tolerance). At each step we picked the next longest MIDI silence and determined which interval it belonged to. Then we split that interval in two at the silence and attempted to split the corresponding sequence of durations as well, satisfying the invariant. For each suitable split the algorithm continued to the next longest silence. If multiple splits were possible, the algorithm preferred the ones that divided the piece durations more evenly according to a heuristic. If no such split was possible, the algorithm either skipped current silence if it was short11 and attempted to split at the next one, or backtracked otherwise. It also backtracked if no more silences longer than 3 seconds were available. The algorithm succeeded as soon as each interval corresponded to exactly one expected piece duration.
266
+
267
+ Once a suitable segmentation was found, we sliced each audio/MIDI pair at resulting intervals, additionally trimming short clusters of notes at the beginning or end of each segment that appeared next to long MIDI silences in order to cut off additional non-music events (e.g., tuning or contestants testing the instrument during applause), and adding an extra 1 second of padding at both ends before making the final cut.
268
+
269
+ # FINE ALIGNMENT
270
+
271
+ After the initial alignment and segmentation, we applied Dynamic Time Warping (DTW) to account for any jitter in either the audio or MIDI recordings. DTW has seen wide use in audio-to-MIDI alignment; for an overview see Muller (2015). We follow the ¨ align midi example from pretty midi (Raffel & Ellis, 2014), except that we use a custom $\mathrm { C } { + + }$ DTW implementation for improved speed and memory efficiency to allow for aligning long sequences.
272
+
273
+ First, in Python, we use librosa to load the audio and resample it to a $2 2 { , } 0 5 0 \mathrm { H z }$ mono signal. Next, we load the MIDI and synthesize it at the same sample rate, using the same FluidSynth process as above. Then, we pad the end of the shorter of the two sample arrays so they are the same length. We use the same procedure as align midi to extract CQTs from both sample arrays, except that we use a hop length of 64 to achieve a resolution of ${ \sim } 3 \mathrm { m s }$ . We then pass these CQTs to our $\mathrm { C } { + } { + }$ DTW implementation. To avoid calculating the full distance matrix and taking its mean to get a penalty value, we instead sample $1 0 0 \mathrm { k }$ random pairs and use the mean of their cosine distances.
274
+
275
+ We use the same DTW algorithm as implemented in librosa except that we calculate cosine distances only within a Sakoe-Chiba band radius (Sakoe & Chiba, 1978) of 2.5 seconds instead of calculating distances for all pairs. Staying within this small band limits the number of calculations we need to make and the number of distances we have to store in memory. This is possible because we know from the previous alignment pass that the sequences are already mostly aligned and we just need to account for small constant offsets due to the lower resolution of the previous process and apply small sequence warps to recover from any occasional jitter.
parse/train/r1lYRjC9F7/r1lYRjC9F7_content_list.json ADDED
@@ -0,0 +1,1511 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ENABLING FACTORIZED PIANO MUSIC MODELING AND GENERATION WITH THE MAESTRO DATASET ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Curtis Hawthorne?, Andriy Stasyuk?, Adam Roberts?, Ian Simon?, Cheng-Zhi Anna Huang?, Sander Dieleman†, Erich Elsen?, Jesse Engel? & Douglas Eck? ?Google Brain, †DeepMind ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 803,
21
+ 213
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "{fjord,astas,adarob,iansimon,annahuang,sedielem,eriche,jesseengel,deck}@google.com ",
28
+ "bbox": [
29
+ 186,
30
+ 217,
31
+ 750,
32
+ 227
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 265,
43
+ 544,
44
+ 280
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Generating musical audio directly with neural networks is notoriously difficult because it requires coherently modeling structure at many different timescales. Fortunately, most music is also highly structured and can be represented as discrete note events played on musical instruments. Herein, we show that by using notes as an intermediate representation, we can train a suite of models capable of transcribing, composing, and synthesizing audio waveforms with coherent musical structure on timescales spanning six orders of magnitude ${ \\sim } 0 . 1 ~ \\mathrm { m s }$ to ${ \\sim } 1 0 0$ s), a process we call Wave2Midi2Wave. This large advance in the state of the art is enabled by our release of the new MAESTRO (MIDI and Audio Edited for Synchronous TRacks and Organization) dataset, composed of over 172 hours of virtuosic piano performances captured with fine alignment $( \\approx 3 { \\mathrm { ~ m s } } )$ between note labels and audio waveforms. The networks and the dataset together present a promising approach toward creating new expressive and interpretable neural models of music. ",
51
+ "bbox": [
52
+ 233,
53
+ 297,
54
+ 764,
55
+ 491
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 522,
66
+ 336,
67
+ 537
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Since the beginning of the recent wave of deep learning research, there have been many attempts to create generative models of expressive musical audio de novo. These models would ideally generate audio that is both musically and sonically realistic to the point of being indistinguishable to a listener from music composed and performed by humans. ",
74
+ "bbox": [
75
+ 174,
76
+ 554,
77
+ 823,
78
+ 609
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "However, modeling music has proven extremely difficult due to dependencies across the wide range of timescales that give rise to the characteristics of pitch and timbre (short-term) as well as those of rhythm (medium-term) and song structure (long-term). On the other hand, much of music has a large hierarchy of discrete structure embedded in its generative process: a composer creates songs, sections, and notes, and a performer realizes those notes with discrete events on their instrument, creating sound. The division between notes and sound is in many ways analogous to the division between symbolic language and utterances in speech. ",
85
+ "bbox": [
86
+ 174,
87
+ 617,
88
+ 825,
89
+ 715
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The WaveNet model by van den Oord et al. (2016) may be the first breakthrough in generating musical audio directly with a neural network. Using an autoregressive architecture, the authors trained a model on audio from piano performances that could then generate new piano audio sample-bysample. However, as opposed to their highly convincing speech examples, which were conditioned on linguistic features, the authors lacked a conditioning signal for their piano model. The result was audio that sounded very realistic at very short time scales (1 or 2 seconds), but that veered off into chaos beyond that. ",
96
+ "bbox": [
97
+ 174,
98
+ 722,
99
+ 825,
100
+ 819
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Dieleman et al. (2018) made great strides towards providing longer term structure to WaveNet synthesis by implicitly modeling the discrete musical structure described above. This was achieved by training a hierarchy of VQ-VAE models at multiple time-scales, ending with a WaveNet decoder to generate piano audio as waveforms. While the results are impressive in their ability to capture long-term structure directly from audio waveforms, the resulting sound suffers from various artifacts at the fine-scale not present in the unconditional WaveNet, clearly distinguishing it from real musical audio. Also, while the model learns a version of discrete structure from the audio, it is not directly reflective of the underlying generative process and thus not interpretable or manipulable by a musician or user. ",
107
+ "bbox": [
108
+ 174,
109
+ 825,
110
+ 823,
111
+ 922
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/41090d5a14a7564e35104023d0c7d0f04538a62b22b9b6242dc23121681e6279.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Wave2Midi2Wave system architecture for our suite of piano music models, consisting of (a) a conditional WaveNet model that generates audio from MIDI, (b) a Music Transformer language model that generates piano performance MIDI autoregressively, and (c) a piano transcription model that “encodes” piano performance audio as MIDI. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 214,
124
+ 99,
125
+ 807,
126
+ 330
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 176,
135
+ 445,
136
+ 823,
137
+ 474
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Manzelli et al. (2018) propose a model that uses a WaveNet to generate solo cello music conditioned on MIDI notation. This overcomes the inability to manipulate the generated sequence. However, their model requires a large training corpus of labeled audio because they do not train a transcription model, and it is limited to monophonic sequences. ",
144
+ "bbox": [
145
+ 174,
146
+ 481,
147
+ 825,
148
+ 537
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "In this work, we seek to explicitly factorize the problem informed by our prior understanding of the generative process of performer and instrument: ",
155
+ "bbox": [
156
+ 173,
157
+ 544,
158
+ 823,
159
+ 573
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "equation",
165
+ "img_path": "images/1d193db0d7975c52416731125493d02554be70c9f615df5c51b7610da3fd9960.jpg",
166
+ "text": "$$\nP ( a u d i o ) = \\mathbb { E } _ { n o t e s } \\left[ P ( a u d i o | n o t e s ) \\right]\n$$",
167
+ "text_format": "latex",
168
+ "bbox": [
169
+ 370,
170
+ 592,
171
+ 627,
172
+ 611
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "which can be thought of as a generative model with a discrete latent code of musical notes. Since the latent representation is discrete, and the scale of the problem is too large to jointly train, we split the model into three separately trained modules that are each state-of-the-art in their respective domains: ",
179
+ "bbox": [
180
+ 176,
181
+ 619,
182
+ 825,
183
+ 676
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "1. Encoder, $P ( n o t e s | a u d i o )$ : An Onsets and Frames (Hawthorne et al., 2018) transcription model to produce a symbolic representation (MIDI) from raw audio. 2. Prior, $P ( n o t e s )$ : A self-attention-based music language model (Huang et al., 2018) to generate new performances in MIDI format based on those transcribed in (1). 3. Decoder, $P ( a u d i o | n o t e s )$ : A WaveNet (van den Oord et al., 2016) synthesis model to generate audio of the performances conditioned on MIDI generated in (2). ",
190
+ "bbox": [
191
+ 210,
192
+ 689,
193
+ 825,
194
+ 785
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "We call this process Wave2Midi2Wave. ",
201
+ "bbox": [
202
+ 176,
203
+ 796,
204
+ 434,
205
+ 811
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "One hindrance to training such a stack of models is the lack of large-scale annotated datasets like those that exist for images. We overcome this barrier by curating and publicly releasing alongside this work a piano performance dataset containing well-aligned audio and symbolic performances an order of magnitude larger than the previous benchmarks. ",
212
+ "bbox": [
213
+ 174,
214
+ 819,
215
+ 825,
216
+ 875
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "In addition to the high quality of the samples our method produces (see https://goo.gl/ magenta/maestro-examples), training a suite of models according to the natural musician/instrument division has a number of other advantages. First, the intermediate representation used is more suitable for human interpretation and manipulation. Similarly, factorizing the model in this way provides better modularity: it is easy to independently swap out different performance and instrument models. Using an explicit performance representation with modern language models also allows us to model structure at much larger time scales, up to a minute or so of music. Finally, we can take advantage of the large amount of prior work in the areas of symbolic music generation and conditional audio generation. And by using a state-of-the-art music transcription model, we can make use of the same wealth of unlabeled audio recordings previously only usable for training end-to-end models by transcribing unlabeled audio recordings and feeding them into the rest of our model. ",
223
+ "bbox": [
224
+ 174,
225
+ 882,
226
+ 823,
227
+ 924
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "",
234
+ "bbox": [
235
+ 174,
236
+ 103,
237
+ 825,
238
+ 229
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "2 CONTRIBUTIONS OF THIS PAPER ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 176,
248
+ 251,
249
+ 472,
250
+ 267
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "Our contributions are as follows: ",
257
+ "bbox": [
258
+ 174,
259
+ 282,
260
+ 390,
261
+ 297
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "1. We combine a transcription model, a language model, and a MIDI-conditioned WaveNet model to produce a factorized approach to musical audio modeling capable of generating about one minute of coherent piano music. \n2. We provide a new dataset of piano performance recordings and aligned MIDI, an order of magnitude larger than previous datasets. \n3. Using an existing transcription model architecture trained on our new dataset, we achieve state-of-the-art results on a piano transcription benchmark. ",
268
+ "bbox": [
269
+ 212,
270
+ 310,
271
+ 825,
272
+ 421
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "3 DATASET ",
279
+ "text_level": 1,
280
+ "bbox": [
281
+ 174,
282
+ 443,
283
+ 282,
284
+ 459
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "We partnered with organizers of the International Piano-e-Competition1 for the raw data used in this dataset. During each installment of the competition, virtuoso pianists perform on Yamaha Disklaviers which, in addition to being concert-quality acoustic grand pianos, utilize an integrated high-precision MIDI capture and playback system. Recorded MIDI data is of sufficient fidelity to allow the audition stage of the competition to be judged remotely by listening to contestant performances reproduced over the wire on another Disklavier instrument. ",
291
+ "bbox": [
292
+ 174,
293
+ 474,
294
+ 825,
295
+ 559
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "The dataset introduced in this paper, which we name MAESTRO (“MIDI and Audio Edited for Synchronous TRacks and Organization”), contains over a week of paired audio and MIDI recordings from nine years of International Piano-e-Competition events.2 The MIDI data includes key strike velocities and sustain pedal positions. Audio and MIDI files are aligned with ${ \\approx } 3$ ms accuracy and sliced to individual musical pieces, which are annotated with composer, title, and year of performance. Uncompressed audio is of CD quality or higher $\\mathrm { 4 4 . 1 - 4 8 \\ k H z \\ 1 6 }$ -bit PCM stereo). A train/validation/test split configuration is also proposed, so that the same composition, even if performed by multiple contestants, does not appear in multiple subsets. Repertoire is mostly classical, including composers from the $1 7 ^ { \\mathrm { t h } }$ to early $\\bar { 2 } 0 ^ { \\mathrm { t h } }$ century. Table 1 contains aggregate statistics of the MAESTRO dataset. ",
302
+ "bbox": [
303
+ 174,
304
+ 565,
305
+ 825,
306
+ 705
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "table",
312
+ "img_path": "images/e4fb17bd97b77caa4102cb8e272ac2d0722e060dce518b637a19126a1af68dbc.jpg",
313
+ "table_caption": [
314
+ "Table 1: Statistics of the MAESTRO dataset. "
315
+ ],
316
+ "table_footnote": [],
317
+ "table_body": "<table><tr><td>Split</td><td>Performances</td><td>Compositions (approx.)</td><td>Duration, hours</td><td>Size, GB</td><td>Notes, millions</td></tr><tr><td>Train</td><td>954</td><td>295</td><td>140.1</td><td>83.6</td><td>5.06</td></tr><tr><td rowspan=\"3\">Validation Test</td><td>105</td><td>60</td><td>15.3</td><td>9.1</td><td>0.54</td></tr><tr><td>125</td><td>75</td><td>16.9</td><td>10.1</td><td>0.57</td></tr><tr><td>1184</td><td>430</td><td>172.3</td><td>102.8</td><td>6.18</td></tr></table>",
318
+ "bbox": [
319
+ 228,
320
+ 715,
321
+ 767,
322
+ 804
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "We make the new dataset (MIDI, audio, metadata, and train/validation/test split configuration) available at https://g.co/magenta/maestro-datasetunder a Creative Commons Attribution Non-Commercial Share-Alike 4.0 license. ",
329
+ "bbox": [
330
+ 176,
331
+ 843,
332
+ 823,
333
+ 886
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "Several datasets of paired piano audio and MIDI have been published previously and have enabled significant advances in automatic piano transcription and related topics. We are making MAESTRO available because we believe it provides several advantages over existing datasets. Most significantly, as evident from table 2, MAESTRO is around an order of magnitude larger. Existing datasets also have different properties than MAESTRO that affect model training: ",
340
+ "bbox": [
341
+ 174,
342
+ 103,
343
+ 825,
344
+ 174
345
+ ],
346
+ "page_idx": 3
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "MusicNet (Thickstun et al., 2017) contains recordings of human performances, but separatelysourced scores. As discussed in Hawthorne et al. (2018), the alignment between audio and score is not fully accurate. One advantage of MusicNet is that it contains instruments other than piano (not counted in table 2) and a wider variety of recording environments. ",
351
+ "bbox": [
352
+ 174,
353
+ 184,
354
+ 823,
355
+ 239
356
+ ],
357
+ "page_idx": 3
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "MAPS (Emiya et al., 2010) contains Disklavier recordings and synthesized audio created from MIDI files that were originally entered via sequencer. As such, the “performances” are not as natural as the MAESTRO performances captured from live performances. In addition, synthesized audio makes up a large fraction of the MAPS dataset. MAPS also contains syntheses and recordings of individual notes and chords, not counted in table 2. ",
362
+ "bbox": [
363
+ 174,
364
+ 242,
365
+ 825,
366
+ 313
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "Saarland Music Data (SMD) (Muller et al., 2011) is similar to MAESTRO in that it contains¨ recordings and aligned MIDI of human performances on a Disklavier, but is 30 times smaller. ",
373
+ "bbox": [
374
+ 173,
375
+ 315,
376
+ 823,
377
+ 345
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "table",
383
+ "img_path": "images/04feb23a07555c0fb31cbda98ca04f5501a1bc55e4db611d9e08ed7ebae02858.jpg",
384
+ "table_caption": [
385
+ "Table 2: Comparison with other datasets. "
386
+ ],
387
+ "table_footnote": [],
388
+ "table_body": "<table><tr><td>Dataset</td><td>Performances</td><td>Compositions</td><td>Duration, hours</td><td>Notes, millions</td></tr><tr><td>SMD</td><td>50</td><td>50</td><td>4.7</td><td>0.15</td></tr><tr><td>MusicNet</td><td>156</td><td>60</td><td>15.3</td><td>0.58</td></tr><tr><td>MAPS</td><td>270</td><td>208</td><td>17.9</td><td>0.62</td></tr><tr><td>MAESTRO</td><td>1184</td><td>~430</td><td>172.3</td><td>6.18</td></tr></table>",
389
+ "bbox": [
390
+ 258,
391
+ 358,
392
+ 736,
393
+ 446
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "3.1 ALIGNMENT ",
400
+ "text_level": 1,
401
+ "bbox": [
402
+ 174,
403
+ 492,
404
+ 302,
405
+ 506
406
+ ],
407
+ "page_idx": 3
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "Our goal in processing the data from International Piano-e-Competition was to produce pairs of audio and MIDI files time-aligned to represent the same musical events. The data we received from the organizers was a combination of MIDI files recorded by Disklaviers themselves and WAV audio captured with conventional recording equipment. However, because the recording streams were independent, they differed widely in start times and durations, and they were also subject to jitter. Due to the large volume of content, we developed an automated process for aligning, slicing, and time-warping provided audio and MIDI to ensure a precise match between the two. ",
412
+ "bbox": [
413
+ 173,
414
+ 517,
415
+ 825,
416
+ 616
417
+ ],
418
+ "page_idx": 3
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "Our approach is based on globally minimizing the distance between CQT frames from the real audio and synthesized MIDI (using FluidSynth3). Obtaining a highly accurate alignment is non-trivial, and we provide full details in the appendix. ",
423
+ "bbox": [
424
+ 174,
425
+ 622,
426
+ 825,
427
+ 665
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "3.2 DATASET SPLITTING ",
434
+ "text_level": 1,
435
+ "bbox": [
436
+ 176,
437
+ 680,
438
+ 356,
439
+ 695
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "For all experiments in this paper, we use a single train/validation/test split designed to satisfy the following criteria: ",
446
+ "bbox": [
447
+ 173,
448
+ 707,
449
+ 823,
450
+ 734
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "• No composition should appear in more than one split. \n• Train/validation/test should make up roughly 80/10/10 percent of the dataset (in time), respectively. These proportions should be true globally and also within each composer. Maintaining these proportions is not always possible because some composers have too few compositions in the dataset. \n• The validation and test splits should contain a variety of compositions. Extremely popular compositions performed by many performers should be placed in the training split. ",
457
+ "bbox": [
458
+ 215,
459
+ 744,
460
+ 825,
461
+ 851
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "For comparison with our results, we recommend using the splits which we have provided. We do not necessarily expect these splits to be suitable for all purposes; future researchers are free to use alternate experimental methodologies. ",
468
+ "bbox": [
469
+ 176,
470
+ 859,
471
+ 825,
472
+ 902
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "4 PIANO TRANSCRIPTION ",
479
+ "text_level": 1,
480
+ "bbox": [
481
+ 176,
482
+ 102,
483
+ 403,
484
+ 118
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "The large MAESTRO dataset enables training an automatic piano music transcription model that achieves a new state of the art. We base our model on Onsets and Frames, with several modifications informed by a coarse hyperparameter search using the validation split. For full details of the base model architecture and training procedure, refer to Hawthorne et al. (2018). ",
491
+ "bbox": [
492
+ 174,
493
+ 133,
494
+ 823,
495
+ 189
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "One important modification was adding an offset detection head, inspired by Kelz et al. (2018). The offset head feeds into the frame detector but is not directly used during decoding. The offset labels are defined to be the $3 2 \\mathrm { m s }$ following the end of each note. ",
502
+ "bbox": [
503
+ 174,
504
+ 196,
505
+ 825,
506
+ 238
507
+ ],
508
+ "page_idx": 4
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "We also increased the size of the bidirectional LSTM layers from 128 to 256 units, changed the number of filters in the convolutional layers from 32/32/64 to 48/48/96, and increased the units in the fully connected layer from 512 to 768. We also stopped gradient propagation into the onset subnetwork from the frame network, disabled weighted frame loss, and switched to HTK frequency spacing (Young et al., 2006) for the mel-frequency spectrogram input. In general, we found that the best ways to get higher performance with the larger dataset were to make the model larger and simpler. ",
513
+ "bbox": [
514
+ 173,
515
+ 246,
516
+ 825,
517
+ 343
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "The final important change we made was to start using audio augmentation during training using an approach similar to the one described in McFee et al. (2017). During training, every input sample was modified using random parameters for the $S o X ^ { 4 }$ audio tool using pysox (Bittner et al., 2016). The parameters, ranges, and random sampling methods are described in table 3. We found that this was particularly important when evaluating on the MAPS dataset, likely because the audio augmentation made the model more robust to differences in recording environment and piano qualities. The differences in training results are summarized in table 6. When evaluating against the MAESTRO dataset, we found that audio augmentation made results slightly worse, so results in table 5 are presented without audio augmentation. ",
524
+ "bbox": [
525
+ 173,
526
+ 349,
527
+ 825,
528
+ 476
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "table",
534
+ "img_path": "images/146d6285f4c787eb3bbf8744a488ab038a589d9b231b7bbfacc3577735662be7.jpg",
535
+ "table_caption": [
536
+ "Table 3: Audio augmentation parameters. "
537
+ ],
538
+ "table_footnote": [],
539
+ "table_body": "<table><tr><td rowspan=1 colspan=2>Description</td><td rowspan=1 colspan=1>Scale</td><td rowspan=1 colspan=1>Range</td><td rowspan=1 colspan=1>Sampling</td></tr><tr><td rowspan=6 colspan=2>pitch shiftcontrast (compression)equalizer 1equalizer 2reverbpinknoise</td><td rowspan=1 colspan=1>semitones</td><td rowspan=1 colspan=1>-0.1-0.1</td><td rowspan=1 colspan=1>linear</td></tr><tr><td rowspan=1 colspan=1>amount</td><td rowspan=1 colspan=1>0.0-100.0</td><td rowspan=1 colspan=1>linear</td></tr><tr><td rowspan=1 colspan=1>frequency</td><td rowspan=1 colspan=1>32.0-4096.0</td><td rowspan=2 colspan=1>loglog</td></tr><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=1>frequency</td><td rowspan=1 colspan=1>32.0-4096.0</td></tr><tr><td rowspan=1 colspan=1>reverberance</td><td rowspan=1 colspan=1>0.0-70.0</td><td rowspan=1 colspan=1>log</td></tr><tr><td rowspan=1 colspan=1>volume</td><td rowspan=1 colspan=1>0.0-0.04</td><td rowspan=1 colspan=1>linear</td></tr></table>",
540
+ "bbox": [
541
+ 267,
542
+ 489,
543
+ 728,
544
+ 590
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "After training on the MAESTRO training split for $6 7 0 \\mathrm { k }$ steps, we achieved state of the art results described in table 4 for the MAPS dataset. We also present our results on the train, validation, and test splits of the MAESTRO dataset as a new baseline score in table 5. Note that for calculating the scores of the train split, we use the full duration of the files without splitting them into 20-second chunks as is done during training. ",
551
+ "bbox": [
552
+ 173,
553
+ 628,
554
+ 825,
555
+ 700
556
+ ],
557
+ "page_idx": 4
558
+ },
559
+ {
560
+ "type": "table",
561
+ "img_path": "images/38b9b2c42b63c925d1d3d1ac65ac142b364e8969168ae1105e36e27c3ae313a3.jpg",
562
+ "table_caption": [],
563
+ "table_footnote": [],
564
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">Frame</td><td colspan=\"3\">Note</td><td colspan=\"3\">Note w/ offset</td><td colspan=\"3\">Note w/offset &amp; velocity</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Hawthorne et al. (2018)</td><td>88.53</td><td>70.89</td><td>78.30</td><td>84.24</td><td>80.67</td><td>82.29</td><td>51.32</td><td>49.31</td><td>50.22</td><td>35.52</td><td>30.80</td><td>35.39</td></tr><tr><td>Kelz et al. (2018)</td><td>90.73</td><td>67.85</td><td>77.16</td><td>90.15</td><td>74.78</td><td>81.38</td><td>61.93</td><td>51.66</td><td>56.08</td><td></td><td></td><td></td></tr><tr><td>Onsets&amp; Frames (MAESTRO)</td><td>92.86</td><td>78.46</td><td>84.91</td><td>87.46</td><td>85.58</td><td>86.44</td><td>68.22</td><td>66.75</td><td>67.43</td><td>52.41</td><td>51.22</td><td>51.77</td></tr></table>",
565
+ "bbox": [
566
+ 176,
567
+ 713,
568
+ 823,
569
+ 762
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "Table 4: Transcription Precision, Recall, and F1 Results on MAPS configuration 2 test dataset (ENSTDkCl and ENSTDkAm full-length .wav files). Training was done on the MAESTRO trianing set with audio augmentation. Scores are calculated using the same method as in Hawthorne et al. (2018). Note-based scores calculated by the mir eval library, frame-based scores as defined in Bay et al. (2009). Final metric is the mean of scores calculated per piece. ",
576
+ "bbox": [
577
+ 173,
578
+ 770,
579
+ 825,
580
+ 840
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "In sections 5 and 6, we demonstrate how using this transcription model enables training language and synthesis models on a large set of unlabeled piano data. To do this, we transcribe the audio in the MAESTRO training set, although in theory any large set of unlabeled piano music would work. We ",
587
+ "bbox": [
588
+ 174,
589
+ 856,
590
+ 825,
591
+ 898
592
+ ],
593
+ "page_idx": 4
594
+ },
595
+ {
596
+ "type": "table",
597
+ "img_path": "images/636f3a33b9357b9d8f91bf2c05adfe6194e8ed3ffe83d94811d127076d9f3f08.jpg",
598
+ "table_caption": [],
599
+ "table_footnote": [],
600
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">Frame</td><td colspan=\"3\">Note</td><td colspan=\"3\">Note w/offset</td><td colspan=\"3\">Note W/offset &amp; velocity</td></tr><tr><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td><td>P</td><td>R</td><td>F1</td></tr><tr><td>Train</td><td>94.23</td><td>92.58</td><td>93.35</td><td>98.88</td><td>94.41</td><td>96.56</td><td>88.13</td><td>84.19</td><td>86.09</td><td>84.98</td><td>81.20</td><td>83.02</td></tr><tr><td>Validation</td><td>91.69</td><td>87.80</td><td>89.58</td><td>98.42</td><td>92.61</td><td>95.38</td><td>82.93</td><td>78.17</td><td>80.44</td><td>80.36</td><td>75.75</td><td>77.95</td></tr><tr><td>Test</td><td>92.11</td><td>88.41</td><td>90.15</td><td>98.27</td><td>92.61</td><td>95.32</td><td>82.95</td><td>78.24</td><td>80.50</td><td>79.89</td><td>75.37</td><td>77.54</td></tr></table>",
601
+ "bbox": [
602
+ 218,
603
+ 101,
604
+ 779,
605
+ 150
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Table 5: Results from training the modified Onsets and Frames model on the MAESTRO train split without audio augmentation. Precision, Recall, and F1 Results on the splits of the MAESTRO dataset. Calculations done in the same manner as table 4. ",
612
+ "bbox": [
613
+ 174,
614
+ 159,
615
+ 825,
616
+ 200
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "table",
622
+ "img_path": "images/bef02ca1b80bed507064b7beac3a60c875e6e56565fa0aace811c54812c900db.jpg",
623
+ "table_caption": [],
624
+ "table_footnote": [],
625
+ "table_body": "<table><tr><td></td><td>Frame F1</td><td>Note F1</td><td>Note w/ offset F1</td><td>Note w/ offset &amp; velocity F1</td></tr><tr><td>WithAudio Augmentation (MAPS)</td><td>84.91</td><td>86.44</td><td>67.43</td><td>51.77</td></tr><tr><td>Without Audio Augmentation (MAPS)</td><td>82.02</td><td>83.04</td><td>61.84</td><td>48.07</td></tr><tr><td>WithAudio Augmentation (MAESTRO)</td><td>89.19</td><td>94.80</td><td>79.67</td><td>76.04</td></tr><tr><td>Without Audio Augmentation (MAESTRO)</td><td>90.15</td><td>95.32</td><td>80.50</td><td>77.54</td></tr></table>",
626
+ "bbox": [
627
+ 274,
628
+ 210,
629
+ 722,
630
+ 268
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Table 6: Comparisons between results of training the same model with the same number of steps (670k) with and without audio augmentation. Training was done on the MAESTRO training set and evaluation was on either the MAPS configuration 2 test set as in table 4 or the MAESTRO test set as in table 5. ",
637
+ "bbox": [
638
+ 173,
639
+ 279,
640
+ 825,
641
+ 334
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "call this new, transcribed version of the training set MAESTRO-T. While it is true that the audio transcribed for MAESTRO-T was also used to train the transcription model, table 5 shows that the model performance is not significantly different between the training split and the validation or test splits, and we needed the larger split to enable training the other models. ",
648
+ "bbox": [
649
+ 174,
650
+ 358,
651
+ 825,
652
+ 415
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "5 MUSIC TRANSFORMER TRAINING ",
659
+ "text_level": 1,
660
+ "bbox": [
661
+ 176,
662
+ 435,
663
+ 488,
664
+ 452
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "For our generative language model, we use the decoder portion of a Transformer (Vaswani et al., 2017) with relative self-attention, which has previously shown compelling results in generating music with longer-term coherence (Huang et al., 2018). We trained two models, one on MIDI data from the MAESTRO dataset and another on MIDI transcriptions inferred by Onsets and Frames from audio in MAESTRO, referred to as MAESTRO-T in section 4. For full details of the model architecture and training procedure, refer to Huang et al. (2018). ",
671
+ "bbox": [
672
+ 173,
673
+ 467,
674
+ 825,
675
+ 551
676
+ ],
677
+ "page_idx": 5
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "We used the same training procedure for both datasets. We trained on random crops of 2048 events and employed transposition and time compression/stretching data augmentation. The transpositions were uniformly sampled in the range of a minor third below and above the original piece. The time stretches were at discrete amounts and uniformly sampled from the set $\\{ 0 . 9 \\mathrm { { 5 } , 0 . 9 7 5 , 1 . 0 , 1 . 0 2 5 , 1 . 0 5 } \\}$ . ",
682
+ "bbox": [
683
+ 174,
684
+ 558,
685
+ 825,
686
+ 628
687
+ ],
688
+ "page_idx": 5
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "We evaluated both of the models on their respective validation splits. ",
693
+ "bbox": [
694
+ 174,
695
+ 636,
696
+ 624,
697
+ 650
698
+ ],
699
+ "page_idx": 5
700
+ },
701
+ {
702
+ "type": "table",
703
+ "img_path": "images/eebee8455515941bc9c708b8c076a3475f56bcf2fc8bf02cd11eb85f038af6b2.jpg",
704
+ "table_caption": [
705
+ "Table 7: Validation Negative Log-Likelihood, with event-based representation. "
706
+ ],
707
+ "table_footnote": [],
708
+ "table_body": "<table><tr><td>Model variation</td><td>NLL on their respective validation splits</td></tr><tr><td>Music TransformertrainedonMAESTRO</td><td>1.84</td></tr><tr><td>Music Transformer trained on MAESTRO-T</td><td>1.72</td></tr></table>",
709
+ "bbox": [
710
+ 227,
711
+ 662,
712
+ 769,
713
+ 705
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "Samples outputs from the Music Transformer model can be heard in the Online Supplement (https://goo.gl/magenta/maestro-examples). ",
720
+ "bbox": [
721
+ 174,
722
+ 744,
723
+ 823,
724
+ 772
725
+ ],
726
+ "page_idx": 5
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "6 PIANO SYNTHESIS ",
731
+ "text_level": 1,
732
+ "bbox": [
733
+ 174,
734
+ 794,
735
+ 361,
736
+ 810
737
+ ],
738
+ "page_idx": 5
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Most commercially available systems that are able to synthesize a MIDI sequence into a piano audio signal are concatenative: they stitch together snippets of audio from a large library of recordings of individual notes. While this stitching process can be quite ingenious, it does not optimally capture the various interactions between notes, whether they are played simultaneously or in sequence. An alternative but less popular strategy is to simulate a physical model of the instrument. Constructing an accurate model constitutes a considerable engineering effort and is a field of research by itself (Bank et al., 2010; Valimaki et al., 2012). ",
743
+ "bbox": [
744
+ 173,
745
+ 825,
746
+ 825,
747
+ 924
748
+ ],
749
+ "page_idx": 5
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "WaveNet (van den Oord et al., 2016) is able to synthesize realistic instrument sounds directly in the waveform domain, but it is not as adept at capturing musical structure at timescales of seconds or longer. However, if we provide a MIDI sequence to a WaveNet model as conditioning information, we eliminate the need for capturing large scale structure, and the model can focus on local structure instead, i.e., instrument timbre and local interactions between notes. Conditional WaveNets are also used for text-to-speech (TTS), and have been shown to excel at generating realistic speech signals conditioned on linguistic features extracted from textual data. This indicates that the same setup could work well for music audio synthesis from MIDI sequences. ",
754
+ "bbox": [
755
+ 174,
756
+ 103,
757
+ 825,
758
+ 214
759
+ ],
760
+ "page_idx": 6
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "Our WaveNet model uses a similar autoregressive architecture to van den Oord et al. (2016), but with a larger receptive field: 6 (instead of 3) sequential stacks with 10 residual block layers each. We found that a deeper context stack, namely 2 stacks with 6 layers each arranged in a series, worked better for this task. We also updated the model to produce 16-bit output using a mixture of logistics as described in van den Oord et al. (2018). ",
765
+ "bbox": [
766
+ 174,
767
+ 222,
768
+ 825,
769
+ 291
770
+ ],
771
+ "page_idx": 6
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "The input to the context stack is an onset “piano roll” representation, a size-88 vector signaling the onset of any keys on the keyboard, with 4ms bins $( 2 5 0 \\mathrm { H z } )$ . Each element of the vector is a float that represents the strike velocity of a piano key in the $4 \\mathrm { m s }$ frame, scaled to the range [0, 1]. When there is no onset for a key at a given time, the value is 0. ",
776
+ "bbox": [
777
+ 174,
778
+ 299,
779
+ 825,
780
+ 354
781
+ ],
782
+ "page_idx": 6
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "We initially trained three models: ",
787
+ "bbox": [
788
+ 176,
789
+ 361,
790
+ 393,
791
+ 376
792
+ ],
793
+ "page_idx": 6
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "Unconditioned Trained only with the audio from the combined MAESTRO training/validation splits with no conditioning signal. ",
798
+ "bbox": [
799
+ 174,
800
+ 387,
801
+ 821,
802
+ 416
803
+ ],
804
+ "page_idx": 6
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "Ground Trained with the ground truth audio/MIDI pairs from the combined MAESTRO training/validation splits. ",
809
+ "bbox": [
810
+ 173,
811
+ 420,
812
+ 821,
813
+ 449
814
+ ],
815
+ "page_idx": 6
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "Transcribed Trained with ground truth audio and MIDI inferred from the audio using the Onsets and Frames method, referred to as MAESTRO-T in section 4. ",
820
+ "bbox": [
821
+ 173,
822
+ 453,
823
+ 821,
824
+ 481
825
+ ],
826
+ "page_idx": 6
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "The resulting losses after 1M training steps were 3.72, 3.70 and 3.84, respectively. Due to teacher forcing, these numbers do not reflect the quality of conditioning, so we rely on human judgment for evaluation, which we address in the following section. ",
831
+ "bbox": [
832
+ 178,
833
+ 492,
834
+ 821,
835
+ 535
836
+ ],
837
+ "page_idx": 6
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "It is interesting to note that the WaveNet model recreates non-piano subtleties of the recording, including the response of the room, breathing of the player, and shuffling of listeners in their seats. These results are encouraging and indicate that such methods could also capture the sound of more dynamic instruments (such as string and wind instruments) for which convincing synthesis/sampling methods lag behind piano. ",
842
+ "bbox": [
843
+ 174,
844
+ 542,
845
+ 825,
846
+ 612
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Due to the heterogeneity of the ground truth audio quality in terms of microphone placement, ambient noise, etc., we sometime notice “timbral shifts” during longer outputs from these models. We therefore additionally trained a model conditioned on a one-hot year vector at each timestep (similar to speaker conditioning in TTS), which succeeds in producing consistent timbres and ambient qualities during long outputs (see Online Supplement). ",
853
+ "bbox": [
854
+ 174,
855
+ 619,
856
+ 823,
857
+ 689
858
+ ],
859
+ "page_idx": 6
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "A side effect of arbitrary windowing of the training data across note boundaries is a sonic crash that often occurs at the beginning of generated outputs. To sidestep this issue, we simply trim the first 2 seconds of all model outputs reported in this paper, and in the Online Supplement (https: //goo.gl/magenta/maestro-examples). ",
864
+ "bbox": [
865
+ 174,
866
+ 695,
867
+ 823,
868
+ 752
869
+ ],
870
+ "page_idx": 6
871
+ },
872
+ {
873
+ "type": "text",
874
+ "text": "7 LISTENING TESTS ",
875
+ "text_level": 1,
876
+ "bbox": [
877
+ 176,
878
+ 771,
879
+ 356,
880
+ 787
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Since our ultimate goal is to create realistic musical audio, we carried out a listening study to determine the perceived quality of our method. To separately assess the effects of transcription, language modeling, and synthesis on the listeners’ responses, we presented users with two 20-second clips5 drawn from the following sets, each relying on an additional model from our factorization: ",
887
+ "bbox": [
888
+ 174,
889
+ 803,
890
+ 823,
891
+ 859
892
+ ],
893
+ "page_idx": 6
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Ground Truth Recordings Clips randomly selected from the MAESTRO validation audio split. ",
898
+ "bbox": [
899
+ 176,
900
+ 872,
901
+ 813,
902
+ 887
903
+ ],
904
+ "page_idx": 6
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "WaveNet Unconditioned Clips generated by the Unconditioned WaveNet model described in section 6. ",
909
+ "bbox": [
910
+ 173,
911
+ 103,
912
+ 823,
913
+ 132
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "WaveNet Ground/Test Clips generated by the Ground WaveNet model described in section 6, conditioned on random 20-second MIDI subsequences from the MAESTRO test split. ",
920
+ "bbox": [
921
+ 174,
922
+ 136,
923
+ 821,
924
+ 164
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "WaveNet Transcribed/Test Clips generated by the Transcribed WaveNet model described in section 6, conditioned on random 20-second subsequences from the MAESTRO test split. ",
931
+ "bbox": [
932
+ 173,
933
+ 167,
934
+ 821,
935
+ 196
936
+ ],
937
+ "page_idx": 7
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "WaveNet Transcribed/Transformer Clips generated by the Transcribed WaveNet model described in section 6, conditioned on random 20-second subsequences from the Music Transformer model described in section 5 that was trained on MAESTRO-T. ",
942
+ "bbox": [
943
+ 176,
944
+ 200,
945
+ 821,
946
+ 242
947
+ ],
948
+ "page_idx": 7
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "The final set of samples demonstrates the full end-to-end ability of taking unlabeled piano performances, inferring MIDI labels via transcription, generating new performances with a language model trained on the inferred MIDI, and rendering new audio as though it were played on a similar piano—all without any information other than raw audio recordings of piano performances. ",
953
+ "bbox": [
954
+ 174,
955
+ 255,
956
+ 825,
957
+ 310
958
+ ],
959
+ "page_idx": 7
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Participants were asked which clip they thought sounded more like a recording of somebody playing a musical piece on a real piano, on a Likert scale. 640 ratings were collected, with each source involved in 128 pair-wise comparisons. Figure 2 shows the number of comparisons in which performances from each source were selected as more realistic. ",
964
+ "bbox": [
965
+ 174,
966
+ 318,
967
+ 823,
968
+ 373
969
+ ],
970
+ "page_idx": 7
971
+ },
972
+ {
973
+ "type": "image",
974
+ "img_path": "images/9a79aaaa18e43122bd304f43d676e5c34e5ce20a15183d37a0cb440eccc640c6.jpg",
975
+ "image_caption": [
976
+ "Figure 2: Results of our listening tests, showing the number of times each source won in a pairwise comparison. Black error bars indicate estimated standard deviation of means. "
977
+ ],
978
+ "image_footnote": [],
979
+ "bbox": [
980
+ 238,
981
+ 382,
982
+ 761,
983
+ 496
984
+ ],
985
+ "page_idx": 7
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "A Kruskal-Wallis H test of the ratings showed that there is at least one statistically significant difference between the models: $\\chi ^ { 2 } ( 2 ) \\stackrel { - } { = } 6 7 . 6 3 , p < 0 . 0 0 1$ . A post-hoc analysis using the Wilcoxon signed-rank test with Bonferroni correction showed that there was not a statistically significant difference in participant ratings between real recordings and samples from the WaveNet Ground/Test and WaveNet Transcribed/Test models with $p > 0 . 0 1 / 1 0$ . ",
990
+ "bbox": [
991
+ 174,
992
+ 570,
993
+ 825,
994
+ 641
995
+ ],
996
+ "page_idx": 7
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Audio of some of the examples used in the listening tests is available in the Online Supplement (https://goo.gl/magenta/maestro-examples). ",
1001
+ "bbox": [
1002
+ 173,
1003
+ 648,
1004
+ 823,
1005
+ 676
1006
+ ],
1007
+ "page_idx": 7
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "8 CONCLUSION ",
1012
+ "text_level": 1,
1013
+ "bbox": [
1014
+ 176,
1015
+ 696,
1016
+ 318,
1017
+ 712
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "We have demonstrated the Wave2Midi2Wave system of models for factorized piano music modeling, all enabled by the new MAESTRO dataset. In this paper we have demonstrated all capabilities on the same dataset, but thanks to the new state-of-the-art piano transcription capabilities, any large set of piano recordings could be used,6 which we plan to do in future work. After transcribing the recordings, the transcriptions could be used to train a WaveNet and a Music Transformer model, and then new compositions could be generated with the Transformer and rendered with the WaveNet. These new compositions would have similar musical characteristics to the music in the original dataset, and the audio renderings would have similar acoustical characteristics to the source piano. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 727,
1027
+ 825,
1028
+ 839
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "The most promising future work would be to extend this approach to other instruments or even multiple simultaneous instruments. Finding a suitable training dataset and achieving sufficient transcription performance will likely be the limiting factors. ",
1035
+ "bbox": [
1036
+ 174,
1037
+ 845,
1038
+ 825,
1039
+ 888
1040
+ ],
1041
+ "page_idx": 7
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "The new dataset (MIDI, audio, metadata, and train/validation/test split configurations) is available at https://g.co/magenta/maestro-datasetunder a Creative Commons Attribution NonCommercial Share-Alike 4.0 license. The Online Supplement, including audio examples, is available at https://goo.gl/magenta/maestro-examples. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 103,
1049
+ 825,
1050
+ 160
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "ACKNOWLEDGMENTS ",
1057
+ "text_level": 1,
1058
+ "bbox": [
1059
+ 176,
1060
+ 176,
1061
+ 328,
1062
+ 190
1063
+ ],
1064
+ "page_idx": 8
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "We would like to thank Michael E. Jones and Stella Sick for their help in coordinating the release of the source data and Colin Raffel for his careful review and comments on this paper. ",
1069
+ "bbox": [
1070
+ 174,
1071
+ 200,
1072
+ 823,
1073
+ 228
1074
+ ],
1075
+ "page_idx": 8
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "REFERENCES ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 174,
1083
+ 250,
1084
+ 285,
1085
+ 265
1086
+ ],
1087
+ "page_idx": 8
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "B. Bank, S. Zambon, and F. Fontana. A modal-based real-time piano synthesizer. IEEE Transactions on Audio, Speech, and Language Processing, 18(4):809–821, May 2010. ISSN 1558-7916. doi: 10.1109/TASL.2010.2040524. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 273,
1095
+ 826,
1096
+ 315
1097
+ ],
1098
+ "page_idx": 8
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Mert Bay, Andreas F Ehmann, and J Stephen Downie. Evaluation of multiple-f0 estimation and tracking systems. In ISMIR, pp. 315–320, 2009. ",
1103
+ "bbox": [
1104
+ 171,
1105
+ 327,
1106
+ 825,
1107
+ 356
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Rachel Bittner, Eric Humphrey, and Juan Bello. Pysox: Leveraging the audio signal processing power of sox in python. In Proceedings of the International Society for Music Information Retrieval Conference Late Breaking and Demo Papers, 2016. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 366,
1117
+ 823,
1118
+ 409
1119
+ ],
1120
+ "page_idx": 8
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Judith C. Brown. Calculation of a constant q spectral transform. The Journal of the Acoustical Society of America, 89(1):425–434, 1991. doi: 10.1121/1.400476. ",
1125
+ "bbox": [
1126
+ 169,
1127
+ 419,
1128
+ 825,
1129
+ 448
1130
+ ],
1131
+ "page_idx": 8
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Sander Dieleman, Aaron van den Oord, and Karen Simonyan. The challenge of realistic music ¨ generation: modelling raw audio at scale. arXiv preprint arXiv:1806.10474, 2018. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 458,
1139
+ 821,
1140
+ 487
1141
+ ],
1142
+ "page_idx": 8
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Valentin Emiya, Nancy Bertin, Bertrand David, and Roland Badeau. MAPS - A piano database for multipitch estimation and automatic transcription of music. Research report, July 2010. URL https://hal.inria.fr/inria-00544155. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 496,
1150
+ 826,
1151
+ 540
1152
+ ],
1153
+ "page_idx": 8
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Curtis Hawthorne, Erich Elsen, Jialin Song, Adam Roberts, Ian Simon, Colin Raffel, Jesse Engel, Sageev Oore, and Douglas Eck. Onsets and frames: Dual-objective piano transcription. In Proceedings of the 19th International Society for Music Information Retrieval Conference, 2018. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 549,
1161
+ 825,
1162
+ 593
1163
+ ],
1164
+ "page_idx": 8
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, and Douglas Eck. An improved relative self-attention mechanism for transformer with application to music generation. arXiv preprint arXiv:1809.04281, 2018. ",
1169
+ "bbox": [
1170
+ 174,
1171
+ 603,
1172
+ 825,
1173
+ 659
1174
+ ],
1175
+ "page_idx": 8
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Rainer Kelz, Sebastian Bock, and Gerhard Widmer. Deep polyphonic adsr piano note transcription. In Late Breaking/Demos, Proceedings of the 19th International Society for Music Information Retrieval Conference, 2018. ",
1180
+ "bbox": [
1181
+ 174,
1182
+ 670,
1183
+ 825,
1184
+ 712
1185
+ ],
1186
+ "page_idx": 8
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Thakkar Vijay Manzelli, Rachel and, Ali Siahkamari, and Brian Kulis. Combining deep generative raw audio models for structured automatic music. In 19th International Society for Music Information Retrieval Conference, ISMIR, 2018. ",
1191
+ "bbox": [
1192
+ 174,
1193
+ 722,
1194
+ 825,
1195
+ 765
1196
+ ],
1197
+ "page_idx": 8
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Brian McFee, Matt McVicar, Oriol Nieto, Stefan Balke, Carl Thome, Dawen Liang, Eric Battenberg, Josh Moore, Rachel Bittner, Ryuichi Yamamoto, Dan Ellis, Fabian-Robert Stoter, Douglas Repetto, Simon Waloschek, CJ Carr, Seth Kranzler, Keunwoo Choi, Petr Viktorin, Joao Felipe Santos, Adrian Holovaty, Waldir Pimenta, Hojin Lee, and Paul Brossier. librosa 0.5.1, May 2017. URL https://doi.org/10.5281/zenodo.1022770. ",
1202
+ "bbox": [
1203
+ 174,
1204
+ 775,
1205
+ 825,
1206
+ 845
1207
+ ],
1208
+ "page_idx": 8
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Meinard Muller. ¨ Fundamentals of music processing: Audio, analysis, algorithms, applications. Springer, 2015. ",
1213
+ "bbox": [
1214
+ 169,
1215
+ 856,
1216
+ 821,
1217
+ 885
1218
+ ],
1219
+ "page_idx": 8
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Meinard Muller, Verena Konz, Wolfgang Bogler, and Vlora Arifi-M ¨ uller. Saarland music data ¨ (SMD). 2011. ",
1224
+ "bbox": [
1225
+ 173,
1226
+ 895,
1227
+ 821,
1228
+ 924
1229
+ ],
1230
+ "page_idx": 8
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Colin Raffel and Daniel P W Ellis. Intuitive analysis, creation and manipulation of midi data with pretty midi. 2014. ",
1235
+ "bbox": [
1236
+ 173,
1237
+ 103,
1238
+ 825,
1239
+ 132
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Hiroaki Sakoe and Seibi Chiba. Dynamic programming algorithm optimization for spoken word recognition. IEEE transactions on acoustics, speech, and signal processing, 26(1):43–49, 1978. ",
1246
+ "bbox": [
1247
+ 173,
1248
+ 141,
1249
+ 823,
1250
+ 170
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Christian Schorkhuber and Anssi Klapuri. Constant-q transform toolbox for music processing. In ¨ Proceedings of the 7th Sound and Music Computing Conference, Barcelona, Spain, July 2010. ",
1257
+ "bbox": [
1258
+ 173,
1259
+ 178,
1260
+ 823,
1261
+ 208
1262
+ ],
1263
+ "page_idx": 9
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "John Thickstun, Zaid Harchaoui, and Sham Kakade. Learning features of music from scratch. In International Conference on Learning Representations (ICLR), 2017. ",
1268
+ "bbox": [
1269
+ 173,
1270
+ 215,
1271
+ 825,
1272
+ 246
1273
+ ],
1274
+ "page_idx": 9
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Vesa Valimaki, Julian D Parker, Lauri Savioja, Julius O Smith, and Jonathan S Abel. Fifty years of artificial reverberation. IEEE Transactions on Audio, Speech, and Language Processing, 20(5): 1421–1448, 2012. ",
1279
+ "bbox": [
1280
+ 176,
1281
+ 253,
1282
+ 825,
1283
+ 296
1284
+ ],
1285
+ "page_idx": 9
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, ¨ Nal Kalchbrenner, Andrew W Senior, and Koray Kavukcuoglu. WaveNet: A generative model for raw audio. In SSW, pp. 125, 2016. ",
1290
+ "bbox": [
1291
+ 174,
1292
+ 306,
1293
+ 823,
1294
+ 349
1295
+ ],
1296
+ "page_idx": 9
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Aaron van den Oord, Yazhe Li, Igor Babuschkin, Karen Simonyan, Oriol Vinyals, Koray ¨ Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis Cobo, Florian Stimberg, Norman Casagrande, Dominik Grewe, Seb Noury, Sander Dieleman, Erich Elsen, Nal Kalchbrenner, Heiga Zen, Alex Graves, Helen King, Tom Walters, Dan Belov, and Demis Hassabis. Parallel WaveNet: Fast high-fidelity speech synthesis. In Proceedings of the 35th International Conference on Machine Learning, 2018. ",
1301
+ "bbox": [
1302
+ 173,
1303
+ 357,
1304
+ 825,
1305
+ 441
1306
+ ],
1307
+ "page_idx": 9
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 450,
1315
+ 823,
1316
+ 493
1317
+ ],
1318
+ "page_idx": 9
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "S Young, G Evermann, M Gales, T Hain, D Kershaw, X Liu, G Moore, J Odell, D Ollason, D Povey, et al. The htk book (v3. 4). Cambridge University, 2006. ",
1323
+ "bbox": [
1324
+ 171,
1325
+ 502,
1326
+ 823,
1327
+ 531
1328
+ ],
1329
+ "page_idx": 9
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "APPENDIX ",
1334
+ "text_level": 1,
1335
+ "bbox": [
1336
+ 176,
1337
+ 103,
1338
+ 263,
1339
+ 117
1340
+ ],
1341
+ "page_idx": 10
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "In this appendix, we describe in detail how the MAESTRO dataset from section 3 was aligned and segmented. ",
1346
+ "bbox": [
1347
+ 174,
1348
+ 141,
1349
+ 823,
1350
+ 169
1351
+ ],
1352
+ "page_idx": 10
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "COARSE ALIGNMENT ",
1357
+ "text_level": 1,
1358
+ "bbox": [
1359
+ 176,
1360
+ 199,
1361
+ 325,
1362
+ 212
1363
+ ],
1364
+ "page_idx": 10
1365
+ },
1366
+ {
1367
+ "type": "text",
1368
+ "text": "The key idea for the alignment process was that even an untrained human can recognize whether two performances are of the same score based on raw audio, disregarding differences in the instrument or recording equipment used. Hence, we synthesized the provided MIDI (using FluidSynth with a SoundFont sampled from recordings of a Disklavier7) and sought to define an audio-based difference metric that could be minimized to find the best-alignment shift for every audio/MIDI pair. ",
1369
+ "bbox": [
1370
+ 174,
1371
+ 229,
1372
+ 825,
1373
+ 297
1374
+ ],
1375
+ "page_idx": 10
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "We wanted the metric to take harmonic features into account, so as a first step we used librosa (McFee et al., 2017) to compute the Constant-Q Transform (Brown, 1991; Schorkhuber & Klapuri, ¨ 2010) of both original and synthesized audio. For the initial alignment stage we picked a hop length of 4096 samples $( \\sim 9 0 ~ \\mathrm { m s } )$ as a trade-off between speed and accuracy, which proved reasonable for most of the repertoire.8 Microphone setup varied between competition years and stages, resulting in varying frequency response and overall amplitude levels in recordings, especially in the lower and higher ends of the piano range. To account for that, we limited the CQT to 48 buckets aligned with MIDI notes C2–B5, and also converted amplitude levels to dB scale with maximum absolute amplitude as a reference point and a hard cut-off at -80 dB. Original and synthesized audio also differed in sound decay rate, so we normalized the resulting CQT arrays time-wise by dividing each hop column by its minimum value (averaged over a 5-hop window). ",
1380
+ "bbox": [
1381
+ 174,
1382
+ 306,
1383
+ 825,
1384
+ 458
1385
+ ],
1386
+ "page_idx": 10
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "A single MIDI file from a Disklavier typically covered several hours of material corresponding to a sequence of shorter audio files from several seconds up to an hour long. We slid the normalized CQT of each such original audio file against a window of synthesized MIDI CQT of the same length and used mean squared error (MSE) between the two as the difference metric.9 Minimum error determined best alignment, after which we attempted to align the next audio file in sequence with the remaining length of the corresponding MIDI file. Due to the length of MIDI files, it was impractical to calculate MSE at each possible shift, so instead we trimmed silence at the beginning of audio, and attempted to align it with the first “note on” event of the MIDI file, within $\\pm 1 2$ minutes tolerance. If the minimum error was still high, we attempted alignment at the next “note on” event after a 30-second silence. ",
1391
+ "bbox": [
1392
+ 174,
1393
+ 465,
1394
+ 825,
1395
+ 604
1396
+ ],
1397
+ "page_idx": 10
1398
+ },
1399
+ {
1400
+ "type": "text",
1401
+ "text": "This approach allowed us to skip over unusable sections of MIDI recordings that did not correspond to audio, e.g., instrument tuning and warm-ups, and also non-musical segments of audio such as applause and announcements. Non-piano sounds also considerably increased the MSE metric for very short audio files, so we had to either concatenate those with their longer neighbors if they had any musical material or exclude them completely. Events that were present at the beginning of audio files beyond the chosen shift tolerance which did not correspond to MIDI had to be cut off manually. In order to recover all musically useful data we also had to manually repair several MIDI files where the clock had erroneously jumped, causing the remainder of the file to be out of sync with corresponding audio. ",
1402
+ "bbox": [
1403
+ 174,
1404
+ 611,
1405
+ 825,
1406
+ 736
1407
+ ],
1408
+ "page_idx": 10
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "After tuning process parameters and addressing the misaligned audio/MIDI pairs detected by unusually high CQT MSE, we have reached the state where each competition year (i.e., different audio recording setup) has final metric values for all pairs within a close range. Spot-checking the pairs with the highest MSE values for each year confirmed proper alignment, which allowed us to proceed to the segmentation stage. ",
1413
+ "bbox": [
1414
+ 174,
1415
+ 743,
1416
+ 825,
1417
+ 813
1418
+ ],
1419
+ "page_idx": 10
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "SEGMENTATION ",
1424
+ "text_level": 1,
1425
+ "bbox": [
1426
+ 176,
1427
+ 104,
1428
+ 285,
1429
+ 117
1430
+ ],
1431
+ "page_idx": 11
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "Since certain compositions were performed by multiple contestants,10 we needed to segment the aligned audio/MIDI pairs further into individual musical pieces, so as to enable splitting the data into train, validation, and test sets disjoint on compositions. While the organizers provided the list of composition metadata for each audio file, for some competition years timing information was missing. In such cases we greedily sliced audio/MIDI pairs at the longest silences between MIDI notes up to the expected number of musical pieces. ",
1436
+ "bbox": [
1437
+ 174,
1438
+ 128,
1439
+ 825,
1440
+ 213
1441
+ ],
1442
+ "page_idx": 11
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "Where expected piece duration data was available, we applied search with backtracking roughly as follows. As an invariant, the segmentation algorithm maintained a list of intervals as start–end time offsets along with a list of expected piece durations, so that the total length of the piece durations corresponding to each interval was less than the interval duration (within a certain tolerance). At each step we picked the next longest MIDI silence and determined which interval it belonged to. Then we split that interval in two at the silence and attempted to split the corresponding sequence of durations as well, satisfying the invariant. For each suitable split the algorithm continued to the next longest silence. If multiple splits were possible, the algorithm preferred the ones that divided the piece durations more evenly according to a heuristic. If no such split was possible, the algorithm either skipped current silence if it was short11 and attempted to split at the next one, or backtracked otherwise. It also backtracked if no more silences longer than 3 seconds were available. The algorithm succeeded as soon as each interval corresponded to exactly one expected piece duration. ",
1447
+ "bbox": [
1448
+ 174,
1449
+ 219,
1450
+ 825,
1451
+ 386
1452
+ ],
1453
+ "page_idx": 11
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "Once a suitable segmentation was found, we sliced each audio/MIDI pair at resulting intervals, additionally trimming short clusters of notes at the beginning or end of each segment that appeared next to long MIDI silences in order to cut off additional non-music events (e.g., tuning or contestants testing the instrument during applause), and adding an extra 1 second of padding at both ends before making the final cut. ",
1458
+ "bbox": [
1459
+ 174,
1460
+ 393,
1461
+ 825,
1462
+ 463
1463
+ ],
1464
+ "page_idx": 11
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "FINE ALIGNMENT ",
1469
+ "text_level": 1,
1470
+ "bbox": [
1471
+ 176,
1472
+ 481,
1473
+ 299,
1474
+ 494
1475
+ ],
1476
+ "page_idx": 11
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "After the initial alignment and segmentation, we applied Dynamic Time Warping (DTW) to account for any jitter in either the audio or MIDI recordings. DTW has seen wide use in audio-to-MIDI alignment; for an overview see Muller (2015). We follow the ¨ align midi example from pretty midi (Raffel & Ellis, 2014), except that we use a custom $\\mathrm { C } { + + }$ DTW implementation for improved speed and memory efficiency to allow for aligning long sequences. ",
1481
+ "bbox": [
1482
+ 174,
1483
+ 506,
1484
+ 823,
1485
+ 577
1486
+ ],
1487
+ "page_idx": 11
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "First, in Python, we use librosa to load the audio and resample it to a $2 2 { , } 0 5 0 \\mathrm { H z }$ mono signal. Next, we load the MIDI and synthesize it at the same sample rate, using the same FluidSynth process as above. Then, we pad the end of the shorter of the two sample arrays so they are the same length. We use the same procedure as align midi to extract CQTs from both sample arrays, except that we use a hop length of 64 to achieve a resolution of ${ \\sim } 3 \\mathrm { m s }$ . We then pass these CQTs to our $\\mathrm { C } { + } { + }$ DTW implementation. To avoid calculating the full distance matrix and taking its mean to get a penalty value, we instead sample $1 0 0 \\mathrm { k }$ random pairs and use the mean of their cosine distances. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 583,
1495
+ 825,
1496
+ 680
1497
+ ],
1498
+ "page_idx": 11
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "We use the same DTW algorithm as implemented in librosa except that we calculate cosine distances only within a Sakoe-Chiba band radius (Sakoe & Chiba, 1978) of 2.5 seconds instead of calculating distances for all pairs. Staying within this small band limits the number of calculations we need to make and the number of distances we have to store in memory. This is possible because we know from the previous alignment pass that the sequences are already mostly aligned and we just need to account for small constant offsets due to the lower resolution of the previous process and apply small sequence warps to recover from any occasional jitter. ",
1503
+ "bbox": [
1504
+ 174,
1505
+ 688,
1506
+ 825,
1507
+ 785
1508
+ ],
1509
+ "page_idx": 11
1510
+ }
1511
+ ]
parse/train/r1lYRjC9F7/r1lYRjC9F7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1lYRjC9F7/r1lYRjC9F7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJNwDjAqYX/rJNwDjAqYX.md ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LARGE-SCALE STUDY OF CURIOSITY-DRIVEN LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Reinforcement learning algorithms rely on carefully engineered rewards from the environment that are extrinsic to the agent. However, annotating each environment with hand-designed, dense rewards is difficult and not scalable, motivating the need for developing reward functions that are intrinsic to the agent. Curiosity is such intrinsic reward function which uses prediction error as a reward signal. In this paper: (a) We perform the first large-scale study of purely curiosity-driven learning, i.e. without any extrinsic rewards, across 54 standard benchmark environments, including the Atari game suite. Our results show surprisingly good performance as well as a high degree of alignment between the intrinsic curiosity objective and the hand-designed extrinsic rewards of many games. (b) We investigate the effect of using different feature spaces for computing prediction error and show that random features are sufficient for many popular RL game benchmarks, but learned features appear to generalize better (e.g. to novel game levels in Super Mario Bros.). (c) We demonstrate limitations of the predictionbased rewards in stochastic setups. Game-play videos and code are at https: //doubleblindsupplementary.github.io/large-curiosity/.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Reinforcement learning (RL) has emerged as a popular method for training agents to perform complex tasks. In RL, the agent’s policy is trained by maximizing a reward function that is designed to align with the task. The rewards are extrinsic to the agent and specific to the environment they are defined for. Most of the success in RL has been achieved when this reward function is dense and well-shaped, e.g., a running “score” in a video game (Mnih et al., 2015). However, designing a wellshaped reward function is a notoriously challenging engineering problem. An alternative to “shaping” an extrinsic reward is to supplement it with dense intrinsic rewards (Oudeyer & Kaplan, 2009), that is, rewards that are generated by the agent itself. Examples of intrinsic reward include “curiosity” (Mohamed & Rezende, 2015; Schmidhuber, 1991b; Singh et al., 2005; Houthooft et al., 2016; Pathak et al., 2017) which uses prediction error as reward signal, and “visitation counts” (Bellemare et al., 2016; Ostrovski et al., 2017; Poupart et al., 2006; Lopes et al., 2012) which discourages the agent from revisiting the same states. The idea is that these intrinsic rewards will bridge the gaps between sparse extrinsic rewards by guiding the agent to efficiently explore the environment to find the next extrinsic reward.
12
+
13
+ But what about scenarios with no extrinsic reward at all? This is not as strange as it sounds. Developmental psychologists talk about intrinsic motivation (i.e., curiosity) as the primary driver in the early stages of development (Smith & Gasser, 2005; Ryan, 2000): babies appear to employ goal-less exploration to learn skills that will be useful later on in life. There are plenty of other examples, from playing Minecraft to visiting your local zoo, where no extrinsic rewards are required. Indeed, there is evidence that pre-training an agent on a given environment using only intrinsic rewards allows it to learn much faster when fine-tuned to a novel task in a novel environment (Pathak et al., 2017; 2018). Yet, so far, there has been no systematic study of learning with only intrinsic rewards.
14
+
15
+ In this paper, we perform a large-scale empirical study of agents driven purely by intrinsic rewards across a range of diverse simulated environments. In particular, we choose the dynamics-based curiosity model of intrinsic reward presented in Pathak et al. (2017) because it is scalable and trivially parallelizable, making it ideal for large-scale experimentation. The central idea is to represent intrinsic reward as the error in predicting the consequence of the agent’s action given its current state, i.e., the prediction error of learned forward-dynamics of the agent. We thoroughly investigate the dynamics-based curiosity across 54 environments: video games, physics engine simulations, and virtual 3D navigation tasks, shown in Figure 1.
16
+
17
+ ![](images/11c31c3f15d047622a34cc071b9044a1f147cee9aec05bd9c95b4216f8dd3c79.jpg)
18
+ Figure 1: A snapshot of the 54 environments investigated in the paper. We show that agents are able to make progress using no extrinsic reward, or end-of-episode signal, and only using curiosity. Video results, code and models at https://doubleblindsupplementary.github.io/large-curiosity/.
19
+
20
+ To develop a better understanding of curiosity-driven learning, we further study the crucial factors that determine its performance. In particular, predicting the future state in the high dimensional raw observation space (e.g., images) is a challenging problem and, as shown by recent works (Pathak et al., 2017; Stadie et al., 2015), learning dynamics in an auxiliary feature space leads to improved results. However, how one chooses such an embedding space is a critical, yet open research problem. To ensure stable online training of dynamics, we argue that the desired embedding space should: 1) be compact in terms of dimensionality, 2) preserve sufficient information about the observation, and 3) be a stationary function of the observations.
21
+
22
+ Through systematic ablation, we examine the role of different ways to encode agent’s observation such that an agent can perform well, driven purely by its own curiosity. Here “performing well” means acting purposefully and skillfully in the environment. This can be assessed quantitatively, in some cases, by measuring extrinsic rewards or environment-specific measures of exploration, or qualitatively, by observing videos of the agent interacting. We show that encoding observations via a random network turn out to be a simple, yet surprisingly effective technique for modeling curiosity across many popular RL benchmarks. This might suggest that many popular RL video game testbeds are not as visually sophisticated as commonly thought. Interestingly, we discover that although random features are sufficient for good performance in environments that were used for training, the learned features appear to generalize better (e.g., to novel game levels in Super Mario Bros.).
23
+
24
+ The main contributions of this paper are: (a) Large-scale study of curiosity-driven exploration across a variety of environments including: the set of Atari games (Bellemare et al., 2013), Super Mario Bros., virtual 3D navigation in Unity (Juliani et al., 2018), multi-player Pong, and Roboschool (Schulman et al., 2017) environments. (b) Extensive investigation of different feature spaces for learning the dynamics-based curiosity: random features, pixels, inverse-dynamics (Pathak et al., 2017) and variational auto-encoders (Kingma & Welling, 2013) and evaluate generalization to unseen environments. (c) Analysis of some limitations of a direct prediction-error based curiosity formulation. We observe that if the agent itself is the source of stochasticity in the environment, it can reward itself without making any actual progress. We empirically demonstrate this limitation in a 3D navigation task where the agent controls different parts of the environment.
25
+
26
+ # 2 DYNAMICS-BASED CURIOSITY-DRIVEN LEARNING
27
+
28
+ Consider an agent that sees an observation $x _ { t }$ , takes an action $a _ { t }$ and transitions to the next state with observation $x _ { t + 1 }$ . We want to incentivize this agent with a reward $r _ { t }$ relating to how informative the transition was. To provide this reward, we use an exploration bonus involving the following elements: (a) a network to embed observations into representations $\phi ( x )$ , (b) a forward dynamics network to predict the representation of the next state conditioned on the previous observation and action $p ( \phi ( x _ { t + 1 } ) | x _ { t } , a _ { t } )$ . Given a transition tuple $\{ x _ { t } , x _ { t + 1 } , a _ { t } \}$ , the exploration reward is then defined as $r _ { t } = - \log p ( \phi ( x _ { t + 1 } ) | x _ { t } , a _ { t } )$ , also called the surprisal (Achiam & Sastry, 2017).
29
+
30
+ An agent trained to maximize this reward will favor transitions with high prediction error, which will be higher in areas where the agent has spent less time, or in areas with complex dynamics. Such a dynamics-based curiosity has been shown to perform quite in some cases (Pathak et al., 2017), especially when the dynamics are learned in an embedding space rather than raw observations. In this paper, we explore dynamics-based curiosity further. We use mean-squared error corresponding to a fixed-variance Gaussian density as surprisal, i.e., $\lVert f ( x _ { t } , a _ { t } ) - \phi ( x _ { t + 1 } ) \rVert _ { 2 } ^ { 2 }$ where f is the learned dynamics model. However, any other density model could be used.
31
+
32
+ # 2.1 FEATURE SPACES FOR FORWARD DYNAMICS
33
+
34
+ Consider the representation $\phi$ in the curiosity formulation above. If $\phi ( x ) = x$ , the forward dynamics model makes predictions in the observation space. A good choice of feature space can make the prediction task more tractable and filter out irrelevant aspects of the observation space. But what makes a good feature space for dynamics driven curiosity? We propose the qualities that a good feature space must have:
35
+
36
+ • Compactness: The features should be easy to model by being low(er)-dimensional and filtering out irrelevant parts of the observation space. Sufficiency: The features should contain all the important information. Otherwise, the agent may fail to be rewarded for exploring some relevant aspect of the environment.
37
+ • Stability: Non-stationary rewards make it difficult for reinforcement agents to learn. Exploration bonuses by necessity introduce non-stationarity since what is new and novel becomes old and boring with time. In a dynamics-based curiosity formulation, there are two sources of non-stationarity: the forward dynamics model is evolving over time as it is trained and the features are changing as they learn. The former is intrinsic to the method, and the latter should be minimized where possible
38
+
39
+ In this work, we systematically investigate the efficacy of a number of feature-learning methods, summarized briefly as follows:
40
+
41
+ Pixels The simplest case is where $\phi ( x ) = x$ and we fit our forward dynamics model in the observation space. Pixels are sufficient, since no information has been thrown away, and stable since there is no feature learning component. However, learning from pixels is tricky because the observation space may be high-dimensional and complex.
42
+
43
+ Random Features (RF) The next simplest case is where we take our embedding network, a convolutional network, and fix it after random initialization. Because the network is fixed, the features are stable. The features can be made compact in dimensionality, but they are not constrained to be. However, random features may fail to be sufficient.
44
+
45
+ Variational Autoencoders (VAE) VAEs were introduced in (Kingma & Welling, 2013; Rezende et al., 2014) to fit latent variable generative models $p ( x , z )$ for observed data $x$ and latent variable $z$ with prior $p ( z )$ using variational inference. The method calls for an inference network $q ( z | x )$ that approximates the posterior $p ( z | x )$ . This is a feedforward network that takes an observation as input and
46
+
47
+ Table 1: Table summarizing the categorization of different kinds of feature spaces considered.
48
+
49
+ <table><tr><td></td><td>VAE</td><td>IDF</td><td>RF</td><td>Pixels</td></tr><tr><td>Stable</td><td>No</td><td>No</td><td>Yes</td><td>Yes</td></tr><tr><td>Compact</td><td>Yes</td><td>Yes</td><td>Maybe</td><td>No</td></tr><tr><td>Sufficient</td><td>Yes</td><td>Maybe</td><td>Maybe</td><td>Yes</td></tr></table>
50
+
51
+ outputs a mean and variance vector describing a Gaussian distribution with diagonal covariance. We can then use the mapping to the mean as our embedding network $\phi$ . These features will be a low-dimensional approximately sufficient summary of the observation, but they may still contain some irrelevant details such as noise, and the features will change over time as the VAE trains.
52
+
53
+ Inverse Dynamics Features (IDF) Given a transition $( s _ { t } , s _ { t + 1 } , a _ { t } )$ the inverse dynamics task is to predict the action $a _ { t }$ given the previous and next states $s _ { t }$ and $s _ { t + 1 }$ . Features are learned using a common neural network $\phi$ to first embed $s _ { t }$ and $s _ { t + 1 }$ . The intuition is that the features learned should correspond to aspects of the environment that are under the agent’s immediate control. This feature learning method is easy to implement and in principle should be invariant to certain kinds of noise (see (Pathak et al., 2017) for a discussion). A potential downside could be that the features learned may not be sufficient, that is they do not represent important aspects of the environment that the agent cannot immediately affect.
54
+
55
+ A summary of these characteristics is provided in Table 1. Note that the learned features are not stable because their distribution changes as learning progresses. One way to achieve stability could be to pre-train VAE or IDF networks. However, unless one has access to the internal state of the game, it is not possible to get a representative data of the game scenes to train the features. One way is to act randomly to collect data, but then it will be biased to where the agent started, and won’t generalize further. Since all the features involve some trade-off of desirable properties, it becomes an empirical question as to how effective each of them is across environments.
56
+
57
+ # 2.2 PRACTICAL CONSIDERATIONS IN TRAINING AN AGENT DRIVEN PURELY BY CURIOSITY
58
+
59
+ Deciding upon a feature space is only first part of the puzzle in implementing a practical system. Here, we detail the critical choices we made in the learning algorithm. Our goal was to reduce nonstationarity in order to make learning more stable and consistent across environments. Through the following considerations outlined below, we are able to get exploration to work reliably for different feature learning methods and environments with minimal changes to the hyper-parameters.
60
+
61
+ • PPO. In general, we have found the PPO algorithm (Schulman et al., 2017) to be a robust learning algorithm that requires little hyper-parameter tuning and so we stick to it for our experiments.
62
+ • Reward normalization. Since the reward function is non-stationary, it is useful to normalize the scale of the rewards so that the value function can learn quickly. We did this by dividing the rewards by a running estimate of the standard deviation of the sum of discounted rewards.
63
+ • Advantage normalization. While training with PPO, we normalize the advantages (Sutton & Barto, 1998) in a batch to have a mean of 0 and a standard deviation of 1.
64
+ • Observation normalization. We run a random agent on our target environment for 10000 steps, then calculate the mean and standard deviation of the observation and use these to normalize the observations when training. This is useful to ensure that the features do not have very small variance at initialization, and also ensure features have less variation across different environments.
65
+ • More actors. The stability of the method is greatly increased by increasing the number of parallel actors (which affects the batch-size) used. We typically use 128 parallel runs of the same environment for data collection while training an agent.
66
+ • Normalizing the features. In combining intrinsic and extrinsic rewards, we found it useful to ensure that the scale of the intrinsic reward was consistent across state space. We achieved this by using batch-normalization (Ioffe & Szegedy, 2015) in the feature embedding network.
67
+
68
+ # 2.3 ‘DEATH IS NOT THE END’: DISCOUNTED CURIOSITY WITH INFINITE HORIZON
69
+
70
+ One important point is that the use of an end-of-episode signal, sometimes called ‘done’, can often leak information about the true reward function (assuming, as is common, that we have access to an extrinsic reward signal that we hide from the agent to measure pure exploration). If we don’t remove the ‘done’ signal, many of the Atari games become too simple. For example, a simple strategy of giving $+ 1$ artificial reward at every time-step when the agent is alive and 0 upon death is sufficient to obtain a high score in some games, e.g. the Atari game ‘Breakout’ where it will seek to maximize the episode length and hence its score. In the case of negative rewards, the agent will try to end the episode as quickly as possible.
71
+
72
+ ![](images/8bbc8a0a32f0f3152306909cf7cb8cc5788a159a3cd91d680b1f1f8b9ecfd8b8.jpg)
73
+ Figure 2: A comparison of feature learning methods on 8 selected Atari games and the Super Mario Bros. These evaluation curves show the mean reward (with standard error) of agents trained purely by curiosity, without reward or an end-of-episode signal. We see that our purely curiosity-driven agent is able to gather rewards in these environments without using any extrinsic reward at training. Results on all of the Atari games are in the appendix in Figure 8. We find curiosity model trained on pixels does not work well across any environment and VAE features perform either same or worse than random and inverse dynamics features. Further, inverse dynamics-trained features perform better than random features in $5 5 \%$ of the Atari games. An interesting outcome of this analysis is that random features for modeling curiosity are a simple, yet surprisingly strong baseline and likely to work well in half of the Atari games.
74
+
75
+ In light of this, if we want to study the behavior of a pure exploration agent, we should not bias it. In the infinite horizon setting (i.e., the discounted returns are not truncated at the end of the episode and always bootstrapped using the value function), death is just another transition to the agent, to be avoided only if it is “boring”. Therefore, we removed ‘done’ to separate the gains of an agent’s exploration from merely that of the death signal. In practice, we do find that the agent avoids dying in the games since that brings it back to the beginning of the game – an area it has already seen many times and where it can predict the dynamics well. This subtlety has been neglected by previous works showing experiments without extrinsic rewards.
76
+
77
+ # 3 EXPERIMENTS
78
+
79
+ In all of our experiments, both the policy and the embedding network work directly from pixels. For our implementation details including hyper-parameters and architectures, please refer to the Appendix A. Unless stated otherwise, all curves are the average of three runs with different seeds, and the shaded areas are standard errors of the mean. We have released the code and videos of a purely curious agent playing across all environments on our website.
80
+
81
+ # 3.1 CURIOSITY-DRIVEN LEARNING WITHOUT EXTRINSIC REWARDS
82
+
83
+ We begin by scaling up a pure curiosity-driven learning to a large number of environments without using any extrinsic rewards. We pick a total of 54 diverse simulated environments, as shown in Figure 1, including 48 Atari games, Super Mario Bros., 2 Roboschool scenarios (learning Ant controller and Juggling), Two-player Pong, 2 Unity mazes (with and without a TV controlled by the agent). The goal of this large-scale analysis is to investigate the following questions: (a) What happens when you run a pure curiosity-driven agent on a variety of games without any extrinsic rewards? (b) What kinds of behaviors can you expect from these agents? (c) What is the effect of the different feature-learning variants in dynamics-based curiosity on these behaviors?
84
+
85
+ Atari Games To answer these questions, we began with a collection of well-known Atari games and ran a suite of experiments with different feature-learning methods. One way to measure how well a purely curious agent performs is to measure the extrinsic reward it is able to achieve, i.e. how good is the agent at playing the game. We show the evaluation curves of mean extrinsic reward in on
86
+
87
+ 8 common Atari games in Figure 2 and all 48 Atari suite in Figure 8 in the appendix. It is important to note that the extrinsic reward is only used for evaluation, not for training. However, this is just a proxy for pure exploration because the game rewards could be arbitrary and might not align at all with how the agent explores out of curiosity.
88
+
89
+ The first thing to notice from the curves is: most of them are going up. This shows that a pure curiosity-driven agent can often learn to obtain external rewards without seeing any extrinsic rewards during training! To understand why this is happening, consider the game ‘Breakout’. The main control action of the game is to keep hitting the bouncing ball with the paddle, but this does not earn any points. The game score increases only when the ball hits a brick (which then disappears). But the more bricks are struck by the ball, the more complicated the pattern of remaining bricks becomes, making the agent more curious to explore further, hence, collecting points as a bi-product. Furthermore, when the agent runs out of lives, the bricks are reset to the initial configuration, which has been seen by the agent many times before and is hence very predictable, so the agent tries to increase curiosity by staying alive and avoiding the death reset.
90
+
91
+ The fact that the curiosity reward is often sufficient is an unexpected result and might suggest that many popular RL test-beds do not need an external reward at all. It is likely that game designers (similar to architects, urban planners, gardeners, etc.) are purposefully setting up curricula to guide agents through the task by curiosity alone. This could explain why curiosity-like objective aligns reasonably well with the extrinsic reward in many human-designed environments (Lazzaro, 2004; Costikyan, 2013; Hunicke et al., 2004; Wouters et al., 2011). However, this is not always the case, and sometimes a curious agent can even do worse than a random agent. This happens when the extrinsic reward has little correlation with the agent’s exploration, or when the agent fails to explore efficiently (e.g. see games ‘Atlantis’ and ‘IceHockey’ in Figure 8). We encourage the reader to refer to the game-play videos of the agent available on the website for a better understanding of the learned skills.
92
+
93
+ Comparison of feature learning methods: We compare four feature learning methods in Figure 2: raw pixels, random features, inverse dynamics features and VAE features. Training dynamics on raw pixels performs poorly across all the environments, while encoding pixels into features does better. This is likely because it is hard to learn a good dynamics model in pixel space, and prediction errors may be dominated by small irrelevant details.
94
+
95
+ Surprisingly, random features (RF) perform quite well across tasks and sometimes better than using learned features. One reason for good performance is that the random features are kept frozen (stable), the dynamics model learned on top of them has an easier time because of the stationarity of the target. In general, random features should work well in the domains where visual observations are simple enough, and random features can preserve enough information about the raw signal, for instance, Atari games. One scenario where IDF features consistently outperform random features is for generalization, e.g. training on one level of Mario Bros and testing on another (see Section 3.2 for details).
96
+
97
+ The VAE method also performed well but was somewhat unstable, so we decided to use RF and IDF for further experiments. The detailed result in appendix Figure 8 compares IDF vs. RF across the full Atari suite. To quantify the learned behaviors, we compared our curious agents to a randomly acting agent. We found that an IDF-curious agent collects more game reward than a random agent in $7 5 \%$ of the Atari games, an RF-curious agent does better in $7 0 \%$ . Further, IDF does better than RF in $5 5 \%$ of the games. Overall, random features and inverse dynamics features worked well in general. Further details in the appendix.
98
+
99
+ Super Mario Bros. We compare different feature-learning methods in Mario Bros in Figure 2. Super Mario Bros has already been studied in the context of extrinsic reward free learning (Pathak et al., 2017) in small-scale experiments, and so we were keen to see how far curiosity alone can push the agent. We used a more efficient version of the Mario simulator, allowing for longer training, while keeping observation space, actions, and dynamics of the game the same. Due to $1 0 0 \mathrm { x }$ longer training and using PPO for optimization, our agent was able to pass several levels of the game, significantly improving over prior exploration results on Mario Bros.
100
+
101
+ Could we further push the performance of a purely curious agent by making the underlying optimization more stable? One way is to scale up the batch-size. We do so by increasing the number of parallel threads for running environments from 128 to 1024. We show the comparison between training using 128 and 1024 parallel environment threads in Figure 3(a). As apparent from the graph, training with large batch-size using 1024 parallel environment threads performs much better. In fact, the agent is able to explore much more of the game: discovering 11 different levels of the game, finding secret rooms and defeating bosses. Note that the x-axis in the figure is the number of gradient steps, not the number of frames, since the point of this large-scale experiment is not a claim about sample-efficiency, but performance with respect to training the agent. This result suggests that the performance of a purely curiosity-driven agent would improve as the training of base RL algorithm (PPO in our case) gets better. The video is on the website.
102
+
103
+ ![](images/7fe1cb827f84a79ccb9ce6a2837ba51504f95a5fe52db7cb1ed431d47ee8d55e.jpg)
104
+ Figure 3: (a) Left: A comparison of the RF method on Mario with different batch sizes. Results are without using extrinsic reward. (b) Center: Number of ball bounces in the Juggling (Roboschool) environment. (c) Right: Mean episode length in the multiplayer Pong environment. The discontinuous jump on the graph corresponds to the agent reaching a limit of the environment - after a certain number of steps in the environment the Atari Pong emulator starts randomly cycling through background colors and becomes unresponsive to agent’s actions
105
+
106
+ Roboschool Juggling We modified the Pong environment from the Roboschool framework to only have one paddle and to have two balls. The action space is continuous with two-dimensions, and we discretized the action space into 5 bins per dimension giving a total of 25 actions. Both the policy and embedding network are trained on pixel observation space (note: not state space). This environment is more difficult to control than the toy physics used in games, but the agent learns to intercept and strike the balls when it comes into its area. We monitored the number of bounces of the balls as a proxy for interaction with the environment, as shown in Figure 3(b). See the video on the project website.
107
+
108
+ Roboschool Ant Robot We also explored using the Ant environment which consists of an Ant with 8 controllable joints on a track. We again discretized the action space and trained policy and embedding network on raw pixels (not state space). However, in this case, it was less easy to measure exploration because the extrinsic distance reward measures progress along the racetrack, but a purely curious agent is free to move in any direction. We find that a walking like behavior emerges purely out of a curiosity-driven training. We refer the reader to the result video showing that the agent is meaningfully interacting with the environment.
109
+
110
+ Multi-agent curiosity in Two-player Pong We have already seen that a purely curiosity-driven agent learns to play several Atari games without reward, but we wonder how much of that behavior is caused by the fact that the opposing player is a computer agent with a hard-coded strategy. What would happen if we were to make both the players curious-driven? To find out, we set up a twoplayer Pong game where both the sides (paddles) of the game are controlled by two curiosity-driven agents. We shared the initial layers of both the agents but have different action heads, i.e., total action space is now the cross product of the actions of player 1 by the actions of player 2.
111
+
112
+ Note that the extrinsic reward is meaningless in this context since the agent is playing both sides, so instead, we show the length of the episode. The results are shown in Figure 3(c). We see from the episode length that the agent learns to have longer rallies over time, learning to play pong without any teacher – purely by curiosity on both sides. In fact, the game rallies eventually get so long that they break our Atari emulator causing the colors to change radically, which crashes the policy as shown in the plot.
113
+
114
+ # 3.2 GENERALIZATION ACROSS NOVEL LEVELS IN SUPER MARIO BROS.
115
+
116
+ In the previous section, we showed that our purely curious agent can learn to explore efficiently and learn useful skills, e.g., game playing behaviour in games, walking behaviour in Ant etc. So far, these skills were shown in the environment where the agent was trained on. However, one advantage of developing reward-free learning is that one should then be able to utilize abundant “unlabeled” environments without reward functions by showing generalization to novel environments.
117
+
118
+ To test this, we first pre-train our agent using curiosity only in the Level 1-1 of Mario Bros. We investigate how well RF and IDF-based curiosity agents generalize to novel levels of Mario. In Figure 4, we show two examples of training on one level of Mario and fine-tuning on another testing level, and compare to learning on the testing level from scratch. The training signal in all the cases is curiosity-only reward. In the first case, from Level 1-1 to Level 1-2, the global statistics of the environments match (both are ‘day-time’ environments, i.e., blue sky) but levels have different enemies, different geometry, and different difficulty. We see that there is strong transfer from for both methods in this scenario. However, the transfer performance is weaker in the second scenario from Level 1-1 to Level 1-3. This is so because the problem is considerably harder for the latter level pairing as there is a color pallette shift from day to night, as shown in Figure 4.
119
+
120
+ We further note that IDF-learned features transfer in both the cases and random features transfer in the first case, but do not transfer in the second scenario from day to night. These results might suggest that while random features perform well on training environments, learned features appear to generalize better to novel levels. However, this needs more analysis in the future across a large variety of environments. Overall, we find some promising evidence showing that skills learned by curiosity help our agent explore efficiently in novel environments.
121
+
122
+ ![](images/e6fcef6010423bb6b3934e2fb874d4ddb1f64a237e69f244a95faa64d734c312.jpg)
123
+ Figure 4: Mario generalization experiments. On the left we show transfer results from Level 1-1 to Level 1- 2, and on the right we show transfer results from Level 1-1 to Level 1-3. Underneath each plot is a map of the source and target environments. All agents are trained without extrinsic reward.
124
+
125
+ ![](images/ec87fda7865a049beae1c02b7ef72aff2c218bb919819d4a45366c6aa0e1826e.jpg)
126
+ Figure 5: Mean extrinsic reward in the Unity environment while training with terminal extrinsic $^ +$ curiosity reward. Note that the curve for extrinsic reward only training is constantly zero.
127
+
128
+ # 3.3 CURIOSITY WITH SPARSE EXTERNAL REWARD
129
+
130
+ In all our experiments so far, we have shown that our agents can learn useful skills without any extrinsic rewards, driven purely by curiosity. However, in many scenarios, we might want the agent to perform some particular task of interest. This is usually conveyed to the agent by defining extrinsic rewards. When rewards are dense (e.g. game score at every frame), classic RL works well and intrinsic rewards generally should not help performance. However, designing dense rewards is a challenging engineering problem (see introduction for details). In this section, we evaluate how well curiosity can help an agent perform a task in presence of sparse, or just terminal, rewards.
131
+
132
+ Terminal reward setting: For many real problems, only terminal reward is available, e.g. in navigation, you only get rewards once you find what you were looking for. This is a setting where classic RL typically performs poorly. Hence, we consider the 3D navigation in a maze designed in the Unity ML-agent framework with 9 rooms and a sparse terminal reward. The action space is discrete, consisting of: move forward, look left 15 degrees, look right 15 degrees and no-op. The agent starts in room-1, which is furthest away from room-9 which contains the goal. We compare an agent trained with extrinsic reward $^ { + 1 }$ when the goal is reached, 0 otherwise) to an agent trained with extrinsic $^ +$ intrinsic reward. Extrinsic only (classic RL) never finds the goal in all our trials, which means it is impossible to get any meaningful gradients. Whereas extrinsic+intrinsic typically converges to getting the reward every time. Results in Figure 5 show results for vanilla PPO, $\mathrm { P P O + }$ IDF-curiosity and $\mathrm { P P O } + \mathrm { R F }$ -curiosity.
133
+
134
+ Sparse reward setting: In preliminary experiments, we picked 5 Atari games which have sparse rewards (as categorized by (Bellemare et al., 2016)), and compared extrinsic (classic RL) vs. extrinsic+intrinsic (ours) reward performance. In 4 games out of 5, curiosity bonus improves performance (see Table 2 in the appendix, the higher score is better). We would like to emphasize that this is not the focus of the paper, and these experiments are provided just for completeness. We just combined extrinsic (coefficient 1.0) and intrinsic reward (coefficient 0.01) directly without any tuning. We leave the question on how to optimally combine extrinsic and intrinsic rewards as a future direction.
135
+
136
+ # 4 RELATED WORK
137
+
138
+ Intrinsic Motivation: A family of approaches to intrinsic motivation reward an agent based on prediction error (Schmidhuber, 1991c; Stadie et al., 2015; Pathak et al., 2017; Achiam & Sastry, 2017), prediction uncertainty (Still & Precup, 2012; Houthooft et al., 2016), or improvement (Schmidhuber, 1991a; Lopes et al., 2012) of a forward dynamics model of the environment that gets trained along with the agent’s policy. As a result the agent is driven to reach regions of the environment that are difficult to predict for the forward dynamics model, while the model improves its predictions in these regions. This adversarial and non-stationary dynamics can give rise to complex behaviors. Relatively little work has been done in this area on the pure exploration setting where there is no external reward. Of these mostly closely related are those that use a forward dynamics model of a feature space such as Stadie et al. (2015) where they use autoencoder features, and Pathak et al. (2017) where they use features trained with an inverse dynamics task. These correspond roughly to the VAE and IDF methods detailed in Section 2.1.
139
+
140
+ Smoothed versions of state visitation counts can be used for intrinsic rewards (Bellemare et al., 2016; Fu et al., 2017; Ostrovski et al., 2017; Tang et al., 2017). Count-based methods have already shown very strong results when combining with extrinsic rewards such as setting the state of the art in the Atari game Montezuma’s Revenge (Bellemare et al., 2016), and also showing significant exploration of the game without using the extrinsic reward. It is not yet clear in which situations count-based approaches should be preferred over dynamics-based approaches; we chose to focus on dynamics-based bonuses in this paper since we found them straightforward to scale and parallelize. In our preliminary experiments, we did not have sufficient success with already existing count-based implementations in scaling up for a large-scale study.
141
+
142
+ Learning without extrinsic rewards or fitness functions has also been studied extensively in the evolutionary computing where it is referred to as ‘novelty search’ (Lehman & Stanley, 2008; 2011; Stanley & Lehman, 2015). There the novelty of an event is often defined as the distance of the event to the nearest neighbor amongst previous events, using some statistics of the event to compute distances. One interesting finding from this literature is that often much more interesting solutions can be found by not solely optimizing for fitness.
143
+
144
+ Other methods of exploration are designed to work in combination with maximizing a reward function, such as those utilizing uncertainty about value function estimates (Osband et al., 2016; Chen et al., 2017), or those using perturbations of the policy for exploration (Fortunato et al., 2017; Plappert et al., 2017). Schmidhuber (2010) and Oudeyer & Kaplan (2009); Oudeyer (2018) provide a great review of some of the earlier work on approaches to intrinsic motivation. Alternative methods of exploration include Sukhbaatar et al. (2018) where they utilize an adversarial game between two agents for exploration. In Gregor et al. (2017), they optimize a quantity called empowerment which is a measurement of the control an agent has over the state. In a concurrent work, diversity is used as a measure to learn skills without reward functions Eysenbach et al. (2018).
145
+
146
+ Random Features: One of the findings in this paper is the surprising effectiveness of random features, and there is a substantial literature on random projections and more generally randomly initialized neural networks. Much of the literature has focused on using random features for classification (Saxe et al., 2011; Jarrett et al., 2009; Yang et al., 2015) where the typical finding is that whilst random features can work well for simpler problems, feature learning performs much better once the problem becomes sufficiently complex. Whilst we expect this pattern to also hold true for dynamics-based exploration, we have some preliminary evidence showing that learned features appear to generalize better to novel levels in Mario Bros.
147
+
148
+ # 5 DISCUSSION
149
+
150
+ We have shown that our agents trained purely with a curiosity reward are able to learn useful behaviours: (a) Agent being able to play many Atari games without using any rewards. (b) Mario being able to cross over 11 levels without any extrinsic reward. (c) Walking-like behavior emerged in the Ant environment. (d) Juggling-like behavior in Robo-school environment (e) Rally-making behavior in Two-player Pong with curiosity-driven agent on both sides. But this is not always true as there are some Atari games where exploring the environment does not correspond to extrinsic reward.
151
+
152
+ More generally, our results suggest that, in many game environments designed by humans, the extrinsic reward is often aligned with the objective of seeking novelty.
153
+
154
+ Limitation of prediction error based curiosity: A more serious potential limitation is the handling of stochastic dynamics. If the transitions in the environment are random, then even with a perfect dynamics model, the expected reward will be the entropy of the transition, and the agent will seek out transitions with the highest entropy. Even if the environment is not truly random, unpredictability caused by a poor learning algorithm, an impoverished model class or partial observability can lead to exactly the same problem. We did not observe this effect in our experiments on games so we designed an environment to illustrate the point.
155
+
156
+ We return to the maze of Section 3.3 to empirically validate a common thought experiment called the noisy-TV problem. The idea is that local sources of entropy in an environment like a TV that randomly changes channels when an action is taken should prove to be an irresistible attraction to our agent. We take this thought experiment literally and add a TV to the maze along with an action to change the channel. In Figure 6 we show how adding the noisy-TV affects the performance of IDF and RF. As expected the presence of the TV drastically slows down learning, but we note that if you run the experiment for long enough the agents do sometimes converge to getting the extrinsic reward consistently. We have shown empirically that stochasticity can be a problem, and so it is important for future work to address this issue in an efficient manner.
157
+
158
+ ![](images/0909305e004c1d7fdad34045a4a281249019f995e0428eae25a07f7001932a5e.jpg)
159
+ Figure 6: We add a noisy TV to the unity environment in Section 3.3. We compare IDF and RF with and without the TV.
160
+
161
+ Future Work: We have presented a simple and scalable approach that can learn nontrivial behaviors across a diverse range of environments without any reward function or end-of-episode signal. One surprising finding of this paper is that random features perform quite well, but learned features appear to generalize better. While we believe that learning features will become more important once the environment is complex enough, we leave that for future work to explore.
162
+
163
+ Our wider goal, however, is to show that we can take advantage of many unlabeled (i.e., not having an engineered reward function) environments to improve performance on a task of interest. Given this goal, showing performance in environments with a generic reward function is just the first step, and future work will hopefully investigate transfer from unlabeled to labeled environments.
164
+
165
+ # REFERENCES
166
+
167
+ Joshua Achiam and Shankar Sastry. Surprise-based intrinsic motivation for deep reinforcement learning. arXiv:1703.01732, 2017. 3, 9
168
+
169
+ M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, jun 2013. 2
170
+
171
+ Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, 2016. 1, 9
172
+
173
+ Richard Y Chen, John Schulman, Pieter Abbeel, and Szymon Sidor. UCB and infogain exploration via $q$ ensembles. arXiv:1706.01502, 2017. 9
174
+
175
+ Greg Costikyan. Uncertainty in games. Mit Press, 2013. 6
176
+
177
+ Benjamin Eysenbach, Abhishek Gupta, Julian Ibarz, and Sergey Levine. Diversity is all you need: Learning skills without a reward function. arXiv preprint, 2018. 9
178
+
179
+ Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, Charles Blundell, and Shane Legg. Noisy networks for exploration. arXiv:1706.10295, 2017. 9
180
+
181
+ Justin Fu, John D Co-Reyes, and Sergey Levine. EX2: Exploration with exemplar models for deep reinforcement learning. NIPS, 2017. 9
182
+
183
+ Karol Gregor, Danilo Jimenez Rezende, and Daan Wierstra. Variational intrinsic control. ICLR Workshop, 2017. 9
184
+
185
+ Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In NIPS, 2016. 1, 9
186
+
187
+ Robin Hunicke, Marc LeBlanc, and Robert Zubek. Mda: A formal approach to game design and game research. In AAAI Workshop on Challenges in Game AI, 2004. 6
188
+
189
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 4
190
+
191
+ Kevin Jarrett, Koray Kavukcuoglu, Yann LeCun, et al. What is the best multi-stage architecture for object recognition? In Computer Vision, 2009 IEEE 12th International Conference on, pp. 2146–2153. IEEE, 2009. 10
192
+
193
+ Arthur Juliani, Vincent-Pierre Berges, Esh Vckay, Yuan Gao, Hunter Henry, Marwan Mattar, and Danny Lange. Unity: A general platform for intelligent agents. arXiv:1809.02627, 2018. 2
194
+
195
+ Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013. 2, 3
196
+
197
+ Nicole Lazzaro. Why we play games: Four keys to more emotion in player experiences. In Proceedings of GDC, 2004. 6
198
+
199
+ Joel Lehman and Kenneth O Stanley. Exploiting open-endedness to solve problems through the search for novelty. In ALIFE, 2008. 9
200
+
201
+ Joel Lehman and Kenneth O Stanley. Abandoning objectives: Evolution through the search for novelty alone. Evolutionary computation, 2011. 9
202
+
203
+ Manuel Lopes, Tobias Lang, Marc Toussaint, and Pierre-Yves Oudeyer. Exploration in model-based reinforcement learning by empirically estimating learning progress. In NIPS, 2012. 1, 9
204
+
205
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 2015. 1
206
+
207
+ Shakir Mohamed and Danilo Jimenez Rezende. Variational information maximisation for intrinsically motivated reinforcement learning. In NIPS, 2015. 1
208
+
209
+ Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped dqn. In NIPS, 2016. 9
210
+
211
+ Georg Ostrovski, Marc G Bellemare, Aaron van den Oord, and Remi Munos. Count-based exploration with ´ neural density models. arXiv:1703.01310, 2017. 1, 9 Pierre-Yves Oudeyer. Computational theories of curiosity-driven learning. arXiv preprint arXiv:1802.10546,
212
+ 2018. 9 Pierre-Yves Oudeyer and Frederic Kaplan. What is intrinsic motivation? a typology of computational approaches. Frontiers in neurorobotics, 2009. 1, 9 Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by selfsupervised prediction. In ICML, 2017. 1, 2, 3, 4, 6, 9 Deepak Pathak, Parsa Mahmoudieh, Guanghao Luo, Pulkit Agrawal, Dian Chen, Yide Shentu, Evan Shelhamer, Jitendra Malik, Alexei A. Efros, and Trevor Darrell. Zero-shot visual imitation. In ICLR, 2018. 1 Matthias Plappert, Rein Houthooft, Prafulla Dhariwal, Szymon Sidor, Richard Y Chen, Xi Chen, Tamim Asfour, Pieter Abbeel, and Marcin Andrychowicz. Parameter space noise for exploration. arXiv:1706.01905,
213
+ 2017. 9 Pascal Poupart, Nikos Vlassis, Jesse Hoey, and Kevin Regan. An analytic solution to discrete bayesian reinforcement learning. In ICML, 2006. 1 Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. 3 Edward L. Ryan, Richard; Deci. Intrinsic and extrinsic motivations: Classic definitions and new directions. Contemporary Educational Psychology, 2000. 1 Andrew M Saxe, Pang Wei Koh, Zhenghao Chen, Maneesh Bhand, Bipin Suresh, and Andrew Y Ng. On random weights and unsupervised feature learning. In ICML, pp. 1089–1096, 2011. 10 Jurgen Schmidhuber. Curious model-building control systems. In ¨ Neural Networks, 1991. 1991 IEEE International Joint Conference on, pp. 1458–1463. IEEE, 1991a. 9 Jurgen Schmidhuber. A possibility for implementing curiosity and boredom in model-building neural controllers. In From animals to animats: Proceedings of the first international conference on simulation of adaptive behavior, 1991b. 1 Jurgen Schmidhuber. A possibility for implementing curiosity and boredom in model-building neural con- ¨ trollers, 1991c. 9 Jurgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). ¨ IEEE Transactions on Autonomous Mental Development, 2010. 9 John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. 2, 4 Satinder P Singh, Andrew G Barto, and Nuttapong Chentanez. Intrinsically motivated reinforcement learning. In NIPS, 2005. 1 Linda Smith and Michael Gasser. The development of embodied cognition: Six lessons from babies. Artificial life, 2005. 1 Bradly C Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. NIPS Workshop, 2015. 2, 9 Kenneth O Stanley and Joel Lehman. Why greatness cannot be planned: The myth of the objective. Springer,
214
+ 2015. 9 Susanne Still and Doina Precup. An information-theoretic approach to curiosity-driven reinforcement learning. Theory in Biosciences, 2012. 9 Sainbayar Sukhbaatar, Ilya Kostrikov, Arthur Szlam, and Rob Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. In ICLR, 2018. 9 Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press Cambridge, 1998.
215
+ 4
216
+
217
+ Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. #Exploration: A study of count-based exploration for deep reinforcement learning. Advances in Neural Information Processing Systems, 2017. 9
218
+
219
+ Pieter Wouters, Herre Van Oostendorp, Rudy Boonekamp, and Erik Van der Spek. The role of game discourse analysis and curiosity in creating engaging and effective serious games by implementing a back story and foreshadowing. Interacting with Computers, 2011. 6
220
+
221
+ 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. 10
222
+
223
+ # A IMPLEMENTATION DETAILS
224
+
225
+ We have released the training code and environments on our website 1. For full details, we refer the reader to our code and video results in the website.
226
+
227
+ Pre-processing: All experiments were done with pixels. We converted all images to grayscale and resized to size 84x84. We learn the agent’s policy and forward dynamics function both on a stack of historical observations $[ x _ { t - 3 } , x _ { t - 2 } , x _ { t - 1 } , x _ { t } ]$ instead of only using the current observation. This is to capture partial observability in these games. In the case of Super Mario Bros and Atari experiments, we also used a standard frameskip wrapper that repeats each action 4 times.
228
+
229
+ Architectures: Our embedding network and policy networks had identical architectures and were based on the standard convolutional networks used in Atari experiments. The layer we take as features in the embedding network had dimension 512 in all experiments and no nonlinearity. To keep the scale of the prediction error consistent relative to extrinsic reward, in the Unity experiments we applied batchnorm to the embedding network. We also did this for the Mario generalization experiments to reduce covariate shift from level to level. For the VAE auxiliary task and pixel method, we used a similar deconvolutional architecture the exact details of which can be found in our code submission. The IDF and forward dynamics networks were heads on top of the embedding network with several extra fully-connected layers of dimensionality 512.
230
+
231
+ Hyper-parameters: We used a learning rate of 0.0001 for all networks. In most experiments, we used 128 parallel environments with the exceptions of the Unity and Roboschool experiments where we could only run 32 parallel environments, and the large scale Mario experiment where we used 1024. We used rollouts of length 128 in all experiments except for the Unity experiments where we used 512 length rollouts so that the network could quickly latch onto the sparse reward. In the initial 9 experiments on Mario and Atari, we used 3 optimization epochs per rollout in the interest of speed. In the Mario scaling, generalization experiments, as well as the Roboschool experiments, we used 6 epochs. In the Unity experiments, we used 8 epochs, again to more quickly take advantage of sparse rewards.
232
+
233
+ # B ADDITIONAL RESULTS
234
+
235
+ # B.1 ATARI
236
+
237
+ To better measure the amount of exploration, we provide the best return of curiosity-driven agents in figure 7(a) and the episode lengths in figure 7(b). Notably on Pong the increasing episode length combined with a plateau in returns shows that the agent maximizes the number of ball bounces, rather than the reward.
238
+
239
+ Figure 8 shows the performance of curiosity-driven agents based on Inverse Dynamics and Random features on 48 Atari games.
240
+
241
+ Although not the focus of this paper, for completeness we include some results on combining intrinsic and extrinsic reward on several sparse reward Atari games. When combining with extrinsic rewards, we use the end of the episode signal. The reward used is the extrinsic reward plus 0.01 times the intrinsic reward. The results are shown in Table 2. We don’t observe a large difference between the settings, likely because the combination of intrinsic and extrinsic reward needs to be tuned. We did observe that one of the intrinsic+extrinsic runs on Montezuma’s Revenge explored 10 rooms.
242
+
243
+ ![](images/3cf627208d2a6d9f50c1079e93287331b332094055997daca5845d91ec064fdd.jpg)
244
+ Figure 7: (a) Left: Best extrinsic returns on eight Atari games and Mario. (c) Right: Mean episode lengths on eight Atari games and Mario.
245
+
246
+ ![](images/c239c71ab5e948299e7ae9d26ac27c2015b9a2ed51aa284ac68e9d9f6b2db361.jpg)
247
+ Figure 8: Pure curiosity-driven exploration (no extrinsic reward, or end-of-episode signal) on 48 Atari games. We observe that the extrinsic returns of curiosity-driven agents often increases despite the agents having no access to the extrinsic return or end of episode signal. In multiple environments, the performance of the curiositydriven agents is significantly better than that of a random agent, although there are environments where the behavior of the agent is close to random, or in fact seems to minimize the return, rather than maximize it. For the majority of the training process RF perform better than a random agent in about $67 \%$ of the environments, while IDF perform better than a random agent in about $71 \%$ of the environments.
248
+
249
+ <table><tr><td>Reward</td><td>Gravitar</td><td>Freeway</td><td>Venture</td><td>PrivateEye</td><td>MontezumaRevenge</td></tr><tr><td>Ext Only</td><td>999.3± 220.7</td><td>33.3± 0.6</td><td>0±0</td><td>5020.3 ± 395</td><td>1783 ± 691.7</td></tr><tr><td>Ext + Int</td><td>1165.1 ± 53.6</td><td>32.8± 0.3</td><td>416 ± 416</td><td>3036.5 ± 952.1</td><td>2504.6 ± 4.6</td></tr></table>
250
+
251
+ Table 2: These results compare the mean reward ( $\pm$ std-error) after 100 million frames across 3 seeds for an agent trained with intrinsic plus extrinsic reward versus extrinsic reward only. The extrinsic (coefficient 1.0) and intrinsic reward (coefficient 0.01) were directly combined without any hyper-parameter tuning. We leave the question on how to optimally combine extrinsic and intrinsic rewards up to future work. This is to emphasize that combining extrinsic with intrinsic rewards is not the focus of the paper, and these experiments are provided just for completeness.
252
+
253
+ # B.2 MARIO
254
+
255
+ We show the analogue of the plot shown in Figure 3(a) showing max extrinsic returns. See Figure 9.
256
+
257
+ ![](images/332d8b11f113d5e56625b39250c7912d95ca77d9075373863f4f07711fcef3a8.jpg)
258
+ Figure 9: Best extrinsic returns on the Mario scaling experiments. We observe that larger batches allow the agent to explore more effectively, reaching the same performance in less parameter updates, and also achieving better ultimate scores.
259
+
260
+ 1 Initialize the networks $f ( x _ { t } , a _ { t } ; \theta _ { f } )$ , $\pi ( x _ { t } ; \theta _ { \pi } )$ and $\phi ( x ; \theta _ { \phi } )$
261
+ 2 $D = \{ \}$
262
+ 3 for iteration $i = I$ to . . . do
263
+ 4 for envs in parallel $t = I$ to $^ { l 2 8 }$ do
264
+ 5 for iteration $t = I$ to 128 do
265
+ 6 Sample $a \sim \pi ( x _ { t } ; \theta _ { \pi } )$ and act using $a$ in the environment
266
+ 7 $D \Leftarrow D + ( x _ { t } , a _ { t } , x _ { t + 1 } , r _ { t } )$ where $r _ { t } = \| f ( x _ { t } , a _ { t } ; \theta _ { f } ) - \phi ( x _ { t + 1 } ; \theta _ { \phi } ) \| _ { 2 } ^ { 2 }$
267
+ 8 end
268
+ 9 end
269
+ 10 for steps $k = I$ to $6 4$ do
270
+ 11 Sample batch size of 2048 from $D$ and update using ADAM as follows:
271
+ 12 $\theta _ { f } ^ { ' } : = \theta _ { f } - \eta _ { 1 } \nabla _ { \theta _ { f } } \mathbb { E } \big [ \| f ( x _ { t } , a _ { t } ; \theta _ { f } ) - \phi ( x _ { t + 1 } ; \theta _ { \phi } ) \| _ { 2 } ^ { 2 } \big ]$
272
+ 13 $\boldsymbol { \theta } _ { \phi } ^ { ' } : = \boldsymbol { \theta } _ { \phi } - \eta _ { 2 } \nabla _ { \theta _ { \phi } } \mathbb { E } \big [ \| \dots \| _ { 2 } ^ { 2 } \big ]$ : some auxiliary task
273
+ 14 $\begin{array} { r } { \boldsymbol { \theta } _ { \pi } ^ { \prime } : = \boldsymbol { \theta } _ { \pi } + \eta _ { 3 } \nabla _ { \boldsymbol { \theta } _ { \pi } } \mathbb { E } _ { \pi ( \boldsymbol { x } _ { t } ; \boldsymbol { \theta } _ { \pi } ) } \big [ \sum _ { t } \boldsymbol { r } _ { t } \big ] } \end{array}$ : use PPO with discounted returns
274
+ 15 $\theta _ { f } \Leftarrow \theta _ { f } ^ { ' }$
275
+ 16 θ φ ⇐ θ 0φ
276
+ 17 $\theta _ { \pi } \Leftarrow \theta _ { \pi } ^ { ' }$
277
+ 18 end
278
+ 19 end
parse/train/rJNwDjAqYX/rJNwDjAqYX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rkHVZWZAZ/rkHVZWZAZ.md ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # THE REACTOR:
2
+
3
+ # A FAST AND SAMPLE-EFFICIENT ACTOR-CRITIC AGENT FOR REINFORCEMENT LEARNING
4
+
5
+ Audrunas Gruslys, ¯ DeepMind audrunas@google.com
6
+
7
+ Will Dabney,
8
+ DeepMind
9
+ wdabney@google.com
10
+
11
+ Mohammad Gheshlaghi Azar, DeepMind mazar@google.com
12
+
13
+ Bilal Piot,
14
+ DeepMind
15
+ piot@google.com
16
+
17
+ Marc G. Bellemare, Google Brain bellemare@google.com
18
+
19
+ Rémi Munos,
20
+ DeepMind
21
+ munos@google.com
22
+
23
+ # ABSTRACT
24
+
25
+ In this work, we present a new agent architecture, called Reactor, which combines multiple algorithmic and architectural contributions to produce an agent with higher sample-efficiency than Prioritized Dueling DQN (Wang et al., 2017) and Categorical DQN (Bellemare et al., 2017), while giving better run-time performance than A3C (Mnih et al., 2016). Our first contribution is a new policy evaluation algorithm called Distributional Retrace, which brings multi-step off-policy updates to the distributional reinforcement learning setting. The same approach can be used to convert several classes of multi-step policy evaluation algorithms, designed for expected value evaluation, into distributional algorithms. Next, we introduce the $\beta$ -leave-one-out policy gradient algorithm, which improves the trade-off between variance and bias by using action values as a baseline. Our final algorithmic contribution is a new prioritized replay algorithm for sequences, which exploits the temporal locality of neighboring observations for more efficient replay prioritization. Using the Atari 2600 benchmarks, we show that each of these innovations contribute to both sample efficiency and final agent performance. Finally, we demonstrate that Reactor reaches state-of-the-art performance after 200 million frames and less than a day of training.
26
+
27
+ # 1 INTRODUCTION
28
+
29
+ Model-free deep reinforcement learning has achieved several remarkable successes in domains ranging from super-human-level control in video games (Mnih et al., 2015) and the game of Go (Silver et al., 2016; 2017), to continuous motor control tasks (Lillicrap et al., 2015; Schulman et al., 2015).
30
+
31
+ Much of the recent work can be divided into two categories. First, those of which that, often building on the DQN framework, act $\epsilon$ -greedily according to an action-value function and train using minibatches of transitions sampled from an experience replay buffer (Van Hasselt et al., 2016; Wang et al., 2015; He et al., 2017; Anschel et al., 2017). These value-function agents benefit from improved sample complexity, but tend to suffer from long runtimes (e.g. DQN requires approximately a week to train on Atari). The second category are the actor-critic agents, which includes the asynchronous advantage actor-critic (A3C) algorithm, introduced by Mnih et al. (2016). These agents train on transitions collected by multiple actors running, and often training, in parallel (Schulman et al., 2017; Vezhnevets et al., 2017). The deep actor-critic agents train on each trajectory only once, and thus tend to have worse sample complexity. However, their distributed nature allows significantly faster training in terms of wall-clock time. Still, not all existing algorithms can be put in the above two categories and various hybrid approaches do exist (Zhao et al., 2016; O’Donoghue et al., 2017; Gu et al., 2017; Wang et al., 2017).
32
+
33
+ Data-efficiency and off-policy learning are essential for many real-world domains where interactions with the environment are expensive. Similarly, wall-clock time (time-efficiency) directly impacts an algorithm’s applicability through resource costs. The focus of this work is to produce an agent that is sample- and time-efficient. To this end, we introduce a new reinforcement learning agent, called Reactor (Retrace-Actor), which takes a principled approach to combining the sample-efficiency of off-policy experience replay with the time-efficiency of asynchronous algorithms. We combine recent advances in both categories of agents with novel contributions to produce an agent that inherits the benefits of both and reaches state-of-the-art performance over 57 Atari 2600 games.
34
+
35
+ Our primary contributions are (1) a novel policy gradient algorithm, $\beta$ -LOO, which makes better use of action-value estimates to improve the policy gradient; (2) the first multi-step off-policy distributional reinforcement learning algorithm, distributional Retrace $( \lambda )$ ; (3) a novel prioritized replay for off-policy sequences of transitions; and (4) an optimized network and parallel training architecture.
36
+
37
+ We begin by reviewing background material, including relevant improvements to both value-function agents and actor-critic agents. In Section 3 we introduce each of our primary contributions and present the Reactor agent. Finally, in Section 4, we present experimental results on the 57 Atari 2600 games from the Arcade Learning Environment (ALE) (Bellemare et al., 2013), as well as a series of ablation studies for the various components of Reactor.
38
+
39
+ # 2 BACKGROUND
40
+
41
+ We consider a Markov decision process (MDP) with state space $X$ and finite action space $\mathcal { A }$ . A (stochastic) policy $\pi ( \cdot | x )$ is a mapping from states $x \in X$ to a probability distribution over actions. We consider a $\gamma$ -discounted infinite-horizon criterion, with $\gamma \in [ 0 , 1 )$ the discount factor, and define for policy $\pi$ the action-value of a state-action pair $( x , a )$ as
42
+
43
+ $$
44
+ \begin{array} { r } { Q ^ { \pi } ( x , a ) \stackrel { \mathrm { d e f } } { = } \mathbb { E } \Bigl [ \sum _ { t \geq 0 } \gamma ^ { t } r _ { t } | x _ { 0 } = x , a _ { 0 } = a , \pi \Bigr ] , } \end{array}
45
+ $$
46
+
47
+ where $( \{ x _ { t } \} _ { t \ge 0 } )$ is a trajectory generated by choosing $a$ in $x$ and following $\pi$ thereafter, i.e., $a _ { t } \sim$ $\pi ( \cdot | x _ { t } )$ (for $t \geq 1$ ), and $r _ { t }$ is the reward signal. The objective in reinforcement learning is to find an optimal policy $\pi ^ { * }$ , which maximises $Q ^ { \pi } ( x , a )$ . The optimal action-values are given by $Q ^ { * } ( x , a ) = \operatorname* { m a x } _ { \pi } Q ^ { \pi } ( x , a )$ .
48
+
49
+ # 2.1 VALUE-BASED ALGORITHMS
50
+
51
+ The Deep Q-Network (DQN) framework, introduced by Mnih et al. (2015), popularised the current line of research into deep reinforcement learning by reaching human-level, and beyond, performance across 57 Atari 2600 games in the ALE. While DQN includes many specific components, the essence of the framework, much of which is shared by Neural Fitted Q-Learning (Riedmiller, 2005), is to use of a deep convolutional neural network to approximate an action-value function, training this approximate action-value function using the Q-Learning algorithm (Watkins & Dayan, 1992) and mini-batches of one-step transitions $( x _ { t } , a _ { t } , r _ { t } , x _ { t + 1 } , \gamma _ { t } )$ drawn randomly from an experience replay buffer (Lin, 1992). Additionally, the next-state action-values are taken from a target network, which is updated to match the current network periodically. Thus, the temporal difference (TD) error for transition $t$ used by these algorithms is given by
52
+
53
+ $$
54
+ \delta _ { t } = r _ { t } + \gamma _ { t } \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } Q ( x _ { t + 1 } , a ^ { \prime } ; \bar { \theta } ) - Q ( x _ { t } , a _ { t } ; \theta ) ,
55
+ $$
56
+
57
+ where $\theta$ denotes the parameters of the network and $\bar { \theta }$ are the parameters of the target network.
58
+
59
+ Since this seminal work, we have seen numerous extensions and improvements that all share the same underlying framework. Double DQN (Van Hasselt et al., 2016), attempts to correct for the over-estimation bias inherent in Q-Learning by changing the second term of (1) to $\begin{array} { r } { Q ( x _ { t + 1 } , \arg \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } Q ( x _ { t + 1 } , a ^ { \prime } ; \theta ) ; \bar { \theta } ) } \end{array}$ . The dueling architecture (Wang et al., 2015), changes the network to estimate action-values using separate network heads $V ( x ; \theta )$ and $A ( x , a ; \theta )$ with
60
+
61
+ $$
62
+ Q ( x , a ; \theta ) = V ( x ; \theta ) + A ( x , a ; \theta ) - \frac { 1 } { | A | } \sum _ { a ^ { \prime } } A ( x , a ^ { \prime } ; \theta ) .
63
+ $$
64
+
65
+ Recently, Hessel et al. (2017) introduced Rainbow, a value-based reinforcement learning agent combining many of these improvements into a single agent and demonstrating that they are largely complementary. Rainbow significantly out performs previous methods, but also inherits the poorer time-efficiency of the DQN framework. We include a detailed comparison between Reactor and Rainbow in the Appendix. In the remainder of the section we will describe in more depth other recent improvements to DQN.
66
+
67
+ # 2.1.1 PRIORITIZED EXPERIENCE REPLAY
68
+
69
+ The experience replay buffer was first introduced by Lin (1992) and later used in DQN (Mnih et al., 2015). Typically, the replay buffer is essentially a first-in-first-out queue with new transitions gradually replacing older transitions. The agent would then sample a mini-batch uniformly at random from the replay buffer. Drawing inspiration from prioritized sweeping (Moore & Atkeson, 1993), prioritized experience replay replaces the uniform sampling with prioritized sampling proportional to the absolute TD error (Schaul et al., 2016).
70
+
71
+ Specifically, for a replay buffer of size $N$ , prioritized experience replay samples transition $t$ with probability $P ( t )$ , and applies weighted importance-sampling with $w _ { t }$ to correct for the prioritization bias, where
72
+
73
+ $$
74
+ P ( t ) = \frac { p _ { t } ^ { \alpha } } { \sum _ { k } p _ { k } ^ { \alpha } } , \quad w _ { t } = \left( \frac { 1 } { N } \cdot \frac { 1 } { P ( t ) } \right) ^ { \beta } , \quad p _ { t } = | \delta _ { t } | + \epsilon , \quad \alpha , \beta , \epsilon > 0 .
75
+ $$
76
+
77
+ Prioritized DQN significantly increases both the sample-efficiency and final performance over DQN on the Atari 2600 benchmarks (Schaul et al., 2015).
78
+
79
+ # 2.1.2 RETRACE(λ)
80
+
81
+ Retrace $( \lambda )$ is a convergent off-policy multi-step algorithm extending the DQN agent (Munos et al., 2016). Assume that some trajectory $\left\{ x _ { 0 } , a _ { 0 } , r _ { 0 } , x _ { 1 } , a _ { 1 } , r _ { 1 } , \dots , x _ { t } , a _ { t } , r _ { t } , \dots , \right\}$ has been generated according to behaviour policy $\mu$ , i.e., $a _ { t } \sim \mu ( \cdot | x _ { t } )$ . Now, we aim to evaluate the value of a different target policy $\pi$ , i.e. we want to estimate $Q ^ { \pi }$ . The Retrace algorithm will update our current estimate $Q$ of $Q ^ { \pi }$ in the direction of
82
+
83
+ $$
84
+ \begin{array} { r } { \Delta Q ( x _ { t } , a _ { t } ) \stackrel { \mathrm { d e f } } { = } \sum _ { s \geq t } \gamma ^ { s - t } ( c _ { t + 1 } \ldots c _ { s } ) \delta _ { s } ^ { \pi } Q , } \end{array}
85
+ $$
86
+
87
+ where $\delta _ { s } ^ { \pi } Q \stackrel { \mathrm { d e f } } { = } r _ { s } + \gamma \mathbb { E } _ { \pi } [ Q ( x _ { s + 1 } , \cdot ) ] - Q ( x _ { s } , a _ { s } )$ is the temporal difference at time $s$ under $\pi$ , and
88
+
89
+ $$
90
+ c _ { s } = \lambda \operatorname* { m i n } \big ( 1 , \rho _ { s } \big ) , \quad \rho _ { s } = \frac { \pi ( a _ { s } | x _ { s } ) } { \mu ( a _ { s } | x _ { s } ) } .
91
+ $$
92
+
93
+ The Retrace algorithm comes with the theoretical guarantee that in finite state and action spaces, repeatedly updating our current estimate $Q$ according to (3) produces a sequence of $\mathrm { Q }$ functions which converges to $Q ^ { \pi }$ for a fixed $\pi$ or to $Q ^ { * }$ if we consider a sequence of policies $\pi$ which become increasingly greedy w.r.t. the $Q$ estimates (Munos et al., 2016).
94
+
95
+ # 2.1.3 DISTRIBUTIONAL RL
96
+
97
+ Distributional reinforcement learning refers to a class of algorithms that directly estimate the distribution over returns, whose expectation gives the traditional value function (Bellemare et al., 2017). Such approaches can be made tractable with a distributional Bellman equation, and the recently proposed algorithm $C 5 1$ showed state-of-the-art performance in the Atari 2600 benchmarks. $C 5 1$ parameterizes the distribution over returns with a mixture over Diracs centered on a uniform grid,
98
+
99
+ $$
100
+ Q ( x , a ; \theta ) = \sum _ { i = 0 } ^ { N - 1 } q _ { i } ( x , a ; \theta ) z _ { i } , q _ { i } = \frac { e ^ { \theta _ { i } ( x , a ) } } { \sum _ { j = 0 } ^ { N - 1 } e ^ { \theta _ { j } ( x , a ) } } , z _ { i } = v _ { \mathrm { m i n } } + i \frac { v _ { \mathrm { m a x } } - v _ { \mathrm { m i n } } } { N - 1 } ,
101
+ $$
102
+
103
+ with hyperparameters $v _ { \operatorname* { m i n } } , v _ { \operatorname* { m a x } }$ that bound the distribution support of size $N$ .
104
+
105
+ # 2.2 ACTOR-CRITIC ALGORITHMS
106
+
107
+ In this section we review the actor-critic framework for reinforcement learning algorithms and then discuss recent advances in actor-critic algorithms along with their various trade-offs. The asynchronous advantage actor-critic (A3C) algorithm (Mnih et al., 2016), maintains a parameterized policy $\pi ( a | x ; \theta )$ and value function $V ( x ; \theta _ { v } )$ , which are updated with
108
+
109
+ $$
110
+ \begin{array} { r } { \triangle \theta = \nabla _ { \theta } \log \pi ( a _ { t } | x _ { t } ; \theta ) A ( x _ { t } , a _ { t } ; \theta _ { v } ) , \quad \triangle \theta _ { v } = A ( x _ { t } , a _ { t } ; \theta _ { v } ) \nabla _ { \theta _ { v } } V ( x _ { t } ) , } \\ { \mathrm { w h e r e , } \quad A ( x _ { t } , a _ { t } ; \theta _ { v } ) = \displaystyle \sum _ { k } ^ { n - 1 } \gamma ^ { k } r _ { t + k } + \gamma ^ { n } V ( x _ { t + n } ) - V ( x _ { t } ) . } \end{array}
111
+ $$
112
+
113
+ A3C uses $M = 1 6$ parallel CPU workers, each acting independently in the environment and applying the above updates asynchronously to a shared set of parameters. In contrast to the previously discussed value-based methods, A3C is an on-policy algorithm, and does not use a GPU nor a replay buffer.
114
+
115
+ Proximal Policy Optimization (PPO) is a closely related actor-critic algorithm (Schulman et al., 2017), which replaces the advantage (7) with,
116
+
117
+ $$
118
+ \mathrm { m i n } ( \rho _ { t } A ( x _ { t } , a _ { t } ; \theta _ { v } ) , c l i p ( \rho _ { t } , 1 - \epsilon , 1 + \epsilon ) A ( x _ { t } , a _ { t } ; \theta _ { v } ) ) , \epsilon > 0 ,
119
+ $$
120
+
121
+ where $\rho _ { t }$ is as defined in Section 2.1.2. Although both PPO and A3C run $M$ parallel workers collecting trajectories independently in the environment, PPO collects these experiences to perform a single, synchronous, update in contrast with the asynchronous updates of A3C.
122
+
123
+ Actor-Critic Experience Replay (ACER) extends the A3C framework with an experience replay buffer, Retrace algorithm for off-policy corrections, and the Truncated Importance Sampling Likelihood Ratio (TISLR) algorithm used for off-policy policy optimization (Wang et al., 2017).
124
+
125
+ # 3 THE REACTOR
126
+
127
+ The Reactor is a combination of four novel contributions on top of recent improvements to both deep value-based RL and policy-gradient algorithms. Each contribution moves Reactor towards our goal of achieving both sample and time efficiency.
128
+
129
+ # 3.1 $\beta$ -LOO
130
+
131
+ The Reactor architecture represents both a policy $\pi ( a | x )$ and action-value function $Q ( x , a )$ . We use a policy gradient algorithm to train the actor $\pi$ which makes use of our current estimate $Q ( x , a )$ of $Q ^ { \pi } ( x , a )$ . Let $V ^ { \pi } ( x _ { 0 } )$ be the value function at some initial state $x _ { 0 }$ , the policy gradient theorem says that $\begin{array} { r } { \nabla V ^ { \pi } ( { x } _ { 0 } ) = \mathbb { E } \big [ \sum _ { t } \gamma ^ { t } \sum _ { a } Q ^ { \pi } ( { x } _ { t } , a ) \nabla \pi ( a | { x } _ { t } ) \big ] } \end{array}$ , where $\nabla$ refers to the gradient w.r.t. policy parameters (Sutton et al., 2000). We now consider several possible ways to estimate this gradient.
132
+
133
+ To simplify notation, we drop the dependence on the state $x$ for now and consider the problem of estimating the quantity
134
+
135
+ $$
136
+ \begin{array} { r } { G = \sum _ { a } Q ^ { \pi } ( a ) \nabla \pi ( a ) . } \end{array}
137
+ $$
138
+
139
+ In the off-policy case, we consider estimating $G$ using a single action $\hat { a }$ drawn from a (possibly different from $\pi$ ) behaviour distribution $\hat { a } \sim \mu$ . Let us assume that for the chosen action $\hat { a }$ we have access to an unbiased estimate $R ( { \hat { a } } )$ of $Q ^ { \pi } ( \hat { a } )$ . Then, we can use likelihood ratio (LR) method combined with an importance sampling (IS) ratio (which we call ISLR) to build an unbiased estimate of $G$ :
140
+
141
+ $$
142
+ \hat { G } _ { \mathrm { I S L R } } = \frac { \pi ( \hat { a } ) } { \mu ( \hat { a } ) } ( R ( \hat { a } ) - V ) \nabla \log \pi ( \hat { a } ) ,
143
+ $$
144
+
145
+ where $V$ is a baseline that depends on the state but not on the chosen action. However this estimate suffers from high variance. A possible way for reducing variance is to estimate $G$ directly from (8) by using the return $R ( { \hat { a } } )$ for the chosen action $\hat { a }$ and our current estimate $Q$ of $Q ^ { \pi }$ for the other actions, which leads to the so-called leave-one-out (LOO) policy-gradient estimate:
146
+
147
+ $$
148
+ \begin{array} { r } { \hat { G } _ { \mathrm { L O O } } = R ( \hat { a } ) \nabla \pi ( \hat { a } ) + \sum _ { a \ne \hat { a } } Q ( a ) \nabla \pi ( a ) . } \end{array}
149
+ $$
150
+
151
+ ![](images/4dc78c2bfa460c9a12d8f0e88f781cfc056c7465107a2397f307095e351e9346.jpg)
152
+ Figure 1: Single-step (left) and multi-step (right) distribution bootstrapping.
153
+
154
+ This estimate has low variance but may be biased if the estimated $Q$ values differ from $Q ^ { \pi }$ . A better bias-variance tradeoff may be obtained by the more general $\beta$ -LOO policy-gradient estimate:
155
+
156
+ $$
157
+ \begin{array} { r } { \hat { G } _ { \beta \mathrm { - } \mathrm { L O O } } = \beta ( R ( \hat { a } ) - Q ( \hat { a } ) ) \nabla \pi ( \hat { a } ) + \sum _ { a } Q ( a ) \nabla \pi ( a ) , } \end{array}
158
+ $$
159
+
160
+ where $\beta = \beta ( \mu , \pi , \hat { a } )$ can be a function of both policies, $\pi$ and $\mu$ , and the selected action $\hat { a }$ . Notice that when $\beta = 1$ , (10) reduces to (9), and when $\beta = 1 / \mu ( \hat { a } )$ , then (10) is
161
+
162
+ $$
163
+ \hat { G } _ { \frac { 1 } { \mu } \cdot \mathrm { L O O } } = \frac { \pi ( \hat { a } ) } { \mu ( \hat { a } ) } ( R ( \hat { a } ) - Q ( \hat { a } ) ) \nabla \log \pi ( \hat { a } ) + \textstyle \sum _ { a } Q ( a ) \nabla \pi ( a ) .
164
+ $$
165
+
166
+ This estimate is unbiased and can be seen as a generalization of $\hat { G } _ { \mathrm { I S L R } }$ where instead of using a state-only dependent baseline, we use a state-and-action-dependent baseline (our current estimate $Q$ ) and add the correction term $\begin{array} { r } { \sum _ { a } { \nabla \pi ( a ) Q ( a ) } } \end{array}$ to cancel the bias. Proposition 1 gives our analysis of the bias of $G _ { \beta - \mathrm { L O O } }$ , with a proof left to the Appendix.
167
+
168
+ Proposition 1. Assume $\hat { a } \sim \mu$ and that $\mathbb { E } [ R ( { \hat { a } } ) ] = Q ^ { \pi } ( { \hat { a } } )$ . Then, the bias of $G _ { \beta - L O O } ~ i s \mid \sum _ { a } ( 1 -$ $\mu ( a ) \beta ( a ) ) \nabla \pi ( a ) [ Q ( a ) - Q ^ { \pi } ( a ) ] \big |$ .
169
+
170
+ Thus the bias is small when $\beta ( a )$ is close to $1 / \mu ( a )$ , or when the $Q$ -estimates are close to the true $Q ^ { \pi }$ values, and unbiased regardless of the estimates if $\beta ( a ) = 1 / \mu ( a )$ . The variance is low when $\beta$ is small, therefore, in order to improve the bias-variance tradeoff we recommend using the $\beta$ -LOO estimate with $\beta$ defined as: $\begin{array} { r } { \beta ( \hat { a } ) ^ { \ast } = \operatorname* { m i n } \left( c , \frac { 1 } { \mu ( \hat { a } ) } \right) } \end{array}$ , for some constant $c \geq 1$ . This truncated $1 / \mu$ coefficient shares similarities with the truncated IS gradient estimate introduced in (Wang et al., 2017) (which we call TISLR for truncated-ISLR):
171
+
172
+ $$
173
+ \hat { G } _ { \mathrm { T S L R } } = \operatorname* { m i n } \Big ( c , \frac { \pi ( \hat { a } ) } { \mu ( \hat { a } ) } \Big ) ( R ( \hat { a } ) - V ) \nabla \log \pi ( \hat { a } ) + \sum _ { a } \Big ( \frac { \pi ( a ) } { \mu ( a ) } - c \Big ) _ { + } \mu ( a ) ( Q ^ { \pi } ( a ) - V ) \nabla \log \pi ( a ) .
174
+ $$
175
+
176
+ The differences are: (i) we truncate $1 / \mu ( \hat { a } ) = \pi ( \hat { a } ) / \mu ( \hat { a } ) \times 1 / \pi ( \hat { a } )$ instead of truncating $\pi ( \hat { a } ) / \mu ( \hat { a } )$ , which provides an additional variance reduction due to the variance of the LR $\begin{array} { r } { \nabla \log \pi ( \hat { a } ) = \frac { \nabla \pi ( \hat { a } ) } { \pi ( \hat { a } ) } } \end{array}$ (since this LR may be large when a low probability action is chosen), and (ii) we use our $Q$ -baseline instead of a $V$ baseline, reducing further the variance of the LR estimate.
177
+
178
+ # 3.2 DISTRIBUTIONAL RETRACE
179
+
180
+ In off-policy learning it is very difficult to produce an unbiased sample $R ( \hat { a } )$ of $Q ^ { \pi } ( \hat { a } )$ when following another policy $\mu$ . This would require using full importance sampling correction along the trajectory. Instead, we use the off-policy corrected return computed by the Retrace algorithm, which produces a (biased) estimate of $Q ^ { \pi } ( \hat { a } )$ but whose bias vanishes asymptotically (Munos et al., 2016).
181
+
182
+ In Reactor, we consider predicting an approximation of the return distribution function from any state-action pair $( x , a )$ in a similar way as in Bellemare et al. (2017). The original algorithm C51 described in that paper considered single-step Bellman updates only. Here we need to extend this idea to multi-step updates and handle the off-policy correction performed by the Retrace algorithm, as defined in (3). Next, we describe these two extensions.
183
+
184
+ Multi-step distributional Bellman operator: First, we extend C51 to multi-step Bellman backups. We consider return-distributions from $( x , a )$ of the form $\textstyle \sum _ { i } q _ { i } ( x , a ) \delta _ { z _ { i } }$ (where $\delta _ { z }$ denotes a Dirac in $z$ )
185
+
186
+ which are supported on a finite uniform grid $\{ z _ { i } \} \in [ v _ { \operatorname* { m i n } } , v _ { \operatorname* { m a x } } ]$ , $z _ { i } < z _ { i + 1 }$ , $z _ { 1 } = v _ { \mathrm { m i n } }$ , $z _ { m } = v _ { \operatorname* { m a x } }$ . The coefficients $q _ { i } ( x , a )$ (discrete distribution) corresponds to the probabilities assigned to each atom $z _ { i }$ of the grid. From an observed $n$ -step sequence $\left\{ x _ { t } , a _ { t } , r _ { t } , x _ { t + 1 } , \ldots , x _ { t + n } \right\}$ , generated by behavior policy $\mu$ (i.e, $a _ { s } \sim \mu ( \cdot | x _ { s } )$ for $t \leq s < t + n )$ ), we build the $n$ -step backed-up $\left( { { x } _ { t } } , { { a } _ { t } } \right)$ The , is gi $n$ -step distributional Bellman target, whose expectation isn by: $\textstyle \sum _ { s = t } ^ { t + n - 1 } \gamma ^ { s - t } r _ { s } + \gamma ^ { n } Q ( x _ { t + n } , a )$
187
+
188
+ $$
189
+ \sum _ { i } q _ { i } ( x _ { t + n } , a ) \delta _ { z _ { i } ^ { n } } , \mathrm { w i t h } z _ { i } ^ { n } = \sum _ { s = t } ^ { t + n - 1 } \gamma ^ { s - t } r _ { s } + \gamma ^ { n } z _ { i } .
190
+ $$
191
+
192
+ Since this distribution is supported on the set of atoms $\left\{ z _ { i } ^ { n } \right\}$ , which is not necessarily aligned with the grid $\left\{ z _ { i } \right\}$ , we do a projection step and minimize the KL-loss between the projected target and the current estimate, just as with C51 except with a different target distribution (Bellemare et al., 2017).
193
+
194
+ Distributional Retrace: Now, the Retrace algorithm defined in (3) involves an off-policy correction which is not handled by the previous $n$ -step distributional Bellman backup. The key to extending this distributional back-up to off-policy learning is to rewrite the Retrace algorithm as a linear combination of $n$ -step Bellman backups, weighted by some coefficients $\alpha _ { n , a }$ . Indeed, notice that (3) rewrites as
195
+
196
+ $$
197
+ \Delta Q ( x _ { t } , a _ { t } ) = \sum _ { n \geq 1 } \sum _ { a \in \cal { A } } \alpha _ { n , a } \Big [ \underbrace { \sum _ { s = t } ^ { t + n - 1 } \gamma ^ { s - t } r _ { s } + \gamma ^ { n } Q ( x _ { t + n } , a ) } _ { n \cdot \mathrm { s t e p B e l l m a r k u p } } \Big ] - Q ( x _ { t } , a _ { t } ) ,
198
+ $$
199
+
200
+ where $\alpha _ { n , a } = \left( c _ { t + 1 } \ldots c _ { t + n - 1 } \right) \left( \pi ( a | x _ { t + n } ) - \mathbb { I } \{ a = a _ { t + n } \} c _ { t + n } \right)$ . These coefficients depend on the degree of off-policy-ness (between $\mu$ and $\pi$ ) along the trajectory. We have that $\begin{array} { r } { \sum _ { n \geq 1 } \sum _ { a } \alpha _ { n , a } = } \end{array}$ $\begin{array} { r } { \sum _ { n \geq 1 } \big ( c _ { t + 1 } \dots c _ { t + n - 1 } \big ) ( 1 - c _ { t + n } ) = 1 } \end{array}$ , but notice some coefficients may be negative. However, in expectation (over the behavior policy) they are non-negative. Indeed,
201
+
202
+ $$
203
+ \begin{array} { r c l } { \mathbb { E } _ { \mu } [ \alpha _ { n , a } ] } & { = } & { \mathbb { E } \Big [ \big ( c _ { t + 1 } \cdot . . c _ { t + n - 1 } \big ) \mathbb { E } _ { a _ { t + n } \sim \mu ( \cdot \vert x _ { t + n } ) } \big [ \pi ( a \vert x _ { t + n } ) - \mathbb { I } \{ a = a _ { t + n } \} c _ { t + n } \big \vert x _ { t + n } \big ] \Big ] } \\ & { = } & { \mathbb { E } \Big [ \big ( c _ { t + 1 } . . . c _ { t + n - 1 } \big ) \Big ( \pi ( a \vert x _ { t + n } ) - \mu ( a \vert x _ { t + n } ) \lambda \operatorname* { m i n } \big ( 1 , \frac { \pi ( a \vert x _ { t + n } ) } { \mu ( a \vert x _ { t + n } ) } \big ) \Big ) \Big ] \geq 0 , } \end{array}
204
+ $$
205
+
206
+ by definition of the $c _ { s }$ coefficients (4). Thus in expectation (over the behavior policy), the Retrace update can be seen as a convex combination of $n$ -step Bellman updates.
207
+
208
+ Then, the distributional Retrace algorithm can be defined as backing up a mixture of $n$ -step distributions. More precisely, we define the Retrace target distribution as:
209
+
210
+ $$
211
+ \sum _ { i = 1 } q _ { i } ^ { * } ( x _ { t } , a _ { t } ) \delta _ { z _ { i } } , \mathrm { ~ w i t h ~ } q _ { i } ^ { * } ( x _ { t } , a _ { t } ) = \sum _ { n \geq 1 } \sum _ { a } \alpha _ { n , a } \sum _ { j } q _ { j } ( x _ { t + n } , a _ { t + n } ) h _ { z _ { i } } ( z _ { j } ^ { n } ) ,
212
+ $$
213
+
214
+ where $h _ { z _ { i } } ( x )$ is a linear interpolation kernel, projecting onto the support $\left\{ z _ { i } \right\}$ :
215
+
216
+ $$
217
+ \iota _ { z _ { i } } ( x ) = \left\{ \begin{array} { l l } { ( x - z _ { i - 1 } ) / ( z _ { i } - z _ { i - 1 } ) , } & { \mathrm { ~ i f ~ } z _ { i - 1 } \leq x \leq z _ { i } \ \backslash } \\ { ( z _ { i + 1 } - x ) / ( z _ { i + 1 } - z _ { i } ) , } & { \mathrm { ~ i f ~ } z _ { i } \leq x \leq z _ { i + 1 } } \\ { 0 , } & { \mathrm { ~ i f ~ } x \leq z _ { i - 1 } \mathrm { ~ o r ~ } x \geq z _ { i + 1 } } \\ { 1 , } & { \mathrm { ~ i f ~ } ( x \leq v _ { \operatorname* { m i n } } \mathrm { ~ a n d ~ } z _ { i } = v _ { \operatorname* { m i n } } ) \mathrm { ~ o r ~ } ( x \geq v _ { \operatorname* { m a x } } \mathrm { ~ a n d ~ } z _ { i } = v _ { \operatorname* { m a x } } ) \enspace . } \end{array} \right.
218
+ $$
219
+
220
+ We update the current probabilities $q ( x _ { t } , a _ { t } )$ by performing a gradient step on the KL-loss
221
+
222
+ $$
223
+ \nabla \mathrm { K L } ( q ^ { * } ( x _ { t } , a _ { t } ) , q ( x _ { t } , a _ { t } ) ) = - \sum _ { i = 1 } q _ { i } ^ { * } ( x _ { t } , a _ { t } ) \nabla \log q _ { i } ( x _ { t } , a _ { t } ) .
224
+ $$
225
+
226
+ Again, notice that some target “probabilities” $q _ { i } ^ { * } ( x _ { t } , a _ { t } )$ may be negative for some sample trajectory, but in expectation they will be non-negative. Since the gradient of a KL-loss is linear w.r.t. its first argument, our update rule (12) provides an unbiased estimate of the gradient of the KL between the expected (over the behavior policy) Retrace target distribution and the current predicted distribution.1
227
+
228
+ Remark: The same method can be applied to other algorithms (such as $\mathrm { T B } ( \lambda )$ (Precup et al., 2000) and importance sampling (Precup et al., 2001)) in order to derive distributional versions of other off-policy multi-step RL algorithms.
229
+
230
+ # 3.3 PRIORITIZED SEQUENCE REPLAY
231
+
232
+ Prioritized experience replay has been shown to boost both statistical efficiency and final performance of deep RL agents (Schaul et al., 2016). However, as originally defined prioritized replay does not handle sequences of transitions and weights all unsampled transitions identically. In this section we present an alternative initialization strategy, called lazy initialization, and argue that it better encodes prior information about temporal difference errors. We then briefly describe our computationally efficient prioritized sequence sampling algorithm, with full details left to the appendix.
233
+
234
+ It is widely recognized that TD errors tend to be temporally correlated, indeed the need to break this temporal correlation has been one of the primary justifications for the use of experience replay (Mnih et al., 2015). Our proposed algorithm begins with this fundamental assumption.
235
+
236
+ Assumption 1. Temporal differences are temporally correlated, with correlation decaying on average with the time-difference between two transitions.
237
+
238
+ Prioritized experience replay adds new transitions to the replay buffer with a constant priority, but given the above assumption we can devise a better method. Specifically, we propose to add experience to the buffer with no priority, inserting a priority only after the transition has been sampled and used for training. Also, instead of sampling transitions, we assign priorities to all (overlapping) sequences of length $n$ . When sampling, sequences with an assigned priority are sampled proportionally to that priority. Sequences with no assigned priority are sampled proportionally to the average priority of assigned priority sequences within some local neighbourhood. Averages are weighted to compensate for sampling biases (i.e. more samples are made in areas of high estimated priorities, and in the absence of weighting this would lead to overestimation of unassigned priorities).
239
+
240
+ The lazy initialization scheme starts with priorities $p _ { t }$ corresponding to the sequences $\{ x _ { t } , a _ { t } , \ldots , x _ { t + n } \}$ for which a priority was already assigned. Then it extrapolates a priority of all other sequences in the following way. Let us define a partition $( I _ { i } ) _ { i }$ of the states ordered by increasing time such that each cell $I _ { i }$ contains exactly one state $s _ { i }$ with already assigned priority. We define the estimated priority $\hat { p } _ { t }$ to all other sequences as $\begin{array} { r } { \hat { p } _ { t } = \sum _ { s _ { i } \in J ( t ) } \frac { w _ { i } } { \sum _ { i ^ { \prime } \in J ( t ) } w _ { i ^ { \prime } } } p \big ( s _ { i } \big ) } \end{array}$ , where $J ( t )$ is a collection of contiguous cells $( I _ { i } )$ containing time $t$ , and $w _ { i } = | I _ { i } |$ is the length of the cell $I _ { i }$ containing $s _ { i }$ . For already defined priorities denote $\hat { p } _ { t } = p _ { t }$ . Cell sizes work as estimates of inverse local density and are used as importance weights for priority estimation. 2 For the algorithm to be unbiased, partition $( I _ { i } ) _ { i }$ must not be a function of the assigned priorities. So far we have defined a class of algorithms all free to choose the partition $( I _ { i } )$ and the collection of cells $I ( t )$ , as long that they satisfy the above constraints. Figure 4 in the Appendix illustrates the above description.
241
+
242
+ Now, with probability $\epsilon$ we sample uniformly at random, and with probability $1 - \epsilon$ we sample proportionally to $\hat { p } _ { t }$ . We implemented an algorithm satisfying the above constraints and called it Contextual Priority Tree (CPT). It is based on AVL trees (Velskii & Landis, 1976) and can execute sampling, insertion, deletion and density evaluation in $O ( \ln ( n ) )$ time. We describe CPT in detail in the Appendix in Section 6.3.
243
+
244
+ We treated prioritization as purely a variance reduction technique. Importance-sampling weights were evaluated as in prioritized experience replay, with fixed $\beta = 1$ in (2). We used simple gradient magnitude estimates as priorities, corresponding to a mean absolute TD error along a sequence for Retrace, as defined in (3) for the classical RL case, and total variation in the distributional Retrace case.3
245
+
246
+ # 3.4 AGENT ARCHITECTURE
247
+
248
+ In order to improve CPU utilization we decoupled acting from learning. This is an important aspect of our architecture: an acting thread receives observations, submits actions to the environment, and stores transitions in memory, while a learning thread re-samples sequences of experiences from memory and trains on them (Figure 2, left). We typically execute 4-6 acting steps per each learning step. We sample sequences of length $n = 3 3$ in batches of 4. A moving network is unrolled over frames 1-32 while the target network is unrolled over frames 2-33.
249
+
250
+ ![](images/0ce520556c54ebb022fbaedde6bd31f7b0e36ebca5afaf8af6063d5062720b85.jpg)
251
+ Figure 2: (Left) The model of parallelism of DQN, A3C and Reactor architectures. Each row represents a separate thread. In Reactor’s case, each worker, consiting of a learner and an actor is run on a separate worker machine. (Right) Comparison of training times and resources for various algorithms. $5 0 0 \mathrm { m }$ denotes 500 million training frames; otherwise $2 0 0 \mathrm { m }$ training frames were used.
252
+
253
+ We allow the agent to be distributed over multiple machines each containing action-learner pairs. Each worker downloads the newest network parameters before each learning step and sends delta-updates at the end of it. Both the network and target network are stored on a shared parameter server while each machine contains its own local replay memory. Training is done by downloading a shared network, evaluating local gradients and sending them to be applied on the shared network. While the agent can also be trained on a single machine, in this work we present results of training obtained with either 10 or 20 actor-learner workers and one parameter server. In Figure 2 (right) we compare resources and runtimes of Reactor with related algorithms.4
254
+
255
+ # 3.4.1 NETWORK ARCHITECTURE
256
+
257
+ In some domains, such as Atari, it is useful to base decisions on a short history of past observations. The two techniques generally used to achieve this are frame stacking and recurrent network architectures. We chose the latter over the former for reasons of implementation simplicity and computational efficiency. As the Retrace algorithm requires evaluating action-values over contiguous sequences of trajectories, using a recurrent architecture allowed each frame to be processed by the convolutional network only once, as opposed to $n$ times times if $n$ frame concatenations were used.
258
+
259
+ The Reactor architecture uses a recurrent neural network which takes an observation $x _ { t }$ as input and produces two outputs: categorical action-value distributions $q _ { i } ( x _ { t } , a )$ ( $i$ here is a bin identifier), and policy probabilities $\pi ( \boldsymbol { a } | \boldsymbol { x } _ { t } )$ . We use an architecture inspired by the duelling network architecture (Wang et al., 2015). We split action-value -distribution logits into state-value logits and advantage logits, which in turn are connected to the same LSTM network (Hochreiter & Schmidhuber, 1997). Final action-value logits are produced by summing state- and action-specific logits, as in Wang et al. (2015). Finally, a softmax layer on top for each action produces the distributions over discounted future returns.
260
+
261
+ The policy head uses a softmax layer mixed with a fixed uniform distribution over actions, where this mixing ratio is a hyperparameter (Wiering, 1999, Section 5.1.3). Policy and Q-networks have separate LSTMs. Both LSTMs are connected to a shared linear layer which is connected to a shared convolutional neural network (Krizhevsky et al., 2012). The precise network specification is given in Table 3 in the Appendix.
262
+
263
+ Gradients coming from the policy LSTM are blocked and only gradients originating from the Qnetwork LSTM are allowed to back-propagate into the convolutional neural network. We block gradients from the policy head for increased stability, as this avoids positive feedback loops between $\pi$ and $q _ { i }$ caused by shared representations. We used the Adam optimiser (Kingma & Ba, 2014), with a learning rate of $5 \times 1 0 ^ { - 5 }$ and zero momentum because asynchronous updates induce implicit momentum (Mitliagkas et al., 2016). Further discussion of hyperparameters and their optimization can be found in Appendix 6.1.
264
+
265
+ ![](images/2dda7550f95f87e0de6110502915b8ab6cb71151a77387ed141c9c215232ad50.jpg)
266
+ Figure 3: (Left) Reactor performance as various components are removed. (Right) Performance comparison as a function of training time in hours. Rainbow learning curve provided by Hessel et al. (2017).
267
+
268
+ # 4 EXPERIMENTAL RESULTS
269
+
270
+ We trained and evaluated Reactor on 57 Atari games (Bellemare et al., 2013). Figure 3 compares the performance of Reactor with different versions of Reactor each time leaving one of the algorithmic improvements out. We can see that each of the algorithmic improvements (Distributional retrace, betaLOO and prioritized replay) contributed to the final results. While prioritization was arguably the most important component, Beta-LOO clearly outperformed TISLR algorithm. Although distributional and non-distributional versions performed similarly in terms of median human normalized scores, distributional version of the algorithm generalized better when tested with random human starts (Table 1).
271
+
272
+ Table 1: Random human starts
273
+
274
+ <table><tr><td rowspan=1 colspan=1>ALGORITHM</td><td rowspan=1 colspan=1>NORMALIZEDSCORES</td><td rowspan=1 colspan=1>MEANRANK</td><td rowspan=1 colspan=1>ELO</td></tr><tr><td rowspan=12 colspan=1>RANDOMHUMANDQNDDQNDUELPRIORPRIOR.DUEL.A3CLSTMRAINBOWREACTOR ND 5REACTORREACTOR500M</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>11.65</td><td rowspan=1 colspan=1>-563</td></tr><tr><td rowspan=1 colspan=1>1.00</td><td rowspan=1 colspan=1>6.82</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>0.69</td><td rowspan=1 colspan=1>9.05</td><td rowspan=2 colspan=1>-172-58</td></tr><tr><td rowspan=1 colspan=1>1.11</td><td rowspan=1 colspan=1>7.63</td></tr><tr><td rowspan=1 colspan=1>1.17</td><td rowspan=1 colspan=1>6.35</td><td rowspan=1 colspan=1>32</td></tr><tr><td rowspan=1 colspan=1>1.13</td><td rowspan=1 colspan=1>6.63</td><td rowspan=1 colspan=1>13</td></tr><tr><td rowspan=1 colspan=1>1.15</td><td rowspan=1 colspan=1>6.25</td><td rowspan=1 colspan=1>40</td></tr><tr><td rowspan=1 colspan=1>1.13</td><td rowspan=1 colspan=1>6.30</td><td rowspan=1 colspan=1>37</td></tr><tr><td rowspan=1 colspan=1>1.53</td><td rowspan=1 colspan=1>4.18</td><td rowspan=1 colspan=1>186</td></tr><tr><td rowspan=1 colspan=1>1.51</td><td rowspan=1 colspan=1>4.98</td><td rowspan=1 colspan=1>126</td></tr><tr><td rowspan=1 colspan=1>1.65</td><td rowspan=1 colspan=1>4.58</td><td rowspan=1 colspan=1>156</td></tr><tr><td rowspan=1 colspan=1>1.82</td><td rowspan=1 colspan=1>3.65</td><td rowspan=1 colspan=1>227</td></tr></table>
275
+
276
+ Table 2: 30 random no-op starts.
277
+
278
+ <table><tr><td rowspan=1 colspan=1>ALGORITHM</td><td rowspan=1 colspan=1>NORMALIZEDSCORES</td><td rowspan=1 colspan=1>MEANRANK</td><td rowspan=1 colspan=1>ELO</td></tr><tr><td rowspan=12 colspan=1>RANDOMHUMANDQNDDQNDUELPRIORPRIOR.DUEL.ACER500MRAINBOWREACTOR ND 5REACTORREACTOR500M</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>10.93</td><td rowspan=4 colspan=1>-6730-167-27</td></tr><tr><td rowspan=1 colspan=1>1.00</td><td rowspan=1 colspan=1>6.89</td></tr><tr><td rowspan=1 colspan=1>0.79</td><td rowspan=1 colspan=1>8.65</td></tr><tr><td rowspan=1 colspan=1>1.18</td><td rowspan=1 colspan=1>7.28</td></tr><tr><td rowspan=1 colspan=1>1.51</td><td rowspan=1 colspan=1>5.19</td><td rowspan=1 colspan=1>143</td></tr><tr><td rowspan=1 colspan=1>1.24</td><td rowspan=1 colspan=1>6.11</td><td rowspan=1 colspan=1>70</td></tr><tr><td rowspan=1 colspan=1>1.72</td><td rowspan=1 colspan=1>5.44</td><td rowspan=1 colspan=1>126</td></tr><tr><td rowspan=1 colspan=1>1.9</td><td rowspan=1 colspan=1>、</td><td rowspan=1 colspan=1>=</td></tr><tr><td rowspan=1 colspan=1>2.31</td><td rowspan=1 colspan=1>3.63</td><td rowspan=1 colspan=1>270</td></tr><tr><td rowspan=1 colspan=1>1.80</td><td rowspan=1 colspan=1>4.53</td><td rowspan=1 colspan=1>195</td></tr><tr><td rowspan=1 colspan=1>1.87</td><td rowspan=1 colspan=1>4.46</td><td rowspan=1 colspan=1>196</td></tr><tr><td rowspan=1 colspan=1>2.30</td><td rowspan=1 colspan=1>3.47</td><td rowspan=1 colspan=1>280</td></tr></table>
279
+
280
+ # 4.1 COMPARING TO PRIOR WORK
281
+
282
+ We evaluated Reactor with target update frequency $T _ { u p d a t e } = 1 0 0 0$ , $\lambda = 1 . 0$ and $\beta$ -LOO with $\beta = 1$ on 57 Atari games trained on 10 machines in parallel. We averaged scores over 200 episodes using 30 random human starts and noop starts (Tables 4 and 5 in the Appendix). We calculated mean and median human normalised scores across all games. We also ranked all algorithms (including random and human scores) for each game and evaluated mean rank of each algorithm across all 57 Atari games. We also evaluated mean Rank and Elo scores for each algorithm for both human and noop start settings. Please refer to Section 6.2 in the Appendix for more details.
283
+
284
+ Tables 1 & 2 compare versions of our algorithm,5 with several other state-of-art algorithms across 57 Atari games for a fixed random seed across all games (Bellemare et al., 2013). We compare Reactor against are: DQN (Mnih et al., 2015), Double DQN (Van Hasselt et al., 2016), DQN with prioritised experience replay (Schaul et al., 2015), dueling architecture and prioritised dueling (Wang et al., 2015), ACER (Wang et al., 2017), A3C (Mnih et al., 2016), and Rainbow (Hessel et al., 2017). Each algorithm was exposed to 200 million frames of experience, or 500 million frames when followed by 500M, and the same pre-processing pipeline including 4 action repeats was used as in the original DQN paper (Mnih et al., 2015).
285
+
286
+ In Table 1, we see that Reactor exceeds the performance of all algorithms across all metrics, despite requiring under two days of training. With 500 million frames and four days training we see Reactor’s performance continue to improve significantly. The difference in time-efficiency is especially apparent when comparing Reactor and Rainbow (see Figure 3, right). Additionally, unlike Rainbow, Reactor does not use Noisy Networks (Fortunato et al., 2017), which was reported to have contributed to the performance gains. When evaluating under the no-op starts regime (Table 2), Reactor out performs all methods except for Rainbow. This suggests that Rainbow is more sample-efficient when training and evaluation regimes match exactly, but may be overfitting to particular trajectories due to the significant drop in performance when evaluated on the random human starts.
287
+
288
+ Regarding ACER, another Retrace-based actor-critic architecture, both classical and distributional versions of Reactor (Figure 3) exceeded the best reported median human normalized score of 1.9 with noop starts achieved in 500 million steps.6
289
+
290
+ # 5 CONCLUSION
291
+
292
+ In this work we presented a new off-policy agent based on Retrace actor-critic architecture and show that it achieves similar performance as the current state-of-the-art while giving significant real-time performance gains. We demonstrate the benefits of each of the suggested algorithmic improvements, including Distributional Retrace, beta-LOO policy gradient and contextual priority tree.
293
+
294
+ # REFERENCES
295
+
296
+ Oron Anschel, Nir Baram, and Nahum Shimkin. Averaged-dqn: Variance reduction and stabilization for deep reinforcement learning. In International Conference on Machine Learning, pp. 176–185, 2017.
297
+
298
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. J. Artif. Intell. Res.(JAIR), 47:253–279, 2013.
299
+
300
+ Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. arXiv preprint arXiv:1707.06887, 2017.
301
+
302
+ Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295, 2017.
303
+
304
+ Shixiang Gu, Timothy Lillicrap, Zoubin Ghahramani, Richard E Turner, and Sergey Levine. Q-prop: Sample-efficient policy gradient with an off-policy critic. International Conference on Learning Representations, 2017.
305
+
306
+ Frank S He, Yang Liu, Alexander G Schwing, and Jian Peng. Learning to play in a day: Faster deep reinforcement learning by optimality tightening. In International Conference on Learning Representations, 2017.
307
+
308
+ Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. arXiv preprint arXiv:1710.02298, 2017.
309
+
310
+ Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997.
311
+
312
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
313
+
314
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
315
+
316
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
317
+
318
+ Long-H Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine learning, 8(3/4):69–97, 1992.
319
+
320
+ Ioannis Mitliagkas, Ce Zhang, Stefan Hadjis, and Christopher Ré. Asynchrony begets momentum, with an application to deep learning. In Communication, Control, and Computing (Allerton), 2016 54th Annual Allerton Conference on, pp. 997–1004. IEEE, 2016.
321
+
322
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
323
+
324
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 2016.
325
+
326
+ Andrew W Moore and Christopher G Atkeson. Prioritized sweeping: Reinforcement learning with less data and less time. Machine learning, 13(1):103–130, 1993.
327
+
328
+ Rémi Munos, Tom Stepleton, Anna Harutyunyan, and Marc Bellemare. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1046–1054, 2016.
329
+
330
+ Brendan O’Donoghue, Remi Munos, Koray Kavukcuoglu, and Volodymyr Mnih. Combining policy gradient and q-learning. International Conference on Learning Representations, 2017.
331
+
332
+ Doina Precup, Richard S Sutton, and Satinder Singh. Eligibility traces for off-policy policy evaluation. In Proceedings of the Seventeenth International Conference on Machine Learning, 2000.
333
+
334
+ Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning with function approximation. In Proceedings of the 18th International Conference on Machine Laerning, pp. 417–424, 2001.
335
+
336
+ Martin Riedmiller. Neural fitted q iteration-first experiences with a data efficient neural reinforcement learning method. In ECML, volume 3720, pp. 317–328. Springer, 2005.
337
+
338
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
339
+
340
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. In International Conference on Learning Representations, 2016.
341
+
342
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1889–1897, 2015.
343
+
344
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
345
+
346
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
347
+
348
+ David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, Yutian Chen, Timothy Lillicrap, Fan Hui, Laurent Sifre, George van den Driessche, Thore Graepel, and Demis Hassabis. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 10 2017. URL http: //dx.doi.org/10.1038/nature24270.
349
+
350
+ Richard S. Sutton, David Mcallester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In In Advances in Neural Information Processing Systems 12, pp. 1057–1063. MIT Press, 2000.
351
+
352
+ Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In AAAI, pp. 2094–2100, 2016.
353
+
354
+ Adel’son G Velskii and E Landis. An algorithm for the organisation of information. Dokl. Akad. Nauk SSSR, 146:263–266, 1976.
355
+
356
+ Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. arXiv preprint arXiv:1703.01161, 2017.
357
+
358
+ Ziyu Wang, Tom Schaul, Matteo Hessel, Hado van Hasselt, Marc Lanctot, and Nando de Freitas. Dueling network architectures for deep reinforcement learning. International Conference on Machine Learning, pp. 1995–2003, 2015.
359
+
360
+ Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and Nando de Freitas. Sample efficient actor-critic with experience replay. In International Conference on Learning Representations, 2017.
361
+
362
+ C. J. C. H. Watkins and P. Dayan. Q-learning. Machine Learning, 8(3):272–292, 1992.
363
+
364
+ Marco A Wiering. Explorations in efficient reinforcement learning. PhD thesis, University of Amsterdam, 1999.
365
+
366
+ Dongbin Zhao, Haitao Wang, Kun Shao, and Yuanheng Zhu. Deep reinforcement learning with experience replay based on sarsa. In Computational Intelligence (SSCI), 2016 IEEE Symposium Series on, pp. 1–6. IEEE, 2016.
367
+
368
+ # 6 APPENDIX
369
+
370
+ Proposition 1. Assume $\hat { a } \sim \mu$ and that $\mathbb { E } [ R ( { \hat { a } } ) ] = Q ^ { \pi } ( { \hat { a } } )$ . Then, the bias of $G _ { \beta - L O O }$ is $| \sum a ^ { ( 1 - }$ $\mu ( a ) \beta ( a ) ) \nabla \pi ( a ) [ Q ( a ) - Q ^ { \pi } ( a ) ] \big |$ .
371
+
372
+ Proof. The bias of $\hat { G } _ { \beta - \mathrm { L O O } }$ is
373
+
374
+ $$
375
+ \begin{array} { r c l } { \mathbb { E } [ \hat { G } _ { \beta \cdot \mathrm { L o o } } ] - G } & { = } & { \displaystyle \sum _ { a } \mu ( a ) [ \beta ( a ) ( \mathbb { E } [ R ( a ) ] - Q ( a ) ) ] \nabla \pi ( a ) + \sum _ { a } Q ( a ) \nabla \pi ( a ) - G } \\ & { = } & { \displaystyle \sum _ { a } ( 1 - \mu ( a ) \beta ( a ) ) [ Q ( a ) - Q ^ { \pi } ( a ) ] \nabla \pi ( a ) } \end{array}
376
+ $$
377
+
378
+ # 6.1 HYPERPARAMETER OPTIMIZATION
379
+
380
+ As we believe that algorithms should be robust with respect to the choice of hyperparameters, we spent little effort on parameter optimization. In total, we explored three distinct values of learning rates and two values of ADAM momentum (the default and zero) and two values of $T _ { u p d a t e }$ on a subset of 7 Atari games without prioritization using non-distributional version of Reactor. We later used those values for all experiments. We did not optimize for batch sizes and sequence length or any prioritization hyperparamters.
381
+
382
+ # 6.2 RANK AND ELO EVALUATION
383
+
384
+ Commonly used mean and median human normalized scores have several disadvantages. A mean human normalized score implicitly puts more weight on games that computers are good and humans are bad at. Comparing algorithm by a mean human normalized score across 57 Atari games is almost equivalent to comparing algorithms on a small subset of games close to the median and thus dominating the signal. Typically a set of ten most score-generous games, namely Assault, Asterix, Breakout, Demon Attack, Double Dunk, Gopher, Pheonix, Stargunner, Up’n Down and Video Pinball can explain more than half of inter-algorithm variance. A median human normalized score has the opposite disadvantage by effectively discarding very easy and very hard games from the comparison. As typical median human normalized scores are within the range of 1-2.5, an algorithm which scores zero points on Montezuma’s Revenge is evaluated equal to the one which scores 2500 points, as both performance levels are still below human performance making incremental improvements on hard games not being reflected in the overall evaluation. In order to address both problem, we also evaluated mean rank and Elo metrics for inter-algorithm comparison. Those metrics implicitly assign the same weight to each game, and as a result is more sensitive of relative performance on very hard and easy games: swapping scores of two algorithms on any game would result in the change of both mean rank and Elo metrics.
385
+
386
+ We calculated separate mean rank and Elo scores for each algorithm using results of test evaluations with 30 random noop-starts and 30 random human starts (Tables 5 and 4). All algorithms were ranked across each game separately, and a mean rank was evaluated across 57 Atari games. For Elo score evaluation algorithm, $A$ was considered to win over algorithm $B$ if it obtained more scores on a given Atari. We produced an empirical win-probability matrix by summing wins across all games and used this matrix to evaluate Elo scores. A ranking difference of 400 corresponds to the odds of winning of 10:1 under the Gaussian assumption.
387
+
388
+ # 6.3 CONTEXTUAL PRIORITY TREE
389
+
390
+ Contextual priority tree is one possible implementation of lazy prioritization (Figure 4). All sequence keys are put into a balanced binary search tree which maintains a temporal order. An AVL tree (Velskii & Landis (1976)) was chosen due to the ease of implementation and because it is on average more evenly balanced than a Red-Black Tree.
391
+
392
+ Each tree node has up to two children (left and right) and contains currently stored key and a priority of the key which is either set or is unknown. Some trees may only have a single child subtree while some may have none. In addition to this information, we were tracking other summary statistics at each node which was re-evaluated after each tree rotation. The summary statistics was evaluated by consuming previously evaluated summary statistics of both children and a priority of the key stored within the current node. In particular, we were tracking a total number of nodes within each subtree and mean-priority estimates updated according to rules shown in Figure 5. The total number of nodes within each subtree was always known $\dot { c }$ in Figure 5), while mean priority estimates per key ( $m$ in Figure 5) could either be known or unknown.
393
+
394
+ ![](images/e3a848f079b9cef52db12df5c956af3c4295e7c24e2ac14c15e4261e8c9e189a.jpg)
395
+ Figure 4: Illustration of Lazy prioritization, where sequences with no explicitly assigned priorities get priorities estimated by a linear combination of nearby assigned priorities. Exact boundaries of blue and red intervals are arbitrary (as long as all conditions described in Section 3.3 are satisfied) thus leading to many possible algorithms. Each square represents an individual sequence of size 32 (sequences overlap). Inverse sizes of blue regions work as local density estimates allowing to produce unbiased priority estimates.
396
+
397
+ ![](images/1643bc419674d679a0e4553f04f352ea27ace576103fbcdec49448295c4749c5.jpg)
398
+ Figure 5: Rules used to evaluate summary statistics on each node of a binary search tree where all sequence keys are kept sorted by temporal order. $c _ { l }$ and $c _ { r }$ are total number of nodes within left and right subtrees. $m _ { l }$ and $m _ { l }$ are estimated mean priorities per node within the subtree. A central square node corresponds to a single key stored within the parent node with its corresponding priority of $p$ (if set) or ? if not set. Red subtrees do not have any singe child with a set priority, and a result do not have priority estimates. A red square shows that priority of the key stored within the parent node is not known. Unknown mean priorities is marked by a question mark. Empty child nodes simply behave as if $c = 0$ with $p = \mathrm { ? }$ . Rules a-f illustrate how mean values are propagated down from children to parents when priorities are only partially known (rules d and e also apply symmetrically). Sampling is done by going from the root node up the tree by selecting one of the children (or the current key) stochastically proportional to orange proportions. Sampling terminates once the current (square) key is chosen.
399
+
400
+ ![](images/a46875030b481043e2819ab223cda649f83962aceea9ea0f0ddca60f1b58da04.jpg)
401
+ Figure 6: Example of a balanced priority tree. Dark blue nodes contain keys with known priorities, light blue nodes have at least one child with at least a single known priority, while ping nodes do not have any priority estimates. Nodes 1, 2 and 3 will obtain priority estimates equal to $\mathrm { { \dot { 2 } / 3 } }$ of the priority of key 5 and $1 / 3$ of the priority of node 4. This implies that estimated priorities of keys 1, 2 and 3 are implicitly defined by keys 4 and 6. Nodes 8, 9 and 11 are estimated to have the same priority as node 10.
402
+
403
+ If a mean priority of either one child subtree or a key stored within the current node is unknown then it can be estimated to by exploiting information coming from another sibling subtree or a priority stored within the parent node.
404
+
405
+ Sampling was done by traversing the tree from the root node up while sampling either one of the children subtrees or the currently held key proportionally to the total estimated priority masses contained within. The rules used to evaluate proportions are shown in orange in Figure 5. Similarly, probabilities of arbitrary keys can be queried by traversing the tree from the root node towards the child node of an interest while maintaining a product of probabilities at each branching point. Insertion, deletion, sampling and probability query operations can be done in $\mathrm { O } ( \mathrm { l n ( n ) } )$ time.
406
+
407
+ The suggested algorithm has the desired property that it becomes a simple proportional sampling algorithm once all the priorities are known. While some key priorities are unknown, they are estimated by using nearby known key priorities (Figure 6).
408
+
409
+ Each time when a new sequence key is added to the tree, it was set to have an unknown priority. Any priority was assigned only after the key got first sampled and the corresponding sequence got passed through the learner. When a priority of a key is set or updated, the key node is deliberately removed from and placed back to the tree in order to become a leaf-node. This helped to set priorities of nodes in the immediate vicinity more accurately by using the freshest information available.
410
+
411
+ # 6.4 NETWORK ARCHITECTURE
412
+
413
+ The value of $\epsilon = 0 . 0 1$ is the minimum probability of choosing a random action and it is hard-coded into the policy network. Figure 7 shows the overall network topology while Table 3 specifies network layer sizes.
414
+
415
+ ![](images/36031433bfe784d7e5ee0597ac8ed58728967791ff3d626a7db4865e5d04afcc.jpg)
416
+ Figure 7: Network architecture.
417
+
418
+ Table 3: Specification of the neural network used (illustrated in Figure 7)
419
+
420
+ <table><tr><td rowspan=1 colspan=1>LAYER</td><td rowspan=1 colspan=1>INPUTSIZE</td><td rowspan=1 colspan=3>PARAMETERS</td></tr><tr><td rowspan=1 colspan=1>CONVOLUTIONAL</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>KERNELWIDTH</td><td rowspan=1 colspan=1>OUTPUTCHANNELS</td><td rowspan=1 colspan=1>STRIDES</td></tr><tr><td rowspan=1 colspan=1>CoNV1CONCATRELUCONV 2CONCATRELUCONV 3CONCATRELU</td><td rowspan=1 colspan=1>[84,84,1][20,20,16][20,20,32][9,9,32][9,9, 64][7, 7, 32]</td><td rowspan=1 colspan=1>[8,8][4,4][3,3]</td><td rowspan=1 colspan=1>163232</td><td rowspan=1 colspan=1>421</td></tr><tr><td rowspan=1 colspan=1>FULLYCONNECTED</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>OUTPUT SIZE</td></tr><tr><td rowspan=1 colspan=1>LINEARCONCATRELU</td><td rowspan=1 colspan=1>[7, 7, 64][128]</td><td rowspan=1 colspan=3>128</td></tr><tr><td rowspan=1 colspan=1>RECURRENTT</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>OUTPUT SIZE</td></tr><tr><td rowspan=1 colspan=1>LSTMLINEARCONCATRELULINEARSOFTMAXX(1-e)+E/#ACTIONS</td><td rowspan=1 colspan=1>[256][128][32][64][#ACTIONS][#ACTIONS]</td><td rowspan=1 colspan=3>12832#ACTIONS#ACTIONS#ACTIONS</td></tr><tr><td rowspan=1 colspan=1>RECURRENTQ</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>OUTPUT SIZE</td></tr><tr><td rowspan=1 colspan=1>LSTM</td><td rowspan=1 colspan=1>[256]</td><td rowspan=1 colspan=3>128</td></tr><tr><td rowspan=1 colspan=1>VALUELOGITHEAD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>OUTPUT SIZE</td></tr><tr><td rowspan=1 colspan=1>LINEARCONCATRELULINEAR</td><td rowspan=1 colspan=1>[128][32][64]</td><td rowspan=1 colspan=3>32#BINS</td></tr><tr><td rowspan=1 colspan=1>ADVANTAGELOGIT HEAD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>#ACTIONS× #BINS</td></tr><tr><td rowspan=1 colspan=1>LINEARCONCATRELU</td><td rowspan=1 colspan=1>[128][32]</td><td rowspan=1 colspan=3>32</td></tr></table>
421
+
422
+ # 6.5 COMPARISONS WITH RAINBOW
423
+
424
+ In this section we compare Reactor with the recently published Rainbow agent (Hessel et al., 2017). While ACER is the most closely related algorithmically, Rainbow is most closely related in terms of performance and thus a deeper understanding of the trade-offs between Rainbow and Reactor may benefit interested readers. There are many architectural and algorithmic differences between Rainbow and Reactor. We will therefore begin by highlighting where they agree. Both use a categorical action-value distribution critic (Bellemare et al., 2017), factored into state and state-action logits (Wang et al., 2015),
425
+
426
+ $$
427
+ q _ { i } ( x , a ) = \frac { l _ { i } ( x , a ) } { \sum _ { j } l _ { j } ( x , a ) } , \quad l _ { i } ( x , a ) = l _ { i } ( x ) + l _ { i } ( x , a ) - \frac { 1 } { | \mathcal { A } | } \sum _ { b \in \mathcal { A } } l _ { i } ( x , b ) .
428
+ $$
429
+
430
+ Both use prioritized replay, and finally, both perform $n$ -step Bellman updates.
431
+
432
+ Despite these similarities, Reactor and Rainbow are fundamentally different algorithms and are based upon different lines of research. While Rainbow uses Q-Learning and is based upon DQN (Mnih et al., 2015), Reactor is an actor-critic algorithm most closely based upon A3C (Mnih et al., 2016). Each inherits some design choices from their predecessors, and we have not performed an extensive ablation comparing these various differences. Instead, we will discuss four of the differences we believe are important but less obvious.
433
+
434
+ First, the network structures are substantially different. Rainbow uses noisy linear layers and ReLU activations throughout the network, whereas Reactor uses standard linear layers and concatenated ReLU activations throughout. To overcome partial observability, Rainbow, inheriting this choice from DQN, uses frame stacking. On the other hand, Reactor, inheriting its choice from A3C, uses LSTMs after the convolutional layers of the network. It is also difficult to directly compare the number of parameters in each network because the use of noisy linear layers doubles the number of parameters, although half of these are used to control noise, while the LSTM units in Reactor require more parameters than a corresponding linear layer would.
435
+
436
+ Second, both algorithms perform $n$ -step updates, however, the Rainbow $n$ -step update does not use any form of off-policy correction. Because of this, Rainbow is restricted to using only small values of $n$ (e.g. $n = 3$ ) because larger values would make sequences more off-policy and hurt performance. By comparison, Reactor uses our proposed distributional Retrace algorithm for off-policy correction of $n$ -step updates. This allows the use of larger values of $n$ (e.g. $n = 3 3$ ) without loss of performance.
437
+
438
+ Third, while both agents use prioritized replay buffers (Schaul et al., 2016), they each store different informaction and prio, sum of ize using different algdiscounted rewards a tuple contai, product of ng the state discount fa $x _ { t - 1 }$ $a _ { t - 1 }$ $n$ $\begin{array} { r } { \sum _ { k = 0 } ^ { n - 1 } r _ { t + k } \prod _ { m = 0 } ^ { k - 1 } \gamma _ { t + m } } \end{array}$ $n$ $\textstyle \prod _ { k = 0 } ^ { n - 1 } \gamma _ { t + k }$ , and next-state $x _ { t + n - 1 }$ . Tuples are prioritized based upon the last observed TD error, and inserted into replay with a maximum priority. Reactor stores length $n$ sequences of tuples $( x _ { t - 1 } , a _ { t - 1 } , r _ { t } , \gamma _ { t } )$ and also prioritizes based upon the observed TD error. However, when inserted into the buffer the priority is instead inferred based upon the known priorities of neighboring sequences. This priority inference was made efficient using the previously introduced contextual priority tree, and anecdotally we have seen it improve performance over a simple maximum priority approach.
439
+
440
+ Finally, the two algorithms have different approaches to exploration. Rainbow, unlike DQN, does not use $\epsilon$ -greedy exploration, but instead replaces all linear layers with noisy linear layers which induce randomness throughout the network. This method, called Noisy Networks (Fortunato et al., 2017), creates an adaptive exploration integrated into the agent’s network. Reactor does not use noisy networks, but instead uses the same entropy cost method used by A3C and many others (Mnih et al., 2016), which penalizes deterministic policies thus encouraging indifference between similarly valued actions. Because Rainbow can essentially learn not to explore, it may learn to become entirely greedy in the early parts of the episode, while still exploring in states not as frequently seen. In some sense, this is precisely what we want from an exploration technique, but it may also lead to highly deterministic trajectories in the early part of the episode and an increase in overfitting to those trajectories. We hypothesize that this may be the explanation for the significant difference in Rainbow’s performance between evaluation under no-op and random human starts, and why Reactor does not show such a large difference.
441
+
442
+ # 6.6 ATARI RESULTS
443
+
444
+ Table 4: Scores for each game evaluated with 30 random human starts. Reactor was evaluated by averaging scores over 200 episodes. All scores (except for Reactor) were taken from Wang et al. (2015), Mnih et al. (2016) and Hessel et al. (2017).
445
+
446
+ <table><tr><td>GAME AGENT</td><td>RANDOM</td><td>HUMAN</td><td>DQN</td><td>DDQN</td><td>DUEL</td><td>PRIOR</td><td>PRIOR. DUEL.</td><td>A3C LSTM</td><td>RAINBOW</td><td>REACTOR ND5</td><td>REACTOR</td><td>REACTOR 500M</td></tr><tr><td>ALIEN</td><td>128.3</td><td>6371.3</td><td>634.0</td><td>1033.4</td><td>1486.5</td><td>1334.7</td><td>823.7</td><td>945.3</td><td>6022.9</td><td>924.1</td><td>2763.9</td><td>4958.6</td></tr><tr><td>AMIDAR</td><td>11.8</td><td>1540.4</td><td>178.4</td><td>169.1</td><td>172.7</td><td>129.1</td><td>238.4</td><td>173.0</td><td>202.8</td><td>174.8</td><td>423.0</td><td>503.2</td></tr><tr><td>ASSAULT</td><td>166.9</td><td>628.9</td><td>3489.3</td><td>6060.8</td><td>3994.8</td><td>6548.9</td><td>10950.6</td><td>14497.9</td><td>14491.7</td><td>15041.2</td><td>9994.2</td><td>6713.8</td></tr><tr><td>ASTERIX</td><td>164.5</td><td>7536.0</td><td>3170.5</td><td>16837.0</td><td>15840.0</td><td>22484.5</td><td>364200.0</td><td>17244.5</td><td>280114.0</td><td>7269.8</td><td>26240.8</td><td>191948.0</td></tr><tr><td>ASTEROIDS</td><td>871.3</td><td>36517.3</td><td>1458.7</td><td>1193.2</td><td>2035.4</td><td>1745.1</td><td>1021.9</td><td>5093.1</td><td>2249.4</td><td>3764.4</td><td>2771.3</td><td>4215.0</td></tr><tr><td>ATLANTIS</td><td>13463.0</td><td>26575.0</td><td>292491.0</td><td>319688.0</td><td>445360.0</td><td>330647.0</td><td>423252.0</td><td>875822.0</td><td>814684.0</td><td>897803.5</td><td>280809.5</td><td>274196.0</td></tr><tr><td>BANK HEIST</td><td>21.7</td><td>644.5</td><td>312.7</td><td>886.0</td><td>1129.3</td><td>876.6</td><td>1004.6</td><td>932.8</td><td>826.0</td><td>852.8</td><td>710.1</td><td>876.0</td></tr><tr><td>BATTLEZONE</td><td>3560.0</td><td>33030.0</td><td>23750.0</td><td>24740.0</td><td>31320.0</td><td>25520.0</td><td>30650.0</td><td>20760.0</td><td>52040.0</td><td>84985.0</td><td>52300.0</td><td>57075.0</td></tr><tr><td>BEAM RIDER</td><td>254.6</td><td>14961.0</td><td>9743.2</td><td>17417.2</td><td>14591.3</td><td>31181.3</td><td>37412.2</td><td>24622.2</td><td>21768.5</td><td>9298.9</td><td>9941.6</td><td>12877.0</td></tr><tr><td>BERZERK</td><td>196.1</td><td>2237.5</td><td>493.4</td><td>1011.1</td><td>910.6</td><td>865.9</td><td>2178.6</td><td>862.2</td><td>1793.4</td><td>1221.3</td><td>1186.0</td><td>1643.4</td></tr><tr><td>BOWLING</td><td>35.2</td><td>146.5</td><td>56.5</td><td>69.6</td><td>65.7</td><td>52.0</td><td>50.4</td><td>41.8</td><td>39.4</td><td>63.7</td><td>72.4</td><td>76.0</td></tr><tr><td>BOXING</td><td>-1.5</td><td>9.6</td><td>70.3</td><td>73.5</td><td>77.3</td><td>72.3</td><td>79.2</td><td>37.3</td><td>54.9</td><td>60.2</td><td>75.1</td><td>55.6</td></tr><tr><td>BREAKOUT</td><td>1.6</td><td>27.9</td><td>354.5</td><td>368.9</td><td>411.6</td><td>343.0</td><td>354.6</td><td>766.8</td><td>379.5</td><td>459.0</td><td>465.5</td><td>478.4</td></tr><tr><td>CENTIPEDE</td><td>1925.5</td><td>10321.9</td><td>3973.9</td><td>3853.5</td><td>4881.0</td><td>3489.1</td><td>5570.2</td><td>1997.0</td><td>7160.9</td><td>3974.5</td><td>2584.0</td><td>2674.3</td></tr><tr><td>CHOPPER COMMAND</td><td>644.0</td><td>8930.0</td><td>5017.0</td><td>3495.0</td><td>3784.0</td><td>4635.0</td><td>8058.0</td><td>10150.0</td><td>10916.0</td><td>17312.0</td><td>33150.0</td><td>71442.5</td></tr><tr><td>CRAZY CLIMBER</td><td>9337.0</td><td>32667.0</td><td>98128.0</td><td>113782.0</td><td>124566.0</td><td>127512.0</td><td>127853.0</td><td>138518.0</td><td>143962.0</td><td>151295.0</td><td>182399.0</td><td>209784.0</td></tr><tr><td>DEFENDER</td><td>1965.5</td><td>14296.0</td><td>15917.5</td><td>27510.0</td><td>33996.0</td><td>23666.5</td><td>34415.0</td><td>233021.5</td><td>47671.3</td><td>162327.5</td><td>110446.3</td><td>221671.0</td></tr><tr><td>DEMON ATTACK</td><td>208.3</td><td>3442.8</td><td>12550.7</td><td>69803.4</td><td>56322.8</td><td>61277.5</td><td>73371.3</td><td>115201.9</td><td>109670.7</td><td>120682.2</td><td>101435.4</td><td>113853.0</td></tr><tr><td>DOUBLE DUNK</td><td>-16.0</td><td>-14.4</td><td>-6.0</td><td>-0.3</td><td>-0.8</td><td>16.0</td><td>-10.7</td><td>0.1</td><td>-0.6</td><td>22.2</td><td>11.0</td><td>22.0</td></tr><tr><td>ENDURO</td><td>-81.8</td><td>740.2</td><td>626.7</td><td>1216.6</td><td>2077.4</td><td>1831.0</td><td>2223.9</td><td>-82.5</td><td>2061.1</td><td>2054.3</td><td>2127.0</td><td>2138.3</td></tr><tr><td>FISHING DERBY</td><td>-77.1</td><td>5.1</td><td>-1.6</td><td>3.2</td><td>-4.1</td><td>9.8</td><td>17.0</td><td>22.6</td><td>22.6</td><td>23.2</td><td>17.7</td><td>21.7</td></tr><tr><td>FREEWAY</td><td>0.1</td><td>25.6</td><td>26.9</td><td>28.8</td><td>0.2</td><td>28.9</td><td>28.2</td><td>0.1</td><td>29.1</td><td>19.4</td><td>26.9</td><td>26.9</td></tr><tr><td>FROSTBITE</td><td>66.4</td><td>4202.8</td><td>496.1</td><td>1448.1</td><td>2332.4</td><td>3510.0</td><td>4038.4</td><td>197.6</td><td>4141.1</td><td>3497.8</td><td>4358.7</td><td>4743.5</td></tr><tr><td>GOPHER</td><td>250.0</td><td>2311.0</td><td>8190.4</td><td>15253.0</td><td>20051.4</td><td>34858.8</td><td>105148.4</td><td>17106.8</td><td>72595.7</td><td>36286.2</td><td>60743.2</td><td>89306.8</td></tr><tr><td>GRAVITAR</td><td>245.5</td><td>3116.0</td><td>298.0</td><td>200.5</td><td>297.0</td><td>269.5</td><td>167.0</td><td>320.0</td><td>567.5</td><td>544.0</td><td>583.0</td><td>779.8</td></tr><tr><td>H.E.R.O.</td><td>1580.3</td><td>25839.4</td><td>14992.9</td><td>14892.5</td><td>15207.9</td><td>20889.9</td><td>15459.2</td><td>28889.5</td><td>50496.8</td><td>22673.3</td><td>30253.7</td><td>37833.4</td></tr><tr><td>ICE HOCKEY</td><td>-9.7</td><td>0.5</td><td>-1.6</td><td>-2.5</td><td>-1.3</td><td>-0.2</td><td>0.5</td><td>-1.7</td><td>-0.7</td><td>11.1</td><td>0.9</td><td>4.9</td></tr><tr><td>JAMES BOND 007</td><td>33.5</td><td>368.5</td><td>697.5</td><td>573.0</td><td>835.5</td><td>3961.0</td><td>585.0</td><td>613.0</td><td>18142.3</td><td>12655.3</td><td>6741.0</td><td>13987.5</td></tr><tr><td>KANGAROO</td><td>100.0</td><td>2739.0</td><td>4496.0</td><td>11204.0</td><td>10334.0</td><td>12185.0</td><td>861.0</td><td>125.0</td><td>10841.0</td><td>9111.0</td><td>5143.5</td><td>5587.5</td></tr><tr><td>KRULL</td><td>1151.9</td><td>2109.1</td><td>6206.0</td><td>6796.1</td><td>8051.6</td><td>6872.8</td><td>7658.6</td><td>5911.4</td><td>6715.5</td><td>7450.1</td><td>7815.9</td><td>7621.8</td></tr><tr><td>KUNG-FU MASTER</td><td>304.0</td><td>20786.8</td><td>20882.0</td><td>30207.0</td><td>24288.0</td><td>31676.0</td><td>37484.0</td><td>40835.0</td><td>28999.8</td><td>48781.5</td><td>49767.9</td><td>55357.7</td></tr><tr><td>MONTEZUMA&#x27;S REVENGE</td><td>25.0</td><td>4182.0 15375.0</td><td>47.0 1092.3</td><td>42.0 1241.3</td><td>22.0 2250.6</td><td>51.0 1865.9</td><td>24.0 1007.8</td><td>41.0 850.7</td><td>154.0 2570.2</td><td>45.0 1102.4</td><td>984.0 1714.6</td><td>1045.5 2540.1</td></tr><tr><td>Ms. PAC-MAN NAME THIS GAME</td><td>197.8 1747.8</td></table>
447
+
448
+ Table 5: Scores for each game evaluated with 30 random noop starts. Reactor was evaluated by averaging scores over 200 episodes. All scores (except for Reactor) were taken from Wang et al. (2015) and Hessel et al. (2017).
449
+
450
+ <table><tr><td>GAME AGENT</td><td>RANDOM</td><td>HUMAN</td><td>DQN</td><td>DDQN</td><td>DUEL</td><td>PRIOR</td><td>PRIOR. DUEL.</td><td>RAINBOW</td><td>REACTOR ND5</td><td>REACTOR</td><td>REACTOR 500M</td></tr><tr><td>ALIEN</td><td>227.8</td><td>7127.7</td><td>1620.0</td><td>3747.7</td><td>4461.4</td><td>4203.8</td><td>3941.0</td><td>9491.7</td><td>4199.4</td><td>6482.1</td><td>12689.1</td></tr><tr><td>AMIDAR</td><td>5.8</td><td>1719.5</td><td>978.0</td><td>1793.3</td><td>2354.5</td><td>1838.9</td><td>2296.8</td><td>5131.2</td><td>1546.8</td><td>833.0</td><td>1015.8</td></tr><tr><td>ASSAULT</td><td>222.4</td><td>742.0</td><td>4280.4</td><td>5393.2</td><td>4621.0</td><td>7672.1</td><td>11477.0</td><td>14198.5</td><td>17543.8</td><td>11013.5</td><td>8323.3</td></tr><tr><td>ASTERIX</td><td>210.0</td><td>8503.3</td><td>4359.0</td><td>17356.5</td><td>28188.0</td><td>31527.0</td><td>375080.0</td><td>428200.3</td><td>16121.0</td><td>36238.5</td><td>205914.0</td></tr><tr><td>ASTEROIDS</td><td>719.1</td><td>47388.7</td><td>1364.5</td><td>734.7</td><td>2837.7</td><td>2654.3</td><td>1192.7</td><td>2712.8</td><td>4467.4</td><td>2780.4</td><td>3726.1</td></tr><tr><td>ATLANTIS</td><td>12850.0</td><td>29028.1</td><td>279987.0</td><td>106056.0</td><td>382572.0</td><td>357324.0</td><td>395762.0</td><td>826659.5</td><td>968179.5</td><td>308258.0</td><td>302831.0</td></tr><tr><td>BANK HEIST</td><td>14.2</td><td>753.1</td><td>455.0</td><td>1030.6</td><td>1611.9</td><td>1054.6</td><td>1503.1</td><td>1358.0</td><td>1236.8</td><td>988.7</td><td>1259.7</td></tr><tr><td>BATTLEZONE</td><td>2360.0</td><td>37187.5</td><td>29900.0</td><td>31700.0</td><td>37150.0</td><td>31530.0</td><td>35520.0</td><td>62010.0</td><td>98235.0</td><td>61220.0</td><td></td></tr><tr><td>BEAM RIDER</td><td>363.9</td><td>16926.5</td><td>8627.5</td><td>13772.8</td><td>12164.0</td><td>23384.2</td><td>30276.5</td><td>16850.2</td><td>8811.8</td><td></td><td>64070.0</td></tr><tr><td>BERZERK</td><td>123.7</td><td>2630.4</td><td>585.6</td><td>1225.4</td><td>1472.6</td><td>1305.6</td><td>3409.0</td><td>2545.6</td><td></td><td>8566.5</td><td>11033.4</td></tr><tr><td>BOWLING</td><td>23.1</td><td>160.7</td><td>50.4</td><td>68.1</td><td>65.5</td><td>47.9</td><td>46.7</td><td>30.0</td><td>1515.7 59.3</td><td>1641.4</td><td>2303.1</td></tr><tr><td>BOXING</td><td></td><td>12.1</td><td>88.0</td><td>91.6</td><td>99.4</td><td>95.6</td><td>98.9</td><td></td><td></td><td>75.4</td><td>81.0</td></tr><tr><td>BREAKOUT</td><td>0.1</td><td>30.5</td><td>385.5</td><td>418.5</td><td>345.3</td><td>373.9</td><td>366.0</td><td>99.6</td><td>99.7</td><td>99.4</td><td>99.4</td></tr><tr><td>CENTIPEDE</td><td>1.7 2090.9</td><td>12017.0</td><td>4657.7</td><td>5409.4</td><td>7561.4</td><td>4463.2</td><td>7687.5</td><td>417.5 8167.3</td><td>509.5 7267.2</td><td>518.4</td><td>514.8</td></tr><tr><td>CHOPPER COMMAND</td><td></td><td>7387.8</td><td>6126.0</td><td>5809.0</td><td>11215.0</td><td>8600.0</td><td>13185.0</td><td>16654.0</td><td>19901.5</td><td>3402.8</td><td>3422.0</td></tr><tr><td>CRAZY CLIMBER</td><td>811.0</td><td>35829.4</td><td>110763.0</td><td>117282.0</td><td>143570.0</td><td></td><td>162224.0</td><td>168788.5</td><td>173274.0</td><td>37568.0</td><td>107779.0 236422.0</td></tr><tr><td>DEFENDER</td><td>10780.5 2874.5</td><td>18688.9</td><td>23633.0</td><td>35338.5</td><td>42214.0</td><td>141161.0 31286.5</td><td>41324.5</td><td>55105.0</td><td>181074.3</td><td>194347.0</td><td></td></tr><tr><td>DEMON ATTACK</td><td></td><td>1971.0</td><td>12149.4</td><td>58044.2</td><td>60813.3</td><td>71846.4</td><td></td><td>111185.2</td><td>122782.5</td><td>113128.0</td><td>223025.0</td></tr><tr><td>DOUBLE DUNK</td><td>152.1</td><td>-16.4</td><td>-6.6</td><td>-5.5</td><td>0.1</td><td>18.5</td><td>72878.6 -12.5</td><td>-0.3</td><td>23.0</td><td>100189.0</td><td>115154.0</td></tr><tr><td>ENDURO</td><td>-18.6</td><td>860.5</td><td>729.0</td><td>1211.8</td><td>2258.2</td><td></td><td>2306.4</td><td>2125.9</td><td></td><td>11.4</td><td>23.0</td></tr><tr><td>FISHING DERBY</td><td>0.0</td><td>-38.7</td><td>-4.9</td><td>15.5</td><td></td><td>2093.0</td><td></td><td></td><td>2211.3</td><td>2230.1</td><td>2224.2</td></tr><tr><td>FREEWAY</td><td>-91.7</td><td>29.6</td><td>30.8</td><td>33.3</td><td>46.4</td><td>39.5</td><td>41.3</td><td>31.3</td><td>33.1</td><td>23.2</td><td>30.4</td></tr><tr><td>FROSTBITE</td><td>0.0</td><td></td><td>797.4</td><td>1683.3</td><td>0.0</td><td>33.7</td><td>33.0</td><td>34.0</td><td>22.3</td><td>31.4</td><td>31.5</td></tr><tr><td>GOPHER</td><td>65.2</td><td>4334.7 2412.5</td><td>8777.4</td><td>14840.8</td><td>4672.8</td><td>4380.1</td><td>7413.0</td><td>9590.5</td><td>7136.7</td><td>8042.1</td><td>7932.2</td></tr><tr><td>GRAVITAR</td><td>257.6</td><td>3351.4</td><td>473.0</td><td>412.0</td><td>15718.4</td><td>32487.2</td><td>104368.2</td><td>70354.6</td><td>36279.1</td><td>69135.1</td><td>89851.0</td></tr><tr><td>H.E.R.O.</td><td>173.0</td><td>30826.4</td><td>20437.8</td><td>20130.2</td><td>588.0</td><td>548.5</td><td>238.0</td><td>1419.3</td><td>1804.8</td><td>1073.8</td><td>2041.8</td></tr><tr><td>ICE HOCKEY</td><td>1027.0</td><td>0.9</td><td>-1.9</td><td>-2.7</td><td>20818.2</td><td>23037.7</td><td>21036.5</td><td>55887.4</td><td>27833.0</td><td>35542.2</td><td>43360.4</td></tr><tr><td>JAMES BOND 007</td><td>-11.2</td><td>302.8</td><td>768.5</td><td>1358.0</td><td>0.5 1312.5</td><td>1.3</td><td>-0.4</td><td>1.1</td><td>15.7</td><td>3.4</td><td>10.7</td></tr><tr><td>KANGAROO</td><td>29.0 52.0</td><td>3035.0</td><td>7259.0</td><td>12992.0</td><td>14854.0</td><td>5148.0</td><td>812.0</td><td>19809.0</td><td>14524.0</td><td>7869.2</td><td>16056.2</td></tr><tr><td>KRULL</td><td>1598.0</td><td>2665.5</td><td>8422.3</td><td>7920.5</td><td>11451.9</td><td>16200.0 9728.0</td><td>1792.0 10374.4</td><td>14637.5 8741.5</td><td>13349.0</td><td>10484.5</td><td>11266.5</td></tr><tr><td>KUNG-FU MASTER</td><td>258.5</td><td>22736.3</td><td>26059.0</td><td>29710.0</td><td>34294.0</td><td>39581.0</td><td>48375.0</td><td></td><td>10237.8</td><td>9930.8</td><td>9896.0</td></tr><tr><td>MONTEZUMA&#x27;S REVENGE</td><td>0.0</td><td>4753.3</td><td>0.0</td><td>0.0</td><td>0.0</td><td></td><td></td><td>52181.0</td><td>61621.5</td><td>59799.5</td><td>65836.5</td></tr><tr><td>MS.PAC-MAN</td><td>307.3</td><td>6951.6</td><td>3085.6</td><td>2711.4</td><td>6283.5</td><td>0.0 6518.7</td><td>0.0 3327.3</td><td>384.0</td><td>0.0</td><td>2643.5</td><td>2643.5</td></tr><tr><td>NAME THIS GAME</td><td></td><td>8049.0</td><td>8207.8</td><td>10616.0</td><td>11971.1</td><td></td><td>15572.5</td><td>5380.4 13136.0</td><td>4416.9 12636.5</td><td>2724.3 9907.2</td><td>3749.2 9543.8</td></tr><tr><td>PHOENIX</td><td>2292.3 761.4</td><td>7242.6</td><td>8485.2</td><td>12252.5</td><td>23092.2</td><td>12270.5 18992.7</td></table>
parse/train/rkHVZWZAZ/rkHVZWZAZ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rkHVZWZAZ/rkHVZWZAZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rkHVZWZAZ/rkHVZWZAZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rydeCEhs-/rydeCEhs-_content_list.json ADDED
@@ -0,0 +1,1629 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SMASH: ONE-SHOT MODEL ARCHITECTURESEARCH THROUGH HYPERNETWORKS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Andrew Brock, Theodore Lim, & J.M. Ritchie ",
17
+ "bbox": [
18
+ 186,
19
+ 170,
20
+ 508,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Nick Weston ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 562,
31
+ 170,
32
+ 650,
33
+ 184
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "School of Engineering and Physical Sciences \nHeriot-Watt University \nEdinburgh, UK \n{ajb5, t.lim, j.m.ritchie}@hw.ac.uk \nRenishaw plc \nResearch Ave, North \nEdinburgh, UK \nNick.Weston@renishaw.com ",
40
+ "bbox": [
41
+ 184,
42
+ 185,
43
+ 527,
44
+ 239
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "",
51
+ "bbox": [
52
+ 562,
53
+ 185,
54
+ 799,
55
+ 239
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "ABSTRACT ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 454,
65
+ 276,
66
+ 544,
67
+ 291
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Designing architectures for deep neural networks requires expert knowledge and substantial computation time. We propose a technique to accelerate architecture selection by learning an auxiliary HyperNet that generates the weights of a main model conditioned on that model’s architecture. By comparing the relative validation performance of networks with HyperNet-generated weights, we can effectively search over a wide range of architectures at the cost of a single training run. To facilitate this search, we develop a flexible mechanism based on memory read-writes that allows us to define a wide range of network connectivity patterns, with ResNet, DenseNet, and FractalNet blocks as special cases. We validate our method (SMASH) on CIFAR-10 and CIFAR-100, STL-10, ModelNet10, and Imagene $3 2 \\mathbf { x } 3 2$ , achieving competitive performance with similarly-sized handdesigned networks. ",
74
+ "bbox": [
75
+ 233,
76
+ 309,
77
+ 766,
78
+ 474
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "1 INTRODUCTION ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 176,
88
+ 503,
89
+ 336,
90
+ 520
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "The high performance of deep neural nets is tempered by the cost of extensive engineering and validation to find the best architecture for a given problem. High-level design decisions such as depth, units per layer, and layer connectivity are not always obvious, and the success of models such as Inception (Szegedy et al., 2016), ResNets (He et al., 2016), FractalNets (Larsson et al., 2017) and DenseNets (Huang et al., 2017) demonstrates the benefits of intricate design patterns. Even with expert knowledge, determining which design elements to weave together requires ample experimentation. ",
97
+ "bbox": [
98
+ 174,
99
+ 536,
100
+ 825,
101
+ 632
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "In this work, we propose to bypass the expensive procedure of fully training candidate models by instead training an auxiliary model, a HyperNet (Ha et al., 2017), to dynamically generate the weights of a main model with variable architecture. Though these generated weights are worse than freely learned weights for a fixed architecture, we leverage the observation (Li et al., 2017) that the relative performance of different networks early in training (i.e. some distance from the eventual optimum) often provides a meaningful indication of performance at optimality. By comparing validation performance for a set of architectures using generated weights, we can approximately rank numerous architectures at the cost of a single training run. ",
108
+ "bbox": [
109
+ 174,
110
+ 640,
111
+ 825,
112
+ 751
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "To facilitate this search, we develop a flexible scheme based on memory read-writes that allows us to define a diverse range of architectures, with ResNets, DenseNets, and FractalNets as special cases. We validate our one-Shot Model Architecture Search through HyperNetworks (SMASH) for Convolutional Neural Networks (CNN) on CIFAR-10 and CIFAR-100 (Krizhevsky and Hinton, 2009), Imagene $3 2 \\mathrm { x } 3 2$ (Chrabaszcz et al., 2017), ModelNet10 (Wu et al., 2015), and STL-10 (Coates et al., 2011), achieving competitive performance with similarly-sized hand-designed networks. ",
119
+ "bbox": [
120
+ 174,
121
+ 758,
122
+ 825,
123
+ 842
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "2 RELATED WORK ",
130
+ "text_level": 1,
131
+ "bbox": [
132
+ 176,
133
+ 863,
134
+ 344,
135
+ 878
136
+ ],
137
+ "page_idx": 0
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "Modern practical methods for optimizing hyperparameters rely on random search (Bergstra and Bengio, 2012) or Bayesian Optimization (BO) (Snoek et al., 2012; 2015), treating the model performance as a black box. While successful, these methods require multiple training runs for evaluation (even when starting with a good initial model) and, in the case of BO, are not typically used to specify variable-length settings such as the connectivity and structure of the model under consideration. Relatedly, bandit-based methods (Li et al., 2017) provide a framework for efficiently exploring the hyperparameter space by employing an adaptive early-stopping strategy, allocating more resources to models which show promise early in training. ",
142
+ "bbox": [
143
+ 174,
144
+ 895,
145
+ 823,
146
+ 924
147
+ ],
148
+ "page_idx": 0
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "",
153
+ "bbox": [
154
+ 174,
155
+ 103,
156
+ 825,
157
+ 188
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "Evolutionary techniques (Floreano et al.; Stanley et al.; Suganuma et al., 2017; Wierstra et al., 2005) offer a flexible approach for discovering variegated models from trivial initial conditions, but often struggle to scale to deep neural nets where the search space is vast, even with enormous compute (Real et al., 2017). ",
164
+ "bbox": [
165
+ 174,
166
+ 194,
167
+ 825,
168
+ 251
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Reinforcement learning methods (Baker et al., 2017; Zoph and Le, 2017) have been used to train an agent to generate network definitions using policy gradients. These methods start from trivial architectures and discover models that achieve very high performance, but can require twelve to fifteen thousand full training runs to arrive at a solution. ",
175
+ "bbox": [
176
+ 174,
177
+ 257,
178
+ 825,
179
+ 313
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "The method that most resembles our own is that of Saxe et al. (Saxe et al., 2011), who propose to efficiently explore various architectures by training only the output layer of convolutional networks with random convolutional weights. While more efficient than fully training an entire network end-toend, this method does not appear to scale to deeper networks (Yosinski et al., 2014). Our method is conceptually similar, but replaces random weights with weights generated through HyperNets (Ha et al., 2017), which are one of a class of techniques for dynamically adapting weights through use of an auxiliary model (Denil et al., 2013; Jia et al., 2016; Rebuffi et al., 2017; Schmidhuber, 1992). In our case we learn a transform from a binary encoding of an architecture to the weight space, rather than learning to adapt weights based on the model input. ",
186
+ "bbox": [
187
+ 174,
188
+ 319,
189
+ 825,
190
+ 445
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "Our method is explicitly designed to evaluate a wide range of model configurations (in terms of connectivity patterns, depth, and width) but does not address other hyperparameters such as regularization, learning rate schedule, weight initialization, or data augmentation. Unlike the aforementioned evolutionary or RL methods, we explore a somewhat pre-defined design space, rather than starting with a trivial model and designating a set of available network elements. While we still consider a rich set of architectures, our method cannot discover wholly new structures on its own and is constrained in that it only dynamically generates a specific subset of the model parameters. Additionally, although our method is not evolutionary, our encoding scheme is reminiscent of CGP (Miller and Thomson, 2000). ",
197
+ "bbox": [
198
+ 174,
199
+ 452,
200
+ 825,
201
+ 577
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "Stochastic regularization techniques such as Dropout (Srivastava et al., 2012), Swapout (Singh et al., 2016), DropPath (Larsson et al., 2017) or stochastic depth (Huang et al., 2016) superficially resemble our method, in that they obtain variable configurations by randomly dropping connectivity paths in a fixed network architecture. Convolutional neural fabrics (Saxena and Verbeek, 2016), for example, leverage this idea to attempt to train one large network as an implicit ensemble of all subnetworks produced through dropping paths. A key element that sets our method apart is that the weights for each node in our network are dynamically generated, rather than fixed; if a Dropout ensemble were to visit a unit that had not previously been trained, the unit’s weights would be completely untuned. Our method generalizes even to previously unseen architectures, and the network we train under stochastic conditions is merely a proxy we use to evaluate network configurations, rather than the final model. ",
208
+ "bbox": [
209
+ 174,
210
+ 584,
211
+ 825,
212
+ 737
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "3 ONE-SHOT MODEL ARCHITECTURE SEARCH THROUGH HYPERNETWORKS",
219
+ "text_level": 1,
220
+ "bbox": [
221
+ 173,
222
+ 772,
223
+ 820,
224
+ 787
225
+ ],
226
+ "page_idx": 1
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "In SMASH (Algorithm 1), our goal is to rank a set of neural network configurations relative to one another based on each configuration’s validation performance, which we accomplish using weights generated by an auxiliary network. At each training step, we randomly sample a network architecture, generate the weights for that architecture using a HyperNet, and train the entire system end-to-end through backpropagation. When the model is finished training, we sample a number of random architectures and evaluate their performance on a validation set, using weights generated by the HyperNet. We then select the architecture with the best estimated validation performance and train its weights normally. ",
231
+ "bbox": [
232
+ 174,
233
+ 811,
234
+ 825,
235
+ 924
236
+ ],
237
+ "page_idx": 1
238
+ },
239
+ {
240
+ "type": "table",
241
+ "img_path": "images/23fdf8a2c6bbf74013a172a730dcf2f23bba74d2c3f70bd5e7f49a6dc64d9f2c.jpg",
242
+ "table_caption": [],
243
+ "table_footnote": [],
244
+ "table_body": "<table><tr><td>Algorithm1SMASH</td></tr><tr><td></td></tr></table>",
245
+ "bbox": [
246
+ 160,
247
+ 102,
248
+ 825,
249
+ 119
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "table",
255
+ "img_path": "images/58550e0afc9aecb8d0fccd7cc4ca6a9fef05b165252abe3c69c7c20e61b9fd1d.jpg",
256
+ "table_caption": [],
257
+ "table_footnote": [],
258
+ "table_body": "<table><tr><td>input Space of all candidate architectures, Rc Initialize HyperNet weights H loop</td><td></td></tr><tr><td>Sample input minibatch xi,random architecture c and architecture weights W = H(c) Get training error Et = fc(W,xi)= fc(H(c),xi),backprop and update H</td><td rowspan=\"3\"></td></tr><tr><td>end loop</td></tr><tr><td>loop Sample random c and evaluate error on validation set Ev = fc(H(c),xv)</td></tr><tr><td>end loop</td><td rowspan=\"3\"></td></tr><tr><td>Fix architecture and train normally with freely-varying weights W</td></tr><tr><td></td></tr></table>",
259
+ "bbox": [
260
+ 173,
261
+ 119,
262
+ 779,
263
+ 262
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "SMASH comprises two core components: the method by which we sample architectures, and the method by which we sample weights for a given architecture. For the former, we develop a novel \"memory-bank\" view of feed-forward networks that permits sampling complex, branching topologies, and encoding said topologies as binary vectors. For the latter, we employ a HyperNet (Ha et al., 2017) that learns to map directly from the binary architecture encoding to the weight space. ",
270
+ "bbox": [
271
+ 173,
272
+ 292,
273
+ 825,
274
+ 363
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "We hypothesize that so long as the HyperNet learns to generate reasonable weights, the validation error of networks with generated weights will correlate with the performance when using normally trained weights, with the difference in architecture being the primary factor of variation. Throughout the paper, we refer to the entire apparatus during the first part of training (the HyperNet, the variable architecture main network, and any freely learned main network weights) as the SMASH network, and we refer to networks trained with freely learned weights in the second stage as resulting networks. ",
281
+ "bbox": [
282
+ 173,
283
+ 369,
284
+ 825,
285
+ 454
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "3.1 DEFINING VARIABLE NETWORK CONFIGURATIONS ",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 174,
295
+ 473,
296
+ 568,
297
+ 488
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "image",
303
+ "img_path": "images/05a14337291e284a70855dd35fb712c5b232f11f6ddcb43246c9185b9e925552.jpg",
304
+ "image_caption": [
305
+ "Figure 1: Memory-Bank representations of ResNet, DenseNet, and FractalNet blocks. "
306
+ ],
307
+ "image_footnote": [],
308
+ "bbox": [
309
+ 218,
310
+ 508,
311
+ 774,
312
+ 666
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "In order to explore a broad range of architectures with variable depth, connectivity patterns, layer sizes and beyond, we require a flexible mechanism for defining such architectures, which we can also easily encode into a conditioning vector for the HyperNet. To this end, we introduce a \"memory-bank\" view of feed-forward networks. ",
319
+ "bbox": [
320
+ 174,
321
+ 713,
322
+ 825,
323
+ 770
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "Rather than viewing a network as a series of operations applied to a forward-propagating signal, we view a network as having a set of memory banks (initially tensors filled with zeros) which it can read and write. Each layer is thus an operation that reads data from a subset of memory, modifies the data, and writes the result to another subset of memory. For a single-branch architecture, the network has one large memory bank it reads and overwrites (or, for a ResNet, adds to) at each op. A branching architecture such as a DenseNet reads from all previously written banks and writes to an empty bank, and a FractalNet follows a more complex read-write pattern, as shown in Figure 1. ",
330
+ "bbox": [
331
+ 174,
332
+ 776,
333
+ 825,
334
+ 875
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Our base network structure consists of multiple blocks (Figure 2(b)), where each block has a set number of memory banks at a given spatial resolution, with successively halved spatial resolutions as in most CNN architectures. Downsampling is accomplished via a 1x1 convolution followed by average pooling (Huang et al., 2017), with the weights of the 1x1 convolution and the fully-connected output layer being freely learned, rather than generated. ",
341
+ "bbox": [
342
+ 176,
343
+ 882,
344
+ 823,
345
+ 924
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "image",
351
+ "img_path": "images/c7a2ac2222c18e7a0855ff9b2100627098d981f68cc17e638b413d86f1f3d840.jpg",
352
+ "image_caption": [
353
+ "Figure 2: (a) Structure of one op: A 1x1 conv operating on the memory banks, followed by up to 2 stem block 1 trans block 2 trans block 3parallel paths of 2 convolutions each. (b) Basic network skeleton. "
354
+ ],
355
+ "image_footnote": [],
356
+ "bbox": [
357
+ 263,
358
+ 102,
359
+ 730,
360
+ 207
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "",
367
+ "bbox": [
368
+ 173,
369
+ 276,
370
+ 823,
371
+ 304
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "Block 1 Block 2 Block 3When sampling an architecture, the number of banks and the number of channels per bank are randomly sampled at each block. When defining each layer within a block, we randomly select the Block 1 Block 2 Block 3read-write pattern and the definition of the op to be performed on the read data. When reading from multiple banks we concatenate the read tensors along the channel axis, and when writing to banks we add to the tensors currently in each bank. For all reported experiments, we only read and write from banks at one block (i.e. one spatial resolution), although one could employ resizing to allow reading and writing from any block, similar to (Saxena and Verbeek, 2016). ",
378
+ "bbox": [
379
+ 174,
380
+ 311,
381
+ 825,
382
+ 409
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "Each op comprises a 1x1 convolution (reducing the number of incoming channels), followed by a variable number of convolutions interleaved with nonlinearities, as shown in Figure 2(a). We randomly select which of the four convs are active, along with their filter size, dilation factor, number of groups, and the number of output units (i.e. the layer width). The number of output channels of the 1x1 conv is some factor of the width of the op, chosen as the \"bottleneck ratio\" hyperparameter. ",
389
+ "bbox": [
390
+ 174,
391
+ 416,
392
+ 825,
393
+ 486
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "The weights for the 1x1 convolution are generated by the HyperNet as described in Section 3.2, while the other convolutions are normally learned parameters. To ensure variable depth, we learn a single set of 4 convolutions for each block, and share it across all ops within a block. We limit the max filter size and number of output units, and when a sampled op uses less than the maximum of either, we simply slice the weight tensor to the required size. The fixed transition convolutions and output layer employ this same slicing based on the number of incoming non-empty memory banks. Exact details regarding this scheme are available in the appendix. ",
400
+ "bbox": [
401
+ 174,
402
+ 492,
403
+ 825,
404
+ 590
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "In designing our scheme, we strive to minimize the number of static learned parameters, placing the majority of the network’s capacity in the HyperNet. A notable consequence of this goal is that we only employ BatchNorm (Ioffe and Szegedy, 2015) at downsample layers and before the output layer, as the layer-specific running statistics are difficult to dynamically generate. We experimented with several different normalization schemes including WeightNorm (Salimans and Kingma, 2016), LayerNorm (Ba et al., 2016) and NormProp (Arpit et al., 2016) but found them to be unstable in training. ",
411
+ "bbox": [
412
+ 174,
413
+ 597,
414
+ 825,
415
+ 694
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "Instead, we employ a simplified version of WeightNorm where we divide the entirety of each generated 1x1 filter by its Euclidean norm (rather than normalizing each channel separately), which we find to work well for SMASH and to only result in a minor drop in accuracy when employed in fixed-architecture networks. No other convolution within an op is normalized. ",
422
+ "bbox": [
423
+ 174,
424
+ 700,
425
+ 825,
426
+ 757
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "3.2 LEARNING TO MAP ARCHITECTURES TO WEIGHTS",
433
+ "text_level": 1,
434
+ "bbox": [
435
+ 174,
436
+ 779,
437
+ 560,
438
+ 791
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "A HyperNet (Ha et al., 2017) is a neural net used to parameterize the weights of another network, the main network. For a Static HyperNet with parameters $H$ , the main network weights $W$ are some function (e.g. a multilayer perceptron) of a learned embedding $z$ , such that the number of learned weights is typically smaller than the full number of weights for the main network. For a Dynamic HyperNet, the weights $W$ are generated conditioned on the network input $x$ , or, for recurrent networks, on the current input $x _ { t }$ and the previous hidden state $h _ { t - 1 }$ . ",
445
+ "bbox": [
446
+ 174,
447
+ 804,
448
+ 825,
449
+ 888
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "We propose a variant of a Dynamic HyperNet which generates the weights $W$ based on a tensor encoding of the main network architecture $c$ . Our goal is to learn a mapping $W = H ( c )$ that is reasonably close to the optimal $W$ for any given $c$ , such that we can rank each $c$ based on the validation error using HyperNet-generated weights. We thus adopt a scheme for the layout of $c$ to enable sampling of architectures with wildly variable topologies, compatibility with the toolbox available in standard libraries, and to make $c$ ’s dimensions as interpretable as possible. ",
456
+ "bbox": [
457
+ 173,
458
+ 895,
459
+ 823,
460
+ 924
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "image",
466
+ "img_path": "images/8ee81e6737ffba29e0141a22b3f8e4da30d5b4f02cda109985cb668ab2803d2e.jpg",
467
+ "image_caption": [
468
+ "Figure 3: An unrolled graph, its equivalent memory-bank representation, and its encoded embedding. "
469
+ ],
470
+ "image_footnote": [],
471
+ "bbox": [
472
+ 200,
473
+ 104,
474
+ 790,
475
+ 193
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "",
482
+ "bbox": [
483
+ 174,
484
+ 277,
485
+ 823,
486
+ 334
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "Our HyperNet is fully convolutional, such that the dimensionality of the output tensor $W$ varies with the dimensionality of the input $c$ , which we make a 4D tensor of the standard format Batch x Channel x Height $\\mathbf { X }$ Width; the batch size is set to 1 so that no output elements are wholly independent. This allows us to vary the depth and width of the main network by increasing the height or width of $c$ Under this scheme, every slice of the spatial dimensions of $W$ corresponds to a specific subset of $c$ Information describing the op that uses that $W$ subset is embedded in the channel dimension of the corresponding $c$ slice. ",
493
+ "bbox": [
494
+ 174,
495
+ 342,
496
+ 825,
497
+ 439
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "For example, if an op reads from memory banks 1, 2, and 4, then writes to 2 and 4, then the first, second, and fourth channels of the corresponding slice of $c$ will be filled with 1s (indicating the read pattern) and the sixth and eighth channels of that slice will be filled with 1s (indicating the write pattern). The rest of the op description is encoded in the remaining channels in a similar 1-hot fashion. We only encode into the width-wise extent of $c$ based on the number of output units of the op, so elements of $c$ which do not correspond to any elements of $W$ are empty. ",
504
+ "bbox": [
505
+ 174,
506
+ 445,
507
+ 825,
508
+ 530
509
+ ],
510
+ "page_idx": 4
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "A naïve implementation of this scheme might require the size of $c$ to be equal to the size of $W$ , or have the HyperNet employ spatial upsampling to produce more elements. We found these choices poor, and instead employ a channel-based weight-compression scheme that reduces the size of $c$ and keeps the representational power of the HyperNet proportional to that of the main networks. We make the spatial extent of $c$ some fraction $k$ of the size of $W$ , and place $k$ units at the output of the HyperNet. We then reshape the resulting $1 \\times k \\times h e i g h t \\times w i d t h$ tensor to the required size of W . $k$ is chosen to be $D N ^ { 2 }$ , where $N$ is the minimum memory bank size, and $D$ is a \"depth compression\" hyperparameter that represents how many slices of $W$ correspond to a single slice of $c$ . Complete details regarding this scheme (and the rest of the encoding strategy) are available in Appendix B. ",
515
+ "bbox": [
516
+ 174,
517
+ 536,
518
+ 825,
519
+ 661
520
+ ],
521
+ "page_idx": 4
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "4 EXPERIMENTS ",
526
+ "text_level": 1,
527
+ "bbox": [
528
+ 174,
529
+ 713,
530
+ 326,
531
+ 728
532
+ ],
533
+ "page_idx": 4
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "We apply SMASH to several datasets, both for the purposes of benchmarking against other techniques, and to investigate the behavior of SMASH networks. Principally, we are interested in determining whether the validation error of a network using SMASH-generated weights (the \"SMASH score\") correlates with the validation of a normally trained network, and if so, the conditions under which the correlation holds. We are also interested in the transferability of the learned architectures to new datasets and domains, and how this relates to normal (weight-wise) transfer learning. ",
538
+ "bbox": [
539
+ 174,
540
+ 762,
541
+ 825,
542
+ 847
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "Our publicly available code1 is written in PyTorch (Paszke et al., 2017) to leverage dynamic graphs, and explicitly defines each sampled network in line with the memory-bank view to avoid obfuscating its inner workings behind (potentially more efficient) abstractions. We omit many hyperparameter details for brevity; full details are available in the appendices, along with visualizations of our best-found architectures. ",
549
+ "bbox": [
550
+ 174,
551
+ 853,
552
+ 825,
553
+ 922
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "image",
559
+ "img_path": "images/595b72d55146cf93b083899f2b6334bcbbccb572a57559de8ec2d5ccfa7d1e5c.jpg",
560
+ "image_caption": [
561
+ "Figure 4: True error and SMASH validation error for 50 different random architectures on CIFAR-100. Red line is a least-squares best fit. "
562
+ ],
563
+ "image_footnote": [],
564
+ "bbox": [
565
+ 315,
566
+ 111,
567
+ 671,
568
+ 332
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "4.1 TESTING THE SMASH CORRELATION ",
575
+ "text_level": 1,
576
+ "bbox": [
577
+ 176,
578
+ 405,
579
+ 475,
580
+ 420
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "First, we train a SMASH network for 300 epochs on CIFAR-100, using a standard annealing schedule (Huang et al., 2017), then sample 250 random architectures and evaluate their SMASH score on a held-out validation set formed of 5,000 random examples from the original training set. We then sort the architectures by their SMASH score and select every 5th architecture for full training and evaluation, using an accelerated training schedule of 30 epochs. For these networks, which we deem SMASHv1, the architecture uses a fixed memory bank size (though a variable number of banks in each block), a single fixed 3x3 conv in the main body of the op (rather than the variable $2 \\mathbf { x } 2$ array of convs), a single group, and a fixed bottleneck ratio of 4. The variable elements comprise the read-write pattern, the number of output units, and the dilation factor of the $3 \\mathrm { x } 3$ filter. When sampling architectures, we allocate a random, upper-bounded compute budget to each block. ",
587
+ "bbox": [
588
+ 173,
589
+ 431,
590
+ 825,
591
+ 570
592
+ ],
593
+ "page_idx": 5
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "Under these conditions, we observe a correlation (Figure 4) between the SMASH score and the true validation performance, suggesting that SMASH-generated weights can be used to rapidly compare architectures. It is critical not to overstate this claim; this test is arguably a single datapoint indicating that the correlation holds in this scenario, but neither guarantees the correlation’s generality nor implies the range of conditions for which it will hold. We thus conduct a more thorough investigation of this correlation. ",
598
+ "bbox": [
599
+ 174,
600
+ 578,
601
+ 825,
602
+ 661
603
+ ],
604
+ "page_idx": 5
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "We expect, based on preliminary experiments detailed in Appendix C, that the two key variables determining the strength of the correlation are the capacity of the HyperNet, and the ratio of HyperNetgenerated weights to freely learned weights. For the former, we reason that if the HyperNet lacks representational capacity, then it will be unable to learn an acceptable mapping between architectures and weights, and the generated weights will be too far from optimal to permit ranking. For the latter, we reason that if the main network has too many freely-learned weights relative to the number of dynamically generated weights, too much of its capacity will be \"static\" and ill-adapted to the wide range of architectures considered. ",
609
+ "bbox": [
610
+ 174,
611
+ 667,
612
+ 825,
613
+ 779
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "Following these hypotheses, we repeat the first experiment multiple times, varying the architecture of the HyperNet as well as the $g$ hyperparameter, which controls the maximum layer width and consequentially the ratio of freely-learned vs dynamic weights. A higher value of $g$ corresponds to relatively fewer dynamically generated weights. We consider three different ratios and five different HyperNet configurations. For each setting of $g$ we begin by training five different SMASH networks, each employing one of the candidate configurations. After training, we sample 500 random architectures as before, and then evaluate all five SMASH scores, rank them according to their average, and then train every 10th resulting network normally. We train the resulting networks for a full 100 epochs (as opposed to the previous shortened schedule) and repeat training runs with a total of 5 different random seeds. Finally, we evaluate the strength and significance of the correlation between SMASH score and resulting validation performance (averaged for each architecture across runs) using Pearson’s R. ",
620
+ "bbox": [
621
+ 174,
622
+ 786,
623
+ 825,
624
+ 897
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "",
631
+ "bbox": [
632
+ 174,
633
+ 103,
634
+ 823,
635
+ 159
636
+ ],
637
+ "page_idx": 6
638
+ },
639
+ {
640
+ "type": "table",
641
+ "img_path": "images/edf9a940ae55fe5232dddfd41ff298483a0c75f97f2cc5d86967c4c19bcf668f.jpg",
642
+ "table_caption": [
643
+ "Table 1: Pearson’s R $( \\rho )$ and p-values (p) for various settings of $g$ . "
644
+ ],
645
+ "table_footnote": [],
646
+ "table_body": "<table><tr><td>Architecture</td><td>Params</td><td>p,g=4</td><td>p,g=4</td><td>p,g=8</td><td>p,g=8</td><td>p,g=16</td><td>p,g=16</td></tr><tr><td>G=[10,10,10],D=[12,15,8]</td><td>4M</td><td>-0.07</td><td>0.62</td><td>0.25</td><td>0.09</td><td>0.02</td><td>0.9</td></tr><tr><td>G=[20,20,20],D=[8,10,4]</td><td>5M</td><td>0.15</td><td>0.30</td><td>0.20</td><td>0.17</td><td>-0.09</td><td>0.53</td></tr><tr><td>G=[20,20,20],D=[12,15,8]</td><td>7M</td><td>0.31</td><td>0.02</td><td>0.24</td><td>0.09</td><td>0.05</td><td>0.76</td></tr><tr><td>G=[25,25,25],D=[16,16,16]</td><td>12M</td><td>0.38</td><td>0.06</td><td>0.24</td><td>0.09</td><td>0.04</td><td>0.77</td></tr><tr><td>G=[25,25,25],D=[25,25,25]</td><td>24M</td><td>0.04</td><td>0.77</td><td>0.20</td><td>0.17</td><td>0.11</td><td>0.45</td></tr></table>",
647
+ "bbox": [
648
+ 186,
649
+ 199,
650
+ 808,
651
+ 290
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "The results of this study are reported in Table 1. The first column details the choices of growth rate and depth for each of the three blocks of the HyperNet, and the second column the number of parameters for each architecture. The values of $g { = } 4$ , $g { = } 8$ , and $g { = } 1 6$ roughly correspond to average freely-learned vs dynamic weight ratios of 1:4, 1:2, and 2:1, though these vary somewhat with individual sampled architectures. ",
658
+ "bbox": [
659
+ 174,
660
+ 305,
661
+ 825,
662
+ 375
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "Several trends are visible in this table. First, for $g { = } 4$ , we note that the strength of correlation increases with increased HyperNet capacity up to the fourth architecture with 12M parameters, but the correlation breaks down for the largest architecture. This suggests that the strength of correlation can indeed depend on the capacity of the HyperNet, but also that the HyperNet is either potentially susceptible to overfitting or that too large a HyperNet becomes too difficult to train and produces poor weights. Second, for $g { = } 8$ , we note that the correlation varies little with changes in architecture, but is weaker than the best correlations from $g = 4$ . This suggests that for a middling ratio, the capacity of the HyperNet has less effect on the correlation as there are fewer weights for it to adapt, but the strength of the correlation is weaker as each set of sampled weights is consequentially less optimal than for $g = 4$ . Third, we note a complete breakdown of the correlation for $g { = } 1 6$ , which is in line with our expectation that placing too much capacity in a single set of statically learned weights will prevent the SMASH network from properly adapting to individual architectures. ",
669
+ "bbox": [
670
+ 174,
671
+ 382,
672
+ 825,
673
+ 549
674
+ ],
675
+ "page_idx": 6
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "4.2 ARCHITECTURAL GRADIENT DESCENT BY PROXY ",
680
+ "text_level": 1,
681
+ "bbox": [
682
+ 176,
683
+ 566,
684
+ 558,
685
+ 580
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "As an additional test of our method, we examine whether or not the HyperNet has learned to take into account the architecture definition in $c$ , or whether it ignores $c$ and naively generates an unconditional subspace of weights that happen to work well. We \"trick\" the HyperNet by sampling one architecture, but asking it to generate the weights for a different architecture by corrupting the encoding tensor $c$ (e.g. by shuffling the dilation values). For a given architecture, we find that SMASH validation performance is consistently highest when using the correct encoding tensor, suggesting that the HyperNet has indeed learned a passable mapping from architecture to weights. ",
692
+ "bbox": [
693
+ 174,
694
+ 592,
695
+ 825,
696
+ 690
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "Following this, we posit that if the HyperNet learns a meaningful mapping $W = H ( c )$ , then the classification error approximate meas $E = f ( W , x ) = f ( H ( c ) , x )$ can be backpropagated to find to the architecture itself. If thi $\\textstyle { \\frac { d E } { d c } }$ , providing anolds true, then perturbing the architecture according to the $\\frac { \\dot { d } E } { d c }$ vector (within the constraints of our scheme) should allow us to guide the architecture search through a gradient descent-like procedure. Our preliminary tests with this idea did not yield better SMASH scores than randomly perturbing the architectural definition, though we suspect that this was in part due to our lack of an intuitively satisfying update rule for the discrete architecture space. ",
703
+ "bbox": [
704
+ 174,
705
+ 696,
706
+ 825,
707
+ 810
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "4.3 TRANSFER LEARNING ",
714
+ "text_level": 1,
715
+ "bbox": [
716
+ 176,
717
+ 828,
718
+ 369,
719
+ 842
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Models with weights initially learned on one large dataset frequently outperform models trained from scratch on a smaller dataset; it follows that architectures might display the same behavior. We test on STL-10 (Coates et al., 2011), a small dataset of $9 6 \\mathbf { x } 9 6$ images similar to the CIFAR datasets. We compare the performance of the best-found architecture from CIFAR-100 (with weights trained from scratch on STL-10) to the best-found architecture from running SMASH on STL-10, and a ",
726
+ "bbox": [
727
+ 174,
728
+ 853,
729
+ 825,
730
+ 924
731
+ ],
732
+ "page_idx": 6
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "WRN baseline. For these experiments, we make use of the full 5,000 images in the training set; in the following section we also include comparisons against a WRN baseline using the recommended 10-fold training split. ",
737
+ "bbox": [
738
+ 176,
739
+ 103,
740
+ 823,
741
+ 146
742
+ ],
743
+ "page_idx": 7
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "In this case, we find that the best-found architecture from CIFAR-100 outperforms the best-found architecture from STL-10, achieving $1 7 . 5 4 \\%$ and $2 0 . 2 7 5 \\%$ error, respectively. For reference, a baseline WRN28-10 and WRN40-4 achieve respective $1 5 . 4 3 \\%$ and $1 6 . 0 6 \\%$ errors. This presents an interesting phenomenon: one the one hand, one might expect the architecture discovered on STL-10 to be better-tuned to STL-10 because it was specifically learned on that dataset. On the other hand, CIFAR-100 has significantly more training examples, potentially making it a better dataset for distinguishing between good architectures, i.e. accuracy on CIFAR-100 is more indicative of generality. The better performance of the architecture found on CIFAR-100 would seem to favor the latter hypothesis, suggesting that architecture search benefits from larger training sets more so than domain specificity. ",
748
+ "bbox": [
749
+ 173,
750
+ 152,
751
+ 825,
752
+ 291
753
+ ],
754
+ "page_idx": 7
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "We next investigate how well our best-found CIFAR-100 architecture performs on ModelNet10 (Wu et al., 2015), a 3D object classification benchmark. We train on the voxelated instances of the ModelNet10 training set using the settings of (Brock et al., 2016), and report accuracy on the ModelNet10 test set. Our 8M parameter model achieves an accuracy of $9 3 . 2 8 \\%$ , compared to a $9 3 . 6 1 \\%$ accuracy from a hand-designed Inception-ResNet (Brock et al., 2016) with 18M parameters trained on the larger ModelNet40 dataset. ",
759
+ "bbox": [
760
+ 174,
761
+ 297,
762
+ 825,
763
+ 382
764
+ ],
765
+ "page_idx": 7
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "4.4 BENCHMARKING ",
770
+ "text_level": 1,
771
+ "bbox": [
772
+ 176,
773
+ 398,
774
+ 333,
775
+ 412
776
+ ],
777
+ "page_idx": 7
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "We run SMASH on CIFAR-10 and 100, augmenting our search space from the initial correlation experiment to include variable filter sizes, variable groups, and the full variable op structure shown in Figure 2, and denote the resulting networks SMASHv2. We report the final test performance of the two resulting networks with the highest SMASH scores on CIFAR-10 and 100 in Table 2. ",
782
+ "bbox": [
783
+ 173,
784
+ 424,
785
+ 825,
786
+ 479
787
+ ],
788
+ "page_idx": 7
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "Next, we take our best-found SMASHv2 architecture from CIFAR-100 and train it on STL-10 (Coates et al., 2011) using the recommended 10-fold training splits, and ImageNet32x32 (Chrabaszcz et al., 2017). We compare against Wide ResNet baselines from our own experiments in Tables 3 and those reported by (Chrabaszcz et al., 2017) in 4. Noting the better performance of WRN40-4 on STL-10, we also train a variant of our best architecture with only a single main convolution and 3x3 filters, to comparably reduce the number of parameters. ",
793
+ "bbox": [
794
+ 174,
795
+ 487,
796
+ 825,
797
+ 570
798
+ ],
799
+ "page_idx": 7
800
+ },
801
+ {
802
+ "type": "table",
803
+ "img_path": "images/d46353a58848e4cb13f091fd31ebddfabbc8caffdafd13f4b4bfc64877a0d084.jpg",
804
+ "table_caption": [
805
+ "Table 2: Error rates $( \\% )$ on CIFAR-10 and CIFAR-100 with standard data augmentation $( + )$ "
806
+ ],
807
+ "table_footnote": [],
808
+ "table_body": "<table><tr><td>Method</td><td>Resources</td><td>Depth</td><td>Params</td><td>C10+</td><td>C100+</td></tr><tr><td>FractalNet (Larsson et al.,2017)</td><td></td><td>21</td><td>38.6M</td><td>5.22</td><td>23.30</td></tr><tr><td>with Dropout/Drop-path</td><td></td><td>21</td><td>38.6M</td><td>4.60</td><td>23.73</td></tr><tr><td rowspan=\"2\">Stochastic Depth (Huang et al.,2016)</td><td rowspan=\"2\"></td><td>110</td><td>1.7M</td><td>5.23</td><td>24.58</td></tr><tr><td>1202</td><td>10.2M</td><td>4.91</td><td>-</td></tr><tr><td colspan=\"2\">WideResNet (Zagoruyko and Komodakis.,2016)</td><td>16</td><td>11.0M</td><td>4.81</td><td>22.07</td></tr><tr><td colspan=\"2\">DenseNet-BC (k = 24) (Huang et al.,2017)</td><td>28</td><td>36.5M</td><td>4.17</td><td>20.50</td></tr><tr><td colspan=\"2\">DenseNet-BC (k = 40)</td><td>250</td><td>15.3M</td><td>3.62</td><td>17.60</td></tr><tr><td colspan=\"2\">Shake-Shake (Gastaldi,2017)</td><td>190</td><td>25.6M</td><td>3.46</td><td>17.18</td></tr><tr><td colspan=\"2\">NASwRL(Zoph and Le,2017) 800 GPUs,? days</td><td>26</td><td>26.2M</td><td>2.86</td><td>15.85</td></tr><tr><td colspan=\"2\">NASNet-A(Zoph et al.,2017)</td><td>39</td><td>32.0M</td><td>3.84</td><td>--</td></tr><tr><td colspan=\"2\">MetaQNN (Baker et al., 2017) 10 GPUs,8-10 days</td><td>20</td><td>3.3M</td><td>3.41</td><td></td></tr><tr><td colspan=\"2\">Large-Scale Evolution (Real et al., 2017) 250 GPUs,10 days</td><td>9</td><td>11.18M</td><td>6.92</td><td>27.14</td></tr><tr><td colspan=\"2\"></td><td>-</td><td>5.4M</td><td>5.40</td><td>-</td></tr><tr><td colspan=\"2\">CGP-CNN (Suganuma et al.,2017)</td><td>-</td><td>40.4 M</td><td>-</td><td>23.7</td></tr><tr><td colspan=\"2\">SMASHv1 (ours) 1 GPU,3 days</td><td>-</td><td>1.68M</td><td>5.98</td><td>-</td></tr><tr><td colspan=\"2\">SMASHv2 (ours)</td><td>116 211</td><td>4.6M 16M</td><td>5.53 4.03</td><td>22.07</td></tr></table>",
809
+ "bbox": [
810
+ 189,
811
+ 607,
812
+ 810,
813
+ 814
814
+ ],
815
+ "page_idx": 7
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "Our SMASHv2 nets with 16M parameters achieve final test errors of $2 0 . 6 0 \\%$ on CIFAR-100 and $4 . 0 3 \\%$ on CIFAR-10. This performance is not quite on par with state-of-the-art hand-designed networks, but compares favorably to other automatic design methods that employ RL (Baker et al., 2017; Zoph and Le, 2017) or evolutionary methods (Real et al., 2017; Suganuma et al., 2017). Our networks outperform Large-Scale Evolution (Real et al., 2017) despite requiring significantly less time to discover (though not starting from trivial models) and 10 orders of magnitude less compute. Our method outperforms MetaQNN (Baker et al., 2017) but lags behind Neural Architecture Search (Zoph and Le, 2017), though both methods require vastly more computation time, and unlike Neural Architecture Search, we do not postprocess our discovered architectures through grid search. ",
820
+ "bbox": [
821
+ 173,
822
+ 825,
823
+ 825,
824
+ 924
825
+ ],
826
+ "page_idx": 7
827
+ },
828
+ {
829
+ "type": "table",
830
+ "img_path": "images/4b00146badc71a84fa2aaf623569377cdf296855d0285172314a0fdfd1be8179.jpg",
831
+ "table_caption": [
832
+ "Table 3: Error rates $( \\% )$ on STL-10. "
833
+ ],
834
+ "table_footnote": [],
835
+ "table_body": "<table><tr><td>Model</td><td>Params</td><td>Error</td></tr><tr><td>WRN-40-4</td><td>8.95M</td><td>35.02 ± 1.14</td></tr><tr><td>WRN-28-10</td><td>36.5M</td><td>36.69 ± 2.06</td></tr><tr><td>SMASHv2</td><td>16.2M</td><td>41.52 ± 2.10</td></tr><tr><td>SMASHv2 (3x3)</td><td>4.38M</td><td>37.76 ± 0.58</td></tr></table>",
836
+ "bbox": [
837
+ 192,
838
+ 127,
839
+ 482,
840
+ 214
841
+ ],
842
+ "page_idx": 8
843
+ },
844
+ {
845
+ "type": "table",
846
+ "img_path": "images/d48837e2da0626ff25f7ac0f56d4c467afcb45da94aa3b1fad43104ca475cc32.jpg",
847
+ "table_caption": [
848
+ "Table 4: Error rates $( \\% )$ on Imagenet32x32. "
849
+ ],
850
+ "table_footnote": [],
851
+ "table_body": "<table><tr><td>Model</td><td>Params</td><td>Top-1</td><td>Top-5</td></tr><tr><td>WRN-28-2</td><td>1.6M</td><td>56.92</td><td>30.92</td></tr><tr><td>WRN-28-5</td><td>9.5M</td><td>45.36</td><td>21.36</td></tr><tr><td>WRN-28-10</td><td>37.1M</td><td>40.96</td><td>18.87</td></tr><tr><td>SMASHv2</td><td>16.2M</td><td>38.62</td><td>16.33</td></tr></table>",
852
+ "bbox": [
853
+ 527,
854
+ 127,
855
+ 794,
856
+ 214
857
+ ],
858
+ "page_idx": 8
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "",
863
+ "bbox": [
864
+ 173,
865
+ 251,
866
+ 826,
867
+ 279
868
+ ],
869
+ "page_idx": 8
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "5 FUTURE WORK ",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 176,
877
+ 311,
878
+ 334,
879
+ 328
880
+ ],
881
+ "page_idx": 8
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "We believe this work opens a number of future research paths. The SMASH method itself has several simplistic elements that might easily be improved upon. During training, we sample each element of the configuration one-by-one, independently, and uniformly among all possible choices. A more intelligent method might employ Bayesian Optimization (Snoek et al., 2015) or HyperBand (Li et al., 2017) to guide the sampling with a principled tradeoff between exploring less-frequently sampled architectures against those which are performing well. One might employ a second parallel worker constantly evaluating validation performance throughout training to provide signal to an external optimizer, and change the optimization objective to simultaneously maximize performance while minimizing computational costs. One could also combine this technique with RL methods (Zoph and Le, 2017) and use a policy gradient to guide the sampling. Another simple technique (which our code nominally supports) is using the HyperNet-generated weights to initialize the resulting network and accelerate training, similar to Net2Net (Chen et al., 2016). ",
886
+ "bbox": [
887
+ 174,
888
+ 351,
889
+ 825,
890
+ 517
891
+ ],
892
+ "page_idx": 8
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "Our architecture exploration is fairly limited, and for the most part involves variable layer sizes and skip connections. One could envision a multiscale SMASH that also explores low-level design, varying things such as the activation at each layer, the order of operations, the number of convolutions in a given layer, or whether to use convolution, pooling, or more exotic blocks. One might also search over network-wide design patterns rather than randomly selecting the read-write pattern at each layer. Alternatively, one could consider varying which elements of the network are generated by the HyperNet, which are fixed learned parameters, and one might even make use of fixed unlearned parameters such as Gabor Filters or wavelets. ",
897
+ "bbox": [
898
+ 174,
899
+ 523,
900
+ 825,
901
+ 636
902
+ ],
903
+ "page_idx": 8
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "Our memory-bank view also opens up new possibilities for network design. Each layer’s read and write operations could be designed to use a learned softmax attention mechanism, such that the read and write locations are determined dynamically at inference time. We also do not make use of memory in the traditional \"memory-augmented\" sense, but we could easily add in this capacity by allowing information in the memory banks to persist, rather than zeroing them at every training step. We also only explore one definition of reading and writing, and one might for example change the \"write\" operation to either add to, overwrite, or perhaps even multiply (a la gated networks (Srivastava et al., 2015)) the existing tensor in a given bank. ",
908
+ "bbox": [
909
+ 174,
910
+ 642,
911
+ 825,
912
+ 753
913
+ ],
914
+ "page_idx": 8
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "6 CONCLUSION ",
919
+ "text_level": 1,
920
+ "bbox": [
921
+ 174,
922
+ 787,
923
+ 318,
924
+ 803
925
+ ],
926
+ "page_idx": 8
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "In this work, we explore a technique for accelerating architecture selection by learning a model over network parameters, conditioned on the network’s parametric form. We introduce a flexible scheme for defining network connectivity patterns and generating network weights for highly variable architectures. Our results demonstrate a correlation between performance using suboptimal weights generated by the auxiliary model and performance using fully-trained weights, indicating that we can efficiently explore the architectural design space through this proxy model. Our method achieves competitive, though not state-of-the-art performance on several datasets. ",
931
+ "bbox": [
932
+ 174,
933
+ 825,
934
+ 825,
935
+ 924
936
+ ],
937
+ "page_idx": 8
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "ACKNOWLEDGMENTS ",
942
+ "text_level": 1,
943
+ "bbox": [
944
+ 176,
945
+ 104,
946
+ 326,
947
+ 117
948
+ ],
949
+ "page_idx": 9
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "We would like to thank Harri Edwards, David Ha, Daniel Angelov, Emmanuel Kahembwe, and Iain Murray for their insight. This research was made possible by grants and support from Renishaw plc and the Edinburgh Centre For Robotics. The work presented herein is also partially funded under the European H2020 Programme BEACONING project, Grant Agreement nr. 687676. ",
954
+ "bbox": [
955
+ 174,
956
+ 127,
957
+ 825,
958
+ 179
959
+ ],
960
+ "page_idx": 9
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "REFERENCES ",
965
+ "text_level": 1,
966
+ "bbox": [
967
+ 174,
968
+ 207,
969
+ 285,
970
+ 222
971
+ ],
972
+ "page_idx": 9
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "D. Arpit, Y. Zhou, B.U. Kota, and V. Govindaraju. Normalization propagation: A parametric technique for removing internal covariate shift in deep networks. In ICML, 2016. ",
977
+ "bbox": [
978
+ 174,
979
+ 229,
980
+ 823,
981
+ 255
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "J.L. Ba, J.R. Kiros, and G.E. Hinton. Layer normalization. In NIPS, 2016. ",
988
+ "bbox": [
989
+ 173,
990
+ 263,
991
+ 612,
992
+ 277
993
+ ],
994
+ "page_idx": 9
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "B. Baker, O. Gupta, N. Naik, and R. Raskar. Designing neural network architectures using reinforcement learning. In ICLR, 2017. ",
999
+ "bbox": [
1000
+ 174,
1001
+ 287,
1002
+ 823,
1003
+ 314
1004
+ ],
1005
+ "page_idx": 9
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "J. Bergstra and Y. Bengio. Random search for hyperparameter optimization. In JMLR, 2012. ",
1010
+ "bbox": [
1011
+ 173,
1012
+ 323,
1013
+ 722,
1014
+ 337
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "A. Brock, T. Lim, J.M. Ritchie, and N. Weston. Generative and discriminative voxel modeling with convolutiona neural networks. 3D Deep Learning Workshop at NIPS 2016, 2016. ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 345,
1024
+ 818,
1025
+ 373
1026
+ ],
1027
+ "page_idx": 9
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "T. Chen, I. Goodfellow, and J. Shiens. Net2net: Accelerating learning via knowledge transfer. In ICLR, 2016. ",
1032
+ "bbox": [
1033
+ 173,
1034
+ 381,
1035
+ 820,
1036
+ 396
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "P. Chrabaszcz, I. Loshchilov, and F. Hutter. A downsampled variant of imagennet as an altetrnative to the cifar datasets. arXiv Preprint arXiv: 1707.08819, 2017. ",
1043
+ "bbox": [
1044
+ 173,
1045
+ 405,
1046
+ 823,
1047
+ 431
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "A. Coates, H. Lee, and A.Y. Ng. n analysis of single layer networks in unsupervised feature learning. In AISTATS, 2011. ",
1054
+ "bbox": [
1055
+ 173,
1056
+ 440,
1057
+ 825,
1058
+ 467
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "M. Denil, B. Shakibi, L. Dinh, M. A. Ranzato, and N. de Freitas. Predicting parameters in deep learning. In NIPS, 2013. ",
1065
+ "bbox": [
1066
+ 174,
1067
+ 476,
1068
+ 825,
1069
+ 503
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "D. Floreano, P. Durr, and C. Mattiussi. Neuroevolution: from architectures to learning. In Evolutionary Intelligence, 2008. ",
1076
+ "bbox": [
1077
+ 174,
1078
+ 511,
1079
+ 825,
1080
+ 539
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "X. Gastaldi. Shake-shake regularization of 3-branch residual networks. ICLR 2017 Workshop, 2017. ",
1087
+ "bbox": [
1088
+ 171,
1089
+ 547,
1090
+ 771,
1091
+ 561
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "D. Ha, A. Dai, and Q. Le. Hypernetworks. In ICLR, 2017. ",
1098
+ "bbox": [
1099
+ 173,
1100
+ 570,
1101
+ 519,
1102
+ 584
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. ",
1109
+ "bbox": [
1110
+ 174,
1111
+ 593,
1112
+ 764,
1113
+ 608
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "G. Huang, Y. Sun, Z. Liu, D. Sedra, and K. Q. Weinberger. Deep networks with stochastic depth. In ECCV, 2016. ",
1120
+ "bbox": [
1121
+ 173,
1122
+ 616,
1123
+ 823,
1124
+ 643
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "G. Huang, Z. Liu, K.Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. In CVPR, 2017. ",
1131
+ "bbox": [
1132
+ 174,
1133
+ 651,
1134
+ 825,
1135
+ 679
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. ",
1142
+ "bbox": [
1143
+ 173,
1144
+ 688,
1145
+ 823,
1146
+ 714
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "X. Jia, B. De Brabandere, T. Tuytelaars, and L. V. Gool. Dynamic filter networks. In NIPS, 2016. ",
1153
+ "bbox": [
1154
+ 169,
1155
+ 723,
1156
+ 750,
1157
+ 738
1158
+ ],
1159
+ "page_idx": 9
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "D.P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv Preprint arXiv: 1412.6980, 2014. ",
1164
+ "bbox": [
1165
+ 169,
1166
+ 746,
1167
+ 820,
1168
+ 761
1169
+ ],
1170
+ "page_idx": 9
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. ",
1175
+ "bbox": [
1176
+ 178,
1177
+ 768,
1178
+ 715,
1179
+ 784
1180
+ ],
1181
+ "page_idx": 9
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "G. Larsson, M. Maire, and G. Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. In ICLR, 2017. ",
1186
+ "bbox": [
1187
+ 173,
1188
+ 792,
1189
+ 823,
1190
+ 820
1191
+ ],
1192
+ "page_idx": 9
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, and A. Talwalkar. Hyperband: Bandit-based configuration evaluation for hyperparameter optimization. In ICLR, 2017. ",
1197
+ "bbox": [
1198
+ 171,
1199
+ 828,
1200
+ 823,
1201
+ 854
1202
+ ],
1203
+ "page_idx": 9
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "I. Loshchilov and F. Hutter. Sgdr: Stochastic gradient descent with warm restarts. In ICLR, 2017. ",
1208
+ "bbox": [
1209
+ 169,
1210
+ 863,
1211
+ 750,
1212
+ 878
1213
+ ],
1214
+ "page_idx": 9
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "J.F. Miller and P. Thomson. Cartesian genetic programming. In EuroGP, 2000. ",
1219
+ "bbox": [
1220
+ 174,
1221
+ 887,
1222
+ 642,
1223
+ 901
1224
+ ],
1225
+ "page_idx": 9
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "A. Paszke, S. Gross, and S. Chintala. Pytorch. github.com/pytorch/pytorch, 2017. ",
1230
+ "bbox": [
1231
+ 174,
1232
+ 910,
1233
+ 656,
1234
+ 924
1235
+ ],
1236
+ "page_idx": 9
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. \nE. Real, S. Moore, A. Selle, S. Saxena, Y.L. Suematsu, Q. Le, and A. Kurakin. Large-scale evolution of image classifiers. arXiv Preprint arXiv: 1703.01041, 2017. \nS.-A. Rebuffi, H. Bilen, and A. Vedaldi. Learning multiple visual domains with residual adapters. arXiv Preprint arXiv: 1705.08045, 2017. \nT. Salimans and D.P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In NIPS, 2016. \nA.M. Saxe, P.W. Koh, Z. Chen, M. Bhand, B. Suresh, and A.Y. Ng. On random weights and unsupervised feature learning. In ICML, 2011. \nS. Saxena and J. Verbeek. Convolutional neural fabrics. In NIPS, 2016. \nJ. Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. In Neural Computation, volume 4, pages 131–139, 1992. \nS. Singh, D. Hoiem, and D. Forsyth. Swapout: Learning an ensemble of deep architectures. In NIPS, 2016. \nJ. Snoek, H. Larochelle, and R.P. Adams. Practical bayesian optimization of machinelearning algorithms. In NIPS, 2012. \nJ. Snoek, O. Rippel, K. Swersky, R. Kiros, N. Satish, N. Sundaram, M.M.A. Patwary, Prabhat, and R. P. Adams. Practical bayesian optimization of machine learning algorithms. In ICML, 2015. \nN. Srivastava, G.E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv Preprint arXiv: 1207.0580, 2012. \nR. K. Srivastava, K. Greff, and J. Schmidhuber. Training very deep networks. In NIPS, 2015. \nK.O. Stanley, D.B. D’Ambrosio, and J Gauci. A hypercube-based encoding for evolving large-scale neural networks. In Artificial Life, 15(2):185-212, 2009. \nM. Suganuma, S. Shirakawa, and T. Nagao. A genetic programming approach to designing convolutional neural network architectures. In GECCO, 2017. \nC. Szegedy, S. Ioffe, and V. Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv Preprint arXiv: 1602.07261, 2016. \nD. Wierstra, F.J. Gomez, and J. Schmidhuber. Modeling systems with internal state using evolino. In GECCO, 2005. \nZ. Wu, S. Song, A. Khosla, F. Yu, L. Zhang, X. Tang, and J. Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, 2015. \nJ. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In NIPS, 2014. \nS. Zagoruyko and N. Komodakis. Wide residual networks. arXiv Preprint arXiv: 1605.07146, 2016. \nB. Zoph and Q. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. \nB. Zoph, V. Vasudevan, J. Shlens, and Q. Le. Learning transferable architectures for scalable image recognition. arXiv Preprint arXiv: 1707.07012, 2017. ",
1241
+ "bbox": [
1242
+ 171,
1243
+ 102,
1244
+ 826,
1245
+ 777
1246
+ ],
1247
+ "page_idx": 10
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "APPENDIX A: HYPERPARAMETERS ",
1252
+ "text_level": 1,
1253
+ "bbox": [
1254
+ 176,
1255
+ 102,
1256
+ 465,
1257
+ 117
1258
+ ],
1259
+ "page_idx": 11
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "We briefly describe they hyperparameters used for the SMASH network in our experiments. The SMASHv1 network has memory banks with $N = 6$ channels each, a maximum of 240 memory banks per block (though on average less than half that number), and a depth compression ratio of $D = 3$ . Each layer’s number of units is uniformly sampled between 6 and 42 (along even multiples of 6), and its dilation factor is uniformly sampled between 1 and 3 (with 1 representing no dilation and 3 representing 2 zeros inserted between each filter). We employ a constant bottlneck ratio of 4 as in (Huang et al., 2017), so the output of the HyperNet-generated 1x1 convolution is always 4 times the number of output units. We constrain the main network to have a maximum budget of 16M parameters, though due to our sampling procedure we rarely sample networks with more than 5M parameters. ",
1264
+ "bbox": [
1265
+ 174,
1266
+ 132,
1267
+ 825,
1268
+ 246
1269
+ ],
1270
+ "page_idx": 11
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Our SMASHv2 networks have variable memory bank sizes at each blocks, which we constrain to be multiples of $N = 8$ up to $N _ { m a x } = 6 4$ . We sample filter sizes from [3,5,7], and sample dilation values such that the max spatial extent of a filter in any direction is 9. We sample convolutional groups as factors of the base $N$ value (so [1,2,4,8] for these networks). We put some hand-designed priors on the choice of op configuration (i.e. which convolutions are active), giving slight preference to having all four convolutions active. For SMASHv2 nets we employ a slightly more complex bottleneck ratio: the output of the 1x1 conv is equal to the number of incoming channels while that number is less than twice the number of output units, at which point it is capped (so, a maximum bottleneck ratio of 2). ",
1275
+ "bbox": [
1276
+ 174,
1277
+ 253,
1278
+ 825,
1279
+ 354
1280
+ ],
1281
+ "page_idx": 11
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Our HyperNet is a DenseNet, designed ad-hoc to resemble the DenseNets in the original paper (Huang et al., 2017) within the confines of our encoding scheme, and to have round numbers of channels. It consists of a standard (non-bottleneck) Dense Block with $8 \\ : 3 \\mathrm { x } 3 $ convolutional layers and a growth rate of 10, followed by a 1x1 convolution that divides the number of channels in two, a Dense Block with 10 layers and a growth rate of 10, another compressing 1x1 convolution, a Dense Block with 4 layers and a growth rate of 10, and finally a 1x1 convolution with the designated number of output channels. We use Leaky ReLU with a negative slope of 0.02 as a defense against NaNs, as standard ReLU would obfuscate their presence when we had bugs in our early code revisions; we have not experimented with other activations. ",
1286
+ "bbox": [
1287
+ 174,
1288
+ 361,
1289
+ 825,
1290
+ 463
1291
+ ],
1292
+ "page_idx": 11
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "APPENDIX B: ENCODING SCHEME DETAILS ",
1297
+ "text_level": 1,
1298
+ "bbox": [
1299
+ 176,
1300
+ 102,
1301
+ 540,
1302
+ 118
1303
+ ],
1304
+ "page_idx": 12
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "We adopt a scheme for the layout of the embedding tensor to facilitate flexibility, compatibility with the convolutional toolbox available in standard libraries, and to make each dimension interpretable. First, we place some constraints on the hyperparameters of the main network: each layer’s number of output units must be divisible by the memory bank size $N$ and be less than $N _ { m a x }$ , and the number of input units must be divisible by $D$ , where $N$ is the number of channels in each memory bank, and $N _ { m a x }$ and $D$ are chosen by the user. Applying these constraints allows us to reduce the size of the embedding vector by $D N ^ { 2 }$ , as we will see shortly. ",
1309
+ "bbox": [
1310
+ 174,
1311
+ 132,
1312
+ 825,
1313
+ 209
1314
+ ],
1315
+ "page_idx": 12
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "The input to a standard 2D CNN is $x \\in \\mathbb { R } ^ { B \\times C \\times H \\times L }$ , where $B , C , H$ , and $L$ respectively represent the Batch, Channel, Height, and Length dimensions. Our embedding tensor is $c \\in \\mathbb { R } ^ { 1 \\times ( 2 \\bar { M } + d _ { m a x } ) \\times ( \\bar { N } _ { m a x } / N ) ^ { 2 } \\times n _ { c h } / { D } }$ where $M$ is the maximum number of memory banks in a block, $d _ { m a x }$ is the maximum kernel dilation, and $n _ { c h }$ is the sum total of input channels to the 1x1 convs of the main network. ",
1320
+ "bbox": [
1321
+ 174,
1322
+ 213,
1323
+ 825,
1324
+ 270
1325
+ ],
1326
+ "page_idx": 12
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "The conditional embedding $c$ is a one-hot encoding of the memory banks we read and write at each layer. It has $2 M + d _ { m a x }$ channels, where the first $M$ channels represent which banks are being read from, the next $M$ channels represent which banks are being written to, and the final $d _ { m a x }$ channels are a one-hot encoding of the dilation factor applied to the following 3x3 convolution. The height dimension corresponds to the number of units at each layer, and the length dimension corresponds to the network depth in terms of the total number of input channels. We keep the Batch dimension at 1 so that no signals propagate wholly independently through the HyperNet. Figure 3 shows an example of a small randomly sampled network, its equivalent memory bank representation, and how the read-write pattern is encoded in $c$ . The dilation encoding is omitted in Figure 3 for compactness. ",
1331
+ "bbox": [
1332
+ 173,
1333
+ 276,
1334
+ 825,
1335
+ 390
1336
+ ],
1337
+ "page_idx": 12
1338
+ },
1339
+ {
1340
+ "type": "text",
1341
+ "text": "Our HyperNet has $4 D N ^ { 2 }$ output channels, such that the output of the HyperNet is $W ~ = ~ H ( c ) ~ \\in ~$ $\\mathbb { R } ^ { 1 \\times 4 D \\bar { N } ^ { 2 } \\times ( N _ { m a x } / N ) ^ { 2 } \\times n _ { c h } / D }$ , which we reshape to $W \\in \\mathbb { R } ^ { N _ { m a x } \\times 4 N _ { m a x } n _ { c h } \\times 1 \\times 1 }$ . We generate the weights for the entire main network in a single pass, allowing the HyperNet to predict weights at a given layer based on weights at nearby layers. The HyperNet’s receptive field represents how far up or down the network it can look to predict parameters at a given layer. As we traverse the main network, we slice $W$ along its second axis according to the number of incoming channels, and slice along the first axis according to the width of the given layer. ",
1342
+ "bbox": [
1343
+ 173,
1344
+ 396,
1345
+ 825,
1346
+ 489
1347
+ ],
1348
+ "page_idx": 12
1349
+ },
1350
+ {
1351
+ "type": "text",
1352
+ "text": "APPENDIX C: EXPERIMENT DETAILS ",
1353
+ "text_level": 1,
1354
+ "bbox": [
1355
+ 176,
1356
+ 102,
1357
+ 482,
1358
+ 118
1359
+ ],
1360
+ "page_idx": 13
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "At each training step, we sample a network architecture block-by-block, with a random (but upper bounded) computational budget allocated to each block. For SMASHv1, We use memory banks with $N = 6$ channels each, constrain the number of incoming memory banks to be a multiple of 3 $D = 3$ ), and constrain the number of output units at each layer to be a multiple of 6 (with $N _ { m a x } = 4 2$ ) for compatibility with the memory layout. ",
1365
+ "bbox": [
1366
+ 174,
1367
+ 133,
1368
+ 825,
1369
+ 185
1370
+ ],
1371
+ "page_idx": 13
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Our HyperNet is a 26 layer DenseNet, each layer of which comprises a Leaky ReLU activation followed by a 3x3 convolution with simplified WeightNorm and no biases. We do not use bottleneck blocks, dropout, or other normalizers in the HyperNet. ",
1376
+ "bbox": [
1377
+ 176,
1378
+ 190,
1379
+ 823,
1380
+ 229
1381
+ ],
1382
+ "page_idx": 13
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "When sampling our SMASHv2 networks for evaluation, we first sample 500 random architectures, then select the architecture with the highest score for further evaluation. We begin by perturbing this architecture, with a $5 \\%$ chance of any individual element being randomly resampled, and evaluate 100 random perturbations from this base. We then proceed with 100 perturbations in a simple Markov Chain, where we only accept an update if it has a better SMASH score on the validation set. ",
1387
+ "bbox": [
1388
+ 174,
1389
+ 237,
1390
+ 825,
1391
+ 300
1392
+ ],
1393
+ "page_idx": 13
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "When training a resulting network we make all parameters freely learnable and replace simple WeightNorm with standard BatchNorm. We tentatively experimented with using SMASH generated weights to initialize a resulting net, but found standard initialization strategies to work better, either because of a yet-undiscovered bug in our code, or because of the disparity between the dynamics of the SMASH network using WeightNorm and the resulting network using BatchNorm. ",
1398
+ "bbox": [
1399
+ 174,
1400
+ 308,
1401
+ 825,
1402
+ 371
1403
+ ],
1404
+ "page_idx": 13
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "In line with our claim of \"one-shot\" model search, we keep our exploration of the SMASH design space to a minimum. We briefly experimented with three different settings for N and D, and use a simple, ad-hoc DenseNet architecture for the HyperNet, which we do not tune. We investigated the choice of architecture while examining the SMASH correlation, but stick to the original ad-hoc design for all benchmark experiments. ",
1409
+ "bbox": [
1410
+ 174,
1411
+ 377,
1412
+ 825,
1413
+ 429
1414
+ ],
1415
+ "page_idx": 13
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "When training SMASH, we use Adam (Kingma and Ba, 2014) with the initial parameters proposed by (Radford et al., 2015) When training a resulting network, we use Nesterov Momentum with an initial step size of 0.1 and a momentum value of 0.9. For all tests other than the initial SMASHv1 experiments, we employ a cosine annealing schedule (Loshchilov and Hutter, 2017) without restarts (Gastaldi, 2017). ",
1420
+ "bbox": [
1421
+ 174,
1422
+ 435,
1423
+ 825,
1424
+ 486
1425
+ ],
1426
+ "page_idx": 13
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "For the CIFAR experiments, we train the SMASH network for 100 epochs and the resulting networks for 300 epochs, using a batch size of 50 on a single GPU. On ModelNet10, we train for 100 epochs. On ImageNet32x32, we train for 55 epochs. On STL-10, we train for 300 epochs when using the full training set, and 500 epochs when using the 10-fold training splits. ",
1431
+ "bbox": [
1432
+ 174,
1433
+ 493,
1434
+ 825,
1435
+ 544
1436
+ ],
1437
+ "page_idx": 13
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "For ModelNet-10 tests, we employ 3x3x3 filters (rather than fully variable filter size) to enable our network to fit into memory and keep compute costs manageable, hence why our model only has 8M parameters compared to the base 16M parameters. ",
1442
+ "bbox": [
1443
+ 176,
1444
+ 551,
1445
+ 823,
1446
+ 589
1447
+ ],
1448
+ "page_idx": 13
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "All of our networks are pre-activation, following the order BN-ReLU-Conv if BatchNorm is used, or ReLU-Conv if WeightNorm is used. Our code supports both pre- and post-activation, along with a variety of other options such as which hyperparameters to vary and which to keep constant. ",
1453
+ "bbox": [
1454
+ 174,
1455
+ 597,
1456
+ 825,
1457
+ 635
1458
+ ],
1459
+ "page_idx": 13
1460
+ },
1461
+ {
1462
+ "type": "image",
1463
+ "img_path": "images/5d1f4af74825eb0d9681a53078e49a9ac915aabbcec6dfb348f30d0ced1a15be.jpg",
1464
+ "image_caption": [
1465
+ "Figure 5: (a) SMASH correlation with a crippled HyperNet. Error bars represent 1 standard deviation. (b) SMASH scores vs. rank using average scores from three HyperNets with different seeds. "
1466
+ ],
1467
+ "image_footnote": [],
1468
+ "bbox": [
1469
+ 220,
1470
+ 651,
1471
+ 771,
1472
+ 828
1473
+ ],
1474
+ "page_idx": 13
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "While investigating the SMASH correlation, we initially conducted two brief experiments to guide the choice of experiments in the remainder of the investigation. First, experiment, we train a low-budget SMASH network (to permit more rapid testing) with a much smaller HyperNet relative to the main network (though still the standard ratio of generated to freely learned weights). We expect the decreased capacity HyperNet to be less able to learn to generate good weights for the full range of architectures, and for the correlation between SMASH score and true performance to therefore be weak or nonexistent. The results of this study are shown in Figure 5(a), where we arguably observe a breakdown of the correlation. In addition to repeat trials for each resulting net, we also train two additional SMASH networks with different random seeds and compare their predicted performance against the initial SMASH net in figure 5(b), to get a brief sense for how these values can vary across training runs. ",
1479
+ "bbox": [
1480
+ 174,
1481
+ 885,
1482
+ 825,
1483
+ 924
1484
+ ],
1485
+ "page_idx": 13
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "",
1490
+ "bbox": [
1491
+ 174,
1492
+ 104,
1493
+ 825,
1494
+ 193
1495
+ ],
1496
+ "page_idx": 14
1497
+ },
1498
+ {
1499
+ "type": "text",
1500
+ "text": "Next, we train a high-budget SMASH network and drastically increase the ratio of normally learned parameters to HyperNet-generated parameters, such that the majority of the net’s model capacity is in non-generated weights. Under these conditions, the validation errors achieved with SMASH-generated weights are much lower than validation errors achieved with an equivalent SMASH network with the typical ratio, but the resulting top models are not as performant and we found that (in the very limited number of correlation tests we performed) the SMASH score did not correlate with true performance. This highlights two potential pitfalls: first, if the HyperNet is not responsible for enough of the network capacity, then the aggregate generated and learned weights may not be sufficiently well-adapted to each sampled architecture, and therefore too far from optimal to be used in comparing architectures. Second, comparing SMASH scores for two separate SMASH networks can be misleading, as the SMASH score is a function of both the normally learned and generated weights, and a network with more fixed weights may achieve better SMASH scores even if the resulting nets are no better. ",
1501
+ "bbox": [
1502
+ 174,
1503
+ 199,
1504
+ 825,
1505
+ 339
1506
+ ],
1507
+ "page_idx": 14
1508
+ },
1509
+ {
1510
+ "type": "image",
1511
+ "img_path": "images/4c39c5c235f4e196f97a2a70850037361ebf4e4b23dd3d04b9ef0f9272e5c0ab.jpg",
1512
+ "image_caption": [
1513
+ "Figure 6: A simplified version of our best-found SMASHv2 architecture from CIFAR-100 with the highest SMASH score. N represents number of output units, op which convolutions are active, groups convolution groups, ks kernel size, and d dilation. "
1514
+ ],
1515
+ "image_footnote": [],
1516
+ "bbox": [
1517
+ 251,
1518
+ 146,
1519
+ 730,
1520
+ 795
1521
+ ],
1522
+ "page_idx": 15
1523
+ },
1524
+ {
1525
+ "type": "image",
1526
+ "img_path": "images/e29c5f7e3dcd5405f7ea080919cb5b2d57a5eb8e0e9f8774afd3ad793b0e0a32.jpg",
1527
+ "image_caption": [
1528
+ "Figure 7: A simplified version of our best-found SMASHv1 architecture. N represents number of output units, and d represents the dilation factor for the $3 { \\bf x } 3$ filter. "
1529
+ ],
1530
+ "image_footnote": [],
1531
+ "bbox": [
1532
+ 250,
1533
+ 157,
1534
+ 745,
1535
+ 834
1536
+ ],
1537
+ "page_idx": 16
1538
+ },
1539
+ {
1540
+ "type": "image",
1541
+ "img_path": "images/ecba6fe5f90ae0dea19b7e5ba59e6d15b128a76b06d4aa748772a93916e3e399.jpg",
1542
+ "image_caption": [
1543
+ "Figure 8: An expanded (though still partially simplified) view of the first block of our best SMASHv2 net. "
1544
+ ],
1545
+ "image_footnote": [],
1546
+ "bbox": [
1547
+ 290,
1548
+ 116,
1549
+ 691,
1550
+ 864
1551
+ ],
1552
+ "page_idx": 17
1553
+ },
1554
+ {
1555
+ "type": "image",
1556
+ "img_path": "images/1b29b8eb8c837726eaddbe1177025ed2f35b3991f796273f0f4ce6e1559cbf51.jpg",
1557
+ "image_caption": [
1558
+ "Figure 9: An expanded (though still partially simplified) view of the second block of our best SMASHv1 net. "
1559
+ ],
1560
+ "image_footnote": [],
1561
+ "bbox": [
1562
+ 295,
1563
+ 116,
1564
+ 707,
1565
+ 863
1566
+ ],
1567
+ "page_idx": 18
1568
+ },
1569
+ {
1570
+ "type": "image",
1571
+ "img_path": "images/061e3d60259fbc08cd0d5a6176f696efb5846284ebb8c329a8f086ddddc8b713.jpg",
1572
+ "image_caption": [
1573
+ "Figure 10: An expanded (though still partially simplified) view of the final block of our best SMASHv2 net. Floating paths are an artifact of the graph generation process, and are actually attached to the nearest rectangular node. "
1574
+ ],
1575
+ "image_footnote": [],
1576
+ "bbox": [
1577
+ 215,
1578
+ 280,
1579
+ 782,
1580
+ 689
1581
+ ],
1582
+ "page_idx": 19
1583
+ },
1584
+ {
1585
+ "type": "image",
1586
+ "img_path": "images/6b01783b7554e636c2fa6b1ad27e45da7d663a27bc89ee73bbcc2dcf29ad01f3.jpg",
1587
+ "image_caption": [
1588
+ "Figure 11: An expanded (though still partially simplified) view of the first block of our best SMASHv1 net. Floating paths are an artifact of the graph generation process, and are actually attached to the nearest rectangular node. "
1589
+ ],
1590
+ "image_footnote": [],
1591
+ "bbox": [
1592
+ 246,
1593
+ 126,
1594
+ 743,
1595
+ 849
1596
+ ],
1597
+ "page_idx": 20
1598
+ },
1599
+ {
1600
+ "type": "image",
1601
+ "img_path": "images/74c4198a27b0d4ec70f9fda9e2d31a99c7274e82cc79298193583fa44b382a13.jpg",
1602
+ "image_caption": [
1603
+ "Figure 12: An expanded (though still partially simplified) view of the second block of our best SMASHv1 net. Floating paths are an artifact of the graph generation process, and are actually attached to the nearest rectangular node. "
1604
+ ],
1605
+ "image_footnote": [],
1606
+ "bbox": [
1607
+ 212,
1608
+ 114,
1609
+ 784,
1610
+ 409
1611
+ ],
1612
+ "page_idx": 21
1613
+ },
1614
+ {
1615
+ "type": "image",
1616
+ "img_path": "images/30b0be4dbb9b08d87419fd96f6f5b4023d21709d48ada9645ab80ec2e56c0e8b.jpg",
1617
+ "image_caption": [
1618
+ "Figure 13: An expanded (though still partially simplified) view of the final block of our best SMASHv1 net. Floating paths are an artifact of the graph generation process, and are actually attached to the nearest rectangular node. "
1619
+ ],
1620
+ "image_footnote": [],
1621
+ "bbox": [
1622
+ 210,
1623
+ 505,
1624
+ 785,
1625
+ 848
1626
+ ],
1627
+ "page_idx": 21
1628
+ }
1629
+ ]
parse/train/rydeCEhs-/rydeCEhs-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/4Nt1F3qf9Gn/0.png ADDED

Git LFS Details

  • SHA256: 04fff1e41a213fe18c3a1535b8b67385ad9237e7ef6f4d1d62868cc855709558
  • Pointer size: 131 Bytes
  • Size of remote file: 496 kB
vlm/train/4Nt1F3qf9Gn/1.png ADDED

Git LFS Details

  • SHA256: 550fe071eee2196f47f1b19ba0bd5c537e10b134618d27a5b1d7a37814a28616
  • Pointer size: 131 Bytes
  • Size of remote file: 538 kB
vlm/train/4Nt1F3qf9Gn/2.png ADDED

Git LFS Details

  • SHA256: c861b5262ba8df20a2bd0e58736be4c3044e73c3846b029706a2bec36b883b0d
  • Pointer size: 131 Bytes
  • Size of remote file: 635 kB
vlm/train/4Nt1F3qf9Gn/4.png ADDED

Git LFS Details

  • SHA256: a649a8250e0af122af918583e6d503a619af5701f83d9769d65db86c866056a5
  • Pointer size: 131 Bytes
  • Size of remote file: 576 kB
vlm/train/4Nt1F3qf9Gn/5.png ADDED

Git LFS Details

  • SHA256: 96f7a90a51c3da827b350f301c7faa7b2b77c5498dcda9c158c718dcdcc18fd4
  • Pointer size: 131 Bytes
  • Size of remote file: 576 kB
vlm/train/4Nt1F3qf9Gn/7.png ADDED

Git LFS Details

  • SHA256: 60ed70c9a91fdcf7e345972ab188875ee5004a14427f1f2ca32f2fd2132a965b
  • Pointer size: 131 Bytes
  • Size of remote file: 424 kB
vlm/train/4Nt1F3qf9Gn/8.png ADDED

Git LFS Details

  • SHA256: 5578bd3eca928890cd17c8f0a24524500d5801235c6772f7ee89bbc9dd2078fa
  • Pointer size: 131 Bytes
  • Size of remote file: 413 kB
vlm/train/4Nt1F3qf9Gn/9.png ADDED

Git LFS Details

  • SHA256: c9a97c70faa2794cc25818e11ce386a5db699aae0268950c966467a75bd8d017
  • Pointer size: 131 Bytes
  • Size of remote file: 546 kB
vlm/train/8twKpG5s8Qh/0.png ADDED

Git LFS Details

  • SHA256: 0b1bf931667f2534c21e263a534cd17e0241ded9426fb3e9c8dfd6eade1fd568
  • Pointer size: 131 Bytes
  • Size of remote file: 446 kB
vlm/train/8twKpG5s8Qh/1.png ADDED

Git LFS Details

  • SHA256: dfdf2b1108607edc8537506112dc0a68c60ac481d1d5b2dc5c9a6a3d4f217889
  • Pointer size: 131 Bytes
  • Size of remote file: 506 kB