ZHANGYUXUAN-zR commited on
Commit
5a76301
·
verified ·
1 Parent(s): 80a7902

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/9CPc4EIr2t1/9CPc4EIr2t1.md +294 -0
  2. parse/train/9CPc4EIr2t1/9CPc4EIr2t1_content_list.json +1372 -0
  3. parse/train/9CPc4EIr2t1/9CPc4EIr2t1_middle.json +0 -0
  4. parse/train/9CPc4EIr2t1/9CPc4EIr2t1_model.json +0 -0
  5. parse/train/B1g5sA4twr/B1g5sA4twr.md +442 -0
  6. parse/train/B1g5sA4twr/B1g5sA4twr_content_list.json +0 -0
  7. parse/train/B1g5sA4twr/B1g5sA4twr_middle.json +0 -0
  8. parse/train/B1n8LexRZ/B1n8LexRZ.md +438 -0
  9. parse/train/B1n8LexRZ/B1n8LexRZ_content_list.json +0 -0
  10. parse/train/B1n8LexRZ/B1n8LexRZ_middle.json +0 -0
  11. parse/train/B1n8LexRZ/B1n8LexRZ_model.json +0 -0
  12. parse/train/BkbY4psgg/BkbY4psgg.md +623 -0
  13. parse/train/BkbY4psgg/BkbY4psgg_content_list.json +0 -0
  14. parse/train/BkbY4psgg/BkbY4psgg_middle.json +0 -0
  15. parse/train/BkbY4psgg/BkbY4psgg_model.json +0 -0
  16. parse/train/BygZK2VYvB/BygZK2VYvB.md +316 -0
  17. parse/train/BygZK2VYvB/BygZK2VYvB_content_list.json +1581 -0
  18. parse/train/BygZK2VYvB/BygZK2VYvB_middle.json +0 -0
  19. parse/train/BygZK2VYvB/BygZK2VYvB_model.json +0 -0
  20. parse/train/ByxdUySKvS/ByxdUySKvS.md +310 -0
  21. parse/train/ByxdUySKvS/ByxdUySKvS_content_list.json +1538 -0
  22. parse/train/ByxdUySKvS/ByxdUySKvS_middle.json +0 -0
  23. parse/train/ByxdUySKvS/ByxdUySKvS_model.json +0 -0
  24. parse/train/HygUOoC5KX/HygUOoC5KX.md +0 -0
  25. parse/train/HygUOoC5KX/HygUOoC5KX_content_list.json +0 -0
  26. parse/train/HygUOoC5KX/HygUOoC5KX_middle.json +0 -0
  27. parse/train/HygUOoC5KX/HygUOoC5KX_model.json +0 -0
  28. parse/train/KUDUoRsEphu/KUDUoRsEphu.md +362 -0
  29. parse/train/KUDUoRsEphu/KUDUoRsEphu_content_list.json +1861 -0
  30. parse/train/KUDUoRsEphu/KUDUoRsEphu_middle.json +0 -0
  31. parse/train/KUDUoRsEphu/KUDUoRsEphu_model.json +0 -0
  32. parse/train/SklcyJBtvB/SklcyJBtvB.md +406 -0
  33. parse/train/SklcyJBtvB/SklcyJBtvB_content_list.json +0 -0
  34. parse/train/SklcyJBtvB/SklcyJBtvB_middle.json +0 -0
  35. parse/train/SklcyJBtvB/SklcyJBtvB_model.json +0 -0
  36. parse/train/ajOrOhQOsYx/ajOrOhQOsYx_content_list.json +0 -0
  37. parse/train/ajOrOhQOsYx/ajOrOhQOsYx_model.json +0 -0
  38. parse/train/rygG4AVFvH/rygG4AVFvH.md +334 -0
  39. parse/train/rygG4AVFvH/rygG4AVFvH_content_list.json +1827 -0
  40. parse/train/rygG4AVFvH/rygG4AVFvH_middle.json +0 -0
  41. parse/train/rygG4AVFvH/rygG4AVFvH_model.json +0 -0
  42. vlm/train/2LdBqxc1Yv/0.png +3 -0
  43. vlm/train/2LdBqxc1Yv/1.png +3 -0
  44. vlm/train/2LdBqxc1Yv/10.png +3 -0
  45. vlm/train/2LdBqxc1Yv/11.png +3 -0
  46. vlm/train/2LdBqxc1Yv/2.png +3 -0
  47. vlm/train/2LdBqxc1Yv/3.png +3 -0
  48. vlm/train/2LdBqxc1Yv/4.png +3 -0
  49. vlm/train/2LdBqxc1Yv/5.png +3 -0
  50. vlm/train/2LdBqxc1Yv/6.png +3 -0
parse/train/9CPc4EIr2t1/9CPc4EIr2t1.md ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Stable Neural ODE with Lyapunov-Stable Equilibrium Points for Defending Against Adversarial Attacks
2
+
3
+ # Qiyu Kang∗
4
+
5
+ Continental-NTU Corporate Lab Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore kang0080@e.ntu.edu.sg
6
+
7
+ Yang Song∗ School of Electrical and Electronic Engineering Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore songy@ntu.edu.sg
8
+
9
+ # Qinxu Ding
10
+
11
+ School of Business
12
+ Singapore University of Social Sciences
13
+ 463 Clementi Road, 599494, Singapore qinxuding@suss.edu.sg
14
+
15
+ Wee Peng Tay School of Electrical and Electronic Engineering Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore wptay@ntu.edu.sg
16
+
17
+ # Abstract
18
+
19
+ Deep neural networks (DNNs) are well-known to be vulnerable to adversarial attacks, where malicious human-imperceptible perturbations are included in the input to the deep network to fool it into making a wrong classification. Recent studies have demonstrated that neural Ordinary Differential Equations (ODEs) are intrinsically more robust against adversarial attacks compared to vanilla DNNs. In this work, we propose a stable neural ODE with Lyapunov-stable equilibrium points for defending against adversarial attacks (SODEF). By ensuring that the equilibrium points of the ODE solution used as part of SODEF is Lyapunov-stable, the ODE solution for an input with a small perturbation converges to the same solution as the unperturbed input. We provide theoretical results that give insights into the stability of SODEF as well as the choice of regularizers to ensure its stability. Our analysis suggests that our proposed regularizers force the extracted feature points to be within a neighborhood of the Lyapunov-stable equilibrium points of the ODE. SODEF is compatible with many defense methods and can be applied to any neural network’s final regressor layer to enhance its stability against adversarial attacks.
20
+
21
+ # 1 Introduction
22
+
23
+ Although deep learning has found successful applications in many tasks such as image classification [1, 2], speech recognition [3], and natural language processing [4], the vulnerability of deep learning to adversarial attacks (e.g., see [5]) has limited its real-world applications due to performance and safety concerns in critical applications. Inputs corrupted with human-imperceptible perturbations can easily fool many vanilla deep neural networks (DNNs) into mis-classifying them and thus significantly impact their performance.
24
+
25
+ Recent studies [6–8] have applied neural Ordinary Differential Equations (ODEs) [9] to defend against adversarial attacks. Some works like [6] have revealed interesting intrinsic properties of
26
+
27
+ ODEs that make them more stable than conventional convolutional neural networks (CNNs). The paper [6] proposes a time-invariant steady neural ODE (TisODE) using the property that the integral curves from a ODE solution starting from different initial points (inputs) do not intersect and always preserve uniqueness in the solution function space. However, this does not guarantee that small perturbations of the initial point lead to small perturbations of the integral curve output at a later time $T$ . The authors thus proposed a regularizer to limit the evolution of the curves by forcing the integrand to be close to zero. However, neither the non-intersecting property nor the steady-state constraint used in TisODE can guarantee robustness against input perturbations since these constraints do not ensure that the inputs are within a neighborhood of Lyapunov-stable equilibrium points. An example is an ODE that serves as an identity mapping is not robust to input perturbations but satisfies all the constraints proposed in [6].
28
+
29
+ In this paper, our objective is to design a neural ODE such that the features extracted are within a neighborhood of the Lyapunov-stable equilibrium points of the ODE. We first develop a diversity promoting technique applied in the final fully connected (FC) layer to improve the ODE’s stability and analyze the reasons why. We then propose a stable neural ODE with Lyapunov-stable equilibrium points to eliminate the effects of perturbations in the input. From linear control theory [10], a linear time-invariant system $\mathrm { d } { \mathbf { z } ( t ) } / \mathrm { d } t = { \mathbf { A } } { \mathbf { z } ( t ) }$ , where $\mathbf { A }$ is a constant matrix, is exponentially stable if all eigenvalues of $\mathbf { A }$ have negative real parts. Specifically, we propose to force the Jacobian matrix of the ODE used in the neural ODE to have eigenvalues with negative real parts. Instead of directly imposing constraints on the eigenvalues of the matrix, which lead to high computational complexity when the Jacobian matrix is large, we instead add constraints to the matrix elements to implicitly force the real parts of its eigenvalues to be negative.
30
+
31
+ Our main contributions are summarized as follows:
32
+
33
+ 1. Based on the concept of Lyapunov-stable equilibrium points, we propose a simple yet effective technique to improve the robustness of neural ODE networks by fixing the final FC layer to be a matrix whose rows have unit norm and such that the maximum cosine similarity between any two rows is minimized. Such a FC layer can be constructed off-line.
34
+ 2. We propose a stable neural ODE for deFending against adversarial attacks (SODEF) to suppress the input perturbations. We derive an optimization formulation for SODEF to force the extracted feature points to be within a neighborhood of the Lyapunov-stable equilibrium points of the SODEF ODE. We provide sufficient conditions for learning a robust feature representation under SODEF.
35
+ 3. We test SODEF on several widely used datasets MNIST [11], CIFAR-10 and CIFAR-100 [12] under well-known adversarial attacks. We demonstrate that SODEF is robust against adversarial white-box attacks with improvement in classification accuracy of adversarial examples under PGD attack [13] of up to $4 4 . 0 2 \%$ , $5 2 . 5 4 \%$ and $1 8 . 9 1 \%$ percentage points compared to another current state-of-the-art neural ODE network TisODE [6] on MNIST, CIFAR-10 and CIFAR-100, respectively. Similar improvements in classification accuracy of adversarial examples of up to $\bar { 4 3 . 6 9 \% }$ , $5 2 . 3 8 \%$ and $\mathrm { \bar { 1 8 . 9 9 \% } }$ percentage points compared to ODE net [9] are also obtained.
36
+
37
+ The rest of this paper is organized as follows. We provide essential preliminaries on neural ODE and its stability analysis in Section 2. In Section 3, we present SODEF model architecture and its training method. We show how to maximize the distance between stable equilibrium points of neural ODEs. We propose an optimization and present theoretical results on its stability properties. We summarize experimental results in Section 4 and conclude the paper in Section 5. The proofs for all lemmas and theorems proposed in this paper are given in the supplementary material. We also refer interested readers to the supplementary material for a more detailed account of related works [14–16, 6] and some popular adversarial attacks [17, 13] that are used to verify the robustness of our proposed SODEF. In the paper, we use lowercase boldface characters like $\mathbf { z }$ to denote vectors in $\mathbb { R } ^ { n }$ , capital boldface characters like $\mathbf { A }$ to denote matrices in $\mathbb { R } ^ { n \times n }$ , and normal characters like $z$ to denote scalars except that the notation $( x , y )$ are normal characters reserved to denote the input and label pairs. A vector $\mathbf { z } \in \mathbb { R } ^ { n }$ is represented as $( \mathbf { z } ^ { ( 1 ) } , \mathbf { z } ^ { ( 2 ) } , \ldots , \mathbf { z } ^ { ( n ) } )$ . The $( i , j )$ -th element of a matrix $\mathbf { A }$ is $\mathbf { A } _ { i j }$ or $[ \mathbf { A } ] _ { i j }$ . The Jacobian matrix of a function $f : \mathbb { R } ^ { n } \mapsto \mathbb { R } ^ { n }$ evaluated at $\mathbf { z }$ is denoted as $\nabla f ( \mathbf { z } )$ The set of functions $\mathbb { R } ^ { n } \mapsto \mathbb { R } ^ { n }$ with continuous first derivatives is denoted as $C ^ { 1 } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } )$ .
38
+
39
+ # 2 Preliminaries: Neural ODE and Stability
40
+
41
+ In a neural ODE layer, the relation between the layer input ${ \bf z } ( 0 )$ and output ${ \mathbf z } ( T )$ is described as the following differential equation:
42
+
43
+ $$
44
+ \frac { \mathrm { d } \mathbf { z } ( t ) } { \mathrm { d } t } = f _ { \pmb { \theta } } ( \mathbf { z } ( t ) , t )
45
+ $$
46
+
47
+ where $f _ { \pmb \theta } : \mathbb { R } ^ { n } \times [ 0 , \infty ) \mapsto \mathbb { R } ^ { n }$ denotes the non-linear trainable layers that are parameterized by weights $\pmb { \theta }$ and $\mathbf { z } : [ 0 , \infty ) \mapsto \mathbb { R } ^ { n }$ represents the $n$ -dimensional state of the neural ODE. Neural ODEs are the continuous analog of residual networks where the hidden layers of residual networks can be regarded as discrete-time difference equations ${ \bf z } ( t + 1 ) = { \bf z } ( t ) + { f _ { \theta } } ( { \bf z } ( t ) , t )$ . In this work, for simplicity, we only consider the time-invariant (autonomous) case $f _ { \pmb \theta } ( \mathbf { z } ( t ) , t ) = f _ { \pmb \theta } ( \mathbf { z } ( t ) )$ , where the dynamical system does not explicitly depend on $t$ . For such non-linear dynamical systems, the following theorem shows that under mild conditions, its behaviour can be studied via linearization near special points called hyperbolic equilibrium points.
48
+
49
+ Theorem 1 (Hartman–Grobman Theorem [18]). Consider a system evolving in time with state $\mathbf { z } ( t ) \in \mathbb { R } ^ { n }$ that satisfies the differential equation $\frac { \mathrm { d } { \bf z } ( t ) } { \mathrm { d } t } = f ( { \bf z } ( t ) )$ for some $f \in C ^ { 1 } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } ) ;$ , $f ( \mathbf { z } ) = ( f ^ { ( 1 ) } ( \mathbf { z } ) , \ldots , f ^ { ( n ) } ( \mathbf { z } ) )$ . Suppose the map has a hyperbolic equilibrium state $\mathbf { z } ^ { \ast } \in \mathbb { R } ^ { n }$ , i.e., $f ( { \bf z } ^ { * } ) = 0$ and the Jacobian matrix with real part equal to zer $\nabla f = [ \partial f ^ { ( i ) } / \partial \mathbf { z } ^ { ( j ) } ] _ { i , j = 1 } ^ { n }$ of hb $f$ evalurhood at of $\textbf { z } = \textbf { z } ^ { * }$ has nolibrium $N _ { \mathbf { z } ^ { * } }$ point $\mathbf { z } ^ { \ast }$ and a homeomorphism $g : N _ { \mathbf { z } ^ { * } } \mapsto \mathbb { R } ^ { n }$ , such that $g ( \mathbf { z } ^ { * } ) = 0$ and in the neighbourhood $N _ { \mathbf { z } ^ { * } }$ , the flow of $\frac { \mathrm { d } { \bf z } ( t ) } { \mathrm { d } t } = f ( { \bf z } ( t ) )$ is topologically conjugate by the continuous map $\bar { \mathbf { z } } ( t ) = g ( \mathbf { z } ( t ) )$ to the flow of its linearization $\frac { \mathrm { d } \bar { \mathbf { z } } ( t ) } { \mathrm { d } t } = \nabla f ( \mathbf { z } ^ { * } ) \cdot \bar { \mathbf { z } } ( t ) .$
50
+
51
+ The theorem states that when the Jacobian matrix at the zeros of $f$ has no eigenvalue with zero real part, the behaviour of the original dynamical system can be studied using the simpler linearization of the system around those zeros. We next review some definitions and theorems from linear control theory [10].
52
+
53
+ Definition 1 (Lyapunov Stability [10]). The linear time-invariant system $\frac { \mathrm { d } \bar { \mathbf { z } } ( t ) } { \mathrm { d } t } = \mathbf { A } \bar { \mathbf { z } } ( t )$ with constant matrix A is marginally stable or stable in the sense of Lyapunov if every finite initial state $\bar { \mathbf { z } } ( 0 )$ excites a bounded response. It is asymptotically stable if every finite initial state excites $a$ bounded response, which, in addition, approaches 0 as $t \to \infty$ .
54
+
55
+ Theorem 2 (Lyapunov Stability Theorem [10]). a) The equation $\frac { \mathrm { d } \bar { \mathbf { z } } ( t ) } { \mathrm { d } t } = \mathbf { A } \bar { \mathbf { z } } ( t ) )$ is marginally stable if and only if all eigenvalues of A have zero or negative real parts and those with zero real parts are simple roots of the minimal polynomial of A. $^ b$ ) The equation $\frac { \mathrm { d } \bar { \mathbf { z } } ( t ) } { \mathrm { d } t } = \mathbf { A } \bar { \mathbf { z } } ( t )$ is asymptotically stable if and only if all eigenvalues of A have negative real parts.
56
+
57
+ In Theorem 1, we say that a hyperbolic equilibrium point is Lyapunov-stable if all eigenvalues of the Jacobian matrix evaluated at it have negative real parts. From Theorems 1 and 2, we see that a small perturbation around the Lyapunov-stable equilibrium point ${ \bf z } ( 0 )$ leads to $\tilde { \mathbf { z } } ( t ) \to \mathbf { z } ( 0 )$ as $t \to \infty$ , i.e., $\exists \delta > 0$ such that for all $\tilde { \mathbf { z } } ( 0 )$ with $\lVert { \mathbf z } ( 0 ) \dot { - } \tilde { { \mathbf z } } ( 0 ) \rVert _ { 2 } \dot { < } \delta$ , we have $\| \widetilde { \mathbf { z } } ( t ) - \mathbf { z } ( 0 ) \| _ { 2 } \to \dot { 0 }$ as $t \to \infty$ , where $\tilde { \mathbf { z } } ( t )$ is the ODE solution for the perturbed input $\tilde { \mathbf { z } } ( 0 )$ . In the context of neural network adversarial attacks, if the malicious perturbations around the ODE input ${ \bf z } ( 0 )$ is small, then the output ${ \mathbf z } ( T )$ for large enough $T$ will not be affected significantly by the perturbation. Consequently, the succeeding network layers after the neural ODE layer can still perform well without being affected by the input perturbation. The perturbation weakening phenomenon around Lyapunov-stable equilibrium points works like a noise filter and acts as a defense against adversarial attacks.
58
+
59
+ We require the following definition and result in our stability analysis.
60
+
61
+ Definition 2 (Strictly diagonally dominant [19]). Let $\mathbf { A } \in \mathbb { C } ^ { n \times n }$ . We say that A is strictly diagonally dominant if $\begin{array} { r } { \left| { { { \mathbf { A } } _ { i i } } } \right| > \sum _ { j \neq i } \left| { { { \mathbf { A } } _ { i j } } } \right| } \end{array}$ for all $i = 1 , . . . , n$ .
62
+
63
+ Theorem 3 (Levy–Desplanques theorem [19]). If $\mathbf { A } \in \mathbb { C } ^ { n \times n }$ is strictly diagonally dominant and if every main diagonal entry of A is real and negative, then $A$ is non-singular and every eigenvalue of A has negative real part.
64
+
65
+ ![](images/96641a4aad1ec2c9f3138777e3d67fc9ff9849146d1c1b15becd36b84d50c353.jpg)
66
+ Fig. 1: SODEF model architecture.
67
+
68
+ Lemma 1. Given $k$ distinct points $\mathbf { z } _ { i } \in \mathbb { R } ^ { n }$ and matrices $\mathbf { A } _ { i } \in \mathbb { R } ^ { n \times n }$ , $i = 1 , . . . , k$ , there exists a function $f \in C ^ { 1 } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } )$ such that $f ( \mathbf { z } _ { i } ) = 0$ and $\nabla f _ { \pmb { \theta } } ( \mathbf { z } _ { i } ) = \mathbf { A } _ { i }$ .
69
+
70
+ # 3 SODEF Architecture
71
+
72
+ We consider a classification problem with $L$ classes. The proposed SODEF model architecture is shown in Fig. 1. The input $x \in X$ (e.g., an image) is first passed through a feature extractor $h _ { \phi } : X \mapsto \mathbb { R } ^ { n }$ to obtain an embedding feature representation ${ \bf z } ( 0 )$ . A neural ODE layer $f _ { \theta }$ follows as a nonlinear feature mapping to stabilize the feature representation output ${ \bf z } ( 0 )$ from $h _ { \phi }$ . The final FC layer $\mathbf { V }$ serves as a linear mapping to generate a prediction vector based on the output $\mathbf { \dot { z } } ( T )$ of the neural ODE layer. The parameters $\phi , \theta$ and $\mathbf { V }$ are parameterized weights for the feature extractor, neural ODE layer and FC layer, respectively.
73
+
74
+ We provide motivation and design guidance for the FC layer V in Section 3.1, which attempts to separate Lyapunov-stable equilibrium points implicitly by maximizing the similarity distance between feature representations corresponding to the $L$ different classes. Experimental results demonstrate the advantages of our diversity promoting FC layer in Section 3.1 with comparisons to traditional neural ODEs without diversity promoting.
75
+
76
+ However, the embedded features after using diversity promoting are not guaranteed to locate near the Lyapunov-stable equilibrium points. In Section 3.2, we formulate an optimization problem to force embedding features to locate near the Lyapunov-stable equilibrium points. We introduce optimization constraints to force the Jacobian matrix of the ODE in our neural ODE layer to have eigenvalues with negative real parts at the Lyapunov-stable equilibrium points. Instead of directly imposing constraints on the eigenvalue of the matrix, which may be computationally complex especially when the matrix is large, we add constraints to the matrix elements instead.
77
+
78
+ # 3.1 Maximizing the Distance between Lyapunov-Stable Equilibrium Points
79
+
80
+ From Section 2, we observe that points in a small neighbourhood of a Lyapunov-stable equilibrium point is robust against adversarial perturbations. We call this neighborhood a stable neighborhood. However Lyapunov-stable equilibrium points for different classes may very well locate near each other and therefore each stable neighborhood may be very small, leading to poor adversarial defense. In this section, we propose to add a FC layer after the neural ODE layer given by (1) to avoid this scenario. The purpose of the FC layer is to map the output of the neural ODE layer to a feature vector $\mathbf { v } _ { l }$ if the input $x$ belongs to the class $l = 1 , \ldots , L$ . We design the FC layer so that the cosine similarities between different $\mathbf { v } _ { l }$ ’s are minimized.
81
+
82
+ Lemma 2. Given a set of $k$ unit vectors $\mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { k }$ in $\mathbb { R } ^ { n }$ , where $n \geq k$ , let $a ( \mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { k } ) =$ $\mathrm { m a x } _ { i \neq j } { \mathbf { \Delta v } _ { i } ^ { \mathsf { T } } } { \mathbf { v } _ { j } }$ . Then $\operatorname* { m i n } a ( \mathbf { v } _ { 1 } , . . . , \mathbf { v } _ { k } ) = 1 / ( 1 - k )$ , where the minimum is taken over all possible sets of $k$ unit vectors $\mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { k }$ .
83
+
84
+ Corollary 1. Consider a $k \times k$ matrix $\mathbf { B } = [ b _ { i j } ] _ { i , j = 1 } ^ { k }$ with $b _ { i i } = 1$ and $b _ { i j } = 1 / ( 1 - k )$ , $\forall i \ne j$ Let the eigen decomposition of $\mathbf { B }$ be $\mathbf { B } = \mathbf { U } \pmb { \Sigma } \bar { \mathbf { U } } ^ { \dag }$ . For any $n \geq k$ and $i = 1 , \ldots , k$ , let $\mathbf { v } _ { i }$ be the $i$ -th column of $\mathbf { Q } \mathbf { \Sigma } ^ { \mathrm { { X } ^ { 1 / 2 } \bar { U } ^ { \top } } }$ , where $\mathbf { Q }$ is any $n \times k$ matrix such that $\mathbf { Q } ^ { \intercal } \mathbf { Q } = \mathbf { I } _ { k }$ . Then, $a ( \mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { k } ) = \operatorname* { m a x } _ { i \neq j } \mathbf { v } _ { i } ^ { \mathsf { T } } \mathbf { v } _ { j } = { 1 } / ( 1 - k )$ .
85
+
86
+ Corollary 1 suggests a diversity promoting scheme to maximally separate the equilibrium points of the neural ODE layer. The FC layer is represented by an $n \times L$ matrix $\mathbf { V } = \left[ \mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { L } \right]$ , where $n$ is the dimension of ${ \mathbf z } ( T )$ , the output from the neural ODE layer. If ${ \mathbf z } ( T )$ is generated from an input from class $l$ , it is mapped to $\mathbf { v } _ { l }$ . By minimizing the maximum cosine similarity $a ( \mathbf { v } _ { 1 } , \ldots , \mathbf { v } _ { k } ) = \operatorname* { m a x } _ { i \neq j } \mathbf { v } _ { i } ^ { \mathsf { T } } \mathbf { v } _ { j }$ between the representations from two different classes, we ensure that the output of SODEF is robust to perturbations in the input. Corollary 1 provides a way to choose the FC layer weights $\mathbf { V }$ .
87
+
88
+ To validate our observations, we conduct experiments to compare the robustness of ODE net [9] and TisODE [6] with and without our proposed FC layer V, on two standard datasets: MNIST [2] and CIFAR10 [12] 2. On the MNIST dataset, all models consist of four convolutional layers and one fully-connected layer. On the CIFAR10 dataset, the networks are similar to those for MNIST except the down-sampling network is a stack of 2 ResNet blocks. In practice, the neural ODE can be solved with different numerical solvers such as the Euler method and the Runge-Kutta methods [9]. Here, we use Runge-Kutta of order 5 in our experiments. Our implementation builds on the open-source neural ODE codes.3 During training, no Gaussian noise or adversarial examples are augmented into the training set. We test the performance of our model in defending against white-box attacks FGSM [17] and PGD [13] . The parameters for different attack methods used in this paper are given in the supplementary material. From Tables 1 and 2, we observe that for both datasets, our fixed FC layer improves each network’s defense ability by a significant margin. We visualize the features before the final FC layer using t-SNE [20] in Figs. 2 and 3. We observe that with the FC layer, the features for different classes are well separated even under attacks.
89
+
90
+ Table 1: Classification accuracy $( \% )$ on adversarial MNIST examples, where the superscript + indicates the last FC layer is fixed to be $\mathbf { V }$ .
91
+
92
+ <table><tr><td>Attack</td><td>Para.</td><td>ODE</td><td>ODE+</td><td>TisODE</td><td>TisODE+</td></tr><tr><td>None</td><td>-</td><td>99.6</td><td>99.7</td><td>99.5</td><td>99.7</td></tr><tr><td>FGSM</td><td>∈ = 0.3</td><td>31.4</td><td>52.8</td><td>45.9</td><td>63.5</td></tr><tr><td>PGD</td><td>∈=0.3</td><td>0.29</td><td>0.30</td><td>0.4</td><td>20.20</td></tr></table>
93
+
94
+ Table 2: Classification accuracy $( \% )$ on adversarial CIFAR10 examples, where the superscript + indicates the last FC layer is fixed to be $\mathbf { V }$ .
95
+
96
+ <table><tr><td>Attack</td><td>Para.</td><td>ODE ODE+</td><td>TisODE</td><td>TisODE+</td></tr><tr><td>None</td><td>-</td><td>87.0 85.0</td><td>87.4</td><td>81.8</td></tr><tr><td>FGSM</td><td>∈ = 0.1</td><td>12.9 47.6</td><td>13.1</td><td>41.9</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>7.8 14.7</td><td>7.4</td><td>16.2</td></tr></table>
97
+
98
+ ![](images/2298e75b6e25d3394e76c905205ab4b066d9a6a5a3e690669fcd410610b0c475.jpg)
99
+ Fig. 2: t-SNE visualization results on the features before the final FC layer. The input is the test set of MNIST. Left: trained with TisODE, middle: TisODE using a randomly chosen orthogonal matrix as the final FC, right: TisODE using proposed $\mathbf { V }$ as the final FC.
100
+
101
+ # 3.2 Objective Formulation and Stability
102
+
103
+ In this subsection, we formulate an optimization framework for SODEF to force output features to locate within the stable neighborhood of Lyapunov-stable equilibrium points. We make the following assumption.
104
+
105
+ Assumption 1. The input x takes values in a compact metric space $X$ and has probability distribution $\mu$ . The feature extractor $h _ { \phi }$ is injective and continuous.
106
+
107
+ ![](images/7a95cfded3451c7f092fca178fd0f289e9f1e03180a9b9200b577ccb2fbf9ae9.jpg)
108
+ Fig. 3: t-SNE visualization results on the features before the final FC layer. The input is the adversarial examples of the test set of MNIST generated using FGSM method at $\epsilon = 0 . 3$ . Left: trained with TisODE, middle: TisODE using a randomly chosen orthogonal matrix as the final FC, right: TisODE using proposed $\mathbf { V }$ as the final FC.
109
+
110
+ The above assumption is satisfied if the input $x$ (e.g., an image) resides in a bounded and closed set of a Euclidean space. We denote the pushforward measure (still a probability distribution) of $\mu$ under the continuous feature extractor mapping $h _ { \phi }$ as $\nu _ { \phi } = \mu \circ h _ { \phi } ^ { - 1 }$ , where $\circ$ denotes function composition. The conditional probability distribution for the embedding of each class $l \in \{ 1 , . . . , L \}$ has compact support $E _ { l } \subset \mathbb { R } ^ { n }$ since $E _ { l }$ is closed and $h _ { \phi } ( X )$ is bounded in $\mathbb { R } ^ { n }$ . In Section 3.1, the FC layer $\mathbf { V }$ tries to maximize the distance between $E _ { l }$ , $l = 1 , \ldots , L$ . In this section for analysis purposes, we also assume the following.
111
+
112
+ Assumption 2. We have $E _ { l } \bigcap E _ { l ^ { \prime } } = \varnothing i f l \neq l ^ { \prime }$ , i.e., the supports of each class are pairwise disjoint.
113
+
114
+ Our objective function is formulated as follows, which is explained in detail in the sequel:
115
+
116
+ $$
117
+ \begin{array} { r l } & { \underset { \theta , \phi } { \operatorname* { m i n } } \mathbb { E } _ { \boldsymbol { \mu } } \ell ( { \mathbf { V } } ^ { \top } ( { \mathbf { z } } ( T ) ) , y _ { i } ) } \\ & { \mathrm { s . t . } \ \mathbb { E } _ { \boldsymbol { \nu } _ { \phi } } \| f _ { \theta } ( { \mathbf { z } } ( 0 ) ) \| _ { 2 } < \epsilon , \ f _ { \theta } \in C ^ { 1 } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } ) , } \\ & { \quad \quad \quad \mathbb { E } _ { \boldsymbol { \nu } _ { \phi } } \left[ \nabla f _ { \theta } ( { \mathbf { z } } ( 0 ) ) \right] _ { i i } < 0 , \ \forall i = 1 , \ldots , n , } \\ & { \quad \quad \mathbb { E } _ { \boldsymbol { \nu } _ { \phi } } \left[ | [ \nabla f _ { \theta } ( { \mathbf { z } } ( 0 ) ) ] _ { i i } | - \sum _ { j \neq i } | [ \nabla f _ { \theta } ( { \mathbf { z } } ( 0 ) ) ] _ { i j } | \right] > 0 , \ \forall i = 1 , \ldots , n , } \end{array}
118
+ $$
119
+
120
+ $\mathbf { z } ( 0 ) = h _ { \phi } ( x )$ , and ${ \mathbf z } ( T )$ is the output of (1) with input ${ \bf z } ( 0 )$ .
121
+
122
+ Here, $\ell$ is a loss function and $\epsilon > 0$ is a positive constant. The constraints (3) to (5) force ${ \bf z } ( 0 )$ to be near the Lyapunov-stable equilibrium points with strictly diagonally dominant derivatives. We limit the $f _ { \theta }$ to be in $C ^ { 1 } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } )$ to satisfy the condition in Theorem 1. From [21], we also know that standard multi-layer feed forward networks with as few as a single hidden layer and arbitrary bounded and non-constant activation function are universal approximators for $C ^ { 1 ^ { \prime } } ( \mathbb { R } ^ { n } , \mathbb { R } ^ { n } )$ functions with respect to some performance criteria provided only that sufficiently many hidden units are available.
123
+
124
+ As a comparison, TisODE [6] only includes a constraint similar to (3), which in general provides no guarantee to force ${ \bf z } ( 0 )$ near the Lyapunov-stable equilibrium points. In the extreme case with parameters $\theta = 0$ for $f _ { \theta }$ such that $f _ { \pmb { \theta } } = 0$ , the ODE degenerates to an identity mapping. No $\mathbf { z } ( 0 ) \in \mathbb { R } ^ { n }$ can now be a Lyapunov-stable equilibrium point, and no stability can therefore be guaranteed to defend against adversarial attacks even though the ODE curves still possess the nonintersecting property and steady-state constraint, which were cited as reasons for the stability of TisODE.
125
+
126
+ Instead of directly optimizing the above objective function, in our implementation, we optimize the following empirical Lagrangian with a training set $\left\{ \left( x _ { k } , y _ { k } \right) : k = 1 , { \overset { - } { \ldots } } , N \right\}$ :
127
+
128
+ $$
129
+ \begin{array} { l } { \displaystyle \operatorname* { m i n } _ { \theta , \phi } \frac { 1 } { N } \sum _ { k = 0 } ^ { N - 1 } \bigg ( \ell \big ( \mathbf { V } ^ { \top } \mathbf { z } _ { k } ( T ) , y _ { k } \big ) + \alpha _ { 1 } \| f _ { \theta } \big ( \mathbf { z } _ { k } ( 0 ) \big ) \| _ { 2 } + \alpha _ { 2 } g _ { 1 } \Big ( \displaystyle \sum _ { i = 1 } ^ { n } [ \nabla f _ { \theta } ( \mathbf { z } _ { k } ( 0 ) ) ] _ { i i } \Big ) } \\ { \displaystyle \quad \quad + \alpha _ { 3 } g _ { 2 } \Big ( \displaystyle \sum _ { i = 1 } ^ { n } ( - | [ \nabla f _ { \theta } ( \mathbf { z } _ { k } ( 0 ) ) ] _ { i i } | + \displaystyle \sum _ { j \neq i } \vert [ \nabla f _ { \theta } ( \mathbf { z } _ { k } ( 0 ) ) ] _ { i j } | ) \Big ) \bigg ) } \end{array}
130
+ $$
131
+
132
+ s. t. $\mathbf { z } _ { k } ( 0 ) = h _ { \phi } ( x _ { k } )$ , and ${ \mathbf z } _ { k } ( T )$ is the output of (1) with input $\mathbf { z } _ { k } ( 0 ) , \forall k = 1 , . . . , N$ (8)
133
+
134
+ where $\alpha _ { 1 } , \alpha _ { 2 }$ and $\alpha _ { 3 }$ are hyperparameter weights, $g _ { 1 }$ and $g _ { 2 }$ are chosen monotonically increasing functions bounded below to eliminate the unbounded impact of the two regularizers that can otherwise dominate the loss. In this paper, we set $g _ { 1 } ( \cdot ) = g _ { 2 } ( \cdot ) \bar { = } \exp ( \cdot )$ . We call these two latter terms the SODEF regularizers.
135
+
136
+ Suppose for each class $l = 1 , \ldots , L$ , the embedding feature set $E _ { l } = \{ \mathbf { z } _ { 1 } ^ { ( l ) } , \dots , \mathbf { z } _ { k } ^ { ( l ) } \}$ z(l)k } is finite. For each $i = 1 , \ldots , k$ , let $\mathbf { A } _ { i } \in \mathbb { R } ^ { n \times n }$ be strictly diagonally dominant matrix with every main diagonal entry be negative such that the eigenvalues for $\mathbf { A } _ { i }$ all have negative real part. From Theorem 3, each $\mathbf { A } _ { i }$ is non-singular and every eigenvalue of $\mathbf { A } _ { i }$ has negative real part. Therefore, from Theorem 2 and Lemma 1, there exists a function $f _ { \theta }$ such that all $\mathbf { z } _ { i } ^ { ( l ) }$ are Lyapunov-stable equilibrium points with corresponding first derivative $\nabla f _ { \pmb \theta } ( \mathbf z _ { i } ^ { ( l ) } ) = \mathbf { A } _ { i }$ . This shows that if there exist only finite representation points for each class, we can find a function $f _ { \theta }$ such that all inputs to the neural ODE layer are Lyapunov-stable equilibrium points for $f _ { \theta }$ and
137
+
138
+ $$
139
+ \begin{array} { r l } & { \mathbb { E } _ { \boldsymbol \nu _ { \phi } } \left\| f _ { \boldsymbol \theta } ( \mathbf { z } ( 0 ) ) \right\| _ { 2 } = 0 , } \\ & { \mathbb { E } _ { \boldsymbol \nu _ { \phi } } \left[ \nabla f _ { \boldsymbol \theta } ( \mathbf { z } ( 0 ) ) \right] _ { i i } < 0 , \forall i = 1 , \ldots , n , } \\ & { \mathbb { E } _ { \boldsymbol \nu _ { \phi } } \left[ | [ \nabla f _ { \boldsymbol \theta } ( \mathbf { z } ( 0 ) ) ] _ { i i } | - \sum _ { j \neq i } \vert [ \nabla f _ { \boldsymbol \theta } ( \mathbf { z } ( 0 ) ) ] _ { i j } \vert \right] > 0 , \forall i = 1 , \ldots , n . } \end{array}
140
+ $$
141
+
142
+ If the input space $X$ has infinite cardinality, then an injective and continuous feature extractor $h _ { \phi }$ results in a $\nu _ { \phi }$ with non-finite support, i.e., at least one $E _ { l }$ , $l = 1 , \ldots , L$ , is infinite. It is not obvious whether we can obtain a $f _ { \theta }$ where every point in $\textstyle E = \bigcup _ { l } E _ { l }$ is a stable equilibrium point. The following result gives a negative answer if $\nu _ { \phi }$ is a continuous measure (i.e., absolutely continuous with respect to (w.r.t.) Lebesgue measure) on some subset.
143
+
144
+ Lemma 3. If the restriction of $\nu _ { \phi }$ to some open set $E ^ { \prime } \subset E$ is a continuous measure, there is no continuous function fθ such that for $\nu _ { \phi }$ -almost surely all $\mathbf { z } \in E$ , $f _ { \pmb \theta } ( \mathbf z ) = 0$ and all the eigenvalues of $\nabla f _ { \boldsymbol { \theta } } ( \mathbf { z } )$ have negative real parts. In other words, there is no continuous function fθ such that almost surely all $\mathbf { z }$ in $E$ are Lyapunov-stable equilibrium points.
145
+
146
+ Lemma 3 indicates that it is too much to hope for all points in $E$ to be Lyapunov-stable equilibrium points. In the following, we relax this requirement and show that under mild conditions, for all $\epsilon > 0$ , we can find a continuous function $f _ { \theta }$ with finitely many stable equilibrium points such that conditions (b) and (c) above hold and condition (a) is replaced by $\mathbb { E } _ { \boldsymbol { \nu } _ { \phi } } \bar { \| } f _ { \theta } ( \mathbf { z } ( 0 ) ) \| _ { 2 } ^ { - } < \epsilon$ . This motivates the optimization constraints in (3) to (5).
147
+
148
+ Theorem 4. Suppose Assumptions $I$ and 2. If $\nu _ { \phi }$ is not a continuous uniform measure on $E _ { l }$ for each $l = 1 , \ldots , L$ , then the following holds: 1) The function space satisfying the constraints in (3) to (5) is non-empty for all $\epsilon > 0$ . 2) If additionally the restriction of $\nu _ { \phi }$ to any open set $O \subset E _ { l }$ is not a continuous uniform measure, there exist functions in this space such that each support $E _ { l }$ contains at least one Lyapunov-stable equilibrium point.
149
+
150
+ # 4 Experiments
151
+
152
+ In this section, we evaluate the robustness of SODEF under adversarial attacks with different attack parameters. We conduct experiments to compare the robustness of ODE net [9] and TisODE net [6] on three standard datasets: MNIST [2], CIFAR10 and CIFAR100 [3]. Since SODEF is compatible with many defense methods, it can be applied to any neural network’s final regressor layer to enhance its stability against adversarial attacks. Our experiment codes are provided in https://github.com/KANGQIYU/SODEF.
153
+
154
+ # 4.1 Setup
155
+
156
+ We use open-source pre-trained models that achieve the top accuracy on each dataset as the feature extractor $h _ { \phi }$ . Specifically for simple MNIST task, we use the ResNet18 model provided in Pytorch. We use the model provided by [22], which obtains nearly $8 8 \%$ clean accuracy on CIFAR100 using EfficientNet [23] and the model provided by [24], which has nearly $9 5 \%$ clean accuracy on CIFAR10. In the neural ODE layer, $f _ { \theta }$ consists of 2 FC layers. During the trainings of SODEF (except in the experiment included in Section 4.2), we train the neural network with the fixed FC introduced in Section 3.1. In the first 30 epochs, we fixed $f _ { \theta }$ to let the feature extractor $h _ { \phi }$ learn a feature representation with only the cross-entropy loss $\ell$ , and in the remaining 120 epochs, we release $h _ { \phi }$ to further train $f _ { \theta }$ using (7) with $\alpha _ { 1 } = 1$ and $\alpha _ { 2 } = \alpha _ { 3 } = 0 . 0 5$ . For CIFAR10 and CIFAR100, the pixel values are normalized by $( x - \mu ) / \sigma$ where $\mu = [ 0 . 4 9 1 4 , 0 . 4 8 2 2 , 0 . 4 4 6 5 ]$ and $\sigma = [ 0 . 2 0 2 3 , 0 . 1 9 9 4 , 0 . 2 0 1 0 ] ^ { 4 }$ . To show that our SODEF is compatible with many defense methods and can be applied to any neural network’s final regression layer, we conduct an experiment where we use a recently proposed robust network TRADES [25] as the feature extractor in our SODEF. The pretrained model is provided here 5, and we choose the model with architecture "WRN- $3 4 \mathrm { - } 1 0 "$ to conduct our experiments. Besides the two vanilla white-box attacks FGSM and PGD as metioned in Section 3.1, we also include a strong ensemble attack AutoAttack [26], which sequentially performs attack using all of the following four individual attacks: three white-box attacks APGDCE, APGDTDLR and FABT[27], and one black-box Square attack [28]. We refer the reader to the the supplementary material for more details of the attacks used in this paper, where, in additional, more experiments are included.
157
+
158
+ # 4.2 Compatibility of SODEF
159
+
160
+ Adversarial training (AT) is one of the most effective strategies for defending adversarial attacks. TRADES [25] is one of the adversarial training defense methods with combinations of tricks of warmup, early stopping, weight decay, batch size and other hyper parameter settings. In this experiment we fix the pretained TRADES model (except the final FC layer (size $6 4 0 \mathrm { x } 1 0 )$ ) as our feature extractor $h _ { \phi }$ . We then append our (trainable) SODEF with integration time $T = 5$ to the output of the feature extractor. To evaluate model robustness, we use AutoAttack and attack the models using both the $\mathcal { L } _ { 2 }$ norm $\epsilon = 0 . 5$ ) and $\mathcal { L } _ { \infty }$ norm $( \epsilon = 8 / 2 5 5 )$ ). The results are shown in Table 3. We clearly observe that our SODEF can enhance TRADES’s robustness under all the four individual attacks and the strongest ensemble AutoAttack. For the strong $\mathcal { L } _ { 2 }$ AutoAttack, our SODEF have improved the model robustness from $5 9 . 4 2 \%$ to $6 7 . 7 5 \%$ . Our experiment show that SODEF can be applied to many defense models’ regression layer to enhance their stability against attacks.
161
+
162
+ Table 3: Classification accuracy $( \% )$ using TRADES (w/ and w/o SODEF) under AutoAttack on adversarial CIFAR10 examples with $\mathcal { L } _ { 2 }$ norm $\epsilon = 0 . 5 )$ and $\mathcal { L } _ { \infty }$ norm $( \epsilon = 8 / 2 5 5 )$ .
163
+
164
+ <table><tr><td colspan="4">Attack /ModelTRADES LTRADES+SODEF LTRADES L2TRADES+SODEF L2</td></tr><tr><td>Clean</td><td>85.48</td><td>85.18</td><td>85.48 85.18</td></tr><tr><td>APGDcE</td><td>56.08</td><td>70.90</td><td>61.74 74.35</td></tr><tr><td>APGDDLR</td><td>53.70</td><td>64.15</td><td>59.22 68.55</td></tr><tr><td>FABT</td><td>54.18</td><td>82.92</td><td>60.31 83.15</td></tr><tr><td>Square</td><td>59.12</td><td>62.21</td><td>72.65 76.02</td></tr><tr><td>AutoAttack</td><td>53.69</td><td>57.76</td><td>59.42 67.75</td></tr></table>
165
+
166
+ # 4.3 Influence of Integration Time $T$
167
+
168
+ From the discussion after Theorems 1 and 2, we know if the malicious perturbations around the ODE input Lyapunov-stable equilibrium point ${ \bf z } ( 0 )$ is small, then the output ${ \mathbf z } ( T )$ for large enough $T$ will not be affected significantly by the perturbation: $\| \tilde { { \mathbf z } } ( t ) - { \mathbf z } ( 0 ) \| _ { 2 } \dot { \to } 0$ as $t \to \infty$ . Consequently, the succeeding network layers after the neural ODE layer can still perform well without being affected by the input perturbation. In this section, we test the influence of the SODEF integration time $T$ using CIFAR100. We use the model EfficientNet provided by [23] as $h _ { \phi }$ (Note, unlike Section 4.2, $h _ { \phi }$ is trainable in this experiments). We use AutoAttack with $\mathcal { L } _ { 2 }$ norm $\epsilon = 0 . 5$ ). We observe that for all the four individual attacks and the strongest ensemble AutoAttack, SODEF performs generally better for large integration time $T$ . We also test larger integration time $T > 1 0$ , but do not see any obvious improvements.
169
+
170
+ # 4.4 Performance Comparison Under AutoAttack
171
+
172
+ For a comparison, we provide the results of applying AutoAttack to other baseline models mentioned in the paper. We set the same integration time for ODE, TisODE and SODEF. We observe that for the
173
+
174
+ Table 4: Classification accuracy $( \% )$ under AutoAttack on adversarial CIFAR100 examples with $\mathcal { L } _ { 2 }$ norm, $\epsilon = 0 . 5$ and different integration time $T$ for SODEF.
175
+
176
+ <table><tr><td>Attack/T</td><td>1</td><td>3</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>Clean</td><td>88.00</td><td>88.12</td><td>88.15</td><td>88.00</td><td>87.92</td><td>88.00</td><td>88.05</td><td>88.10</td></tr><tr><td>APGDcE</td><td>17.20</td><td>21.33</td><td>21.05</td><td>23.67</td><td>69.67</td><td>85.33</td><td>87.10</td><td>86.88</td></tr><tr><td>APGDLR</td><td>21.02</td><td>21.00</td><td>22.00</td><td>26.00</td><td>63.30</td><td>86.90</td><td>86.20</td><td>86.54</td></tr><tr><td>FABT</td><td>86.33</td><td>85.10</td><td>86.36</td><td>87.70</td><td>87.67</td><td>86.55</td><td>86.22</td><td>85.93</td></tr><tr><td>Square</td><td>84.67</td><td>86.22</td><td>87.05</td><td>87.20</td><td>86.90</td><td>86.33</td><td>87.05</td><td>86.75</td></tr><tr><td>AutoAttack</td><td>2.00</td><td>3.53</td><td>4.87</td><td>4.33</td><td>30.66</td><td>78.80</td><td>78.97</td><td>79.10</td></tr></table>
177
+
178
+ strongest AutoAttack, our SODEF outperforms the other baseline models by a significant margin. In this case, SODEF achieves $7 9 . 1 0 \%$ accuracy while other models only get less than $3 \%$ accuracy.
179
+
180
+ Table 5: Classification accuracy $( \% )$ under AutoAttack on adversarial CIFAR100 examples with $\mathcal { L } _ { 2 }$ norm, $\epsilon = 0 . 5$ and $T = 1 0$ .
181
+
182
+ <table><tr><td>Attack/Model</td><td>NoODE</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>Clean</td><td>88.00</td><td>87.90</td><td>88.00</td><td>88.10</td></tr><tr><td>APGDCE</td><td>23.30</td><td>6.75</td><td>14.32</td><td>86.88</td></tr><tr><td></td><td>7.33</td><td>22.00</td><td>24.20</td><td>86.54</td></tr><tr><td>FAB</td><td>79.30</td><td>78.67</td><td>77.16</td><td>85.93</td></tr><tr><td>Square</td><td>84.52</td><td>85.67</td><td>86.32</td><td>86.75</td></tr><tr><td>AutoAttack</td><td>0.00</td><td>1.33</td><td>4.06</td><td>79.10</td></tr></table>
183
+
184
+ # 4.5 Performance Under PGD and FGSM Attacks
185
+
186
+ White-box adversaries have knowledge of the classifier models, including training data, model architectures and parameters. We test the performance of our model in defending against the whitebox attacks, PGD and FGSM. We set $T = 5$ as the integration time for the neural ODE layer. The parameters for different attack methods used are given in the supplementary material. The subsequent experiments use these settings by default, unless otherwise stated.
187
+
188
+ Table 6: Classification accuracy $( \% )$ on adversarial MNIST examples.
189
+
190
+ <table><tr><td>Attack</td><td>Para.</td><td>no ode</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>None</td><td>-</td><td>99.45</td><td>99.42</td><td>99.43</td><td>99.44</td></tr><tr><td>FGSM</td><td>∈=0.3</td><td>10.03</td><td>29.6</td><td>36.70</td><td>63.36</td></tr><tr><td>PGD</td><td>∈= 0.3</td><td>0.31</td><td>1.56</td><td>1.82</td><td>45.25</td></tr></table>
191
+
192
+ The classification results on MNIST are shown in Table 6. We observe that while maintaining the state-of-the-art accuracy on normal images, SODEF improves the adversarial robustness as compared to the other two methods. For the most effective attack in this experiment, i.e., PGD attack, SODEF shows a $4 5 . 2 5 \% - 1 . 5 6 \% = 4 3 . 6 9 \%$ improvement over ODE and a $4 5 . 2 5 \% - 1 . 2 3 \% = 4 4 . 0 2 \%$ improvement over TisODE.
193
+
194
+ Table 7: Classification accuracy $( \% )$ on adversarial CIFAR10 examples.
195
+
196
+ <table><tr><td>Attack</td><td>Para.</td><td>no ode</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>None</td><td>-</td><td>95.2</td><td>94.9</td><td>95.1</td><td>95.0</td></tr><tr><td>FGSM</td><td>∈=0.1</td><td>47.31</td><td>45.23</td><td>43.28</td><td>68.05</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>3.09</td><td>3.21</td><td>3.80</td><td>55.59</td></tr></table>
197
+
198
+ For CIFAR-10, we see from Table 7 that SODEF maintains high accuracy on normal examples and makes the best predictions under adversarial attacks. In particular, SODEF achieves an absolute percentage point improvement over ODE net up to $5 2 . 3 8 \%$ and over TisODE up to $5 2 . 5 4 \%$ for PGD attack.
199
+
200
+ For CIFAR-100, the results in the supplementary material shows that the most effective attack causes the classification accuracy to drop relatively by $\begin{array} { r } { 7 4 . 6 \% = \frac { 8 8 . 0 - 2 2 . 3 5 } { 8 8 . 0 } } \end{array}$ 88.0−22.35 for SODEF and by $\begin{array} { r } { 9 7 . 3 \% = \frac { 8 8 . 3 - 2 . 3 9 } { 8 8 . 3 } } \end{array}$ for vanilla EfficientNet, which is pre-trained on ImageNet to obtain a top clean accuracy. Neither ODE net nor TisODE net can improve the classification accuracy under PGD attack by a big margin, e.g. TisODE net only improves the classification accuracy from $2 . 3 9 \%$ to $3 . 4 4 \%$ , while SODEF still shows clear defense capability in this scenario.
201
+
202
+ # 4.6 Ablation Studies
203
+
204
+ The impact of the ODE with and without the SODEF regularizers in (7) has been presented in the above comparisons between SODEF and ODE. In this section, we show the necessity of diversity promoting using the FC introduced in Section 3.1 and conduct transferability study.
205
+
206
+ # 4.6.1 Impact of Diversity Promotion
207
+
208
+ Table 8: Classification accuracy $( \% )$ on adversarial MNIST examples, where the superscript indicates the last FC layer is not fixed to be $\mathbf { V }$ and is set to be a trainable layer.
209
+
210
+ <table><tr><td>Attack</td><td>Para.</td><td>SODEF</td><td>SODEF-</td></tr><tr><td>None</td><td>-</td><td>95.0</td><td>95.1</td></tr><tr><td>FGSM</td><td>∈=0.1</td><td>63.36</td><td>51.6</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>45.25</td><td>34.9</td></tr></table>
211
+
212
+ Table 8 shows the difference of the defense performance when fixing the final FC be $\mathbf { V }$ or setting it to a trainable linear layer. It can be seen that having diversity control improves the robustness. One possible reason for this phenomenon given in Section 3 is that diversity promotion with a fixed designed FC attempts to make the embedding feature support $E _ { l }$ of each class $l$ disjoint to each other and therefore the Lyapunov-stable equilibrium points for each $E _ { l }$ are well separated.
213
+
214
+ # 4.6.2 Transferability Study
215
+
216
+ Transferability study is carried out on CIFAR-10, where the adversarial examples are generated using FGSM and PGD attacks using ResNet18 without any ODEs. The classification accuracy drops from $6 8 . 0 5 \%$ to $5 9 \%$ for FGSM with $\epsilon = 0 . 3$ , and from $5 5 . 5 9 \%$ to $3 4 \%$ for PGD with $\epsilon = 0 . 1$ . One possible reason for this phenomenon is that ODEs have obfuscated gradient masking effect as discussed in [15], and a transfer attack may deteriorate the defense effect. However, as we observe from Table 7, even with a transfer attack on SODEF, it still performs better than other ODEs without transfer attacks.
217
+
218
+ # 5 Conclusion
219
+
220
+ In this paper, we have developed a new neural ODE network, SODEF, to suppress input perturbations. SODEF is compatible with any existing neural networks and can thus be appended to the state-of-theart networks to increase their robustness to adversarial attacks. We demonstrated empirically and theoretically that the robustness of SODEF mainly derives from its stability and proposed a training method that imposes constraints to ensure all eigenvalues of the Jacobian matrix of the neural ODE layer have negative real parts. When each classification class converges to its own equilibrium points, we showed that the last FC layer can be designed in such a way that the distance between the stable equilibrium points is maximized, which further improves the network’s robustness. The effectiveness of SODEF has been verified under several popular while-box attacks.
221
+
222
+ # Acknowledgments and Disclosure of Funding
223
+
224
+ This research is supported in part by A\*STAR under its RIE2020 Advanced Manufacturing and Engineering (AME) Industry Alignment Fund – Pre Positioning (IAF-PP) (Grant No. A19D6a0053) and the RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from the industry partner(s). The computational work for this article was partially performed on resources of the National Supercomputing Centre, Singapore (https://www.nscc.sg).
225
+
226
+ # Broader Impact
227
+
228
+ Our work, which contributes to more robust DNNs, is supposed to mitigate the threat of adversarial attacks. However, on the hand, the reliable deployment of DNNs in automation of tasks will potentially bring mass-scale unemployment and social unrest. As DNNs become more robust and more tasks, especially those whose failures will bring high risks to human lives or large property losses under adversarial attacks, fall into the automatic task category, massive jobs could disappear.
229
+
230
+ # References
231
+
232
+ [1] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” in Proc. Advances Neural Inf. Process. Syst., 2012.
233
+ [2] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, Nov. 1998.
234
+ [3] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, and B. Kingsbury, “Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups,” IEEE Signal Process. Mag., vol. 29, no. 6, pp. 82–97, Nov. 2012.
235
+ [4] D. Andor, C. Alberti, D. Weiss, A. Severyn, A. Presta, K. Ganchev, S. Petrov, and M. Collins, “Globally normalized transition-based neural networks,” in Proc. Annu. Meeting Assoc, Comput. Linguistics, 2016.
236
+ [5] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, “Intriguing properties of neural networks,” in Proc. Int. Conf. Learning Representations, 2013.
237
+ [6] H. Yan, J. Du, V. Y. Tan, and J. Feng, “On robustness of neural ordinary differential equations,” in Proc. Advances Neural Inf. Process. Syst., 2018, pp. 1–13.
238
+ [7] E. Haber and L. Ruthotto, “Stable architectures for deep neural networks,” Inverse Problems, vol. 34, no. 1, pp. 1–23, Dec. 2017.
239
+ [8] X. Liu, S. Si, Q. Cao, S. Kumar, and C.-J. Hsieh, “How does noise help robustness? Explanation and exploration under the neural sde framework,” in Proc. Conf. Comput. Vision Pattern Recognition, 2020, pp. 282–290.
240
+ [9] R. T. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, “Neural ordinary differential equations,” arXiv preprint arXiv:1806.07366, 2018.
241
+ [10] C.-T. Chen and B. Shafai, Linear system theory and design. New York: Oxford university press New York, 1999.
242
+ [11] Y. LeCun, C. Corte, and C. Burges, “MNIST handwritten digit database,” ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, vol. 2, 2010, (Last accessed: Dec 1, 2020).
243
+ [12] A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” Master’s thesis, Department of Computer Science, University of Toronto, 2009.
244
+ [13] A. M ˛adry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu, “Towards deep learning models resistant to adversarial attacks,” in Proc. Int. Conf. Learning Representations, 2018.
245
+ [14] E. Haber and L. Ruthotto, “Stable architectures for deep neural networks,” Inverse Problems, vol. 34, no. 1, 2018.
246
+ [15] Y. Huang, Y. Yu, H. Zhang, Y. Ma, and Y. Yao, “Adversarial robustness of stabilized neuralodes might be from obfuscated gradients,” arXiv preprint arXiv:2009.13145, 2020.
247
+ [16] L. Mingjie, H. Lingshen, and L. Zhouchen, “Implicit Euler skip connections: Enhancing adversarial robustness via numerical stability,” in Proc. Int. Conf. Machine Learning, 2020.
248
+ [17] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” in Proc. Int. Conf. Learning Representations, 2015.
249
+ [18] D. Arrowsmith and C. M. Place, Dynamical systems: differential equations, maps, and chaotic behaviour. London: CRC Press, 1992.
250
+ [19] R. A. Horn and C. R. Johnson, Matrix analysis. New York: Cambridge university press, 2012.
251
+ [20] L. Van der Maaten and G. Hinton, “Visualizing data using t-sne,” J. Mach. Learning Res., vol. 9, no. 11, pp. 2580–2605, Nov. 2008.
252
+ [21] K. Hornik, “Approximation capabilities of multilayer feedforward networks,” Neural Networks, vol. 4, no. 2, pp. 251–257, Oct. 1991.
253
+ [22] Y. Luo, Y. Wong, S. M. Kankanhalli, and Q. Zhao, “Direction concentration learning: Enhancing congruency in machine learning,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 43, no. 1, pp. 1928 – 1946, Jun. 2021.
254
+ [23] M. Tan and Q. Le, “Efficientnet: Rethinking model scaling for convolutional neural networks,” in Proc. Int. Conf. Mach. Learning, 2019, pp. 6105–6114.
255
+ [24] Github pytorch-cifar repository. Accessed: May 1, 2021. [Online]. Available: https: //github.com/kuangliu/pytorch-cifar
256
+ [25] T. Pang, X. Yang, Y. Dong, H. Su, and J. Zhu, “Bag of tricks for adversarial training,” in Proc. Int. Conf. Learning Representations, 2021.
257
+ [26] F. Croce and M. Hein, “Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks,” in Proc. Int. Conf. Mach. Learning, 2020, pp. 2206–2216.
258
+ [27] ——, “Minimally distorted adversarial examples with a fast adaptive boundary attack,” in Proc. Int. Conf. Mach. Learning, 2020, pp. 2196–2205.
259
+ [28] M. Andriushchenko, F. Croce, N. Flammarion, and M. Hein, “Square attack: a query-efficient black-box adversarial attack via random search,” in Proc. European Conf. Comput. Vision. Springer, 2020, pp. 484–501.
260
+
261
+ # Checklist
262
+
263
+ 1. For all authors...
264
+
265
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
266
+ (b) Did you describe the limitations of your work? [Yes]
267
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes]
268
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
269
+
270
+ 2. If you are including theoretical results...
271
+
272
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] . See Assumption 1 and Assumption 2
273
+ (b) Did you include complete proofs of all theoretical results? [Yes] . See supplementary material.
274
+
275
+ 3. If you ran experiments...
276
+
277
+ (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] .
278
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] . See Sections 3.1 and 4
279
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Having ODE blocks in our model, it would be too computationally expensive to repeat experiments for many times. We repeated each experiment for 2-3 times and we observe the deviation of the classification results is within $\pm 3 \%$ , though these experimental repetitions are not enough to construct error bars.
280
+ (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 Section 3.1.
281
+
282
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
283
+
284
+ (a) If your work uses existing assets, did you cite the creators? [Yes] See Sections 3.1 and 4 for the open-source models we have used from GitHub.
285
+ (b) Did you mention the license of the assets? [No] . Please see the licenses given in the GitHub link.
286
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No] No new assets.
287
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] MNIST, CIFAR-10 and CIFAR-100 are all open-source datasets.
288
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] There is no identifiable information or offensive content in the datasets.
289
+
290
+ 5. If you used crowdsourcing or conducted research with human subjects...
291
+
292
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
293
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
294
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/9CPc4EIr2t1/9CPc4EIr2t1_content_list.json ADDED
@@ -0,0 +1,1372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Stable Neural ODE with Lyapunov-Stable Equilibrium Points for Defending Against Adversarial Attacks ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 245,
8
+ 122,
9
+ 753,
10
+ 196
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Qiyu Kang∗ ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 289,
20
+ 247,
21
+ 372,
22
+ 261
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Continental-NTU Corporate Lab Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore kang0080@e.ntu.edu.sg ",
29
+ "bbox": [
30
+ 196,
31
+ 262,
32
+ 460,
33
+ 316
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Yang Song∗ School of Electrical and Electronic Engineering Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore songy@ntu.edu.sg ",
40
+ "bbox": [
41
+ 488,
42
+ 247,
43
+ 803,
44
+ 316
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Qinxu Ding ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 287,
54
+ 338,
55
+ 369,
56
+ 352
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "School of Business \nSingapore University of Social Sciences \n463 Clementi Road, 599494, Singapore qinxuding@suss.edu.sg ",
63
+ "bbox": [
64
+ 196,
65
+ 353,
66
+ 459,
67
+ 407
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Wee Peng Tay School of Electrical and Electronic Engineering Nanyang Technological University 50 Nanyang Avenue, 639798, Singapore wptay@ntu.edu.sg ",
74
+ "bbox": [
75
+ 488,
76
+ 338,
77
+ 802,
78
+ 407
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Abstract ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 462,
88
+ 443,
89
+ 535,
90
+ 459
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "Deep neural networks (DNNs) are well-known to be vulnerable to adversarial attacks, where malicious human-imperceptible perturbations are included in the input to the deep network to fool it into making a wrong classification. Recent studies have demonstrated that neural Ordinary Differential Equations (ODEs) are intrinsically more robust against adversarial attacks compared to vanilla DNNs. In this work, we propose a stable neural ODE with Lyapunov-stable equilibrium points for defending against adversarial attacks (SODEF). By ensuring that the equilibrium points of the ODE solution used as part of SODEF is Lyapunov-stable, the ODE solution for an input with a small perturbation converges to the same solution as the unperturbed input. We provide theoretical results that give insights into the stability of SODEF as well as the choice of regularizers to ensure its stability. Our analysis suggests that our proposed regularizers force the extracted feature points to be within a neighborhood of the Lyapunov-stable equilibrium points of the ODE. SODEF is compatible with many defense methods and can be applied to any neural network’s final regressor layer to enhance its stability against adversarial attacks. ",
97
+ "bbox": [
98
+ 233,
99
+ 476,
100
+ 766,
101
+ 695
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "1 Introduction ",
108
+ "text_level": 1,
109
+ "bbox": [
110
+ 174,
111
+ 724,
112
+ 310,
113
+ 741
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "Although deep learning has found successful applications in many tasks such as image classification [1, 2], speech recognition [3], and natural language processing [4], the vulnerability of deep learning to adversarial attacks (e.g., see [5]) has limited its real-world applications due to performance and safety concerns in critical applications. Inputs corrupted with human-imperceptible perturbations can easily fool many vanilla deep neural networks (DNNs) into mis-classifying them and thus significantly impact their performance. ",
120
+ "bbox": [
121
+ 174,
122
+ 756,
123
+ 825,
124
+ 839
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "Recent studies [6–8] have applied neural Ordinary Differential Equations (ODEs) [9] to defend against adversarial attacks. Some works like [6] have revealed interesting intrinsic properties of ",
131
+ "bbox": [
132
+ 176,
133
+ 845,
134
+ 821,
135
+ 875
136
+ ],
137
+ "page_idx": 0
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "ODEs that make them more stable than conventional convolutional neural networks (CNNs). The paper [6] proposes a time-invariant steady neural ODE (TisODE) using the property that the integral curves from a ODE solution starting from different initial points (inputs) do not intersect and always preserve uniqueness in the solution function space. However, this does not guarantee that small perturbations of the initial point lead to small perturbations of the integral curve output at a later time $T$ . The authors thus proposed a regularizer to limit the evolution of the curves by forcing the integrand to be close to zero. However, neither the non-intersecting property nor the steady-state constraint used in TisODE can guarantee robustness against input perturbations since these constraints do not ensure that the inputs are within a neighborhood of Lyapunov-stable equilibrium points. An example is an ODE that serves as an identity mapping is not robust to input perturbations but satisfies all the constraints proposed in [6]. ",
142
+ "bbox": [
143
+ 174,
144
+ 90,
145
+ 825,
146
+ 243
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "In this paper, our objective is to design a neural ODE such that the features extracted are within a neighborhood of the Lyapunov-stable equilibrium points of the ODE. We first develop a diversity promoting technique applied in the final fully connected (FC) layer to improve the ODE’s stability and analyze the reasons why. We then propose a stable neural ODE with Lyapunov-stable equilibrium points to eliminate the effects of perturbations in the input. From linear control theory [10], a linear time-invariant system $\\mathrm { d } { \\mathbf { z } ( t ) } / \\mathrm { d } t = { \\mathbf { A } } { \\mathbf { z } ( t ) }$ , where $\\mathbf { A }$ is a constant matrix, is exponentially stable if all eigenvalues of $\\mathbf { A }$ have negative real parts. Specifically, we propose to force the Jacobian matrix of the ODE used in the neural ODE to have eigenvalues with negative real parts. Instead of directly imposing constraints on the eigenvalues of the matrix, which lead to high computational complexity when the Jacobian matrix is large, we instead add constraints to the matrix elements to implicitly force the real parts of its eigenvalues to be negative. ",
153
+ "bbox": [
154
+ 174,
155
+ 250,
156
+ 825,
157
+ 401
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "Our main contributions are summarized as follows: ",
164
+ "bbox": [
165
+ 174,
166
+ 409,
167
+ 509,
168
+ 422
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "1. Based on the concept of Lyapunov-stable equilibrium points, we propose a simple yet effective technique to improve the robustness of neural ODE networks by fixing the final FC layer to be a matrix whose rows have unit norm and such that the maximum cosine similarity between any two rows is minimized. Such a FC layer can be constructed off-line. \n2. We propose a stable neural ODE for deFending against adversarial attacks (SODEF) to suppress the input perturbations. We derive an optimization formulation for SODEF to force the extracted feature points to be within a neighborhood of the Lyapunov-stable equilibrium points of the SODEF ODE. We provide sufficient conditions for learning a robust feature representation under SODEF. \n3. We test SODEF on several widely used datasets MNIST [11], CIFAR-10 and CIFAR-100 [12] under well-known adversarial attacks. We demonstrate that SODEF is robust against adversarial white-box attacks with improvement in classification accuracy of adversarial examples under PGD attack [13] of up to $4 4 . 0 2 \\%$ , $5 2 . 5 4 \\%$ and $1 8 . 9 1 \\%$ percentage points compared to another current state-of-the-art neural ODE network TisODE [6] on MNIST, CIFAR-10 and CIFAR-100, respectively. Similar improvements in classification accuracy of adversarial examples of up to $\\bar { 4 3 . 6 9 \\% }$ , $5 2 . 3 8 \\%$ and $\\mathrm { \\bar { 1 8 . 9 9 \\% } }$ percentage points compared to ODE net [9] are also obtained. ",
175
+ "bbox": [
176
+ 210,
177
+ 436,
178
+ 825,
179
+ 699
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "The rest of this paper is organized as follows. We provide essential preliminaries on neural ODE and its stability analysis in Section 2. In Section 3, we present SODEF model architecture and its training method. We show how to maximize the distance between stable equilibrium points of neural ODEs. We propose an optimization and present theoretical results on its stability properties. We summarize experimental results in Section 4 and conclude the paper in Section 5. The proofs for all lemmas and theorems proposed in this paper are given in the supplementary material. We also refer interested readers to the supplementary material for a more detailed account of related works [14–16, 6] and some popular adversarial attacks [17, 13] that are used to verify the robustness of our proposed SODEF. In the paper, we use lowercase boldface characters like $\\mathbf { z }$ to denote vectors in $\\mathbb { R } ^ { n }$ , capital boldface characters like $\\mathbf { A }$ to denote matrices in $\\mathbb { R } ^ { n \\times n }$ , and normal characters like $z$ to denote scalars except that the notation $( x , y )$ are normal characters reserved to denote the input and label pairs. A vector $\\mathbf { z } \\in \\mathbb { R } ^ { n }$ is represented as $( \\mathbf { z } ^ { ( 1 ) } , \\mathbf { z } ^ { ( 2 ) } , \\ldots , \\mathbf { z } ^ { ( n ) } )$ . The $( i , j )$ -th element of a matrix $\\mathbf { A }$ is $\\mathbf { A } _ { i j }$ or $[ \\mathbf { A } ] _ { i j }$ . The Jacobian matrix of a function $f : \\mathbb { R } ^ { n } \\mapsto \\mathbb { R } ^ { n }$ evaluated at $\\mathbf { z }$ is denoted as $\\nabla f ( \\mathbf { z } )$ The set of functions $\\mathbb { R } ^ { n } \\mapsto \\mathbb { R } ^ { n }$ with continuous first derivatives is denoted as $C ^ { 1 } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } )$ . ",
186
+ "bbox": [
187
+ 173,
188
+ 714,
189
+ 825,
190
+ 911
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "2 Preliminaries: Neural ODE and Stability ",
197
+ "text_level": 1,
198
+ "bbox": [
199
+ 173,
200
+ 88,
201
+ 547,
202
+ 107
203
+ ],
204
+ "page_idx": 2
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "In a neural ODE layer, the relation between the layer input ${ \\bf z } ( 0 )$ and output ${ \\mathbf z } ( T )$ is described as the following differential equation: ",
209
+ "bbox": [
210
+ 171,
211
+ 118,
212
+ 823,
213
+ 147
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "equation",
219
+ "img_path": "images/40fc799ca8fac2cda94627f8fa8e3909cd3c435bfc40eb885acf21aca9021058.jpg",
220
+ "text": "$$\n\\frac { \\mathrm { d } \\mathbf { z } ( t ) } { \\mathrm { d } t } = f _ { \\pmb { \\theta } } ( \\mathbf { z } ( t ) , t )\n$$",
221
+ "text_format": "latex",
222
+ "bbox": [
223
+ 431,
224
+ 148,
225
+ 566,
226
+ 179
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "where $f _ { \\pmb \\theta } : \\mathbb { R } ^ { n } \\times [ 0 , \\infty ) \\mapsto \\mathbb { R } ^ { n }$ denotes the non-linear trainable layers that are parameterized by weights $\\pmb { \\theta }$ and $\\mathbf { z } : [ 0 , \\infty ) \\mapsto \\mathbb { R } ^ { n }$ represents the $n$ -dimensional state of the neural ODE. Neural ODEs are the continuous analog of residual networks where the hidden layers of residual networks can be regarded as discrete-time difference equations ${ \\bf z } ( t + 1 ) = { \\bf z } ( t ) + { f _ { \\theta } } ( { \\bf z } ( t ) , t )$ . In this work, for simplicity, we only consider the time-invariant (autonomous) case $f _ { \\pmb \\theta } ( \\mathbf { z } ( t ) , t ) = f _ { \\pmb \\theta } ( \\mathbf { z } ( t ) )$ , where the dynamical system does not explicitly depend on $t$ . For such non-linear dynamical systems, the following theorem shows that under mild conditions, its behaviour can be studied via linearization near special points called hyperbolic equilibrium points. ",
233
+ "bbox": [
234
+ 173,
235
+ 180,
236
+ 825,
237
+ 291
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Theorem 1 (Hartman–Grobman Theorem [18]). Consider a system evolving in time with state $\\mathbf { z } ( t ) \\in \\mathbb { R } ^ { n }$ that satisfies the differential equation $\\frac { \\mathrm { d } { \\bf z } ( t ) } { \\mathrm { d } t } = f ( { \\bf z } ( t ) )$ for some $f \\in C ^ { 1 } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } ) ;$ , $f ( \\mathbf { z } ) = ( f ^ { ( 1 ) } ( \\mathbf { z } ) , \\ldots , f ^ { ( n ) } ( \\mathbf { z } ) )$ . Suppose the map has a hyperbolic equilibrium state $\\mathbf { z } ^ { \\ast } \\in \\mathbb { R } ^ { n }$ , i.e., $f ( { \\bf z } ^ { * } ) = 0$ and the Jacobian matrix with real part equal to zer $\\nabla f = [ \\partial f ^ { ( i ) } / \\partial \\mathbf { z } ^ { ( j ) } ] _ { i , j = 1 } ^ { n }$ of hb $f$ evalurhood at of $\\textbf { z } = \\textbf { z } ^ { * }$ has nolibrium $N _ { \\mathbf { z } ^ { * } }$ point $\\mathbf { z } ^ { \\ast }$ and a homeomorphism $g : N _ { \\mathbf { z } ^ { * } } \\mapsto \\mathbb { R } ^ { n }$ , such that $g ( \\mathbf { z } ^ { * } ) = 0$ and in the neighbourhood $N _ { \\mathbf { z } ^ { * } }$ , the flow of $\\frac { \\mathrm { d } { \\bf z } ( t ) } { \\mathrm { d } t } = f ( { \\bf z } ( t ) )$ is topologically conjugate by the continuous map $\\bar { \\mathbf { z } } ( t ) = g ( \\mathbf { z } ( t ) )$ to the flow of its linearization $\\frac { \\mathrm { d } \\bar { \\mathbf { z } } ( t ) } { \\mathrm { d } t } = \\nabla f ( \\mathbf { z } ^ { * } ) \\cdot \\bar { \\mathbf { z } } ( t ) .$ ",
244
+ "bbox": [
245
+ 173,
246
+ 292,
247
+ 826,
248
+ 450
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "The theorem states that when the Jacobian matrix at the zeros of $f$ has no eigenvalue with zero real part, the behaviour of the original dynamical system can be studied using the simpler linearization of the system around those zeros. We next review some definitions and theorems from linear control theory [10]. ",
255
+ "bbox": [
256
+ 173,
257
+ 457,
258
+ 825,
259
+ 512
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "Definition 1 (Lyapunov Stability [10]). The linear time-invariant system $\\frac { \\mathrm { d } \\bar { \\mathbf { z } } ( t ) } { \\mathrm { d } t } = \\mathbf { A } \\bar { \\mathbf { z } } ( t )$ with constant matrix A is marginally stable or stable in the sense of Lyapunov if every finite initial state $\\bar { \\mathbf { z } } ( 0 )$ excites a bounded response. It is asymptotically stable if every finite initial state excites $a$ bounded response, which, in addition, approaches 0 as $t \\to \\infty$ . ",
266
+ "bbox": [
267
+ 173,
268
+ 515,
269
+ 825,
270
+ 583
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "Theorem 2 (Lyapunov Stability Theorem [10]). a) The equation $\\frac { \\mathrm { d } \\bar { \\mathbf { z } } ( t ) } { \\mathrm { d } t } = \\mathbf { A } \\bar { \\mathbf { z } } ( t ) )$ is marginally stable if and only if all eigenvalues of A have zero or negative real parts and those with zero real parts are simple roots of the minimal polynomial of A. $^ b$ ) The equation $\\frac { \\mathrm { d } \\bar { \\mathbf { z } } ( t ) } { \\mathrm { d } t } = \\mathbf { A } \\bar { \\mathbf { z } } ( t )$ is asymptotically stable if and only if all eigenvalues of A have negative real parts. ",
277
+ "bbox": [
278
+ 173,
279
+ 585,
280
+ 825,
281
+ 667
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "In Theorem 1, we say that a hyperbolic equilibrium point is Lyapunov-stable if all eigenvalues of the Jacobian matrix evaluated at it have negative real parts. From Theorems 1 and 2, we see that a small perturbation around the Lyapunov-stable equilibrium point ${ \\bf z } ( 0 )$ leads to $\\tilde { \\mathbf { z } } ( t ) \\to \\mathbf { z } ( 0 )$ as $t \\to \\infty$ , i.e., $\\exists \\delta > 0$ such that for all $\\tilde { \\mathbf { z } } ( 0 )$ with $\\lVert { \\mathbf z } ( 0 ) \\dot { - } \\tilde { { \\mathbf z } } ( 0 ) \\rVert _ { 2 } \\dot { < } \\delta$ , we have $\\| \\widetilde { \\mathbf { z } } ( t ) - \\mathbf { z } ( 0 ) \\| _ { 2 } \\to \\dot { 0 }$ as $t \\to \\infty$ , where $\\tilde { \\mathbf { z } } ( t )$ is the ODE solution for the perturbed input $\\tilde { \\mathbf { z } } ( 0 )$ . In the context of neural network adversarial attacks, if the malicious perturbations around the ODE input ${ \\bf z } ( 0 )$ is small, then the output ${ \\mathbf z } ( T )$ for large enough $T$ will not be affected significantly by the perturbation. Consequently, the succeeding network layers after the neural ODE layer can still perform well without being affected by the input perturbation. The perturbation weakening phenomenon around Lyapunov-stable equilibrium points works like a noise filter and acts as a defense against adversarial attacks. ",
288
+ "bbox": [
289
+ 173,
290
+ 674,
291
+ 825,
292
+ 814
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "We require the following definition and result in our stability analysis. ",
299
+ "bbox": [
300
+ 174,
301
+ 819,
302
+ 637,
303
+ 834
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Definition 2 (Strictly diagonally dominant [19]). Let $\\mathbf { A } \\in \\mathbb { C } ^ { n \\times n }$ . We say that A is strictly diagonally dominant if $\\begin{array} { r } { \\left| { { { \\mathbf { A } } _ { i i } } } \\right| > \\sum _ { j \\neq i } \\left| { { { \\mathbf { A } } _ { i j } } } \\right| } \\end{array}$ for all $i = 1 , . . . , n$ . ",
310
+ "bbox": [
311
+ 174,
312
+ 835,
313
+ 823,
314
+ 866
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "Theorem 3 (Levy–Desplanques theorem [19]). If $\\mathbf { A } \\in \\mathbb { C } ^ { n \\times n }$ is strictly diagonally dominant and if every main diagonal entry of A is real and negative, then $A$ is non-singular and every eigenvalue of A has negative real part. ",
321
+ "bbox": [
322
+ 174,
323
+ 869,
324
+ 826,
325
+ 911
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "image",
331
+ "img_path": "images/96641a4aad1ec2c9f3138777e3d67fc9ff9849146d1c1b15becd36b84d50c353.jpg",
332
+ "image_caption": [
333
+ "Fig. 1: SODEF model architecture. "
334
+ ],
335
+ "image_footnote": [],
336
+ "bbox": [
337
+ 183,
338
+ 87,
339
+ 815,
340
+ 133
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "Lemma 1. Given $k$ distinct points $\\mathbf { z } _ { i } \\in \\mathbb { R } ^ { n }$ and matrices $\\mathbf { A } _ { i } \\in \\mathbb { R } ^ { n \\times n }$ , $i = 1 , . . . , k$ , there exists a function $f \\in C ^ { 1 } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } )$ such that $f ( \\mathbf { z } _ { i } ) = 0$ and $\\nabla f _ { \\pmb { \\theta } } ( \\mathbf { z } _ { i } ) = \\mathbf { A } _ { i }$ . ",
347
+ "bbox": [
348
+ 171,
349
+ 184,
350
+ 823,
351
+ 213
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "3 SODEF Architecture ",
358
+ "text_level": 1,
359
+ "bbox": [
360
+ 174,
361
+ 232,
362
+ 382,
363
+ 250
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "We consider a classification problem with $L$ classes. The proposed SODEF model architecture is shown in Fig. 1. The input $x \\in X$ (e.g., an image) is first passed through a feature extractor $h _ { \\phi } : X \\mapsto \\mathbb { R } ^ { n }$ to obtain an embedding feature representation ${ \\bf z } ( 0 )$ . A neural ODE layer $f _ { \\theta }$ follows as a nonlinear feature mapping to stabilize the feature representation output ${ \\bf z } ( 0 )$ from $h _ { \\phi }$ . The final FC layer $\\mathbf { V }$ serves as a linear mapping to generate a prediction vector based on the output $\\mathbf { \\dot { z } } ( T )$ of the neural ODE layer. The parameters $\\phi , \\theta$ and $\\mathbf { V }$ are parameterized weights for the feature extractor, neural ODE layer and FC layer, respectively. ",
370
+ "bbox": [
371
+ 173,
372
+ 265,
373
+ 825,
374
+ 362
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "We provide motivation and design guidance for the FC layer V in Section 3.1, which attempts to separate Lyapunov-stable equilibrium points implicitly by maximizing the similarity distance between feature representations corresponding to the $L$ different classes. Experimental results demonstrate the advantages of our diversity promoting FC layer in Section 3.1 with comparisons to traditional neural ODEs without diversity promoting. ",
381
+ "bbox": [
382
+ 174,
383
+ 367,
384
+ 825,
385
+ 438
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "However, the embedded features after using diversity promoting are not guaranteed to locate near the Lyapunov-stable equilibrium points. In Section 3.2, we formulate an optimization problem to force embedding features to locate near the Lyapunov-stable equilibrium points. We introduce optimization constraints to force the Jacobian matrix of the ODE in our neural ODE layer to have eigenvalues with negative real parts at the Lyapunov-stable equilibrium points. Instead of directly imposing constraints on the eigenvalue of the matrix, which may be computationally complex especially when the matrix is large, we add constraints to the matrix elements instead. ",
392
+ "bbox": [
393
+ 173,
394
+ 444,
395
+ 825,
396
+ 541
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "3.1 Maximizing the Distance between Lyapunov-Stable Equilibrium Points ",
403
+ "text_level": 1,
404
+ "bbox": [
405
+ 174,
406
+ 558,
407
+ 705,
408
+ 574
409
+ ],
410
+ "page_idx": 3
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "From Section 2, we observe that points in a small neighbourhood of a Lyapunov-stable equilibrium point is robust against adversarial perturbations. We call this neighborhood a stable neighborhood. However Lyapunov-stable equilibrium points for different classes may very well locate near each other and therefore each stable neighborhood may be very small, leading to poor adversarial defense. In this section, we propose to add a FC layer after the neural ODE layer given by (1) to avoid this scenario. The purpose of the FC layer is to map the output of the neural ODE layer to a feature vector $\\mathbf { v } _ { l }$ if the input $x$ belongs to the class $l = 1 , \\ldots , L$ . We design the FC layer so that the cosine similarities between different $\\mathbf { v } _ { l }$ ’s are minimized. ",
415
+ "bbox": [
416
+ 174,
417
+ 583,
418
+ 825,
419
+ 695
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "Lemma 2. Given a set of $k$ unit vectors $\\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { k }$ in $\\mathbb { R } ^ { n }$ , where $n \\geq k$ , let $a ( \\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { k } ) =$ $\\mathrm { m a x } _ { i \\neq j } { \\mathbf { \\Delta v } _ { i } ^ { \\mathsf { T } } } { \\mathbf { v } _ { j } }$ . Then $\\operatorname* { m i n } a ( \\mathbf { v } _ { 1 } , . . . , \\mathbf { v } _ { k } ) = 1 / ( 1 - k )$ , where the minimum is taken over all possible sets of $k$ unit vectors $\\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { k }$ . ",
426
+ "bbox": [
427
+ 173,
428
+ 700,
429
+ 825,
430
+ 742
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "Corollary 1. Consider a $k \\times k$ matrix $\\mathbf { B } = [ b _ { i j } ] _ { i , j = 1 } ^ { k }$ with $b _ { i i } = 1$ and $b _ { i j } = 1 / ( 1 - k )$ , $\\forall i \\ne j$ Let the eigen decomposition of $\\mathbf { B }$ be $\\mathbf { B } = \\mathbf { U } \\pmb { \\Sigma } \\bar { \\mathbf { U } } ^ { \\dag }$ . For any $n \\geq k$ and $i = 1 , \\ldots , k$ , let $\\mathbf { v } _ { i }$ be the $i$ -th column of $\\mathbf { Q } \\mathbf { \\Sigma } ^ { \\mathrm { { X } ^ { 1 / 2 } \\bar { U } ^ { \\top } } }$ , where $\\mathbf { Q }$ is any $n \\times k$ matrix such that $\\mathbf { Q } ^ { \\intercal } \\mathbf { Q } = \\mathbf { I } _ { k }$ . Then, $a ( \\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { k } ) = \\operatorname* { m a x } _ { i \\neq j } \\mathbf { v } _ { i } ^ { \\mathsf { T } } \\mathbf { v } _ { j } = { 1 } / ( 1 - k )$ . ",
437
+ "bbox": [
438
+ 173,
439
+ 746,
440
+ 825,
441
+ 804
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "Corollary 1 suggests a diversity promoting scheme to maximally separate the equilibrium points of the neural ODE layer. The FC layer is represented by an $n \\times L$ matrix $\\mathbf { V } = \\left[ \\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { L } \\right]$ , where $n$ is the dimension of ${ \\mathbf z } ( T )$ , the output from the neural ODE layer. If ${ \\mathbf z } ( T )$ is generated from an input from class $l$ , it is mapped to $\\mathbf { v } _ { l }$ . By minimizing the maximum cosine similarity $a ( \\mathbf { v } _ { 1 } , \\ldots , \\mathbf { v } _ { k } ) = \\operatorname* { m a x } _ { i \\neq j } \\mathbf { v } _ { i } ^ { \\mathsf { T } } \\mathbf { v } _ { j }$ between the representations from two different classes, we ensure that the output of SODEF is robust to perturbations in the input. Corollary 1 provides a way to choose the FC layer weights $\\mathbf { V }$ . ",
448
+ "bbox": [
449
+ 173,
450
+ 814,
451
+ 825,
452
+ 911
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "To validate our observations, we conduct experiments to compare the robustness of ODE net [9] and TisODE [6] with and without our proposed FC layer V, on two standard datasets: MNIST [2] and CIFAR10 [12] 2. On the MNIST dataset, all models consist of four convolutional layers and one fully-connected layer. On the CIFAR10 dataset, the networks are similar to those for MNIST except the down-sampling network is a stack of 2 ResNet blocks. In practice, the neural ODE can be solved with different numerical solvers such as the Euler method and the Runge-Kutta methods [9]. Here, we use Runge-Kutta of order 5 in our experiments. Our implementation builds on the open-source neural ODE codes.3 During training, no Gaussian noise or adversarial examples are augmented into the training set. We test the performance of our model in defending against white-box attacks FGSM [17] and PGD [13] . The parameters for different attack methods used in this paper are given in the supplementary material. From Tables 1 and 2, we observe that for both datasets, our fixed FC layer improves each network’s defense ability by a significant margin. We visualize the features before the final FC layer using t-SNE [20] in Figs. 2 and 3. We observe that with the FC layer, the features for different classes are well separated even under attacks. ",
459
+ "bbox": [
460
+ 173,
461
+ 90,
462
+ 826,
463
+ 285
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "table",
469
+ "img_path": "images/0e5ba2745a4221d61b6b2b59a254f41e43e3de35524fb1614f36b886d3893236.jpg",
470
+ "table_caption": [
471
+ "Table 1: Classification accuracy $( \\% )$ on adversarial MNIST examples, where the superscript + indicates the last FC layer is fixed to be $\\mathbf { V }$ . "
472
+ ],
473
+ "table_footnote": [],
474
+ "table_body": "<table><tr><td>Attack</td><td>Para.</td><td>ODE</td><td>ODE+</td><td>TisODE</td><td>TisODE+</td></tr><tr><td>None</td><td>-</td><td>99.6</td><td>99.7</td><td>99.5</td><td>99.7</td></tr><tr><td>FGSM</td><td>∈ = 0.3</td><td>31.4</td><td>52.8</td><td>45.9</td><td>63.5</td></tr><tr><td>PGD</td><td>∈=0.3</td><td>0.29</td><td>0.30</td><td>0.4</td><td>20.20</td></tr></table>",
475
+ "bbox": [
476
+ 294,
477
+ 327,
478
+ 704,
479
+ 412
480
+ ],
481
+ "page_idx": 4
482
+ },
483
+ {
484
+ "type": "table",
485
+ "img_path": "images/a89e2702121d6d02f24b9e928e41b754195ff4c548711b8b858664ec9ba55b89.jpg",
486
+ "table_caption": [
487
+ "Table 2: Classification accuracy $( \\% )$ on adversarial CIFAR10 examples, where the superscript + indicates the last FC layer is fixed to be $\\mathbf { V }$ . "
488
+ ],
489
+ "table_footnote": [],
490
+ "table_body": "<table><tr><td>Attack</td><td>Para.</td><td>ODE ODE+</td><td>TisODE</td><td>TisODE+</td></tr><tr><td>None</td><td>-</td><td>87.0 85.0</td><td>87.4</td><td>81.8</td></tr><tr><td>FGSM</td><td>∈ = 0.1</td><td>12.9 47.6</td><td>13.1</td><td>41.9</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>7.8 14.7</td><td>7.4</td><td>16.2</td></tr></table>",
491
+ "bbox": [
492
+ 294,
493
+ 469,
494
+ 704,
495
+ 554
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "image",
501
+ "img_path": "images/2298e75b6e25d3394e76c905205ab4b066d9a6a5a3e690669fcd410610b0c475.jpg",
502
+ "image_caption": [
503
+ "Fig. 2: t-SNE visualization results on the features before the final FC layer. The input is the test set of MNIST. Left: trained with TisODE, middle: TisODE using a randomly chosen orthogonal matrix as the final FC, right: TisODE using proposed $\\mathbf { V }$ as the final FC. "
504
+ ],
505
+ "image_footnote": [],
506
+ "bbox": [
507
+ 214,
508
+ 589,
509
+ 789,
510
+ 684
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "3.2 Objective Formulation and Stability ",
517
+ "text_level": 1,
518
+ "bbox": [
519
+ 176,
520
+ 773,
521
+ 464,
522
+ 789
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "In this subsection, we formulate an optimization framework for SODEF to force output features to locate within the stable neighborhood of Lyapunov-stable equilibrium points. We make the following assumption. ",
529
+ "bbox": [
530
+ 174,
531
+ 799,
532
+ 825,
533
+ 840
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "Assumption 1. The input x takes values in a compact metric space $X$ and has probability distribution $\\mu$ . The feature extractor $h _ { \\phi }$ is injective and continuous. ",
540
+ "bbox": [
541
+ 174,
542
+ 844,
543
+ 823,
544
+ 873
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "image",
550
+ "img_path": "images/7a95cfded3451c7f092fca178fd0f289e9f1e03180a9b9200b577ccb2fbf9ae9.jpg",
551
+ "image_caption": [
552
+ "Fig. 3: t-SNE visualization results on the features before the final FC layer. The input is the adversarial examples of the test set of MNIST generated using FGSM method at $\\epsilon = 0 . 3$ . Left: trained with TisODE, middle: TisODE using a randomly chosen orthogonal matrix as the final FC, right: TisODE using proposed $\\mathbf { V }$ as the final FC. "
553
+ ],
554
+ "image_footnote": [],
555
+ "bbox": [
556
+ 215,
557
+ 102,
558
+ 790,
559
+ 179
560
+ ],
561
+ "page_idx": 5
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "The above assumption is satisfied if the input $x$ (e.g., an image) resides in a bounded and closed set of a Euclidean space. We denote the pushforward measure (still a probability distribution) of $\\mu$ under the continuous feature extractor mapping $h _ { \\phi }$ as $\\nu _ { \\phi } = \\mu \\circ h _ { \\phi } ^ { - 1 }$ , where $\\circ$ denotes function composition. The conditional probability distribution for the embedding of each class $l \\in \\{ 1 , . . . , L \\}$ has compact support $E _ { l } \\subset \\mathbb { R } ^ { n }$ since $E _ { l }$ is closed and $h _ { \\phi } ( X )$ is bounded in $\\mathbb { R } ^ { n }$ . In Section 3.1, the FC layer $\\mathbf { V }$ tries to maximize the distance between $E _ { l }$ , $l = 1 , \\ldots , L$ . In this section for analysis purposes, we also assume the following. ",
566
+ "bbox": [
567
+ 173,
568
+ 284,
569
+ 826,
570
+ 386
571
+ ],
572
+ "page_idx": 5
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "Assumption 2. We have $E _ { l } \\bigcap E _ { l ^ { \\prime } } = \\varnothing i f l \\neq l ^ { \\prime }$ , i.e., the supports of each class are pairwise disjoint. ",
577
+ "bbox": [
578
+ 174,
579
+ 388,
580
+ 823,
581
+ 405
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Our objective function is formulated as follows, which is explained in detail in the sequel: ",
588
+ "bbox": [
589
+ 176,
590
+ 416,
591
+ 769,
592
+ 431
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "equation",
598
+ "img_path": "images/17dad62102c6b430df4524e5a1b5fe563dc3b301d4cb21934e0dc25966c092c6.jpg",
599
+ "text": "$$\n\\begin{array} { r l } & { \\underset { \\theta , \\phi } { \\operatorname* { m i n } } \\mathbb { E } _ { \\boldsymbol { \\mu } } \\ell ( { \\mathbf { V } } ^ { \\top } ( { \\mathbf { z } } ( T ) ) , y _ { i } ) } \\\\ & { \\mathrm { s . t . } \\ \\mathbb { E } _ { \\boldsymbol { \\nu } _ { \\phi } } \\| f _ { \\theta } ( { \\mathbf { z } } ( 0 ) ) \\| _ { 2 } < \\epsilon , \\ f _ { \\theta } \\in C ^ { 1 } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } ) , } \\\\ & { \\quad \\quad \\quad \\mathbb { E } _ { \\boldsymbol { \\nu } _ { \\phi } } \\left[ \\nabla f _ { \\theta } ( { \\mathbf { z } } ( 0 ) ) \\right] _ { i i } < 0 , \\ \\forall i = 1 , \\ldots , n , } \\\\ & { \\quad \\quad \\mathbb { E } _ { \\boldsymbol { \\nu } _ { \\phi } } \\left[ | [ \\nabla f _ { \\theta } ( { \\mathbf { z } } ( 0 ) ) ] _ { i i } | - \\sum _ { j \\neq i } | [ \\nabla f _ { \\theta } ( { \\mathbf { z } } ( 0 ) ) ] _ { i j } | \\right] > 0 , \\ \\forall i = 1 , \\ldots , n , } \\end{array}\n$$",
600
+ "text_format": "latex",
601
+ "bbox": [
602
+ 263,
603
+ 438,
604
+ 730,
605
+ 541
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "$\\mathbf { z } ( 0 ) = h _ { \\phi } ( x )$ , and ${ \\mathbf z } ( T )$ is the output of (1) with input ${ \\bf z } ( 0 )$ . ",
612
+ "bbox": [
613
+ 299,
614
+ 542,
615
+ 700,
616
+ 559
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Here, $\\ell$ is a loss function and $\\epsilon > 0$ is a positive constant. The constraints (3) to (5) force ${ \\bf z } ( 0 )$ to be near the Lyapunov-stable equilibrium points with strictly diagonally dominant derivatives. We limit the $f _ { \\theta }$ to be in $C ^ { 1 } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } )$ to satisfy the condition in Theorem 1. From [21], we also know that standard multi-layer feed forward networks with as few as a single hidden layer and arbitrary bounded and non-constant activation function are universal approximators for $C ^ { 1 ^ { \\prime } } ( \\mathbb { R } ^ { n } , \\mathbb { R } ^ { n } )$ functions with respect to some performance criteria provided only that sufficiently many hidden units are available. ",
623
+ "bbox": [
624
+ 173,
625
+ 566,
626
+ 826,
627
+ 651
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "As a comparison, TisODE [6] only includes a constraint similar to (3), which in general provides no guarantee to force ${ \\bf z } ( 0 )$ near the Lyapunov-stable equilibrium points. In the extreme case with parameters $\\theta = 0$ for $f _ { \\theta }$ such that $f _ { \\pmb { \\theta } } = 0$ , the ODE degenerates to an identity mapping. No $\\mathbf { z } ( 0 ) \\in \\mathbb { R } ^ { n }$ can now be a Lyapunov-stable equilibrium point, and no stability can therefore be guaranteed to defend against adversarial attacks even though the ODE curves still possess the nonintersecting property and steady-state constraint, which were cited as reasons for the stability of TisODE. ",
634
+ "bbox": [
635
+ 173,
636
+ 656,
637
+ 825,
638
+ 753
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Instead of directly optimizing the above objective function, in our implementation, we optimize the following empirical Lagrangian with a training set $\\left\\{ \\left( x _ { k } , y _ { k } \\right) : k = 1 , { \\overset { - } { \\ldots } } , N \\right\\}$ : ",
645
+ "bbox": [
646
+ 174,
647
+ 760,
648
+ 825,
649
+ 790
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "equation",
655
+ "img_path": "images/0b4d301939d37a92afda712785de51f0bc1a3534c657b3defe6e57b3e127faa3.jpg",
656
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\operatorname* { m i n } _ { \\theta , \\phi } \\frac { 1 } { N } \\sum _ { k = 0 } ^ { N - 1 } \\bigg ( \\ell \\big ( \\mathbf { V } ^ { \\top } \\mathbf { z } _ { k } ( T ) , y _ { k } \\big ) + \\alpha _ { 1 } \\| f _ { \\theta } \\big ( \\mathbf { z } _ { k } ( 0 ) \\big ) \\| _ { 2 } + \\alpha _ { 2 } g _ { 1 } \\Big ( \\displaystyle \\sum _ { i = 1 } ^ { n } [ \\nabla f _ { \\theta } ( \\mathbf { z } _ { k } ( 0 ) ) ] _ { i i } \\Big ) } \\\\ { \\displaystyle \\quad \\quad + \\alpha _ { 3 } g _ { 2 } \\Big ( \\displaystyle \\sum _ { i = 1 } ^ { n } ( - | [ \\nabla f _ { \\theta } ( \\mathbf { z } _ { k } ( 0 ) ) ] _ { i i } | + \\displaystyle \\sum _ { j \\neq i } \\vert [ \\nabla f _ { \\theta } ( \\mathbf { z } _ { k } ( 0 ) ) ] _ { i j } | ) \\Big ) \\bigg ) } \\end{array}\n$$",
657
+ "text_format": "latex",
658
+ "bbox": [
659
+ 210,
660
+ 796,
661
+ 750,
662
+ 891
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "s. t. $\\mathbf { z } _ { k } ( 0 ) = h _ { \\phi } ( x _ { k } )$ , and ${ \\mathbf z } _ { k } ( T )$ is the output of (1) with input $\\mathbf { z } _ { k } ( 0 ) , \\forall k = 1 , . . . , N$ (8) ",
669
+ "bbox": [
670
+ 204,
671
+ 892,
672
+ 823,
673
+ 909
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "where $\\alpha _ { 1 } , \\alpha _ { 2 }$ and $\\alpha _ { 3 }$ are hyperparameter weights, $g _ { 1 }$ and $g _ { 2 }$ are chosen monotonically increasing functions bounded below to eliminate the unbounded impact of the two regularizers that can otherwise dominate the loss. In this paper, we set $g _ { 1 } ( \\cdot ) = g _ { 2 } ( \\cdot ) \\bar { = } \\exp ( \\cdot )$ . We call these two latter terms the SODEF regularizers. ",
680
+ "bbox": [
681
+ 174,
682
+ 92,
683
+ 825,
684
+ 147
685
+ ],
686
+ "page_idx": 6
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Suppose for each class $l = 1 , \\ldots , L$ , the embedding feature set $E _ { l } = \\{ \\mathbf { z } _ { 1 } ^ { ( l ) } , \\dots , \\mathbf { z } _ { k } ^ { ( l ) } \\}$ z(l)k } is finite. For each $i = 1 , \\ldots , k$ , let $\\mathbf { A } _ { i } \\in \\mathbb { R } ^ { n \\times n }$ be strictly diagonally dominant matrix with every main diagonal entry be negative such that the eigenvalues for $\\mathbf { A } _ { i }$ all have negative real part. From Theorem 3, each $\\mathbf { A } _ { i }$ is non-singular and every eigenvalue of $\\mathbf { A } _ { i }$ has negative real part. Therefore, from Theorem 2 and Lemma 1, there exists a function $f _ { \\theta }$ such that all $\\mathbf { z } _ { i } ^ { ( l ) }$ are Lyapunov-stable equilibrium points with corresponding first derivative $\\nabla f _ { \\pmb \\theta } ( \\mathbf z _ { i } ^ { ( l ) } ) = \\mathbf { A } _ { i }$ . This shows that if there exist only finite representation points for each class, we can find a function $f _ { \\theta }$ such that all inputs to the neural ODE layer are Lyapunov-stable equilibrium points for $f _ { \\theta }$ and ",
691
+ "bbox": [
692
+ 173,
693
+ 154,
694
+ 826,
695
+ 277
696
+ ],
697
+ "page_idx": 6
698
+ },
699
+ {
700
+ "type": "equation",
701
+ "img_path": "images/3bbe106347beefc10dd2696ad5328d308d46fd72b887ecee504a3bbcb4dd165d.jpg",
702
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } _ { \\boldsymbol \\nu _ { \\phi } } \\left\\| f _ { \\boldsymbol \\theta } ( \\mathbf { z } ( 0 ) ) \\right\\| _ { 2 } = 0 , } \\\\ & { \\mathbb { E } _ { \\boldsymbol \\nu _ { \\phi } } \\left[ \\nabla f _ { \\boldsymbol \\theta } ( \\mathbf { z } ( 0 ) ) \\right] _ { i i } < 0 , \\forall i = 1 , \\ldots , n , } \\\\ & { \\mathbb { E } _ { \\boldsymbol \\nu _ { \\phi } } \\left[ | [ \\nabla f _ { \\boldsymbol \\theta } ( \\mathbf { z } ( 0 ) ) ] _ { i i } | - \\sum _ { j \\neq i } \\vert [ \\nabla f _ { \\boldsymbol \\theta } ( \\mathbf { z } ( 0 ) ) ] _ { i j } \\vert \\right] > 0 , \\forall i = 1 , \\ldots , n . } \\end{array}\n$$",
703
+ "text_format": "latex",
704
+ "bbox": [
705
+ 230,
706
+ 284,
707
+ 679,
708
+ 353
709
+ ],
710
+ "page_idx": 6
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "If the input space $X$ has infinite cardinality, then an injective and continuous feature extractor $h _ { \\phi }$ results in a $\\nu _ { \\phi }$ with non-finite support, i.e., at least one $E _ { l }$ , $l = 1 , \\ldots , L$ , is infinite. It is not obvious whether we can obtain a $f _ { \\theta }$ where every point in $\\textstyle E = \\bigcup _ { l } E _ { l }$ is a stable equilibrium point. The following result gives a negative answer if $\\nu _ { \\phi }$ is a continuous measure (i.e., absolutely continuous with respect to (w.r.t.) Lebesgue measure) on some subset. ",
715
+ "bbox": [
716
+ 174,
717
+ 359,
718
+ 825,
719
+ 429
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Lemma 3. If the restriction of $\\nu _ { \\phi }$ to some open set $E ^ { \\prime } \\subset E$ is a continuous measure, there is no continuous function fθ such that for $\\nu _ { \\phi }$ -almost surely all $\\mathbf { z } \\in E$ , $f _ { \\pmb \\theta } ( \\mathbf z ) = 0$ and all the eigenvalues of $\\nabla f _ { \\boldsymbol { \\theta } } ( \\mathbf { z } )$ have negative real parts. In other words, there is no continuous function fθ such that almost surely all $\\mathbf { z }$ in $E$ are Lyapunov-stable equilibrium points. ",
726
+ "bbox": [
727
+ 173,
728
+ 433,
729
+ 823,
730
+ 488
731
+ ],
732
+ "page_idx": 6
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "Lemma 3 indicates that it is too much to hope for all points in $E$ to be Lyapunov-stable equilibrium points. In the following, we relax this requirement and show that under mild conditions, for all $\\epsilon > 0$ , we can find a continuous function $f _ { \\theta }$ with finitely many stable equilibrium points such that conditions (b) and (c) above hold and condition (a) is replaced by $\\mathbb { E } _ { \\boldsymbol { \\nu } _ { \\phi } } \\bar { \\| } f _ { \\theta } ( \\mathbf { z } ( 0 ) ) \\| _ { 2 } ^ { - } < \\epsilon$ . This motivates the optimization constraints in (3) to (5). ",
737
+ "bbox": [
738
+ 173,
739
+ 497,
740
+ 825,
741
+ 568
742
+ ],
743
+ "page_idx": 6
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "Theorem 4. Suppose Assumptions $I$ and 2. If $\\nu _ { \\phi }$ is not a continuous uniform measure on $E _ { l }$ for each $l = 1 , \\ldots , L$ , then the following holds: 1) The function space satisfying the constraints in (3) to (5) is non-empty for all $\\epsilon > 0$ . 2) If additionally the restriction of $\\nu _ { \\phi }$ to any open set $O \\subset E _ { l }$ is not a continuous uniform measure, there exist functions in this space such that each support $E _ { l }$ contains at least one Lyapunov-stable equilibrium point. ",
748
+ "bbox": [
749
+ 174,
750
+ 570,
751
+ 825,
752
+ 641
753
+ ],
754
+ "page_idx": 6
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "4 Experiments ",
759
+ "text_level": 1,
760
+ "bbox": [
761
+ 174,
762
+ 659,
763
+ 312,
764
+ 676
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "In this section, we evaluate the robustness of SODEF under adversarial attacks with different attack parameters. We conduct experiments to compare the robustness of ODE net [9] and TisODE net [6] on three standard datasets: MNIST [2], CIFAR10 and CIFAR100 [3]. Since SODEF is compatible with many defense methods, it can be applied to any neural network’s final regressor layer to enhance its stability against adversarial attacks. Our experiment codes are provided in https://github.com/KANGQIYU/SODEF. ",
771
+ "bbox": [
772
+ 173,
773
+ 689,
774
+ 825,
775
+ 773
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4.1 Setup",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 174,
785
+ 789,
786
+ 253,
787
+ 804
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "We use open-source pre-trained models that achieve the top accuracy on each dataset as the feature extractor $h _ { \\phi }$ . Specifically for simple MNIST task, we use the ResNet18 model provided in Pytorch. We use the model provided by [22], which obtains nearly $8 8 \\%$ clean accuracy on CIFAR100 using EfficientNet [23] and the model provided by [24], which has nearly $9 5 \\%$ clean accuracy on CIFAR10. In the neural ODE layer, $f _ { \\theta }$ consists of 2 FC layers. During the trainings of SODEF (except in the experiment included in Section 4.2), we train the neural network with the fixed FC introduced in Section 3.1. In the first 30 epochs, we fixed $f _ { \\theta }$ to let the feature extractor $h _ { \\phi }$ learn a feature representation with only the cross-entropy loss $\\ell$ , and in the remaining 120 epochs, we release $h _ { \\phi }$ to further train $f _ { \\theta }$ using (7) with $\\alpha _ { 1 } = 1$ and $\\alpha _ { 2 } = \\alpha _ { 3 } = 0 . 0 5$ . For CIFAR10 and CIFAR100, the pixel values are normalized by $( x - \\mu ) / \\sigma$ where $\\mu = [ 0 . 4 9 1 4 , 0 . 4 8 2 2 , 0 . 4 4 6 5 ]$ and $\\sigma = [ 0 . 2 0 2 3 , 0 . 1 9 9 4 , 0 . 2 0 1 0 ] ^ { 4 }$ . To show that our SODEF is compatible with many defense methods and can be applied to any neural network’s final regression layer, we conduct an experiment where we use a recently proposed robust network TRADES [25] as the feature extractor in our SODEF. The pretrained model is provided here 5, and we choose the model with architecture \"WRN- $3 4 \\mathrm { - } 1 0 \"$ to conduct our experiments. Besides the two vanilla white-box attacks FGSM and PGD as metioned in Section 3.1, we also include a strong ensemble attack AutoAttack [26], which sequentially performs attack using all of the following four individual attacks: three white-box attacks APGDCE, APGDTDLR and FABT[27], and one black-box Square attack [28]. We refer the reader to the the supplementary material for more details of the attacks used in this paper, where, in additional, more experiments are included. ",
794
+ "bbox": [
795
+ 174,
796
+ 814,
797
+ 826,
798
+ 911
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "",
805
+ "bbox": [
806
+ 174,
807
+ 90,
808
+ 825,
809
+ 257
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "4.2 Compatibility of SODEF ",
816
+ "text_level": 1,
817
+ "bbox": [
818
+ 174,
819
+ 273,
820
+ 385,
821
+ 287
822
+ ],
823
+ "page_idx": 7
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Adversarial training (AT) is one of the most effective strategies for defending adversarial attacks. TRADES [25] is one of the adversarial training defense methods with combinations of tricks of warmup, early stopping, weight decay, batch size and other hyper parameter settings. In this experiment we fix the pretained TRADES model (except the final FC layer (size $6 4 0 \\mathrm { x } 1 0 )$ ) as our feature extractor $h _ { \\phi }$ . We then append our (trainable) SODEF with integration time $T = 5$ to the output of the feature extractor. To evaluate model robustness, we use AutoAttack and attack the models using both the $\\mathcal { L } _ { 2 }$ norm $\\epsilon = 0 . 5$ ) and $\\mathcal { L } _ { \\infty }$ norm $( \\epsilon = 8 / 2 5 5 )$ ). The results are shown in Table 3. We clearly observe that our SODEF can enhance TRADES’s robustness under all the four individual attacks and the strongest ensemble AutoAttack. For the strong $\\mathcal { L } _ { 2 }$ AutoAttack, our SODEF have improved the model robustness from $5 9 . 4 2 \\%$ to $6 7 . 7 5 \\%$ . Our experiment show that SODEF can be applied to many defense models’ regression layer to enhance their stability against attacks. ",
828
+ "bbox": [
829
+ 173,
830
+ 297,
831
+ 825,
832
+ 450
833
+ ],
834
+ "page_idx": 7
835
+ },
836
+ {
837
+ "type": "table",
838
+ "img_path": "images/72bb27c9394cce1e70f688ac4fde16bcef7caea32833005fb4cf6ed7459bf413.jpg",
839
+ "table_caption": [
840
+ "Table 3: Classification accuracy $( \\% )$ using TRADES (w/ and w/o SODEF) under AutoAttack on adversarial CIFAR10 examples with $\\mathcal { L } _ { 2 }$ norm $\\epsilon = 0 . 5 )$ and $\\mathcal { L } _ { \\infty }$ norm $( \\epsilon = 8 / 2 5 5 )$ . "
841
+ ],
842
+ "table_footnote": [],
843
+ "table_body": "<table><tr><td colspan=\"4\">Attack /ModelTRADES LTRADES+SODEF LTRADES L2TRADES+SODEF L2</td></tr><tr><td>Clean</td><td>85.48</td><td>85.18</td><td>85.48 85.18</td></tr><tr><td>APGDcE</td><td>56.08</td><td>70.90</td><td>61.74 74.35</td></tr><tr><td>APGDDLR</td><td>53.70</td><td>64.15</td><td>59.22 68.55</td></tr><tr><td>FABT</td><td>54.18</td><td>82.92</td><td>60.31 83.15</td></tr><tr><td>Square</td><td>59.12</td><td>62.21</td><td>72.65 76.02</td></tr><tr><td>AutoAttack</td><td>53.69</td><td>57.76</td><td>59.42 67.75</td></tr></table>",
844
+ "bbox": [
845
+ 235,
846
+ 492,
847
+ 761,
848
+ 597
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "4.3 Influence of Integration Time $T$ ",
855
+ "text_level": 1,
856
+ "bbox": [
857
+ 174,
858
+ 627,
859
+ 431,
860
+ 642
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "From the discussion after Theorems 1 and 2, we know if the malicious perturbations around the ODE input Lyapunov-stable equilibrium point ${ \\bf z } ( 0 )$ is small, then the output ${ \\mathbf z } ( T )$ for large enough $T$ will not be affected significantly by the perturbation: $\\| \\tilde { { \\mathbf z } } ( t ) - { \\mathbf z } ( 0 ) \\| _ { 2 } \\dot { \\to } 0$ as $t \\to \\infty$ . Consequently, the succeeding network layers after the neural ODE layer can still perform well without being affected by the input perturbation. In this section, we test the influence of the SODEF integration time $T$ using CIFAR100. We use the model EfficientNet provided by [23] as $h _ { \\phi }$ (Note, unlike Section 4.2, $h _ { \\phi }$ is trainable in this experiments). We use AutoAttack with $\\mathcal { L } _ { 2 }$ norm $\\epsilon = 0 . 5$ ). We observe that for all the four individual attacks and the strongest ensemble AutoAttack, SODEF performs generally better for large integration time $T$ . We also test larger integration time $T > 1 0$ , but do not see any obvious improvements. ",
867
+ "bbox": [
868
+ 173,
869
+ 652,
870
+ 825,
871
+ 791
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "4.4 Performance Comparison Under AutoAttack ",
878
+ "text_level": 1,
879
+ "bbox": [
880
+ 173,
881
+ 808,
882
+ 526,
883
+ 823
884
+ ],
885
+ "page_idx": 7
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "For a comparison, we provide the results of applying AutoAttack to other baseline models mentioned in the paper. We set the same integration time for ODE, TisODE and SODEF. We observe that for the ",
890
+ "bbox": [
891
+ 176,
892
+ 833,
893
+ 823,
894
+ 861
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "table",
900
+ "img_path": "images/221ec33a77e3f820b4d08617a24a5d36fff411ef1966cd3186ed841be8ed6a35.jpg",
901
+ "table_caption": [
902
+ "Table 4: Classification accuracy $( \\% )$ under AutoAttack on adversarial CIFAR100 examples with $\\mathcal { L } _ { 2 }$ norm, $\\epsilon = 0 . 5$ and different integration time $T$ for SODEF. "
903
+ ],
904
+ "table_footnote": [],
905
+ "table_body": "<table><tr><td>Attack/T</td><td>1</td><td>3</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td></tr><tr><td>Clean</td><td>88.00</td><td>88.12</td><td>88.15</td><td>88.00</td><td>87.92</td><td>88.00</td><td>88.05</td><td>88.10</td></tr><tr><td>APGDcE</td><td>17.20</td><td>21.33</td><td>21.05</td><td>23.67</td><td>69.67</td><td>85.33</td><td>87.10</td><td>86.88</td></tr><tr><td>APGDLR</td><td>21.02</td><td>21.00</td><td>22.00</td><td>26.00</td><td>63.30</td><td>86.90</td><td>86.20</td><td>86.54</td></tr><tr><td>FABT</td><td>86.33</td><td>85.10</td><td>86.36</td><td>87.70</td><td>87.67</td><td>86.55</td><td>86.22</td><td>85.93</td></tr><tr><td>Square</td><td>84.67</td><td>86.22</td><td>87.05</td><td>87.20</td><td>86.90</td><td>86.33</td><td>87.05</td><td>86.75</td></tr><tr><td>AutoAttack</td><td>2.00</td><td>3.53</td><td>4.87</td><td>4.33</td><td>30.66</td><td>78.80</td><td>78.97</td><td>79.10</td></tr></table>",
906
+ "bbox": [
907
+ 243,
908
+ 116,
909
+ 756,
910
+ 220
911
+ ],
912
+ "page_idx": 8
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "strongest AutoAttack, our SODEF outperforms the other baseline models by a significant margin. In this case, SODEF achieves $7 9 . 1 0 \\%$ accuracy while other models only get less than $3 \\%$ accuracy. ",
917
+ "bbox": [
918
+ 173,
919
+ 246,
920
+ 825,
921
+ 275
922
+ ],
923
+ "page_idx": 8
924
+ },
925
+ {
926
+ "type": "table",
927
+ "img_path": "images/22e650d3db41d1dda7808ccc6f63fd084fecc876451293b266e6f81cd54c2ab8.jpg",
928
+ "table_caption": [
929
+ "Table 5: Classification accuracy $( \\% )$ under AutoAttack on adversarial CIFAR100 examples with $\\mathcal { L } _ { 2 }$ norm, $\\epsilon = 0 . 5$ and $T = 1 0$ . "
930
+ ],
931
+ "table_footnote": [],
932
+ "table_body": "<table><tr><td>Attack/Model</td><td>NoODE</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>Clean</td><td>88.00</td><td>87.90</td><td>88.00</td><td>88.10</td></tr><tr><td>APGDCE</td><td>23.30</td><td>6.75</td><td>14.32</td><td>86.88</td></tr><tr><td></td><td>7.33</td><td>22.00</td><td>24.20</td><td>86.54</td></tr><tr><td>FAB</td><td>79.30</td><td>78.67</td><td>77.16</td><td>85.93</td></tr><tr><td>Square</td><td>84.52</td><td>85.67</td><td>86.32</td><td>86.75</td></tr><tr><td>AutoAttack</td><td>0.00</td><td>1.33</td><td>4.06</td><td>79.10</td></tr></table>",
933
+ "bbox": [
934
+ 313,
935
+ 314,
936
+ 683,
937
+ 419
938
+ ],
939
+ "page_idx": 8
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "4.5 Performance Under PGD and FGSM Attacks ",
944
+ "text_level": 1,
945
+ "bbox": [
946
+ 174,
947
+ 440,
948
+ 527,
949
+ 457
950
+ ],
951
+ "page_idx": 8
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "White-box adversaries have knowledge of the classifier models, including training data, model architectures and parameters. We test the performance of our model in defending against the whitebox attacks, PGD and FGSM. We set $T = 5$ as the integration time for the neural ODE layer. The parameters for different attack methods used are given in the supplementary material. The subsequent experiments use these settings by default, unless otherwise stated. ",
956
+ "bbox": [
957
+ 173,
958
+ 467,
959
+ 826,
960
+ 536
961
+ ],
962
+ "page_idx": 8
963
+ },
964
+ {
965
+ "type": "table",
966
+ "img_path": "images/08b150433d3576a1490d72d07775e57a65e7a73c041808639a034b1d4b92953f.jpg",
967
+ "table_caption": [
968
+ "Table 6: Classification accuracy $( \\% )$ on adversarial MNIST examples. "
969
+ ],
970
+ "table_footnote": [],
971
+ "table_body": "<table><tr><td>Attack</td><td>Para.</td><td>no ode</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>None</td><td>-</td><td>99.45</td><td>99.42</td><td>99.43</td><td>99.44</td></tr><tr><td>FGSM</td><td>∈=0.3</td><td>10.03</td><td>29.6</td><td>36.70</td><td>63.36</td></tr><tr><td>PGD</td><td>∈= 0.3</td><td>0.31</td><td>1.56</td><td>1.82</td><td>45.25</td></tr></table>",
972
+ "bbox": [
973
+ 310,
974
+ 564,
975
+ 684,
976
+ 631
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "The classification results on MNIST are shown in Table 6. We observe that while maintaining the state-of-the-art accuracy on normal images, SODEF improves the adversarial robustness as compared to the other two methods. For the most effective attack in this experiment, i.e., PGD attack, SODEF shows a $4 5 . 2 5 \\% - 1 . 5 6 \\% = 4 3 . 6 9 \\%$ improvement over ODE and a $4 5 . 2 5 \\% - 1 . 2 3 \\% = 4 4 . 0 2 \\%$ improvement over TisODE. ",
983
+ "bbox": [
984
+ 173,
985
+ 643,
986
+ 826,
987
+ 713
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "table",
993
+ "img_path": "images/3c17b7a629d8b072e122c9a92c1b4da9ce1ce3169872ef2f345d05c365d9d807.jpg",
994
+ "table_caption": [
995
+ "Table 7: Classification accuracy $( \\% )$ on adversarial CIFAR10 examples. "
996
+ ],
997
+ "table_footnote": [],
998
+ "table_body": "<table><tr><td>Attack</td><td>Para.</td><td>no ode</td><td>ODE</td><td>TisODE</td><td>SODEF</td></tr><tr><td>None</td><td>-</td><td>95.2</td><td>94.9</td><td>95.1</td><td>95.0</td></tr><tr><td>FGSM</td><td>∈=0.1</td><td>47.31</td><td>45.23</td><td>43.28</td><td>68.05</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>3.09</td><td>3.21</td><td>3.80</td><td>55.59</td></tr></table>",
999
+ "bbox": [
1000
+ 310,
1001
+ 741,
1002
+ 686,
1003
+ 808
1004
+ ],
1005
+ "page_idx": 8
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "For CIFAR-10, we see from Table 7 that SODEF maintains high accuracy on normal examples and makes the best predictions under adversarial attacks. In particular, SODEF achieves an absolute percentage point improvement over ODE net up to $5 2 . 3 8 \\%$ and over TisODE up to $5 2 . 5 4 \\%$ for PGD attack. ",
1010
+ "bbox": [
1011
+ 173,
1012
+ 820,
1013
+ 826,
1014
+ 877
1015
+ ],
1016
+ "page_idx": 8
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "For CIFAR-100, the results in the supplementary material shows that the most effective attack causes the classification accuracy to drop relatively by $\\begin{array} { r } { 7 4 . 6 \\% = \\frac { 8 8 . 0 - 2 2 . 3 5 } { 8 8 . 0 } } \\end{array}$ 88.0−22.35 for SODEF and by $\\begin{array} { r } { 9 7 . 3 \\% = \\frac { 8 8 . 3 - 2 . 3 9 } { 8 8 . 3 } } \\end{array}$ for vanilla EfficientNet, which is pre-trained on ImageNet to obtain a top clean accuracy. Neither ODE net nor TisODE net can improve the classification accuracy under PGD attack by a big margin, e.g. TisODE net only improves the classification accuracy from $2 . 3 9 \\%$ to $3 . 4 4 \\%$ , while SODEF still shows clear defense capability in this scenario. ",
1021
+ "bbox": [
1022
+ 173,
1023
+ 882,
1024
+ 825,
1025
+ 914
1026
+ ],
1027
+ "page_idx": 8
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "",
1032
+ "bbox": [
1033
+ 174,
1034
+ 89,
1035
+ 825,
1036
+ 147
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "4.6 Ablation Studies ",
1043
+ "text_level": 1,
1044
+ "bbox": [
1045
+ 174,
1046
+ 165,
1047
+ 328,
1048
+ 179
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "The impact of the ODE with and without the SODEF regularizers in (7) has been presented in the above comparisons between SODEF and ODE. In this section, we show the necessity of diversity promoting using the FC introduced in Section 3.1 and conduct transferability study. ",
1055
+ "bbox": [
1056
+ 176,
1057
+ 190,
1058
+ 823,
1059
+ 233
1060
+ ],
1061
+ "page_idx": 9
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "4.6.1 Impact of Diversity Promotion ",
1066
+ "text_level": 1,
1067
+ "bbox": [
1068
+ 174,
1069
+ 248,
1070
+ 437,
1071
+ 263
1072
+ ],
1073
+ "page_idx": 9
1074
+ },
1075
+ {
1076
+ "type": "table",
1077
+ "img_path": "images/d06c699467442a5ac71624b7467860c1c3db93486d0d6f42604ef4497a5112f5.jpg",
1078
+ "table_caption": [
1079
+ "Table 8: Classification accuracy $( \\% )$ on adversarial MNIST examples, where the superscript indicates the last FC layer is not fixed to be $\\mathbf { V }$ and is set to be a trainable layer. "
1080
+ ],
1081
+ "table_footnote": [],
1082
+ "table_body": "<table><tr><td>Attack</td><td>Para.</td><td>SODEF</td><td>SODEF-</td></tr><tr><td>None</td><td>-</td><td>95.0</td><td>95.1</td></tr><tr><td>FGSM</td><td>∈=0.1</td><td>63.36</td><td>51.6</td></tr><tr><td>PGD</td><td>∈=0.1</td><td>45.25</td><td>34.9</td></tr></table>",
1083
+ "bbox": [
1084
+ 352,
1085
+ 316,
1086
+ 643,
1087
+ 402
1088
+ ],
1089
+ "page_idx": 9
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "Table 8 shows the difference of the defense performance when fixing the final FC be $\\mathbf { V }$ or setting it to a trainable linear layer. It can be seen that having diversity control improves the robustness. One possible reason for this phenomenon given in Section 3 is that diversity promotion with a fixed designed FC attempts to make the embedding feature support $E _ { l }$ of each class $l$ disjoint to each other and therefore the Lyapunov-stable equilibrium points for each $E _ { l }$ are well separated. ",
1094
+ "bbox": [
1095
+ 174,
1096
+ 417,
1097
+ 826,
1098
+ 488
1099
+ ],
1100
+ "page_idx": 9
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "4.6.2 Transferability Study ",
1105
+ "text_level": 1,
1106
+ "bbox": [
1107
+ 174,
1108
+ 503,
1109
+ 374,
1110
+ 518
1111
+ ],
1112
+ "page_idx": 9
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "Transferability study is carried out on CIFAR-10, where the adversarial examples are generated using FGSM and PGD attacks using ResNet18 without any ODEs. The classification accuracy drops from $6 8 . 0 5 \\%$ to $5 9 \\%$ for FGSM with $\\epsilon = 0 . 3$ , and from $5 5 . 5 9 \\%$ to $3 4 \\%$ for PGD with $\\epsilon = 0 . 1$ . One possible reason for this phenomenon is that ODEs have obfuscated gradient masking effect as discussed in [15], and a transfer attack may deteriorate the defense effect. However, as we observe from Table 7, even with a transfer attack on SODEF, it still performs better than other ODEs without transfer attacks. ",
1117
+ "bbox": [
1118
+ 174,
1119
+ 527,
1120
+ 825,
1121
+ 626
1122
+ ],
1123
+ "page_idx": 9
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "5 Conclusion ",
1128
+ "text_level": 1,
1129
+ "bbox": [
1130
+ 174,
1131
+ 646,
1132
+ 299,
1133
+ 662
1134
+ ],
1135
+ "page_idx": 9
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "In this paper, we have developed a new neural ODE network, SODEF, to suppress input perturbations. SODEF is compatible with any existing neural networks and can thus be appended to the state-of-theart networks to increase their robustness to adversarial attacks. We demonstrated empirically and theoretically that the robustness of SODEF mainly derives from its stability and proposed a training method that imposes constraints to ensure all eigenvalues of the Jacobian matrix of the neural ODE layer have negative real parts. When each classification class converges to its own equilibrium points, we showed that the last FC layer can be designed in such a way that the distance between the stable equilibrium points is maximized, which further improves the network’s robustness. The effectiveness of SODEF has been verified under several popular while-box attacks. ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 678,
1143
+ 825,
1144
+ 803
1145
+ ],
1146
+ "page_idx": 9
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Acknowledgments and Disclosure of Funding ",
1151
+ "text_level": 1,
1152
+ "bbox": [
1153
+ 174,
1154
+ 823,
1155
+ 553,
1156
+ 840
1157
+ ],
1158
+ "page_idx": 9
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "This research is supported in part by A\\*STAR under its RIE2020 Advanced Manufacturing and Engineering (AME) Industry Alignment Fund – Pre Positioning (IAF-PP) (Grant No. A19D6a0053) and the RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from the industry partner(s). The computational work for this article was partially performed on resources of the National Supercomputing Centre, Singapore (https://www.nscc.sg). ",
1163
+ "bbox": [
1164
+ 176,
1165
+ 854,
1166
+ 825,
1167
+ 911
1168
+ ],
1169
+ "page_idx": 9
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "",
1174
+ "bbox": [
1175
+ 173,
1176
+ 92,
1177
+ 825,
1178
+ 119
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Broader Impact ",
1185
+ "text_level": 1,
1186
+ "bbox": [
1187
+ 174,
1188
+ 138,
1189
+ 310,
1190
+ 156
1191
+ ],
1192
+ "page_idx": 10
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Our work, which contributes to more robust DNNs, is supposed to mitigate the threat of adversarial attacks. However, on the hand, the reliable deployment of DNNs in automation of tasks will potentially bring mass-scale unemployment and social unrest. As DNNs become more robust and more tasks, especially those whose failures will bring high risks to human lives or large property losses under adversarial attacks, fall into the automatic task category, massive jobs could disappear. ",
1197
+ "bbox": [
1198
+ 174,
1199
+ 171,
1200
+ 825,
1201
+ 241
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "References ",
1208
+ "text_level": 1,
1209
+ "bbox": [
1210
+ 174,
1211
+ 261,
1212
+ 266,
1213
+ 277
1214
+ ],
1215
+ "page_idx": 10
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "[1] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” in Proc. Advances Neural Inf. Process. Syst., 2012. \n[2] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, Nov. 1998. \n[3] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, and B. Kingsbury, “Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups,” IEEE Signal Process. Mag., vol. 29, no. 6, pp. 82–97, Nov. 2012. \n[4] D. Andor, C. Alberti, D. Weiss, A. Severyn, A. Presta, K. Ganchev, S. Petrov, and M. Collins, “Globally normalized transition-based neural networks,” in Proc. Annu. Meeting Assoc, Comput. Linguistics, 2016. \n[5] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus, “Intriguing properties of neural networks,” in Proc. Int. Conf. Learning Representations, 2013. \n[6] H. Yan, J. Du, V. Y. Tan, and J. Feng, “On robustness of neural ordinary differential equations,” in Proc. Advances Neural Inf. Process. Syst., 2018, pp. 1–13. \n[7] E. Haber and L. Ruthotto, “Stable architectures for deep neural networks,” Inverse Problems, vol. 34, no. 1, pp. 1–23, Dec. 2017. \n[8] X. Liu, S. Si, Q. Cao, S. Kumar, and C.-J. Hsieh, “How does noise help robustness? Explanation and exploration under the neural sde framework,” in Proc. Conf. Comput. Vision Pattern Recognition, 2020, pp. 282–290. \n[9] R. T. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, “Neural ordinary differential equations,” arXiv preprint arXiv:1806.07366, 2018. \n[10] C.-T. Chen and B. Shafai, Linear system theory and design. New York: Oxford university press New York, 1999. \n[11] Y. LeCun, C. Corte, and C. Burges, “MNIST handwritten digit database,” ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, vol. 2, 2010, (Last accessed: Dec 1, 2020). \n[12] A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” Master’s thesis, Department of Computer Science, University of Toronto, 2009. \n[13] A. M ˛adry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu, “Towards deep learning models resistant to adversarial attacks,” in Proc. Int. Conf. Learning Representations, 2018. \n[14] E. Haber and L. Ruthotto, “Stable architectures for deep neural networks,” Inverse Problems, vol. 34, no. 1, 2018. \n[15] Y. Huang, Y. Yu, H. Zhang, Y. Ma, and Y. Yao, “Adversarial robustness of stabilized neuralodes might be from obfuscated gradients,” arXiv preprint arXiv:2009.13145, 2020. \n[16] L. Mingjie, H. Lingshen, and L. Zhouchen, “Implicit Euler skip connections: Enhancing adversarial robustness via numerical stability,” in Proc. Int. Conf. Machine Learning, 2020. \n[17] I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and harnessing adversarial examples,” in Proc. Int. Conf. Learning Representations, 2015. \n[18] D. Arrowsmith and C. M. Place, Dynamical systems: differential equations, maps, and chaotic behaviour. London: CRC Press, 1992. \n[19] R. A. Horn and C. R. Johnson, Matrix analysis. New York: Cambridge university press, 2012. \n[20] L. Van der Maaten and G. Hinton, “Visualizing data using t-sne,” J. Mach. Learning Res., vol. 9, no. 11, pp. 2580–2605, Nov. 2008. \n[21] K. Hornik, “Approximation capabilities of multilayer feedforward networks,” Neural Networks, vol. 4, no. 2, pp. 251–257, Oct. 1991. \n[22] Y. Luo, Y. Wong, S. M. Kankanhalli, and Q. Zhao, “Direction concentration learning: Enhancing congruency in machine learning,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 43, no. 1, pp. 1928 – 1946, Jun. 2021. \n[23] M. Tan and Q. Le, “Efficientnet: Rethinking model scaling for convolutional neural networks,” in Proc. Int. Conf. Mach. Learning, 2019, pp. 6105–6114. \n[24] Github pytorch-cifar repository. Accessed: May 1, 2021. [Online]. Available: https: //github.com/kuangliu/pytorch-cifar \n[25] T. Pang, X. Yang, Y. Dong, H. Su, and J. Zhu, “Bag of tricks for adversarial training,” in Proc. Int. Conf. Learning Representations, 2021. \n[26] F. Croce and M. Hein, “Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks,” in Proc. Int. Conf. Mach. Learning, 2020, pp. 2206–2216. \n[27] ——, “Minimally distorted adversarial examples with a fast adaptive boundary attack,” in Proc. Int. Conf. Mach. Learning, 2020, pp. 2196–2205. \n[28] M. Andriushchenko, F. Croce, N. Flammarion, and M. Hein, “Square attack: a query-efficient black-box adversarial attack via random search,” in Proc. European Conf. Comput. Vision. Springer, 2020, pp. 484–501. ",
1220
+ "bbox": [
1221
+ 178,
1222
+ 280,
1223
+ 826,
1224
+ 914
1225
+ ],
1226
+ "page_idx": 10
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "",
1231
+ "bbox": [
1232
+ 171,
1233
+ 87,
1234
+ 830,
1235
+ 590
1236
+ ],
1237
+ "page_idx": 11
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Checklist ",
1242
+ "text_level": 1,
1243
+ "bbox": [
1244
+ 174,
1245
+ 612,
1246
+ 254,
1247
+ 628
1248
+ ],
1249
+ "page_idx": 11
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "1. For all authors... ",
1254
+ "bbox": [
1255
+ 214,
1256
+ 638,
1257
+ 339,
1258
+ 652
1259
+ ],
1260
+ "page_idx": 11
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "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] \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1265
+ "bbox": [
1266
+ 238,
1267
+ 657,
1268
+ 825,
1269
+ 748
1270
+ ],
1271
+ "page_idx": 11
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "2. If you are including theoretical results... ",
1276
+ "bbox": [
1277
+ 214,
1278
+ 753,
1279
+ 493,
1280
+ 767
1281
+ ],
1282
+ "page_idx": 11
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] . See Assumption 1 and Assumption 2 \n(b) Did you include complete proofs of all theoretical results? [Yes] . See supplementary material. ",
1287
+ "bbox": [
1288
+ 238,
1289
+ 771,
1290
+ 825,
1291
+ 830
1292
+ ],
1293
+ "page_idx": 11
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "3. If you ran experiments... ",
1298
+ "bbox": [
1299
+ 214,
1300
+ 834,
1301
+ 393,
1302
+ 849
1303
+ ],
1304
+ "page_idx": 11
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "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] . See Sections 3.1 and 4 \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Having ODE blocks in our model, it would be too computationally expensive to repeat experiments for many times. We repeated each experiment for 2-3 times and we observe the deviation of the classification results is within $\\pm 3 \\%$ , though these experimental repetitions are not enough to construct 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 Section 3.1. ",
1309
+ "bbox": [
1310
+ 238,
1311
+ 853,
1312
+ 825,
1313
+ 911
1314
+ ],
1315
+ "page_idx": 11
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "",
1320
+ "bbox": [
1321
+ 235,
1322
+ 92,
1323
+ 825,
1324
+ 205
1325
+ ],
1326
+ "page_idx": 12
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1331
+ "bbox": [
1332
+ 214,
1333
+ 209,
1334
+ 823,
1335
+ 224
1336
+ ],
1337
+ "page_idx": 12
1338
+ },
1339
+ {
1340
+ "type": "text",
1341
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] See Sections 3.1 and 4 for the open-source models we have used from GitHub. \n(b) Did you mention the license of the assets? [No] . Please see the licenses given in the GitHub link. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] No new assets. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] MNIST, CIFAR-10 and CIFAR-100 are all open-source datasets. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] There is no identifiable information or offensive content in the datasets. ",
1342
+ "bbox": [
1343
+ 238,
1344
+ 228,
1345
+ 825,
1346
+ 390
1347
+ ],
1348
+ "page_idx": 12
1349
+ },
1350
+ {
1351
+ "type": "text",
1352
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1353
+ "bbox": [
1354
+ 214,
1355
+ 395,
1356
+ 705,
1357
+ 410
1358
+ ],
1359
+ "page_idx": 12
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "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] ",
1364
+ "bbox": [
1365
+ 238,
1366
+ 412,
1367
+ 825,
1368
+ 502
1369
+ ],
1370
+ "page_idx": 12
1371
+ }
1372
+ ]
parse/train/9CPc4EIr2t1/9CPc4EIr2t1_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/9CPc4EIr2t1/9CPc4EIr2t1_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1g5sA4twr/B1g5sA4twr.md ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP DOUBLE DESCENT: WHERE BIGGER MODELS AND MORE DATA HURT
2
+
3
+ Preetum Nakkiran∗ Harvard University
4
+
5
+ Gal Kaplun† Harvard University
6
+
7
+ Yamini Bansal† Harvard University
8
+
9
+ Tristan Yang Harvard University
10
+
11
+ Boaz Barak Harvard University
12
+
13
+ Ilya Sutskever OpenAI
14
+
15
+ # ABSTRACT
16
+
17
+ We show that a variety of modern deep learning tasks exhibit a “double-descent” phenomenon where, as we increase model size, performance first gets worse and then gets better. Moreover, we show that double descent occurs not just as a function of model size, but also as a function of the number of training epochs. We unify the above phenomena by defining a new complexity measure we call the effective model complexity and conjecture a generalized double descent with respect to this measure. Furthermore, our notion of model complexity allows us to identify certain regimes where increasing (even quadrupling) the number of train samples actually hurts test performance.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ ![](images/c4a62cbdb7fbeb5034e735ae46b0639e991da1ee0ce7c9ca2623db843dff96c3.jpg)
22
+ Figure 1: Left: Train and test error as a function of model size, for ResNet18s of varying width on CIFAR-10 with $15 \%$ label noise. Right: Test error, shown for varying train epochs. All models trained using Adam for 4K epochs. The largest model (width 64) corresponds to standard ResNet18.
23
+
24
+ The bias-variance trade-off is a fundamental concept in classical statistical learning theory (e.g., Hastie et al. (2005)). The idea is that models of higher complexity have lower bias but higher variance. According to this theory, once model complexity passes a certain threshold, models “overfit” with the variance term dominating the test error, and hence from this point onward, increasing model complexity will only decrease performance (i.e., increase test error). Hence conventional wisdom in classical statistics is that, once we pass a certain threshold, “larger models are worse.”
25
+
26
+ However, modern neural networks exhibit no such phenomenon. Such networks have millions of parameters, more than enough to fit even random labels (Zhang et al. (2016)), and yet they perform much better on many tasks than smaller models. Indeed, conventional wisdom among practitioners is that “larger models are better’’ (Krizhevsky et al. (2012), Huang et al. (2018), Szegedy et al.
27
+
28
+ ![](images/08ba3538956dd39cc42384ec2f1e07bf08c6fc91c71879c2a0bb15a89998beb1.jpg)
29
+ Figure 2: Left: Test error as a function of model size and train epochs. The horizontal line corresponds to model-wise double descent–varying model size while training for as long as possible. The vertical line corresponds to epoch-wise double descent, with test error undergoing double-descent as train time increases. Right Train error of the corresponding models. All models are Resnet18s trained on CIFAR-10 with $15 \%$ label noise, data-augmentation, and Adam for up to 4K epochs.
30
+
31
+ (2015), Radford et al. (2019)). The effect of training time on test performance is also up for debate. In some settings, “early stopping” improves test performance, while in other settings training neural networks to zero training error only improves performance. Finally, if there is one thing both classical statisticians and deep learning practitioners agree on is “more data is always better”.
32
+
33
+ In this paper, we present empirical evidence that both reconcile and challenge some of the above “conventional wisdoms.” We show that many deep learning settings have two different regimes. In the under-parameterized regime, where the model complexity is small compared to the number of samples, the test error as a function of model complexity follows the U-like behavior predicted by the classical bias/variance tradeoff. However, once model complexity is sufficiently large to interpolate i.e., achieve (close to) zero training error, then increasing complexity only decreases test error, following the modern intuition of “bigger models are better”. Similar behavior was previously observed in Opper (1995; 2001), Advani & Saxe (2017), Spigler et al. (2018), and Geiger et al. (2019b). This phenomenon was first postulated in generality by Belkin et al. (2018) who named it “double descent”, and demonstrated it for decision trees, random features, and 2-layer neural networks with $\ell _ { 2 }$ loss, on a variety of learning tasks including MNIST and CIFAR-10.
34
+
35
+ Main contributions. We show that double descent is a robust phenomenon that occurs in a variety of tasks, architectures, and optimization methods (see Figure 1 and Section 5; our experiments are summarized in Table A). Moreover, we propose a much more general notion of “double descent” that goes beyond varying the number of parameters. We define the effective model complexity (EMC) of a training procedure as the maximum number of samples on which it can achieve close to zero training error. The EMC depends not just on the data distribution and the architecture of the classifier but also on the training procedure—and in particular increasing training time will increase the EMC.
36
+
37
+ We hypothesize that for many natural models and learning algorithms, double descent occurs as a function of the EMC. Indeed we observe “epoch-wise double descent” when we keep the model fixed and increase the training time, with performance following a classical U-like curve in the underfitting stage (when the EMC is smaller than the number of samples) and then improving with training time once the EMC is sufficiently larger than the number of samples (see Figure 2). As a corollary, early stopping only helps in the relatively narrow parameter regime of critically parameterized models.
38
+
39
+ Sample non-monotonicity. Finally, our results shed light on test performance as a function of the number of train samples. Since the test error peaks around the point where EMC matches the number of samples (the transition from the under- to over-parameterization), increasing the number of samples has the effect of shifting this peak to the right. While in most settings increasing the number of samples decreases error, this shifting effect can sometimes result in a setting where more data is worse! For example, Figure 3 demonstrates cases in which increasing the number of samples by a factor of 4.5 results in worse test performance.
40
+
41
+ ![](images/5c137bc12053fdd4c20394058fe9f6b4430c5f548f5d67abd01978eb2d8cc676.jpg)
42
+ Figure 3: Test loss (per-token perplexity) as a function of Transformer model size (embedding dimension $d _ { m o d e l . }$ ) on language translation (IWSLT‘14 German-to-English). The curve for $1 8 \mathrm { k }$ samples is generally lower than the one for $4 \mathrm { k }$ samples, but also shifted to the right, since fitting 18k samples requires a larger model. Thus, for some models, the performance for $1 8 \mathrm { k }$ samples is worse than for $4 \mathrm { k \Omega }$ samples.
43
+
44
+ # 2 OUR RESULTS
45
+
46
+ To state our hypothesis more precisely, we define the notion of effective model complexity. We define a training procedure $\tau$ to be any procedure that takes as input a set $S = \{ ( x _ { 1 } , y _ { 1 } ) , \dots , ( x _ { n } , y _ { n } ) \}$ of labeled training samples and outputs a classifier $\mathcal { T } ( S )$ mapping data to labels. We define the effective model complexity of $\tau$ (w.r.t. distribution $\mathcal { D }$ ) to be the maximum number of samples $n$ on which $\tau$ achieves on average $\approx 0$ training error.
47
+
48
+ Definition 1 (Effective Model Complexity) The Effective Model Complexity (EMC) of a training procedure $\tau$ , with respect to distribution $\mathcal { D }$ and parameter $\epsilon > 0$ , is defined as:
49
+
50
+ $$
51
+ \operatorname { E M C } _ { { \mathscr { D } } , \epsilon } ( { \mathscr { T } } ) : = \operatorname* { m a x } \left\{ n \mid \mathbb { E } _ { S \sim { \mathscr { D } } ^ { n } } [ \operatorname { E r r o r } _ { S } ( { \mathscr { T } } ( S ) ) ] \leq \epsilon \right\}
52
+ $$
53
+
54
+ where Error $s ( M )$ is the mean error of model $M$ on train samples $S$ .
55
+
56
+ Our main hypothesis can be informally stated as follows:
57
+
58
+ Hypothesis 1 (Generalized Double Descent hypothesis, informal) For any natural data distribution $\mathcal { D }$ , neural-network-based training procedure $\tau$ , and small $\epsilon > 0$ , if we consider the task of predicting labels based on n samples from $\mathcal { D }$ then:
59
+
60
+ Under-paremeterized regime. If $\cdot _ { \mathrm { E M C } _ { { \mathscr D } , \epsilon } } ( \mathcal T )$ is sufficiently smaller than $n _ { \ast }$ , any perturbation of $\tau$ that increases its effective complexity will decrease the test error.
61
+
62
+ Over-parameterized regime. If $\mathrm { E M C } _ { { \cal D } , \epsilon } ( T )$ is sufficiently larger than $n$ , any perturbation of $\tau$ that increases its effective complexity will decrease the test error.
63
+
64
+ Critically parameterized regime. I $f \mathrm { E M C } _ { \mathcal { D } , \epsilon } ( \mathcal { T } ) \approx n$ , then a perturbation of $\tau$ that increases its effective complexity might decrease or increase the test error.
65
+
66
+ Hypothesis 1 is informal in several ways. We do not have a principled way to choose the parameter $\epsilon$ (and currently heuristically use $\epsilon = 0 . 1$ ). We also are yet to have a formal specification for “sufficiently smaller” and “sufficiently larger”. Our experiments suggest that there is a critical interval around the interpolation threshold when $\mathrm { E M C } _ { \mathcal { D } , \epsilon } ( \mathcal { T } ) = n$ : below and above this interval increasing complexity helps performance, while within this interval it may hurt performance. The width of the critical interval depends on both the distribution and the training procedure in ways we do not yet completely understand.
67
+
68
+ We believe Hypothesis 1 sheds light on the interaction between optimization algorithms, model size, and test performance and helps reconcile some of the competing intuitions about them. The main result of this paper is an experimental validation of Hypothesis 1 under a variety of settings, where we considered several natural choices of datasets, architectures, and optimization algorithms, and we changed the “interpolation threshold” by varying the number of model parameters, the length of training, the amount of label noise in the distribution, and the number of train samples.
69
+
70
+ Model-wise Double Descent. In Section 5, we study the test error of models of increasing size, for a fixed large number of optimization steps. We show that “model-wise double-descent” occurs for various modern datasets (CIFAR-10, CIFAR-100, IWSLT‘14 de-en, with varying amounts of label noise), model architectures (CNNs, ResNets, Transformers), optimizers (SGD, Adam), number of train samples, and training procedures (data-augmentation, and regularization). Moreover, the peak in test error systematically occurs at the interpolation threshold. In particular, we demonstrate realistic settings in which bigger models are worse.
71
+
72
+ Epoch-wise Double Descent. In Section 6, we study the test error of a fixed, large architecture over the course of training. We demonstrate, in similar settings as above, a corresponding peak in test performance when models are trained just long enough to reach $\approx 0$ train error. The test error of a large model first decreases (at the beginning of training), then increases (around the critical regime), then decreases once more (at the end of training)—that is, training longer can correct overfitting.
73
+
74
+ Sample-wise Non-monotonicity. In Section 7, we study the test error of a fixed model and training procedure, for varying number of train samples. Consistent with our generalized double-descent hypothesis, we observe distinct test behavior in the “critical regime”, when the number of samples is near the maximum that the model can fit. This often manifests as a long plateau region, in which taking significantly more data might not help when training to completion (as is the case for CNNs on CIFAR-10). Moreover, we show settings (Transformers on IWSLT‘14 en-de), where this manifests as a peak—and for a fixed architecture and training procedure, more data actually hurts.
75
+
76
+ Remarks on Label Noise. We observe all forms of double descent most strongly in settings with label noise in the train set (as is often the case when collecting train data in the real-world). However, we also show several realistic settings with a test-error peak even without label noise: ResNets (Figure 4a) and CNNs (Figure 20) on CIFAR-100; Transformers on IWSLT‘14 (Figure 8). Moreover, all our experiments demonstrate distinctly different test behavior in the critical regime— often manifesting as a “plateau” in the test error in the noiseless case which develops into a peak with added label noise. See Section 8 for further discussion.
77
+
78
+ # 3 RELATED WORK
79
+
80
+ Model-wise double descent was first proposed as a general phenomenon by Belkin et al. (2018). Similar behavior had been observed in Opper (1995; 2001), Advani & Saxe (2017), Spigler et al. (2018), and Geiger et al. (2019b). Subsequently, there has been a large body of work studying the double descent phenomenon. A growing list of papers that theoretically analyze it in the tractable setting of linear least squares regression includes Belkin et al. (2019); Hastie et al. (2019); Bartlett et al. (2019); Muthukumar et al. (2019); Bibas et al. (2019); Mitra (2019); Mei & Montanari (2019). Moreover, Geiger et al. (2019a) provide preliminary results for model-wise double descent in convolutional networks trained on CIFAR-10. Our work differs from the above papers in two crucial aspects: First, we extend the idea of double-descent beyond the number of parameters to incorporate the training procedure under a unified notion of “Effective Model Complexity”, leading to novel insights like epoch-wise double descent and sample non-monotonicity. The notion that increasing train time corresponds to increasing complexity was also presented in Nakkiran et al. (2019). Second, we provide an extensive and rigorous demonstration of double-descent in modern deep learning, spanning a variety of architectures, datasets, and optimization procedures. An extended discussion of the related work is provided in Appendix C.
81
+
82
+ # 4 EXPERIMENTAL SETUP
83
+
84
+ We briefly describe the experimental setup here; full details are in Appendix B 1. We consider three families of architectures: ResNets, standard CNNs, and Transformers. ResNets: We parameterize a family of ResNet18s (He et al. (2016)) by scaling the width (number of filters) of convolutional layers. Specifically, we use layer widths $[ k , 2 k , \bar { 4 } k , 8 k ]$ for varying $k$ . The standard ResNet18 corresponds to $k = 6 4$ . Standard CNNs: We consider a simple family of 5-layer CNNs, with 4 convolutional layers of widths $[ k , 2 k , 4 k , 8 k ]$ for varying $k$ , and a fully-connected layer. For context, the CNN with width $k = 6 4$ , can reach over $9 0 \%$ test accuracy on CIFAR-10 with dataaugmentation. Transformers: We consider the 6 layer encoder-decoder from Vaswani et al. (2017), as implemented by Ott et al. (2019). We scale the size of the network by modifying the embedding dimension $d _ { \mathrm { m o d e l } }$ , and setting the width of the fully-connected layers proportionally $( d _ { \mathrm { f f } } = 4 \cdot d _ { \mathrm { m o d e l } } )$ .
85
+
86
+ For ResNets and CNNs, we train with cross-entropy loss, and the following optimizers: (1) Adam with learning-rate 0.0001 for 4K epochs; (2) SGD with learning rate $\propto \frac { 1 } { \sqrt { T } }$ for 500K gradient steps. We train Transformers for 80K gradient steps, with $10 \%$ label smoothing and no drop-out.
87
+
88
+ Label Noise. In our experiments, label noise of probability $p$ refers to training on a samples which have the correct label with probability $( 1 - p )$ , and a uniformly random incorrect label otherwise (label noise is sampled only once and not per epoch). Figure 1 plots test error on the noisy distribution, while the remaining figures plot test error with respect to the clean distribution (the two curves are just linear rescaling of one another).
89
+
90
+ # 5 MODEL-WISE DOUBLE DESCENT
91
+
92
+ ![](images/faae61f59becd773c511ccf37b8969226757057fa9adbb5ab757470a3e69071b.jpg)
93
+ (a) CIFAR-100. There is a peak in test error even with no label noise.
94
+ Figure 4: Model-wise double descent for ResNet18s. Trained on CIFAR-100 and CIFAR-10, with varying label noise. Optimized using Adam with LR 0.0001 for 4K epochs, and data-augmentation.
95
+
96
+ ![](images/e3fd45bf969858879ad23096c5a3e4c6e094f04bd2b0a277a1d81691dbc44055.jpg)
97
+ (b) CIFAR-10. There is a “plateau” in test error around the interpolation point with no label noise, which develops into a peak for added label noise.
98
+
99
+ In this section, we study the test error of models of increasing size, when training to completion (for a fixed large number of optimization steps). We demonstrate model-wise double descent across different architectures, datasets, optimizers, and training procedures. The critical region exhibits distinctly different test behavior around the interpolation point and there is often a peak in test error that becomes more prominent in settings with label noise.
100
+
101
+ For the experiments in this section (Figures 4, 5, 6, 7, 8), notice that all modifications which increase the interpolation threshold (such as adding label noise, using data augmentation, and increasing the number of train samples) also correspondingly shift the peak in test error towards larger models. Additional plots showing the early-stopping behavior of these models, and additional experiments showing double descent in settings with no label noise (e.g. Figure 19) are in Appendix E.2. We also observed model-wise double descent for adversarial training, with a prominent robust test error peak even in settings without label noise. See Figure 26 in Appendix E.2.
102
+
103
+ Discussion. Fully understanding the mechanisms behind model-wise double descent in deep neural networks remains an important open question. However, an analog of model-wise double descent occurs even for linear models. A recent stream of theoretical works analyzes this setting (Bartlett et al. (2019); Muthukumar et al. (2019); Belkin et al. (2019); Mei & Montanari (2019); Hastie et al. (2019)). We believe similar mechanisms may be at work in deep neural networks.
104
+
105
+ Informally, our intuition is that for model-sizes at the interpolation threshold, there is effectively only one model that fits the train data and this interpolating model is very sensitive to noise in the train set and/or model mis-specification. That is, since the model is just barely able to fit the train data, forcing it to fit even slightly-noisy or mis-specified labels will destroy its global structure, and result in high test error. (See Figure 28 in the Appendix for an experiment demonstrating this noise sensitivity, by showing that ensembling helps significantly in the critically-parameterized regime). However for over-parameterized models, there are many interpolating models that fit the train set, and SGD is able to find one that “memorizes” (or “absorbs”) the noise while still performing well on the distribution.
106
+
107
+ ![](images/44d6b8438c0d02d0c76c80ad346b4c82268cb44163651e6cd9d1516b78b9044e.jpg)
108
+ Figure 5: Effect of Data Augmentation. 5-layer CNNs on CIFAR10, with and without dataaugmentation. Data-augmentation shifts the interpolation threshold to the right, shifting the test error peak accordingly. Optimized using SGD for 500K steps. See Figure 27 for larger models.
109
+
110
+ ![](images/8100cdf1068362adc8d85ddd7ddddf0ee7d65cdfb04eb08ce1bab31e8561ac9f.jpg)
111
+
112
+ ![](images/f4e2caa4b4e7287a955aced3cc3d523468cc0ef98464146881383b6d073e6465.jpg)
113
+ Figure 6: SGD vs. Adam. 5-Layer CNNs on CIFAR-10 with no label noise, and no data augmentation. Optimized using SGD for 500K gradient steps, and Adam for 4K epochs.
114
+
115
+ ![](images/c8160258a06627d94e03682b0cb3a5ea98fb3a6cc2efc061ae766953b89696b3.jpg)
116
+ Figure 7: Noiseless settings. 5-layer CNNs on CIFAR-100 with no label noise; note the peak in test error. Trained with SGD and no data augmentation. See Figure 20 for the early-stopping behavior of these models.
117
+
118
+ The above intuition is theoretically justified for linear models. In general, this situation manifests even without label noise for linear models (Mei & Montanari (2019)), and occurs whenever there is model mis-specification between the structure of the true distribution and the model family. We believe this intuition extends to deep learning as well, and it is consistent with our experiments.
119
+
120
+ ![](images/2b473a4c748ee138162c045888f88cd9f7560771b9e3d4fa5dd16e01c2027a36.jpg)
121
+ Figure 8: Transformers on language translation tasks: Multi-head-attention encoderdecoder Transformer model trained for $8 0 \mathrm { k }$ gradient steps with labeled smoothed cross-entropy loss on IWSLT‘14 Germanto-English (160K sentences) and WMT‘14 English-to-French (subsampled to 200K sentences) dataset. Test loss is measured as pertoken perplexity.
122
+
123
+ # 6 EPOCH-WISE DOUBLE DESCENT
124
+
125
+ In this section, we demonstrate a novel form of double-descent with respect to training epochs, which is consistent with our unified view of effective model complexity (EMC) and the generalized double descent hypothesis. Increasing the train time increases the EMC—and thus a sufficiently large model transitions from under- to over-parameterized over the course of training.
126
+
127
+ ![](images/bdca8d3385fd5d02c8443adb0acbb61793b4152837145966b74e283d6ca4c7db.jpg)
128
+ Figure 9: Left: Training dynamics for models in three regimes. Models are ResNet18s on CIFAR10 with $20 \%$ label noise, trained using Adam with learning rate 0.0001, and data augmentation. Right: Test error over (Model size $\times$ Epochs). Three slices of this plot are shown on the left.
129
+
130
+ As illustrated in Figure 9, sufficiently large models can undergo a “double descent” behavior where test error first decreases then increases near the interpolation threshold, and then decreases again. In contrast, for “medium sized” models, for which training to completion will only barely reach $\approx 0$ error, the test error as a function of training time will follow a classical U-like curve where it is better to stop early. Models that are too small to reach the approximation threshold will remain in the “under parameterized” regime where increasing train time monotonically decreases test error. Our experiments (Figure 10) show that many settings of dataset and architecture exhibit epoch-wise double descent, in the presence of label noise. Further, this phenomenon is robust across optimizer variations and learning rate schedules (see additional experiments in Appendix E.1). As in modelwise double descent, the test error peak is accentuated with label noise.
131
+
132
+ Conventional wisdom suggests that training is split into two phases: (1) In the first phase, the network learns a function with a small generalization gap (2) In the second phase, the network starts to over-fit the data leading to an increase in test error. Our experiments suggest that this is not the complete picture—in some regimes, the test error decreases again and may achieve a lower value at the end of training as compared to the first minimum (see Fig 10 for $10 \%$ label noise).
133
+
134
+ ![](images/82b708c209b3222a2c568a1bae6bfb22a279f3b426ac29068d13db60405918ac.jpg)
135
+ Figure 10: Epoch-wise double descent for ResNet18 and CNN (width $\scriptstyle 1 = 1 2 8$ ). ResNets trained using Adam with learning rate 0.0001, and CNNs trained with SGD with inverse-squareroot learning rate.
136
+
137
+ # 7 SAMPLE-WISE NON-MONOTONICITY
138
+
139
+ In this section, we investigate the effect of varying the number of train samples, for a fixed model and training procedure. Previously, in model-wise and epoch-wise double descent, we explored behavior in the critical regime, where $\mathrm { E M C } _ { \mathcal { D } , \epsilon } ( \mathcal { T } ) \approx n$ , by varying the EMC. Here, we explore the critical regime by varying the number of train samples $n$ . By increasing $n$ , the same training procedure $\tau$ can switch from being effectively over-parameterized to effectively under-parameterized.
140
+
141
+ We show that increasing the number of samples has two different effects on the test error vs. model complexity graph. On the one hand, (as expected) increasing the number of samples shrinks the area under the curve. On the other hand, increasing the number of samples also has the effect of “shifting the curve to the right” and increasing the model complexity at which test error peaks.
142
+
143
+ ![](images/69cf7d93b6796ff455f7a65cbe3879b86a15c2ae223d5fc03fc1b54ea4f75d5d.jpg)
144
+
145
+ ![](images/0c5bdb0c4ceaff9263d9a08a26498be4a038c2547b0dcb1c349a3eef853ce750.jpg)
146
+
147
+ (a) Model-wise double descent for 5-layer CNNs on CIFAR-10, for varying dataset sizes. Top: There is a range of model sizes (shaded green) where training on $2 \times$ more samples does not improve test error. Bottom: There is a range of model sizes (shaded red) where training on $4 \times$ more samples does not improve test error.
148
+
149
+ (b) Sample-wise non-monotonicity. Test loss (per-word perplexity) as a function of number of train samples, for two transformer models trained to completion on IWSLT’14. For both model sizes, there is a regime where more samples hurt performance. Compare to Figure 3, of model-wise double-descent in the identical setting.
150
+
151
+ Figure 11: Sample-wise non-monotonicity.
152
+
153
+ These twin effects are shown in Figure 11a. Note that there is a range of model sizes where the effects “cancel out”—and having $4 \times$ more train samples does not help test performance when training to completion. Outside the critically-parameterized regime, for sufficiently under- or overparameterized models, having more samples helps. This phenomenon is corroborated in Figure 12, which shows test error as a function of both model and sample size, in the same setting as Figure 11a.
154
+
155
+ ![](images/67eb2031049b3e7bf4fd7bf3717f93c4f08018a552ffa050f6ba459a5d149a71.jpg)
156
+ Figure 12: Left: Test Error as a function of model size and number of train samples, for 5-layer CNNs on CIFAR- $10 + 2 0 \%$ noise. Note the ridge of high test error again lies along the interpolation threshold. Right: Three slices of the left plot, showing the effect of more data for models of different sizes. Note that, when training to completion, more data helps for small and large models, but does not help for near-critically-parameterized models (green).
157
+
158
+ In some settings, these two effects combine to yield a regime of model sizes where more data actually hurts test performance as in Figure 3 (see also Figure 11b). Note that this phenomenon is not unique to DNNs: more data can hurt even for linear models (see Appendix D).
159
+
160
+ # 8 CONCLUSION AND DISCUSSION
161
+
162
+ We introduce a generalized double descent hypothesis: models and training procedures exhibit atypical behavior when their Effective Model Complexity is comparable to the number of train samples. We provide extensive evidence for our hypothesis in modern deep learning settings, and show that it is robust to choices of dataset, architecture, and training procedures. In particular, we demonstrate “model-wise double descent” for modern deep networks and characterize the regime where bigger models can perform worse. We also demonstrate “epoch-wise double descent,” which, to the best of our knowledge, has not been previously proposed. Finally, we show that the double descent phenomenon can lead to a regime where training on more data leads to worse test performance. Preliminary results suggest that double descent also holds as we vary the amount of regularization for a fixed model (see Figure 22).
163
+
164
+ We also believe our characterization of the critical regime provides a useful way of thinking for practitioners—if a model and training procedure are just barely able to fit the train set, then small changes to the model or training procedure may yield unexpected behavior (e.g. making the model slightly larger or smaller, changing regularization, etc. may hurt test performance).
165
+
166
+ Early stopping. We note that many of the phenomena that we highlight often do not occur with optimal early-stopping. However, this is consistent with our generalized double descent hypothesis: if early stopping prevents models from reaching 0 train error then we would not expect to see doubledescent, since the EMC does not reach the number of train samples. Further, we show at least one setting where model-wise double descent can still occur even with optimal early stopping (ResNets on CIFAR-100 with no label noise, see Figure 19). We have not observed settings where more data hurts when optimal early-stopping is used. However, we are not aware of reasons which preclude this from occurring. We leave fully understanding the optimal early stopping behavior of double descent as an important open question for future work.
167
+
168
+ Label Noise. In our experiments, we observe double descent most strongly in settings with label noise. However, we believe this effect is not fundamentally about label noise, but rather about model mis-specification. For example, consider a setting where the label noise is not truly random, but rather pseudorandom (with respect to the family of classifiers being trained). In this setting, the performance of the Bayes optimal classifier would not change (since the pseudorandom noise is deterministic, and invertible), but we would observe an identical double descent as with truly random label noise. Thus, we view adding label noise as merely a proxy for making distributions “harder”— i.e. increasing the amount of model mis-specification.
169
+
170
+ Other Notions of Model Complexity. Our notion of Effective Model Complexity is related to classical complexity notions such as Rademacher complexity, but differs in several crucial ways: (1) EMC depends on the true labels of the data distribution, and (2) EMC depends on the training procedure, not just the model architecture.
171
+
172
+ Other notions of model complexity which do not incorporate features (1) and (2) would not suffice to characterize the location of the double-descent peak. Rademacher complexity, for example, is determined by the ability of a model architecture to fit a randomly-labeled train set. But Rademacher complexity and VC dimension are both insufficient to determine the model-wise double descent peak location, since they do not depend on the distribution of labels— and our experiments show that adding label noise shifts the location of the peak.
173
+
174
+ Moreover, both Rademacher complexity and VC dimension depend only on the model family and data distribution, and not on the training procedure used to find models. Thus, they are not capable of capturing train-time double-descent effects, such as “epoch-wise” double descent, and the effect of data-augmentation on the peak location.
175
+
176
+ # ACKNOWLEDGMENTS
177
+
178
+ We thank Mikhail Belkin for extremely useful discussions in the early stages of this work. We thank Christopher Olah for suggesting the Model Size $\times$ Epoch visualization, which led to the investigation of epoch-wise double descent, as well as for useful discussion and feedback. We also thank Alec Radford, Jacob Steinhardt, and Vaishaal Shankar for helpful discussion and suggestions. P.N. thanks OpenAI, the Simons Institute, and the Harvard Theory Group for a research environment that enabled this kind of work.
179
+
180
+ We thank Dimitris Kalimeris, Benjamin L. Edelman, and Sharon Qian, and Aditya Ramesh for comments on an early draft of this work.
181
+
182
+ This work supported in part by NSF grant CAREER CCF 1452961, BSF grant 2014389, NSF USICCS proposal 1540428, a Google Research award, a Facebook research award, a Simons Investigator Award, a Simons Investigator Fellowship, and NSF Awards CCF 1715187, CCF 1565264, CCF 1301976, IIS 1409097, and CNS 1618026. Y.B. would like to thank the MIT-IBM Watson AI Lab for contributing computational resources for experiments.
183
+
184
+ # REFERENCES
185
+
186
+ Madhu S Advani and Andrew M Saxe. High-dimensional dynamics of generalization error in neural networks. arXiv preprint arXiv:1710.03667, 2017.
187
+
188
+ Peter L Bartlett, Philip M Long, Gabor Lugosi, and Alexander Tsigler. Benign overfitting in linear ´ regression. arXiv preprint arXiv:1906.11300, 2019.
189
+
190
+ Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal. Reconciling modern machine learning and the bias-variance trade-off. arXiv preprint arXiv:1812.11118, 2018.
191
+
192
+ Mikhail Belkin, Daniel Hsu, and Ji Xu. Two models of double descent for weak features. arXiv preprint arXiv:1903.07571, 2019.
193
+
194
+ Koby Bibas, Yaniv Fogel, and Meir Feder. A new look at an old problem: A universal learning approach to linear regression. arXiv preprint arXiv:1905.04708, 2019.
195
+
196
+ Mauro Cettolo, Christian Girardi, and Marcello Federico. Wit3: Web inventory of transcribed and translated talks. In Proceedings of the $l 6 ^ { t h }$ Conference of the European Association for Machine Translation (EAMT), pp. 261–268, Trento, Italy, May 2012.
197
+
198
+ Robert PW Duin. Small sample size generalization. In Proceedings of the Scandinavian Conference on Image Analysis, volume 2, pp. 957–964. PROCEEDINGS PUBLISHED BY VARIOUS PUBLISHERS, 1995.
199
+
200
+ Robert PW Duin. Classifiers in almost empty spaces. In Proceedings 15th International Conference on Pattern Recognition. ICPR-2000, volume 2, pp. 1–7. IEEE, 2000.
201
+
202
+ Mario Geiger, Arthur Jacot, Stefano Spigler, Franck Gabriel, Levent Sagun, Stephane d’Ascoli, ´ Giulio Biroli, Clement Hongler, and Matthieu Wyart. Scaling description of generalization with ´ number of parameters in deep learning. arXiv preprint arXiv:1901.01608, 2019a.
203
+
204
+ Mario Geiger, Stefano Spigler, Stephane d’Ascoli, Levent Sagun, Marco Baity-Jesi, Giulio Biroli, ´ and Matthieu Wyart. Jamming transition as a paradigm to understand the loss landscape of deep neural networks. Physical Review E, 100(1):012115, 2019b.
205
+
206
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
207
+
208
+ Trevor Hastie, Robert Tibshirani, Jerome Friedman, and James Franklin. The elements of statistical learning: data mining, inference and prediction. The Mathematical Intelligencer, 27(2):83–85, 2005.
209
+
210
+ Trevor Hastie, Andrea Montanari, Saharon Rosset, and Ryan J Tibshirani. Surprises in highdimensional ridgeless least squares interpolation. arXiv preprint arXiv:1903.08560, 2019.
211
+
212
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016.
213
+
214
+ Yanping Huang, Yonglong Cheng, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V. Le, and Zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. CoRR, abs/1811.06965, 2018. URL http://arxiv.org/abs/1811.06965.
215
+
216
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
217
+
218
+ 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.
219
+
220
+ Marco Loog and Robert PW Duin. The dipping phenomenon. In Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition (SPR) and Structural and Syntactic Pattern Recognition (SSPR), pp. 310–317. Springer, 2012.
221
+
222
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
223
+
224
+ Song Mei and Andrea Montanari. The generalization error of random features regression: Precise asymptotics and double descent curve. arXiv preprint arXiv:1908.05355, 2019.
225
+
226
+ Partha P. Mitra. Understanding overfitting peaks in generalization error: Analytical risk curves for l2 and l1 penalized interpolation. ArXiv, abs/1906.03667, 2019.
227
+
228
+ Vidya Muthukumar, Kailas Vodrahalli, and Anant Sahai. Harmless interpolation of noisy data in regression. arXiv preprint arXiv:1903.09139, 2019.
229
+
230
+ Preetum Nakkiran, Gal Kaplun, Dimitris Kalimeris, Tristan Yang, Benjamin L Edelman, Fred Zhang, and Boaz Barak. Sgd on neural networks learns functions of increasing complexity. arXiv preprint arXiv:1905.11604, 2019.
231
+
232
+ Brady Neal, Sarthak Mittal, Aristide Baratin, Vinayak Tantia, Matthew Scicluna, Simon LacosteJulien, and Ioannis Mitliagkas. A modern take on the bias-variance tradeoff in neural networks. arXiv preprint arXiv:1810.08591, 2018.
233
+
234
+ Manfred Opper. Statistical mechanics of learning: Generalization. The Handbook of Brain Theory and Neural Networks, 922-925., 1995.
235
+
236
+ Manfred Opper. Learning to generalize. Frontiers of Life, 3(part 2), pp.763-775., 2001.
237
+
238
+ Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019.
239
+
240
+ David Page. How to train your resnet. https://myrtle.ai/ how-to-train-your-resnet-4-architecture/, 2018.
241
+
242
+ 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. In NeurIPS Autodiff Workshop, 2017.
243
+
244
+ Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
245
+
246
+ Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pp. 1177–1184, 2008.
247
+
248
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. ArXiv, abs/1508.07909, 2015.
249
+
250
+ Marina Skurichina and Robert PW Duin. Bagging, boosting and the random subspace method for linear classifiers. Pattern Analysis & Applications, 5(2):121–135, 2002.
251
+
252
+ Stefano Spigler, Mario Geiger, Stephane d’Ascoli, Levent Sagun, Giulio Biroli, and Matthieu Wyart.´ A jamming transition from under-to over-parametrization affects loss landscape and generalization. arXiv preprint arXiv:1810.09665, 2018.
253
+
254
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Computer Vision and Pattern Recognition (CVPR), 2015. URL http://arxiv.org/abs/ 1409.4842.
255
+
256
+ Gerard V Trunk. A problem of dimensionality: A simple example. IEEE Transactions on pattern analysis and machine intelligence, (3):306–307, 1979.
257
+
258
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. CoRR, abs/1706.03762, 2017.
259
+
260
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, abs/1611.03530, 2016.
261
+
262
+ A SUMMARY TABLE OF EXPERIMENTAL RESULTS
263
+
264
+ <table><tr><td rowspan="2">Dataset</td><td rowspan="2">Architecture</td><td rowspan="2">Opt.</td><td rowspan="2">Aug.</td><td rowspan="2">% Noise</td><td colspan="2">Double-Descent</td><td rowspan="2">Figure(s)</td></tr><tr><td>Model</td><td>Epoch</td></tr><tr><td>CIFAR 10</td><td>CNN</td><td>SGD</td><td>√</td><td>0</td><td>X</td><td>×</td><td>5,27</td></tr><tr><td rowspan="10"></td><td></td><td></td><td>√</td><td>10</td><td>广</td><td>广</td><td>5,27,6</td></tr><tr><td></td><td></td><td>√</td><td>20</td><td></td><td></td><td>5,27</td></tr><tr><td></td><td></td><td></td><td>0</td><td>X</td><td>x√</td><td>5,25</td></tr><tr><td></td><td></td><td></td><td>10</td><td></td><td></td><td>5</td></tr><tr><td></td><td></td><td></td><td>20</td><td>√</td><td>√</td><td>5</td></tr><tr><td></td><td>SGD + w.d.</td><td>√</td><td>20</td><td>√</td><td>√</td><td>21</td></tr><tr><td>ResNet</td><td>Adam</td><td></td><td>0</td><td>√</td><td></td><td>25</td></tr><tr><td>Adam</td><td>√</td><td>0</td><td>X</td><td></td><td>X</td><td>4,10</td></tr><tr><td></td><td>√</td><td>5</td><td>√</td><td></td><td></td><td>4</td></tr><tr><td></td><td>√</td><td>10</td><td></td><td></td><td></td><td>4,10</td></tr><tr><td></td><td></td><td>√</td><td>15</td><td>√</td><td></td><td>4,2</td></tr><tr><td rowspan="2"></td><td></td><td>Various</td><td>√</td><td>20</td><td>√</td><td></td><td>4,9,10</td></tr><tr><td></td><td></td><td>√</td><td>20</td><td></td><td>√</td><td>16, 17, 18</td></tr><tr><td rowspan="2">(subsampled)</td><td>CNN</td><td>SGD SGD</td><td>√</td><td>10</td><td>√</td><td></td><td>11a</td></tr><tr><td></td><td></td><td>√</td><td>20</td><td>√</td><td></td><td>11a, 12</td></tr><tr><td>(adversarial)</td><td>ResNet</td><td>SGD</td><td></td><td>0</td><td>Robust err.</td><td></td><td>26</td></tr><tr><td rowspan="4">CIFAR 100</td><td>ResNet</td><td>Adam</td><td></td><td>0</td><td>√</td><td>X</td><td>4,19,10</td></tr><tr><td></td><td></td><td>&gt;&gt;</td><td>10</td><td>√</td><td>√</td><td>4,10</td></tr><tr><td>CNN</td><td>SGD</td><td>√</td><td>20</td><td>√</td><td>√</td><td>4,10</td></tr><tr><td></td><td></td><td></td><td>0</td><td>√</td><td>X</td><td>20</td></tr><tr><td>IWSLT &#x27;14 de-en</td><td>Transformer</td><td>Adam</td><td></td><td>0</td><td>√</td><td>X</td><td>8,24</td></tr><tr><td>(subsampled)</td><td>Transformer</td><td>Adam</td><td></td><td>0</td><td>√</td><td>X</td><td>11b,23</td></tr><tr><td>WMT&#x27;14 en-fr</td><td>Transformer</td><td>Adam</td><td></td><td>0</td><td>√</td><td>X</td><td>8,24</td></tr></table>
265
+
266
+ # B APPENDIX: EXPERIMENTAL DETAILS
267
+
268
+ # B.1 MODELS
269
+
270
+ We use the following families of architectures. The PyTorch Paszke et al. (2017) specification of our ResNets and CNNs are available at https://gitlab.com/ harvard-machine-learning/double-descent/tree/master.
271
+
272
+ ResNets. We define a family of ResNet18s of increasing size as follows. We follow the Preactivation ResNet18 architecture of He et al. (2016), using 4 ResNet blocks, each consisting of two BatchNorm-ReLU-Convolution layers. The layer widths for the 4 blocks are $[ k , 2 k , 4 k , 8 k ]$ for varying $k \in \mathbb N$ and the strides are [1, 2, 2, 2]. The standard ResNet18 corresponds to $k = 6 4$ convolutional channels in the first layer. The scaling of model size with $k$ is shown in Figure 13b. Our implementation is adapted from https://github.com/kuangliu/pytorch-cifar.
273
+
274
+ Standard CNNs. We consider a simple family of 5-layer CNNs, with four Conv-BatchNormReLU-MaxPool layers and a fully-connected output layer. We scale the four convolutional layer widths as $[ k , 2 k , 4 k , 8 k ]$ . The MaxPool is [1, 2, 2, 8]. For all the convolution layers, the kernel size $= 3$ , stride $= 1$ and padding $^ { = 1 }$ . This architecture is based on the “backbone” architecture from Page (2018). For $k = 6 4$ , this CNN has 1558026 parameters and can reach $> 9 0 \%$ test accuracy on CIFAR-10 (Krizhevsky (2009)) with data-augmentation. The scaling of model size with $k$ is shown in Figure 13a.
275
+
276
+ Transformers. We consider the encoder-decoder Transformer model from Vaswani et al. (2017) with 6 layers and 8 attention heads per layer, as implemented by fairseq Ott et al. (2019). We scale the size of the network by modifying the embedding dimension $( d _ { \mathrm { m o d e l } } )$ , and scale the width of the fully-connected layers proportionally $\begin{array} { r } { \dot { \mathcal { d } } _ { \mathrm { f f } } = 4 { d } _ { \mathrm { m o d e l } } ) } \end{array}$ . We train with $10 \%$ label smoothing and no drop-out, for 80 gradient steps.
277
+
278
+ ![](images/d8516fb233b07ebcdc7f08ef74910030a4bc584afa359c5fbd7737999a56c148.jpg)
279
+ Figure 13: Scaling of model size with our parameterization of width & embedding dimension.
280
+
281
+ B.2 IMAGE CLASSIFICATION: EXPERIMENTAL SETUP
282
+
283
+ We describe the details of training for CNNs and ResNets below.
284
+
285
+ Loss function: Unless stated otherwise, we use the cross-entropy loss for all the experiments.
286
+
287
+ Data-augmentation: In experiments where data-augmentation was used, we apply RandomCrop(32, padding ${ \cdot = } 4$ ) and RandomHorizontalFlip. In experiments with added label noise, the label for all augmentations of a given training sample are given the same label.
288
+
289
+ Regularization: No explicit regularization like weight decay or dropout was applied unless explicitly stated.
290
+
291
+ Initialization: We use the default initialization provided by PyTorch for all the layers.
292
+
293
+ # Optimization:
294
+
295
+ • Adam: Unless specified otherwise, learning rate was set at constant to 1e−4 and all other parameters were set to their default PyTorch values.
296
+ SGD: Unless specified otherwise, learning rate schedule inverse-square root (defined below) was used with initial learning rate $\gamma _ { 0 } = 0 . 1$ and updates every $L = 5 1 2$ gradient steps. No momentum was used.
297
+
298
+ We found our results are robust to various other natural choices of optimizers and learning rate schedule. We used the above settings because (1) they optimize well, and (2) they do not require experiment-specific hyperparameter tuning, and allow us to use the same optimization across many experiments.
299
+
300
+ Batch size: All experiments use a batchsize of 128.
301
+
302
+ # Learning rate schedule descriptions:
303
+
304
+ • Inverse-square root $( \gamma _ { 0 } , L )$ : At gradient step $t$ , the learning rate is set to $\gamma ( t ) : =$ $\frac { \gamma _ { 0 } } { \sqrt { 1 + \lfloor t / 5 1 2 \rfloor } }$ . We set learning-rate with respect to number of gradient steps, and not epochs, in order to allow comparison between experiments with varying train-set sizes. • Dynamic drop ( $\mathrm { \Delta } \cdot \mathrm { \Delta } \gamma _ { 0 }$ , drop, patience): Starts with an initial learning rate of $\gamma _ { 0 }$ and drops by a factor of ’drop’ if the training loss has remained constant or become worse for ’patience’ number of gradient steps.
305
+
306
+ B.3 NEURAL MACHINE TRANSLATION: EXPERIMENTAL SETUP
307
+
308
+ Here we describe the experimental setup for the neural machine translation experiments.
309
+
310
+ # Training procedure.
311
+
312
+ In this setting, the distribution $\mathcal { D }$ consists of triples
313
+
314
+ $$
315
+ ( x , y , i ) : x \in V _ { s r c } ^ { * } , y \in V _ { t g t } ^ { * } , i \in \{ 0 , \ldots , | y | \}
316
+ $$
317
+
318
+ where $V _ { s r c }$ and $V _ { t g t }$ are the source and target vocabularies, the string $x$ is a sentence in the source language, $y$ is its translation in the target language, and $i$ is the index of the token to be predicted by the model. We assume that $i | x , y$ is distributed uniformly on $\{ 0 , \ldots , | y | \}$ .
319
+
320
+ A standard probabilistic model defines an autoregressive factorization of the likelihood:
321
+
322
+ $$
323
+ p _ { M } ( y | x ) = \prod _ { i = 1 } ^ { | y | } p _ { M } ( y _ { i } | y _ { < i } , x ) .
324
+ $$
325
+
326
+ Given a set of training samples $S$ , we define
327
+
328
+ $$
329
+ \operatorname { E r r o r } _ { S } ( M ) = { \frac { 1 } { | S | } } \sum _ { ( x , y , i ) \in S } - \log p _ { M } ( y _ { i } | y _ { < i } , x ) .
330
+ $$
331
+
332
+ In practice, $S$ is not constructed from independent samples from $D$ , but rather by first sampling $( x , y )$ and then including all $( x , y , 0 ) , \dotsc , ( x , y , | y | )$ in $S$ .
333
+
334
+ For training transformers, we replicate the optimization procedure specified in Vaswani et al. (2017) section 5.3, where the learning rate schedule consists of a “warmup” phase with linearly increasing learning rate followed by a phase with inverse square-root decay. We preprocess the data using byte pair encoding (BPE) as described in Sennrich et al. (2015). We use the implementation provided by fairseq (https://github.com/pytorch/fairseq).
335
+
336
+ Datasets. The IWSLT ’14 German to English dataset contains TED Talks as described in Cettolo et al. (2012). The WMT ’14 English to French dataset is taken from http://www.statmt. org/wmt14/translation-task.html.
337
+
338
+ # B.4 PER-SECTION EXPERIMENTAL DETAILS
339
+
340
+ Here we provide full details for experiments in the body, when not otherwise provided.
341
+
342
+ Introduction: Experimental Details Figure 1: All models were trained using Adam with learningrate 0.0001 for 4K epochs. Plotting means and standard deviations for 5 trials, with random network initialization.
343
+
344
+ Model-wise Double Descent: Experimental Details Figure 7: Plotting means and standard deviations for 5 trials, with random network initialization.
345
+
346
+ Sample-wise Nonmonotonicity: Experimental Details Figure 11a: All models are trained with SGD for 500K epochs, and data-augmentation. Bottom: Means and standard deviations from 5 trials with random initialization, and random subsampling of the train set.
347
+
348
+ # C EXTENDED DISCUSSION OF RELATED WORK
349
+
350
+ Belkin et al. (2018): This paper proposed, in very general terms, that the apparent contradiction between traditional notions of the bias-variance trade-off and empirically successful practices in deep learning can be reconciled under a double-descent curve—as model complexity increases, the test error follows the traditional “U-shaped curve”, but beyond the point of interpolation, the error starts to decrease. This work provides empirical evidence for the double-descent curve with fully connected networks trained on subsets of MNIST, CIFAR10, SVHN and TIMIT datasets. They use the $l _ { 2 }$ loss for their experiments. They demonstrate that neural networks are not an aberration in this regard—double-descent is a general phenomenon observed also in linear regression with random features and random forests.
351
+
352
+ Theoretical works on linear least squares regression: A variety of papers have attempted to theoretically analyze this behavior in restricted settings, particularly the case of least squares regression under various assumptions on the training data, feature spaces and regularization method.
353
+
354
+ 1. Advani & Saxe (2017); Hastie et al. (2019) both consider the linear regression problem stated above and analyze the generalization behavior in the asymptotic limit $N , D \to \infty$ using random matrix theory. Hastie et al. (2019) highlight that when the model is misspecified, the minimum of training error can occur for over-parameterized models
355
+ 2. Belkin et al. (2019) Linear least squares regression for two data models, where the input data is sampled from a Gaussian and a Fourier series model for functions on a circle. They provide a finite-sample analysis for these two cases
356
+ 3. Bartlett et al. (2019) provides generalization bounds for the minimum $l _ { 2 }$ -norm interpolant for Gaussian features
357
+ 4. Muthukumar et al. (2019) characterize the fundamental limit of of any interpolating solution in the presence of noise and provide some interesting Fourier-theoretic interpretations.
358
+ 5. Mei & Montanari (2019): This work provides asymptotic analysis for ridge regression over random features
359
+
360
+ Similar double descent behavior, in restricted settings, was investigated in Trunk (1979); Opper (1995; 2001); Skurichina & Duin (2002).
361
+
362
+ Neal et al. (2018) conducts a study of bias and variance in modern neural networks, observing that both bias and variance can decrease with increasing model size, contrary to conventional wisdom.
363
+
364
+ Geiger et al. (2019b) showed that deep fully connected networks trained on the MNIST dataset with hinge loss exhibit a “jamming transition” when the number of parameters exceeds a threshold that allows training to near-zero train loss. Geiger et al. (2019a) provide further experiments on CIFAR10 with a convolutional network. They also highlight interesting behavior with ensembling around the critical regime, which is consistent with our informal intuitions in Section 5 and our experiments in Figures 28, 29.
365
+
366
+ Advani & Saxe (2017); Geiger et al. (2019b;a) also point out that double-descent is not observed when optimal early-stopping is used.
367
+
368
+ The study of sample non-monotonicity in learning algorithms had also existed prior to double descent, including in Duin (1995; 2000); Opper (2001); Loog & Duin (2012).
369
+
370
+ ![](images/228a2efe993d5a5b8de88a94c4213a4344f8bf8c59e0d4b46ffa29d81cf9c5ed.jpg)
371
+ Figure 14: Random Fourier Features on the Fashion MNIST dataset. The setting is equivalent to two-layer neural network with $e ^ { - i x }$ activation, with randomly-initialized first layer that is fixed throughout training. The second layer is trained using gradient flow.
372
+
373
+ In this section, for completeness sake, we show that both the model- and sample-wise double descent phenomena are not unique to deep neural networks—they exist even in the setting of Random Fourier Features of Rahimi & Recht (2008). This setting is equivalent to a two-layer neural network with $e ^ { - i x }$ activation. The first layer is initialized with a $\textstyle { \hat { \mathcal { N } } } ( 0 , { \frac { 1 } { d } } )$ Gaussian distribution and then fixed throughout training. The width (or embedding dimension) $\dot { d }$ of the first layer parameterizes the model size. The second layer is initialized with 0s and trained with MSE loss.
374
+
375
+ Figure 14 shows the grid of Test Error as a function of both number of samples $n$ and model size $d$ . Note that in this setting $\mathrm { E M C } = d$ (the embedding dimension). As a result, as demonstrated in the figure, the peak follows the path of $n = d$ . Both model-wise and sample-wise (see figure 15) double descent phenomena are captured, by horizontally and vertically crossing the grid, respectively.
376
+
377
+ ![](images/d3b8ed60787a0868c3f5be52fec305d08ff718efc3f20f3f4f5d527b1d16e3f6.jpg)
378
+ Figure 15: Sample-wise double-descent slice for Random Fourier Features on the Fashion MNIST dataset. In this figure the embedding dimension (number of random features) is 1000.
379
+
380
+ # E APPENDIX: ADDITIONAL EXPERIMENTS
381
+
382
+ E.1 EPOCH-WISE DOUBLE DESCENT: ADDITIONAL RESULTS
383
+
384
+ Here, we provide a rigorous evaluation of epoch-wise double descent for a variety of optimizers and learning rate schedules. We train ResNet18 on CIFAR-10 with data-augmentation and $20 \%$ label noise with three different optimizers—Adam, SGD, SGD $^ +$ Momentum (momentum set to 0.9) and three different learning rate schedules—constant, inverse-square root, dynamic drop for differnet values of initial learning rate. We observe that double-descent occurs reliably for all optimizers and learning rate schedules and the peak of the double descent curve shifts with the interpolation point.
385
+
386
+ ![](images/58c1328435c48b2aab09317e06f4603fa0a9e59b7a92dde853e7a8bf3b824794.jpg)
387
+ Figure 16: Epoch-wise double descent for ResNet18 trained with Adam and multiple learning rate schedules
388
+
389
+ A practical recommendation resulting from epoch-wise double descent is that stopping the training when the test error starts to increase may not always be the best strategy. In some cases, the test error may decrease again after reaching a maximum, and the final value may be lower than the minimum earlier in training.
390
+
391
+ ![](images/1008ca2f366058ba1435cf28efaa611f9c9131e1be26e429651a63223e79e1f5.jpg)
392
+ Figure 17: Epoch-wise double descent for ResNet18 trained with SGD and multiple learning rate schedules
393
+
394
+ ![](images/488e30e35257cba7429094f8ccf62b9894c5a64f45fd96a4c9ac9360e41020b6.jpg)
395
+ Figure 18: Epoch-wise double descent for ResNet18 trained with $\mathrm { S G D + I }$ Momentum and multiple learning rate schedules
396
+
397
+ E.2 MODEL-WISE DOUBLE DESCENT: ADDITIONAL RESULTS
398
+
399
+ # E.2.1 CLEAN SETTINGS WITH MODEL-WISE DOUBLE DESCENT
400
+
401
+ CIFAR100, ResNet18
402
+
403
+ ![](images/5210617de1e3afc414e784be266f4144de44d71b2df97b8df3a125339670d3a0.jpg)
404
+ Figure 19: Top: Train and test performance as a function of both model size and train epochs. Bottom: Test error dynamics of the same model (ResNet18, on CIFAR-100 with no label noise, data-augmentation and Adam optimizer trained for $4 \mathrm { k }$ epochs with learning rate 0.0001). Note that even with optimal early stopping this setting exhibits double descent.
405
+
406
+ ![](images/fb960e5034da77700c7a7fd448a34568a0bb5b897f622766da0a04bb8ae57ec4.jpg)
407
+ Figure 20: Top: Train and test performance as a function of both model size and train epochs. Bottom: Test error dynamics of the same models. 5-Layer CNNs, CIFAR-100 with no label noise, no data-augmentation Trained with SGD for 1e6 steps. Same experiment as Figure 7.
408
+
409
+ ![](images/81c77025d124fca35d30178bb0aa53f7ec90c4883061d61bfdb0b4ef4870d8cc.jpg)
410
+ Figure 21: Left: Test error dynamics with weight decay of 5e-4 (bottom left) and without weight decay (top left). Right: Test and train error and test loss for models with varying amounts of weight decay. All models are 5-Layer CNNs on CIFAR-10 with $10 \%$ label noise, trained with data-augmentation and SGD for 500K steps.
411
+
412
+ Here, we now study the effect of varying the level of regularization on test error. We train CIFAR10 with data-augmentation and $20 \%$ label noise on ResNet18 for weight decay co-efficients $\lambda$ ranging from 0 to 0.1. We train the networks using $\mathrm { S G D + }$ inverse-square root learning rate. Figure below shows a picture qualitatively very similar to that observed for model-wise double descent wherein ”model complexity” is now controlled by the regularization parameter. This confirms our generalized double descent hypothesis along yet another axis of Effective Model Complexity.
413
+
414
+ ![](images/2d026f82df05ae4f47eb2f36c18491bb8ff9cd5ddf873d309f4c7bc3b3b3c258.jpg)
415
+ Figure 22: Generalized double descent for weight decay. We found that using the same initial learning rate for all weight decay values led to training instabilities. This resulted in some noise in the Test Error (Weight Decay $\times$ Epochs) plot shown above.
416
+
417
+ Language models
418
+
419
+ ![](images/ceaf06ca3257454a126e72ecfe328fbca78241c7e0b1b27a9af01838536e68eb.jpg)
420
+ Figure 23: Model-wise test error dynamics for a subsampled IWSLT‘14 dataset. Left: 4k samples, Right: 18k samples. Note that with optimal early-stopping, more samples is always better.
421
+
422
+ ![](images/548a288bc91ae0609a7c35054d158b13e6149f1b900a2a3870f131fa4fc14015.jpg)
423
+ Figure 24: Model-wise test error dynamics for a IWSLT‘14 de-en and subsampled WMT‘14 en-fr datasets. Left: IWSLT‘14, Right: subsampled (200k samples) WMT‘14. Note that with optimal early-stopping, the test error is much lower for this task.
424
+
425
+ CIFAR10, $10 \%$ noise, SGD
426
+
427
+ ![](images/329ab7efcf3819680ed22e9d04f97aecbd6fd2941d5217d8d45d006ce1c162c0.jpg)
428
+ Figure 25: Top: Train and test performance as a function of both model size and train epochs. Bottom: Test error dynamics of the same model (CNN, on CIFAR-10 with $10 \%$ label noise, dataaugmentation and SGD optimizer with learning rate $\propto 1 / \sqrt { T } )$ ).
429
+
430
+ # E.2.4 TRAINING PROCEDURE
431
+
432
+ ![](images/cce2a82acf0147228634fdd0581f2e67796b76009678007530194689d914a4f5.jpg)
433
+ Figure 26: Model-wise double descent for adversarial training ResNet18s on CIFAR-10 (subsampled to $2 5 \mathrm { k }$ train samples) with no label noise. We train for L2 robustness of radius $\epsilon = 0 . 5$ and $\epsilon = 1 . 0$ , using 10-step PGD (Goodfellow et al. (2014); Madry et al. (2017)). Trained using SGD (batch size 128) with learning rate 0.1 for 400 epochs, then 0.01 for 400 epochs.
434
+
435
+ ![](images/3f166e910507b6f677862e70ccd9d2fcc5d745118d0ea7693bdfe992dda82c23.jpg)
436
+ Figure 27
437
+
438
+ ![](images/92155799e3b955426cfd287a4260029a284a4655cd2cd750acbb4e3c8ec8bdcc.jpg)
439
+ Figure 28: Effect of Ensembling (ResNets, $15 \%$ label noise). Test error of an ensemble of 5 models, compared to the base models. The ensembled classifier is determined by plurality vote over the 5 base models. Note that emsembling helps most around the critical regime. All models are ResNet18s trained on CIFAR-10 with $15 \%$ label noise, using Adam for 4K epochs (same setting as Figure 1). Test error is measured against the original (not noisy) test set, and each model in the ensemble is trained using a train set with independently-sampled $15 \%$ label noise.
440
+
441
+ ![](images/b3feb5b8e7fb91ef88b906092c18d0ee5c04fae19b187b34bbe97bc9c5642f30.jpg)
442
+ Figure 29: Effect of Ensembling (CNNs, no label noise). Test error of an ensemble of 5 models, compared to the base models. All models are 5-layer CNNs trained on CIFAR-10 with no label noise, using SGD and no data augmentation. (same setting as Figure 7).
parse/train/B1g5sA4twr/B1g5sA4twr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1g5sA4twr/B1g5sA4twr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1n8LexRZ/B1n8LexRZ.md ADDED
@@ -0,0 +1,438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERALIZING HAMILTONIAN MONTE CARLO WITH NEURAL NETWORKS
2
+
3
+ Daniel Levy1∗, Matthew D. Hoffman2, Jascha Sohl-Dickstein3 1Stanford University, 2Google AI Perception , 3Google Brain danilevy@cs.stanford.edu, {mhoffman,jaschasd}@google.com
4
+
5
+ # ABSTRACT
6
+
7
+ We present a general-purpose method to train Markov chain Monte Carlo kernels, parameterized by deep neural networks, that converge and mix quickly to their target distribution. Our method generalizes Hamiltonian Monte Carlo and is trained to maximize expected squared jumped distance, a proxy for mixing speed. We demonstrate large empirical gains on a collection of simple but challenging distributions, for instance achieving a $1 0 6 \times$ improvement in effective sample size in one case, and mixing when standard HMC makes no measurable progress in a second. Finally, we show quantitative and qualitative gains on a real-world task: latent-variable generative modeling. We release an open source TensorFlow implementation of the algorithm.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ High-dimensional distributions that are only analytically tractable up to a normalizing constant are ubiquitous in many fields. For instance, they arise in protein folding (Schutte et al., 1999), physics ¨ simulations (Olsson, 1995), and machine learning (Andrieu et al., 2003). Sampling from such distributions is a critical task for learning and inference (MacKay, 2003), however it is an extremely hard problem in general.
12
+
13
+ Markov Chain Monte Carlo (MCMC) methods promise a solution to this problem. They operate by generating a sequence of correlated samples that converge in distribution to the target. This convergence is most often guaranteed through detailed balance, a sufficient condition for the chain to have the target equilibrium distribution. In practice, for any proposal distribution, one can ensure detailed balance through a Metropolis-Hastings (Hastings, 1970) accept/reject step.
14
+
15
+ Despite theoretical guarantees of eventual convergence, in practice convergence and mixing speed depend strongly on choosing a proposal that works well for the task at hand. What’s more, it is often more art than science to know when an MCMC chain has converged (“burned-in”), and when the chain has produced a new uncorrelated sample (“mixed”). Additionally, the reliance on detailed balance, which assigns equal probability to the forward and reverse transitions, often encourages random-walk behavior and thus slows exploration of the space (Ichiki & Ohzeki, 2013).
16
+
17
+ For densities over continuous spaces, Hamiltonian Monte Carlo (HMC; Duane et al., 1987; Neal, 2011) introduces independent, auxiliary momentum variables, and computes a new state by integrating Hamiltonian dynamics. This method can traverse long distances in state space with a single Metropolis-Hastings test. This is the state-of-the-art method for sampling in many domains. However, HMC can perform poorly in a number of settings. While HMC mixes quickly spatially, it struggles at mixing across energy levels due to its volume-preserving dynamics. HMC also does not work well with multi-modal distributions, as the probability of sampling a large enough momentum to traverse a very low-density region is negligibly small. Furthermore, HMC struggles with ill-conditioned energy landscapes (Girolami & Calderhead, 2011) and deals poorly with rapidly changing gradients (Sohl-Dickstein et al., 2014).
18
+
19
+ Recently, probabilistic models parameterized by deep neural networks have achieved great success at approximately sampling from highly complex, multi-modal empirical distributions (Kingma &
20
+
21
+ Welling, 2013; Rezende et al., 2014; Goodfellow et al., 2014; Bengio et al., 2014; Sohl-Dickstein et al., 2015). Building on these successes, we present a method that, given an analytically described distribution, automatically returns an exact sampler with good convergence and mixing properties, from a class of highly expressive parametric models. The proposed family of samplers is a generalization of HMC; it transforms the HMC trajectory using parametric functions (deep networks in our experiments), while retaining theoretical guarantees with a tractable Metropolis-Hastings accept/reject step. The sampler is trained to minimize a variation on expected squared jumped distance (similar in spirit to Pasarica & Gelman (2010)). Our parameterization reduces easily to standard HMC. It is further capable of emulating several common extensions of HMC such as withintrajectory tempering (Neal, 1996) and diagonal mass matrices (Bennett, 1975).
22
+
23
+ We evaluate our method on distributions where HMC usually struggles, as well as on a the real-world task of training latent-variable generative models.
24
+
25
+ Our contributions are as follows:
26
+
27
+ • We introduce a generic training procedure which takes as input a distribution defined by an energy function, and returns a fast-mixing MCMC kernel.
28
+ • We show significant empirical gains on various distributions where HMC performs poorly.
29
+ • We finally evaluate our method on the real-world task of training and sampling from a latent variable generative model, where we show improvement in the model’s log-likelihood, and greater complexity in the distribution of posterior samples.
30
+
31
+ # 2 RELATED WORK
32
+
33
+ Adaptively modifying proposal distributions to improve convergence and mixing has been explored in the past (Andrieu & Thoms, 2008). In the case of HMC, prior work has reduced the need to choose step size (Neal, 2011) or number of leapfrog steps (Hoffman & Gelman, 2014) by adaptively tuning those parameters. Salimans et al. (2015) proposed an alternate scheme based on variational inference. We adopt the much simpler approach of Pasarica & Gelman (2010), who show that choosing the hyperparameters of a proposal distribution to maximize expected squared jumped distance is both principled and effective in practice.
34
+
35
+ Previous work has also explored applying models from machine learning to MCMC tasks. Kernel methods have been used both for learning a proposal distribution (Sejdinovic et al., 2014) and for approximating the gradient of the energy (Strathmann et al., 2015). In physics, Restricted and semiRestricted Boltzmann machines have been used both to build approximations of the energy function which allow more rapid sampling (Liu et al., 2017; Huang & Wang, 2017), and to motivate new hand-designed proposals (Wang, 2017).
36
+
37
+ Most similar to our approach is recent work from Song et al. (2017), which uses adversarial training of a volume-preserving transformation, which is subsequently used as an MCMC proposal distribution. While promising, this technique has several limitations. It does not use gradient information, which is often crucial to maintaining high acceptance rates, especially in high dimensions. It also can only indirectly measure the quality of the generated sample using adversarial training, which is notoriously unstable, suffers from “mode collapse” (where only a portion of a target distribution is covered), and often requires objective modification to train in practice (Arjovsky et al., 2017). Finally, since the proposal transformation preserves volume, it can suffer from the same difficulties in mixing across energy levels as HMC, as we illustrate in Section 5.
38
+
39
+ To compute the Metropolis-Hastings acceptance probability for a deterministic transition, the operator must be invertible and have a tractable Jacobian. Recent work (Dinh et al., 2016), introduces RNVP, an invertible transformation that operates by, at each layer, modifying only a subset of the variables by a function that depends solely on the remaining variables. This is exactly invertible with an efficiently computable Jacobian. Furthermore, by chaining enough of these layers, the model can be made arbitrarily expressive. This parameterization will directly motivate our extension of the leapfrog integrator in HMC.
40
+
41
+ # 3 BACKGROUND
42
+
43
+ # 3.1 MCMC METHODS AND METROPOLIS-HASTINGS
44
+
45
+ Let $p$ be a target distribution, analytically known up to a constant, over a space $\mathcal { X }$ . Markov chain Monte Carlo (MCMC) methods (Neal, 1993) aim to provide samples from $p$ . To that end, MCMC methods construct a Markov Chain whose stationary distribution is the target distribution $p$ . Obtaining samples then corresponds to simulating a Markov Chain, i.e., given an initial distribution $\pi _ { 0 }$ and a transition kernel $K$ , constructing the following sequence of random variables:
46
+
47
+ $$
48
+ X _ { 0 } \sim \pi _ { 0 } , \quad X _ { t + 1 } \sim K ( \cdot | X _ { t } ) .
49
+ $$
50
+
51
+ In order for $p$ to be the stationary distribution of the chain, three conditions must be satisfied: $K$ must be irreducible and aperiodic (these are usually mild technical conditions) and $p$ has to be a fixed point of $K$ . This last condition can be expressed as: $\begin{array} { r } { p ( x ^ { \prime } ) = \int K ( x ^ { \prime } | x ) p ( x ) \mathrm { d } x } \end{array}$ . This condition is most often satisfied by satisfying the stronger detailed balance condition, which can be written as: $p ( x ^ { \prime } ) K ( x | x ^ { \prime } ) = p ( x ) \dot { K } ( x ^ { \prime } | \dot { x } )$ .
52
+
53
+ Given any proposal distribution $q$ , satisfying mild conditions, we can easily construct a transition kernel that respects detailed balance using Metropolis-Hastings (Hastings, 1970) accept/reject rules. More formally, starting from $x _ { 0 } \sim \pi _ { 0 }$ , at each step $t$ , we sample $x ^ { \prime } \sim q ( \cdot | X _ { t } )$ , and with probability $\begin{array} { r } { A ( x ^ { \prime } | x _ { t } ) = \operatorname* { m i n } \left( 1 , \frac { p ( x ^ { \prime } ) q ( x _ { t } | x ^ { \prime } ) } { p ( x _ { t } ) q ( x ^ { \prime } | x _ { t } ) } \right) } \end{array}$ , accept $x ^ { \prime }$ as the next sample $x _ { t + 1 }$ in the chain. If we reject $x ^ { \prime }$ , then we retain the previous state and $x _ { t + 1 } ~ = ~ x _ { t }$ . For typical proposals this algorithm has strong asymptotic guarantees. But in practice one must often choose between very low acceptance probabilities and very cautious proposals, both of which lead to slow mixing. For continuous state spaces, Hamiltonian Monte Carlo (HMC; Neal, 2011) tackles this problem by proposing updates that move far in state space while staying roughly on iso-probability contours of $p$ .
54
+
55
+ # 3.2 HAMILTONIAN MONTE CARLO
56
+
57
+ Without loss of generality, we assume $p \left( x \right)$ to be defined by an energy function $U \left( x \right)$ , s.t. $p ( x ) \propto \exp ( - U ( { \bar { x } } ) )$ , and where the state $x \in \mathbb { R } ^ { n }$ . HMC extends the state space with an additional momentum vector $v \in \mathbb { R } ^ { n }$ , where $v$ is distributed independently from $x$ , as $p ( v ) \propto \exp ( - \frac { 1 } { 2 } v ^ { T } v )$ (i.e., identity-covariance Gaussian). From an augmented state $\xi \triangleq ( x , v )$ , HMC produces a proposed state $\xi ^ { \prime } = ( \dot { x } ^ { \prime } , v ^ { \prime } )$ by approximately integrating Hamiltonian dynamics jointly on $x$ and $v$ , with $U \left( x \right)$ taken to be the potential energy, and $\scriptstyle { \frac { 1 } { 2 } } v ^ { \overline { { T } } } v$ the kinetic energy. Since Hamiltonian dynamics conserve the total energy of a system, their approximate integration moves along approximate iso-probability contours of $p \bar { ( \boldsymbol { x } , \boldsymbol { v } ) } = \bar { p } ( \boldsymbol { x } ) p ( \boldsymbol { v } )$ .
58
+
59
+ The dynamics are typically simulated using the leapfrog integrator (Hairer et al., 2003; Leimkuhler & Reich, 2004), which for a single time step consists of:
60
+
61
+ $$
62
+ \begin{array} { r } { v ^ { \frac { 1 } { 2 } } = v - \frac { \epsilon } { 2 } \partial _ { x } U ( x ) ; \quad x ^ { \prime } = x + \epsilon v ^ { \frac { 1 } { 2 } } ; \quad v ^ { \prime } = v - \frac { \epsilon } { 2 } \partial _ { x } U ( x ^ { \prime } ) . } \end{array}
63
+ $$
64
+
65
+ Following Sohl-Dickstein et al. (2014), we write the action of the leapfrog integrator in terms of an operator $\mathbf { L }$ : $\mathbf { L } \boldsymbol { \xi } \triangleq \mathbf { L } ( \boldsymbol { x } , \boldsymbol { v } ) \triangleq ( \boldsymbol { x } ^ { \prime } , \boldsymbol { v } ^ { \prime } )$ , and introduce a momentum flip operator $\mathbf { F }$ : $\mathbf { F } ( x , v ) \triangleq$ $( x , - v )$ . It is important to note two properties of these operators. First, the transformation $\mathbf { F L }$ is an involution, i.e. $\mathbf { F L F L } ( x , v ) = \mathbf { F L } ( x ^ { \prime } , - v ^ { \prime } ) = ( x , v )$ . Second, the transformations from $( x , v )$ to $( x , v ^ { \frac { 1 } { 2 } } )$ , from $( x , v ^ { \frac { 1 } { 2 } } )$ to $( x ^ { \prime } , v ^ { \frac { 1 } { 2 } } )$ , and from $( x ^ { \prime } , v ^ { \frac { 1 } { 2 } } )$ to $( x ^ { \prime } , v ^ { \prime } )$ are all volume-preserving shear transformations i.e., only one of the variables ( $x$ or $v$ ) changes, by an amount determined by the other one. The determinant of the Jacobian, $\left. \frac { \partial [ \mathbf { F } \mathbf { L } \xi ] } { \partial \xi ^ { T } } \right.$ , is thus easy to compute. For vanilla HMC $\begin{array} { r } { \left| \frac { \partial [ \mathbf { F } \mathbf { L } \xi ] } { \partial \xi ^ { T } } \right| = 1 } \end{array}$ , but we will leave it in symbolic form for use in Section 4. The Metropolis-HastingsGreen (Hastings, 1970; Green, 1995) acceptance probability for the HMC proposal is made simple by these two properties, and is
66
+
67
+ $$
68
+ \begin{array} { r } { A ( \mathbf { F } \mathbf { L } \xi | \xi ) = \operatorname* { m i n } \left( 1 , \frac { p ( \mathbf { F } \mathbf { L } \xi ) } { p ( \xi ) } \left| \frac { \partial [ \mathbf { F } \mathbf { L } \xi ] } { \partial \xi ^ { T } } \right| \right) . } \end{array}
69
+ $$
70
+
71
+ # 4 L2HMC: TRAINING MCMC SAMPLERS
72
+
73
+ In this section, we describe our proposed method L2HMC (for ‘Learning To Hamiltonian Monte Carlo’). Given access to only an energy function $U$ (and not samples), L2HMC learns a parametric leapfrog operator $\mathbf { L } _ { \theta }$ over an augmented state space. We begin by describing what desiderata we have for $\mathbf { L } _ { \theta }$ , then go into detail on how we parameterize our sampler. Finally, we conclude this section by describing our training procedure.
74
+
75
+ # 4.1 AUGMENTING HMC
76
+
77
+ HMC is a powerful algorithm, but it can still struggle even on very simple problems. For example, a two-dimensional multivariate Gaussian with an ill-conditioned covariance matrix can take arbitrarily long to traverse (even if the covariance is diagonal), whereas it is trivial to sample directly from it. Another problem is that HMC can only move between energy levels via a random walk (Neal, 2011), which leads to slow mixing in some models. Finally, HMC cannot easily traverse low-density zones. For example, given a simple Gaussian mixture model, HMC cannot mix between modes without recourse to additional tricks, as illustrated in Figure 1b. These observations determine the list of desiderata for our learned MCMC kernel: fast mixing, fast burn-in, mixing across energy levels, and mixing between modes.
78
+
79
+ While pursuing these goals, we must take care to ensure that our proposal operator retains two key features of the leapfrog operator used in HMC: it must be invertible, and the determinant of its Jacobian must be tractable. The leapfrog operator satisfies these properties by ensuring that each sub-update only affects a subset of the variables, and that no sub-update depends nonlinearly on any of the variables being updated. We are free to generalize the leapfrog operator in any way that preserves these properties. In particular, we are free to translate and rescale each sub-update of the leapfrog operator, so long as we are careful to ensure that these translation and scale terms do not depend on the variables being updated.
80
+
81
+ # 4.1.1 STATE SPACE
82
+
83
+ As in HMC, we begin by augmenting the current state $x \in \mathbb { R } ^ { n }$ with a continuous momentum variable $v \in \mathbb { R } ^ { n }$ drawn from a standard normal. We also introduce a binary direction variable $d \in \{ - 1 , 1 \}$ , drawn from a uniform distribution. We will denote the complete augmented state as $\xi \triangleq ( x , v , d )$ , with probability density $p ( \xi ) = p ( x ) p ( v ) p ( d )$ . Finally, to each step $t$ of the operator $\mathbf { L } _ { \theta }$ we assign a fixed random binary mask $m ^ { t } \in \{ 0 , 1 \} ^ { n }$ that will determine which variables are affected by each sub-update. We draw $m ^ { t }$ uniformly from the set of binary vectors satisfying $\begin{array} { r } { \sum _ { i = 1 } ^ { n } m _ { i } ^ { t } = \lfloor \frac { n } { 2 } \rfloor } \end{array}$ , that is, half of the entries of $m ^ { t }$ are 0 and half are 1. For convenience, we write $\bar { m } ^ { t } = 1 - m ^ { t }$ and $x _ { m ^ { t } } = x \odot m ^ { t }$ $\odot$ denotes element-wise multiplication, and $\mathbb { 1 }$ the all ones vector).
84
+
85
+ # 4.1.2 UPDATE STEPS
86
+
87
+ We now describe the details of our augmented leapfrog integrator $\mathbf { L } _ { \theta }$ , for a single time-step $t$ , and for direction $d = 1$ .
88
+
89
+ We first update the momenta $v$ . This update can only depend on a subset $\zeta _ { 1 } \triangleq ( x , \partial _ { x } U ( x ) , t )$ of the full state, which excludes $v$ . It takes the form
90
+
91
+ We have introduced three new functions of $\zeta _ { 1 } \colon T _ { v }$ , $Q _ { v }$ , and $S _ { v }$ . $T _ { v }$ is a translation, $\exp ( Q _ { v } )$ rescales the gradient, and $\exp ( \frac { \epsilon } { 2 } S _ { v } )$ rescales the momentum. The determinant of the Jacobian of this transformation is exp $, \left( \frac { \epsilon } { 2 } \mathbb { 1 } \cdot S _ { v } ( \zeta _ { 1 } ) \right)$ . Note that if $T _ { v }$ , $Q _ { v }$ , and $S _ { v }$ are all zero, then we recover the standard leapfrog momentum update.
92
+
93
+ We now update $x$ . As hinted above, to make our transformation more expressive, we first update a subset of the coordinates of $x$ , followed by the complementary subset. The first update, which yields $x ^ { \prime }$ and affects only $x _ { m } t$ , depends on the state subset $\zeta _ { 2 } \triangleq ( x _ { \bar { m } ^ { t } } , v , t )$ . Conversely, with $x ^ { \prime }$ defined below, the second update only affects $\boldsymbol { x } _ { \bar { m } ^ { t } } ^ { \prime }$ and depends only on $\zeta _ { 3 } \triangleq ( x _ { m ^ { t } } ^ { \prime } , v , t )$ :
94
+
95
+ $$
96
+ \begin{array} { l } { { x ^ { \prime } = x _ { \bar { m } ^ { t } } + m ^ { t } \odot [ x \odot \exp ( \epsilon S _ { x } ( \zeta _ { 2 } ) ) + \epsilon ( v ^ { \prime } \odot \exp ( \epsilon Q _ { x } ( \zeta _ { 2 } ) ) + T _ { x } ( \zeta _ { 2 } ) ) ] } } \\ { { x ^ { \prime \prime } = x _ { m ^ { t } } ^ { \prime } + \bar { m } ^ { t } \odot [ x ^ { \prime } \odot \exp ( \epsilon S _ { x } ( \zeta _ { 3 } ) ) + \epsilon ( v ^ { \prime } \odot \exp ( \epsilon Q _ { x } ( \zeta _ { 3 } ) ) + T _ { x } ( \zeta _ { 3 } ) ) ] . } } \end{array}
97
+ $$
98
+
99
+ Again, $T _ { x }$ is a translation, $\exp ( Q _ { x } )$ rescales the effect of the momenta, $\exp ( \epsilon S _ { x } )$ rescales the positions $x$ , and we recover the original leapfrog position update if $T _ { x } = Q _ { x } = S _ { x } = 0$ . The determinant of the Jacobian of the first transformation is $\bar { \exp { ( \epsilon m ^ { t } \cdot S _ { x } ( \zeta _ { 2 } ) ) } }$ , and the determinant of the Jacobian of the second transformation is $\exp { ( \epsilon \bar { m } ^ { t } \cdot S _ { x } ( \zeta _ { 3 } ) ) }$ .
100
+
101
+ Finally, we update $v$ again, based on the subset $\zeta _ { 4 } \triangleq ( x ^ { \prime \prime } , \partial _ { x } U ( x ^ { \prime \prime } ) , t )$ :
102
+
103
+ $$
104
+ \begin{array} { r } { v ^ { \prime \prime } = v ^ { \prime } \odot \exp ( \frac { \epsilon } { 2 } S _ { v } ( \zeta _ { 4 } ) ) - \frac { \epsilon } { 2 } ( \partial _ { x } U ( x ^ { \prime \prime } ) \odot \exp ( \epsilon Q _ { v } ( \zeta _ { 4 } ) ) + T _ { v } ( \zeta _ { 4 } ) ) . } \end{array}
105
+ $$
106
+
107
+ This update has the same form as the momentum update in equation 4.
108
+
109
+ To give intuition into these terms, the scaling applied to the momentum can enable, among other things, acceleration in low-density zones, to facilitate mixing between modes. The scaling term applied to the gradient of the energy may allow better conditioning of the energy landscape (e.g., by learning a diagonal inertia tensor), or partial ignoring of the energy gradient for rapidly oscillating energies.
110
+
111
+ The corresponding integrator for $d = - 1$ is given in Appendix A; it essentially just inverts the updates in equations 4, 5 and 6. For all experiments, the functions $Q , S , T$ are implemented using multi-layer perceptrons, with shared weights. We encode the current time step in the MLP input.
112
+
113
+ Our leapfrog operator $\mathbf { L } _ { \theta }$ corresponds to running $M$ steps of this modified leapfrog, $\begin{array} { r l } { \mathbf { L } _ { \theta } \boldsymbol { \xi } } & { { } = } \end{array}$ ${ \bf L } _ { \theta } ( x , v , d ) \stackrel { } { = } ( x ^ { \prime \prime \times M } , v ^ { \prime \prime \times M } , d )$ , and our flip operator $\mathbf { F }$ reverses the direction variable $d$ , $\mathbf { F } \xi =$ $( x , v , - d )$ . Written in terms of these modified operators, our proposal and acceptance probability are identical to those for standard HMC. Note, however, that this parameterization enables learning non-volume-preserving transformations, as the determinant of the Jacobian is a function of $S _ { x }$ and $S _ { v }$ that does not necessarily evaluate to 1. This quantity is derived in Appendix B.
114
+
115
+ # 4.1.3 MCMC TRANSITIONS
116
+
117
+ For convenience, we denote by $\mathbf { R }$ an operator that re-samples the momentum and direction. I.e., given $\xi ~ = ~ ( x , v , d )$ , $\mathbf { R } \xi = ( x , v ^ { \prime } , d ^ { \prime } )$ where $v ^ { \prime } \sim \mathcal { N } ( 0 , I ) , d ^ { \prime } \sim \mathcal { U } \left( \{ - 1 , 1 \} \right)$ . Sampling thus consists of alternating application of the $\mathbf { F L } _ { \theta }$ and $\mathbf { R }$ , in the following two steps each of which is a Markov transition that satisfies detailed balance with respect to $p$ :
118
+
119
+ 1. $\boldsymbol { \xi } ^ { \prime } = \mathbf { F } \mathbf { L } _ { \boldsymbol { \theta } } \boldsymbol { \xi }$ with probability $A ( \mathbf { F L } _ { \theta } \xi | \xi )$ (Equation 3), otherwise $\xi ^ { \prime } = \xi$
120
+ 2. $\boldsymbol { \xi } ^ { \prime } = \mathbf { R } \boldsymbol { \xi }$
121
+
122
+ This parameterization is effectively a generalization of standard HMC as it is non-volume preserving, with learnable parameters, and easily reduces to standard HMC for $Q , S , T = 0$ .
123
+
124
+ # 4.2 LOSS AND TRAINING PROCEDURE
125
+
126
+ We need some criterion to train the parameters $\theta$ that control the functions $Q , S$ , and $T$ . We choose a loss designed to reduce mixing time. Specifically, we aim to minimize lag-one autocorrelation. This is equivalent to maximizing expected squared jumped distance (Pasarica & Gelman, 2010). For $\xi , \xi ^ { \prime }$ in the extended state space, we define $\delta ( \xi ^ { \bar { \prime } } , \xi ) \ = \ \delta ( ( x ^ { \prime } , v ^ { \prime } , d ^ { \prime } ) , ( x , v , d ) ) \ = \ | | x - x ^ { \prime } | | _ { 2 } ^ { 2 }$ . Expected squared jumped distance is thus $\mathbb { E } _ { \xi \sim p ( \xi ) } \left[ \delta ( \mathbf { F L } _ { \theta } \xi , \xi ) A ( \mathbf { F L } _ { \theta } \xi | \xi ) \right]$ . However, this loss need not encourage mixing across the entire state space. Indeed, maximizing this objective can lead to regions of state space where almost no mixing occurs, so long as the average squared distance traversed remains high. To optimize both for typical and worst case behavior, we include a reciprocal term in the loss,
127
+
128
+ $$
129
+ \begin{array} { r } { \ell _ { \lambda } ( \xi , \xi ^ { \prime } , A ( \xi ^ { \prime } | \xi ) ) = \frac { \lambda ^ { 2 } } { \delta ( \xi , \xi ^ { \prime } ) A ( \xi ^ { \prime } | \xi ) } - \frac { \delta ( \xi , \xi ^ { \prime } ) A ( \xi ^ { \prime } | \xi ) } { \lambda ^ { 2 } } , } \end{array}
130
+ $$
131
+
132
+ where $\lambda$ is a scale parameter, capturing the characteristic length scale of the problem. The second term encourages typical moves to be large, while the first term strongly penalizes the sampler if it is ever in a state where it cannot move effectively – $\delta ( \xi , \xi ^ { \prime } )$ being small resulting in a large loss value. We train our sampler by minimizing this loss over both the target distribution and initialization distribution. Formally, given an initial distribution $\pi _ { 0 }$ over $\mathcal { X }$ , we define $q ( \xi ) = \pi _ { 0 } ( x ) \mathcal { N } ( v ; 0 , I ) p ( d )$ , and minimize
133
+
134
+ $$
135
+ \begin{array} { r } { \mathcal { L } ( \boldsymbol { \theta } ) \triangleq \mathbb { E } _ { p ( \boldsymbol { \xi } ) } \left[ \ell _ { \lambda } ( \boldsymbol { \xi } , \mathbf { F } \mathbf { L } _ { \boldsymbol { \theta } } \boldsymbol { \xi } , A ( \mathbf { F } \mathbf { L } _ { \boldsymbol { \theta } } \boldsymbol { \xi } | \boldsymbol { \xi } ) ) \right] + \lambda _ { b } \mathbb { E } _ { q ( \boldsymbol { \xi } ) } \left[ \ell _ { \lambda } ( \boldsymbol { \xi } , \mathbf { F } \mathbf { L } _ { \boldsymbol { \theta } } \boldsymbol { \xi } , A ( \mathbf { F } \mathbf { L } _ { \boldsymbol { \theta } } \boldsymbol { \xi } | \boldsymbol { \xi } ) ) \right] . } \end{array}
136
+ $$
137
+
138
+ The first term of this loss encourages mixing as it considers our operator applied on draws from the distribution; the second term rewards fast burn-in; $\lambda _ { b }$ controls the strength of the ‘burn-in’ regularization. Given this loss, we exactly describe our training procedure in Algorithm 1. It is important to note that each training iteration can be done with only one pass through the network and can be efficiently batched. We further emphasize that this training procedure can be applied to any learnable operator whose Jacobian’s determinant is tractable, making it a general framework for training MCMC proposals.
139
+
140
+ # Algorithm 1 Training L2HMC
141
+
142
+ Input: Energy function $U : \mathcal { X } \mathbb { R }$ and its gradient $\nabla _ { x } U : x x$ , initial distribution over
143
+ the augmented state space $q$ , number of iterations $n _ { \mathrm { i t e r s } }$ , number of leapfrogs $M$ , learning rate
144
+ schedule (αt)t≤n , batch size $N$ , scale parameter $\lambda$ and regularization strength $\lambda _ { b }$ .
145
+ Initialize the parameters of the sampler $\theta$ .
146
+ Initialize $\{ \xi _ { p } ^ { ( i ) } \} _ { i \le N }$ from $q ( \xi )$ .
147
+ for $t = 0$ to $n _ { \mathrm { i t e r s } } - 1$ do Sample a minibatch $\{ \xi _ { q } ^ { ( i ) } \} _ { i \leq N }$ from $q ( \xi )$ . $\mathcal { L } 0$ for r $\begin{array} { r l } & { \xi _ { p } ^ { ( i ) } \gets \mathbf { R } \xi _ { p } ^ { ( i ) } } \\ & { \mathcal { L } \gets \mathcal { L } + \ell _ { \lambda } \left( \xi _ { p } ^ { ( i ) } , \mathbf { F L } _ { \theta } \xi _ { p } ^ { ( i ) } , A ( \mathbf { F L } _ { \theta } \xi _ { p } ^ { ( i ) } | \xi _ { p } ^ { ( i ) } ) \right) + \lambda _ { b } \ell _ { \lambda } \left( \xi _ { q } ^ { ( i ) } , \mathbf { F L } _ { \theta } \xi _ { q } ^ { ( i ) } , A ( \mathbf { F L } _ { \theta } \xi _ { q } ^ { ( i ) } | \xi _ { q } ^ { ( i ) } ) \right) } \\ & { } \end{array}$ $i = 1$ to $N$ do $\begin{array} { r } { \xi _ { p } ^ { ( i ) } \mathbf { F L } _ { \theta } \xi _ { p } ^ { ( i ) } } \end{array}$ with probability $A ( \mathbf { F L } _ { \theta } \xi _ { p } ^ { ( i ) } | \xi _ { p } ^ { ( i ) } )$ . end for θ θ α t θ
148
+ end for
149
+
150
+ # 5 EXPERIMENTS
151
+
152
+ We present an empirical evaluation of our trained sampler on a diverse set of energy functions. We first present results on a collection of toy distributions capturing common pathologies of energy landscapes, followed by results on a task from machine learning: maximum-likelihood training of deep generative models. For each, we compare against HMC with well-tuned step length and show significant gains in mixing time. Code implementing our algorithm is available online1.
153
+
154
+ # 5.1 VARIED COLLECTION OF ENERGY FUNCTIONS
155
+
156
+ We evaluate our L2HMC sampler on a diverse collection of energy functions, each posing different challenges for standard HMC.
157
+
158
+ Ill-Conditioned Gaussian (ICG): Gaussian distribution with diagonal covariance spaced loglinearly between $1 0 ^ { - 2 }$ and $1 0 ^ { 2 }$ . This demonstrates that L2HMC can learn a diagonal inertia tensor.
159
+
160
+ Strongly correlated Gaussian (SCG): We rotate a diagonal Gaussian with variances $[ 1 0 ^ { 2 } , 1 0 ^ { - 2 } ]$ by $\frac { \pi } { 4 }$ . This is an extreme version of an example from Neal (2011). This problem shows that, although our parametric sampler only applies element-wise transformations, it can adapt to structure which is not axis-aligned.
161
+
162
+ Mixture of Gaussians (MoG): Mixture of two isotropic Gaussians with $\sigma ^ { 2 } = 0 . 1$ , and centroids separated by distance 4. The means are thus about 12 standard deviations apart, making it almost impossible for HMC to mix between modes.
163
+
164
+ Rough Well: Similar to an example from Sohl-Dickstein et al. (2014), for a given $\eta > 0 , U ( x ) =$ $\begin{array} { r } { \frac { 1 } { 2 } x ^ { T } \overset { \smile } { x } + \eta \sum _ { i } \cos ( \frac { x _ { i } } { \eta } ) } \end{array}$ . For small $\eta$ the energy itself is altered negligibly, but its gradient is perturbed by a high frequency noise oscillating between $- 1$ and 1. In our experiments, we choose $\eta = 1 0 ^ { - 2 }$ .
165
+
166
+ For each of these distributions, we compare against HMC with the same number of leapfrog steps and a well-tuned step-size. To compare mixing time, we plot auto-correlation for each method and report effective sample size (ESS). We compute those quantities in the same way as Sohl-Dickstein et al. (2014). We observe that samplers trained with L2HMC show greatly improved autocorrelation and ESS on the presented tasks, providing more than $1 0 6 \times$ improved ESS on the SCG task. In addition, for the MoG, we show that L2HMC can easily mix between modes while standard HMC gets stuck in a mode, unable to traverse the low density zone. Experimental details, as well as a comparison with LAHMC (Sohl-Dickstein et al., 2014), are shown in Appendix C.
167
+
168
+ ![](images/e878bce92e8dd48bdb837822419a4ea3132437ffdaebbcd93f07f493cdac4546.jpg)
169
+ Figure 1: L2HMC mixes faster than well-tuned HMC, and than A-NICE-MC, on a collection of toy distributions.
170
+
171
+ Comparison to A-NICE-MC (Song et al., 2017) In addition to the well known challenges associated with adversarial training (Arjovsky et al., 2017), we note that parameterization using a volume-preserving operator can dramatically fail on simple energy landscapes. We build off of the mog2 experiment presented in (Song et al., 2017), which is a 2-d mixture of isotropic Gaussians separated by a distance of 10 with variances 0.5. We consider that setup but increase the ratio of variances: $\dot { \sigma } _ { 1 } ^ { 2 } = 3 , \sigma _ { 2 } ^ { 2 } = 0 . 0 5$ . We show in Figure 1d sample chains trained with L2HMC and A-NICE-MC; A-NICE-MC cannot effectively mix between the two modes as only a fraction of the volume of the large mode can be mapped to the small one, making it highly improbable to traverse. This is also an issue for HMC. On the other hand, L2HMC can both traverse the low-density region between modes, and map a larger volume in the left mode to a smaller volume in the right mode. It is important to note that the distance between both clusters is less than in the mog2 case, and it is thus a good diagnostic of the shortcomings of volume-preserving transformations.
172
+
173
+ # 5.2 LATENT-VARIABLE GENERATIVE MODEL
174
+
175
+ We apply our learned sampler to the task of training, and sampling from the posterior of, a latentvariable generative model. The model consists of a latent variable $z \sim p ( z )$ , where we choose $p ( z ) = \breve { \mathscr { N } } ( z ; 0 , I )$ , and a conditional distribution $p ( x | z )$ which generates the image $x$ . Given a family of parametric ‘decoders’ $\{ z \mapsto p ( x | z ; \phi ) , \phi \in \Phi \}$ , and a set of samples $\mathcal { D } = \{ x ^ { ( i ) } \} _ { i \leq N }$ training involves finding $\begin{array} { r } { \phi ^ { * } = \arg \operatorname* { m a x } _ { \phi \in \Phi } p ( \mathcal { D } ; \phi ) } \end{array}$ . However, the log-likelihood is intractable as $\begin{array} { r } { p ( x ; \boldsymbol { \phi } ) = \int p ( x | \boldsymbol { z } ; \boldsymbol { \phi } ) p ( \boldsymbol { z } ) \mathrm { d } \boldsymbol { z } } \end{array}$ . To remedy that problem, Kingma $\&$ Welling (2013) proposed jointly training an approximate posterior $q _ { \psi }$ that maximizes a tractable lower-bound on the log-likelihood:
176
+
177
+ ![](images/250475de256c4eebae15fc4fa637a5547873059d01bec521d1802c331ccf79c1.jpg)
178
+ Figure 2: Training and held-out log-likelihood for models trained with L2HMC, HMC, and the ELBO (VAE).
179
+
180
+ $$
181
+ \mathcal { L } _ { \mathrm { E L B O } } ( x , \phi , \psi ) = \mathbb { E } _ { q _ { \psi } ( z | x ) } \left[ p ( x | z ; \phi ) \right] - \mathrm { K L } ( q _ { \psi } ( z | x ) | | p ( z ) ) \leq p ( x ) ,
182
+ $$
183
+
184
+ where $q _ { \psi } ( z | x )$ is a tractable conditional distribution with parameters $\psi$ , typically parameterized by a neural network. Recently, to improve upon well-known pitfalls like over-pruning (Burda et al., 2015) of the VAE, Hoffman (2017) proposed HMC-DLGM. For a data sample $x ^ { ( i ) }$ , after obtaining a sample from the approximate posterior $q _ { \psi } ( \cdot | x ^ { ( i ) } )$ , Hoffman (2017) runs a MCMC algorithm with energy function $U ( z , x ^ { ( i ) } ) = - \log p ( z ) - \log p ( x ^ { ( i ) } | z ; \phi )$ to obtain a more exact posterior sample from $p ( \boldsymbol { z } | \boldsymbol { x } ^ { ( i ) } ; \boldsymbol { \phi } )$ . Given that better posterior sample $z ^ { \prime }$ , the algorithm maximizes $\log p ( x ^ { ( i ) } | z ^ { \prime } ; \phi )$ .
185
+
186
+ To show the benefits of L2HMC, we borrow the method from Hoffman (2017), but replace HMC by jointly training an L2HMC sampler to improve the efficiency of the posterior sampling. We call this model L2HMC-DLGM. A diagram of our model and a formal description of our training procedure are presented in Appendix D. We define, for $\xi = \{ z , v , d \} , r ( \xi | x ; \psi ) \triangleq$ $q _ { \psi } ( z | x ) \mathcal { N } ( v ; \bar { 0 , I } ) \mathcal { U } ( d ; \{ - 1 , \bar { 1 } \} )$ .
187
+
188
+ In the subsequent sections, we compare our method to the standard VAE model from Kingma & Welling (2013) and HMC-DGLM from Hoffman (2017). It is important to note that, since our sampler is trained jointly with $p _ { \phi }$ and $q _ { \psi }$ , it performs exactly the same number of gradient computations of the energy function as HMC. We first show that training a latent variable generative model with L2HMC results in better generative models both qualitatively and quantitatively. We then show that our improved sampler enables a more expressive, non-Gaussian, posterior.
189
+
190
+ Implementation details: Our decoder $( p _ { \phi } )$ is a neural network with 2 fully connected layers, with 1024 units each and softplus non-linearities, and outputs Bernoulli activation probabilities for each pixel. The encoder $( q _ { \psi } )$ has the same architecture, returning mean and variance for the approximate posterior. Our model was trained for 300 epochs with Adam (Kingma & Ba, 2014) and a learning rate $\alpha = 1 0 ^ { - 3 }$ . All experiments were done on the dynamically binarized MNIST dataset (LeCun).
191
+
192
+ # 5.2.1 SAMPLE QUALITY AND DATA LIKELIHOOD
193
+
194
+ We first present samples from decoders trained with L2HMC, HMC and the ELBO (i.e. vanilla VAE). Although higher log likelihood does not necessarily correspond to better samples (Theis et al., 2015), we can see in Figure 5, shown in the Appendix, that the decoder trained with L2HMC generates sharper samples than the compared methods.
195
+
196
+ We now compare our method to HMC in terms of log-likelihood of the data. As we previously stated, the marginal likelihood of a data point $x \in \mathcal { X }$ is not tractable as it requires integrating $p ( x , z )$ over a high-dimensional space. However, we can estimate it using annealed importance sampling (AIS; Neal (2001)). Following Wu et al. (2016), we evaluate our generative models on both training and held-out data. In Figure 2, we plot the data’s log-likelihood against the number of gradient computation steps for both HMC-DGLM and L2HMC-DGLM. We can see that for a similar number of gradient computations, L2HMC-DGLM achieves higher likelihood for both training and held-out data. This is a strong indication that L2HMC provides significantly better posterior samples.
197
+
198
+ ![](images/fa42f98b9e8fda6e4c48a55741ecf4bec0e430aa2379cfc10ac8d84350687b92.jpg)
199
+
200
+ (a) Block Gibbs inpainting of the top half of an MNIST digit, using (top) L2HMC as a posterior sampler, and (bottom) $q _ { \psi }$ as a posterior sampler.
201
+
202
+ ![](images/3b5a148d0cd5e54e8a2a908b2b63c8ebc00143ad9d41f371e71810f20e32da5a.jpg)
203
+ (b) Non-Gaussian posterior
204
+ Figure 3: Demonstrations of the value of a more expressive posterior approximation.
205
+
206
+ # 5.2.2 INCREASED EXPRESSIVITY OF THE POSTERIOR
207
+
208
+ In the standard VAE framework, approximate posteriors are often parametrized by a Gaussian, thus making a strong assumption of uni-modality. In this section, we show that using L2HMC to sample from the posterior enables learning of a richer posterior landscape.
209
+
210
+ Block Gibbs Sampling To highlight our ability to capture more expressive posteriors, we in-paint the top of an image using Block Gibbs Sampling using the approximate posterior or L2HMC. Formally, let $x _ { 0 }$ be the starting image. We denote top or bottom-half pixels as $x _ { 0 } ^ { \mathrm { t o p } }$ and $x _ { 0 } ^ { \mathrm { b o t t o m } }$ . At each step $t$ , we sample $z ^ { ( t ) } \sim p ( z | x _ { t } ; \theta )$ , sample $\tilde { x } \sim p ( x | z _ { t } ; \theta )$ . We then set $x _ { t + 1 } ^ { \mathrm { t o p } } = \tilde { x } ^ { \mathrm { t o p } }$ and $x _ { t + 1 } ^ { \mathrm { b o t t o m } } = x _ { 0 } ^ { \mathrm { b o t t o m } }$ . We compare the results obtained by sampling from ior) vs. our trained sampler. The results are reported i $p ( z | x ; \theta )$ using a. We $q _ { \psi }$ (i.e. the see that L2HMC easily mixes between modes (3, 5, 8, and plausibly 9 in the figure) while the approximate posterior gets stuck on the same reconstructed digit (3 in the figure).
211
+
212
+ Visualization of the posterior After training a decoder with L2HMC, we randomly choose an element $x _ { 0 } \in \mathcal { D }$ and run 512 parallel L2HMC chains for 20, 000 Metropolis-Hastings steps. We then find the direction of highest variance, project the samples along that direction and show a histogram in Figure 3b. This plot shows non-Gaussianity in the latent space for the posterior. Using our improved sampler enables the decoder to make use of a more expressive posterior, and enables the encoder to sample from this non-Gaussian posterior.
213
+
214
+ # 6 FUTURE WORK
215
+
216
+ The loss in Section 4.2 targets lag-one autocorrelation. It should be possible to extend this to also target lag-two and higher autocorrelations. It should also be possible to extend this loss to reward fast decay in the autocorrelation of other statistics of the samples, for instance the sample energy as well as the sample position. These additional statistics could also include learned statistics of the samples, combining benefits of the adversarial approach of (Song et al., 2017) with the current work.
217
+
218
+ Our learned generalization of HMC should prove complementary to several other research directions related to HMC. It would be interesting to explore combining our work with the use of HMC in a minibatch setting (Chen et al., 2014); with shadow Hamiltonians (Izaguirre & Hampton, 2004); with gradient pre-conditioning approaches similar to those used in Riemannian HMC (Girolami et al., 2009; Betancourt, 2013); with the use of alternative HMC accept-reject rules (Sohl-Dickstein et al., 2014; Berger et al., 2015); with the use of non-canonical Hamiltonian dynamics (Tripuraneni et al., 2016); with variants of AIS adapted to HMC proposals (Sohl-Dickstein & Culpepper, 2012); with the extension of HMC to discrete state spaces (Zhang et al., 2012); and with the use of alternative Hamiltonian integrators (Creutz & Gocksch, 1989; Chao et al., 2015).
219
+
220
+ Finally, our work is also complementary to other methods not utilizing gradient information. For example, we could incorporate the intuition behind Multiple Try Metropolis schemes (Martino & Read, 2013) by having several parametric operators and training each one when used. In addition, one could draw inspiration from the adaptive literature (Haario et al., 2001; Andrieu & Thoms, 2008) or component-wise strategies (Gilks & Wild, 1992).
221
+
222
+ # 7 CONCLUSION
223
+
224
+ In this work, we presented a general method to train expressive MCMC kernels parameterized with deep neural networks. Given a target distribution $p$ , analytically known up to a constant, our method provides a fast-mixing sampler, able to efficiently explore the state space. Our hope is that our method can be utilized in a “black-box” manner, in domains where sampling constitutes a huge bottleneck such as protein foldings (Schutte et al., 1999) or physics simulations (Olsson, 1995). ¨
225
+
226
+ # ACKNOWLEDGMENTS
227
+
228
+ We would like to thank Ben Poole, Aditya Grover, David Belanger, and Colin Raffel for insightful comments on the draft, Mohammad Norouzi for support and encouragement launching the project, and Jiaming Song for discussions and help running A-NICE-MC.
229
+
230
+ # REFERENCES
231
+
232
+ Christophe Andrieu and Johannes Thoms. A tutorial on adaptive MCMC. Statistics and computing, 18(4): 343–373, 2008.
233
+
234
+ Christophe Andrieu, Nando De Freitas, Arnaud Doucet, and Michael I Jordan. An introduction to MCMC for machine learning. Machine learning, 50(1-2):5–43, 2003.
235
+
236
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein GAN. ´ arXiv preprint arXiv:1701.07875, 2017.
237
+
238
+ Yoshua Bengio, Eric Laufer, Guillaume Alain, and Jason Yosinski. Deep generative stochastic networks trainable by backprop. In International Conference on Machine Learning, pp. 226–234, 2014.
239
+
240
+ Charles H Bennett. Mass tensor molecular dynamics. Journal of Computational Physics, 19(3):267–279, 1975.
241
+
242
+ Andrew B Berger, Mayur Mudigonda, Michael R DeWeese, and Jascha Sohl-Dickstein. A Markov jump process for more efficient Hamiltonian Monte Carlo. arXiv preprint arXiv:1509.03808, 2015.
243
+
244
+ Michael Betancourt. A general metric for Riemannian manifold Hamiltonian Monte Carlo. In Geometric science of information, pp. 327–334. Springer, 2013.
245
+
246
+ Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015.
247
+
248
+ Wei-Lun Chao, Justin Solomon, Dominik Michels, and Fei Sha. Exponential integration for Hamiltonian Monte Carlo. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1142–1151, 2015.
249
+
250
+ Tianqi Chen, Emily Fox, and Carlos Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In International Conference on Machine Learning, pp. 1683–1691, 2014.
251
+
252
+ Michael Creutz and Andreas Gocksch. Higher-order hybrid Monte Carlo algorithms. Physical Review Letters, 63(1):9, 1989.
253
+
254
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. arXiv preprint arXiv:1605.08803, 2016.
255
+
256
+ Simon Duane, Anthony D Kennedy, Brian J Pendleton, and Duncan Roweth. Hybrid Monte Carlo. Physics letters B, 195(2):216–222, 1987.
257
+
258
+ Walter R Gilks and Pascal Wild. Adaptive rejection sampling for gibbs sampling. Applied Statistics, pp. 337–348, 1992.
259
+
260
+ Mark Girolami and Ben Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(2):123–214, 2011.
261
+
262
+ Mark Girolami, Ben Calderhead, and Siu A Chin. Riemannian manifold Hamiltonian Monte Carlo. arXiv preprint arXiv:0907.1100, 2009.
263
+
264
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
265
+
266
+ Peter J Green. Reversible jump markov chain monte carlo computation and bayesian model determination. Biometrika, 82(4):711–732, 1995.
267
+
268
+ Heikki Haario, Eero Saksman, Johanna Tamminen, et al. An adaptive metropolis algorithm. Bernoulli, 7(2): 223–242, 2001.
269
+
270
+ Ernst Hairer, Christian Lubich, and Gerhard Wanner. Geometric numerical integration illustrated by the Stormer–Verlet method. ¨ Acta numerica, 12:399–450, 2003.
271
+
272
+ W Keith Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57 (1):97–109, 1970.
273
+
274
+ Matthew D Hoffman. Learning deep latent Gaussian models with Markov chain Monte Carlo. In International Conference on Machine Learning, pp. 1510–1519, 2017.
275
+
276
+ Matthew D Hoffman and Andrew Gelman. The no-U-turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15(1):1593–1623, 2014.
277
+
278
+ Li Huang and Lei Wang. Accelerated monte carlo simulations with restricted boltzmann machines. Physical Review B, 95(3):035105, 2017.
279
+
280
+ Akihisa Ichiki and Masayuki Ohzeki. Violation of detailed balance accelerates relaxation. Physical Review E, 88(2):020101, 2013.
281
+
282
+ Jesus A Izaguirre and Scott S Hampton. Shadow hybrid Monte Carlo: an efficient propagator in phase space of ´ macromolecules. Journal of Computational Physics, 200(2):581–604, 2004.
283
+
284
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
285
+
286
+ Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
287
+
288
+ Yann LeCun. The MNIST database of handwritten digits. http://yann. lecun. com/exdb/mnist/.
289
+
290
+ Benedict Leimkuhler and Sebastian Reich. Simulating Hamiltonian dynamics, volume 14. Cambridge University Press, 2004.
291
+
292
+ Junwei Liu, Yang Qi, Zi Yang Meng, and Liang Fu. Self-learning monte carlo method. Physical Review B, 95 (4):041101, 2017.
293
+
294
+ David JC MacKay. Information theory, inference and learning algorithms. Cambridge university press, 2003.
295
+
296
+ Luca Martino and Jesse Read. On the flexibility of the design of multiple try metropolis schemes. Computational Statistics, 28(6):2797–2823, 2013.
297
+
298
+ Radford M Neal. Probabilistic inference using Markov chain Monte Carlo methods. 1993.
299
+
300
+ Radford M Neal. Sampling from multimodal distributions using tempered transitions. Statistics and computing, 6(4):353–366, 1996.
301
+
302
+ Radford M Neal. Annealed importance sampling. Statistics and computing, 11(2):125–139, 2001.
303
+
304
+ Radford M Neal. MCMC using Hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2(11), 2011.
305
+
306
+ Peter Olsson. Two phase transitions in the fully frustrated XY model. Physical review letters, 75(14):2758, 1995.
307
+
308
+ Cristian Pasarica and Andrew Gelman. Adaptively scaling the Metropolis algorithm using expected squared jumped distance. Statistica Sinica, pp. 343–364, 2010.
309
+
310
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014.
311
+
312
+ Tim Salimans, Diederik Kingma, and Max Welling. Markov chain Monte Carlo and variational inference: Bridging the gap. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1218–1226, 2015.
313
+
314
+ Ch Schutte, Alexander Fischer, Wilhelm Huisinga, and Peter Deuflhard. A direct approach to conformational¨ dynamics based on hybrid Monte Carlo. Journal of Computational Physics, 151(1):146–168, 1999.
315
+
316
+ Dino Sejdinovic, Heiko Strathmann, Maria Lomeli Garcia, Christophe Andrieu, and Arthur Gretton. Kernel adaptive metropolis-hastings. In International Conference on Machine Learning, pp. 1665–1673, 2014.
317
+ Jascha Sohl-Dickstein and Benjamin J Culpepper. Hamiltonian annealed importance sampling for partition function estimation. arXiv preprint arXiv:1205.1925, 2012.
318
+ Jascha Sohl-Dickstein, Mayur Mudigonda, and Michael R DeWeese. Hamiltonian Monte Carlo without detailed balance. pp. 719–726, 2014.
319
+ Jascha Sohl-Dickstein, Eric A Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. arXiv preprint arXiv:1503.03585, 2015.
320
+ Jiaming Song, Shengjia Zhao, and Stefano Ermon. A-nice-mc: Adversarial training for mcmc. In Advances in Neural Information Processing Systems, pp. 5146–5156, 2017.
321
+ Heiko Strathmann, Dino Sejdinovic, Samuel Livingstone, Zoltan Szabo, and Arthur Gretton. Gradient-free hamiltonian monte carlo with efficient kernel exponential families. In Advances in Neural Information Processing Systems, pp. 955–963, 2015.
322
+ Lucas Theis, Aaron van den Oord, and Matthias Bethge. A note on the evaluation of generative models. ¨ arXiv preprint arXiv:1511.01844, 2015.
323
+ Nilesh Tripuraneni, Mark Rowland, Zoubin Ghahramani, and Richard Turner. Magnetic Hamiltonian Monte Carlo. arXiv preprint arXiv:1607.02738, 2016.
324
+ Lei Wang. Can boltzmann machines discover cluster updates? arXiv preprint arXiv:1702.08586, 2017.
325
+ Yuhuai Wu, Yuri Burda, Ruslan Salakhutdinov, and Roger Grosse. On the quantitative analysis of decoderbased generative models. arXiv preprint arXiv:1611.04273, 2016.
326
+ Yichuan Zhang, Zoubin Ghahramani, Amos J Storkey, and Charles A Sutton. Continuous relaxations for discrete hamiltonian monte carlo. In Advances in Neural Information Processing Systems, pp. 3194–3202, 2012.
327
+
328
+ # Appendix
329
+
330
+ # A REVERSE LEAPFROG OPERATOR
331
+
332
+ Let $\xi = \{ x , v , d \}$ in the extended state space with $d = - 1$ . Here, we describe the leapfrog updates for a single time step $t$ , this consists of inverting the equations presented in the corresponding section.
333
+
334
+ Let $\zeta _ { 1 } = \{ x , v , t \}$ , we have:
335
+
336
+ $$
337
+ v ^ { \prime } = \left[ v + \frac { \epsilon } { 2 } \left( \partial _ { x } U ( x ) \odot \exp ( \epsilon Q _ { v } ( \zeta _ { 1 } ) ) + T _ { v } ( \zeta _ { 1 } ) \right) \right] \odot \exp ( - S _ { v } ( \zeta _ { 1 } ) ) .
338
+ $$
339
+
340
+ With the notation from Section 4, let $\zeta _ { 2 } \triangleq \{ x _ { m ^ { t } } , v , t \}$
341
+
342
+ $$
343
+ x ^ { \prime } = x _ { m ^ { t } } + \bar { m } ^ { t } \odot [ ( x - \epsilon ( \exp ( \epsilon Q _ { x } ( \zeta _ { 2 } ) ) \odot v ^ { \prime } + T _ { x } ( \zeta _ { 2 } ) ) ] \odot \exp ( - \epsilon S _ { v } ( \zeta _ { 2 } ) ) .
344
+ $$
345
+
346
+ Let us denote $\zeta _ { 3 } \triangleq \{ x _ { \bar { m } ^ { t } } ^ { \prime } , v , t \}$ :
347
+
348
+ $$
349
+ x ^ { \prime \prime } = x _ { \bar { m } ^ { t } } + m ^ { t } \odot [ ( x ^ { \prime } - \epsilon ( \exp ( \epsilon Q _ { x } ( \zeta _ { 3 } ) ) \odot v ^ { \prime } + T _ { x } ( \zeta _ { 3 } ) ) ] \odot \exp ( - \epsilon S _ { v } ( \zeta _ { 3 } ) ) .
350
+ $$
351
+
352
+ Finally, the last update, with $\zeta _ { 4 } \triangleq \{ x ^ { \prime \prime } , \partial _ { x } U ( x ^ { \prime \prime } ) , t \}$ :
353
+
354
+ $$
355
+ v ^ { \prime } = \left[ v + { \frac { \epsilon } { 2 } } \left( \partial _ { x } U ( x ^ { \prime \prime } ) \odot \exp ( \epsilon Q _ { v } ( \zeta _ { 4 } ) ) + T _ { v } ( \zeta _ { 4 } ) \right) \right] \odot \exp ( - S _ { v } ( \zeta _ { 4 } ) ) .
356
+ $$
357
+
358
+ It is important to note that to invert $\mathbf { L } _ { \theta }$ , these steps should be ran for $t$ from $M$ to 1.
359
+
360
+ # B DETERMINANT OF THE JACOBIAN
361
+
362
+ Given the derivations (and notations) from Section 4, for the forward operator $\mathbf { L } _ { \theta }$ , we can immediately compute the Jacobian:
363
+
364
+ $$
365
+ \log \left| \frac { \partial [ \mathbf { F } \mathbf { L } _ { \theta } \boldsymbol { \xi } ] } { \partial \boldsymbol { \xi } ^ { T } } \right| = d \sum _ { t \leq M } \left[ \frac { \epsilon } { 2 } \mathbf { 1 } \cdot S _ { v } ( \boldsymbol { \zeta } _ { 1 } ^ { t } ) + \epsilon m ^ { t } \cdot S _ { x } ( \boldsymbol { \zeta } _ { 2 } ^ { t } ) + \epsilon \bar { m } ^ { t } \cdot S _ { x } ( \boldsymbol { \zeta } _ { 3 } ^ { t } ) + \frac { \epsilon } { 2 } \mathbf { 1 } \cdot S _ { v } ( \boldsymbol { \zeta } _ { 4 } ^ { t } ) \right] .
366
+ $$
367
+
368
+ Where $\zeta _ { i } ^ { t }$ denotes the intermediary variable $\zeta _ { i }$ at time step $t$ and $d$ is the direction of $\xi$ i.e. $\xi =$
369
+ $\{ x , v , d \}$ .
370
+
371
+ # C EXPERIMENTAL DETAILS OF SECTION 5
372
+
373
+ # C.1 IMPLEMENTATION DETAILS
374
+
375
+ First of all, we keep separate parameters for the network responsible for updating $v$ and those updating $x$ . The architectures are the same. Let us take the example of $Q _ { v } , S _ { v } , T _ { v }$ . The time step $t$ is given as input to the MLP, encoded as $\begin{array} { r } { \tau ( t ) = ( \cos ( \frac { 2 \pi t } { M } ) , \sin ( \frac { 2 \pi { \hat { t } } } { M } ) ) } \end{array}$ . $\sigma ( \cdot )$ denotes the ReLU non-linearity.
376
+
377
+ For $n _ { h }$ hidden units per layer:
378
+
379
+ • We first compute $h _ { 1 } = \sigma ( W _ { 1 } x + W _ { 2 } v + W _ { 3 } \tau ( t ) + b ) ( h \in \mathbb { R } ^ { n _ { h } } ) .$ · $h _ { 2 } = \sigma ( W _ { 4 } h + b _ { 4 } ) \in \mathbb { R } ^ { n _ { h } }$ • $S _ { v } = \lambda _ { s } \mathtt { t a n h } ( W _ { s } h _ { 2 } + b _ { s } ) , Q _ { v } = \lambda _ { q } \mathtt { t a n h } ( W _ { q } h _ { 2 } + b _ { q } ) , T _ { v } = W _ { t } h _ { 2 } + b _ { t } .$
380
+
381
+ In Section 5.1, the $Q , S , T$ are neural networks with 2 hidden layers with 10 (100 for the 50-d ICG) units and ReLU non-linearities. We train with Adam (Kingma & Ba, 2014) and a learning rate $\alpha = 1 0 ^ { - 3 }$ . We train for 5, 000 iterations with a batch size of 200.
382
+
383
+ $\lambda _ { b }$ was set to 0 for ICG and SCG and to 1 for MoG and Rough Well. For the MoG tasks, we train our sampler with a temperature parameter that we continuously anneal; we evaluate the trained sampler without using temperature.
384
+
385
+ ![](images/ce0d3b31ad5969a1d38e2d717519f244a5cf9175ca9b22c578fb2f7627737684.jpg)
386
+ Figure 4: Diagram of our L2HMC-DGLM model. Nodes are functions of their parents. Round nodes are deterministic, diamond nodes are stochastic and the doubly-circled node is observed.
387
+
388
+ # C.2 AUTO-CORRELATION AND ESS
389
+
390
+ Let $( x _ { \tau } ) _ { \tau \leq T }$ be a set of correlated samples converging to the distribution $p$ with mean $\mu$ and covariance $\Sigma$ . We define auto-correlation at time $t$ as:
391
+
392
+ $$
393
+ \rho _ { t } \triangleq \frac { 1 } { \mathrm { T r a c e } ( \Sigma ) ( T - t ) } \sum _ { \tau \leq T - t - 1 } ( x _ { \tau } - \mu ) ^ { T } ( x _ { \tau + t } - \mu ) .
394
+ $$
395
+
396
+ We can now define effective sample size (ESS) as:
397
+
398
+ $$
399
+ \mathrm { E S S } \left( ( x _ { \tau } ) _ { \tau \leq T } \right) \triangleq \frac { 1 } { 1 + 2 \sum _ { t } \rho _ { t } } .
400
+ $$
401
+
402
+ Similar to Hoffman & Gelman (2014), we truncate the sum when the auto-correlation goes below 0.05.
403
+
404
+ # C.3 COMPARISON WITH LAHMC
405
+
406
+ We compare our trained sampler with LAHMC (Sohl-Dickstein et al., 2014). Results are reported in Table 1. L2HMC largely outperforms LAHMC on all task. LAHMC is also unable to mix between modes for the MoG task. We also note that L2HMC could be easily combined with LAHMC, by replacing the leapfrog integrator of LAHMC with the learned one of L2HMC.
407
+
408
+ Table 1: ESS for a fixed number of gradient evaluations.
409
+
410
+ <table><tr><td>Distribution</td><td>Gradient Evaluations</td><td>ESS-L2HMC</td><td>ESS-LAHMC</td><td>Ratio</td></tr><tr><td>50-d ICG</td><td>2000</td><td>156.6</td><td>21.4</td><td>7.3</td></tr><tr><td>Rough Well</td><td>200</td><td>12.5</td><td>8.6</td><td>1.5</td></tr><tr><td>2-d SCG</td><td>5000</td><td>116</td><td>16.7</td><td>14.9</td></tr><tr><td>MoG</td><td>20,000</td><td>65.0</td><td>&lt;0.53</td><td>&gt; 123.5</td></tr></table>
411
+
412
+ # D L2HMC-DGLM
413
+
414
+ # D.1 TRAINING ALGORITHM
415
+
416
+ In this section, we present our training algorithm as well as a diagram explaining L2HMC-DGLM. For conciseness, given our operator $\mathbf { L } _ { \theta }$ , we denote by $\mathbf { K } _ { \theta } ( \cdot | x )$ the distribution over next state given sampling of a momentum and direction and the Metropolis-Hastings step.
417
+
418
+ # D.2 IMPLEMENTATION DETAILS OF L2HMC-DGLM
419
+
420
+ Similar to our L2HMC training on unconditional sampling, we share weights across $Q , S$ and $T$ . In addition, the auxiliary variable $x$ (here the image from MNIST) is first passed through a 2-layer neural network, with softplus non-linearities and 512 hidden units. This input is given to both
421
+
422
+ # Algorithm 2 L2HMC for latent variable generative models
423
+
424
+ Input: dataset $\mathcal { D }$ , number of iterations $n _ { \mathrm { i t e r s } }$ , number of Metropolis-Hastings step $J$ , number of
425
+ leapfrogs M , and learning rate schedule (αt)t≤niters .
426
+ Randomly initialize the decoder’s parameters $\phi$ and the approximate posterior $\psi$ . Initialize the
427
+ parameters of the sampler $\theta$ with $M$ leapfrog steps.
428
+ for $t = 0$ to $n _ { \mathrm { i t e r s } } - 1$ do Randomly sample a minibatch $\boldsymbol { B }$ from the dataset $\mathcal { D }$ . $\mathcal { L } _ { \mathrm { E L B O } } , \mathcal { L } _ { \mathrm { S a m p l e r } } , \mathcal { L } _ { \mathrm { D e c o d e r } } 0$ for $\boldsymbol { x } ^ { ( b ) } \in B \mathrm { d } \mathbf { 0 }$ ∈Sample $\xi _ { 0 } ^ { ( b ) } \sim r ( \cdot | x ^ { ( b ) } ; \psi )$ . $\mathcal { L } _ { \mathrm { E L B O } } p ( x ^ { ( b ) } | z _ { 0 } ^ { ( b ) } ; \phi ) - \mathrm { K L } ( q _ { \psi } ( z | x ^ { ( b ) } ) | | p ( z ) )$ . With ξ(b)0 = {z(b)0 , v(b)0 , d(b)0 } Define the energy function $U _ { x ^ { ( b ) } } ( z ) = - \log p ( x ^ { ( b ) } | z ; \theta ) - \log p ( z )$ $\mathcal { L } _ { \mathrm { S a m p l e r } } 0$ $\lambda \sqrt { \mathrm { V a r } ( q _ { \psi } ( z _ { 0 } ^ { ( b ) } | x ^ { ( b ) } ) }$ for $j = 0$ to $J - 1$ do ξ (j −b) ← Rξ(b)j LSampler ← LSampler + \`λ(ξ(b)j , FLθξ(b)j , A(FLθξ(b)j |ξ(b)j )) Set $\xi _ { j + 1 } ^ { ( b ) }$ to $\mathbf { F L } _ { \theta } \boldsymbol { \xi } _ { j } ^ { ( b ) }$ with probability $A ( \mathbf { F L } _ { \theta } \xi _ { j } ^ { ( b ) } | \xi _ { j } ^ { ( b ) } )$ . $\begin{array} { r } { \begin{array} { l l } { \frac { \operatorname { c a s s a } ^ { \ast } \operatorname { s o r } } { \mathcal { L } _ { \mathrm { D e c o d e r } } } \mathcal { L } _ { \mathrm { D e c o d e r } } + \log p ( x ^ { ( b ) } | z _ { J } ^ { ( s ) } ; \phi ) } & { \qquad \mathrm { ~ s ~ W i t h ~ } \xi _ { J } ^ { ( b ) } = \{ z _ { J } ^ { ( b ) } , v _ { J } ^ { ( b ) } , d _ { J } ^ { ( b ) } \} } \end{array} } \end{array}$ end for $\begin{array} { l } { \phi \phi + \alpha _ { t } \nabla _ { \phi } \mathcal { L } _ { \mathrm { D e c o d e r } } } \\ { \psi \psi + \alpha _ { t } \nabla _ { \psi } \mathcal { L } _ { \mathrm { E L B O } } } \\ { \theta \theta + \alpha _ { t } \nabla _ { \theta } \mathcal { L } _ { \mathrm { S a m p l e r } } } \end{array}$
429
+ end for
430
+ $\begin{array} { r l } { 3 } & { 0 } & { 1 \leq 9 \leq 9 \leq 2 \leq 9 \leq 5 } \\ { 2 } & { 4 \times 1 \leq 2 \leq 3 \leq 6 } \\ { 6 } & { 5 \leq 2 \leq 3 \leq 5 } \\ { 3 } & { 6 \leq 8 \leq 7 \leq 3 \leq 4 } \\ { 4 \leq 9 \leq 4 \leq 9 \leq 4 } \\ { 7 \geq 5 \leq 5 \leq 5 \leq 2 \leq 4 \leq 6 } \\ { 0 \leq 6 \leq 1 \leq 2 \leq 2 \leq 4 \leq 6 } \\ { 3 \geq 6 \leq 8 \leq 5 \leq 4 } \end{array}$ 644又9 7 1 9 9 3 / 2 3 S 6 a a 8 7 2 4 一 6 8 9 9 4 D 4 B 7 5 3 6 9 7 7 9 2 4 6 7 0 8 7 ?6 4S q 1 1 23 3 7 9 1 972 076997 090q499 65『6630295147309 h0?b414593&84076 (a) L2HMC (b) HMC (c) VAE
431
+
432
+ networks $\{ \cdot \} _ { x }$ and $\{ \cdot \} _ { v }$ . The architecture then consists of 2 hidden layers of 200 units and ReLU non-linearities. For $\lambda$ (scale parameter of the loss), we use the standard deviation of the approximate posterior.
433
+
434
+ AIS Evaluation For each data point, we run 20 Markov Chains in parallel, 10, 000 annealing steps with 10 leapfrogs per step and choose the step size for an acceptance rate of 0.65.
435
+
436
+ # D.3 MNIST SAMPLES
437
+
438
+ We show in Figure 5 samples from the three evaluated models: VAE (Kingma & Welling, 2013), HMC-DGLM (Hoffman, 2017) and L2HMC-DGLM.
parse/train/B1n8LexRZ/B1n8LexRZ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1n8LexRZ/B1n8LexRZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1n8LexRZ/B1n8LexRZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkbY4psgg/BkbY4psgg.md ADDED
@@ -0,0 +1,623 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MAKING NEURAL PROGRAMMING ARCHITECTURES GENERALIZE VIA RECURSION
2
+
3
+ Jonathon Cai, Richard Shin, Dawn Song
4
+ Department of Computer Science
5
+ University of California, Berkeley
6
+ Berkeley, CA 94720, USA
7
+ {jonathon,ricshin,dawnsong}@cs.berkeley.edu
8
+
9
+ # ABSTRACT
10
+
11
+ Empirically, neural networks that attempt to learn programs from data have exhibited poor generalizability. Moreover, it has traditionally been difficult to reason about the behavior of these models beyond a certain level of input complexity. In order to address these issues, we propose augmenting neural architectures with a key abstraction: recursion. As an application, we implement recursion in the Neural Programmer-Interpreter framework on four tasks: grade-school addition, bubble sort, topological sort, and quicksort. We demonstrate superior generalizability and interpretability with small amounts of training data. Recursion divides the problem into smaller pieces and drastically reduces the domain of each neural network component, making it tractable to prove guarantees about the overall system’s behavior. Our experience suggests that in order for neural architectures to robustly learn program semantics, it is necessary to incorporate a concept like recursion.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Training neural networks to synthesize robust programs from a small number of examples is a challenging task. The space of possible programs is extremely large, and composing a program that performs robustly on the infinite space of possible inputs is difficult—in part because it is impractical to obtain enough training examples to easily disambiguate amongst all possible programs. Nevertheless, we would like the model to quickly learn to represent the right semantics of the underlying program from a small number of training examples, not an exhaustive number of them.
16
+
17
+ Thus far, to evaluate the efficacy of neural models on programming tasks, the only metric that has been used is generalization of expected behavior to inputs of greater complexity (Vinyals et al. (2015), Kaiser & Sutskever (2015), Reed & de Freitas (2016), Graves et al. (2016), Zaremba et al. (2016)). For example, for the addition task, the model is trained on short inputs and then tested on its ability to sum inputs with much longer numbers of digits. Empirically, existing models suffer from a common limitation—generalization becomes poor beyond a threshold level of complexity. Errors arise due to undesirable and uninterpretable dependencies and associations the architecture learns to store in some high-dimensional hidden state. This makes it difficult to reason about what the model will do when given complex inputs.
18
+
19
+ One common strategy to improve generalization is to use curriculum learning, where the model is trained on inputs of gradually increasing complexity. However, models that make use of this strategy eventually fail after a certain level of complexity (e.g. the single-digit multiplication task in Zaremba et al. (2016), the bubble sort task in Reed & de Freitas (2016), and the graph tasks in Graves et al. (2016)). In this version of curriculum learning, even though the inputs are gradually becoming more complex, the semantics of the program is succinct and does not change. Although the model is exposed to more and more data, it might learn spurious and overly complex representations of the program, as suggested in Zaremba et al. (2016). That is to say, the network does not learn the true program semantics.
20
+
21
+ In this paper, we propose to resolve these issues by explicitly incorporating recursion into neural architectures. Recursion is an important concept in programming languages and a critical tool to reduce the complexity of programs. We find that recursion makes it easier for the network to learn the right program and generalize to unknown situations. Recursion enables provable guarantees on neural programs’ behavior without needing to exhaustively enumerate all possible inputs to the programs. This paper is the first (to our knowledge) to investigate the important problem of provable generalization properties of neural programs. As an application, we incorporate recursion into the Neural Programmer-Interpreter architecture and consider four sample tasks: grade-school addition, bubble sort, topological sort, and quicksort. Empirically, we observe that the learned recursive programs solve all valid inputs with $100 \%$ accuracy after training on a very small number of examples, out-performing previous generalization results. Given verification sets that cover all the base cases and reduction rules, we can provide proofs that these learned programs generalize perfectly. This is the first time one can provide provable guarantees of perfect generalization for neural programs.
22
+
23
+ # 2 THE PROBLEM AND OUR APPROACH
24
+
25
+ # 2.1 THE PROBLEM OF GENERALIZATION
26
+
27
+ When constructing a neural network for the purpose of learning a program, there are two orthogonal aspects to consider. The first is the actual model architecture. Numerous models have been proposed for learning programs; to name a few, this includes the Differentiable Neural Computer (Graves et al., 2016), Neural Turing Machine (Graves et al., 2014), Neural GPU (Kaiser & Sutskever, 2015), Neural Programmer (Neelakantan et al., 2015), Pointer Network (Vinyals et al., 2015), Hierarchical Attentive Memory (Andrychowicz & Kurach, 2016), and Neural Random Access Machine (Kurach et al., 2016). The architecture usually possesses some form of memory, which could be internal (such as the hidden state of a recurrent neural network) or external (such as a discrete “scratch pad” or a memory block with differentiable access). The second is the training procedure, which consists of the form of the training data and the optimization process. Almost all architectures train on program input/output pairs. The only model, to our knowledge, that does not train on input-output pairs is the Neural Programmer-Interpreter (Reed & de Freitas, 2016), which trains on synthetic execution traces.
28
+
29
+ To evaluate a neural network that learns a neural program to accomplish a certain task, one common evaluation metric is how well the learned model $M$ generalizes. More specifically, when $M$ is trained on simpler inputs, such as inputs of a small length, the generalization metric evaluates how well $M$ will do on more complex inputs, such as inputs of much longer length. $M$ is considered to have perfect generalization if $M$ can give the right answer for any input, such as inputs of arbitrary length.
30
+
31
+ As mentioned in Section 1, all approaches to neural programming today fare poorly on this generalization issue. We hypothesize that the reason for this is that the neural network learns to spuriously depend on specific characteristics of the training examples that are irrelevant to the true program semantics, such as length of the training inputs, and thus fails to generalize to more complex inputs.
32
+
33
+ In addition, none of the current approaches to neural programming provide a method or even aim to enable provable guarantees about generalization. The memory updates of these neural programs are so complex and interdependent that it is difficult to reason about the behaviors of the learned neural program under previously unseen situations (such as problems with longer inputs). This is highly undesirable, since being able to provide the correct answer in all possible settings is one of the most important aspects of any learned neural program.
34
+
35
+ # 2.2 OUR APPROACH USING RECURSION
36
+
37
+ In this paper, we propose that the key abstraction of recursion is necessary for neural programs to generalize. The general notion of recursion has been an important concept in many domains, including mathematics and computer science. In computer science, recursion (as opposed to iteration) involves solving a larger problem by combining solutions to smaller instances of the same problem. Formally, a function exhibits recursive behavior when it possesses two properties: (1) Base cases— terminating scenarios that do not use recursion to produce answers; (2) A set of rules that reduces all other problems toward the base cases. Some functional programming languages go so far as not to define any looping constructs but rely solely on recursion to enable repeated execution of the same code.
38
+
39
+ In this paper, we propose that recursion is an important concept for neural programs as well. In fact, we argue that recursion is an essential element for neural programs to generalize, and makes it tractable to prove the generalization of neural programs. Recursion can be implemented differently for different neural programming models. Here as a concrete and general example, we consider a general Neural Programming Architecture (NPA), similar to Neural Programmer-Interpreter (NPI) in Reed & de Freitas (2016). In this architecture, we consider a core controller, e.g., an LSTM in NPI’s case, but possibly other networks in different cases. There is a (changing) list of neural programs used to accomplish a given task. The core controller acts as a dispatcher for the programs. At each time step, the core controller can decide to select one of the programs to call with certain arguments. When the program is called, the current context including the caller’s memory state is stored on a stack; when the program returns, the stored context is popped off the stack to resume execution in the previous caller’s context.
40
+
41
+ In this general Neural Programming Architecture, we show it is easy to support recursion. In particular, recursion can be implemented as a program calling itself. Because the context of the caller is stored on a stack when it calls another program and the callee starts in a fresh context, this enables recursion simply by allowing a program to call itself. In practice, we can additionally use tail recursion optimization to avoid problems with the call stack growing too deep. Thus, any general Neural Programming Architecture supporting such a call structure can be made to support recursion. In particular, this condition is satisfied by NPI, and thus the NPI model naturally supports recursion (even though the authors of NPI did not consider this aspect explicitly).
42
+
43
+ By nature, recursion reduces the complexity of a problem to simpler instances. Thus, recursion helps decompose a problem and makes it easier to reason about a program’s behavior for previously unseen situations such as longer inputs. In particular, given that a recursion is defined by two properties as mentioned before, the base cases and the set of reduction rules, we can prove a recursive neural program generalizes perfectly if we can prove that (1) it performs correctly on the base cases; (2) it learns the reduction rules correctly. For many problems, the base cases and reduction rules usually consist of a finite (often small) number of cases. For problems where the base cases may be extremely large or infinite, such as certain forms of motor control, recursion can still help reduce the problem of generalization to these two aspects and make the generalization problem significantly simpler to handle and reason about.
44
+
45
+ As a concrete instantiation, we show in this paper that we can enable recursive neural programs in the NPI model, and thus enable perfectly generalizable neural programs for tasks such as sorting where the original, non-recursive NPI program fails. As aforementioned, the NPI model naturally supports recursion. However, the authors of NPI did not consider explicitly the notion of recursion and as a consequence, did not learn recursive programs. We show that by modifying the training procedure, we enable the NPI model to learn recursive neural programs. As a consequence, our learned neural programs empirically achieve perfect generalization from a very small number of training examples. Furthermore, given a verification input set that covers all base cases and reduction rules, we can formally prove that the learned neural programs achieve perfect generalization after verifying its behavior on the verification input set. This is the first time one can provide provable guarantees of perfect generalization for neural programs.
46
+
47
+ We would also like to point out that in this paper, we provide as an example one way to train a recursive neural program, by providing a certain training execution trace to the NPI model. However, our concept of recursion for neural programs is general. In fact, it is one of our future directions to explore new ways to train a recursive neural program without providing explicit training execution traces or with only partial or non-recursive traces.
48
+
49
+ # 3 APPLICATION TO LEARNING RECURSIVE NEURAL PROGRAMS WITH NPI
50
+
51
+ # 3.1 BACKGROUND: NPI ARCHITECTURE
52
+
53
+ As discussed in Section 2, the Neural Programmer-Interpreter (NPI) is an instance of a Neural Programmer Architecture and hence it naturally supports recursion. In this section, we give a brief review of the NPI architecture from Reed & de Freitas (2016) as background.
54
+
55
+ We describe the details of the NPI model relevant to our contributions. We adapt machinery from the original paper slightly to fit our needs. The NPI model has three learnable components: a task-agnostic core, a program-key embedding, and domain-specific encoders that allow the NPI to operate in diverse environments.
56
+
57
+ The NPI accesses an external environment, $Q$ , which varies according to the task. The core module of the NPI is an LSTM controller that takes as input a slice of the current external environment, via a set of pointers, and a program and arguments to execute. NPI then outputs the return probability and next program and arguments to execute. Formally, the NPI is represented by the following set of equations:
58
+
59
+ $$
60
+ \begin{array} { c } { s _ { t } = f _ { e n c } ( e _ { t } , a _ { t } ) } \\ { h _ { t } = f _ { l s t m } ( s _ { t } , p _ { t } , h _ { t - 1 } ) } \\ { r _ { t } = f _ { e n d } ( h _ { t } ) , p _ { t + 1 } = f _ { p r o g } ( h _ { t } ) , a _ { t + 1 } = f _ { a r g } ( h _ { t } ) } \end{array}
61
+ $$
62
+
63
+ $t$ is a subscript denoting the time-step; $f _ { e n c }$ is a domain-specific encoder (to be described later) that takes in the environment slice $e _ { t }$ and arguments $a _ { t }$ ; $f _ { l s t m }$ represents the core module, which takes in the state $s _ { t }$ generated by $f _ { e n c }$ , a program embedding $p _ { t } \in \mathbb { R } ^ { P }$ , and hidden LSTM state $h _ { t }$ ; $f _ { e n d }$ decodes the return probability $r _ { t }$ ; $f _ { p r o g }$ decodes a program key embedding $p _ { t + 1 }$ ;1 and $f _ { a r g }$ decodes arguments $a _ { t + 1 }$ . The outputs $r _ { t } , p _ { t + 1 } , a _ { t + 1 }$ are used to determine the next action, as described in Algorithm 1. If the program is primitive, the next environmental state $e _ { t + 1 }$ will be affected by $p _ { t }$ and $a _ { t }$ , i.e. $e _ { t + 1 } \sim f _ { e n v } ( e _ { t } , p _ { t } , a _ { t } )$ . As with the original NPI architecture, the experiments for this paper always used a 3-tuple of integers $a _ { t } = ( a _ { t } ( 1 ) , \hat { a } _ { t } ( 2 ) , a _ { t } ( 3 ) )$ .
64
+
65
+ Algorithm 1 Neural programming inference
66
+
67
+ <table><tr><td>1:</td><td>Inputs: Environment observation e, program p,arguments a, stop threshold α</td></tr><tr><td>2:</td><td>function RUN(e,p, a)</td></tr><tr><td>3:</td><td>h↑0,r←0</td></tr><tr><td>4:</td><td>whiler&lt;αdo</td></tr><tr><td>5:</td><td>s ←fenc(e,a),h ←fistm(s,p,h)</td></tr><tr><td>6:</td><td>r ←fend(h),p2 ← fprog(h),a2 ← farg(h)</td></tr><tr><td>7:</td><td>if p is a primitive function then</td></tr><tr><td>8:</td><td>e ← fenv(e,p,a).</td></tr><tr><td>9:</td><td>else</td></tr><tr><td>10:</td><td>function RUN(e,P2, a2)</td></tr></table>
68
+
69
+ A description of the inference procedure is given in Algorithm 1. Each step during an execution of the program does one of three things: (1) another subprogram along with associated arguments is called, as in Line 10, (2) the program writes to the environment if it is primitive, as in Line 8, or (3) the loop is terminated if the return probability exceeds a threshold $\alpha$ , after which the stack frame is popped and control is returned to the caller. In all experiments, $\alpha$ is set to 0.5. Each time a subprogram is called, the stack depth increases.
70
+
71
+ The training data for the Neural Programmer-Interpreter consists of full execution traces for the program of interest. A single element of an execution trace consists of a step input-step output pair, which can be synthesized from Algorithm 1: this corresponds to, for a given time-step, the step input tuple $( e , p , a )$ and step output tuple $( r , p _ { 2 } , a _ { 2 } )$ . An example of part of an addition task trace, written in shorthand, is given in Figure 1. For example, a step input-step output pair in Lines 2 and 3 of the left-hand side of Figure 1 is (ADD1, WRITE OUT 1). In this pair, the step input runs a subprogram ADD1 that has no arguments, and the step output contains a program WRITE that has arguments of OUT and 1. The environment and return probability are omitted for readability. Indentation indicates the stack is one level deeper than before.
72
+
73
+ It is important to emphasize that at inference time in the NPI, the hidden state of the LSTM controller is reset (to zero) at each subprogram call, as in Line 3 of Algorithm 1 $h \mathbf { 0 }$ ). This functionality is critical for implementing recursion, since it permits us to restrict our attention to the currently relevant recursive call, ignoring irrelevant details about other contexts.
74
+
75
+ ![](images/400738f1bb6ec680e00398081df8b91a36e097048042ec5fdd599e1e2221cb5f.jpg)
76
+ Figure 1: Addition Task. The non-recursive trace loops on cycles of ADD1 and LSHIFT, whereas in the recursive version, the ADD function calls itself (bolded).
77
+
78
+ # 3.2 RECURSIVE FORMULATIONS FOR NPI PROGRAMS
79
+
80
+ We emphasize the overall goal of this work is to enable the learning of a recursive program. The learned recursive program is different from neural programs learned in all previous work in an important aspect: previous approaches do not explicitly incorporate this abstraction, and hence generalize poorly, whereas our learned neural programs incorporate recursion and achieve perfect generalization.
81
+
82
+ Since NPI naturally supports the notion of recursion, a key question is how to enable NPI to learn recursive programs. We found that changing the NPI training traces is a simple way to enable this. In particular, we construct new training traces which explicitly contain recursive elements and show that with this type of trace, NPI easily learns recursive programs. In future work, we would like to decrease supervision and construct models that are capable of coming up with recursive abstractions themselves.
83
+
84
+ In what follows, we describe the way in which we constructed NPI training traces so as to make them contain recursive elements and thus enable NPI to learn recursive programs. We describe the recursive re-formulation of traces for two tasks from the original NPI paper—grade-school addition and bubble sort. For these programs, we re-use the appropriate program sets (the associated subprograms), and we refer the reader to the appendix of Reed & de Freitas (2016) for further details on the subprograms used in addition and bubble sort. Finally, we implement recursive traces for our own topological sort and quicksort tasks.
85
+
86
+ Grade School Addition. For grade-school addition, the domain-specific encoder is
87
+
88
+ $$
89
+ \begin{array} { r } { f _ { e n c } ( Q , i _ { 1 } , i _ { 2 } , i _ { 3 } , i _ { 4 } , a _ { t } ) = M L P ( [ Q ( 1 , i _ { 1 } ) , Q ( 2 , i _ { 2 } ) , Q ( 3 , i _ { 3 } ) , Q ( 4 , i _ { 4 } ) , a _ { t } ( 1 ) , a _ { t } ( 2 ) , a _ { t } ( 3 ) ] ) , } \end{array}
90
+ $$
91
+
92
+ where the environment $Q \in \mathbb { R } ^ { 4 \times N \times K }$ is a scratch-pad that contains four rows (the first input number, the second input number, the carry bits, and the output) and $N$ columns. $K$ is set to 11, to represent the range of 10 possible digits, along with a token representing the end of input.2 At any given time, the NPI has access to values pointed to by four pointers in each of the four rows, represented by $Q ( 1 , i _ { 1 } ) , Q ( 2 , i _ { 2 } ) , Q ( 3 , i _ { 3 } )$ , and $Q ( 4 , i _ { 4 } )$ .
93
+
94
+ The non-recursive trace loops on cycles of ADD1 and LSHIFT. ADD1 is a subprogram that adds the current column (writing the appropriate digit to the output row and carrying a bit to the next column if needed). LSHIFT moves the four pointers to the left, to move to the next column. The program terminates when seeing no numbers in the current column.
95
+
96
+ Figure 1 shows examples of non-recursive and recursive addition traces. We make the trace recursive by adding a tail recursive call into the trace for the ADD program after calling ADD1 and LSHIFT,
97
+
98
+ # Full Recursive
99
+
100
+ ![](images/54ac005719045e00f6d938466b5b91cbc2d9b186869b92dd8c3b93eb2423cdb1.jpg)
101
+ Figure 2: Bubble Sort Task. The non-recursive trace loops on cycles of BUBBLE and RESET. The difference between the partial recursive and full recursive versions is in the indentation of Lines 10-15 and 20-22 (bolded), since in the full recursive version, BSTEP and LSHIFT are made tail recursive; the final calls to BSTEP and LSHIFT return immediately as they occur after the pointer reaches the end of the array. Also note that COMPSWAP conditionally swaps numbers under the bubble pointers.
102
+
103
+ as in Line 13 of the right-hand side of Figure 1. Via the recursive call, we effectively forget that the column just added exists, since the recursive call to ADD starts with a new hidden state for the LSTM controller. Consequently, there is no concept of length relevant to the problem, which has traditionally been an important focus of length-based curriculum learning.
104
+
105
+ Bubble Sort. For bubble sort, the domain-specific encoder is
106
+
107
+ $$
108
+ f _ { e n c } ( Q , i _ { 1 } , i _ { 2 } , i _ { 3 } , a _ { t } ) = M L P ( [ Q ( 1 , i _ { 1 } ) , Q ( 1 , i _ { 2 } ) , i _ { 3 } = l e n g t h , a _ { t } ( 1 ) , a _ { t } ( 2 ) , a _ { t } ( 3 ) ] ) ,
109
+ $$
110
+
111
+ where the environment $Q \in \mathbb { R } ^ { 1 \times N \times K }$ is a scratch-pad that contains 1 row, to represent the state of the array as sorting proceeds in-place, and $N$ columns. $K$ is set to 11, to denote the range of possible numbers (0 through 9), along with the start/end token (represented with the same encoding) which is observed when a pointer reaches beyond the bounds of the input. At any given time, the NPI has access to the values referred to by two pointers, represented by $Q ( 1 , i _ { 1 } )$ and $Q ( 1 , i _ { 2 } )$ ,. The pointers at index $i _ { 1 }$ and $i _ { 2 }$ are used to compare the pair of numbers considered during the bubble sweep, swapping them if the number at $i _ { 1 }$ is greater than that in $i _ { 2 }$ . These pointers are referred to as bubble pointers. The pointer at index $i _ { 3 }$ represents a counter internal to the environment that is incremented once after each pass of the algorithm (one cycle of BUBBLE and RESET); when incremented a number of times equal to the length of the array, the flag $i _ { 3 } = =$ length becomes true and terminates the entire algorithm .
112
+
113
+ The non-recursive trace loops on cycles of BUBBLE and RESET, which logically represents one bubble sweep through the array and reset of the two bubble pointers to the very beginning of the array, respectively. In this version, there is a dependence on length: BSTEP and LSHIFT are called a number of times equivalent to one less than the length of the input array, in BUBBLE and RESET respectively.
114
+
115
+ Inside BUBBLE and RESET, there are two operations that can be made recursive. BSTEP, used in BUBBLE, compares pairs of numbers, continuously moving the bubble pointers once to the right each time until reaching the end of the array. LSHIFT, used in RESET, shifts the pointers left until reaching the start token.
116
+
117
+ We experiment with two levels of recursion—partial and full. Partial recursion only adds a tail recursive call to BUBBLESORT after BUBBLE and RESET, similar to the tail recursive call described previously for addition. The partial recursion is not enough for perfect generalization, as will be presented later in Section 4. Full recursion, in addition to making the aforementioned tail recursive call, adds two additional recursive calls; BSTEP and LSHIFT are made tail recursive. Figure 2 shows examples of traces for the different versions of bubble sort. Training on the full recursive trace leads to perfect generalization, as shown in Section 4. We performed experiments on the partially recursive version in order to examine what happens when only one recursive call is implemented, when in reality three are required for perfect generalization.
118
+
119
+ # Algorithm 2 Depth First Search Topological Sort
120
+
121
+ 1: Color all vertices white.
122
+ 2: Initialize an empty stack $S$ and a directed acyclic graph $D A G$ to traverse. 3: Begin traversing from Vertex 1 in the DAG. 4: function TOPOSORT $( D A G )$ 5: while there is still a white vertex $u$ : do 6: color[u] = grey 7: $v _ { a c t i v e } = u$ 8: do
123
+ 9: if $v _ { a c t i v e }$ has a white child $v$ then
124
+ 10: $\operatorname { c o l o r } [ v ] = \operatorname { g r e y }$
125
+ 11: push $v _ { a c t i v e }$ onto $S$
126
+ 12: $v _ { a c t i v e } = v$
127
+ 13: else
128
+ 14: $\mathrm { c o l o r } [ v _ { a c t i v e } ] = \mathrm { b l a c k }$
129
+ 15: Write $v _ { a c t i v e }$ to result
130
+ 16: if $S$ is empty then pass
131
+ 17: else pop the top vertex off $S$ and set it to $v _ { a c t i v e }$
132
+ 18: while $S$ is not empty
133
+
134
+ Topological Sort. We choose to implement a topological sort task for graphs. A topological sort is a linear ordering of vertices such that for every directed edge $( u , v )$ from $u$ to $v , u$ comes before $v$ in the ordering. This is possible if and only if the graph has no directed cycles; that is to say, it must be a directed acyclic graph (DAG). In our experiments, we only present DAG’s as inputs and represent the vertices as values ranging from $1 , \ldots , n$ , where the DAG contains $n$ vertices.
135
+
136
+ Directed acyclic graphs are structurally more diverse than inputs in the two tasks of grade-school addition and bubble sort. The degree for any vertex in the DAG is variable. Also the DAG can have potentially more than one connected component, meaning it is necessary to transition between these components appropriately.
137
+
138
+ Algorithm 2 shows the topological sort task of interest. This algorithm is a variant of depth first search. We created a program set that reflects the semantics of Algorithm 2. For brevity, we refer the reader to the appendix for further details on the program set and non-recursive and recursive trace-generating functions used for topological sort.
139
+
140
+ For topological sort, the domain-specific encoder is
141
+
142
+ $$
143
+ \begin{array} { r l } & { \ f _ { e n c } ( D A G , Q _ { c o l o r } , p _ { s t a c k } , p _ { s t a r t } , v _ { a c t i v e } , c h i l d L i s t , a _ { t } ) } \\ & { = M L P ( [ Q _ { c o l o r } ( p _ { s t a r t } ) , Q _ { c o l o r } ( D A G [ v _ { a c t i v e } ] [ c h i l d L i s t [ v _ { a c t i v e } ] ] ) , p _ { s t a c k } = = 1 , a _ { t } ( 1 ) , a _ { t } ( 2 ) , a _ { t } ( 3 ) , a _ { t } ) } \end{array}
144
+ $$
145
+
146
+ where $Q _ { c o l o r } \in \mathbb { R } ^ { U \times 4 }$ is a scratch-pad that contains $U$ rows, each containing one of four colors (white, gray, black, invalid) with one-hot encoding. $U$ varies with the number of vertices in the graph. We further have $Q _ { r e s u l t } \in \mathbb { N } ^ { U }$ , a scratch-pad which contains the sorted list of vertices at the end of execution, and $Q _ { s t a c k } \in \mathbb { N } ^ { U }$ , which serves the role of the stack $S$ in Algorithm 2. The contents of $Q _ { r e s u l t }$ and $Q _ { s t a c k }$ are not exposed directly through the domain-specific encoder; rather, we define primitive functions which manipulate these scratch-pads.
147
+
148
+ The DAG is represented as an adjacency list where $D A G [ i ] [ j ]$ refers to the $j$ -th child of vertex $i$ . There are 3 pointers $( p _ { r e s u l t } , p _ { s t a c k } , p _ { s t a r t } )$ , $p _ { r e s u l t }$ points to the next empty location in $Q _ { r e s u l t }$ $p _ { s t a c k }$ points to the top of the stack in $Q _ { s t a c k }$ , and $p _ { s t a r t }$ points to the candidate starting node for a connected component. There are 2 variables ( $\boldsymbol { v } _ { a c t i v e }$ and $v _ { s a v e . }$ ); $v _ { a c t i v e }$ holds the active vertex (as in Algorithm 2) and $v _ { s a v e }$ holds the value of $v _ { a c t i v e }$ before executing Line 12 of Algorithm 2. $c h i l d L i s t \in \mathbb { N } ^ { U }$ is a vector of pointers, where childList[i] points to the next child under consideration for vertex $i$ .
149
+
150
+ The three environment observations aid with control flow in Algorithm 2. $Q _ { c o l o r } ( p _ { s t a r t } )$ contains the color of the current start vertex, used in the evaluation of the condition in the WHILE loop in Line 5 of Algorithm 2. $Q _ { c o l o r } ( D A G [ v _ { a c t i v e } ] [ c h i l d L i s t [ v _ { a c t i v e } ] ] )$ refers to the color of the next child of $v _ { a c t i v e }$ , used in the evaluation of the condition in the IF branch in Line 9 of Algorithm 2. Finally, the boolean $p _ { s t a c k } = = 1$ is used to check whether the stack is empty in Line 18 of Algorithm 2.
151
+
152
+ An alternative way of representing the environment slice is to expose the values of the absolute vertices to the model; however, this makes it difficult to scale the model to larger graphs, since large vertex values are not seen during training time.
153
+
154
+ We refer the reader to the appendix for the non-recursive trace generating functions. In the non-recursive trace, there are four functions that can be made recursive—TOPOSORT, CHECK CHILD, EXPLORE, and NEXT START, and we add a tail recursive call to each of these functions in order to make the recursive trace. In particular, in the EXPLORE function, adding a tail recursive call resets and stores the hidden states associated with vertices in a stack-like fashion. This makes it so that we only need to consider the vertices in the subgraph that are currently relevant for computing the sort, allowing simpler reasoning about behavior for large graphs. The sequence of primitive operations (MOVE and WRITE operations) for the non-recursive and recursive versions are exactly the same.
155
+
156
+ Quicksort. We implement a quicksort task, in order to demonstrate that recursion helps with learning divide-and-conquer algorithms. We use the Lomuto partition scheme; the logic for the recursive trace is shown in Algorithm 3. For brevity, we refer the reader to the appendix for information about the program set and non-recursive and recursive trace-generating functions for quicksort. The logic for the non-recursive trace is shown in Algorithm 4 in the appendix.
157
+
158
+ # Algorithm 3 Recursive Quicksort
159
+
160
+ 1: Initialize an array $A$ to sort.
161
+ 2: Initialize $l o$ and $h i$ to be 1 and $n$ , where $n$ is the length of $A$ .
162
+ 3:
163
+ 4: function QUICKSORT $( A , l o , h i )$
164
+ 5: if $l o < h i$ : then
165
+ 6: $\mathsf { p } = \mathsf { P A R T I T I O N } ( A , l o , h i )$
166
+ 7: $\mathrm { Q U I C K S O R T } ( A , l o , p - 1 )$
167
+ 8: $\operatorname { Q U I C K S O R T } ( A , p + 1 , h i )$
168
+ 9:
169
+ 10: function PARTITION $( A , l o , h i )$
170
+ 11: $p i v o t = l o$
171
+ 12: for $j \in [ l o , h i - 1 ] : \mathbf { d o }$
172
+ 13: if $A [ j ] \leq A [ h i ]$ then
173
+ 14: swap A[pivot] with $A [ j ]$
174
+ 15: pivot = pivot + 1
175
+ 16: swap A[pivot] with A[hi]
176
+ 17: return pivot
177
+
178
+ For quicksort, the domain-specific encoder is
179
+
180
+ $$
181
+ \begin{array} { r l } & { f _ { e n c } ( Q _ { a r r a y } , Q _ { s t a c k L o } , Q _ { s t a c k H i } , p _ { l o } , p _ { h i } , p _ { s t a c k L o } , p _ { s t a c k H i } , p _ { p i v o t } , p _ { j } , a _ { t } ) = } \\ & { \qquad M L P ( [ Q _ { a r r a y } ( p _ { j } ) \leq Q _ { a r r a y } ( p _ { h i } ) , p _ { j } = = p _ { h i } , } \\ & { \qquad Q _ { s t a c k L o } ( p _ { s t a c k L o } - 1 ) < Q _ { s t a c k H i } ( p _ { s t a c k H i } - 1 ) , p _ { s t a c k L o } = = } \\ & { \qquad \quad M L P ( [ Q _ { a r r a y } ( p _ { j } ) \leq \mathfrak { a } _ { t } ( 2 ) , a _ { t } ( 3 ) ] ) , } \end{array}
182
+ $$
183
+
184
+ where $Q _ { a r r a y } \in \mathbb { R } ^ { U \times 1 1 }$ is a scratch-pad that contains $U$ rows, each containing one of 11 values (one of the numbers 0 through 9 or an invalid state). Our implementation uses two stacks $Q _ { s t a c k L o }$ and
185
+
186
+ $Q _ { s t a c k H i }$ , each in $\mathbb { R } ^ { U }$ , that store the arguments to the recursive QUICKSORT calls in Algorithm 3; before each recursive call, the appropriate arguments are popped off the stack and written to $p _ { l o }$ and $p _ { h i }$ .
187
+
188
+ There are 6 pointers $( p _ { l o } , p _ { h i } , p _ { s t a c k L o } , p _ { s t a c k H i } , p _ { p i v o t } , p _ { j } )$ . $p _ { l o }$ and $p _ { h i }$ point to the lo and hi indices of the array, as in Algorithm 3. $p _ { s t a c k L o }$ and $p _ { s t a c k H i }$ point to the top (empty) positions in $Q _ { s t a c k L o }$ and $Q _ { s t a c k H i }$ . $p _ { p i v o t }$ and $p _ { j }$ point to the pivot and $j$ indices of the array, used in the PARTITION function in Algorithm 3. The 4 environment observations aid with control flow; $Q _ { s t a c k L o } ( p _ { s t a c k L o } - 1 ) < Q _ { s t a c k H i } ( p _ { s t a c k H i } - 1 )$ implements the $l o < h i$ comparison in Line 5 of Algorithm 3, $p _ { s t a c k L o } = = 1$ checks if the stacks are empty in Line 18 of Algorithm 4, and the other observations (all involving $p _ { p i v o t }$ or $p _ { j }$ ) deal with logic in the PARTITION function.
189
+
190
+ Note that the recursion for quicksort is not purely tail recursive and therefore represents a more complex kind of recursion that is harder to learn than in the previous tasks. Also, compared to the bubble pointers in bubble sort, the pointers that perform the comparison for quicksort (the COMPSWAP function) are usually not adjacent to each other, making quicksort less local than bubble sort. In order to compensate for this, $p _ { p i v o t }$ and $p _ { j }$ require special functions (MOVE PIVOT LO and MOVE J LO) to properly set them to $l o$ in Lines 11 and 12 of the PARTITION function in Algorithm 3.
191
+
192
+ # 3.3 PROVABLY PERFECT GENERALIZATION
193
+
194
+ We show that if we incorporate recursion, the learned NPI programs can achieve provably perfect generalization for different tasks. Provably perfect generalization implies the model will behave correctly, given any valid input. In order to claim a proof, we must verify the model produces correct behavior over all base cases and reductions, as described in Section 2.
195
+
196
+ We propose and describe our verification procedure. This procedure verifies that all base cases and reductions are handled properly by the model via explicit tests. Note that recursion helps make this process tractable, because we only need to test a finite number of inputs to show that the model will work correctly on inputs of unbounded complexity. This verification phase only needs to be performed once after training.
197
+
198
+ Formally, verification consists of proving the following theorem:
199
+
200
+ $$
201
+ \forall i \in V , M ( i ) \downdownarrows P ( i )
202
+ $$
203
+
204
+ where $i$ denotes a sequence of step inputs (within one function call), $V$ denotes the set of valid sequences of step inputs, $M$ denotes the neural network model, $P$ denotes the correct program, and $P ( i )$ denotes the next step output from the correct program. The arrow in the theorem refers to evaluation, as in big-step semantics. The theorem states that for the same sequence of step inputs, the model produces the exact same step output as the target program it aims to learn. $M$ , as described in Algorithm 1, processes the sequence of step inputs by using an LSTM.
205
+
206
+ Recursion drastically reduces the number of configurations we need to consider during the verification phase and makes the proof tractable, because it introduces structure that eliminates infinitely long sequences of step inputs that would otherwise need to be considered. For instance, for recursive addition, consider the family $F$ of addition problems $a _ { n } a _ { n - 1 } \dots a _ { 1 } a _ { 0 } + b _ { n } b _ { n - 1 } \dots b _ { 1 } b _ { 0 }$ where no CARRY operations occur. We prove every member of $F$ is added properly, given that subproblems $S = \{ a _ { n } a _ { n - 1 } + b _ { n } b _ { n - 1 } , a _ { n - 1 } { \bar { a } } _ { n - 2 } + b _ { n - 1 } b _ { n - 2 } , \dots , a _ { 1 } a _ { 0 } + b _ { 1 } b _ { 0 } \}$ are added properly.
207
+
208
+ Without using a recursive program, such a proof is not possible, because the non-recursive program runs on an arbitrarily long addition problem that creates correspondingly long sequences of step inputs; in the non-recursive formulation of addition, ADD calls ADD1 a number of times that is dependent on the length of the input. The core LSTM module’s hidden state is preserved over all these ADD1 calls, and it is difficult to interpret with certainty what happens over longer timesteps without concretely evaluating the LSTM with an input of that length. In contrast, each call to the recursive ADD always runs for a fixed number of steps, even on arbitrarily long problems in $F$ , so we can test that it performs correctly on a small, fixed number of step input sequences. This guarantees that the step input sequences considered during verification contain all step input sequences which arise during execution of an unseen problem in $F$ , leading to generalization to any problem in $F$ . Hence, if all subproblems in $S$ are added correctly, we have proven that any member of $F$ will be added correctly, thus eliminating an infinite family of inputs that need to be tested.
209
+
210
+ To perform the verification as described here, it is critical to construct $V$ correctly. If it is too small, then execution of the program on some input might require evaluation of $M ( i )$ on some $i \not \in V$ , and so the behavior of $M ( i )$ might deviate from $P ( i )$ . If it is too large, then the semantics of $P$ might not be well-defined on some elements in $V$ , or the spurious step input sequences may not be reachable from any valid problem input (e.g., an array for quicksort or a DAG for topological sort).
211
+
212
+ To construct this set, by using the reference implementation of each subprogram, we construct a mapping between two sets of environment observations: the first set consists of all observations that can occur at the beginning of a particular subprogram’s invocation, and the second set contains the observations at the end of that subprogram. We can obtain this mapping by first considering the possible observations that can arise at the beginning of the entry function (ADD, BUBBLESORT, TOPOSORT, and QUICKSORT) for some valid program input, and iteratively applying the observation-to-observation mapping implied by the reference implementation’s step output at that point in the execution. If the step output specifies a primitive function call, we need to reason about how it can affect the environment so as to change the observation in the next step input. For non-primitive subprograms, we can update the observation-to-observation mapping currently associated with the subprogram and then apply that mapping to the current set. By iterating with this procedure, and then running $P$ on the input observation set that we obtain for the entry point function, we can obtain $V$ precisely. To make an analogy to MDPs, this procedure is analogous to how value iteration obtains the correct value for each state starting from any initialization.
213
+
214
+ An alternative method is to run $P$ on many different program inputs and then observe step input sequences which occur, to create $V$ . However, to be sure that the generated $V$ is complete (covers all the cases needed), we need to check all pairs of observations seen in adjacent step inputs (in particular, those before and after a primitive function call), in a similar way as if we were constructing $V$ from scratch. Given a precise definition of $P$ , it may be possible to automate the generation of $V$ from $P$ in future work.
215
+
216
+ Note that $V$ should also contain the necessary reductions, which corresponds to making the recursive calls at the correct time, as indicated by $P$ .
217
+
218
+ After finding $V$ , we construct a set of problem inputs which, when executed on $P$ , create exactly the step input sequences which make up $V$ . We call this set of inputs the verification set, $S _ { V }$ .
219
+
220
+ Given a verification set, we can then run the model on the verification set to check if the produced traces and results are correct. If yes, then this indicates that the learned neural program achieves provably perfect generalization.
221
+
222
+ We note that for tasks with very large input domains, such as ones involving MNIST digits or speech samples, the state space of base cases and reduction rules could be prohibitively large, possibly infinite. Consequently, it is infeasible to construct a verification set that covers all cases, and the verification procedure we have described is inadequate. We leave this as future work to devise a verification procedure more appropriate to this setting.
223
+
224
+ # 4 EXPERIMENTS
225
+
226
+ As there is no public implementation of NPI, we implemented a version of it in Keras that is as faithful to the paper as possible. Our experiments use a small number of training examples.
227
+
228
+ Training Setup. The training set for addition contains 200 traces. The maximum problem length in this training set is 3 (e.g., the trace corresponding to the problem $^ { \mathrm { \left. } } 1 0 9 + 1 0 1 ^ { \mathrm { \right. } }$ ).
229
+
230
+ The training set for bubble sort contains 100 traces, with maximum problem length of 2 (e.g., the trace corresponding to the array [3,2]).
231
+
232
+ The training set for topological sort contains 6 traces, with one synthesized from a graph of size 5 and the rest synthesized from graphs of size 7.
233
+
234
+ The training set for quicksort contains 4 traces, synthesized from arrays of length 5.
235
+
236
+ The same set of problems was used to generate the training traces for all formulations of the task, for non-recursive and recursive versions.
237
+
238
+ Table 1: Accuracy on Randomly Generated Problems for Bubble Sort
239
+
240
+ <table><tr><td>Length of Array</td><td>Non-Recursive</td><td>PartiallyRecursive</td><td>FullRecursive</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>23</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>6.7%</td><td>23%</td><td>100%</td></tr><tr><td>4</td><td>10%</td><td>10%</td><td>100%</td></tr><tr><td>8</td><td>0% 0%</td><td>0% 0%</td><td>100% 100%</td></tr><tr><td>20</td><td></td><td></td><td>100%</td></tr><tr><td>90</td><td>0%</td><td>0%</td><td></td></tr></table>
241
+
242
+ We train using the Adam optimizer and use a 2-layer LSTM and task-specific state encoders for the external environments, as described in Reed & de Freitas (2016).
243
+
244
+ 4.1 RESULTS ON GENERALIZATION OF RECURSIVE NEURAL PROGRAMS
245
+
246
+ We now report on generalization for the varying tasks.
247
+
248
+ Grade-School Addition. Both the non-recursive and recursive learned programs generalize on all input lengths we tried, up to 5000 digits. This agrees with the generalization of non-recursive addition in Reed & de Freitas (2016), where they reported generalization up to 3000 digits. However, note that there is no provable guarantee that the non-recursive learned program will generalize to all inputs, whereas we show later that the recursive learned program has a provable guarantee of perfect generalization.
249
+
250
+ In order to demonstrate that recursion can help learn and generalize better, for addition, we trained only on traces for 5 arbitrarily chosen 1-digit addition sum examples. The recursive version can generalize perfectly to long problems constructed from these components (such as the sum $^ { 6 6 } 8 2 2 + 2 3 3 ^ { 3 }$ , where $\because 8 + 2 ^ { , 5 }$ and $\bar { 2 } + 3 \bar { 2 }$ are in the training set), but the non-recursive version fails to sum these long problems properly.
251
+
252
+ Bubble Sort. Table 1 presents results on randomly generated arrays of varying length for the learned non-recursive, partially recursive, and full recursive programs. For each length, we test each program on 30 randomly generated problems. Observe that partially recursive does slightly better than non-recursive for the setting in which the length of the array is 3, and that the fully recursive version is able to sort every array given to it. The non-recursive and partially recursive versions are unable to sort long arrays, beyond length 8.
253
+
254
+ Topological Sort. Both the non-recursive and recursive learned programs generalize on all graphs we tried, up to 120 vertices. As before, the non-recursive learned program lacks a provable guarantee of generalization, whereas we show later that the recursive learned program has one.
255
+
256
+ In order to demonstrate that recursion can help learn and generalize better, we trained a non-recursive and recursive model on just a single execution trace generated from a graph containing 5 nodes3 for the topological sort task. For these models, Table 2 presents results on randomly generated DAGs of varying graph sizes (varying in the number of vertices). For each graph size, we test the learned programs on 30 randomly generated DAGs. The recursive version of topological sort solves all graph instances we tried, from graphs of size 5 through 70. On the other hand, the non-recursive version has low accuracy, beginning from size 5, and fails completely for graphs of size 8 and beyond.
257
+
258
+ Quicksort. Table 3 presents results on randomly generated arrays of varying length for the learned non-recursive and recursive programs. For each length, we test each program on 30 randomly generated problems. Observe that the non-recursive program’s correctness degrades for length 11 and beyond, while the recursive program can sort any given array.
259
+
260
+ Table 2: Accuracy on Randomly Generated Problems for Topological Sort
261
+
262
+ <table><tr><td>NumberofVertices</td><td>Non-Recursive</td><td>Recursive</td></tr><tr><td></td><td></td><td></td></tr><tr><td>5</td><td>6.7%</td><td>100%</td></tr><tr><td>6</td><td>6.7%</td><td>100%</td></tr><tr><td>7</td><td>3.3%</td><td>100%</td></tr><tr><td>8</td><td>0%</td><td>100%</td></tr><tr><td>70</td><td>0%</td><td>100%</td></tr></table>
263
+
264
+ Table 3: Accuracy on Randomly Generated Problems for Quicksort
265
+
266
+ <table><tr><td>LengthofArray</td><td>Non-Recursive</td><td>Recursive</td></tr><tr><td>3</td><td>100%</td><td>100%</td></tr><tr><td>5</td><td>100%</td><td>100%</td></tr><tr><td>7</td><td>100%</td><td>100%</td></tr><tr><td>11</td><td>73.3%</td><td>100%</td></tr><tr><td>15</td><td>60%</td><td>100%</td></tr><tr><td>20</td><td>30%</td><td></td></tr><tr><td>22</td><td>20%</td><td>100%</td></tr><tr><td>25</td><td>3.33%</td><td>100%</td></tr><tr><td>30</td><td>3.33%</td><td>100%</td></tr><tr><td></td><td></td><td>100%</td></tr><tr><td>70</td><td>0%</td><td>100%</td></tr></table>
267
+
268
+ As mentioned in Section 2.1, we hypothesize the non-recursive programs do not generalize well because they have learned spurious dependencies specific to the training set, such as length of the input problems. On the other hand, the recursive programs have learned the true program semantics.
269
+
270
+ # 4.2 VERIFICATION OF PROVABLY PERFECT GENERALIZATION
271
+
272
+ We describe how models trained with recursive traces can be proven to generalize, by using the verification procedure described in Section 3.3. As described in the verification procedure, it is possible to prove our learned recursive program generalizes perfectly by testing on an appropriate set of problem inputs, i.e., the verification set. Recall that this verification procedure cannot be performed for the non-recursive versions, since the propagation of the hidden state in the core LSTM module makes reasoning difficult and so we would need to check an unbounded number of examples.
273
+
274
+ We describe the base cases, reduction rules, and the verification set for each task in Appendix A.6. For each task, given the verification set, we check the traces and results of the learned, to-be-verified neural program (described in Section 4.1; and for bubble sort, Appendix A.6) on the verification set, and ensure they match the traces produced by the true program $P$ . Our results show that for all learned, to-be-verified neural programs, they all produced the same traces as those produced by $P$ on the verification set. Thus, we demonstrate that recursion enables provably perfect generalization for different tasks, including addition, topological sort, quicksort, and a variant of bubble sort.
275
+
276
+ Note that the training set can often be considerably smaller than the verification set, and despite this, the learned model can still pass the entire verification set. Our result shows that the training procedure and the NPI architecture is capable of generalizing from the step input-output pairs seen in the training data to the unseen ones present in the verification set.
277
+
278
+ # 5 CONCLUSION
279
+
280
+ We emphasize that the notion of a neural recursive program has not been presented in the literature before: this is our main contribution. Recursion enables provably perfect generalization. To the best of our knowledge, this is the first time verification has been applied to a neural program, providing provable guarantees about its behavior. We instantiated recursion for the Neural ProgrammerInterpreter by changing the training traces. In future work, we seek to enable more tasks with recursive structure. We also hope to decrease supervision, for example by training with only partial or non-recursive traces, and to develop novel Neural Programming Architectures integrated directly with a notion of recursion.
281
+
282
+ # ACKNOWLEDGMENTS
283
+
284
+ This material is in part based upon work supported by the National Science Foundation under Grant No. TWC-1409915, DARPA under Grant No. FA8750-15-2-0104, and Berkeley Deep Drive. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of National Science Foundation and DARPA.
285
+
286
+ # REFERENCES
287
+
288
+ Marcin Andrychowicz and Karol Kurach. Learning efficient algorithms with hierarchical attentive memory. CoRR, abs/1602.03218, 2016. URL http://arxiv.org/abs/1602.03218.
289
+
290
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. URL http://arxiv.org/abs/1410.5401.
291
+
292
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwiska, Sergio Gmez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, Adri Puigdomnech Badia, Karl Moritz Hermann, Yori Zwols, Georg Ostrovski, Adam Cain, Helen King, Christopher Summerfield, Phil Blunsom, Koray Kavukcuoglu, and Demis Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471–476, October 2016. ISSN 0028-0836, 1476-4687. doi: 10.1038/nature20101. URL http://www.nature.com/doifinder/10.1038/nature20101.
293
+
294
+ Lukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. CoRR, abs/1511.08228, 2015. URL http://arxiv.org/abs/1511.08228.
295
+
296
+ Karol Kurach, Marcin Andrychowicz, and Ilya Sutskever. Neural random access machines. ERCIM News, 2016(107), 2016. URL http://ercim-news.ercim.eu/en107/special/ neural-random-access-machines.
297
+
298
+ Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent, 2015.
299
+
300
+ Scott Reed and Nando de Freitas. Neural programmer-interpreters. ICLR, 2016.
301
+
302
+ Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2692–2700, 2015. URL http://papers.nips.cc/paper/5866-pointer-networks.
303
+
304
+ Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016, pp. 421–429, 2016. URL http://jmlr. org/proceedings/papers/v48/zaremba16.html.
305
+
306
+ A APPENDIX
307
+
308
+ A.1 PROGRAM SET FOR NON-RECURSIVE TOPOLOGICAL SORT
309
+
310
+ <table><tr><td rowspan=1 colspan=1>Program</td><td rowspan=1 colspan=1>Descriptions</td><td rowspan=1 colspan=1>Calls</td><td rowspan=1 colspan=1>Arguments</td></tr><tr><td rowspan=1 colspan=1>TOPOSORT</td><td rowspan=1 colspan=1>Perform topologicalsort on graph</td><td rowspan=1 colspan=1>TRAVERSE,NEXT_START,WRITE,MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>TRAVERSE</td><td rowspan=1 colspan=1>Traverse graph untilstack is empty</td><td rowspan=1 colspan=1>CHECK_CHILD,EX-PLORE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>CHECK_CHILD</td><td rowspan=1 colspan=1>Check ifawhitechild exists; if so, setchildList[Uactive] topoint to it</td><td rowspan=1 colspan=1>MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>EXPLORE</td><td rowspan=1 colspan=1>Repeatedlytraversesubgraphs until stackis empty</td><td rowspan=1 colspan=1>STACK,CHECK_CHILD,WRITE,MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>STACK</td><td rowspan=1 colspan=1>Interactwith stack,either pushing orpopping</td><td rowspan=1 colspan=1>WRITE,MOVE</td><td rowspan=1 colspan=1>PUSH,POP</td></tr><tr><td rowspan=1 colspan=1>NEXT_START</td><td rowspan=1 colspan=1>Move Pstart untilreaching a whitevertex. If a whitevertex is found,setPstart to point to it;this signifies the startof a traversal of anew connected com-ponent.If no whitevertex is found, theentireexecution isterminated</td><td rowspan=1 colspan=1>MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>WRITE</td><td rowspan=1 colspan=1>Write a value eitherto environment (e.g.,to color a vertex)or variable (e.g., tochange the value ofUactive)</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>Described below</td></tr><tr><td rowspan=1 colspan=1>MOVE</td><td rowspan=1 colspan=1>Move a pointer(e.g, Pstart orchildList[vactive])up or down</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>Described below</td></tr></table>
311
+
312
+ # Argument Sets for WRITE and MOVE.
313
+
314
+ WRITE. The WRITE operation has the following arguments:
315
+
316
+ # ARG 1 (Main Action): COLOR CURR, COLOR NEXT, ACTIVE START, ACTIVE NEIGHB, ACTIVE STACK, SAVE, STACK PUSH, STACK POP, RESULT
317
+
318
+ COLOR CURR colors $v _ { a c t i v e }$ , COLOR NEXT colors Vertex $D A G [ v _ { a c t i v e } ] [ c h i l d L i s t [ v _ { a c t i v e } ] ] ,$ , ACTIVE START writes pstart to $v _ { a c t i v e }$ , ACTIVE NEIGHB writes $D A G [ v _ { a c t i v e } ] [ c h i l d L i s t [ v _ { a c t i v e } ] ]$ to $v _ { a c t i v e }$ , ACTIVE STACK writes $Q _ { s t a c k } ( p _ { s t a c k } )$ to $v _ { a c t i v e }$ , SAVE writes $v _ { a c t i v e }$ to $v _ { s a v e }$ , $S T A C K \_ P U S H$ pushes $v _ { a c t i v e }$ to the top of the stack, $S T A C K \_ P O P$ writes a null value to the top of the stack, and $R E S U L T$ writes $v _ { a c t i v e }$ to $Q _ { r e s u l t } ( p _ { r e s u l t } )$ .
319
+
320
+ ARG 2 (Auxiliary Variable): COLOR GREY, COLOR BLACK
321
+
322
+ COLOR GREY and COLOR BLACK color the given vertex grey and black, respectively.
323
+
324
+ MOVE. The MOVE operation has the following arguments:
325
+
326
+ ARG 1 (Pointer): $p _ { r e s u l t } , p _ { s t a c k } , p _ { s t a r t } , c h i l d L i s t [ v _ { a c t i v e } ] , c h i l d L i s t [ v _ { s a v e } ]$
327
+
328
+ Note that the argument is the identity of the pointer, not what the pointer points to; in other words, ARG 1 can only take one of 5 values.
329
+
330
+ ARG 2 (Increment or Decrement): UP, DOWN
331
+
332
+ # A.2 TRACE-GENERATING FUNCTIONS FOR TOPOLOGICAL SORT
333
+
334
+ # A.2.1 NON-RECURSIVE TRACE-GENERATING FUNCTIONS
335
+
336
+ 1 // Top level topological sort call
337
+ 2 TOPOSORT() {
338
+ 3 while $( Q _ { c o l o r } \big ( p _ { s t a r t } \big )$ is a valid color): // color invalid when all vertices explored
339
+ 4 WRITE(ACTIVE_START)
340
+ 5 WRITE(COLOR_CURR, COLOR_GREY)
341
+ 6 TRAVERSE()
342
+ 7 MOVE(pstart, UP)
343
+ 8 NEXT_START()
344
+ 9 }
345
+ 10
346
+ 11 TRAVERSE() {
347
+ 12 CHECK_CHILD()
348
+ 13 EXPLORE()
349
+ 14 }
350
+ 15
351
+ 16 CHECK_CHILD() {
352
+ 17 while $( Q _ { c o l o r } \big ( D A G \big [ v _ { a c t i v e } \big ] \big [ c h i l d L i s t \big [ v _ { a c t i v e } \big ] \big ] \big )$ is not white and is not invalid): // color invalid when all children explored
353
+ 18 MOVE(childList[vactive], UP)
354
+ 19 }
355
+ 20
356
+ 21 EXPLORE() {
357
+ 22 do
358
+ 23 if (Qcolor(DAG[vactive][childList[vactive]]) is white):
359
+ 24 WRITE(COLOR_NEXT, COLOR_GREY)
360
+ 25 STACK(PUSH)
361
+ 26 WRITE(SAVE)
362
+ 27 WRITE(ACTIVE_NEIGHB)
363
+ 28 MOVE(childList[vsave], UP)
364
+ 29 else:
365
+ 30 WRITE(COLOR_CURR, COLOR_BLACK)
366
+ 31 WRITE(RESULT)
367
+ 32 MOVE(presult, UP)
368
+ 33 if(pstack == 1):
369
+ 34 break
370
+ 35 else:
371
+ 36 STACK(POP)
372
+ 37 CHECK_CHILD()
373
+ 38 while (true)
374
+ 39
375
+ 40
376
+ 41 STACK(op) {
377
+ 42 if (op == PUSH):
378
+ 43 WRITE(STACK_PUSH)
379
+ 44 MOVE(pstack, UP)
380
+ 45
381
+ 46 if (op == POP):
382
+ 47 WRITE(ACTIVE_STACK)
383
+ 48 WRITE(STACK_POP)
384
+ 49 MOVE(pstack, DOWN)
385
+ 50 }
386
+ 51
387
+ 52 NEXT_START() {
388
+ 53 while(Qcolor(pstart) is not white and is not invalid): // color invalid when all vertices explored
389
+ 54 MOVE(pstart, UP)
390
+ 55 }
391
+
392
+ # A.2.2 RECURSIVE TRACE-GENERATING FUNCTIONS
393
+
394
+ # Altered Recursive Functions
395
+
396
+ 1 // Top level topological sort call
397
+ 2 TOPOSORT() {
398
+ 3 if $\scriptstyle : Q _ { c o l o r }$ $_ { p _ { s t a r t } } ,$ is a valid color): // color invalid when all vertices explored
399
+ 4 WRITE(ACTIVE_START)
400
+ 5 WRITE(COLOR_CURR, COLOR_GREY)
401
+ 6 TRAVERSE()
402
+ 7 MOVE(pstart, UP)
403
+ 8 NEXT_START()
404
+ 9 TOPOSORT() // Recursive Call
405
+ 10 }
406
+ 11
407
+ 12 CHECK_CHILD() {
408
+ 13 if $\overline { { ( Q _ { c o l o r } ( D A G [ v _ { a c t i v e } ] [ c h i l d L i s t [ v _ { a c t i v e } ] ] ) } } ) \overline { { { } } }$ is not white and is not invalid): // color invalid when all children explore
409
+ 14 MOVE(childList[vactive], UP)
410
+ 15 CHECK_CHILD() // Recursive Call
411
+ 16 }
412
+ 17
413
+ 18 EXPLORE() {
414
+ 19 if (Qcolor(DAG[vactive][childList[vactive]]) is white):
415
+ 20 WRITE(COLOR_NEXT, COLOR_GREY)
416
+ 21 STACK(PUSH)
417
+ 22 WRITE(SAVE)
418
+ 23 WRITE(ACTIVE_NEIGHB)
419
+ 24 MOVE(childList[vsave], UP)
420
+ 25 else:
421
+ 26 WRITE(COLOR_CURR, COLOR_BLACK)
422
+ 27 WRITE(RESULT)
423
+ 28 MOVE(presult, UP)
424
+ 29 if $( p _ { s t a c k } = = 1$ ):
425
+ 30 return
426
+ 31 else:
427
+ 32 STACK(POP)
428
+ 33 CHECK_CHILD()
429
+ 34 EXPLORE() // Recursive Call
430
+ 35 }
431
+ 36
432
+ 37 NEXT_START() {
433
+ 38 if $( Q _ { c o l o r } \left( p _ { s t a r t } \right)$ is not white and is not invalid): // color invalid when all vertices explored
434
+ 39 MOVE $( p _ { s t a r t }$ , UP)
435
+ 40 NEXT_START() // Recursive Call
436
+ 41 }
437
+
438
+ # Algorithm 4 Iterative Quicksort
439
+
440
+ 1: Initialize an array $A$ to sort and two empty stacks $S _ { l o }$ and $S _ { h i }$ .
441
+ 2: Initialize lo and $h i$ to be 1 and $n$ , where $n$ is the length of $A$ .
442
+ 3:
443
+ 4: function PARTITION $( A , l o , h i )$
444
+ 5: $p i v o t = l o$
445
+ 6: for $j \in [ l o , h i - 1 ] : \mathbf { d o }$
446
+ 7: if $A [ j ] \leq A [ h i ]$ then
447
+ 8: swap A[pivot] with $A [ j ]$
448
+ 9: pivot = pivot + 1
449
+ 10: swap A[pivot] with $A [ h i ]$
450
+ 11: return pivot
451
+ 12:
452
+ 13: function QUICK ${ \mathrm { : } } \operatorname { S o R T } ( A , l o , h i )$
453
+ 14: while $S _ { l o }$ and $S _ { h i }$ are not empty: do
454
+ 15: Pop states off $S _ { l o }$ and $S _ { h i }$ , writing them to $l o$ and $h i$ .
455
+ 16: $\mathsf { p } = \mathsf { P A R T I T I O N } ( A , l o , h i )$
456
+ 17: Push $p + 1$ and $h i$ to $S _ { l o }$ and $S _ { h i }$ .
457
+ 18: Push lo and $p - 1$ to $S _ { l o }$ and $S _ { h i }$ .
458
+
459
+ A.4 PROGRAM SET FOR QUICKSORT
460
+
461
+ <table><tr><td rowspan=1 colspan=1>Program</td><td rowspan=1 colspan=1>Descriptions</td><td rowspan=1 colspan=1>Calls</td><td rowspan=1 colspan=1> Arguments</td></tr><tr><td rowspan=1 colspan=1>QUICKSORT</td><td rowspan=1 colspan=1>Runthequicksortroutine in place forthearrayA,forindices from lo to hi</td><td rowspan=1 colspan=1>Non-Recursive: PAR-TITION, STACK,WRITERecursive: same asnon-recursiveversion,alongwithQUICK-SORT</td><td rowspan=1 colspan=1>Implicitly:arrayA to sort, lo, hi</td></tr><tr><td rowspan=1 colspan=1>PARTITION</td><td rowspan=1 colspan=1>Runsthepartitionfunction. At end,pointer Ppivot ismoved to the pivot</td><td rowspan=1 colspan=1>COMPSWAP_LOOP,MOVE_PIVOT_LO,MOVE_JLO, SWAP</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>COMPSWAPLOOP</td><td rowspan=1 colspan=1>Runs the FOR loopinside the partitionfunction</td><td rowspan=1 colspan=1>COMPSWAP, MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>COMPSWAP</td><td rowspan=1 colspan=1>ComparesA[pivot] ≤ A[j]; ifso,perform a swapand increment Ppivot</td><td rowspan=1 colspan=1>SWAP, MOVE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>SET_PIVOTLO</td><td rowspan=1 colspan=1>Sets Ppivot to lo in-dex</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>SETJLO</td><td rowspan=1 colspan=1>Sets pj to lo index</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>SET_J_NULL</td><td rowspan=1 colspan=1>Sets pj to-00</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>NONE</td></tr><tr><td rowspan=1 colspan=1>STACK</td><td rowspan=1 colspan=1>Pushes lo/hi statesonto stacks Sto andShi according to argument(describedbelow)</td><td rowspan=1 colspan=1>WRITE, MOVE</td><td rowspan=1 colspan=1>Described below</td></tr><tr><td rowspan=1 colspan=1>MOVE</td><td rowspan=1 colspan=1>Movespointerone unit up or down</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>Described below</td></tr><tr><td rowspan=1 colspan=1>SWAP</td><td rowspan=1 colspan=1>Swapselementsatgiven array indices</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>Described below</td></tr><tr><td rowspan=1 colspan=1>WRITE</td><td rowspan=1 colspan=1>Write a valueeither to stack(e.g QstackLoorQstackHi) or topointer (e.g tochangethe value ofPhi)</td><td rowspan=1 colspan=1>NONE</td><td rowspan=1 colspan=1>Described below</td></tr></table>
462
+
463
+ Argument Sets for STACK, MOVE, SWAP, WRITE.
464
+
465
+ STACK. The STACK operation has the following arguments:
466
+
467
+ ARG 1 (Operation): STACK PUSH CALL1, STACK PUSH CALL2, STACK POP
468
+
469
+ STACK PUSH CALL1 pushes $l o$ and pivot−1 to $Q _ { s t a c k L o }$ and $Q _ { s t a c k H i }$ . STACK PUSH CALL2 pushes pivot $+ 1$ and $h i$ to $Q _ { s t a c k L o }$ and $Q _ { s t a c k H i }$ . STACK POP pushes $- \infty$ values to $Q _ { s t a c k L o }$ and $Q _ { s t a c k H i }$ .
470
+
471
+ MOVE. The MOVE operation has the following arguments:
472
+
473
+ ARG 1 (Pointer): pstackLo, pstackHi, pj , ppivot
474
+
475
+ Note that the argument is the identity of the pointer, not what the pointer points to; in other words, ARG 1 can only take one of 4 values.
476
+
477
+ ARG 2 (Increment or Decrement): UP, DOWN
478
+
479
+ SWAP. The SWAP operation has the following arguments:
480
+
481
+ ARG 1 (Swap Object 1): ppivot
482
+
483
+ ARG 2 (Swap Object 2): $p _ { h i } , p _ { j }$
484
+
485
+ WRITE. The WRITE operation has the following arguments:
486
+
487
+ ARG 1 (Object to Write): ENV STACK LO, ENV STACK HI, $p _ { h i } , p _ { l o }$
488
+
489
+ ENV STACK LO and ENV STACK HI represent $Q _ { s t a c k L o } ( p _ { s t a c k L o } ) $ and $Q _ { s t a c k H i } ( p _ { s t a c k H i } )$ , re spectively.
490
+
491
+ ARG 2 (Object to Copy): ENV STACK LO PEEK, ENV STACK HI PEEK, $p _ { h i } , p _ { l o } , p _ { p i v o t } - 1$ ppivot + 1, RESET
492
+
493
+ ENV STACK LO PEEK and ENV STACK HI PEEK represent $Q _ { s t a c k L o } ( p _ { s t a c k L o } \mathrm { ~ - ~ } 1 )$ and $Q _ { s t a c k H i } ( p _ { s t a c k H i } - 1 )$ , respectively. RESET represents a $- \infty$ value.
494
+
495
+ Note that the argument is the identity of the pointer, not what the pointer points to; in other words, ARG 1 can only take one of 4 values, and ARG 2 can only take one of 7 values.
496
+
497
+ # A.5 TRACE-GENERATING FUNCTIONS FOR QUICKSORT
498
+
499
+ # A.5.1 NON-RECURSIVE TRACE-GENERATING FUNCTIONS
500
+
501
+ 1 Initialize $p _ { l o }$ to 1 and $p _ { h i } \ t \circ \ n$ (length of array)
502
+ 2 Initialize $p _ { j } ~ \mathsf { t o } ~ - \infty$
503
+ 3
504
+ 4 QUICKSORT() {
505
+ 5 while $( p _ { s t a c k L o } \neq 1 )$ :
506
+ 6 if $( \stackrel { } { Q } _ { s t a c k L o } ^ { \prime \prime } ( \stackrel { \prime } { p } _ { s t a c k L o } - 1 ) < Q _ { s t a c k H i } ( p _ { s t a c k H i } - 1 ) ) :$
507
+ 7 STACK(STACK_POP)
508
+ 8 else:
509
+ 9 WRITE $( \boldsymbol { p } _ { h i }$ , ENV_STACK_HI_PEEK)
510
+ 10 WRITE(plo, ENV_STACK_LO_PEEK)
511
+ 11 STACK(STACK_POP)
512
+ 12 PARTITION()
513
+ 13 STACK(STACK_PUSH_CALL2)
514
+ 14 STACK(STACK_PUSH_CALL1)
515
+ 15 }
516
+ 16
517
+ 17 PARTITION() {
518
+ 18 SET_PIVOT_LO()
519
+ 19 SET_J_LO()
520
+ 20 COMPSWAP_LOOP()
521
+ 24 SWAP(ppivot, phi)
522
+ SET_J_NULL()
523
+ }
524
+ COMPSWAP_LOOP() {
525
+ while $( p _ { j } \neq p _ { h i } )$ :
526
+ COMPSWAP()
527
+ MOVE $( p _ { j }$ , UP)
528
+ }
529
+ 30
530
+ 31 COMPSWAP() {
531
+ 32 if (A[pj ] ≤ A[phi]):
532
+ 33 SWAP(ppivot, pj)
533
+ 34 MOVE(ppivot, UP)
534
+ 35 }
535
+ 36
536
+ 37 STACK(op) {
537
+ 38 if (op == STACK_PUSH_CALL1):
538
+ 39 WRITE(ENV_STACK_LO, plo)
539
+ 40 WRITE(ENV_STACK_HI, ppivot − 1)
540
+ 41 MOVE(pstackLo, UP)
541
+ 42 MOVE(pstackHi, UP)
542
+ 43
543
+ 44 if (op $= =$ STACK_PUSH_CALL2):
544
+ 45 WRITE(ENV_STACK_LO, ppivot $^ { + 1 1 }$ )
545
+ 46 WRITE(ENV_STACK_HI, $p _ { h i }$ )
546
+ 47 MOVE(pstackLo, UP)
547
+ 48 MOVE(pstackHi, UP)
548
+ 49
549
+ 50 if (op $= =$ STACK_POP):
550
+ 51 WRITE(ENV_STACK_LO, RESET)
551
+ 52 WRITE(ENV_STACK_HI, RESET)
552
+ 53 MOVE(pstackLo, DOWN)
553
+ 54 MOVE(pstackHi, DOWN)
554
+ 55 }
555
+
556
+ # A.5.2 RECURSIVE TRACE-GENERATING FUNCTIONS
557
+
558
+ # Altered Recursive Functions
559
+
560
+ Initialize to 1 and $p _ { h i } \ t \circ \ n$ (length of array)
561
+
562
+ 1 $p _ { l o }$
563
+ 2 Initialize $p _ { j }$ to −∞
564
+ 3
565
+ 4 QUIC $\begin{array} { r l } & { \mathrm { \sf { A S O R T } \left( \tau \right) } \quad \mathrm { \sf { \{ } } } \\ & { \mathrm { \sf { ( } } Q _ { s t a c k L o } ( p _ { s t a c k L o } - 1 ) < Q _ { s t a c k H i } ( p _ { s t a c k H i } - 1 ) ) : } \\ & { \mathrm { \sf { 2 } } \mathrm { \sf { A R T I T I O N } \left( \tau \right) } } \end{array}$
566
+ 5 if
567
+ 6
568
+ 7 STACK(STACK_PUSH_CALL2)
569
+ 8 STACK(STACK_PUSH_CALL1)
570
+ 9 WRITE $( p _ { h i }$ , ENV_STACK_HI_PEEK)
571
+ 10 WRITE $( p _ { l o }$ , ENV_STACK_LO_PEEK)
572
+ 11 QUICKSORT() // Recursive Call
573
+ 12 STACK(STACK_POP)
574
+ 13 WRITE $( p _ { h i }$ , ENV_STACK_HI_PEEK)
575
+ 14 WRITE $( p _ { l o }$ , ENV_STACK_LO_PEEK)
576
+ 15 QUICKSORT() // Recursive Call
577
+ 16 STACK(STACK_POP)
578
+ 17 }
579
+ 18
580
+ 19 COMPSWAP_LOOP() {
581
+ 20 if $( p _ { j } \neq p _ { h i } )$ :
582
+ 21 COMPSWAP()
583
+ 22 MOVE $( p _ { j }$ , UP)
584
+ 23 COMPSWAP_LOOP() // Recursive Call
585
+ 24 }
586
+
587
+ A.6 BASE CASES, REDUCTION RULES, AND VERIFICATION SETS
588
+
589
+ In this section, we describe the space of base cases and reduction rules that must be covered for each of the four sample tasks, in order to create the verification set.
590
+
591
+ For addition, we analytically determine the verification set. For tasks other than addition, it is difficult to analytically determine the verification set, so instead, we randomly generate input candidates until they completely cover the base cases and reduction rules.
592
+
593
+ Base Cases and Reduction Rules for Addition. For the recursive formulation of addition, we analytically construct the set of input problems that cover all base cases and reduction rules. We outline how to construct this set.
594
+
595
+ It is sufficient to construct problems where every transition between two adjacent columns is covered. The ADD reduction rule ensures that each call to ADD only covers two adjacent columns, and so the LSTM only ever runs for a fixed number of steps necessary to process these two columns.
596
+
597
+ We construct input problems by splitting into two cases: one case in which the left column contains a null value and another in which the left column does not contain any null values. We then construct problem configurations that span all possible valid environment states (for instance, in order to force the carry bit in a column to be 1, one can add the sum $\cdot _ { 1 + 9 } ,$ in the column to the right).
598
+
599
+ The operations we need to be concerned most about are CARRY and LSHIFT, which induce partial environment states spanning two columns. It is straightforward to deal with all other operations, which do not induce partial environment states.
600
+
601
+ Under the assumption that there are no leading 0’s (except in the case of single digits) and the two numbers to be added have the same number of digits, the verification set for addition contains 20,181 input problems. The assumption of leading 0’s can be easily removed, at the cost of slightly increasing the size of the verification set. We made the assumption of equivalent lengths in order to parametrize the input format with respect to length, but this assumption can be removed as well.
602
+
603
+ Base Cases and Reduction Rules for Bubble Sort. The original version of the bubblesort implementation exposes the values within the array. While this matches the description from Reed & de Freitas (2016), we found that this causes an unnecessary blowup in the size of $V$ and makes it much more difficult to construct the verification set. For purposes of verification, we replace the domain-specific encoder with the following:
604
+
605
+ $$
606
+ \begin{array} { r l } & { f _ { e n c } ( Q , i _ { 1 } , i _ { 2 } , i _ { 3 } , a _ { t } ) = M L P ( [ Q ( 1 , i _ { 1 } ) \leq Q ( 1 , i _ { 2 } ) , 1 \leq i _ { 1 } \leq l e n g t h , 1 \leq i _ { 2 } \leq l e n g t h , } \\ & { ~ i _ { 3 } = = l e n g t h , a _ { t } ( 1 ) , a _ { t } ( 2 ) , a _ { t } ( 3 ) ] ) , } \end{array}
607
+ $$
608
+
609
+ Table 4: Accuracy on Randomly Generated Problems for Variant of Bubble Sort
610
+
611
+ <table><tr><td>Length of Array</td><td>Non-Recursive</td><td>Recursive</td></tr><tr><td></td><td>100%</td><td>100%</td></tr><tr><td>23</td><td>100%</td><td>100%</td></tr><tr><td>4</td><td>100%</td><td>100%</td></tr><tr><td>5</td><td>100%</td><td>100%</td></tr><tr><td>6</td><td>90%</td><td>100%</td></tr><tr><td>7</td><td>86.7%</td><td>100%</td></tr><tr><td>8</td><td>6.7%</td><td>100%</td></tr><tr><td>9</td><td>0%</td><td>100%</td></tr><tr><td>10</td><td>0%</td><td></td></tr><tr><td>12</td><td>0%</td><td>100%</td></tr><tr><td>15</td><td>0%</td><td>100%</td></tr><tr><td></td><td></td><td>100%</td></tr><tr><td>70</td><td>0%</td><td>100%</td></tr></table>
612
+
613
+ which directly exposes which of the two values pointed to is larger. This modification also enables us to sort arrays containing arbitrary comparable elements.
614
+
615
+ By reasoning about the possible set of environment observations created by all valid inputs, we construct $V$ using the procedure described in Section 3.3. Using this modification, we constructed a verification set consisting of one array of size 10.
616
+
617
+ We also report on generalization results for the non-recursive and recursive versions of this variant of bubble sort. Table 4 demonstrates that the accuracy of the non-recursive program degrades sharply when moving from arrays of length 7 to arrays of length 8. This is due to the properties of the training set – we trained on 2 traces synthesized from arrays of length 7 and 1 trace synthesized from an array of length 6. Table 4 also demonstrates that the (verified) recursive program generalizes perfectly.
618
+
619
+ Base Cases and Reduction Rules for Topological Sort. For each function we use to implement the recursive version of topological sort, we need to consider the set of possible environment observation sequences we can create from all valid inputs and test that the learned program produces the correct behavior on each of these inputs. We have three observations: the color of the start node, the color of the active node’s next child to be considered, and whether the stack is empty. Na¨ıvely, we might expect to synthesize and test an input for any sequence created by combining the four possible colors in two variables and another boolean variable for whether the stack is empty (so 32 possible observations at any point), but for various reasons, most of these combinations are impossible to occur at any given point in the execution trace.
620
+
621
+ Through careful reasoning about the possible set of environment observations created by all valid inputs, and how each of the operations in the execution trace affects the environment, we can construct $V$ using the procedure described in Section 3.3. We then construct a verification set of size 73 by ensuring that randomly generated graphs cover the analytically derived $V$ . The model described in the training setup of Section 4 (trained on 6 traces) was verified to be correct via the matching procedure described in Section 4.2.
622
+
623
+ Base Cases and Reduction Rules for Quicksort. As with the others, we apply the procedure described in Section 3.3 to construct $V$ and then empirically create a verification set which covers $V$ . The verification set can be very small, as we found a 10-element array ([8,2,1,2,0,8,5,8,3,7]) is sufficient to cover all of $V$ . We note that an earlier version of quicksort we tried lacked primitive operations to directly move a pointer to another, and therefore needed more functions and observations. As this complexity interfered with determining the base cases and reductions, we changed the algorithm to its current form. Even though the earlier version also generalized just as well in practice, relatively small differences in the formulation of the traces and the environment observations can drastically change the difficulty of verification.
parse/train/BkbY4psgg/BkbY4psgg_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkbY4psgg/BkbY4psgg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkbY4psgg/BkbY4psgg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BygZK2VYvB/BygZK2VYvB.md ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Utilizing Edge Features in Graph Neural Networks via Variational Information Maximization
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # Abstract
6
+
7
+ Graph Neural Networks (GNNs) broadly follow the scheme that the representation vector of each node is updated recursively using the message from neighbor nodes, where the message of a neighbor is usually pre-processed with a parameterized transform matrix. To make better use of edge features, we propose the Edge Information maximized Graph Neural Network (EIGNN) that maximizes the Mutual Information (MI) between edge features and message passing channels. The MI is reformulated as a differentiable objective via a variational approach. We theoretically show that the newly introduced objective enables the model to preserve edge information, and empirically corroborate the enhanced performance of MI-maximized models across a broad range of learning tasks including regression on molecular graphs and relation prediction in knowledge graphs.
8
+
9
+ # 1 Introduction
10
+
11
+ Many real-world datasets naturally come in the form of graphs, such as citation networks (Kipf & Welling, 2017), social networks Hamilton et al. (2017), knowledge graphs (Schlichtkrull et al., 2018), molecular graphs (Scarselli et al., 2009; Duvenaud et al., 2015) etc., all of which consist of a number of nodes and edges equipped with their inherent features. Recently, impressive performance has been achieved in graph learning tasks with various forms of Graph Neural Networks (GNNs) (Zhou et al., 2018). Compared to prior works, such as node2vec (Grover & Leskovec, 2016), GNNs learn the state of a node by recursively aggregating messages from its neighbors: combining the graph structure with node features. Intuitively, edge features should play an important role in graph learning tasks. For example, chemical bonds in a molecule have a high impact on chemical properties of molecules, and edge features in knowledge graphs encode important relations between concepts, data, and entities. Our proposed method focuses on improving the usage of edge features in GNNs.
12
+
13
+ The expressive power of GNNs largely depends on how the message is passed between nodes. A widely adopted scheme is multiplying neighbor node states with a parameterized transform matrix before aggregation (Gilmer et al., 2017; Xu et al., 2019). Despite tremendous success of GNNs, existing models do not exhaustively exploit the full potentials of edge features on graphs. For example, many GNNs such as GCN (Kipf & Welling, 2017), ChebyNet (Defferrard et al., 2016) and GAT (Veličković et al., 2018) do not even consider categorized edge types. To utilize edge features in multi-relational graphs, RGCN (Schlichtkrull et al., 2018) proposes to learn a different transform matrix for each edge type, respectively. However, it does not generalize to edge features in continuous space. MPNN (Gilmer et al., 2017) introduces an edge network that takes edge feature vectors as input and outputs transform matrices, which are used to transform states of neighbor nodes. In principle, the MPNN framework can handle complex edge features. Yet, the lack of maximization of MI between edge and message channels implies that the MPNN may give an edge-independent transform matrix.
14
+
15
+ In this work, we aim to more efficiently exploit the full potentials of edge features from the perspective of training. We propose the Edge Information maximized Graph Neural Network (EIGNN) that maximizes the Mutual Information (MI) between edge features and the message passing channel which is parameterized as the transform matrix in the widely-accepted message passing framework (transformation and aggregation) (Gilmer et al., 2017; Xu et al., 2019). Considering the challenge of computing the MI, we adopt a variational approach to reformulate it as an differentiable objective, which can be easily applied as a regularization term. We theoretically show that EIGNN can reduce information loss of edge features. Apart from demonstrating the impressive performance of EIGNN on extensive benchmarks of molecular graphs and knowledge graphs, we also analyze and attribute the enhanced effectiveness of EIGNN to the exploitation of edge features instead of the regularization effects. Notably, attribution analysis on molecular graphs show that EIGNN can capture domain knowledge without human interference.
16
+
17
+ Preliminaries Let $G = ( \nu , \mathcal { E } )$ be a graph with node feature vectors $x _ { v } \in \mathbb { R } ^ { d }$ for node $v \in \nu$ and edge feature vectors $e _ { v w } \in \mathcal { E }$ for the edge connecting node $v$ and $w$ . In GNNs, the state of each node is updated recursively using neighbor nodes. Let $\mathcal { N } _ { v }$ be the set of neighbor nodes of $v$ and $h _ { v } ^ { ( l ) } \in \mathbb { R } ^ { d _ { l } }$ be the hidden state of $v$ at $\it l$ -th layer, where $d _ { l }$ is the dimension of the hidden layer. For simplicity of notation, we use a single $d$ to denote the dimension such that $h _ { v } ^ { ( l ) } \in \mathbb { R } ^ { d }$ . We also have $h _ { v } ^ { ( 0 ) } = x _ { v }$ at the input layer.
18
+
19
+ # 2 Related works
20
+
21
+ # 2.1 Relational Modeling in Graph Neural Networks
22
+
23
+ Single-relational modeling. Many variants such as GCN (Kipf & Welling, 2017), GAT (Veličković et al., 2018), ChebyNet (Defferrard et al., 2016), GraphSAGE (Hamilton et al., 2017) focus on learning node states. These models can assign weight to neighbors, but they can not handle various edge features. A typical neighborhood aggregation scheme is
24
+
25
+ $$
26
+ h _ { v } ^ { ( l + 1 ) } = \sigma \left( \sum _ { w \in \mathcal { N } _ { v } } \alpha _ { v w } W _ { 1 } ^ { ( l ) } h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \right) ,
27
+ $$
28
+
29
+ where $\sigma$ denotes an activation function, $\alpha _ { v w }$ can be a normalization constant or a learned attention coefficient (Veličković et al., 2018). States of all neighbors are multiplied by the same trainable transform matrix $W _ { 1 } ^ { ( l ) }$ . Sometimes the self-connection is also treated in the same way, s.t., W (l)0 = W (l)1 .
30
+
31
+ Multi-relational modeling. A simple strategy to handle multi-relational graphs is assigning each edge type with a separate transform matrix as presented in RGCN (Schlichtkrull et al., 2018) and adopted by GGNN (Li et al., 2016) and LNet (Liao et al., 2019). RGCN updates node states according to the following scheme
32
+
33
+ $$
34
+ \begin{array} { r } { h _ { v } ^ { ( l + 1 ) } = \sigma \left( \sum _ { r \in \mathcal { R } } \sum _ { w \in \mathcal { N } _ { v } ^ { r } } \alpha _ { v w , r } W _ { r } ^ { ( l ) } h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \right) , } \end{array}
35
+ $$
36
+
37
+ where $\mathcal { N } _ { v } ^ { r }$ is the collection of neighboring nodes of $\boldsymbol { v }$ with relation $r \in \mathcal { R }$ and $\alpha _ { v w , r }$ is a normalization constant similar as $\alpha _ { v w }$ in Eq. (1). Such a scheme faces challenge in handling edge features of continuous space. GGNN and LNet do not focus on the improvement of edge expressibility. GGNN introduces Gated Recurrent Unit (GRU) (Cho et al., 2014) and LNet focus on handling multi-scale connections.
38
+
39
+ Complex-relational modeling. The relation in a graph can be quite complex, expressed as a general feature vector $e$ . MPNN (Gilmer et al., 2017) introduces an edge network which takes edge feature vectors as input and outputs transform matrices. A single edge network is shared in a MPNN model. The forward propagation is formalized as
40
+
41
+ $$
42
+ m _ { v } ^ { ( l + 1 ) } = \sigma \left( \sum _ { w \in \mathcal { N } _ { v } } f ( e _ { v w } ) h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \right) , \quad h _ { v } ^ { ( l + 1 ) } = \mathrm { G R U } ( h _ { v } ^ { ( l ) } , m _ { v } ^ { ( l + 1 ) } ) ,
43
+ $$
44
+
45
+ where $f : e W$ denotes the edge network. Recently, some research works treat a multirelational problem as the complex-relational one by introducing a continuous edge embedding vector for each edge type, so as to handle increasing number of relations (Nathani et al., 2019). Although the MPNN architecture allows the usage of arbitrary edge features, this advantage is not utilized in practice. MPNN can actually learn an edge-independent transform matrix. A GNN model that efficiently utilizes edge features is yet to emerge.
46
+
47
+ # 2.2 Readout functions
48
+
49
+ After several forward propagations, GNNs yield final states of all nodes, which are suitable for node/edge classification or regression. For graph classification or regression tasks, we can apply a readout function (Ying et al., 2018; Vinyals et al., 2015) such that
50
+
51
+ $$
52
+ y = R ( \{ h _ { v } ^ { L } | v \in G \} ) ,
53
+ $$
54
+
55
+ where $h _ { v } ^ { L }$ is the state of $v$ at the last layer, $R$ is the readout function that outputs a graph-level representation $y$ , e.g., summing up the final node states, applying hierarchical pooling (Ying et al., 2018) or using the set2set model (Vinyals et al., 2015).
56
+
57
+ # 3 Our method
58
+
59
+ # 3.1 The Usage of Mutual Information
60
+
61
+ In probability theory and information theory, MI is a measure of mutual dependence between two random variables. Our method proposes to preserve edge information in GNNs, which is important in many real-world graph structures such as molecules - apart from node (atom) features, attributes of edges (bonds) are equally important for predicting properties of molecules. To this end, we maximize $I ( e ; W )$ - the MI between the edge feature vector $e$ and the message passing channel, i.e., the transform matrix $W$ which is used to transform neighbor node states in the forward propagation. Our method can be easily generalized to directly maximize the MI between edge features and the message itself in methods that do not explicitly have the transform matrix, e.g., the message from node $w$ to node $v$ can be expressed as $f ( h _ { v } , e _ { v w } , h _ { w } )$ rather than $f ( e _ { v w } ) h _ { w }$ , which is shown in Section 4.3.
62
+
63
+ An general principle of maximum MI is described for unsupervised learning task by (Linsker, 1988) and MI inspired objective functions have long been adopted in unsupervised learning (Bridle et al., 1992; Barber & Agakov, 2006; Veličković et al., 2019; Hjelm et al., 2019), semi-supervised learning (Krause et al., 2010) and generative adversarial networks (Chen et al., 2016). Specifically, DGI (Veličković et al., 2019) also applies MI to GNNs. DGI proposes to learn node-wise representations in an unsupervised manner by maximizing the MI between node representations and corresponding high-level summaries of graphs, using adversarial learning and negative sampling. The node representations may then be retrieved and used for downstream tasks, such as node classification. DGI can be used to pre-train GNNs, as demonstrated in Hu et al. (2019). Our EIGNN also proposes information maximization but targets a completely different objective and adopts a quite different approach.
64
+
65
+ # 3.2 A Variational Approach to Maximize Mutual Information
66
+
67
+ Computing $I ( e ; W )$ itself is intractable in practice, needless to say that training a model requires the derivative. Thus, we adopt a variational approach (Agakov, 2004) to reformulate $I ( e ; W )$ as a differentiable objective. We show that our objective is an approximated lower bound of $I ( e ; W )$ and notably, optimizing our objective does lead to maximizing $I ( e ; W )$ . Following MPNN (Gilmer et al., 2017), we use an edge network to parameterize the transform matrix $W$ and relate it to edge features. Therefore, the prior $p ( W | e )$ is
68
+
69
+ $$
70
+ p ( W | e ) = \delta ( W - f ( e ) ) ,
71
+ $$
72
+
73
+ where $\delta ( \cdot )$ is the Dirac delta function. The posterior $p ( e | W )$ is intractable, so we define a variational distribution $q ( e | W )$ , which can be obtained by defining a neural network $g : W \to e$ Specifically, $q ( e | W )$ substitutes to some distribution (such as Gaussian distribution) with parameter $g ( W )$ . In this way, $f$ and $g$ are similar to the probabilistic encoder and decoder in the Variational Auto-Encoder (VAE) (Kingma $\&$ Welling, 2013). Then we can approximate $I ( e ; W )$ with a differentiable objective $L _ { I } ( f , g ; e )$ as follows.
74
+
75
+ Theorem 1. Let e be the edge feature vector, $W$ be the transform matrix with conditional distribution $p ( W | e )$ specified by the probabilistic encoder $f$ as shown in Eq. (5) and $q ( e | W )$ be the variational distribution specified by the probabilistic decoder $g$ , then we have
76
+
77
+ $$
78
+ I ( e ; W ) \geq H ( e ) + \mathbb { E } _ { e \sim p ( e ) } [ \mathcal { L } _ { I } ( f , g ; e ) ] ,
79
+ $$
80
+
81
+ where $\mathcal { L } _ { I } ( f , g ; e ) = \log q ( e | f ( e ) )$ and $H ( \cdot )$ denotes the entropy.
82
+
83
+ Proof. Let $D _ { K L } ( \cdot \parallel \cdot )$ denote the KL-divergence, which should be nonnegative, then we have
84
+
85
+ $$
86
+ \begin{array} { r l } { I ( e ; W ) = H ( e ) - H ( e | W ) } & { } \\ { \ } & { = H ( e ) + \mathbb { E } _ { W \sim p ( W ) } [ \mathbb { E } _ { e \sim p ( e | W ) } [ \log p ( e | W ) ] ] } \\ { \ } & { = H ( e ) + \mathbb { E } _ { W \sim p ( W ) } [ \mathbb { E } _ { e \sim p ( e | W ) } [ \log p ( e | W ) - \log q ( e | W ) + \log q ( e | W ) ] ] } \\ { \ } & { = H ( e ) + \mathbb { E } _ { W \sim p ( W ) } [ D _ { K L } ( p ( e | W ) \| q ( e | W ) ) + \mathbb { E } _ { e \sim p ( e | W ) } [ \log q ( e | W ) ] ] } \\ { \ } & { \geq H ( e ) + \mathbb { E } _ { W \sim p ( W ) } [ \mathbb { E } _ { e \sim p ( e | W ) } [ \log q ( e | W ) ] ] } \\ { \ } & { = H ( e ) + \mathbb { E } _ { e \sim p ( e ) , W \sim p ( W | e ) } [ \log q ( e | W ) ] } \\ { \ } & { \stackrel { ( a ) } { = } H ( e ) + \mathbb { E } _ { e \sim p ( e ) } [ \log q ( e | f ( e ) ) ] } \end{array}
87
+ $$
88
+
89
+ where the equality ( $a$ ) follows from Eq. (5).
90
+
91
+ According to Theorem 1, we can maximize the variational lower bound for $I ( e ; W )$ . The bound becomes tight when the variational distribution $q ( e | W )$ approaches the true posterior $p ( e | W )$ . Moreover, $H ( e )$ is a constant because the distribution of edge feature vector $e$ is fixed for given graphs, hence we can equivalently maximize $\mathcal { L } _ { I } ( f , g ; e )$ . We choose the widely accepted Gaussian distribution as the prior distribution for the probabilistic decoder $g$ ,
92
+
93
+ $$
94
+ q ( e | W ) = \mathcal { N } ( e ; g ( W ) , \sigma ^ { 2 } I ) .
95
+ $$
96
+
97
+ Then we have
98
+
99
+ $$
100
+ \mathcal { L } _ { I } ( f , g ; e ) = \log q ( e | f ( e ) ) = \log \mathcal { N } ( e ; g ( f ( e ) ) , \sigma ^ { 2 } I ) = - \lambda \| e - g ( f ( e ) ) \| _ { 2 } ^ { 2 }
101
+ $$
102
+
103
+ where $\lambda > 0$ is a constant determined by $\sigma$ and the dimension of $e$ , taken as a tunable parameter. The following Theorem 2 shows that maximizing the objective in Eq. (8) does lead to the maximization of $I ( e ; W )$ , hence enables the model to preserve edge information.
104
+
105
+ Theorem 2. Assume the optimal solution of maximizing $\mathcal { L } _ { I } ( f , g ; e )$ is $f ^ { \star }$ and $g ^ { \star }$ , then $f ^ { \star }$ also maximizes $I ( e ; W )$ .
106
+
107
+ Proof. Note that $H ( e )$ is a constant when the graphs are given. In information theory, we have
108
+
109
+ $$
110
+ H ( g ( f ( e ) ) ) \leq H ( f ( e ) ) \leq H ( e ) .
111
+ $$
112
+
113
+ $I ( e ; W )$ is upper bounded by $H ( e )$ ,
114
+
115
+ $$
116
+ I ( e ; W ) = I ( e ; f ( e ) ) = H ( f ( e ) ) - H ( f ( e ) | e ) = H ( f ( e ) ) \leq H ( e ) .
117
+ $$
118
+
119
+ Since $f ^ { \star }$ and $g ^ { \star }$ is the optimal solution of maximizing $\mathcal { L } _ { I } ( f , g ; e )$ presented in Eq. (8), it is not difficult to see that $e = g ^ { \star } ( f ^ { \star } ( e ) ) , \forall e \in \mathcal { E }$ . In this case, the inequalities in Eq. 9 become equalities, i.e.,
120
+
121
+ $$
122
+ H ( g ^ { \star } ( f ^ { \star } ( e ) ) ) = H ( f ^ { \star } ( e ) ) = H ( e ) .
123
+ $$
124
+
125
+ Therefore, we have $I ( e ; W ) = H ( e )$ , i.e., the maximum is attained in this case.
126
+
127
+ 3.3 Edge Information Maximized Graph Neural Networks
128
+
129
+ Our EIGNN is derived by implementing our MI objective in GNNs. As a concrete example, the forward propagation of our model follows the formulation in Eq. (3), where the dege network $f : e W$ is expressed as a multi-layer perceptron (MLP). According to theoretical analysis presented in Sec. 3.2 , we introduce another MLP $g : W \to e$ as the decoder.
130
+
131
+ For graph regression or classification tasks, the model outputs a prediction $y$ for each graph $G$ , which has label $\hat { y }$ . Without MI maximization, we denote the vanilla loss as $\mathcal { L } _ { 0 } ( \hat { y } , y ; G )$ . Common choice of $\mathcal { L } _ { 0 }$ includes Mean Square Error (MSE), Mean Absolute Error (MAE) and Cross Entropy (CE). For a graph $G = ( \nu , \mathcal { E } )$ , EIGNN maximizes $\mathcal { L } _ { I } ( f , g ; e )$ and minimizes $\mathcal { L } _ { 0 } ( \hat { y } , y ; G )$ using the following loss function
132
+
133
+ $$
134
+ \mathcal { L } _ { E I G N N } ( G ) = \mathcal { L } _ { 0 } ( \hat { y } , y ; G ) - \lambda \mathbb { E } _ { e \in \mathcal { E } } [ \mathcal { L } _ { I } ( f , g ; e ) ] ,
135
+ $$
136
+
137
+ where $\mathbb { E } _ { e \in \mathcal { E } } [ \cdot ]$ denotes taking the mean over all edges in $G = ( \nu , \mathcal { E } )$ and $\lambda$ is the regularization parameter. When EIGNN is trained using mini-batches, $\mathcal { L } _ { 0 } ( \hat { y } , y ; G )$ is averaged over all graphs in the batch while $\mathcal { L } _ { I } ( f , g ; e )$ is averaged over all edges of all graphs in the batch.
138
+
139
+ Similarly, for relational prediction tasks in knowledge graphs, EIGNN directly yields nodelevel representations $h _ { v }$ for each node $v \in \mathcal V$ and edge-level representations $e$ for each relationship. The objective function of EIGNN can be derived from the translational scoring function Bordes et al. (2013), which learns embedding such that for a given valid triple $t _ { v w } = ( h _ { v } , e _ { v w } , h _ { w } )$ from the valid set $S$ , the condition $d _ { t _ { v w } } = h _ { v } + e _ { v w } - h _ { w } \approx 0$ holds. Let $\mathcal { L } _ { 0 } = \mathbb { E } _ { t _ { v w } \in S } \mathbb { E } _ { t _ { v w } ^ { \prime } \in S ^ { \prime } } \operatorname* { m a x } \{ d _ { t _ { v w } ^ { \prime } } - d _ { t _ { v w } } + \gamma , 0 \}$ , where $S ^ { \prime }$ denotes a set of invalid triples and $\gamma$ is a margin hyper-parameter, EIGNN can be trained by minimizing the following loss,
140
+
141
+ $$
142
+ \mathcal { L } _ { E I G N N } ( G ) = \mathcal { L } _ { 0 } - \lambda \mathbb { E } _ { e \in \mathcal { E } } [ \mathcal { L } _ { I } ( f , g ; e ) ] .
143
+ $$
144
+
145
+ # 4 Experiments
146
+
147
+ In this section, we first conduct experiments on a large quantum chemistry benchmark QM9, which is challenging for most baselines. Then we evaluate EIGNN on several useful molecule benchmarks and use attribution analysis to show that EIGNN increases the impact of edges and captures domain knowledge without human interference. Finally, we adopt our method to large-scale knowledge graphs and evaluate the performance on challenging relation prediction tasks using a wide variety of real-world datasets. All experimental results demonstrate a clear and substantial improvement of EIGNN over the state-of-the-art methods.
148
+
149
+ # 4.1 Quantum Chemistry
150
+
151
+ QM9 (Ramakrishnan et al., 2014) is a large benchmark containing 134k molecules with 12 quantum chemistry regression properties, which have been show to be quite challenging for many GNNs (Gilmer et al., 2017). Feature engineering of nodes and edges exactly follows (Gilmer et al., 2017) such that molecules are preprocessed as graphs according to atom features and bond features. We compare our EIGNN with nine state-of-the-art baselines which can be categorized into three groups according to the ability of handling edge features: i) GCN, ChebyNet, GAT and GIN (Xu et al., 2019) which simply use binary edge features to indicate the existence of a bond without any other edge features; ii) RGCN, GGNN, LNet and simplified MPNN (sMPNN) which consider bond types (no bond, single, double, triple, or aromatic); iii) MPNN and our EIGNN which use edge feature vectors to indicate both edge types and pairwise distance between atoms.
152
+
153
+ For a fair comparison, we repeat all experiments 3 times with different random seeds while during each run, all methods share the same random seed. We randomly choose 10k molecules for validation, 10k molecules for testing, and keep the rest for training. Each target property is normalized to zero mean and unit variance for training. Each model is trained to predict the 12 target properties simultaneously. $\lambda$ is naively set to 1 for EIGNN. We use mean square error (MSE) loss to train the models for at most 300 epochs till convergence, and the performance is measured by mean absolute error (MAE). For LNet and GGNN, implementation of the readout function follows the original paper. While for all other models, we use the same set2set (Vinyals et al., 2015) readout, which has been demonstrated to work well in (Gilmer et al., 2017).
154
+
155
+ Table 1: Quantum property regressions for 12 targets and overall performance (top two raws) on QM9. We repeat all experiments 3 times with different random seeds and report the average performance. Full results with standard deviation are presented in Appendix A, e.g., for MPNN and EIGNN, we have Avg. nMAE $0 . 0 3 9 8 \pm 0 . 0 0 0 2$ and 0.0357 ± 0.0005.
156
+
157
+ <table><tr><td>Method</td><td>GCN</td><td>ChebyNet</td><td>GAT</td><td>GIN</td><td>RGCN</td><td>GGNN</td><td>LNet</td><td>sMPNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>Avg.nMAE</td><td>0.135</td><td>0.121</td><td>0.137</td><td>0.100</td><td>0.102</td><td>0.099</td><td>0.099</td><td>0.089</td><td>0.040</td><td>0.036</td></tr><tr><td>Avg.MAE</td><td>5.306</td><td>4.303</td><td>5.470</td><td>3.480</td><td>3.817</td><td>3.661</td><td>3.653</td><td>3.161</td><td>0.693</td><td>0.633</td></tr><tr><td>mu</td><td>0.568</td><td>0.518</td><td>0.567</td><td>0.478</td><td>0.506</td><td>0.518</td><td>0.472</td><td>0.472</td><td>0.110</td><td>0.097</td></tr><tr><td>alpha</td><td>0.881</td><td>0.793</td><td>0.891</td><td>0.621</td><td>0.632</td><td>0.608</td><td>0.623</td><td>0.528</td><td>0.332</td><td>0.294</td></tr><tr><td>HOMO(10-3)</td><td>5.451</td><td>4.775</td><td>5.429</td><td>4.183</td><td>4.453</td><td>4.483</td><td>3.889</td><td>3.854</td><td>2.481</td><td>2.230</td></tr><tr><td>LUMO(10-3)</td><td>6.400</td><td>5.674</td><td>6.331</td><td>4.796</td><td>5.138</td><td>5.153</td><td>4.194</td><td>4.549</td><td>2.862</td><td>2.593</td></tr><tr><td>gap(10-3)</td><td>8.201</td><td>7.097</td><td>8.193</td><td>6.096</td><td>6.500</td><td>6.602</td><td>5.813</td><td>5.634</td><td>3.620</td><td>3.275</td></tr><tr><td>R2</td><td>53.56</td><td>41.95</td><td>54.52</td><td>34.65</td><td>40.10</td><td>39.68</td><td>35.27</td><td>33.49</td><td>6.064</td><td>5.646</td></tr><tr><td>ZPVE(10-3)</td><td>2.533</td><td>2.527</td><td>2.271</td><td>1.744</td><td>1.477</td><td>1.292</td><td>1.438</td><td>1.345</td><td>0.679</td><td>0.612</td></tr><tr><td>UO</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.806</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>U</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.755</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>H</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.796</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>G</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.696</td><td>1.778</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>Cv</td><td>0.473</td><td>0.420</td><td>0.479</td><td>0.309</td><td>0.317</td><td>0.315</td><td>0.312</td><td>0.262</td><td>0.134</td><td>0.121</td></tr></table>
158
+
159
+ ![](images/b51754269df1a1a81766b31ec23b13e16833a1c14fe21641771ca4dfac60a05d.jpg)
160
+ Figure 1: Ablation study. Training and validation error on QM9. The shadow area indicates $m e a n \pm s t d$ over 3 runs.
161
+
162
+ In Table 1, we list regression results for all methods. We report individual MAE for each target in their original scale, averaged MAE (Avg. MAE) over 12 properties, and averaged normalized MAE (Avg. nMAE; averaged over normalized target properties since different targets have different units and ranges). Our EIGNN achieves the best performance for each metric and each target. Now we are ready to answer the following research questions. i) Are edge features important? Yes. The error has a trend of decreasing with increasing edge features. The comparison between sMPNN (using edge types) and MPNN (using edge types and distance) directly verifies the importance of edge features. It is also consistent with the expert knowledge that distances between pairwise atoms are closely related to quantum properties. For example, the smaller the distance between the two atoms, the stronger the bond is, and consequently a higher bond energy is associated with this atom pair. ii) Does the EIGNN work? Yes. EIGNN achieves the best performance on each target, outperforming the strong baseline MPNN. Moreover, the advantage of EIGNN over MPNN is consistent over 3 runs and the standard deviation on this task is quite small. Detailed results are shown in Table 4 of Appendix A. iii) How does the EIGNN work? Our MI objective is easily implemented on top of vanilla loss function. We have shown that our objective enables preserving of edge information. Fig. 1 demonstrates that regularization such as $L _ { 2 }$ weight decay can increase training error while our objective does not. Moreover, the validation performance verifies that regularization itself does not reduce the validation error. Thus, the effectiveness of EIGNN is due to exploiting edge features rather than the regularization effect. We further run an ablation study where we concatenate edge features to node representations (i.e., MPNN+concat in Fig. 1) in message passing. Concatenation is unable to identify correlations between edges and nodes (Gilmer et al., 2017) and our results show that it slightly reduces the mean validation error but increases the variance.
163
+
164
+ # 4.2 More Molecule Benchmarks with Potential Applications
165
+
166
+ We further evaluate EIGNN on three molecule benchmarks: Lipophilicity (Wu et al., 2018), ESOL (Delaney, 2004) and FreeSolv (Mobley & Guthrie, 2014). These datasets contain fewer molecules, and have potential usages in applications such as chemistry, drug discovery, and materials science. For example, the property lipophilicity is an important feature of drug molecules that affects both membrane permeability and solubility. The dataset Lipophilicity contains 4200 compounds. ESOL provides water solubility data for 1128 compounds. FreeSolv contains hydration free energy of 642 small molecules in water. We conduct graph regression experiments on these benchmarks. All datasets are split into training, validation and test according to a proportion of 0.8/0.1/0.1. MPNN and our EIGNN share the same architecture with 3 layers of message passing and 3 steps of set2set. We repeat each experiment 3 times with different random seeds. Results of testing root mean square error (RMSE) in Table 2 verify the effectiveness of our method. Our EIGNN outperforms MPNN on each dataset and each run. Detailed results for each run are presented in Appendix B.
167
+
168
+ Table 2: Testing RMSE on Lipophilicity, ESOL and FreeSolv.
169
+
170
+ <table><tr><td>Dataset</td><td colspan="2">Lipophilicity</td><td colspan="2">ESOL</td><td colspan="2">FreeSolv</td></tr><tr><td>Method</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>mean±std</td><td>0.678±0.042</td><td>0.653±0.025</td><td>0.805±0.064</td><td>0.776±0.071</td><td>1.398±0.081</td><td>1.273±0.137</td></tr></table>
171
+
172
+ ![](images/93a30757aa01764b32a397063bc6a0e3a215232f566f99e62524e437f83f0e93.jpg)
173
+ Figure 2: Attribution analysis. The color indicates the impact of an edge/atom on the output, i.e., the regression result. EIGNN i) increases the edge attribution, ii) reduces the prediction error and iii) can learn domain knowledge without human interference.
174
+
175
+ Attribution analysis. To understand how our EIGNN reduces the regression error, we conduct attribution analysis, i.e., attributing the prediction of a deep network to its input features, which usually builds up on the standard gradient operator (Sundararajan et al., features 2017). For an output $e$ as $\begin{array} { r } { S _ { e } = | \frac { \partial y } { \partial e } | } \end{array}$ $y$ , i.e., the prediction of a GNN, we define its sensitivity to an edge with , where $\left. \cdot \right.$ denotes the $L _ { 1 }$ norm. Similarly, the sensitivity to an atom with features $x$ is $\begin{array} { r } { S _ { x } = | \frac { \partial y } { \partial x } | } \end{array}$ . Then $S _ { e }$ and $S _ { x }$ are used as the metrics of attribution in our experiments. As an example, we show in Fig. 2 the attribution for two molecules in Lipophilicity: (a) $N c I n o n c I C ( = N O ) N c \mathcal { Q } c c c ( F ) c ( C l ) c \mathcal { Q }$ and (b) Oc1c2ncc3ccccc3c2nn1c4ccccc4 . Molecule in (a) has the potential to be used to treat, prevent and/or diagnose cancer Prinz et al. (2019). Compared with MPNN, we can observe an increasing of overall edge attribution under our EIGNN and a decreasing of prediction error in both cases. Interestingly, the attribution under EIGNN is similar to the expert knowledge of chemists: halogen atoms such as {Cl, Br, I} and their bond with the carbon atom greatly effect the lipophilicity of a molecule Wilcken et al. (2013), while atoms {O, N} also have high impact on the lipophilicity but usually in a negative way (Augustijns & Brewster, 2007). In Fig. 2 (a), the attribution of the halogen bond C-Cl and the pair {O, N} under our EIGNN is much higher than the one under MPNN, which is consistent with the expert knowledge. In Fig. 2 (b), similarly, the attribution of atoms {O, N} and the bond C-O under EIGNN is much higher. More examples are presented in Appendix C.
176
+
177
+ # 4.3 Predicting Relations in Knowledge Graphs
178
+
179
+ In this subsection, we adopt EIGNN to tackle the problem of relation prediction in knowledge graphs (KGs), which entails predicting whether a given triple is valid or not. For example, a triple (London, capital of, United Kingdom) should be classified as valid or London should be predicted as the capital of United Kingdom. KGs represent human knowledge as a directed graph, and have been widely used in practical applications, such as semantic search, dialogue generation, question answering etc. Recovering missing relations in KGs have been a major task for practical usages of KGs. We evaluate our methods on three benchmark datasets, WN18RR (Dettmers et al., 2018), FB15k-237 (Toutanova et al., 2015) and NELL-995 (Xiong et al., 2017). Without the reversible relation problem (Dettmers et al., 2018), WN18RR includes 11 relations scraped from WordNet for 40, 943 synsets. FB15k-237 is a subset of Freebase, and contains 14, 541 entities associated with 237 types of edge. NELL-995 is constructed from the $9 9 5 ^ { t h }$ iteration of NELL system, containing 75, 492 entities and 200 types of edge.
180
+
181
+ Table 3: Experimental results on WN18RR, FB15K-237 and NELL-995 test sets. Hits@N values are in percentage. The best score is in bold and second best score is underlined.
182
+
183
+ <table><tr><td rowspan="3">Dataset</td><td colspan="4">WN18RR</td><td colspan="4">FB15K-237</td><td colspan="4">NELL-995</td></tr><tr><td colspan="4"></td><td rowspan="2">MRR</td><td colspan="3">Hit@N%</td><td rowspan="2">MRR</td><td colspan="3">Hit@N %</td></tr><tr><td>MRR</td><td>@1</td><td>@3</td><td>@10</td><td>@1</td><td>@3</td><td>@10</td><td>@1</td><td>@3</td><td>@10</td></tr><tr><td>DistMult</td><td>0.444</td><td>41.2</td><td>47</td><td>50.4</td><td>0.281</td><td>19.9</td><td>30.1</td><td>44.6</td><td>0.485</td><td>40.1</td><td>52.4</td><td>61</td></tr><tr><td>ComplEx</td><td>0.449</td><td>40.9</td><td>46.9</td><td>53</td><td>0.278</td><td>19.4</td><td>29.7</td><td>45</td><td>0.482</td><td>39.9</td><td>52.8</td><td>60.6</td></tr><tr><td>ConvE</td><td>0.456</td><td>41.9</td><td>47</td><td>53.1</td><td>0.312</td><td>22.5</td><td>34.1</td><td>49.7</td><td>0.491</td><td>40.3</td><td>53.1</td><td>61.3</td></tr><tr><td>TransE</td><td>0.243</td><td>42.7</td><td>44.1</td><td>53.2</td><td>0.279</td><td>19.8</td><td>37.6</td><td>44.1</td><td>0.401</td><td>34.4</td><td>47.2</td><td>50.1</td></tr><tr><td>ConvKB</td><td>0.265</td><td>58.2</td><td>44.5</td><td>55.8</td><td>0.289</td><td>19.8</td><td>32.4</td><td>47.1</td><td>0.43</td><td>37.0</td><td>47</td><td>54.5</td></tr><tr><td>R-GCN</td><td>0.123</td><td>8</td><td>13.7</td><td>20.7</td><td>0.164</td><td>10</td><td>18.1</td><td>30</td><td>0.12</td><td>8.2</td><td>12.6</td><td>18.8</td></tr><tr><td>KBGAT</td><td>0.436</td><td>35.8</td><td>48.1</td><td>57.8</td><td>0.431</td><td>36.1</td><td>45.8</td><td>56.9</td><td>0.514</td><td>42.9</td><td>55.3</td><td>67.8</td></tr><tr><td>EIGNN</td><td>0.438</td><td>35.7</td><td>48.8</td><td>58.1</td><td>0.451</td><td>37.4</td><td>48.2</td><td>60.5</td><td>0.523</td><td>43.8</td><td>56.1</td><td>68.3</td></tr></table>
184
+
185
+ A critical issue of applying Eq. (3) to KGs is that high-dimensional embedding vectors are required to distinguish massive amount of entities and relations, leading to a rapid growth in number of parameters in EIGNN. To address this issue, we adopt the architecture of (Nathani et al., 2019) and learn graph attention based embeddings that target relation prediction on KGs as follows,
186
+
187
+ $$
188
+ \begin{array} { r } { m _ { v w } = f \big ( h _ { v } ^ { ( l ) } , e _ { v w } ^ { l } , h _ { w } ^ { ( l ) } \big ) , \alpha _ { v w } ^ { l } = \mathrm { s o f t m a x } \big ( a ^ { l } m _ { v w } ^ { l } \big ) , h _ { v } ^ { ( l + 1 ) } = \sigma \left( \sum _ { w \in \mathcal { N } _ { v } } \alpha _ { v w } ^ { l } m _ { v w } ^ { l } \right) . } \end{array}
189
+ $$
190
+
191
+ Compared with Eq. (3), where $m _ { v w } = f ( e _ { v w } ) h _ { w }$ , the above equation absorbs the transform matrix $f ( e _ { v w } )$ into $f ( h _ { v } ^ { ( l ) } , e _ { v w } , h _ { w } ^ { ( l ) } )$ and reduces the model parameters. In the following experiments, we implement $f$ using a MLP as in previous experiments, and maximizes the MI between $e _ { v w }$ and $m _ { v w }$ by introducing another MLP with $\lambda = 0 . 0 1$ . Multi-head attention is further introduced to stabilize the learning process and encapsulate more information about neighbors according to (Veličković et al., 2018). After training EIGNN, ConvKB (Nguyen et al., 2018) is adopted as a regression function for a given triple by analyzing the global embedding properties across each dimension.
192
+
193
+ In the relation prediction task, the aim is to predict a triple $( v , e _ { v w } , w )$ with $\boldsymbol { v }$ or $w$ missing. We can generate a set of candidate triples for each missing entity $v$ by randomly replacing it with an arbitrary one. Scores can be calculated by ConvKB for all triples, and we find the rank of a correct triple by sorting all scores in ascending order. Thus, the performance of relation prediction task can be evaluated by mean reciprocal rank (MRR) and the proportion of correct entities in the top $N$ ranks (Hits@N) for $N = 1 , 3$ , and 10 (Bordes et al., 2013). We compare our EIGNN with seven state-of-the-art baselines focusing on this task: DistMult (Yang et al., 2014), ComplEx (Trouillon et al., 2016), ConvE (Dettmers et al., 2018), TransE (Bordes et al., 2013), ConvKB (Nguyen et al., 2018), RGCN (Schlichtkrull et al., 2018) and KBGAT (Nathani et al., 2019). As shown in Table 3, our EIGNN achieves the best performance for each metric on FB15K-237 and NELL-995, and achieves the best performance on WN18RR with Hit $^ \mathrm { ( a 3 }$ and 10 metrics. The results of KBGAT are reproduced following the official implementation1, and the results of other methods can be found in the previous peer-reviewed publications, i.e. (Nathani et al., 2019).
194
+
195
+ # 5 Conclusions
196
+
197
+ In this work, to make better use of edge features in GNNs, we proposed the edge information maximized graph neural network (EIGNN) that maximizes the mutual information between edge feature vectors and message passing channels. We reformulated the mutual information as a differentiable objective by adopting a variational approach. We have theoretically proved that our proposed objective enables EIGNN to preserve edge information and empirically evaluated EIGNN’s performance on a variety of benchmarks incorporating an array of challenging molecular datasets and knowledge graphs. These results clearly manifested a substantial improvement of EIGNN over the prior state-of-the-art methods. Apart from demonstrating the impressive performance of EIGNN, we also showed that its effectiveness is due to exploitation of edge features instead of the regularization effect. Notably, attribution analysis on molecular graphs show that EIGNN can capture domain knowledge in an end-to-end fashion.
198
+
199
+ # References
200
+
201
+ David Barber Felix Agakov. The im algorithm: a variational approach to information maximization. NeurIPS, 2004.
202
+
203
+ Patrick Augustijns and Marcus E Brewster. Solvent systems and their selection in pharmaceutics and biopharmaceutics, volume 190. Springer, 2007.
204
+
205
+ David Barber and Felix V Agakov. Kernelized infomax clustering. In NeurIPS, 2006.
206
+
207
+ Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In NeurIPS, pp. 2787–2795, 2013.
208
+
209
+ John S Bridle, Anthony JR Heading, and David JC MacKay. Unsupervised classifiers, mutual information and’phantom targets. In NeurIPS, 1992.
210
+
211
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: interpretable representation learning by information maximizing generative adversarial nets. In NeurIPS, 2016.
212
+
213
+ Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014.
214
+
215
+ Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016.
216
+
217
+ John S Delaney. Esol: estimating aqueous solubility directly from molecular structure. Journal of chemical information and computer sciences, 44(3):1000–1005, 2004.
218
+
219
+ Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. Convolutional 2d knowledge graph embeddings. In AAAI, 2018.
220
+
221
+ David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In NeurIPS, 2015.
222
+
223
+ Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In ICML, 2017.
224
+
225
+ Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 855–864. ACM, 2016.
226
+
227
+ Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, pp. 1024–1034, 2017.
228
+
229
+ R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. 2019.
230
+
231
+ Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Pre-training graph neural networks. arXiv preprint arXiv:1905.12265, 2019.
232
+
233
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
234
+
235
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
236
+
237
+ Andreas Krause, Pietro Perona, and Ryan G Gomes. Discriminative clustering by regularized information maximization. In NeurIPS, 2010.
238
+
239
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016.
240
+
241
+ Renjie Liao, Zhizhen Zhao, Raquel Urtasun, and Richard S Zemel. Lanczosnet: Multi-scale deep graph convolutional networks. In ICLR, 2019.
242
+
243
+ Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988.
244
+
245
+ David L Mobley and J Peter Guthrie. Freesolv: a database of experimental and calculated hydration free energies, with input files. Journal of computer-aided molecular design, 28 (7):711–720, 2014.
246
+
247
+ Christopher Morris, Martin Ritzert, Matthias Fey, William L Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI, volume 33, pp. 4602–4609, 2019.
248
+
249
+ Deepak Nathani, Jatin Chauhan, Charu Sharma, and Manohar Kaul. Learning attentionbased embeddings for relation prediction in knowledge graphs. The 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
250
+
251
+ Dai Quoc Nguyen, Tu Dinh Nguyen, Dat Quoc Nguyen, and Dinh Phung. A novel embedding model for knowledge base completion based on convolutional neural network. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 327–333, 2018.
252
+
253
+ Bianka Prinz, Jerry M Thomas, Ansgar Brock, Viviana Cremasco, Catherine Anne SabatosPeyton, Glenn Dranoff, Scott Chapel, Andrew Lake, Alison Paterson, Rachel W O’connor, et al. Antibody molecules to cd73 and uses thereof, January 31 2019. US Patent App. 16/014,744.
254
+
255
+ Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole Von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific data, 1: 140022, 2014.
256
+
257
+ Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1): 61–80, 2009.
258
+
259
+ Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pp. 593–607. Springer, 2018.
260
+
261
+ Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In ICML, pp. 3319–3328. JMLR. org, 2017.
262
+
263
+ Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Gamon. Representing text for joint embedding of text and knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 1499–1509, 2015.
264
+
265
+ Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In ICML, pp. 2071–2080, 2016.
266
+
267
+ Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In ICLR, 2018.
268
+
269
+ Petar Veličković, William Fedus, William L Hamilton, Pietro Liò, Yoshua Bengio, and R Devon Hjelm. Deep graph infomax. In ICLR, 2019.
270
+
271
+ Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015.
272
+
273
+ Rainer Wilcken, Markus O Zimmermann, Andreas Lange, Andreas C Joerger, and Frank M Boeckler. Principles and applications of halogen bonding in medicinal chemistry and chemical biology. Journal of medicinal chemistry, 56(4):1363–1388, 2013.
274
+
275
+ Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chemical science, 9(2):513–530, 2018.
276
+ Wenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 564–573, 2017.
277
+ Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
278
+ Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. ICLR, 2014.
279
+ Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In NeurIPS, pp. 4800–4810, 2018.
280
+ Jie Zhou, Ganqu Cui, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, and Maosong Sun. Graph neural networks: A review of methods and applications. arXiv preprint arXiv:1812.08434, 2018.
281
+
282
+ # A Full Results on QM9
283
+
284
+ Table 4: Full results of quantum property regressions for 12 targets and overall performance (nMAE and MAE in top two raws) on QM9. We repeat all experiments 3 times with different random seeds and report the average performance and standard deviation. This is a supplement for Table 1. in the main text.
285
+
286
+ <table><tr><td>Method</td><td>GCN</td><td>ChebyNet</td><td>GAT</td><td>GIN</td></tr><tr><td>Avg.nMAE</td><td>0.1350±0.0046</td><td>0.1206±0.0084</td><td>0.1367±0.0050</td><td>0.1001±0.0007</td></tr><tr><td>Avg.MAE</td><td>5.3063±0.1964</td><td>4.3032±0.4814</td><td>5.4698±0.2040</td><td>3.4799±0.0402</td></tr><tr><td>mu</td><td>0.5679±0.0078</td><td>0.5180±0.0131</td><td>0.5670±0.0102</td><td>0.4783±0.0041</td></tr><tr><td>alpha</td><td>0.8811±0.0308</td><td>0.7932±0.0778</td><td>0.8913±0.0314</td><td>0.6209±0.0028</td></tr><tr><td>HOMO(10-3)</td><td>5.4510±0.0790</td><td>4.7750±0.2040</td><td>5.4290±0.1660</td><td>4.1830±0.0370</td></tr><tr><td>LUMO(10-3)</td><td>6.4000±0.1230</td><td>5.6740±0.2670</td><td>6.3310±0.2390</td><td>4.7960±0.0520</td></tr><tr><td>gap(10-3)</td><td>8.2010±0.2150</td><td>7.0970±0.3620</td><td>8.1930±0.2910</td><td>6.0960±0.0420</td></tr><tr><td>R2</td><td>53.563±1.0319</td><td>41.950±4.8289</td><td>54.519±1.5992</td><td>34.647±0.2167</td></tr><tr><td>ZPVE(10-3)</td><td>2.5330±0.1070</td><td>2.5270±0.3560</td><td>2.2710±0.1450</td><td>1.7440±0.0100</td></tr><tr><td>UO</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>U</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>H</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>G</td><td>2.0423±0.3281</td><td>1.9842±0.2036</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>Cv</td><td>0.4730±0.0209</td><td>0.4199±0.0499</td><td>0.4787±0.0164</td><td>0.3093±0.0035</td></tr><tr><td>Method</td><td>RGCN</td><td>GGNN</td><td>LNet</td><td>sMPNN</td></tr><tr><td>Avg.nMAE</td><td>0.1021±0.0016</td><td>0.0992±0.0013</td><td>0.0992±0.0061</td><td>0.0888±0.0014</td></tr><tr><td>Avg.MAE</td><td>3.8175±0.0605</td><td>3.6608±0.0723</td><td>3.6527±0.3417</td><td>3.1610±0.0697</td></tr><tr><td>mu</td><td>0.5056±0.0048</td><td>0.5179±0.0076</td><td>0.4717±0.0063</td><td>0.4718±0.0096</td></tr><tr><td>alpha</td><td>0.6321±0.0145</td><td>0.6077±0.0092</td><td>0.6225±0.0508</td><td>0.5278±0.0106</td></tr><tr><td>HOMO(10-3)</td><td>4.4530±0.1290</td><td>4.4830±0.0650</td><td>3.8889±0.1617</td><td>3.8540±0.0410</td></tr><tr><td>LUMO(10-3)</td><td>5.1380±0.1210</td><td>5.1530±0.0890</td><td>4.1935±0.2205</td><td>4.5490±0.0810</td></tr><tr><td>gap(10-3)</td><td>6.5000±0.1390</td><td>6.6020±0.1400</td><td>5.8132±0.6456</td><td>5.6340±0.0570</td></tr><tr><td>R2</td><td>40.102±0.7428</td><td>39.685±0.8212</td><td>35.275±3.0531</td><td>33.489±0.6562</td></tr><tr><td>ZPVE(10-3)</td><td>1.4770±0.0090</td><td>1.2920±0.0340</td><td>1.4376±0.0769</td><td>1.3450±0.0260</td></tr><tr><td>UO</td><td>1.0589±0.0231</td><td>0.6969±0.0413</td><td>1.8058±0.2533</td><td>0.7914±0.0446</td></tr><tr><td>U</td><td>1.0589±0.0231</td><td>0.6966±0.0418</td><td>1.7555±0.2196</td><td>0.7914±0.0446</td></tr><tr><td>H</td><td>1.0589±0.0231</td><td>0.6974±0.0408</td><td>1.7964±0.2428</td><td>0.7914±0.0446</td></tr><tr><td>G</td><td>1.0589±0.0231</td><td>0.6961±0.0421</td><td>1.7780±0.2458</td><td>0.7914±0.0446</td></tr><tr><td>Cv</td><td>0.3170±0.0152</td><td>0.3146±0.0125</td><td>0.3124±0.0303</td><td>0.2625±0.0040</td></tr><tr><td>Method</td><td>MPNN</td><td>EIGNN</td><td></td><td></td></tr><tr><td>Avg.nMAE</td><td>0.0398±0.0002</td><td>0.0357±0.0005</td><td></td><td></td></tr><tr><td>Avg.MAE</td><td>0.6929±0.0212</td><td>0.6331±0.0298</td><td></td><td></td></tr><tr><td>mu</td><td>0.1095±0.0014</td><td>0.0974±0.0026</td><td></td><td></td></tr><tr><td>alpha</td><td>0.3318±0.0026</td><td>0.2939±0.0054</td><td></td><td></td></tr><tr><td>HOMO(10-3)</td><td>2.4810±0.0200</td><td>2.2300±0.0310</td><td></td><td></td></tr><tr><td>LUMO(10-3)</td><td>2.8620±0.0370</td><td>2.5930±0.0440</td><td></td><td></td></tr><tr><td>gap(10-3)</td><td>3.6200±0.0180</td><td>3.2750±0.0520</td><td></td><td></td></tr><tr><td>R2</td><td>6.0637±0.2511</td><td>5.6464±0.3098</td><td></td><td></td></tr><tr><td>ZPVE(10-3)</td><td>0.6790±0.0140</td><td>0.6120±0.0170</td><td></td><td></td></tr><tr><td>UO</td><td>0.4164±0.0225</td><td>0.3574±0.0100</td><td></td><td></td></tr><tr><td>U</td><td>0.4164±0.0225</td><td>0.3575±0.0100</td><td></td><td></td></tr><tr><td>H</td><td>0.4164±0.0225</td><td>0.3574±0.0100</td><td></td><td></td></tr><tr><td>G</td><td>0.4164±0.0225</td><td>0.3575±0.0101</td><td></td><td></td></tr><tr><td>Cv</td><td>0.1339±0.0013</td><td>0.1208±0.0027</td><td></td><td></td></tr></table>
287
+
288
+ We present full results of quantum property regressions on QM9 with average performance and standard deviation in Table 4. The $( 1 0 ^ { - 3 }$ ) in the parentheses indicates that the values in the corresponding raw of the table should multiply by $1 0 ^ { - 3 }$ . This is simply for clear presentation of the values. We also present a detailed descriptions on the target properties in Table 5 for your reference.
289
+
290
+ In our results, we directly report MAE instead of Error Ratio [(MAE)/(Chemical Accuracy) (Gilmer et al., 2017)], because it is common to report MAE in terms of chemical unit. This practice has been widely adopted not only in computational chemistry but also in the machine learning community working on molecular graphs (Wu et al., 2018; Morris et al., 2019). Still, we add Table 6 which contains the Error Ratio for MPNN and our EIGNN. In this comparison, we follow (Gilmer et al., 2017) and train models separately to predict each target. Our EIGNN consistently outperforms MPNN.
291
+
292
+ Table 5: Regression targets on QM9.
293
+
294
+ <table><tr><td>Target property</td><td>Description</td><td>Unit</td></tr><tr><td>mu</td><td>Dipole moment</td><td>D</td></tr><tr><td>alpha</td><td>Isotropic polarizability</td><td>a</td></tr><tr><td>HOMO</td><td>Highest occupied molecular orbital energy</td><td>Eh</td></tr><tr><td>LUMO</td><td>Lowest unoccupied molecular orbital energy</td><td>Eh</td></tr><tr><td>gap</td><td>Gap between HOMO and LUMO</td><td>Eh</td></tr><tr><td>R2</td><td>Electronic spatial extent</td><td>品</td></tr><tr><td>ZPVE</td><td>Zero point vibrational energy</td><td>Eh</td></tr><tr><td>UO</td><td>Internal energy at OK</td><td>Eh</td></tr><tr><td>U</td><td>Internal energy at 298.15K</td><td>Eh</td></tr><tr><td>H</td><td>Enthalpy at 298.15K</td><td>Eh</td></tr><tr><td>G</td><td>Free energy at 298.15K</td><td>Eh</td></tr><tr><td>Cv</td><td>Heat capavity at 298.15K</td><td>cal molK</td></tr></table>
295
+
296
+ Table 6: Error Ratio [(MAE)/(Chemical Accuracy) (Gilmer et al., 2017)] on QM9. Note that the energy values of $\{ \mathrm { U 0 , ~ U , ~ H , ~ G } \}$ are per molecule rather than per atom. Following (Gilmer et al., 2017), models are separately trained on each target.
297
+
298
+ <table><tr><td>Target</td><td>MPNN</td><td>EIGNN</td><td>Improvement (%)</td></tr><tr><td>mu</td><td>0.87</td><td>0.80</td><td>8.24</td></tr><tr><td>alpha</td><td>2.64</td><td>2.44</td><td>7.57</td></tr><tr><td>HOMO</td><td>1.54</td><td>1.39</td><td>10.2</td></tr><tr><td>LUMO</td><td>1.31</td><td>1.28</td><td>2.13</td></tr><tr><td>gap</td><td>2.20</td><td>1.97</td><td>10.4</td></tr><tr><td>R2</td><td>1.00</td><td>0.72</td><td>28.4</td></tr><tr><td>ZPVE</td><td>5.31</td><td>4.43</td><td>16.5</td></tr><tr><td>UO</td><td>64.3</td><td>35.8</td><td>44.4</td></tr><tr><td>U</td><td>56.6</td><td>23.6</td><td>58.3</td></tr><tr><td>H</td><td>77.4</td><td>35.2</td><td>54.5</td></tr><tr><td>G</td><td>46.6</td><td>34.4</td><td>26.1</td></tr><tr><td>Cv</td><td>1.69</td><td>1.79</td><td>-6.22</td></tr></table>
299
+
300
+ B Full Results on Lipophilicity, ESOL and FreeSolv
301
+
302
+ In this section, we present experimental results on Lipophilicity, ESOL and FreeSolv with detailed results for each run. The results in Table 7 verify that our EIGNN consistently outperforms MPNN.
303
+
304
+ # C More Examples of Attribution
305
+
306
+ In this section, we present more examples of attribution analysis on Lipophilicity. As a supplement for Fig. 2 in the main text, the observation here is similar. Compared with MPNN, we can observe an increasing of overall edge attribution under our EIGNN and a decreasing of prediction error in both cases. Notably, our EIGNN is able to capture the expert knowledge. (a) The molecule is $C N [ C @ \mathbb { Q } H ] ( C ) C ( = O ) N [ C @ \mathbb { Q } H ] ( C 1 C C C C T 1 ) C ( =$ $O ) N [ C @ H ] 2 C C C N ( C C c ( F ) c c 3 ) C 2$ . The attribution of $\{ \mathrm { O } , \mathrm { N } \}$ and the halogen atom $\mathrm { F }$ is higher under EIGNN. (b) The molecule is $C C ( C ) N 1 C C N [ C @ H ] ( C 1 ) C ( =$ $O ) N 2 C C N ( C C 2 ) C ( = O ) N c 3 c c c ( C l ) c ( C l ) c 3$ . Our EIGNN successfully captures the importance of two critical halogen atoms Cl and several atoms N. (c) The molecule is $C O c 1 c c ( c c 1 ) C ( = \ O ) N 2 C C C C 2 \ = \ O$ . The attribution of two atoms $\mathrm { \ o }$ at the top is
307
+
308
+ Table 7: Testing RMSE on Lipophilicity, ESOL and FreeSolv. This is a supplement for Table 2 in the main text.
309
+
310
+ <table><tr><td>Dataset</td><td colspan="2">Lipophilicity</td><td colspan="2">ESOL</td><td colspan="2">FreeSolv</td></tr><tr><td>Seed</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>0</td><td>0.718</td><td>0.676</td><td>0.770</td><td>0.718</td><td>1.396</td><td>1.109</td></tr><tr><td>1</td><td>0.696</td><td>0.664</td><td>0.750</td><td>0.733</td><td>1.299</td><td>1.265</td></tr><tr><td>2</td><td>0.620</td><td>0.619</td><td>0.894</td><td>0.876</td><td>1.499</td><td>1.443</td></tr><tr><td>mean±std</td><td>0.678±0.042</td><td>0.653±0.025</td><td>0.805±0.064</td><td>0.776±0.071</td><td>1.398±0.081</td><td>1.273±0.137</td></tr></table>
311
+
312
+ much higher under EIGNN. (d) The molecule is $C c 1 c c 2 N C ( = O ) C ( = C C ( = O ) c 2 c c 1 C ) O$ .
313
+ The attribution of atoms O is much higher under EIGNN.
314
+
315
+ ![](images/d35b4c5026ccc9e9cd8864632869ef2ae4dd487409a61f9850c2293c8640530b.jpg)
316
+ Figure 3: More examples of attribution analysis. The color indicates the impact of an edge/atom on the output, i.e., the regression result. EIGNN i) increases the edge attribution, ii) reduces the prediction error and iii) can learn domain knowledge without human interference.
parse/train/BygZK2VYvB/BygZK2VYvB_content_list.json ADDED
@@ -0,0 +1,1581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Utilizing Edge Features in Graph Neural Networks via Variational Information Maximization ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 826,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 184,
19
+ 195,
20
+ 419,
21
+ 223
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 452,
31
+ 260,
32
+ 545,
33
+ 275
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Graph Neural Networks (GNNs) broadly follow the scheme that the representation vector of each node is updated recursively using the message from neighbor nodes, where the message of a neighbor is usually pre-processed with a parameterized transform matrix. To make better use of edge features, we propose the Edge Information maximized Graph Neural Network (EIGNN) that maximizes the Mutual Information (MI) between edge features and message passing channels. The MI is reformulated as a differentiable objective via a variational approach. We theoretically show that the newly introduced objective enables the model to preserve edge information, and empirically corroborate the enhanced performance of MI-maximized models across a broad range of learning tasks including regression on molecular graphs and relation prediction in knowledge graphs. ",
40
+ "bbox": [
41
+ 233,
42
+ 291,
43
+ 764,
44
+ 459
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 488,
55
+ 339,
56
+ 503
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Many real-world datasets naturally come in the form of graphs, such as citation networks (Kipf & Welling, 2017), social networks Hamilton et al. (2017), knowledge graphs (Schlichtkrull et al., 2018), molecular graphs (Scarselli et al., 2009; Duvenaud et al., 2015) etc., all of which consist of a number of nodes and edges equipped with their inherent features. Recently, impressive performance has been achieved in graph learning tasks with various forms of Graph Neural Networks (GNNs) (Zhou et al., 2018). Compared to prior works, such as node2vec (Grover & Leskovec, 2016), GNNs learn the state of a node by recursively aggregating messages from its neighbors: combining the graph structure with node features. Intuitively, edge features should play an important role in graph learning tasks. For example, chemical bonds in a molecule have a high impact on chemical properties of molecules, and edge features in knowledge graphs encode important relations between concepts, data, and entities. Our proposed method focuses on improving the usage of edge features in GNNs. ",
63
+ "bbox": [
64
+ 174,
65
+ 520,
66
+ 825,
67
+ 686
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The expressive power of GNNs largely depends on how the message is passed between nodes. A widely adopted scheme is multiplying neighbor node states with a parameterized transform matrix before aggregation (Gilmer et al., 2017; Xu et al., 2019). Despite tremendous success of GNNs, existing models do not exhaustively exploit the full potentials of edge features on graphs. For example, many GNNs such as GCN (Kipf & Welling, 2017), ChebyNet (Defferrard et al., 2016) and GAT (Veličković et al., 2018) do not even consider categorized edge types. To utilize edge features in multi-relational graphs, RGCN (Schlichtkrull et al., 2018) proposes to learn a different transform matrix for each edge type, respectively. However, it does not generalize to edge features in continuous space. MPNN (Gilmer et al., 2017) introduces an edge network that takes edge feature vectors as input and outputs transform matrices, which are used to transform states of neighbor nodes. In principle, the MPNN framework can handle complex edge features. Yet, the lack of maximization of MI between edge and message channels implies that the MPNN may give an edge-independent transform matrix. ",
74
+ "bbox": [
75
+ 174,
76
+ 694,
77
+ 825,
78
+ 875
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this work, we aim to more efficiently exploit the full potentials of edge features from the perspective of training. We propose the Edge Information maximized Graph Neural Network (EIGNN) that maximizes the Mutual Information (MI) between edge features and the message passing channel which is parameterized as the transform matrix in the widely-accepted message passing framework (transformation and aggregation) (Gilmer et al., 2017; Xu et al., 2019). Considering the challenge of computing the MI, we adopt a variational approach to reformulate it as an differentiable objective, which can be easily applied as a regularization term. We theoretically show that EIGNN can reduce information loss of edge features. Apart from demonstrating the impressive performance of EIGNN on extensive benchmarks of molecular graphs and knowledge graphs, we also analyze and attribute the enhanced effectiveness of EIGNN to the exploitation of edge features instead of the regularization effects. Notably, attribution analysis on molecular graphs show that EIGNN can capture domain knowledge without human interference. ",
85
+ "bbox": [
86
+ 176,
87
+ 882,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 243
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Preliminaries Let $G = ( \\nu , \\mathcal { E } )$ be a graph with node feature vectors $x _ { v } \\in \\mathbb { R } ^ { d }$ for node $v \\in \\nu$ and edge feature vectors $e _ { v w } \\in \\mathcal { E }$ for the edge connecting node $v$ and $w$ . In GNNs, the state of each node is updated recursively using neighbor nodes. Let $\\mathcal { N } _ { v }$ be the set of neighbor nodes of $v$ and $h _ { v } ^ { ( l ) } \\in \\mathbb { R } ^ { d _ { l } }$ be the hidden state of $v$ at $\\it l$ -th layer, where $d _ { l }$ is the dimension of the hidden layer. For simplicity of notation, we use a single $d$ to denote the dimension such that $h _ { v } ^ { ( l ) } \\in \\mathbb { R } ^ { d }$ . We also have $h _ { v } ^ { ( 0 ) } = x _ { v }$ at the input layer. ",
107
+ "bbox": [
108
+ 173,
109
+ 256,
110
+ 825,
111
+ 347
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 Related works ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 364,
122
+ 357,
123
+ 381
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "2.1 Relational Modeling in Graph Neural Networks ",
130
+ "text_level": 1,
131
+ "bbox": [
132
+ 174,
133
+ 393,
134
+ 630,
135
+ 410
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "Single-relational modeling. Many variants such as GCN (Kipf & Welling, 2017), GAT (Veličković et al., 2018), ChebyNet (Defferrard et al., 2016), GraphSAGE (Hamilton et al., 2017) focus on learning node states. These models can assign weight to neighbors, but they can not handle various edge features. A typical neighborhood aggregation scheme is ",
142
+ "bbox": [
143
+ 173,
144
+ 420,
145
+ 825,
146
+ 477
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "equation",
152
+ "img_path": "images/897a3f0394352afdd981afc2c5beb5e43696de6f029404d486b83b2d43b34699.jpg",
153
+ "text": "$$\nh _ { v } ^ { ( l + 1 ) } = \\sigma \\left( \\sum _ { w \\in \\mathcal { N } _ { v } } \\alpha _ { v w } W _ { 1 } ^ { ( l ) } h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \\right) ,\n$$",
154
+ "text_format": "latex",
155
+ "bbox": [
156
+ 334,
157
+ 478,
158
+ 663,
159
+ 503
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "where $\\sigma$ denotes an activation function, $\\alpha _ { v w }$ can be a normalization constant or a learned attention coefficient (Veličković et al., 2018). States of all neighbors are multiplied by the same trainable transform matrix $W _ { 1 } ^ { ( l ) }$ . Sometimes the self-connection is also treated in the same way, s.t., W (l)0 = W (l)1 . ",
166
+ "bbox": [
167
+ 174,
168
+ 505,
169
+ 825,
170
+ 569
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Multi-relational modeling. A simple strategy to handle multi-relational graphs is assigning each edge type with a separate transform matrix as presented in RGCN (Schlichtkrull et al., 2018) and adopted by GGNN (Li et al., 2016) and LNet (Liao et al., 2019). RGCN updates node states according to the following scheme ",
177
+ "bbox": [
178
+ 174,
179
+ 582,
180
+ 825,
181
+ 637
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "equation",
187
+ "img_path": "images/2ed04d513db0882ec07a019e0ecc97ba5d85793352a6b0896db29b31bf4e31a2.jpg",
188
+ "text": "$$\n\\begin{array} { r } { h _ { v } ^ { ( l + 1 ) } = \\sigma \\left( \\sum _ { r \\in \\mathcal { R } } \\sum _ { w \\in \\mathcal { N } _ { v } ^ { r } } \\alpha _ { v w , r } W _ { r } ^ { ( l ) } h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \\right) , } \\end{array}\n$$",
189
+ "text_format": "latex",
190
+ "bbox": [
191
+ 299,
192
+ 638,
193
+ 697,
194
+ 672
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "where $\\mathcal { N } _ { v } ^ { r }$ is the collection of neighboring nodes of $\\boldsymbol { v }$ with relation $r \\in \\mathcal { R }$ and $\\alpha _ { v w , r }$ is a normalization constant similar as $\\alpha _ { v w }$ in Eq. (1). Such a scheme faces challenge in handling edge features of continuous space. GGNN and LNet do not focus on the improvement of edge expressibility. GGNN introduces Gated Recurrent Unit (GRU) (Cho et al., 2014) and LNet focus on handling multi-scale connections. ",
201
+ "bbox": [
202
+ 174,
203
+ 672,
204
+ 825,
205
+ 743
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "Complex-relational modeling. The relation in a graph can be quite complex, expressed as a general feature vector $e$ . MPNN (Gilmer et al., 2017) introduces an edge network which takes edge feature vectors as input and outputs transform matrices. A single edge network is shared in a MPNN model. The forward propagation is formalized as ",
212
+ "bbox": [
213
+ 174,
214
+ 756,
215
+ 823,
216
+ 811
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "equation",
222
+ "img_path": "images/fa5600ecca6e4db258cd8b03cebc33d5e5982081f6001312ac655c155dc4299d.jpg",
223
+ "text": "$$\nm _ { v } ^ { ( l + 1 ) } = \\sigma \\left( \\sum _ { w \\in \\mathcal { N } _ { v } } f ( e _ { v w } ) h _ { w } ^ { ( l ) } + W _ { 0 } ^ { ( l ) } h _ { v } ^ { ( l ) } \\right) , \\quad h _ { v } ^ { ( l + 1 ) } = \\mathrm { G R U } ( h _ { v } ^ { ( l ) } , m _ { v } ^ { ( l + 1 ) } ) ,\n$$",
224
+ "text_format": "latex",
225
+ "bbox": [
226
+ 232,
227
+ 813,
228
+ 764,
229
+ 839
230
+ ],
231
+ "page_idx": 1
232
+ },
233
+ {
234
+ "type": "text",
235
+ "text": "where $f : e W$ denotes the edge network. Recently, some research works treat a multirelational problem as the complex-relational one by introducing a continuous edge embedding vector for each edge type, so as to handle increasing number of relations (Nathani et al., 2019). Although the MPNN architecture allows the usage of arbitrary edge features, this advantage is not utilized in practice. MPNN can actually learn an edge-independent transform matrix. A GNN model that efficiently utilizes edge features is yet to emerge. ",
236
+ "bbox": [
237
+ 173,
238
+ 840,
239
+ 826,
240
+ 924
241
+ ],
242
+ "page_idx": 1
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "2.2 Readout functions ",
247
+ "text_level": 1,
248
+ "bbox": [
249
+ 174,
250
+ 103,
251
+ 377,
252
+ 117
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "After several forward propagations, GNNs yield final states of all nodes, which are suitable for node/edge classification or regression. For graph classification or regression tasks, we can apply a readout function (Ying et al., 2018; Vinyals et al., 2015) such that ",
259
+ "bbox": [
260
+ 174,
261
+ 128,
262
+ 825,
263
+ 171
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "equation",
269
+ "img_path": "images/6b3aeb614b48bbadc542b9ff62623957cbe52cd0d89c9bf49da41a0802158ccd.jpg",
270
+ "text": "$$\ny = R ( \\{ h _ { v } ^ { L } | v \\in G \\} ) ,\n$$",
271
+ "text_format": "latex",
272
+ "bbox": [
273
+ 428,
274
+ 175,
275
+ 570,
276
+ 193
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "where $h _ { v } ^ { L }$ is the state of $v$ at the last layer, $R$ is the readout function that outputs a graph-level representation $y$ , e.g., summing up the final node states, applying hierarchical pooling (Ying et al., 2018) or using the set2set model (Vinyals et al., 2015). ",
283
+ "bbox": [
284
+ 174,
285
+ 195,
286
+ 825,
287
+ 238
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "3 Our method ",
294
+ "text_level": 1,
295
+ "bbox": [
296
+ 176,
297
+ 256,
298
+ 328,
299
+ 272
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "3.1 The Usage of Mutual Information ",
306
+ "text_level": 1,
307
+ "bbox": [
308
+ 173,
309
+ 285,
310
+ 508,
311
+ 300
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "In probability theory and information theory, MI is a measure of mutual dependence between two random variables. Our method proposes to preserve edge information in GNNs, which is important in many real-world graph structures such as molecules - apart from node (atom) features, attributes of edges (bonds) are equally important for predicting properties of molecules. To this end, we maximize $I ( e ; W )$ - the MI between the edge feature vector $e$ and the message passing channel, i.e., the transform matrix $W$ which is used to transform neighbor node states in the forward propagation. Our method can be easily generalized to directly maximize the MI between edge features and the message itself in methods that do not explicitly have the transform matrix, e.g., the message from node $w$ to node $v$ can be expressed as $f ( h _ { v } , e _ { v w } , h _ { w } )$ rather than $f ( e _ { v w } ) h _ { w }$ , which is shown in Section 4.3. ",
318
+ "bbox": [
319
+ 173,
320
+ 311,
321
+ 825,
322
+ 452
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "An general principle of maximum MI is described for unsupervised learning task by (Linsker, 1988) and MI inspired objective functions have long been adopted in unsupervised learning (Bridle et al., 1992; Barber & Agakov, 2006; Veličković et al., 2019; Hjelm et al., 2019), semi-supervised learning (Krause et al., 2010) and generative adversarial networks (Chen et al., 2016). Specifically, DGI (Veličković et al., 2019) also applies MI to GNNs. DGI proposes to learn node-wise representations in an unsupervised manner by maximizing the MI between node representations and corresponding high-level summaries of graphs, using adversarial learning and negative sampling. The node representations may then be retrieved and used for downstream tasks, such as node classification. DGI can be used to pre-train GNNs, as demonstrated in Hu et al. (2019). Our EIGNN also proposes information maximization but targets a completely different objective and adopts a quite different approach. ",
329
+ "bbox": [
330
+ 173,
331
+ 457,
332
+ 825,
333
+ 611
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "3.2 A Variational Approach to Maximize Mutual Information ",
340
+ "text_level": 1,
341
+ "bbox": [
342
+ 174,
343
+ 626,
344
+ 704,
345
+ 641
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Computing $I ( e ; W )$ itself is intractable in practice, needless to say that training a model requires the derivative. Thus, we adopt a variational approach (Agakov, 2004) to reformulate $I ( e ; W )$ as a differentiable objective. We show that our objective is an approximated lower bound of $I ( e ; W )$ and notably, optimizing our objective does lead to maximizing $I ( e ; W )$ . Following MPNN (Gilmer et al., 2017), we use an edge network to parameterize the transform matrix $W$ and relate it to edge features. Therefore, the prior $p ( W | e )$ is ",
352
+ "bbox": [
353
+ 174,
354
+ 651,
355
+ 825,
356
+ 737
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "equation",
362
+ "img_path": "images/064575c5b1ecce9a7f7dbda9406409bc548a24e03885ab642abea6e3861b477f.jpg",
363
+ "text": "$$\np ( W | e ) = \\delta ( W - f ( e ) ) ,\n$$",
364
+ "text_format": "latex",
365
+ "bbox": [
366
+ 415,
367
+ 739,
368
+ 581,
369
+ 756
370
+ ],
371
+ "page_idx": 2
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "where $\\delta ( \\cdot )$ is the Dirac delta function. The posterior $p ( e | W )$ is intractable, so we define a variational distribution $q ( e | W )$ , which can be obtained by defining a neural network $g : W \\to e$ Specifically, $q ( e | W )$ substitutes to some distribution (such as Gaussian distribution) with parameter $g ( W )$ . In this way, $f$ and $g$ are similar to the probabilistic encoder and decoder in the Variational Auto-Encoder (VAE) (Kingma $\\&$ Welling, 2013). Then we can approximate $I ( e ; W )$ with a differentiable objective $L _ { I } ( f , g ; e )$ as follows. ",
376
+ "bbox": [
377
+ 174,
378
+ 757,
379
+ 825,
380
+ 843
381
+ ],
382
+ "page_idx": 2
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "Theorem 1. Let e be the edge feature vector, $W$ be the transform matrix with conditional distribution $p ( W | e )$ specified by the probabilistic encoder $f$ as shown in Eq. (5) and $q ( e | W )$ be the variational distribution specified by the probabilistic decoder $g$ , then we have ",
387
+ "bbox": [
388
+ 174,
389
+ 844,
390
+ 825,
391
+ 886
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "equation",
397
+ "img_path": "images/1ddb6427dd9ce6d7604222cb7abb1323181e83e653a98be12246cba2bb6046d8.jpg",
398
+ "text": "$$\nI ( e ; W ) \\geq H ( e ) + \\mathbb { E } _ { e \\sim p ( e ) } [ \\mathcal { L } _ { I } ( f , g ; e ) ] ,\n$$",
399
+ "text_format": "latex",
400
+ "bbox": [
401
+ 364,
402
+ 890,
403
+ 632,
404
+ 906
405
+ ],
406
+ "page_idx": 2
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "where $\\mathcal { L } _ { I } ( f , g ; e ) = \\log q ( e | f ( e ) )$ and $H ( \\cdot )$ denotes the entropy. ",
411
+ "bbox": [
412
+ 173,
413
+ 909,
414
+ 617,
415
+ 925
416
+ ],
417
+ "page_idx": 2
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "Proof. Let $D _ { K L } ( \\cdot \\parallel \\cdot )$ denote the KL-divergence, which should be nonnegative, then we have ",
422
+ "bbox": [
423
+ 173,
424
+ 102,
425
+ 823,
426
+ 119
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "equation",
432
+ "img_path": "images/d1f9d2080ad50a36557e6e9a92ee313414557012e82f952539a8c31f6ce4b4bc.jpg",
433
+ "text": "$$\n\\begin{array} { r l } { I ( e ; W ) = H ( e ) - H ( e | W ) } & { } \\\\ { \\ } & { = H ( e ) + \\mathbb { E } _ { W \\sim p ( W ) } [ \\mathbb { E } _ { e \\sim p ( e | W ) } [ \\log p ( e | W ) ] ] } \\\\ { \\ } & { = H ( e ) + \\mathbb { E } _ { W \\sim p ( W ) } [ \\mathbb { E } _ { e \\sim p ( e | W ) } [ \\log p ( e | W ) - \\log q ( e | W ) + \\log q ( e | W ) ] ] } \\\\ { \\ } & { = H ( e ) + \\mathbb { E } _ { W \\sim p ( W ) } [ D _ { K L } ( p ( e | W ) \\| q ( e | W ) ) + \\mathbb { E } _ { e \\sim p ( e | W ) } [ \\log q ( e | W ) ] ] } \\\\ { \\ } & { \\geq H ( e ) + \\mathbb { E } _ { W \\sim p ( W ) } [ \\mathbb { E } _ { e \\sim p ( e | W ) } [ \\log q ( e | W ) ] ] } \\\\ { \\ } & { = H ( e ) + \\mathbb { E } _ { e \\sim p ( e ) , W \\sim p ( W | e ) } [ \\log q ( e | W ) ] } \\\\ { \\ } & { \\stackrel { ( a ) } { = } H ( e ) + \\mathbb { E } _ { e \\sim p ( e ) } [ \\log q ( e | f ( e ) ) ] } \\end{array}\n$$",
434
+ "text_format": "latex",
435
+ "bbox": [
436
+ 222,
437
+ 123,
438
+ 774,
439
+ 262
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "where the equality ( $a$ ) follows from Eq. (5). ",
446
+ "bbox": [
447
+ 173,
448
+ 265,
449
+ 485,
450
+ 281
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "According to Theorem 1, we can maximize the variational lower bound for $I ( e ; W )$ . The bound becomes tight when the variational distribution $q ( e | W )$ approaches the true posterior $p ( e | W )$ . Moreover, $H ( e )$ is a constant because the distribution of edge feature vector $e$ is fixed for given graphs, hence we can equivalently maximize $\\mathcal { L } _ { I } ( f , g ; e )$ . We choose the widely accepted Gaussian distribution as the prior distribution for the probabilistic decoder $g$ , ",
457
+ "bbox": [
458
+ 173,
459
+ 295,
460
+ 825,
461
+ 366
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "equation",
467
+ "img_path": "images/f8a4483a3180430a353a9084a23a720e3b8ae44919cce3c219973627c201c39d.jpg",
468
+ "text": "$$\nq ( e | W ) = \\mathcal { N } ( e ; g ( W ) , \\sigma ^ { 2 } I ) .\n$$",
469
+ "text_format": "latex",
470
+ "bbox": [
471
+ 401,
472
+ 369,
473
+ 596,
474
+ 387
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Then we have ",
481
+ "bbox": [
482
+ 174,
483
+ 391,
484
+ 274,
485
+ 405
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "equation",
491
+ "img_path": "images/f9aff49d6e2e211ee2f081b682d6476c98870ba18a9bff3393ceb13b8bcdb085.jpg",
492
+ "text": "$$\n\\mathcal { L } _ { I } ( f , g ; e ) = \\log q ( e | f ( e ) ) = \\log \\mathcal { N } ( e ; g ( f ( e ) ) , \\sigma ^ { 2 } I ) = - \\lambda \\| e - g ( f ( e ) ) \\| _ { 2 } ^ { 2 }\n$$",
493
+ "text_format": "latex",
494
+ "bbox": [
495
+ 250,
496
+ 410,
497
+ 750,
498
+ 428
499
+ ],
500
+ "page_idx": 3
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "where $\\lambda > 0$ is a constant determined by $\\sigma$ and the dimension of $e$ , taken as a tunable parameter. The following Theorem 2 shows that maximizing the objective in Eq. (8) does lead to the maximization of $I ( e ; W )$ , hence enables the model to preserve edge information. ",
505
+ "bbox": [
506
+ 174,
507
+ 433,
508
+ 825,
509
+ 474
510
+ ],
511
+ "page_idx": 3
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "Theorem 2. Assume the optimal solution of maximizing $\\mathcal { L } _ { I } ( f , g ; e )$ is $f ^ { \\star }$ and $g ^ { \\star }$ , then $f ^ { \\star }$ also maximizes $I ( e ; W )$ . ",
516
+ "bbox": [
517
+ 173,
518
+ 477,
519
+ 821,
520
+ 507
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "Proof. Note that $H ( e )$ is a constant when the graphs are given. In information theory, we have ",
527
+ "bbox": [
528
+ 169,
529
+ 521,
530
+ 821,
531
+ 547
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "equation",
537
+ "img_path": "images/2a778d2e9fad80245dd43235b7a2babb5068136039b0572e8acfda673570fcb7.jpg",
538
+ "text": "$$\nH ( g ( f ( e ) ) ) \\leq H ( f ( e ) ) \\leq H ( e ) .\n$$",
539
+ "text_format": "latex",
540
+ "bbox": [
541
+ 387,
542
+ 549,
543
+ 611,
544
+ 564
545
+ ],
546
+ "page_idx": 3
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "$I ( e ; W )$ is upper bounded by $H ( e )$ , ",
551
+ "bbox": [
552
+ 176,
553
+ 566,
554
+ 428,
555
+ 582
556
+ ],
557
+ "page_idx": 3
558
+ },
559
+ {
560
+ "type": "equation",
561
+ "img_path": "images/a305eb6f7f8a26722c22a657ceb5288b473051298c22bbc93edee7a5d363b310.jpg",
562
+ "text": "$$\nI ( e ; W ) = I ( e ; f ( e ) ) = H ( f ( e ) ) - H ( f ( e ) | e ) = H ( f ( e ) ) \\leq H ( e ) .\n$$",
563
+ "text_format": "latex",
564
+ "bbox": [
565
+ 272,
566
+ 588,
567
+ 723,
568
+ 603
569
+ ],
570
+ "page_idx": 3
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "Since $f ^ { \\star }$ and $g ^ { \\star }$ is the optimal solution of maximizing $\\mathcal { L } _ { I } ( f , g ; e )$ presented in Eq. (8), it is not difficult to see that $e = g ^ { \\star } ( f ^ { \\star } ( e ) ) , \\forall e \\in \\mathcal { E }$ . In this case, the inequalities in Eq. 9 become equalities, i.e., ",
575
+ "bbox": [
576
+ 174,
577
+ 607,
578
+ 825,
579
+ 648
580
+ ],
581
+ "page_idx": 3
582
+ },
583
+ {
584
+ "type": "equation",
585
+ "img_path": "images/809dfe6268777d2ba705ed212906089485ef5b8dcf78fafc8f140c20b3eecaed.jpg",
586
+ "text": "$$\nH ( g ^ { \\star } ( f ^ { \\star } ( e ) ) ) = H ( f ^ { \\star } ( e ) ) = H ( e ) .\n$$",
587
+ "text_format": "latex",
588
+ "bbox": [
589
+ 377,
590
+ 650,
591
+ 617,
592
+ 665
593
+ ],
594
+ "page_idx": 3
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "Therefore, we have $I ( e ; W ) = H ( e )$ , i.e., the maximum is attained in this case. ",
599
+ "bbox": [
600
+ 174,
601
+ 666,
602
+ 735,
603
+ 681
604
+ ],
605
+ "page_idx": 3
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "3.3 Edge Information Maximized Graph Neural Networks ",
610
+ "bbox": [
611
+ 176,
612
+ 695,
613
+ 673,
614
+ 712
615
+ ],
616
+ "page_idx": 3
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "Our EIGNN is derived by implementing our MI objective in GNNs. As a concrete example, the forward propagation of our model follows the formulation in Eq. (3), where the dege network $f : e W$ is expressed as a multi-layer perceptron (MLP). According to theoretical analysis presented in Sec. 3.2 , we introduce another MLP $g : W \\to e$ as the decoder. ",
621
+ "bbox": [
622
+ 173,
623
+ 722,
624
+ 825,
625
+ 779
626
+ ],
627
+ "page_idx": 3
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "For graph regression or classification tasks, the model outputs a prediction $y$ for each graph $G$ , which has label $\\hat { y }$ . Without MI maximization, we denote the vanilla loss as $\\mathcal { L } _ { 0 } ( \\hat { y } , y ; G )$ . Common choice of $\\mathcal { L } _ { 0 }$ includes Mean Square Error (MSE), Mean Absolute Error (MAE) and Cross Entropy (CE). For a graph $G = ( \\nu , \\mathcal { E } )$ , EIGNN maximizes $\\mathcal { L } _ { I } ( f , g ; e )$ and minimizes $\\mathcal { L } _ { 0 } ( \\hat { y } , y ; G )$ using the following loss function ",
632
+ "bbox": [
633
+ 173,
634
+ 785,
635
+ 825,
636
+ 856
637
+ ],
638
+ "page_idx": 3
639
+ },
640
+ {
641
+ "type": "equation",
642
+ "img_path": "images/e9ffed3d9ec064286879e4ca1479706a35dcaf6e9fa768bf67f604003845c77f.jpg",
643
+ "text": "$$\n\\mathcal { L } _ { E I G N N } ( G ) = \\mathcal { L } _ { 0 } ( \\hat { y } , y ; G ) - \\lambda \\mathbb { E } _ { e \\in \\mathcal { E } } [ \\mathcal { L } _ { I } ( f , g ; e ) ] ,\n$$",
644
+ "text_format": "latex",
645
+ "bbox": [
646
+ 331,
647
+ 861,
648
+ 666,
649
+ 877
650
+ ],
651
+ "page_idx": 3
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "where $\\mathbb { E } _ { e \\in \\mathcal { E } } [ \\cdot ]$ denotes taking the mean over all edges in $G = ( \\nu , \\mathcal { E } )$ and $\\lambda$ is the regularization parameter. When EIGNN is trained using mini-batches, $\\mathcal { L } _ { 0 } ( \\hat { y } , y ; G )$ is averaged over all graphs in the batch while $\\mathcal { L } _ { I } ( f , g ; e )$ is averaged over all edges of all graphs in the batch. ",
656
+ "bbox": [
657
+ 174,
658
+ 881,
659
+ 825,
660
+ 924
661
+ ],
662
+ "page_idx": 3
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Similarly, for relational prediction tasks in knowledge graphs, EIGNN directly yields nodelevel representations $h _ { v }$ for each node $v \\in \\mathcal V$ and edge-level representations $e$ for each relationship. The objective function of EIGNN can be derived from the translational scoring function Bordes et al. (2013), which learns embedding such that for a given valid triple $t _ { v w } = ( h _ { v } , e _ { v w } , h _ { w } )$ from the valid set $S$ , the condition $d _ { t _ { v w } } = h _ { v } + e _ { v w } - h _ { w } \\approx 0$ holds. Let $\\mathcal { L } _ { 0 } = \\mathbb { E } _ { t _ { v w } \\in S } \\mathbb { E } _ { t _ { v w } ^ { \\prime } \\in S ^ { \\prime } } \\operatorname* { m a x } \\{ d _ { t _ { v w } ^ { \\prime } } - d _ { t _ { v w } } + \\gamma , 0 \\}$ , where $S ^ { \\prime }$ denotes a set of invalid triples and $\\gamma$ is a margin hyper-parameter, EIGNN can be trained by minimizing the following loss, ",
667
+ "bbox": [
668
+ 173,
669
+ 102,
670
+ 825,
671
+ 202
672
+ ],
673
+ "page_idx": 4
674
+ },
675
+ {
676
+ "type": "equation",
677
+ "img_path": "images/6b4942e4c4e30ad4a1ef853dea11681cee7cc1ec7a668a18ce808e38004cbe7e.jpg",
678
+ "text": "$$\n\\mathcal { L } _ { E I G N N } ( G ) = \\mathcal { L } _ { 0 } - \\lambda \\mathbb { E } _ { e \\in \\mathcal { E } } [ \\mathcal { L } _ { I } ( f , g ; e ) ] .\n$$",
679
+ "text_format": "latex",
680
+ "bbox": [
681
+ 359,
682
+ 209,
683
+ 638,
684
+ 226
685
+ ],
686
+ "page_idx": 4
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "4 Experiments ",
691
+ "text_level": 1,
692
+ "bbox": [
693
+ 176,
694
+ 244,
695
+ 333,
696
+ 261
697
+ ],
698
+ "page_idx": 4
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "In this section, we first conduct experiments on a large quantum chemistry benchmark QM9, which is challenging for most baselines. Then we evaluate EIGNN on several useful molecule benchmarks and use attribution analysis to show that EIGNN increases the impact of edges and captures domain knowledge without human interference. Finally, we adopt our method to large-scale knowledge graphs and evaluate the performance on challenging relation prediction tasks using a wide variety of real-world datasets. All experimental results demonstrate a clear and substantial improvement of EIGNN over the state-of-the-art methods. ",
703
+ "bbox": [
704
+ 173,
705
+ 276,
706
+ 825,
707
+ 375
708
+ ],
709
+ "page_idx": 4
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "4.1 Quantum Chemistry ",
714
+ "text_level": 1,
715
+ "bbox": [
716
+ 176,
717
+ 391,
718
+ 382,
719
+ 406
720
+ ],
721
+ "page_idx": 4
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "QM9 (Ramakrishnan et al., 2014) is a large benchmark containing 134k molecules with 12 quantum chemistry regression properties, which have been show to be quite challenging for many GNNs (Gilmer et al., 2017). Feature engineering of nodes and edges exactly follows (Gilmer et al., 2017) such that molecules are preprocessed as graphs according to atom features and bond features. We compare our EIGNN with nine state-of-the-art baselines which can be categorized into three groups according to the ability of handling edge features: i) GCN, ChebyNet, GAT and GIN (Xu et al., 2019) which simply use binary edge features to indicate the existence of a bond without any other edge features; ii) RGCN, GGNN, LNet and simplified MPNN (sMPNN) which consider bond types (no bond, single, double, triple, or aromatic); iii) MPNN and our EIGNN which use edge feature vectors to indicate both edge types and pairwise distance between atoms. ",
726
+ "bbox": [
727
+ 174,
728
+ 417,
729
+ 825,
730
+ 570
731
+ ],
732
+ "page_idx": 4
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "For a fair comparison, we repeat all experiments 3 times with different random seeds while during each run, all methods share the same random seed. We randomly choose 10k molecules for validation, 10k molecules for testing, and keep the rest for training. Each target property is normalized to zero mean and unit variance for training. Each model is trained to predict the 12 target properties simultaneously. $\\lambda$ is naively set to 1 for EIGNN. We use mean square error (MSE) loss to train the models for at most 300 epochs till convergence, and the performance is measured by mean absolute error (MAE). For LNet and GGNN, implementation of the readout function follows the original paper. While for all other models, we use the same set2set (Vinyals et al., 2015) readout, which has been demonstrated to work well in (Gilmer et al., 2017). ",
737
+ "bbox": [
738
+ 174,
739
+ 577,
740
+ 825,
741
+ 689
742
+ ],
743
+ "page_idx": 4
744
+ },
745
+ {
746
+ "type": "table",
747
+ "img_path": "images/e2363b0c98ec786aa722ef1c4ce1f710a68fcc7b20e4906ed858c3a4646bd1e1.jpg",
748
+ "table_caption": [
749
+ "Table 1: Quantum property regressions for 12 targets and overall performance (top two raws) on QM9. We repeat all experiments 3 times with different random seeds and report the average performance. Full results with standard deviation are presented in Appendix A, e.g., for MPNN and EIGNN, we have Avg. nMAE $0 . 0 3 9 8 \\pm 0 . 0 0 0 2$ and 0.0357 ± 0.0005. "
750
+ ],
751
+ "table_footnote": [],
752
+ "table_body": "<table><tr><td>Method</td><td>GCN</td><td>ChebyNet</td><td>GAT</td><td>GIN</td><td>RGCN</td><td>GGNN</td><td>LNet</td><td>sMPNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>Avg.nMAE</td><td>0.135</td><td>0.121</td><td>0.137</td><td>0.100</td><td>0.102</td><td>0.099</td><td>0.099</td><td>0.089</td><td>0.040</td><td>0.036</td></tr><tr><td>Avg.MAE</td><td>5.306</td><td>4.303</td><td>5.470</td><td>3.480</td><td>3.817</td><td>3.661</td><td>3.653</td><td>3.161</td><td>0.693</td><td>0.633</td></tr><tr><td>mu</td><td>0.568</td><td>0.518</td><td>0.567</td><td>0.478</td><td>0.506</td><td>0.518</td><td>0.472</td><td>0.472</td><td>0.110</td><td>0.097</td></tr><tr><td>alpha</td><td>0.881</td><td>0.793</td><td>0.891</td><td>0.621</td><td>0.632</td><td>0.608</td><td>0.623</td><td>0.528</td><td>0.332</td><td>0.294</td></tr><tr><td>HOMO(10-3)</td><td>5.451</td><td>4.775</td><td>5.429</td><td>4.183</td><td>4.453</td><td>4.483</td><td>3.889</td><td>3.854</td><td>2.481</td><td>2.230</td></tr><tr><td>LUMO(10-3)</td><td>6.400</td><td>5.674</td><td>6.331</td><td>4.796</td><td>5.138</td><td>5.153</td><td>4.194</td><td>4.549</td><td>2.862</td><td>2.593</td></tr><tr><td>gap(10-3)</td><td>8.201</td><td>7.097</td><td>8.193</td><td>6.096</td><td>6.500</td><td>6.602</td><td>5.813</td><td>5.634</td><td>3.620</td><td>3.275</td></tr><tr><td>R2</td><td>53.56</td><td>41.95</td><td>54.52</td><td>34.65</td><td>40.10</td><td>39.68</td><td>35.27</td><td>33.49</td><td>6.064</td><td>5.646</td></tr><tr><td>ZPVE(10-3)</td><td>2.533</td><td>2.527</td><td>2.271</td><td>1.744</td><td>1.477</td><td>1.292</td><td>1.438</td><td>1.345</td><td>0.679</td><td>0.612</td></tr><tr><td>UO</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.806</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>U</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.755</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>H</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.697</td><td>1.796</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>G</td><td>2.042</td><td>1.984</td><td>2.290</td><td>1.422</td><td>1.059</td><td>0.696</td><td>1.778</td><td>0.791</td><td>0.416</td><td>0.357</td></tr><tr><td>Cv</td><td>0.473</td><td>0.420</td><td>0.479</td><td>0.309</td><td>0.317</td><td>0.315</td><td>0.312</td><td>0.262</td><td>0.134</td><td>0.121</td></tr></table>",
753
+ "bbox": [
754
+ 176,
755
+ 762,
756
+ 820,
757
+ 920
758
+ ],
759
+ "page_idx": 4
760
+ },
761
+ {
762
+ "type": "image",
763
+ "img_path": "images/b51754269df1a1a81766b31ec23b13e16833a1c14fe21641771ca4dfac60a05d.jpg",
764
+ "image_caption": [
765
+ "Figure 1: Ablation study. Training and validation error on QM9. The shadow area indicates $m e a n \\pm s t d$ over 3 runs. "
766
+ ],
767
+ "image_footnote": [],
768
+ "bbox": [
769
+ 238,
770
+ 99,
771
+ 758,
772
+ 246
773
+ ],
774
+ "page_idx": 5
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "",
779
+ "bbox": [
780
+ 174,
781
+ 287,
782
+ 821,
783
+ 316
784
+ ],
785
+ "page_idx": 5
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "In Table 1, we list regression results for all methods. We report individual MAE for each target in their original scale, averaged MAE (Avg. MAE) over 12 properties, and averaged normalized MAE (Avg. nMAE; averaged over normalized target properties since different targets have different units and ranges). Our EIGNN achieves the best performance for each metric and each target. Now we are ready to answer the following research questions. i) Are edge features important? Yes. The error has a trend of decreasing with increasing edge features. The comparison between sMPNN (using edge types) and MPNN (using edge types and distance) directly verifies the importance of edge features. It is also consistent with the expert knowledge that distances between pairwise atoms are closely related to quantum properties. For example, the smaller the distance between the two atoms, the stronger the bond is, and consequently a higher bond energy is associated with this atom pair. ii) Does the EIGNN work? Yes. EIGNN achieves the best performance on each target, outperforming the strong baseline MPNN. Moreover, the advantage of EIGNN over MPNN is consistent over 3 runs and the standard deviation on this task is quite small. Detailed results are shown in Table 4 of Appendix A. iii) How does the EIGNN work? Our MI objective is easily implemented on top of vanilla loss function. We have shown that our objective enables preserving of edge information. Fig. 1 demonstrates that regularization such as $L _ { 2 }$ weight decay can increase training error while our objective does not. Moreover, the validation performance verifies that regularization itself does not reduce the validation error. Thus, the effectiveness of EIGNN is due to exploiting edge features rather than the regularization effect. We further run an ablation study where we concatenate edge features to node representations (i.e., MPNN+concat in Fig. 1) in message passing. Concatenation is unable to identify correlations between edges and nodes (Gilmer et al., 2017) and our results show that it slightly reduces the mean validation error but increases the variance. ",
790
+ "bbox": [
791
+ 173,
792
+ 324,
793
+ 825,
794
+ 655
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "4.2 More Molecule Benchmarks with Potential Applications ",
801
+ "text_level": 1,
802
+ "bbox": [
803
+ 176,
804
+ 676,
805
+ 700,
806
+ 690
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "We further evaluate EIGNN on three molecule benchmarks: Lipophilicity (Wu et al., 2018), ESOL (Delaney, 2004) and FreeSolv (Mobley & Guthrie, 2014). These datasets contain fewer molecules, and have potential usages in applications such as chemistry, drug discovery, and materials science. For example, the property lipophilicity is an important feature of drug molecules that affects both membrane permeability and solubility. The dataset Lipophilicity contains 4200 compounds. ESOL provides water solubility data for 1128 compounds. FreeSolv contains hydration free energy of 642 small molecules in water. We conduct graph regression experiments on these benchmarks. All datasets are split into training, validation and test according to a proportion of 0.8/0.1/0.1. MPNN and our EIGNN share the same architecture with 3 layers of message passing and 3 steps of set2set. We repeat each experiment 3 times with different random seeds. Results of testing root mean square error (RMSE) in Table 2 verify the effectiveness of our method. Our EIGNN outperforms MPNN on each dataset and each run. Detailed results for each run are presented in Appendix B. ",
813
+ "bbox": [
814
+ 174,
815
+ 703,
816
+ 825,
817
+ 842
818
+ ],
819
+ "page_idx": 5
820
+ },
821
+ {
822
+ "type": "table",
823
+ "img_path": "images/7582535dc47cc56dc3b59505e6ee0ff5b99c6069343599af156f76f4881db6c9.jpg",
824
+ "table_caption": [
825
+ "Table 2: Testing RMSE on Lipophilicity, ESOL and FreeSolv. "
826
+ ],
827
+ "table_footnote": [],
828
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"2\">Lipophilicity</td><td colspan=\"2\">ESOL</td><td colspan=\"2\">FreeSolv</td></tr><tr><td>Method</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>mean±std</td><td>0.678±0.042</td><td>0.653±0.025</td><td>0.805±0.064</td><td>0.776±0.071</td><td>1.398±0.081</td><td>1.273±0.137</td></tr></table>",
829
+ "bbox": [
830
+ 178,
831
+ 876,
832
+ 820,
833
+ 921
834
+ ],
835
+ "page_idx": 5
836
+ },
837
+ {
838
+ "type": "image",
839
+ "img_path": "images/93a30757aa01764b32a397063bc6a0e3a215232f566f99e62524e437f83f0e93.jpg",
840
+ "image_caption": [
841
+ "Figure 2: Attribution analysis. The color indicates the impact of an edge/atom on the output, i.e., the regression result. EIGNN i) increases the edge attribution, ii) reduces the prediction error and iii) can learn domain knowledge without human interference. "
842
+ ],
843
+ "image_footnote": [],
844
+ "bbox": [
845
+ 246,
846
+ 99,
847
+ 750,
848
+ 311
849
+ ],
850
+ "page_idx": 6
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "",
855
+ "bbox": [
856
+ 174,
857
+ 369,
858
+ 825,
859
+ 411
860
+ ],
861
+ "page_idx": 6
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "Attribution analysis. To understand how our EIGNN reduces the regression error, we conduct attribution analysis, i.e., attributing the prediction of a deep network to its input features, which usually builds up on the standard gradient operator (Sundararajan et al., features 2017). For an output $e$ as $\\begin{array} { r } { S _ { e } = | \\frac { \\partial y } { \\partial e } | } \\end{array}$ $y$ , i.e., the prediction of a GNN, we define its sensitivity to an edge with , where $\\left. \\cdot \\right.$ denotes the $L _ { 1 }$ norm. Similarly, the sensitivity to an atom with features $x$ is $\\begin{array} { r } { S _ { x } = | \\frac { \\partial y } { \\partial x } | } \\end{array}$ . Then $S _ { e }$ and $S _ { x }$ are used as the metrics of attribution in our experiments. As an example, we show in Fig. 2 the attribution for two molecules in Lipophilicity: (a) $N c I n o n c I C ( = N O ) N c \\mathcal { Q } c c c ( F ) c ( C l ) c \\mathcal { Q }$ and (b) Oc1c2ncc3ccccc3c2nn1c4ccccc4 . Molecule in (a) has the potential to be used to treat, prevent and/or diagnose cancer Prinz et al. (2019). Compared with MPNN, we can observe an increasing of overall edge attribution under our EIGNN and a decreasing of prediction error in both cases. Interestingly, the attribution under EIGNN is similar to the expert knowledge of chemists: halogen atoms such as {Cl, Br, I} and their bond with the carbon atom greatly effect the lipophilicity of a molecule Wilcken et al. (2013), while atoms {O, N} also have high impact on the lipophilicity but usually in a negative way (Augustijns & Brewster, 2007). In Fig. 2 (a), the attribution of the halogen bond C-Cl and the pair {O, N} under our EIGNN is much higher than the one under MPNN, which is consistent with the expert knowledge. In Fig. 2 (b), similarly, the attribution of atoms {O, N} and the bond C-O under EIGNN is much higher. More examples are presented in Appendix C. ",
866
+ "bbox": [
867
+ 174,
868
+ 428,
869
+ 825,
870
+ 698
871
+ ],
872
+ "page_idx": 6
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "4.3 Predicting Relations in Knowledge Graphs ",
877
+ "text_level": 1,
878
+ "bbox": [
879
+ 174,
880
+ 717,
881
+ 581,
882
+ 731
883
+ ],
884
+ "page_idx": 6
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "In this subsection, we adopt EIGNN to tackle the problem of relation prediction in knowledge graphs (KGs), which entails predicting whether a given triple is valid or not. For example, a triple (London, capital of, United Kingdom) should be classified as valid or London should be predicted as the capital of United Kingdom. KGs represent human knowledge as a directed graph, and have been widely used in practical applications, such as semantic search, dialogue generation, question answering etc. Recovering missing relations in KGs have been a major task for practical usages of KGs. We evaluate our methods on three benchmark datasets, WN18RR (Dettmers et al., 2018), FB15k-237 (Toutanova et al., 2015) and NELL-995 (Xiong et al., 2017). Without the reversible relation problem (Dettmers et al., 2018), WN18RR includes 11 relations scraped from WordNet for 40, 943 synsets. FB15k-237 is a subset of Freebase, and contains 14, 541 entities associated with 237 types of edge. NELL-995 is constructed from the $9 9 5 ^ { t h }$ iteration of NELL system, containing 75, 492 entities and 200 types of edge. ",
889
+ "bbox": [
890
+ 174,
891
+ 743,
892
+ 825,
893
+ 924
894
+ ],
895
+ "page_idx": 6
896
+ },
897
+ {
898
+ "type": "table",
899
+ "img_path": "images/b9f6d05fff4b5da5ff97fa116ab1faa3e0ecaf14f59bf84883052dee805e45d1.jpg",
900
+ "table_caption": [
901
+ "Table 3: Experimental results on WN18RR, FB15K-237 and NELL-995 test sets. Hits@N values are in percentage. The best score is in bold and second best score is underlined. "
902
+ ],
903
+ "table_footnote": [],
904
+ "table_body": "<table><tr><td rowspan=\"3\">Dataset</td><td colspan=\"4\">WN18RR</td><td colspan=\"4\">FB15K-237</td><td colspan=\"4\">NELL-995</td></tr><tr><td colspan=\"4\"></td><td rowspan=\"2\">MRR</td><td colspan=\"3\">Hit@N%</td><td rowspan=\"2\">MRR</td><td colspan=\"3\">Hit@N %</td></tr><tr><td>MRR</td><td>@1</td><td>@3</td><td>@10</td><td>@1</td><td>@3</td><td>@10</td><td>@1</td><td>@3</td><td>@10</td></tr><tr><td>DistMult</td><td>0.444</td><td>41.2</td><td>47</td><td>50.4</td><td>0.281</td><td>19.9</td><td>30.1</td><td>44.6</td><td>0.485</td><td>40.1</td><td>52.4</td><td>61</td></tr><tr><td>ComplEx</td><td>0.449</td><td>40.9</td><td>46.9</td><td>53</td><td>0.278</td><td>19.4</td><td>29.7</td><td>45</td><td>0.482</td><td>39.9</td><td>52.8</td><td>60.6</td></tr><tr><td>ConvE</td><td>0.456</td><td>41.9</td><td>47</td><td>53.1</td><td>0.312</td><td>22.5</td><td>34.1</td><td>49.7</td><td>0.491</td><td>40.3</td><td>53.1</td><td>61.3</td></tr><tr><td>TransE</td><td>0.243</td><td>42.7</td><td>44.1</td><td>53.2</td><td>0.279</td><td>19.8</td><td>37.6</td><td>44.1</td><td>0.401</td><td>34.4</td><td>47.2</td><td>50.1</td></tr><tr><td>ConvKB</td><td>0.265</td><td>58.2</td><td>44.5</td><td>55.8</td><td>0.289</td><td>19.8</td><td>32.4</td><td>47.1</td><td>0.43</td><td>37.0</td><td>47</td><td>54.5</td></tr><tr><td>R-GCN</td><td>0.123</td><td>8</td><td>13.7</td><td>20.7</td><td>0.164</td><td>10</td><td>18.1</td><td>30</td><td>0.12</td><td>8.2</td><td>12.6</td><td>18.8</td></tr><tr><td>KBGAT</td><td>0.436</td><td>35.8</td><td>48.1</td><td>57.8</td><td>0.431</td><td>36.1</td><td>45.8</td><td>56.9</td><td>0.514</td><td>42.9</td><td>55.3</td><td>67.8</td></tr><tr><td>EIGNN</td><td>0.438</td><td>35.7</td><td>48.8</td><td>58.1</td><td>0.451</td><td>37.4</td><td>48.2</td><td>60.5</td><td>0.523</td><td>43.8</td><td>56.1</td><td>68.3</td></tr></table>",
905
+ "bbox": [
906
+ 186,
907
+ 122,
908
+ 810,
909
+ 241
910
+ ],
911
+ "page_idx": 7
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "A critical issue of applying Eq. (3) to KGs is that high-dimensional embedding vectors are required to distinguish massive amount of entities and relations, leading to a rapid growth in number of parameters in EIGNN. To address this issue, we adopt the architecture of (Nathani et al., 2019) and learn graph attention based embeddings that target relation prediction on KGs as follows, ",
916
+ "bbox": [
917
+ 174,
918
+ 263,
919
+ 823,
920
+ 335
921
+ ],
922
+ "page_idx": 7
923
+ },
924
+ {
925
+ "type": "equation",
926
+ "img_path": "images/56b7e18c1c9472053b2ca7278088a13ab3c9e8c0952468df13b763434be1907f.jpg",
927
+ "text": "$$\n\\begin{array} { r } { m _ { v w } = f \\big ( h _ { v } ^ { ( l ) } , e _ { v w } ^ { l } , h _ { w } ^ { ( l ) } \\big ) , \\alpha _ { v w } ^ { l } = \\mathrm { s o f t m a x } \\big ( a ^ { l } m _ { v w } ^ { l } \\big ) , h _ { v } ^ { ( l + 1 ) } = \\sigma \\left( \\sum _ { w \\in \\mathcal { N } _ { v } } \\alpha _ { v w } ^ { l } m _ { v w } ^ { l } \\right) . } \\end{array}\n$$",
928
+ "text_format": "latex",
929
+ "bbox": [
930
+ 197,
931
+ 338,
932
+ 772,
933
+ 366
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "Compared with Eq. (3), where $m _ { v w } = f ( e _ { v w } ) h _ { w }$ , the above equation absorbs the transform matrix $f ( e _ { v w } )$ into $f ( h _ { v } ^ { ( l ) } , e _ { v w } , h _ { w } ^ { ( l ) } )$ and reduces the model parameters. In the following experiments, we implement $f$ using a MLP as in previous experiments, and maximizes the MI between $e _ { v w }$ and $m _ { v w }$ by introducing another MLP with $\\lambda = 0 . 0 1$ . Multi-head attention is further introduced to stabilize the learning process and encapsulate more information about neighbors according to (Veličković et al., 2018). After training EIGNN, ConvKB (Nguyen et al., 2018) is adopted as a regression function for a given triple by analyzing the global embedding properties across each dimension. ",
940
+ "bbox": [
941
+ 174,
942
+ 369,
943
+ 825,
944
+ 486
945
+ ],
946
+ "page_idx": 7
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "In the relation prediction task, the aim is to predict a triple $( v , e _ { v w } , w )$ with $\\boldsymbol { v }$ or $w$ missing. We can generate a set of candidate triples for each missing entity $v$ by randomly replacing it with an arbitrary one. Scores can be calculated by ConvKB for all triples, and we find the rank of a correct triple by sorting all scores in ascending order. Thus, the performance of relation prediction task can be evaluated by mean reciprocal rank (MRR) and the proportion of correct entities in the top $N$ ranks (Hits@N) for $N = 1 , 3$ , and 10 (Bordes et al., 2013). We compare our EIGNN with seven state-of-the-art baselines focusing on this task: DistMult (Yang et al., 2014), ComplEx (Trouillon et al., 2016), ConvE (Dettmers et al., 2018), TransE (Bordes et al., 2013), ConvKB (Nguyen et al., 2018), RGCN (Schlichtkrull et al., 2018) and KBGAT (Nathani et al., 2019). As shown in Table 3, our EIGNN achieves the best performance for each metric on FB15K-237 and NELL-995, and achieves the best performance on WN18RR with Hit $^ \\mathrm { ( a 3 }$ and 10 metrics. The results of KBGAT are reproduced following the official implementation1, and the results of other methods can be found in the previous peer-reviewed publications, i.e. (Nathani et al., 2019). ",
951
+ "bbox": [
952
+ 173,
953
+ 492,
954
+ 825,
955
+ 686
956
+ ],
957
+ "page_idx": 7
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "5 Conclusions ",
962
+ "text_level": 1,
963
+ "bbox": [
964
+ 176,
965
+ 705,
966
+ 328,
967
+ 722
968
+ ],
969
+ "page_idx": 7
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "In this work, to make better use of edge features in GNNs, we proposed the edge information maximized graph neural network (EIGNN) that maximizes the mutual information between edge feature vectors and message passing channels. We reformulated the mutual information as a differentiable objective by adopting a variational approach. We have theoretically proved that our proposed objective enables EIGNN to preserve edge information and empirically evaluated EIGNN’s performance on a variety of benchmarks incorporating an array of challenging molecular datasets and knowledge graphs. These results clearly manifested a substantial improvement of EIGNN over the prior state-of-the-art methods. Apart from demonstrating the impressive performance of EIGNN, we also showed that its effectiveness is due to exploitation of edge features instead of the regularization effect. Notably, attribution analysis on molecular graphs show that EIGNN can capture domain knowledge in an end-to-end fashion. ",
974
+ "bbox": [
975
+ 174,
976
+ 737,
977
+ 825,
978
+ 904
979
+ ],
980
+ "page_idx": 7
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "References ",
985
+ "text_level": 1,
986
+ "bbox": [
987
+ 176,
988
+ 102,
989
+ 290,
990
+ 118
991
+ ],
992
+ "page_idx": 8
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "David Barber Felix Agakov. The im algorithm: a variational approach to information maximization. NeurIPS, 2004. ",
997
+ "bbox": [
998
+ 174,
999
+ 126,
1000
+ 823,
1001
+ 155
1002
+ ],
1003
+ "page_idx": 8
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "Patrick Augustijns and Marcus E Brewster. Solvent systems and their selection in pharmaceutics and biopharmaceutics, volume 190. Springer, 2007. ",
1008
+ "bbox": [
1009
+ 171,
1010
+ 165,
1011
+ 823,
1012
+ 194
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "David Barber and Felix V Agakov. Kernelized infomax clustering. In NeurIPS, 2006. ",
1019
+ "bbox": [
1020
+ 173,
1021
+ 202,
1022
+ 787,
1023
+ 219
1024
+ ],
1025
+ "page_idx": 8
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In NeurIPS, pp. 2787–2795, 2013. ",
1030
+ "bbox": [
1031
+ 176,
1032
+ 228,
1033
+ 823,
1034
+ 271
1035
+ ],
1036
+ "page_idx": 8
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "John S Bridle, Anthony JR Heading, and David JC MacKay. Unsupervised classifiers, mutual information and’phantom targets. In NeurIPS, 1992. ",
1041
+ "bbox": [
1042
+ 173,
1043
+ 281,
1044
+ 823,
1045
+ 310
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: interpretable representation learning by information maximizing generative adversarial nets. In NeurIPS, 2016. ",
1052
+ "bbox": [
1053
+ 176,
1054
+ 319,
1055
+ 823,
1056
+ 363
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Kyunghyun Cho, Bart Van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 372,
1066
+ 823,
1067
+ 416
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016. ",
1074
+ "bbox": [
1075
+ 173,
1076
+ 425,
1077
+ 825,
1078
+ 455
1079
+ ],
1080
+ "page_idx": 8
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "John S Delaney. Esol: estimating aqueous solubility directly from molecular structure. Journal of chemical information and computer sciences, 44(3):1000–1005, 2004. ",
1085
+ "bbox": [
1086
+ 171,
1087
+ 464,
1088
+ 823,
1089
+ 494
1090
+ ],
1091
+ "page_idx": 8
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. Convolutional 2d knowledge graph embeddings. In AAAI, 2018. ",
1096
+ "bbox": [
1097
+ 173,
1098
+ 502,
1099
+ 823,
1100
+ 534
1101
+ ],
1102
+ "page_idx": 8
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In NeurIPS, 2015. ",
1107
+ "bbox": [
1108
+ 176,
1109
+ 541,
1110
+ 823,
1111
+ 585
1112
+ ],
1113
+ "page_idx": 8
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In ICML, 2017. ",
1118
+ "bbox": [
1119
+ 174,
1120
+ 594,
1121
+ 823,
1122
+ 625
1123
+ ],
1124
+ "page_idx": 8
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 855–864. ACM, 2016. ",
1129
+ "bbox": [
1130
+ 176,
1131
+ 633,
1132
+ 823,
1133
+ 676
1134
+ ],
1135
+ "page_idx": 8
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, pp. 1024–1034, 2017. ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 686,
1143
+ 823,
1144
+ 717
1145
+ ],
1146
+ "page_idx": 8
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. 2019. ",
1151
+ "bbox": [
1152
+ 176,
1153
+ 724,
1154
+ 823,
1155
+ 768
1156
+ ],
1157
+ "page_idx": 8
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Pre-training graph neural networks. arXiv preprint arXiv:1905.12265, 2019. ",
1162
+ "bbox": [
1163
+ 173,
1164
+ 777,
1165
+ 823,
1166
+ 808
1167
+ ],
1168
+ "page_idx": 8
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1173
+ "bbox": [
1174
+ 173,
1175
+ 816,
1176
+ 823,
1177
+ 847
1178
+ ],
1179
+ "page_idx": 8
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. ",
1184
+ "bbox": [
1185
+ 173,
1186
+ 856,
1187
+ 823,
1188
+ 886
1189
+ ],
1190
+ "page_idx": 8
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "Andreas Krause, Pietro Perona, and Ryan G Gomes. Discriminative clustering by regularized information maximization. In NeurIPS, 2010. ",
1195
+ "bbox": [
1196
+ 174,
1197
+ 895,
1198
+ 821,
1199
+ 924
1200
+ ],
1201
+ "page_idx": 8
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016. ",
1206
+ "bbox": [
1207
+ 171,
1208
+ 103,
1209
+ 823,
1210
+ 132
1211
+ ],
1212
+ "page_idx": 9
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Renjie Liao, Zhizhen Zhao, Raquel Urtasun, and Richard S Zemel. Lanczosnet: Multi-scale deep graph convolutional networks. In ICLR, 2019. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 140,
1220
+ 821,
1221
+ 169
1222
+ ],
1223
+ "page_idx": 9
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988. ",
1228
+ "bbox": [
1229
+ 174,
1230
+ 176,
1231
+ 818,
1232
+ 193
1233
+ ],
1234
+ "page_idx": 9
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "David L Mobley and J Peter Guthrie. Freesolv: a database of experimental and calculated hydration free energies, with input files. Journal of computer-aided molecular design, 28 (7):711–720, 2014. ",
1239
+ "bbox": [
1240
+ 173,
1241
+ 199,
1242
+ 821,
1243
+ 242
1244
+ ],
1245
+ "page_idx": 9
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Christopher Morris, Martin Ritzert, Matthias Fey, William L Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI, volume 33, pp. 4602–4609, 2019. ",
1250
+ "bbox": [
1251
+ 178,
1252
+ 251,
1253
+ 823,
1254
+ 294
1255
+ ],
1256
+ "page_idx": 9
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Deepak Nathani, Jatin Chauhan, Charu Sharma, and Manohar Kaul. Learning attentionbased embeddings for relation prediction in knowledge graphs. The 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019. ",
1261
+ "bbox": [
1262
+ 176,
1263
+ 300,
1264
+ 823,
1265
+ 344
1266
+ ],
1267
+ "page_idx": 9
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Dai Quoc Nguyen, Tu Dinh Nguyen, Dat Quoc Nguyen, and Dinh Phung. A novel embedding model for knowledge base completion based on convolutional neural network. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 327–333, 2018. ",
1272
+ "bbox": [
1273
+ 174,
1274
+ 351,
1275
+ 826,
1276
+ 409
1277
+ ],
1278
+ "page_idx": 9
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Bianka Prinz, Jerry M Thomas, Ansgar Brock, Viviana Cremasco, Catherine Anne SabatosPeyton, Glenn Dranoff, Scott Chapel, Andrew Lake, Alison Paterson, Rachel W O’connor, et al. Antibody molecules to cd73 and uses thereof, January 31 2019. US Patent App. 16/014,744. ",
1283
+ "bbox": [
1284
+ 173,
1285
+ 415,
1286
+ 826,
1287
+ 473
1288
+ ],
1289
+ "page_idx": 9
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole Von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific data, 1: 140022, 2014. ",
1294
+ "bbox": [
1295
+ 174,
1296
+ 481,
1297
+ 823,
1298
+ 523
1299
+ ],
1300
+ "page_idx": 9
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1): 61–80, 2009. ",
1305
+ "bbox": [
1306
+ 174,
1307
+ 531,
1308
+ 826,
1309
+ 574
1310
+ ],
1311
+ "page_idx": 9
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Michael Schlichtkrull, Thomas N Kipf, Peter Bloem, Rianne Van Den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In European Semantic Web Conference, pp. 593–607. Springer, 2018. ",
1316
+ "bbox": [
1317
+ 174,
1318
+ 582,
1319
+ 826,
1320
+ 626
1321
+ ],
1322
+ "page_idx": 9
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In ICML, pp. 3319–3328. JMLR. org, 2017. ",
1327
+ "bbox": [
1328
+ 174,
1329
+ 632,
1330
+ 823,
1331
+ 662
1332
+ ],
1333
+ "page_idx": 9
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Gamon. Representing text for joint embedding of text and knowledge bases. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 1499–1509, 2015. ",
1338
+ "bbox": [
1339
+ 173,
1340
+ 669,
1341
+ 826,
1342
+ 727
1343
+ ],
1344
+ "page_idx": 9
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In ICML, pp. 2071–2080, 2016. ",
1349
+ "bbox": [
1350
+ 174,
1351
+ 733,
1352
+ 823,
1353
+ 763
1354
+ ],
1355
+ "page_idx": 9
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In ICLR, 2018. ",
1360
+ "bbox": [
1361
+ 174,
1362
+ 770,
1363
+ 823,
1364
+ 800
1365
+ ],
1366
+ "page_idx": 9
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Petar Veličković, William Fedus, William L Hamilton, Pietro Liò, Yoshua Bengio, and R Devon Hjelm. Deep graph infomax. In ICLR, 2019. ",
1371
+ "bbox": [
1372
+ 174,
1373
+ 808,
1374
+ 823,
1375
+ 837
1376
+ ],
1377
+ "page_idx": 9
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015. ",
1382
+ "bbox": [
1383
+ 174,
1384
+ 844,
1385
+ 821,
1386
+ 875
1387
+ ],
1388
+ "page_idx": 9
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Rainer Wilcken, Markus O Zimmermann, Andreas Lange, Andreas C Joerger, and Frank M Boeckler. Principles and applications of halogen bonding in medicinal chemistry and chemical biology. Journal of medicinal chemistry, 56(4):1363–1388, 2013. ",
1393
+ "bbox": [
1394
+ 176,
1395
+ 881,
1396
+ 823,
1397
+ 924
1398
+ ],
1399
+ "page_idx": 9
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chemical science, 9(2):513–530, 2018. \nWenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 564–573, 2017. \nKeyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019. \nBishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. ICLR, 2014. \nZhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In NeurIPS, pp. 4800–4810, 2018. \nJie Zhou, Ganqu Cui, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, and Maosong Sun. Graph neural networks: A review of methods and applications. arXiv preprint arXiv:1812.08434, 2018. ",
1404
+ "bbox": [
1405
+ 171,
1406
+ 102,
1407
+ 826,
1408
+ 377
1409
+ ],
1410
+ "page_idx": 10
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "A Full Results on QM9 ",
1415
+ "text_level": 1,
1416
+ "bbox": [
1417
+ 176,
1418
+ 101,
1419
+ 426,
1420
+ 118
1421
+ ],
1422
+ "page_idx": 11
1423
+ },
1424
+ {
1425
+ "type": "table",
1426
+ "img_path": "images/a301b4667b007d0ca0d55c084b4ad788389f2f177ec6b78e47c696d5409f9f41.jpg",
1427
+ "table_caption": [
1428
+ "Table 4: Full results of quantum property regressions for 12 targets and overall performance (nMAE and MAE in top two raws) on QM9. We repeat all experiments 3 times with different random seeds and report the average performance and standard deviation. This is a supplement for Table 1. in the main text. "
1429
+ ],
1430
+ "table_footnote": [],
1431
+ "table_body": "<table><tr><td>Method</td><td>GCN</td><td>ChebyNet</td><td>GAT</td><td>GIN</td></tr><tr><td>Avg.nMAE</td><td>0.1350±0.0046</td><td>0.1206±0.0084</td><td>0.1367±0.0050</td><td>0.1001±0.0007</td></tr><tr><td>Avg.MAE</td><td>5.3063±0.1964</td><td>4.3032±0.4814</td><td>5.4698±0.2040</td><td>3.4799±0.0402</td></tr><tr><td>mu</td><td>0.5679±0.0078</td><td>0.5180±0.0131</td><td>0.5670±0.0102</td><td>0.4783±0.0041</td></tr><tr><td>alpha</td><td>0.8811±0.0308</td><td>0.7932±0.0778</td><td>0.8913±0.0314</td><td>0.6209±0.0028</td></tr><tr><td>HOMO(10-3)</td><td>5.4510±0.0790</td><td>4.7750±0.2040</td><td>5.4290±0.1660</td><td>4.1830±0.0370</td></tr><tr><td>LUMO(10-3)</td><td>6.4000±0.1230</td><td>5.6740±0.2670</td><td>6.3310±0.2390</td><td>4.7960±0.0520</td></tr><tr><td>gap(10-3)</td><td>8.2010±0.2150</td><td>7.0970±0.3620</td><td>8.1930±0.2910</td><td>6.0960±0.0420</td></tr><tr><td>R2</td><td>53.563±1.0319</td><td>41.950±4.8289</td><td>54.519±1.5992</td><td>34.647±0.2167</td></tr><tr><td>ZPVE(10-3)</td><td>2.5330±0.1070</td><td>2.5270±0.3560</td><td>2.2710±0.1450</td><td>1.7440±0.0100</td></tr><tr><td>UO</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>U</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>H</td><td>2.0422±0.3281</td><td>1.9842±0.2035</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>G</td><td>2.0423±0.3281</td><td>1.9842±0.2036</td><td>2.2899±0.2000</td><td>1.4215±0.0857</td></tr><tr><td>Cv</td><td>0.4730±0.0209</td><td>0.4199±0.0499</td><td>0.4787±0.0164</td><td>0.3093±0.0035</td></tr><tr><td>Method</td><td>RGCN</td><td>GGNN</td><td>LNet</td><td>sMPNN</td></tr><tr><td>Avg.nMAE</td><td>0.1021±0.0016</td><td>0.0992±0.0013</td><td>0.0992±0.0061</td><td>0.0888±0.0014</td></tr><tr><td>Avg.MAE</td><td>3.8175±0.0605</td><td>3.6608±0.0723</td><td>3.6527±0.3417</td><td>3.1610±0.0697</td></tr><tr><td>mu</td><td>0.5056±0.0048</td><td>0.5179±0.0076</td><td>0.4717±0.0063</td><td>0.4718±0.0096</td></tr><tr><td>alpha</td><td>0.6321±0.0145</td><td>0.6077±0.0092</td><td>0.6225±0.0508</td><td>0.5278±0.0106</td></tr><tr><td>HOMO(10-3)</td><td>4.4530±0.1290</td><td>4.4830±0.0650</td><td>3.8889±0.1617</td><td>3.8540±0.0410</td></tr><tr><td>LUMO(10-3)</td><td>5.1380±0.1210</td><td>5.1530±0.0890</td><td>4.1935±0.2205</td><td>4.5490±0.0810</td></tr><tr><td>gap(10-3)</td><td>6.5000±0.1390</td><td>6.6020±0.1400</td><td>5.8132±0.6456</td><td>5.6340±0.0570</td></tr><tr><td>R2</td><td>40.102±0.7428</td><td>39.685±0.8212</td><td>35.275±3.0531</td><td>33.489±0.6562</td></tr><tr><td>ZPVE(10-3)</td><td>1.4770±0.0090</td><td>1.2920±0.0340</td><td>1.4376±0.0769</td><td>1.3450±0.0260</td></tr><tr><td>UO</td><td>1.0589±0.0231</td><td>0.6969±0.0413</td><td>1.8058±0.2533</td><td>0.7914±0.0446</td></tr><tr><td>U</td><td>1.0589±0.0231</td><td>0.6966±0.0418</td><td>1.7555±0.2196</td><td>0.7914±0.0446</td></tr><tr><td>H</td><td>1.0589±0.0231</td><td>0.6974±0.0408</td><td>1.7964±0.2428</td><td>0.7914±0.0446</td></tr><tr><td>G</td><td>1.0589±0.0231</td><td>0.6961±0.0421</td><td>1.7780±0.2458</td><td>0.7914±0.0446</td></tr><tr><td>Cv</td><td>0.3170±0.0152</td><td>0.3146±0.0125</td><td>0.3124±0.0303</td><td>0.2625±0.0040</td></tr><tr><td>Method</td><td>MPNN</td><td>EIGNN</td><td></td><td></td></tr><tr><td>Avg.nMAE</td><td>0.0398±0.0002</td><td>0.0357±0.0005</td><td></td><td></td></tr><tr><td>Avg.MAE</td><td>0.6929±0.0212</td><td>0.6331±0.0298</td><td></td><td></td></tr><tr><td>mu</td><td>0.1095±0.0014</td><td>0.0974±0.0026</td><td></td><td></td></tr><tr><td>alpha</td><td>0.3318±0.0026</td><td>0.2939±0.0054</td><td></td><td></td></tr><tr><td>HOMO(10-3)</td><td>2.4810±0.0200</td><td>2.2300±0.0310</td><td></td><td></td></tr><tr><td>LUMO(10-3)</td><td>2.8620±0.0370</td><td>2.5930±0.0440</td><td></td><td></td></tr><tr><td>gap(10-3)</td><td>3.6200±0.0180</td><td>3.2750±0.0520</td><td></td><td></td></tr><tr><td>R2</td><td>6.0637±0.2511</td><td>5.6464±0.3098</td><td></td><td></td></tr><tr><td>ZPVE(10-3)</td><td>0.6790±0.0140</td><td>0.6120±0.0170</td><td></td><td></td></tr><tr><td>UO</td><td>0.4164±0.0225</td><td>0.3574±0.0100</td><td></td><td></td></tr><tr><td>U</td><td>0.4164±0.0225</td><td>0.3575±0.0100</td><td></td><td></td></tr><tr><td>H</td><td>0.4164±0.0225</td><td>0.3574±0.0100</td><td></td><td></td></tr><tr><td>G</td><td>0.4164±0.0225</td><td>0.3575±0.0101</td><td></td><td></td></tr><tr><td>Cv</td><td>0.1339±0.0013</td><td>0.1208±0.0027</td><td></td><td></td></tr></table>",
1432
+ "bbox": [
1433
+ 243,
1434
+ 202,
1435
+ 753,
1436
+ 738
1437
+ ],
1438
+ "page_idx": 11
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "We present full results of quantum property regressions on QM9 with average performance and standard deviation in Table 4. The $( 1 0 ^ { - 3 }$ ) in the parentheses indicates that the values in the corresponding raw of the table should multiply by $1 0 ^ { - 3 }$ . This is simply for clear presentation of the values. We also present a detailed descriptions on the target properties in Table 5 for your reference. ",
1443
+ "bbox": [
1444
+ 173,
1445
+ 750,
1446
+ 825,
1447
+ 819
1448
+ ],
1449
+ "page_idx": 11
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "In our results, we directly report MAE instead of Error Ratio [(MAE)/(Chemical Accuracy) (Gilmer et al., 2017)], because it is common to report MAE in terms of chemical unit. This practice has been widely adopted not only in computational chemistry but also in the machine learning community working on molecular graphs (Wu et al., 2018; Morris et al., 2019). Still, we add Table 6 which contains the Error Ratio for MPNN and our EIGNN. In this comparison, we follow (Gilmer et al., 2017) and train models separately to predict each target. Our EIGNN consistently outperforms MPNN. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 825,
1457
+ 825,
1458
+ 924
1459
+ ],
1460
+ "page_idx": 11
1461
+ },
1462
+ {
1463
+ "type": "table",
1464
+ "img_path": "images/91a3cbe5a783bcdbe8a1afa2b6c12f24ae9c429e52bd0844c20c200534394b6c.jpg",
1465
+ "table_caption": [
1466
+ "Table 5: Regression targets on QM9. "
1467
+ ],
1468
+ "table_footnote": [],
1469
+ "table_body": "<table><tr><td>Target property</td><td>Description</td><td>Unit</td></tr><tr><td>mu</td><td>Dipole moment</td><td>D</td></tr><tr><td>alpha</td><td>Isotropic polarizability</td><td>a</td></tr><tr><td>HOMO</td><td>Highest occupied molecular orbital energy</td><td>Eh</td></tr><tr><td>LUMO</td><td>Lowest unoccupied molecular orbital energy</td><td>Eh</td></tr><tr><td>gap</td><td>Gap between HOMO and LUMO</td><td>Eh</td></tr><tr><td>R2</td><td>Electronic spatial extent</td><td>品</td></tr><tr><td>ZPVE</td><td>Zero point vibrational energy</td><td>Eh</td></tr><tr><td>UO</td><td>Internal energy at OK</td><td>Eh</td></tr><tr><td>U</td><td>Internal energy at 298.15K</td><td>Eh</td></tr><tr><td>H</td><td>Enthalpy at 298.15K</td><td>Eh</td></tr><tr><td>G</td><td>Free energy at 298.15K</td><td>Eh</td></tr><tr><td>Cv</td><td>Heat capavity at 298.15K</td><td>cal molK</td></tr></table>",
1470
+ "bbox": [
1471
+ 281,
1472
+ 127,
1473
+ 717,
1474
+ 275
1475
+ ],
1476
+ "page_idx": 12
1477
+ },
1478
+ {
1479
+ "type": "table",
1480
+ "img_path": "images/2c21c7621d41da0431991f555ba9609c7ac7f048f42d5cf034e99ce8a99c7454.jpg",
1481
+ "table_caption": [
1482
+ "Table 6: Error Ratio [(MAE)/(Chemical Accuracy) (Gilmer et al., 2017)] on QM9. Note that the energy values of $\\{ \\mathrm { U 0 , ~ U , ~ H , ~ G } \\}$ are per molecule rather than per atom. Following (Gilmer et al., 2017), models are separately trained on each target. "
1483
+ ],
1484
+ "table_footnote": [],
1485
+ "table_body": "<table><tr><td>Target</td><td>MPNN</td><td>EIGNN</td><td>Improvement (%)</td></tr><tr><td>mu</td><td>0.87</td><td>0.80</td><td>8.24</td></tr><tr><td>alpha</td><td>2.64</td><td>2.44</td><td>7.57</td></tr><tr><td>HOMO</td><td>1.54</td><td>1.39</td><td>10.2</td></tr><tr><td>LUMO</td><td>1.31</td><td>1.28</td><td>2.13</td></tr><tr><td>gap</td><td>2.20</td><td>1.97</td><td>10.4</td></tr><tr><td>R2</td><td>1.00</td><td>0.72</td><td>28.4</td></tr><tr><td>ZPVE</td><td>5.31</td><td>4.43</td><td>16.5</td></tr><tr><td>UO</td><td>64.3</td><td>35.8</td><td>44.4</td></tr><tr><td>U</td><td>56.6</td><td>23.6</td><td>58.3</td></tr><tr><td>H</td><td>77.4</td><td>35.2</td><td>54.5</td></tr><tr><td>G</td><td>46.6</td><td>34.4</td><td>26.1</td></tr><tr><td>Cv</td><td>1.69</td><td>1.79</td><td>-6.22</td></tr></table>",
1486
+ "bbox": [
1487
+ 346,
1488
+ 345,
1489
+ 650,
1490
+ 491
1491
+ ],
1492
+ "page_idx": 12
1493
+ },
1494
+ {
1495
+ "type": "text",
1496
+ "text": "B Full Results on Lipophilicity, ESOL and FreeSolv ",
1497
+ "bbox": [
1498
+ 173,
1499
+ 515,
1500
+ 717,
1501
+ 534
1502
+ ],
1503
+ "page_idx": 12
1504
+ },
1505
+ {
1506
+ "type": "text",
1507
+ "text": "In this section, we present experimental results on Lipophilicity, ESOL and FreeSolv with detailed results for each run. The results in Table 7 verify that our EIGNN consistently outperforms MPNN. ",
1508
+ "bbox": [
1509
+ 174,
1510
+ 549,
1511
+ 823,
1512
+ 590
1513
+ ],
1514
+ "page_idx": 12
1515
+ },
1516
+ {
1517
+ "type": "text",
1518
+ "text": "C More Examples of Attribution ",
1519
+ "text_level": 1,
1520
+ "bbox": [
1521
+ 174,
1522
+ 611,
1523
+ 524,
1524
+ 627
1525
+ ],
1526
+ "page_idx": 12
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "In this section, we present more examples of attribution analysis on Lipophilicity. As a supplement for Fig. 2 in the main text, the observation here is similar. Compared with MPNN, we can observe an increasing of overall edge attribution under our EIGNN and a decreasing of prediction error in both cases. Notably, our EIGNN is able to capture the expert knowledge. (a) The molecule is $C N [ C @ \\mathbb { Q } H ] ( C ) C ( = O ) N [ C @ \\mathbb { Q } H ] ( C 1 C C C C T 1 ) C ( =$ $O ) N [ C @ H ] 2 C C C N ( C C c ( F ) c c 3 ) C 2$ . The attribution of $\\{ \\mathrm { O } , \\mathrm { N } \\}$ and the halogen atom $\\mathrm { F }$ is higher under EIGNN. (b) The molecule is $C C ( C ) N 1 C C N [ C @ H ] ( C 1 ) C ( =$ $O ) N 2 C C N ( C C 2 ) C ( = O ) N c 3 c c c ( C l ) c ( C l ) c 3$ . Our EIGNN successfully captures the importance of two critical halogen atoms Cl and several atoms N. (c) The molecule is $C O c 1 c c ( c c 1 ) C ( = \\ O ) N 2 C C C C 2 \\ = \\ O$ . The attribution of two atoms $\\mathrm { \\ o }$ at the top is ",
1531
+ "bbox": [
1532
+ 173,
1533
+ 643,
1534
+ 825,
1535
+ 784
1536
+ ],
1537
+ "page_idx": 12
1538
+ },
1539
+ {
1540
+ "type": "table",
1541
+ "img_path": "images/901ad24ad330961b104145c59ad458a6aba349587ab22792703374b07939c3f2.jpg",
1542
+ "table_caption": [
1543
+ "Table 7: Testing RMSE on Lipophilicity, ESOL and FreeSolv. This is a supplement for Table 2 in the main text. "
1544
+ ],
1545
+ "table_footnote": [],
1546
+ "table_body": "<table><tr><td>Dataset</td><td colspan=\"2\">Lipophilicity</td><td colspan=\"2\">ESOL</td><td colspan=\"2\">FreeSolv</td></tr><tr><td>Seed</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td><td>MPNN</td><td>EIGNN</td></tr><tr><td>0</td><td>0.718</td><td>0.676</td><td>0.770</td><td>0.718</td><td>1.396</td><td>1.109</td></tr><tr><td>1</td><td>0.696</td><td>0.664</td><td>0.750</td><td>0.733</td><td>1.299</td><td>1.265</td></tr><tr><td>2</td><td>0.620</td><td>0.619</td><td>0.894</td><td>0.876</td><td>1.499</td><td>1.443</td></tr><tr><td>mean±std</td><td>0.678±0.042</td><td>0.653±0.025</td><td>0.805±0.064</td><td>0.776±0.071</td><td>1.398±0.081</td><td>1.273±0.137</td></tr></table>",
1547
+ "bbox": [
1548
+ 178,
1549
+ 845,
1550
+ 818,
1551
+ 921
1552
+ ],
1553
+ "page_idx": 12
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "much higher under EIGNN. (d) The molecule is $C c 1 c c 2 N C ( = O ) C ( = C C ( = O ) c 2 c c 1 C ) O$ . \nThe attribution of atoms O is much higher under EIGNN. ",
1558
+ "bbox": [
1559
+ 171,
1560
+ 103,
1561
+ 825,
1562
+ 132
1563
+ ],
1564
+ "page_idx": 13
1565
+ },
1566
+ {
1567
+ "type": "image",
1568
+ "img_path": "images/d35b4c5026ccc9e9cd8864632869ef2ae4dd487409a61f9850c2293c8640530b.jpg",
1569
+ "image_caption": [
1570
+ "Figure 3: More examples of attribution analysis. The color indicates the impact of an edge/atom on the output, i.e., the regression result. EIGNN i) increases the edge attribution, ii) reduces the prediction error and iii) can learn domain knowledge without human interference. "
1571
+ ],
1572
+ "image_footnote": [],
1573
+ "bbox": [
1574
+ 179,
1575
+ 147,
1576
+ 818,
1577
+ 667
1578
+ ],
1579
+ "page_idx": 13
1580
+ }
1581
+ ]
parse/train/BygZK2VYvB/BygZK2VYvB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BygZK2VYvB/BygZK2VYvB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByxdUySKvS/ByxdUySKvS.md ADDED
@@ -0,0 +1,310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADVERSARIAL AUTOAUGMENT
2
+
3
+ Xinyu Zhang
4
+ Huawei
5
+ zhangxinyu10@huawei.com
6
+ Qiang Wang
7
+ Huawei
8
+ wangqiang168@huawei.com
9
+ Jian Zhang
10
+ Huawei
11
+ zhangjian157@huawei.com
12
+ Zhao Zhong
13
+ Huawei
14
+ zorro.zhongzhao@huawei.com
15
+
16
+ # ABSTRACT
17
+
18
+ Data augmentation (DA) has been widely utilized to improve generalization in training deep neural networks. Recently, human-designed data augmentation has been gradually replaced by automatically learned augmentation policy. Through finding the best policy in well-designed search space of data augmentation, AutoAugment (Cubuk et al., 2019) can significantly improve validation accuracy on image classification tasks. However, this approach is not computationally practical for large-scale problems. In this paper, we develop an adversarial method to arrive at a computationally-affordable solution called Adversarial AutoAugment, which can simultaneously optimize target related object and augmentation policy search loss. The augmentation policy network attempts to increase the training loss of a target network through generating adversarial augmentation policies, while the target network can learn more robust features from harder examples to improve the generalization. In contrast to prior work, we reuse the computation in target network training for policy evaluation, and dispense with the retraining of the target network. Compared to AutoAugment, this leads to about $1 2 \times$ reduction in computing cost and $1 1 \times$ shortening in time overhead on ImageNet. We show experimental results of our approach on CIFAR-10/CIFAR-100, ImageNet, and demonstrate significant performance improvements over state-of-the-art. On CIFAR-10, we achieve a top-1 test error of $1 . 3 6 \%$ , which is the currently best performing single model. On ImageNet, we achieve a leading performance of top-1 accuracy $7 9 . 4 0 \%$ on ResNet-50 and $8 0 . 0 0 \%$ on ResNet-50-D without extra data.
19
+
20
+ # 1 INTRODUCTION
21
+
22
+ Massive amount of data have promoted the great success of deep learning in academia and industry. The performance of deep neural networks (DNNs) would be improved substantially when more supervised data is available or better data augmentation method is adapted. Data augmentation such as rotation, flipping, cropping, etc., is a powerful technique to increase the amount and diversity of data. Experiments show that the generalization of a neural network can be efficiently improved through manually designing data augmentation policies. However, this needs lots of knowledge of human expert, and sometimes shows the weak transferability across different tasks and datasets in practical applications. Inspired by neural architecture search (NAS)(Zoph & Le, 2016; Zoph et al., 2017; Zhong et al., 2018a;b; Guo et al., 2018), a reinforcement learning (RL) (Williams, 1992) method called AutoAugment is proposed by Cubuk et al. (2019), which can automatically learn the augmentation policy from data and provide an exciting performance improvement on image classification tasks. However, the computing cost is huge for training and evaluating thousands of sampled policies in the search process. Although proxy tasks, i.e., smaller models and reduced datasets, are taken to accelerate the searching process, tens of thousands of GPU-hours of consumption are still required. In addition, these data augmentation policies optimized on proxy tasks are not guaranteed to be optimal on the target task, and the fixed augmentation policy is also sub-optimal for the whole training process.
23
+
24
+ ![](images/30303714f451b21eaee42acd79567fecfdfac2cdfb67ff8adc6f2486bb4f5ec4.jpg)
25
+ Figure 1: The overview of our proposed method. We formulate it as a Min-Max game. The data of each batch is augmented by multiple pre-processing components with sampled policies $\{ \tau _ { 1 } , \tau _ { 2 } , \cdots , \tau _ { M } \}$ , respectively. Then, a target network is trained to minimize the loss of a large batch, which is formed by multiple augmented instances of the input batch. We extract the training losses of a target network corresponding to different augmentation policies as the reward signal. Finally, the augmentation policy network is trained with the guideline of the processed reward signal, and aims to maximize the training loss of the target network through generating adversarial policies.
26
+
27
+ In this paper, we propose an efficient data augmentation method to address the problems mentioned above, which can directly search the best augmentation policy on the full dataset during training a target network, as shown in Figure 1. We first organize the network training and augmentation policy search in an adversarial and online manner. The augmentation policy is dynamically changed along with the training state of the target network, rather than fixed throughout the whole training process like normal AutoAugment (Cubuk et al., 2019). Due to reusing the computation in policy evaluation and dispensing with the retraining of the target network, the computing cost and time overhead are extremely reduced. Then, the augmentation policy network is taken as an adversary to explore the weakness of the target network. We augment the data of each min-batch with various adversarial policies in parallel, rather than the same data augmentation taken in batch augmentation (BA) (Hoffer et al., 2019). Then, several augmented instances of each mini-batch are formed into a large batch for target network learning. As an indicator of the hardness of augmentation policies, the training losses of the target network are used to guide the policy network to generate more aggressive and efficient policies based on REINFORCE algorithm (Williams, 1992). Through adversarial learning, we can train the target network more efficiently and robustly.
28
+
29
+ The contributions can be summarized as follows:
30
+
31
+ • Our method can directly learn augmentation policies on target tasks, i.e., target networks and full datasets, with a quite low computing cost and time overhead. The direct policy search avoids the performance degradation caused by the policy transfer from proxy tasks to target tasks.
32
+ • We propose an adversarial framework to jointly optimize target network training and augmentation policy search. The harder samples augmented by adversarial policies are constantly fed into the target network to promote robust feature learning. Hence, the generalization of the target network can be significantly improved.
33
+ • The experiment results show that our proposed method outperforms previous augmentation methods. For instance, we achieve a top-1 test error of $1 . 3 6 \%$ with PyramidNet+ShakeDrop (Yamada et al., 2018) on CIFAR-10, which is the state-of-the-art performance. On ImageNet, we improve the top-1 accuracy of ResNet-50 (He et al., 2016) from $7 6 . 3 \%$ to $7 9 . 4 \%$ without extra data, which is even $1 . 7 7 \%$ better than AutoAugment (Cubuk et al., 2019).
34
+
35
+ # 2 RELATED WORK
36
+
37
+ Common data augmentation, which can generate extra samples by some label-preserved transformations, is usually used to increase the size of datasets and improve the generalization of networks, such as on MINST, CIFAR-10 and ImageNet (Krizhevsky et al., 2012; Wan et al., 2013; Szegedy et al., 2015). However, human-designed augmentation policies are specified for different datasets. For example, flipping, the widely used transformation on CIFAR-10/CIFAR-100 and ImageNet, is not suitable for MINST, which will destroy the property of original samples.
38
+
39
+ Hence, several works (Lemley et al., 2017; Cubuk et al., 2019; Lin et al., 2019; Ho et al., 2019) have attempted to automatically learn data augmentation policies. Lemley et al. (2017) propose a method called Smart Augmentation, which merges two or more samples of a class to improve the generalization of a target network. The result also indicates that an augmentation network can be learned when a target network is being training. Through well designing the search space of data augmentation policies, AutoAugment (Cubuk et al., 2019) takes a recurrent neural network (RNN) as a sample controller to find the best data augmentation policy for a selected dataset. To reduce the computing cost, the augmentation policy search is performed on proxy tasks. Population based augmentation (PBA) (Ho et al., 2019) replaces the fixed augmentation policy with a dynamic schedule of augmentation policy along with the training process, which is mostly related to our work. Inspired by population based training (PBT) (Jaderberg et al., 2017), the augmentation policy search problem in PBA is modeled as a process of hyperparameter schedule learning. However, the augmentation schedule learning is still performed on proxy tasks. The learned policy schedule should be manually adjusted when the training process of a target network is non-matched with proxy tasks.
40
+
41
+ Another related topic is Generative Adversarial Networks (GANs) (Goodfellow et al., 2014), which has recently attracted lots of research attention due to its fascinating performance, and also been used to enlarge datasets through directly synthesizing new images (Tran et al., 2017; Perez & Wang, 2017; Antoniou et al., 2017; Gurumurthy et al., 2017; Frid-Adar et al., 2018). Although we formulate our proposed method as a Min-Max game, there exists an obvious difference with traditional GANs. We want to find the best augmentation policy to perform image transformation along with the training process, rather than synthesize new images. Peng et al. (2018) also take such an idea to optimize the training process of a target network in human pose estimation.
42
+
43
+ # 3 METHOD
44
+
45
+ In this section, we present the implementation of Adversarial AutoAugment. First, the motivation for the adversarial relation between network learning and augmentation policy is discussed. Then, we introduce the search space with the dynamic augmentation policy. Finally, the joint framework for network training and augmentation policy search is presented in detail.
46
+
47
+ # 3.1 MOTIVATIONS
48
+
49
+ Although some human-designed data augmentations have been used in the training of DNNs, such as randomly cropping and horizontally flipping on CIFAR-10/CIFAR-100 and ImageNet, limited randomness will make it very difficult to generate effective samples at the tail end of the training. To struggle with the problem, more randomness about image transformation is introduced into the search space of AutoAugment (Cubuk et al., 2019) (described in Section 3.2). However, the learned policy is fixed for the entire training process. All of possible instances of each example will be send to the target network repeatedly, which still results in an inevitable overfitting in a long-epoch training. This phenomenon indicates that the learned policy is not adaptive to the training process of a target network, especially found on proxy tasks. Hence, the dynamic and adversarial augmentation policy with the training process is considered as the crucial feature in our search space.
50
+
51
+ Another consideration is how to improve the efficiency of the policy search. In AutoAugment (Cubuk et al., 2019), to evaluate the performance of augmentation policies, a lot of child models should be trained from scratch nearly to convergence. The computation in training and evaluating the performance of different sampled policies can not be reused, which leads to huge waste of computation resources. In this paper, we propose a computing-efficient policy search framework through reusing prior computation in policy evaluation. Only one target network is used to evaluate the performance of different policies with the help of the training losses of corresponding augmented instances. The augmentation policy network is learned from the intermediate state of the target network, which makes generated augmentation policies more aggressive and adaptive. On the contrary, to combat harder examples augmented by adversarial policies, the target network has to learn more robust features, which makes the training more efficiently.
52
+
53
+ ![](images/cf1281f8bae28f7b31d6aab6d29d8044913d73f1d9a58a90985849e432656219.jpg)
54
+ Figure 2: An example of dynamic augmentation policies learned with ResNet-50 on ImageNet. With the training process of the target network, harder augmentation policies are sampled to combat overfitting. Intuitively, more geometric transformations, such as TranslateX, ShearY and Rotate, are picked in our sampled policies, which is obviously different from AutoAugment (Cubuk et al., 2019) concentrating on color-based transformations.
55
+
56
+ # 3.2 SEARCH SPACE
57
+
58
+ In this paper, the basic structure of the search space of AutoAugment (Cubuk et al., 2019) is reserved. An augmentation policy is defined as that it is composed by 5 sub-policies, each sub-policy contains two image operations to be applied orderly, each operation has two corresponding parameters, i.e., the probability and magnitude of the operation. Finally, the 5 best policies are concatenated to form a single policy with 25 sub-policies. For each image in a mini-batch, only one sub-policy will be randomly selected to be applied. To compare with AutoAugment (Cubuk et al., 2019) conveniently, we just slightly modify the search space with removing the probability of each operation. This is because that we think the stochasticity of an operation with a probability requires a certain epochs to take effect, which will detain the feedback of the intermediate state of the target network. There are totally 16 image operations in our search space, including ShearX/Y, TranslateX/Y, Rotate, AutoContrast, Invert, Equalize, Solarize, Posterize, Contrast, Color, Brightness, Sharpness, Cutout (Devries & Taylor, 2017) and Sample Pairing (Inoue, 2018). The range of the magnitude is also discretized uniformly into 10 values. To guarantee the convergence during adversarial learning, the magnitude of all the operations are set in a moderate range.1 Besides, the randomness during the training process is introduced into our search space. Hence, the search space of the policy in each epoch has $| S | = ( 1 6 \times 1 0 ) ^ { 1 0 } \approx 1 . 1 \times 1 0 ^ { 2 2 }$ possibilities. Considering the dynamic policy, the number of possible policies with the whole training process can be expressed as $| S | ^ { \# e p o c h s }$ . An example of dynamically learning the augmentation policy along with the training process is shown in Figure 2. We observe that the magnitude (an indication of difficulty) gradually increases with the training process.
59
+
60
+ # 3.3 ADVERSARIAL LEARNING
61
+
62
+ In this section, the adversarial framework of jointly optimizing network training and augmentation policy search is presented in detail. We use the augmentation policy network $\boldsymbol { \mathcal { A } } ( \cdot , \pmb { \theta } )$ as an adversary, which attempts to increase the training loss of the target network $\mathcal { F } ( \cdot , w )$ through adversarial learning. The target network is trained by a large batch formed by multiple augmented instances of each batch to promote invariant learning (Salazar et al., 2018), and the losses of different augmentation policies applied on the same data are used to train the augmentation policy network by RL algorithm.
63
+
64
+ Considering the target network $\mathcal { F } ( \cdot , w )$ with a loss function $\mathcal { L } [ \mathcal { F } ( \pmb { x } , \pmb { w } ) , \pmb { y } ]$ , where each example is transformed by some random data augmentation $o ( \cdot )$ , the learning process of the target network can be defined as the following minimization problem
65
+
66
+ $$
67
+ \pmb { w } ^ { * } = \underset { \pmb { w } } { \arg \operatorname* { m i n } } \ \underset { \pmb { x } \sim \Omega } { \mathbb { E } } \mathcal { L } [ \mathcal { F } ( o ( \pmb { x } ) , \pmb { w } ) , \pmb { y } ] ,
68
+ $$
69
+
70
+ where $\Omega$ is the training set, $_ { \textbf { \em x } }$ and $\textbf { { y } }$ are the input image and the corresponding label, respectively. The problem is usually solved by vanilla SGD with a learning rate $\eta$ and batch size $N$ , and the training procedure for each batch can be expressed as
71
+
72
+ $$
73
+ \pmb { w } _ { t + 1 } = \pmb { w } _ { t } - \eta \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \nabla _ { \pmb { w } } \mathcal { L } [ \mathcal { F } ( o ( x _ { n } ) , \pmb { w } , y _ { n } ] .
74
+ $$
75
+
76
+ To improve the convergence performance of DNNs, more random and efficient data augmentation is performed under the help of the augmentation policy network. Hence, the minimization problem should be slightly modified as
77
+
78
+ $$
79
+ \pmb { w } ^ { * } = \underset { \pmb { w } } { \arg \operatorname* { m i n } } \ \underset { \pmb { x } \sim \Omega } { \mathbb { E } } \ \underset { \pmb { \mathcal { A } } ( \cdot , \pmb { \theta } ) } { \mathbb { E } } \mathcal { L } [ \mathcal { F } ( \tau ( \pmb { x } ) , \pmb { w } ) , \pmb { y } ] ,
80
+ $$
81
+
82
+ where $\tau ( \cdot )$ represents the augmentation policy generated by the network $\boldsymbol { \mathcal { A } } ( \cdot , \pmb { \theta } )$ . Accordingly, the training rule can be rewritten as
83
+
84
+ $$
85
+ \pmb { w } _ { t + 1 } = \pmb { w } _ { t } - \eta \frac { 1 } { M \cdot N } \sum _ { m = 1 } ^ { M } \sum _ { n = 1 } ^ { N } \nabla _ { \pmb { w } } \mathcal { L } [ \mathcal { F } ( \tau _ { m } ( x _ { n } ) , \pmb { w } ) , y _ { n } ] ,
86
+ $$
87
+
88
+ where we introduce $M$ different instances of each input example augmented by adversarial policies $\{ \tau _ { 1 } , \tau _ { 2 } , \cdots , \tau _ { M } \}$ . For convenience, we denote the training loss of a mini-batch corresponding to the augmentation policy $\tau _ { m }$ as
89
+
90
+ $$
91
+ \mathcal { L } _ { m } = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathcal { L } [ \mathcal { F } ( \tau _ { m } ( x _ { n } ) , \pmb { w } ) , y _ { n } ] .
92
+ $$
93
+
94
+ Hence, we have an equivalent form of Equation 4
95
+
96
+ $$
97
+ \pmb { w } _ { t + 1 } = \pmb { w } _ { t } - \eta \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \nabla _ { \pmb { w } } \mathcal { L } _ { m } .
98
+ $$
99
+
100
+ Note that the training procedure can be regarded as a larger $N \cdot M$ batch training or an average over $M$ instances of gradient computation without changing the learning rate, which will lead to a reduction of gradient variance and a faster convergence of the target network Hoffer et al. (2019). However, overfitting will also come. To overcome the problem, the augmentation policy network is designed to increase the training loss of the target network with harder augmentation policies. Therefore, we can mathematically express the object as the following maximization problem
101
+
102
+ $$
103
+ \begin{array} { c } { \pmb { \theta } ^ { * } = \underset { \pmb { \theta } } { \arg \operatorname* { m a x } } J ( \pmb { \theta } ) , } \\ { \mathrm { w h e r e } ~ J ( \pmb { \theta } ) = \underset { \pmb { x } \sim \Omega } { \mathbb { E } } ~ \underset { \pmb { \mathbb { E } } ( \cdot , \pmb { \theta } ) } { \mathbb { E } } \mathcal { L } [ \mathcal { F } ( \tau ( \pmb { x } ) , \pmb { w } ) , \pmb { y } ] . } \end{array}
104
+ $$
105
+
106
+ Similar to AutoAugment (Cubuk et al., 2019), the augmentation policy network is also implemented as a RNN shown in Figure 3. At each time step of the RNN controller, the softmax layer will predict an action corresponding to a discrete parameter of a sub-policy, and then an embedding of the predicted action will be fed into the next time step. In our experiments, the RNN controller will predict 20 discrete parameters to form a whole policy.
107
+
108
+ ![](images/d2f4b35084c6e611d6139d1fbef94757f5d6b6d525d6edbd65d47563cffa3f4c.jpg)
109
+ Figure 3: The basic architecture of the controller for generating a sub-policy, which consists of two operations with corresponding parameters, the type and magnitude of each operation. When a policy contains $Q$ sub-policies, the basic architecture will be repeated $Q$ times. Following the setting of AutoAugment (Cubuk et al., 2019), the number of sub-policies $Q$ is set to 5 in this paper.
110
+
111
+ However, there has a severe problem in jointly optimizing target network training and augmentation policy search. This is because that non-differentiable augmentation operations break gradient flow from the target network $\mathcal { F }$ to the augmentation policy network $\mathcal { A }$ (Wang et al., 2017; Peng et al., 2018). As an alternative approach, REINFORCE algorithm (Williams, 1992) is applied to optimize the augmentation policy network as
112
+
113
+ $$
114
+ \begin{array} { r l } & { \nabla _ { \theta } J ( \theta ) = \nabla _ { \theta } \underset { x \sim \Omega \tau \sim A ( \cdot , \theta ) } { \mathbb { E } } ~ \underset { { A } ^ { ( \cdot ) } } { \mathbb { E } } ~ \mathcal { L } [ \mathcal { F } ( \tau ( x ) , w ) , y ] } \\ & { \approx \displaystyle \sum _ { m } \mathcal { L } _ { m } \nabla _ { \theta } p _ { m } = \sum _ { m } \mathcal { L } _ { m } p _ { m } \nabla _ { \theta } \log p _ { m } } \\ & { ~ = \underset { { \tau \sim A ( \cdot , \theta ) } } { \mathbb { E } } ~ \mathcal { L } _ { m } \nabla _ { \theta } \log p _ { m } } \\ & { ~ \approx \frac { 1 } { M } \displaystyle \sum _ { m = 1 } ^ { M } \mathcal { L } _ { m } \nabla _ { \theta } \log p _ { m } , } \end{array}
115
+ $$
116
+
117
+ where $p _ { m }$ represents the probability of the policy $\tau _ { m }$ . To reduce the variance of gradient $\nabla _ { \pmb { \theta } } J ( \pmb { \theta } )$ , we replace the training loss of a mini-batch ${ \mathcal { L } } _ { m }$ with ${ \widehat { \mathcal { L } } } _ { m }$ a moving average over a certain minibatches2, and then normalize it among $M$ instances as ${ \widetilde { \mathcal { L } } } _ { m }$ . Hence, the training procedure of the augmentation policy network can be expressed as
118
+
119
+ $$
120
+ \begin{array} { r l } & { \nabla _ { \pmb { \theta } } J ( \pmb { \theta } ) \approx \cfrac { 1 } { M } \displaystyle \sum _ { m = 1 } ^ { M } \widetilde { \mathcal { L } } _ { m } \nabla _ { \pmb { \theta } } \log p _ { m } , } \\ & { \theta _ { e + 1 } = \theta _ { e } + \beta \displaystyle \frac { 1 } { M } \displaystyle \sum _ { m = 1 } ^ { M } \widetilde { \mathcal { L } } _ { m } \nabla _ { \pmb { \theta } } \log p _ { m } , } \end{array}
121
+ $$
122
+
123
+ The adversarial learning of target network training and augmentation policy search is summarized as Algorithm 1.
124
+
125
+ # 4 EXPERIMENTS AND ANALYSIS
126
+
127
+ In this section, we first reveal the details of experiment settings. Then, we evaluate our proposed method on CIFAR-10/CIFAR-100, ImageNet, and compare it with previous methods. Results in Figure 4 show our method achieves the state-of-the-art performance with higher computing and time efficiency3.
128
+
129
+ Algorithm 1 Joint Training of Target Network and Augmentation Policy Network
130
+
131
+ Initialization: target network $\mathcal { F } ( \cdot , w )$ , augmentation policy network $\boldsymbol { \mathcal { A } } ( \cdot , \pmb { \theta } )$ Input: input examples $_ { \textbf { \em x } }$ , corresponding labels $\textbf { { y } }$
132
+
133
+ 1: for $1 \leq e \leq$ epochs do
134
+ 2: Initialize $\widehat { \mathcal { L } } _ { m } = 0 , \forall m \in \{ 1 , 2 , \cdots , M \}$ ;
135
+ 3: Generate $M$ policies with the probabilities $\{ p _ { 1 } , p _ { 2 } , \cdots , p _ { M } \}$ ;
136
+ 4: for $1 \leq t \leq T$ do
137
+ 5: Augment each batch data with $M$ generated policies, respectively;
138
+ 6: Update $w _ { e , t + 1 }$ according to Equation 4;
139
+ 7: Update ${ \widehat { \mathcal { L } } } _ { m }$ through moving average, $\forall m \in \{ 1 , 2 , \cdot \cdot \cdot , M \}$ ;
140
+ 8: Collect $\{ \widehat { \mathcal { L } } _ { 1 } , \widehat { \mathcal { L } } _ { 2 } , \cdots , \widehat { \mathcal { L } } _ { M } \}$ ;
141
+ 9: Normalize ${ \widehat { \mathcal { L } } } _ { m }$ among $M$ instances as $\widetilde { \mathcal { L } } _ { m } , \forall m \in \{ 1 , 2 , \cdots , M \}$ ;
142
+ 10: Update $\pmb { \theta } _ { e + 1 }$ via Equation 9;
143
+ 11: Output $w ^ { \ast } , \theta ^ { \ast }$
144
+
145
+ # 4.1 EXPERIMENT SETTINGS
146
+
147
+ The RNN controller is implemented as a one-layer LSTM (Hochreiter & Schmidhuber, 1997). We set the hidden size to 100, and the embedding size to 32. We use Adam optimizer (Kingma & Ba, 2015) with a initial learning rate 0.00035 to train the controller. To avoid unexpected rapid convergence, an entropy penalty of a weight of 0.00001 is applied. All the reported results are the mean of five runs with different initializations.
148
+
149
+ # 4.2 EXPERIMENTS ON CIFAR-10 AND CIFAR-100
150
+
151
+ CIFAR-10 dataset (Krizhevsky & Hinton, 2009) has totally 60000 images. The training and test sets have 50000 and 10000 images, respectively. Each image in size of $3 2 \times 3 2$ belongs to one of 10 classes. We evaluate our proposed method with the following models: Wide-ResNet-28- 10 (Zagoruyko & Komodakis, 2016), Shake-Shake $( 2 6 ~ 2 \mathrm { x } 3 2 \mathrm { d } )$ (Gastaldi, 2017), Shake-Shake (26 $2 \mathrm { x } 9 6 \mathrm { d } )$ (Gastaldi, 2017), Shake-Shake $( 2 6 2 \mathrm { x } 1 1 2 \mathrm { d } )$ (Gastaldi, 2017), PyramidNet+ShakeDrop (Han et al., 2017; Yamada et al., 2018). All the models are trained on the full training set.
152
+
153
+ Training details: The Baseline is trained with the standard data augmentation, namely, randomly cropping a part of $3 2 \times 3 2$ from the padded image and horizontally flipping it with a probability of 0.5. The Cutout (Devries & Taylor, 2017) randomly select a $1 6 \times 1 6$ patch of each image, and then set the pixels of the selected patch to zeros. For our method, the searched policy is applied in addition to standard data augmentation and Cutout. For each image in the training process, standard data augmentation, the searched policy and Cutout are applied in sequence. For Wide-ResNet-28- 10, the step learning rate (LR) schedule is adopted. The cosine LR schedule is adopted for the other models. More details about model hyperparameters are supplied in A.1.
154
+
155
+ Choice of $M$ : To choose the optimal $M$ , we select Wide-ResNet-28-10 as a target network, and evaluate the performance of our proposed method verse different $M$ , where $M \in \{ 2 , 4 , 8 , 1 6 , 3 2 \}$ . From Figure 5, we can observe that the test accuracy of the model improves rapidly with the increase of $M$ up to 8. The further increase of $M$ does not bring a significant improvement. Therefore, to balance the performance and the computing cost, $M$ is set to 8 in all the following experiments.
156
+
157
+ CIFAR-10 results: In Table 1, we report the test error of these models on CIFAR-10. For all of these models, our proposed method can achieve better performance compared to previous methods. We achieve $0 . 7 8 \%$ and $0 . 6 8 \%$ improvement on Wide-ResNet-28-10 compared to AutoAugment and PBA, respectively. We achieve a top-1 test error of $1 . 3 6 \%$ with PyramidNet $^ +$ ShakeDrop, which is $0 . 1 \%$ better than the current state-of-the-art reported in Ho et al. (2019). As shown in Figure 6(a) and 6(b),we further visualize the probability distribution of the parameters of the augmentation policies learned with PyramidNet+ShakeDrop on CIFAR-10 over time. From Figure 6(a), we can find that the percentages of some operations, such as TranslateY, Rotate, Posterize, and SampleParing, gradually increase along with the training process. Meanwhile, more geometric transformations, such as TranslateX, TranslateY, and Rotate, are picked in the sampled augmentation policies, which is different from color-focused AutoAugment (Cubuk et al., 2019) on CIFAR-10. Figure 6(b) shows that large magnitudes gain higher percentages during training. However, at the tail of training, low magnitudes remain considerable percentages. This indicates that our method does not simply learn the transformations with the extremes of the allowed magnitudes to spoil the target network.
158
+
159
+ ![](images/1d9bd1c440b329d4cde0cd4933e8cd51662c730a2c81bacfeed27c2444ff1516.jpg)
160
+ Figure 4: The Comparison of normalized performance between AutoAugment and our method. Please refer to the following tables for more details.
161
+
162
+ ![](images/8f0622955a06ab6ba860d80c3c02ae266fb49a0c8467d420de114247a0cfe754.jpg)
163
+ Figure 5: The Top-1 test accuracy of WideResNet-28-10 on CIFAR-10 verse different $M$ , where $M \in \{ 2 , 4 , 8 , 1 6 , 3 2 \}$ .
164
+
165
+ ![](images/969c5da3cca5ba7fe0f9f8865ef328f9131f97876658c78dfb77dd5e89fdd3d5.jpg)
166
+ Figure 6: Probability distribution of the parameters in the learned augmentation policies on CIFAR10 over time. The number in (b) represents the magnitude of one operation. Larger number stands for more dramatic image transformations. The probability distribution of each parameter is the mean of each five epochs.
167
+
168
+ CIFAR-100 results: We also evaluate our proposed method on CIFAR-100, as shown in Table 2.
169
+ As we can observe from the table, we also achieve the state-of-the-art performance on this dataset.
170
+
171
+ Table 1: Top-1 test error $( \% )$ on CIFAR-10. We replicate the results of Baseline, Cutout and AutoAugment methods from Cubuk et al. (2019), and the results of PBA from Ho et al. (2019) in all of our experiments.
172
+
173
+ <table><tr><td>Model</td><td>Baseline</td><td>Cutout</td><td>AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>Wide-ResNet-28-10</td><td>3.87</td><td>3.08</td><td>2.68</td><td>2.58</td><td>1.90±0.15</td></tr><tr><td>Shake-Shake (26 2x32d)</td><td>3.55</td><td>3.02</td><td>2.47</td><td>2.54</td><td>2.36±0.10</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>2.86</td><td>2.56</td><td>1.99</td><td>2.03</td><td>1.85±0.12</td></tr><tr><td>Shake-Shake (26 2x112d)</td><td>2.82</td><td>2.57</td><td>1.89</td><td>2.03</td><td>1.78±0.05</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>2.67</td><td>2.31</td><td>1.48</td><td>1.46</td><td>1.36±0.06</td></tr></table>
174
+
175
+ # 4.3 EXPERIMENTS ON IMAGENET
176
+
177
+ As a great challenge in image recognition, ImageNet dataset (Deng et al., 2009) has about 1.2 million training images and 50000 validation images with 1000 classes. In this section, we directly search the augmentation policy on the full training set and train ResNet-50 (He et al., 2016), ResNet-50-D (He et al., 2018) and ResNet-200 (He et al., 2016) from scratch.
178
+
179
+ Table 2: Top-1 test error $( \% )$ on CIFAR-100.
180
+
181
+ <table><tr><td>Model</td><td>Baseline</td><td>Cutout</td><td> AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>Wide-ResNet-28-10</td><td>18.80</td><td>18.41</td><td>17.09</td><td>16.73</td><td>15.49±0.18</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>17.05</td><td>16.00</td><td>14.28</td><td>15.31</td><td>14.10±0.15</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>13.99</td><td>12.19</td><td>10.67</td><td>10.94</td><td>10.42±0.20</td></tr></table>
182
+
183
+ Training details: For the baseline augmentation, we randomly resize and crop each input image to a size of $2 2 4 \times 2 2 4$ , and then horizontally flip it with a probability of 0.5. For AutoAugment (Cubuk et al., 2019) and our method, the baseline augmentation and the augmentation policy are both used for each image. The cosine LR schedule is adopted in the training process. The model hyperparameters on ImageNet is also detailed in A.1.
184
+
185
+ ImageNet results: The performance of our proposed method on ImageNet is presented in Table 3. It can be observed that we achieve a top-1 accuracy $7 9 . 4 0 \%$ on ResNet-50 without extra data. To the best of our knowledge, this is the highest top-1 accuracy for ResNet-50 learned on ImageNet. Besides, we only replace the ResNet-50 architecture with ResNet-50-D, and achieve a consistent improvement with a top-1 accuracy of $8 0 . 0 0 \%$ .
186
+
187
+ Table 3: Top-1 / Top-5 test error $( \% )$ on ImageNet. Note that the result of ResNet-50-D is achieved only through substituting the architecture.
188
+
189
+ <table><tr><td>Model</td><td>Baseline</td><td>AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>ResNet-50</td><td>23.69 / 6.92</td><td>22.37 /6.18</td><td>1</td><td>20.60±0.15 /5.53±0.05</td></tr><tr><td>ResNet-50-D</td><td>22.84 / 6.48</td><td>1</td><td></td><td>20.00±0.12/5.25±0.03</td></tr><tr><td>ResNet-200</td><td>21.52 / 5.85</td><td>20.00 /4.90</td><td>1</td><td>18.68±0.18 /4.70±0.05</td></tr></table>
190
+
191
+ # 4.4 ABLATION STUDY
192
+
193
+ To check the effect of each component in our proposed method, we report the test error of ResNet-50 on ImageNet the following augmentation methods in Table 4.
194
+
195
+ • Baseline: Training regularly with the standard data augmentation and step LR schedule.
196
+ • Fixed: Augmenting all the instances of each batch with the standard data augmentation fixed throughout the entire training process. Random: Augmenting all the instances of each batch with randomly and dynamically generated policies. Ours: Augmenting all the instances of each batch with adversarial policies sampled by the policy network along with the training process.
197
+
198
+ From the table, we can find that Fixed can achieve $0 . 9 9 \%$ error reduction compared to Baseline. This shows that a large-batch training with multiple augmented instances of each mini-batch can indeed improve the generalization of the model, which is consistent with the conclusion presented in Hoffer et al. (2019). In addition, the test error of Random is $1 . 0 2 \%$ better than Fixed. This indicates that augmenting batch with randomly generated policies can reduce overfitting in a certain extent. Furthermore, our method achieves the best test error of $2 0 . 6 0 \%$ through augmenting samples with adversarial policies. From the result, we can conclude that these policies generated by the policy network are more adaptive to the training process, and make the target network have to learn more robust features.
199
+
200
+ # 4.5 COMPUTING COST AND TIME OVERHEAD
201
+
202
+ Computing Cost: The computation in target network training is reused for policy evaluation. This makes the computing cost in policy search become negligible. Although there exists an increase of computing cost in target network training, the total computing cost in training one target network with augmentation policies is quite small compared to prior work.
203
+
204
+ Time Overhead: Since we just train one target network with a large batch distributedly and simultaneously, the time overhead of the large-batch training is equal to the regular training. Meanwhile, the joint optimization of target network training and augmentation policy search dispenses with the process of offline policy search and the retraining of a target network, which leads to a extreme time overhead reduction.
205
+
206
+ Table 4: Top-1 test error $( \% )$ of ResNet-50 with different augmentation methods on ImageNet.
207
+
208
+ <table><tr><td>Method</td><td>Aug. Policy</td><td>Enlarge Batch</td><td>LR Schedule</td><td>Test Error</td></tr><tr><td>Baseline</td><td>standard</td><td>M=1</td><td>step</td><td>23.69</td></tr><tr><td>Fixed</td><td>standard</td><td>M=8</td><td>cosine</td><td>22.70</td></tr><tr><td>Random</td><td>random</td><td>M=8</td><td>cosine</td><td>21.68</td></tr><tr><td>Ours</td><td>adversarial</td><td>M=8</td><td>cosine</td><td>20.60</td></tr></table>
209
+
210
+ In Table 5, we take the training of ResNet-50 on ImageNet as an example to compare the computing cost and time overhead of our method and AutoAugment. From the table, we can find that our method is $1 2 \times$ less computing cost and $1 1 \times$ shorter time overhead than AutoAugment.
211
+
212
+ Table 5: The comparison of computing cost (GPU hours) and time overhead (days) in training ResNet-50 on ImageNet between AutoAugment and our method. The computing cost and time overhead are estimated on 64 NVIDIA Tesla V100s.
213
+
214
+ <table><tr><td rowspan="2">Method</td><td colspan="3">Computing Cost</td><td colspan="3">Time Overhead</td></tr><tr><td>Searching</td><td>Training</td><td>Total</td><td>Searching</td><td>Training</td><td>Total</td></tr><tr><td>AutoAugment</td><td>15000</td><td>160</td><td>15160</td><td>10</td><td>1</td><td>11</td></tr><tr><td>Our Method</td><td>~0</td><td>1280</td><td>1280</td><td>~0</td><td>1</td><td>1</td></tr></table>
215
+
216
+ # 4.6 TRANSFERABILITY ACROSS DATASETS AND ARCHITECTURES
217
+
218
+ To further show the higher efficiency of our method, the transferability of the learned augmentation policies is evaluated in this section. We first take a snapshot of the adversarial training process of ResNet-50 on ImageNet, and then directly use the learned dynamic augmentation policies to regularly train the following models: Wide-ResNet-28-10 on CIFAR-10/100, ResNet-50-D on ImageNet and ResNet200 on ImageNet. Table 6 presents the experimental results of the transferability. From the table, we can find that a competitive performance can be still achieved through direct policy transfer. This indicates that the learned augmentation policies transfer well across datasets and architectures. However, compared to the proposed method, the policy transfer results in an obvious performance degradation, especially the transfer across datasets.
219
+
220
+ Table 6: Top-1 test error $( \% )$ of the transfer of the augmentation policies learned with ResNet-50 on ImageNet.
221
+
222
+ <table><tr><td>Method</td><td>Dataset</td><td>AutoAugment</td><td>Our Method</td><td>Policy Transfer</td></tr><tr><td>Wide-ResNet-28-10</td><td>CIFAR-10</td><td>2.68</td><td>1.90</td><td>2.45±0.13</td></tr><tr><td>Wide-ResNet-28-10</td><td>CIFAR-100</td><td>17.09</td><td>15.49</td><td>16.48±0.15</td></tr><tr><td>ResNet-50-D</td><td>ImageNet</td><td>1</td><td>20.00</td><td>20.20±0.05</td></tr><tr><td>ResNet-200</td><td>ImageNet</td><td>20.00</td><td>18.68</td><td>19.05±0.10</td></tr></table>
223
+
224
+ # 5 CONCLUSION
225
+
226
+ In this paper, we introduce the idea of adversarial learning into automatic data augmentation. The policy network tries to combat the overfitting of the target network through generating adversarial policies with the training process. To oppose this, robust features are learned in the target network, which leads to a significant performance improvement. Meanwhile, the augmentation policy search is performed along with the training of a target network, and the computation in network training is reused for policy evaluation, which can extremely reduce the search cost and make our method more computing-efficient.
227
+
228
+ # REFERENCES
229
+
230
+ Antreas Antoniou, Amos J. Storkey, and Harrison Edwards. Data augmentation generative adversarial networks. ICLR, 2017.
231
+
232
+ Ekin D. Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. Autoaugment: ´ Learning augmentation policies from data. CVPR, 2019.
233
+
234
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. CVPR, 2009.
235
+
236
+ Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. CoRR, abs/1708.04552, 2017.
237
+
238
+ Maayan Frid-Adar, Eyal Klang, Michal Amitai, Jacob Goldberger, and Hayit Greenspan. Synthetic data augmentation using GAN for improved liver lesion classification. IEEE International Symposium on Biomedical Imaging (ISBI), 2018.
239
+
240
+ Xavier Gastaldi. Shake-shake regularization. CoRR, abs/1705.07485, 2017.
241
+
242
+ Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. NIPS, 2014.
243
+
244
+ Minghao Guo, Zhao Zhong, Wei Wu, Dahua Lin, and Junjie Yan. IRLAS: inverse reinforcement learning for architecture search. CoRR, abs/1812.05285, 2018.
245
+
246
+ Swaminathan Gurumurthy, Ravi Kiran Sarvadevabhatla, and Venkatesh Babu Radhakrishnan. Deligan : Generative adversarial networks for diverse and limited data. CVPR, 2017.
247
+
248
+ Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. CVPR, 2017.
249
+
250
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, 2016.
251
+
252
+ Tong He, Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, and Mu Li. Bag of tricks for image classification with convolutional neural networks. CoRR, abs/1812.01187, 2018.
253
+
254
+ Daniel Ho, Eric Liang, Ion Stoica, Pieter Abbeel, and Xi Chen. Population based augmentation: Efficient learning of augmentation policy schedules. ICML, 2019.
255
+
256
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 1997.
257
+
258
+ Elad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: better training with larger batches. CoRR, abs/1901.09335, 2019.
259
+
260
+ Hiroshi Inoue. Data augmentation by pairing samples for images classification. CoRR, abs/1801.02929, 2018.
261
+
262
+ Max Jaderberg, Valentin Dalibard, Simon Osindero, Wojciech M. Czarnecki, Jeff Donahue, Ali Razavi, Oriol Vinyals, Tim Green, Iain Dunning, Karen Simonyan, Chrisantha Fernando, and Koray Kavukcuoglu. Population based training of neural networks. CoRR, abs/1711.09846, 2017.
263
+
264
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015.
265
+
266
+ Alex Krizhevsky and Geoffrey E. Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
267
+
268
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. NIPS, 2012.
269
+
270
+ Joseph Lemley, Shabab Bazrafkan, and Peter Corcoran. Smart augmentation - learning an optimal data augmentation strategy. CoRR, abs/1703.08383, 2017.
271
+
272
+ Chen Lin, Minghao Guo, Chuming Li, Wei Wu, Dahua Lin, Wanli Ouyang, and Junjie Yan. Online hyper-parameter learning for auto-augmentation strategy. CoRR, abs/1905.07373, 2019.
273
+
274
+ Xi Peng, Zhiqiang Tang, Fei Yang, Rogerio Schmidt Feris, and Dimitris N. Metaxas. Jointly op- ´ timize data augmentation and network training: Adversarial data augmentation in human pose estimation. CVPR, 2018.
275
+
276
+ Luis Perez and Jason Wang. The effectiveness of data augmentation in image classification using deep learning. CoRR, abs/1712.04621, 2017.
277
+
278
+ Julian Salazar, Davis Liang, Zhiheng Huang, and Zachary C. Lipton. Invariant representation learning for robust deep networks. NeurIPS Workshop, 2018.
279
+
280
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CVPR, 2015.
281
+
282
+ Toan Tran, Trung Pham, Gustavo Carneiro, Lyle J. Palmer, and Ian D. Reid. A bayesian data augmentation approach for learning deep models. NIPS, 2017.
283
+
284
+ Li Wan, Matthew Zeiler, Sixin Zhang, Yann LeCun, and Rob Fergus. Regularization of neural networks using dropconnect. ICML, 2013.
285
+
286
+ Xiaolong Wang, Abhinav Shrivastava, and Abhinav Gupta. A-fast-rcnn: Hard positive generation via adversary for object detection. CVPR, 2017.
287
+
288
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 1992.
289
+
290
+ Yoshihiro Yamada, Masakazu Iwamura, and Koichi Kise. Shakedrop regularization. CoRR, abs/1802.02375, 2018.
291
+
292
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. British Machine Vision Conference, 2016.
293
+
294
+ Zhao Zhong, Junjie Yan, and Cheng-Lin Liu. Practical network blocks design with Q-learning. CVPR, 2018a.
295
+
296
+ Zhao Zhong, Zichen Yang, Boyang Deng, Junjie Yan, Wei Wu, Jing Shao, and Cheng-Lin Liu. BlockQNN: Efficient block-wise neural network architecture generation. CoRR, abs/1808.05584, 2018b.
297
+
298
+ Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. ICLR, 2016.
299
+
300
+ Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V. Le. Learning transferable architectures for scalable image recognition. CVPR, 2017.
301
+
302
+ A APPENDIX
303
+
304
+ # A.1 HYPERPARAMETERS
305
+
306
+ We detail the model hyperparameters on CIFAR-10/CIFAR-100 and ImageNet in Table 7.
307
+
308
+ Table 7: Model hyperparameters on CIFAR-10/CIFAR-100 and ImageNet. LR represents learning rate, and WD represents weight decay. We do not specifically tune these hyperparameters, and all of these are consistent with previous works, expect for the number of epochs.
309
+
310
+ <table><tr><td>Dataset</td><td>Model</td><td>Batch Size (N · M)</td><td>LR</td><td>WD</td><td>Epoch</td></tr><tr><td>CIFAR-10</td><td>Wide-ResNet-28-10</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>200</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake (26 2x32d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake ( (262x96d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake (26 2x112d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>PyramidNet+ShakeDrop</td><td>128·8</td><td>0.1</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-100</td><td>Wide-ResNet-28-10</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>200</td></tr><tr><td>CIFAR-100</td><td>Shake-Shake (26 2x96d)</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>1200</td></tr><tr><td>CIFAR-100</td><td>PyramidNet+ShakeDrop</td><td>128·8</td><td>0.5</td><td>1e-4</td><td>1200</td></tr><tr><td>ImageNet</td><td>ResNet-50</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr><tr><td>ImageNet</td><td>ResNet-50-D</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr><tr><td>ImageNet</td><td>ResNet-200</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr></table>
parse/train/ByxdUySKvS/ByxdUySKvS_content_list.json ADDED
@@ -0,0 +1,1538 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ADVERSARIAL AUTOAUGMENT ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 117,
9
+ 553,
10
+ 136
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xinyu Zhang \nHuawei \nzhangxinyu10@huawei.com \nQiang Wang \nHuawei \nwangqiang168@huawei.com \nJian Zhang \nHuawei \nzhangjian157@huawei.com \nZhao Zhong \nHuawei \nzorro.zhongzhao@huawei.com ",
17
+ "bbox": [
18
+ 184,
19
+ 162,
20
+ 411,
21
+ 204
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "",
28
+ "bbox": [
29
+ 460,
30
+ 162,
31
+ 687,
32
+ 204
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "",
39
+ "bbox": [
40
+ 184,
41
+ 226,
42
+ 411,
43
+ 267
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "",
50
+ "bbox": [
51
+ 460,
52
+ 226,
53
+ 717,
54
+ 267
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 304,
65
+ 544,
66
+ 319
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Data augmentation (DA) has been widely utilized to improve generalization in training deep neural networks. Recently, human-designed data augmentation has been gradually replaced by automatically learned augmentation policy. Through finding the best policy in well-designed search space of data augmentation, AutoAugment (Cubuk et al., 2019) can significantly improve validation accuracy on image classification tasks. However, this approach is not computationally practical for large-scale problems. In this paper, we develop an adversarial method to arrive at a computationally-affordable solution called Adversarial AutoAugment, which can simultaneously optimize target related object and augmentation policy search loss. The augmentation policy network attempts to increase the training loss of a target network through generating adversarial augmentation policies, while the target network can learn more robust features from harder examples to improve the generalization. In contrast to prior work, we reuse the computation in target network training for policy evaluation, and dispense with the retraining of the target network. Compared to AutoAugment, this leads to about $1 2 \\times$ reduction in computing cost and $1 1 \\times$ shortening in time overhead on ImageNet. We show experimental results of our approach on CIFAR-10/CIFAR-100, ImageNet, and demonstrate significant performance improvements over state-of-the-art. On CIFAR-10, we achieve a top-1 test error of $1 . 3 6 \\%$ , which is the currently best performing single model. On ImageNet, we achieve a leading performance of top-1 accuracy $7 9 . 4 0 \\%$ on ResNet-50 and $8 0 . 0 0 \\%$ on ResNet-50-D without extra data. ",
73
+ "bbox": [
74
+ 233,
75
+ 335,
76
+ 764,
77
+ 627
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 655,
88
+ 334,
89
+ 671
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Massive amount of data have promoted the great success of deep learning in academia and industry. The performance of deep neural networks (DNNs) would be improved substantially when more supervised data is available or better data augmentation method is adapted. Data augmentation such as rotation, flipping, cropping, etc., is a powerful technique to increase the amount and diversity of data. Experiments show that the generalization of a neural network can be efficiently improved through manually designing data augmentation policies. However, this needs lots of knowledge of human expert, and sometimes shows the weak transferability across different tasks and datasets in practical applications. Inspired by neural architecture search (NAS)(Zoph & Le, 2016; Zoph et al., 2017; Zhong et al., 2018a;b; Guo et al., 2018), a reinforcement learning (RL) (Williams, 1992) method called AutoAugment is proposed by Cubuk et al. (2019), which can automatically learn the augmentation policy from data and provide an exciting performance improvement on image classification tasks. However, the computing cost is huge for training and evaluating thousands of sampled policies in the search process. Although proxy tasks, i.e., smaller models and reduced datasets, are taken to accelerate the searching process, tens of thousands of GPU-hours of consumption are still required. In addition, these data augmentation policies optimized on proxy tasks are not guaranteed to be optimal on the target task, and the fixed augmentation policy is also sub-optimal for the whole training process. ",
96
+ "bbox": [
97
+ 174,
98
+ 688,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/30303714f451b21eaee42acd79567fecfdfac2cdfb67ff8adc6f2486bb4f5ec4.jpg",
107
+ "image_caption": [
108
+ "Figure 1: The overview of our proposed method. We formulate it as a Min-Max game. The data of each batch is augmented by multiple pre-processing components with sampled policies $\\{ \\tau _ { 1 } , \\tau _ { 2 } , \\cdots , \\tau _ { M } \\}$ , respectively. Then, a target network is trained to minimize the loss of a large batch, which is formed by multiple augmented instances of the input batch. We extract the training losses of a target network corresponding to different augmentation policies as the reward signal. Finally, the augmentation policy network is trained with the guideline of the processed reward signal, and aims to maximize the training loss of the target network through generating adversarial policies. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 200,
113
+ 102,
114
+ 730,
115
+ 369
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "In this paper, we propose an efficient data augmentation method to address the problems mentioned above, which can directly search the best augmentation policy on the full dataset during training a target network, as shown in Figure 1. We first organize the network training and augmentation policy search in an adversarial and online manner. The augmentation policy is dynamically changed along with the training state of the target network, rather than fixed throughout the whole training process like normal AutoAugment (Cubuk et al., 2019). Due to reusing the computation in policy evaluation and dispensing with the retraining of the target network, the computing cost and time overhead are extremely reduced. Then, the augmentation policy network is taken as an adversary to explore the weakness of the target network. We augment the data of each min-batch with various adversarial policies in parallel, rather than the same data augmentation taken in batch augmentation (BA) (Hoffer et al., 2019). Then, several augmented instances of each mini-batch are formed into a large batch for target network learning. As an indicator of the hardness of augmentation policies, the training losses of the target network are used to guide the policy network to generate more aggressive and efficient policies based on REINFORCE algorithm (Williams, 1992). Through adversarial learning, we can train the target network more efficiently and robustly. ",
122
+ "bbox": [
123
+ 173,
124
+ 486,
125
+ 825,
126
+ 694
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "The contributions can be summarized as follows: ",
133
+ "bbox": [
134
+ 176,
135
+ 700,
136
+ 495,
137
+ 714
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "• Our method can directly learn augmentation policies on target tasks, i.e., target networks and full datasets, with a quite low computing cost and time overhead. The direct policy search avoids the performance degradation caused by the policy transfer from proxy tasks to target tasks. \n• We propose an adversarial framework to jointly optimize target network training and augmentation policy search. The harder samples augmented by adversarial policies are constantly fed into the target network to promote robust feature learning. Hence, the generalization of the target network can be significantly improved. \n• The experiment results show that our proposed method outperforms previous augmentation methods. For instance, we achieve a top-1 test error of $1 . 3 6 \\%$ with PyramidNet+ShakeDrop (Yamada et al., 2018) on CIFAR-10, which is the state-of-the-art performance. On ImageNet, we improve the top-1 accuracy of ResNet-50 (He et al., 2016) from $7 6 . 3 \\%$ to $7 9 . 4 \\%$ without extra data, which is even $1 . 7 7 \\%$ better than AutoAugment (Cubuk et al., 2019). ",
144
+ "bbox": [
145
+ 215,
146
+ 720,
147
+ 825,
148
+ 924
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 RELATED WORK ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 176,
158
+ 102,
159
+ 344,
160
+ 117
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Common data augmentation, which can generate extra samples by some label-preserved transformations, is usually used to increase the size of datasets and improve the generalization of networks, such as on MINST, CIFAR-10 and ImageNet (Krizhevsky et al., 2012; Wan et al., 2013; Szegedy et al., 2015). However, human-designed augmentation policies are specified for different datasets. For example, flipping, the widely used transformation on CIFAR-10/CIFAR-100 and ImageNet, is not suitable for MINST, which will destroy the property of original samples. ",
167
+ "bbox": [
168
+ 174,
169
+ 132,
170
+ 825,
171
+ 217
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Hence, several works (Lemley et al., 2017; Cubuk et al., 2019; Lin et al., 2019; Ho et al., 2019) have attempted to automatically learn data augmentation policies. Lemley et al. (2017) propose a method called Smart Augmentation, which merges two or more samples of a class to improve the generalization of a target network. The result also indicates that an augmentation network can be learned when a target network is being training. Through well designing the search space of data augmentation policies, AutoAugment (Cubuk et al., 2019) takes a recurrent neural network (RNN) as a sample controller to find the best data augmentation policy for a selected dataset. To reduce the computing cost, the augmentation policy search is performed on proxy tasks. Population based augmentation (PBA) (Ho et al., 2019) replaces the fixed augmentation policy with a dynamic schedule of augmentation policy along with the training process, which is mostly related to our work. Inspired by population based training (PBT) (Jaderberg et al., 2017), the augmentation policy search problem in PBA is modeled as a process of hyperparameter schedule learning. However, the augmentation schedule learning is still performed on proxy tasks. The learned policy schedule should be manually adjusted when the training process of a target network is non-matched with proxy tasks. ",
178
+ "bbox": [
179
+ 174,
180
+ 223,
181
+ 825,
182
+ 431
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Another related topic is Generative Adversarial Networks (GANs) (Goodfellow et al., 2014), which has recently attracted lots of research attention due to its fascinating performance, and also been used to enlarge datasets through directly synthesizing new images (Tran et al., 2017; Perez & Wang, 2017; Antoniou et al., 2017; Gurumurthy et al., 2017; Frid-Adar et al., 2018). Although we formulate our proposed method as a Min-Max game, there exists an obvious difference with traditional GANs. We want to find the best augmentation policy to perform image transformation along with the training process, rather than synthesize new images. Peng et al. (2018) also take such an idea to optimize the training process of a target network in human pose estimation. ",
189
+ "bbox": [
190
+ 174,
191
+ 438,
192
+ 825,
193
+ 550
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "3 METHOD ",
200
+ "text_level": 1,
201
+ "bbox": [
202
+ 174,
203
+ 564,
204
+ 282,
205
+ 580
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "In this section, we present the implementation of Adversarial AutoAugment. First, the motivation for the adversarial relation between network learning and augmentation policy is discussed. Then, we introduce the search space with the dynamic augmentation policy. Finally, the joint framework for network training and augmentation policy search is presented in detail. ",
212
+ "bbox": [
213
+ 176,
214
+ 589,
215
+ 823,
216
+ 645
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "3.1 MOTIVATIONS ",
223
+ "text_level": 1,
224
+ "bbox": [
225
+ 174,
226
+ 654,
227
+ 313,
228
+ 669
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "Although some human-designed data augmentations have been used in the training of DNNs, such as randomly cropping and horizontally flipping on CIFAR-10/CIFAR-100 and ImageNet, limited randomness will make it very difficult to generate effective samples at the tail end of the training. To struggle with the problem, more randomness about image transformation is introduced into the search space of AutoAugment (Cubuk et al., 2019) (described in Section 3.2). However, the learned policy is fixed for the entire training process. All of possible instances of each example will be send to the target network repeatedly, which still results in an inevitable overfitting in a long-epoch training. This phenomenon indicates that the learned policy is not adaptive to the training process of a target network, especially found on proxy tasks. Hence, the dynamic and adversarial augmentation policy with the training process is considered as the crucial feature in our search space. ",
235
+ "bbox": [
236
+ 174,
237
+ 680,
238
+ 825,
239
+ 819
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "Another consideration is how to improve the efficiency of the policy search. In AutoAugment (Cubuk et al., 2019), to evaluate the performance of augmentation policies, a lot of child models should be trained from scratch nearly to convergence. The computation in training and evaluating the performance of different sampled policies can not be reused, which leads to huge waste of computation resources. In this paper, we propose a computing-efficient policy search framework through reusing prior computation in policy evaluation. Only one target network is used to evaluate the performance of different policies with the help of the training losses of corresponding augmented instances. The augmentation policy network is learned from the intermediate state of the target network, which makes generated augmentation policies more aggressive and adaptive. On the contrary, to combat harder examples augmented by adversarial policies, the target network has to learn more robust features, which makes the training more efficiently. ",
246
+ "bbox": [
247
+ 174,
248
+ 827,
249
+ 823,
250
+ 924
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "image",
256
+ "img_path": "images/cf1281f8bae28f7b31d6aab6d29d8044913d73f1d9a58a90985849e432656219.jpg",
257
+ "image_caption": [
258
+ "Figure 2: An example of dynamic augmentation policies learned with ResNet-50 on ImageNet. With the training process of the target network, harder augmentation policies are sampled to combat overfitting. Intuitively, more geometric transformations, such as TranslateX, ShearY and Rotate, are picked in our sampled policies, which is obviously different from AutoAugment (Cubuk et al., 2019) concentrating on color-based transformations. "
259
+ ],
260
+ "image_footnote": [],
261
+ "bbox": [
262
+ 269,
263
+ 103,
264
+ 728,
265
+ 426
266
+ ],
267
+ "page_idx": 3
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "",
272
+ "bbox": [
273
+ 174,
274
+ 512,
275
+ 825,
276
+ 569
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "3.2 SEARCH SPACE ",
283
+ "text_level": 1,
284
+ "bbox": [
285
+ 176,
286
+ 587,
287
+ 321,
288
+ 601
289
+ ],
290
+ "page_idx": 3
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "In this paper, the basic structure of the search space of AutoAugment (Cubuk et al., 2019) is reserved. An augmentation policy is defined as that it is composed by 5 sub-policies, each sub-policy contains two image operations to be applied orderly, each operation has two corresponding parameters, i.e., the probability and magnitude of the operation. Finally, the 5 best policies are concatenated to form a single policy with 25 sub-policies. For each image in a mini-batch, only one sub-policy will be randomly selected to be applied. To compare with AutoAugment (Cubuk et al., 2019) conveniently, we just slightly modify the search space with removing the probability of each operation. This is because that we think the stochasticity of an operation with a probability requires a certain epochs to take effect, which will detain the feedback of the intermediate state of the target network. There are totally 16 image operations in our search space, including ShearX/Y, TranslateX/Y, Rotate, AutoContrast, Invert, Equalize, Solarize, Posterize, Contrast, Color, Brightness, Sharpness, Cutout (Devries & Taylor, 2017) and Sample Pairing (Inoue, 2018). The range of the magnitude is also discretized uniformly into 10 values. To guarantee the convergence during adversarial learning, the magnitude of all the operations are set in a moderate range.1 Besides, the randomness during the training process is introduced into our search space. Hence, the search space of the policy in each epoch has $| S | = ( 1 6 \\times 1 0 ) ^ { 1 0 } \\approx 1 . 1 \\times 1 0 ^ { 2 2 }$ possibilities. Considering the dynamic policy, the number of possible policies with the whole training process can be expressed as $| S | ^ { \\# e p o c h s }$ . An example of dynamically learning the augmentation policy along with the training process is shown in Figure 2. We observe that the magnitude (an indication of difficulty) gradually increases with the training process. ",
295
+ "bbox": [
296
+ 173,
297
+ 613,
298
+ 825,
299
+ 891
300
+ ],
301
+ "page_idx": 3
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "3.3 ADVERSARIAL LEARNING ",
306
+ "text_level": 1,
307
+ "bbox": [
308
+ 174,
309
+ 103,
310
+ 397,
311
+ 117
312
+ ],
313
+ "page_idx": 4
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "In this section, the adversarial framework of jointly optimizing network training and augmentation policy search is presented in detail. We use the augmentation policy network $\\boldsymbol { \\mathcal { A } } ( \\cdot , \\pmb { \\theta } )$ as an adversary, which attempts to increase the training loss of the target network $\\mathcal { F } ( \\cdot , w )$ through adversarial learning. The target network is trained by a large batch formed by multiple augmented instances of each batch to promote invariant learning (Salazar et al., 2018), and the losses of different augmentation policies applied on the same data are used to train the augmentation policy network by RL algorithm. ",
318
+ "bbox": [
319
+ 173,
320
+ 128,
321
+ 825,
322
+ 227
323
+ ],
324
+ "page_idx": 4
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Considering the target network $\\mathcal { F } ( \\cdot , w )$ with a loss function $\\mathcal { L } [ \\mathcal { F } ( \\pmb { x } , \\pmb { w } ) , \\pmb { y } ]$ , where each example is transformed by some random data augmentation $o ( \\cdot )$ , the learning process of the target network can be defined as the following minimization problem ",
329
+ "bbox": [
330
+ 173,
331
+ 233,
332
+ 825,
333
+ 276
334
+ ],
335
+ "page_idx": 4
336
+ },
337
+ {
338
+ "type": "equation",
339
+ "img_path": "images/357437841a8baa4fa9afe57c2203e6f99e1e22cebf9010ee0941a751ac3842af.jpg",
340
+ "text": "$$\n\\pmb { w } ^ { * } = \\underset { \\pmb { w } } { \\arg \\operatorname* { m i n } } \\ \\underset { \\pmb { x } \\sim \\Omega } { \\mathbb { E } } \\mathcal { L } [ \\mathcal { F } ( o ( \\pmb { x } ) , \\pmb { w } ) , \\pmb { y } ] ,\n$$",
341
+ "text_format": "latex",
342
+ "bbox": [
343
+ 370,
344
+ 282,
345
+ 625,
346
+ 308
347
+ ],
348
+ "page_idx": 4
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "where $\\Omega$ is the training set, $_ { \\textbf { \\em x } }$ and $\\textbf { { y } }$ are the input image and the corresponding label, respectively. The problem is usually solved by vanilla SGD with a learning rate $\\eta$ and batch size $N$ , and the training procedure for each batch can be expressed as ",
353
+ "bbox": [
354
+ 174,
355
+ 313,
356
+ 825,
357
+ 356
358
+ ],
359
+ "page_idx": 4
360
+ },
361
+ {
362
+ "type": "equation",
363
+ "img_path": "images/7faff2f8aad97c6f5a263204249682b43d9c780cd18be5222f7b9a8d73afeb5d.jpg",
364
+ "text": "$$\n\\pmb { w } _ { t + 1 } = \\pmb { w } _ { t } - \\eta \\frac { 1 } { N } \\sum _ { n = 1 } ^ { N } \\nabla _ { \\pmb { w } } \\mathcal { L } [ \\mathcal { F } ( o ( x _ { n } ) , \\pmb { w } , y _ { n } ] .\n$$",
365
+ "text_format": "latex",
366
+ "bbox": [
367
+ 343,
368
+ 362,
369
+ 655,
370
+ 406
371
+ ],
372
+ "page_idx": 4
373
+ },
374
+ {
375
+ "type": "text",
376
+ "text": "To improve the convergence performance of DNNs, more random and efficient data augmentation is performed under the help of the augmentation policy network. Hence, the minimization problem should be slightly modified as ",
377
+ "bbox": [
378
+ 173,
379
+ 411,
380
+ 825,
381
+ 454
382
+ ],
383
+ "page_idx": 4
384
+ },
385
+ {
386
+ "type": "equation",
387
+ "img_path": "images/8079bec44737be130c48f9d62df760c081ece4d44dde85d73f5880512a4aa3a1.jpg",
388
+ "text": "$$\n\\pmb { w } ^ { * } = \\underset { \\pmb { w } } { \\arg \\operatorname* { m i n } } \\ \\underset { \\pmb { x } \\sim \\Omega } { \\mathbb { E } } \\ \\underset { \\pmb { \\mathcal { A } } ( \\cdot , \\pmb { \\theta } ) } { \\mathbb { E } } \\mathcal { L } [ \\mathcal { F } ( \\tau ( \\pmb { x } ) , \\pmb { w } ) , \\pmb { y } ] ,\n$$",
389
+ "text_format": "latex",
390
+ "bbox": [
391
+ 343,
392
+ 459,
393
+ 653,
394
+ 487
395
+ ],
396
+ "page_idx": 4
397
+ },
398
+ {
399
+ "type": "text",
400
+ "text": "where $\\tau ( \\cdot )$ represents the augmentation policy generated by the network $\\boldsymbol { \\mathcal { A } } ( \\cdot , \\pmb { \\theta } )$ . Accordingly, the training rule can be rewritten as ",
401
+ "bbox": [
402
+ 171,
403
+ 493,
404
+ 825,
405
+ 522
406
+ ],
407
+ "page_idx": 4
408
+ },
409
+ {
410
+ "type": "equation",
411
+ "img_path": "images/3f6c2b66da389f91cb63fc352188ac2f1e21fad261eccee4d496f485d8497008.jpg",
412
+ "text": "$$\n\\pmb { w } _ { t + 1 } = \\pmb { w } _ { t } - \\eta \\frac { 1 } { M \\cdot N } \\sum _ { m = 1 } ^ { M } \\sum _ { n = 1 } ^ { N } \\nabla _ { \\pmb { w } } \\mathcal { L } [ \\mathcal { F } ( \\tau _ { m } ( x _ { n } ) , \\pmb { w } ) , y _ { n } ] ,\n$$",
413
+ "text_format": "latex",
414
+ "bbox": [
415
+ 303,
416
+ 527,
417
+ 694,
418
+ 573
419
+ ],
420
+ "page_idx": 4
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "where we introduce $M$ different instances of each input example augmented by adversarial policies $\\{ \\tau _ { 1 } , \\tau _ { 2 } , \\cdots , \\tau _ { M } \\}$ . For convenience, we denote the training loss of a mini-batch corresponding to the augmentation policy $\\tau _ { m }$ as ",
425
+ "bbox": [
426
+ 173,
427
+ 578,
428
+ 823,
429
+ 621
430
+ ],
431
+ "page_idx": 4
432
+ },
433
+ {
434
+ "type": "equation",
435
+ "img_path": "images/ad5ce4403f7216948077f7576c678356d0e67d7debf75ab5897c632920a41053.jpg",
436
+ "text": "$$\n\\mathcal { L } _ { m } = \\frac { 1 } { N } \\sum _ { n = 1 } ^ { N } \\mathcal { L } [ \\mathcal { F } ( \\tau _ { m } ( x _ { n } ) , \\pmb { w } ) , y _ { n } ] .\n$$",
437
+ "text_format": "latex",
438
+ "bbox": [
439
+ 375,
440
+ 627,
441
+ 620,
442
+ 670
443
+ ],
444
+ "page_idx": 4
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Hence, we have an equivalent form of Equation 4 ",
449
+ "bbox": [
450
+ 173,
451
+ 675,
452
+ 500,
453
+ 690
454
+ ],
455
+ "page_idx": 4
456
+ },
457
+ {
458
+ "type": "equation",
459
+ "img_path": "images/bb4c92c686635270ad2964c689792a678bc42b36ac081a645445e349d60251b0.jpg",
460
+ "text": "$$\n\\pmb { w } _ { t + 1 } = \\pmb { w } _ { t } - \\eta \\frac { 1 } { M } \\sum _ { m = 1 } ^ { M } \\nabla _ { \\pmb { w } } \\mathcal { L } _ { m } .\n$$",
461
+ "text_format": "latex",
462
+ "bbox": [
463
+ 390,
464
+ 696,
465
+ 607,
466
+ 741
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "Note that the training procedure can be regarded as a larger $N \\cdot M$ batch training or an average over $M$ instances of gradient computation without changing the learning rate, which will lead to a reduction of gradient variance and a faster convergence of the target network Hoffer et al. (2019). However, overfitting will also come. To overcome the problem, the augmentation policy network is designed to increase the training loss of the target network with harder augmentation policies. Therefore, we can mathematically express the object as the following maximization problem ",
473
+ "bbox": [
474
+ 173,
475
+ 744,
476
+ 826,
477
+ 829
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "equation",
483
+ "img_path": "images/107b151f7b522f76c993d3bbdfae27d7ce8897abeaefdc3b4bea230fc92817c0.jpg",
484
+ "text": "$$\n\\begin{array} { c } { \\pmb { \\theta } ^ { * } = \\underset { \\pmb { \\theta } } { \\arg \\operatorname* { m a x } } J ( \\pmb { \\theta } ) , } \\\\ { \\mathrm { w h e r e } ~ J ( \\pmb { \\theta } ) = \\underset { \\pmb { x } \\sim \\Omega } { \\mathbb { E } } ~ \\underset { \\pmb { \\mathbb { E } } ( \\cdot , \\pmb { \\theta } ) } { \\mathbb { E } } \\mathcal { L } [ \\mathcal { F } ( \\tau ( \\pmb { x } ) , \\pmb { w } ) , \\pmb { y } ] . } \\end{array}\n$$",
485
+ "text_format": "latex",
486
+ "bbox": [
487
+ 341,
488
+ 834,
489
+ 655,
490
+ 890
491
+ ],
492
+ "page_idx": 4
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "Similar to AutoAugment (Cubuk et al., 2019), the augmentation policy network is also implemented as a RNN shown in Figure 3. At each time step of the RNN controller, the softmax layer will predict an action corresponding to a discrete parameter of a sub-policy, and then an embedding of the predicted action will be fed into the next time step. In our experiments, the RNN controller will predict 20 discrete parameters to form a whole policy. ",
497
+ "bbox": [
498
+ 174,
499
+ 895,
500
+ 823,
501
+ 924
502
+ ],
503
+ "page_idx": 4
504
+ },
505
+ {
506
+ "type": "image",
507
+ "img_path": "images/d2f4b35084c6e611d6139d1fbef94757f5d6b6d525d6edbd65d47563cffa3f4c.jpg",
508
+ "image_caption": [
509
+ "Figure 3: The basic architecture of the controller for generating a sub-policy, which consists of two operations with corresponding parameters, the type and magnitude of each operation. When a policy contains $Q$ sub-policies, the basic architecture will be repeated $Q$ times. Following the setting of AutoAugment (Cubuk et al., 2019), the number of sub-policies $Q$ is set to 5 in this paper. "
510
+ ],
511
+ "image_footnote": [],
512
+ "bbox": [
513
+ 240,
514
+ 102,
515
+ 759,
516
+ 234
517
+ ],
518
+ "page_idx": 5
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "",
523
+ "bbox": [
524
+ 173,
525
+ 306,
526
+ 825,
527
+ 349
528
+ ],
529
+ "page_idx": 5
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "However, there has a severe problem in jointly optimizing target network training and augmentation policy search. This is because that non-differentiable augmentation operations break gradient flow from the target network $\\mathcal { F }$ to the augmentation policy network $\\mathcal { A }$ (Wang et al., 2017; Peng et al., 2018). As an alternative approach, REINFORCE algorithm (Williams, 1992) is applied to optimize the augmentation policy network as ",
534
+ "bbox": [
535
+ 174,
536
+ 356,
537
+ 823,
538
+ 426
539
+ ],
540
+ "page_idx": 5
541
+ },
542
+ {
543
+ "type": "equation",
544
+ "img_path": "images/0cd49c12d4aebfe70e605f93dd6deb419619fe0bd1e60dbd2c8f5cc69d4e9f2e.jpg",
545
+ "text": "$$\n\\begin{array} { r l } & { \\nabla _ { \\theta } J ( \\theta ) = \\nabla _ { \\theta } \\underset { x \\sim \\Omega \\tau \\sim A ( \\cdot , \\theta ) } { \\mathbb { E } } ~ \\underset { { A } ^ { ( \\cdot ) } } { \\mathbb { E } } ~ \\mathcal { L } [ \\mathcal { F } ( \\tau ( x ) , w ) , y ] } \\\\ & { \\approx \\displaystyle \\sum _ { m } \\mathcal { L } _ { m } \\nabla _ { \\theta } p _ { m } = \\sum _ { m } \\mathcal { L } _ { m } p _ { m } \\nabla _ { \\theta } \\log p _ { m } } \\\\ & { ~ = \\underset { { \\tau \\sim A ( \\cdot , \\theta ) } } { \\mathbb { E } } ~ \\mathcal { L } _ { m } \\nabla _ { \\theta } \\log p _ { m } } \\\\ & { ~ \\approx \\frac { 1 } { M } \\displaystyle \\sum _ { m = 1 } ^ { M } \\mathcal { L } _ { m } \\nabla _ { \\theta } \\log p _ { m } , } \\end{array}\n$$",
546
+ "text_format": "latex",
547
+ "bbox": [
548
+ 331,
549
+ 433,
550
+ 665,
551
+ 569
552
+ ],
553
+ "page_idx": 5
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "where $p _ { m }$ represents the probability of the policy $\\tau _ { m }$ . To reduce the variance of gradient $\\nabla _ { \\pmb { \\theta } } J ( \\pmb { \\theta } )$ , we replace the training loss of a mini-batch ${ \\mathcal { L } } _ { m }$ with ${ \\widehat { \\mathcal { L } } } _ { m }$ a moving average over a certain minibatches2, and then normalize it among $M$ instances as ${ \\widetilde { \\mathcal { L } } } _ { m }$ . Hence, the training procedure of the augmentation policy network can be expressed as ",
558
+ "bbox": [
559
+ 173,
560
+ 575,
561
+ 826,
562
+ 637
563
+ ],
564
+ "page_idx": 5
565
+ },
566
+ {
567
+ "type": "equation",
568
+ "img_path": "images/95ede88d418cd5eb2dfdb765c787784d9b7309625eafd669d96747e2ab95096d.jpg",
569
+ "text": "$$\n\\begin{array} { r l } & { \\nabla _ { \\pmb { \\theta } } J ( \\pmb { \\theta } ) \\approx \\cfrac { 1 } { M } \\displaystyle \\sum _ { m = 1 } ^ { M } \\widetilde { \\mathcal { L } } _ { m } \\nabla _ { \\pmb { \\theta } } \\log p _ { m } , } \\\\ & { \\theta _ { e + 1 } = \\theta _ { e } + \\beta \\displaystyle \\frac { 1 } { M } \\displaystyle \\sum _ { m = 1 } ^ { M } \\widetilde { \\mathcal { L } } _ { m } \\nabla _ { \\pmb { \\theta } } \\log p _ { m } , } \\end{array}\n$$",
570
+ "text_format": "latex",
571
+ "bbox": [
572
+ 369,
573
+ 645,
574
+ 625,
575
+ 734
576
+ ],
577
+ "page_idx": 5
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "The adversarial learning of target network training and augmentation policy search is summarized as Algorithm 1. ",
582
+ "bbox": [
583
+ 173,
584
+ 741,
585
+ 825,
586
+ 770
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "4 EXPERIMENTS AND ANALYSIS ",
593
+ "text_level": 1,
594
+ "bbox": [
595
+ 174,
596
+ 787,
597
+ 459,
598
+ 804
599
+ ],
600
+ "page_idx": 5
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "In this section, we first reveal the details of experiment settings. Then, we evaluate our proposed method on CIFAR-10/CIFAR-100, ImageNet, and compare it with previous methods. Results in Figure 4 show our method achieves the state-of-the-art performance with higher computing and time efficiency3. ",
605
+ "bbox": [
606
+ 173,
607
+ 813,
608
+ 825,
609
+ 869
610
+ ],
611
+ "page_idx": 5
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "Algorithm 1 Joint Training of Target Network and Augmentation Policy Network ",
616
+ "bbox": [
617
+ 173,
618
+ 102,
619
+ 710,
620
+ 118
621
+ ],
622
+ "page_idx": 6
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "Initialization: target network $\\mathcal { F } ( \\cdot , w )$ , augmentation policy network $\\boldsymbol { \\mathcal { A } } ( \\cdot , \\pmb { \\theta } )$ Input: input examples $_ { \\textbf { \\em x } }$ , corresponding labels $\\textbf { { y } }$ ",
627
+ "bbox": [
628
+ 173,
629
+ 121,
630
+ 676,
631
+ 150
632
+ ],
633
+ "page_idx": 6
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "1: for $1 \\leq e \\leq$ epochs do \n2: Initialize $\\widehat { \\mathcal { L } } _ { m } = 0 , \\forall m \\in \\{ 1 , 2 , \\cdots , M \\}$ ; \n3: Generate $M$ policies with the probabilities $\\{ p _ { 1 } , p _ { 2 } , \\cdots , p _ { M } \\}$ ; \n4: for $1 \\leq t \\leq T$ do \n5: Augment each batch data with $M$ generated policies, respectively; \n6: Update $w _ { e , t + 1 }$ according to Equation 4; \n7: Update ${ \\widehat { \\mathcal { L } } } _ { m }$ through moving average, $\\forall m \\in \\{ 1 , 2 , \\cdot \\cdot \\cdot , M \\}$ ; \n8: Collect $\\{ \\widehat { \\mathcal { L } } _ { 1 } , \\widehat { \\mathcal { L } } _ { 2 } , \\cdots , \\widehat { \\mathcal { L } } _ { M } \\}$ ; \n9: Normalize ${ \\widehat { \\mathcal { L } } } _ { m }$ among $M$ instances as $\\widetilde { \\mathcal { L } } _ { m } , \\forall m \\in \\{ 1 , 2 , \\cdots , M \\}$ ; \n10: Update $\\pmb { \\theta } _ { e + 1 }$ via Equation 9; \n11: Output $w ^ { \\ast } , \\theta ^ { \\ast }$ ",
638
+ "bbox": [
639
+ 176,
640
+ 151,
641
+ 684,
642
+ 321
643
+ ],
644
+ "page_idx": 6
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "4.1 EXPERIMENT SETTINGS ",
649
+ "text_level": 1,
650
+ "bbox": [
651
+ 176,
652
+ 352,
653
+ 382,
654
+ 367
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "The RNN controller is implemented as a one-layer LSTM (Hochreiter & Schmidhuber, 1997). We set the hidden size to 100, and the embedding size to 32. We use Adam optimizer (Kingma & Ba, 2015) with a initial learning rate 0.00035 to train the controller. To avoid unexpected rapid convergence, an entropy penalty of a weight of 0.00001 is applied. All the reported results are the mean of five runs with different initializations. ",
661
+ "bbox": [
662
+ 173,
663
+ 378,
664
+ 825,
665
+ 449
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "4.2 EXPERIMENTS ON CIFAR-10 AND CIFAR-100 ",
672
+ "text_level": 1,
673
+ "bbox": [
674
+ 174,
675
+ 462,
676
+ 542,
677
+ 476
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "CIFAR-10 dataset (Krizhevsky & Hinton, 2009) has totally 60000 images. The training and test sets have 50000 and 10000 images, respectively. Each image in size of $3 2 \\times 3 2$ belongs to one of 10 classes. We evaluate our proposed method with the following models: Wide-ResNet-28- 10 (Zagoruyko & Komodakis, 2016), Shake-Shake $( 2 6 ~ 2 \\mathrm { x } 3 2 \\mathrm { d } )$ (Gastaldi, 2017), Shake-Shake (26 $2 \\mathrm { x } 9 6 \\mathrm { d } )$ (Gastaldi, 2017), Shake-Shake $( 2 6 2 \\mathrm { x } 1 1 2 \\mathrm { d } )$ (Gastaldi, 2017), PyramidNet+ShakeDrop (Han et al., 2017; Yamada et al., 2018). All the models are trained on the full training set. ",
684
+ "bbox": [
685
+ 174,
686
+ 484,
687
+ 825,
688
+ 569
689
+ ],
690
+ "page_idx": 6
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "Training details: The Baseline is trained with the standard data augmentation, namely, randomly cropping a part of $3 2 \\times 3 2$ from the padded image and horizontally flipping it with a probability of 0.5. The Cutout (Devries & Taylor, 2017) randomly select a $1 6 \\times 1 6$ patch of each image, and then set the pixels of the selected patch to zeros. For our method, the searched policy is applied in addition to standard data augmentation and Cutout. For each image in the training process, standard data augmentation, the searched policy and Cutout are applied in sequence. For Wide-ResNet-28- 10, the step learning rate (LR) schedule is adopted. The cosine LR schedule is adopted for the other models. More details about model hyperparameters are supplied in A.1. ",
695
+ "bbox": [
696
+ 174,
697
+ 575,
698
+ 825,
699
+ 688
700
+ ],
701
+ "page_idx": 6
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "Choice of $M$ : To choose the optimal $M$ , we select Wide-ResNet-28-10 as a target network, and evaluate the performance of our proposed method verse different $M$ , where $M \\in \\{ 2 , 4 , 8 , 1 6 , 3 2 \\}$ . From Figure 5, we can observe that the test accuracy of the model improves rapidly with the increase of $M$ up to 8. The further increase of $M$ does not bring a significant improvement. Therefore, to balance the performance and the computing cost, $M$ is set to 8 in all the following experiments. ",
706
+ "bbox": [
707
+ 174,
708
+ 694,
709
+ 825,
710
+ 763
711
+ ],
712
+ "page_idx": 6
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "CIFAR-10 results: In Table 1, we report the test error of these models on CIFAR-10. For all of these models, our proposed method can achieve better performance compared to previous methods. We achieve $0 . 7 8 \\%$ and $0 . 6 8 \\%$ improvement on Wide-ResNet-28-10 compared to AutoAugment and PBA, respectively. We achieve a top-1 test error of $1 . 3 6 \\%$ with PyramidNet $^ +$ ShakeDrop, which is $0 . 1 \\%$ better than the current state-of-the-art reported in Ho et al. (2019). As shown in Figure 6(a) and 6(b),we further visualize the probability distribution of the parameters of the augmentation policies learned with PyramidNet+ShakeDrop on CIFAR-10 over time. From Figure 6(a), we can find that the percentages of some operations, such as TranslateY, Rotate, Posterize, and SampleParing, gradually increase along with the training process. Meanwhile, more geometric transformations, such as TranslateX, TranslateY, and Rotate, are picked in the sampled augmentation policies, which is different from color-focused AutoAugment (Cubuk et al., 2019) on CIFAR-10. Figure 6(b) shows that large magnitudes gain higher percentages during training. However, at the tail of training, low magnitudes remain considerable percentages. This indicates that our method does not simply learn the transformations with the extremes of the allowed magnitudes to spoil the target network. ",
717
+ "bbox": [
718
+ 174,
719
+ 771,
720
+ 825,
721
+ 924
722
+ ],
723
+ "page_idx": 6
724
+ },
725
+ {
726
+ "type": "image",
727
+ "img_path": "images/1d9bd1c440b329d4cde0cd4933e8cd51662c730a2c81bacfeed27c2444ff1516.jpg",
728
+ "image_caption": [
729
+ "Figure 4: The Comparison of normalized performance between AutoAugment and our method. Please refer to the following tables for more details. "
730
+ ],
731
+ "image_footnote": [],
732
+ "bbox": [
733
+ 191,
734
+ 104,
735
+ 473,
736
+ 272
737
+ ],
738
+ "page_idx": 7
739
+ },
740
+ {
741
+ "type": "image",
742
+ "img_path": "images/8f0622955a06ab6ba860d80c3c02ae266fb49a0c8467d420de114247a0cfe754.jpg",
743
+ "image_caption": [
744
+ "Figure 5: The Top-1 test accuracy of WideResNet-28-10 on CIFAR-10 verse different $M$ , where $M \\in \\{ 2 , 4 , 8 , 1 6 , 3 2 \\}$ . "
745
+ ],
746
+ "image_footnote": [],
747
+ "bbox": [
748
+ 542,
749
+ 112,
750
+ 794,
751
+ 273
752
+ ],
753
+ "page_idx": 7
754
+ },
755
+ {
756
+ "type": "image",
757
+ "img_path": "images/969c5da3cca5ba7fe0f9f8865ef328f9131f97876658c78dfb77dd5e89fdd3d5.jpg",
758
+ "image_caption": [
759
+ "Figure 6: Probability distribution of the parameters in the learned augmentation policies on CIFAR10 over time. The number in (b) represents the magnitude of one operation. Larger number stands for more dramatic image transformations. The probability distribution of each parameter is the mean of each five epochs. "
760
+ ],
761
+ "image_footnote": [],
762
+ "bbox": [
763
+ 191,
764
+ 347,
765
+ 813,
766
+ 530
767
+ ],
768
+ "page_idx": 7
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "",
773
+ "bbox": [
774
+ 174,
775
+ 595,
776
+ 825,
777
+ 637
778
+ ],
779
+ "page_idx": 7
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "CIFAR-100 results: We also evaluate our proposed method on CIFAR-100, as shown in Table 2. \nAs we can observe from the table, we also achieve the state-of-the-art performance on this dataset. ",
784
+ "bbox": [
785
+ 176,
786
+ 645,
787
+ 820,
788
+ 674
789
+ ],
790
+ "page_idx": 7
791
+ },
792
+ {
793
+ "type": "table",
794
+ "img_path": "images/d929706459bceab76309d542582ff87eb9b290a004d6adec648ac5702809b1fa.jpg",
795
+ "table_caption": [
796
+ "Table 1: Top-1 test error $( \\% )$ on CIFAR-10. We replicate the results of Baseline, Cutout and AutoAugment methods from Cubuk et al. (2019), and the results of PBA from Ho et al. (2019) in all of our experiments. "
797
+ ],
798
+ "table_footnote": [],
799
+ "table_body": "<table><tr><td>Model</td><td>Baseline</td><td>Cutout</td><td>AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>Wide-ResNet-28-10</td><td>3.87</td><td>3.08</td><td>2.68</td><td>2.58</td><td>1.90±0.15</td></tr><tr><td>Shake-Shake (26 2x32d)</td><td>3.55</td><td>3.02</td><td>2.47</td><td>2.54</td><td>2.36±0.10</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>2.86</td><td>2.56</td><td>1.99</td><td>2.03</td><td>1.85±0.12</td></tr><tr><td>Shake-Shake (26 2x112d)</td><td>2.82</td><td>2.57</td><td>1.89</td><td>2.03</td><td>1.78±0.05</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>2.67</td><td>2.31</td><td>1.48</td><td>1.46</td><td>1.36±0.06</td></tr></table>",
800
+ "bbox": [
801
+ 199,
802
+ 731,
803
+ 795,
804
+ 832
805
+ ],
806
+ "page_idx": 7
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "4.3 EXPERIMENTS ON IMAGENET ",
811
+ "text_level": 1,
812
+ "bbox": [
813
+ 174,
814
+ 847,
815
+ 421,
816
+ 862
817
+ ],
818
+ "page_idx": 7
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "As a great challenge in image recognition, ImageNet dataset (Deng et al., 2009) has about 1.2 million training images and 50000 validation images with 1000 classes. In this section, we directly search the augmentation policy on the full training set and train ResNet-50 (He et al., 2016), ResNet-50-D (He et al., 2018) and ResNet-200 (He et al., 2016) from scratch. ",
823
+ "bbox": [
824
+ 174,
825
+ 868,
826
+ 825,
827
+ 924
828
+ ],
829
+ "page_idx": 7
830
+ },
831
+ {
832
+ "type": "table",
833
+ "img_path": "images/1c93b5f77c1ed4a44c3eae869260059d2b4c4df4c9ddaf09ea86ef7706a1d1fc.jpg",
834
+ "table_caption": [
835
+ "Table 2: Top-1 test error $( \\% )$ on CIFAR-100. "
836
+ ],
837
+ "table_footnote": [],
838
+ "table_body": "<table><tr><td>Model</td><td>Baseline</td><td>Cutout</td><td> AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>Wide-ResNet-28-10</td><td>18.80</td><td>18.41</td><td>17.09</td><td>16.73</td><td>15.49±0.18</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>17.05</td><td>16.00</td><td>14.28</td><td>15.31</td><td>14.10±0.15</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>13.99</td><td>12.19</td><td>10.67</td><td>10.94</td><td>10.42±0.20</td></tr></table>",
839
+ "bbox": [
840
+ 199,
841
+ 116,
842
+ 794,
843
+ 189
844
+ ],
845
+ "page_idx": 8
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "Training details: For the baseline augmentation, we randomly resize and crop each input image to a size of $2 2 4 \\times 2 2 4$ , and then horizontally flip it with a probability of 0.5. For AutoAugment (Cubuk et al., 2019) and our method, the baseline augmentation and the augmentation policy are both used for each image. The cosine LR schedule is adopted in the training process. The model hyperparameters on ImageNet is also detailed in A.1. ",
850
+ "bbox": [
851
+ 174,
852
+ 199,
853
+ 825,
854
+ 268
855
+ ],
856
+ "page_idx": 8
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "ImageNet results: The performance of our proposed method on ImageNet is presented in Table 3. It can be observed that we achieve a top-1 accuracy $7 9 . 4 0 \\%$ on ResNet-50 without extra data. To the best of our knowledge, this is the highest top-1 accuracy for ResNet-50 learned on ImageNet. Besides, we only replace the ResNet-50 architecture with ResNet-50-D, and achieve a consistent improvement with a top-1 accuracy of $8 0 . 0 0 \\%$ . ",
861
+ "bbox": [
862
+ 174,
863
+ 275,
864
+ 825,
865
+ 344
866
+ ],
867
+ "page_idx": 8
868
+ },
869
+ {
870
+ "type": "table",
871
+ "img_path": "images/c11394c053c797ac41deef027c8e6c75b7d63680580b038230cdbafd75d497b2.jpg",
872
+ "table_caption": [
873
+ "Table 3: Top-1 / Top-5 test error $( \\% )$ on ImageNet. Note that the result of ResNet-50-D is achieved only through substituting the architecture. "
874
+ ],
875
+ "table_footnote": [],
876
+ "table_body": "<table><tr><td>Model</td><td>Baseline</td><td>AutoAugment</td><td>PBA</td><td>Our Method</td></tr><tr><td>ResNet-50</td><td>23.69 / 6.92</td><td>22.37 /6.18</td><td>1</td><td>20.60±0.15 /5.53±0.05</td></tr><tr><td>ResNet-50-D</td><td>22.84 / 6.48</td><td>1</td><td></td><td>20.00±0.12/5.25±0.03</td></tr><tr><td>ResNet-200</td><td>21.52 / 5.85</td><td>20.00 /4.90</td><td>1</td><td>18.68±0.18 /4.70±0.05</td></tr></table>",
877
+ "bbox": [
878
+ 220,
879
+ 386,
880
+ 772,
881
+ 459
882
+ ],
883
+ "page_idx": 8
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "4.4 ABLATION STUDY ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 174,
891
+ 472,
892
+ 341,
893
+ 486
894
+ ],
895
+ "page_idx": 8
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "To check the effect of each component in our proposed method, we report the test error of ResNet-50 on ImageNet the following augmentation methods in Table 4. ",
900
+ "bbox": [
901
+ 174,
902
+ 494,
903
+ 823,
904
+ 523
905
+ ],
906
+ "page_idx": 8
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "• Baseline: Training regularly with the standard data augmentation and step LR schedule. \n• Fixed: Augmenting all the instances of each batch with the standard data augmentation fixed throughout the entire training process. Random: Augmenting all the instances of each batch with randomly and dynamically generated policies. Ours: Augmenting all the instances of each batch with adversarial policies sampled by the policy network along with the training process. ",
911
+ "bbox": [
912
+ 215,
913
+ 535,
914
+ 825,
915
+ 647
916
+ ],
917
+ "page_idx": 8
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "From the table, we can find that Fixed can achieve $0 . 9 9 \\%$ error reduction compared to Baseline. This shows that a large-batch training with multiple augmented instances of each mini-batch can indeed improve the generalization of the model, which is consistent with the conclusion presented in Hoffer et al. (2019). In addition, the test error of Random is $1 . 0 2 \\%$ better than Fixed. This indicates that augmenting batch with randomly generated policies can reduce overfitting in a certain extent. Furthermore, our method achieves the best test error of $2 0 . 6 0 \\%$ through augmenting samples with adversarial policies. From the result, we can conclude that these policies generated by the policy network are more adaptive to the training process, and make the target network have to learn more robust features. ",
922
+ "bbox": [
923
+ 173,
924
+ 657,
925
+ 825,
926
+ 782
927
+ ],
928
+ "page_idx": 8
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "4.5 COMPUTING COST AND TIME OVERHEAD ",
933
+ "text_level": 1,
934
+ "bbox": [
935
+ 174,
936
+ 796,
937
+ 504,
938
+ 810
939
+ ],
940
+ "page_idx": 8
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Computing Cost: The computation in target network training is reused for policy evaluation. This makes the computing cost in policy search become negligible. Although there exists an increase of computing cost in target network training, the total computing cost in training one target network with augmentation policies is quite small compared to prior work. ",
945
+ "bbox": [
946
+ 174,
947
+ 819,
948
+ 825,
949
+ 875
950
+ ],
951
+ "page_idx": 8
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Time Overhead: Since we just train one target network with a large batch distributedly and simultaneously, the time overhead of the large-batch training is equal to the regular training. Meanwhile, the joint optimization of target network training and augmentation policy search dispenses with the process of offline policy search and the retraining of a target network, which leads to a extreme time overhead reduction. ",
956
+ "bbox": [
957
+ 176,
958
+ 882,
959
+ 823,
960
+ 924
961
+ ],
962
+ "page_idx": 8
963
+ },
964
+ {
965
+ "type": "table",
966
+ "img_path": "images/0d33c9b0d3bb4d596dbaf5db23898beb2fc80c5c532a9c04e77237c677eaa18c.jpg",
967
+ "table_caption": [
968
+ "Table 4: Top-1 test error $( \\% )$ of ResNet-50 with different augmentation methods on ImageNet. "
969
+ ],
970
+ "table_footnote": [],
971
+ "table_body": "<table><tr><td>Method</td><td>Aug. Policy</td><td>Enlarge Batch</td><td>LR Schedule</td><td>Test Error</td></tr><tr><td>Baseline</td><td>standard</td><td>M=1</td><td>step</td><td>23.69</td></tr><tr><td>Fixed</td><td>standard</td><td>M=8</td><td>cosine</td><td>22.70</td></tr><tr><td>Random</td><td>random</td><td>M=8</td><td>cosine</td><td>21.68</td></tr><tr><td>Ours</td><td>adversarial</td><td>M=8</td><td>cosine</td><td>20.60</td></tr></table>",
972
+ "bbox": [
973
+ 256,
974
+ 116,
975
+ 736,
976
+ 203
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "",
983
+ "bbox": [
984
+ 173,
985
+ 213,
986
+ 825,
987
+ 241
988
+ ],
989
+ "page_idx": 9
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "In Table 5, we take the training of ResNet-50 on ImageNet as an example to compare the computing cost and time overhead of our method and AutoAugment. From the table, we can find that our method is $1 2 \\times$ less computing cost and $1 1 \\times$ shorter time overhead than AutoAugment. ",
994
+ "bbox": [
995
+ 174,
996
+ 248,
997
+ 825,
998
+ 290
999
+ ],
1000
+ "page_idx": 9
1001
+ },
1002
+ {
1003
+ "type": "table",
1004
+ "img_path": "images/f3bf8b2d6f177971a2bdad2dbb26e8734c9a3d3754c0e1aeba92d92343c857b2.jpg",
1005
+ "table_caption": [
1006
+ "Table 5: The comparison of computing cost (GPU hours) and time overhead (days) in training ResNet-50 on ImageNet between AutoAugment and our method. The computing cost and time overhead are estimated on 64 NVIDIA Tesla V100s. "
1007
+ ],
1008
+ "table_footnote": [],
1009
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">Computing Cost</td><td colspan=\"3\">Time Overhead</td></tr><tr><td>Searching</td><td>Training</td><td>Total</td><td>Searching</td><td>Training</td><td>Total</td></tr><tr><td>AutoAugment</td><td>15000</td><td>160</td><td>15160</td><td>10</td><td>1</td><td>11</td></tr><tr><td>Our Method</td><td>~0</td><td>1280</td><td>1280</td><td>~0</td><td>1</td><td>1</td></tr></table>",
1010
+ "bbox": [
1011
+ 222,
1012
+ 345,
1013
+ 772,
1014
+ 424
1015
+ ],
1016
+ "page_idx": 9
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "4.6 TRANSFERABILITY ACROSS DATASETS AND ARCHITECTURES ",
1021
+ "text_level": 1,
1022
+ "bbox": [
1023
+ 174,
1024
+ 438,
1025
+ 640,
1026
+ 452
1027
+ ],
1028
+ "page_idx": 9
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "To further show the higher efficiency of our method, the transferability of the learned augmentation policies is evaluated in this section. We first take a snapshot of the adversarial training process of ResNet-50 on ImageNet, and then directly use the learned dynamic augmentation policies to regularly train the following models: Wide-ResNet-28-10 on CIFAR-10/100, ResNet-50-D on ImageNet and ResNet200 on ImageNet. Table 6 presents the experimental results of the transferability. From the table, we can find that a competitive performance can be still achieved through direct policy transfer. This indicates that the learned augmentation policies transfer well across datasets and architectures. However, compared to the proposed method, the policy transfer results in an obvious performance degradation, especially the transfer across datasets. ",
1033
+ "bbox": [
1034
+ 173,
1035
+ 459,
1036
+ 825,
1037
+ 585
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "table",
1043
+ "img_path": "images/e885dd982a0940ae52993dc12f9f60d83acd25879acc9f8565db376eeebf1417.jpg",
1044
+ "table_caption": [
1045
+ "Table 6: Top-1 test error $( \\% )$ of the transfer of the augmentation policies learned with ResNet-50 on ImageNet. "
1046
+ ],
1047
+ "table_footnote": [],
1048
+ "table_body": "<table><tr><td>Method</td><td>Dataset</td><td>AutoAugment</td><td>Our Method</td><td>Policy Transfer</td></tr><tr><td>Wide-ResNet-28-10</td><td>CIFAR-10</td><td>2.68</td><td>1.90</td><td>2.45±0.13</td></tr><tr><td>Wide-ResNet-28-10</td><td>CIFAR-100</td><td>17.09</td><td>15.49</td><td>16.48±0.15</td></tr><tr><td>ResNet-50-D</td><td>ImageNet</td><td>1</td><td>20.00</td><td>20.20±0.05</td></tr><tr><td>ResNet-200</td><td>ImageNet</td><td>20.00</td><td>18.68</td><td>19.05±0.10</td></tr></table>",
1049
+ "bbox": [
1050
+ 204,
1051
+ 626,
1052
+ 789,
1053
+ 713
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "5 CONCLUSION ",
1060
+ "text_level": 1,
1061
+ "bbox": [
1062
+ 174,
1063
+ 729,
1064
+ 320,
1065
+ 746
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "In this paper, we introduce the idea of adversarial learning into automatic data augmentation. The policy network tries to combat the overfitting of the target network through generating adversarial policies with the training process. To oppose this, robust features are learned in the target network, which leads to a significant performance improvement. Meanwhile, the augmentation policy search is performed along with the training of a target network, and the computation in network training is reused for policy evaluation, which can extremely reduce the search cost and make our method more computing-efficient. ",
1072
+ "bbox": [
1073
+ 173,
1074
+ 753,
1075
+ 825,
1076
+ 852
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "REFERENCES ",
1083
+ "text_level": 1,
1084
+ "bbox": [
1085
+ 176,
1086
+ 872,
1087
+ 285,
1088
+ 887
1089
+ ],
1090
+ "page_idx": 9
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "Antreas Antoniou, Amos J. Storkey, and Harrison Edwards. Data augmentation generative adversarial networks. ICLR, 2017. ",
1095
+ "bbox": [
1096
+ 174,
1097
+ 895,
1098
+ 821,
1099
+ 922
1100
+ ],
1101
+ "page_idx": 9
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Ekin D. Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. Autoaugment: ´ Learning augmentation policies from data. CVPR, 2019. ",
1106
+ "bbox": [
1107
+ 171,
1108
+ 103,
1109
+ 823,
1110
+ 132
1111
+ ],
1112
+ "page_idx": 10
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. CVPR, 2009. ",
1117
+ "bbox": [
1118
+ 171,
1119
+ 140,
1120
+ 823,
1121
+ 170
1122
+ ],
1123
+ "page_idx": 10
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. CoRR, abs/1708.04552, 2017. ",
1128
+ "bbox": [
1129
+ 171,
1130
+ 179,
1131
+ 823,
1132
+ 208
1133
+ ],
1134
+ "page_idx": 10
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "Maayan Frid-Adar, Eyal Klang, Michal Amitai, Jacob Goldberger, and Hayit Greenspan. Synthetic data augmentation using GAN for improved liver lesion classification. IEEE International Symposium on Biomedical Imaging (ISBI), 2018. ",
1139
+ "bbox": [
1140
+ 174,
1141
+ 215,
1142
+ 823,
1143
+ 260
1144
+ ],
1145
+ "page_idx": 10
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "Xavier Gastaldi. Shake-shake regularization. CoRR, abs/1705.07485, 2017. ",
1150
+ "bbox": [
1151
+ 174,
1152
+ 267,
1153
+ 671,
1154
+ 284
1155
+ ],
1156
+ "page_idx": 10
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. NIPS, 2014. ",
1161
+ "bbox": [
1162
+ 173,
1163
+ 291,
1164
+ 823,
1165
+ 320
1166
+ ],
1167
+ "page_idx": 10
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "Minghao Guo, Zhao Zhong, Wei Wu, Dahua Lin, and Junjie Yan. IRLAS: inverse reinforcement learning for architecture search. CoRR, abs/1812.05285, 2018. ",
1172
+ "bbox": [
1173
+ 174,
1174
+ 329,
1175
+ 823,
1176
+ 358
1177
+ ],
1178
+ "page_idx": 10
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Swaminathan Gurumurthy, Ravi Kiran Sarvadevabhatla, and Venkatesh Babu Radhakrishnan. Deligan : Generative adversarial networks for diverse and limited data. CVPR, 2017. ",
1183
+ "bbox": [
1184
+ 173,
1185
+ 367,
1186
+ 821,
1187
+ 396
1188
+ ],
1189
+ "page_idx": 10
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. CVPR, 2017. ",
1194
+ "bbox": [
1195
+ 176,
1196
+ 405,
1197
+ 805,
1198
+ 421
1199
+ ],
1200
+ "page_idx": 10
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, 2016. ",
1205
+ "bbox": [
1206
+ 173,
1207
+ 429,
1208
+ 821,
1209
+ 458
1210
+ ],
1211
+ "page_idx": 10
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Tong He, Zhi Zhang, Hang Zhang, Zhongyue Zhang, Junyuan Xie, and Mu Li. Bag of tricks for image classification with convolutional neural networks. CoRR, abs/1812.01187, 2018. ",
1216
+ "bbox": [
1217
+ 174,
1218
+ 467,
1219
+ 823,
1220
+ 496
1221
+ ],
1222
+ "page_idx": 10
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Daniel Ho, Eric Liang, Ion Stoica, Pieter Abbeel, and Xi Chen. Population based augmentation: Efficient learning of augmentation policy schedules. ICML, 2019. ",
1227
+ "bbox": [
1228
+ 171,
1229
+ 503,
1230
+ 821,
1231
+ 534
1232
+ ],
1233
+ "page_idx": 10
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 1997. ",
1238
+ "bbox": [
1239
+ 174,
1240
+ 541,
1241
+ 812,
1242
+ 558
1243
+ ],
1244
+ "page_idx": 10
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Elad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: better training with larger batches. CoRR, abs/1901.09335, 2019. ",
1249
+ "bbox": [
1250
+ 171,
1251
+ 565,
1252
+ 823,
1253
+ 594
1254
+ ],
1255
+ "page_idx": 10
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Hiroshi Inoue. Data augmentation by pairing samples for images classification. CoRR, abs/1801.02929, 2018. ",
1260
+ "bbox": [
1261
+ 173,
1262
+ 603,
1263
+ 823,
1264
+ 632
1265
+ ],
1266
+ "page_idx": 10
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "Max Jaderberg, Valentin Dalibard, Simon Osindero, Wojciech M. Czarnecki, Jeff Donahue, Ali Razavi, Oriol Vinyals, Tim Green, Iain Dunning, Karen Simonyan, Chrisantha Fernando, and Koray Kavukcuoglu. Population based training of neural networks. CoRR, abs/1711.09846, 2017. ",
1271
+ "bbox": [
1272
+ 173,
1273
+ 640,
1274
+ 825,
1275
+ 696
1276
+ ],
1277
+ "page_idx": 10
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015. ",
1282
+ "bbox": [
1283
+ 169,
1284
+ 707,
1285
+ 795,
1286
+ 722
1287
+ ],
1288
+ "page_idx": 10
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "Alex Krizhevsky and Geoffrey E. Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. ",
1293
+ "bbox": [
1294
+ 168,
1295
+ 731,
1296
+ 821,
1297
+ 760
1298
+ ],
1299
+ "page_idx": 10
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. NIPS, 2012. ",
1304
+ "bbox": [
1305
+ 171,
1306
+ 767,
1307
+ 823,
1308
+ 796
1309
+ ],
1310
+ "page_idx": 10
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "Joseph Lemley, Shabab Bazrafkan, and Peter Corcoran. Smart augmentation - learning an optimal data augmentation strategy. CoRR, abs/1703.08383, 2017. ",
1315
+ "bbox": [
1316
+ 171,
1317
+ 806,
1318
+ 823,
1319
+ 835
1320
+ ],
1321
+ "page_idx": 10
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Chen Lin, Minghao Guo, Chuming Li, Wei Wu, Dahua Lin, Wanli Ouyang, and Junjie Yan. Online hyper-parameter learning for auto-augmentation strategy. CoRR, abs/1905.07373, 2019. ",
1326
+ "bbox": [
1327
+ 171,
1328
+ 843,
1329
+ 825,
1330
+ 873
1331
+ ],
1332
+ "page_idx": 10
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "Xi Peng, Zhiqiang Tang, Fei Yang, Rogerio Schmidt Feris, and Dimitris N. Metaxas. Jointly op- ´ timize data augmentation and network training: Adversarial data augmentation in human pose estimation. CVPR, 2018. ",
1337
+ "bbox": [
1338
+ 174,
1339
+ 882,
1340
+ 823,
1341
+ 924
1342
+ ],
1343
+ "page_idx": 10
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "Luis Perez and Jason Wang. The effectiveness of data augmentation in image classification using deep learning. CoRR, abs/1712.04621, 2017. ",
1348
+ "bbox": [
1349
+ 171,
1350
+ 103,
1351
+ 825,
1352
+ 132
1353
+ ],
1354
+ "page_idx": 11
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "Julian Salazar, Davis Liang, Zhiheng Huang, and Zachary C. Lipton. Invariant representation learning for robust deep networks. NeurIPS Workshop, 2018. ",
1359
+ "bbox": [
1360
+ 171,
1361
+ 140,
1362
+ 823,
1363
+ 170
1364
+ ],
1365
+ "page_idx": 11
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CVPR, 2015. ",
1370
+ "bbox": [
1371
+ 178,
1372
+ 178,
1373
+ 823,
1374
+ 222
1375
+ ],
1376
+ "page_idx": 11
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "Toan Tran, Trung Pham, Gustavo Carneiro, Lyle J. Palmer, and Ian D. Reid. A bayesian data augmentation approach for learning deep models. NIPS, 2017. ",
1381
+ "bbox": [
1382
+ 171,
1383
+ 231,
1384
+ 823,
1385
+ 260
1386
+ ],
1387
+ "page_idx": 11
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "Li Wan, Matthew Zeiler, Sixin Zhang, Yann LeCun, and Rob Fergus. Regularization of neural networks using dropconnect. ICML, 2013. ",
1392
+ "bbox": [
1393
+ 171,
1394
+ 267,
1395
+ 825,
1396
+ 297
1397
+ ],
1398
+ "page_idx": 11
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "Xiaolong Wang, Abhinav Shrivastava, and Abhinav Gupta. A-fast-rcnn: Hard positive generation via adversary for object detection. CVPR, 2017. ",
1403
+ "bbox": [
1404
+ 173,
1405
+ 306,
1406
+ 823,
1407
+ 334
1408
+ ],
1409
+ "page_idx": 11
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 1992. ",
1414
+ "bbox": [
1415
+ 173,
1416
+ 343,
1417
+ 823,
1418
+ 372
1419
+ ],
1420
+ "page_idx": 11
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "Yoshihiro Yamada, Masakazu Iwamura, and Koichi Kise. Shakedrop regularization. CoRR, abs/1802.02375, 2018. ",
1425
+ "bbox": [
1426
+ 174,
1427
+ 381,
1428
+ 823,
1429
+ 410
1430
+ ],
1431
+ "page_idx": 11
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. British Machine Vision Conference, 2016. ",
1436
+ "bbox": [
1437
+ 174,
1438
+ 419,
1439
+ 821,
1440
+ 448
1441
+ ],
1442
+ "page_idx": 11
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "Zhao Zhong, Junjie Yan, and Cheng-Lin Liu. Practical network blocks design with Q-learning. CVPR, 2018a. ",
1447
+ "bbox": [
1448
+ 173,
1449
+ 457,
1450
+ 820,
1451
+ 486
1452
+ ],
1453
+ "page_idx": 11
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "Zhao Zhong, Zichen Yang, Boyang Deng, Junjie Yan, Wei Wu, Jing Shao, and Cheng-Lin Liu. BlockQNN: Efficient block-wise neural network architecture generation. CoRR, abs/1808.05584, 2018b. ",
1458
+ "bbox": [
1459
+ 173,
1460
+ 494,
1461
+ 825,
1462
+ 536
1463
+ ],
1464
+ "page_idx": 11
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. ICLR, 2016. ",
1469
+ "bbox": [
1470
+ 174,
1471
+ 546,
1472
+ 818,
1473
+ 560
1474
+ ],
1475
+ "page_idx": 11
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V. Le. Learning transferable architectures for scalable image recognition. CVPR, 2017. ",
1480
+ "bbox": [
1481
+ 174,
1482
+ 570,
1483
+ 821,
1484
+ 598
1485
+ ],
1486
+ "page_idx": 11
1487
+ },
1488
+ {
1489
+ "type": "text",
1490
+ "text": "A APPENDIX ",
1491
+ "bbox": [
1492
+ 176,
1493
+ 616,
1494
+ 299,
1495
+ 632
1496
+ ],
1497
+ "page_idx": 11
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "A.1 HYPERPARAMETERS ",
1502
+ "text_level": 1,
1503
+ "bbox": [
1504
+ 176,
1505
+ 642,
1506
+ 361,
1507
+ 657
1508
+ ],
1509
+ "page_idx": 11
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "We detail the model hyperparameters on CIFAR-10/CIFAR-100 and ImageNet in Table 7. ",
1514
+ "bbox": [
1515
+ 171,
1516
+ 669,
1517
+ 761,
1518
+ 684
1519
+ ],
1520
+ "page_idx": 11
1521
+ },
1522
+ {
1523
+ "type": "table",
1524
+ "img_path": "images/805358f66a6525e1f2d65ec0f4b18937182bf4e5a10355c998155b8c28719ccb.jpg",
1525
+ "table_caption": [
1526
+ "Table 7: Model hyperparameters on CIFAR-10/CIFAR-100 and ImageNet. LR represents learning rate, and WD represents weight decay. We do not specifically tune these hyperparameters, and all of these are consistent with previous works, expect for the number of epochs. "
1527
+ ],
1528
+ "table_footnote": [],
1529
+ "table_body": "<table><tr><td>Dataset</td><td>Model</td><td>Batch Size (N · M)</td><td>LR</td><td>WD</td><td>Epoch</td></tr><tr><td>CIFAR-10</td><td>Wide-ResNet-28-10</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>200</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake (26 2x32d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake ( (262x96d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>Shake-Shake (26 2x112d)</td><td>128·8</td><td>0.2</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-10</td><td>PyramidNet+ShakeDrop</td><td>128·8</td><td>0.1</td><td>1e-4</td><td>600</td></tr><tr><td>CIFAR-100</td><td>Wide-ResNet-28-10</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>200</td></tr><tr><td>CIFAR-100</td><td>Shake-Shake (26 2x96d)</td><td>128·8</td><td>0.1</td><td>5e-4</td><td>1200</td></tr><tr><td>CIFAR-100</td><td>PyramidNet+ShakeDrop</td><td>128·8</td><td>0.5</td><td>1e-4</td><td>1200</td></tr><tr><td>ImageNet</td><td>ResNet-50</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr><tr><td>ImageNet</td><td>ResNet-50-D</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr><tr><td>ImageNet</td><td>ResNet-200</td><td>2048·8</td><td>0.8</td><td>1e-4</td><td>120</td></tr></table>",
1530
+ "bbox": [
1531
+ 233,
1532
+ 428,
1533
+ 764,
1534
+ 637
1535
+ ],
1536
+ "page_idx": 12
1537
+ }
1538
+ ]
parse/train/ByxdUySKvS/ByxdUySKvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByxdUySKvS/ByxdUySKvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HygUOoC5KX/HygUOoC5KX.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HygUOoC5KX/HygUOoC5KX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HygUOoC5KX/HygUOoC5KX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HygUOoC5KX/HygUOoC5KX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/KUDUoRsEphu/KUDUoRsEphu.md ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING INCOMPRESSIBLE FLUID DYNAMICS FROM SCRATCH - TOWARDS FAST, DIFFERENTIABLE FLUID MODELS THAT GENERALIZE
2
+
3
+ Nils Wandel
4
+ Department of Computer Science University of Bonn
5
+ wandeln@cs.uni-bonn.de
6
+ Michael Weinmann
7
+ Department of Computer Science
8
+ University of Bonn
9
+ mw@cs.uni-bonn.de
10
+ Reinhard Klein
11
+ Department of Computer Science
12
+ University of Bonn
13
+ rk@cs.uni-bonn.de
14
+
15
+ # ABSTRACT
16
+
17
+ Fast and stable fluid simulations are an essential prerequisite for applications ranging from computer-generated imagery to computer-aided design in research and development. However, solving the partial differential equations of incompressible fluids is a challenging task and traditional numerical approximation schemes come at high computational costs. Recent deep learning based approaches promise vast speed-ups but do not generalize to new fluid domains, require fluid simulation data for training, or rely on complex pipelines that outsource major parts of the fluid simulation to traditional methods.
18
+
19
+ In this work, we propose a novel physics-constrained training approach that generalizes to new fluid domains, requires no fluid simulation data, and allows convolutional neural networks to map a fluid state from time-point $t$ to a subsequent state at time $t + d t$ in a single forward pass. This simplifies the pipeline to train and evaluate neural fluid models. After training, the framework yields models that are capable of fast fluid simulations and can handle various fluid phenomena including the Magnus effect and Kármán vortex streets. We present an interactive real-time demo to show the speed and generalization capabilities of our trained models. Moreover, the trained neural networks are efficient differentiable fluid solvers as they offer a differentiable update step to advance the fluid simulation in time. We exploit this fact in a proof-of-concept optimal control experiment. Our models significantly outperform a recent differentiable fluid solver in terms of computational speed and accuracy.
20
+
21
+ # 1 INTRODUCTION
22
+
23
+ Simulating the behavior of fluids by solving the incompressible Navier-Stokes equations is of great importance for a wide range of applications and accurate as well as fast fluid simulations are a long-standing research goal. On top of simulating the behavior of fluids, several applications such as sensitivity analysis of fluids or gradient-based control algorithms rely on differentiable fluid simulators that allow to propagate gradients throughout the simulation (Holl et al. (2020)).
24
+
25
+ Recent advances in deep learning aim for fast and accurate fluid simulations but rely on vast datasets and / or do not generalize to new fluid domains. Kim et al. (2019) present a framework to learn parameterized fluid simulations and allow to interpolate efficiently in between such simulations. However, their work does not generalize to new domain geometries that lay outside the training data. Kim & Lee (2020) train a RNN-GAN that produces turbulent flow fields within a pipe domain, but do not show generalization results beyond pipe domains. Xie et al. (2018) introduce a tempoGAN to perform temporally consistent superresolution of smoke simulations. This allows to produce plausible high-resolution smoke-density fields for arbitrary low-resolution inputs, but our fluid model should output a complete fluid state description consisting of a velocity and a pressure field. Tompson et al. (2017) present how a Helmholtz projection step can be learned to accelerate Eulerian fluid simulations. This method generalizes to new domain geometries, but a particle tracer is needed to deal with the advection term of the Navier-Stokes equations. Furthermore, as Eulerian fluids do not model viscosity, effects like e.g. the Magnus effect or Kármán vortex streets cannot be simulated. Geneva & Zabaras (2020) propose a physics-informed framework to learn the entire update step for the Burgers equations in 1D and 2D, but no generalization results for new domain geometries are demonstrated. All of the aforementioned methods rely on the availability of vast amounts of data from fluid-solvers such as FEniCS, OpenFOAM or Mantaflow. Most of these methods do not generalize well or outsource a major part of the fluid simulation to traditional methods such as low-resolution fluid solvers or a particle tracer.
26
+
27
+ In this work, we propose a novel unsupervised training framework to learn incompressible fluid dynamics from scratch. It does not require any simulated fluid-data (neither as ground truth data, nor to train an adversarial network, nor to initialize frames for a physics-constrained loss) and generalizes to fluid domains unseen during training. It allows CNNs to learn the entire update-step of mapping a fluid domain from time-point $t$ to $t + d t$ without having to rely on low resolution fluid-solvers or a particle-tracer. In fact, we will demonstrate that a physicsconstrained loss function combined with a simple strategy to recycle fluid-data generated by the neural network at training time suffices to teach CNNs fluid dynamics on increasingly realistic statistics of fluid states. This drastically simplifies the training pipeline. Fluid simulations get efficiently unrolled in time by recurrently applying the trained model on a fluid state. Furthermore, the fluid models include viscous friction and handle effects such as the Magnus effect and Kármán vortex streets. On top of that, we show by a gradient-based optimal control example how backpropagation through time can be used to differentiate the fluid simulation. Code and pretrained models are publicly available at https://github.com/aschethor/ Unsupervised_Deep_Learning_of_Incompressible_Fluid_Dynamics/.
28
+
29
+ # 2 RELATED WORK
30
+
31
+ In literature, several different approaches can be found that aim to approximate the dynamics of PDEs in general and fluids in particular with efficient, learning-based surrogate models.
32
+
33
+ Lagrangian methods such as smoothed particle hydrodynamcs (SPH) Gingold & Monaghan (1977) handle fluids from the perspective of many individual particles that move with the velocity field. Following this approach, learning-based methods using regression forests by Ladický et al. (2015), graph neural networks by Mrowca et al. (2018); Li et al. (2019) and continuous convolutions by Ummenhofer et al. (2020) have been developed. In addition, Smooth Particle Networks (SP-Nets) by Schenck & Fox (2018) allow for differentiable fluid simulations within the Lagrangian frame of reference. These Lagrangian methods are particularly suitable when a fluid domain exhibits large, dynamic surfaces (e.g. waves or droplets). However, to simulate the dynamics within a fluid domain accurately, Eulerian methods, that treat the Navier-Stokes equations in a fixed frame of reference, are usually better suited.
34
+
35
+ Continuous Eulerian methods allow for mesh-free solutions by mapping domain coordinates (e.g. $x , y , t )$ directly onto field values (e.g. velocity $\vec { v } \ : /$ pressure $p$ ) (Sirignano & Spiliopoulos (2018); Grohs et al. (2018); Khoo et al. (2019)). Recent applications focused on flow through porous media (Zhu & Zabaras (2018); Zhu et al. (2019); Tripathy & Bilionis (2018)), fluid modeling (Yang et al. (2016); Raissi et al. (2018)), turbulence modeling (Geneva & Zabaras (2019); Ling et al. (2016)) and modeling of molecular dynamics (Schöberl et al. (2019)). Training is usually based on physics-constrained loss functions that penalize residuals of the underlying PDEs. Similar to our approach, Raissi et al. (2019) uses vector potentials to obtain continuous divergence-free velocity fields to approximate the incompressible Navier-Stokes equations. Continuous methods return smooth, accurate results and can overcome the curse of dimensionality of discrete techniques in high-dimensional PDEs (Grohs et al. (2018)). However, these networks are trained on a specific domain and cannot generalize to new environments or be used in interactive scenarios.
36
+
37
+ Discrete Eulerian methods, on the other hand, aim to solve the underlying PDEs on a grid and early work dates back to Harlow & Welch (1965) and Stam (1999). Accelerating such traditional works with deep learning techniques is a major field of research and all of the methods mentioned in the introduction fall into this category. Further methods include the approach by Thuerey et al. (2019) to learn solutions of the Reynolds-averaged Navier-Stokes equations for airfoil flows, but requires large amounts of training data and does not generalize beyond airfoil flows. In the work by Um et al. (2020), a correction step is learned that brings solutions of a low-resolution differentiable fluid solver closer to solutions of a high-resolution fluid simulation. However, generalization results for new domain geometries were not presented. The works of Mohan et al. (2020) and Kim et al. (2019) show that vector potentials are suitable to enforce the incompressibility constraint in fluids but do not generalize to new fluid domains beyond their training data.
38
+
39
+ # 3 METHOD
40
+
41
+ In this section, we briefly review the incompressible Navier-Stokes equations, which are to be solved by the neural network. Then, we explain how the Helmholtz decomposition can be exploited to ensure incompressibility within the fluid domain. Furthermore, we provide details of our discrete spatio-temporal fluid representation and introduce the fluid model. Afterwards, we formulate a physics-constrained loss function based on residuals of the Navier-Stokes equations and introduce a pressure regularization term for very high Reynolds numbers. Finally, we explain the unsupervised training strategy.
42
+
43
+ # 3.1 INCOMPRESSIBLE NAVIER-STOKES EQUATIONS
44
+
45
+ Most fluids can be modeled with the incompressible Navier-Stokes equations - a set of non-linear equations that describe the interplay of a velocity field $\vec { v }$ and a pressure field $p$ within a fluid domain $\Omega$ :
46
+
47
+ $$
48
+ \begin{array} { r l r } { \boldsymbol { \nabla } \cdot \boldsymbol { \vec { v } } = 0 } & { \mathrm { i n c o m p r e s s i b i l i t y ~ o n ~ } \Omega } \\ { \rho \dot { \vec { v } } = \rho \left( \frac { \partial \vec { v } } { \partial t } + \left( \vec { v } \cdot \boldsymbol { \nabla } \right) \vec { v } \right) = - \boldsymbol { \nabla } p + \mu \Delta \vec { v } + \vec { f } } & { \mathrm { c o n s e r v a t i o n ~ o f ~ m o m e n t u m ~ o n ~ } \Omega } \end{array}
49
+ $$
50
+
51
+ Here, $\rho$ describes the fluid density and $\mu$ the viscosity. Equation 1 states that the fluid is incompressible and thus $\vec { v }$ is divergence-free. Equation 2 states that the change in momentum of fluid particles must correspond to the sum of forces that arise from the pressure gradient, viscous friction and external forces. Here, external forces on the fluid (such as e.g. gravity) can be neglected, so we set ${ \vec { f } } = 0$ .
52
+
53
+ These incompressible Navier-Stokes equations shall be solved by a CNN given initial conditions $\vec { v } ^ { 0 }$ and $p ^ { 0 }$ at the beginning of the simulation and Dirichlet boundary conditions which constrain the velocity field at the domain boundary $\partial \Omega$ :
54
+
55
+ $$
56
+ \vec { v } = \vec { v } _ { d } \qquad \mathrm { D i r i c h l e t ~ b o u n d a r y ~ c o n d i t i o n ~ o n ~ } \partial \Omega
57
+ $$
58
+
59
+ # 3.2 HELMHOLTZ DECOMPOSITION
60
+
61
+ A common method to ensure incompressibility of a fluid (see Equation 1) is to project the flow field onto the divergence-free part of its Helmholtz decomposition. The Helmholtz theorem states that every vector field $\vec { v }$ can be decomposed into a curl-free part $( \nabla q )$ and a divergence-free part $( \nabla \times \vec { a } )$ :
62
+
63
+ $$
64
+ \vec { v } = \nabla q + \nabla \times \vec { a }
65
+ $$
66
+
67
+ Note, that $\nabla \times ( \nabla q ) = \vec { 0 }$ and $\nabla \cdot ( \nabla \times { \vec { a } } ) = 0$ . The Helmholtz projection consists of solving the Poisson problem $\nabla \cdot \vec { v } = \Delta q$ for $q$ , followed by substracting $\nabla q$ from the original flow field. However, solving the Poisson equation on arbitrary domains comes at high computational costs for classical methods and one has to rely e.g. on conjugate gradient methods to approximate its solution.
68
+
69
+ Here, we propose a different approach and directly try to learn a vector potential $\vec { a }$ with $\vec { v } = \nabla \times \vec { a }$ . This ensures that the network outputs a divergence-free velocity field within the domain $\Omega$ and automatically solves Equation 1. In this work, we consider 2D fluid simulations, so only the $\mathbf { Z }$ - component of $\vec { a }$ , $a _ { z }$ , is of interest since $v _ { z }$ and all derivatives with respect to the $z$ -axis are zero:
70
+
71
+ $$
72
+ \nabla \times { \vec { a } } = \left( { \partial _ { z } a _ { x } - \partial _ { z } a _ { y } } \right) = \left( { \partial _ { y } a _ { z } } \right) = \left( { \begin{array} { c } { v _ { x } } \\ { v _ { y } } \\ { 0 } \end{array} } \right) = { \vec { v } }
73
+ $$
74
+
75
+ # 3.3 DISCRETE SPATIO-TEMPORAL FLUID REPRESENTATION
76
+
77
+ Marker-And-Cell (MAC) grid To solve the Navier-Stokes equations, we represent the relation between $a _ { z } , v _ { x } , v _ { y } , p$ on a 2D staggered marker-and-cell (MAC) grid (see Figure 1a). Therefore, we discretise time and space as follows:
78
+
79
+ $$
80
+ \vec { a } ( x , y , t ) = \left( \begin{array} { c } { 0 } \\ { 0 } \\ \left( a _ { z } \right) _ { i , j } ^ { t } \rule { 0 ex } { 5 ex } \right) ; \vec { v } ( x , y , t ) = \binom { \left( v _ { x } \right) _ { i , j } ^ { t } } { \left( v _ { y } \right) _ { i , j } ^ { t } } ; p ( x , y , t ) = p _ { i , j } ^ { t } \end{array}
81
+ $$
82
+
83
+ Obtaining gradient, divergence, Laplace and curl operations on this grid with finite differences is straight forward and can be efficiently implemented with convolutions (see appendix A).
84
+
85
+ ![](images/9b2df2899d456e4e435eca52239a4b16982712cebefb7099762ffba6f6c0e6f2.jpg)
86
+ Figure 1: MAC grid and diagram of the fluid model.
87
+
88
+ Explicit, Implicit, Implicit-Explicit (IMEX) time integration methods The discretization of the time domain is needed to deal with the time-derivative of the velocity fiel d ∂\~v∂t in Equation 2, which becomes:
89
+
90
+ $$
91
+ \rho \left( \frac { \vec { v } ^ { t + d t } - \vec { v } ^ { t } } { d t } + \left( \vec { v } ^ { t ^ { \prime } } \cdot \nabla \right) \vec { v } ^ { t ^ { \prime } } \right) = - \nabla p ^ { t + d t } + \mu \Delta \vec { v } ^ { t ^ { \prime } } + \vec { f }
92
+ $$
93
+
94
+ The goal is to take as large as possible timesteps $d t$ while maintaining stable and accurate solutions. Stability and accuracy largely depend on the definition of $v ^ { t ^ { \prime } }$ . In literature, choosing $\boldsymbol { v } ^ { t ^ { \prime } } = \boldsymbol { v } ^ { t }$ is often referred to as explicit integration methods and frequently leads to unstable behavior. Choosing $v ^ { t ^ { \prime } } = v ^ { t + d t }$ is usually associated with implicit integration methods and gives stable solutions at the cost of numerical dissipation. Implicit-Explicit (IMEX) methods, which set $v ^ { t ^ { \prime } } = ( v ^ { t } + v ^ { t + d t } ) / 2$ are a compromise between both methods and considered to be more accurate but less stable than implicit methods.
95
+
96
+ # 3.4 FLUID MODEL
97
+
98
+ We represent the fluid dynamics by a recurrent model that maps the fluid state $p ^ { t } , \vec { a } ^ { t }$ for timestep $t$ and the domain description $\Omega ^ { t + d t } , \vec { v } _ { d } ^ { t + d t }$ to the fluid state $p ^ { t + d t } , \vec { a } ^ { t + d t }$ of the next timestep. Here, $p ^ { t }$ describes the pressure field and $\vec { a } ^ { t }$ describes the vector potential of . For $t = 0$ , we consider initial states $p ^ { 0 } = 0$ and $\vec { a } ^ { 0 } = \vec { 0 }$ , however, other initial conditions could be considered as well. $\Omega ^ { t + d t }$ is a binary mask that contains the domain geometry and is 1 for the fluid domain and 0 everywhere else. For the boundary of the domain, we simply take the inverse of $\Omega \colon \partial \Omega = 1 - \Omega$ . $\vec { v } _ { d } ^ { t + \dot { d } t }$ represents the Dirichlet boundary conditions and contains a velocity field that must be matched by ${ \vec { v } } ^ { t + d t }$ at the domain boundaries. Figure 1b shows a diagram of the fluid model. First, $\left( p ^ { t } , \vec { a } ^ { t } , \Omega ^ { t + d t } , \vec { v } _ { d } ^ { t + d t } \right)$ are taken to derive a slightly more meaningful feature representation that comprises $\left( p ^ { t } , a ^ { t } , \nabla \times a ^ { t } , \Omega ^ { t + d t } , \partial \Omega ^ { t + d t } , \Omega ^ { t + d t } \cdot \nabla \times a ^ { t } , \Omega ^ { t + d t } \cdot p ^ { t } , \partial \Omega ^ { t + d t } \cdot \vec { v } _ { d } ^ { t + d t } \right)$ . These features can be very efficiently computed with convolutions and are then fed into a U-Net (Ronneberger et al. (2015)) with a reduced number of channels (the exact network configuration can be found in appendix B). The mean of the U-Net output is set to 0 in order to keep $p$ and $\vec { a }$ well defined and prevent drifting offset values. Finally, the output is added to $p ^ { t }$ and $\vec { a } ^ { t }$ to obtain the updated fluid state $p ^ { t + d t }$ and $\vec { a } ^ { t + d t }$ .
99
+
100
+ # 3.5 PHYSICS-CONSTRAINED LOSS FUNCTION
101
+
102
+ Using the residuals of the Navier-Stokes equations (Equations 1 and 2), we can formulate the following loss terms on $\Omega$ and $\partial \Omega$ :
103
+
104
+ $$
105
+ \begin{array} { l l } { { L _ { d } = \displaystyle { \left\| \nabla \cdot \vec { v } \right\| ^ { 2 } } } } & { { \qquad \mathrm { ~ d i v e r g e n c e ~ l o s s ~ o n ~ } \Omega } } \\ { { L _ { p } = \displaystyle { \left\| \rho \left( \frac { \partial \vec { v } } { \partial t } + \left( \vec { v } \cdot \nabla \right) \vec { v } \right) + \nabla p - \mu \Delta \vec { v } - \vec { f } \right\| ^ { 2 } } } } & { { \qquad \mathrm { ~ m o m e n t u m ~ l o s s ~ o n ~ } \Omega } } \\ { { L _ { b } = \displaystyle { \left\| \vec { v } - \vec { v } _ { d } \right\| ^ { 2 } } } } & { { \qquad \mathrm { ~ b o u n d a r y ~ l o s s ~ o n ~ } \partial \Omega } } \end{array}
106
+ $$
107
+
108
+ Combining the described loss terms, we obtain the following loss function:
109
+
110
+ $$
111
+ L = \alpha L _ { d } + \beta L _ { p } + \gamma L _ { b }
112
+ $$
113
+
114
+ where $\alpha , \beta , \gamma$ are hyperparameters that weight the contributions of the different loss terms. Note that if we use a vector potential ${ \vec { v } } = \nabla \times { \vec { a } }$ , $L _ { d } = 0$ is automatically fulfilled and we can set $\alpha = 0$ . This loss function can be computed very efficiently with convolutions in $O ( N )$ (where $N =$ number of grid cells), whereas solving the Navier-Stokes equations explicitly would be computationally a lot more expensive. For detailed descriptions regarding the fully discretized loss-function, we refer to appendix A.
115
+
116
+ # 3.6 PRESSURE REGULARIZATION
117
+
118
+ For very high Reynolds numbers (see Equation 13) and inviscid flows, training becomes unstable as viscous friction cannot dissipate enough energy out of the system. This leads to unrealistic gradients in $\vec { v }$ and $p$ . For such cases, we introduce an additional regularization term for the loss function (11) that can be traded off with $L _ { p }$ to stabilize training:
119
+
120
+ $$
121
+ L _ { r } = \| \nabla p \| ^ { 2 }
122
+ $$
123
+
124
+ The intuition behind this regularization term is, that we want to penalize unrealistically high energies in the pressure field.
125
+
126
+ # 3.7 TRAINING STRATEGY
127
+
128
+ Training starts with initializing a pool $\{ \Omega _ { k } ^ { 0 } , ( v _ { d } ) _ { k } ^ { 0 } , ( a _ { z } ) _ { k } ^ { 0 } , p _ { k } ^ { 0 } \}$ of randomized domains $\Omega _ { k } ^ { 0 }$ and boundary conditions $( v _ { d } ) _ { k } ^ { 0 }$ as well as initial conditions for the vector potential and pressure fields that we both set to zero $( \check { ( a _ { z } ) } _ { k } ^ { 0 } = 0$ and $p _ { k } ^ { 0 } = 0$ ). The resolution of our training domains is $1 0 0 \mathrm { x } 3 0 0$ grid cells and example-domains of the training pool are shown in appendix C. Note that our training pool does not rely on any previously simulated fluid-data.
129
+
130
+ At each training step, a random mini-batch $\{ \Omega _ { k } ^ { t } , ( v _ { d } ) _ { k } ^ { t } , ( a _ { z } ) _ { k } ^ { t } , p _ { k } ^ { t } \} _ { \{ k \in \operatorname * { m i n i b a t c h } \} }$ is drawn from the pool and fed into the neural network which is designed to predict the velocity $( \vec { v } _ { k } ^ { t + d t } = \nabla \times \vec { a } _ { k } ^ { t + d t } )$ and pressure $( p _ { k } ^ { t + d t } )$ fields of the next time step. Based on a physics-constrained loss-function (Equation 11), we update the weights of the network using the Adam optimizer (Kingma & Ba (2015)). At the end of each training step, the pool is updated by replacing the old vector potential and pressure fields $( a _ { z } ) _ { k } ^ { t } , p _ { k } ^ { t }$ by the newly predicted ones $( a _ { z } ) _ { k } ^ { t + \dot { d t } } , p _ { k } ^ { \dot { t } + d t }$ t, pt+dtk . This recycling strategy fills the training pool with more and more realistic fluid states as the model becomes better at simulating fluid dynamics.
131
+
132
+ From time to time, old environments of the training pool are replaced by new randomized environments and the vector potential as well as the pressure fields are reset to 0. This increases the variance of the training pool and helps the neural network to learn "cold starts" from \~0-velocity and 0-pressure fields.
133
+
134
+ Besides the fluid model described above, which we denote as $\vec { a }$ -Net in the following, we also trained an ablation model, $\vec { v }$ -Net, that directly learns to predict the velocity field without a vector potential. For the implementation of both models, we used the popular machine learning framework Pytorch and trained the models on a NVidia GeForce RTX 2080 Ti. Training converged after about 1 day. The hyperparameters in the loss-function for the $\vec { a }$ -Net were $\beta = 1$ and $\gamma = 2 0$ . The reason for choosing a higher weight for the loss term $L _ { b }$ than for $L _ { p }$ was the observation, that errors in $L _ { b }$ can lead to unrealistic flows leaking through boundaries. For the ablation study $\vec { v } \cdot \vec { }$ -Net), we used $\alpha = 1 0 0 , \beta = 1 , \gamma = 0 . 0 0 1$ . Here, we had to choose a very high weight for $L _ { d }$ to ensure incompressibility of the fluid, otherwise unrealistic source and sink effects start to appear. For $L _ { b }$ , on the other hand, we used a very low weight as the boundary conditions can be trivially learned by the $\vec { v }$ -Net. We used these parameter settings for all experiments.
135
+
136
+ # 4 RESULTS
137
+
138
+ To evaluate the potential of our method, we assess its ability to reproduce physical effects such as Kármán vortex streets and the Magnus effect. In addition, we demonstrate its generalization capability and real-time performance. Finally, we test the fluid models quantitatively.
139
+
140
+ # 4.1 QUALITATIVE EVALUATION
141
+
142
+ Qualitative analysis of wake dynamics Qualitative effects in fluid dynamics such as the wake dynamics behind an obstacle are closely related to the Reynolds number. It is a dimensionless quantity defined by:
143
+
144
+ $$
145
+ R e = \frac { \rho \left\| \vec { v } \right\| D } { \mu }
146
+ $$
147
+
148
+ Here, $\rho$ is the fluid density, $\lVert \vec { v } \rVert$ is the fluid speed, $D$ is the diameter of the obstacle, and $\mu$ is the viscosity. (We use the units of the grid).
149
+
150
+ We retrained models for different values of $\mu$ and $\rho$ to compare the fluid behavior for a wide range of Reynolds numbers. Figure 2 shows, that the trained models are able to predict the wake dynamics behind an obstacle in good accordance with qualitative expectations from fluid dynamics. As a rule of thumb, for $R e \ll 1$ , the flow becomes time-reversible. This can be noticed in Figure 2a by the symmetry of the flow before and after the obstacle and the nearly constant pressure gradient within the pipe. Starting from $R e \approx 1 0$ , the flow is still laminar but a static wake is forming behind the obstacle (see Figure 2b). For Reynolds numbers $R e > \approx 9 0$ , Kármán vortex streets start to appear (see Figure 2c). A Kármán vortex street consists of clock and counterclockwise spinning vortices that are generated at the obstacle and then start moving in a regularly oscillating pattern with the flow. For very large Reynolds numbers or inviscid flows, the flow field becomes turbulent, which can be recognized by the irregular patterns behind the obstacle in Fig 2d.
151
+
152
+ ![](images/468c39a4bc3b15c1ad09df22f1ea2d017e585da0b07e13fdda3acc4af90342a2.jpg)
153
+ Figure 2: After training, our models are able to show correct wake flow dynamics for a wide range of different Reynolds numbers. $\dot { \boldsymbol { D } } = 3 0$ , $\| \vec { v } \| = 0 . 5 )$ . Streamlines indicate flow direction, linewidth indicates speed and colors represent the pressure field (blue: low pressure / yellow: high pressure).
154
+
155
+ Magnus effect The Magnus effect appears when a flow interacts with a rotating body. It is widely known e.g. in sports such as soccer or tennis where spin is used to deflect the path of a ball. The reason for the deflection stems from a low pressure field where the surface of the object moves along flow direction and a high pressure field where the object surface moves against the flow. Figure 3a shows, that our models are able to reproduce the Magnus effect around a rotating cylinder.
156
+
157
+ ![](images/f016ae8a12c9f62a822e83f75f847c39d114a2759991e05eb174aa68cf62956a.jpg)
158
+ (a) Magnus effect on a clock-wise turning cylinder.(b) Generalization example: Note that the fluid model has never been confronted with wingprofiles during training.
159
+
160
+ Figure 3: Our models feature the Magnus effect and generalize to new fluid domains. Further examples are presented in appendix D and the video.
161
+
162
+ Analysis of generalization capability We tested the networks capability to generalize to objects not seen during training. Figure 3b shows the networks capability to meet boundary conditions of an airfoil and return a plausible pressure field that produces lift (see low pressure on top of wing). Note that in contrast to the approach by Thuerey et al. (2019), which learns simplified, time-averaged solutions of the Navier-Stokes equations, our method is able to simulate the full incompressible Navier-Stokes equations for an airfoil without relying on any ground truth data or having seen airfoilgeometries during training. In fact, the network was only trained on simple randomized domains as highlighted in appendix C and Figure 7. Possible reasons for the networks generalization capabilities are:
163
+
164
+ • During training, the network gets confronted with an infinite number of different flowfields and randomized domain configurations because the training pool gets updated at every training step. This prevents the network from over-fitting.
165
+
166
+ • The dynamics of a fluid-particle are mostly determined by its local neighborhood / surrounding particles. This means, the update step for a certain cell on the MAC grid is mostly determined by close / neighboring MAC-grid cells. Since more complicated shapes can be seen locally as a composition of basic shapes (e.g. the front of the wing can be locally regarded as a cylinder), it suffices to train on basic shapes that provide the network with enough examples to generalize to more complicated shapes.
167
+
168
+ Further generalization examples are provided in appendix D.
169
+
170
+ Real-time capability The fluid simulation can be easily parallelized and takes low computational costs as one time-integration step consists just of a single forward pass through a convolutional neural network. This enables for example interactive real-time simulations. We implemented a demo that allows to interact with a fluid by moving obstacles, rotating spheres and changing the flow speed within a pipe (see video in supplementary material and source code). Our method runs at 250 timesteps per second on a $1 0 0 \mathrm { x } 3 0 0$ grid. In the respective experiments, we used a NVidia GeForce RTX 2080 Ti consuming about $8 6 0 \mathrm { M B }$ of GPU memory.
171
+
172
+ # 4.2 QUANTITATIVE EVALUATION
173
+
174
+ We compare our method $\vec { a }$ -Net) quantitatively with PhiFlow by Holl et al. (2020). Phiflow is a recent, open source, differentiable fluid simulator based on a MAC grid data structure. Furthermore, we provide an ablation study ${ \vec { v } } .$ -Net) that does not make use of the Helmholtz decomposition but directly works on the velocity field $\vec { v }$ .
175
+
176
+ Quantitative comparison of different fluid solvers is challenging, as their performance is highly dependent on factors like the geometry of the domain, fluid parameters such as viscosity or density, flow speed or the timestep of the integrator. As benchmarks for fluid simulations on MAC grids are not yet available, we built a simple toy domain on a $1 0 0 \mathrm { ~ x ~ } 1 0 0$ grid which simulates a flow around an obstacle within a pipe (more details are provided in appendix E).
177
+
178
+ First, we compared the computational speed on a CPU and GPU by comparing the integration time-steps per second (see Table 1). The $\vec { v }$ -Net as well as the $\vec { a }$ -Net are significantly faster than PhiFlow (11x on CPU and $4 0 \mathrm { x }$ on GPU) as they do not rely on an iterative conjugate gradient solver but instead use a single forward pass through a convolutional neural network that can be easily parallelized on a GPU. To provide a fair comparison on $L _ { d }$ , we set the velocity field at the boundaries equal to $\vec { v _ { d } }$ . This enables us to compute $L _ { d }$ for the $\vec { a }$ -Net architecture on the domain boundaries which would otherwise have zero divergence everywhere. This way, $L _ { d }$ can be interpreted as a metric on how well the orthogonal components of the Dirichlet boundary conditions are met (i.e. no flow leaks through the boundaries). For $d t = 4$ , we outperformed Phiflow by several orders of magnitude. For both, $L _ { d }$ and $L _ { p }$ , the $\vec { a }$ -Net architecture significantly outperformed the more naive $\vec { v }$ -Net approach.
179
+
180
+ Furthermore, we investigated stability by evaluating the evolution of $L _ { p }$ and $L _ { d }$ for the $\vec { a }$ -Net over time (see Figure 4). As the fluid state is initialized with $a _ { z } = 0$ and $p = 0$ , the $\vec { a }$ -Net has to perform a cold-start which is the reason for high $L _ { p }$ and $L _ { d }$ during the first circa 70 steps. Afterwards, the $\vec { a }$ -Net continues an accurate and stable fluid simulation.
181
+
182
+ Table 1: Quantitative comparison of timesteps per second (TPS) on CPU / GPU as well as divergence loss and momentum loss for differentiable fluid solvers on a $1 0 0 \mathrm { x } 1 0 0$ grid for viscosity $\mu =$ 0.1, density $\rho = 4$ and timesteps of size $d t = 4$ .
183
+
184
+ <table><tr><td>Method</td><td>CPU[TPS]</td><td>GPU[TPS]</td><td>Ld</td><td>Lp</td></tr><tr><td>PhiFlow</td><td>7</td><td>-</td><td>6.2e-4</td><td>-</td></tr><tr><td>U-Net (ours)</td><td>82</td><td>311</td><td>8.66e-7</td><td>4.87e-5</td></tr><tr><td>α-Net (ours)</td><td>82</td><td>311</td><td>5.44e-7</td><td>1.56e-5</td></tr></table>
185
+
186
+ ![](images/61d33028f9c357e03bf3a26def07202e3075dc25a8368f4cd3727ad576eaeaf4.jpg)
187
+ Figure 4: Long term stability of fluid simulations performed by the $\vec { a }$ -Net
188
+
189
+ # 4.3 OPTIMAL CONTROL OF VORTEX SHEDDING FREQUENCY
190
+
191
+ In this section, we present a proof-of-concept experiment that aims at controlling the shedding frequency of a Kármán vortex street behind an obstacle by changing the flow speed (see Figure 5a). To this end, we exploit our previously trained differentiable fluid models.
192
+
193
+ ![](images/12287e6b64712b1dba143620da30b36d8a493efa70292097fa075f8a7596b80d.jpg)
194
+
195
+ (a) control setup (domain size: $2 0 0 \mathrm { x } 1 0 0$ grid cells)
196
+
197
+ ![](images/eb7c6bdf57710e1d85311fd4fa94bc4129112926d9bad99da48def5bc5fb1064.jpg)
198
+ Figure 5: The frequency of vortex streets can be controlled using our differentiable fluid models.
199
+
200
+ First, we measure the y-component of the velocity field $v _ { y } ( t )$ behind an obstacle (see white box in Figure 5a) over 200 time steps. Then, we compute the frequency spectrum $V _ { y } ( f )$ of $v _ { y } ( t )$ using the fast Fourier transform (see Figure 5b). Now, we want to adjust the inflow $/$ outflow boundary conditions in $\vec { v _ { d } }$ such that $E [ | V _ { y } ( f ) | ^ { 2 } ] = \hat { f }$ . Here, $\hat { f }$ is the target frequency. To optimize $\Vec { v _ { d } }$ , we define a loss function $L = ( E [ | V _ { y } ( f ) | ^ { 2 } ] - \hat { f } ) ^ { 2 }$ and compute the gradients $\frac { \partial L } { \partial \vec { v } _ { d } }$ with backpropagation through time. This is possible since all parts of the loss function including the fluid simulation that is performed by our trained neural fluid model as well as the fast Fourier transform are differentiable. Computing the gradients with a standard automatic differentiation library (Pytorch) took 3.5 seconds for all 200 time steps on our $2 0 0 \mathrm { x } 1 0 0$ domain setup. This is considerably faster than the current state-of-the-art differentiable fluid solver by Takahashi et al. (2021) which takes 5.42 seconds for only 30 time steps on a smaller $1 2 8 \mathrm { x } 1 2 8$ grid. The update steps of $\Vec { v _ { d } }$ are done using the ADAMoptimizer and converge after approximately 70 iterations (see Figure 5c). We want to emphasize that differentiable fluid simulations are limited to scenarios with low Reynolds numbers as in the presence of turbulences, chaotic behavior will lead to exploding gradients.
201
+
202
+ # 5 DISCUSSION AND OUTLOOK
203
+
204
+ In this work, we present an unsupervised learning scheme for the incompressible Navier-Stokes equations and introduce a fluid model that uses a vector potential to output divergence-free velocity fields. Qualitative results of our trained fluid models are in good accordance with expectations from fluid dynamics for a wide range of Reynolds numbers and generalize to unknown fluid domains. Quantitative assessment showed superior performance in terms of accuracy and speed compared to Phiflow and an ablation study that directly predicts the velocity field. We present a real-time demo and demonstrate how differentiability can be used in a proof-of-concept fluid control scenario. We believe that our fluid models can significantly speed up more sophisticated fluid control pipelines such as described by Holl et al. (2020).
205
+
206
+ First experiments of extending this approach to 3D deliver encouraging results and are topic of future research. Furthermore, on top of Dirichlet boundary conditions, Neumann boundary conditions and multi-phase domains could be incorporated in future fluid models as well.
207
+
208
+ # REFERENCES
209
+
210
+ Nicholas Geneva and Nicholas Zabaras. Quantifying model form uncertainty in reynolds-averaged turbulence models with bayesian deep neural networks. Journal of Computational Physics, 383: 125 – 147, 2019. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2019.01.021. URL http: //www.sciencedirect.com/science/article/pii/S0021999119300464.
211
+
212
+ Nicholas Geneva and Nicholas Zabaras. Modeling the dynamics of pde systems with physicsconstrained deep auto-regressive networks. Journal of Computational Physics, 403:109056, 2020.
213
+
214
+ Robert A. Gingold and Joseph J. Monaghan. Smoothed particle hydrodynamics: theory and application to non-spherical stars. Monthly notices of the royal astronomical society, 181(3): 375–389, 1977.
215
+
216
+ Philipp Grohs, Fabian Hornung, Arnulf Jentzen, and Philippe Von Wurstemberger. A proof that artificial neural networks overcome the curse of dimensionality in the numerical approximation of black-scholes partial differential equations. arXiv preprint arXiv:1809.02362, 2018.
217
+
218
+ Francis H. Harlow and J. Eddie Welch. Numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. The physics of fluids, 8(12):2182–2189, 1965.
219
+
220
+ Philipp Holl, Vladlen Koltun, and Nils Thuerey. Learning to control pdes with differentiable physics. ICLR, 2020.
221
+
222
+ Yuehaw Khoo, Jianfeng Lu, and Lexing Ying. Solving for high-dimensional committor functions using artificial neural networks. Research in the Mathematical Sciences, 6(1):1, 2019.
223
+
224
+ Byungsoo Kim, Vinicius C. Azevedo, Nils Thuerey, Theodore Kim, Markus Gross, and Barbara Solenthaler. Deep fluids: A generative network for parameterized fluid simulations. In Computer Graphics Forum, volume 38, pp. 59–70. Wiley Online Library, 2019.
225
+
226
+ Junhyuk Kim and Changhoon Lee. Deep unsupervised learning of turbulence for inflow generation at various reynolds numbers. Journal of Computational Physics, 406:109216, 2020. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2019.109216. URL http://www.sciencedirect. com/science/article/pii/S0021999119309210.
227
+
228
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
229
+
230
+ L’ubor Ladický, SoHyeon Jeong, Barbara Solenthaler, Marc Pollefeys, and Markus Gross. Datadriven fluid simulations using regression forests. ACM Trans. Graph., 34(6), October 2015. ISSN 0730-0301. doi: 10.1145/2816795.2818129. URL https://doi.org/10.1145/ 2816795.2818129.
231
+
232
+ Yunzhu Li, Jiajun Wu, Russ Tedrake, Joshua B Tenenbaum, and Antonio Torralba. Learning particle dynamics for manipulating rigid bodies, deformable objects, and fluids. In ICLR, 2019.
233
+
234
+ Julia Ling, Andrew Kurzawski, and Jeremy Templeton. Reynolds averaged turbulence modelling using deep neural networks with embedded invariance. Journal of Fluid Mechanics, 807:155– 166, 2016.
235
+
236
+ Arvind T. Mohan, Nicholas Lubbers, Daniel Livescu, and Michael Chertkov. Embedding hard physical constraints in neural network coarse-graining of 3d turbulence, 2020.
237
+
238
+ Damian Mrowca, Chengxu Zhuang, Elias Wang, Nick Haber, Li Fei-Fei, Joshua B. Tenenbaum, and Daniel L. K. Yamins. Flexible neural representation for physics prediction. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS’18, pp. 8813–8824, Red Hook, NY, USA, 2018. Curran Associates Inc.
239
+
240
+ Maziar Raissi, Alireza Yazdani, and George Em Karniadakis. Hidden fluid mechanics: A navierstokes informed deep learning framework for assimilating flow visualization data. arXiv preprint arXiv:1808.04327, 2018.
241
+
242
+ Maziar Raissi, P. Perdikaris, and George Em Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686 – 707, 2019. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2018.10.045. URL http://www.sciencedirect. com/science/article/pii/S0021999118307125.
243
+
244
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pp. 234–241. Springer, 2015.
245
+
246
+ Connor Schenck and Dieter Fox. Spnets: Differentiable fluid dynamics for deep neural networks. In Conference on Robot Learning, pp. 317–335, 2018.
247
+
248
+ Markus Schöberl, Nicholas Zabaras, and Phaedon-Stelios Koutsourelakis. Predictive collective variable discovery with deep bayesian models. The Journal of Chemical Physics, 150(2):024109, 2019. doi: 10.1063/1.5058063. URL https://doi.org/10.1063/1.5058063.
249
+
250
+ Justin Sirignano and Konstantinos Spiliopoulos. Dgm: A deep learning algorithm for solving partial differential equations. Journal of Computational Physics, 375:1339 – 1364, 2018. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2018.08.029. URL http://www.sciencedirect. com/science/article/pii/S0021999118305527.
251
+
252
+ Jos Stam. Stable fluids. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pp. 121–128, 1999.
253
+
254
+ Tetsuya Takahashi, Junbang Liang, Yi-Ling Qiao, and Ming C Lin. Differentiable fluids with solid coupling for learning and control. 2021.
255
+
256
+ Nils Thuerey, Konstantin Weißenow, Lukas Prantl, and Xiangyu Hu. Deep learning methods for reynolds-averaged navier–stokes simulations of airfoil flows. AIAA Journal, pp. 1–12, 2019.
257
+
258
+ Jonathan Tompson, Kristofer Schlachter, Pablo Sprechmann, and Ken Perlin. Accelerating eulerian fluid simulation with convolutional networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3424–3433. JMLR. org, 2017.
259
+
260
+ Rohit K. Tripathy and Ilias Bilionis. Deep uq: Learning deep neural network surrogate models for high dimensional uncertainty quantification. Journal of Computational Physics, 375:565 – 588, 2018. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2018.08.036. URL http://www. sciencedirect.com/science/article/pii/S0021999118305655.
261
+
262
+ Kiwon Um, Raymond Fei, Philipp Holl, Robert Brand, and Nils Thuerey. Solver-in-the-loop: Learning from differentiable physics to interact with iterative pde-solvers, 2020.
263
+
264
+ Benjamin Ummenhofer, Lukas Prantl, Nils Thuerey, and Vladlen Koltun. Lagrangian fluid simulation with continuous convolutions. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id $=$ B1lDoJSYDH.
265
+
266
+ You Xie, Erik Franz, Mengyu Chu, and Nils Thuerey. Tempogan: A temporally coherent, volumetric gan for super-resolution fluid flow. ACM Trans. Graph., 37(4), July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201304. URL https://doi.org/10.1145/3197517.3201304.
267
+
268
+ Cheng Yang, Xubo Yang, and Xiangyun Xiao. Data-driven projection method in fluid simulation. Computer Animation and Virtual Worlds, 27(3-4):415–424, 2016. doi: 10.1002/cav.1695. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/cav.1695.
269
+
270
+ Yinhao Zhu and Nicholas Zabaras. Bayesian deep convolutional encoder–decoder networks for surrogate modeling and uncertainty quantification. Journal of Computational Physics, 366:415 – 447, 2018. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2018.04.018. URL http: //www.sciencedirect.com/science/article/pii/S0021999118302341.
271
+
272
+ Yinhao Zhu, Nicholas Zabaras, Phaedon-Stelios Koutsourelakis, and Paris Perdikaris. Physicsconstrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data. Journal of Computational Physics, 394:56 – 81, 2019. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2019.05.024. URL http://www.sciencedirect.com/ science/article/pii/S0021999119303559.
273
+
274
+ # A PHYSICS-CONSTRAINED LOSS ON A MAC GRID
275
+
276
+ As mentioned in Section 3.3 of the paper, our method relies on a staggered marker-and-cell grid representation for the vector potential as well as the velocity and pressure fields. In the following, we provide further details on how to apply this representation to learn incompressible fluid dynamics.
277
+
278
+ To calculate the velocity field $\vec { v } = \nabla \times \vec { a }$ of a vector potential $\vec { a }$ on a MAC grid in 2D, we have to compute the curl as follows:
279
+
280
+ $$
281
+ \begin{array} { r } { ( v _ { x } ) _ { i , j } = ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i , j } } \\ { ( v _ { y } ) _ { i , j } = ( a _ { z } ) _ { i , j } - ( a _ { z } ) _ { i , j + 1 } } \end{array}
282
+ $$
283
+
284
+ If this vector potential is inserted into the divergence operator on a MAC grid, we can show that $\nabla \cdot \vec { v } _ { i , j } = 0$ is indeed fulfilled:
285
+
286
+ $$
287
+ \begin{array} { r l } & { \nabla \cdot \vec { v } _ { i , j } = ( { v } _ { x } ) _ { i , j + 1 } - ( { v } _ { x } ) _ { i , j } + ( { v } _ { y } ) _ { i + 1 , j } - ( { v } _ { y } ) _ { i , j } } \\ & { \qquad = \begin{array} { r l } & { ( ( a _ { z } ) _ { i + 1 , j + 1 } - ( a _ { z } ) _ { i , j + 1 } ) - ( ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i , j } ) } \\ & { \qquad + \left( ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i + 1 , j + 1 } \right) - ( ( a _ { z } ) _ { i , j } - ( a _ { z } ) _ { i , j + 1 } ) } \\ & { \qquad = 0 } \end{array} } \end{array}
288
+ $$
289
+
290
+ Thus, for the $\vec { a }$ -Net, the incompressibility equation is automatically fulfilled and no further training on the divergence loss $L _ { d }$ is required. However, for the $\vec { v }$ -Net, the residuals of the divergence are still of importance:
291
+
292
+ $$
293
+ ( R _ { d } ) _ { i , j } ^ { t + d t } = \nabla \cdot \vec { v } _ { i , j } ^ { t + d t } ( = 0 \mathrm { f o r } \vec { a } \ – \mathrm { N e t } )
294
+ $$
295
+
296
+ The residuals of the momentum equation in $x$ -direction can be computed as follows:
297
+
298
+ $$
299
+ \begin{array} { r l } & { { R _ { p _ { x } } } ) _ { i , j } ^ { t + d t } = \rho ( \frac { ( v _ { x } ) _ { i , j } ^ { t + d t } - ( v _ { x } ) _ { i , j } ^ { t } } { d t } + ( v _ { x } ) _ { i , j } ^ { t ^ { \prime } } \cdot \frac { ( v _ { x } ) _ { i , j + 1 } ^ { t ^ { \prime } } - ( v _ { x } ) _ { i , j - 1 } ^ { t ^ { \prime } } } { 2 } } \\ & { \qquad + \frac { \frac { ( v _ { y } ) _ { i , j - 1 } ^ { t ^ { \prime } } + ( v _ { y } ) _ { i , j } ^ { t ^ { \prime } } } { 2 } \cdot ( ( v _ { x } ) _ { i , j } ^ { t ^ { \prime } } - ( v _ { x } ) _ { i - 1 , j } ^ { t ^ { \prime } } ) + \frac { ( v _ { y } ) _ { i + 1 , j - 1 } ^ { t ^ { \prime } } + ( v _ { y } ) _ { i + 1 , j } ^ { t ^ { \prime } } } { 2 } \cdot ( ( v _ { x } ) _ { i + 1 , j } ^ { t ^ { \prime } } - ( v _ { x } ) _ { i , j } ^ { t ^ { \prime } } } { ( \frac { 1 } { 2 } } } \\ & { \qquad + ( p _ { i , j } ^ { t + d t } - p _ { i , j - 1 } ^ { t + d t } ) - \mu \cdot \Delta ( v _ { x } ) _ { i , j } ^ { t ^ { \prime } } } \end{array}
300
+ $$
301
+
302
+ Here, we use the following isotropic Laplace operator:
303
+
304
+ $$
305
+ \begin{array} { c } { \Delta s _ { i , j } = \displaystyle \frac { 1 } { 4 } ( 1 * s _ { i - 1 , j - 1 } + 2 * s _ { i - 1 , j } + 1 * s _ { i - 1 , j + 1 } } \\ { + 2 * s _ { i , j - 1 } - 1 2 * s _ { i , j } + 2 * s _ { i , j + 1 } } \\ { + 1 * s _ { i + 1 , j - 1 } + 2 * s _ { i + 1 , j } + 1 * s _ { i + 1 , j + 1 } ) } \end{array}
306
+ $$
307
+
308
+ The derivation of the advection term for $R _ { p _ { x } }$ is a bit more complex since on a MAC grid, $v _ { x }$ and $v _ { y }$ are displaced by half a pixel in $x$ -direction and $y$ -direction. To obtain the residuals of the momentum equation in $y$ -direction, $( R _ { p _ { y } } ) _ { i , j }$ , one has to take $( R _ { p _ { x } } ) _ { i , j }$ and swap $x$ and $y$ and the indices respectively.
309
+
310
+ Now, the discretized loss terms can be written as follows:
311
+
312
+ $$
313
+ \begin{array} { l } { { { \cal L } _ { d } ^ { t + d t } = \displaystyle \sum _ { i , j } \Omega _ { i , j } ^ { t + d t } ( ( R _ { d } ) _ { i , j } ^ { t + d t } ) ^ { 2 } } } \\ { { { \cal L } _ { p } ^ { t + d t } = \displaystyle \sum _ { i , j } \Omega _ { i , j } ^ { t + d t } \left( ( ( R _ { p _ { x } } ) _ { i , j } ^ { t + d t } ) ^ { 2 } + ( ( R _ { p _ { y } } ) _ { i , j } ^ { t + d t } ) ^ { 2 } \right) } } \\ { { { \cal L } _ { b } ^ { t + d t } = \displaystyle \sum _ { i , j } \partial \Omega _ { i , j } ^ { t + d t } \left. \vec { v } _ { d } ^ { t + d t } - \vec { v } ^ { t + d t } \right. ^ { 2 } } } \end{array}
314
+ $$
315
+
316
+ Note, that all mentioned operations can be efficiently implemented with convolutions. To obtain the final velocities on a square grid, we project the velocity fields of the MAC grid back onto the $\vec { a }$ -grid using linear interpolation:
317
+
318
+ $$
319
+ \vec { v } = \frac { 1 } { 2 } \left( { ( v _ { x } ) _ { i - 1 , j } } + { ( v _ { x } ) _ { i , j } } \right)
320
+ $$
321
+
322
+ # B NETWORK ARCHITECTURE
323
+
324
+ Our fluid model is based on the U-Net architecture (Ronneberger et al. (2015)) with fewer channels (see Figure 6). As the pressure field and vector potential can have an arbitrary offset, we always normalize the mean of the pressure $( \Delta p )$ and vector potential $( \Delta a _ { z } )$ to 0 to keep these fields welldefined and prevent drifting offset values.
325
+
326
+ ![](images/a1472214f77f3cafefb7b390de489bc06eea4b6ab22438d1c71d7d3ffc0cd1ea.jpg)
327
+ Figure 6: U-Net architecture with fewer channels.
328
+
329
+ # C EXAMPLES OF TRAINING DOMAINS
330
+
331
+ The domains we used for training consist of $1 0 0 \times 3 0 0$ grids. We used 3 different randomized domains as exemplary depicted in Figure 7. First, we have boxes with randomized height and width that float on randomized paths inspired by Brownian motion in a pipe with randomized flow speed. Second, we have the same setup but replaced the boxes by cylinders with randomized radii and angular velocities in order to learn the Magnus effect. Finally, we have a folded pipe system with randomized flow speed, that is randomly flipped along the $x$ -axis.
332
+
333
+ # D FURTHER EXAMPLES OF GENERALIZATION
334
+
335
+ Note that the network was only trained on simple domain geometries as presented in appendix C. Still, as can be seen in Figure 8, the network is capable of generalizing to far more complicated domain geometries (e.g. shark, car). Figure 8c shows that it can generalize to multiple objects in the scene, although the training set contained at most one object per scene. And Figure 8d shows that we can alter the outer boundary conditions as well. For real-time simulations, please have a look at our source code and the supplementary video.
336
+
337
+ # E QUANTITATIVE ANALYSIS: THE BENCHMARK PROBLEM
338
+
339
+ Figure 9 shows the domain $\Omega$ and $v _ { d }$ on a $1 0 0 \times 1 0 0$ grid which was used as the benchmark problem for quantitative analysis. The flow speed for the inlet and outlet was set to 0.5. The timestep of the integrator was set to $d t = 4$ and the viscosity and fluid density were set to $\mu = 0 . 1$ and $\rho = 4$ respectively.
340
+
341
+ ![](images/0679b34b9e40dd6fbcd896e5dfe9d2350e866f3fa97de7241da416b4cf20acb7.jpg)
342
+ Figure 7: The left column shows $\Omega$ (in white) / $\partial \Omega$ (in black) and the right column shows $\vec { v _ { d } }$ for three examples of training domains. (Colors indicate the direction and magnitude of $\vec { v _ { d } }$ as depicted in Figure 9a)
343
+
344
+ ![](images/96b4681cd4da05c85f6888b7d4f74625dfc620d8aa2ce10458c046f72e55cfd8.jpg)
345
+ Figure 8: Our models generalize to various domain geometries, although being trained only on simple shapes (see Figure 7)
346
+
347
+ # F QUALITATIVE COMPARISON OF $\vec { a }$ -NET AND $\vec { v }$ -NET
348
+
349
+ We give a qualitative example to show the benefits of using a vector potential. Figure 10 demonstrates that the $\vec { a }$ -Net finds plausible solutions for a folded pipe domain while the $\vec { v }$ -Net looses most of the flow in the center of the domain. This is in good accordance with quantitative results shown in section 1. The folded pipe domain is particularly difficult to learn as the flow field contains long range dependencies to the inlet and outlet (as shown in the bottom row in Figure 7).
350
+
351
+ # G TRAINING WITHOUT RESETTING ENVIRONMENTS
352
+
353
+ We performed an ablation study to investigate what happens if we do not reset old environments from time to time and, thus, do not continuously present the fluid model with cold starts during training. Figure 11 shows that in this case, large error spikes appear in the validation curve. These error spikes appear since the model has troubles to perform a cold start as can be seen in Figure 11b: compared to a properly trained model (see Figure 4) the model takes longer to perform a cold start (ca 100 steps) and converges to a solution with high $L _ { p }$ - and $L _ { d } .$ - losses. By resetting the environments from time to time during training, we can prevent these error spikes as shown in Figure 11c.
354
+
355
+ ![](images/7ef32d47da39bc6f2709e48b8263109e11b93a309f24cdd7e9700f02552db9ad.jpg)
356
+ Figure 9: a) shows legend for $\scriptstyle { \vec { v _ { d } } }$ ; b) shows $\Omega$ (in white) $/ \partial \Omega$ (in black) for the benchmark problem; c) shows $\vec { v _ { d } }$ for the benchmark problem. (Colors indicate the direction of $\vec { v _ { d } }$ as depicted in a)
357
+
358
+ ![](images/c6c35a94812aee60c202ac85d9e3bb29901144c51d0e016529668a2acd428f16.jpg)
359
+ Figure 10: Qualitative comparison of $\vec { a }$ -Net and $\vec { v }$ -Net in a folded pipe domain
360
+
361
+ ![](images/e9613f5f266dea5d70e2be191186fc22a58c75552972d2b5b6f43b06f8bbc705.jpg)
362
+ Figure 11: a) ablation study without resetting environments: validation curve shows large error spikes during training; b) error spike: the fluid model takes longer to perform a cold start and converges to a solution with high losses; c) original training with resetting environments: validation curve is stable
parse/train/KUDUoRsEphu/KUDUoRsEphu_content_list.json ADDED
@@ -0,0 +1,1861 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING INCOMPRESSIBLE FLUID DYNAMICS FROM SCRATCH - TOWARDS FAST, DIFFERENTIABLE FLUID MODELS THAT GENERALIZE ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 823,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Nils Wandel \nDepartment of Computer Science University of Bonn \nwandeln@cs.uni-bonn.de \nMichael Weinmann \nDepartment of Computer Science \nUniversity of Bonn \nmw@cs.uni-bonn.de \nReinhard Klein \nDepartment of Computer Science \nUniversity of Bonn \nrk@cs.uni-bonn.de ",
17
+ "bbox": [
18
+ 184,
19
+ 194,
20
+ 405,
21
+ 251
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "",
28
+ "bbox": [
29
+ 593,
30
+ 194,
31
+ 813,
32
+ 251
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "",
39
+ "bbox": [
40
+ 184,
41
+ 272,
42
+ 405,
43
+ 328
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 364,
54
+ 544,
55
+ 380
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Fast and stable fluid simulations are an essential prerequisite for applications ranging from computer-generated imagery to computer-aided design in research and development. However, solving the partial differential equations of incompressible fluids is a challenging task and traditional numerical approximation schemes come at high computational costs. Recent deep learning based approaches promise vast speed-ups but do not generalize to new fluid domains, require fluid simulation data for training, or rely on complex pipelines that outsource major parts of the fluid simulation to traditional methods. ",
62
+ "bbox": [
63
+ 233,
64
+ 396,
65
+ 764,
66
+ 507
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "In this work, we propose a novel physics-constrained training approach that generalizes to new fluid domains, requires no fluid simulation data, and allows convolutional neural networks to map a fluid state from time-point $t$ to a subsequent state at time $t + d t$ in a single forward pass. This simplifies the pipeline to train and evaluate neural fluid models. After training, the framework yields models that are capable of fast fluid simulations and can handle various fluid phenomena including the Magnus effect and Kármán vortex streets. We present an interactive real-time demo to show the speed and generalization capabilities of our trained models. Moreover, the trained neural networks are efficient differentiable fluid solvers as they offer a differentiable update step to advance the fluid simulation in time. We exploit this fact in a proof-of-concept optimal control experiment. Our models significantly outperform a recent differentiable fluid solver in terms of computational speed and accuracy. ",
73
+ "bbox": [
74
+ 233,
75
+ 511,
76
+ 764,
77
+ 690
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 718,
88
+ 336,
89
+ 733
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Simulating the behavior of fluids by solving the incompressible Navier-Stokes equations is of great importance for a wide range of applications and accurate as well as fast fluid simulations are a long-standing research goal. On top of simulating the behavior of fluids, several applications such as sensitivity analysis of fluids or gradient-based control algorithms rely on differentiable fluid simulators that allow to propagate gradients throughout the simulation (Holl et al. (2020)). ",
96
+ "bbox": [
97
+ 174,
98
+ 750,
99
+ 823,
100
+ 819
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Recent advances in deep learning aim for fast and accurate fluid simulations but rely on vast datasets and / or do not generalize to new fluid domains. Kim et al. (2019) present a framework to learn parameterized fluid simulations and allow to interpolate efficiently in between such simulations. However, their work does not generalize to new domain geometries that lay outside the training data. Kim & Lee (2020) train a RNN-GAN that produces turbulent flow fields within a pipe domain, but do not show generalization results beyond pipe domains. Xie et al. (2018) introduce a tempoGAN to perform temporally consistent superresolution of smoke simulations. This allows to produce plausible high-resolution smoke-density fields for arbitrary low-resolution inputs, but our fluid model should output a complete fluid state description consisting of a velocity and a pressure field. Tompson et al. (2017) present how a Helmholtz projection step can be learned to accelerate Eulerian fluid simulations. This method generalizes to new domain geometries, but a particle tracer is needed to deal with the advection term of the Navier-Stokes equations. Furthermore, as Eulerian fluids do not model viscosity, effects like e.g. the Magnus effect or Kármán vortex streets cannot be simulated. Geneva & Zabaras (2020) propose a physics-informed framework to learn the entire update step for the Burgers equations in 1D and 2D, but no generalization results for new domain geometries are demonstrated. All of the aforementioned methods rely on the availability of vast amounts of data from fluid-solvers such as FEniCS, OpenFOAM or Mantaflow. Most of these methods do not generalize well or outsource a major part of the fluid simulation to traditional methods such as low-resolution fluid solvers or a particle tracer. ",
107
+ "bbox": [
108
+ 174,
109
+ 827,
110
+ 823,
111
+ 924
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 270
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "In this work, we propose a novel unsupervised training framework to learn incompressible fluid dynamics from scratch. It does not require any simulated fluid-data (neither as ground truth data, nor to train an adversarial network, nor to initialize frames for a physics-constrained loss) and generalizes to fluid domains unseen during training. It allows CNNs to learn the entire update-step of mapping a fluid domain from time-point $t$ to $t + d t$ without having to rely on low resolution fluid-solvers or a particle-tracer. In fact, we will demonstrate that a physicsconstrained loss function combined with a simple strategy to recycle fluid-data generated by the neural network at training time suffices to teach CNNs fluid dynamics on increasingly realistic statistics of fluid states. This drastically simplifies the training pipeline. Fluid simulations get efficiently unrolled in time by recurrently applying the trained model on a fluid state. Furthermore, the fluid models include viscous friction and handle effects such as the Magnus effect and Kármán vortex streets. On top of that, we show by a gradient-based optimal control example how backpropagation through time can be used to differentiate the fluid simulation. Code and pretrained models are publicly available at https://github.com/aschethor/ Unsupervised_Deep_Learning_of_Incompressible_Fluid_Dynamics/. ",
129
+ "bbox": [
130
+ 174,
131
+ 277,
132
+ 825,
133
+ 486
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 RELATED WORK ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 176,
143
+ 505,
144
+ 344,
145
+ 521
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "In literature, several different approaches can be found that aim to approximate the dynamics of PDEs in general and fluids in particular with efficient, learning-based surrogate models. ",
152
+ "bbox": [
153
+ 174,
154
+ 537,
155
+ 823,
156
+ 565
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Lagrangian methods such as smoothed particle hydrodynamcs (SPH) Gingold & Monaghan (1977) handle fluids from the perspective of many individual particles that move with the velocity field. Following this approach, learning-based methods using regression forests by Ladický et al. (2015), graph neural networks by Mrowca et al. (2018); Li et al. (2019) and continuous convolutions by Ummenhofer et al. (2020) have been developed. In addition, Smooth Particle Networks (SP-Nets) by Schenck & Fox (2018) allow for differentiable fluid simulations within the Lagrangian frame of reference. These Lagrangian methods are particularly suitable when a fluid domain exhibits large, dynamic surfaces (e.g. waves or droplets). However, to simulate the dynamics within a fluid domain accurately, Eulerian methods, that treat the Navier-Stokes equations in a fixed frame of reference, are usually better suited. ",
163
+ "bbox": [
164
+ 174,
165
+ 571,
166
+ 825,
167
+ 712
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Continuous Eulerian methods allow for mesh-free solutions by mapping domain coordinates (e.g. $x , y , t )$ directly onto field values (e.g. velocity $\\vec { v } \\ : /$ pressure $p$ ) (Sirignano & Spiliopoulos (2018); Grohs et al. (2018); Khoo et al. (2019)). Recent applications focused on flow through porous media (Zhu & Zabaras (2018); Zhu et al. (2019); Tripathy & Bilionis (2018)), fluid modeling (Yang et al. (2016); Raissi et al. (2018)), turbulence modeling (Geneva & Zabaras (2019); Ling et al. (2016)) and modeling of molecular dynamics (Schöberl et al. (2019)). Training is usually based on physics-constrained loss functions that penalize residuals of the underlying PDEs. Similar to our approach, Raissi et al. (2019) uses vector potentials to obtain continuous divergence-free velocity fields to approximate the incompressible Navier-Stokes equations. Continuous methods return smooth, accurate results and can overcome the curse of dimensionality of discrete techniques in high-dimensional PDEs (Grohs et al. (2018)). However, these networks are trained on a specific domain and cannot generalize to new environments or be used in interactive scenarios. ",
174
+ "bbox": [
175
+ 174,
176
+ 718,
177
+ 825,
178
+ 885
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Discrete Eulerian methods, on the other hand, aim to solve the underlying PDEs on a grid and early work dates back to Harlow & Welch (1965) and Stam (1999). Accelerating such traditional works with deep learning techniques is a major field of research and all of the methods mentioned in the introduction fall into this category. Further methods include the approach by Thuerey et al. (2019) to learn solutions of the Reynolds-averaged Navier-Stokes equations for airfoil flows, but requires large amounts of training data and does not generalize beyond airfoil flows. In the work by Um et al. (2020), a correction step is learned that brings solutions of a low-resolution differentiable fluid solver closer to solutions of a high-resolution fluid simulation. However, generalization results for new domain geometries were not presented. The works of Mohan et al. (2020) and Kim et al. (2019) show that vector potentials are suitable to enforce the incompressibility constraint in fluids but do not generalize to new fluid domains beyond their training data. ",
185
+ "bbox": [
186
+ 174,
187
+ 103,
188
+ 825,
189
+ 256
190
+ ],
191
+ "page_idx": 2
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "3 METHOD ",
196
+ "text_level": 1,
197
+ "bbox": [
198
+ 174,
199
+ 276,
200
+ 282,
201
+ 292
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "In this section, we briefly review the incompressible Navier-Stokes equations, which are to be solved by the neural network. Then, we explain how the Helmholtz decomposition can be exploited to ensure incompressibility within the fluid domain. Furthermore, we provide details of our discrete spatio-temporal fluid representation and introduce the fluid model. Afterwards, we formulate a physics-constrained loss function based on residuals of the Navier-Stokes equations and introduce a pressure regularization term for very high Reynolds numbers. Finally, we explain the unsupervised training strategy. ",
208
+ "bbox": [
209
+ 174,
210
+ 308,
211
+ 825,
212
+ 406
213
+ ],
214
+ "page_idx": 2
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "3.1 INCOMPRESSIBLE NAVIER-STOKES EQUATIONS ",
219
+ "text_level": 1,
220
+ "bbox": [
221
+ 174,
222
+ 421,
223
+ 545,
224
+ 436
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "text",
230
+ "text": "Most fluids can be modeled with the incompressible Navier-Stokes equations - a set of non-linear equations that describe the interplay of a velocity field $\\vec { v }$ and a pressure field $p$ within a fluid domain $\\Omega$ : ",
231
+ "bbox": [
232
+ 174,
233
+ 446,
234
+ 825,
235
+ 489
236
+ ],
237
+ "page_idx": 2
238
+ },
239
+ {
240
+ "type": "equation",
241
+ "img_path": "images/c2739be49bcb70d4e71989d437fa9dc175763d8b140a742b3353373fd1da5aa6.jpg",
242
+ "text": "$$\n\\begin{array} { r l r } { \\boldsymbol { \\nabla } \\cdot \\boldsymbol { \\vec { v } } = 0 } & { \\mathrm { i n c o m p r e s s i b i l i t y ~ o n ~ } \\Omega } \\\\ { \\rho \\dot { \\vec { v } } = \\rho \\left( \\frac { \\partial \\vec { v } } { \\partial t } + \\left( \\vec { v } \\cdot \\boldsymbol { \\nabla } \\right) \\vec { v } \\right) = - \\boldsymbol { \\nabla } p + \\mu \\Delta \\vec { v } + \\vec { f } } & { \\mathrm { c o n s e r v a t i o n ~ o f ~ m o m e n t u m ~ o n ~ } \\Omega } \\end{array}\n$$",
243
+ "text_format": "latex",
244
+ "bbox": [
245
+ 200,
246
+ 513,
247
+ 774,
248
+ 571
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "Here, $\\rho$ describes the fluid density and $\\mu$ the viscosity. Equation 1 states that the fluid is incompressible and thus $\\vec { v }$ is divergence-free. Equation 2 states that the change in momentum of fluid particles must correspond to the sum of forces that arise from the pressure gradient, viscous friction and external forces. Here, external forces on the fluid (such as e.g. gravity) can be neglected, so we set ${ \\vec { f } } = 0$ . ",
255
+ "bbox": [
256
+ 174,
257
+ 574,
258
+ 825,
259
+ 646
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "These incompressible Navier-Stokes equations shall be solved by a CNN given initial conditions $\\vec { v } ^ { 0 }$ and $p ^ { 0 }$ at the beginning of the simulation and Dirichlet boundary conditions which constrain the velocity field at the domain boundary $\\partial \\Omega$ : ",
266
+ "bbox": [
267
+ 176,
268
+ 654,
269
+ 823,
270
+ 695
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "equation",
276
+ "img_path": "images/382b2c7eff65cdde5b09533719fcbe295bfe23f03b98979e602e16522a1b6084.jpg",
277
+ "text": "$$\n\\vec { v } = \\vec { v } _ { d } \\qquad \\mathrm { D i r i c h l e t ~ b o u n d a r y ~ c o n d i t i o n ~ o n ~ } \\partial \\Omega\n$$",
278
+ "text_format": "latex",
279
+ "bbox": [
280
+ 294,
281
+ 700,
282
+ 699,
283
+ 718
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "3.2 HELMHOLTZ DECOMPOSITION ",
290
+ "text_level": 1,
291
+ "bbox": [
292
+ 176,
293
+ 733,
294
+ 428,
295
+ 748
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "A common method to ensure incompressibility of a fluid (see Equation 1) is to project the flow field onto the divergence-free part of its Helmholtz decomposition. The Helmholtz theorem states that every vector field $\\vec { v }$ can be decomposed into a curl-free part $( \\nabla q )$ and a divergence-free part $( \\nabla \\times \\vec { a } )$ : ",
302
+ "bbox": [
303
+ 174,
304
+ 758,
305
+ 823,
306
+ 803
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "equation",
312
+ "img_path": "images/5d37c1b17de1cc04d458fc63441646666d5fed6f98220fdcdde403f6afb38e4d.jpg",
313
+ "text": "$$\n\\vec { v } = \\nabla q + \\nabla \\times \\vec { a }\n$$",
314
+ "text_format": "latex",
315
+ "bbox": [
316
+ 441,
317
+ 808,
318
+ 558,
319
+ 824
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "Note, that $\\nabla \\times ( \\nabla q ) = \\vec { 0 }$ and $\\nabla \\cdot ( \\nabla \\times { \\vec { a } } ) = 0$ . The Helmholtz projection consists of solving the Poisson problem $\\nabla \\cdot \\vec { v } = \\Delta q$ for $q$ , followed by substracting $\\nabla q$ from the original flow field. However, solving the Poisson equation on arbitrary domains comes at high computational costs for classical methods and one has to rely e.g. on conjugate gradient methods to approximate its solution. ",
326
+ "bbox": [
327
+ 174,
328
+ 830,
329
+ 823,
330
+ 888
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "Here, we propose a different approach and directly try to learn a vector potential $\\vec { a }$ with $\\vec { v } = \\nabla \\times \\vec { a }$ . This ensures that the network outputs a divergence-free velocity field within the domain $\\Omega$ and automatically solves Equation 1. In this work, we consider 2D fluid simulations, so only the $\\mathbf { Z }$ - component of $\\vec { a }$ , $a _ { z }$ , is of interest since $v _ { z }$ and all derivatives with respect to the $z$ -axis are zero: ",
337
+ "bbox": [
338
+ 174,
339
+ 895,
340
+ 823,
341
+ 924
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "",
348
+ "bbox": [
349
+ 169,
350
+ 102,
351
+ 823,
352
+ 132
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "equation",
358
+ "img_path": "images/e9bd2999fb9a6c2122ff0c0f5828b5f9ab50ac874726e203ce7b01db9ed3ba1a.jpg",
359
+ "text": "$$\n\\nabla \\times { \\vec { a } } = \\left( { \\partial _ { z } a _ { x } - \\partial _ { z } a _ { y } } \\right) = \\left( { \\partial _ { y } a _ { z } } \\right) = \\left( { \\begin{array} { c } { v _ { x } } \\\\ { v _ { y } } \\\\ { 0 } \\end{array} } \\right) = { \\vec { v } }\n$$",
360
+ "text_format": "latex",
361
+ "bbox": [
362
+ 313,
363
+ 138,
364
+ 684,
365
+ 184
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "3.3 DISCRETE SPATIO-TEMPORAL FLUID REPRESENTATION ",
372
+ "text_level": 1,
373
+ "bbox": [
374
+ 173,
375
+ 198,
376
+ 599,
377
+ 214
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Marker-And-Cell (MAC) grid To solve the Navier-Stokes equations, we represent the relation between $a _ { z } , v _ { x } , v _ { y } , p$ on a 2D staggered marker-and-cell (MAC) grid (see Figure 1a). Therefore, we discretise time and space as follows: ",
384
+ "bbox": [
385
+ 173,
386
+ 224,
387
+ 826,
388
+ 267
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "equation",
394
+ "img_path": "images/aab624e339ff56bb8238810aeeac252a575df0efa30f328028aa0967a54307b7.jpg",
395
+ "text": "$$\n\\vec { a } ( x , y , t ) = \\left( \\begin{array} { c } { 0 } \\\\ { 0 } \\\\ \\left( a _ { z } \\right) _ { i , j } ^ { t } \\rule { 0 ex } { 5 ex } \\right) ; \\vec { v } ( x , y , t ) = \\binom { \\left( v _ { x } \\right) _ { i , j } ^ { t } } { \\left( v _ { y } \\right) _ { i , j } ^ { t } } ; p ( x , y , t ) = p _ { i , j } ^ { t } \\end{array}\n$$",
396
+ "text_format": "latex",
397
+ "bbox": [
398
+ 277,
399
+ 284,
400
+ 720,
401
+ 333
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "Obtaining gradient, divergence, Laplace and curl operations on this grid with finite differences is straight forward and can be efficiently implemented with convolutions (see appendix A). ",
408
+ "bbox": [
409
+ 173,
410
+ 335,
411
+ 826,
412
+ 364
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "image",
418
+ "img_path": "images/9b2df2899d456e4e435eca52239a4b16982712cebefb7099762ffba6f6c0e6f2.jpg",
419
+ "image_caption": [
420
+ "Figure 1: MAC grid and diagram of the fluid model. "
421
+ ],
422
+ "image_footnote": [],
423
+ "bbox": [
424
+ 197,
425
+ 387,
426
+ 800,
427
+ 599
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "Explicit, Implicit, Implicit-Explicit (IMEX) time integration methods The discretization of the time domain is needed to deal with the time-derivative of the velocity fiel d ∂\\~v∂t in Equation 2, which becomes: ",
434
+ "bbox": [
435
+ 173,
436
+ 647,
437
+ 825,
438
+ 688
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "equation",
444
+ "img_path": "images/a68a0861a6a57a77e0f3cab5216cc15f4e068bb6ec9724bb4787efe7195131a5.jpg",
445
+ "text": "$$\n\\rho \\left( \\frac { \\vec { v } ^ { t + d t } - \\vec { v } ^ { t } } { d t } + \\left( \\vec { v } ^ { t ^ { \\prime } } \\cdot \\nabla \\right) \\vec { v } ^ { t ^ { \\prime } } \\right) = - \\nabla p ^ { t + d t } + \\mu \\Delta \\vec { v } ^ { t ^ { \\prime } } + \\vec { f }\n$$",
446
+ "text_format": "latex",
447
+ "bbox": [
448
+ 302,
449
+ 685,
450
+ 697,
451
+ 722
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "The goal is to take as large as possible timesteps $d t$ while maintaining stable and accurate solutions. Stability and accuracy largely depend on the definition of $v ^ { t ^ { \\prime } }$ . In literature, choosing $\\boldsymbol { v } ^ { t ^ { \\prime } } = \\boldsymbol { v } ^ { t }$ is often referred to as explicit integration methods and frequently leads to unstable behavior. Choosing $v ^ { t ^ { \\prime } } = v ^ { t + d t }$ is usually associated with implicit integration methods and gives stable solutions at the cost of numerical dissipation. Implicit-Explicit (IMEX) methods, which set $v ^ { t ^ { \\prime } } = ( v ^ { t } + v ^ { t + d t } ) / 2$ are a compromise between both methods and considered to be more accurate but less stable than implicit methods. ",
458
+ "bbox": [
459
+ 173,
460
+ 729,
461
+ 826,
462
+ 835
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "3.4 FLUID MODEL ",
469
+ "text_level": 1,
470
+ "bbox": [
471
+ 174,
472
+ 103,
473
+ 316,
474
+ 117
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "We represent the fluid dynamics by a recurrent model that maps the fluid state $p ^ { t } , \\vec { a } ^ { t }$ for timestep $t$ and the domain description $\\Omega ^ { t + d t } , \\vec { v } _ { d } ^ { t + d t }$ to the fluid state $p ^ { t + d t } , \\vec { a } ^ { t + d t }$ of the next timestep. Here, $p ^ { t }$ describes the pressure field and $\\vec { a } ^ { t }$ describes the vector potential of . For $t = 0$ , we consider initial states $p ^ { 0 } = 0$ and $\\vec { a } ^ { 0 } = \\vec { 0 }$ , however, other initial conditions could be considered as well. $\\Omega ^ { t + d t }$ is a binary mask that contains the domain geometry and is 1 for the fluid domain and 0 everywhere else. For the boundary of the domain, we simply take the inverse of $\\Omega \\colon \\partial \\Omega = 1 - \\Omega$ . $\\vec { v } _ { d } ^ { t + \\dot { d } t }$ represents the Dirichlet boundary conditions and contains a velocity field that must be matched by ${ \\vec { v } } ^ { t + d t }$ at the domain boundaries. Figure 1b shows a diagram of the fluid model. First, $\\left( p ^ { t } , \\vec { a } ^ { t } , \\Omega ^ { t + d t } , \\vec { v } _ { d } ^ { t + d t } \\right)$ are taken to derive a slightly more meaningful feature representation that comprises $\\left( p ^ { t } , a ^ { t } , \\nabla \\times a ^ { t } , \\Omega ^ { t + d t } , \\partial \\Omega ^ { t + d t } , \\Omega ^ { t + d t } \\cdot \\nabla \\times a ^ { t } , \\Omega ^ { t + d t } \\cdot p ^ { t } , \\partial \\Omega ^ { t + d t } \\cdot \\vec { v } _ { d } ^ { t + d t } \\right)$ . These features can be very efficiently computed with convolutions and are then fed into a U-Net (Ronneberger et al. (2015)) with a reduced number of channels (the exact network configuration can be found in appendix B). The mean of the U-Net output is set to 0 in order to keep $p$ and $\\vec { a }$ well defined and prevent drifting offset values. Finally, the output is added to $p ^ { t }$ and $\\vec { a } ^ { t }$ to obtain the updated fluid state $p ^ { t + d t }$ and $\\vec { a } ^ { t + d t }$ . ",
481
+ "bbox": [
482
+ 173,
483
+ 130,
484
+ 826,
485
+ 349
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "3.5 PHYSICS-CONSTRAINED LOSS FUNCTION",
492
+ "text_level": 1,
493
+ "bbox": [
494
+ 176,
495
+ 366,
496
+ 500,
497
+ 381
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "Using the residuals of the Navier-Stokes equations (Equations 1 and 2), we can formulate the following loss terms on $\\Omega$ and $\\partial \\Omega$ : ",
504
+ "bbox": [
505
+ 176,
506
+ 392,
507
+ 823,
508
+ 421
509
+ ],
510
+ "page_idx": 4
511
+ },
512
+ {
513
+ "type": "equation",
514
+ "img_path": "images/560a1fae369f8b42f48f2ab1f3a5be4107aa929f6c1c94893410c3404457bb26.jpg",
515
+ "text": "$$\n\\begin{array} { l l } { { L _ { d } = \\displaystyle { \\left\\| \\nabla \\cdot \\vec { v } \\right\\| ^ { 2 } } } } & { { \\qquad \\mathrm { ~ d i v e r g e n c e ~ l o s s ~ o n ~ } \\Omega } } \\\\ { { L _ { p } = \\displaystyle { \\left\\| \\rho \\left( \\frac { \\partial \\vec { v } } { \\partial t } + \\left( \\vec { v } \\cdot \\nabla \\right) \\vec { v } \\right) + \\nabla p - \\mu \\Delta \\vec { v } - \\vec { f } \\right\\| ^ { 2 } } } } & { { \\qquad \\mathrm { ~ m o m e n t u m ~ l o s s ~ o n ~ } \\Omega } } \\\\ { { L _ { b } = \\displaystyle { \\left\\| \\vec { v } - \\vec { v } _ { d } \\right\\| ^ { 2 } } } } & { { \\qquad \\mathrm { ~ b o u n d a r y ~ l o s s ~ o n ~ } \\partial \\Omega } } \\end{array}\n$$",
516
+ "text_format": "latex",
517
+ "bbox": [
518
+ 233,
519
+ 444,
520
+ 767,
521
+ 527
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "Combining the described loss terms, we obtain the following loss function: ",
528
+ "bbox": [
529
+ 173,
530
+ 539,
531
+ 665,
532
+ 554
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "equation",
538
+ "img_path": "images/fcc301942512405e232beefdcdc19a6dfc51ec3a8249802eb2c2216684b8ac5c.jpg",
539
+ "text": "$$\nL = \\alpha L _ { d } + \\beta L _ { p } + \\gamma L _ { b }\n$$",
540
+ "text_format": "latex",
541
+ "bbox": [
542
+ 418,
543
+ 561,
544
+ 580,
545
+ 579
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "where $\\alpha , \\beta , \\gamma$ are hyperparameters that weight the contributions of the different loss terms. Note that if we use a vector potential ${ \\vec { v } } = \\nabla \\times { \\vec { a } }$ , $L _ { d } = 0$ is automatically fulfilled and we can set $\\alpha = 0$ . This loss function can be computed very efficiently with convolutions in $O ( N )$ (where $N =$ number of grid cells), whereas solving the Navier-Stokes equations explicitly would be computationally a lot more expensive. For detailed descriptions regarding the fully discretized loss-function, we refer to appendix A. ",
552
+ "bbox": [
553
+ 174,
554
+ 584,
555
+ 825,
556
+ 669
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "3.6 PRESSURE REGULARIZATION ",
563
+ "text_level": 1,
564
+ "bbox": [
565
+ 176,
566
+ 685,
567
+ 418,
568
+ 700
569
+ ],
570
+ "page_idx": 4
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "For very high Reynolds numbers (see Equation 13) and inviscid flows, training becomes unstable as viscous friction cannot dissipate enough energy out of the system. This leads to unrealistic gradients in $\\vec { v }$ and $p$ . For such cases, we introduce an additional regularization term for the loss function (11) that can be traded off with $L _ { p }$ to stabilize training: ",
575
+ "bbox": [
576
+ 174,
577
+ 712,
578
+ 823,
579
+ 767
580
+ ],
581
+ "page_idx": 4
582
+ },
583
+ {
584
+ "type": "equation",
585
+ "img_path": "images/f76537da61c027d6456687ae5684be73967eba203194cb361484777f2199aea9.jpg",
586
+ "text": "$$\nL _ { r } = \\| \\nabla p \\| ^ { 2 }\n$$",
587
+ "text_format": "latex",
588
+ "bbox": [
589
+ 454,
590
+ 775,
591
+ 544,
592
+ 795
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "The intuition behind this regularization term is, that we want to penalize unrealistically high energies in the pressure field. ",
599
+ "bbox": [
600
+ 171,
601
+ 801,
602
+ 825,
603
+ 830
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "3.7 TRAINING STRATEGY ",
610
+ "text_level": 1,
611
+ "bbox": [
612
+ 176,
613
+ 103,
614
+ 364,
615
+ 117
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "Training starts with initializing a pool $\\{ \\Omega _ { k } ^ { 0 } , ( v _ { d } ) _ { k } ^ { 0 } , ( a _ { z } ) _ { k } ^ { 0 } , p _ { k } ^ { 0 } \\}$ of randomized domains $\\Omega _ { k } ^ { 0 }$ and boundary conditions $( v _ { d } ) _ { k } ^ { 0 }$ as well as initial conditions for the vector potential and pressure fields that we both set to zero $( \\check { ( a _ { z } ) } _ { k } ^ { 0 } = 0$ and $p _ { k } ^ { 0 } = 0$ ). The resolution of our training domains is $1 0 0 \\mathrm { x } 3 0 0$ grid cells and example-domains of the training pool are shown in appendix C. Note that our training pool does not rely on any previously simulated fluid-data. ",
622
+ "bbox": [
623
+ 174,
624
+ 128,
625
+ 825,
626
+ 200
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "At each training step, a random mini-batch $\\{ \\Omega _ { k } ^ { t } , ( v _ { d } ) _ { k } ^ { t } , ( a _ { z } ) _ { k } ^ { t } , p _ { k } ^ { t } \\} _ { \\{ k \\in \\operatorname * { m i n i b a t c h } \\} }$ is drawn from the pool and fed into the neural network which is designed to predict the velocity $( \\vec { v } _ { k } ^ { t + d t } = \\nabla \\times \\vec { a } _ { k } ^ { t + d t } )$ and pressure $( p _ { k } ^ { t + d t } )$ fields of the next time step. Based on a physics-constrained loss-function (Equation 11), we update the weights of the network using the Adam optimizer (Kingma & Ba (2015)). At the end of each training step, the pool is updated by replacing the old vector potential and pressure fields $( a _ { z } ) _ { k } ^ { t } , p _ { k } ^ { t }$ by the newly predicted ones $( a _ { z } ) _ { k } ^ { t + \\dot { d t } } , p _ { k } ^ { \\dot { t } + d t }$ t, pt+dtk . This recycling strategy fills the training pool with more and more realistic fluid states as the model becomes better at simulating fluid dynamics. ",
633
+ "bbox": [
634
+ 174,
635
+ 205,
636
+ 825,
637
+ 313
638
+ ],
639
+ "page_idx": 5
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "From time to time, old environments of the training pool are replaced by new randomized environments and the vector potential as well as the pressure fields are reset to 0. This increases the variance of the training pool and helps the neural network to learn \"cold starts\" from \\~0-velocity and 0-pressure fields. ",
644
+ "bbox": [
645
+ 174,
646
+ 319,
647
+ 825,
648
+ 377
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "Besides the fluid model described above, which we denote as $\\vec { a }$ -Net in the following, we also trained an ablation model, $\\vec { v }$ -Net, that directly learns to predict the velocity field without a vector potential. For the implementation of both models, we used the popular machine learning framework Pytorch and trained the models on a NVidia GeForce RTX 2080 Ti. Training converged after about 1 day. The hyperparameters in the loss-function for the $\\vec { a }$ -Net were $\\beta = 1$ and $\\gamma = 2 0$ . The reason for choosing a higher weight for the loss term $L _ { b }$ than for $L _ { p }$ was the observation, that errors in $L _ { b }$ can lead to unrealistic flows leaking through boundaries. For the ablation study $\\vec { v } \\cdot \\vec { }$ -Net), we used $\\alpha = 1 0 0 , \\beta = 1 , \\gamma = 0 . 0 0 1$ . Here, we had to choose a very high weight for $L _ { d }$ to ensure incompressibility of the fluid, otherwise unrealistic source and sink effects start to appear. For $L _ { b }$ , on the other hand, we used a very low weight as the boundary conditions can be trivially learned by the $\\vec { v }$ -Net. We used these parameter settings for all experiments. ",
655
+ "bbox": [
656
+ 174,
657
+ 383,
658
+ 825,
659
+ 536
660
+ ],
661
+ "page_idx": 5
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "4 RESULTS ",
666
+ "text_level": 1,
667
+ "bbox": [
668
+ 174,
669
+ 559,
670
+ 281,
671
+ 575
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "To evaluate the potential of our method, we assess its ability to reproduce physical effects such as Kármán vortex streets and the Magnus effect. In addition, we demonstrate its generalization capability and real-time performance. Finally, we test the fluid models quantitatively. ",
678
+ "bbox": [
679
+ 174,
680
+ 592,
681
+ 825,
682
+ 635
683
+ ],
684
+ "page_idx": 5
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "4.1 QUALITATIVE EVALUATION ",
689
+ "text_level": 1,
690
+ "bbox": [
691
+ 176,
692
+ 654,
693
+ 405,
694
+ 667
695
+ ],
696
+ "page_idx": 5
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Qualitative analysis of wake dynamics Qualitative effects in fluid dynamics such as the wake dynamics behind an obstacle are closely related to the Reynolds number. It is a dimensionless quantity defined by: ",
701
+ "bbox": [
702
+ 174,
703
+ 680,
704
+ 825,
705
+ 723
706
+ ],
707
+ "page_idx": 5
708
+ },
709
+ {
710
+ "type": "equation",
711
+ "img_path": "images/4dfd04cc28aff9cd79aa9924737756fe96be62393b9e0a5e81f5954f0c177749.jpg",
712
+ "text": "$$\nR e = \\frac { \\rho \\left\\| \\vec { v } \\right\\| D } { \\mu }\n$$",
713
+ "text_format": "latex",
714
+ "bbox": [
715
+ 447,
716
+ 723,
717
+ 550,
718
+ 758
719
+ ],
720
+ "page_idx": 5
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "Here, $\\rho$ is the fluid density, $\\lVert \\vec { v } \\rVert$ is the fluid speed, $D$ is the diameter of the obstacle, and $\\mu$ is the viscosity. (We use the units of the grid). ",
725
+ "bbox": [
726
+ 173,
727
+ 762,
728
+ 823,
729
+ 792
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "We retrained models for different values of $\\mu$ and $\\rho$ to compare the fluid behavior for a wide range of Reynolds numbers. Figure 2 shows, that the trained models are able to predict the wake dynamics behind an obstacle in good accordance with qualitative expectations from fluid dynamics. As a rule of thumb, for $R e \\ll 1$ , the flow becomes time-reversible. This can be noticed in Figure 2a by the symmetry of the flow before and after the obstacle and the nearly constant pressure gradient within the pipe. Starting from $R e \\approx 1 0$ , the flow is still laminar but a static wake is forming behind the obstacle (see Figure 2b). For Reynolds numbers $R e > \\approx 9 0$ , Kármán vortex streets start to appear (see Figure 2c). A Kármán vortex street consists of clock and counterclockwise spinning vortices that are generated at the obstacle and then start moving in a regularly oscillating pattern with the flow. For very large Reynolds numbers or inviscid flows, the flow field becomes turbulent, which can be recognized by the irregular patterns behind the obstacle in Fig 2d. ",
736
+ "bbox": [
737
+ 173,
738
+ 797,
739
+ 825,
740
+ 924
741
+ ],
742
+ "page_idx": 5
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "",
747
+ "bbox": [
748
+ 173,
749
+ 103,
750
+ 823,
751
+ 132
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "image",
757
+ "img_path": "images/468c39a4bc3b15c1ad09df22f1ea2d017e585da0b07e13fdda3acc4af90342a2.jpg",
758
+ "image_caption": [
759
+ "Figure 2: After training, our models are able to show correct wake flow dynamics for a wide range of different Reynolds numbers. $\\dot { \\boldsymbol { D } } = 3 0$ , $\\| \\vec { v } \\| = 0 . 5 )$ . Streamlines indicate flow direction, linewidth indicates speed and colors represent the pressure field (blue: low pressure / yellow: high pressure). "
760
+ ],
761
+ "image_footnote": [],
762
+ "bbox": [
763
+ 209,
764
+ 162,
765
+ 789,
766
+ 381
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "Magnus effect The Magnus effect appears when a flow interacts with a rotating body. It is widely known e.g. in sports such as soccer or tennis where spin is used to deflect the path of a ball. The reason for the deflection stems from a low pressure field where the surface of the object moves along flow direction and a high pressure field where the object surface moves against the flow. Figure 3a shows, that our models are able to reproduce the Magnus effect around a rotating cylinder. ",
773
+ "bbox": [
774
+ 174,
775
+ 458,
776
+ 825,
777
+ 529
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "image",
783
+ "img_path": "images/f016ae8a12c9f62a822e83f75f847c39d114a2759991e05eb174aa68cf62956a.jpg",
784
+ "image_caption": [
785
+ "(a) Magnus effect on a clock-wise turning cylinder.(b) Generalization example: Note that the fluid model has never been confronted with wingprofiles during training. "
786
+ ],
787
+ "image_footnote": [],
788
+ "bbox": [
789
+ 204,
790
+ 559,
791
+ 790,
792
+ 633
793
+ ],
794
+ "page_idx": 6
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Figure 3: Our models feature the Magnus effect and generalize to new fluid domains. Further examples are presented in appendix D and the video. ",
799
+ "bbox": [
800
+ 176,
801
+ 690,
802
+ 823,
803
+ 717
804
+ ],
805
+ "page_idx": 6
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Analysis of generalization capability We tested the networks capability to generalize to objects not seen during training. Figure 3b shows the networks capability to meet boundary conditions of an airfoil and return a plausible pressure field that produces lift (see low pressure on top of wing). Note that in contrast to the approach by Thuerey et al. (2019), which learns simplified, time-averaged solutions of the Navier-Stokes equations, our method is able to simulate the full incompressible Navier-Stokes equations for an airfoil without relying on any ground truth data or having seen airfoilgeometries during training. In fact, the network was only trained on simple randomized domains as highlighted in appendix C and Figure 7. Possible reasons for the networks generalization capabilities are: ",
810
+ "bbox": [
811
+ 174,
812
+ 743,
813
+ 825,
814
+ 868
815
+ ],
816
+ "page_idx": 6
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "• During training, the network gets confronted with an infinite number of different flowfields and randomized domain configurations because the training pool gets updated at every training step. This prevents the network from over-fitting. ",
821
+ "bbox": [
822
+ 217,
823
+ 882,
824
+ 823,
825
+ 924
826
+ ],
827
+ "page_idx": 6
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "• The dynamics of a fluid-particle are mostly determined by its local neighborhood / surrounding particles. This means, the update step for a certain cell on the MAC grid is mostly determined by close / neighboring MAC-grid cells. Since more complicated shapes can be seen locally as a composition of basic shapes (e.g. the front of the wing can be locally regarded as a cylinder), it suffices to train on basic shapes that provide the network with enough examples to generalize to more complicated shapes. ",
832
+ "bbox": [
833
+ 217,
834
+ 103,
835
+ 825,
836
+ 188
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "Further generalization examples are provided in appendix D. ",
843
+ "bbox": [
844
+ 174,
845
+ 209,
846
+ 570,
847
+ 223
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Real-time capability The fluid simulation can be easily parallelized and takes low computational costs as one time-integration step consists just of a single forward pass through a convolutional neural network. This enables for example interactive real-time simulations. We implemented a demo that allows to interact with a fluid by moving obstacles, rotating spheres and changing the flow speed within a pipe (see video in supplementary material and source code). Our method runs at 250 timesteps per second on a $1 0 0 \\mathrm { x } 3 0 0$ grid. In the respective experiments, we used a NVidia GeForce RTX 2080 Ti consuming about $8 6 0 \\mathrm { M B }$ of GPU memory. ",
854
+ "bbox": [
855
+ 174,
856
+ 261,
857
+ 825,
858
+ 358
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "4.2 QUANTITATIVE EVALUATION ",
865
+ "text_level": 1,
866
+ "bbox": [
867
+ 176,
868
+ 397,
869
+ 415,
870
+ 411
871
+ ],
872
+ "page_idx": 7
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "We compare our method $\\vec { a }$ -Net) quantitatively with PhiFlow by Holl et al. (2020). Phiflow is a recent, open source, differentiable fluid simulator based on a MAC grid data structure. Furthermore, we provide an ablation study ${ \\vec { v } } .$ -Net) that does not make use of the Helmholtz decomposition but directly works on the velocity field $\\vec { v }$ . ",
877
+ "bbox": [
878
+ 174,
879
+ 431,
880
+ 825,
881
+ 487
882
+ ],
883
+ "page_idx": 7
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "Quantitative comparison of different fluid solvers is challenging, as their performance is highly dependent on factors like the geometry of the domain, fluid parameters such as viscosity or density, flow speed or the timestep of the integrator. As benchmarks for fluid simulations on MAC grids are not yet available, we built a simple toy domain on a $1 0 0 \\mathrm { ~ x ~ } 1 0 0$ grid which simulates a flow around an obstacle within a pipe (more details are provided in appendix E). ",
888
+ "bbox": [
889
+ 174,
890
+ 494,
891
+ 825,
892
+ 564
893
+ ],
894
+ "page_idx": 7
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "First, we compared the computational speed on a CPU and GPU by comparing the integration time-steps per second (see Table 1). The $\\vec { v }$ -Net as well as the $\\vec { a }$ -Net are significantly faster than PhiFlow (11x on CPU and $4 0 \\mathrm { x }$ on GPU) as they do not rely on an iterative conjugate gradient solver but instead use a single forward pass through a convolutional neural network that can be easily parallelized on a GPU. To provide a fair comparison on $L _ { d }$ , we set the velocity field at the boundaries equal to $\\vec { v _ { d } }$ . This enables us to compute $L _ { d }$ for the $\\vec { a }$ -Net architecture on the domain boundaries which would otherwise have zero divergence everywhere. This way, $L _ { d }$ can be interpreted as a metric on how well the orthogonal components of the Dirichlet boundary conditions are met (i.e. no flow leaks through the boundaries). For $d t = 4$ , we outperformed Phiflow by several orders of magnitude. For both, $L _ { d }$ and $L _ { p }$ , the $\\vec { a }$ -Net architecture significantly outperformed the more naive $\\vec { v }$ -Net approach. ",
899
+ "bbox": [
900
+ 174,
901
+ 570,
902
+ 825,
903
+ 724
904
+ ],
905
+ "page_idx": 7
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "Furthermore, we investigated stability by evaluating the evolution of $L _ { p }$ and $L _ { d }$ for the $\\vec { a }$ -Net over time (see Figure 4). As the fluid state is initialized with $a _ { z } = 0$ and $p = 0$ , the $\\vec { a }$ -Net has to perform a cold-start which is the reason for high $L _ { p }$ and $L _ { d }$ during the first circa 70 steps. Afterwards, the $\\vec { a }$ -Net continues an accurate and stable fluid simulation. ",
910
+ "bbox": [
911
+ 174,
912
+ 731,
913
+ 825,
914
+ 786
915
+ ],
916
+ "page_idx": 7
917
+ },
918
+ {
919
+ "type": "table",
920
+ "img_path": "images/57a7fb536fbdf6d2f343d51671835704f414615c5a03a13645e7d8050e19d8bb.jpg",
921
+ "table_caption": [
922
+ "Table 1: Quantitative comparison of timesteps per second (TPS) on CPU / GPU as well as divergence loss and momentum loss for differentiable fluid solvers on a $1 0 0 \\mathrm { x } 1 0 0$ grid for viscosity $\\mu =$ 0.1, density $\\rho = 4$ and timesteps of size $d t = 4$ . "
923
+ ],
924
+ "table_footnote": [],
925
+ "table_body": "<table><tr><td>Method</td><td>CPU[TPS]</td><td>GPU[TPS]</td><td>Ld</td><td>Lp</td></tr><tr><td>PhiFlow</td><td>7</td><td>-</td><td>6.2e-4</td><td>-</td></tr><tr><td>U-Net (ours)</td><td>82</td><td>311</td><td>8.66e-7</td><td>4.87e-5</td></tr><tr><td>α-Net (ours)</td><td>82</td><td>311</td><td>5.44e-7</td><td>1.56e-5</td></tr></table>",
926
+ "bbox": [
927
+ 200,
928
+ 818,
929
+ 537,
930
+ 864
931
+ ],
932
+ "page_idx": 7
933
+ },
934
+ {
935
+ "type": "image",
936
+ "img_path": "images/61d33028f9c357e03bf3a26def07202e3075dc25a8368f4cd3727ad576eaeaf4.jpg",
937
+ "image_caption": [
938
+ "Figure 4: Long term stability of fluid simulations performed by the $\\vec { a }$ -Net "
939
+ ],
940
+ "image_footnote": [],
941
+ "bbox": [
942
+ 589,
943
+ 794,
944
+ 813,
945
+ 890
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "4.3 OPTIMAL CONTROL OF VORTEX SHEDDING FREQUENCY ",
952
+ "text_level": 1,
953
+ "bbox": [
954
+ 173,
955
+ 103,
956
+ 609,
957
+ 117
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "In this section, we present a proof-of-concept experiment that aims at controlling the shedding frequency of a Kármán vortex street behind an obstacle by changing the flow speed (see Figure 5a). To this end, we exploit our previously trained differentiable fluid models. ",
964
+ "bbox": [
965
+ 173,
966
+ 130,
967
+ 825,
968
+ 171
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "image",
974
+ "img_path": "images/12287e6b64712b1dba143620da30b36d8a493efa70292097fa075f8a7596b80d.jpg",
975
+ "image_caption": [],
976
+ "image_footnote": [],
977
+ "bbox": [
978
+ 174,
979
+ 212,
980
+ 352,
981
+ 282
982
+ ],
983
+ "page_idx": 8
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "(a) control setup (domain size: $2 0 0 \\mathrm { x } 1 0 0$ grid cells) ",
988
+ "bbox": [
989
+ 174,
990
+ 309,
991
+ 356,
992
+ 334
993
+ ],
994
+ "page_idx": 8
995
+ },
996
+ {
997
+ "type": "image",
998
+ "img_path": "images/eb7c6bdf57710e1d85311fd4fa94bc4129112926d9bad99da48def5bc5fb1064.jpg",
999
+ "image_caption": [
1000
+ "Figure 5: The frequency of vortex streets can be controlled using our differentiable fluid models. "
1001
+ ],
1002
+ "image_footnote": [],
1003
+ "bbox": [
1004
+ 372,
1005
+ 198,
1006
+ 818,
1007
+ 334
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "First, we measure the y-component of the velocity field $v _ { y } ( t )$ behind an obstacle (see white box in Figure 5a) over 200 time steps. Then, we compute the frequency spectrum $V _ { y } ( f )$ of $v _ { y } ( t )$ using the fast Fourier transform (see Figure 5b). Now, we want to adjust the inflow $/$ outflow boundary conditions in $\\vec { v _ { d } }$ such that $E [ | V _ { y } ( f ) | ^ { 2 } ] = \\hat { f }$ . Here, $\\hat { f }$ is the target frequency. To optimize $\\Vec { v _ { d } }$ , we define a loss function $L = ( E [ | V _ { y } ( f ) | ^ { 2 } ] - \\hat { f } ) ^ { 2 }$ and compute the gradients $\\frac { \\partial L } { \\partial \\vec { v } _ { d } }$ with backpropagation through time. This is possible since all parts of the loss function including the fluid simulation that is performed by our trained neural fluid model as well as the fast Fourier transform are differentiable. Computing the gradients with a standard automatic differentiation library (Pytorch) took 3.5 seconds for all 200 time steps on our $2 0 0 \\mathrm { x } 1 0 0$ domain setup. This is considerably faster than the current state-of-the-art differentiable fluid solver by Takahashi et al. (2021) which takes 5.42 seconds for only 30 time steps on a smaller $1 2 8 \\mathrm { x } 1 2 8$ grid. The update steps of $\\Vec { v _ { d } }$ are done using the ADAMoptimizer and converge after approximately 70 iterations (see Figure 5c). We want to emphasize that differentiable fluid simulations are limited to scenarios with low Reynolds numbers as in the presence of turbulences, chaotic behavior will lead to exploding gradients. ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 375,
1017
+ 825,
1018
+ 577
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "5 DISCUSSION AND OUTLOOK ",
1025
+ "text_level": 1,
1026
+ "bbox": [
1027
+ 176,
1028
+ 597,
1029
+ 441,
1030
+ 612
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "In this work, we present an unsupervised learning scheme for the incompressible Navier-Stokes equations and introduce a fluid model that uses a vector potential to output divergence-free velocity fields. Qualitative results of our trained fluid models are in good accordance with expectations from fluid dynamics for a wide range of Reynolds numbers and generalize to unknown fluid domains. Quantitative assessment showed superior performance in terms of accuracy and speed compared to Phiflow and an ablation study that directly predicts the velocity field. We present a real-time demo and demonstrate how differentiability can be used in a proof-of-concept fluid control scenario. We believe that our fluid models can significantly speed up more sophisticated fluid control pipelines such as described by Holl et al. (2020). ",
1037
+ "bbox": [
1038
+ 173,
1039
+ 627,
1040
+ 825,
1041
+ 753
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "First experiments of extending this approach to 3D deliver encouraging results and are topic of future research. Furthermore, on top of Dirichlet boundary conditions, Neumann boundary conditions and multi-phase domains could be incorporated in future fluid models as well. ",
1048
+ "bbox": [
1049
+ 174,
1050
+ 760,
1051
+ 825,
1052
+ 803
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "REFERENCES ",
1059
+ "text_level": 1,
1060
+ "bbox": [
1061
+ 176,
1062
+ 103,
1063
+ 285,
1064
+ 117
1065
+ ],
1066
+ "page_idx": 9
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Nicholas Geneva and Nicholas Zabaras. Quantifying model form uncertainty in reynolds-averaged turbulence models with bayesian deep neural networks. Journal of Computational Physics, 383: 125 – 147, 2019. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2019.01.021. URL http: //www.sciencedirect.com/science/article/pii/S0021999119300464. ",
1071
+ "bbox": [
1072
+ 174,
1073
+ 126,
1074
+ 825,
1075
+ 183
1076
+ ],
1077
+ "page_idx": 9
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Nicholas Geneva and Nicholas Zabaras. Modeling the dynamics of pde systems with physicsconstrained deep auto-regressive networks. Journal of Computational Physics, 403:109056, 2020. ",
1082
+ "bbox": [
1083
+ 171,
1084
+ 191,
1085
+ 823,
1086
+ 220
1087
+ ],
1088
+ "page_idx": 9
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Robert A. Gingold and Joseph J. Monaghan. Smoothed particle hydrodynamics: theory and application to non-spherical stars. Monthly notices of the royal astronomical society, 181(3): 375–389, 1977. ",
1093
+ "bbox": [
1094
+ 173,
1095
+ 229,
1096
+ 823,
1097
+ 272
1098
+ ],
1099
+ "page_idx": 9
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Philipp Grohs, Fabian Hornung, Arnulf Jentzen, and Philippe Von Wurstemberger. A proof that artificial neural networks overcome the curse of dimensionality in the numerical approximation of black-scholes partial differential equations. arXiv preprint arXiv:1809.02362, 2018. ",
1104
+ "bbox": [
1105
+ 173,
1106
+ 282,
1107
+ 826,
1108
+ 325
1109
+ ],
1110
+ "page_idx": 9
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Francis H. Harlow and J. Eddie Welch. Numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. The physics of fluids, 8(12):2182–2189, 1965. ",
1115
+ "bbox": [
1116
+ 173,
1117
+ 334,
1118
+ 820,
1119
+ 364
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Philipp Holl, Vladlen Koltun, and Nils Thuerey. Learning to control pdes with differentiable physics. ICLR, 2020. ",
1126
+ "bbox": [
1127
+ 174,
1128
+ 372,
1129
+ 821,
1130
+ 401
1131
+ ],
1132
+ "page_idx": 9
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Yuehaw Khoo, Jianfeng Lu, and Lexing Ying. Solving for high-dimensional committor functions using artificial neural networks. Research in the Mathematical Sciences, 6(1):1, 2019. ",
1137
+ "bbox": [
1138
+ 173,
1139
+ 411,
1140
+ 823,
1141
+ 440
1142
+ ],
1143
+ "page_idx": 9
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Byungsoo Kim, Vinicius C. Azevedo, Nils Thuerey, Theodore Kim, Markus Gross, and Barbara Solenthaler. Deep fluids: A generative network for parameterized fluid simulations. In Computer Graphics Forum, volume 38, pp. 59–70. Wiley Online Library, 2019. ",
1148
+ "bbox": [
1149
+ 173,
1150
+ 449,
1151
+ 826,
1152
+ 492
1153
+ ],
1154
+ "page_idx": 9
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Junhyuk Kim and Changhoon Lee. Deep unsupervised learning of turbulence for inflow generation at various reynolds numbers. Journal of Computational Physics, 406:109216, 2020. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2019.109216. URL http://www.sciencedirect. com/science/article/pii/S0021999119309210. ",
1159
+ "bbox": [
1160
+ 173,
1161
+ 502,
1162
+ 825,
1163
+ 559
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. ",
1170
+ "bbox": [
1171
+ 176,
1172
+ 568,
1173
+ 823,
1174
+ 611
1175
+ ],
1176
+ "page_idx": 9
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "L’ubor Ladický, SoHyeon Jeong, Barbara Solenthaler, Marc Pollefeys, and Markus Gross. Datadriven fluid simulations using regression forests. ACM Trans. Graph., 34(6), October 2015. ISSN 0730-0301. doi: 10.1145/2816795.2818129. URL https://doi.org/10.1145/ 2816795.2818129. ",
1181
+ "bbox": [
1182
+ 173,
1183
+ 619,
1184
+ 825,
1185
+ 676
1186
+ ],
1187
+ "page_idx": 9
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Yunzhu Li, Jiajun Wu, Russ Tedrake, Joshua B Tenenbaum, and Antonio Torralba. Learning particle dynamics for manipulating rigid bodies, deformable objects, and fluids. In ICLR, 2019. ",
1192
+ "bbox": [
1193
+ 173,
1194
+ 686,
1195
+ 823,
1196
+ 715
1197
+ ],
1198
+ "page_idx": 9
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Julia Ling, Andrew Kurzawski, and Jeremy Templeton. Reynolds averaged turbulence modelling using deep neural networks with embedded invariance. Journal of Fluid Mechanics, 807:155– 166, 2016. ",
1203
+ "bbox": [
1204
+ 173,
1205
+ 724,
1206
+ 825,
1207
+ 767
1208
+ ],
1209
+ "page_idx": 9
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Arvind T. Mohan, Nicholas Lubbers, Daniel Livescu, and Michael Chertkov. Embedding hard physical constraints in neural network coarse-graining of 3d turbulence, 2020. ",
1214
+ "bbox": [
1215
+ 169,
1216
+ 776,
1217
+ 823,
1218
+ 806
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "Damian Mrowca, Chengxu Zhuang, Elias Wang, Nick Haber, Li Fei-Fei, Joshua B. Tenenbaum, and Daniel L. K. Yamins. Flexible neural representation for physics prediction. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS’18, pp. 8813–8824, Red Hook, NY, USA, 2018. Curran Associates Inc. ",
1225
+ "bbox": [
1226
+ 174,
1227
+ 814,
1228
+ 825,
1229
+ 872
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Maziar Raissi, Alireza Yazdani, and George Em Karniadakis. Hidden fluid mechanics: A navierstokes informed deep learning framework for assimilating flow visualization data. arXiv preprint arXiv:1808.04327, 2018. ",
1236
+ "bbox": [
1237
+ 174,
1238
+ 882,
1239
+ 823,
1240
+ 924
1241
+ ],
1242
+ "page_idx": 9
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Maziar Raissi, P. Perdikaris, and George Em Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378:686 – 707, 2019. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2018.10.045. URL http://www.sciencedirect. com/science/article/pii/S0021999118307125. ",
1247
+ "bbox": [
1248
+ 173,
1249
+ 103,
1250
+ 825,
1251
+ 174
1252
+ ],
1253
+ "page_idx": 10
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pp. 234–241. Springer, 2015. ",
1258
+ "bbox": [
1259
+ 176,
1260
+ 180,
1261
+ 823,
1262
+ 223
1263
+ ],
1264
+ "page_idx": 10
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Connor Schenck and Dieter Fox. Spnets: Differentiable fluid dynamics for deep neural networks. In Conference on Robot Learning, pp. 317–335, 2018. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 229,
1272
+ 823,
1273
+ 258
1274
+ ],
1275
+ "page_idx": 10
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Markus Schöberl, Nicholas Zabaras, and Phaedon-Stelios Koutsourelakis. Predictive collective variable discovery with deep bayesian models. The Journal of Chemical Physics, 150(2):024109, 2019. doi: 10.1063/1.5058063. URL https://doi.org/10.1063/1.5058063. ",
1280
+ "bbox": [
1281
+ 174,
1282
+ 265,
1283
+ 823,
1284
+ 308
1285
+ ],
1286
+ "page_idx": 10
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "Justin Sirignano and Konstantinos Spiliopoulos. Dgm: A deep learning algorithm for solving partial differential equations. Journal of Computational Physics, 375:1339 – 1364, 2018. ISSN 0021- 9991. doi: https://doi.org/10.1016/j.jcp.2018.08.029. URL http://www.sciencedirect. com/science/article/pii/S0021999118305527. ",
1291
+ "bbox": [
1292
+ 173,
1293
+ 314,
1294
+ 825,
1295
+ 371
1296
+ ],
1297
+ "page_idx": 10
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Jos Stam. Stable fluids. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pp. 121–128, 1999. ",
1302
+ "bbox": [
1303
+ 171,
1304
+ 376,
1305
+ 823,
1306
+ 405
1307
+ ],
1308
+ "page_idx": 10
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Tetsuya Takahashi, Junbang Liang, Yi-Ling Qiao, and Ming C Lin. Differentiable fluids with solid coupling for learning and control. 2021. ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 411,
1316
+ 825,
1317
+ 440
1318
+ ],
1319
+ "page_idx": 10
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Nils Thuerey, Konstantin Weißenow, Lukas Prantl, and Xiangyu Hu. Deep learning methods for reynolds-averaged navier–stokes simulations of airfoil flows. AIAA Journal, pp. 1–12, 2019. ",
1324
+ "bbox": [
1325
+ 173,
1326
+ 446,
1327
+ 823,
1328
+ 477
1329
+ ],
1330
+ "page_idx": 10
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Jonathan Tompson, Kristofer Schlachter, Pablo Sprechmann, and Ken Perlin. Accelerating eulerian fluid simulation with convolutional networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3424–3433. JMLR. org, 2017. ",
1335
+ "bbox": [
1336
+ 173,
1337
+ 482,
1338
+ 823,
1339
+ 526
1340
+ ],
1341
+ "page_idx": 10
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Rohit K. Tripathy and Ilias Bilionis. Deep uq: Learning deep neural network surrogate models for high dimensional uncertainty quantification. Journal of Computational Physics, 375:565 – 588, 2018. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2018.08.036. URL http://www. sciencedirect.com/science/article/pii/S0021999118305655. ",
1346
+ "bbox": [
1347
+ 174,
1348
+ 531,
1349
+ 825,
1350
+ 588
1351
+ ],
1352
+ "page_idx": 10
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Kiwon Um, Raymond Fei, Philipp Holl, Robert Brand, and Nils Thuerey. Solver-in-the-loop: Learning from differentiable physics to interact with iterative pde-solvers, 2020. ",
1357
+ "bbox": [
1358
+ 176,
1359
+ 594,
1360
+ 820,
1361
+ 623
1362
+ ],
1363
+ "page_idx": 10
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Benjamin Ummenhofer, Lukas Prantl, Nils Thuerey, and Vladlen Koltun. Lagrangian fluid simulation with continuous convolutions. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id $=$ B1lDoJSYDH. ",
1368
+ "bbox": [
1369
+ 174,
1370
+ 630,
1371
+ 825,
1372
+ 686
1373
+ ],
1374
+ "page_idx": 10
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "You Xie, Erik Franz, Mengyu Chu, and Nils Thuerey. Tempogan: A temporally coherent, volumetric gan for super-resolution fluid flow. ACM Trans. Graph., 37(4), July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201304. URL https://doi.org/10.1145/3197517.3201304. ",
1379
+ "bbox": [
1380
+ 176,
1381
+ 693,
1382
+ 823,
1383
+ 736
1384
+ ],
1385
+ "page_idx": 10
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Cheng Yang, Xubo Yang, and Xiangyun Xiao. Data-driven projection method in fluid simulation. Computer Animation and Virtual Worlds, 27(3-4):415–424, 2016. doi: 10.1002/cav.1695. URL https://onlinelibrary.wiley.com/doi/abs/10.1002/cav.1695. ",
1390
+ "bbox": [
1391
+ 179,
1392
+ 741,
1393
+ 823,
1394
+ 785
1395
+ ],
1396
+ "page_idx": 10
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "Yinhao Zhu and Nicholas Zabaras. Bayesian deep convolutional encoder–decoder networks for surrogate modeling and uncertainty quantification. Journal of Computational Physics, 366:415 – 447, 2018. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2018.04.018. URL http: //www.sciencedirect.com/science/article/pii/S0021999118302341. ",
1401
+ "bbox": [
1402
+ 176,
1403
+ 790,
1404
+ 825,
1405
+ 847
1406
+ ],
1407
+ "page_idx": 10
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Yinhao Zhu, Nicholas Zabaras, Phaedon-Stelios Koutsourelakis, and Paris Perdikaris. Physicsconstrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data. Journal of Computational Physics, 394:56 – 81, 2019. ISSN 0021-9991. doi: https://doi.org/10.1016/j.jcp.2019.05.024. URL http://www.sciencedirect.com/ science/article/pii/S0021999119303559. ",
1412
+ "bbox": [
1413
+ 176,
1414
+ 854,
1415
+ 825,
1416
+ 924
1417
+ ],
1418
+ "page_idx": 10
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "A PHYSICS-CONSTRAINED LOSS ON A MAC GRID",
1423
+ "text_level": 1,
1424
+ "bbox": [
1425
+ 173,
1426
+ 101,
1427
+ 612,
1428
+ 118
1429
+ ],
1430
+ "page_idx": 11
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "As mentioned in Section 3.3 of the paper, our method relies on a staggered marker-and-cell grid representation for the vector potential as well as the velocity and pressure fields. In the following, we provide further details on how to apply this representation to learn incompressible fluid dynamics. ",
1435
+ "bbox": [
1436
+ 174,
1437
+ 133,
1438
+ 826,
1439
+ 176
1440
+ ],
1441
+ "page_idx": 11
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "To calculate the velocity field $\\vec { v } = \\nabla \\times \\vec { a }$ of a vector potential $\\vec { a }$ on a MAC grid in 2D, we have to compute the curl as follows: ",
1446
+ "bbox": [
1447
+ 174,
1448
+ 181,
1449
+ 823,
1450
+ 210
1451
+ ],
1452
+ "page_idx": 11
1453
+ },
1454
+ {
1455
+ "type": "equation",
1456
+ "img_path": "images/7b765b97ec27f39cb3ef2684b813a64e2db36d5b197645326fd190e5a3cb7cb1.jpg",
1457
+ "text": "$$\n\\begin{array} { r } { ( v _ { x } ) _ { i , j } = ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i , j } } \\\\ { ( v _ { y } ) _ { i , j } = ( a _ { z } ) _ { i , j } - ( a _ { z } ) _ { i , j + 1 } } \\end{array}\n$$",
1458
+ "text_format": "latex",
1459
+ "bbox": [
1460
+ 400,
1461
+ 217,
1462
+ 596,
1463
+ 256
1464
+ ],
1465
+ "page_idx": 11
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "If this vector potential is inserted into the divergence operator on a MAC grid, we can show that $\\nabla \\cdot \\vec { v } _ { i , j } = 0$ is indeed fulfilled: ",
1470
+ "bbox": [
1471
+ 173,
1472
+ 265,
1473
+ 823,
1474
+ 295
1475
+ ],
1476
+ "page_idx": 11
1477
+ },
1478
+ {
1479
+ "type": "equation",
1480
+ "img_path": "images/27299d46665b7ad835bedbb79eebe13b79a69c1071708847f8a81582ba0fedd0.jpg",
1481
+ "text": "$$\n\\begin{array} { r l } & { \\nabla \\cdot \\vec { v } _ { i , j } = ( { v } _ { x } ) _ { i , j + 1 } - ( { v } _ { x } ) _ { i , j } + ( { v } _ { y } ) _ { i + 1 , j } - ( { v } _ { y } ) _ { i , j } } \\\\ & { \\qquad = \\begin{array} { r l } & { ( ( a _ { z } ) _ { i + 1 , j + 1 } - ( a _ { z } ) _ { i , j + 1 } ) - ( ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i , j } ) } \\\\ & { \\qquad + \\left( ( a _ { z } ) _ { i + 1 , j } - ( a _ { z } ) _ { i + 1 , j + 1 } \\right) - ( ( a _ { z } ) _ { i , j } - ( a _ { z } ) _ { i , j + 1 } ) } \\\\ & { \\qquad = 0 } \\end{array} } \\end{array}\n$$",
1482
+ "text_format": "latex",
1483
+ "bbox": [
1484
+ 290,
1485
+ 299,
1486
+ 705,
1487
+ 376
1488
+ ],
1489
+ "page_idx": 11
1490
+ },
1491
+ {
1492
+ "type": "text",
1493
+ "text": "Thus, for the $\\vec { a }$ -Net, the incompressibility equation is automatically fulfilled and no further training on the divergence loss $L _ { d }$ is required. However, for the $\\vec { v }$ -Net, the residuals of the divergence are still of importance: ",
1494
+ "bbox": [
1495
+ 174,
1496
+ 388,
1497
+ 821,
1498
+ 430
1499
+ ],
1500
+ "page_idx": 11
1501
+ },
1502
+ {
1503
+ "type": "equation",
1504
+ "img_path": "images/85aebe665a6f8b22e1f6ab2835d641bc59f4f38e34b69dba8879592f1bae0fbc.jpg",
1505
+ "text": "$$\n( R _ { d } ) _ { i , j } ^ { t + d t } = \\nabla \\cdot \\vec { v } _ { i , j } ^ { t + d t } ( = 0 \\mathrm { f o r } \\vec { a } \\ – \\mathrm { N e t } )\n$$",
1506
+ "text_format": "latex",
1507
+ "bbox": [
1508
+ 374,
1509
+ 429,
1510
+ 624,
1511
+ 450
1512
+ ],
1513
+ "page_idx": 11
1514
+ },
1515
+ {
1516
+ "type": "text",
1517
+ "text": "The residuals of the momentum equation in $x$ -direction can be computed as follows: ",
1518
+ "bbox": [
1519
+ 173,
1520
+ 458,
1521
+ 727,
1522
+ 473
1523
+ ],
1524
+ "page_idx": 11
1525
+ },
1526
+ {
1527
+ "type": "equation",
1528
+ "img_path": "images/977088132e08193c468d875d3a44cd8ec98d7341e179d84247d2de5b4fc0cd44.jpg",
1529
+ "text": "$$\n\\begin{array} { r l } & { { R _ { p _ { x } } } ) _ { i , j } ^ { t + d t } = \\rho ( \\frac { ( v _ { x } ) _ { i , j } ^ { t + d t } - ( v _ { x } ) _ { i , j } ^ { t } } { d t } + ( v _ { x } ) _ { i , j } ^ { t ^ { \\prime } } \\cdot \\frac { ( v _ { x } ) _ { i , j + 1 } ^ { t ^ { \\prime } } - ( v _ { x } ) _ { i , j - 1 } ^ { t ^ { \\prime } } } { 2 } } \\\\ & { \\qquad + \\frac { \\frac { ( v _ { y } ) _ { i , j - 1 } ^ { t ^ { \\prime } } + ( v _ { y } ) _ { i , j } ^ { t ^ { \\prime } } } { 2 } \\cdot ( ( v _ { x } ) _ { i , j } ^ { t ^ { \\prime } } - ( v _ { x } ) _ { i - 1 , j } ^ { t ^ { \\prime } } ) + \\frac { ( v _ { y } ) _ { i + 1 , j - 1 } ^ { t ^ { \\prime } } + ( v _ { y } ) _ { i + 1 , j } ^ { t ^ { \\prime } } } { 2 } \\cdot ( ( v _ { x } ) _ { i + 1 , j } ^ { t ^ { \\prime } } - ( v _ { x } ) _ { i , j } ^ { t ^ { \\prime } } } { ( \\frac { 1 } { 2 } } } \\\\ & { \\qquad + ( p _ { i , j } ^ { t + d t } - p _ { i , j - 1 } ^ { t + d t } ) - \\mu \\cdot \\Delta ( v _ { x } ) _ { i , j } ^ { t ^ { \\prime } } } \\end{array}\n$$",
1530
+ "text_format": "latex",
1531
+ "bbox": [
1532
+ 181,
1533
+ 478,
1534
+ 839,
1535
+ 607
1536
+ ],
1537
+ "page_idx": 11
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "Here, we use the following isotropic Laplace operator: ",
1542
+ "bbox": [
1543
+ 174,
1544
+ 631,
1545
+ 531,
1546
+ 646
1547
+ ],
1548
+ "page_idx": 11
1549
+ },
1550
+ {
1551
+ "type": "equation",
1552
+ "img_path": "images/c608899301ad0536233808bab885c3579407cbae54d8bc518e7a673af9e5a84c.jpg",
1553
+ "text": "$$\n\\begin{array} { c } { \\Delta s _ { i , j } = \\displaystyle \\frac { 1 } { 4 } ( 1 * s _ { i - 1 , j - 1 } + 2 * s _ { i - 1 , j } + 1 * s _ { i - 1 , j + 1 } } \\\\ { + 2 * s _ { i , j - 1 } - 1 2 * s _ { i , j } + 2 * s _ { i , j + 1 } } \\\\ { + 1 * s _ { i + 1 , j - 1 } + 2 * s _ { i + 1 , j } + 1 * s _ { i + 1 , j + 1 } ) } \\end{array}\n$$",
1554
+ "text_format": "latex",
1555
+ "bbox": [
1556
+ 323,
1557
+ 651,
1558
+ 673,
1559
+ 719
1560
+ ],
1561
+ "page_idx": 11
1562
+ },
1563
+ {
1564
+ "type": "text",
1565
+ "text": "The derivation of the advection term for $R _ { p _ { x } }$ is a bit more complex since on a MAC grid, $v _ { x }$ and $v _ { y }$ are displaced by half a pixel in $x$ -direction and $y$ -direction. To obtain the residuals of the momentum equation in $y$ -direction, $( R _ { p _ { y } } ) _ { i , j }$ , one has to take $( R _ { p _ { x } } ) _ { i , j }$ and swap $x$ and $y$ and the indices respectively. ",
1566
+ "bbox": [
1567
+ 173,
1568
+ 729,
1569
+ 825,
1570
+ 787
1571
+ ],
1572
+ "page_idx": 11
1573
+ },
1574
+ {
1575
+ "type": "text",
1576
+ "text": "Now, the discretized loss terms can be written as follows: ",
1577
+ "bbox": [
1578
+ 174,
1579
+ 792,
1580
+ 550,
1581
+ 809
1582
+ ],
1583
+ "page_idx": 11
1584
+ },
1585
+ {
1586
+ "type": "equation",
1587
+ "img_path": "images/c8b5a55ade2b30eea738910d0f4694d8eddab4a5166c7cb6fcb34248edd17ffd.jpg",
1588
+ "text": "$$\n\\begin{array} { l } { { { \\cal L } _ { d } ^ { t + d t } = \\displaystyle \\sum _ { i , j } \\Omega _ { i , j } ^ { t + d t } ( ( R _ { d } ) _ { i , j } ^ { t + d t } ) ^ { 2 } } } \\\\ { { { \\cal L } _ { p } ^ { t + d t } = \\displaystyle \\sum _ { i , j } \\Omega _ { i , j } ^ { t + d t } \\left( ( ( R _ { p _ { x } } ) _ { i , j } ^ { t + d t } ) ^ { 2 } + ( ( R _ { p _ { y } } ) _ { i , j } ^ { t + d t } ) ^ { 2 } \\right) } } \\\\ { { { \\cal L } _ { b } ^ { t + d t } = \\displaystyle \\sum _ { i , j } \\partial \\Omega _ { i , j } ^ { t + d t } \\left. \\vec { v } _ { d } ^ { t + d t } - \\vec { v } ^ { t + d t } \\right. ^ { 2 } } } \\end{array}\n$$",
1589
+ "text_format": "latex",
1590
+ "bbox": [
1591
+ 326,
1592
+ 814,
1593
+ 669,
1594
+ 922
1595
+ ],
1596
+ "page_idx": 11
1597
+ },
1598
+ {
1599
+ "type": "text",
1600
+ "text": "Note, that all mentioned operations can be efficiently implemented with convolutions. To obtain the final velocities on a square grid, we project the velocity fields of the MAC grid back onto the $\\vec { a }$ -grid using linear interpolation: ",
1601
+ "bbox": [
1602
+ 176,
1603
+ 103,
1604
+ 823,
1605
+ 145
1606
+ ],
1607
+ "page_idx": 12
1608
+ },
1609
+ {
1610
+ "type": "equation",
1611
+ "img_path": "images/1eae517d940c36f0f181a8d541f42793760b25bacaefcf7eab28e5622a99d324.jpg",
1612
+ "text": "$$\n\\vec { v } = \\frac { 1 } { 2 } \\left( { ( v _ { x } ) _ { i - 1 , j } } + { ( v _ { x } ) _ { i , j } } \\right)\n$$",
1613
+ "text_format": "latex",
1614
+ "bbox": [
1615
+ 400,
1616
+ 146,
1617
+ 598,
1618
+ 181
1619
+ ],
1620
+ "page_idx": 12
1621
+ },
1622
+ {
1623
+ "type": "text",
1624
+ "text": "B NETWORK ARCHITECTURE ",
1625
+ "text_level": 1,
1626
+ "bbox": [
1627
+ 176,
1628
+ 199,
1629
+ 431,
1630
+ 215
1631
+ ],
1632
+ "page_idx": 12
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "Our fluid model is based on the U-Net architecture (Ronneberger et al. (2015)) with fewer channels (see Figure 6). As the pressure field and vector potential can have an arbitrary offset, we always normalize the mean of the pressure $( \\Delta p )$ and vector potential $( \\Delta a _ { z } )$ to 0 to keep these fields welldefined and prevent drifting offset values. ",
1637
+ "bbox": [
1638
+ 174,
1639
+ 232,
1640
+ 825,
1641
+ 287
1642
+ ],
1643
+ "page_idx": 12
1644
+ },
1645
+ {
1646
+ "type": "image",
1647
+ "img_path": "images/a1472214f77f3cafefb7b390de489bc06eea4b6ab22438d1c71d7d3ffc0cd1ea.jpg",
1648
+ "image_caption": [
1649
+ "Figure 6: U-Net architecture with fewer channels. "
1650
+ ],
1651
+ "image_footnote": [],
1652
+ "bbox": [
1653
+ 258,
1654
+ 301,
1655
+ 738,
1656
+ 501
1657
+ ],
1658
+ "page_idx": 12
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "C EXAMPLES OF TRAINING DOMAINS ",
1663
+ "text_level": 1,
1664
+ "bbox": [
1665
+ 174,
1666
+ 556,
1667
+ 508,
1668
+ 573
1669
+ ],
1670
+ "page_idx": 12
1671
+ },
1672
+ {
1673
+ "type": "text",
1674
+ "text": "The domains we used for training consist of $1 0 0 \\times 3 0 0$ grids. We used 3 different randomized domains as exemplary depicted in Figure 7. First, we have boxes with randomized height and width that float on randomized paths inspired by Brownian motion in a pipe with randomized flow speed. Second, we have the same setup but replaced the boxes by cylinders with randomized radii and angular velocities in order to learn the Magnus effect. Finally, we have a folded pipe system with randomized flow speed, that is randomly flipped along the $x$ -axis. ",
1675
+ "bbox": [
1676
+ 173,
1677
+ 589,
1678
+ 825,
1679
+ 674
1680
+ ],
1681
+ "page_idx": 12
1682
+ },
1683
+ {
1684
+ "type": "text",
1685
+ "text": "D FURTHER EXAMPLES OF GENERALIZATION ",
1686
+ "text_level": 1,
1687
+ "bbox": [
1688
+ 173,
1689
+ 695,
1690
+ 570,
1691
+ 712
1692
+ ],
1693
+ "page_idx": 12
1694
+ },
1695
+ {
1696
+ "type": "text",
1697
+ "text": "Note that the network was only trained on simple domain geometries as presented in appendix C. Still, as can be seen in Figure 8, the network is capable of generalizing to far more complicated domain geometries (e.g. shark, car). Figure 8c shows that it can generalize to multiple objects in the scene, although the training set contained at most one object per scene. And Figure 8d shows that we can alter the outer boundary conditions as well. For real-time simulations, please have a look at our source code and the supplementary video. ",
1698
+ "bbox": [
1699
+ 174,
1700
+ 728,
1701
+ 825,
1702
+ 813
1703
+ ],
1704
+ "page_idx": 12
1705
+ },
1706
+ {
1707
+ "type": "text",
1708
+ "text": "E QUANTITATIVE ANALYSIS: THE BENCHMARK PROBLEM ",
1709
+ "text_level": 1,
1710
+ "bbox": [
1711
+ 174,
1712
+ 834,
1713
+ 673,
1714
+ 852
1715
+ ],
1716
+ "page_idx": 12
1717
+ },
1718
+ {
1719
+ "type": "text",
1720
+ "text": "Figure 9 shows the domain $\\Omega$ and $v _ { d }$ on a $1 0 0 \\times 1 0 0$ grid which was used as the benchmark problem for quantitative analysis. The flow speed for the inlet and outlet was set to 0.5. The timestep of the integrator was set to $d t = 4$ and the viscosity and fluid density were set to $\\mu = 0 . 1$ and $\\rho = 4$ respectively. ",
1721
+ "bbox": [
1722
+ 173,
1723
+ 867,
1724
+ 825,
1725
+ 924
1726
+ ],
1727
+ "page_idx": 12
1728
+ },
1729
+ {
1730
+ "type": "image",
1731
+ "img_path": "images/0679b34b9e40dd6fbcd896e5dfe9d2350e866f3fa97de7241da416b4cf20acb7.jpg",
1732
+ "image_caption": [
1733
+ "Figure 7: The left column shows $\\Omega$ (in white) / $\\partial \\Omega$ (in black) and the right column shows $\\vec { v _ { d } }$ for three examples of training domains. (Colors indicate the direction and magnitude of $\\vec { v _ { d } }$ as depicted in Figure 9a) "
1734
+ ],
1735
+ "image_footnote": [],
1736
+ "bbox": [
1737
+ 254,
1738
+ 112,
1739
+ 736,
1740
+ 376
1741
+ ],
1742
+ "page_idx": 13
1743
+ },
1744
+ {
1745
+ "type": "image",
1746
+ "img_path": "images/96b4681cd4da05c85f6888b7d4f74625dfc620d8aa2ce10458c046f72e55cfd8.jpg",
1747
+ "image_caption": [
1748
+ "Figure 8: Our models generalize to various domain geometries, although being trained only on simple shapes (see Figure 7) "
1749
+ ],
1750
+ "image_footnote": [],
1751
+ "bbox": [
1752
+ 209,
1753
+ 444,
1754
+ 790,
1755
+ 650
1756
+ ],
1757
+ "page_idx": 13
1758
+ },
1759
+ {
1760
+ "type": "text",
1761
+ "text": "F QUALITATIVE COMPARISON OF $\\vec { a }$ -NET AND $\\vec { v }$ -NET ",
1762
+ "text_level": 1,
1763
+ "bbox": [
1764
+ 176,
1765
+ 713,
1766
+ 625,
1767
+ 729
1768
+ ],
1769
+ "page_idx": 13
1770
+ },
1771
+ {
1772
+ "type": "text",
1773
+ "text": "We give a qualitative example to show the benefits of using a vector potential. Figure 10 demonstrates that the $\\vec { a }$ -Net finds plausible solutions for a folded pipe domain while the $\\vec { v }$ -Net looses most of the flow in the center of the domain. This is in good accordance with quantitative results shown in section 1. The folded pipe domain is particularly difficult to learn as the flow field contains long range dependencies to the inlet and outlet (as shown in the bottom row in Figure 7). ",
1774
+ "bbox": [
1775
+ 174,
1776
+ 746,
1777
+ 825,
1778
+ 815
1779
+ ],
1780
+ "page_idx": 13
1781
+ },
1782
+ {
1783
+ "type": "text",
1784
+ "text": "G TRAINING WITHOUT RESETTING ENVIRONMENTS ",
1785
+ "text_level": 1,
1786
+ "bbox": [
1787
+ 174,
1788
+ 837,
1789
+ 619,
1790
+ 852
1791
+ ],
1792
+ "page_idx": 13
1793
+ },
1794
+ {
1795
+ "type": "text",
1796
+ "text": "We performed an ablation study to investigate what happens if we do not reset old environments from time to time and, thus, do not continuously present the fluid model with cold starts during training. Figure 11 shows that in this case, large error spikes appear in the validation curve. These error spikes appear since the model has troubles to perform a cold start as can be seen in Figure 11b: compared to a properly trained model (see Figure 4) the model takes longer to perform a cold start (ca 100 steps) and converges to a solution with high $L _ { p }$ - and $L _ { d } .$ - losses. By resetting the environments from time to time during training, we can prevent these error spikes as shown in Figure 11c. ",
1797
+ "bbox": [
1798
+ 174,
1799
+ 867,
1800
+ 825,
1801
+ 924
1802
+ ],
1803
+ "page_idx": 13
1804
+ },
1805
+ {
1806
+ "type": "image",
1807
+ "img_path": "images/7ef32d47da39bc6f2709e48b8263109e11b93a309f24cdd7e9700f02552db9ad.jpg",
1808
+ "image_caption": [
1809
+ "Figure 9: a) shows legend for $\\scriptstyle { \\vec { v _ { d } } }$ ; b) shows $\\Omega$ (in white) $/ \\partial \\Omega$ (in black) for the benchmark problem; c) shows $\\vec { v _ { d } }$ for the benchmark problem. (Colors indicate the direction of $\\vec { v _ { d } }$ as depicted in a) "
1810
+ ],
1811
+ "image_footnote": [],
1812
+ "bbox": [
1813
+ 302,
1814
+ 112,
1815
+ 691,
1816
+ 242
1817
+ ],
1818
+ "page_idx": 14
1819
+ },
1820
+ {
1821
+ "type": "image",
1822
+ "img_path": "images/c6c35a94812aee60c202ac85d9e3bb29901144c51d0e016529668a2acd428f16.jpg",
1823
+ "image_caption": [
1824
+ "Figure 10: Qualitative comparison of $\\vec { a }$ -Net and $\\vec { v }$ -Net in a folded pipe domain "
1825
+ ],
1826
+ "image_footnote": [],
1827
+ "bbox": [
1828
+ 181,
1829
+ 309,
1830
+ 813,
1831
+ 411
1832
+ ],
1833
+ "page_idx": 14
1834
+ },
1835
+ {
1836
+ "type": "text",
1837
+ "text": "",
1838
+ "bbox": [
1839
+ 173,
1840
+ 463,
1841
+ 825,
1842
+ 506
1843
+ ],
1844
+ "page_idx": 14
1845
+ },
1846
+ {
1847
+ "type": "image",
1848
+ "img_path": "images/e9613f5f266dea5d70e2be191186fc22a58c75552972d2b5b6f43b06f8bbc705.jpg",
1849
+ "image_caption": [
1850
+ "Figure 11: a) ablation study without resetting environments: validation curve shows large error spikes during training; b) error spike: the fluid model takes longer to perform a cold start and converges to a solution with high losses; c) original training with resetting environments: validation curve is stable "
1851
+ ],
1852
+ "image_footnote": [],
1853
+ "bbox": [
1854
+ 176,
1855
+ 532,
1856
+ 818,
1857
+ 669
1858
+ ],
1859
+ "page_idx": 14
1860
+ }
1861
+ ]
parse/train/KUDUoRsEphu/KUDUoRsEphu_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/KUDUoRsEphu/KUDUoRsEphu_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklcyJBtvB/SklcyJBtvB.md ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OFF-POLICY BANDITS WITH DEFICIENT SUPPORT
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Off-policy training of contextual-bandit policies is attractive in online systems (e.g. search, recommendation, ad placement), since it enables the reuse of large amounts of log data. State-of-the-art methods for off-policy learning, however, are based on inverse propensity score (IPS) weighting, which requires that the logging policy chooses all actions with non-zero probability for any context (i.e., full support). In real-world systems, this condition is often violated, and we show that existing off-policy learning methods based on IPS weighting can fail catastrophically. We therefore develop new off-policy contextual-bandit methods that can controllably and robustly learn even when the logging policy has deficient support. To this effect, we explore three approaches that provide various guarantees for safe learning despite the inherent limitations of support deficient data: restricting the action space, reward extrapolation, and restricting the policy space. We analyze the statistical and computational properties of these three approaches, and empirically evaluate their effectiveness in a series of experiments. We find that controlling the policy space is both computationally efficient and that it robustly leads to accurate policies.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Many interactive systems (e.g., voice assistants, recommender systems, ad placement) can be modeled as contextual bandit problems (Langford & Zhang, 2008). In particular, each user request provides a context (e.g., user profile, query) for which the system selects an action (e.g., recommended product, presented ad) and receives a reward (e.g., purchase, click). Such contextual-bandit data is logged in large quantities as a by-product of normal system operation (Li et al., 2011; 2015; Joachims et al., 2017), making it an attractive and low-cost source of training data. With terabytes of such log data readily available in many online systems, a range of algorithms have been proposed for batch learning from such logged contextual-bandit feedback (Strehl et al., 2011; Dud´ık et al., 2011; Swaminathan & Joachims, 2015a; Thomas & Brunskill, 2016; Farajtabar et al., 2018; Su et al., 2019; London & Sandler, 2019). However, as we will argue below, these algorithms require an assumption about the log data that makes them unsuitable for many real-world applications.
12
+
13
+ This assumption is typically referred to as the positivity or support assumption, and it is required by the Empirical Risk Minimization (ERM) objective that these algorithms optimize. Specifically, unlike in online learning for contextual bandits (Williams, 1992; Agarwal et al., 2014), batch learning from bandit feedback (BLBF) operates in the off-policy setting. During off-policy learning, the algorithm has to address the counterfactual question of how much reward each policy in the policy space would have received, if it had been used instead of the logging policy. To this effect, virtually all state-of-the-art off-policy learning methods for contextual-bandit problems rely on counterfactual estimators (Bottou et al., 2013; Dud´ık et al., 2011; Swaminathan & Joachims, 2015a; Thomas & Brunskill, 2016; Farajtabar et al., 2018; Su et al., 2019) that employ inverse propensity score (IPS) weighting to get an unbiased ERM objective. Unlike regression-based direct-modeling (DM) approaches that are often hampered by bias from model-misspecification, IPS allows a controllable bias-variance trade-off through clipping and other variance-regularization techniques (Strehl et al., 2011; Swaminathan & Joachims, 2015a; London & Sandler, 2019).
14
+
15
+ Unfortunately, IPS and its variance-control mechanisms break down when the logging policy does not have full support – meaning that some actions have zero probability of being selected under the logging policy. In this case IPS can be highly biased. Full support is an unreasonable assumption in many real-world systems, especially when the action space is large and many actions have poor rewards. For example, in a recommender system with a large catalog (e.g. movies, music), it may be that less than $10 \%$ of the actions have support under the logging policy. We will show that existing learning algorithms can fail catastrophically on such support deficient data.
16
+
17
+ In this paper, we develop new off-policy contextual-bandit algorithms that are specifically designed to deal with support deficient log data. Since support deficiency translates into blind spots where we do not have any knowledge about the rewards, accounting for these blind spots as part of learning is crucial for robust learning. We approach this problem from three perspectives. First, we explore restricting the action space to those actions that have support under the logging policy. Second, we explore imputation methods that extrapolate estimated rewards to those blind spots. And, third, we restrict the policy space to only those policies that have limited exposure to the blind spots. To make the latter approach computationally tractable, we define a new measure of Support Divergence between policies, show how it can be estimated efficiently without closed-form knowledge of the logging policy, and how it can be used as a constraint on the policy space. We analyze the statistical and computational properties of all three approaches and perform an extensive empirical evaluation. We find that restricting the policy space is particularly effective, since it is computationally efficient, empirically effective at learning good policies, and convenient to use in practice.
18
+
19
+ # 2 RELATED WORK
20
+
21
+ Most prior works on BLBF can be classified into two different approaches. The first – called Direct Model (DM) – is based on a reduction to supervised learning, where a regression estimate is trained to predict rewards (Beygelzimer & Langford, 2009). To derive a policy, the action with the highest predicted reward is chosen. A drawback of this simple approach is the bias that results from misspecification of the regression model. Since regression models are often substantially misspecified for real-world data, the DM approach often does not work well empirically.
22
+
23
+ The second approach is based on policy learning via ERM with a counterfactual risk estimator. Inverse propensity score (IPS) weighting is one of the most popular estimators to be used as empirical risk. However, policy learning algorithms based on IPS and related estimators (Strehl et al., 2011; Swaminathan & Joachims, 2015a;b; Thomas & Brunskill, 2016; London & Sandler, 2019) require the assumption that the logging policy has full support for every policy in the policy space. One exception is the work of Liu et al. (2019). They relax the assumption to the existence of an optimal policy such that the logging policy covers the support of this optimal policy. However, this is an untestable assumption that does not provide guarantees for real-world applications.
24
+
25
+ Our work proposes three approaches to addressing off-policy learning with support deficiency. First, our conservative extrapolation method is related to the method proposed by Liu et al. (2019). They focus on the correction of the state distribution by defining an augmented MDP, and pessimistic imputation is used to get an estimate for policy-gradient learning. Second, our method of restricting the policy space uses a surrogate for the support divergence of two policies that was previously used as control variate in the SNIPS estimator (Swaminathan & Joachims, 2015b). It also appeared in the Lagrangian formulation of the BanditNet objective (Joachims et al., 2018) and in the gradient update in REINFORCE algorithm (Williams, 1992). This connection gives interesting new insight that the baselines used in policy-gradient algorithms not only help to reduce variance in gradients (Greensmith et al., 2004), but that they also connect to the problem of support deficiency in the off-policy setting.
26
+
27
+ # 3 OFF-POLICY LEARNING WITH DEFICIENT SUPPORT
28
+
29
+ We start by formally defining the problem of learning a contextual-bandit policy in the BLBF setting. Input to the policy are contexts $x \in \mathcal { X }$ drawn i.i.d from a fixed but unknown distribution $P ( \mathcal X )$ . Given context $x$ , the system executes a possibly stochastic policy $\pi ( \mathcal { V } | x )$ that selects an action $y \in \mathcal { V }$ . For this context and action pair, the system observes a reward $r \in [ r _ { m i n } , r _ { m a x } ]$ from $P ( r | x , y )$ . Given a space of policies $\Pi$ , the reward of any policy $\pi \in \Pi$ is defined as
30
+
31
+ $$
32
+ R ( \pi ) = \underset { x } { \mathbb { E } } \underset { y \sim \pi ( y \mid x ) } { \mathbb { E } } \underset { r \sim P ( r \mid x , y ) } { \mathbb { E } } [ r ] .
33
+ $$
34
+
35
+ In the BLBF setting, the learning algorithm is given a dataset
36
+
37
+ $$
38
+ \mathcal { D } : = \{ x _ { i } , y _ { i } , r _ { i } , \pi _ { 0 } ( y _ { i } | x _ { i } ) \} _ { i = 1 } ^ { n }
39
+ $$
40
+
41
+ of past system interactions which consists of context-action-reward-propensity tuples. The propensity $\pi _ { 0 } ( y _ { i } | x _ { i } )$ is the probability of selecting action $y _ { i }$ for context $x _ { i }$ under the policy $\pi _ { 0 }$ that was used to log the data. We call $\pi _ { 0 }$ the logging policy, and we will discuss desired conditions on the stochasticity of $\pi _ { 0 }$ in the following. The goal of off-policy learning is to exploit the information in the logged data $\mathcal { D }$ to find a policy ${ \hat { \pi } } \in \Pi$ that has high reward $R ( { \hat { \pi } } )$ .
42
+
43
+ Analogous to the ERM principle in supervised learning, off-policy learning algorithms typically optimize a counterfactual estimate $\hat { R } ( \pi )$ of $R ( \pi )$ as the training objective (Li et al., 2011; 2015; Bottou et al., 2013; Swaminathan & Joachims, 2015a).
44
+
45
+ $$
46
+ \hat { \pi } = \underset { \pi \in \Pi } { \arg \operatorname* { m a x } } [ \hat { R } ( \pi ) ]
47
+ $$
48
+
49
+ For conciseness, we ignore additional regularization terms in the objective (Swaminathan & Joachims, 2015a), since they are irrelevant to the main point of this paper. As counterfactual estimator $\hat { R } ( \pi )$ , most algorithms rely on some form of IPS weighting (Strehl et al., 2011; Dud´ık et al., 2011; Swaminathan & Joachims, 2015a;b; Wang et al., 2017; Su et al., 2019) to correct the distribution mismatch between the logging policy $\pi _ { 0 }$ and each target policy $\pi \in \Pi$ .
50
+
51
+ $$
52
+ \hat { R } _ { I P S } ( \pi ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } r _ { i } .
53
+ $$
54
+
55
+ A crucial condition for the effectiveness of the IPS estimator (and similar estimators) is that the logging policy $\pi _ { 0 }$ assigns non-zero probability to all actions that have non-zero probability under the target policy $\pi$ we aim to evaluate. This condition is known as positivity or full support, and it is defined as follows.
56
+
57
+ Definition 1 (Full support). The logging policy $\pi _ { 0 }$ is said to have full support for $\pi$ when $\pi _ { 0 } ( y | x ) >$ 0 for all actions $y \in \mathcal { V }$ and contexts $x \in \mathcal { X }$ for which $\pi ( y | x ) > 0$ .
58
+
59
+ It is known that the IPS estimator is unbiased, $\mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ( \pi ) ] = R ( \pi )$ , if the logging policy $\pi _ { 0 }$ has full support for $\pi$ (Li et al., 2011). To ensure unbiased ERM, algorithms that use the IPS estimator require that the logging policy $\pi _ { 0 }$ has full support for all policies $\pi \in \Pi$ in the policy space. For sufficiently rich policy spaces, like deep-networks $f _ { w } ( x , y )$ with softmax outputs of the form
60
+
61
+ $$
62
+ \pi _ { w } ( y | x ) = \frac { e x p ( f _ { w } ( x , y ) ) } { \sum _ { y ^ { \prime } \in \mathcal { V } } e x p ( f _ { w } ( x , y ^ { \prime } ) ) } ,
63
+ $$
64
+
65
+ this means that the logging policy $\pi _ { 0 }$ needs to assign non-zero probability to every action $y$ in every context $x$ . This is a strong condition that is not feasible in many real-world systems, especially if the action space is large and many actions have poor reward.
66
+
67
+ If the support requirement is violated, ERM learning can fail catastrophically. We will show below that the underlying reason is bias, not excessive variance that could be remedied through clipping or variance regularization (Strehl et al., 2011; Swaminathan $\&$ Joachims, 2015a). To quantify how support deficient a logging policy is, we denote the set of unsupported actions for context $x$ under $\pi _ { 0 }$ as
68
+
69
+ $$
70
+ \mathcal { U } ( x , \pi _ { 0 } ) : = \{ y \in y | \pi _ { 0 } ( y | x ) = 0 \} .
71
+ $$
72
+
73
+ The bias of the IPS estimator is then characterized by the expected reward on the unsupported actions.
74
+
75
+ Proposition 1. Given contexts $x \sim P ( \mathcal { X } )$ and logging policy $\pi _ { 0 } ( \mathcal { V } | x )$ , the bias of $\hat { R } _ { I P S }$ for target policy $\pi ( \mathcal { V } | x )$ is equal to the expected reward on the unsupported action sets, i.e., $b i a s ( \pi | \pi _ { 0 } ) =$ $\begin{array} { r } { \mathbb { E } _ { x } [ - \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \delta ( x , y ) ] } \end{array}$ .
76
+
77
+ The proof is in Appendix A.1. From Proposition 1, it is clear that support deficient log data can drastically mislead ERM learning. To quantify the effect of support deficiency on ERM, we define the support divergence between a logging policy $\pi _ { 0 }$ and a target policy $\pi$ as follows.
78
+
79
+ Definition 2 (Support Divergence). For contexts $x \sim P ( \mathcal { X } )$ and any corresponding pair of target policy $\pi$ and logging policy $\pi _ { 0 }$ , the Support Divergence is defined as
80
+
81
+ $$
82
+ \mathcal { D } _ { \mathcal { X } } \big ( \pi \big | \pi _ { 0 } \big ) : = \underset { x \sim P ( \mathcal { X } ) } { \mathbb { E } } \left[ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \right] .
83
+ $$
84
+
85
+ With this definition in hand, we can quantify the effect of support deficiency on ERM learning for a policy space $\Pi$ under logging policy $\pi _ { 0 }$ .
86
+
87
+ Theorem 1. For any given hypothesis space $\Pi$ with logging policy $\pi _ { 0 } ~ \in ~ \Pi$ , there exists a reward distribution $\mathcal { P } _ { r }$ with support in $[ r _ { m i n } , r _ { m a x } ]$ such that in the limit of infinite training data, ERM using IPS over the logged data $\mathcal D \sim \dot { P } ( \mathcal X ) \times \pi _ { 0 } ( \cdot | \mathcal X ) \times \mathcal P _ { r }$ can select a policy $\begin{array} { r } { \hat { \pi } \in \arg \operatorname* { m a x } _ { \pi \in \Pi } \mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ( \pi ) ] } \end{array}$ that is at least $\begin{array} { r l } { { ( r _ { m a x } - r _ { m i n } ) \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) } \quad } & { { } } \end{array}$ suboptimal.
88
+
89
+ The proof is in Appendix A.2. To illustrate the theorem, consider a problem with rewards $r \in$ $[ - 1 , 0 ]$ . Furthermore, consider a policy space $\Pi$ that contains a good policy $\pi _ { g }$ with $R ( \pi _ { g } ) = - 0 . 1$ and a bad policy $\pi _ { b }$ with $R ( \pi _ { b } ) = - 0 . 7 .$ . If policy $\pi _ { b }$ has support divergence $\mathcal { D } _ { \mathcal { X } } ( \pi _ { b } \vert \pi _ { 0 } ) = 0 . 6$ or larger, then ERM may return the bad $\pi _ { b }$ instead of $\pi _ { g }$ even with infinite amounts of training data.
90
+
91
+ Note that it is sufficient to merely have one policy in $\Pi$ that has large support deficiency to achieve this suboptimality. It is therefore crucial to control the support divergence $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ uniformly over all $\pi \in \Pi$ , or to account for the suboptimality it can induce. To this effect, we explore three approaches in the following.
92
+
93
+ # 3.1 SAFE LEARNING BY RESTRICTING THE ACTION SPACE
94
+
95
+ The first and arguably most direct approach to reducing $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ is to disallow any action that has zero support under the logging policy. For the remaining action set, the logging policy has full support by definition. This restriction of the action set can be achieved by transforming each policy $\pi \in \Pi$ into a new policy that sets the probability of the unsupported actions to zero.
96
+
97
+ $$
98
+ \pi ( y | x ) \longrightarrow \bar { \pi } ( y | x ) : = \frac { \pi ( y | x ) \mathbb { 1 } _ { \{ y \notin \mathcal { U } ( x , \pi _ { 0 } ) \} } } { 1 - \sum _ { y ^ { \prime } \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y ^ { \prime } | x ) }
99
+ $$
100
+
101
+ This results in a new policy space $\bar { \Pi }$ . All $\bar { \pi } \in \bar { \Pi }$ have support divergence of zero $\mathcal { D } _ { \mathcal { X } } ( \bar { \pi } | \pi _ { 0 } ) = 0$ and ERM via IPS is guaranteed to be unbiased.
102
+
103
+ While this transformation of the policy space from $\Pi$ to $\bar { \Pi }$ is conceptually straightforward, it has two potential drawbacks. First, restricting the action space without any exceptions may overly constrain the policies in $\bar { \Pi }$ . In particular, if the optimal action $y ^ { * }$ for a specific context $x$ does not have support under the logging policy, no $\bar { \pi } \in \dot { \bar { \Pi } }$ can ever choose $y ^ { * }$ even if there are many observations of similar $y$ ’s on similar context $x ^ { \prime }$ . The second drawback is computational. For every context $x$ during training and testing, the system needs to evaluate the logging policy $\pi _ { 0 } ( y | x )$ to compute the transformation from $\pi$ to $\bar { \pi }$ . This can be prohibitively expensive especially at test time, where – after multiple rounds of off-policy learning with data from previously learned policies – we would need to evaluate the whole sequence of previous logging policies to execute the learned policy.
104
+
105
+ # 3.2 SAFE LEARNING THROUGH REWARD EXTRAPOLATION
106
+
107
+ As illustrated above, support deficiency is a problem of blind spots where we lack information about the rewards of some actions in some contexts. Instead of disallowing the unsupported actions like in the previous section, an alternative is to extrapolate the observed rewards to fill in the blind spots. To this effect, we propose the following augmented IPS estimator that imputes an extrapolated reward $\hat { \delta } ( x , y )$ for each unsupported action $y \in \mathcal { U } ( x , \pi _ { 0 } )$ .
108
+
109
+ $$
110
+ \hat { R } _ { I P S } ^ { \delta } ( \pi ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left[ \frac { \pi ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } r _ { i } + \sum _ { y \in \mathcal { U } ( x _ { i } , \pi _ { 0 } ) } \pi ( y | x _ { i } ) \hat { \delta } ( x _ { i } , y ) \right]
111
+ $$
112
+
113
+ In the following proposition, we characterize the bias of the augmented IPS estimator for any given reward extrapolation $\hat { \delta } ( x , y )$ . We denote the mean of the reward $r$ for context $x$ and action $y$ with $\delta ( x , y ) = \mathbb { E } _ { r \sim P ( r | x , y ) } [ r ]$ . Furthermore, $\Delta ( x , y ) : = \hat { \delta } ( x , y ) - \delta ( x , y )$ denotes the error of the reward extrapolation for each $x$ and $y$ .
114
+
115
+ Proposition 2. Given contexts $x _ { 1 } , x _ { 2 } , \ldots , x _ { n }$ drawn i.i.d from the unknown distribution $P ( \mathcal X )$ , for action $y _ { i }$ drawn independently from logging policy $\pi _ { 0 }$ with probability $\pi _ { 0 } ( \mathcal { V } | x _ { i } )$ , the bias of the empirical risk defined in Equation (7) is $\begin{array} { r } { \mathbb E _ { x } [ \sum _ { y \in \mathcal U _ { x } ^ { \pi _ { 0 } } } \pi ( y | x ) \Delta ( x , y ) ] } \end{array}$ .
116
+
117
+ In this way we can learn in the original action and policy space, but mitigate the effect of the support deficiency by explicitly incorporating the extrapolated reward $\hat { \delta } ( x , y )$ . We explore two choices for $\hat { \delta } ( x , y )$ in the following, which provide different types of guarantees.
118
+
119
+ Conservative Extrapolation. To minimize the user impact of randomization in the logging policy, it is generally desirable to put zero probability on actions the are very likely to have low (or even catastrophic reward). This means that precisely those bad actions are likely to not be supported in the logging policy. A key danger of blind spots regarding those actions is that naive IPS training will inadvertently learn
120
+
121
+ # Algorithm 1: Data Augmentation
122
+
123
+ input: original logged dataset $\mathcal { D }$ , replaycount $k$ ,
124
+ reward estimate $\hat { \delta } ( x , y )$ ; output: $\mathcal { D } ^ { \prime }$ ;
125
+ initialization: $\mathcal { D } ^ { \prime } = \varnothing$ ;
126
+ for $j = 1 , \dots , k$ do for $i = 1 , \ldots , n$ do Define $U _ { x _ { i } }$ to be the uniform distribution over $\mathcal { U } ( x _ { i } , \pi _ { 0 } )$ ; Draw $y \sim U _ { x _ { i } }$ ; $\begin{array} { r } { \mathcal { D } ^ { \prime } = \mathcal { D } ^ { \prime } \bigcup \{ x _ { i } , y , \hat { \delta } ( x _ { i } , y ) , \frac { 1 } { | \mathcal { U } ( x _ { i } , \pi _ { 0 } ) | } \} ; } \end{array}$ end
127
+ end
128
+
129
+ a policy that selects those actions. This can be avoided by being maximally conservative about unsupported actions and imputing the lowest possible reward $\forall x , y \in \mathcal { U } ( x , \pi _ { 0 } ) : \hat { \delta } ( x , y ) = r _ { m i n }$ . Intuitively, by imposing the worst possible reward for the unsupported actions, the learning algorithm will aim to avoid these low-reward areas. However, unlike for the $\bar { \pi }$ policies resulting from the restricted action space, the learned policy is not strictly prohibited from choosing unsupported actions – it is merely made aware of the maximum loss that the action may incur. Note that for problems where $r _ { m i n } = 0$ , the naive IPS estimator is identical to conservative extrapolation since the second term in Equation (7) is zero.
130
+
131
+ Regression Extrapolation. Instead of extrapolating with the worst-case reward, we may have additional prior knowledge in the form of a model-based estimate that reduces the bias. In particular, we explore using a regression estimate $\begin{array} { r } { \hat { \delta } = \arg \operatorname* { m i n } _ { \hat { \delta } ^ { \theta } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } ( \hat { \delta } ^ { \theta } ( x _ { i } , y _ { i } ) - r _ { i } ) ^ { 2 } } \end{array}$ that extrapolates from the observed data $\mathcal { D }$ . Typically, comes from a parameterized class of regression functions. Other regression objectives could also be used, such as weighted linear regression that itself uses importance sampling as weights (Farajtabar et al., 2018). But, fundamentally, all regression approaches assume that the regression model is not misspecified and that it can thus extrapolate well. Note that the IPS part of Equation (7) can be changed to any estimators (with action set restricted on $\boldsymbol { \mathcal { U } } ( \boldsymbol { x } , \pi _ { 0 } ) ^ { c }$ for all $x$ ), and it turns out that doubly robust (Dud´ık et al., 2011) and CAB (Su et al., 2019) are special extensions of regression extrapolation that substitute the IPS part with their corresponding estimator.
132
+
133
+ Efficient Approximation. Evaluating the augmented IPS estimator from Equation (7) can be computationally expensive if the number of unsupported actions $\boldsymbol { \mathcal { U } } ( \boldsymbol { x } , \pi _ { 0 } )$ is large. To overcome this problem, we propose to use sampling to estimate the expected reward on the unsupported action, which can be thought of as augmenting the dataset $\mathcal { D }$ with additional observations where the logging policy has zero support. In particular, we propose the data-augmentation procedure detailed in Algorithm 1. With the additional bandit data $\mathcal { D } ^ { \prime } = \{ x _ { j } ^ { \prime } , y _ { j } ^ { \prime } , \hat { \delta } ( x _ { j } ^ { \prime } , y _ { j } ^ { \prime } ) , p _ { j } ^ { \prime } \} _ { j = 1 } ^ { m }$ from Algorithm 1, the new objective is
134
+
135
+ $$
136
+ \underset { \pi \in \Pi } { \arg \operatorname* { m i n } } \left\{ \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } r _ { i } + \frac { 1 } { m } \sum _ { j = 1 } ^ { m } \frac { \pi ( y _ { j } ^ { \prime } | x _ { j } ^ { \prime } ) } { p _ { j } ^ { \prime } } \hat { \delta } ( x _ { j } ^ { \prime } , y _ { j } ^ { \prime } ) \right\} .
137
+ $$
138
+
139
+ In Appendix A.5, we show that the empirical risk in Equation (8) has the same expectation (over randomness in $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ ) as $\hat { R } _ { I P S } ^ { \delta } ( \mathcal { D } )$ and can thus serve as an approximation for Equation (7).
140
+
141
+ # 3.3 SAFE LEARNING BY RESTRICTING THE POLICY SPACE
142
+
143
+ As motivated by Theorem 1, the risk of learning from support deficient data scales with the maximum support divergence $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ among the policies in the policy space $\Pi$ . Therefore, our third approach restricts the policy space to the subset $\Pi ^ { \kappa } \subset \Pi$ that contains the policies $\pi \in \Pi$ with an acceptably low support divergence $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } ) \le \kappa$ .
144
+
145
+ $$
146
+ \Pi ^ { \kappa } = \{ \pi | \pi \in \Pi \wedge { \mathscr { D } } \chi ( \pi | \pi _ { 0 } ) \leq \kappa \}
147
+ $$
148
+
149
+ The parameter $\kappa$ has an intuitive meaning. It specifies the maximum probability mass that a learned policy can place on unsupported actions. By limiting this to $\kappa$ , we limit the maximum bias of the ERM procedure according to Proposition 2 while not explicitly torquing the rewards like in conservative reward imputation.
150
+
151
+ A key challenge, however, is implementing this restriction of the hypothesis space, such that the ERM learner $\hat { \pi } = \arg \operatorname* { m a x } _ { \pi \in \Pi ^ { \kappa } } [ \hat { R } _ { I P S } ( \pi ) ]$ only considers the subset $\Pi ^ { \kappa } \subset \Pi$ . In particular, we do not have access to the context distribution $P ( \mathcal X )$ for calculating $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ , nor would it be possible to enumerate all $\pi \in \Pi$ to check the condition $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } ) ~ \le ~ \kappa$ , which itself requires a possibly infeasible iteration over all actions. The following theorem (with proof in Appendix A.3) gives us an efficient way of estimating and controlling $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ without explicit knowledge of $P ( \mathcal X )$ or access to the logging policy $\pi _ { 0 }$ beyond the logged propensities.
152
+
153
+ Theorem 2. For contexts $x _ { i }$ drawn i.i.d from $P ( \mathcal X )$ , action $y _ { i }$ drawn from logging policy $\pi _ { 0 }$ , we define SD(π|π0) = 1n Pni=1 π(yi|xi)π0(yi|xi) . For any policy $\pi$ it holds that
154
+
155
+ $$
156
+ \begin{array} { r } { \underset { x \sim P ( \mathcal { X } ) } { \mathbb { E } } \underset { y \sim \pi _ { 0 } ( \cdot | x ) } { \mathbb { E } } [ S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) ] + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) = 1 } \end{array}
157
+ $$
158
+
159
+ Using this theorem, the following proposition (proof in Appendix A.4, empirically verified in Appendix B) gives us an efficient way of implementing the constraint $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } ) \le \kappa$ via $1 - S _ { D } ( \pi | \pi _ { 0 } )$ .
160
+
161
+ Proposition 3. For any given $\kappa \in ( 0 , 1 )$ , $0 < \epsilon < \kappa / 2$ , let $p _ { m i n }$ denote the minimum propensity under supported set $p _ { m i n } ~ = ~ m a x _ { x , y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi _ { 0 } ( y | x )$ , then with probability larger than $1 - 2 \exp ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } )$ , the constraint $1 - \kappa { + } \epsilon \le S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) \le 1 { - } \epsilon$ will ensure $0 \leq \mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } ) \leq \kappa$ .
162
+
163
+ We can thus use $1 - S _ { D } ( \pi | \pi _ { 0 } )$ as a surrogate for $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ in the training objective:
164
+
165
+ $$
166
+ \underset { \pi _ { w } \in \Pi } { \arg \operatorname* { m i n } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi _ { w } ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } r _ { i } . \mathrm { ~ s u b j e c t ~ t o ~ } 1 - \kappa + \epsilon \leq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi _ { w } ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } \leq 1 - \epsilon
167
+ $$
168
+
169
+ Using Lagrange multipliers, an equivalent dual form of Equation (11) is:
170
+
171
+ $$
172
+ \operatorname* { m a x } _ { u _ { 1 } , u _ { 2 } \geq 0 } \operatorname* { m i n } _ { \pi _ { w } \in \Pi } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi _ { w } ( y _ { i } | x _ { i } ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } ( r _ { i } + u _ { 1 } - u _ { 2 } ) - u _ { 1 } ( 1 - \epsilon ) + u _ { 2 } ( 1 - \kappa + \epsilon )
173
+ $$
174
+
175
+ For each fixed $( u _ { 1 } , u _ { 2 } )$ pair, the inner minimization objective is ERM with IPS under a shift of the reward. Instead of maximizing over $( u _ { 1 } , u _ { 2 } )$ in the outer objective, we treat $( u _ { 1 } - u _ { 2 } )$ as a hyperparameter that we select on a validation set. We explore various estimators for this modelselection problem in Section 4.
176
+
177
+ Note that, among the methods we proposed for dealing with support deficiency, this approach is the most efficient to implement, and it does not require access to the logging policy during training or testing. Furthermore, the form of the inner objective coincides with that of BanditNet (Joachims et al., 2018), which is known to work well for deep network training by controlling propensity overfitting (Swaminathan & Joachims, 2015a).
178
+
179
+ # 4 EMPIRICAL EVALUATION
180
+
181
+ We empirically evaluate the effectiveness and robustness of the three proposed approaches: restricting the action space, conservative and regression extrapolation, as well as restricting the policy space. The semi-synthetic experiments are based on two real-world datasets: one is the popular image classification dataset CIFAR10 (Krizhevsky et al.) and the other is the credit-card fraud dataset of Dal Pozzolo et al. (2015). We use the naive IPS estimator and the regression-based Direct Method (DM) as baselines.
182
+
183
+ The experiments are set up as follows. We first create a train-validation-test split for both datasets. The training set is used to generate bandit datasets for learning, the validation set is used to generate bandit datasets for model selection, and the full-information test set serves as ground truth for evaluating the learned policies. To simulate bandit feedback for the CIFAR10 dataset, our experiment setup follows traditional supervised bandit conversion for multi-class classification datasets (Beygelzimer & Langford, 2009). To not only have bandit data with binary multi-class rewards, we choose a different methodology for the credit-card dataset by designating some features as corresponding to actions and rewards. More details are given in Appendix B.
184
+
185
+ To get logging policies for generating bandit feedback, we start by training a softmax-policy as in Equation (4) on a subset of the full-information data. We then introduce a temperature parameter $\tau$ into the learned policy via $\tau f _ { w } ( x , y )$ to be able to control its stochasticity and support deficiency. In particular, we enforce zero support for some actions by clipping the propensities to 0 if they are below a threshold of $\epsilon = 0 . 0 1$ . The larger $\tau$ , the higher the support deficiency. Note that making the threshold at $\epsilon = 0 . 0 1$ allows us to control support while the variance of IPS stays bounded. This allows us to study support deficiency without having to worry about variance control.
186
+
187
+ For both logging and target policies, we train softmax policies where $f _ { w } ( x , y )$ is a neural network. We use the ResNet20 architecture (He et al., 2016) for CIFAR10, and a fully-connected 2-layer network for the credit-card dataset.
188
+
189
+ ![](images/28a0537b9d42908064e6c5fb86cdcb47b4f7d8597ca2d9309b1cb944a9c7dace.jpg)
190
+ Figure 1: Learning results with varying support deficiency in the logging policy.
191
+
192
+ How do the methods perform at different level of support deficiency? Results are shown in Figure 1. First, as expected, learning using naive IPS degrades on both datasets as we make the logging policy more peaked and the number of unsupported actions increases. Note that naive IPS coincides with Conservative Extrapolation, since both datasets are scaled to have a minimum reward of zero. In the rightmost column, however, we translated the rewards to $[ - 1 , 0 ]$ . This has a strong detrimental effect on naive IPS, as it is now overly optimistic about unsupported actions. Second, the approach of dealing with support deficiency by restricting the action space also performs poorly. The second row of plot sheds some light on this, as it shows the support divergence $\mathcal { D } _ { \mathcal { X } } ( \pi \vert \pi _ { 0 } )$ of the learned policy. It is zero for Action Restriction as expected, which means that bias is not the problem. Instead, as the number of unsupported actions increases, the best actions are more likely to be pruned and unavailable in the restricted policy space $\bar { \Pi }$ . Third, Regression Extrapolation performs better than Conservative Extrapolation on both datasets. In both cases, the DM model is quite good which also benefits Regression Extrapolation. However, on the credit-card dataset the regression seems better at ranking than at predicting the true reward, which explains why DM performs better than Regression Extrapolation. Fourth, the method that performs well most consistently is Policy Restriction. Unlike all the other IPS-based methods, it performs well even under the translated rewards in the third column of Figure 1. This is because the objective of Policy Restriction coincides with that of BanditNet (Joachims et al., 2018), which is known to remedy propensity overfitting due to the lack of equivariance of the IPS estimator (Swaminathan & Joachims, 2015b).
193
+
194
+ How does the learning performance change with more training data? Results are shown in Figure 2. As the number of bandit examples increases, Policy Restriction, Regression Extrapolation and DM dominate over most of the range especially when the percentage of unsupported actions is large. Among the other methods, Action Restriction can take the least advantage of more data. This is plausible, since its maximum performance is limited by the available actions. For similar reasons, Conservative Extrapolation (and equivalently IPS) also flattens out, since it also tightly restricts the action space by imputing the minimum reward.
195
+
196
+ ![](images/aa8a5d1278cce3164dc98804179215126bb0ed224e646e59e7747093d8691b15.jpg)
197
+ Figure 2: Learning results with varying amounts of bandit data on CIFAR10 and credit-card dataset.
198
+
199
+ <table><tr><td rowspan=1 colspan=1>%Unsupp.</td><td rowspan=1 colspan=1>Oracle</td><td rowspan=1 colspan=1>Regr.Extrap.</td><td rowspan=1 colspan=1>DM</td><td rowspan=1 colspan=1>Cons.Extrap.</td><td rowspan=1 colspan=1>SNIPS</td></tr><tr><td rowspan=1 colspan=1>45</td><td rowspan=1 colspan=1>0.878</td><td rowspan=1 colspan=1>0.878</td><td rowspan=1 colspan=1>0.878</td><td rowspan=1 colspan=1>0.878</td><td rowspan=1 colspan=1>0.876</td></tr><tr><td rowspan=1 colspan=1>60</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.871</td></tr><tr><td rowspan=1 colspan=1>70</td><td rowspan=1 colspan=1>0.858</td><td rowspan=1 colspan=1>0.858</td><td rowspan=1 colspan=1>0.856</td><td rowspan=1 colspan=1>0.858</td><td rowspan=1 colspan=1>0.858</td></tr><tr><td rowspan=1 colspan=1>77</td><td rowspan=1 colspan=1>0.856</td><td rowspan=1 colspan=1>0.854</td><td rowspan=1 colspan=1>0.854</td><td rowspan=1 colspan=1>0.856</td><td rowspan=1 colspan=1>0.856</td></tr><tr><td rowspan=1 colspan=1>80</td><td rowspan=1 colspan=1>0.855</td><td rowspan=1 colspan=1>0.855</td><td rowspan=1 colspan=1>0.855</td><td rowspan=1 colspan=1>0.838</td><td rowspan=1 colspan=1>0.849</td></tr></table>
200
+
201
+ ![](images/129795f238e4f9e260030195c39b917e0942e1c8abe6287722e9eee2e57b7f77.jpg)
202
+ Figure 3: Model selection performance on CIFAR10.
203
+
204
+ How effective are the estimators for model selection? Most learning algorithms have hyperparameters, and we now evaluate how the estimators perform for this secondary learning problem. We specifically focus on the parameter $k : = u _ { 1 } - u _ { 2 }$ in Policy Restriction, since it controls how much the learned policies can step outside the region of support. The table on the left of Figure 3 shows the reward of the learned policy when performing model selection with the respective estimator. Oracle is the estimator that has access to the full-information validation set, and can thus be considered as a skyline. We also included the SNIPS estimator (Swaminathan & Joachims, 2015b), which imputes the average reward on the supported action for the unsupported actions (Gilotte et al., 2018). All estimators perform quite well for model selection on CIFAR, and the results are analogous for the credit-card data (see Appendix B.2). However, the plot to the right of Figure 3 reveals that SNIPS does not accurately reflect the shape of the Oracle curve. Both Regression Extrapolation and DM, however, are found to be sufficiently accurate for reliable model selection.
205
+
206
+ # 5 DISCUSSION AND CONCLUSIONS
207
+
208
+ We identified and analyzed how off-policy learning based on IPS weighting can suffer severely degraded learning performance when the logging policy is support deficient. To remedy this problem, we explored approaches that limit the impact of missing support through three different means: restricting the action space, reward extrapolation and restricting the policy space. We find that the most natural approach of restricting the action space is neither computationally efficient, nor does it learn accurate policies. Reward extrapolation through regression and restricting the policy space, however, both perform well and robustly even at high levels of support deficiency. Among those two methods, reward extrapolation has the potential drawback that we need to compute (and/or sample from) the complement of the logging policy, which can be computationally challenging. Furthermore, having to store all old logging policies is inconvenient in practice. This makes the approach of restricting the policy space particularly attractive, since it is computationally efficient and it does not require access to the logging policy beyond the logged propensity values.
209
+
210
+ # REFERENCES
211
+
212
+ Alekh Agarwal, Daniel Hsu, Satyen Kale, John Langford, Lihong Li, and Robert Schapire. Taming the monster: A fast and simple algorithm for contextual bandits. In International Conference on Machine Learning (ICML), 2014.
213
+
214
+ Alina Beygelzimer and John Langford. The offset tree for learning with partial labels. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 129–138. ACM, 2009.
215
+
216
+ Leon Bottou, Jonas Peters, Joaquin Qui ´ nonero-Candela, Denis X Charles, D Max Chickering, Elon ˜ Portugaly, Dipankar Ray, Patrice Simard, and Ed Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. The Journal of Machine Learning Research, 14(1):3207–3260, 2013.
217
+
218
+ Andrea Dal Pozzolo, Olivier Caelen, Reid A Johnson, and Gianluca Bontempi. Calibrating probability with undersampling for unbalanced classification. In 2015 IEEE Symposium Series on Computational Intelligence, pp. 159–166. IEEE, 2015.
219
+
220
+ Miroslav Dud´ık, John Langford, and Lihong Li. Doubly robust policy evaluation and learning. In International Conference on Machine Learning (ICML), 2011.
221
+
222
+ Mehrdad Farajtabar, Yinlam Chow, and Mohammad Ghavamzadeh. More robust doubly robust off-policy evaluation. In International Conference on Machine Learning, pp. 1446–1455, 2018.
223
+
224
+ Alexandre Gilotte, Clement Calauz ´ enes, Thomas Nedelec, Alexandre Abraham, and Simon Doll \` e.´ Offline a/b testing for recommender systems. In Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, pp. 198–206. ACM, 2018.
225
+
226
+ Evan Greensmith, Peter L Bartlett, and Jonathan Baxter. Variance reduction techniques for gradient estimates in reinforcement learning. Journal of Machine Learning Research, 5(Nov):1471–1530, 2004.
227
+
228
+ 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.
229
+
230
+ T. Joachims, A. Swaminathan, and T. Schnabel. Unbiased learning-to-rank with biased feedback. In ACM Conference on Web Search and Data Mining (WSDM), 2017.
231
+
232
+ T. Joachims, A. Swaminathan, and M. de Rijke. Deep learning with logged bandit feedback. In International Conference on Learning Representations (ICLR), 2018.
233
+
234
+ Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 (canadian institute for advanced research). URL http://www.cs.toronto.edu/˜kriz/cifar.html.
235
+
236
+ John Langford and Tong Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in neural information processing systems, pp. 817–824, 2008.
237
+
238
+ Lihong Li, Wei Chu, John Langford, and Xuanhui Wang. Unbiased offline evaluation of contextualbandit-based news article recommendation algorithms. In Proceedings of the fourth ACM international conference on Web search and data mining, pp. 297–306. ACM, 2011.
239
+
240
+ Lihong Li, Shunbao Chen, Jim Kleban, and Ankur Gupta. Counterfactual estimation and optimization of click metrics in search engines: A case study. In Proceedings of the 24th International Conference on World Wide Web, pp. 929–934. ACM, 2015.
241
+
242
+ Yao Liu, Adith Swaminathan, Alekh Agarwal, and Emma Brunskill. Off-policy policy gradient with state distribution correction. arXiv preprint arXiv:1904.08473, 2019.
243
+
244
+ Ben London and Ted Sandler. Bayesian counterfactual risk minimization. In International Conference on Machine Learning, pp. 4125–4133, 2019.
245
+
246
+ Alex Strehl, John Langford, Lihong Li, and Sham M Kakade. Learning from logged implicit exploration data. In Advances in Neural Information Processing Systems (NIPS), 2011.
247
+
248
+ Yi Su, Lequn Wang, Michele Santacatterina, and Thorsten Joachims. Cab: Continuous adaptive blending for policy evaluation and learning. In International Conference on Machine Learning, pp. 6005–6014, 2019.
249
+
250
+ A. Swaminathan and T. Joachims. Batch learning from logged bandit feedback through counterfactual risk minimization. Journal of Machine Learning Research (JMLR), 16:1731–1755, Sep 2015a. Special Issue in Memory of Alexey Chervonenkis.
251
+
252
+ A. Swaminathan and T. Joachims. The self-normalized estimator for counterfactual learning. In Neural Information Processing Systems (NIPS), 2015b.
253
+
254
+ Philip Thomas and Emma Brunskill. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning (ICML), 2016.
255
+
256
+ Yu-Xiang Wang, Alekh Agarwal, and Miroslav Dudik. Optimal and adaptive off-policy evaluation in contextual bandits. In International Conference on Machine Learning (ICML), 2017.
257
+
258
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
259
+
260
+ # A APPENDIX: PROOFS
261
+
262
+ In this appendix, we provide proofs of the main theorems and propositions.
263
+
264
+ # A.1 PROOF OF PROPOSITION 1
265
+
266
+ Proposition 1. Given contexts $x \sim P ( \mathcal { X } )$ and logging policy $\pi _ { 0 } ( \mathcal { V } | x )$ , the bias of $\hat { R } _ { I P S }$ for target policy $\pi ( \mathcal { V } | x )$ is equal to the expected reward on the unsupported action sets, i.e., $b i a s ( \pi | \pi _ { 0 } ) =$ $\begin{array} { r } { \mathbb { E } _ { x } [ - \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \delta ( x , y ) ] } \end{array}$ .
267
+
268
+ Proof. Recall $\delta ( x , y ) = \mathbb { E } _ { r } [ r ( x , y ) | x , y ]$ , and logged data $\mathcal { D } \sim \mathcal { P } _ { \mathcal { X } } \times \pi _ { 0 } ( \cdot | \mathcal { X } ) \times \mathcal { P } _ { r }$ .
269
+
270
+ $$
271
+ \begin{array} { l } { \displaystyle b i a s ( \pi | \pi _ { 0 } ) = \frac { \mathbb { E } [ \hat { R } _ { I P S } ( \pi ) ] - R ( \pi ) } { \mathcal { D } } } \\ { \displaystyle \quad = \frac { \mathbb { E } [ \sum _ { \scriptstyle x } } { y \in ( \mathcal { U } ( x , \pi _ { 0 } ) ) ^ { c } } \pi _ { 0 } ( y | x ) \frac { \pi ( y | x ) } { \pi _ { 0 } ( y | x ) } \delta ( x , y ) - \sum _ { y \in \mathcal { Y } } \pi ( y | x ) \delta ( x , y ) ] } \\ { \displaystyle \quad = \frac { \mathbb { E } [ - \sum _ { \scriptstyle x } } { x } - \pi ( y | x ) \delta ( x , y ) ] } \end{array}
272
+ $$
273
+
274
+ # A.2 PROOF OF THEOREM 1
275
+
276
+ Theorem 1. For any given hypothesis space $\Pi$ with logging policy $\pi _ { 0 } ~ \in ~ \Pi$ , there exists a reward distribution $\mathcal { P } _ { r }$ with support in $[ r _ { m i n } , r _ { m a x } ]$ such that in the limit of infinite training data, ERM using $I P S$ over the logged data $\mathcal D \sim \dot { P } ( \mathcal X ) \times \pi _ { 0 } ( \cdot | \mathcal X ) \times \mathcal P _ { r }$ can select a policy $\begin{array} { r } { \hat { \pi } \in \arg \operatorname* { m a x } _ { \pi \in \Pi } \mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ( \pi ) ] } \end{array}$ that is at least $\begin{array} { r l } { { ( r _ { m a x } - r _ { m i n } ) \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) } \quad } & { { } } \end{array}$ suboptimal.
277
+
278
+ Proof. For any given hypothesis space $\Pi$ and logging policy $\pi _ { 0 }$ , define a deterministic reward distribution $\mathcal { P } _ { r }$ as the following: for all context $x$ , $r ( x , y ) = \delta ( x , y ) = r _ { m i n }$ for $y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c }$ and $r ( x , y ) ~ = ~ \delta ( x , y ) ~ = ~ r _ { m a x }$ for $y \in \mathcal { U } ( x , \pi _ { 0 } )$ . Let $\tilde { \pi } \in \arg \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } )$ and $\pi ^ { * } \in \arg \operatorname* { m a x } _ { \pi \in \Pi } R ( \pi )$ , then we have the following lower bound for $R ( \pi ^ { * } )$ :
279
+
280
+ $$
281
+ \begin{array} { r l } & { R ( \pi ^ { * } ) \geq R ( \tilde { \pi } ) } \\ & { \qquad = \underset { x } { \mathbb { E } } [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } r _ { m a x } + \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } r _ { m i n } ] } \\ & { \qquad = r _ { m a x } \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) + r _ { m i n } \big ( 1 - \underset { \pi \in \Pi } { \operatorname* { m a x } } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) \big ) } \end{array}
282
+ $$
283
+
284
+ where the first inequality follows from the definition of $\pi ^ { * }$ , the first and second equality is based on the specific reward distribution $\mathcal { P } _ { r }$ and the definition of $\tilde { \pi }$ .
285
+
286
+ In the following we will show that for any $\hat { \pi }$ learned by the expectation of ERM (or in the limit of infinite amount data), i.e., πˆ ∈ arg max $\mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ^ { \mathcal { D } } ( \pi ) ]$ , $\hat { \pi }$ have the same support as $\pi _ { 0 }$ .
287
+
288
+ $$
289
+ \mathbb { E } [ \hat { R } _ { I P S } ( \pi ) ] = \mathbb { E } [ \sum _ { x } \pi ( y | x ) r _ { m i n } ] = r _ { m i n } \mathbb { E } [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) ] \le r _ { m i n }
290
+ $$
291
+
292
+ for all $\pi \in \Pi$ , then it is easy to see $\pi _ { 0 } \in \Pi$ is one of the solution of ERM. Actually for any $\hat { \pi } \in$ arg max $\begin{array} { r } { \mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ^ { \mathcal { D } } ( \pi ) ] , \mathbb { E } _ { x } [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) ] = 1 } \end{array}$ and it gives us that any solution of the ERM has exactly the same support as $\pi _ { 0 }$ , then we have $R ( \hat { \pi } ) = r _ { m i n }$ for $\hat { \pi } \in \arg \operatorname* { m a x } \mathbb { E } _ { \mathcal { D } } [ \hat { R } _ { I P S } ^ { \mathcal { D } } ( \pi ) ]$ .
293
+
294
+ Combining the lower bound for $R ( \pi ^ { * } )$ and $R ( \hat { \pi } ) = r _ { m i n }$ , we have
295
+
296
+ $$
297
+ \begin{array} { r l } & { R ( \pi ^ { * } ) - R ( \hat { \pi } ) \geq r _ { m a x } \displaystyle \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) + r _ { m i n } ( 1 - \displaystyle \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) ) - r _ { m i n } } \\ & { \quad \quad \quad \quad \quad = \left( r _ { m a x } - r _ { m i n } \right) \displaystyle \operatorname* { m a x } _ { \pi \in \Pi } \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) } \end{array}
298
+ $$
299
+
300
+ # A.3 PROOF OF THEOREM 2
301
+
302
+ Theorem 2. For contexts $x _ { i }$ drawn i.i.d from $P ( \mathcal X )$ , action $y _ { i }$ drawn from logging policy $\pi _ { 0 }$ , we define SD(π|π0) = 1n Pni=1 π(yi|xi)π0(yi|xi) . For any policy $\pi$ it holds that
303
+
304
+ $$
305
+ \begin{array} { r } { \underset { x \sim P ( \mathcal { X } ) } { \mathbb { E } } \underset { y \sim \pi _ { 0 } ( \cdot | x ) } { \mathbb { E } } [ S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) ] + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) = 1 } \end{array}
306
+ $$
307
+
308
+ Proof.
309
+
310
+ $$
311
+ \begin{array} { r l } { \underset { x , y \sim \pi _ { 0 } } { \mathbb { E } } [ S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) ] + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) = \underset { x } { \mathbb { E } } [ \ \underset { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } { \sum } \pi _ { 0 } ( y | x ) \frac { \pi ( y | x ) } { \pi _ { 0 } ( y | x ) } ] + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) } & { } \\ { = \underset { x } { \mathbb { E } } [ \ \underset { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } { \sum } \pi ( y | x ) ] + \underset { x } { \mathbb { E } } [ \ \underset { y \in \mathcal { U } ( x , \pi _ { 0 } ) } { \sum } \pi ( y | x ) ] } & { } \\ { = \underset { x } { \mathbb { E } } [ \underset { y \in \mathcal { Y } } { \sum } \pi ( y | x ) ] = 1 } & { } \end{array}
312
+ $$
313
+
314
+ The first equality is based on definition of $S _ { D } ( \pi | \pi _ { 0 } )$ and the second equality is based on definition of support divergence. □
315
+
316
+ # A.4 PROOF OF PROPOSITION 3
317
+
318
+ Proposition 3. For any given $\kappa \in ( 0 , 1 )$ , $0 < \epsilon < \kappa / 2$ , let $p _ { m i n }$ denote the minimum propensity under supported set $p _ { m i n } ~ = ~ m a x _ { x , y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi _ { 0 } ( y | x )$ , then with probability larger than $1 - 2 \exp ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } )$ , the constraint $1 - \kappa { + } \epsilon \le S _ { \mathscr { D } } ( \pi | \pi _ { 0 } ) \le 1 { - } \epsilon$ will ensure $0 \leq \mathcal { D } \boldsymbol { x } ( \pi | \pi _ { 0 } ) \leq \kappa$ .
319
+
320
+ Proof. Recall SD(π|π0) = 1n Pni=1 π(yi|xi)π0(yi|xi) with $( x _ { i } , y _ { i } )$ draw i.i.d from $P ( \mathcal { X } ) \times \pi _ { 0 } ( \mathcal { Y } | \boldsymbol { x } )$ . From Appendix A.3, it is easy to see Ex,y∼π0(·|x)[ π(y|x)π0(y|x) ] $\begin{array} { r } { \mathbb { E } _ { x , y \sim \pi _ { 0 } ( \cdot | x ) } \big [ \frac { \pi ( y | x ) } { \pi _ { 0 } ( y | x ) } \big ] = 1 - \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) } \end{array}$ . Let $p _ { m i n }$ denote the smallest propensity under supported action set, $p _ { m i n } : = \mathrm { m i n } _ { x , y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi _ { 0 } ( y | x ) > 0$ , then the random variable $\frac { \pi ( y | x ) } { \pi _ { 0 } ( y | x ) }$ is strictly bounded between $[ 0 , \frac { 1 } { p _ { m i n } } ]$ . Applying Hoeffding’s bound gives:
321
+
322
+ $$
323
+ ^ { \mathfrak { p } } ( { \mathcal { D } } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) < 1 - S _ { { \mathcal { D } } } ( \pi | \pi _ { 0 } ) - \epsilon ) = \mathbb { P } ( S _ { { \mathcal { D } } } ( \pi | \pi _ { 0 } ) - ( 1 - { \mathcal { D } } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) ) < - \epsilon ) \leq e x p ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } )
324
+ $$
325
+
326
+ Since $S _ { \mathcal { D } ( \pi | \pi _ { 0 } ) } \le 1 - \epsilon$ gives $1 - S _ { \mathcal { D } } ( \pi \vert \pi _ { 0 } ) - \epsilon \geq 0$ , then we have
327
+
328
+ $$
329
+ \mathbb { P } ( \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) < 0 ) \le e x p ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } )
330
+ $$
331
+
332
+ Similar for the other direction, Hoeffding’s bound gives:
333
+
334
+ $$
335
+ \mathbb { P } ( \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) > 1 - S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) + \epsilon ) = \mathbb { P } ( S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) - ( 1 - \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) ) > \epsilon ) \le e x p ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } )
336
+ $$
337
+
338
+ Since $S _ { \mathcal { D } ( \pi | \pi _ { 0 } ) } \geq 1 + \epsilon - \kappa$ gives $\begin{array} { r } { 1 - S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) + \epsilon \le \kappa } \end{array}$ , then we have
339
+
340
+ $$
341
+ \begin{array} { r } { \mathbb { P } ( \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) \ge \kappa ) \le e x p ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } ) } \end{array}
342
+ $$
343
+
344
+ Combining the above, we have
345
+
346
+ $$
347
+ \begin{array} { r l } & { \mathbb { P } ( 0 \leq \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) \leq \kappa ) = 1 - \mathbb { P } ( \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) < 0 ) - \mathbb { P } ( \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } ) > \kappa ) } \\ & { \qquad \geq 1 - 2 e x p ( - 2 n \epsilon ^ { 2 } p _ { m i n } ^ { 2 } ) } \end{array}
348
+ $$
349
+
350
+ # A.5 PROOF FOR EFFICIENT APPROXIMATION
351
+
352
+ Claim 1. The empirical risk defined by in Equation (8) has the same expectation (over randomness in $\mathcal { D }$ and sampling) as $\hat { R } _ { I P S } ^ { \delta } ( \mathcal { D } )$ .
353
+
354
+ Proof. Taking the expectation of empirical risk defined in Equation (8):
355
+
356
+ $$
357
+ \begin{array} { l l } { { \displaystyle { \mathbb E } \big [ \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \frac { \pi \big ( y _ { i } | x _ { i } \big ) } { \pi _ { 0 } \big ( y _ { i } | x _ { i } \big ) } r _ { i } + \frac { 1 } { m } \sum _ { j = 1 } ^ { m } \frac { \pi \big ( y _ { j } | x _ { j } \big ) } { p _ { j } } \hat { \delta } ( x _ { j } , y _ { j } ) \big ] } } \\ { { \displaystyle { = \mathbb E } \big [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi _ { 0 } ( y | x ) \frac { \pi \big ( y | x \big ) } { \pi _ { 0 } ( y | x ) } \delta ( x , y ) \big ] + \frac { { \mathbb E } } { x } \big [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \frac { 1 } { | \mathcal { U } ( x , \pi _ { 0 } ) | } \frac { \pi \big ( y | x \big ) } { \textstyle | \mathcal { U } ( x , \pi _ { 0 } ) | } \hat { \delta } ( x , y ) \big ] } } \\ { { \displaystyle { = \mathbb E } \big [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) \delta ( x , y ) \big ] + \frac { { \mathbb E } } { x } \big [ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \hat { \delta } ( x , y ) \big ] } } \end{array}
358
+ $$
359
+
360
+ Now we will show it has the same expectation with $\hat { R } _ { I P S } ^ { \delta } ( \pi )$
361
+
362
+ $$
363
+ \begin{array} { r l } & { \frac { \mathbb { E } } { D } \big [ \frac { \pi \big ( y _ { 1 } | x _ { i } \big ) } { \pi _ { 0 } ( y _ { i } | x _ { i } ) } r _ { i } + \displaystyle \sum _ { y \in \mathcal { U } ( x _ { \star } , \pi _ { 0 } ) } \pi ( y | x _ { i } ) \hat { \delta } ( x _ { i } , y ) \big ] } \\ & { = \frac { \mathbb { E } } { x } \big [ \underbrace { \mathbb { E } } _ { y \in \pi _ { 0 } } [ \frac { \pi } { \pi _ { 0 } ( y | x ) } \delta ( x , y ) ] + \displaystyle \sum _ { y ^ { \prime } \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y ^ { \prime } | x ) \hat { \delta } ( x , y ^ { \prime } ) \big ] } \\ & { = \frac { \mathbb { E } } { x } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi _ { 0 } ( y | x ) \frac { \pi ( y | x ) } { \pi _ { 0 } ( y | x ) } \delta ( x , y ) + \displaystyle \sum _ { y ^ { \prime } \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y ^ { \prime } | x ) \hat { \delta } ( x , y ^ { \prime } ) \big ] } \\ & { = \frac { \mathbb { E } } { x } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) \delta ( x , y ) \big ] + \frac { \mathbb { E } } { x } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \hat { \delta } ( x , y ) \big ] } \end{array}
364
+ $$
365
+
366
+ The proof is done by comparing Equation (23) and Equation (24).
367
+
368
+ # A.6 PROOF OF PROPOSITION 2
369
+
370
+ Proposition 2. Given contexts $x _ { 1 } , x _ { 2 } , \ldots , x _ { n }$ drawn i.i.d from the unknown distribution $P ( \mathcal X )$ , for action $y _ { i }$ drawn independently from logging policy $\pi _ { 0 }$ with probability $\pi _ { 0 } ( \mathcal { V } | x _ { i } )$ , the bias of the empirical risk defined in Equation (7) is $\begin{array} { r } { \mathbb E _ { x } [ \sum _ { y \in \mathcal U _ { x } ^ { \pi _ { 0 } } } \pi ( y | x ) \Delta ( x , y ) ] } \end{array}$ .
371
+
372
+ Proof. From Appendix A.5, we are given the expectation of $\hat { R } _ { I P S } ^ { \delta } ( \pi )$ , and the bias is:
373
+
374
+ $$
375
+ \begin{array} { l } { { b i a s ( \hat { R } _ { I P S } ^ { \delta } ( \pi ) ) = { \displaystyle \mathbb { E } } [ \hat { R } _ { I P S } ^ { \delta } ( \pi ) ] - R ( \pi ) } } \\ { ~ = { \displaystyle \frac { { \mathbb { E } } } { x } } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) \delta ( x , y ) + \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \hat { \delta } ( x , y ) \big ] - R ( \pi ) } \\ { ~ = { \displaystyle \mathbb { E } } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) ( \hat { \delta } ( x , y ) - \delta ( x , y ) ) \big ] } \\ { ~ = { \displaystyle \mathbb { E } } \big [ \displaystyle \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \Delta ( x , y ) \big ] } \end{array}
376
+ $$
377
+
378
+ The second equality is from Appendix A.5, the second equality is based on $\begin{array} { r l } { R ( \pi ) } & { { } = } \end{array}$ $\begin{array} { r } { \mathbb { E } _ { x } \left[ \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) ^ { c } } \pi ( y | x ) \delta ( x , y ) + \sum _ { y \in \mathcal { U } ( x , \pi _ { 0 } ) } \pi ( y | x ) \delta ( x , y ) \right] } \end{array}$ , and the last one is based on the definition of $\Delta ( x , y ) : = \hat { \delta } ( x , y ) - \delta ( x , y )$ for all $x \in \mathcal { X } , y \in \mathcal { Y }$ . □
379
+
380
+ # B APPENDIX: EXPERIMENTS
381
+
382
+ In this section, we provide the experiment details and additional results to help promote reproducibility of this work.
383
+
384
+ # B.1 EXPERIMENT SETUP DETAILS
385
+
386
+ Datasets and baseline. We follow a 75:10:15 train-validation-test split for credit card fraud detection dataset, while for CIFAR10 already coming with a train-test split, we keep $10 \%$ of the training set as validation set. Baseline estimators are IPS and DM, the hyperparameters (learning rate, L2 regularization) are optimized for all the methods based on the validation set.
387
+
388
+ Bandit data generation. For CIFAR10, given supervised data $\{ x _ { i } , y _ { i } ^ { * } \} _ { i = 1 } ^ { n }$ where $x _ { i }$ denotes the 3072 features and $y _ { i } ^ { * }$ denotes the correct label of data (ranging from 0 to 9), under logging policy $\pi _ { 0 }$ , the logged bandit data is generated by drawing $y _ { i } \sim \pi _ { 0 } ( \mathcal { V } | x _ { i } )$ , then a deterministic reward is defined as $\mathbb { I } _ { \{ y _ { i } = y _ { i } ^ { * } \} }$ . For the credit card fraud detection dataset, we throw away the class label and only use the features for each sample to generate bandit data. To be specific, for each sample with a 28-dimensional feature vector, we define the first 20 features as the contextual information, and use the remaining 8 features as the underlying true reward for 8 different actions (with normalization).
389
+
390
+ Logging policy. For CIFAR, we learn the softmax logging policy on 35K full-information data points as a multi-class classification problem with cross-entropy loss. Similar as the experiments on BanditNet (Joachims et al., 2018), we adopt the conventional ResNet20 architecture but restrict training after a mere two epochs to derive a relative stochastic policy, since it will be easier to add temperature later to control its stochasticity and support deficiency. Similarly, for the credit card fraud detection dataset, the softmax logging policy is learned on 8K full-information data points by treating it as a multi-class classification problem using cross-entropy loss and the label being the action with the highest reward on this specific context. For CIFAR, the logging policy we trained has a $5 7 . 4 3 \%$ accuracy on the test-set; whereas for the credit card fraud detection dataset, the logging policy has an expected true reward of 0.71.
391
+
392
+ Reward estimator. For each experiment, we train a different regression function using the full bandit dataset. We use the same architecture as the one used for off-policy learning - where the final layer is the size of the actions, specifying the reward for each action given a particular context. The regression function is trained using the MSE objective.
393
+
394
+ ![](images/51d656734af5ca7eebec76bcca0d315e378aa7a4b913d38454b7164ec98ffb1b.jpg)
395
+ Figure 4: Behaviour of $S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } )$
396
+
397
+ # B.2 SUPPLEMENTARY RESULTS
398
+
399
+ Reliability of approximating support divergence using control variate. In this experiment, we empirically verify the reliability of estimating support divergence using control variate. The target policy is the uniform policy while the logging policies are varying in their support deficiency. Results are averaged over 10 runs and is shown in Figure 4. We investigate the behaviour of $S _ { \mathcal { D } } ( \pi | \pi _ { 0 } ) + \mathcal { D } _ { \mathcal { X } } ( \pi | \pi _ { 0 } )$ under different number of training data and different support deficiency of the corresponding logging policy. As we can see, the sum converges to 1 as the training data increases. Meanwhile, the variance decreases as shown in the right figure. For different support deficiency curves, the curve converges in a similar fashion and we conjecture it is due to the effect of clipping the propensity at the same threshold $\epsilon = 0 . 0 1$ , which makes $p _ { m i n } = 0 . 0 1$ in the bound shown in Proposition 3.
400
+
401
+ ![](images/2678c7d2bb519d2032262fa6ef15c3ce8481c96bf236def1f54a54d5ca71d2c6.jpg)
402
+ Figure 5: Model selection result for credit card fraud detection
403
+
404
+ ![](images/217e996b67f6df7a1b4bf8f2cf57d77113d0632e263176148aa1a303192a33e2.jpg)
405
+
406
+ Model selection comparison for the credit card dataset. The model selection comparison over the credit card fraud detection dataset is demonstrated in Figure 5. Similar as the trend in Figure 3, SNIPS and Conservative Extrapolation exhibit a large bias, also SNIPS even can not reflect the shape of the Oracle curve. DM and Regression Extrapolation closely track the Oracle line, and they have the best performance when used in model selection, as seen in the left table of Figure 5.
parse/train/SklcyJBtvB/SklcyJBtvB_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklcyJBtvB/SklcyJBtvB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklcyJBtvB/SklcyJBtvB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ajOrOhQOsYx/ajOrOhQOsYx_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ajOrOhQOsYx/ajOrOhQOsYx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rygG4AVFvH/rygG4AVFvH.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CHAMELEON: ADAPTIVE CODE OPTIMIZATION FOR EXPEDITED DEEP NEURAL NETWORK COMPILATION
2
+
3
+ Byung Hoon $\mathbf { A } \mathbf { h } \mathbf { n } ^ { 1 }$ , Prannoy Pilligundla1, Amir Yazdanbakhsh2, Hadi Esmaeilzadeh1
4
+
5
+ 1 University of California, San Diego
6
+ 2 Google Research
7
+ bhahn@eng.ucsd.edu, ppilligu@eng.ucsd.edu, ayazdan@google.com
8
+ hadi@eng.ucsd.edu
9
+
10
+ # ABSTRACT
11
+
12
+ Achieving faster execution with shorter compilation time can foster further diversity and innovation in neural networks. However, the current paradigm of executing neural networks either relies on hand-optimized libraries, traditional compilation heuristics, or very recently genetic algorithms and other stochastic methods. These methods suffer from frequent costly hardware measurements rendering them not only too time consuming but also suboptimal. As such, we devise a solution that can learn to quickly adapt to a previously unseen design space for code optimization, both accelerating the search and improving the output performance. This solution dubbed CHAMELEON leverages reinforcement learning whose solution takes fewer steps to converge, and develops an adaptive sampling algorithm that not only focuses on the costly samples (real hardware measurements) on representative points but also uses a domain-knowledge inspired logic to improve the samples itself. Experimentation with real hardware shows that CHAMELEON provides $4 . 4 5 \times$ speed up in optimization time over AutoTVM, while also improving inference time of the modern deep networks by $5 . 6 \%$ .
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ The enormous computational intensity of Deep Neural Networks (DNNs) have resulted in developing either hand-optimized kernels, such as NVIDIA cuDNN or Intel MKL that serve as backend for a variety of programming environment such as TensorFlow (Abadi et al., 2016) and PyTorch (Paszke et al., 2019). However, the complexity of the tensor operations in DNNs and the volatility of algorithms, which has led to unprecedented rate of innovation (LeCun, 2019), calls for developing automated compilation frameworks. To imitate or even surpass the success of hand-optimized libraries, recent research has developed stochastic optimization passes: for general code, STOKE (Schkufza et al., 2013), and neural network code, TVM (Chen et al., 2018a) and TensorComprehensions (Vasilache et al., 2018). TVM and TensorComprehensions are based on random or genetic algorithms to search the space of optimized code for neural networks. AutoTVM (Chen et al., 2018b) builds on top of TVM and leverage boosted trees (Chen & Guestrin, 2016) as part of the search cost model to avoid measuring the fitness of each solution (optimized candidate neural network code), and instead predict its fitness. However, even with these innovations the optimizing compilation time can be around 10 hours for ResNet-18 (He et al., 2016), and even more for deeper or wider networks.
17
+
18
+ Since the general objective is to unleash new possibilities by developing automatic optimization passes, long compilation time hinders innovation and could put the current solutions in a position of questionable utility. To solve this problem, we first question the very statistical guarantees which the aforementioned optimization passes rely on. The current approaches are oblivious to the patterns in the design space of schedules that are available for exploitation, and causes inefficient search or even converges to solutions that may even be suboptimal. Also, we notice that current approaches rely on greedy sampling that neglects the distribution of the candidate solutions (configurations). While greedy sampling that passively filter samples based on the fitness estimations from the cost models work, many of their hardware measurements (required for optimization) tend to be redundant and wasteful. Moreover, we found that current solutions that rely on greedy sampling lead to significant fractions of the candidate configurations being redundant over iterations, and that any optimizing compiler are prone to invalid configurations which significantly prolongs the optimization time. As such, this work sets out to present an Adaptive approach dubbed CHAMELEON to significantly reduce the compilation time and offer automation while avoiding dependence to hand-optimization, enabling far more diverse tensor operations in the next generation DNNs. We tackle this challenge from two fronts with the following contributions:
19
+
20
+ (1) Devising an Adaptive Exploration module that utilizes reinforcement learning to adapt to unseen design space of new networks to reduce search time yet achieve better performance. (2) Proposing an Adaptive Sampling algorithm that utilizes clustering to adaptively reduce the number of costly hardware measurements, and devising a domain-knowledge inspired Sample Synthesis to find configurations that would potentially yield better performance.
21
+
22
+ Real hardware experimentation with modern DNNs (AlexNet, VGG-16, and ResNet-18) on a highend GPU (Titan $\mathrm { X p }$ ), shows that the combination of these two innovations, dubbed CHAMELEON, yields $4 . 4 5 \times$ speedup over the leading framework, AutoTVM. CHAMELEON is publicly available in the project page: https://bitbucket.org/act-lab/chameleon.
23
+
24
+ # 2 CHALLENGES IN DEEP NEURAL NETWORK COMPILATION
25
+
26
+ The general life-cycle of deep learning models from its birth to deployment comprises of two major stages. First stage is the designing and the training of a deep learning model by a research scientist, with the primary goal of achieving the highest feasible accuracy. Then, with a general demand to enable the intelligence on a wide range of devices (from mobile CPUs in the edge to cloud-scale GPUs), the second stage has emerged for the deployment of the pre-trained deep learning model to a target hardware by a deployment engineer. These stages are each iterative processes: research scientists iterate until it reaches the target performance in terms of accuracy whereas the deployment engineers iterate until the performance in terms of inference speed with a given hardware satisfies the given constraints. Importantly, these two stages are most often separate processes, and this paper mainly focuses on the second stage (deployment) of the cycle with an overarching goal of accelerating the overall deployment cycle by reducing the optimizing compilation time without compromising the performance of the output code.
27
+
28
+ # 2.1 COMPILATION WORKFLOW FOR DEEP NEURAL NETWORKS
29
+
30
+ ![](images/4c1eda16cc68693383186b7adabf42830ab5f161819979c3ab152bb6ba67eb96.jpg)
31
+ Figure 1: Overview of our model compilation workflow, and highlighted is the scope of this work.
32
+
33
+ Figure 1 illustrates how a compiler for DNNs takes an input model $\mathcal { M }$ and emits an optimized code $\tau ( \bar { \Theta } ^ { * } )$ that runs the model efficiently on a given hardware. This flow is commensurate with TensorComprehensions (Vasilache et al., 2018) and TVM (Chen et al., 2018a), using which we implement CHAMELEON that is available as a separate package for adoption in even other frameworks. The first phase of the workflow is the frontend compiler which performs the translation from the compiler and applies target-independent and white-box target-dependent optimizations that do not incorporate a measure of runtime. Target-independent passes transform the input DNN model without specificity to the target hardware. Operator fusion and data layout transformation in TVM are some examples of these passes, which lie in the same category as dead-code elimination or loop-invariant code motion in GCC (Stallman & DeveloperCommunity, 2009) or LLVM (Lattner & Adve, 2004). Target-dependent passes, on the other hand, the compiler takes the hardware architecture (target) into account while optimizing the program; however, this also does not actively leverage runtime measures. The last stage is a black-box optimization pass, called optimizing compiler, that given a measure of performance at runtime from the hardware can further optimize the code. CHAMELEON falls in this class by offering an optimizing compiler that adapts to different design space to be more swift in optimizing deep neural networks compared to conventional approaches.
34
+
35
+ Table 1: Knobs in the design space to optimize convolution.
36
+
37
+ <table><tr><td>KNOBS</td><td>DEFINITION</td></tr><tr><td>tile_f, tile-y, tile_x</td><td>Factors for tiling and binding # of filters height,and width of feature maps.</td></tr><tr><td>tile_rc,tile_ry, tile_rx</td><td>Factors for tiling reduction axis such as # of channels,height,and width of filters.</td></tr><tr><td>auto_unroll_max_step</td><td>Threshold of number of steps in the loop to be automatically unrolled.</td></tr><tr><td>unroll_explicit</td><td>Explicitly unroll loop, this may let code generator to generate pragma unroll hint.</td></tr></table>
38
+
39
+ ![](images/a82336e7fd8660ed1af7676a9258e1f38a623d17fb06729397d666a7e6612433.jpg)
40
+ Figure 2: AutoTVM optimization time for ResNet-18 on Titan Xp.
41
+
42
+ # 2.2 OPTIMIZING COMPILER FOR DEEP NEURAL NETWORKS
43
+
44
+ Optimizing compilers (Kennedy & Allen, 2001) usually take a black-box approach and use hardware measurements to configure the optimization based on a measure of fitness $f$ of each solution. In order to make the problem tractable, the optimizing compilers for deep neural networks reduce the problem down to tuning the knobs $\theta$ for the output code template $\tau$ , and can be formulated as:
45
+
46
+ $$
47
+ \Theta ^ { * } = \operatorname * { a r g m a x } _ { \Theta } f ( \tau ( \Theta ) ) , \qquad \mathrm { f o r } \Theta \in \mathcal { D } _ { \Theta } .
48
+ $$
49
+
50
+ A combination of assignment to the knobs is said to be a configuration $\boldsymbol { \Theta } = ( \theta _ { 1 } , \theta _ { 2 } , . . . , \theta _ { n } )$ while the dimensions of the design space $\mathcal { D } _ { \Theta }$ is defined by the knobs. As such, in Equation 1, an optimizing compiler starts from a code template $\tau$ for each layer, and makes use of a search algorithm and real hardware measurements to efficiently find the best configuration $\Theta ^ { \ast } \in { \mathcal { D } } _ { \Theta }$ . In this context, there are three variables that determine the effectiveness of the optimizing compiler: (1) a large and diverse enough design space that covers a variety of transformations, (2) an effective search algorithm to adequately navigate this space, and (3) a mechanism to cut down the number of costly hardware measurements that check the fitness of a solution. Table 1 lists the knobs for performing convolution on a GPU, where it is crucial that the code (1) maximizes data reuse, (2) uses the shared memory wisely, and (3) minimizes bank conflicts. The knobs optimize various aspects of the execution, including tiling (e.g., tile x, tile y, . . . ), unrolling (e.g., auto unroll max step and unroll explicit), and these knobs define a design space with $1 0 ^ { 1 0 }$ possibilities. Given the vastness of the design space, the remaining challenges are designing an effective search algorithm and designing a mechanism that reduces the cost of each step in the search (i.e. reducing the need to measure the hardware).
51
+
52
+ # 2.3 CHALLENGES IN DEEP NEURAL NETWORK COMPILATION
53
+
54
+ As shown in Figure 2, optimizing compilation for DNNs may still take an eon even with the advances from prior works (Chen et al., 2018a;b; Vasilache et al., 2018) With active research (You et al., 2017; Goyal et al., 2017; Codreanu et al., 2017; Akiba et al., 2017; You et al., 2018; Mattson et al., 2019) that has been able to cut down the training time to only few hours (You et al., 2017; Goyal et al., 2017) and even minutes (You et al., 2018; Akiba et al., 2017) on big models (e.g., ResNet-50 (He et al., 2016)) for ImageNet, it renders the optimizing compilation time of the current solutions seem even more prominent. Especially, since the above-mentioned compilers have been integrated to the deep learning pipelines of major players in the industry (Liu et al., 2019; Rotem et al., 2018; Vasilache et al., 2018), many users of these pipelines including the deployment engineers must go through the compilation workflow depicted in Figure 1 numerous times. Therefore, current long compilation time can be a hindrance to deploying DNN in various hardware, hence a major bottleneck in enabling intelligence on wider range of target platforms.
55
+
56
+ Furthermore, as we explore various neural topologies (Xie et al., 2019; Wortsman et al., 2019) for better performance as illustrated in Ahn et al. (2020), even deeper or wider networks (Szegedy et al., 2015; Zagoruyko & Komodakis, 2016), and new operations (Howard et al., 2017) to achieve higher performance (LeCun, 2019), we are forced to optimize the networks more frequently. The long optimization times are multiplied with such trend, leaving the practical utility of the current compiler solutions to question. As such, the primary goal of this work is reducing the optimizing compilation time to meet the immediate needs of the industry for expedited DNN compilation to foster further diversity and innovation in designing DNNs.
57
+
58
+ ![](images/29fcf8d4209155d1093cb560684815d3387661eb22015843e0cbad9b14a22354.jpg)
59
+ Figure 3: Overall design and compilation overview of the CHAMELEON.
60
+
61
+ Such long optimization time results from the inefficiency of simulated annealing which (while it stochastically guarantees a reasonable solution after huge number of iterations) fails to capture the patterns in the design space that can be exploited during the search. On the other hand, we can see in the figure that majority of the optimization time is spent on reaching for measurements on real hardware that is used as a feedback for the aforementioned search. Also, current approach even suffers from numerous invalid configurations that not only wastes the limited hardware measurement budget that the compiler starts with, but also incurs serious overhead to reset the target hardware for subsequent hardware measurements. As such, it is important that a sampling mechanism that selects potential configurations for hardware measurements to be smarter to ensure that each measurement is maximizing the chances of achieving a good solution and that it evades the invalid configurations. However, the current approaches rely on greedy sampling that passively sample based on the estimations from the cost models. This not only has a tendency to overfit but also neglect that solutions are distributed non-uniformly and that there are numerous invalid configurations.
62
+
63
+ # 3 CHAMELEON: ADAPTIVE CODE OPTIMIZATION FOR EXPEDITED DEEP NEURAL NETWORK COMPILATION
64
+
65
+ As discussed in Section 2, current solutions fall short of providing a swift optimization framework for optimizing emergent deep neural networks, because of the futility of the search in adapting to the design space from a random walk based search algorithm and the inefficiency of the physical hardware measurements from the greedy sampling. Therefore, developing a new framework that can overcome current challenges to unfetter neural network innovation from a prolonged optimization times can be boiled down to two problems: $\textcircled{4}$ improving the the search algorithm to better adapt to the design space, and $\textcircled { \bullet }$ improving the sampling algorithm to both better adapt to the distribution of the solutions and decrease the possibility of running into invalid configurations. As such we make two innovations in the optimizing compiler for deep neural networks to develop CHAMELEON by applying reinforcement learning to the search that can adapt to new design spaces (Adaptive Exploration) and devising an Adaptive Sampling that replaces the current greedy sampling.
66
+
67
+ # 3.1 OVERALL DESIGN OF CHAMELEON
68
+
69
+ Figure 3 outlines the overall design of our optimizing compiler, dubbed CHAMELEON1, and gives an overview of the optimizing compilation process. CHAMELEON takes code template $\tau$ for each layer in the network and the corresponding design space $\mathcal { D } _ { \Theta }$ as its input, and iteratively optimizes the code for configuration $\Theta$ to finally output $\tau ( \Theta ^ { * } )$ . The proposed Adaptive Exploration maneuvers the design space while using a cost model as a proxy for hardware measurements to the output set of candidate configurations $S _ { \Theta }$ . These configurations are then sampled with Adaptive Sampling so that the sampled configurations $S _ { \Theta } ^ { \prime }$ subsume the initial candidate configurations while reducing its number significantly. The sampled configurations $S _ { \Theta } ^ { \prime }$ are then passed to the code generator which combines the input template $\tau$ and the configurations $S _ { \Theta } ^ { \prime }$ to create a set of $\tau ( \Theta )$ that are sent to real hardware for runtime measurements. Runtimes from the hardware are used as the measure of fitness $f$ and update the cost model to enhance the exploration of the subsequent iterations. After multiple iterations, $\tau ( \Theta ^ { * } )$ with the best fitness $f$ (shortest runtime) is selected as an output for the layer.
70
+
71
+ 3.2 ADAPTIVE EXPLORATION: LEARNING ABOUT THE UNSEEN DESIGN SPACE TO EXPEDITE CONVERGENCE OF OPTIMIZATION
72
+
73
+ As stated in Section 2, the current state-of-the-art approach (Chen et al., 2018b) that leverages simulated annealing relies on the stochastic guarantees of its random walks. Therefore, the current approach requires numerous iterations of exploration to converge to a reasonable solution causing long compilation hours, thus insufficient to enable disruptive innovations in neural networks. We take an inspiring approach that avoids naive dependence on the stochastic guarantee of simulated annealing and leverage a technique that can learn to adapt to unseen design space to not only accelerate convergence but also bring some performance gains. As such, we develop Adaptive Exploration by leveraging Reinforcement Learning $( R L )$ , which is concerned with learning to maximize reward given an environment by making good exploration and exploitation tradeoffs, in our case maximizing fitness $f$ of the explored configurations $S _ { \Theta }$ .
74
+
75
+ Reinforcement learning formulation. Our RL-based Adaptive Exploration module uses an actor-critic style $R L$ , where policy network learns to emit a set of directions (vector of increment/decrement/stay) for each knob in the design space that will increase $f$ of the next configuration and the value network learns the design space $\mathcal { D } _ { \Theta }$ to estimate the value of the action. The first layer of these networks that takes the current configuration $\Theta$ as input is shared to foster information sharing among the two networks, and its output is fed into the subsequent layers the networks. These networks not only learn the dependencies among the different knobs of the design space (which are interrelated) that helps our module navigate through the design space but also lean the potential gains of the modifications to the configurations.
76
+
77
+ ![](images/97d024af12ac3c4f745d8b752f71ea358c4b67e85da0a104058710f13b015c4e.jpg)
78
+ Figure 4: Adaptive Exploration Module of CHAMELEON in action.
79
+
80
+ Learning procedure. Having formulated the RL-based Adaptive Exploration Module, an iteration of our optimization begins with a set of initial configurations and takes multiple search steps (episode) for each of the configurations. As shown in Figure 4, the agent makes an action and applies it to the configuration using configuration updater to get another configuration that potentially has better $f$ . After finishing multiple search steps in the episode, all configurations $S _ { \Theta }$ are evaluated using a cost model, which its return values are used as a surrogate reward to update our agent, to reduce the number of costly hardware measurements. By taking this approach, $f$ of $S _ { \Theta }$ improves as our module progresses through the episodes. In other words, by repeating multiple episodes and iterations, our Adaptive Exploration Module gradually learns to locate good configurations.
81
+
82
+ # 3.3 ADAPTIVE SAMPLING: ADAPTING TO THE DISTRIBUTION TO REDUCE COSTLY HARDWARE MEASUREMENTS
83
+
84
+ Reducing number of costly hardware measurements. After the exploration step (regardless of the exploration method), we observe that the candidate configurations are clustered in subregions of the design space and these clusters are non-uniformly distributed (Figure 5). We also find that, while the design space’s surface is discrete and un-smooth, a large fraction of configurations within each cluster achieve similar runtime (Figure 6). Utilizing these characteristics of the design space, we devise Adaptive Sampling that can sample a new set of candidates, by adapting to the shape of the design space and the non-uniformity of the distribution while leaving the performance of optimization intact. We first leverage clustering algorithm to find configurations that are representative of each cluster; the sampling module uses centroids as the representative configurations. Our Adaptive Sampling iterates over a different number of clusters for their respective centroids and the L2 loss.
85
+
86
+ ![](images/ed941247342c26d8e1fad3ef4dd55690ccc085092361400e5fd016f0b22e4c39.jpg)
87
+ Figure 5: Clusters of candidate configurations.
88
+
89
+ ![](images/d9a9b79e18493ca91b94c446e32aee7cb3ed27107e9f4a93ee28dc4354aa45ac.jpg)
90
+ Figure 6: Cumulative Distribution Function (CDF) of the difference in runtime among the configurations in the cluster.
91
+
92
+ In the context of optimizing compiler, selecting the number of centroids for clustering entails making the important tradeoff between selecting more centroids for better performance or fewer centroids for a reduced number of hardware measurements. As such, we must devise a method that would automatically make the tradeoff in a reasonable manner. We take advantage of the decreasing trend in the aforementioned L2 loss as we increase the number of centroids, and devise a Threshold-based Swift Meta-Search to determine the number of clusters. By setting the threshold (hyperparameter) it allows the compiler to determine the point of diminishing return (knee of the curve), inflection point beyond which fewer centroids may lead to performance degradation and more clusters would prolong the optimization substantially. Overall, our sampling curtails the number of hardware measurements so that it is just enough to subsume the entire subspace of the candidate configurations.
93
+
94
+ Improving candidate configurations using sample synthesis. While the above sampling algorithm significantly reduces the number of hardware measurements compared to the conventional greedy sampling, without impacting the performance of the output code, we are still left with a critical issue of redundancy among the candidate configurations. We find that the exploration algorithm (regardless of the type) combined with the greedy sampling frequently leads to redundancy among the candidate configurations over different iterations of optimization due to the overfitting of the cost model from the greediness of the sampling. Even though the exploration algorithm tries to explore unvisited regions of the design space, these explored (not exploited) configurations are discarded due to the greedy sampling which entirely depends on the cost model for its selections of the configurations. Therefore, the current greedy sampling algorithm has its limitation in focusing the hardware measurements to the same region over and over.
95
+
96
+ On the other hand, we find that from a code optimization point of view, we know that many of the automated approaches for black-box optimization are prone to invalid configurations, which results from too large a tile that goes over the input feature map boundary or errors during memory accesses (cannot be solved analytically). These invalid configurations not only blow the chances for better exploration but also leads to an extra optimization time overhead to reset the physical hardware for the subsequent hardware measurement. We try to overcome both of these limitations by devising Sample Synthesis. When our compiler runs into redundant samples, the proposed synthesis method analyzes the candidate samples to determine the most probable (most frequent $=$ mode function) non-invalid choice for each knob to come up with a new configuration. This statistical combination of the most frequent knob settings yield configurations that combine the strengths of different knobs to converge to a better overall solution. In spirit, the recombination (crossover) operator in genetic algorithms also tries to combine the best features of the solutions with high fitness values. Algorithm 1 presents the integration of our Adaptive Sampling and the Sample Synthesis.
97
+
98
+ # 3.4 IMPLEMENTATION DETAILS
99
+
100
+ Architecture exploration for the adaptive exploration. We use Proximal Policy Optimization $( P P O )$ (Schulman et al., 2017), a policy gradient that has been shown to adapt to various problems and have good sample complexity, as our reinforcement learning algorithm. Since reinforcement learning could incur computational overhead that could prolong the optimization time, we optimize the actor-critic networks through architecture exploration to find good tradeoff for size of these networks (that determines the computational overhead) and the optimization performance.
101
+
102
+ Algorithm 1 Adaptive Sampling and Sample Synthesis
103
+
104
+ <table><tr><td>1:</td><td> procedure ADAPTIVESAMPLING(SΘ, UΘ)</td></tr><tr><td>2:</td><td>V se: candidate configs, ve: visited configs new_candidates ← @,previous_loss ←0</td></tr><tr><td>3:</td><td>for k in range(8, 64) do</td></tr><tr><td>4:</td><td>new_candidates,clusters,L2_loss ← K-means.run(se,k)</td></tr><tr><td>5:</td><td>if Threshold × L2_loss ≥ previous_loss then break&gt;Exit loop at knee of loss curve</td></tr><tr><td>6:</td><td>previous_loss ←L2_loss</td></tr><tr><td>7:</td><td>end for</td></tr><tr><td>8:</td><td>for candidate in new_candidates do Replace visited config with new config</td></tr><tr><td>9:</td><td>if candidate in ve then new_candidates.replace(candidate, mode(s@))</td></tr><tr><td>10:</td><td>end for</td></tr><tr><td>11:</td><td>return new_candidates &gt;Feed to Code Generator to make measurements on hardware end procedure</td></tr></table>
105
+
106
+ Design choices for the adaptive sampling. We use a $\kappa$ -means Clustering to determine centroids of the configurations, because $\kappa$ -means has been shown effective in practice and it only requires $\kappa$ , over error $\epsilon$ or radius in other algorithms which are much more challenging to tune. For example, DBSCAN (Ester et al., 1996) or mean-shift clustering (Comaniciu & Meer, 2002) are very sensitive to the above hyperparameters. On the other hand, $\kappa$ can be framed as a lever to balance the performance and speed of optimizing compilation which abstracts away the aforementioned challenges, enabling the Threshold-based Swift Meta-Search that identifies the optimal number of clusters.
107
+
108
+ Hyperparameter tuning. Hyperparameter tuning is a very important task in machine learningbased tools and models. As such, we present the hyperparameters we used for the evaluation in Table 7 (in appendix), which its tuning took several days. For the hyperparameters in Table 8 (in appendix), we used the same set of values that were used in the AutoTVM paper (Chen et al., 2018b) in order to conduct a fair comparison or CHAMELEON. Additionally, for parameters used in the Adaptive Exploration module, which is not present in AutoTVM, we have tuned the hyperparameters using the set of layers presented in Table 5 (in appendix). We emphasize, however, that the hyperparameters have been tuned offline before the deployment of CHAMELEON, and the hyperparameters are not changed during the use of the framework or the experimentation. So the tuning overhead is not part of the compilation after the Adaptive Exploration module is tuned once before releasing the compiler to the deployment practitioners.
109
+
110
+ # 4 EVALUATION
111
+
112
+ We integrate CHAMELEON into TVM (Chen et al., 2018a) to perform component evaluation and compare with AutoTVM (Chen et al., 2018b). We first evaluate components of CHAMELEON in Section 4.1 and Section 4.2 on set of convolution layers sampled from AlexNet (Krizhevsky et al., 2012), VGG-16 (Simonyan & Zisserman, 2015), and ResNet-18 (He et al., 2016). Then we provide end-to-end evaluation of CHAMELEON on both set of layers and end-to-end deep models, in Section 4.3. Due to space limitations, we present only the representative plots in the paper, and the complete set of results and the details of the parameters are provided in the appendix.
113
+
114
+ 4.1 ADAPTIVE EXPLORATION: IMPROVING EFFICACY OF SEARCH ALGORITHM
115
+
116
+ In the previous approach (Chen et al., 2018b), authors have built a cost model to estimate fitness instead of performing costly measurements on real hardware, then used simulated annealing to find potentially optimal configurations. Figure 7(a) compares the number of search steps taken per iteration to reach or converge to the solution in simulated annealing and Adaptive Exploration, respectively. Overall, observation is that CHAMELEON’s Adaptive Exploration requires $2 . 8 8 \times$ less search steps compared to simulated annealing to find good solution. This comes from the ability of the reinforcement learning algorithm in Adaptive Exploration Module to (1) learn the correlation between different dimensions, and (2) reuse information across different iterations, instead of starting from scratch while naively relying on the stochastic guarantees of simulated annealing process.
117
+
118
+ ![](images/9ad0ad2777e161304155b61c563bcb6dbb86606a4be75504fda18bc6925fd81c.jpg)
119
+ Figure 7: Component evaluation of CHAMELEON.
120
+
121
+ # 4.2 ADAPTIVE SAMPLING: REDUCING NUMBER OF COSTLY HARDWARE MEASUREMENTS
122
+
123
+ Figure 7(b) summarizes the effect of applying CHAMELEON’s Adaptive Sampling module on simulated annealing and reinforcement learning based search. First, the results show that using Adaptive Sampling helps the framework to make less hardware measurements regardless of the search algorithm used. The Adaptive Sampling algorithm reduces the number of measurements by $1 . 9 8 \times$ when used with simulated annealing and $2 . 3 3 \times$ with reinforcement learning One observation is that the Adaptive Sampling is more effective with reinforcement learning search. This comes from the reinforcement learning agent’s capacity to better localize the search to meaningful samples (exploitation) while still aiming to find good solution by making diverse search (exploration).
124
+
125
+ Diversity exploration of AutoTVM aims to spread out the candidate configurations with a regularizing effect that fosters uniform sampling. In contrast, our Adaptive Sampling uses a clustering algorithm to perform more measurements on the regions with higher likelihood of achieving better output performance, leading to a non-uniform sampling. While AutoTVM states that diversity-aware selection had no meaningful impact on
126
+
127
+ ![](images/80fe02a72091d19f2baf576de93c71118e759109eb64c4eccd2ecdfc04c1cc03.jpg)
128
+ Figure 8: Comparison to AutoTVM’s diversity exploration.
129
+
130
+ most of the evaluated workloads, our Adaptive Sampling brings significant improvement as depicted in Figure 8. As shown, Adaptive Sampling brings an average of $1 3 . 5 \%$ and $1 9 . 0 \%$ improvement on simulated annealing and reinforcement learning, respectively.
131
+
132
+ # 4.3 INTEGRATION: REDUCING OPTIMIZATION TIME AND OUTPUT INFERENCE TIME
133
+
134
+ CHAMELEON integrates two components into the workflow: RL-based Adaptive Exploration (AE) and Adaptive Sampling (AS). This section compares the performance of CHAMELEON with AutoTVM (Chen et al., 2018b) that leverages Simulated Annealing (SA) for its exploration.
135
+
136
+ Layer evaluation. Figure 9 shows the trend of output code performance of ResNet-18’s 11th layer over number of hardware measurements during optimization. The figure illustrates that our Adaptive Exploration finds better configurations than simulated annealing which results in better output code performance, and the Adaptive Sampling reduces number of hardware measurements significantly during optimization. Also, CHAMELEON’s Adaptive Exploration and Adaptive Sampling working in tandem emits better code with shorter optimization time than others. As such, Figure 10(a) compares optimization time and the performance of the output code in CHAMELEON and AutoTVM to confirm the observation. CHAMELEON achieved $1 . 1 7 \times$ better performance with $4 . 8 2 \times$ shorter optimization time compared to AutoTVM. Overall, the results suggest that our Adaptive Exploration effectively maneuvers the design space, and Adaptive Sampling reduces hardware measurements and the overall optimization time while even improving output performance.
137
+
138
+ ![](images/902919044cc53df38e045268760dae15b3b4e717f01247ba0a622d6db4bdd025.jpg)
139
+ Figure 9: Layer evaluation of output performance for ResNet-18’s 11th layer.
140
+
141
+ HAMELEON significantly reduces number of hardware measurements (from 800 to 392)
142
+
143
+ <table><tr><td>NETWORK</td><td>SA (AutoTVM)</td><td>AE</td><td>SA + AS</td><td>AE+ AS (CHAMELEON)</td></tr><tr><td>AlexNet</td><td>4.31 Hours</td><td>4.06 Hours</td><td>1.25 Hours</td><td>1.20 Hours</td></tr><tr><td>VGG-16</td><td>11.18 Hours</td><td>8.82 Hours</td><td>2.57 Hours</td><td>1.95 Hours</td></tr><tr><td>ResNet-18</td><td>9.13 Hours</td><td>7.39 Hours</td><td>2.14 Hours</td><td>2.13 Hours</td></tr></table>
144
+
145
+ End-to-end evaluation. Up until now, we have focused on evaluation with subset of layers. Now we continue our discussion to the applicability of CHAMELEON to optimization of end-to-end deep neural networks. Figure 10(b) shows that CHAMELEON spends $3 . 5 9 \times$ , $5 . 7 3 \times$ , and $4 . 2 8 \times$ less time than AutoTVM to optimize AlexNet, VGG-16, and ResNet-18, respectively. On average, our work shows $4 . 4 5 \times$ optimization time speedup while achieving up to $6 . 4 \%$ improvement in terms of performance of output code. Inference time in Figure 10(b) illustrates the speedup for optimized code. Raw numbers are available in Table 2 and Table 3. All in all, such improvements result from efficient Adaptive Exploration and the reduced number of hardware measurements from Adaptive Sampling.
146
+
147
+ ![](images/5bd4f96ac9884f3aa4fdc206e0be0d33f6da796de011e9711d54ecc3131f0c4e.jpg)
148
+ Figure 10: Layer and end-to-end evaluation. Dashed lines denote AutoTVM’s performance.
149
+
150
+ Table 2: End-to-end evaluation of the optimization time for deep networks.
151
+
152
+ <table><tr><td>NETWORK</td><td>SA (AutoTVM)</td><td>AE</td><td>SA + AS</td><td>AE +AS (CHAMELEON)</td></tr><tr><td>AlexNet</td><td>1.0277 ms</td><td>1.0207 ms</td><td>0.9762 ms</td><td>0.9673 ms</td></tr><tr><td>VGG-16</td><td>3.9829 ms</td><td>3.9710 ms</td><td>3.8733 ms</td><td>3.8458 ms</td></tr><tr><td>ResNet-18</td><td>1.0258 ms</td><td>0.9897 ms</td><td>0.9897 ms</td><td>0.9831 ms</td></tr></table>
153
+
154
+ Table 3: End-to-end evaluation of the output performance for deep networks.
155
+
156
+ # 5 RELATED WORKS
157
+
158
+ CHAMELEON uniquely offers a solution that exclusively enables (i) Reinforcement Learning and (ii) Sampling in the context of (iii) Optimizing Compilers for neural networks. As such, we discuss the related work from each of the three independent research directions.
159
+
160
+ Optimizing compilers. TensorComprehensions (Vasilache et al., 2018) and TVM (Chen et al., 2018a) use genetic algorithm and simulated annealing to choose parameters of polyhedral optimization for neural networks. In a more general context, some computing libraries (Whaley & Dongarra, 1998; Frigo & Johnson, 1998) make use of black box optimization and also profiling-based compilation passes (Chang et al., 1991; Novillo, 2014) utilize runtime information to generate optimized code. Later, AutoTVM (Chen et al., 2018b) incorporates learning with boosted trees within the cost model for TVM to reduce the number of real hardware measurements. While CHAMELEON is inspired and builds on these prior works, unlike them, it is based on reinforcement learning for Adaptive Exploration, and Adaptive Sampling that leverages clustering to reduce the number of measurements.
161
+
162
+ Reinforcement learning for hyper-parameter optimization. There are a growing body of studies on using reinforcement learning to perform various optimizations (Gao et al., 2018; Mirhoseini et al., 2017; Nareyek, 2003; Mao et al., 2016; Xu et al., 2018; Mao et al., 2019) for a variety of objectives including hyper-parameter optimization for neural networks. For instance, DeepArchitect (Negrinho & Gordon, 2017) and NAS (Zoph & Le, 2017) use reinforcement learning to automate the process of designing deep neural network models and their associated parameters. HAQ (Wang et al., 2019) and ReLeQ (Elthakeb et al., 2018) use reinforcement learning to chose levels of quantization for the layers of a given deep neural network. AMC (He et al., 2018) formulates neural network compression as a RL problem. A most recent effort (Paliwal et al., 2020)–which will be published concurrent to ours in ICLR 2020–combined RL with graph neural networks and genetic algorithms to optimize DNN execution. Our work exclusively explores a different problem, that is optimizing compilers using reinforcement learning.
163
+
164
+ Sampling algorithms for learning. Active learning is a broad field (Settles, 2009; Cohn et al., 1996; Sugiyama, 2006; Cai et al., 2013; Goetz et al., 2018; Wu et al., 2019) that uses a measure of the change in the model to decide which training data elements should be used to update the model. Passive learning (Yu & Kim, 2010; O’Neill et al., 2017) is an alternative view that independent of the model, analyze the distribution of the training data set and selects a subset. The Adaptive Sampling algorithm for CHAMELEON shares similarities with Passive learning but it differs in its context. The sampling is designed to reduce the number of samples (configuration) for hardware measurement from the exploration of the design space whilst performing an optimization to accelerate the process.
165
+
166
+ # 6 CONCLUSION
167
+
168
+ We present CHAMELEON to allow optimizing compilers to adapt to unseen design spaces of code schedules to reduce the optimization time. This paper is also an initial effort to bring reinforcement learning to the realm of optimizing compilers for neural networks, and we also develop an Adaptive Sampling with domain-knowledge inspired Sample Synthesis to not only reduce the number of samples required to navigate the design space but also augment its quality in terms of fitness. Experimentation with real-world deep models shows that CHAMELEON not only reduces the time for compilation significantly, but also improves the quality of the code. This encouraging result suggests a significant potential for various learning techniques to optimizing deep learning models.
169
+
170
+ # ACKNOWLEDGEMENT
171
+
172
+ We thank the anonymous reviewers for their insightful comments. We also thank Jinwon Lee and Jangho Kim for the fruitful discussions and feedbacks on the manuscript. This work was in part supported by generous gifts from Qualcomm, Google, Microsoft, and Xilinx as well as the Semiconductor Research Corporation (SRC) contract #2019-SD-2884, National Science Foundation (NSF) awards CNS#1703812, ECCS#1609823, CCF#1553192, Air Force Office of Scientific Research (AFOSR) Young Investigator Program (YIP) award #FA9550-17-1-0274, National Institute of Health (NIH) award #R01EB028350, and Air Force Research Laboratory (AFRL) and Defense Advanced Research Project Agency (DARPA) under agreement number #FA8650-20-2-7009. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of AFRL, DARPA or the U.S. Government.
173
+
174
+ # REFERENCES
175
+
176
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. TensorFlow: A system for large-scale machine learning. In OSDI, 2016.
177
+
178
+ Byung Hoon Ahn, Jinwon Lee, Jamie Menjay Lin, Hsin-Pai Cheng, Jilei Hou, and Hadi Esmaeilzadeh. Ordering chaos: Memory-aware scheduling of irregularly wired neural networks for edge devices. In MLSys, 2020.
179
+
180
+ Takuya Akiba, Shuji Suzuki, and Keisuke Fukuda. Extremely large minibatch SGD: training ResNet-50 on ImageNet in 15 minutes. arXiv, 2017. URL https://arxiv.org/pdf/1711.04325.pdf.
181
+
182
+ Wenbin Cai, Ya Zhang, and Jun Zhou. Maximizing expected model change for active learning in regression. In ICDM, 2013.
183
+
184
+ Pohua P Chang, Scott A Mahlke, and Wen-Mei W Hwu. Using profile information to assist classic code optimizations. Software: Practice and Experience, 1991.
185
+
186
+ Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. In KDD, 2016.
187
+
188
+ Tianqi Chen, Thierry Moreau, Ziheng Jiang, Lianmin Zheng, Eddie Yan, Haichen Shen, Meghan Cowan, Leyuan Wang, Yuwei Hu, Luis Ceze, et al. TVM: An automated end-to-end optimizing compiler for deep learning. In OSDI, 2018a.
189
+
190
+ Tianqi Chen, Lianmin Zheng, Eddie Yan, Ziheng Jiang, Thierry Moreau, Luis Ceze, Carlos Guestrin, and Arvind Krishnamurthy. Learning to optimize tensor programs. In NeurIPS, 2018b.
191
+
192
+ Valeriu Codreanu, Damian Podareanu, and Vikram Saletore. Achieving deep learning training in less than 40 minutes on ImageNet-1K & best accuracy and training time on ImageNet-22K & Places-365 with scale-out Intel
193
+
194
+ David A Cohn, Zoubin Ghahramani, and Michael I Jordan. Active learning with statistical models. JAIR, 1996.
195
+
196
+ Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. TPAMI, 2002.
197
+
198
+ Ahmed T Elthakeb, Prannoy Pilligundla, Amir Yazdanbakhsh, Sean Kinzer, and Hadi Esmaeilzadeh. ReLeQ: A reinforcement learning approach for deep quantization of neural networks. arXiv, 2018. URL https: //arxiv.org/pdf/1811.01704.pdf.
199
+
200
+ Martin Ester, Hans-Peter Kriegel, Jorg Sander, and Xiaowei Xu. A density-based algorithm for discovering ¨ clusters a density-based algorithm for discovering clusters in large spatial databases with noise. In KDD, 1996.
201
+
202
+ Matteo Frigo and Steven G Johnson. FFTW: An adaptive software architecture for the FFT. In ICASSP, 1998.
203
+
204
+ Yuanxiang Gao, Li Chen, and Baochun Li. Post: Device placement with cross-entropy minimization and proximal policy optimization. In NeurIPS, 2018.
205
+
206
+ Jack Goetz, Ambuj Tewari, and Paul Zimmerman. Active learning for non-parametric regression using purely random trees. In NeurIPS, 2018.
207
+
208
+ Priya Goyal, Piotr Dollar, 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, 2017. URL https://arxiv.org/pdf/1706.02677.pdf.
209
+
210
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
211
+
212
+ Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. AMC: AutoML for model compression and acceleration on mobile devices. In ECCV, 2018.
213
+
214
+ Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient convolutional neural networks for mobile vision applications. arXiv, 2017. URL https://arxiv.org/pdf/1704.04861.pdf.
215
+
216
+ Ken Kennedy and John R Allen. Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann Publishers Inc., 2001.
217
+
218
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012.
219
+
220
+ Chris Lattner and Vikram Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, 2004.
221
+
222
+ Yann LeCun. Deep learning hardware: Past, present, and future. In ISSCC, 2019.
223
+
224
+ Yizhi Liu, Yao Wang, Ruofei Yu, Mu Li, Vin Sharma, and Yida Wang. Optimizing CNN model inference on CPUs. In USENIX ATC, 2019.
225
+
226
+ Hongzi Mao, Mohammad Alizadeh, Ishai Menache, and Srikanth Kandula. Resource management with deep reinforcement learning. In HotNets, 2016.
227
+
228
+ Hongzi Mao, Malte Schwarzkopf, Shaileshh Bojja Venkatakrishnan, Zili Meng, and Mohammad Alizadeh. Learning scheduling algorithms for data processing clusters. In SIGCOMM, 2019.
229
+
230
+ Peter Mattson, Christine Cheng, Cody Coleman, Greg Diamos, Paulius Micikevicius, David Patterson, Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, et al. MLPerf training benchmark. arXiv, 2019. URL https://arxiv.org/pdf/1910.01500.pdf.
231
+
232
+ Azalia Mirhoseini, Hieu Pham, Quoc V Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeff Dean. Device placement optimization with reinforcement learning. In ICML, 2017.
233
+
234
+ Alexander Nareyek. Choosing search heuristics by non-stationary reinforcement learning. In Metaheuristics: Computer Decision-Making. Springer, 2003.
235
+
236
+ Renato Negrinho and Geoff Gordon. DeepArchitect: Automatically designing and training deep architectures. arXiv, 2017. URL https://arxiv.org/pdf/1704.08792.pdf.
237
+
238
+ Diego Novillo. SamplePGO - the power of profile guided optimizations without the usability burden. In LLVM Compiler Infrastructure in HPC, 2014.
239
+
240
+ Jack O’Neill, Sarah Jane Delany, and Brian MacNamee. Model-free and model-based active learning for regression. In Advances in Computational Intelligence Systems. Springer, 2017.
241
+
242
+ Aditya Paliwal, Felix Gimeno, Vinod Nair, Yujia Li, Miles Lubin, Pushmeet Kohli, and Oriol Vinyals. Reinforced genetic algorithm learning for optimizing computation graphs. In ICLR, 2020. URL https: //openreview.net/forum?id $=$ rkxDoJBYPB.
243
+
244
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.
245
+
246
+ Nadav Rotem, Jordan Fix, Saleem Abdulrasool, Garret Catron, Summer Deng, Roman Dzhabarov, Nick Gibson, James Hegeman, Meghan Lele, Roman Levenstein, et al. Glow: Graph lowering compiler techniques for neural networks. arXiv, 2018. URL https://arxiv.org/pdf/1805.00907.pdf.
247
+
248
+ Eric Schkufza, Rahul Sharma, and Alex Aiken. Stochastic superoptimization. In ASPLOS, 2013.
249
+
250
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv, 2017. URL https://arxiv.org/pdf/1707.06347.pdf.
251
+
252
+ Burr Settles. Active learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences, 2009.
253
+
254
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
255
+
256
+ Richard M Stallman and GCC DeveloperCommunity. Using the GNU compiler collection: a GNU manual for GCC version 4.3.3. CreateSpace, 2009.
257
+
258
+ Masashi Sugiyama. Active learning in approximately linear regression based on conditional expectation of generalization error. JMLR, 2006.
259
+
260
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015.
261
+
262
+ Nicolas Vasilache, Oleksandr Zinenko, Theodoros Theodoridis, Priya Goyal, Zachary DeVito, William S Moses, Sven Verdoolaege, Andrew Adams, and Albert Cohen. Tensor Comprehensions: Frameworkagnostic high-performance machine learning abstractions. arXiv, 2018. URL https://arxiv.org/ pdf/1802.04730.pdf.
263
+
264
+ Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. HAQ: Hardware-aware automated quantization with mixed precision. In CVPR, 2019.
265
+
266
+ R Clinton Whaley and Jack J Dongarra. Automatically tuned linear algebra software. In SC, 1998.
267
+
268
+ Mitchell Wortsman, Ali Farhadi, and Mohammad Rastegari. Discovering neural wirings. In NeurIPS, 2019.
269
+
270
+ Dongrui Wu, Chin-Teng Lin, and Jian Huang. Active learning for regression using greedy sampling. Information Sciences, 2019.
271
+
272
+ Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. In ICCV, 2019.
273
+
274
+ Zhongwen Xu, Hado P van Hasselt, and David Silver. Meta-gradient reinforcement learning. In NeurIPS, 2018.
275
+
276
+ Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv, 2017. URL https://arxiv.org/pdf/1708.03888.pdf.
277
+
278
+ Yang You, Zhao Zhang, Cho-Jui Hsieh, James Demmel, and Kurt Keutzer. ImageNet training in minutes. In ICPP, 2018.
279
+
280
+ Hwanjo Yu and Sungchul Kim. Passive sampling for regression. In ICDM, 2010.
281
+
282
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. BMVC, 2016.
283
+
284
+ Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. ICLR, 2017. URL https://openreview.net/forum?id $=$ r1Ue8Hcxg.
285
+
286
+ # APPENDIX
287
+
288
+ A EXPERIMENTAL SETUP
289
+
290
+ A.1 DNN MODELS AND LAYERS
291
+
292
+ Table 4: Details of the DNN models used in evaluating CHAMELEON.
293
+
294
+ <table><tr><td>NETWORK</td><td>DATASET</td><td>NUMBER OF TASKS</td></tr><tr><td>AlexNet</td><td>ImageNet</td><td>5</td></tr><tr><td>VGG-16</td><td>ImageNet</td><td>9</td></tr><tr><td>ResNet-18</td><td>ImageNet</td><td>12</td></tr></table>
295
+
296
+ Table 5: Details of the layers used in evaluating CHAMELEON.
297
+
298
+ <table><tr><td>NAME</td><td>MODEL</td><td>LAYER TYPE</td><td>TASK INDEX</td></tr><tr><td>L1</td><td>AlexNet</td><td>convolution</td><td>1</td></tr><tr><td>L2</td><td>AlexNet</td><td>convolution</td><td>4</td></tr><tr><td>L3</td><td>VGG-16</td><td>convolution</td><td>1</td></tr><tr><td>L4</td><td>VGG-16</td><td>convolution</td><td>2</td></tr><tr><td>L5</td><td>VGG-16</td><td>convolution</td><td>4</td></tr><tr><td>L6</td><td>ResNet-18</td><td>convolution</td><td>6</td></tr><tr><td>L7</td><td>ResNet-18</td><td>convolution</td><td>9</td></tr><tr><td>L8</td><td>ResNet-18</td><td>convolution</td><td>11</td></tr></table>
299
+
300
+ # A.2 HARDWARE SPECIFICATION
301
+
302
+ Table 6: Details of the hardware used for evaluation of CHAMELEON.
303
+
304
+ <table><tr><td>SPECIFICATIONS</td><td>DETAILS</td></tr><tr><td>GPU</td><td>Titan Xp</td></tr><tr><td>Host CPU</td><td>3.4G Hz Intel Core i7</td></tr><tr><td>Main Memory</td><td>32GB 2400 MHz DDR3</td></tr></table>
305
+
306
+ # A.3 HYPER-PARAMETERS
307
+
308
+ Table 7: Hyper-parameters uses in CHAMELEON.
309
+
310
+ <table><tr><td>HYPERPARAMETER</td><td>VALUE</td><td>DESCRIPTION</td></tr><tr><td>iterationopt</td><td>16</td><td>number of iterations for optimization process (equivalent to 1Ooo hardware measurements)</td></tr><tr><td>modeGBT bGBT</td><td>xgb-reg</td><td>type of loss used for cost model</td></tr><tr><td></td><td>64</td><td>maximum batch size of planning in GBT(Chen &amp; Guestrin,2016) cost model per iteration of optimization process</td></tr><tr><td>episoderl</td><td>128</td><td>number of episodes for reinforcement learning</td></tr><tr><td>steprl</td><td>500</td><td>maximum steps of one reinforcement learning episode</td></tr><tr><td>thresholdmeta</td><td>2.5</td><td>threshold used for meta-search in sampling</td></tr><tr><td></td><td></td><td></td></tr></table>
311
+
312
+ Table 8: Hyper-parameters uses in AutoTVM (Chen et al., 2018b).
313
+
314
+ <table><tr><td>HYPERPARAMETER</td><td>VALUE</td><td>DESCRIPTION</td></tr><tr><td>£(bGBT)</td><td>1000</td><td>totalnumber of hardwaremeasurements</td></tr><tr><td>modeGBT</td><td>xgb-reg</td><td>type of loss used for cost model</td></tr><tr><td>bGBT</td><td>64</td><td>batch size of planning in GBT(Chen&amp; Guestrin,2016)</td></tr><tr><td>nsa</td><td>128</td><td>number of Markov chains in parallel simulated annealing</td></tr><tr><td>stepsa</td><td>500</td><td>maximum steps of one simulated annealing run</td></tr></table>
315
+
316
+ Table 9: Hyper-parameters used in CHAMELEON’s PPO (Schulman et al., 2017) search agent.
317
+
318
+ <table><tr><td>HYPERPARAMETER</td><td>VALUE</td></tr><tr><td>Adam Step Size Discount Factor</td><td>1×10-3</td></tr><tr><td>GAE Parameter</td><td>0.9</td></tr><tr><td>Number of Epochs</td><td>0.99</td></tr><tr><td>Clipping Parameter</td><td>3</td></tr><tr><td>Value Coefficient</td><td>0.3</td></tr><tr><td></td><td>1.0</td></tr><tr><td>Entropy Coefficient</td><td>0.1</td></tr></table>
319
+
320
+ # B ADDITIONAL EXPERIMENTAL RESULTS
321
+
322
+ # B.1 OPTIMIZATION TIME BREAKDOWN FOR DNN MODELS
323
+
324
+ ![](images/026a53d0d37fc394dbde9ee260ed92631908ad47f92de723d2f9d7a13438b6e1.jpg)
325
+ Figure 11: AutoTVM optimization time for AlexNet (Krizhevsky et al., 2012) and VGG-16 (Simonyan & Zisserman, 2015), and ResNet-18 (He et al., 2016) on Titan Xp. Numbers in bars denote fraction of time for measurements.
326
+
327
+ ![](images/3c8b2503e8f20893f004a618595f804ee4202bdce892dd2dd37cf5019a6c7a97.jpg)
328
+ Figure 12: Layer evaluations for AlexNet (Krizhevsky et al., 2012).
329
+
330
+ ![](images/01cae0b30b91a657d3523b35270fbc77354a18f41266d34fb3123c16b6bd7b20.jpg)
331
+ Figure 13: Layer evaluations for VGG-16 (Simonyan & Zisserman, 2015).
332
+
333
+ ![](images/8d074821723c328e9d090e41a9d4a947aea4d674ac66384eb9bb3c3baedf687b.jpg)
334
+ Figure 14: Layer evaluations for ResNet-18 (He et al., 2016).
parse/train/rygG4AVFvH/rygG4AVFvH_content_list.json ADDED
@@ -0,0 +1,1827 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CHAMELEON: ADAPTIVE CODE OPTIMIZATION FOR EXPEDITED DEEP NEURAL NETWORK COMPILATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 810,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Byung Hoon $\\mathbf { A } \\mathbf { h } \\mathbf { n } ^ { 1 }$ , Prannoy Pilligundla1, Amir Yazdanbakhsh2, Hadi Esmaeilzadeh1 ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 772,
21
+ 185
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 University of California, San Diego \n2 Google Research \nbhahn@eng.ucsd.edu, ppilligu@eng.ucsd.edu, ayazdan@google.com \nhadi@eng.ucsd.edu ",
28
+ "bbox": [
29
+ 184,
30
+ 185,
31
+ 769,
32
+ 241
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 279,
43
+ 544,
44
+ 294
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Achieving faster execution with shorter compilation time can foster further diversity and innovation in neural networks. However, the current paradigm of executing neural networks either relies on hand-optimized libraries, traditional compilation heuristics, or very recently genetic algorithms and other stochastic methods. These methods suffer from frequent costly hardware measurements rendering them not only too time consuming but also suboptimal. As such, we devise a solution that can learn to quickly adapt to a previously unseen design space for code optimization, both accelerating the search and improving the output performance. This solution dubbed CHAMELEON leverages reinforcement learning whose solution takes fewer steps to converge, and develops an adaptive sampling algorithm that not only focuses on the costly samples (real hardware measurements) on representative points but also uses a domain-knowledge inspired logic to improve the samples itself. Experimentation with real hardware shows that CHAMELEON provides $4 . 4 5 \\times$ speed up in optimization time over AutoTVM, while also improving inference time of the modern deep networks by $5 . 6 \\%$ . ",
51
+ "bbox": [
52
+ 233,
53
+ 308,
54
+ 764,
55
+ 515
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 539,
66
+ 336,
67
+ 554
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The enormous computational intensity of Deep Neural Networks (DNNs) have resulted in developing either hand-optimized kernels, such as NVIDIA cuDNN or Intel MKL that serve as backend for a variety of programming environment such as TensorFlow (Abadi et al., 2016) and PyTorch (Paszke et al., 2019). However, the complexity of the tensor operations in DNNs and the volatility of algorithms, which has led to unprecedented rate of innovation (LeCun, 2019), calls for developing automated compilation frameworks. To imitate or even surpass the success of hand-optimized libraries, recent research has developed stochastic optimization passes: for general code, STOKE (Schkufza et al., 2013), and neural network code, TVM (Chen et al., 2018a) and TensorComprehensions (Vasilache et al., 2018). TVM and TensorComprehensions are based on random or genetic algorithms to search the space of optimized code for neural networks. AutoTVM (Chen et al., 2018b) builds on top of TVM and leverage boosted trees (Chen & Guestrin, 2016) as part of the search cost model to avoid measuring the fitness of each solution (optimized candidate neural network code), and instead predict its fitness. However, even with these innovations the optimizing compilation time can be around 10 hours for ResNet-18 (He et al., 2016), and even more for deeper or wider networks. ",
74
+ "bbox": [
75
+ 173,
76
+ 569,
77
+ 825,
78
+ 763
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Since the general objective is to unleash new possibilities by developing automatic optimization passes, long compilation time hinders innovation and could put the current solutions in a position of questionable utility. To solve this problem, we first question the very statistical guarantees which the aforementioned optimization passes rely on. The current approaches are oblivious to the patterns in the design space of schedules that are available for exploitation, and causes inefficient search or even converges to solutions that may even be suboptimal. Also, we notice that current approaches rely on greedy sampling that neglects the distribution of the candidate solutions (configurations). While greedy sampling that passively filter samples based on the fitness estimations from the cost models work, many of their hardware measurements (required for optimization) tend to be redundant and wasteful. Moreover, we found that current solutions that rely on greedy sampling lead to significant fractions of the candidate configurations being redundant over iterations, and that any optimizing compiler are prone to invalid configurations which significantly prolongs the optimization time. As such, this work sets out to present an Adaptive approach dubbed CHAMELEON to significantly reduce the compilation time and offer automation while avoiding dependence to hand-optimization, enabling far more diverse tensor operations in the next generation DNNs. We tackle this challenge from two fronts with the following contributions: ",
85
+ "bbox": [
86
+ 174,
87
+ 771,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 174
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "(1) Devising an Adaptive Exploration module that utilizes reinforcement learning to adapt to unseen design space of new networks to reduce search time yet achieve better performance. (2) Proposing an Adaptive Sampling algorithm that utilizes clustering to adaptively reduce the number of costly hardware measurements, and devising a domain-knowledge inspired Sample Synthesis to find configurations that would potentially yield better performance. ",
107
+ "bbox": [
108
+ 174,
109
+ 180,
110
+ 825,
111
+ 251
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Real hardware experimentation with modern DNNs (AlexNet, VGG-16, and ResNet-18) on a highend GPU (Titan $\\mathrm { X p }$ ), shows that the combination of these two innovations, dubbed CHAMELEON, yields $4 . 4 5 \\times$ speedup over the leading framework, AutoTVM. CHAMELEON is publicly available in the project page: https://bitbucket.org/act-lab/chameleon. ",
118
+ "bbox": [
119
+ 174,
120
+ 257,
121
+ 825,
122
+ 314
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 CHALLENGES IN DEEP NEURAL NETWORK COMPILATION ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 340,
133
+ 687,
134
+ 358
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "The general life-cycle of deep learning models from its birth to deployment comprises of two major stages. First stage is the designing and the training of a deep learning model by a research scientist, with the primary goal of achieving the highest feasible accuracy. Then, with a general demand to enable the intelligence on a wide range of devices (from mobile CPUs in the edge to cloud-scale GPUs), the second stage has emerged for the deployment of the pre-trained deep learning model to a target hardware by a deployment engineer. These stages are each iterative processes: research scientists iterate until it reaches the target performance in terms of accuracy whereas the deployment engineers iterate until the performance in terms of inference speed with a given hardware satisfies the given constraints. Importantly, these two stages are most often separate processes, and this paper mainly focuses on the second stage (deployment) of the cycle with an overarching goal of accelerating the overall deployment cycle by reducing the optimizing compilation time without compromising the performance of the output code. ",
141
+ "bbox": [
142
+ 173,
143
+ 377,
144
+ 825,
145
+ 544
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "2.1 COMPILATION WORKFLOW FOR DEEP NEURAL NETWORKS ",
152
+ "text_level": 1,
153
+ "bbox": [
154
+ 173,
155
+ 569,
156
+ 627,
157
+ 583
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "image",
163
+ "img_path": "images/4c1eda16cc68693383186b7adabf42830ab5f161819979c3ab152bb6ba67eb96.jpg",
164
+ "image_caption": [
165
+ "Figure 1: Overview of our model compilation workflow, and highlighted is the scope of this work. "
166
+ ],
167
+ "image_footnote": [],
168
+ "bbox": [
169
+ 243,
170
+ 607,
171
+ 753,
172
+ 657
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Figure 1 illustrates how a compiler for DNNs takes an input model $\\mathcal { M }$ and emits an optimized code $\\tau ( \\bar { \\Theta } ^ { * } )$ that runs the model efficiently on a given hardware. This flow is commensurate with TensorComprehensions (Vasilache et al., 2018) and TVM (Chen et al., 2018a), using which we implement CHAMELEON that is available as a separate package for adoption in even other frameworks. The first phase of the workflow is the frontend compiler which performs the translation from the compiler and applies target-independent and white-box target-dependent optimizations that do not incorporate a measure of runtime. Target-independent passes transform the input DNN model without specificity to the target hardware. Operator fusion and data layout transformation in TVM are some examples of these passes, which lie in the same category as dead-code elimination or loop-invariant code motion in GCC (Stallman & DeveloperCommunity, 2009) or LLVM (Lattner & Adve, 2004). Target-dependent passes, on the other hand, the compiler takes the hardware architecture (target) into account while optimizing the program; however, this also does not actively leverage runtime measures. The last stage is a black-box optimization pass, called optimizing compiler, that given a measure of performance at runtime from the hardware can further optimize the code. CHAMELEON falls in this class by offering an optimizing compiler that adapts to different design space to be more swift in optimizing deep neural networks compared to conventional approaches. ",
179
+ "bbox": [
180
+ 173,
181
+ 702,
182
+ 825,
183
+ 924
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "table",
189
+ "img_path": "images/c2e5a4dd0b08feacfb84d10506f773673ba88a1cd59ac54e25896d4a354d2118.jpg",
190
+ "table_caption": [
191
+ "Table 1: Knobs in the design space to optimize convolution. "
192
+ ],
193
+ "table_footnote": [],
194
+ "table_body": "<table><tr><td>KNOBS</td><td>DEFINITION</td></tr><tr><td>tile_f, tile-y, tile_x</td><td>Factors for tiling and binding # of filters height,and width of feature maps.</td></tr><tr><td>tile_rc,tile_ry, tile_rx</td><td>Factors for tiling reduction axis such as # of channels,height,and width of filters.</td></tr><tr><td>auto_unroll_max_step</td><td>Threshold of number of steps in the loop to be automatically unrolled.</td></tr><tr><td>unroll_explicit</td><td>Explicitly unroll loop, this may let code generator to generate pragma unroll hint.</td></tr></table>",
195
+ "bbox": [
196
+ 194,
197
+ 101,
198
+ 566,
199
+ 231
200
+ ],
201
+ "page_idx": 2
202
+ },
203
+ {
204
+ "type": "image",
205
+ "img_path": "images/a82336e7fd8660ed1af7676a9258e1f38a623d17fb06729397d666a7e6612433.jpg",
206
+ "image_caption": [
207
+ "Figure 2: AutoTVM optimization time for ResNet-18 on Titan Xp. "
208
+ ],
209
+ "image_footnote": [],
210
+ "bbox": [
211
+ 601,
212
+ 103,
213
+ 820,
214
+ 223
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "2.2 OPTIMIZING COMPILER FOR DEEP NEURAL NETWORKS ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 173,
224
+ 276,
225
+ 602,
226
+ 291
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Optimizing compilers (Kennedy & Allen, 2001) usually take a black-box approach and use hardware measurements to configure the optimization based on a measure of fitness $f$ of each solution. In order to make the problem tractable, the optimizing compilers for deep neural networks reduce the problem down to tuning the knobs $\\theta$ for the output code template $\\tau$ , and can be formulated as: ",
233
+ "bbox": [
234
+ 174,
235
+ 303,
236
+ 825,
237
+ 359
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/6e38bda066d98c27abf8ecce1932f0e2c8e4e10202b43524d3b59987121af43c.jpg",
244
+ "text": "$$\n\\Theta ^ { * } = \\operatorname * { a r g m a x } _ { \\Theta } f ( \\tau ( \\Theta ) ) , \\qquad \\mathrm { f o r } \\Theta \\in \\mathcal { D } _ { \\Theta } .\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 357,
248
+ 366,
249
+ 640,
250
+ 392
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "A combination of assignment to the knobs is said to be a configuration $\\boldsymbol { \\Theta } = ( \\theta _ { 1 } , \\theta _ { 2 } , . . . , \\theta _ { n } )$ while the dimensions of the design space $\\mathcal { D } _ { \\Theta }$ is defined by the knobs. As such, in Equation 1, an optimizing compiler starts from a code template $\\tau$ for each layer, and makes use of a search algorithm and real hardware measurements to efficiently find the best configuration $\\Theta ^ { \\ast } \\in { \\mathcal { D } } _ { \\Theta }$ . In this context, there are three variables that determine the effectiveness of the optimizing compiler: (1) a large and diverse enough design space that covers a variety of transformations, (2) an effective search algorithm to adequately navigate this space, and (3) a mechanism to cut down the number of costly hardware measurements that check the fitness of a solution. Table 1 lists the knobs for performing convolution on a GPU, where it is crucial that the code (1) maximizes data reuse, (2) uses the shared memory wisely, and (3) minimizes bank conflicts. The knobs optimize various aspects of the execution, including tiling (e.g., tile x, tile y, . . . ), unrolling (e.g., auto unroll max step and unroll explicit), and these knobs define a design space with $1 0 ^ { 1 0 }$ possibilities. Given the vastness of the design space, the remaining challenges are designing an effective search algorithm and designing a mechanism that reduces the cost of each step in the search (i.e. reducing the need to measure the hardware). ",
257
+ "bbox": [
258
+ 173,
259
+ 400,
260
+ 825,
261
+ 594
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "2.3 CHALLENGES IN DEEP NEURAL NETWORK COMPILATION ",
268
+ "text_level": 1,
269
+ "bbox": [
270
+ 174,
271
+ 612,
272
+ 616,
273
+ 627
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "As shown in Figure 2, optimizing compilation for DNNs may still take an eon even with the advances from prior works (Chen et al., 2018a;b; Vasilache et al., 2018) With active research (You et al., 2017; Goyal et al., 2017; Codreanu et al., 2017; Akiba et al., 2017; You et al., 2018; Mattson et al., 2019) that has been able to cut down the training time to only few hours (You et al., 2017; Goyal et al., 2017) and even minutes (You et al., 2018; Akiba et al., 2017) on big models (e.g., ResNet-50 (He et al., 2016)) for ImageNet, it renders the optimizing compilation time of the current solutions seem even more prominent. Especially, since the above-mentioned compilers have been integrated to the deep learning pipelines of major players in the industry (Liu et al., 2019; Rotem et al., 2018; Vasilache et al., 2018), many users of these pipelines including the deployment engineers must go through the compilation workflow depicted in Figure 1 numerous times. Therefore, current long compilation time can be a hindrance to deploying DNN in various hardware, hence a major bottleneck in enabling intelligence on wider range of target platforms. ",
280
+ "bbox": [
281
+ 174,
282
+ 638,
283
+ 825,
284
+ 805
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "Furthermore, as we explore various neural topologies (Xie et al., 2019; Wortsman et al., 2019) for better performance as illustrated in Ahn et al. (2020), even deeper or wider networks (Szegedy et al., 2015; Zagoruyko & Komodakis, 2016), and new operations (Howard et al., 2017) to achieve higher performance (LeCun, 2019), we are forced to optimize the networks more frequently. The long optimization times are multiplied with such trend, leaving the practical utility of the current compiler solutions to question. As such, the primary goal of this work is reducing the optimizing compilation time to meet the immediate needs of the industry for expedited DNN compilation to foster further diversity and innovation in designing DNNs. ",
291
+ "bbox": [
292
+ 174,
293
+ 811,
294
+ 825,
295
+ 924
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "image",
301
+ "img_path": "images/29fcf8d4209155d1093cb560684815d3387661eb22015843e0cbad9b14a22354.jpg",
302
+ "image_caption": [
303
+ "Figure 3: Overall design and compilation overview of the CHAMELEON. "
304
+ ],
305
+ "image_footnote": [],
306
+ "bbox": [
307
+ 236,
308
+ 88,
309
+ 758,
310
+ 243
311
+ ],
312
+ "page_idx": 3
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "Such long optimization time results from the inefficiency of simulated annealing which (while it stochastically guarantees a reasonable solution after huge number of iterations) fails to capture the patterns in the design space that can be exploited during the search. On the other hand, we can see in the figure that majority of the optimization time is spent on reaching for measurements on real hardware that is used as a feedback for the aforementioned search. Also, current approach even suffers from numerous invalid configurations that not only wastes the limited hardware measurement budget that the compiler starts with, but also incurs serious overhead to reset the target hardware for subsequent hardware measurements. As such, it is important that a sampling mechanism that selects potential configurations for hardware measurements to be smarter to ensure that each measurement is maximizing the chances of achieving a good solution and that it evades the invalid configurations. However, the current approaches rely on greedy sampling that passively sample based on the estimations from the cost models. This not only has a tendency to overfit but also neglect that solutions are distributed non-uniformly and that there are numerous invalid configurations. ",
317
+ "bbox": [
318
+ 173,
319
+ 287,
320
+ 825,
321
+ 468
322
+ ],
323
+ "page_idx": 3
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "3 CHAMELEON: ADAPTIVE CODE OPTIMIZATION FOR EXPEDITED DEEP NEURAL NETWORK COMPILATION ",
328
+ "text_level": 1,
329
+ "bbox": [
330
+ 174,
331
+ 489,
332
+ 637,
333
+ 523
334
+ ],
335
+ "page_idx": 3
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "As discussed in Section 2, current solutions fall short of providing a swift optimization framework for optimizing emergent deep neural networks, because of the futility of the search in adapting to the design space from a random walk based search algorithm and the inefficiency of the physical hardware measurements from the greedy sampling. Therefore, developing a new framework that can overcome current challenges to unfetter neural network innovation from a prolonged optimization times can be boiled down to two problems: $\\textcircled{4}$ improving the the search algorithm to better adapt to the design space, and $\\textcircled { \\bullet }$ improving the sampling algorithm to both better adapt to the distribution of the solutions and decrease the possibility of running into invalid configurations. As such we make two innovations in the optimizing compiler for deep neural networks to develop CHAMELEON by applying reinforcement learning to the search that can adapt to new design spaces (Adaptive Exploration) and devising an Adaptive Sampling that replaces the current greedy sampling. ",
340
+ "bbox": [
341
+ 174,
342
+ 539,
343
+ 825,
344
+ 691
345
+ ],
346
+ "page_idx": 3
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "3.1 OVERALL DESIGN OF CHAMELEON ",
351
+ "text_level": 1,
352
+ "bbox": [
353
+ 176,
354
+ 710,
355
+ 459,
356
+ 724
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Figure 3 outlines the overall design of our optimizing compiler, dubbed CHAMELEON1, and gives an overview of the optimizing compilation process. CHAMELEON takes code template $\\tau$ for each layer in the network and the corresponding design space $\\mathcal { D } _ { \\Theta }$ as its input, and iteratively optimizes the code for configuration $\\Theta$ to finally output $\\tau ( \\Theta ^ { * } )$ . The proposed Adaptive Exploration maneuvers the design space while using a cost model as a proxy for hardware measurements to the output set of candidate configurations $S _ { \\Theta }$ . These configurations are then sampled with Adaptive Sampling so that the sampled configurations $S _ { \\Theta } ^ { \\prime }$ subsume the initial candidate configurations while reducing its number significantly. The sampled configurations $S _ { \\Theta } ^ { \\prime }$ are then passed to the code generator which combines the input template $\\tau$ and the configurations $S _ { \\Theta } ^ { \\prime }$ to create a set of $\\tau ( \\Theta )$ that are sent to real hardware for runtime measurements. Runtimes from the hardware are used as the measure of fitness $f$ and update the cost model to enhance the exploration of the subsequent iterations. After multiple iterations, $\\tau ( \\Theta ^ { * } )$ with the best fitness $f$ (shortest runtime) is selected as an output for the layer. ",
363
+ "bbox": [
364
+ 173,
365
+ 736,
366
+ 825,
367
+ 876
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "",
374
+ "bbox": [
375
+ 173,
376
+ 103,
377
+ 823,
378
+ 132
379
+ ],
380
+ "page_idx": 4
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "3.2 ADAPTIVE EXPLORATION: LEARNING ABOUT THE UNSEEN DESIGN SPACE TO EXPEDITE CONVERGENCE OF OPTIMIZATION ",
385
+ "bbox": [
386
+ 174,
387
+ 151,
388
+ 758,
389
+ 179
390
+ ],
391
+ "page_idx": 4
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "As stated in Section 2, the current state-of-the-art approach (Chen et al., 2018b) that leverages simulated annealing relies on the stochastic guarantees of its random walks. Therefore, the current approach requires numerous iterations of exploration to converge to a reasonable solution causing long compilation hours, thus insufficient to enable disruptive innovations in neural networks. We take an inspiring approach that avoids naive dependence on the stochastic guarantee of simulated annealing and leverage a technique that can learn to adapt to unseen design space to not only accelerate convergence but also bring some performance gains. As such, we develop Adaptive Exploration by leveraging Reinforcement Learning $( R L )$ , which is concerned with learning to maximize reward given an environment by making good exploration and exploitation tradeoffs, in our case maximizing fitness $f$ of the explored configurations $S _ { \\Theta }$ . ",
396
+ "bbox": [
397
+ 174,
398
+ 193,
399
+ 825,
400
+ 332
401
+ ],
402
+ "page_idx": 4
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "Reinforcement learning formulation. Our RL-based Adaptive Exploration module uses an actor-critic style $R L$ , where policy network learns to emit a set of directions (vector of increment/decrement/stay) for each knob in the design space that will increase $f$ of the next configuration and the value network learns the design space $\\mathcal { D } _ { \\Theta }$ to estimate the value of the action. The first layer of these networks that takes the current configuration $\\Theta$ as input is shared to foster information sharing among the two networks, and its output is fed into the subsequent layers the networks. These networks not only learn the dependencies among the different knobs of the design space (which are interrelated) that helps our module navigate through the design space but also lean the potential gains of the modifications to the configurations. ",
407
+ "bbox": [
408
+ 174,
409
+ 348,
410
+ 825,
411
+ 474
412
+ ],
413
+ "page_idx": 4
414
+ },
415
+ {
416
+ "type": "image",
417
+ "img_path": "images/97d024af12ac3c4f745d8b752f71ea358c4b67e85da0a104058710f13b015c4e.jpg",
418
+ "image_caption": [
419
+ "Figure 4: Adaptive Exploration Module of CHAMELEON in action. "
420
+ ],
421
+ "image_footnote": [],
422
+ "bbox": [
423
+ 238,
424
+ 489,
425
+ 758,
426
+ 611
427
+ ],
428
+ "page_idx": 4
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Learning procedure. Having formulated the RL-based Adaptive Exploration Module, an iteration of our optimization begins with a set of initial configurations and takes multiple search steps (episode) for each of the configurations. As shown in Figure 4, the agent makes an action and applies it to the configuration using configuration updater to get another configuration that potentially has better $f$ . After finishing multiple search steps in the episode, all configurations $S _ { \\Theta }$ are evaluated using a cost model, which its return values are used as a surrogate reward to update our agent, to reduce the number of costly hardware measurements. By taking this approach, $f$ of $S _ { \\Theta }$ improves as our module progresses through the episodes. In other words, by repeating multiple episodes and iterations, our Adaptive Exploration Module gradually learns to locate good configurations. ",
433
+ "bbox": [
434
+ 173,
435
+ 654,
436
+ 825,
437
+ 780
438
+ ],
439
+ "page_idx": 4
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "3.3 ADAPTIVE SAMPLING: ADAPTING TO THE DISTRIBUTION TO REDUCE COSTLY HARDWARE MEASUREMENTS ",
444
+ "text_level": 1,
445
+ "bbox": [
446
+ 173,
447
+ 799,
448
+ 637,
449
+ 827
450
+ ],
451
+ "page_idx": 4
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "Reducing number of costly hardware measurements. After the exploration step (regardless of the exploration method), we observe that the candidate configurations are clustered in subregions of the design space and these clusters are non-uniformly distributed (Figure 5). We also find that, while the design space’s surface is discrete and un-smooth, a large fraction of configurations within each cluster achieve similar runtime (Figure 6). Utilizing these characteristics of the design space, we devise Adaptive Sampling that can sample a new set of candidates, by adapting to the shape of the design space and the non-uniformity of the distribution while leaving the performance of optimization intact. We first leverage clustering algorithm to find configurations that are representative of each cluster; the sampling module uses centroids as the representative configurations. Our Adaptive Sampling iterates over a different number of clusters for their respective centroids and the L2 loss. ",
456
+ "bbox": [
457
+ 174,
458
+ 840,
459
+ 825,
460
+ 924
461
+ ],
462
+ "page_idx": 4
463
+ },
464
+ {
465
+ "type": "image",
466
+ "img_path": "images/ed941247342c26d8e1fad3ef4dd55690ccc085092361400e5fd016f0b22e4c39.jpg",
467
+ "image_caption": [
468
+ "Figure 5: Clusters of candidate configurations. "
469
+ ],
470
+ "image_footnote": [],
471
+ "bbox": [
472
+ 176,
473
+ 97,
474
+ 482,
475
+ 233
476
+ ],
477
+ "page_idx": 5
478
+ },
479
+ {
480
+ "type": "image",
481
+ "img_path": "images/d9a9b79e18493ca91b94c446e32aee7cb3ed27107e9f4a93ee28dc4354aa45ac.jpg",
482
+ "image_caption": [
483
+ "Figure 6: Cumulative Distribution Function (CDF) of the difference in runtime among the configurations in the cluster. "
484
+ ],
485
+ "image_footnote": [],
486
+ "bbox": [
487
+ 509,
488
+ 94,
489
+ 807,
490
+ 208
491
+ ],
492
+ "page_idx": 5
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "",
497
+ "bbox": [
498
+ 174,
499
+ 275,
500
+ 825,
501
+ 330
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "In the context of optimizing compiler, selecting the number of centroids for clustering entails making the important tradeoff between selecting more centroids for better performance or fewer centroids for a reduced number of hardware measurements. As such, we must devise a method that would automatically make the tradeoff in a reasonable manner. We take advantage of the decreasing trend in the aforementioned L2 loss as we increase the number of centroids, and devise a Threshold-based Swift Meta-Search to determine the number of clusters. By setting the threshold (hyperparameter) it allows the compiler to determine the point of diminishing return (knee of the curve), inflection point beyond which fewer centroids may lead to performance degradation and more clusters would prolong the optimization substantially. Overall, our sampling curtails the number of hardware measurements so that it is just enough to subsume the entire subspace of the candidate configurations. ",
508
+ "bbox": [
509
+ 174,
510
+ 338,
511
+ 825,
512
+ 477
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Improving candidate configurations using sample synthesis. While the above sampling algorithm significantly reduces the number of hardware measurements compared to the conventional greedy sampling, without impacting the performance of the output code, we are still left with a critical issue of redundancy among the candidate configurations. We find that the exploration algorithm (regardless of the type) combined with the greedy sampling frequently leads to redundancy among the candidate configurations over different iterations of optimization due to the overfitting of the cost model from the greediness of the sampling. Even though the exploration algorithm tries to explore unvisited regions of the design space, these explored (not exploited) configurations are discarded due to the greedy sampling which entirely depends on the cost model for its selections of the configurations. Therefore, the current greedy sampling algorithm has its limitation in focusing the hardware measurements to the same region over and over. ",
519
+ "bbox": [
520
+ 174,
521
+ 494,
522
+ 825,
523
+ 647
524
+ ],
525
+ "page_idx": 5
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "On the other hand, we find that from a code optimization point of view, we know that many of the automated approaches for black-box optimization are prone to invalid configurations, which results from too large a tile that goes over the input feature map boundary or errors during memory accesses (cannot be solved analytically). These invalid configurations not only blow the chances for better exploration but also leads to an extra optimization time overhead to reset the physical hardware for the subsequent hardware measurement. We try to overcome both of these limitations by devising Sample Synthesis. When our compiler runs into redundant samples, the proposed synthesis method analyzes the candidate samples to determine the most probable (most frequent $=$ mode function) non-invalid choice for each knob to come up with a new configuration. This statistical combination of the most frequent knob settings yield configurations that combine the strengths of different knobs to converge to a better overall solution. In spirit, the recombination (crossover) operator in genetic algorithms also tries to combine the best features of the solutions with high fitness values. Algorithm 1 presents the integration of our Adaptive Sampling and the Sample Synthesis. ",
530
+ "bbox": [
531
+ 174,
532
+ 655,
533
+ 825,
534
+ 835
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "3.4 IMPLEMENTATION DETAILS ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 176,
544
+ 854,
545
+ 405,
546
+ 868
547
+ ],
548
+ "page_idx": 5
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "Architecture exploration for the adaptive exploration. We use Proximal Policy Optimization $( P P O )$ (Schulman et al., 2017), a policy gradient that has been shown to adapt to various problems and have good sample complexity, as our reinforcement learning algorithm. Since reinforcement learning could incur computational overhead that could prolong the optimization time, we optimize the actor-critic networks through architecture exploration to find good tradeoff for size of these networks (that determines the computational overhead) and the optimization performance. ",
553
+ "bbox": [
554
+ 176,
555
+ 882,
556
+ 823,
557
+ 924
558
+ ],
559
+ "page_idx": 5
560
+ },
561
+ {
562
+ "type": "table",
563
+ "img_path": "images/ba0f0c0e5452359556837de8f1e2bbe5e45df9f526c8ffd7fb4dd5761b9f0d1f.jpg",
564
+ "table_caption": [
565
+ "Algorithm 1 Adaptive Sampling and Sample Synthesis "
566
+ ],
567
+ "table_footnote": [],
568
+ "table_body": "<table><tr><td>1:</td><td> procedure ADAPTIVESAMPLING(SΘ, UΘ)</td></tr><tr><td>2:</td><td>V se: candidate configs, ve: visited configs new_candidates ← @,previous_loss ←0</td></tr><tr><td>3:</td><td>for k in range(8, 64) do</td></tr><tr><td>4:</td><td>new_candidates,clusters,L2_loss ← K-means.run(se,k)</td></tr><tr><td>5:</td><td>if Threshold × L2_loss ≥ previous_loss then break&gt;Exit loop at knee of loss curve</td></tr><tr><td>6:</td><td>previous_loss ←L2_loss</td></tr><tr><td>7:</td><td>end for</td></tr><tr><td>8:</td><td>for candidate in new_candidates do Replace visited config with new config</td></tr><tr><td>9:</td><td>if candidate in ve then new_candidates.replace(candidate, mode(s@))</td></tr><tr><td>10:</td><td>end for</td></tr><tr><td>11:</td><td>return new_candidates &gt;Feed to Code Generator to make measurements on hardware end procedure</td></tr></table>",
569
+ "bbox": [
570
+ 178,
571
+ 114,
572
+ 826,
573
+ 291
574
+ ],
575
+ "page_idx": 6
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "",
580
+ "bbox": [
581
+ 174,
582
+ 319,
583
+ 825,
584
+ 361
585
+ ],
586
+ "page_idx": 6
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "Design choices for the adaptive sampling. We use a $\\kappa$ -means Clustering to determine centroids of the configurations, because $\\kappa$ -means has been shown effective in practice and it only requires $\\kappa$ , over error $\\epsilon$ or radius in other algorithms which are much more challenging to tune. For example, DBSCAN (Ester et al., 1996) or mean-shift clustering (Comaniciu & Meer, 2002) are very sensitive to the above hyperparameters. On the other hand, $\\kappa$ can be framed as a lever to balance the performance and speed of optimizing compilation which abstracts away the aforementioned challenges, enabling the Threshold-based Swift Meta-Search that identifies the optimal number of clusters. ",
591
+ "bbox": [
592
+ 174,
593
+ 377,
594
+ 823,
595
+ 474
596
+ ],
597
+ "page_idx": 6
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "Hyperparameter tuning. Hyperparameter tuning is a very important task in machine learningbased tools and models. As such, we present the hyperparameters we used for the evaluation in Table 7 (in appendix), which its tuning took several days. For the hyperparameters in Table 8 (in appendix), we used the same set of values that were used in the AutoTVM paper (Chen et al., 2018b) in order to conduct a fair comparison or CHAMELEON. Additionally, for parameters used in the Adaptive Exploration module, which is not present in AutoTVM, we have tuned the hyperparameters using the set of layers presented in Table 5 (in appendix). We emphasize, however, that the hyperparameters have been tuned offline before the deployment of CHAMELEON, and the hyperparameters are not changed during the use of the framework or the experimentation. So the tuning overhead is not part of the compilation after the Adaptive Exploration module is tuned once before releasing the compiler to the deployment practitioners. ",
602
+ "bbox": [
603
+ 174,
604
+ 492,
605
+ 825,
606
+ 643
607
+ ],
608
+ "page_idx": 6
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "4 EVALUATION ",
613
+ "text_level": 1,
614
+ "bbox": [
615
+ 176,
616
+ 666,
617
+ 313,
618
+ 681
619
+ ],
620
+ "page_idx": 6
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "We integrate CHAMELEON into TVM (Chen et al., 2018a) to perform component evaluation and compare with AutoTVM (Chen et al., 2018b). We first evaluate components of CHAMELEON in Section 4.1 and Section 4.2 on set of convolution layers sampled from AlexNet (Krizhevsky et al., 2012), VGG-16 (Simonyan & Zisserman, 2015), and ResNet-18 (He et al., 2016). Then we provide end-to-end evaluation of CHAMELEON on both set of layers and end-to-end deep models, in Section 4.3. Due to space limitations, we present only the representative plots in the paper, and the complete set of results and the details of the parameters are provided in the appendix. ",
625
+ "bbox": [
626
+ 174,
627
+ 698,
628
+ 825,
629
+ 795
630
+ ],
631
+ "page_idx": 6
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "4.1 ADAPTIVE EXPLORATION: IMPROVING EFFICACY OF SEARCH ALGORITHM ",
636
+ "bbox": [
637
+ 176,
638
+ 813,
639
+ 733,
640
+ 828
641
+ ],
642
+ "page_idx": 6
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "In the previous approach (Chen et al., 2018b), authors have built a cost model to estimate fitness instead of performing costly measurements on real hardware, then used simulated annealing to find potentially optimal configurations. Figure 7(a) compares the number of search steps taken per iteration to reach or converge to the solution in simulated annealing and Adaptive Exploration, respectively. Overall, observation is that CHAMELEON’s Adaptive Exploration requires $2 . 8 8 \\times$ less search steps compared to simulated annealing to find good solution. This comes from the ability of the reinforcement learning algorithm in Adaptive Exploration Module to (1) learn the correlation between different dimensions, and (2) reuse information across different iterations, instead of starting from scratch while naively relying on the stochastic guarantees of simulated annealing process. ",
647
+ "bbox": [
648
+ 174,
649
+ 840,
650
+ 823,
651
+ 924
652
+ ],
653
+ "page_idx": 6
654
+ },
655
+ {
656
+ "type": "image",
657
+ "img_path": "images/9ad0ad2777e161304155b61c563bcb6dbb86606a4be75504fda18bc6925fd81c.jpg",
658
+ "image_caption": [
659
+ "Figure 7: Component evaluation of CHAMELEON. "
660
+ ],
661
+ "image_footnote": [],
662
+ "bbox": [
663
+ 174,
664
+ 98,
665
+ 821,
666
+ 267
667
+ ],
668
+ "page_idx": 7
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "",
673
+ "bbox": [
674
+ 174,
675
+ 300,
676
+ 825,
677
+ 342
678
+ ],
679
+ "page_idx": 7
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "4.2 ADAPTIVE SAMPLING: REDUCING NUMBER OF COSTLY HARDWARE MEASUREMENTS ",
684
+ "text_level": 1,
685
+ "bbox": [
686
+ 173,
687
+ 358,
688
+ 810,
689
+ 373
690
+ ],
691
+ "page_idx": 7
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "Figure 7(b) summarizes the effect of applying CHAMELEON’s Adaptive Sampling module on simulated annealing and reinforcement learning based search. First, the results show that using Adaptive Sampling helps the framework to make less hardware measurements regardless of the search algorithm used. The Adaptive Sampling algorithm reduces the number of measurements by $1 . 9 8 \\times$ when used with simulated annealing and $2 . 3 3 \\times$ with reinforcement learning One observation is that the Adaptive Sampling is more effective with reinforcement learning search. This comes from the reinforcement learning agent’s capacity to better localize the search to meaningful samples (exploitation) while still aiming to find good solution by making diverse search (exploration). ",
696
+ "bbox": [
697
+ 173,
698
+ 385,
699
+ 825,
700
+ 497
701
+ ],
702
+ "page_idx": 7
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "Diversity exploration of AutoTVM aims to spread out the candidate configurations with a regularizing effect that fosters uniform sampling. In contrast, our Adaptive Sampling uses a clustering algorithm to perform more measurements on the regions with higher likelihood of achieving better output performance, leading to a non-uniform sampling. While AutoTVM states that diversity-aware selection had no meaningful impact on ",
707
+ "bbox": [
708
+ 174,
709
+ 517,
710
+ 419,
711
+ 683
712
+ ],
713
+ "page_idx": 7
714
+ },
715
+ {
716
+ "type": "image",
717
+ "img_path": "images/80fe02a72091d19f2baf576de93c71118e759109eb64c4eccd2ecdfc04c1cc03.jpg",
718
+ "image_caption": [
719
+ "Figure 8: Comparison to AutoTVM’s diversity exploration. "
720
+ ],
721
+ "image_footnote": [],
722
+ "bbox": [
723
+ 446,
724
+ 515,
725
+ 805,
726
+ 656
727
+ ],
728
+ "page_idx": 7
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "most of the evaluated workloads, our Adaptive Sampling brings significant improvement as depicted in Figure 8. As shown, Adaptive Sampling brings an average of $1 3 . 5 \\%$ and $1 9 . 0 \\%$ improvement on simulated annealing and reinforcement learning, respectively. ",
733
+ "bbox": [
734
+ 174,
735
+ 684,
736
+ 825,
737
+ 726
738
+ ],
739
+ "page_idx": 7
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "4.3 INTEGRATION: REDUCING OPTIMIZATION TIME AND OUTPUT INFERENCE TIME ",
744
+ "text_level": 1,
745
+ "bbox": [
746
+ 174,
747
+ 742,
748
+ 769,
749
+ 757
750
+ ],
751
+ "page_idx": 7
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "CHAMELEON integrates two components into the workflow: RL-based Adaptive Exploration (AE) and Adaptive Sampling (AS). This section compares the performance of CHAMELEON with AutoTVM (Chen et al., 2018b) that leverages Simulated Annealing (SA) for its exploration. ",
756
+ "bbox": [
757
+ 174,
758
+ 768,
759
+ 825,
760
+ 810
761
+ ],
762
+ "page_idx": 7
763
+ },
764
+ {
765
+ "type": "text",
766
+ "text": "Layer evaluation. Figure 9 shows the trend of output code performance of ResNet-18’s 11th layer over number of hardware measurements during optimization. The figure illustrates that our Adaptive Exploration finds better configurations than simulated annealing which results in better output code performance, and the Adaptive Sampling reduces number of hardware measurements significantly during optimization. Also, CHAMELEON’s Adaptive Exploration and Adaptive Sampling working in tandem emits better code with shorter optimization time than others. As such, Figure 10(a) compares optimization time and the performance of the output code in CHAMELEON and AutoTVM to confirm the observation. CHAMELEON achieved $1 . 1 7 \\times$ better performance with $4 . 8 2 \\times$ shorter optimization time compared to AutoTVM. Overall, the results suggest that our Adaptive Exploration effectively maneuvers the design space, and Adaptive Sampling reduces hardware measurements and the overall optimization time while even improving output performance. ",
767
+ "bbox": [
768
+ 174,
769
+ 827,
770
+ 823,
771
+ 924
772
+ ],
773
+ "page_idx": 7
774
+ },
775
+ {
776
+ "type": "image",
777
+ "img_path": "images/902919044cc53df38e045268760dae15b3b4e717f01247ba0a622d6db4bdd025.jpg",
778
+ "image_caption": [
779
+ "Figure 9: Layer evaluation of output performance for ResNet-18’s 11th layer. "
780
+ ],
781
+ "image_footnote": [],
782
+ "bbox": [
783
+ 227,
784
+ 102,
785
+ 769,
786
+ 215
787
+ ],
788
+ "page_idx": 8
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "",
793
+ "bbox": [
794
+ 173,
795
+ 251,
796
+ 825,
797
+ 306
798
+ ],
799
+ "page_idx": 8
800
+ },
801
+ {
802
+ "type": "table",
803
+ "img_path": "images/f49f6ccd90c211ab039138d0baab9e8213ca2e227b2b6a5c97fe54adf73f529c.jpg",
804
+ "table_caption": [
805
+ "HAMELEON significantly reduces number of hardware measurements (from 800 to 392) "
806
+ ],
807
+ "table_footnote": [],
808
+ "table_body": "<table><tr><td>NETWORK</td><td>SA (AutoTVM)</td><td>AE</td><td>SA + AS</td><td>AE+ AS (CHAMELEON)</td></tr><tr><td>AlexNet</td><td>4.31 Hours</td><td>4.06 Hours</td><td>1.25 Hours</td><td>1.20 Hours</td></tr><tr><td>VGG-16</td><td>11.18 Hours</td><td>8.82 Hours</td><td>2.57 Hours</td><td>1.95 Hours</td></tr><tr><td>ResNet-18</td><td>9.13 Hours</td><td>7.39 Hours</td><td>2.14 Hours</td><td>2.13 Hours</td></tr></table>",
809
+ "bbox": [
810
+ 274,
811
+ 611,
812
+ 715,
813
+ 690
814
+ ],
815
+ "page_idx": 8
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "End-to-end evaluation. Up until now, we have focused on evaluation with subset of layers. Now we continue our discussion to the applicability of CHAMELEON to optimization of end-to-end deep neural networks. Figure 10(b) shows that CHAMELEON spends $3 . 5 9 \\times$ , $5 . 7 3 \\times$ , and $4 . 2 8 \\times$ less time than AutoTVM to optimize AlexNet, VGG-16, and ResNet-18, respectively. On average, our work shows $4 . 4 5 \\times$ optimization time speedup while achieving up to $6 . 4 \\%$ improvement in terms of performance of output code. Inference time in Figure 10(b) illustrates the speedup for optimized code. Raw numbers are available in Table 2 and Table 3. All in all, such improvements result from efficient Adaptive Exploration and the reduced number of hardware measurements from Adaptive Sampling. ",
820
+ "bbox": [
821
+ 173,
822
+ 321,
823
+ 825,
824
+ 434
825
+ ],
826
+ "page_idx": 8
827
+ },
828
+ {
829
+ "type": "image",
830
+ "img_path": "images/5bd4f96ac9884f3aa4fdc206e0be0d33f6da796de011e9711d54ecc3131f0c4e.jpg",
831
+ "image_caption": [
832
+ "Figure 10: Layer and end-to-end evaluation. Dashed lines denote AutoTVM’s performance. "
833
+ ],
834
+ "image_footnote": [],
835
+ "bbox": [
836
+ 179,
837
+ 445,
838
+ 810,
839
+ 578
840
+ ],
841
+ "page_idx": 8
842
+ },
843
+ {
844
+ "type": "table",
845
+ "img_path": "images/ca70579f4f7091141d0d39ecf57f6ae73c519db2a2fc82ce4327c505a2be72a1.jpg",
846
+ "table_caption": [
847
+ "Table 2: End-to-end evaluation of the optimization time for deep networks. "
848
+ ],
849
+ "table_footnote": [],
850
+ "table_body": "<table><tr><td>NETWORK</td><td>SA (AutoTVM)</td><td>AE</td><td>SA + AS</td><td>AE +AS (CHAMELEON)</td></tr><tr><td>AlexNet</td><td>1.0277 ms</td><td>1.0207 ms</td><td>0.9762 ms</td><td>0.9673 ms</td></tr><tr><td>VGG-16</td><td>3.9829 ms</td><td>3.9710 ms</td><td>3.8733 ms</td><td>3.8458 ms</td></tr><tr><td>ResNet-18</td><td>1.0258 ms</td><td>0.9897 ms</td><td>0.9897 ms</td><td>0.9831 ms</td></tr></table>",
851
+ "bbox": [
852
+ 282,
853
+ 728,
854
+ 709,
855
+ 809
856
+ ],
857
+ "page_idx": 8
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "Table 3: End-to-end evaluation of the output performance for deep networks. ",
862
+ "bbox": [
863
+ 246,
864
+ 819,
865
+ 750,
866
+ 833
867
+ ],
868
+ "page_idx": 8
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "5 RELATED WORKS ",
873
+ "text_level": 1,
874
+ "bbox": [
875
+ 176,
876
+ 849,
877
+ 354,
878
+ 866
879
+ ],
880
+ "page_idx": 8
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "CHAMELEON uniquely offers a solution that exclusively enables (i) Reinforcement Learning and (ii) Sampling in the context of (iii) Optimizing Compilers for neural networks. As such, we discuss the related work from each of the three independent research directions. ",
885
+ "bbox": [
886
+ 174,
887
+ 882,
888
+ 823,
889
+ 924
890
+ ],
891
+ "page_idx": 8
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "Optimizing compilers. TensorComprehensions (Vasilache et al., 2018) and TVM (Chen et al., 2018a) use genetic algorithm and simulated annealing to choose parameters of polyhedral optimization for neural networks. In a more general context, some computing libraries (Whaley & Dongarra, 1998; Frigo & Johnson, 1998) make use of black box optimization and also profiling-based compilation passes (Chang et al., 1991; Novillo, 2014) utilize runtime information to generate optimized code. Later, AutoTVM (Chen et al., 2018b) incorporates learning with boosted trees within the cost model for TVM to reduce the number of real hardware measurements. While CHAMELEON is inspired and builds on these prior works, unlike them, it is based on reinforcement learning for Adaptive Exploration, and Adaptive Sampling that leverages clustering to reduce the number of measurements. ",
896
+ "bbox": [
897
+ 174,
898
+ 103,
899
+ 825,
900
+ 229
901
+ ],
902
+ "page_idx": 9
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "Reinforcement learning for hyper-parameter optimization. There are a growing body of studies on using reinforcement learning to perform various optimizations (Gao et al., 2018; Mirhoseini et al., 2017; Nareyek, 2003; Mao et al., 2016; Xu et al., 2018; Mao et al., 2019) for a variety of objectives including hyper-parameter optimization for neural networks. For instance, DeepArchitect (Negrinho & Gordon, 2017) and NAS (Zoph & Le, 2017) use reinforcement learning to automate the process of designing deep neural network models and their associated parameters. HAQ (Wang et al., 2019) and ReLeQ (Elthakeb et al., 2018) use reinforcement learning to chose levels of quantization for the layers of a given deep neural network. AMC (He et al., 2018) formulates neural network compression as a RL problem. A most recent effort (Paliwal et al., 2020)–which will be published concurrent to ours in ICLR 2020–combined RL with graph neural networks and genetic algorithms to optimize DNN execution. Our work exclusively explores a different problem, that is optimizing compilers using reinforcement learning. ",
907
+ "bbox": [
908
+ 174,
909
+ 244,
910
+ 825,
911
+ 411
912
+ ],
913
+ "page_idx": 9
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Sampling algorithms for learning. Active learning is a broad field (Settles, 2009; Cohn et al., 1996; Sugiyama, 2006; Cai et al., 2013; Goetz et al., 2018; Wu et al., 2019) that uses a measure of the change in the model to decide which training data elements should be used to update the model. Passive learning (Yu & Kim, 2010; O’Neill et al., 2017) is an alternative view that independent of the model, analyze the distribution of the training data set and selects a subset. The Adaptive Sampling algorithm for CHAMELEON shares similarities with Passive learning but it differs in its context. The sampling is designed to reduce the number of samples (configuration) for hardware measurement from the exploration of the design space whilst performing an optimization to accelerate the process. ",
918
+ "bbox": [
919
+ 174,
920
+ 428,
921
+ 825,
922
+ 540
923
+ ],
924
+ "page_idx": 9
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "6 CONCLUSION ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 176,
932
+ 560,
933
+ 318,
934
+ 577
935
+ ],
936
+ "page_idx": 9
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "We present CHAMELEON to allow optimizing compilers to adapt to unseen design spaces of code schedules to reduce the optimization time. This paper is also an initial effort to bring reinforcement learning to the realm of optimizing compilers for neural networks, and we also develop an Adaptive Sampling with domain-knowledge inspired Sample Synthesis to not only reduce the number of samples required to navigate the design space but also augment its quality in terms of fitness. Experimentation with real-world deep models shows that CHAMELEON not only reduces the time for compilation significantly, but also improves the quality of the code. This encouraging result suggests a significant potential for various learning techniques to optimizing deep learning models. ",
941
+ "bbox": [
942
+ 174,
943
+ 593,
944
+ 825,
945
+ 704
946
+ ],
947
+ "page_idx": 9
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "ACKNOWLEDGEMENT ",
952
+ "text_level": 1,
953
+ "bbox": [
954
+ 176,
955
+ 727,
956
+ 357,
957
+ 741
958
+ ],
959
+ "page_idx": 9
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "We thank the anonymous reviewers for their insightful comments. We also thank Jinwon Lee and Jangho Kim for the fruitful discussions and feedbacks on the manuscript. This work was in part supported by generous gifts from Qualcomm, Google, Microsoft, and Xilinx as well as the Semiconductor Research Corporation (SRC) contract #2019-SD-2884, National Science Foundation (NSF) awards CNS#1703812, ECCS#1609823, CCF#1553192, Air Force Office of Scientific Research (AFOSR) Young Investigator Program (YIP) award #FA9550-17-1-0274, National Institute of Health (NIH) award #R01EB028350, and Air Force Research Laboratory (AFRL) and Defense Advanced Research Project Agency (DARPA) under agreement number #FA8650-20-2-7009. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of AFRL, DARPA or the U.S. Government. ",
964
+ "bbox": [
965
+ 174,
966
+ 757,
967
+ 825,
968
+ 922
969
+ ],
970
+ "page_idx": 9
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "REFERENCES ",
975
+ "text_level": 1,
976
+ "bbox": [
977
+ 174,
978
+ 103,
979
+ 287,
980
+ 117
981
+ ],
982
+ "page_idx": 10
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. TensorFlow: A system for large-scale machine learning. In OSDI, 2016. ",
987
+ "bbox": [
988
+ 174,
989
+ 125,
990
+ 825,
991
+ 162
992
+ ],
993
+ "page_idx": 10
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "Byung Hoon Ahn, Jinwon Lee, Jamie Menjay Lin, Hsin-Pai Cheng, Jilei Hou, and Hadi Esmaeilzadeh. Ordering chaos: Memory-aware scheduling of irregularly wired neural networks for edge devices. In MLSys, 2020. ",
998
+ "bbox": [
999
+ 174,
1000
+ 172,
1001
+ 825,
1002
+ 210
1003
+ ],
1004
+ "page_idx": 10
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Takuya Akiba, Shuji Suzuki, and Keisuke Fukuda. Extremely large minibatch SGD: training ResNet-50 on ImageNet in 15 minutes. arXiv, 2017. URL https://arxiv.org/pdf/1711.04325.pdf. ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 220,
1012
+ 821,
1013
+ 247
1014
+ ],
1015
+ "page_idx": 10
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "Wenbin Cai, Ya Zhang, and Jun Zhou. Maximizing expected model change for active learning in regression. In ICDM, 2013. ",
1020
+ "bbox": [
1021
+ 176,
1022
+ 256,
1023
+ 823,
1024
+ 282
1025
+ ],
1026
+ "page_idx": 10
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "Pohua P Chang, Scott A Mahlke, and Wen-Mei W Hwu. Using profile information to assist classic code optimizations. Software: Practice and Experience, 1991. ",
1031
+ "bbox": [
1032
+ 174,
1033
+ 291,
1034
+ 823,
1035
+ 319
1036
+ ],
1037
+ "page_idx": 10
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. In KDD, 2016. ",
1042
+ "bbox": [
1043
+ 173,
1044
+ 327,
1045
+ 725,
1046
+ 340
1047
+ ],
1048
+ "page_idx": 10
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Tianqi Chen, Thierry Moreau, Ziheng Jiang, Lianmin Zheng, Eddie Yan, Haichen Shen, Meghan Cowan, Leyuan Wang, Yuwei Hu, Luis Ceze, et al. TVM: An automated end-to-end optimizing compiler for deep learning. In OSDI, 2018a. ",
1053
+ "bbox": [
1054
+ 174,
1055
+ 349,
1056
+ 826,
1057
+ 388
1058
+ ],
1059
+ "page_idx": 10
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "Tianqi Chen, Lianmin Zheng, Eddie Yan, Ziheng Jiang, Thierry Moreau, Luis Ceze, Carlos Guestrin, and Arvind Krishnamurthy. Learning to optimize tensor programs. In NeurIPS, 2018b. ",
1064
+ "bbox": [
1065
+ 173,
1066
+ 398,
1067
+ 823,
1068
+ 425
1069
+ ],
1070
+ "page_idx": 10
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "Valeriu Codreanu, Damian Podareanu, and Vikram Saletore. Achieving deep learning training in less than 40 minutes on ImageNet-1K & best accuracy and training time on ImageNet-22K & Places-365 with scale-out Intel\rR Xeon\rR /Xeon PhiTM architectures, 2017. URL https://blog.surf.nl/en/ imagenet-1k-training-on-intel-xeon-phi-in-less-than-40-minutes/. ",
1075
+ "bbox": [
1076
+ 174,
1077
+ 434,
1078
+ 825,
1079
+ 486
1080
+ ],
1081
+ "page_idx": 10
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "David A Cohn, Zoubin Ghahramani, and Michael I Jordan. Active learning with statistical models. JAIR, 1996. ",
1086
+ "bbox": [
1087
+ 171,
1088
+ 494,
1089
+ 821,
1090
+ 508
1091
+ ],
1092
+ "page_idx": 10
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. TPAMI, 2002. ",
1097
+ "bbox": [
1098
+ 173,
1099
+ 517,
1100
+ 821,
1101
+ 531
1102
+ ],
1103
+ "page_idx": 10
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "Ahmed T Elthakeb, Prannoy Pilligundla, Amir Yazdanbakhsh, Sean Kinzer, and Hadi Esmaeilzadeh. ReLeQ: A reinforcement learning approach for deep quantization of neural networks. arXiv, 2018. URL https: //arxiv.org/pdf/1811.01704.pdf. ",
1108
+ "bbox": [
1109
+ 178,
1110
+ 540,
1111
+ 818,
1112
+ 579
1113
+ ],
1114
+ "page_idx": 10
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "Martin Ester, Hans-Peter Kriegel, Jorg Sander, and Xiaowei Xu. A density-based algorithm for discovering ¨ clusters a density-based algorithm for discovering clusters in large spatial databases with noise. In KDD, 1996. ",
1119
+ "bbox": [
1120
+ 173,
1121
+ 588,
1122
+ 823,
1123
+ 627
1124
+ ],
1125
+ "page_idx": 10
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "Matteo Frigo and Steven G Johnson. FFTW: An adaptive software architecture for the FFT. In ICASSP, 1998. ",
1130
+ "bbox": [
1131
+ 173,
1132
+ 636,
1133
+ 821,
1134
+ 650
1135
+ ],
1136
+ "page_idx": 10
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "Yuanxiang Gao, Li Chen, and Baochun Li. Post: Device placement with cross-entropy minimization and proximal policy optimization. In NeurIPS, 2018. ",
1141
+ "bbox": [
1142
+ 174,
1143
+ 659,
1144
+ 821,
1145
+ 685
1146
+ ],
1147
+ "page_idx": 10
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "Jack Goetz, Ambuj Tewari, and Paul Zimmerman. Active learning for non-parametric regression using purely random trees. In NeurIPS, 2018. ",
1152
+ "bbox": [
1153
+ 171,
1154
+ 694,
1155
+ 823,
1156
+ 722
1157
+ ],
1158
+ "page_idx": 10
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "Priya Goyal, Piotr Dollar, 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, 2017. URL https://arxiv.org/pdf/1706.02677.pdf. ",
1163
+ "bbox": [
1164
+ 174,
1165
+ 729,
1166
+ 823,
1167
+ 770
1168
+ ],
1169
+ "page_idx": 10
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. ",
1174
+ "bbox": [
1175
+ 171,
1176
+ 779,
1177
+ 823,
1178
+ 804
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. AMC: AutoML for model compression and acceleration on mobile devices. In ECCV, 2018. ",
1185
+ "bbox": [
1186
+ 169,
1187
+ 814,
1188
+ 825,
1189
+ 840
1190
+ ],
1191
+ "page_idx": 10
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient convolutional neural networks for mobile vision applications. arXiv, 2017. URL https://arxiv.org/pdf/1704.04861.pdf. ",
1196
+ "bbox": [
1197
+ 173,
1198
+ 849,
1199
+ 821,
1200
+ 888
1201
+ ],
1202
+ "page_idx": 10
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Ken Kennedy and John R Allen. Optimizing compilers for modern architectures: a dependence-based approach. Morgan Kaufmann Publishers Inc., 2001. ",
1207
+ "bbox": [
1208
+ 173,
1209
+ 897,
1210
+ 825,
1211
+ 924
1212
+ ],
1213
+ "page_idx": 10
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 103,
1221
+ 823,
1222
+ 131
1223
+ ],
1224
+ "page_idx": 11
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Chris Lattner and Vikram Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, 2004. ",
1229
+ "bbox": [
1230
+ 173,
1231
+ 140,
1232
+ 823,
1233
+ 167
1234
+ ],
1235
+ "page_idx": 11
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "Yann LeCun. Deep learning hardware: Past, present, and future. In ISSCC, 2019. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 175,
1243
+ 656,
1244
+ 190
1245
+ ],
1246
+ "page_idx": 11
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "Yizhi Liu, Yao Wang, Ruofei Yu, Mu Li, Vin Sharma, and Yida Wang. Optimizing CNN model inference on CPUs. In USENIX ATC, 2019. ",
1251
+ "bbox": [
1252
+ 176,
1253
+ 199,
1254
+ 823,
1255
+ 227
1256
+ ],
1257
+ "page_idx": 11
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "Hongzi Mao, Mohammad Alizadeh, Ishai Menache, and Srikanth Kandula. Resource management with deep reinforcement learning. In HotNets, 2016. ",
1262
+ "bbox": [
1263
+ 171,
1264
+ 234,
1265
+ 823,
1266
+ 262
1267
+ ],
1268
+ "page_idx": 11
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "Hongzi Mao, Malte Schwarzkopf, Shaileshh Bojja Venkatakrishnan, Zili Meng, and Mohammad Alizadeh. Learning scheduling algorithms for data processing clusters. In SIGCOMM, 2019. ",
1273
+ "bbox": [
1274
+ 171,
1275
+ 271,
1276
+ 821,
1277
+ 299
1278
+ ],
1279
+ "page_idx": 11
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "Peter Mattson, Christine Cheng, Cody Coleman, Greg Diamos, Paulius Micikevicius, David Patterson, Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, et al. MLPerf training benchmark. arXiv, 2019. URL https://arxiv.org/pdf/1910.01500.pdf. ",
1284
+ "bbox": [
1285
+ 174,
1286
+ 306,
1287
+ 823,
1288
+ 347
1289
+ ],
1290
+ "page_idx": 11
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "Azalia Mirhoseini, Hieu Pham, Quoc V Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeff Dean. Device placement optimization with reinforcement learning. In ICML, 2017. ",
1295
+ "bbox": [
1296
+ 171,
1297
+ 356,
1298
+ 821,
1299
+ 395
1300
+ ],
1301
+ "page_idx": 11
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "Alexander Nareyek. Choosing search heuristics by non-stationary reinforcement learning. In Metaheuristics: Computer Decision-Making. Springer, 2003. ",
1306
+ "bbox": [
1307
+ 171,
1308
+ 404,
1309
+ 823,
1310
+ 431
1311
+ ],
1312
+ "page_idx": 11
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Renato Negrinho and Geoff Gordon. DeepArchitect: Automatically designing and training deep architectures. arXiv, 2017. URL https://arxiv.org/pdf/1704.08792.pdf. ",
1317
+ "bbox": [
1318
+ 169,
1319
+ 440,
1320
+ 821,
1321
+ 468
1322
+ ],
1323
+ "page_idx": 11
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "Diego Novillo. SamplePGO - the power of profile guided optimizations without the usability burden. In LLVM Compiler Infrastructure in HPC, 2014. ",
1328
+ "bbox": [
1329
+ 173,
1330
+ 477,
1331
+ 823,
1332
+ 503
1333
+ ],
1334
+ "page_idx": 11
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "Jack O’Neill, Sarah Jane Delany, and Brian MacNamee. Model-free and model-based active learning for regression. In Advances in Computational Intelligence Systems. Springer, 2017. ",
1339
+ "bbox": [
1340
+ 173,
1341
+ 512,
1342
+ 825,
1343
+ 540
1344
+ ],
1345
+ "page_idx": 11
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "Aditya Paliwal, Felix Gimeno, Vinod Nair, Yujia Li, Miles Lubin, Pushmeet Kohli, and Oriol Vinyals. Reinforced genetic algorithm learning for optimizing computation graphs. In ICLR, 2020. URL https: //openreview.net/forum?id $=$ rkxDoJBYPB. ",
1350
+ "bbox": [
1351
+ 173,
1352
+ 547,
1353
+ 821,
1354
+ 588
1355
+ ],
1356
+ "page_idx": 11
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019. ",
1361
+ "bbox": [
1362
+ 173,
1363
+ 597,
1364
+ 823,
1365
+ 636
1366
+ ],
1367
+ "page_idx": 11
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "Nadav Rotem, Jordan Fix, Saleem Abdulrasool, Garret Catron, Summer Deng, Roman Dzhabarov, Nick Gibson, James Hegeman, Meghan Lele, Roman Levenstein, et al. Glow: Graph lowering compiler techniques for neural networks. arXiv, 2018. URL https://arxiv.org/pdf/1805.00907.pdf. ",
1372
+ "bbox": [
1373
+ 174,
1374
+ 645,
1375
+ 823,
1376
+ 685
1377
+ ],
1378
+ "page_idx": 11
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "Eric Schkufza, Rahul Sharma, and Alex Aiken. Stochastic superoptimization. In ASPLOS, 2013. ",
1383
+ "bbox": [
1384
+ 173,
1385
+ 694,
1386
+ 745,
1387
+ 708
1388
+ ],
1389
+ "page_idx": 11
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv, 2017. URL https://arxiv.org/pdf/1707.06347.pdf. ",
1394
+ "bbox": [
1395
+ 173,
1396
+ 717,
1397
+ 821,
1398
+ 744
1399
+ ],
1400
+ "page_idx": 11
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "Burr Settles. Active learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences, 2009. ",
1405
+ "bbox": [
1406
+ 173,
1407
+ 752,
1408
+ 823,
1409
+ 780
1410
+ ],
1411
+ "page_idx": 11
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. ",
1416
+ "bbox": [
1417
+ 173,
1418
+ 789,
1419
+ 821,
1420
+ 816
1421
+ ],
1422
+ "page_idx": 11
1423
+ },
1424
+ {
1425
+ "type": "text",
1426
+ "text": "Richard M Stallman and GCC DeveloperCommunity. Using the GNU compiler collection: a GNU manual for GCC version 4.3.3. CreateSpace, 2009. ",
1427
+ "bbox": [
1428
+ 173,
1429
+ 824,
1430
+ 823,
1431
+ 852
1432
+ ],
1433
+ "page_idx": 11
1434
+ },
1435
+ {
1436
+ "type": "text",
1437
+ "text": "Masashi Sugiyama. Active learning in approximately linear regression based on conditional expectation of generalization error. JMLR, 2006. ",
1438
+ "bbox": [
1439
+ 173,
1440
+ 861,
1441
+ 823,
1442
+ 888
1443
+ ],
1444
+ "page_idx": 11
1445
+ },
1446
+ {
1447
+ "type": "text",
1448
+ "text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. ",
1449
+ "bbox": [
1450
+ 173,
1451
+ 897,
1452
+ 826,
1453
+ 924
1454
+ ],
1455
+ "page_idx": 11
1456
+ },
1457
+ {
1458
+ "type": "text",
1459
+ "text": "Nicolas Vasilache, Oleksandr Zinenko, Theodoros Theodoridis, Priya Goyal, Zachary DeVito, William S Moses, Sven Verdoolaege, Andrew Adams, and Albert Cohen. Tensor Comprehensions: Frameworkagnostic high-performance machine learning abstractions. arXiv, 2018. URL https://arxiv.org/ pdf/1802.04730.pdf. ",
1460
+ "bbox": [
1461
+ 174,
1462
+ 103,
1463
+ 825,
1464
+ 156
1465
+ ],
1466
+ "page_idx": 12
1467
+ },
1468
+ {
1469
+ "type": "text",
1470
+ "text": "Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. HAQ: Hardware-aware automated quantization with mixed precision. In CVPR, 2019. ",
1471
+ "bbox": [
1472
+ 173,
1473
+ 165,
1474
+ 823,
1475
+ 191
1476
+ ],
1477
+ "page_idx": 12
1478
+ },
1479
+ {
1480
+ "type": "text",
1481
+ "text": "R Clinton Whaley and Jack J Dongarra. Automatically tuned linear algebra software. In SC, 1998. ",
1482
+ "bbox": [
1483
+ 173,
1484
+ 199,
1485
+ 756,
1486
+ 214
1487
+ ],
1488
+ "page_idx": 12
1489
+ },
1490
+ {
1491
+ "type": "text",
1492
+ "text": "Mitchell Wortsman, Ali Farhadi, and Mohammad Rastegari. Discovering neural wirings. In NeurIPS, 2019. ",
1493
+ "bbox": [
1494
+ 174,
1495
+ 222,
1496
+ 807,
1497
+ 237
1498
+ ],
1499
+ "page_idx": 12
1500
+ },
1501
+ {
1502
+ "type": "text",
1503
+ "text": "Dongrui Wu, Chin-Teng Lin, and Jian Huang. Active learning for regression using greedy sampling. Information Sciences, 2019. ",
1504
+ "bbox": [
1505
+ 173,
1506
+ 244,
1507
+ 823,
1508
+ 272
1509
+ ],
1510
+ "page_idx": 12
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. In ICCV, 2019. ",
1515
+ "bbox": [
1516
+ 174,
1517
+ 280,
1518
+ 821,
1519
+ 306
1520
+ ],
1521
+ "page_idx": 12
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "Zhongwen Xu, Hado P van Hasselt, and David Silver. Meta-gradient reinforcement learning. In NeurIPS, 2018. ",
1526
+ "bbox": [
1527
+ 173,
1528
+ 315,
1529
+ 823,
1530
+ 330
1531
+ ],
1532
+ "page_idx": 12
1533
+ },
1534
+ {
1535
+ "type": "text",
1536
+ "text": "Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv, 2017. URL https://arxiv.org/pdf/1708.03888.pdf. ",
1537
+ "bbox": [
1538
+ 176,
1539
+ 338,
1540
+ 823,
1541
+ 364
1542
+ ],
1543
+ "page_idx": 12
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "Yang You, Zhao Zhang, Cho-Jui Hsieh, James Demmel, and Kurt Keutzer. ImageNet training in minutes. In ICPP, 2018. ",
1548
+ "bbox": [
1549
+ 174,
1550
+ 373,
1551
+ 826,
1552
+ 400
1553
+ ],
1554
+ "page_idx": 12
1555
+ },
1556
+ {
1557
+ "type": "text",
1558
+ "text": "Hwanjo Yu and Sungchul Kim. Passive sampling for regression. In ICDM, 2010. ",
1559
+ "bbox": [
1560
+ 174,
1561
+ 409,
1562
+ 655,
1563
+ 422
1564
+ ],
1565
+ "page_idx": 12
1566
+ },
1567
+ {
1568
+ "type": "text",
1569
+ "text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. BMVC, 2016. ",
1570
+ "bbox": [
1571
+ 174,
1572
+ 431,
1573
+ 655,
1574
+ 445
1575
+ ],
1576
+ "page_idx": 12
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. ICLR, 2017. URL https://openreview.net/forum?id $=$ r1Ue8Hcxg. ",
1581
+ "bbox": [
1582
+ 176,
1583
+ 454,
1584
+ 823,
1585
+ 481
1586
+ ],
1587
+ "page_idx": 12
1588
+ },
1589
+ {
1590
+ "type": "text",
1591
+ "text": "APPENDIX ",
1592
+ "text_level": 1,
1593
+ "bbox": [
1594
+ 176,
1595
+ 102,
1596
+ 264,
1597
+ 118
1598
+ ],
1599
+ "page_idx": 13
1600
+ },
1601
+ {
1602
+ "type": "text",
1603
+ "text": "A EXPERIMENTAL SETUP ",
1604
+ "bbox": [
1605
+ 176,
1606
+ 135,
1607
+ 405,
1608
+ 152
1609
+ ],
1610
+ "page_idx": 13
1611
+ },
1612
+ {
1613
+ "type": "text",
1614
+ "text": "A.1 DNN MODELS AND LAYERS ",
1615
+ "bbox": [
1616
+ 174,
1617
+ 166,
1618
+ 416,
1619
+ 181
1620
+ ],
1621
+ "page_idx": 13
1622
+ },
1623
+ {
1624
+ "type": "table",
1625
+ "img_path": "images/1f4b9e5e2139f8aea12a8b1c0cfa48d7fa165cc7ca2b1a98d173ffb34c503183.jpg",
1626
+ "table_caption": [
1627
+ "Table 4: Details of the DNN models used in evaluating CHAMELEON. "
1628
+ ],
1629
+ "table_footnote": [],
1630
+ "table_body": "<table><tr><td>NETWORK</td><td>DATASET</td><td>NUMBER OF TASKS</td></tr><tr><td>AlexNet</td><td>ImageNet</td><td>5</td></tr><tr><td>VGG-16</td><td>ImageNet</td><td>9</td></tr><tr><td>ResNet-18</td><td>ImageNet</td><td>12</td></tr></table>",
1631
+ "bbox": [
1632
+ 344,
1633
+ 229,
1634
+ 651,
1635
+ 296
1636
+ ],
1637
+ "page_idx": 13
1638
+ },
1639
+ {
1640
+ "type": "table",
1641
+ "img_path": "images/51615402d54a7b4125395cfc793ce077919a4bdac41bb9811ad6e61dc1f91fdb.jpg",
1642
+ "table_caption": [
1643
+ "Table 5: Details of the layers used in evaluating CHAMELEON. "
1644
+ ],
1645
+ "table_footnote": [],
1646
+ "table_body": "<table><tr><td>NAME</td><td>MODEL</td><td>LAYER TYPE</td><td>TASK INDEX</td></tr><tr><td>L1</td><td>AlexNet</td><td>convolution</td><td>1</td></tr><tr><td>L2</td><td>AlexNet</td><td>convolution</td><td>4</td></tr><tr><td>L3</td><td>VGG-16</td><td>convolution</td><td>1</td></tr><tr><td>L4</td><td>VGG-16</td><td>convolution</td><td>2</td></tr><tr><td>L5</td><td>VGG-16</td><td>convolution</td><td>4</td></tr><tr><td>L6</td><td>ResNet-18</td><td>convolution</td><td>6</td></tr><tr><td>L7</td><td>ResNet-18</td><td>convolution</td><td>9</td></tr><tr><td>L8</td><td>ResNet-18</td><td>convolution</td><td>11</td></tr></table>",
1647
+ "bbox": [
1648
+ 326,
1649
+ 363,
1650
+ 669,
1651
+ 492
1652
+ ],
1653
+ "page_idx": 13
1654
+ },
1655
+ {
1656
+ "type": "text",
1657
+ "text": "A.2 HARDWARE SPECIFICATION",
1658
+ "text_level": 1,
1659
+ "bbox": [
1660
+ 176,
1661
+ 522,
1662
+ 411,
1663
+ 537
1664
+ ],
1665
+ "page_idx": 13
1666
+ },
1667
+ {
1668
+ "type": "table",
1669
+ "img_path": "images/39f0387a3536ecfabd68083e103df74299ebe51fca4f6e995f879cab9e1e0c17.jpg",
1670
+ "table_caption": [
1671
+ "Table 6: Details of the hardware used for evaluation of CHAMELEON. "
1672
+ ],
1673
+ "table_footnote": [],
1674
+ "table_body": "<table><tr><td>SPECIFICATIONS</td><td>DETAILS</td></tr><tr><td>GPU</td><td>Titan Xp</td></tr><tr><td>Host CPU</td><td>3.4G Hz Intel Core i7</td></tr><tr><td>Main Memory</td><td>32GB 2400 MHz DDR3</td></tr></table>",
1675
+ "bbox": [
1676
+ 354,
1677
+ 583,
1678
+ 643,
1679
+ 650
1680
+ ],
1681
+ "page_idx": 13
1682
+ },
1683
+ {
1684
+ "type": "text",
1685
+ "text": "A.3 HYPER-PARAMETERS ",
1686
+ "text_level": 1,
1687
+ "bbox": [
1688
+ 176,
1689
+ 104,
1690
+ 367,
1691
+ 117
1692
+ ],
1693
+ "page_idx": 14
1694
+ },
1695
+ {
1696
+ "type": "table",
1697
+ "img_path": "images/eab548784d37517f4ceb800bdbdcb7b6747845330e0f86233dcd272f731a93cf.jpg",
1698
+ "table_caption": [
1699
+ "Table 7: Hyper-parameters uses in CHAMELEON. "
1700
+ ],
1701
+ "table_footnote": [],
1702
+ "table_body": "<table><tr><td>HYPERPARAMETER</td><td>VALUE</td><td>DESCRIPTION</td></tr><tr><td>iterationopt</td><td>16</td><td>number of iterations for optimization process (equivalent to 1Ooo hardware measurements)</td></tr><tr><td>modeGBT bGBT</td><td>xgb-reg</td><td>type of loss used for cost model</td></tr><tr><td></td><td>64</td><td>maximum batch size of planning in GBT(Chen &amp; Guestrin,2016) cost model per iteration of optimization process</td></tr><tr><td>episoderl</td><td>128</td><td>number of episodes for reinforcement learning</td></tr><tr><td>steprl</td><td>500</td><td>maximum steps of one reinforcement learning episode</td></tr><tr><td>thresholdmeta</td><td>2.5</td><td>threshold used for meta-search in sampling</td></tr><tr><td></td><td></td><td></td></tr></table>",
1703
+ "bbox": [
1704
+ 191,
1705
+ 165,
1706
+ 807,
1707
+ 296
1708
+ ],
1709
+ "page_idx": 14
1710
+ },
1711
+ {
1712
+ "type": "table",
1713
+ "img_path": "images/b4cb30e55c7f5113d4da6353493ce0bd64e828363fb677a7294e655ec60e2b5c.jpg",
1714
+ "table_caption": [
1715
+ "Table 8: Hyper-parameters uses in AutoTVM (Chen et al., 2018b). "
1716
+ ],
1717
+ "table_footnote": [],
1718
+ "table_body": "<table><tr><td>HYPERPARAMETER</td><td>VALUE</td><td>DESCRIPTION</td></tr><tr><td>£(bGBT)</td><td>1000</td><td>totalnumber of hardwaremeasurements</td></tr><tr><td>modeGBT</td><td>xgb-reg</td><td>type of loss used for cost model</td></tr><tr><td>bGBT</td><td>64</td><td>batch size of planning in GBT(Chen&amp; Guestrin,2016)</td></tr><tr><td>nsa</td><td>128</td><td>number of Markov chains in parallel simulated annealing</td></tr><tr><td>stepsa</td><td>500</td><td>maximum steps of one simulated annealing run</td></tr></table>",
1719
+ "bbox": [
1720
+ 218,
1721
+ 362,
1722
+ 779,
1723
+ 454
1724
+ ],
1725
+ "page_idx": 14
1726
+ },
1727
+ {
1728
+ "type": "table",
1729
+ "img_path": "images/e887780cd91b6b8d0629642ce2ecdde3521610a9257416b939239f4a68ca4af4.jpg",
1730
+ "table_caption": [
1731
+ "Table 9: Hyper-parameters used in CHAMELEON’s PPO (Schulman et al., 2017) search agent. "
1732
+ ],
1733
+ "table_footnote": [],
1734
+ "table_body": "<table><tr><td>HYPERPARAMETER</td><td>VALUE</td></tr><tr><td>Adam Step Size Discount Factor</td><td>1×10-3</td></tr><tr><td>GAE Parameter</td><td>0.9</td></tr><tr><td>Number of Epochs</td><td>0.99</td></tr><tr><td>Clipping Parameter</td><td>3</td></tr><tr><td>Value Coefficient</td><td>0.3</td></tr><tr><td></td><td>1.0</td></tr><tr><td>Entropy Coefficient</td><td>0.1</td></tr></table>",
1735
+ "bbox": [
1736
+ 388,
1737
+ 520,
1738
+ 609,
1739
+ 638
1740
+ ],
1741
+ "page_idx": 14
1742
+ },
1743
+ {
1744
+ "type": "text",
1745
+ "text": "B ADDITIONAL EXPERIMENTAL RESULTS ",
1746
+ "text_level": 1,
1747
+ "bbox": [
1748
+ 174,
1749
+ 102,
1750
+ 537,
1751
+ 118
1752
+ ],
1753
+ "page_idx": 15
1754
+ },
1755
+ {
1756
+ "type": "text",
1757
+ "text": "B.1 OPTIMIZATION TIME BREAKDOWN FOR DNN MODELS ",
1758
+ "text_level": 1,
1759
+ "bbox": [
1760
+ 174,
1761
+ 133,
1762
+ 601,
1763
+ 148
1764
+ ],
1765
+ "page_idx": 15
1766
+ },
1767
+ {
1768
+ "type": "image",
1769
+ "img_path": "images/026a53d0d37fc394dbde9ee260ed92631908ad47f92de723d2f9d7a13438b6e1.jpg",
1770
+ "image_caption": [
1771
+ "Figure 11: AutoTVM optimization time for AlexNet (Krizhevsky et al., 2012) and VGG-16 (Simonyan & Zisserman, 2015), and ResNet-18 (He et al., 2016) on Titan Xp. Numbers in bars denote fraction of time for measurements. "
1772
+ ],
1773
+ "image_footnote": [],
1774
+ "bbox": [
1775
+ 174,
1776
+ 165,
1777
+ 818,
1778
+ 305
1779
+ ],
1780
+ "page_idx": 15
1781
+ },
1782
+ {
1783
+ "type": "image",
1784
+ "img_path": "images/3c8b2503e8f20893f004a618595f804ee4202bdce892dd2dd37cf5019a6c7a97.jpg",
1785
+ "image_caption": [
1786
+ "Figure 12: Layer evaluations for AlexNet (Krizhevsky et al., 2012). "
1787
+ ],
1788
+ "image_footnote": [],
1789
+ "bbox": [
1790
+ 181,
1791
+ 468,
1792
+ 812,
1793
+ 655
1794
+ ],
1795
+ "page_idx": 15
1796
+ },
1797
+ {
1798
+ "type": "image",
1799
+ "img_path": "images/01cae0b30b91a657d3523b35270fbc77354a18f41266d34fb3123c16b6bd7b20.jpg",
1800
+ "image_caption": [
1801
+ "Figure 13: Layer evaluations for VGG-16 (Simonyan & Zisserman, 2015). "
1802
+ ],
1803
+ "image_footnote": [],
1804
+ "bbox": [
1805
+ 181,
1806
+ 99,
1807
+ 813,
1808
+ 369
1809
+ ],
1810
+ "page_idx": 16
1811
+ },
1812
+ {
1813
+ "type": "image",
1814
+ "img_path": "images/8d074821723c328e9d090e41a9d4a947aea4d674ac66384eb9bb3c3baedf687b.jpg",
1815
+ "image_caption": [
1816
+ "Figure 14: Layer evaluations for ResNet-18 (He et al., 2016). "
1817
+ ],
1818
+ "image_footnote": [],
1819
+ "bbox": [
1820
+ 183,
1821
+ 476,
1822
+ 813,
1823
+ 828
1824
+ ],
1825
+ "page_idx": 16
1826
+ }
1827
+ ]
parse/train/rygG4AVFvH/rygG4AVFvH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rygG4AVFvH/rygG4AVFvH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/2LdBqxc1Yv/0.png ADDED

Git LFS Details

  • SHA256: 1c032cbb6793f68644beb9cd8c0c13450da169e87b0208c9d571deac5900134c
  • Pointer size: 131 Bytes
  • Size of remote file: 426 kB
vlm/train/2LdBqxc1Yv/1.png ADDED

Git LFS Details

  • SHA256: 7e87aef5ba5bbe3ff5ddbf1e51acf93b41cff7fb167c07e8e98927b9cf2be762
  • Pointer size: 131 Bytes
  • Size of remote file: 505 kB
vlm/train/2LdBqxc1Yv/10.png ADDED

Git LFS Details

  • SHA256: 08c4a89fc68b8b5129c50411796f8459083c17c127bd07d16d6b4fde18beaee2
  • Pointer size: 131 Bytes
  • Size of remote file: 546 kB
vlm/train/2LdBqxc1Yv/11.png ADDED

Git LFS Details

  • SHA256: 3b0fd5869e586b48487ebdf48fe601ee431328e42b0ee9f4490e55ef43f62359
  • Pointer size: 131 Bytes
  • Size of remote file: 187 kB
vlm/train/2LdBqxc1Yv/2.png ADDED

Git LFS Details

  • SHA256: 821e0980c1d4412601ddddf038bca9a290f0d4b8aa3bd5eb3cbc713c4f3fb829
  • Pointer size: 131 Bytes
  • Size of remote file: 510 kB
vlm/train/2LdBqxc1Yv/3.png ADDED

Git LFS Details

  • SHA256: 0defbc7d05849fc147b9997ff5c2fed441961f81f1ce165546c66842d5246a10
  • Pointer size: 131 Bytes
  • Size of remote file: 494 kB
vlm/train/2LdBqxc1Yv/4.png ADDED

Git LFS Details

  • SHA256: 0e428a6c287b3fd7fac5a4e03778d96238bda0cc63bb858fb08ee5e23cc5b470
  • Pointer size: 131 Bytes
  • Size of remote file: 469 kB
vlm/train/2LdBqxc1Yv/5.png ADDED

Git LFS Details

  • SHA256: 5c9afb0ccf5201ee56decba81a78d1f9e76998933ccd777fb7840d44d0ad8a45
  • Pointer size: 131 Bytes
  • Size of remote file: 473 kB
vlm/train/2LdBqxc1Yv/6.png ADDED

Git LFS Details

  • SHA256: ec613d7e5cad19f4a0dee1926ccfb9fc471b321d996d2ead3d208adcb7360b3d
  • Pointer size: 131 Bytes
  • Size of remote file: 527 kB