ZHANGYUXUAN-zR commited on
Commit
9d4c46a
·
verified ·
1 Parent(s): 603731d

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/-1AAgrS5FF/-1AAgrS5FF.md +316 -0
  2. parse/train/-1AAgrS5FF/-1AAgrS5FF_content_list.json +1274 -0
  3. parse/train/-1AAgrS5FF/-1AAgrS5FF_middle.json +0 -0
  4. parse/train/-1AAgrS5FF/-1AAgrS5FF_model.json +0 -0
  5. parse/train/3WbWmdTd8fN/3WbWmdTd8fN.md +389 -0
  6. parse/train/3WbWmdTd8fN/3WbWmdTd8fN_content_list.json +1103 -0
  7. parse/train/3WbWmdTd8fN/3WbWmdTd8fN_middle.json +0 -0
  8. parse/train/3WbWmdTd8fN/3WbWmdTd8fN_model.json +0 -0
  9. parse/train/B14TlG-RW/B14TlG-RW.md +314 -0
  10. parse/train/B14TlG-RW/B14TlG-RW_content_list.json +1725 -0
  11. parse/train/B14TlG-RW/B14TlG-RW_middle.json +0 -0
  12. parse/train/B14TlG-RW/B14TlG-RW_model.json +0 -0
  13. parse/train/B1edvs05Y7/B1edvs05Y7.md +359 -0
  14. parse/train/B1edvs05Y7/B1edvs05Y7_content_list.json +1731 -0
  15. parse/train/B1edvs05Y7/B1edvs05Y7_middle.json +0 -0
  16. parse/train/B1edvs05Y7/B1edvs05Y7_model.json +0 -0
  17. parse/train/Bk9zbyZCZ/Bk9zbyZCZ.md +317 -0
  18. parse/train/Bk9zbyZCZ/Bk9zbyZCZ_content_list.json +1634 -0
  19. parse/train/Bk9zbyZCZ/Bk9zbyZCZ_middle.json +0 -0
  20. parse/train/Bk9zbyZCZ/Bk9zbyZCZ_model.json +0 -0
  21. parse/train/BkgWHnR5tm/BkgWHnR5tm.md +462 -0
  22. parse/train/BkgWHnR5tm/BkgWHnR5tm_content_list.json +2189 -0
  23. parse/train/BkgWHnR5tm/BkgWHnR5tm_middle.json +0 -0
  24. parse/train/BkgWHnR5tm/BkgWHnR5tm_model.json +0 -0
  25. parse/train/ByS1VpgRZ/ByS1VpgRZ.md +280 -0
  26. parse/train/ByS1VpgRZ/ByS1VpgRZ_content_list.json +1310 -0
  27. parse/train/ByS1VpgRZ/ByS1VpgRZ_middle.json +0 -0
  28. parse/train/ByS1VpgRZ/ByS1VpgRZ_model.json +0 -0
  29. parse/train/H1BLjgZCb/H1BLjgZCb.md +330 -0
  30. parse/train/H1BLjgZCb/H1BLjgZCb_content_list.json +1558 -0
  31. parse/train/H1BLjgZCb/H1BLjgZCb_middle.json +0 -0
  32. parse/train/H1BLjgZCb/H1BLjgZCb_model.json +0 -0
  33. parse/train/IDFQI9OY6K/IDFQI9OY6K.md +0 -0
  34. parse/train/IDFQI9OY6K/IDFQI9OY6K_content_list.json +0 -0
  35. parse/train/IDFQI9OY6K/IDFQI9OY6K_middle.json +0 -0
  36. parse/train/IDFQI9OY6K/IDFQI9OY6K_model.json +0 -0
  37. parse/train/i80OPhOCVH2/i80OPhOCVH2.md +366 -0
  38. parse/train/i80OPhOCVH2/i80OPhOCVH2_content_list.json +0 -0
  39. parse/train/i80OPhOCVH2/i80OPhOCVH2_middle.json +0 -0
  40. parse/train/i80OPhOCVH2/i80OPhOCVH2_model.json +0 -0
  41. vlm/dev/0sEIBFb4cs/0.png +3 -0
  42. vlm/dev/0sEIBFb4cs/1.png +3 -0
  43. vlm/dev/0sEIBFb4cs/10.png +3 -0
  44. vlm/dev/0sEIBFb4cs/11.png +3 -0
  45. vlm/dev/0sEIBFb4cs/12.png +3 -0
  46. vlm/dev/0sEIBFb4cs/13.png +3 -0
  47. vlm/dev/0sEIBFb4cs/14.png +3 -0
  48. vlm/dev/0sEIBFb4cs/15.png +3 -0
  49. vlm/dev/0sEIBFb4cs/16.png +3 -0
  50. vlm/dev/0sEIBFb4cs/17.png +3 -0
parse/train/-1AAgrS5FF/-1AAgrS5FF.md ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ImageBART: Bidirectional Context with Multinomial Diffusion for Autoregressive Image Synthesis
2
+
3
+ Patrick Esser∗ Robin Rombach∗ Andreas Blattmann∗ Björn Ommer Ludwig Maximilian University of Munich & IWR, Heidelberg University, Germany https://compvis.github.io/imagebart/
4
+
5
+ # Abstract
6
+
7
+ Autoregressive models and their sequential factorization of the data likelihood have recently demonstrated great potential for image representation and synthesis. Nevertheless, they incorporate image context in a linear 1D order by attending only to previously synthesized image patches above or to the left. Not only is this unidirectional, sequential bias of attention unnatural for images as it disregards large parts of a scene until synthesis is almost complete. It also processes the entire image on a single scale, thus ignoring more global contextual information up to the gist of the entire scene. As a remedy we incorporate a coarse-to-fine hierarchy of context by combining the autoregressive formulation with a multinomial diffusion process: Whereas a multistage diffusion process successively removes information to coarsen an image, we train a (short) Markov chain to invert this process. In each stage, the resulting autoregressive ImageBART model progressively incorporates context from previous stages in a coarse-to-fine manner. Experiments show greatly improved image modification capabilities over autoregressive models while also providing high-fidelity image generation, both of which are enabled through efficient training in a compressed latent space. Specifically, our approach can take unrestricted, user-provided masks into account to perform local image editing. Thus, in contrast to pure autoregressive models, it can solve free-form image inpainting and, in the case of conditional models, local, text-guided image modification without requiring mask-specific training.
8
+
9
+ # 1 Introduction
10
+
11
+ Spurred by the increasingly popular attention mechanism, a remarkably simple principle has driven progress in deep generative modeling over the past few years: Factorizing the likelihood of the data in an autoregressive (AR) fashion
12
+
13
+ $$
14
+ p ( \boldsymbol x ) = \prod _ { i } p _ { \boldsymbol \theta } ( x _ { i } | \boldsymbol x _ { < i } )
15
+ $$
16
+
17
+ and subsequently learning the conditional transition probabilities with an expressive neural network such as a transformer [75]. The success of this approach is evident in domains as diverse as language modeling [7], music generation [16], neural machine translation [46, 76], and (conditional) image synthesis [54, 8]. However, especially for the latter task of image synthesis, which is also the focus of this work, the high dimensionality and redundancy present in the data challenges the direct applicability of this approach.
18
+
19
+ Missing Bidirectional Context Autoregressive models which represent images as a sequence from the top-left to the bottom-right have demonstrated impressive performance in sampling novel images and completing the lower half of a given image [8, 21]. However, the unidirectional, fixed ordering of sequence elements not only imposes a perceptually unnatural bias to attention in images by only considering context information from left or above. It also limits practical applicability to image modification: Imagine that you only have the lower half of an image and are looking for a completion of the upper half then these models fail at this minor variation of the completion task. The importance of contextual information from both directions [36] has also been recognized in the context of language modeling [14, 45]. However, simply allowing bidirectional context as in [14] does not provide a valid factorization of the density function for a generative model. Furthermore, the sequential sampling strategy introduces a gap between training and inference, as training relies on so-called teacher-forcing [3] (where ground truth is provided for each step) and inference is performed on previously sampled tokens. This exposure bias can introduce significant accumulations of errors during the generation process, affecting sample quality and coherence [57].
20
+
21
+ Global Context & Control via Multinomial Diffusion We propose a coarse-to-fine approach that addresses the unidirectional bias of generative autoregressive models and their exposure bias as well as the lacking global context. We formulate learning the data density as a hierarchical problem. A coarser stage provides compressed contextual side information about the entire image for the autoregressive process on the next finer stage. We utilize a diffusion process to gradually eliminate information and compress the data, yielding a hierarchy of increasingly abstract and compact representations. The first scale of this approach is a discrete representation learning task (cf. [74, 58, 16, 21, 78, 56]). Subsequently, we further compress this learned representation via a fixed, multinomial diffusion process [65, 30]. We then invert this process by training a Markov chain to recover the data from this hierarchy. Each Markovian transition is modeled autoregressively but it simultaneously attends to the preceding state in the hierarchy, which provides crucial global context to each individual autoregressive step. As each of this steps can also be interpreted as learning a denoising cloze task [45], where missing tokens at the next finer stage are “refilled” with a bidirectional encoder and an autoregressive decoder, we dub our approach ImageBART.
22
+
23
+ Contributions of our work Our approach tackles high-fidelity image synthesis with autoregressive models by learning to invert a fixed multinomial diffusion process in a discrete space of compact image representations to successively introduce context. This reduces both the often encountered exposure bias of AR models and also enables locally controlled, user-interactive image editing. Additionally, our model effectively handles a variety of conditional synthesis tasks and our introduced hierarchy corresponds to a successively compressed image representation. We observe that our model sample visually plausible images while still enabling a trade-off between reconstruction capability and compression rate.
24
+
25
+ # 2 Related Work
26
+
27
+ Latent Variable Models Among likelihood-based approaches, latent variable models represent a data distribution with the help of unobserved latent variables. For example, Variational Autoencoders (VAEs) [38, 59] encode data points into a lower dimensional latent variable with a factorized distribution. This makes them easy to sample, interpolate [44, 37] and modify [77]. In a conditional setting [39], latent variables which are independent from the conditioning lead to disentangled representations [31, 69, 48, 60, 5]. A hierarchy of latent variables [66] gives mutli-scale representations of the data. Unfortunately, even the deepest instantiations of these models [47, 71, 10] lack in sample quality compared to other generative models and are oftentimes restricted to highly regular datasets.
28
+
29
+ Autoregressive Models AR models represent a distribution as a product of conditional, learnable factors via the chain rule of probability densities. While this makes them powerful models for density estimation [70, 24], their samples often lack global consistency. Especially on image data modeled with convolutional architectures [73, 62], this has been attributed to a locality bias of convolutional neural networks (CNNs) which biases the model towards strong local correlations between neighboring pixels at the expense of a proper modeling of coherence [40, 22]. This leads to samples resembling texture patterns without discernible global structure. Attempts to fix this properties by including explicit latent variables [27, 9, 22] have not been overly successful, mainly due the expressiveness of AR models, providing little incentive for learning additional latent variables.
30
+
31
+ Generative Models on Improved Representations Another successful line of work first learn an improved image representation and subsequently learn a generative model for this representation [74, 12]. Most works [58, 21, 56] learn a discrete representation which is subsequently modeled autoregressively but approaches using continuous representations in combination with VAEs [12], or normalizing flows [1, 60, 20, 4, 18], exist too. Learning a compact representation enables the use of transformers for autoregressive modeling [8], which avoids the locality bias of CNNs, can be used for the synthesis of complex scenes conditioned on text as in DALL-E [56], and, when combined with adversarial learning [25], enables sampling of coherent high-resolution images [21]. However, AR modeling of a learned representation still limits applications compared to latent variable models. Their samples can still exert artifacts resulting from a sequential modeling of components, and, since these models are always trained by “teacher-forcing”, they are susceptible to an exposure bias [3, 57, 26, 63, 43].
32
+
33
+ ![](images/b7b317357ba825b0b6bb911e364d249117d96d5e3065512839c26052664640d0.jpg)
34
+ Figure 1: Overview over our approach: We first learn a compressed, discrete image representation $x _ { 1 }$ and subsequently our generative ImageBART model reverts a fixed multinomial diffusion process via a Markov Chain, where the individual transition probabilities are modeled as independent autoregressive encoder-decoder models. This introduces a coarse-to-fine hierarchy such that each individual AR model can attend to global context from its preceding scale in the hierarchy.
35
+
36
+ Diffusion Probabilistic Models Diffusion probabilistic models revert a fixed, diffusion process with a learned Markov Chain [65]. Being directly applied in pixel space, however, downstream analysis reveals that these models tend to optimize subtle details of the modeled data, which have little contribution to the sample quality [29, 15], particularly hindering applications on high-resolution and -complexity datasets. By using a multinomial diffusion process [30] (recently generalized by [2]) on a compressed, discrete representation of images, we circumvent these issues. Diffusion probabilistic models require a very large number of diffusion steps in order to model the reverse process with a model distribution that factorizes over components. Because our approach uses autoregressively factorized models for the reverse process, we can reduce the required number of steps and obtain significant improvements in sampling speed and the ability to model complex datasets.
37
+
38
+ # 3 Method
39
+
40
+ # 3.1 Hierarchical Generative Models
41
+
42
+ To tackle the difficult problem of modeling a highly complex distribution $p ( x )$ of high-dimensional images $x$ , we (i) introduce bidirectional context into an otherwise unidirectional autoregressive factorization of $p ( x )$ as in Eq. (1) and (ii) reduce the difficulty of the learning problem with a hierarchical approach. To do so, we learn a sequence of distributions $( p _ { \theta } ^ { t } ) _ { t = 0 } ^ { T }$ , such that each distribution $p _ { \theta } ^ { t - 1 }$ models a slightly more complex distribution with the help of a slightly simpler distribution $p _ { \theta } ^ { t }$ one level above. This introduces a coarse-to-fine hierarchy of image representations $x _ { 0 : T } : = ( x _ { t } ) _ { t = 0 } ^ { T }$ , such that an $x _ { t - 1 }$ is modeled conditioned on $x _ { t }$ , i.e. $x _ { t - 1 } \sim p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } )$ and defines a reverse Markov Chain for $x = : x _ { 0 }$ as $\begin{array} { r } { p _ { \theta } ( x _ { 0 } ) = p _ { \theta } ^ { T } ( x _ { T } ) \prod _ { t = 1 } ^ { T } p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } \vert x _ { t } ) } \end{array}$ . Since our goal is to approximate the original distribution $p ( x )$ with $p _ { \theta } ( x _ { 0 } )$ , we introduce a forward Markov Chain, $\begin{array} { r } { q _ { \theta } ( x _ { 1 : T } | x _ { 0 } ) = \prod _ { t = 1 } ^ { T } q _ { \theta } ^ { t } ( x _ { t } | x _ { t - 1 } ) } \end{array}$ , to obtain a tractable upper bound on the Kullback-Leibler (KL) divergence between $p$ and $p _ { \theta }$ , $\mathbb { K L } ( p ( x _ { 0 } ) \Vert p _ { \boldsymbol \theta } ( x _ { 0 } ) ) = : K \bar { \mathcal { L } }$ , using the evidence lower bound (ELBO). With $q _ { \theta } ^ { T } ( x _ { T } | x _ { T - 1 } ) : = p _ { \theta } ^ { T } ( x _ { T } )$ , we obtain
43
+
44
+ $$
45
+ K \mathcal { L } \leq \underbrace { \mathbb { E } _ { x _ { 0 } , x _ { 1 } } \log \frac { p ( x _ { 0 } ) } { p _ { \theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) } } _ { = : L _ { 1 } \to \mathrm { d i s c r e t e r e p r . l e a r n i n g } } + \sum _ { t = 2 } ^ { T } \underbrace { \mathbb { E } _ { x _ { 0 } , x _ { t } } \mathbb { K } \mathbb { L } ( q _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) | | p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) ) } _ { = : L _ { t } \to \mathrm { d e c o u p l e d ~ w i t h ~ d i f f u s i o n ~ p r o c e s s } }
46
+ $$
47
+
48
+ We use $L _ { 1 }$ to learn a compressed and discrete representation of images, such that subsequent stages of the hierarchy do not need to model redundant information (Sec. 3.2). With $L _ { t } , t > 1$ we learn a model that can rely on global context from a coarser representation $x _ { t }$ to model the representation $x _ { t - 1 }$ (Sec. 3.3). See Fig. 1 for an overview of the proposed model.
49
+
50
+ # 3.2 Learning a compact, discrete representation for images
51
+
52
+ Since the first stage of the hierarchical process is the one that operates directly on the data, we assign it a separate role. To avoid that the optimization of $L _ { t }$ $( t = 1 , \ldots , T )$ in Eq. (2) unnecessarily wastes capacity on redundant details in the input images—which is an often encountered property of pixel-based likelihood models [74, 21, 50]—we take $\begin{array} { r } { L _ { 1 } = \mathbb { E } _ { p ( x _ { 0 } ) q _ { \theta } ^ { 1 } ( x _ { 1 } | x _ { 0 } ) } \log \frac { p ( x _ { 0 } ) } { p _ { \theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) } } \end{array}$ to be the reconstruction term for a discrete autoencoder model. This has the advantage that we can directly build on work in neural discrete representation learning, which has impressively demonstrated that discrete representations can be used for high-quality synthesis of diverse images while achieving strong compression. In particular, [49] and [21] have shown that adding an adversarial realism prior to the usual autoencoder objective helps to produce more realistic images at higher compression rates by locally trading reconstruction fidelity for realism.
53
+
54
+ More specifically, we follow [21] to encode images into a low-dimensional representation which is then vector-quantized with a learned codebook of size $K$ to obtain $\{ 0 , \dotsc , \dot { K } - 1 \} ^ { h \times w } \ni x _ { 1 } \sim$ $q _ { \theta } ^ { 1 } ( x _ { 1 } | x _ { 0 } )$ deterministically as the index of the closest codebook entry. The encoder is a convolutional neural network (CNN) with four downsampling steps, such that $h = H / 1 6$ and $w = W / 1 6$ for any input image $\boldsymbol { x } _ { 0 } \in \mathbb { R } ^ { H \times W \times 3 }$ . For downstream autoregressive learning, this representation is then unrolled into a discrete sequence of length $N = h \cdot w$ . To recover an image from $x _ { 1 }$ , we utilize a CNN decoder $G$ , such that the reverse model is specified as
55
+
56
+ $$
57
+ - \log p _ { \theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) \propto f _ { r e c } ( x _ { 0 } , G _ { \theta } ( x _ { 1 } ) ) + \log D _ { \phi } ( G _ { \theta } ( x _ { 1 } ) ) = : L _ { r e c } ( x _ { 0 } , x _ { 1 } ; \theta ) + L _ { a d v } ( x _ { 1 } ; \theta , \phi )
58
+ $$
59
+
60
+ Here, $f _ { r e c }$ denotes the perceptual similarity metric [23, 32, 19, 80] (known as LPIPS) and $D _ { \phi }$ denotes a patch-based adversarial discriminator [25]. Note that, due to the deterministic training, the likelihood in Eq. (3) is likely to be degenerate. $D _ { \phi }$ is optimized to differentiate original images $x _ { 0 }$ from their reconstruction $G _ { \theta } ( x _ { 1 } )$ using simultaneous gradient ascent, such that the objective for learning the optimal parameters $\{ \theta ^ { * } , \phi ^ { * } \}$ reads:
61
+
62
+ $$
63
+ \{ \theta ^ { * } , \phi ^ { * } \} = \arg \operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \phi } \Big ( L _ { r e c } ( x _ { 0 } , x _ { 1 } ; \theta ) - L _ { a d v } ( x _ { 1 } ; \theta , \phi ) + \log D _ { \phi } ( x _ { 0 } ) + L _ { c b } ( \theta ) \Big )
64
+ $$
65
+
66
+ The optimization of $\theta$ via this objective includes the parameters of the encoder and decoder in addition to the parameters of the learned codebook, trained via the codebook loss $L _ { c b }$ as in [74, 21].
67
+
68
+ # 3.3 Parallel learning of hierarchies
69
+
70
+ Under suitable choices for $p _ { \theta } , q _ { \theta }$ , one can directly optimize these chains over $\sum _ { t } L _ { t }$ . However, the objectives $L _ { t }$ of the hierarchy levels are coupled through the forward chain $q _ { \theta }$ , which makes this optimization problem difficult. With expressive reverse models $p _ { \theta } ^ { t - 1 }$ , the latent variables $x _ { t }$ are often ignored by the model [22] and the scale of the different level-objectives can be vastly different, resulting in a lot of gradient noise that hinders the optimization [52]. In the continuous case, reweighting schemes for the objective can be derived [29] based on a connection to score matching models [67]. However, since we are working with a discrete $x _ { 1 }$ , there is no analogue available.
71
+
72
+ While we could follow the approach taken for the first level and sequentially optimize over the objectives $L _ { t }$ , this is a rather slow process since each level $t - 1$ needs to be converged before we can start solving level $t$ . However, this sequential dependence is only introduced through the forward models $q _ { \theta } ^ { t }$ and since $q _ { \theta } ^ { 1 }$ already learns a strong representation, we can choose simpler and fixed, predefined forward processes for $q _ { \theta } ^ { t } , t > 1$ . The goal of these processes, i.e., generating a hierarchy of distributions by reducing information in each transition, can be readily achieved by, e.g., randomly masking [14], removing [45] or replacing [30] a fraction of the components of $x _ { t - 1 }$ .
73
+
74
+ Multinomial diffusion This process of randomly replacing a fraction $\beta _ { t }$ of the components with random entries can be described as a multinomial diffusion process [30], a natural generalization of binomial diffusion [65]. The only parameter $\theta$ of $q _ { \theta } ^ { t }$ is therefore $\beta _ { t }$ , which we consider to be fixed. Using the standard basis $e ( k ) = ( \delta _ { j k } ) _ { j = 1 } ^ { K }$ , the forward process can be written as a product of categorical distributions $\mathcal { C }$ specified in terms of the probabilities over the codebook indices:
75
+
76
+ $$
77
+ q _ { \theta } ^ { t } ( x _ { t } | x _ { t - 1 } ) = \prod _ { i = 1 } ^ { N } { \mathcal { C } } ( x _ { t } ^ { i } | ( 1 - \beta _ { t } ) e ( x _ { t - 1 } ^ { i } ) + \beta _ { t } \mathbb { 1 } / K ) , \quad t > 1
78
+ $$
79
+
80
+ where $\mathbb { 1 } = ( 1 ) _ { j = 1 } ^ { K }$ is the all one vector. It then follows that after $t - 1$ steps, on average, a fraction of $\begin{array} { r } { \bar { \alpha } _ { t } : = \prod _ { l = 2 } ^ { t } ( 1 - \beta _ { t } ) } \end{array}$ entries from $x _ { 1 }$ remain unchanged in $x _ { t }$ , i.e.
81
+
82
+ $$
83
+ q _ { \theta } ^ { t } \big ( x _ { t } | x _ { 1 } \big ) = \prod _ { i = 1 } ^ { N } \mathcal { C } \big ( x _ { t } ^ { i } | \bar { \alpha } _ { t } e \big ( x _ { 1 } ^ { i } \big ) + \big ( 1 - \bar { \alpha } _ { t } \big ) \mathbb { 1 } / K \big ) , \quad t > 1 .
84
+ $$
85
+
86
+ This enables computation of the posterior $\begin{array} { r } { q _ { \theta } ( x _ { t - 1 } \vert x _ { t } , x _ { 1 } ) = \frac { q _ { \theta } ^ { t } ( x _ { t } \vert x _ { t - 1 } ) q _ { \theta } ( x _ { t - 1 } \vert x _ { 1 } ) } { q _ { \theta } ( x _ { t } \vert x _ { 1 } ) } } \end{array}$ for $t > 2$ , and, using the fact that $q _ { \theta } ^ { 1 }$ is deterministic, we can rewrite $L _ { t }$ as
87
+
88
+ $$
89
+ \mathbb { E } _ { p ( x _ { 0 } ) } \mathbb { E } _ { q _ { \theta } ( x _ { t } | x _ { 1 } ) } \mathbb { K L } \big ( q _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } , x _ { 1 } ) \| p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) \big ) , \quad t > 2
90
+ $$
91
+
92
+ such that the KL term can now be computed analytically for $t > 2$ . For $t = 2$ , we use a single sample Monte-Carlo estimate for the maximum likelihood reformulation, i.e.
93
+
94
+ $$
95
+ \begin{array} { r } { \arg \operatorname* { m i n } L _ { 2 } = \arg \operatorname* { m a x } \mathbb { E } _ { p ( x _ { 0 } ) } \mathbb { E } _ { q _ { \theta } ^ { 2 } ( x _ { 2 } | x _ { 1 } ) } \log p _ { \theta } ^ { 1 } ( x _ { 1 } | x _ { 2 } ) . } \end{array}
96
+ $$
97
+
98
+ Finally, we set $p _ { \theta } ^ { T }$ to be a uniform distribution. This completes the definition of the reverse chain $p _ { \theta }$ , which can now be started from a random sample for $x _ { T } \sim p _ { \theta } ^ { T } ( x _ { T } )$ , denoised sequentially through $x _ { t - 1 } \sim p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } )$ for $t = T , \dots , 2$ , and finally be decoded to a data sample $x _ { 0 } = G ( x _ { 1 } )$ .
99
+
100
+ Reverse diffusion models Under what conditions can we recover the true data distribution? By rewriting $\textstyle \sum _ { t } L _ { t }$ , we can see from
101
+
102
+ $$
103
+ \mathbb { K L } ( p ( x _ { 0 } ) \| p _ { \theta } ( x _ { 0 } ) ) \leq \sum _ { t = 1 } ^ { T } \mathbb { K L } ( q _ { \theta } ( x _ { t - 1 } | x _ { t } ) \| p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) )
104
+ $$
105
+
106
+ that this is possible as long as all reverse models are expressive enough to represent the true reverse processes defined by $q _ { \theta }$ . For the first level, we can ensure this by making $x _ { 1 }$ large enough such that the reconstruction error becomes negligible. For the diffusion process, previous image models [65, 29, 68, 30] relied on the fact that, in the limit $\beta _ { t } \to 0$ , the form of the true reverse process has the same functional form as the forward diffusion process [65, 41]. In particular, this allows modeling of the reverse process with a distribution factorized over the components. However, to make $q _ { \theta } ^ { T - 1 }$ close to a uniform distribution requires a very large $T$ (in the order of 1000 steps) with small $\beta _ { t }$ . Training such a large number of reverse models is only feasible with shared weights for the models, but this requires a delicate reweighting [29] of the objective and currently no suitable reweighting is known for the discrete case considered here.
107
+
108
+ Thus, to be able to recover the true data distribution with a modest number of reverse models that can be trained fully parallel, and without weight-sharing, we model each reverse process autoregressively. We use an encoder-decoder transformer architecture [75], such that the decoder models the reverse process for $x _ { t - 1 }$ autoregressively with the help of global context obtained by cross-attending to the encoder’s representation of $x _ { t }$ as visualized in Fig. 1. Note that the need for autoregressive modeling gets reduced for small $\beta _ { t }$ , which we can adjust for by reducing the number of decoder layers compared to encoder layers. The use of the compression model described in Sec. 3.2, however, allows to utilize full-attention based transformer architectures to implement the autoregressive scales.
109
+
110
+ # 4 Experiments
111
+
112
+ Sec. 4.1 evaluates the quality ImageBART achieves in image synthesis. Since we especially want to increase the controllability of the generative process, we evaluate the performance of ImageBART on class- and text-conditional image generation in Sec. 4.2. The ability of our approach to attend to global context enables a new level of localized control which is not possible with previous, purely autoregressive approaches as demonstrated in Sec. 4.3. Finally, Sec. 4.4 presents ablations on model and architecture choices.
113
+
114
+ ![](images/6dab2543f9aa70309e45c4de1c0b6c5bdb358bb4b6b062f23c886c9bf17f6839.jpg)
115
+ Figure 2: Samples from our models. Top row: FFHQ, LSUN-Cats, Middle row: LSUN-Bedrooms, LSUNChurches, Bottom row: ImageNet.
116
+
117
+ <table><tr><td>Method</td><td>Cats Beds</td><td>Churches</td><td></td><td>FFHQ</td><td></td><td>ImageBART</td><td>DDPM</td><td>SSDE</td></tr><tr><td>VDVAE [10]</td><td>1</td><td>1</td><td>1</td><td>28.5</td><td rowspan="2">Churches</td><td rowspan="2"></td><td rowspan="2"></td><td rowspan="2">健</td></tr><tr><td>DDPM [29]</td><td>19.75</td><td>4.90</td><td>7.89</td><td>1</td></tr><tr><td>StyleGAN2 [34]</td><td>7.25</td><td>2.35</td><td>3.86</td><td>3.8</td><td>Cats</td><td></td><td></td><td></td></tr><tr><td>BigGAN [6]</td><td>1</td><td>1</td><td>1</td><td>12.4</td><td>cIN (c14)</td><td></td><td></td><td></td></tr><tr><td>DCT[50]</td><td>1</td><td>6.40</td><td>7.56</td><td>13.06</td><td>cIN (c323)</td><td></td><td></td><td></td></tr><tr><td>TT[21]</td><td>17.31</td><td>6.35</td><td>7.81</td><td>11.4</td><td>cIN (c963)</td><td></td><td></td><td></td></tr><tr><td>ImageBART</td><td>15.09</td><td>5.51</td><td>7.32</td><td>9.57</td><td></td><td></td><td></td><td></td></tr></table>
118
+
119
+ Table 1: Left: FIDs on the LSUN-{Churches,Beds,Cats} [79] and FFHQ [33] datasets. Right: Corresponding qualitative comparisons. Qualitative comparisons with TT can be found in Fig. 20 and Fig. 21
120
+
121
+ # 4.1 High-Fidelity Image Synthesis with ImageBART
122
+
123
+ In this section we present qualitative and quantitative results on images synthesized by our approach. We train models at resolution $2 5 6 \times 2 5 6$ for unconditional generation on FFHQ [33], LSUN -Cats, -Churches and -Bedrooms [79] and on class-conditional synthesis on ImageNet (cIN) [13].
124
+
125
+ Effective Discrete Representations Learning the full hierarchy as described in Eq. (2) and without unnecessary redundancies in the data requires to first learn a strong compression model via the objective in Eq. (4). [21] demonstrated how to effectively train such a model and we directly utilize the publicly available pretrained models. For training on LSUN, we finetune an ImageNet pretrained model for one epoch on each dataset. As the majority of codebook entries remains unused, we shrink the codebook to those entries which are actually used (evaluated on the validation split of ImageNet) and assign a random entry for eventual outliers. This procedure yields an effective, compact representation on which we subsequently train ImageBART.
126
+
127
+ Training Details As described in Sec. 3.3, we use an encoder-decoder structure to model the reverse Markov Chain $p _ { \theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) , \ t < T ,$ , where the encoder is a bidirectional transformer model and decoder is implemented as an AR transformer. As the context for the last scale is pure noise, we employ a decoder-only variant to model $p _ { \theta } ^ { T - 1 } ( x _ { T - 1 } | x _ { T } )$ . Furthermore, to account for the different complexities of the datasets, we adjust the number of multinomial diffusion steps for each dataset accordingly. For FFHQ we choose a chain of length $T = 3$ , such that the total model consists of (i) the compression stage and (ii) $n = 2$ transformer models trained in parallel via the objective described in Eq.(7). Similarly, we set $n = 3$ for each of the LSUN models and $n = 5$ for the ImageNet model.
128
+
129
+ <table><tr><td rowspan="2"></td><td colspan="4">rejection rate for cIN sampling</td></tr><tr><td>1.0</td><td>0.5</td><td>0.25</td><td>0.05</td></tr><tr><td>FID</td><td>21.19</td><td>13.12</td><td>9.77</td><td>7.44</td></tr><tr><td>IS</td><td>61.6±0.8</td><td>109.5±2.3</td><td>146.2±3.8</td><td>273.5±4.1</td></tr></table>
130
+
131
+ <table><tr><td colspan="3">Text-conditional image synthesis on CC [64]</td></tr><tr><td>Method</td><td>FID↓ IS↑</td><td>CLIP-score ↑</td></tr><tr><td>TT[21]</td><td>28.86</td><td>13.11±0.43 0.20±0.03</td></tr><tr><td>ImageBART 22.61</td><td>15.27±0.59</td><td>0.23±0.03</td></tr></table>
132
+
133
+ Table 2: Quantitative analysis on conditional models. Left: Results on class conditional Imagenet for different rejection rates, see also Fig, 20 in the supplemental. Right: Results of text-conditional ImageBART and comparison with TT [21] on the CC test set. Corresponding qualitative comparisons can be found in Fig. 21.
134
+
135
+ ![](images/23609c1e1e2babddfb1fde79cad0fb58708ff1b0cd031c8a0ccd5e01557b8c6f.jpg)
136
+ Figure 3: Samples from text-conditional ImageBART. Best 2 of 32 with reranking as in [56].
137
+
138
+ Results For each of these settings, Fig. 2 depicts samples of size $2 5 6 \times 2 5 6$ generated with ImageBART and a single pass through the learned Markov Chain, demonstrating that our model is able to produce realistic and coherent samples. This is further confirmed by a quantitative analysis in Tab. 1, where we compare FID scores of competing likelihood-based and score-based methods such as TT [21] and DDPM [29]. Regarding other works on diffusion models such as [29] and [68] operating directly in pixel space, we observe that these approaches perform roughly equivalently well in terms of FID for datasets of low complexity (e.g. LSUN-Bedrooms and-Churches). For more complex datasets (LSUN-Cats, cIN), however, our method outperforms these pixel-based approaches, which can also be seen qualitatively on the right in Tab. 1. See Fig. 20 for a comparison on ImageNet.
139
+
140
+ # 4.2 Conditional Markov Chains for Controlled Image Synthesis
141
+
142
+ Being a sequence-to-sequence model, our approach allows for flexible and arbitrary conditioning by simply preprending tokens, similar to [21, 56]. More specifically, each learned transition $p _ { \theta } ^ { t - 1 } \dot { ( x } _ { t - 1 } \dot { | x _ { t } , c ) }$ , $t > 1$ of the Markov chain is then additionally conditioned on a representation $c$ e.g. a single token in the case of the class-conditional model of Sec. 4.1. Note that the compression model $p _ { \theta } ^ { 0 }$ remains unchanged.
143
+
144
+ Text-to-Image Synthesis Besides class-conditional modeling on ImageNet, we also learn a textconditional model on Conceptual Captions (CC) [64, 51]. We obtain $c$ by using the publicly available tokenizer of the CLIP model [55], yielding a conditioning sequence of length 77. To model the dataset, we choose $T = 5$ and thus train $n = 4$ transformer models independently. For the $p _ { \theta } ^ { 0 }$ , we directly transfer the compression model from Sec. 4.1, trained on the ImageNet dataset.
145
+
146
+ Fig. 3 visualizes synthetic samples obtained with this model for various “image-cloze” tasks. Our resulting model is able to attend to semantic variations in the conditioning sentence (e.g. a change of weather for imagery of mountains) and renders the corresponding images accordingly. In Tab. 2, we evaluate FID [28] and Inception Scores (IS) [61] to measure the quality of synthesized images, as well as cosine similarity between CLIP [55] embeddings of the text prompts and the synthesized images to measure how well the image reflects the text. ImageBART improves all metrics upon [21]. Fig. 21 in the supplement provides corresponding qualitative examples for user-defined text inputs.
147
+
148
+ Resolutions Beyond $\mathbf { 2 5 6 \times 2 5 6 }$ Pixels. Our approach is not restricted to generating images of size $2 5 6 \times 2 5 6$ pixels. Although trained on a fixed resolution, we can apply our models in a patch-wise manner, where we use the sliding attention window of [21] for each scale $t > 0$ . As we now incorporate more and more global context while decoding with the Markov chain (which can be thought of as widening a noisy receptive field), ImageBART is able to render consistent images in the megapixel regime. See for example Fig. 4, where we use our text-conditional model to render an image of size $3 0 0 \times 1 8 0 0$ pixel and interpolate between two different text prompts. More examples, especially also for semantically guided synthesis, can be found in Sec. A.2.
149
+
150
+ ![](images/ebb58974d2f9dfea8cc6e99357c21c61ddaabeb9e2b180889e1ae338ba73eab2.jpg)
151
+ Figure 4: ImageBART is capable of generating high-resolution images. Here, we condition it on text prompts and interpolate between the two descriptions depicted above the image (see also Sec. 4.2).
152
+
153
+ # 4.3 Beyond Conditional Models: Local Editing with Autoregressive Models
154
+
155
+ Recent autoregressive approaches, which use a CNN to learn a discrete representation [74], partially alleviate the issues of pixel-wise autoregressive models by working on larger image patches. However, as we show in Fig. 5, even approaches which use adversarial learning to maximize the amount of context encoded in the discrete representation [21] cannot produce completions of the upper half of an image which are consistent with a given lower half.
156
+
157
+ While our approach also models each transition autoregressively from the top-left to the bottom-right, the ability to attend to global context from the previous scale enables consistent completions of arbitrary order, e.g. right-to-left. To achieve this, we mask the diffusion process as described in Sec. A.3. For a user-specified mask $m$ (e.g. the upper half of an image as in Fig. 5), this results in a forward-backward process pt−θ $p _ { \theta } ^ { t - 1 | t - 1 , m }$ , which, by definition, leaves the unmasked context intact. The reverse process then denoises the unmasked entries to make them consistent with the given context.
158
+
159
+ Fig. 5 (bottom) visualizes this mixing process, where we use a model with $T = 3$ . The first column shows the masked input. To start the process we set all masked entries to random entries. The first two columns then show (decoded) samples from the masked reverse processes $p _ { \theta } ^ { 2 , m }$ and p1,θ $p _ { \theta } ^ { 1 , m }$ , which still display inconsistencies. The remaining columns show the trajectory of the process $p _ { \theta } ^ { 1 | 1 , m }$ , which demonstrates how the model iteratively adjusts its samples according to the given context until it converges to a globally consistent sample. For illustration, we show the analog trajectory obtained with [21], but because it can only attend to unidirectional context, this trajectory is equivalent to a sequence of independent samples and therefore fails to achieve global consistency.
160
+
161
+ The masked process can be used with arbitrary masks, which enables localized image editing with free, hand-drawn masks as shown in Fig. 6. Note that our model does not need to be trained specifically for this task, which also avoids generalization problems associated with training on masks [81]. Combining this property with the conditional models from Sec. 4.2 allows for especially interesting novel applications, where local image regions are modified based on user specified class or text prompts, as shown in Fig. 7.
162
+
163
+ ![](images/03b84378714d34185ad00d3dfa7f6d9b9d60e5564bcb7f99d99f030e1caa096c.jpg)
164
+ Figure 5: Without global context, AR models fail at completing upper halfs, contrasting ImageBART.
165
+
166
+ ![](images/798638d2e9717d750afc7165a5042aa56c5dbf030da17d3a7940b687c4221ace.jpg)
167
+ Figure 6: Local editing application using markov chain of length 16 on FFHQ. By incorporating bidirectional context ImageBART is able to solve this unconditional inpainting task (cf. Sec. 4.3).
168
+
169
+ ![](images/e36976b238d2f4e276c66ae208d9062eeb14211964ef27d411452dd127613584.jpg)
170
+ Figure 7: Conditionally guided inpainting results obtained from conditional ImageBART trained on the i) ImageNet (top row) and ii) Conceptual Captions (bottom row) datasets.
171
+
172
+ # 4.4 Ablations
173
+
174
+ On the Number of Diffusion Steps In this section we analyze the effect of varying the number of diffusion steps (denoted by $T$ ). To do so, we perform an experiment for unconditional training on the FFHQ dataset, where we train a Taming Transformers (TT) baseline (corresponding to the case $T = 2$ within our framework) with 800M parameters and three variants of ImageBART with $T = 3$ $( 2 \mathrm { x } 4 0 0 \mathrm { M } )$ , $T = 5$ $( 4 \mathrm { x } 2 0 0 \mathrm { M } )$ and $T = 9$ (8x100M), respectively. Note that for a fair comparison, all models use the same first level for compression, and we fix the number of remaining parameters to $8 0 0 \mathbf { M }$ and distribute them equally across all scales. All models were trained with the same computational budget and evaluated at the best validation checkpoint.
175
+
176
+ In Tab. 3, we assess both the pure synthesis and the modification ability of ImageBART by computing FID scores on samples and modified images (in the case of upper half completion as in Fig. 5). For both tasks, we use a single pass through the reverse Markov chain. We observe that the modification performance increases monotonically with the number of scales, which highlights the improved image manipulation abilities of our approach. For unconditional generation, we observe a similar trend, although FID seems to plateau beyond $T = 5$ .
177
+
178
+ Joint vs. Independent Training While it is possible to optimize Eq. (2) jointly across all scales, we found that training is more robust when training all scales independently. Besides the usual separation of training the compression model $p _ { \theta } ^ { 0 }$ and the generative model $p _ { \theta } ^ { t \geq 1 }$ , training the latter in parallel over multiple scales avoids the tedious weighting of the loss contribution from different scales; an often encountered problem in other denoising diffusion probabilistic models [29].
179
+
180
+ Efficiency with Less Decoder Layers As we implement the conditional transition probabilities $p _ { \theta } ^ { t - 1 }$ with an encoder-decoder transformer architecture, we are interested in the effect of altering the ratio of encoder and decoder layers in the model. Recent work has provided evidence that it is possible to significantly reduce the number of decoder layers and thus also decrease autoregressive decoding speed while maintaining high quality [35]. We perform an experiment on LSUN-Churches, where we analyze the effect of different layer-ratios on synthesis quality (measured by FID) and on decoding speed when fixing the total number of model parameters to 200M. The results in the left part of Fig. 8 confirms that it is indeed possible to reduce the number of decoder layers while maintaining satisfactory FID scores with higher decoding efficiency. We identity a favorable trade-off between four and six decoder layers and transfer this setting to our other experiments.
181
+
182
+ <table><tr><td colspan="3">Unconditional Generation</td><td colspan="3">Upper Half Completion</td></tr><tr><td>method</td><td>FID↓</td><td>IS个</td><td>method</td><td>FID↓</td><td>IS↑</td></tr><tr><td>TT(T= 2)</td><td>12.44</td><td>4.42 ± 0.05</td><td>TT(T= 2)</td><td>11.80</td><td>4.48 ± 0.10</td></tr><tr><td>ImageBART (T = 3)</td><td>12.55</td><td>3.98± 0.07</td><td>ImageBART(T= 3)</td><td>9.25</td><td>4.49 ± 0.13</td></tr><tr><td>ImageBART(T=5)</td><td>10.69</td><td>4.27 ± 0.05</td><td>ImageBART(T= 5)</td><td>6.87</td><td>4.81 ± 0.13</td></tr><tr><td>ImageBART (T = 9)</td><td>10.81</td><td>4.49 ± 0.05</td><td>ImageBART (T = 9)</td><td>6.64</td><td>4.86 ± 0.15</td></tr></table>
183
+
184
+ Table 3: Assessing the effect of different $\overline { { T } }$ with a fixed number of parameters distributed equally over all scales. All models are trained on FFHQ. Left: Full image generation results. Right: Using the example of upper image completion, we evaluate the ability to complete and modifiy an image, see Sec. 4.3 and 4.4.
185
+
186
+ ![](images/505dcbb4d8a10672f2407a866d0081a4515c4138ff21f9ffadab74eae8b65903.jpg)
187
+ Figure 8: Left: Effect of number of encoder vs. decoder layers for a fixed total number of model parameters $( ( 1 9 5 \pm 5 ) M )$ , evaluated on LSUN-Churches. FIDs are evaluated w.r.t $3 \times 2 5 0 0 \mathrm { k }$ samples. The plot shows 3 standard deviations. All models are trained jointly over three scales. Right: Our model achieves better sampling performance than state of the art diffusion models (SSDE [68], DDPM [29], ADM [15]) and also approaches the inference speed of TT [21], which only consists of a single autoregressive stage. Reducing the number of scales increases inference speed at the expense of controllability. Experiments were conducted on a single NVIDIA A100 and are reported averaged over 1000 samples with a batch size of 50, evaluated on FFHQ while using the same number of trainable parameters $( 8 0 0 \mathrm { m } )$ for all AR models.
188
+
189
+ Finally, we compare our model in terms of sampling speed with the recent state-of-the-art generative diffusion [29, 68] and AR models [21]. The results are summarized in Fig. 8. While consistently being faster than all pixel-based models due to training in a compressed latent space, the increase in runtime w.r.t. [21] is moderate due to the use of encoder-decoder transformers, i.e., a a decrease in pure decoder layers. If a faster runtime is desired, the speed can be further increased by reducing the number of decoder layers even more, see also the discussion in Sec. A.5.
190
+
191
+ # 5 Conclusion
192
+
193
+ We have proposed ImageBART, a hierarchical approach to introduce bidirectional context into autoregressive transformer models for high-fidelity controllable image synthesis. We invert a multinomial diffusion process by training a Markov chain to gradually incorporate context in a coarse-to-fine manner. Our study shows that this approach (i) introduces a natural hierarchical representation of images, with consecutive levels carrying more information than previous ones. (see also Fig. 9). (ii) It alleviates the unnatural unidirectional ordering of pure autoregressive models for image representation through global context from previous levels of the hierarchy. (iii) It enables global and local manipulation of a given input, a feat previously out-of-reach for ARMs. (iv) We additionally show that our model can be efficiently conditioned on various representations, allowing for a large class of conditional image synthesis tasks such as semantically guided generation or text-to-image synthesis.
194
+
195
+ # Acknowledgments
196
+
197
+ Many thanks to Phil Wang for providing https://github.com/lucidrains/x-transformers and all the other great PyTorch implementations.
198
+
199
+ # Funding and Transparency Statement
200
+
201
+ Funding in direct support of this work: German Research Foundation (DFG) projects 371923335 and 421703927, German Federal Ministry for Economic Affairs and Energy within the project ’KI-Absicherung - Safe AI for automated driving’.
202
+
203
+ # Checklist
204
+
205
+ 1. For all authors...
206
+
207
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
208
+ (b) Did you describe the limitations of your work? [Yes] See supplementary.
209
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] See supplementary.
210
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
211
+
212
+ 2. If you are including theoretical results...
213
+
214
+ (a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
215
+
216
+ 3. If you ran experiments...
217
+
218
+ (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)? [No] Including the code while maintaining anonymity is difficult; it will be published after deanonymization.
219
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We include most relevant details in the supplementary and the full code release will contain the precise values.
220
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Yes, wherever this does not introduce irresponsible waste of computational resources.
221
+ (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] The supplementary contains an overview of used hardware.
222
+
223
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
224
+
225
+ (a) If your work uses existing assets, did you cite the creators? [Yes]
226
+ (b) Did you mention the license of the assets? [No] Licenses will be included along with the code release.
227
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
228
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
229
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] See supplementary.
230
+
231
+ 5. If you used crowdsourcing or conducted research with human subjects...
232
+
233
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
234
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
235
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
236
+
237
+ # References
238
+
239
+ [1] R. Abdal, P. Zhu, N. J. Mitra, and P. Wonka. Styleflow: Attribute-conditioned exploration of stylegangenerated images using conditional continuous normalizing flows. ACM Trans. Graph., 40(3), May 2021. ISSN 0730-0301. doi: 10.1145/3447648. URL https://doi.org/10.1145/3447648.
240
+ [2] J. Austin, D. Johnson, J. Ho, D. Tarlow, and R. v. d. Berg. Structured denoising diffusion models in discrete state-spaces. arXiv preprint arXiv:2107.03006, 2021.
241
+ [3] S. Bengio, O. Vinyals, N. Jaitly, and N. Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. CoRR, abs/1506.03099, 2015. [4] A. Blattmann, T. Milbich, M. Dorkenwald, and B. Ommer. Behavior-driven synthesis of human dynamics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12236–12246, June 2021.
242
+ [5] A. Blattmann, T. Milbich, M. Dorkenwald, and B. Ommer. ipoke: Poking a still image for controlled stochastic video synthesis. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 14707–14717, October 2021.
243
+ [6] A. Brock, J. Donahue, and K. Simonyan. Large scale GAN training for high fidelity natural image synthesis. In Int. Conf. Learn. Represent., 2019.
244
+ [7] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language models are few-shot learners. In NeurIPS, 2020. [8] M. Chen, A. Radford, R. Child, J. Wu, H. Jun, D. Luan, and I. Sutskever. Generative pretraining from pixels. In ICML, volume 119 of Proceedings of Machine Learning Research, pages 1691–1703. PMLR, 2020. [9] X. Chen, D. P. Kingma, T. Salimans, Y. Duan, P. Dhariwal, J. Schulman, I. Sutskever, and P. Abbeel. Variational lossy autoencoder. CoRR, abs/1611.02731, 2016.
245
+ [10] R. Child. Very deep vaes generalize autoregressive models and can outperform them on images. CoRR, abs/2011.10650, 2020.
246
+ [11] K. Crawford and T. Paglen. Excavating ai: The politics of training sets for machine learning, 2019. URL https://excavating.ai.
247
+ [12] B. Dai and D. P. Wipf. Diagnosing and enhancing VAE models. In ICLR (Poster). OpenReview.net, 2019.
248
+ [13] J. Deng, W. Dong, R. Socher, L. Li, K. Li, and F. Li. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255. IEEE Computer Society, 2009.
249
+ [14] J. Devlin, M. Chang, K. Lee, and K. Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018.
250
+ [15] P. Dhariwal and A. Nichol. Diffusion models beat gans on image synthesis. CoRR, abs/2105.05233, 2021. URL https://arxiv.org/abs/2105.05233.
251
+ [16] P. Dhariwal, H. Jun, C. Payne, J. W. Kim, A. Radford, and I. Sutskever. Jukebox: A generative model for music. CoRR, abs/2005.00341, 2020.
252
+ [17] S. Dieleman. Musings on typicality, 2020. URL https://benanne.github.io/2020/09/01/ typicality.html.
253
+ [18] M. Dorkenwald, T. Milbich, A. Blattmann, R. Rombach, K. G. Derpanis, and B. Ommer. Stochastic image-to-video synthesis using cinns. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3742–3753, June 2021.
254
+ [19] A. Dosovitskiy and T. Brox. Generating images with perceptual similarity metrics based on deep networks. In NIPS, pages 658–666, 2016.
255
+ [20] P. Esser, R. Rombach, and B. Ommer. A disentangling invertible interpretation network for explaining latent representations. CoRR, abs/2004.13166, 2020.
256
+ [21] P. Esser, R. Rombach, and B. Ommer. Taming transformers for high-resolution image synthesis. CoRR, abs/2012.09841, 2020.
257
+ [22] J. D. Fauw, S. Dieleman, and K. Simonyan. Hierarchical autoregressive image models with auxiliary decoders. CoRR, abs/1903.04933, 2019.
258
+ [23] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In CVPR, pages 2414–2423. IEEE Computer Society, 2016.
259
+ [24] M. Germain, K. Gregor, I. Murray, and H. Larochelle. MADE: masked autoencoder for distribution estimation. CoRR, abs/1502.03509, 2015.
260
+ [25] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. C. Courville, and Y. Bengio. Generative adversarial networks. CoRR, 2014.
261
+ [26] A. Goyal, A. Lamb, Y. Zhang, S. Zhang, A. C. Courville, and Y. Bengio. Professor forcing: A new algorithm for training recurrent networks. In NIPS, pages 4601–4609, 2016.
262
+ [27] I. Gulrajani, K. Kumar, F. Ahmed, A. A. Taïga, F. Visin, D. Vázquez, and A. C. Courville. Pixelvae: A latent variable model for natural images. CoRR, abs/1611.05013, 2016.
263
+ [28] M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, and S. Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Adv. Neural Inform. Process. Syst., pages 6626–6637, 2017.
264
+ [29] J. Ho, A. Jain, and P. Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020.
265
+ [30] E. Hoogeboom, D. Nielsen, P. Jaini, P. Forré, and M. Welling. Argmax flows and multinomial diffusion: Towards non-autoregressive language models. CoRR, abs/2102.05379, 2021.
266
+ [31] A. H. Jha, S. Anand, M. Singh, and V. S. R. Veeravasarapu. Disentangling factors of variation with cycle-consistent variational auto-encoders. In ECCV (3), volume 11207 of Lecture Notes in Computer Science, pages 829–845. Springer, 2018.
267
+ [32] J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV (2), volume 9906 of Lecture Notes in Computer Science, pages 694–711. Springer, 2016.
268
+ [33] T. Karras, S. Laine, and T. Aila. A style-based generator architecture for generative adversarial networks. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
269
+ [34] T. Karras, S. Laine, M. Aittala, J. Hellsten, J. Lehtinen, and T. Aila. Analyzing and improving the image quality of stylegan. CoRR, abs/1912.04958, 2019.
270
+ [35] J. Kasai, N. Pappas, H. Peng, J. Cross, and N. A. Smith. Deep encoder, shallow decoder: Reevaluating non-autoregressive machine translation, 2021.
271
+ [36] S. Khan, M. Naseer, M. Hayat, S. W. Zamir, F. S. Khan, and M. Shah. Transformers in vision: A survey. CoRR, abs/2101.01169, 2021.
272
+ [37] Y. Kilcher, A. Lucchi, and T. Hofmann. Semantic interpolation in implicit models. CoRR, abs/1710.11381, 2017.
273
+ [38] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes. In 2nd International Conference on Learning Representations, ICLR, 2014.
274
+ [39] D. P. Kingma, D. J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. CoRR, abs/1406.5298, 2014.
275
+ [40] A. Kolesnikov and C. H. Lampert. Pixelcnn models with auxiliary variables for natural image modeling. In ICML, volume 70 of Proceedings of Machine Learning Research, pages 1905–1914. PMLR, 2017.
276
+ [41] A. Kolmogoroff. Über die analytischen methoden in der wahrscheinlichkeitsrechnung. Mathematische Annalen, 104:415–458, 1931. URL http://eudml.org/doc/159476.
277
+ [42] A. Krizhevsky. Learning multiple layers of features from tiny images. 2009.
278
+ [43] R. Leblond, J. Alayrac, A. Osokin, and S. Lacoste-Julien. SEARNN: training rnns with global-local losses. CoRR, abs/1706.04499, 2017.
279
+ [44] D. Lesniak, I. Sieradzki, and I. T. Podolak. Distribution-interpolation trade off in generative models. In ICLR (Poster). OpenReview.net, 2019.
280
+ [45] M. Lewis, Y. Liu, N. Goyal, M. Ghazvininejad, A. Mohamed, O. Levy, V. Stoyanov, and L. Zettlemoyer. BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In ACL, pages 7871–7880. Association for Computational Linguistics, 2020.
281
+ [46] N. Li, S. Liu, Y. Liu, S. Zhao, and M. Liu. Neural speech synthesis with transformer network. In AAAI, pages 6706–6713. AAAI Press, 2019.
282
+ [47] L. Maaløe, M. Fraccaro, V. Liévin, and O. Winther. BIVA: A very deep hierarchy of latent variables for generative modeling. In NeurIPS, pages 6548–6558, 2019.
283
+ [48] M. Mathieu, J. J. Zhao, P. Sprechmann, A. Ramesh, and Y. LeCun. Disentangling factors of variation in deep representations using adversarial training. CoRR, abs/1611.03383, 2016.
284
+ [49] F. Mentzer, G. Toderici, M. Tschannen, and E. Agustsson. High-fidelity generative image compression. In NeurIPS, 2020.
285
+ [50] C. Nash, J. Menick, S. Dieleman, and P. W. Battaglia. Generating images with sparse representations. CoRR, abs/2103.03841, 2021.
286
+ [51] E. G. Ng, B. Pang, P. Sharma, and R. Soricut. Understanding guided image captioning performance across domains. arXiv preprint arXiv:2012.02339, 2020.
287
+ [52] A. Nichol and P. Dhariwal. Improved denoising diffusion probabilistic models. CoRR, abs/2102.09672, 2021.
288
+ [53] T. Park, M.-Y. Liu, T.-C. Wang, and J.-Y. Zhu. Semantic image synthesis with spatially-adaptive normalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019.
289
+ [54] N. Parmar, A. Vaswani, J. Uszkoreit, L. Kaiser, N. Shazeer, A. Ku, and D. Tran. Image transformer. In ICML, volume 80 of Proceedings of Machine Learning Research, pages 4052–4061. PMLR, 2018.
290
+ [55] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, G. Krueger, and I. Sutskever. Learning transferable visual models from natural language supervision. CoRR, abs/2103.00020, 2021.
291
+ [56] A. Ramesh, M. Pavlov, G. Goh, S. Gray, C. Voss, A. Radford, M. Chen, and I. Sutskever. Zero-shot text-to-image generation. CoRR, abs/2102.12092, 2021.
292
+ [57] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. In ICLR (Poster), 2016.
293
+ [58] A. Razavi, A. van den Oord, and O. Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In NeurIPS, pages 14837–14847, 2019.
294
+ [59] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on International Conference on Machine Learning, ICML, 2014.
295
+ [60] R. Rombach, P. Esser, and B. Ommer. Network-to-network translation with conditional invertible neural networks. In NeurIPS, 2020.
296
+ [61] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In NIPS, 2016.
297
+ [62] T. Salimans, A. Karpathy, X. Chen, and D. P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. CoRR, abs/1701.05517, 2017.
298
+ [63] F. Schmidt. Generalization in generation: A closer look at exposure bias. In NGT@EMNLP-IJCNLP, pages 157–167. Association for Computational Linguistics, 2019.
299
+ [64] P. Sharma, N. Ding, S. Goodman, and R. Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of ACL, 2018.
300
+ [65] J. Sohl-Dickstein, E. A. Weiss, N. Maheswaranathan, and S. Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585, 2015.
301
+ [66] C. K. Sønderby, T. Raiko, L. Maaløe, S. K. Sønderby, and O. Winther. Ladder variational autoencoders. In NIPS, pages 3738–3746, 2016.
302
+ [67] Y. Song and S. Ermon. Generative modeling by estimating gradients of the data distribution. In NeurIPS, pages 11895–11907, 2019.
303
+ [68] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole. Score-based generative modeling through stochastic differential equations. CoRR, abs/2011.13456, 2020.
304
+ [69] A. Szabó, Q. Hu, T. Portenier, M. Zwicker, and P. Favaro. Challenges in disentangling independent factors of variation. In ICLR (Workshop). OpenReview.net, 2018.
305
+ [70] B. Uria, M. Côté, K. Gregor, I. Murray, and H. Larochelle. Neural autoregressive distribution estimation. CoRR, abs/1605.02226, 2016.
306
+ [71] A. Vahdat and J. Kautz. NVAE: A deep hierarchical variational autoencoder. In NeurIPS, 2020.
307
+ [72] A. van den Oord, N. Kalchbrenner, L. Espeholt, k. kavukcuoglu, O. Vinyals, and A. Graves. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, 2016.
308
+ [73] A. van den Oord, N. Kalchbrenner, O. Vinyals, L. Espeholt, A. Graves, and K. Kavukcuoglu. Conditional image generation with pixelcnn decoders. CoRR, abs/1606.05328, 2016.
309
+ [74] A. van den Oord, O. Vinyals, and K. Kavukcuoglu. Neural discrete representation learning. In NIPS, pages 6306–6315, 2017.
310
+ [75] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In NIPS, pages 5998–6008, 2017.
311
+ [76] C. Wang, Y. Tang, X. Ma, A. Wu, D. Okhonko, and J. Pino. fairseq s2t: Fast speech-to-text modeling with fairseq, 2020.
312
+ [77] T. White. Sampling generative networks: Notes on a few effective techniques. CoRR, abs/1609.04468, 2016.
313
+ [78] W. Yan, Y. Zhang, P. Abbeel, and A. Srinivas. Videogpt: Video generation using VQ-VAE and transformers. CoRR, abs/2104.10157, 2021.
314
+ [79] F. Yu, Y. Zhang, S. Song, A. Seff, and J. Xiao. LSUN: construction of a large-scale image dataset using deep learning with humans in the loop. CoRR, abs/1506.03365, 2015.
315
+ [80] R. Zhang, P. Isola, A. A. Efros, E. Shechtman, and O. Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
316
+ [81] C. Zheng, T. Cham, and J. Cai. Tfill: Image completion via a transformer-based architecture. CoRR, abs/2104.00845, 2021.
parse/train/-1AAgrS5FF/-1AAgrS5FF_content_list.json ADDED
@@ -0,0 +1,1274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ImageBART: Bidirectional Context with Multinomial Diffusion for Autoregressive Image Synthesis ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 178,
8
+ 122,
9
+ 820,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Patrick Esser∗ Robin Rombach∗ Andreas Blattmann∗ Björn Ommer Ludwig Maximilian University of Munich & IWR, Heidelberg University, Germany https://compvis.github.io/imagebart/ ",
17
+ "bbox": [
18
+ 214,
19
+ 226,
20
+ 782,
21
+ 268
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 303,
32
+ 535,
33
+ 320
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Autoregressive models and their sequential factorization of the data likelihood have recently demonstrated great potential for image representation and synthesis. Nevertheless, they incorporate image context in a linear 1D order by attending only to previously synthesized image patches above or to the left. Not only is this unidirectional, sequential bias of attention unnatural for images as it disregards large parts of a scene until synthesis is almost complete. It also processes the entire image on a single scale, thus ignoring more global contextual information up to the gist of the entire scene. As a remedy we incorporate a coarse-to-fine hierarchy of context by combining the autoregressive formulation with a multinomial diffusion process: Whereas a multistage diffusion process successively removes information to coarsen an image, we train a (short) Markov chain to invert this process. In each stage, the resulting autoregressive ImageBART model progressively incorporates context from previous stages in a coarse-to-fine manner. Experiments show greatly improved image modification capabilities over autoregressive models while also providing high-fidelity image generation, both of which are enabled through efficient training in a compressed latent space. Specifically, our approach can take unrestricted, user-provided masks into account to perform local image editing. Thus, in contrast to pure autoregressive models, it can solve free-form image inpainting and, in the case of conditional models, local, text-guided image modification without requiring mask-specific training. ",
40
+ "bbox": [
41
+ 232,
42
+ 334,
43
+ 766,
44
+ 612
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 637,
55
+ 312,
56
+ 655
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Spurred by the increasingly popular attention mechanism, a remarkably simple principle has driven progress in deep generative modeling over the past few years: Factorizing the likelihood of the data in an autoregressive (AR) fashion ",
63
+ "bbox": [
64
+ 176,
65
+ 670,
66
+ 823,
67
+ 712
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "equation",
73
+ "img_path": "images/d65c6f6ba029d829b3b83f63ee25e9bf84de02fb29d087e0995759f5d2447896.jpg",
74
+ "text": "$$\np ( \\boldsymbol x ) = \\prod _ { i } p _ { \\boldsymbol \\theta } ( x _ { i } | \\boldsymbol x _ { < i } )\n$$",
75
+ "text_format": "latex",
76
+ "bbox": [
77
+ 423,
78
+ 718,
79
+ 575,
80
+ 752
81
+ ],
82
+ "page_idx": 0
83
+ },
84
+ {
85
+ "type": "text",
86
+ "text": "and subsequently learning the conditional transition probabilities with an expressive neural network such as a transformer [75]. The success of this approach is evident in domains as diverse as language modeling [7], music generation [16], neural machine translation [46, 76], and (conditional) image synthesis [54, 8]. However, especially for the latter task of image synthesis, which is also the focus of this work, the high dimensionality and redundancy present in the data challenges the direct applicability of this approach. ",
87
+ "bbox": [
88
+ 174,
89
+ 757,
90
+ 823,
91
+ 842
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "Missing Bidirectional Context Autoregressive models which represent images as a sequence from the top-left to the bottom-right have demonstrated impressive performance in sampling novel images and completing the lower half of a given image [8, 21]. However, the unidirectional, fixed ordering of sequence elements not only imposes a perceptually unnatural bias to attention in images by only considering context information from left or above. It also limits practical applicability to image modification: Imagine that you only have the lower half of an image and are looking for a completion of the upper half then these models fail at this minor variation of the completion task. The importance of contextual information from both directions [36] has also been recognized in the context of language modeling [14, 45]. However, simply allowing bidirectional context as in [14] does not provide a valid factorization of the density function for a generative model. Furthermore, the sequential sampling strategy introduces a gap between training and inference, as training relies on so-called teacher-forcing [3] (where ground truth is provided for each step) and inference is performed on previously sampled tokens. This exposure bias can introduce significant accumulations of errors during the generation process, affecting sample quality and coherence [57]. ",
98
+ "bbox": [
99
+ 174,
100
+ 848,
101
+ 825,
102
+ 890
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "",
109
+ "bbox": [
110
+ 174,
111
+ 92,
112
+ 825,
113
+ 243
114
+ ],
115
+ "page_idx": 1
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "Global Context & Control via Multinomial Diffusion We propose a coarse-to-fine approach that addresses the unidirectional bias of generative autoregressive models and their exposure bias as well as the lacking global context. We formulate learning the data density as a hierarchical problem. A coarser stage provides compressed contextual side information about the entire image for the autoregressive process on the next finer stage. We utilize a diffusion process to gradually eliminate information and compress the data, yielding a hierarchy of increasingly abstract and compact representations. The first scale of this approach is a discrete representation learning task (cf. [74, 58, 16, 21, 78, 56]). Subsequently, we further compress this learned representation via a fixed, multinomial diffusion process [65, 30]. We then invert this process by training a Markov chain to recover the data from this hierarchy. Each Markovian transition is modeled autoregressively but it simultaneously attends to the preceding state in the hierarchy, which provides crucial global context to each individual autoregressive step. As each of this steps can also be interpreted as learning a denoising cloze task [45], where missing tokens at the next finer stage are “refilled” with a bidirectional encoder and an autoregressive decoder, we dub our approach ImageBART. ",
120
+ "bbox": [
121
+ 174,
122
+ 250,
123
+ 825,
124
+ 443
125
+ ],
126
+ "page_idx": 1
127
+ },
128
+ {
129
+ "type": "text",
130
+ "text": "Contributions of our work Our approach tackles high-fidelity image synthesis with autoregressive models by learning to invert a fixed multinomial diffusion process in a discrete space of compact image representations to successively introduce context. This reduces both the often encountered exposure bias of AR models and also enables locally controlled, user-interactive image editing. Additionally, our model effectively handles a variety of conditional synthesis tasks and our introduced hierarchy corresponds to a successively compressed image representation. We observe that our model sample visually plausible images while still enabling a trade-off between reconstruction capability and compression rate. ",
131
+ "bbox": [
132
+ 174,
133
+ 449,
134
+ 825,
135
+ 560
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "2 Related Work ",
142
+ "text_level": 1,
143
+ "bbox": [
144
+ 174,
145
+ 585,
146
+ 321,
147
+ 603
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "Latent Variable Models Among likelihood-based approaches, latent variable models represent a data distribution with the help of unobserved latent variables. For example, Variational Autoencoders (VAEs) [38, 59] encode data points into a lower dimensional latent variable with a factorized distribution. This makes them easy to sample, interpolate [44, 37] and modify [77]. In a conditional setting [39], latent variables which are independent from the conditioning lead to disentangled representations [31, 69, 48, 60, 5]. A hierarchy of latent variables [66] gives mutli-scale representations of the data. Unfortunately, even the deepest instantiations of these models [47, 71, 10] lack in sample quality compared to other generative models and are oftentimes restricted to highly regular datasets. ",
154
+ "bbox": [
155
+ 174,
156
+ 621,
157
+ 826,
158
+ 732
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "Autoregressive Models AR models represent a distribution as a product of conditional, learnable factors via the chain rule of probability densities. While this makes them powerful models for density estimation [70, 24], their samples often lack global consistency. Especially on image data modeled with convolutional architectures [73, 62], this has been attributed to a locality bias of convolutional neural networks (CNNs) which biases the model towards strong local correlations between neighboring pixels at the expense of a proper modeling of coherence [40, 22]. This leads to samples resembling texture patterns without discernible global structure. Attempts to fix this properties by including explicit latent variables [27, 9, 22] have not been overly successful, mainly due the expressiveness of AR models, providing little incentive for learning additional latent variables. ",
165
+ "bbox": [
166
+ 174,
167
+ 738,
168
+ 825,
169
+ 863
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "Generative Models on Improved Representations Another successful line of work first learn an improved image representation and subsequently learn a generative model for this representation [74, 12]. Most works [58, 21, 56] learn a discrete representation which is subsequently modeled autoregressively but approaches using continuous representations in combination with VAEs [12], or normalizing flows [1, 60, 20, 4, 18], exist too. Learning a compact representation enables the use of transformers for autoregressive modeling [8], which avoids the locality bias of CNNs, can be used for the synthesis of complex scenes conditioned on text as in DALL-E [56], and, when combined with adversarial learning [25], enables sampling of coherent high-resolution images [21]. However, AR modeling of a learned representation still limits applications compared to latent variable models. Their samples can still exert artifacts resulting from a sequential modeling of components, and, since these models are always trained by “teacher-forcing”, they are susceptible to an exposure bias [3, 57, 26, 63, 43]. ",
176
+ "bbox": [
177
+ 174,
178
+ 869,
179
+ 823,
180
+ 925
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "image",
186
+ "img_path": "images/b7b317357ba825b0b6bb911e364d249117d96d5e3065512839c26052664640d0.jpg",
187
+ "image_caption": [
188
+ "Figure 1: Overview over our approach: We first learn a compressed, discrete image representation $x _ { 1 }$ and subsequently our generative ImageBART model reverts a fixed multinomial diffusion process via a Markov Chain, where the individual transition probabilities are modeled as independent autoregressive encoder-decoder models. This introduces a coarse-to-fine hierarchy such that each individual AR model can attend to global context from its preceding scale in the hierarchy. "
189
+ ],
190
+ "image_footnote": [],
191
+ "bbox": [
192
+ 178,
193
+ 87,
194
+ 823,
195
+ 339
196
+ ],
197
+ "page_idx": 2
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "",
202
+ "bbox": [
203
+ 173,
204
+ 421,
205
+ 825,
206
+ 534
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "Diffusion Probabilistic Models Diffusion probabilistic models revert a fixed, diffusion process with a learned Markov Chain [65]. Being directly applied in pixel space, however, downstream analysis reveals that these models tend to optimize subtle details of the modeled data, which have little contribution to the sample quality [29, 15], particularly hindering applications on high-resolution and -complexity datasets. By using a multinomial diffusion process [30] (recently generalized by [2]) on a compressed, discrete representation of images, we circumvent these issues. Diffusion probabilistic models require a very large number of diffusion steps in order to model the reverse process with a model distribution that factorizes over components. Because our approach uses autoregressively factorized models for the reverse process, we can reduce the required number of steps and obtain significant improvements in sampling speed and the ability to model complex datasets. ",
213
+ "bbox": [
214
+ 173,
215
+ 539,
216
+ 825,
217
+ 678
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "3 Method ",
224
+ "text_level": 1,
225
+ "bbox": [
226
+ 174,
227
+ 696,
228
+ 269,
229
+ 714
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "text",
235
+ "text": "3.1 Hierarchical Generative Models ",
236
+ "text_level": 1,
237
+ "bbox": [
238
+ 174,
239
+ 728,
240
+ 436,
241
+ 743
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "To tackle the difficult problem of modeling a highly complex distribution $p ( x )$ of high-dimensional images $x$ , we (i) introduce bidirectional context into an otherwise unidirectional autoregressive factorization of $p ( x )$ as in Eq. (1) and (ii) reduce the difficulty of the learning problem with a hierarchical approach. To do so, we learn a sequence of distributions $( p _ { \\theta } ^ { t } ) _ { t = 0 } ^ { T }$ , such that each distribution $p _ { \\theta } ^ { t - 1 }$ models a slightly more complex distribution with the help of a slightly simpler distribution $p _ { \\theta } ^ { t }$ one level above. This introduces a coarse-to-fine hierarchy of image representations $x _ { 0 : T } : = ( x _ { t } ) _ { t = 0 } ^ { T }$ , such that an $x _ { t - 1 }$ is modeled conditioned on $x _ { t }$ , i.e. $x _ { t - 1 } \\sim p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } )$ and defines a reverse Markov Chain for $x = : x _ { 0 }$ as $\\begin{array} { r } { p _ { \\theta } ( x _ { 0 } ) = p _ { \\theta } ^ { T } ( x _ { T } ) \\prod _ { t = 1 } ^ { T } p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } \\vert x _ { t } ) } \\end{array}$ . Since our goal is to approximate the original distribution $p ( x )$ with $p _ { \\theta } ( x _ { 0 } )$ , we introduce a forward Markov Chain, $\\begin{array} { r } { q _ { \\theta } ( x _ { 1 : T } | x _ { 0 } ) = \\prod _ { t = 1 } ^ { T } q _ { \\theta } ^ { t } ( x _ { t } | x _ { t - 1 } ) } \\end{array}$ , to obtain a tractable upper bound on the Kullback-Leibler (KL) divergence between $p$ and $p _ { \\theta }$ , $\\mathbb { K L } ( p ( x _ { 0 } ) \\Vert p _ { \\boldsymbol \\theta } ( x _ { 0 } ) ) = : K \\bar { \\mathcal { L } }$ , using the evidence lower bound (ELBO). With $q _ { \\theta } ^ { T } ( x _ { T } | x _ { T - 1 } ) : = p _ { \\theta } ^ { T } ( x _ { T } )$ , we obtain ",
248
+ "bbox": [
249
+ 173,
250
+ 747,
251
+ 825,
252
+ 912
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "",
259
+ "bbox": [
260
+ 173,
261
+ 89,
262
+ 513,
263
+ 107
264
+ ],
265
+ "page_idx": 3
266
+ },
267
+ {
268
+ "type": "equation",
269
+ "img_path": "images/fd9924a8249a7f61f8035fd61ba17cb9dc0028161f8a4d65013784031295878b.jpg",
270
+ "text": "$$\nK \\mathcal { L } \\leq \\underbrace { \\mathbb { E } _ { x _ { 0 } , x _ { 1 } } \\log \\frac { p ( x _ { 0 } ) } { p _ { \\theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) } } _ { = : L _ { 1 } \\to \\mathrm { d i s c r e t e r e p r . l e a r n i n g } } + \\sum _ { t = 2 } ^ { T } \\underbrace { \\mathbb { E } _ { x _ { 0 } , x _ { t } } \\mathbb { K } \\mathbb { L } ( q _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) | | p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) ) } _ { = : L _ { t } \\to \\mathrm { d e c o u p l e d ~ w i t h ~ d i f f u s i o n ~ p r o c e s s } }\n$$",
271
+ "text_format": "latex",
272
+ "bbox": [
273
+ 228,
274
+ 112,
275
+ 767,
276
+ 171
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "We use $L _ { 1 }$ to learn a compressed and discrete representation of images, such that subsequent stages of the hierarchy do not need to model redundant information (Sec. 3.2). With $L _ { t } , t > 1$ we learn a model that can rely on global context from a coarser representation $x _ { t }$ to model the representation $x _ { t - 1 }$ (Sec. 3.3). See Fig. 1 for an overview of the proposed model. ",
283
+ "bbox": [
284
+ 176,
285
+ 183,
286
+ 823,
287
+ 238
288
+ ],
289
+ "page_idx": 3
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "3.2 Learning a compact, discrete representation for images ",
294
+ "text_level": 1,
295
+ "bbox": [
296
+ 174,
297
+ 255,
298
+ 596,
299
+ 270
300
+ ],
301
+ "page_idx": 3
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "Since the first stage of the hierarchical process is the one that operates directly on the data, we assign it a separate role. To avoid that the optimization of $L _ { t }$ $( t = 1 , \\ldots , T )$ in Eq. (2) unnecessarily wastes capacity on redundant details in the input images—which is an often encountered property of pixel-based likelihood models [74, 21, 50]—we take $\\begin{array} { r } { L _ { 1 } = \\mathbb { E } _ { p ( x _ { 0 } ) q _ { \\theta } ^ { 1 } ( x _ { 1 } | x _ { 0 } ) } \\log \\frac { p ( x _ { 0 } ) } { p _ { \\theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) } } \\end{array}$ to be the reconstruction term for a discrete autoencoder model. This has the advantage that we can directly build on work in neural discrete representation learning, which has impressively demonstrated that discrete representations can be used for high-quality synthesis of diverse images while achieving strong compression. In particular, [49] and [21] have shown that adding an adversarial realism prior to the usual autoencoder objective helps to produce more realistic images at higher compression rates by locally trading reconstruction fidelity for realism. ",
306
+ "bbox": [
307
+ 173,
308
+ 272,
309
+ 825,
310
+ 419
311
+ ],
312
+ "page_idx": 3
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "More specifically, we follow [21] to encode images into a low-dimensional representation which is then vector-quantized with a learned codebook of size $K$ to obtain $\\{ 0 , \\dotsc , \\dot { K } - 1 \\} ^ { h \\times w } \\ni x _ { 1 } \\sim$ $q _ { \\theta } ^ { 1 } ( x _ { 1 } | x _ { 0 } )$ deterministically as the index of the closest codebook entry. The encoder is a convolutional neural network (CNN) with four downsampling steps, such that $h = H / 1 6$ and $w = W / 1 6$ for any input image $\\boldsymbol { x } _ { 0 } \\in \\mathbb { R } ^ { H \\times W \\times 3 }$ . For downstream autoregressive learning, this representation is then unrolled into a discrete sequence of length $N = h \\cdot w$ . To recover an image from $x _ { 1 }$ , we utilize a CNN decoder $G$ , such that the reverse model is specified as ",
317
+ "bbox": [
318
+ 173,
319
+ 424,
320
+ 825,
321
+ 522
322
+ ],
323
+ "page_idx": 3
324
+ },
325
+ {
326
+ "type": "equation",
327
+ "img_path": "images/93cfaa181dd1afc549a42073b5718be3412e73b007d8b00ed44c1e6df30dc189.jpg",
328
+ "text": "$$\n- \\log p _ { \\theta } ^ { 0 } ( x _ { 0 } | x _ { 1 } ) \\propto f _ { r e c } ( x _ { 0 } , G _ { \\theta } ( x _ { 1 } ) ) + \\log D _ { \\phi } ( G _ { \\theta } ( x _ { 1 } ) ) = : L _ { r e c } ( x _ { 0 } , x _ { 1 } ; \\theta ) + L _ { a d v } ( x _ { 1 } ; \\theta , \\phi )\n$$",
329
+ "text_format": "latex",
330
+ "bbox": [
331
+ 181,
332
+ 526,
333
+ 795,
334
+ 545
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Here, $f _ { r e c }$ denotes the perceptual similarity metric [23, 32, 19, 80] (known as LPIPS) and $D _ { \\phi }$ denotes a patch-based adversarial discriminator [25]. Note that, due to the deterministic training, the likelihood in Eq. (3) is likely to be degenerate. $D _ { \\phi }$ is optimized to differentiate original images $x _ { 0 }$ from their reconstruction $G _ { \\theta } ( x _ { 1 } )$ using simultaneous gradient ascent, such that the objective for learning the optimal parameters $\\{ \\theta ^ { * } , \\phi ^ { * } \\}$ reads: ",
341
+ "bbox": [
342
+ 173,
343
+ 549,
344
+ 826,
345
+ 619
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "equation",
351
+ "img_path": "images/a6bea8878f37bad1055acd383b6974b56250ab933df0e6eab4aae7fbc1778c6e.jpg",
352
+ "text": "$$\n\\{ \\theta ^ { * } , \\phi ^ { * } \\} = \\arg \\operatorname* { m i n } _ { \\theta } \\operatorname* { m a x } _ { \\phi } \\Big ( L _ { r e c } ( x _ { 0 } , x _ { 1 } ; \\theta ) - L _ { a d v } ( x _ { 1 } ; \\theta , \\phi ) + \\log D _ { \\phi } ( x _ { 0 } ) + L _ { c b } ( \\theta ) \\Big )\n$$",
353
+ "text_format": "latex",
354
+ "bbox": [
355
+ 217,
356
+ 625,
357
+ 779,
358
+ 655
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "The optimization of $\\theta$ via this objective includes the parameters of the encoder and decoder in addition to the parameters of the learned codebook, trained via the codebook loss $L _ { c b }$ as in [74, 21]. ",
365
+ "bbox": [
366
+ 174,
367
+ 660,
368
+ 826,
369
+ 689
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "3.3 Parallel learning of hierarchies ",
376
+ "text_level": 1,
377
+ "bbox": [
378
+ 174,
379
+ 704,
380
+ 428,
381
+ 719
382
+ ],
383
+ "page_idx": 3
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "Under suitable choices for $p _ { \\theta } , q _ { \\theta }$ , one can directly optimize these chains over $\\sum _ { t } L _ { t }$ . However, the objectives $L _ { t }$ of the hierarchy levels are coupled through the forward chain $q _ { \\theta }$ , which makes this optimization problem difficult. With expressive reverse models $p _ { \\theta } ^ { t - 1 }$ , the latent variables $x _ { t }$ are often ignored by the model [22] and the scale of the different level-objectives can be vastly different, resulting in a lot of gradient noise that hinders the optimization [52]. In the continuous case, reweighting schemes for the objective can be derived [29] based on a connection to score matching models [67]. However, since we are working with a discrete $x _ { 1 }$ , there is no analogue available. ",
388
+ "bbox": [
389
+ 173,
390
+ 723,
391
+ 825,
392
+ 821
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "While we could follow the approach taken for the first level and sequentially optimize over the objectives $L _ { t }$ , this is a rather slow process since each level $t - 1$ needs to be converged before we can start solving level $t$ . However, this sequential dependence is only introduced through the forward models $q _ { \\theta } ^ { t }$ and since $q _ { \\theta } ^ { 1 }$ already learns a strong representation, we can choose simpler and fixed, predefined forward processes for $q _ { \\theta } ^ { t } , t > 1$ . The goal of these processes, i.e., generating a hierarchy of distributions by reducing information in each transition, can be readily achieved by, e.g., randomly masking [14], removing [45] or replacing [30] a fraction of the components of $x _ { t - 1 }$ . ",
399
+ "bbox": [
400
+ 173,
401
+ 827,
402
+ 825,
403
+ 925
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "Multinomial diffusion This process of randomly replacing a fraction $\\beta _ { t }$ of the components with random entries can be described as a multinomial diffusion process [30], a natural generalization of binomial diffusion [65]. The only parameter $\\theta$ of $q _ { \\theta } ^ { t }$ is therefore $\\beta _ { t }$ , which we consider to be fixed. Using the standard basis $e ( k ) = ( \\delta _ { j k } ) _ { j = 1 } ^ { K }$ , the forward process can be written as a product of categorical distributions $\\mathcal { C }$ specified in terms of the probabilities over the codebook indices: ",
410
+ "bbox": [
411
+ 174,
412
+ 90,
413
+ 825,
414
+ 162
415
+ ],
416
+ "page_idx": 4
417
+ },
418
+ {
419
+ "type": "equation",
420
+ "img_path": "images/621cf3c92f2a7ff37a4af90a6839da99298643ce3798e46ddc3090504d3a1b14.jpg",
421
+ "text": "$$\nq _ { \\theta } ^ { t } ( x _ { t } | x _ { t - 1 } ) = \\prod _ { i = 1 } ^ { N } { \\mathcal { C } } ( x _ { t } ^ { i } | ( 1 - \\beta _ { t } ) e ( x _ { t - 1 } ^ { i } ) + \\beta _ { t } \\mathbb { 1 } / K ) , \\quad t > 1\n$$",
422
+ "text_format": "latex",
423
+ "bbox": [
424
+ 297,
425
+ 167,
426
+ 700,
427
+ 210
428
+ ],
429
+ "page_idx": 4
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "where $\\mathbb { 1 } = ( 1 ) _ { j = 1 } ^ { K }$ is the all one vector. It then follows that after $t - 1$ steps, on average, a fraction of $\\begin{array} { r } { \\bar { \\alpha } _ { t } : = \\prod _ { l = 2 } ^ { t } ( 1 - \\beta _ { t } ) } \\end{array}$ entries from $x _ { 1 }$ remain unchanged in $x _ { t }$ , i.e. ",
434
+ "bbox": [
435
+ 173,
436
+ 215,
437
+ 823,
438
+ 251
439
+ ],
440
+ "page_idx": 4
441
+ },
442
+ {
443
+ "type": "equation",
444
+ "img_path": "images/f8b9a745f7e5898895b688e2dcd29e47568dd38103f74bdc8d3fd2a67428d6d9.jpg",
445
+ "text": "$$\nq _ { \\theta } ^ { t } \\big ( x _ { t } | x _ { 1 } \\big ) = \\prod _ { i = 1 } ^ { N } \\mathcal { C } \\big ( x _ { t } ^ { i } | \\bar { \\alpha } _ { t } e \\big ( x _ { 1 } ^ { i } \\big ) + \\big ( 1 - \\bar { \\alpha } _ { t } \\big ) \\mathbb { 1 } / K \\big ) , \\quad t > 1 .\n$$",
446
+ "text_format": "latex",
447
+ "bbox": [
448
+ 308,
449
+ 255,
450
+ 691,
451
+ 299
452
+ ],
453
+ "page_idx": 4
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "This enables computation of the posterior $\\begin{array} { r } { q _ { \\theta } ( x _ { t - 1 } \\vert x _ { t } , x _ { 1 } ) = \\frac { q _ { \\theta } ^ { t } ( x _ { t } \\vert x _ { t - 1 } ) q _ { \\theta } ( x _ { t - 1 } \\vert x _ { 1 } ) } { q _ { \\theta } ( x _ { t } \\vert x _ { 1 } ) } } \\end{array}$ for $t > 2$ , and, using the fact that $q _ { \\theta } ^ { 1 }$ is deterministic, we can rewrite $L _ { t }$ as ",
458
+ "bbox": [
459
+ 174,
460
+ 304,
461
+ 825,
462
+ 342
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "equation",
468
+ "img_path": "images/26875d930c5da3a41254c4aa397ff97a20fe03ad876d28ecc01c03b5bbb85953.jpg",
469
+ "text": "$$\n\\mathbb { E } _ { p ( x _ { 0 } ) } \\mathbb { E } _ { q _ { \\theta } ( x _ { t } | x _ { 1 } ) } \\mathbb { K L } \\big ( q _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } , x _ { 1 } ) \\| p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) \\big ) , \\quad t > 2\n$$",
470
+ "text_format": "latex",
471
+ "bbox": [
472
+ 284,
473
+ 345,
474
+ 714,
475
+ 366
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "such that the KL term can now be computed analytically for $t > 2$ . For $t = 2$ , we use a single sample Monte-Carlo estimate for the maximum likelihood reformulation, i.e. ",
482
+ "bbox": [
483
+ 173,
484
+ 368,
485
+ 823,
486
+ 397
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "equation",
492
+ "img_path": "images/aaff8b4104a99952da3434bca204caf9ce152f90e25fe2fd67e1d336fa6313c4.jpg",
493
+ "text": "$$\n\\begin{array} { r } { \\arg \\operatorname* { m i n } L _ { 2 } = \\arg \\operatorname* { m a x } \\mathbb { E } _ { p ( x _ { 0 } ) } \\mathbb { E } _ { q _ { \\theta } ^ { 2 } ( x _ { 2 } | x _ { 1 } ) } \\log p _ { \\theta } ^ { 1 } ( x _ { 1 } | x _ { 2 } ) . } \\end{array}\n$$",
494
+ "text_format": "latex",
495
+ "bbox": [
496
+ 316,
497
+ 401,
498
+ 679,
499
+ 422
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "Finally, we set $p _ { \\theta } ^ { T }$ to be a uniform distribution. This completes the definition of the reverse chain $p _ { \\theta }$ , which can now be started from a random sample for $x _ { T } \\sim p _ { \\theta } ^ { T } ( x _ { T } )$ , denoised sequentially through $x _ { t - 1 } \\sim p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } )$ for $t = T , \\dots , 2$ , and finally be decoded to a data sample $x _ { 0 } = G ( x _ { 1 } )$ . ",
506
+ "bbox": [
507
+ 173,
508
+ 428,
509
+ 826,
510
+ 474
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "Reverse diffusion models Under what conditions can we recover the true data distribution? By rewriting $\\textstyle \\sum _ { t } L _ { t }$ , we can see from ",
517
+ "bbox": [
518
+ 173,
519
+ 487,
520
+ 823,
521
+ 517
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "equation",
527
+ "img_path": "images/083b5e8546c75796710b48c54bfcc1872541da0ee186521c47d1644c3c7206e1.jpg",
528
+ "text": "$$\n\\mathbb { K L } ( p ( x _ { 0 } ) \\| p _ { \\theta } ( x _ { 0 } ) ) \\leq \\sum _ { t = 1 } ^ { T } \\mathbb { K L } ( q _ { \\theta } ( x _ { t - 1 } | x _ { t } ) \\| p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) )\n$$",
529
+ "text_format": "latex",
530
+ "bbox": [
531
+ 300,
532
+ 522,
533
+ 696,
534
+ 565
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "that this is possible as long as all reverse models are expressive enough to represent the true reverse processes defined by $q _ { \\theta }$ . For the first level, we can ensure this by making $x _ { 1 }$ large enough such that the reconstruction error becomes negligible. For the diffusion process, previous image models [65, 29, 68, 30] relied on the fact that, in the limit $\\beta _ { t } \\to 0$ , the form of the true reverse process has the same functional form as the forward diffusion process [65, 41]. In particular, this allows modeling of the reverse process with a distribution factorized over the components. However, to make $q _ { \\theta } ^ { T - 1 }$ close to a uniform distribution requires a very large $T$ (in the order of 1000 steps) with small $\\beta _ { t }$ . Training such a large number of reverse models is only feasible with shared weights for the models, but this requires a delicate reweighting [29] of the objective and currently no suitable reweighting is known for the discrete case considered here. ",
541
+ "bbox": [
542
+ 173,
543
+ 569,
544
+ 825,
545
+ 709
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Thus, to be able to recover the true data distribution with a modest number of reverse models that can be trained fully parallel, and without weight-sharing, we model each reverse process autoregressively. We use an encoder-decoder transformer architecture [75], such that the decoder models the reverse process for $x _ { t - 1 }$ autoregressively with the help of global context obtained by cross-attending to the encoder’s representation of $x _ { t }$ as visualized in Fig. 1. Note that the need for autoregressive modeling gets reduced for small $\\beta _ { t }$ , which we can adjust for by reducing the number of decoder layers compared to encoder layers. The use of the compression model described in Sec. 3.2, however, allows to utilize full-attention based transformer architectures to implement the autoregressive scales. ",
552
+ "bbox": [
553
+ 173,
554
+ 715,
555
+ 826,
556
+ 827
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "4 Experiments ",
563
+ "text_level": 1,
564
+ "bbox": [
565
+ 174,
566
+ 859,
567
+ 312,
568
+ 876
569
+ ],
570
+ "page_idx": 4
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "Sec. 4.1 evaluates the quality ImageBART achieves in image synthesis. Since we especially want to increase the controllability of the generative process, we evaluate the performance of ImageBART on class- and text-conditional image generation in Sec. 4.2. The ability of our approach to attend to global context enables a new level of localized control which is not possible with previous, purely autoregressive approaches as demonstrated in Sec. 4.3. Finally, Sec. 4.4 presents ablations on model and architecture choices. ",
575
+ "bbox": [
576
+ 174,
577
+ 882,
578
+ 821,
579
+ 911
580
+ ],
581
+ "page_idx": 4
582
+ },
583
+ {
584
+ "type": "image",
585
+ "img_path": "images/6dab2543f9aa70309e45c4de1c0b6c5bdb358bb4b6b062f23c886c9bf17f6839.jpg",
586
+ "image_caption": [
587
+ "Figure 2: Samples from our models. Top row: FFHQ, LSUN-Cats, Middle row: LSUN-Bedrooms, LSUNChurches, Bottom row: ImageNet. "
588
+ ],
589
+ "image_footnote": [],
590
+ "bbox": [
591
+ 174,
592
+ 90,
593
+ 820,
594
+ 309
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "table",
600
+ "img_path": "images/e89b0572d02da60e49c35ce37375f33948653d88f2d4998a26e96ce521587004.jpg",
601
+ "table_caption": [],
602
+ "table_footnote": [
603
+ "Table 1: Left: FIDs on the LSUN-{Churches,Beds,Cats} [79] and FFHQ [33] datasets. Right: Corresponding qualitative comparisons. Qualitative comparisons with TT can be found in Fig. 20 and Fig. 21 "
604
+ ],
605
+ "table_body": "<table><tr><td>Method</td><td>Cats Beds</td><td>Churches</td><td></td><td>FFHQ</td><td></td><td>ImageBART</td><td>DDPM</td><td>SSDE</td></tr><tr><td>VDVAE [10]</td><td>1</td><td>1</td><td>1</td><td>28.5</td><td rowspan=\"2\">Churches</td><td rowspan=\"2\"></td><td rowspan=\"2\"></td><td rowspan=\"2\">健</td></tr><tr><td>DDPM [29]</td><td>19.75</td><td>4.90</td><td>7.89</td><td>1</td></tr><tr><td>StyleGAN2 [34]</td><td>7.25</td><td>2.35</td><td>3.86</td><td>3.8</td><td>Cats</td><td></td><td></td><td></td></tr><tr><td>BigGAN [6]</td><td>1</td><td>1</td><td>1</td><td>12.4</td><td>cIN (c14)</td><td></td><td></td><td></td></tr><tr><td>DCT[50]</td><td>1</td><td>6.40</td><td>7.56</td><td>13.06</td><td>cIN (c323)</td><td></td><td></td><td></td></tr><tr><td>TT[21]</td><td>17.31</td><td>6.35</td><td>7.81</td><td>11.4</td><td>cIN (c963)</td><td></td><td></td><td></td></tr><tr><td>ImageBART</td><td>15.09</td><td>5.51</td><td>7.32</td><td>9.57</td><td></td><td></td><td></td><td></td></tr></table>",
606
+ "bbox": [
607
+ 176,
608
+ 361,
609
+ 823,
610
+ 506
611
+ ],
612
+ "page_idx": 5
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "",
617
+ "bbox": [
618
+ 174,
619
+ 554,
620
+ 825,
621
+ 609
622
+ ],
623
+ "page_idx": 5
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "4.1 High-Fidelity Image Synthesis with ImageBART ",
628
+ "text_level": 1,
629
+ "bbox": [
630
+ 173,
631
+ 617,
632
+ 549,
633
+ 632
634
+ ],
635
+ "page_idx": 5
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "In this section we present qualitative and quantitative results on images synthesized by our approach. We train models at resolution $2 5 6 \\times 2 5 6$ for unconditional generation on FFHQ [33], LSUN -Cats, -Churches and -Bedrooms [79] and on class-conditional synthesis on ImageNet (cIN) [13]. ",
640
+ "bbox": [
641
+ 174,
642
+ 635,
643
+ 826,
644
+ 675
645
+ ],
646
+ "page_idx": 5
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "Effective Discrete Representations Learning the full hierarchy as described in Eq. (2) and without unnecessary redundancies in the data requires to first learn a strong compression model via the objective in Eq. (4). [21] demonstrated how to effectively train such a model and we directly utilize the publicly available pretrained models. For training on LSUN, we finetune an ImageNet pretrained model for one epoch on each dataset. As the majority of codebook entries remains unused, we shrink the codebook to those entries which are actually used (evaluated on the validation split of ImageNet) and assign a random entry for eventual outliers. This procedure yields an effective, compact representation on which we subsequently train ImageBART. ",
651
+ "bbox": [
652
+ 174,
653
+ 681,
654
+ 825,
655
+ 792
656
+ ],
657
+ "page_idx": 5
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "Training Details As described in Sec. 3.3, we use an encoder-decoder structure to model the reverse Markov Chain $p _ { \\theta } ^ { t - 1 } ( x _ { t - 1 } | x _ { t } ) , \\ t < T ,$ , where the encoder is a bidirectional transformer model and decoder is implemented as an AR transformer. As the context for the last scale is pure noise, we employ a decoder-only variant to model $p _ { \\theta } ^ { T - 1 } ( x _ { T - 1 } | x _ { T } )$ . Furthermore, to account for the different complexities of the datasets, we adjust the number of multinomial diffusion steps for each dataset accordingly. For FFHQ we choose a chain of length $T = 3$ , such that the total model consists of (i) the compression stage and (ii) $n = 2$ transformer models trained in parallel via the objective described in Eq.(7). Similarly, we set $n = 3$ for each of the LSUN models and $n = 5$ for the ImageNet model. ",
662
+ "bbox": [
663
+ 173,
664
+ 797,
665
+ 825,
666
+ 911
667
+ ],
668
+ "page_idx": 5
669
+ },
670
+ {
671
+ "type": "table",
672
+ "img_path": "images/8aa6a5ee5574a42041051f4e0c6bc21b99a5e65c4ad69234015837de67fc999c.jpg",
673
+ "table_caption": [],
674
+ "table_footnote": [],
675
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"4\">rejection rate for cIN sampling</td></tr><tr><td>1.0</td><td>0.5</td><td>0.25</td><td>0.05</td></tr><tr><td>FID</td><td>21.19</td><td>13.12</td><td>9.77</td><td>7.44</td></tr><tr><td>IS</td><td>61.6±0.8</td><td>109.5±2.3</td><td>146.2±3.8</td><td>273.5±4.1</td></tr></table>",
676
+ "bbox": [
677
+ 176,
678
+ 88,
679
+ 491,
680
+ 161
681
+ ],
682
+ "page_idx": 6
683
+ },
684
+ {
685
+ "type": "table",
686
+ "img_path": "images/66bcc3ea2572a2b592264f9c90b9df549e99aeb2148669a4f666eb1130621697.jpg",
687
+ "table_caption": [],
688
+ "table_footnote": [],
689
+ "table_body": "<table><tr><td colspan=\"3\">Text-conditional image synthesis on CC [64]</td></tr><tr><td>Method</td><td>FID↓ IS↑</td><td>CLIP-score ↑</td></tr><tr><td>TT[21]</td><td>28.86</td><td>13.11±0.43 0.20±0.03</td></tr><tr><td>ImageBART 22.61</td><td>15.27±0.59</td><td>0.23±0.03</td></tr></table>",
690
+ "bbox": [
691
+ 503,
692
+ 88,
693
+ 816,
694
+ 161
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Table 2: Quantitative analysis on conditional models. Left: Results on class conditional Imagenet for different rejection rates, see also Fig, 20 in the supplemental. Right: Results of text-conditional ImageBART and comparison with TT [21] on the CC test set. Corresponding qualitative comparisons can be found in Fig. 21. ",
701
+ "bbox": [
702
+ 173,
703
+ 171,
704
+ 826,
705
+ 210
706
+ ],
707
+ "page_idx": 6
708
+ },
709
+ {
710
+ "type": "image",
711
+ "img_path": "images/23609c1e1e2babddfb1fde79cad0fb58708ff1b0cd031c8a0ccd5e01557b8c6f.jpg",
712
+ "image_caption": [
713
+ "Figure 3: Samples from text-conditional ImageBART. Best 2 of 32 with reranking as in [56]. "
714
+ ],
715
+ "image_footnote": [],
716
+ "bbox": [
717
+ 178,
718
+ 220,
719
+ 838,
720
+ 358
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "Results For each of these settings, Fig. 2 depicts samples of size $2 5 6 \\times 2 5 6$ generated with ImageBART and a single pass through the learned Markov Chain, demonstrating that our model is able to produce realistic and coherent samples. This is further confirmed by a quantitative analysis in Tab. 1, where we compare FID scores of competing likelihood-based and score-based methods such as TT [21] and DDPM [29]. Regarding other works on diffusion models such as [29] and [68] operating directly in pixel space, we observe that these approaches perform roughly equivalently well in terms of FID for datasets of low complexity (e.g. LSUN-Bedrooms and-Churches). For more complex datasets (LSUN-Cats, cIN), however, our method outperforms these pixel-based approaches, which can also be seen qualitatively on the right in Tab. 1. See Fig. 20 for a comparison on ImageNet. ",
727
+ "bbox": [
728
+ 174,
729
+ 402,
730
+ 825,
731
+ 527
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "4.2 Conditional Markov Chains for Controlled Image Synthesis ",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 174,
741
+ 550,
742
+ 629,
743
+ 565
744
+ ],
745
+ "page_idx": 6
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "Being a sequence-to-sequence model, our approach allows for flexible and arbitrary conditioning by simply preprending tokens, similar to [21, 56]. More specifically, each learned transition $p _ { \\theta } ^ { t - 1 } \\dot { ( x } _ { t - 1 } \\dot { | x _ { t } , c ) }$ , $t > 1$ of the Markov chain is then additionally conditioned on a representation $c$ e.g. a single token in the case of the class-conditional model of Sec. 4.1. Note that the compression model $p _ { \\theta } ^ { 0 }$ remains unchanged. ",
750
+ "bbox": [
751
+ 174,
752
+ 571,
753
+ 825,
754
+ 642
755
+ ],
756
+ "page_idx": 6
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Text-to-Image Synthesis Besides class-conditional modeling on ImageNet, we also learn a textconditional model on Conceptual Captions (CC) [64, 51]. We obtain $c$ by using the publicly available tokenizer of the CLIP model [55], yielding a conditioning sequence of length 77. To model the dataset, we choose $T = 5$ and thus train $n = 4$ transformer models independently. For the $p _ { \\theta } ^ { 0 }$ , we directly transfer the compression model from Sec. 4.1, trained on the ImageNet dataset. ",
761
+ "bbox": [
762
+ 174,
763
+ 648,
764
+ 825,
765
+ 718
766
+ ],
767
+ "page_idx": 6
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "Fig. 3 visualizes synthetic samples obtained with this model for various “image-cloze” tasks. Our resulting model is able to attend to semantic variations in the conditioning sentence (e.g. a change of weather for imagery of mountains) and renders the corresponding images accordingly. In Tab. 2, we evaluate FID [28] and Inception Scores (IS) [61] to measure the quality of synthesized images, as well as cosine similarity between CLIP [55] embeddings of the text prompts and the synthesized images to measure how well the image reflects the text. ImageBART improves all metrics upon [21]. Fig. 21 in the supplement provides corresponding qualitative examples for user-defined text inputs. ",
772
+ "bbox": [
773
+ 173,
774
+ 724,
775
+ 825,
776
+ 821
777
+ ],
778
+ "page_idx": 6
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Resolutions Beyond $\\mathbf { 2 5 6 \\times 2 5 6 }$ Pixels. Our approach is not restricted to generating images of size $2 5 6 \\times 2 5 6$ pixels. Although trained on a fixed resolution, we can apply our models in a patch-wise manner, where we use the sliding attention window of [21] for each scale $t > 0$ . As we now incorporate more and more global context while decoding with the Markov chain (which can be thought of as widening a noisy receptive field), ImageBART is able to render consistent images in the megapixel regime. See for example Fig. 4, where we use our text-conditional model to render an image of size $3 0 0 \\times 1 8 0 0$ pixel and interpolate between two different text prompts. More examples, especially also for semantically guided synthesis, can be found in Sec. A.2. ",
783
+ "bbox": [
784
+ 174,
785
+ 828,
786
+ 823,
787
+ 911
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "image",
793
+ "img_path": "images/ebb58974d2f9dfea8cc6e99357c21c61ddaabeb9e2b180889e1ae338ba73eab2.jpg",
794
+ "image_caption": [
795
+ "Figure 4: ImageBART is capable of generating high-resolution images. Here, we condition it on text prompts and interpolate between the two descriptions depicted above the image (see also Sec. 4.2). "
796
+ ],
797
+ "image_footnote": [],
798
+ "bbox": [
799
+ 174,
800
+ 98,
801
+ 821,
802
+ 179
803
+ ],
804
+ "page_idx": 7
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "",
809
+ "bbox": [
810
+ 173,
811
+ 218,
812
+ 825,
813
+ 247
814
+ ],
815
+ "page_idx": 7
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "4.3 Beyond Conditional Models: Local Editing with Autoregressive Models ",
820
+ "text_level": 1,
821
+ "bbox": [
822
+ 174,
823
+ 265,
824
+ 707,
825
+ 281
826
+ ],
827
+ "page_idx": 7
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "Recent autoregressive approaches, which use a CNN to learn a discrete representation [74], partially alleviate the issues of pixel-wise autoregressive models by working on larger image patches. However, as we show in Fig. 5, even approaches which use adversarial learning to maximize the amount of context encoded in the discrete representation [21] cannot produce completions of the upper half of an image which are consistent with a given lower half. ",
832
+ "bbox": [
833
+ 174,
834
+ 285,
835
+ 825,
836
+ 354
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "While our approach also models each transition autoregressively from the top-left to the bottom-right, the ability to attend to global context from the previous scale enables consistent completions of arbitrary order, e.g. right-to-left. To achieve this, we mask the diffusion process as described in Sec. A.3. For a user-specified mask $m$ (e.g. the upper half of an image as in Fig. 5), this results in a forward-backward process pt−θ $p _ { \\theta } ^ { t - 1 | t - 1 , m }$ , which, by definition, leaves the unmasked context intact. The reverse process then denoises the unmasked entries to make them consistent with the given context. ",
843
+ "bbox": [
844
+ 173,
845
+ 361,
846
+ 825,
847
+ 448
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Fig. 5 (bottom) visualizes this mixing process, where we use a model with $T = 3$ . The first column shows the masked input. To start the process we set all masked entries to random entries. The first two columns then show (decoded) samples from the masked reverse processes $p _ { \\theta } ^ { 2 , m }$ and p1,θ $p _ { \\theta } ^ { 1 , m }$ , which still display inconsistencies. The remaining columns show the trajectory of the process $p _ { \\theta } ^ { 1 | 1 , m }$ , which demonstrates how the model iteratively adjusts its samples according to the given context until it converges to a globally consistent sample. For illustration, we show the analog trajectory obtained with [21], but because it can only attend to unidirectional context, this trajectory is equivalent to a sequence of independent samples and therefore fails to achieve global consistency. ",
854
+ "bbox": [
855
+ 173,
856
+ 453,
857
+ 825,
858
+ 570
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "The masked process can be used with arbitrary masks, which enables localized image editing with free, hand-drawn masks as shown in Fig. 6. Note that our model does not need to be trained specifically for this task, which also avoids generalization problems associated with training on masks [81]. Combining this property with the conditional models from Sec. 4.2 allows for especially interesting novel applications, where local image regions are modified based on user specified class or text prompts, as shown in Fig. 7. ",
865
+ "bbox": [
866
+ 173,
867
+ 577,
868
+ 826,
869
+ 660
870
+ ],
871
+ "page_idx": 7
872
+ },
873
+ {
874
+ "type": "image",
875
+ "img_path": "images/03b84378714d34185ad00d3dfa7f6d9b9d60e5564bcb7f99d99f030e1caa096c.jpg",
876
+ "image_caption": [
877
+ "Figure 5: Without global context, AR models fail at completing upper halfs, contrasting ImageBART. "
878
+ ],
879
+ "image_footnote": [],
880
+ "bbox": [
881
+ 173,
882
+ 672,
883
+ 828,
884
+ 883
885
+ ],
886
+ "page_idx": 7
887
+ },
888
+ {
889
+ "type": "image",
890
+ "img_path": "images/798638d2e9717d750afc7165a5042aa56c5dbf030da17d3a7940b687c4221ace.jpg",
891
+ "image_caption": [
892
+ "Figure 6: Local editing application using markov chain of length 16 on FFHQ. By incorporating bidirectional context ImageBART is able to solve this unconditional inpainting task (cf. Sec. 4.3). "
893
+ ],
894
+ "image_footnote": [],
895
+ "bbox": [
896
+ 178,
897
+ 90,
898
+ 820,
899
+ 231
900
+ ],
901
+ "page_idx": 8
902
+ },
903
+ {
904
+ "type": "image",
905
+ "img_path": "images/e36976b238d2f4e276c66ae208d9062eeb14211964ef27d411452dd127613584.jpg",
906
+ "image_caption": [
907
+ "Figure 7: Conditionally guided inpainting results obtained from conditional ImageBART trained on the i) ImageNet (top row) and ii) Conceptual Captions (bottom row) datasets. "
908
+ ],
909
+ "image_footnote": [],
910
+ "bbox": [
911
+ 176,
912
+ 284,
913
+ 816,
914
+ 501
915
+ ],
916
+ "page_idx": 8
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "4.4 Ablations ",
921
+ "text_level": 1,
922
+ "bbox": [
923
+ 174,
924
+ 555,
925
+ 279,
926
+ 570
927
+ ],
928
+ "page_idx": 8
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "On the Number of Diffusion Steps In this section we analyze the effect of varying the number of diffusion steps (denoted by $T$ ). To do so, we perform an experiment for unconditional training on the FFHQ dataset, where we train a Taming Transformers (TT) baseline (corresponding to the case $T = 2$ within our framework) with 800M parameters and three variants of ImageBART with $T = 3$ $( 2 \\mathrm { x } 4 0 0 \\mathrm { M } )$ , $T = 5$ $( 4 \\mathrm { x } 2 0 0 \\mathrm { M } )$ and $T = 9$ (8x100M), respectively. Note that for a fair comparison, all models use the same first level for compression, and we fix the number of remaining parameters to $8 0 0 \\mathbf { M }$ and distribute them equally across all scales. All models were trained with the same computational budget and evaluated at the best validation checkpoint. ",
933
+ "bbox": [
934
+ 174,
935
+ 583,
936
+ 825,
937
+ 694
938
+ ],
939
+ "page_idx": 8
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "In Tab. 3, we assess both the pure synthesis and the modification ability of ImageBART by computing FID scores on samples and modified images (in the case of upper half completion as in Fig. 5). For both tasks, we use a single pass through the reverse Markov chain. We observe that the modification performance increases monotonically with the number of scales, which highlights the improved image manipulation abilities of our approach. For unconditional generation, we observe a similar trend, although FID seems to plateau beyond $T = 5$ . ",
944
+ "bbox": [
945
+ 174,
946
+ 700,
947
+ 825,
948
+ 784
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "Joint vs. Independent Training While it is possible to optimize Eq. (2) jointly across all scales, we found that training is more robust when training all scales independently. Besides the usual separation of training the compression model $p _ { \\theta } ^ { 0 }$ and the generative model $p _ { \\theta } ^ { t \\geq 1 }$ , training the latter in parallel over multiple scales avoids the tedious weighting of the loss contribution from different scales; an often encountered problem in other denoising diffusion probabilistic models [29]. ",
955
+ "bbox": [
956
+ 174,
957
+ 790,
958
+ 825,
959
+ 862
960
+ ],
961
+ "page_idx": 8
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "Efficiency with Less Decoder Layers As we implement the conditional transition probabilities $p _ { \\theta } ^ { t - 1 }$ with an encoder-decoder transformer architecture, we are interested in the effect of altering the ratio of encoder and decoder layers in the model. Recent work has provided evidence that it is possible to significantly reduce the number of decoder layers and thus also decrease autoregressive decoding speed while maintaining high quality [35]. We perform an experiment on LSUN-Churches, where we analyze the effect of different layer-ratios on synthesis quality (measured by FID) and on decoding speed when fixing the total number of model parameters to 200M. The results in the left part of Fig. 8 confirms that it is indeed possible to reduce the number of decoder layers while maintaining satisfactory FID scores with higher decoding efficiency. We identity a favorable trade-off between four and six decoder layers and transfer this setting to our other experiments. ",
966
+ "bbox": [
967
+ 174,
968
+ 869,
969
+ 825,
970
+ 911
971
+ ],
972
+ "page_idx": 8
973
+ },
974
+ {
975
+ "type": "table",
976
+ "img_path": "images/6c37231fb8cbf82cdd6df6de394035f0a730cdaebea732319a33dc13cdc1b38b.jpg",
977
+ "table_caption": [],
978
+ "table_footnote": [
979
+ "Table 3: Assessing the effect of different $\\overline { { T } }$ with a fixed number of parameters distributed equally over all scales. All models are trained on FFHQ. Left: Full image generation results. Right: Using the example of upper image completion, we evaluate the ability to complete and modifiy an image, see Sec. 4.3 and 4.4. "
980
+ ],
981
+ "table_body": "<table><tr><td colspan=\"3\">Unconditional Generation</td><td colspan=\"3\">Upper Half Completion</td></tr><tr><td>method</td><td>FID↓</td><td>IS个</td><td>method</td><td>FID↓</td><td>IS↑</td></tr><tr><td>TT(T= 2)</td><td>12.44</td><td>4.42 ± 0.05</td><td>TT(T= 2)</td><td>11.80</td><td>4.48 ± 0.10</td></tr><tr><td>ImageBART (T = 3)</td><td>12.55</td><td>3.98± 0.07</td><td>ImageBART(T= 3)</td><td>9.25</td><td>4.49 ± 0.13</td></tr><tr><td>ImageBART(T=5)</td><td>10.69</td><td>4.27 ± 0.05</td><td>ImageBART(T= 5)</td><td>6.87</td><td>4.81 ± 0.13</td></tr><tr><td>ImageBART (T = 9)</td><td>10.81</td><td>4.49 ± 0.05</td><td>ImageBART (T = 9)</td><td>6.64</td><td>4.86 ± 0.15</td></tr></table>",
982
+ "bbox": [
983
+ 200,
984
+ 88,
985
+ 792,
986
+ 184
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "image",
992
+ "img_path": "images/505dcbb4d8a10672f2407a866d0081a4515c4138ff21f9ffadab74eae8b65903.jpg",
993
+ "image_caption": [
994
+ "Figure 8: Left: Effect of number of encoder vs. decoder layers for a fixed total number of model parameters $( ( 1 9 5 \\pm 5 ) M )$ , evaluated on LSUN-Churches. FIDs are evaluated w.r.t $3 \\times 2 5 0 0 \\mathrm { k }$ samples. The plot shows 3 standard deviations. All models are trained jointly over three scales. Right: Our model achieves better sampling performance than state of the art diffusion models (SSDE [68], DDPM [29], ADM [15]) and also approaches the inference speed of TT [21], which only consists of a single autoregressive stage. Reducing the number of scales increases inference speed at the expense of controllability. Experiments were conducted on a single NVIDIA A100 and are reported averaged over 1000 samples with a batch size of 50, evaluated on FFHQ while using the same number of trainable parameters $( 8 0 0 \\mathrm { m } )$ for all AR models. "
995
+ ],
996
+ "image_footnote": [],
997
+ "bbox": [
998
+ 173,
999
+ 262,
1000
+ 823,
1001
+ 390
1002
+ ],
1003
+ "page_idx": 9
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "",
1008
+ "bbox": [
1009
+ 174,
1010
+ 530,
1011
+ 825,
1012
+ 627
1013
+ ],
1014
+ "page_idx": 9
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Finally, we compare our model in terms of sampling speed with the recent state-of-the-art generative diffusion [29, 68] and AR models [21]. The results are summarized in Fig. 8. While consistently being faster than all pixel-based models due to training in a compressed latent space, the increase in runtime w.r.t. [21] is moderate due to the use of encoder-decoder transformers, i.e., a a decrease in pure decoder layers. If a faster runtime is desired, the speed can be further increased by reducing the number of decoder layers even more, see also the discussion in Sec. A.5. ",
1019
+ "bbox": [
1020
+ 174,
1021
+ 633,
1022
+ 825,
1023
+ 717
1024
+ ],
1025
+ "page_idx": 9
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "5 Conclusion ",
1030
+ "text_level": 1,
1031
+ "bbox": [
1032
+ 174,
1033
+ 751,
1034
+ 297,
1035
+ 768
1036
+ ],
1037
+ "page_idx": 9
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "We have proposed ImageBART, a hierarchical approach to introduce bidirectional context into autoregressive transformer models for high-fidelity controllable image synthesis. We invert a multinomial diffusion process by training a Markov chain to gradually incorporate context in a coarse-to-fine manner. Our study shows that this approach (i) introduces a natural hierarchical representation of images, with consecutive levels carrying more information than previous ones. (see also Fig. 9). (ii) It alleviates the unnatural unidirectional ordering of pure autoregressive models for image representation through global context from previous levels of the hierarchy. (iii) It enables global and local manipulation of a given input, a feat previously out-of-reach for ARMs. (iv) We additionally show that our model can be efficiently conditioned on various representations, allowing for a large class of conditional image synthesis tasks such as semantically guided generation or text-to-image synthesis. ",
1042
+ "bbox": [
1043
+ 174,
1044
+ 786,
1045
+ 825,
1046
+ 925
1047
+ ],
1048
+ "page_idx": 9
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Acknowledgments ",
1053
+ "text_level": 1,
1054
+ "bbox": [
1055
+ 176,
1056
+ 89,
1057
+ 330,
1058
+ 106
1059
+ ],
1060
+ "page_idx": 10
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Many thanks to Phil Wang for providing https://github.com/lucidrains/x-transformers and all the other great PyTorch implementations. ",
1065
+ "bbox": [
1066
+ 173,
1067
+ 119,
1068
+ 823,
1069
+ 147
1070
+ ],
1071
+ "page_idx": 10
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Funding and Transparency Statement ",
1076
+ "text_level": 1,
1077
+ "bbox": [
1078
+ 173,
1079
+ 166,
1080
+ 495,
1081
+ 184
1082
+ ],
1083
+ "page_idx": 10
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Funding in direct support of this work: German Research Foundation (DFG) projects 371923335 and 421703927, German Federal Ministry for Economic Affairs and Energy within the project ’KI-Absicherung - Safe AI for automated driving’. ",
1088
+ "bbox": [
1089
+ 174,
1090
+ 196,
1091
+ 825,
1092
+ 239
1093
+ ],
1094
+ "page_idx": 10
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Checklist ",
1099
+ "text_level": 1,
1100
+ "bbox": [
1101
+ 174,
1102
+ 257,
1103
+ 254,
1104
+ 273
1105
+ ],
1106
+ "page_idx": 10
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "1. For all authors... ",
1111
+ "bbox": [
1112
+ 214,
1113
+ 284,
1114
+ 339,
1115
+ 297
1116
+ ],
1117
+ "page_idx": 10
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See supplementary. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] See supplementary. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1122
+ "bbox": [
1123
+ 238,
1124
+ 301,
1125
+ 825,
1126
+ 404
1127
+ ],
1128
+ "page_idx": 10
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "2. If you are including theoretical results... ",
1133
+ "bbox": [
1134
+ 214,
1135
+ 406,
1136
+ 493,
1137
+ 421
1138
+ ],
1139
+ "page_idx": 10
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
1144
+ "bbox": [
1145
+ 236,
1146
+ 424,
1147
+ 738,
1148
+ 455
1149
+ ],
1150
+ "page_idx": 10
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "3. If you ran experiments... ",
1155
+ "bbox": [
1156
+ 214,
1157
+ 458,
1158
+ 393,
1159
+ 472
1160
+ ],
1161
+ "page_idx": 10
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "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)? [No] Including the code while maintaining anonymity is difficult; it will be published after deanonymization. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We include most relevant details in the supplementary and the full code release will contain the precise values. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Yes, wherever this does not introduce irresponsible waste of computational resources. \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] The supplementary contains an overview of used hardware. ",
1166
+ "bbox": [
1167
+ 238,
1168
+ 476,
1169
+ 825,
1170
+ 660
1171
+ ],
1172
+ "page_idx": 10
1173
+ },
1174
+ {
1175
+ "type": "text",
1176
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1177
+ "bbox": [
1178
+ 212,
1179
+ 664,
1180
+ 823,
1181
+ 679
1182
+ ],
1183
+ "page_idx": 10
1184
+ },
1185
+ {
1186
+ "type": "text",
1187
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [No] Licenses will be included along with the code release. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] See supplementary. ",
1188
+ "bbox": [
1189
+ 238,
1190
+ 683,
1191
+ 825,
1192
+ 799
1193
+ ],
1194
+ "page_idx": 10
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1199
+ "bbox": [
1200
+ 214,
1201
+ 803,
1202
+ 705,
1203
+ 818
1204
+ ],
1205
+ "page_idx": 10
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "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] ",
1210
+ "bbox": [
1211
+ 238,
1212
+ 820,
1213
+ 825,
1214
+ 909
1215
+ ],
1216
+ "page_idx": 10
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "References ",
1221
+ "text_level": 1,
1222
+ "bbox": [
1223
+ 174,
1224
+ 90,
1225
+ 266,
1226
+ 106
1227
+ ],
1228
+ "page_idx": 11
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "[1] R. Abdal, P. Zhu, N. J. Mitra, and P. Wonka. Styleflow: Attribute-conditioned exploration of stylegangenerated images using conditional continuous normalizing flows. ACM Trans. Graph., 40(3), May 2021. ISSN 0730-0301. doi: 10.1145/3447648. URL https://doi.org/10.1145/3447648. \n[2] J. Austin, D. Johnson, J. Ho, D. Tarlow, and R. v. d. Berg. Structured denoising diffusion models in discrete state-spaces. arXiv preprint arXiv:2107.03006, 2021. \n[3] S. Bengio, O. Vinyals, N. Jaitly, and N. Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. CoRR, abs/1506.03099, 2015. [4] A. Blattmann, T. Milbich, M. Dorkenwald, and B. Ommer. Behavior-driven synthesis of human dynamics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12236–12246, June 2021. \n[5] A. Blattmann, T. Milbich, M. Dorkenwald, and B. Ommer. ipoke: Poking a still image for controlled stochastic video synthesis. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 14707–14717, October 2021. \n[6] A. Brock, J. Donahue, and K. Simonyan. Large scale GAN training for high fidelity natural image synthesis. In Int. Conf. Learn. Represent., 2019. \n[7] T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language models are few-shot learners. In NeurIPS, 2020. [8] M. Chen, A. Radford, R. Child, J. Wu, H. Jun, D. Luan, and I. Sutskever. Generative pretraining from pixels. In ICML, volume 119 of Proceedings of Machine Learning Research, pages 1691–1703. PMLR, 2020. [9] X. Chen, D. P. Kingma, T. Salimans, Y. Duan, P. Dhariwal, J. Schulman, I. Sutskever, and P. Abbeel. Variational lossy autoencoder. CoRR, abs/1611.02731, 2016. \n[10] R. Child. Very deep vaes generalize autoregressive models and can outperform them on images. CoRR, abs/2011.10650, 2020. \n[11] K. Crawford and T. Paglen. Excavating ai: The politics of training sets for machine learning, 2019. URL https://excavating.ai. \n[12] B. Dai and D. P. Wipf. Diagnosing and enhancing VAE models. In ICLR (Poster). OpenReview.net, 2019. \n[13] J. Deng, W. Dong, R. Socher, L. Li, K. Li, and F. Li. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255. IEEE Computer Society, 2009. \n[14] J. Devlin, M. Chang, K. Lee, and K. Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018. \n[15] P. Dhariwal and A. Nichol. Diffusion models beat gans on image synthesis. CoRR, abs/2105.05233, 2021. URL https://arxiv.org/abs/2105.05233. \n[16] P. Dhariwal, H. Jun, C. Payne, J. W. Kim, A. Radford, and I. Sutskever. Jukebox: A generative model for music. CoRR, abs/2005.00341, 2020. \n[17] S. Dieleman. Musings on typicality, 2020. URL https://benanne.github.io/2020/09/01/ typicality.html. \n[18] M. Dorkenwald, T. Milbich, A. Blattmann, R. Rombach, K. G. Derpanis, and B. Ommer. Stochastic image-to-video synthesis using cinns. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 3742–3753, June 2021. \n[19] A. Dosovitskiy and T. Brox. Generating images with perceptual similarity metrics based on deep networks. In NIPS, pages 658–666, 2016. \n[20] P. Esser, R. Rombach, and B. Ommer. A disentangling invertible interpretation network for explaining latent representations. CoRR, abs/2004.13166, 2020. \n[21] P. Esser, R. Rombach, and B. Ommer. Taming transformers for high-resolution image synthesis. CoRR, abs/2012.09841, 2020. \n[22] J. D. Fauw, S. Dieleman, and K. Simonyan. Hierarchical autoregressive image models with auxiliary decoders. CoRR, abs/1903.04933, 2019. \n[23] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In CVPR, pages 2414–2423. IEEE Computer Society, 2016. \n[24] M. Germain, K. Gregor, I. Murray, and H. Larochelle. MADE: masked autoencoder for distribution estimation. CoRR, abs/1502.03509, 2015. \n[25] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. C. Courville, and Y. Bengio. Generative adversarial networks. CoRR, 2014. \n[26] A. Goyal, A. Lamb, Y. Zhang, S. Zhang, A. C. Courville, and Y. Bengio. Professor forcing: A new algorithm for training recurrent networks. In NIPS, pages 4601–4609, 2016. \n[27] I. Gulrajani, K. Kumar, F. Ahmed, A. A. Taïga, F. Visin, D. Vázquez, and A. C. Courville. Pixelvae: A latent variable model for natural images. CoRR, abs/1611.05013, 2016. \n[28] M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, and S. Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Adv. Neural Inform. Process. Syst., pages 6626–6637, 2017. \n[29] J. Ho, A. Jain, and P. Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020. \n[30] E. Hoogeboom, D. Nielsen, P. Jaini, P. Forré, and M. Welling. Argmax flows and multinomial diffusion: Towards non-autoregressive language models. CoRR, abs/2102.05379, 2021. \n[31] A. H. Jha, S. Anand, M. Singh, and V. S. R. Veeravasarapu. Disentangling factors of variation with cycle-consistent variational auto-encoders. In ECCV (3), volume 11207 of Lecture Notes in Computer Science, pages 829–845. Springer, 2018. \n[32] J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV (2), volume 9906 of Lecture Notes in Computer Science, pages 694–711. Springer, 2016. \n[33] T. Karras, S. Laine, and T. Aila. A style-based generator architecture for generative adversarial networks. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019. \n[34] T. Karras, S. Laine, M. Aittala, J. Hellsten, J. Lehtinen, and T. Aila. Analyzing and improving the image quality of stylegan. CoRR, abs/1912.04958, 2019. \n[35] J. Kasai, N. Pappas, H. Peng, J. Cross, and N. A. Smith. Deep encoder, shallow decoder: Reevaluating non-autoregressive machine translation, 2021. \n[36] S. Khan, M. Naseer, M. Hayat, S. W. Zamir, F. S. Khan, and M. Shah. Transformers in vision: A survey. CoRR, abs/2101.01169, 2021. \n[37] Y. Kilcher, A. Lucchi, and T. Hofmann. Semantic interpolation in implicit models. CoRR, abs/1710.11381, 2017. \n[38] D. P. Kingma and M. Welling. Auto-Encoding Variational Bayes. In 2nd International Conference on Learning Representations, ICLR, 2014. \n[39] D. P. Kingma, D. J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. CoRR, abs/1406.5298, 2014. \n[40] A. Kolesnikov and C. H. Lampert. Pixelcnn models with auxiliary variables for natural image modeling. In ICML, volume 70 of Proceedings of Machine Learning Research, pages 1905–1914. PMLR, 2017. \n[41] A. Kolmogoroff. Über die analytischen methoden in der wahrscheinlichkeitsrechnung. Mathematische Annalen, 104:415–458, 1931. URL http://eudml.org/doc/159476. \n[42] A. Krizhevsky. Learning multiple layers of features from tiny images. 2009. \n[43] R. Leblond, J. Alayrac, A. Osokin, and S. Lacoste-Julien. SEARNN: training rnns with global-local losses. CoRR, abs/1706.04499, 2017. \n[44] D. Lesniak, I. Sieradzki, and I. T. Podolak. Distribution-interpolation trade off in generative models. In ICLR (Poster). OpenReview.net, 2019. \n[45] M. Lewis, Y. Liu, N. Goyal, M. Ghazvininejad, A. Mohamed, O. Levy, V. Stoyanov, and L. Zettlemoyer. BART: denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In ACL, pages 7871–7880. Association for Computational Linguistics, 2020. \n[46] N. Li, S. Liu, Y. Liu, S. Zhao, and M. Liu. Neural speech synthesis with transformer network. In AAAI, pages 6706–6713. AAAI Press, 2019. \n[47] L. Maaløe, M. Fraccaro, V. Liévin, and O. Winther. BIVA: A very deep hierarchy of latent variables for generative modeling. In NeurIPS, pages 6548–6558, 2019. \n[48] M. Mathieu, J. J. Zhao, P. Sprechmann, A. Ramesh, and Y. LeCun. Disentangling factors of variation in deep representations using adversarial training. CoRR, abs/1611.03383, 2016. \n[49] F. Mentzer, G. Toderici, M. Tschannen, and E. Agustsson. High-fidelity generative image compression. In NeurIPS, 2020. \n[50] C. Nash, J. Menick, S. Dieleman, and P. W. Battaglia. Generating images with sparse representations. CoRR, abs/2103.03841, 2021. \n[51] E. G. Ng, B. Pang, P. Sharma, and R. Soricut. Understanding guided image captioning performance across domains. arXiv preprint arXiv:2012.02339, 2020. \n[52] A. Nichol and P. Dhariwal. Improved denoising diffusion probabilistic models. CoRR, abs/2102.09672, 2021. \n[53] T. Park, M.-Y. Liu, T.-C. Wang, and J.-Y. Zhu. Semantic image synthesis with spatially-adaptive normalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. \n[54] N. Parmar, A. Vaswani, J. Uszkoreit, L. Kaiser, N. Shazeer, A. Ku, and D. Tran. Image transformer. In ICML, volume 80 of Proceedings of Machine Learning Research, pages 4052–4061. PMLR, 2018. \n[55] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, G. Krueger, and I. Sutskever. Learning transferable visual models from natural language supervision. CoRR, abs/2103.00020, 2021. \n[56] A. Ramesh, M. Pavlov, G. Goh, S. Gray, C. Voss, A. Radford, M. Chen, and I. Sutskever. Zero-shot text-to-image generation. CoRR, abs/2102.12092, 2021. \n[57] M. Ranzato, S. Chopra, M. Auli, and W. Zaremba. Sequence level training with recurrent neural networks. In ICLR (Poster), 2016. \n[58] A. Razavi, A. van den Oord, and O. Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In NeurIPS, pages 14837–14847, 2019. \n[59] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on International Conference on Machine Learning, ICML, 2014. \n[60] R. Rombach, P. Esser, and B. Ommer. Network-to-network translation with conditional invertible neural networks. In NeurIPS, 2020. \n[61] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In NIPS, 2016. \n[62] T. Salimans, A. Karpathy, X. Chen, and D. P. Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. CoRR, abs/1701.05517, 2017. \n[63] F. Schmidt. Generalization in generation: A closer look at exposure bias. In NGT@EMNLP-IJCNLP, pages 157–167. Association for Computational Linguistics, 2019. \n[64] P. Sharma, N. Ding, S. Goodman, and R. Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of ACL, 2018. \n[65] J. Sohl-Dickstein, E. A. Weiss, N. Maheswaranathan, and S. Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585, 2015. \n[66] C. K. Sønderby, T. Raiko, L. Maaløe, S. K. Sønderby, and O. Winther. Ladder variational autoencoders. In NIPS, pages 3738–3746, 2016. \n[67] Y. Song and S. Ermon. Generative modeling by estimating gradients of the data distribution. In NeurIPS, pages 11895–11907, 2019. \n[68] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole. Score-based generative modeling through stochastic differential equations. CoRR, abs/2011.13456, 2020. \n[69] A. Szabó, Q. Hu, T. Portenier, M. Zwicker, and P. Favaro. Challenges in disentangling independent factors of variation. In ICLR (Workshop). OpenReview.net, 2018. \n[70] B. Uria, M. Côté, K. Gregor, I. Murray, and H. Larochelle. Neural autoregressive distribution estimation. CoRR, abs/1605.02226, 2016. \n[71] A. Vahdat and J. Kautz. NVAE: A deep hierarchical variational autoencoder. In NeurIPS, 2020. \n[72] A. van den Oord, N. Kalchbrenner, L. Espeholt, k. kavukcuoglu, O. Vinyals, and A. Graves. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, 2016. \n[73] A. van den Oord, N. Kalchbrenner, O. Vinyals, L. Espeholt, A. Graves, and K. Kavukcuoglu. Conditional image generation with pixelcnn decoders. CoRR, abs/1606.05328, 2016. \n[74] A. van den Oord, O. Vinyals, and K. Kavukcuoglu. Neural discrete representation learning. In NIPS, pages 6306–6315, 2017. \n[75] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In NIPS, pages 5998–6008, 2017. \n[76] C. Wang, Y. Tang, X. Ma, A. Wu, D. Okhonko, and J. Pino. fairseq s2t: Fast speech-to-text modeling with fairseq, 2020. \n[77] T. White. Sampling generative networks: Notes on a few effective techniques. CoRR, abs/1609.04468, 2016. \n[78] W. Yan, Y. Zhang, P. Abbeel, and A. Srinivas. Videogpt: Video generation using VQ-VAE and transformers. CoRR, abs/2104.10157, 2021. \n[79] F. Yu, Y. Zhang, S. Song, A. Seff, and J. Xiao. LSUN: construction of a large-scale image dataset using deep learning with humans in the loop. CoRR, abs/1506.03365, 2015. \n[80] R. Zhang, P. Isola, A. A. Efros, E. Shechtman, and O. Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. \n[81] C. Zheng, T. Cham, and J. Cai. Tfill: Image completion via a transformer-based architecture. CoRR, abs/2104.00845, 2021. ",
1233
+ "bbox": [
1234
+ 171,
1235
+ 112,
1236
+ 830,
1237
+ 911
1238
+ ],
1239
+ "page_idx": 11
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "",
1244
+ "bbox": [
1245
+ 171,
1246
+ 95,
1247
+ 828,
1248
+ 915
1249
+ ],
1250
+ "page_idx": 12
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "",
1255
+ "bbox": [
1256
+ 171,
1257
+ 90,
1258
+ 828,
1259
+ 921
1260
+ ],
1261
+ "page_idx": 13
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "",
1266
+ "bbox": [
1267
+ 171,
1268
+ 92,
1269
+ 826,
1270
+ 191
1271
+ ],
1272
+ "page_idx": 14
1273
+ }
1274
+ ]
parse/train/-1AAgrS5FF/-1AAgrS5FF_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/-1AAgrS5FF/-1AAgrS5FF_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/3WbWmdTd8fN/3WbWmdTd8fN.md ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Learning Division with Neural Arithmetic Logic Modules
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ 1 To achieve systematic generalisation, it first makes sense to master simple tasks
11
+ 2 such as arithmetic. Of the four fundamental arithmetic operations $( + , - , \times , \div )$ ,
12
+ 3 division is considered the most difficult for both humans and computers. In this
13
+ 4 paper we show that robustly learning division in a systematic manner remains a
14
+ 5 challenge even at the simplest level of dividing two numbers. We propose two
15
+ 6 novel approaches for division which we call the Neural Reciprocal Unit (NRU) and
16
+ 7 the Neural Multiplicative Reciprocal Unit (NMRU), and present improvements for
17
+ 8 an existing division module, the Real Neural Power Unit (Real NPU). Experiments
18
+ 9 in learning division with input redundancy on 225 different training sets, find that
19
+ 10 our proposed modifications to the Real NPU obtains an average success of $8 5 . 3 \%$
20
+ 11 improving over the original by $1 5 . 1 \%$ . In light of the suggestion above, our NMRU
21
+ 12 approach can further improve the success to $9 1 . 6 \%$ .
22
+
23
+ # 13 1 Introduction
24
+
25
+ 14 Imagine you must learn to divide 2 numbers, but are only given 10 numbers and the target value. This
26
+ 15 task requires finding the 2 relevant operands, the order to divide the operands, and learning to divide.
27
+ 16 In machine learning, this is equivalent to a supervised regression task where the aim is to learn the
28
+ 17 underlying function between the inputs and output such that the solution is generalisable to any input.
29
+ 18 The ability to select relevant features is a desirable property of neural networks, useful for improved
30
+ 19 intepretability, reduced pre-processing costs and greater generalisation [Chandrashekar and Sahin,
31
+ 20 2014]. The ability to model division, one of the four fundamental arithmetic operations, is necessary
32
+ 21 for expressing dynamical systems [Sahoo et al., 2018], and physics-based formulas [Udrescu and
33
+ 22 Tegmark, 2020]. However, even recent models still struggle to learn division when there is input
34
+ 23 redundancy [Schlör et al., 2020].
35
+ 24 The main challenge of the above task comes from learning the selection and operation at the same
36
+ 25 time, which can lead to conflicting priorities when learning network weights. Furthermore, the natural
37
+ 26 properties of division of values around zero leads to undesirable gradients. Models which deal with
38
+ 27 this naively (e.g. MLPs) are unable to deal with the fluctuant gradients caused by the asymptotic
39
+ 28 nature and discontinuities in division [Trask et al., 2018].
40
+
41
+ 9 Can we build models which can learn division in the presence of its undesirable, yet valid, properties? We aim to address this question in this paper. Specifically, we contribute the following:0
42
+
43
+ • Improvements to the Real NPU [Heim et al., 2020] including: clipping, discretisation and constrained initialisation to improve performance in learning division on different training ranges.
44
+
45
+ 33 • Two novel division modules, the NRU and the NMRU. The NRU explores extending the NMU
46
+ 34 weight ranges from [0,1] to [-1,1] to include division, where we find a weakness in learning from
47
+ 35 negative ranges. Learning from the weaknesses of the NRU, the NMRU extends the NMU to learn
48
+ 36 division while keeping weights values between [0,1]. We further boost performance by using a
49
+ 37 Real NPU inspired sign retrieval mechanism, enabling the NMRU to gain the best performance
50
+ 38 when using a mean squared error (MSE) loss.
51
+ 39 • New understanding into the hindrances in learning division including: training on mixed-sign
52
+ 40 inputs, training on negative ranges, and division on extremely small values. We find these difficulties
53
+ 41 can be sufficiently identified using synthetic division tasks.
54
+ 42 The broader impact of our work relates to interpretable Artificial Intelligence where our modules
55
+ 43 can be included in larger networks for applications such as image classification or analogy creation,
56
+ 44 whilst retaining the ability to produce transparent generalisable solutions. However, there are possible
57
+ 45 negative societal impacts. Such modules can be viewed as specialised feature selectors/aggregators
58
+ 46 which do not require integrating domain knowledge. Therefore, if a non-domain-expert tries inter
59
+ 47 preting relations in the input data, they may incorrectly interpret causality, which can be especially
60
+ 48 harmful if such a case occurs on medical or financial data. Mitigating against such downstream issues
61
+ 49 requires to first focus efforts on producing robust modules to different distributions and understand
62
+ 50 their affect on learning other networks architectures (e.g. CNN). Understanding this will enable
63
+ 51 recognising situations where these modules can aid and where they should avoid being used.
64
+
65
+ # 52 2 Related Work
66
+
67
+ 53 One approach to learn division would be symbolic regression networks [Sahoo et al., 2018]. However,
68
+ 54 a symbolic approach pre-defines the operations, which is not a limitation of using Neural Arithmetic
69
+ 55 Logic Modules (NALMs).
70
+ 56 NALMs are neural networks which learn arithmetic operations and input selection [Mistry et al.,
71
+ 57 2021]. The weights of these networks are intepretable such that a discrete value represents a specific
72
+ 58 operation. For example, ‘-1’ to represent division and $\cdot _ { 0 } \cdot \mathrm { ~ }$ for no selection. From this research field,
73
+ 59 we focus on the Real NPU and the NMU. Until now, the Real NPU only has learned division on
74
+ 60 training ranges of either $\mathcal { U } [ 0 . 1 , 2 ]$ or Sobol(0,0.5) [Heim et al., 2020]. It remains unclear if this
75
+ 61 module is robust to other training ranges even as a stand-alone unit. Robustness to training ranges is
76
+ 62 important as these module’s applicational use comes from being part of larger end-to-end networks,
77
+ 63 where the input range into the module cannot be controlled. The NMU is a multiplication module
78
+ 64 which we extend to also do division. The authors of the NMU believe such an extension incurs too
79
+ 65 many limitations for learning [Madsen and Johansen, 2020]. We use this paper as an opportunity to
80
+ 66 explore this belief.
81
+ 67 Trask et al. [2018] developed the Neural Arithmetic Logic Unit (NALU) which can model all four
82
+ 68 arithmetic operations. However, studies show this module to be unstable in learning division [Schlör
83
+ 69 et al., 2020, Heim et al., 2020]. In particular, their gating method responsible for selecting an operation
84
+ 70 cannot learn consistently [Madsen and Johansen, 2020]. Schlör et al. [2020] developed iNALU
85
+ 71 additionally applying weight and gradient clipping, sign retrieval, regularisation, reinitialisation and
86
+ 72 separating shared parameters to the NALU. Even with these modifications, they still find consistently
87
+ 73 learning division to a high precision to remain unattainable. Furthermore, Heim et al. [2020]’s results
88
+ 74 imply iNALU is outperformed by the Real NPU for division.
89
+
90
+ # 75 3 Architectures
91
+
92
+ 76 This section introduces the architectures for the (Real) NPU, NRU, and the NMRU. The (Real) NPU
93
+ 77 is an existing module, which we improve in Section 5. The NRU and NMRU are novel contributions.
94
+ 78 Appendix A summarises the important properties of these division modules.
95
+
96
+ # 3.1 Real Neural Power Unit
97
+
98
+ 80 Heim et al. [2020] develop a module to learn to multiply and divide, using the intuition from Trask
99
+ 81 et al. [2018] that multiplicative operations are additive operations in log space. Their work extends
100
+ 82 this idea into complex space. The NPU can be used with its complex form (Equation 1) requiring both
101
+ 83 a complex and real weight matrix $( W ^ { ( i ) } , W ^ { ( r ) } )$ , or only its real form the Real NPU (Equation 2).
102
+ 84 For improved gradients, a relevance gate $\mathbfit { \Delta } \mathbf { r }$ (Equation 3) is used which converts inputs close to 0 (i.e.
103
+ 85 irrelevant features) to 1 to avoid the resulting output evaluating to 0. A gating vector $\textbf { { g } }$ , learns to
104
+ 86 select relevant input elements, where gate values are clipped between [0,1] during training.
105
+
106
+ $$
107
+ \mathrm { N P U } : = \exp ( { W ^ { ( r ) } \log ( r ) - W ^ { ( i ) } k } ) \odot \cos ( { W ^ { ( i ) } \log ( r ) + W ^ { ( r ) } k } ) ,
108
+ $$
109
+
110
+ 87
111
+
112
+ $$
113
+ \mathrm { R e a l N P U } : = \exp ( W ^ { ( r ) } \log ( r ) ) \odot \cos ( W ^ { ( r ) } k )
114
+ $$
115
+
116
+ $$
117
+ \mathrm { e r e } \quad r = g \odot ( | { \pmb x } | + \epsilon ) + ( { \bf 1 } - { \pmb g } ) \quad \mathrm { a n d } \quad k _ { i } = \left\{ 0 \qquad x _ { i } \geq 0 \atop \pi { \bf g _ { i } } \quad x _ { i } < 0 \right. .
118
+ $$
119
+
120
+ 89 A weighted L1 penalty is used when training. The weight value $\beta$ grows between predefined values
121
+ 90 $\beta _ { s t a r t }$ to $\beta _ { e n d }$ and is increased every $\beta _ { s t e p } = 1 0 , 0 0 0$ iterations by a growth factor $\beta _ { g r o w t h } = 1 0$ .
122
+ 91 We focus on the Real NPU over the NPU as the solution of the tasks in this paper can be captured
123
+ 92 using only real values meaning that the complex form is not required.
124
+
125
+ # 93 3.2 Neural Reciprocal Unit
126
+
127
+ 94 We propose the NRU, which can model multiplication and division. We extend the NMU, motivated
128
+ 95 by division being multiplication of reciprocals. The range which weight values can be is extended
129
+ 96 from [0,1] to [-1,1], where $^ { - 1 }$ represents applying the reciprocal on the corresponding input element.
130
+ 97 A NRU output element $z _ { o }$ is defined as
131
+
132
+ $$
133
+ \mathrm { N R U : ~ } z _ { o } = \prod _ { i = 1 } ^ { I } ( \mathrm { s i g n ( x } _ { i } ) \cdot | \mathbf { x } _ { i } | ^ { W _ { i , o } } \cdot | W _ { i , o } | + 1 - | W _ { i , o } | ) ,
134
+ $$
135
+
136
+ 98 where $I$ is the number of inputs. Assuming weights are either 1 (multiply) or $^ { - 1 }$ (reciprocal), $\left| \mathbf { x } _ { i } \right| ^ { W _ { i , o } }$
137
+ 99 will apply the operation on an input element. The absolute value is used so that the module only
138
+ 100 operates in the space of real numbers, as $x _ { i } ^ { W _ { i , o } }$ for a negative input $( x _ { i } )$ when $- 1 < W _ { i , o } < 1$ results
139
+ 101 in a complex number. The use of absolute means the sign of the input must be reapplied. For the
140
+ 102 no-selection case $W _ { i , o } = 0$ , we want the input element to convert to 1 (the identity value), resulting
141
+ 103 in applying $| W _ { i , o } | + 1 - | W _ { i , o } |$ . The derivative of the absolute function at 0 is undefined meaning the
142
+ 104 gradients of Equation 4 can contain points of discontinuity. To alleviate this issue, we approximate
143
+ 105 the absolute function using a scaled tanh (inspired by Faber and Wattenhofer [2020]). More formally,
144
+
145
+ $$
146
+ | W _ { i , o } | = \left\{ \begin{array} { l l } { \operatorname { t a n h } ( 1 0 0 0 \cdot W _ { i , o } ) ^ { 2 } } & { \mathrm { i f ~ t r a i n i n g } } \\ { | W _ { i , o } | } & { \mathrm { o t h e r w i s e } } \end{array} . \right.
147
+ $$
148
+
149
+ 106 The scale factor (1000) controls how close to the absolute function the approximation is, where larger
150
+ 107 values give a more accurate approximation. For clipping and regularisation, the same scheme as the
151
+ 108 Neural Addition Unit (NAU) (see Appendix B) is used.
152
+
153
+ # 109 3.3 Neural Multiplicative Reciprocal Unit
154
+
155
+ 110 An alternate extension of the NMU, also motivated by division being multiplication of reciprocals
156
+ 111 is the NMRU (Equation 5). We concatenate the reciprocal of the input (plus a small $\epsilon$ ) to the input
157
+ 112 resulting in a module which only needs to learn selection. Hence, weights can be in the range [0,1].
158
+
159
+ $$
160
+ \mathrm { N M R U } : z _ { o } = \prod _ { i = 1 } ^ { 2 I } ( W _ { i , o } \cdot | \mathbf { x } _ { i } | + 1 - W _ { i , o } ) \cdot \sum _ { i = 1 } ^ { 2 I } ( \cos ( W _ { i , o } \cdot k _ { i } ) ) \mathrm { , ~ w h e r e ~ } k _ { i } \ = \{ { 0 } \quad x _ { i } \geq 0 \atop \pi \ .
161
+ $$
162
+
163
+ 113 The iteration over $2 I$ represents the going through all inputs and their reciprocals. We calculate the
164
+ 114 magnitude and sign separately, joining the result at the end. The magnitude is calculated passing
165
+ 115 absolute of the concatenated input through an NMU architecture and the sign by using a cosine
166
+ 116 mechanism similar to the Real NPU. However, unlike the Real NPU only the weight matrix is
167
+ 117 required. The norm of the weight’s gradients are clipped to 1 prior to being updated by the optimiser.
168
+ 118 This is done to alleviate the issue of exploding gradients caused by including the reciprocal to the
169
+ 119 inputs. For clipping and regularisation, the same scheme as the NMU (see Appendix B) is used.
170
+
171
+ Table 1: Interpolation (train/validation) and extrapolation (test) ranges used. Data (as floats) is drawn from a Uniform distribution with the range values as the lower and upper bounds.
172
+
173
+ <table><tr><td>Interpolation Extrapolation</td><td>[-20,-10) [-40, -20)</td><td>[-2, -1) [-6,-2)</td><td>[-1.2, -1.1) [-6.1, -1.2)</td><td>[-0.2,-0.1) [-2, -0.2)</td><td>[-2,2) [-6, -2), [2, 6)]</td></tr><tr><td>Interpolation</td><td>[0.1, 0.2)</td><td>[1,2)</td><td>[1.1, 1.2)</td><td>[10,20)</td><td></td></tr><tr><td>Extrapolation</td><td>[0.2,2)</td><td>[2,6)</td><td>[1.2, 6)</td><td>[20,40)</td><td></td></tr></table>
174
+
175
+ # 120 4 Experiment Setup
176
+
177
+ We introduce the two main experiments used to evaluate modules, including: default parameters, train and test ranges, and evaluation metrics. The tasks evaluate the ability of a single module to divide two numbers from an input vector in two settings: no redundancy and with redundancy.
178
+
179
+ 124 Default parameters: All experiments use a mean squared error (MSE) loss with an Adam optimiser
180
+ 125 [Kingma and Ba, 2015], with 10,000 samples for the validation and test sets. The best model for
181
+ 126 evaluation is taken using early stopping on the validation set. All runs are over 25 different seeds. All
182
+ 127 inputs are required in the no redundancy setting, i.e., input size of 2. Training takes 50,000 iterations
183
+ 128 where each iteration consists of a different batch of size 128. The Real NPU uses a learning rate of
184
+ 129 5e-3 with sparsity regularisation scaling during iterations 40,000 to 50,000. The NRU and NMRU
185
+ 130 use sparsity regularisation scaling during iterations 20,000 to 35,000 and a learning rate of 1 and 1e-2
186
+ 131 respectively. In contrast, the redundancy setting uses an input size of 10, where 8 input values are not
187
+ 132 required for the final output. The total training iterations are extended to 100,000 with batch sizes
188
+ 133 of 128. The learning rates for the Real NPU, NRU and NMRU are 5e-3, 1e-3 and 1e-2 respectively.
189
+ 134 Sparsity regularisation scaling occurs during iteration 50,000 to 75,000 for all modules. A summary
190
+ 135 of all relevant parameters is found in Appendix C.
191
+ 36 Ranges: The interpolation (train/validation) and extrapolation (test) ranges, are found in Table 1.
192
+ 37 The chosen ranges are influenced by Madsen and Johansen [2020].
193
+ 138 Evaluation metrics: We use the Madsen and Johansen [2019]’s evaluation scheme, consisting of
194
+ 139 three evaluation metrics: the success on the extrapolation dataset against a near optimal solution
195
+ 140 (success rate), the first iteration which the task is considered solved (speed of convergence), and
196
+ 141 the extent of discretisation towards the weights’ inductive biases (sparsity error). Sparsity error
197
+ 142 calculated by $\operatorname* { m a x } _ { i , o } ( \operatorname* { m i n } ( | W _ { i , o } | , 1 - | W _ { i , o } | ) )$ , measures the weight element which is the furthest away
198
+ 143 from the acceptable discrete weights for the module. A success means the MSE of the trained model
199
+ 144 is lower than a threshold value (i.e. the MSE of a near optimal solution). We differ from Madsen
200
+ 145 and Johansen [2019] by using a fixed threshold value 1e-5 rather than a simulated MSE, as there
201
+ 146 are no intermediate layers to accumulate numerical errors. We choose this precision as it can be
202
+ 147 guaranteed when working with 32-bit PyTorch Tensors. $9 5 \%$ confidence intervals (over the 25 seeds)
203
+ 148 are calculated from a specific family of distributions dependant on the metric. The success rate uses
204
+ 149 Binomial distribution because trials (i.e. run on a single seed) are either pass/ fail situations. The
205
+ 150 convergence metric uses a Gamma distribution and sparsity error uses a Beta distribution. Both Beta
206
+ 151 and Gamma can easily approximate the normal distribution and support its corresponding metric.
207
+
208
+ # 5 Improving the Real NPU’s Robustness
209
+
210
+ We first improve the robustness of the Real NPU on different training ranges. We use the Single Module Task with no redundancy (see Section 4) to investigate the following questions:
211
+
212
+ 1. Is L1 regularisation required, and if so, do the regularisation parameters require tuning?
213
+ 2. Does clipping the weight matrix aid learning?
214
+ 3. Does enforcing discretisation on parameters improve convergence?
215
+ 4. Can the weight matrix initialisation be improved?
216
+ 159 To address each question in order, we propose applying incremental modifications to the Real NPU.
217
+ 160 These modifications include: ablation study on the L1 regularisation (including a sweep over the
218
+ 161 scaling range hyperparameters), clipping, enforcing discretisation, and a more restrictive initialisation
219
+ 162 scheme. We assume that we are optimising the Real NPU to perform multiplication or division.
220
+ 163 Therefore, we trade-off the flexibility of having non-discretised weights, which enables the success of
221
+ 164 modelling the SIR data in Heim et al. [2020, Section 4.1] , in favour of sparse models with discrete
222
+ 165 weight values. All the modifications suggested can also be generalised for the NPU architecture.
223
+ 166 Is L1 regularisation required? (Yes) L1 encourages sparsity (i.e., zero weights) in solutions.
224
+ 167 Zero-valued weights means not to select an input and return the identity value 1. For the task, the
225
+ 168 optimal weight values require selecting all inputs and therefore non-zero values, suggesting the
226
+ 169 application of L1 could be damaging. Therefore, we compare against a model which does not use
227
+ 170 L1 regularisation, shown in Figure 1a. Removing L1 proves to be detrimental in five of the nine
228
+ 171 cases shown and only shows minor improvements in two of the nine ranges (i.e., $\mathcal { U } [ - 1 . 2 , - 1 . 1 )$ and
229
+ 172 U[1.1,1.2)). Hence, we keep L1 regularisation. The L1 regularisation scaling (see Section 3.1),
230
+ 173 requires setting the hyperparameters for the start $( \beta _ { s t a r t } )$ and end $( \beta _ { e n d } )$ scaling values. We run a
231
+ 174 sweep over six different start and end values, denoted (<start>, <end>), displaying results in Figure 1b.
232
+ 175 We find the configuration (1e-9, 1e-7) is the most successful when considering performance on all
233
+ 176 the ranges, and larger scaling values perform worse.
234
+ 177 Does clipping the learnable parameters help? (Yes) Division and multiplication operations are
235
+ 178 represented by weight values of -1 and 1 respectively. The current architecture does not constrain the
236
+ 179 weights which can result in large weight values. The gate weights do get clipped and saved to another
237
+ 180 variable during the forward pass, meaning after an update step the gate values can also be out of the
238
+ 181 range [-1,1]. Hence, we investigate the effect of applying clipping directly to the weight and gate
239
+ 182 values after every optimisation step. Results, shown in Figure 2a, show clipping is beneficial, with
240
+ 183 clipping on both weight and gate (or just on the weights) to improve over the baseline on all ranges
241
+ 184 (excluding $\mathcal { U } [ 1 , 2 )$ where the baseline has already achieved full success).
242
+ 185 Does enforcing discretisation help? (Yes) Modelling division in a generalisable manner requires
243
+ 186 all learnable parameters to be discrete i.e., a value from {-1, 0, 1}. Using Madsen and Johansen
244
+ 187 [2020]’s regularisation scaling scheme, we penalise weights for not being discrete. We modify the
245
+ 188 scaling factor to be $\hat { \lambda } = 1$ and the regularisation to go from ‘off’ to ‘on’ between iterations 40,000 to
246
+ 189 50,000. Results, shown in Figure 2b, show discretising the gate improves over the baseline but also
247
+ 190 discretising the weights is additionally beneficial (especially for range U [-0.2,-0.1)). U [10,20) is the
248
+ 191 only range where the baseline outperforms using discretisation, succeeding on two additional seeds.
249
+ 192 Does using a more constrained initialisation help? (Yes) $W ^ { ( r ) }$ uses a Xavier-Uniform initial
250
+ 193 isation [Glorot and Bengio, 2010]. This can result in weights initialised out of the range [-1,1].
251
+ 194 Therefore, we use the initialisation for the Neural Addition Unit which is a constrained form of
252
+ 195 the Xavier-Uniform that does not allow the fan values of the uniform distribution to go beyond 0.5,
253
+ 196 meaning that no weight value will be out of the range [-1,1] [Madsen and Johansen, 2020]. Figure 2c
254
+ 197 shows using the constrained initialisation provides improvements over multiple ranges.
255
+
256
+ ![](images/9e3a08fb53f29f2be5884a025a12ec03e754b74b7927a35d1b6c74f0b9c7c485.jpg)
257
+ Figure 1: Exploring the effect and sensitivity of L1 regularisation on the Real NPU
258
+
259
+ ![](images/b753ab1ab2d4e27b531dd4960cec3c53d9d00633e16aa85713a702f1e095a8dd.jpg)
260
+ Figure 2: Effect of clipping, discretisation, and the NAU initialisation scheme on the Real NPU.
261
+
262
+ ![](images/27ca24ced743312991fb11ff7653d651fc84a051b3432d67833ad53b05653de8.jpg)
263
+ Figure 3: Division without redundancy (input size 2).
264
+
265
+ # 6 Results: Single Module Task
266
+
267
+ We analyse the results for the: Real NPU without using the modifications of Section 5, Real NPU with modifications, NRU, and NMRU.
268
+
269
+ # 6.1 No Redundancy
270
+
271
+ Figure 3 shows the baseline Real NPU without modifications struggles with all ranges except U[1,2), struggling with sparsity on the larger ranges. Applying the modifications deals with the sparsity issue and improves the robustness such that only range $\mathcal { U } [ - 2 , 2 )$ struggles (with a success rate of 0.64). The NRU and NMRU achieve full success over all ranges while solving the problem consistently fast and with low sparsity error. The success of the NRU is correlated with the learning rate (see Appendix E).
272
+
273
+ # 6.1.1 Mixed-signed Inputs
274
+
275
+ The remaining failure range of the Real NPU is U [-2,2) where inputs can consist of arbitrary signed values (e.g. all positives, all negatives, or a mixture of positive and negative values). We question if the failure is due to the input samples in a batch having different signs from each other, or if the problem is due to the fact data samples can be close to 0 (leading to singularity issues). To investigate
276
+
277
+ ![](images/b9350e8bef44837579e91416f79f6fdfd40143301410c9eff9832f00ec8d6449.jpg)
278
+ Figure 4: Extrapolation results on training the Real NPU using mixed-sign datasets that control the sign of the input elements. The ranges are in order of the datasets (i.e. dataset 1 to 5).
279
+
280
+ ![](images/6312b0065a51e06c3c53208f54c12008995bfff4f03be60f13a1ba729eb3b569.jpg)
281
+ Figure 5: Effect of the singularity issue on the Real NPU, NRU and NMRU over increasing input ranges. Left: Reciprocal for an input size of 1 (no redundancy). Middle: Reciprocal for an input size of 2 (with redundancy). Right: Division for an input size of 2 (no redundancy).
282
+
283
+ 212 this, we create additional mixed-sign datasets, controlling the range for each element in the input. The
284
+ 213 interpolation and extrapolation ranges for the different datasets can be found in Appendix C. Datasets
285
+ 214 1, 2, 4 and 5 sample a positive value for one input element and a negative value for the other element.
286
+ 215 Dataset 3 samples the signs randomly. Datasets 2 and 5 avoid sampling close to 0 values to mitigate
287
+ 216 the singularity issue. As shown by Figure 4, the Real NPU struggles on all these ranges, implying that
288
+ 217 the core issue is not from different input samples having different signs or due to the input samples
289
+ 218 being able to contain small values close to 0. The underlying issue is therefore most likely correlated
290
+ 219 to the each element in an input having different signs. When the denominator of the output is positive
291
+ 220 (dataset 1 or 2), the solution is found faster than when the denominator is a negative value (dataset 4
292
+ 221 or 5). When the signs for an input element are controlled, discretisation/sparsity is no problem, in
293
+ 222 contrast when the signs are arbitrary the sparsity error are slightly (though not significantly) higher.
294
+
295
+ # 6.2 Division by Small Numbers
296
+
297
+ Division by zero remains a challenge to model due to the inability to provide an computational value for the output and gradient. Furthermore, the discontinuous nature at zero causes its neighbouring values to have large gradients. To understand the extent of this issue when learning, we explore learning to divide by values close to zero using three tasks with increasing difficulty: 1) learning to take the reciprocal of a single input, 2) taking the reciprocal of the first input given two inputs, and 3) diving the first input by the second given two inputs. Figure 5 plots the test error for different modules assuming the module weights are set to the ‘gold’ solution for the three tasks. As the range values become closer to zero, the test error thresholds become increasingly large. Therefore, even with the correct weights, relying on the test errors alone as an indicator become increasingly deceptive with values close to zero. The Real NPU has larger test errors for all tasks and ranges, caused by adding $\epsilon$ to the input (see Equation 3). Setting $\epsilon = 0$ reduces the test error at the cost of the ability to deal with zero-valued inputs. Appendix F provides the corresponding experimental results for these tasks.
298
+
299
+ ![](images/dfa2cb434d655e5a99b3201cf2cf435ea7eb20cf9286d0ad7432d695f9166a17.jpg)
300
+ Figure 6: Division with redundancy (input size 10).
301
+
302
+ # 6.3 With Redundancy
303
+
304
+ Introducing redundancy (Figure 6) causes failure modes to arise. Failures on range U[-2,2) become more prevalent. The baseline Real NPU produces high sparsity errors relative to the other modules suggesting struggle with discretisation. Using the modified Real NPU improves over all ranges of the baseline (which were not already at full success) in terms of success, speed and sparsity.2 To ensure that complex weights do not fix the issue, we test the NPU module with all the modifications used on the real weight matrix (see Appendix G). Complex weights hinders success and convergence speeds of negative ranges. Assuming the global solution only uses the real weights, we enforce the complex weights to be clipped between [-1,1] and to go to 0 during the regularisation stage using a L1 penalty. This did not result in any significant improvements against the Real NPU results. Input redundancy effects the NRU the most, resulting in full failures on all the negative ranges. The NMRU is the only module with success for the range $\mathcal { U } [ - 2 , 2 )$ , which is a result of using the sign mechanism (see Appendix H). It performs well over all ranges though can be outperformed by the modified Real NPU for negative ranges. Multiple ranges for the NMRU are solved around 50,000 iterations correlating to the sparsity regularisation being turned on.
305
+
306
+ # 6.3.1 Gradient Difficulties with the NRU
307
+
308
+ 252 The partial derivative for the NRU weights, Equation 6, can give insight to the struggles of the NRU.
309
+
310
+ $$
311
+ \begin{array} { r l r } & { } & { \displaystyle \frac { \partial \hat { \bf y } } { \partial w _ { i } } = \mathrm { t a n h } ( 1 0 0 0 w _ { i } ) ( \mathrm { s i g n } ( x _ { i } ) | x _ { i } | ( \mathrm { t a n h } ( 1 0 0 0 w _ { i } ) \log ( | x | ) + } \\ & { } & { \displaystyle 2 0 0 0 \mathrm { s e c h } ( 1 0 0 0 w _ { i } ) ^ { 2 } ) - 2 0 0 0 \mathrm { s e c h } ( 1 0 0 0 w _ { i } ) ^ { 2 } ) \times \mathrm { N R U } _ { \tilde { \bf x } \in { \bf x } \backslash \{ { \bf x } _ { i } \} } ( \tilde { \bf x } ) . } \end{array}
312
+ $$
313
+
314
+ $\_$ applies the NRU to all inputs excluding $x _ { i }$ influencing the gradient values between subsequent update steps. Factoring out this term, the following observations are made. If $x _ { i } \approx 0$ and $w _ { i } \approx 0$ then gradients become increasingly large. If $x _ { i } \approx 0$ and $- 1 \leq w _ { i } < 0$ then as $w _ { i } \to - 1$ all gradients for $x _ { i }$ where $| x _ { i } | > > 1$ become increasingly small. The gradients for $x _ { i } = - 1$ and $x _ { i } = 1$ are 0 regardless the value of $w _ { i }$ . If $w _ { i } = 0$ then the gradient is 0 for all $x _ { i }$ , a result of using the tanh approximation. Even if the sign and magnitude are calculated separately and then combined (see Appendix I) to try to control the gradient better, the problem remains. Therefore, we conclude that extending the NMU to divide using a weight of -1 is a poor choice when there are redundant inputs.
315
+
316
+ ![](images/66ed3f0eee25ac2b1a0c761d4b2eb34b0ef8ac43e9bb7e26723d0bf2229b6cdb.jpg)
317
+ Figure 7: Root Mean Squared loss curvature for the NAU stacked with either a RealNPU, NRU, or NMRU. "The weight matrices are constrained to $\mathbf { W } _ { 1 } = \left[ \begin{array} { l l l } { w _ { 1 } \ w _ { 1 } } & { 0 } & { 0 } \\ { w _ { 1 } \ w _ { 1 } \ w _ { 1 } \ w _ { 1 } } & { w _ { 1 } } \end{array} \right]$ , $\mathbf { W } _ { 2 } = \left[ w _ { 2 } \ w _ { 2 } \right]$ . The problem is $( x _ { 1 } + x _ { 2 } ) \cdot ( x _ { 1 } + x _ { 2 } + x _ { 3 } + x _ { 4 } )$ for $x = ( 1 , 1 . 2 , 1 . 8 , 2 ) "$ [Madsen and Johansen, 2020]. The ideal solution is $w _ { 1 } = w _ { 2 } = 1$ , though other valid solutions do exist e.g., $w _ { 1 } = - 1 , w _ { 2 } = 1$ . (The NMRU’s weight matrix would be $\bar { \bf W _ { 2 } } = [ w _ { 2 } \ w _ { 2 } \ 0 \ 0 ]$ , and the Real NPU’s $\mathbf { g } = \left[ 1 \mathbf { \Omega } ^ { 1 } \right]$ . )
318
+
319
+ # 261 6.3.2 The Real NPU’s and NMRU’s Exploitation of Multiplicative Rules
320
+
321
+ The NMRU solutions exploit the inverse rule of division in that 1 = 1. Since the input also contains the reciprocals, numerous extrapolative solutions exist. However this comes at the cost of finding a ‘simple’ solution which contains ones only for relevant inputs. The Real NPU exploits the rules $a _ { i } \cdot 0 = 0$ and $1 ^ { a _ { i } } = 1$ enabling non-zero weight values if the corresponding gate value is 0. However, we can avoid this by allowing 0 to also not be penalised during sparsity regularisation stage (see Appendix G). We find this alleviates the exploitation issue with no cost to performance.
322
+
323
+ # 268 7 Discussion
324
+
325
+ 269 In this paper, we demonstrate the limitations of intepretable neural networks in learning to divide.
326
+ 270 Using the no redundancy setting (size 2), we find that the Real NPU is challenged when training data
327
+ 271 consists of mixed-signed inputs even with our applied improvements. Increasing the difficulty to
328
+ 272 have an input redundancy (with 8 redundant and 2 relevant input values) magnifies this issue, but
329
+ 273 also introduces failure modes for the NRU and NMRU for negative ranges. The NRU is unable to
330
+ 274 handle any negative ranges, in which we conclude it is not wise to use with MSE. Alternate losses
331
+ 275 can improve certain failure cases though sometimes at the cost of performance on other ranges. For
332
+ 276 further details see Appendix J which displays results on a correlation and scale-invariant based loss.
333
+ 277 Our NMRU is the only module with reasonable success over all tested ranges, requiring only $2 I \times O$
334
+ 278 learnable parameters. However, this comes at the cost of the simplicity of the solution due to its
335
+ 279 exploitation of the identity rule; an issue the Real NPU does not have.
336
+
337
+ Once robust modules are attainable in a single layer setting, the next step would be to question performance when learning stacked modules, e.g. learning a stacked additive and multiplicative module. Previously, Madsen and Johansen [2020, Figure 2] illustrates the troubles for multiplicative models with the capacity for division. They show how a stacked summative-multiplicative module can lead to an exploding loss when the output of the summative module is close to 0 and the multiplicative model tries to divide. In Figure 7, we recreate their setup to produce the loss surfaces for the NAUReal $\mathrm { N P U } ^ { 3 }$ , NAU-NRU and NAU-NMRU respectively. 4 We find a similar issue with the Real-NPU and NRU, as both these units use a weight range of [-1,1]. In contrast, the NMRU, whose weight’s range is limited to [0,1] does not have exploding losses.
338
+
339
+ In conclusion, division remains a challenge to learn using intepretable neural networks, even for the simplest tasks. Nevertheless, by identifying the specific areas causing difficulty (e.g., training ranges), and useful architecture properties (e.g., using a sign retrieval mechanism), we hope the community has better intuition for dealing with division and develop more robust modules to learn division.
340
+
341
+ # References
342
+
343
+ Girish Chandrashekar and Ferat Sahin. A survey on feature selection methods. Computers & Electrical Engineering, 40(1):16–28, 2014. ISSN 0045-7906. doi: https://doi.org/10.1016/j.comp eleceng.2013.11.024. URL https://www.sciencedirect.com/science/article/pii/S0 045790613003066. 40th-year commemorative issue.
344
+ Lukas Faber and Roger Wattenhofer. Neural status registers. CoRR, abs/2004.07085, 2020. URL https://arxiv.org/abs/2004.07085.
345
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256. JMLR Workshop and Conference Proceedings, 2010. URL http: //proceedings.mlr.press/v9/glorot10a/glorot10a.pdf.
346
+ Niklas Heim, Tomáš Pevny, and Václav Šmídl. Neural power units. \` Advances in Neural Information Processing Systems, 33, 2020. URL https://papers.nips.cc/paper/2020/file/48e5900 0d7dfcf6c1d96ce4a603ed738-Paper.pdf.
347
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2015. URL https://arxiv.org/pdf/1412.6980.pdf.
348
+ Andreas Madsen and Alexander Rosenberg Johansen. Measuring arithmetic extrapolation performance. In Science meets Engineering of Deep Learning at 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), volume abs/1910.01888, Vancouver, Canada, October 2019. URL https://arxiv.org/pdf/1910.01888.pdf.
349
+ Andreas Madsen and Alexander Rosenberg Johansen. Neural arithmetic units. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id= H1gNOeHKPS.
350
+ Bhumika Mistry, Katayoun Farrahi, and Jonathon Hare. A primer for neural arithmetic logic modules, 2021. URL https://arxiv.org/pdf/2101.09530.pdf.
351
+ Subham Sahoo, Christoph Lampert, and Georg Martius. Learning equations for extrapolation and control. In International Conference on Machine Learning, pages 4442–4450. PMLR, 2018.
352
+ Daniel Schlör, Markus Ring, and Andreas Hotho. inalu: Improved neural arithmetic logic unit. Frontiers in Artificial Intelligence, 3:71, 2020. ISSN 2624-8212. doi: 10.3389/frai.2020.00071. URL https://www.frontiersin.org/article/10.3389/frai.2020.00071.
353
+ Andrew Trask, Felix Hill, Scott E Reed, Jack Rae, Chris Dyer, and Phil Blunsom. Neural arithmetic logic units. In Advances in Neural Information Processing Systems, pages 8035–8044, 2018. URL https://openreview.net/pdf?id=H1gNOeHKPS.
354
+ Silviu-Marian Udrescu and Max Tegmark. Ai feynman: A physics-inspired method for symbolic regression. Science Advances, 6(16), 2020. doi: 10.1126/sciadv.aay2631. URL https: //advances.sciencemag.org/content/6/16/eaay2631.
355
+
356
+ # Checklist
357
+
358
+ 1. For all authors...
359
+
360
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See contributions in the introduction. For Real NPU improvements see Section 5. For two novel modules see Section 3.2 and 3.3 and results in Section 6. For hindrances in learning division, see Section 6.
361
+ (b) Did you describe the limitations of your work? [Yes] See Section 7.
362
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] This paper focuses on the ML techniques and the foundational research required to learn division in a systematic manner. Once robust modules for the arithmetic operations (i.e. NALMs) are achievable the community will possess trainable modules with significant advantages regarding model transparency and generalisability. That being said, we discuss how this leads to a negative societal impact in the end of Section 1.
363
+
364
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We have read the guidelines and our work does not use human-derived data.
365
+
366
+ 2. If you are including theoretical results...
367
+
368
+ (a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
369
+
370
+ 3. If you ran experiments...
371
+
372
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See link provided to the code base. Data is generated in real time and the code to generate it is available in the linked repository.
373
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4 and Appendix C.
374
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See plots and experiment details in Section 4 for further details.
375
+ (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 Appendix D.
376
+
377
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
378
+
379
+ (a) If your work uses existing assets, did you cite the creators? [Yes] See footnote link provided to the code base and Section 4.
380
+ (b) Did you mention the license of the assets? [Yes] We state the MIT licence when giving the link to the codebase.
381
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] All code for model, data and experiments are available through the link to the codebase.
382
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
383
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] All data is synthetic, containing no such information.
384
+
385
+ 5. If you used crowdsourcing or conducted research with human subjects...
386
+
387
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
388
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
389
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/3WbWmdTd8fN/3WbWmdTd8fN_content_list.json ADDED
@@ -0,0 +1,1103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Learning Division with Neural Arithmetic Logic Modules ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 209,
8
+ 122,
9
+ 790,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 222,
20
+ 578,
21
+ 276
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 313,
32
+ 535,
33
+ 329
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "1 To achieve systematic generalisation, it first makes sense to master simple tasks \n2 such as arithmetic. Of the four fundamental arithmetic operations $( + , - , \\times , \\div )$ , \n3 division is considered the most difficult for both humans and computers. In this \n4 paper we show that robustly learning division in a systematic manner remains a \n5 challenge even at the simplest level of dividing two numbers. We propose two \n6 novel approaches for division which we call the Neural Reciprocal Unit (NRU) and \n7 the Neural Multiplicative Reciprocal Unit (NMRU), and present improvements for \n8 an existing division module, the Real Neural Power Unit (Real NPU). Experiments \n9 in learning division with input redundancy on 225 different training sets, find that \n10 our proposed modifications to the Real NPU obtains an average success of $8 5 . 3 \\%$ \n11 improving over the original by $1 5 . 1 \\%$ . In light of the suggestion above, our NMRU \n12 approach can further improve the success to $9 1 . 6 \\%$ . ",
40
+ "bbox": [
41
+ 148,
42
+ 345,
43
+ 766,
44
+ 512
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "13 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 148,
54
+ 539,
55
+ 312,
56
+ 556
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "14 Imagine you must learn to divide 2 numbers, but are only given 10 numbers and the target value. This \n15 task requires finding the 2 relevant operands, the order to divide the operands, and learning to divide. \n16 In machine learning, this is equivalent to a supervised regression task where the aim is to learn the \n17 underlying function between the inputs and output such that the solution is generalisable to any input. \n18 The ability to select relevant features is a desirable property of neural networks, useful for improved \n19 intepretability, reduced pre-processing costs and greater generalisation [Chandrashekar and Sahin, \n20 2014]. The ability to model division, one of the four fundamental arithmetic operations, is necessary \n21 for expressing dynamical systems [Sahoo et al., 2018], and physics-based formulas [Udrescu and \n22 Tegmark, 2020]. However, even recent models still struggle to learn division when there is input \n23 redundancy [Schlör et al., 2020]. \n24 The main challenge of the above task comes from learning the selection and operation at the same \n25 time, which can lead to conflicting priorities when learning network weights. Furthermore, the natural \n26 properties of division of values around zero leads to undesirable gradients. Models which deal with \n27 this naively (e.g. MLPs) are unable to deal with the fluctuant gradients caused by the asymptotic \n28 nature and discontinuities in division [Trask et al., 2018]. ",
63
+ "bbox": [
64
+ 147,
65
+ 571,
66
+ 825,
67
+ 710
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "",
74
+ "bbox": [
75
+ 147,
76
+ 717,
77
+ 825,
78
+ 786
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "9 Can we build models which can learn division in the presence of its undesirable, yet valid, properties? We aim to address this question in this paper. Specifically, we contribute the following:0 ",
85
+ "bbox": [
86
+ 156,
87
+ 791,
88
+ 825,
89
+ 820
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "• Improvements to the Real NPU [Heim et al., 2020] including: clipping, discretisation and constrained initialisation to improve performance in learning division on different training ranges. ",
96
+ "bbox": [
97
+ 168,
98
+ 832,
99
+ 823,
100
+ 861
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "33 • Two novel division modules, the NRU and the NMRU. The NRU explores extending the NMU \n34 weight ranges from [0,1] to [-1,1] to include division, where we find a weakness in learning from \n35 negative ranges. Learning from the weaknesses of the NRU, the NMRU extends the NMU to learn \n36 division while keeping weights values between [0,1]. We further boost performance by using a \n37 Real NPU inspired sign retrieval mechanism, enabling the NMRU to gain the best performance \n38 when using a mean squared error (MSE) loss. \n39 • New understanding into the hindrances in learning division including: training on mixed-sign \n40 inputs, training on negative ranges, and division on extremely small values. We find these difficulties \n41 can be sufficiently identified using synthetic division tasks. \n42 The broader impact of our work relates to interpretable Artificial Intelligence where our modules \n43 can be included in larger networks for applications such as image classification or analogy creation, \n44 whilst retaining the ability to produce transparent generalisable solutions. However, there are possible \n45 negative societal impacts. Such modules can be viewed as specialised feature selectors/aggregators \n46 which do not require integrating domain knowledge. Therefore, if a non-domain-expert tries inter \n47 preting relations in the input data, they may incorrectly interpret causality, which can be especially \n48 harmful if such a case occurs on medical or financial data. Mitigating against such downstream issues \n49 requires to first focus efforts on producing robust modules to different distributions and understand \n50 their affect on learning other networks architectures (e.g. CNN). Understanding this will enable \n51 recognising situations where these modules can aid and where they should avoid being used. ",
107
+ "bbox": [
108
+ 145,
109
+ 90,
110
+ 825,
111
+ 220
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "",
118
+ "bbox": [
119
+ 147,
120
+ 231,
121
+ 825,
122
+ 369
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "52 2 Related Work ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 153,
132
+ 387,
133
+ 320,
134
+ 405
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "53 One approach to learn division would be symbolic regression networks [Sahoo et al., 2018]. However, \n54 a symbolic approach pre-defines the operations, which is not a limitation of using Neural Arithmetic \n55 Logic Modules (NALMs). \n56 NALMs are neural networks which learn arithmetic operations and input selection [Mistry et al., \n57 2021]. The weights of these networks are intepretable such that a discrete value represents a specific \n58 operation. For example, ‘-1’ to represent division and $\\cdot _ { 0 } \\cdot \\mathrm { ~ }$ for no selection. From this research field, \n59 we focus on the Real NPU and the NMU. Until now, the Real NPU only has learned division on \n60 training ranges of either $\\mathcal { U } [ 0 . 1 , 2 ]$ or Sobol(0,0.5) [Heim et al., 2020]. It remains unclear if this \n61 module is robust to other training ranges even as a stand-alone unit. Robustness to training ranges is \n62 important as these module’s applicational use comes from being part of larger end-to-end networks, \n63 where the input range into the module cannot be controlled. The NMU is a multiplication module \n64 which we extend to also do division. The authors of the NMU believe such an extension incurs too \n65 many limitations for learning [Madsen and Johansen, 2020]. We use this paper as an opportunity to \n66 explore this belief. \n67 Trask et al. [2018] developed the Neural Arithmetic Logic Unit (NALU) which can model all four \n68 arithmetic operations. However, studies show this module to be unstable in learning division [Schlör \n69 et al., 2020, Heim et al., 2020]. In particular, their gating method responsible for selecting an operation \n70 cannot learn consistently [Madsen and Johansen, 2020]. Schlör et al. [2020] developed iNALU \n71 additionally applying weight and gradient clipping, sign retrieval, regularisation, reinitialisation and \n72 separating shared parameters to the NALU. Even with these modifications, they still find consistently \n73 learning division to a high precision to remain unattainable. Furthermore, Heim et al. [2020]’s results \n74 imply iNALU is outperformed by the Real NPU for division. ",
141
+ "bbox": [
142
+ 147,
143
+ 419,
144
+ 825,
145
+ 460
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "",
152
+ "bbox": [
153
+ 147,
154
+ 467,
155
+ 825,
156
+ 618
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "",
163
+ "bbox": [
164
+ 147,
165
+ 625,
166
+ 825,
167
+ 736
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "75 3 Architectures ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 150,
177
+ 756,
178
+ 318,
179
+ 772
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "76 This section introduces the architectures for the (Real) NPU, NRU, and the NMRU. The (Real) NPU \n77 is an existing module, which we improve in Section 5. The NRU and NMRU are novel contributions. \n78 Appendix A summarises the important properties of these division modules. ",
186
+ "bbox": [
187
+ 148,
188
+ 785,
189
+ 825,
190
+ 828
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "3.1 Real Neural Power Unit ",
197
+ "text_level": 1,
198
+ "bbox": [
199
+ 171,
200
+ 843,
201
+ 379,
202
+ 858
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "80 Heim et al. [2020] develop a module to learn to multiply and divide, using the intuition from Trask \n81 et al. [2018] that multiplicative operations are additive operations in log space. Their work extends \n82 this idea into complex space. The NPU can be used with its complex form (Equation 1) requiring both \n83 a complex and real weight matrix $( W ^ { ( i ) } , W ^ { ( r ) } )$ , or only its real form the Real NPU (Equation 2). \n84 For improved gradients, a relevance gate $\\mathbfit { \\Delta } \\mathbf { r }$ (Equation 3) is used which converts inputs close to 0 (i.e. \n85 irrelevant features) to 1 to avoid the resulting output evaluating to 0. A gating vector $\\textbf { { g } }$ , learns to \n86 select relevant input elements, where gate values are clipped between [0,1] during training. ",
209
+ "bbox": [
210
+ 147,
211
+ 869,
212
+ 823,
213
+ 911
214
+ ],
215
+ "page_idx": 1
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "",
220
+ "bbox": [
221
+ 142,
222
+ 89,
223
+ 826,
224
+ 147
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "equation",
230
+ "img_path": "images/b46fb9198ccda293fa0eb944438a8df746cd789d9fdb4b2ff1102607a9935e3f.jpg",
231
+ "text": "$$\n\\mathrm { N P U } : = \\exp ( { W ^ { ( r ) } \\log ( r ) - W ^ { ( i ) } k } ) \\odot \\cos ( { W ^ { ( i ) } \\log ( r ) + W ^ { ( r ) } k } ) ,\n$$",
232
+ "text_format": "latex",
233
+ "bbox": [
234
+ 254,
235
+ 151,
236
+ 723,
237
+ 171
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "87 ",
244
+ "bbox": [
245
+ 147,
246
+ 179,
247
+ 160,
248
+ 188
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "equation",
254
+ "img_path": "images/8759b8f27a6f318d9223ffd0c39272f2e3bf67a0a06fb7efaed9a6566f02c9ad.jpg",
255
+ "text": "$$\n\\mathrm { R e a l N P U } : = \\exp ( W ^ { ( r ) } \\log ( r ) ) \\odot \\cos ( W ^ { ( r ) } k )\n$$",
256
+ "text_format": "latex",
257
+ "bbox": [
258
+ 326,
259
+ 185,
260
+ 656,
261
+ 205
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "equation",
267
+ "img_path": "images/993643c0f0f694ebc57379cc8eab2bf2637a910b10c1a534efc7707537a10ee7.jpg",
268
+ "text": "$$\n\\mathrm { e r e } \\quad r = g \\odot ( | { \\pmb x } | + \\epsilon ) + ( { \\bf 1 } - { \\pmb g } ) \\quad \\mathrm { a n d } \\quad k _ { i } = \\left\\{ 0 \\qquad x _ { i } \\geq 0 \\atop \\pi { \\bf g _ { i } } \\quad x _ { i } < 0 \\right. .\n$$",
269
+ "text_format": "latex",
270
+ "bbox": [
271
+ 294,
272
+ 214,
273
+ 725,
274
+ 250
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "89 A weighted L1 penalty is used when training. The weight value $\\beta$ grows between predefined values \n90 $\\beta _ { s t a r t }$ to $\\beta _ { e n d }$ and is increased every $\\beta _ { s t e p } = 1 0 , 0 0 0$ iterations by a growth factor $\\beta _ { g r o w t h } = 1 0$ . \n91 We focus on the Real NPU over the NPU as the solution of the tasks in this paper can be captured \n92 using only real values meaning that the complex form is not required. ",
281
+ "bbox": [
282
+ 145,
283
+ 255,
284
+ 826,
285
+ 311
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "93 3.2 Neural Reciprocal Unit ",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 158,
295
+ 327,
296
+ 375,
297
+ 342
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "94 We propose the NRU, which can model multiplication and division. We extend the NMU, motivated \n95 by division being multiplication of reciprocals. The range which weight values can be is extended \n96 from [0,1] to [-1,1], where $^ { - 1 }$ represents applying the reciprocal on the corresponding input element. \n97 A NRU output element $z _ { o }$ is defined as ",
304
+ "bbox": [
305
+ 145,
306
+ 352,
307
+ 826,
308
+ 409
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "equation",
314
+ "img_path": "images/87e1dfda1d0f2170575a099941f113cf2873ff9645c9989a49592bbc2968da45.jpg",
315
+ "text": "$$\n\\mathrm { N R U : ~ } z _ { o } = \\prod _ { i = 1 } ^ { I } ( \\mathrm { s i g n ( x } _ { i } ) \\cdot | \\mathbf { x } _ { i } | ^ { W _ { i , o } } \\cdot | W _ { i , o } | + 1 - | W _ { i , o } | ) ,\n$$",
316
+ "text_format": "latex",
317
+ "bbox": [
318
+ 302,
319
+ 412,
320
+ 694,
321
+ 457
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "98 where $I$ is the number of inputs. Assuming weights are either 1 (multiply) or $^ { - 1 }$ (reciprocal), $\\left| \\mathbf { x } _ { i } \\right| ^ { W _ { i , o } }$ \n99 will apply the operation on an input element. The absolute value is used so that the module only \n100 operates in the space of real numbers, as $x _ { i } ^ { W _ { i , o } }$ for a negative input $( x _ { i } )$ when $- 1 < W _ { i , o } < 1$ results \n101 in a complex number. The use of absolute means the sign of the input must be reapplied. For the \n102 no-selection case $W _ { i , o } = 0$ , we want the input element to convert to 1 (the identity value), resulting \n103 in applying $| W _ { i , o } | + 1 - | W _ { i , o } |$ . The derivative of the absolute function at 0 is undefined meaning the \n104 gradients of Equation 4 can contain points of discontinuity. To alleviate this issue, we approximate \n105 the absolute function using a scaled tanh (inspired by Faber and Wattenhofer [2020]). More formally, ",
328
+ "bbox": [
329
+ 142,
330
+ 460,
331
+ 825,
332
+ 577
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "equation",
338
+ "img_path": "images/9f1f6c07f5db0ecf6bb8b5935d5b5f806308a85f68f85141393d961f0ecfeeb6.jpg",
339
+ "text": "$$\n| W _ { i , o } | = \\left\\{ \\begin{array} { l l } { \\operatorname { t a n h } ( 1 0 0 0 \\cdot W _ { i , o } ) ^ { 2 } } & { \\mathrm { i f ~ t r a i n i n g } } \\\\ { | W _ { i , o } | } & { \\mathrm { o t h e r w i s e } } \\end{array} . \\right.\n$$",
340
+ "text_format": "latex",
341
+ "bbox": [
342
+ 351,
343
+ 582,
344
+ 647,
345
+ 617
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "106 The scale factor (1000) controls how close to the absolute function the approximation is, where larger \n107 values give a more accurate approximation. For clipping and regularisation, the same scheme as the \n108 Neural Addition Unit (NAU) (see Appendix B) is used. ",
352
+ "bbox": [
353
+ 142,
354
+ 621,
355
+ 825,
356
+ 665
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "109 3.3 Neural Multiplicative Reciprocal Unit ",
363
+ "text_level": 1,
364
+ "bbox": [
365
+ 143,
366
+ 679,
367
+ 477,
368
+ 695
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "110 An alternate extension of the NMU, also motivated by division being multiplication of reciprocals \n111 is the NMRU (Equation 5). We concatenate the reciprocal of the input (plus a small $\\epsilon$ ) to the input \n112 resulting in a module which only needs to learn selection. Hence, weights can be in the range [0,1]. ",
375
+ "bbox": [
376
+ 140,
377
+ 704,
378
+ 825,
379
+ 747
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "equation",
385
+ "img_path": "images/45d160439d799aa4d21a18c6a3a310865a4c66e1d762b8cb74f88f9f9c5446fc.jpg",
386
+ "text": "$$\n\\mathrm { N M R U } : z _ { o } = \\prod _ { i = 1 } ^ { 2 I } ( W _ { i , o } \\cdot | \\mathbf { x } _ { i } | + 1 - W _ { i , o } ) \\cdot \\sum _ { i = 1 } ^ { 2 I } ( \\cos ( W _ { i , o } \\cdot k _ { i } ) ) \\mathrm { , ~ w h e r e ~ } k _ { i } \\ = \\{ { 0 } \\quad x _ { i } \\geq 0 \\atop \\pi \\ .\n$$",
387
+ "text_format": "latex",
388
+ "bbox": [
389
+ 183,
390
+ 752,
391
+ 812,
392
+ 795
393
+ ],
394
+ "page_idx": 2
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "113 The iteration over $2 I$ represents the going through all inputs and their reciprocals. We calculate the \n114 magnitude and sign separately, joining the result at the end. The magnitude is calculated passing \n115 absolute of the concatenated input through an NMU architecture and the sign by using a cosine \n116 mechanism similar to the Real NPU. However, unlike the Real NPU only the weight matrix is \n117 required. The norm of the weight’s gradients are clipped to 1 prior to being updated by the optimiser. \n118 This is done to alleviate the issue of exploding gradients caused by including the reciprocal to the \n119 inputs. For clipping and regularisation, the same scheme as the NMU (see Appendix B) is used. ",
399
+ "bbox": [
400
+ 140,
401
+ 814,
402
+ 825,
403
+ 912
404
+ ],
405
+ "page_idx": 2
406
+ },
407
+ {
408
+ "type": "table",
409
+ "img_path": "images/7ce71f48ba5b1b7ea7dce5a9d28199db99d369f3e8a691c5382d73543e3ee65a.jpg",
410
+ "table_caption": [
411
+ "Table 1: Interpolation (train/validation) and extrapolation (test) ranges used. Data (as floats) is drawn from a Uniform distribution with the range values as the lower and upper bounds. "
412
+ ],
413
+ "table_footnote": [],
414
+ "table_body": "<table><tr><td>Interpolation Extrapolation</td><td>[-20,-10) [-40, -20)</td><td>[-2, -1) [-6,-2)</td><td>[-1.2, -1.1) [-6.1, -1.2)</td><td>[-0.2,-0.1) [-2, -0.2)</td><td>[-2,2) [-6, -2), [2, 6)]</td></tr><tr><td>Interpolation</td><td>[0.1, 0.2)</td><td>[1,2)</td><td>[1.1, 1.2)</td><td>[10,20)</td><td></td></tr><tr><td>Extrapolation</td><td>[0.2,2)</td><td>[2,6)</td><td>[1.2, 6)</td><td>[20,40)</td><td></td></tr></table>",
415
+ "bbox": [
416
+ 214,
417
+ 137,
418
+ 782,
419
+ 209
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "120 4 Experiment Setup ",
426
+ "text_level": 1,
427
+ "bbox": [
428
+ 142,
429
+ 233,
430
+ 357,
431
+ 251
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "We introduce the two main experiments used to evaluate modules, including: default parameters, train and test ranges, and evaluation metrics. The tasks evaluate the ability of a single module to divide two numbers from an input vector in two settings: no redundancy and with redundancy. ",
438
+ "bbox": [
439
+ 160,
440
+ 265,
441
+ 823,
442
+ 308
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "124 Default parameters: All experiments use a mean squared error (MSE) loss with an Adam optimiser \n125 [Kingma and Ba, 2015], with 10,000 samples for the validation and test sets. The best model for \n126 evaluation is taken using early stopping on the validation set. All runs are over 25 different seeds. All \n127 inputs are required in the no redundancy setting, i.e., input size of 2. Training takes 50,000 iterations \n128 where each iteration consists of a different batch of size 128. The Real NPU uses a learning rate of \n129 5e-3 with sparsity regularisation scaling during iterations 40,000 to 50,000. The NRU and NMRU \n130 use sparsity regularisation scaling during iterations 20,000 to 35,000 and a learning rate of 1 and 1e-2 \n131 respectively. In contrast, the redundancy setting uses an input size of 10, where 8 input values are not \n132 required for the final output. The total training iterations are extended to 100,000 with batch sizes \n133 of 128. The learning rates for the Real NPU, NRU and NMRU are 5e-3, 1e-3 and 1e-2 respectively. \n134 Sparsity regularisation scaling occurs during iteration 50,000 to 75,000 for all modules. A summary \n135 of all relevant parameters is found in Appendix C. \n36 Ranges: The interpolation (train/validation) and extrapolation (test) ranges, are found in Table 1. \n37 The chosen ranges are influenced by Madsen and Johansen [2020]. \n138 Evaluation metrics: We use the Madsen and Johansen [2019]’s evaluation scheme, consisting of \n139 three evaluation metrics: the success on the extrapolation dataset against a near optimal solution \n140 (success rate), the first iteration which the task is considered solved (speed of convergence), and \n141 the extent of discretisation towards the weights’ inductive biases (sparsity error). Sparsity error \n142 calculated by $\\operatorname* { m a x } _ { i , o } ( \\operatorname* { m i n } ( | W _ { i , o } | , 1 - | W _ { i , o } | ) )$ , measures the weight element which is the furthest away \n143 from the acceptable discrete weights for the module. A success means the MSE of the trained model \n144 is lower than a threshold value (i.e. the MSE of a near optimal solution). We differ from Madsen \n145 and Johansen [2019] by using a fixed threshold value 1e-5 rather than a simulated MSE, as there \n146 are no intermediate layers to accumulate numerical errors. We choose this precision as it can be \n147 guaranteed when working with 32-bit PyTorch Tensors. $9 5 \\%$ confidence intervals (over the 25 seeds) \n148 are calculated from a specific family of distributions dependant on the metric. The success rate uses \n149 Binomial distribution because trials (i.e. run on a single seed) are either pass/ fail situations. The \n150 convergence metric uses a Gamma distribution and sparsity error uses a Beta distribution. Both Beta \n151 and Gamma can easily approximate the normal distribution and support its corresponding metric. ",
449
+ "bbox": [
450
+ 140,
451
+ 321,
452
+ 825,
453
+ 488
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "",
460
+ "bbox": [
461
+ 153,
462
+ 503,
463
+ 823,
464
+ 531
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "",
471
+ "bbox": [
472
+ 140,
473
+ 546,
474
+ 826,
475
+ 748
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "5 Improving the Real NPU’s Robustness ",
482
+ "text_level": 1,
483
+ "bbox": [
484
+ 165,
485
+ 767,
486
+ 524,
487
+ 785
488
+ ],
489
+ "page_idx": 3
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "We first improve the robustness of the Real NPU on different training ranges. We use the Single Module Task with no redundancy (see Section 4) to investigate the following questions: ",
494
+ "bbox": [
495
+ 168,
496
+ 799,
497
+ 821,
498
+ 828
499
+ ],
500
+ "page_idx": 3
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "1. Is L1 regularisation required, and if so, do the regularisation parameters require tuning? \n2. Does clipping the weight matrix aid learning? \n3. Does enforcing discretisation on parameters improve convergence? \n4. Can the weight matrix initialisation be improved? \n159 To address each question in order, we propose applying incremental modifications to the Real NPU. \n160 These modifications include: ablation study on the L1 regularisation (including a sweep over the \n161 scaling range hyperparameters), clipping, enforcing discretisation, and a more restrictive initialisation \n162 scheme. We assume that we are optimising the Real NPU to perform multiplication or division. \n163 Therefore, we trade-off the flexibility of having non-discretised weights, which enables the success of \n164 modelling the SIR data in Heim et al. [2020, Section 4.1] , in favour of sparse models with discrete \n165 weight values. All the modifications suggested can also be generalised for the NPU architecture. \n166 Is L1 regularisation required? (Yes) L1 encourages sparsity (i.e., zero weights) in solutions. \n167 Zero-valued weights means not to select an input and return the identity value 1. For the task, the \n168 optimal weight values require selecting all inputs and therefore non-zero values, suggesting the \n169 application of L1 could be damaging. Therefore, we compare against a model which does not use \n170 L1 regularisation, shown in Figure 1a. Removing L1 proves to be detrimental in five of the nine \n171 cases shown and only shows minor improvements in two of the nine ranges (i.e., $\\mathcal { U } [ - 1 . 2 , - 1 . 1 )$ and \n172 U[1.1,1.2)). Hence, we keep L1 regularisation. The L1 regularisation scaling (see Section 3.1), \n173 requires setting the hyperparameters for the start $( \\beta _ { s t a r t } )$ and end $( \\beta _ { e n d } )$ scaling values. We run a \n174 sweep over six different start and end values, denoted (<start>, <end>), displaying results in Figure 1b. \n175 We find the configuration (1e-9, 1e-7) is the most successful when considering performance on all \n176 the ranges, and larger scaling values perform worse. \n177 Does clipping the learnable parameters help? (Yes) Division and multiplication operations are \n178 represented by weight values of -1 and 1 respectively. The current architecture does not constrain the \n179 weights which can result in large weight values. The gate weights do get clipped and saved to another \n180 variable during the forward pass, meaning after an update step the gate values can also be out of the \n181 range [-1,1]. Hence, we investigate the effect of applying clipping directly to the weight and gate \n182 values after every optimisation step. Results, shown in Figure 2a, show clipping is beneficial, with \n183 clipping on both weight and gate (or just on the weights) to improve over the baseline on all ranges \n184 (excluding $\\mathcal { U } [ 1 , 2 )$ where the baseline has already achieved full success). \n185 Does enforcing discretisation help? (Yes) Modelling division in a generalisable manner requires \n186 all learnable parameters to be discrete i.e., a value from {-1, 0, 1}. Using Madsen and Johansen \n187 [2020]’s regularisation scaling scheme, we penalise weights for not being discrete. We modify the \n188 scaling factor to be $\\hat { \\lambda } = 1$ and the regularisation to go from ‘off’ to ‘on’ between iterations 40,000 to \n189 50,000. Results, shown in Figure 2b, show discretising the gate improves over the baseline but also \n190 discretising the weights is additionally beneficial (especially for range U [-0.2,-0.1)). U [10,20) is the \n191 only range where the baseline outperforms using discretisation, succeeding on two additional seeds. \n192 Does using a more constrained initialisation help? (Yes) $W ^ { ( r ) }$ uses a Xavier-Uniform initial \n193 isation [Glorot and Bengio, 2010]. This can result in weights initialised out of the range [-1,1]. \n194 Therefore, we use the initialisation for the Neural Addition Unit which is a constrained form of \n195 the Xavier-Uniform that does not allow the fan values of the uniform distribution to go beyond 0.5, \n196 meaning that no weight value will be out of the range [-1,1] [Madsen and Johansen, 2020]. Figure 2c \n197 shows using the constrained initialisation provides improvements over multiple ranges. ",
505
+ "bbox": [
506
+ 210,
507
+ 838,
508
+ 807,
509
+ 912
510
+ ],
511
+ "page_idx": 3
512
+ },
513
+ {
514
+ "type": "image",
515
+ "img_path": "images/9e3a08fb53f29f2be5884a025a12ec03e754b74b7927a35d1b6c74f0b9c7c485.jpg",
516
+ "image_caption": [
517
+ "Figure 1: Exploring the effect and sensitivity of L1 regularisation on the Real NPU "
518
+ ],
519
+ "image_footnote": [],
520
+ "bbox": [
521
+ 253,
522
+ 92,
523
+ 750,
524
+ 286
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "image",
530
+ "img_path": "images/b753ab1ab2d4e27b531dd4960cec3c53d9d00633e16aa85713a702f1e095a8dd.jpg",
531
+ "image_caption": [
532
+ "Figure 2: Effect of clipping, discretisation, and the NAU initialisation scheme on the Real NPU. "
533
+ ],
534
+ "image_footnote": [],
535
+ "bbox": [
536
+ 181,
537
+ 329,
538
+ 812,
539
+ 532
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "",
546
+ "bbox": [
547
+ 140,
548
+ 584,
549
+ 826,
550
+ 683
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "",
557
+ "bbox": [
558
+ 140,
559
+ 699,
560
+ 826,
561
+ 852
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "",
568
+ "bbox": [
569
+ 142,
570
+ 869,
571
+ 825,
572
+ 911
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "image",
578
+ "img_path": "images/27ca24ced743312991fb11ff7653d651fc84a051b3432d67833ad53b05653de8.jpg",
579
+ "image_caption": [
580
+ "Figure 3: Division without redundancy (input size 2). "
581
+ ],
582
+ "image_footnote": [],
583
+ "bbox": [
584
+ 179,
585
+ 92,
586
+ 813,
587
+ 286
588
+ ],
589
+ "page_idx": 5
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "",
594
+ "bbox": [
595
+ 142,
596
+ 343,
597
+ 825,
598
+ 412
599
+ ],
600
+ "page_idx": 5
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "",
605
+ "bbox": [
606
+ 142,
607
+ 428,
608
+ 825,
609
+ 527
610
+ ],
611
+ "page_idx": 5
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "",
616
+ "bbox": [
617
+ 142,
618
+ 542,
619
+ 826,
620
+ 627
621
+ ],
622
+ "page_idx": 5
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "6 Results: Single Module Task ",
627
+ "text_level": 1,
628
+ "bbox": [
629
+ 166,
630
+ 646,
631
+ 444,
632
+ 662
633
+ ],
634
+ "page_idx": 5
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "We analyse the results for the: Real NPU without using the modifications of Section 5, Real NPU with modifications, NRU, and NMRU. ",
639
+ "bbox": [
640
+ 176,
641
+ 678,
642
+ 825,
643
+ 705
644
+ ],
645
+ "page_idx": 5
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "6.1 No Redundancy ",
650
+ "text_level": 1,
651
+ "bbox": [
652
+ 174,
653
+ 722,
654
+ 325,
655
+ 737
656
+ ],
657
+ "page_idx": 5
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "Figure 3 shows the baseline Real NPU without modifications struggles with all ranges except U[1,2), struggling with sparsity on the larger ranges. Applying the modifications deals with the sparsity issue and improves the robustness such that only range $\\mathcal { U } [ - 2 , 2 )$ struggles (with a success rate of 0.64). The NRU and NMRU achieve full success over all ranges while solving the problem consistently fast and with low sparsity error. The success of the NRU is correlated with the learning rate (see Appendix E). ",
662
+ "bbox": [
663
+ 174,
664
+ 747,
665
+ 825,
666
+ 818
667
+ ],
668
+ "page_idx": 5
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "6.1.1 Mixed-signed Inputs ",
673
+ "text_level": 1,
674
+ "bbox": [
675
+ 176,
676
+ 832,
677
+ 369,
678
+ 847
679
+ ],
680
+ "page_idx": 5
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "The remaining failure range of the Real NPU is U [-2,2) where inputs can consist of arbitrary signed values (e.g. all positives, all negatives, or a mixture of positive and negative values). We question if the failure is due to the input samples in a batch having different signs from each other, or if the problem is due to the fact data samples can be close to 0 (leading to singularity issues). To investigate ",
685
+ "bbox": [
686
+ 174,
687
+ 856,
688
+ 823,
689
+ 911
690
+ ],
691
+ "page_idx": 5
692
+ },
693
+ {
694
+ "type": "image",
695
+ "img_path": "images/b9350e8bef44837579e91416f79f6fdfd40143301410c9eff9832f00ec8d6449.jpg",
696
+ "image_caption": [
697
+ "Figure 4: Extrapolation results on training the Real NPU using mixed-sign datasets that control the sign of the input elements. The ranges are in order of the datasets (i.e. dataset 1 to 5). "
698
+ ],
699
+ "image_footnote": [],
700
+ "bbox": [
701
+ 179,
702
+ 92,
703
+ 813,
704
+ 285
705
+ ],
706
+ "page_idx": 6
707
+ },
708
+ {
709
+ "type": "image",
710
+ "img_path": "images/6312b0065a51e06c3c53208f54c12008995bfff4f03be60f13a1ba729eb3b569.jpg",
711
+ "image_caption": [
712
+ "Figure 5: Effect of the singularity issue on the Real NPU, NRU and NMRU over increasing input ranges. Left: Reciprocal for an input size of 1 (no redundancy). Middle: Reciprocal for an input size of 2 (with redundancy). Right: Division for an input size of 2 (no redundancy). "
713
+ ],
714
+ "image_footnote": [],
715
+ "bbox": [
716
+ 176,
717
+ 348,
718
+ 820,
719
+ 544
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "212 this, we create additional mixed-sign datasets, controlling the range for each element in the input. The \n213 interpolation and extrapolation ranges for the different datasets can be found in Appendix C. Datasets \n214 1, 2, 4 and 5 sample a positive value for one input element and a negative value for the other element. \n215 Dataset 3 samples the signs randomly. Datasets 2 and 5 avoid sampling close to 0 values to mitigate \n216 the singularity issue. As shown by Figure 4, the Real NPU struggles on all these ranges, implying that \n217 the core issue is not from different input samples having different signs or due to the input samples \n218 being able to contain small values close to 0. The underlying issue is therefore most likely correlated \n219 to the each element in an input having different signs. When the denominator of the output is positive \n220 (dataset 1 or 2), the solution is found faster than when the denominator is a negative value (dataset 4 \n221 or 5). When the signs for an input element are controlled, discretisation/sparsity is no problem, in \n222 contrast when the signs are arbitrary the sparsity error are slightly (though not significantly) higher. ",
726
+ "bbox": [
727
+ 138,
728
+ 630,
729
+ 825,
730
+ 784
731
+ ],
732
+ "page_idx": 6
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "6.2 Division by Small Numbers ",
737
+ "text_level": 1,
738
+ "bbox": [
739
+ 169,
740
+ 801,
741
+ 401,
742
+ 816
743
+ ],
744
+ "page_idx": 6
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "Division by zero remains a challenge to model due to the inability to provide an computational value for the output and gradient. Furthermore, the discontinuous nature at zero causes its neighbouring values to have large gradients. To understand the extent of this issue when learning, we explore learning to divide by values close to zero using three tasks with increasing difficulty: 1) learning to take the reciprocal of a single input, 2) taking the reciprocal of the first input given two inputs, and 3) diving the first input by the second given two inputs. Figure 5 plots the test error for different modules assuming the module weights are set to the ‘gold’ solution for the three tasks. As the range values become closer to zero, the test error thresholds become increasingly large. Therefore, even with the correct weights, relying on the test errors alone as an indicator become increasingly deceptive with values close to zero. The Real NPU has larger test errors for all tasks and ranges, caused by adding $\\epsilon$ to the input (see Equation 3). Setting $\\epsilon = 0$ reduces the test error at the cost of the ability to deal with zero-valued inputs. Appendix F provides the corresponding experimental results for these tasks. ",
749
+ "bbox": [
750
+ 173,
751
+ 828,
752
+ 823,
753
+ 911
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "image",
759
+ "img_path": "images/dfa2cb434d655e5a99b3201cf2cf435ea7eb20cf9286d0ad7432d695f9166a17.jpg",
760
+ "image_caption": [
761
+ "Figure 6: Division with redundancy (input size 10). "
762
+ ],
763
+ "image_footnote": [],
764
+ "bbox": [
765
+ 179,
766
+ 92,
767
+ 813,
768
+ 286
769
+ ],
770
+ "page_idx": 7
771
+ },
772
+ {
773
+ "type": "text",
774
+ "text": "",
775
+ "bbox": [
776
+ 158,
777
+ 340,
778
+ 825,
779
+ 424
780
+ ],
781
+ "page_idx": 7
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "6.3 With Redundancy ",
786
+ "text_level": 1,
787
+ "bbox": [
788
+ 173,
789
+ 439,
790
+ 338,
791
+ 454
792
+ ],
793
+ "page_idx": 7
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "Introducing redundancy (Figure 6) causes failure modes to arise. Failures on range U[-2,2) become more prevalent. The baseline Real NPU produces high sparsity errors relative to the other modules suggesting struggle with discretisation. Using the modified Real NPU improves over all ranges of the baseline (which were not already at full success) in terms of success, speed and sparsity.2 To ensure that complex weights do not fix the issue, we test the NPU module with all the modifications used on the real weight matrix (see Appendix G). Complex weights hinders success and convergence speeds of negative ranges. Assuming the global solution only uses the real weights, we enforce the complex weights to be clipped between [-1,1] and to go to 0 during the regularisation stage using a L1 penalty. This did not result in any significant improvements against the Real NPU results. Input redundancy effects the NRU the most, resulting in full failures on all the negative ranges. The NMRU is the only module with success for the range $\\mathcal { U } [ - 2 , 2 )$ , which is a result of using the sign mechanism (see Appendix H). It performs well over all ranges though can be outperformed by the modified Real NPU for negative ranges. Multiple ranges for the NMRU are solved around 50,000 iterations correlating to the sparsity regularisation being turned on. ",
798
+ "bbox": [
799
+ 173,
800
+ 465,
801
+ 825,
802
+ 659
803
+ ],
804
+ "page_idx": 7
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "6.3.1 Gradient Difficulties with the NRU ",
809
+ "text_level": 1,
810
+ "bbox": [
811
+ 161,
812
+ 672,
813
+ 465,
814
+ 688
815
+ ],
816
+ "page_idx": 7
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "252 The partial derivative for the NRU weights, Equation 6, can give insight to the struggles of the NRU. ",
821
+ "bbox": [
822
+ 147,
823
+ 696,
824
+ 820,
825
+ 712
826
+ ],
827
+ "page_idx": 7
828
+ },
829
+ {
830
+ "type": "equation",
831
+ "img_path": "images/a6c8d7930ac31081d400a44c9b43e504f9accfb521226da2b3fb2d76b7382b9e.jpg",
832
+ "text": "$$\n\\begin{array} { r l r } & { } & { \\displaystyle \\frac { \\partial \\hat { \\bf y } } { \\partial w _ { i } } = \\mathrm { t a n h } ( 1 0 0 0 w _ { i } ) ( \\mathrm { s i g n } ( x _ { i } ) | x _ { i } | ( \\mathrm { t a n h } ( 1 0 0 0 w _ { i } ) \\log ( | x | ) + } \\\\ & { } & { \\displaystyle 2 0 0 0 \\mathrm { s e c h } ( 1 0 0 0 w _ { i } ) ^ { 2 } ) - 2 0 0 0 \\mathrm { s e c h } ( 1 0 0 0 w _ { i } ) ^ { 2 } ) \\times \\mathrm { N R U } _ { \\tilde { \\bf x } \\in { \\bf x } \\backslash \\{ { \\bf x } _ { i } \\} } ( \\tilde { \\bf x } ) . } \\end{array}\n$$",
833
+ "text_format": "latex",
834
+ "bbox": [
835
+ 276,
836
+ 714,
837
+ 722,
838
+ 768
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "$\\_$ applies the NRU to all inputs excluding $x _ { i }$ influencing the gradient values between subsequent update steps. Factoring out this term, the following observations are made. If $x _ { i } \\approx 0$ and $w _ { i } \\approx 0$ then gradients become increasingly large. If $x _ { i } \\approx 0$ and $- 1 \\leq w _ { i } < 0$ then as $w _ { i } \\to - 1$ all gradients for $x _ { i }$ where $| x _ { i } | > > 1$ become increasingly small. The gradients for $x _ { i } = - 1$ and $x _ { i } = 1$ are 0 regardless the value of $w _ { i }$ . If $w _ { i } = 0$ then the gradient is 0 for all $x _ { i }$ , a result of using the tanh approximation. Even if the sign and magnitude are calculated separately and then combined (see Appendix I) to try to control the gradient better, the problem remains. Therefore, we conclude that extending the NMU to divide using a weight of -1 is a poor choice when there are redundant inputs. ",
845
+ "bbox": [
846
+ 173,
847
+ 776,
848
+ 825,
849
+ 888
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "image",
855
+ "img_path": "images/66ed3f0eee25ac2b1a0c761d4b2eb34b0ef8ac43e9bb7e26723d0bf2229b6cdb.jpg",
856
+ "image_caption": [
857
+ "Figure 7: Root Mean Squared loss curvature for the NAU stacked with either a RealNPU, NRU, or NMRU. \"The weight matrices are constrained to $\\mathbf { W } _ { 1 } = \\left[ \\begin{array} { l l l } { w _ { 1 } \\ w _ { 1 } } & { 0 } & { 0 } \\\\ { w _ { 1 } \\ w _ { 1 } \\ w _ { 1 } \\ w _ { 1 } } & { w _ { 1 } } \\end{array} \\right]$ , $\\mathbf { W } _ { 2 } = \\left[ w _ { 2 } \\ w _ { 2 } \\right]$ . The problem is $( x _ { 1 } + x _ { 2 } ) \\cdot ( x _ { 1 } + x _ { 2 } + x _ { 3 } + x _ { 4 } )$ for $x = ( 1 , 1 . 2 , 1 . 8 , 2 ) \"$ [Madsen and Johansen, 2020]. The ideal solution is $w _ { 1 } = w _ { 2 } = 1$ , though other valid solutions do exist e.g., $w _ { 1 } = - 1 , w _ { 2 } = 1$ . (The NMRU’s weight matrix would be $\\bar { \\bf W _ { 2 } } = [ w _ { 2 } \\ w _ { 2 } \\ 0 \\ 0 ]$ , and the Real NPU’s $\\mathbf { g } = \\left[ 1 \\mathbf { \\Omega } ^ { 1 } \\right]$ . ) "
858
+ ],
859
+ "image_footnote": [],
860
+ "bbox": [
861
+ 202,
862
+ 103,
863
+ 812,
864
+ 243
865
+ ],
866
+ "page_idx": 8
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "261 6.3.2 The Real NPU’s and NMRU’s Exploitation of Multiplicative Rules ",
871
+ "text_level": 1,
872
+ "bbox": [
873
+ 151,
874
+ 352,
875
+ 684,
876
+ 367
877
+ ],
878
+ "page_idx": 8
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "The NMRU solutions exploit the inverse rule of division in that 1 = 1. Since the input also contains the reciprocals, numerous extrapolative solutions exist. However this comes at the cost of finding a ‘simple’ solution which contains ones only for relevant inputs. The Real NPU exploits the rules $a _ { i } \\cdot 0 = 0$ and $1 ^ { a _ { i } } = 1$ enabling non-zero weight values if the corresponding gate value is 0. However, we can avoid this by allowing 0 to also not be penalised during sparsity regularisation stage (see Appendix G). We find this alleviates the exploitation issue with no cost to performance. ",
883
+ "bbox": [
884
+ 171,
885
+ 376,
886
+ 825,
887
+ 462
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "268 7 Discussion ",
894
+ "text_level": 1,
895
+ "bbox": [
896
+ 142,
897
+ 483,
898
+ 294,
899
+ 501
900
+ ],
901
+ "page_idx": 8
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "269 In this paper, we demonstrate the limitations of intepretable neural networks in learning to divide. \n270 Using the no redundancy setting (size 2), we find that the Real NPU is challenged when training data \n271 consists of mixed-signed inputs even with our applied improvements. Increasing the difficulty to \n272 have an input redundancy (with 8 redundant and 2 relevant input values) magnifies this issue, but \n273 also introduces failure modes for the NRU and NMRU for negative ranges. The NRU is unable to \n274 handle any negative ranges, in which we conclude it is not wise to use with MSE. Alternate losses \n275 can improve certain failure cases though sometimes at the cost of performance on other ranges. For \n276 further details see Appendix J which displays results on a correlation and scale-invariant based loss. \n277 Our NMRU is the only module with reasonable success over all tested ranges, requiring only $2 I \\times O$ \n278 learnable parameters. However, this comes at the cost of the simplicity of the solution due to its \n279 exploitation of the identity rule; an issue the Real NPU does not have. ",
906
+ "bbox": [
907
+ 143,
908
+ 517,
909
+ 825,
910
+ 628
911
+ ],
912
+ "page_idx": 8
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "",
917
+ "bbox": [
918
+ 142,
919
+ 633,
920
+ 825,
921
+ 676
922
+ ],
923
+ "page_idx": 8
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Once robust modules are attainable in a single layer setting, the next step would be to question performance when learning stacked modules, e.g. learning a stacked additive and multiplicative module. Previously, Madsen and Johansen [2020, Figure 2] illustrates the troubles for multiplicative models with the capacity for division. They show how a stacked summative-multiplicative module can lead to an exploding loss when the output of the summative module is close to 0 and the multiplicative model tries to divide. In Figure 7, we recreate their setup to produce the loss surfaces for the NAUReal $\\mathrm { N P U } ^ { 3 }$ , NAU-NRU and NAU-NMRU respectively. 4 We find a similar issue with the Real-NPU and NRU, as both these units use a weight range of [-1,1]. In contrast, the NMRU, whose weight’s range is limited to [0,1] does not have exploding losses. ",
928
+ "bbox": [
929
+ 173,
930
+ 683,
931
+ 825,
932
+ 808
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "In conclusion, division remains a challenge to learn using intepretable neural networks, even for the simplest tasks. Nevertheless, by identifying the specific areas causing difficulty (e.g., training ranges), and useful architecture properties (e.g., using a sign retrieval mechanism), we hope the community has better intuition for dealing with division and develop more robust modules to learn division. ",
939
+ "bbox": [
940
+ 174,
941
+ 813,
942
+ 825,
943
+ 868
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "References ",
950
+ "text_level": 1,
951
+ "bbox": [
952
+ 169,
953
+ 90,
954
+ 266,
955
+ 106
956
+ ],
957
+ "page_idx": 9
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "Girish Chandrashekar and Ferat Sahin. A survey on feature selection methods. Computers & Electrical Engineering, 40(1):16–28, 2014. ISSN 0045-7906. doi: https://doi.org/10.1016/j.comp eleceng.2013.11.024. URL https://www.sciencedirect.com/science/article/pii/S0 045790613003066. 40th-year commemorative issue. \nLukas Faber and Roger Wattenhofer. Neural status registers. CoRR, abs/2004.07085, 2020. URL https://arxiv.org/abs/2004.07085. \nXavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256. JMLR Workshop and Conference Proceedings, 2010. URL http: //proceedings.mlr.press/v9/glorot10a/glorot10a.pdf. \nNiklas Heim, Tomáš Pevny, and Václav Šmídl. Neural power units. \\` Advances in Neural Information Processing Systems, 33, 2020. URL https://papers.nips.cc/paper/2020/file/48e5900 0d7dfcf6c1d96ce4a603ed738-Paper.pdf. \nDiederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2015. URL https://arxiv.org/pdf/1412.6980.pdf. \nAndreas Madsen and Alexander Rosenberg Johansen. Measuring arithmetic extrapolation performance. In Science meets Engineering of Deep Learning at 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), volume abs/1910.01888, Vancouver, Canada, October 2019. URL https://arxiv.org/pdf/1910.01888.pdf. \nAndreas Madsen and Alexander Rosenberg Johansen. Neural arithmetic units. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id= H1gNOeHKPS. \nBhumika Mistry, Katayoun Farrahi, and Jonathon Hare. A primer for neural arithmetic logic modules, 2021. URL https://arxiv.org/pdf/2101.09530.pdf. \nSubham Sahoo, Christoph Lampert, and Georg Martius. Learning equations for extrapolation and control. In International Conference on Machine Learning, pages 4442–4450. PMLR, 2018. \nDaniel Schlör, Markus Ring, and Andreas Hotho. inalu: Improved neural arithmetic logic unit. Frontiers in Artificial Intelligence, 3:71, 2020. ISSN 2624-8212. doi: 10.3389/frai.2020.00071. URL https://www.frontiersin.org/article/10.3389/frai.2020.00071. \nAndrew Trask, Felix Hill, Scott E Reed, Jack Rae, Chris Dyer, and Phil Blunsom. Neural arithmetic logic units. In Advances in Neural Information Processing Systems, pages 8035–8044, 2018. URL https://openreview.net/pdf?id=H1gNOeHKPS. \nSilviu-Marian Udrescu and Max Tegmark. Ai feynman: A physics-inspired method for symbolic regression. Science Advances, 6(16), 2020. doi: 10.1126/sciadv.aay2631. URL https: //advances.sciencemag.org/content/6/16/eaay2631. ",
962
+ "bbox": [
963
+ 158,
964
+ 111,
965
+ 826,
966
+ 695
967
+ ],
968
+ "page_idx": 9
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "Checklist ",
973
+ "text_level": 1,
974
+ "bbox": [
975
+ 173,
976
+ 713,
977
+ 254,
978
+ 728
979
+ ],
980
+ "page_idx": 9
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "1. For all authors... ",
985
+ "bbox": [
986
+ 214,
987
+ 738,
988
+ 339,
989
+ 752
990
+ ],
991
+ "page_idx": 9
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See contributions in the introduction. For Real NPU improvements see Section 5. For two novel modules see Section 3.2 and 3.3 and results in Section 6. For hindrances in learning division, see Section 6. \n(b) Did you describe the limitations of your work? [Yes] See Section 7. \n(c) Did you discuss any potential negative societal impacts of your work? [Yes] This paper focuses on the ML techniques and the foundational research required to learn division in a systematic manner. Once robust modules for the arithmetic operations (i.e. NALMs) are achievable the community will possess trainable modules with significant advantages regarding model transparency and generalisability. That being said, we discuss how this leads to a negative societal impact in the end of Section 1. ",
996
+ "bbox": [
997
+ 236,
998
+ 756,
999
+ 825,
1000
+ 911
1001
+ ],
1002
+ "page_idx": 9
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We have read the guidelines and our work does not use human-derived data. ",
1007
+ "bbox": [
1008
+ 236,
1009
+ 90,
1010
+ 825,
1011
+ 132
1012
+ ],
1013
+ "page_idx": 10
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "2. If you are including theoretical results... ",
1018
+ "bbox": [
1019
+ 215,
1020
+ 138,
1021
+ 493,
1022
+ 152
1023
+ ],
1024
+ "page_idx": 10
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
1029
+ "bbox": [
1030
+ 236,
1031
+ 156,
1032
+ 738,
1033
+ 188
1034
+ ],
1035
+ "page_idx": 10
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "3. If you ran experiments... ",
1040
+ "bbox": [
1041
+ 214,
1042
+ 193,
1043
+ 393,
1044
+ 207
1045
+ ],
1046
+ "page_idx": 10
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See link provided to the code base. Data is generated in real time and the code to generate it is available in the linked repository. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4 and Appendix C. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See plots and experiment details in Section 4 for further details. \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 Appendix D. ",
1051
+ "bbox": [
1052
+ 238,
1053
+ 210,
1054
+ 825,
1055
+ 369
1056
+ ],
1057
+ "page_idx": 10
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1062
+ "bbox": [
1063
+ 215,
1064
+ 375,
1065
+ 823,
1066
+ 390
1067
+ ],
1068
+ "page_idx": 10
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] See footnote link provided to the code base and Section 4. \n(b) Did you mention the license of the assets? [Yes] We state the MIT licence when giving the link to the codebase. \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] All code for model, data and experiments are available through the link to the codebase. \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] All data is synthetic, containing no such information. ",
1073
+ "bbox": [
1074
+ 238,
1075
+ 393,
1076
+ 825,
1077
+ 555
1078
+ ],
1079
+ "page_idx": 10
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1084
+ "bbox": [
1085
+ 215,
1086
+ 560,
1087
+ 705,
1088
+ 575
1089
+ ],
1090
+ "page_idx": 10
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "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] ",
1095
+ "bbox": [
1096
+ 238,
1097
+ 579,
1098
+ 825,
1099
+ 667
1100
+ ],
1101
+ "page_idx": 10
1102
+ }
1103
+ ]
parse/train/3WbWmdTd8fN/3WbWmdTd8fN_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/3WbWmdTd8fN/3WbWmdTd8fN_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B14TlG-RW/B14TlG-RW.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # QANET: COMBINING LOCAL CONVOLUTION WITH GLOBAL SELF-ATTENTION FOR READING COMPREHENSION
2
+
3
+ Adams Wei $\mathbf { Y u } ^ { 1 }$ ∗, David Dohan2†, Minh-Thang Luong2† {weiyu}@cs.cmu.edu, {ddohan,thangluong}@google.com 1Carnegie Mellon University, 2Google Brain
4
+
5
+ Rui Zhao, Kai Chen, Mohammad Norouzi, Quoc V. Le Google Brain
6
+
7
+ # ABSTRACT
8
+
9
+ Current end-to-end machine reading and question answering (Q&A) models are primarily based on recurrent neural networks (RNNs) with attention. Despite their success, these models are often slow for both training and inference due to the sequential nature of RNNs. We propose a new Q&A architecture called QANet, which does not require recurrent networks: Its encoder consists exclusively of convolution and self-attention, where convolution models local interactions and self-attention models global interactions. On the SQuAD dataset, our model is 3x to $1 3 \mathrm { x }$ faster in training and $4 \mathbf { x }$ to $9 \mathbf { x }$ faster in inference, while achieving equivalent accuracy to recurrent models. The speed-up gain allows us to train the model with much more data. We hence combine our model with data generated by backtranslation from a neural machine translation model. On the SQuAD dataset, our single model, trained with augmented data, achieves 84.6 F1 score1 on the test set, which is significantly better than the best published F1 score of 81.8.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ There is growing interest in the tasks of machine reading comprehension and automated question answering. Over the past few years, significant progress has been made with end-to-end models showing promising results on many challenging datasets. The most successful models generally employ two key ingredients: (1) a recurrent model to process sequential inputs, and (2) an attention component to cope with long term interactions. A successful combination of these two ingredients is the Bidirectional Attention Flow (BiDAF) model by Seo et al. (2016), which achieve strong results on the SQuAD dataset (Rajpurkar et al., 2016). A weakness of these models is that they are often slow for both training and inference due to their recurrent nature, especially for long texts. The expensive training not only leads to high turnaround time for experimentation and limits researchers from rapid iteration but also prevents the models from being used for larger dataset. Meanwhile the slow inference prevents the machine comprehension systems from being deployed in real-time applications.
14
+
15
+ In this paper, aiming to make the machine comprehension fast, we propose to remove the recurrent nature of these models. We instead exclusively use convolutions and self-attentions as the building blocks of encoders that separately encodes the query and context. Then we learn the interactions between context and question by standard attentions (Xiong et al., 2016; Seo et al., 2016; Bahdanau et al., 2015). The resulting representation is encoded again with our recurrency-free encoder before finally decoding to the probability of each position being the start or end of the answer span. We call this architecture QANet, which is shown in Figure 1.
16
+
17
+ The key motivation behind the design of our model is the following: convolution captures the local structure of the text, while the self-attention learns the global interaction between each pair of words. The additional context-query attention is a standard module to construct the query-aware context vector for each position in the context paragraph, which is used in the subsequent modeling layers. The feed-forward nature of our architecture speeds up the model significantly. In our experiments on the SQuAD dataset, our model is $3 \mathbf { x }$ to $1 3 \mathrm { x }$ faster in training and 4x to $9 \mathbf { x }$ faster in inference. As a simple comparison, our model can achieve the same accuracy (77.0 F1 score) as BiDAF model (Seo et al., 2016) within 3 hours training that otherwise should have taken 15 hours. The speed-up gain also allows us to train the model with more iterations to achieve better results than competitive models. For instance, if we allow our model to train for 18 hours, it achieves an F1 score of 82.7 on the dev set, which is much better than (Seo et al., 2016), and is on par with best published results.
18
+
19
+ As our model is fast, we can train it with much more data than other models. To further improve the model, we propose a complementary data augmentation technique to enhance the training data. This technique paraphrases the examples by translating the original sentences from English to another language and then back to English, which not only enhances the number of training instances but also diversifies the phrasing.
20
+
21
+ On the SQuAD dataset, QANet trained with the augmented data achieves 84.6 F1 score on the test set, which is significantly better than the best published result of 81.8 by Hu et al. (2017).2 We also conduct ablation test to justify the usefulness of each component of our model. In summary, the contribution of this paper are as follows:
22
+
23
+ • We propose an efficient reading comprehension model that exclusively built upon convolutions and self-attentions. To the best of our knowledge, we are the first to do so. This combination maintains good accuracy, while achieving up to $1 3 \mathrm { x }$ speedup in training and $9 \mathbf { x }$ per training iteration, compared to the RNN counterparts. The speedup gain makes our model the most promising candidate for scaling up to larger datasets. • To improve our result on SQuAD, we propose a novel data augmentation technique to enrich the training data by paraphrasing. It allows the model to achieve higher accuracy that is better than the state-of-the-art.
24
+
25
+ # 2 THE MODEL
26
+
27
+ In this section, we first formulate the reading comprehension problem and then describe the proposed model QANet: it is a feedforward model that consists of only convolutions and self-attention, a combination that is empirically effective, and is also a novel contribution of our work.
28
+
29
+ # 2.1 PROBLEM FORMULATION
30
+
31
+ The reading comprehension task considered in this paper, is defined as follows. Given a context paragraph with $n$ words $C = \{ c _ { 1 } , c _ { 2 } , . . . , c _ { n } \}$ and the query sentence with $m$ words $Q = \{ q _ { 1 } , q _ { 2 } , . . . , \bar { q } _ { m } \}$ , output a span $S = \{ c _ { i } , c _ { i + 1 } , . . . , c _ { i + j } \}$ from the original paragraph $C$ . In the following, we will use $x$ to denote both the original word and its embedded vector, for any $x \in C , Q$ .
32
+
33
+ # 2.2 MODEL OVERVIEW
34
+
35
+ The high level structure of our model is similar to most existing models that contain five major components: an embedding layer, an embedding encoder layer, a context-query attention layer, a model encoder layer and an output layer, as shown in Figure 1. These are the standard building blocks for most, if not all, existing reading comprehension models. However, the major differences between our approach and other methods are as follow: For both the embedding and modeling encoders, we only use convolutional and self-attention mechanism, discarding RNNs, which are used by most of the existing reading comprehension models. As a result, our model is much faster, as it can process the input tokens in parallel. Note that even though self-attention has already been used extensively in Vaswani et al. (2017a), the combination of convolutions and self-attention is novel, and is significantly better than self-attention alone and gives 2.7 F1 gain in our experiments. The use of convolutions also allows us to take advantage of common regularization methods in ConvNets such as stochastic depth (layer dropout) (Huang et al., 2016), which gives an additional gain of $0 . 2 \mathrm { F } 1$ in our experiments.
36
+
37
+ ![](images/9f4efb3d6b6401bb890a7c0b5541dd68786a9cf6fd26b697fd8e7e069e03eefa.jpg)
38
+ Figure 1: An overview of the QANet architecture (left) which has several Encoder Blocks. We use the same Encoder Block (right) throughout the model, only varying the number of convolutional layers for each block. We use layernorm and residual connection between every layer in the Encoder Block. We also share weights of the context and question encoder, and of the three output encoders. A positional encoding is added to the input at the beginning of each encoder layer consisting of sin and cos functions at varying wavelengths, as defined in (Vaswani et al., 2017a). Each sub-layer after the positional encoding (one of convolution, self-attention, or feed-forward-net) inside the encoder structure is wrapped inside a residual block.
39
+
40
+ In detail, our model consists of the following five layers:
41
+
42
+ 1. Input Embedding Layer. We adopt the standard techniques to obtain the embedding of each word $w$ by concatenating its word embedding and character embedding. The word embedding is fixed during training and initialized from the $p _ { 1 } = 3 0 0$ dimensional pre-trained GloVe (Pennington et al., 2014) word vectors, which are fixed during training. All the out-of-vocabulary words are mapped to an ${ \mathrm { < U N K > } }$ token, whose embedding is trainable with random initialization. The character embedding is obtained as follows: Each character is represented as a trainable vector of dimension $p _ { 2 } = 2 0 0$ , meaning each word can be viewed as the concatenation of the embedding vectors for each of its characters. The length of each word is either truncated or padded to 16. We take maximum value of each row of this matrix to get a fixed-size vector representation of each word. Finally, the output of a given word $x$ from this layer is the concatenation $[ x _ { w } ; x _ { c } ] \in \mathbf { R } ^ { p _ { 1 } + p _ { 2 } }$ , where $x _ { w }$ and $x _ { c }$ are the word embedding and the convolution output of character embedding of $x$ respectively. Following Seo et al. (2016), we also adopt a two-layer highway network (Srivastava et al., 2015) on top of this representation. For simplicity, we also use $x$ to denote the output of this layer.
43
+
44
+ 2. Embedding Encoder Layer. The encoder layer is a stack of the following basic building block: [convolution-layer $\times \# +$ self-attention-layer $^ +$ feed-forward-layer], as illustrated in the upper right of Figure 1. We use depthwise separable convolutions (Chollet, 2016) (Kaiser et al., 2017) rather than traditional ones, as we observe that it is memory efficient and has better generalization. The kernel size is 7, the number of filters is $d = 1 2 8$ and the number of conv layers within a block is
45
+
46
+ 4. For the self-attention-layer, we adopt the multi-head attention mechanism defined in (Vaswani et al., 2017a) which, for each position in the input, called the query, computes a weighted sum of all positions, or keys, in the input based on the similarity between the query and key as measured by the dot product. The number of heads is 8 throughout all the layers. Each of these basic operations (conv/self-attention/ffn) is placed inside a residual block, shown lower-right in Figure 1. For an input $x$ and a given operation $f$ , the output is $f ( l a y e r n o r m ( x ) ) + x$ , meaning there is a full identity path from the input to output of each block, where layernorm indicates layer-normalization proposed in (Ba et al., 2016). The total number of encoder blocks is 1. Note that the input of this layer is a vector of dimension $p _ { 1 } + p _ { 2 } = 5 0 0$ for each individual word, which is immediately mapped to $d = 1 2 8$ by a one-dimensional convolution. The output of this layer is a also of dimension $d = 1 2 8$ .
47
+
48
+ 3. Context-Query Attention Layer. This module is standard in almost every previous reading comprehension models such as Weissenborn et al. (2017) and Chen et al. (2017). We use $C$ and $Q$ to denote the encoded context and query. The context-to-query attention is constructed as follows: We first computer the similarities between each pair of context and query words, rendering a similarity matrix $S \in \mathbf { R } ^ { n \times m }$ . We then normalize each row of $S$ by applying the softmax function, getting a matrix $\overline { S }$ . Then the context-to-query attention is computed as $\bar { A } = \mathbf { \bar { \boldsymbol { S } } } \cdot \boldsymbol { Q } ^ { T } \in \mathbf { R } ^ { n \times d }$ . The similarity function used here is the trilinear function (Seo et al., 2016):
49
+
50
+ $$
51
+ \begin{array} { r } { f ( q , c ) = W _ { 0 } [ q , c , q \odot c ] , } \end{array}
52
+ $$
53
+
54
+ where $\odot$ is the element-wise multiplication and $W _ { 0 }$ is a trainable variable.
55
+
56
+ Most high performing models additionally use some form of query-to-context attention, such as BiDaF (Seo et al., 2016) and DCN (Xiong et al., 2016). Empirically, we find that, the DCN attention can provide a little benefit over simply applying context-to-query attention, so we adopt this strategy. More concretely, we compute the column normalized matrix $\overline { { \overline { { S } } } }$ of $S$ by softmax function, and the query-to-context attention is B = S · S · C T .
57
+
58
+ 4. Model Encoder Layer. Similar to Seo et al. (2016), the input of this layer at each position is $\left[ c , a , c \odot a , c \odot b \right]$ , where $a$ and $b$ are respectively a row of attention matrix $A$ and $B$ . The layer parameters are the same as the Embedding Encoder Layer except that convolution layer number is 2 within a block and the total number of blocks are 7. We share weights between each of the 3 repetitions of the model encoder.
59
+
60
+ 5. Output layer. This layer is task-specific. Each example in SQuAD is labeled with a span in the context containing the answer. We adopt the strategy of Seo et al. (2016) to predict the probability of each position in the context being the start or end of an answer span. More specifically, the probabilities of the starting and ending position are modeled as
61
+
62
+ $$
63
+ p ^ { 1 } = s o f t m a x ( W _ { 1 } [ M _ { 0 } ; M _ { 1 } ] ) , ~ p ^ { 2 } = s o f t m a x ( W _ { 2 } [ M _ { 0 } ; M _ { 2 } ] ) ,
64
+ $$
65
+
66
+ where $W _ { 1 }$ and $W _ { 2 }$ are two trainable variables and $M _ { 0 } , M _ { 1 } , M _ { 2 }$ are respectively the outputs of the three model encoders, from bottom to top. The score of a span is the product of its start position and end position probabilities. Finally, the objective function is defined as the negative sum of the log probabilities of the predicted distributions indexed by true start and end indices, averaged over all the training examples:
67
+
68
+ $$
69
+ L ( \theta ) = - \frac { 1 } { N } \sum _ { i } ^ { N } \left[ \log ( p _ { y _ { i } ^ { 1 } } ^ { 1 } ) + \log ( p _ { y _ { i } ^ { 2 } } ^ { 2 } ) \right] ,
70
+ $$
71
+
72
+ where $y _ { i } ^ { 1 }$ and $y _ { i } ^ { 2 }$ are respectively the groundtruth starting and ending position of example $i$ , and $\theta$ contains all the trainable variables. The proposed model can be customized to other comprehension tasks, e.g. selecting from the candidate answers, by changing the output layers accordingly.
73
+
74
+ Inference. At inference time, the predicted span $( s , e )$ is chosen such that $p _ { s } ^ { 1 } p _ { e } ^ { 2 }$ is maximized and $s \leq e$ . Standard dynamic programming can obtain the result with linear time.
75
+
76
+ # 3 DATA AUGMENTATION BY BACKTRANSLATION
77
+
78
+ Since our model is fast, we can train it with much more data. We therefore combine our model with a simple data augmentation technique to enrich the training data. The idea is to use two translation models, one translation model from English to French (or any other language) and another translation model from French to English, to obtain paraphrases of texts. This approach helps automatically increase the amount of training data for broadly any language-based tasks including the reading comprehension task that we are interested in. With more data, we expect to better regularize our models. The augmentation process is illustrated in Figure 2 with French as a pivotal language.
79
+
80
+ In this work, we consider attention-based neural machine translation (NMT) models Bahdanau et al. (2015); Luong et al. (2015), which have demonstrated excellent translation quality Wu et al. (2016), as the core models of our data augmentation pipeline. Specifically, we utilize the publicly available codebase3 provided by Luong et al. (2017), which replicates the Google’s NMT (GNMT) systems Wu et al. (2016). We train 4-layer GNMT models on the public WMT data for both English-French4 (36M sentence pairs) and English-German5 (4.5M sentence pairs). All data have been tokenized and split into subword units as described in Luong et al. (2017). All models share the same hyperparameters6 and are trained with different numbers of steps, 2M for English-French and 340K for English-German. Our English-French systems achieve 36.7 BLEU on newstest2014 for translating into French and 35.9 BLEU for the reverse direction. For English-German and on newstest2014, we obtain 27.6 BLEU for translating into German and 29.9 BLEU for the reverse direction.
81
+
82
+ ![](images/28706f1cf855b1712c3db553cd3b78da8b285291fe96d2dc7bd8d8823aade21c.jpg)
83
+ Figure 2: An illustration of the data augmentation process with French as a pivotal language. $\mathbf { k }$ is the beam width, which is the number of translations generated by the NMT system.
84
+
85
+ Our paraphrase process works as follows, supposedly with French as a pivotal language. First, we feed an input sequence into the beam decoder of an English-to-French model to obtain $k$ French translations. Each of the French translation is then passed through the beam decoder of a reversed translation model to obtain a total of $k ^ { 2 }$ paraphrases of the input sequence.
86
+
87
+ Relation to existing Works. While the concept of backtranslation has been introduced before, it is often used to improve either the same translation task Sennrich et al. (2016) or instrinsic paraphrase evaluations Wieting et al. (2017); Mallinson et al. (2017). Our approach is a novel application of backtranslation to enrich training data for down-stream tasks, in this case, the question answering (QA) task. It is worth to note that (Dong et al., 2017) use paraphrasing techniques to improve QA; however, they only paraphrase questions and did not focus on the data augmentation aspect as we do in this paper.
88
+
89
+ Handling SQuAD Documents and Answers. We now discuss our specific procedure for the SQuAD dataset, which is essential for best performance gains. Remember that, each training example of SQuAD is a triple of $( d , q , a )$ in which document $d$ is a multi-sentence paragraph that has the answer $a$ . When paraphrasing, we keep the question $q$ unchanged (to avoid accidentally changing its meaning) and generate new triples of $\bar { ( d ^ { \prime } , q , a ^ { \prime } ) }$ such that the new document $d ^ { \prime }$ has the new answer $a ^ { \prime }$ in it. The procedure happens in two steps: (i) document paraphrasing – paraphrase $d$ into $d ^ { \prime }$ and (b) answer extraction – extract $a ^ { \prime }$ from $d ^ { \prime }$ that closely matches $a$ .
90
+
91
+ For the document paraphrasing step, we first split paragraphs into sentences and paraphrase them independently. We use $k = 5$ , so each sentence has 25 paraphrase choices. A new document $d ^ { \prime }$ is formed by simply replacing each sentence in $d$ with a randomly-selected paraphrase. An obvious issue with this na¨ıve approach is that the original answer $a$ might no longer be present in $d ^ { \prime }$ .
92
+
93
+ The answer extraction addresses the aforementioned issue. Let $s$ be the original sentence that contains the original answer $a$ and $s ^ { \prime }$ be its paraphrase. We identify the newly-paraphrased answer with simple heuristics as follows. Character-level 2-gram scores are computed between each word in $s ^ { \prime }$ and the start / end words of $a$ to find start and end positions of possible answers in $s ^ { \prime }$ . Among all candidate paraphrased answer, the one with the highest character 2-gram score with respect to $a$ is selected as the new answer $a ^ { \prime }$ . Table 1 shows an example of the new answer found by this process.7
94
+
95
+ Table 1: Comparison between answers in original sentence and paraphrased sentence.
96
+
97
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Sentence that contains an answer</td><td rowspan=1 colspan=1>Answer</td></tr><tr><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>All of the departments in the College of Science offer PhDprograms,except for the Department of Pre-ProfessionalStudies.</td><td rowspan=1 colspan=1>Department of Pre-Professional Studies</td></tr><tr><td rowspan=1 colspan=1>Paraphrase</td><td rowspan=1 colspan=1>All departments in the College of Science offer PHD pro- grams with the exception of the Department of PreparatoryStudies.</td><td rowspan=1 colspan=1>Department of PreparatoryStudies</td></tr></table>
98
+
99
+ The quality and diversity of paraphrases are essential to the data augmentation method. It is still possible to improve the quality and diversity of this method. The quality can be improved by using better translation models. For example, we find paraphrases significantly longer than our models’ maximum training sequence length tend to be cut off in the middle. The diversity can be improved by both sampling during the beam search decoding and paraphrasing questions and answers in the dataset as well. In addition, we can combine this method with other data augmentation methods, such as, the type swap method (Raiman & Miller, 2017), to acquire more diversity in paraphrases.
100
+
101
+ In our experiments, we observe that the proposed data augmentation can bring non-trivial improvement in terms of accuracy. We believe this technique is also applicable to other supervised natural language processing tasks, especially when the training data is insufficient.
102
+
103
+ # 4 EXPERIMENTS
104
+
105
+ In this section, we conduct experiments to study the performance of our model and the data augmentation technique. We will primarily benchmark our model on the SQuAD dataset (Rajpurkar et al., 2016), considered to be one of the most competitive datasets in Q&A. We also conduct similar studies on TriviaQA (Joshi et al., 2017), another Q&A dataset, to show that the effectiveness and efficiency of our model are general.
106
+
107
+ # 4.1 EXPERIMENTS ON SQUAD
108
+
109
+ # 4.1.1 DATASET AND EXPERIMENTAL SETTINGS
110
+
111
+ Dataset. We consider the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016) for machine reading comprehension.8 SQuAD contains 107.7K query-answer pairs, with $8 7 . 5 \mathrm { K }$ for training, 10.1K for validation, and another 10.1K for testing. The typical length of the paragraphs is around 250 while the question is of 10 tokens although there are exceptionally long cases. Only the training and validation data are publicly available, while the test data is hidden that one has to submit the code to a Codalab and work with the authors of (Rajpurkar et al., 2016) to retrieve the final test score. In our experiments, we report the test set result of our best single model.9 For further analysis, we only report the performance on the validation set, as we do not want to probe the unseen test set by frequent submissions. According to the observations from our experiments and previous works, such as (Seo et al., 2016; Xiong et al., 2016; Wang et al., 2017; Chen et al., 2017), the validation score is well correlated with the test score.
112
+
113
+ Data Preprocessing. We use the NLTK tokenizer to preprocess the data.10 The maximum context length is set to 400 and any paragraph longer than that would be discarded. During training, we batch the examples by length and dynamically pad the short sentences with special symbol ${ \mathrm { < P A D > } }$ . The maximum answer length is set to 30. We use the pretrained 300-D word vectors GLoVe (Pennington et al., 2014), and all the out-of-vocabulary words are replace with ${ \mathrm { < U N K > } }$ , whose embedding is updated during training. Each character embedding is randomly initialized as a 200-D vector, which is updated in training as well. We generate two additional augmented datasets obtained from Section 3, which contain 140K and $2 4 0 \mathrm { K }$ examples and are denoted as “data augmentation $\times 2 ^ { , , }$ and “data augmentation $\times 3 ^ { \mathfrak { r } }$ respectively, including the original data.
114
+
115
+ Training details. We employ two types of standard regularizations. First, we use L2 weight decay on all the trainable variables, with parameter $\lambda = 3 \times \bar { 1 0 } ^ { - 7 }$ . We additionally use dropout on word, character embeddings and between layers, where the word and character dropout rates are 0.1 and 0.05 respectively, and the dropout rate between every two layers is 0.1. We also adopt the stochastic depth method (layer dropout) (Huang et al., 2016) within each embedding or model encoder layer, where sublayer l has survival probability $\begin{array} { r } { p _ { l } = 1 - \frac { l } { L } ( 1 - p _ { L } ) } \end{array}$ where $L$ is the last layer and $p _ { L } = 0 . 9$ .
116
+
117
+ The hidden size and the convolution filter number are all 128, the batch size is 32, training steps are 150K for original data, 250K for “data augmentation $\times 2 ^ { , , }$ , and 340K for “data augmentation $\times 3 ^ { \mathfrak { s } }$ . The numbers of convolution layers in the embedding and modeling encoder are 4 and 2, kernel sizes are 7 and 5, and the block numbers for the encoders are 1 and 7, respectively.
118
+
119
+ We use the ADAM optimizer (Kingma & Ba, 2014) with $\beta _ { 1 } = 0 . 8 , \beta _ { 2 } = 0 . 9 9 9 , { \epsilon } = 1 0 ^ { - 7 }$ . We use a learning rate warm-up scheme with an inverse exponential increase from 0.0 to 0.001 in the first 1000 steps, and then maintain a constant learning rate for the remainder of training. Exponential moving average is applied on all trainable variables with a decay rate 0.9999.
120
+
121
+ Finally, we implement our model in Python using Tensorflow (Abadi et al., 2016) and carry out our experiments on an NVIDIA p100 GPU.11
122
+
123
+ # 4.1.2 RESULTS
124
+
125
+ Accuracy. The F1 and Exact Match (EM) are two evaluation metrics of accuracy for the model performance. F1 measures the portion of overlap tokens between the predicted answer and groundtruth, while exact match score is 1 if the prediction is exactly the same as groundtruth or 0 otherwise. We show the results in comparison with other methods in Table 2. To make a fair and thorough comparison, we both report both the published results in their latest papers/preprints and the updated but not documented results on the leaderboard. We deem the latter as the unpublished results. As can be seen from the table, the accuracy (EM/F1) performance of our model is on par with the state-of-the-art models. In particular, our model trained on the original dataset outperforms all the documented results in the literature, in terms of both EM and F1 scores (see second column of Table 2). When trained with the augmented data with proper sampling scheme, our model can get significant gain 1.5/1.1 on EM/F1. Finally, our result on the official test set is 76.2/84.6, which significantly outperforms the best documented result 73.2/81.8.
126
+
127
+ Speedup over RNNs. To measure the speedup of our model against the RNN models, we also test the corresponding model architecture with each encoder block replaced with a stack of bidirectional
128
+
129
+ Table 2: The performances of different models on SQuAD dataset.
130
+
131
+ <table><tr><td></td><td>Published12</td><td>LeaderBoard13</td></tr><tr><td>Single Model</td><td>EM/F1</td><td>EM/F1</td></tr><tr><td>LR Baseline (Rajpurkar et al., 2016)</td><td>40.4/51.0</td><td>40.4/51.0</td></tr><tr><td>Dynamic Chunk Reader (Yu et al., 2016)</td><td>62.5 /71.0</td><td>62.5 /71.0</td></tr><tr><td>Match-LSTM with Ans-Ptr(Wang &amp; Jiang,2016)</td><td>64.7 /73.7</td><td>64.7 /73.7</td></tr><tr><td>Multi-Perspective Matching (Wang et al., 2016)</td><td>65.5 /75.1</td><td>70.4/78.8</td></tr><tr><td>Dynamic Coattention Networks (Xiong et al., 2016)</td><td>66.2 /75.9</td><td>66.2/75.9</td></tr><tr><td>FastQA(Weissenborn et al.,2017)</td><td>68.4/ 77.1</td><td>68.4/ 77.1</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>68.0 /77.3</td><td>68.0 /77.3</td></tr><tr><td>SEDT (Liu et al.,2017a)</td><td>68.1 / 77.5</td><td>68.5/78.0</td></tr><tr><td>RaSoR (Lee et al.,2016)</td><td>70.8/78.7</td><td>69.6/77.7</td></tr><tr><td>FastQAExt (Weissenborn et al.,2017)</td><td>70.8 / 78.9</td><td>70.8/78.9</td></tr><tr><td>ReasoNet (Shen et al.,2017b)</td><td>69.1/78.9</td><td>70.6/79.4</td></tr><tr><td>Document Reader (Chen et al., 2017)</td><td>70.0 /79.0</td><td>70.7 /79.4</td></tr><tr><td>Ruminating Reader (Gong &amp; Bowman, 2017)</td><td>70.6 / 79.5</td><td>70.6 / 79.5</td></tr><tr><td>jNet (Zhang et al., 2017)</td><td>70.6 /79.8</td><td>70.6 /79.8</td></tr><tr><td>Conductor-net</td><td>N/A</td><td>72.6 /81.4</td></tr><tr><td>Interactive AoA Reader (Cui etal.,2017)</td><td>N/A</td><td>73.6 /81.9</td></tr><tr><td>Reg-RaSoR</td><td>N/A</td><td>75.8 /83.3</td></tr><tr><td>DCN+</td><td>N/A</td><td>74.9 /82.8</td></tr><tr><td>AIR-FusionNet</td><td>N/A</td><td>76.0 /83.9</td></tr><tr><td>R-Net (Wang et al., 2017)</td><td>72.3 / 80.7</td><td>76.5 /84.3</td></tr><tr><td>BiDAF+ Self Attention+ELMo</td><td>N/A</td><td>77.9/85.3</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2017)</td><td>73.2 /81.8</td><td>73.2 /81.8</td></tr><tr><td>Dev set: QANet</td><td>73.6/82.7</td><td>N/A</td></tr><tr><td>Dev set: QANet + data augmentation ×2</td><td>74.5 /83.2</td><td>N/A</td></tr><tr><td>Dev set: QANet + data augmentation ×3</td><td>75.1/ 83.8</td><td>N/A</td></tr><tr><td>Test set: QANet + data augmentation ×3</td><td>76.2 / 84.6</td><td>76.2/84.6</td></tr></table>
132
+
133
+ LSTMs as is used in most existing models. Specifically, each (embedding and model) encoder block is replaced with a 1, 2, or 3 layer Bidirectional LSTMs respectively, as such layer numbers fall into the usual range of the reading comprehension models (Chen et al., 2017). All of these LSTMs have hidden size 128. The results of the speedup comparison are shown in Table 3. We can easily see that our model is significantly faster than all the RNN based models and the speedups range from 3 to 13 times in training and 4 to 9 times in inference.
134
+
135
+ Table 3: Speed comparison between our model and RNN-based models on SQuAD dataset, all with batch size 32. RNN- $x$ - $y$ indicates an RNN with $x$ layers each containing $y$ hidden units. Here, we use bidirectional LSTM as the RNN. The speed is measured by batches/second, so higher is faster.
136
+
137
+ <table><tr><td></td><td>QANet</td><td>RNN-1-128</td><td>Speedup</td><td>RNN-2-128</td><td>Speedup</td><td>RNN-3-128 Speedup</td></tr><tr><td>Training</td><td>3.2</td><td>1.1</td><td>2.9x</td><td>0.34</td><td>9.4x</td><td>0.24 13.3x</td></tr><tr><td>Inference</td><td>8.1</td><td>2.2</td><td>3.7x</td><td>1.3</td><td>6.2x</td><td>0.92 8.8x</td></tr></table>
138
+
139
+ Speedup over BiDAF model. In addition, we also use the same hardware (a NVIDIA p100 GPU) and compare the training time of getting the same performance between our model and the BiDAF model14(Seo et al., 2016), a classic RNN-based model on SQuAD. We mostly adopt the default settings in the original code to get its best performance, where the batch sizes for training and inference are both 60. The only part we changed is the optimizer, where Adam with learning 0.001 is used here, as with Adadelta we got a bit worse performance. The result is shown in Table 4 which shows that our model is 4.3 and 7.0 times faster than BiDAF in training and inference speed. Besides, we only need one fifth of the training time to achieve BiDAF’s best F1 score (77.0) on dev set.
140
+
141
+ Table 4: Speed comparison between our model and BiDAF (Seo et al., 2016) on SQuAD dataset.
142
+
143
+ <table><tr><td></td><td>Train time to get 77.0 F1onDev set</td><td>Train speed</td><td>Inference speed</td></tr><tr><td>QANet</td><td>3hours</td><td>102 samples/s</td><td>259 samples/s</td></tr><tr><td>BiDAF</td><td>15 hours</td><td>24 samples/s</td><td>37samples/s</td></tr><tr><td>Speedup</td><td>5.0x</td><td>4.3x</td><td>7.0x</td></tr></table>
144
+
145
+ # 4.1.3 ABALATION STUDY AND ANALYSIS
146
+
147
+ We conduct ablation studies on components of the proposed model, and investigate the effect of augmented data. The validation scores on the development set are shown in Table 5. As can be seen from the table, the use of convolutions in the encoders is crucial: both F1 and EM drop drastically by almost 3 percent if it is removed. Self-attention in the encoders is also a necessary component that contributes 1.4/1.3 gain of EM/F1 to the ultimate performance. We interpret these phenomena as follows: the convolutions capture the local structure of the context while the self-attention is able to model the global interactions between text. Hence they are complimentary to but cannot replace each other. The use of separable convolutions in lieu of tradition convolutions also has a prominent contribution to the performance, which can be seen by the slightly worse accuracy caused by replacing separable convolution with normal convolution.
148
+
149
+ The Effect of Data Augmentation. We additionally perform experiments to understand the values of augmented data as their amount increases. As the last block of rows in the table shows, data augmentation proves to be helpful in further boosting performance. Making the training data twice as large by adding the En-Fr-En data only (ratio 1:1 between original training data and augmented data, as indicated by row “data augmentation $\times 2$ (1:1:0)”) yields an increase in the F1 by 0.5 percent. While adding more augmented data with French as a pivot does not provide performance gain, injecting additional augmented data En-De-En of the same amount brings another 0.2 improvement in F1, as indicated in entry “data augmentation $\times \ 3$ (1:1:1)”. We may attribute this gain to the diversity of the new data, which is produced by the translator of the new language.
150
+
151
+ The Effect of Sampling Scheme. Although injecting more data beyond $\times \ 3$ does not benefit the model, we observe that a good sampling ratio between the original and augmented data during training can further boost the model performance. In particular, when we increase the sampling weight of augmented data from (1:1:1) to (1:2:1), the EM/F1 performance drops by $0 . 5 / 0 . 3$ . We conjecture that it is due to the fact that augmented data is noisy because of the back-translation, so it should not be the dominant data of training. We confirm this point by increasing the ratio of the original data from (1:2:1) to (2:2:1), where $0 . 6 / 0 . 5$ performance gain on EM/F1 is obtained. Then we fix the portion of the augmented data, and search the sample weight of the original data. Empirically, the ratio (3:1:1) yields the best performance, with 1.5/1.1 gain over the base model on EM/F1. This is also the model we submitted for test set evaluation.
152
+
153
+ # 4.1.4 ROBUSTNESS STUDY
154
+
155
+ In the following, we conduct experiments on the adversarial SQuAD dataset (Jia & Liang, 2017) to study the robustness of the proposed model. In this dataset, one or more sentences are appended to the original SQuAD context of test set, to intentionally mislead the trained models to produce wrong answers. However, the model is agnostic to those adversarial examples during training. We focus on two types of misleading sentences, namely, AddSent and AddOneSent. AddSent generates sentences that are similar to the question, but not contradictory to the correct answer, while AddOneSent adds a random human-approved sentence that is not necessarily related to the context.
156
+
157
+ The model in use is exactly the one trained with the original SQuAD data (the one getting 84.6 F1 on test set), but now it is submitted to the adversarial server for evaluation. The results are shown in Table 6, where the F1 scores of other models are all extracted from Jia & Liang (2017).15 Again, we only compare the performance of single models. From Table 6, we can see that our model is on par with the state-of-the-art model Mnemonic, while significantly better than other models by a large margin. The robustness of our model is probably because it is trained with augmented data.
158
+
159
+ Table 5: An ablation study of data augmentation and other aspects of our model. The reported results are obtained on the development set. For rows containing entry “data augmentation”, $^ { 6 6 } \times N ^ { \prime }$ means the data is enhanced to $N$ times as large as the original size, while the ratio in the bracket indicates the sampling ratio among the original, English-French-English and English-German-English data during training.
160
+
161
+ <table><tr><td colspan="2"></td><td>EM/F1</td><td>Differenceto Base Model EM/F1</td></tr><tr><td colspan="2">Base QANet</td><td>73.6/82.7</td><td></td></tr><tr><td rowspan="3"></td><td>- convolution in encoders</td><td>70.8/ 80.0</td><td>-2.8/-2.7</td></tr><tr><td>- self-attention in encoders</td><td>72.2 /81.4</td><td>-1.4 / -1.3</td></tr><tr><td>replace sep convolution with normal convolution</td><td>72.9 / 82.0</td><td>- 0.7/-0.7</td></tr><tr><td></td><td>+ data augmentation ×2 (1:1:0)</td><td>74.5/83.2</td><td>+0.9/+0.5</td></tr><tr><td></td><td>+ data augmentation ×3 (1:1:1)</td><td>74.8 /83.4</td><td>+1.2/+0.7</td></tr><tr><td></td><td>+ data augmentation ×3 (1:2:1)</td><td>74.3/83.1</td><td>+0.7 /+0.4</td></tr><tr><td></td><td>+ data augmentation ×3 (2:2:1)</td><td>74.9 / 83.6</td><td>+1.3/+0.9</td></tr><tr><td></td><td>+ data augmentation ×3 (2:1:1)</td><td>75.0 / 83.6</td><td>+1.4 /+0.9</td></tr><tr><td></td><td>+ data augmentation ×3 (3:1:1)</td><td>75.1/83.8</td><td>+1.5 / +1.1</td></tr><tr><td></td><td>+ data augmentation ×3 (4:1:1)</td><td>75.0 / 83.6</td><td>+1.4/ +0.9</td></tr><tr><td>+ data augmentation ×3 (5:1:1)</td><td></td><td>74.9 / 83.5</td><td>+1.3 /+0.8</td></tr></table>
162
+
163
+ The injected noise in the training data might not only improve the generalization of the model but also make it robust to the adversarial sentences.
164
+ Table 6: The F1 scores on the adversarial SQuAD test set.
165
+
166
+ <table><tr><td>Single Model</td><td>AddSent</td><td>AddOneSent</td></tr><tr><td>Logistic (Rajpurkar et al.,2016)</td><td>23.2</td><td>30.4</td></tr><tr><td>Match (Wang &amp; Jiang,2016)</td><td>27.3</td><td>39.0</td></tr><tr><td>SEDT (Liu et al., 2017a)</td><td>33.9</td><td>44.8</td></tr><tr><td>DCR (Yu et al., 2016)</td><td>37.8</td><td>45.1</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>34.3</td><td>45.7</td></tr><tr><td>jNet (Zhang et al.,2017)</td><td>37.9</td><td>47.0</td></tr><tr><td>Ruminating (Gong &amp; Bowman, 2017)</td><td>37.4</td><td>47.7</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>39.5</td><td>49.5</td></tr><tr><td>MPCM (Wang et al.,2016)</td><td>40.3</td><td>50.0</td></tr><tr><td>ReasoNet (Shen et al.,2017b)</td><td>39.4</td><td>50.3</td></tr><tr><td>Mnemonic (Hu et al.,2017)</td><td>46.6</td><td>56.0</td></tr><tr><td>QANet</td><td>45.2</td><td>55.7</td></tr></table>
167
+
168
+ # 4.2 EXPERIMENTS ON TRIVIAQA
169
+
170
+ In this section, we test our model on another dataset TriviaQA (Joshi et al., 2017), which consists of 650K context-query-answer triples. There are 95K distinct question-answer pairs, which are authored by Trivia enthusiasts, with 6 evidence documents (context) per question on average, which are either crawled from Wikipedia or Web search. Compared to SQuAD, TriviaQA is more challenging in that: 1) its examples have much longer context (2895 tokens per context on average) and may contain several paragraphs, 2) it is much noisier than SQuAD due to the lack of human labeling, 3) it is possible that the context is not related to the answer at all, as it is crawled by key words.
171
+
172
+ In this paper, we focus on testing our model on the subset consisting of answers from Wikipedia. According to the previous work (Joshi et al., 2017; Hu et al., 2017; Pan et al., 2017), the same model would have similar performance on both Wikipedia and Web, but the latter is five time larger. To keep the training time manageable, we omit the experiment on Web data.
173
+
174
+ Due to the multi-paragraph nature of the context, researchers also find that simple hierarchical or multi-step reading tricks, such as first predicting which paragraph to read and then apply models like BiDAF to pinpoint the answer within that paragraph (Clark & Gardner, 2017), can significantly boost the performance on TriviaQA. However, in this paper, we focus on comparing with the single-paragraph reading baselines only. We believe that our model can be plugged into other multi-paragraph reading methods to achieve the similar or better performance, but it is out of the scope of this paper.
175
+
176
+ The Wikipedia sub-dataset contains around 92K training and 11K development examples. The average context and question lengths are 495 and 15 respectively. In addition to the full development set, the authors of Joshi et al. (2017) also pick a verified subset that all the contexts inside can answer the associated questions. As the text could be long, we adopt the data processing similar to Hu et al. (2017); Joshi et al. (2017). In particular, for training and validation, we randomly select a window of length 256 and 400 encapsulating the answer respectively. All the remaining setting are the same as SQuAD experiment, except that the training steps are set to 120K.
177
+
178
+ Accuracy. The accuracy performance on the development set is shown in Table 7. Again, we can see that our model outperforms the baselines in terms of F1 and EM on Full development set, and is on par with the state-of-the-art on the Verified dev set.
179
+
180
+ Table 7: The development set performances of different single-paragraph reading models on the Wikipedia domain of TriviaQA dataset. Note that ∗ indicates the result on test set.
181
+
182
+ <table><tr><td></td><td>Full</td><td>Verified</td></tr><tr><td>Single Model</td><td>EM/F1</td><td>EM/F1</td></tr><tr><td>Random (Joshi et al.,2017)</td><td>12.7 /22.5</td><td>13.8/23.4</td></tr><tr><td>Classifier (Joshi et al., 2017)</td><td>23.4 / 27.7</td><td>23.6 /27.9</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>40.3/45.7</td><td>46.5 /52.8</td></tr><tr><td>MEMEN (Pan et al.,2017)</td><td>43.2/46.9</td><td>49.3 / 55.8</td></tr><tr><td>M-Reader (Hu et al., 2017)*</td><td>46.9/ 52.9*</td><td>54.5/ 59.5*</td></tr><tr><td>QANet</td><td>51.1/ 56.6</td><td>53.3/59.2</td></tr></table>
183
+
184
+ Speedup over RNNs. In addition to accuracy, we also benchmark the speed of our model against the RNN counterparts. As Table 8 shows, not surprisingly, our model has 3 to 11 times speedup in training and 3 to 9 times acceleration in inference, similar to the finding in SQuAD dataset.
185
+
186
+ <table><tr><td></td><td>QANet</td><td>RNN-1-128</td><td>Speedup</td><td>RNN-2-128</td><td>Speedup</td><td>RNN-3-128</td><td>Speedup</td></tr><tr><td>Training</td><td>1.8</td><td>0.41</td><td>4.4x</td><td>0.20</td><td>9.0x</td><td>0.11</td><td>16.4x</td></tr><tr><td>Inference</td><td>3.2</td><td>0.89</td><td>3.6x</td><td>0.47</td><td>6.8x</td><td>0.26</td><td>12.3x</td></tr></table>
187
+
188
+ Table 8: Speed comparison between the proposed model and RNN-based models on TriviaQA Wikipedia dataset, all with batch size 32. RNN- $x$ - $y$ indicates an RNN with $x$ layers each containing $y$ hidden units. The RNNs used here are bidirectional LSTM. The processing speed is measured by batches/second, so higher is faster.
189
+
190
+ # 5 RELATED WORK
191
+
192
+ Machine reading comprehension and automated question answering has become an important topic in the NLP domain. Their popularity can be attributed to an increase in publicly available annotated datasets, such as SQuAD (Rajpurkar et al., 2016), TriviaQA (Joshi et al., 2017), CNN/Daily News (Hermann et al., 2015), WikiReading (Hewlett et al., 2016), Children Book Test (Hill et al., 2015), etc. A great number of end-to-end neural network models have been proposed to tackle these challenges, including BiDAF (Seo et al., 2016), r-net (Wang et al., 2017), DCN (Xiong et al., 2016), ReasoNet (Shen et al., 2017b), Document Reader (Chen et al., 2017), Interactive AoA Reader (Cui et al., 2017) and Reinforced Mnemonic Reader (Hu et al., 2017).
193
+
194
+ Recurrent Neural Networks (RNNs) have featured predominatnly in Natural Language Processing in the past few years. The sequential nature of the text coincides with the design philosophy of RNNs, and hence their popularity. In fact, all the reading comprehension models mentioned above are based on RNNs. Despite being common, the sequential nature of RNN prevent parallel computation, as tokens must be fed into the RNN in order. Another drawback of RNNs is difficulty modeling long dependencies, although this is somewhat alleviated by the use of Gated Recurrent Unit (Chung et al.,
195
+
196
+ 2014) or Long Short Term Memory architectures (Hochreiter & Schmidhuber, 1997). For simple tasks such as text classification, with reinforcement learning techniques, models (Yu et al., 2017) have been proposed to skip irrelevant tokens to both further address the long dependencies issue and speed up the procedure. However, it is not clear if such methods can handle complicated tasks such as Q&A. The reading comprehension task considered in this paper always needs to deal with long text, as the context paragraphs may be hundreds of words long. Recently, attempts have been made to replace the recurrent networks by full convolution or full attention architectures (Kim, 2014; Gehring et al., 2017; Vaswani et al., 2017b; Shen et al., 2017a). Those models have been shown to be not only faster than the RNN architectures, but also effective in other tasks, such as text classification, machine translation or sentiment analysis.
197
+
198
+ To the best of our knowledge, our paper is the first work to achieve both fast and accurate reading comprehension model, by discarding the recurrent networks in favor of feed forward architectures. Our paper is also the first to mix self-attention and convolutions, which proves to be empirically effective and achieves a significant gain of 2.7 F1. Note that Raiman & Miller (2017) recently proposed to accelerate reading comprehension by avoiding bi-directional attention and making computation conditional on the search beams. Nevertheless, their model is still based on the RNNs and the accuracy is not competitive, with an $\mathrm { E M } 6 8 . 4$ and F1 76.2. Weissenborn et al. (2017) also tried to build a fast Q&A model by deleting the context-query attention module. However, it again relied on RNN and is thus intrinsically slower than ours. The elimination of attention further has sacrificed the performance (with EM 68.4 and F1 77.1).
199
+
200
+ Data augmentation has also been explored in natural language processing. For example, Zhang et al. (2015) proposed to enhance the dataset by replacing the words with their synonyms and showed its effectiveness in text classification. Raiman & Miller (2017) suggested using type swap to augment the $\mathrm { S Q u A D }$ dataset, which essentially replaces the words in the original paragraph with others with the same type. While it was shown to improve the accuracy, the augmented data has the same syntactic structure as the original data, so they are not sufficiently diverse. Zhou et al. (2017) improved the diversity of the SQuAD data by generating more questions. However, as reported by Wang et al. (2017), their method did not help improve the performance. The data augmentation technique proposed in this paper is based on paraphrasing the sentences by translating the original text back and forth. The major benefit is that it can bring more syntactical diversity to the enhanced data.
201
+
202
+ # 6 CONCLUSION
203
+
204
+ In this paper, we propose a fast and accurate end-to-end model, QANet, for machine reading comprehension. Our core innovation is to completely remove the recurrent networks in the encoder. The resulting model is fully feedforward, composed entirely of separable convolutions, attention, linear layers, and layer normalization, which is suitable for parallel computation. The resulting model is both fast and accurate: It surpasses the best published results on SQuAD dataset while up to 13/9 times faster than a competitive recurrent models for a training/inference iteration. Additionally, we find that we are able to achieve significant gains by utilizing data augmentation consisting of translating context and passage pairs to and from another language as a way of paraphrasing the questions and contexts.
205
+
206
+ # ACKNOWLEDGEMENT
207
+
208
+ Adams Wei Yu is supported by NVIDIA PhD Fellowship and CMU Presidential Fellowship. We would like to thank Samy Bengio, Lei Huang, Minjoon Seo, Noam Shazeer, Ashish Vaswani, Barret Zoph and the Google Brain Team for helpful discussions.
209
+
210
+ # REFERENCES
211
+
212
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz ´ Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Gor- ´ don Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal
213
+
214
+ Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viegas, Oriol Vinyals, ´ Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467.
215
+
216
+ Lei Jimmy Ba, Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016. URL http://arxiv.org/abs/1607.06450.
217
+
218
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015.
219
+
220
+ Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1870–1879, 2017.
221
+
222
+ Franc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. CoRR, abs/1610.02357, 2016. URL http://arxiv.org/abs/1610.02357.
223
+
224
+ Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
225
+
226
+ Christopher Clark and Matt Gardner. Simple and effective multi-paragraph reading comprehension. CoRR, abs/1710.10723, 2017. URL http://arxiv.org/abs/1710.10723.
227
+
228
+ Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 593–602, 2017.
229
+
230
+ Li Dong, Jonathan Mallinson, Siva Reddy, and Mirella Lapata. Learning to paraphrase for question answering. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 875–886. Association for Computational Linguistics, 2017. URL http://aclweb.org/anthology/D17-1091.
231
+
232
+ Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. In International Conference on Machine Learning, 2017.
233
+
234
+ Yichen Gong and Samuel R. Bowman. Ruminating reader: Reasoning with gated multi-hop attention. CoRR, abs/1704.07415, 2017. URL http://arxiv.org/abs/1704.07415.
235
+
236
+ Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 1693–1701, 2015.
237
+
238
+ Daniel Hewlett, Alexandre Lacoste, Llion Jones, Illia Polosukhin, Andrew Fandrianto, Jay Han, Matthew Kelcey, and David Berthelot. Wikireading: A novel large-scale language understanding task over wikipedia. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers, 2016.
239
+
240
+ Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. CoRR, abs/1511.02301, 2015.
241
+
242
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
243
+
244
+ Minghao Hu, Yuxing Peng, and Xipeng Qiu. Reinforced mnemonic reader for machine comprehension. CoRR, abs/1705.02798, 2017. URL http://arxiv.org/abs/1705.02798.
245
+
246
+ Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, pp. 646–661, 2016.
247
+
248
+ Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 2021–2031, 2017.
249
+
250
+ Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1601–1611, 2017.
251
+
252
+ Lukasz Kaiser, Aidan N Gomez, and Francois Chollet. Depthwise separable convolutions for neural machine translation. arXiv preprint arXiv:1706.03059, 2017.
253
+
254
+ Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25- 29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pp. 1746– 1751, 2014.
255
+
256
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
257
+
258
+ Kenton Lee, Tom Kwiatkowski, Ankur P. Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. CoRR, abs/1611.01436, 2016.
259
+
260
+ Rui Liu, Junjie Hu, Wei Wei, Zi Yang, and Eric Nyberg. Structural embedding of syntactic trees for machine comprehension. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 826–835, 2017a.
261
+
262
+ Xiaodong Liu, Yelong Shen, Kevin Duh, and Jianfeng Gao. Stochastic answer networks for machine reading comprehension. CoRR, abs/1712.03556, 2017b. URL http://arxiv.org/abs/ 1712.03556.
263
+
264
+ Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. In EMNLP, 2015.
265
+
266
+ Minh-Thang Luong, Eugene Brevdo, and Rui Zhao. Neural machine translation (seq2seq) tutorial. https://github.com/tensorflow/nmt, 2017.
267
+
268
+ Jonathan Mallinson, Rico Sennrich, and Mirella Lapata. Paraphrasing revisited with neural machine translation. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pp. 881–893. Association for Computational Linguistics, 2017. URL http://aclweb.org/anthology/E17-1083.
269
+
270
+ Boyuan Pan, Hao Li, Zhou Zhao, Bin Cao, Deng Cai, and Xiaofei He. MEMEN: multi-layer embedding with memory networks for machine comprehension. CoRR, abs/1707.09098, 2017.
271
+
272
+ Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word//w representation. In Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, 2014. URL http://www.aclweb.org/anthology/D14-1162.
273
+
274
+ Jonathan Raiman and John Miller. Globally normalized reader. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 1070–1080, 2017.
275
+
276
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pp. 2383–2392, 2016.
277
+
278
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In ACL (1). The Association for Computer Linguistics, 2016.
279
+
280
+ Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. CoRR, abs/1611.01603, 2016. URL http://arxiv.org/ abs/1611.01603.
281
+
282
+ Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Shirui Pan, and Chengqi Zhang. Disan: Directional self-attention network for rnn/cnn-free language understanding. CoRR, abs/1709.04696, 2017a. URL http://arxiv.org/abs/1709.04696.
283
+
284
+ Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13 - 17, 2017, pp. 1047–1055, 2017b.
285
+
286
+ Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ CoRR, abs/1505.00387, 2015. URL http://arxiv.org/abs/1505.00387.
287
+
288
+ 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, 2017a. URL http://arxiv.org/abs/1706.03762.
289
+
290
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Neural Information Processing Systems, 2017b.
291
+
292
+ Shuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. CoRR, abs/1608.07905, 2016. URL http://arxiv.org/abs/1608.07905.
293
+
294
+ Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou. Gated self-matching networks for reading comprehension and question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 189–198, 2017.
295
+
296
+ Zhiguo Wang, Haitao Mi, Wael Hamza, and Radu Florian. Multi-perspective context matching for machine comprehension. CoRR, abs/1612.04211, 2016. URL http://arxiv.org/abs/ 1612.04211.
297
+
298
+ Dirk Weissenborn, Georg Wiese, and Laura Seiffe. Making neural QA as simple as possible but not simpler. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), Vancouver, Canada, August 3-4, 2017, pp. 271–280, 2017.
299
+
300
+ John Wieting, Jonathan Mallinson, and Kevin Gimpel. Learning paraphrastic sentence embeddings from back-translated bitext. In EMNLP, pp. 274–285. Association for Computational Linguistics, 2017.
301
+
302
+ Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
303
+
304
+ Caiming Xiong, Victor Zhong, and Richard Socher. Dynamic coattention networks for question answering. CoRR, abs/1611.01604, 2016. URL http://arxiv.org/abs/1611.01604.
305
+
306
+ Adams Wei Yu, Hongrae Lee, and Quoc V. Le. Learning to skim text. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1880–1890, 2017.
307
+
308
+ Yang Yu, Wei Zhang, Kazi Saidul Hasan, Mo Yu, Bing Xiang, and Bowen Zhou. End-to-end reading comprehension with dynamic answer chunk ranking. CoRR, abs/1610.09996, 2016. URL http: //arxiv.org/abs/1610.09996.
309
+
310
+ Junbei Zhang, Xiao-Dan Zhu, Qian Chen, Li-Rong Dai, Si Wei, and Hui Jiang. Exploring question understanding and adaptation in neural-network-based question answering. CoRR, abs/1703.04617, 2017.
311
+
312
+ Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 649–657, 2015.
313
+
314
+ Qingyu Zhou, Nan Yang, Furu Wei, Chuanqi Tan, Hangbo Bao, and Ming Zhou. Neural question generation from text: A preliminary study. CoRR, abs/1704.01792, 2017. URL http: //arxiv.org/abs/1704.01792.
parse/train/B14TlG-RW/B14TlG-RW_content_list.json ADDED
@@ -0,0 +1,1725 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "QANET: COMBINING LOCAL CONVOLUTION WITH GLOBAL SELF-ATTENTION FOR READING COMPREHENSION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Adams Wei $\\mathbf { Y u } ^ { 1 }$ ∗, David Dohan2†, Minh-Thang Luong2† {weiyu}@cs.cmu.edu, {ddohan,thangluong}@google.com 1Carnegie Mellon University, 2Google Brain ",
17
+ "bbox": [
18
+ 184,
19
+ 194,
20
+ 656,
21
+ 238
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Rui Zhao, Kai Chen, Mohammad Norouzi, Quoc V. Le Google Brain ",
28
+ "bbox": [
29
+ 184,
30
+ 251,
31
+ 563,
32
+ 279
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 316,
43
+ 544,
44
+ 332
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Current end-to-end machine reading and question answering (Q&A) models are primarily based on recurrent neural networks (RNNs) with attention. Despite their success, these models are often slow for both training and inference due to the sequential nature of RNNs. We propose a new Q&A architecture called QANet, which does not require recurrent networks: Its encoder consists exclusively of convolution and self-attention, where convolution models local interactions and self-attention models global interactions. On the SQuAD dataset, our model is 3x to $1 3 \\mathrm { x }$ faster in training and $4 \\mathbf { x }$ to $9 \\mathbf { x }$ faster in inference, while achieving equivalent accuracy to recurrent models. The speed-up gain allows us to train the model with much more data. We hence combine our model with data generated by backtranslation from a neural machine translation model. On the SQuAD dataset, our single model, trained with augmented data, achieves 84.6 F1 score1 on the test set, which is significantly better than the best published F1 score of 81.8. ",
51
+ "bbox": [
52
+ 233,
53
+ 344,
54
+ 764,
55
+ 525
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 549,
66
+ 334,
67
+ 564
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "There is growing interest in the tasks of machine reading comprehension and automated question answering. Over the past few years, significant progress has been made with end-to-end models showing promising results on many challenging datasets. The most successful models generally employ two key ingredients: (1) a recurrent model to process sequential inputs, and (2) an attention component to cope with long term interactions. A successful combination of these two ingredients is the Bidirectional Attention Flow (BiDAF) model by Seo et al. (2016), which achieve strong results on the SQuAD dataset (Rajpurkar et al., 2016). A weakness of these models is that they are often slow for both training and inference due to their recurrent nature, especially for long texts. The expensive training not only leads to high turnaround time for experimentation and limits researchers from rapid iteration but also prevents the models from being used for larger dataset. Meanwhile the slow inference prevents the machine comprehension systems from being deployed in real-time applications. ",
74
+ "bbox": [
75
+ 174,
76
+ 579,
77
+ 825,
78
+ 744
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, aiming to make the machine comprehension fast, we propose to remove the recurrent nature of these models. We instead exclusively use convolutions and self-attentions as the building blocks of encoders that separately encodes the query and context. Then we learn the interactions between context and question by standard attentions (Xiong et al., 2016; Seo et al., 2016; Bahdanau et al., 2015). The resulting representation is encoded again with our recurrency-free encoder before finally decoding to the probability of each position being the start or end of the answer span. We call this architecture QANet, which is shown in Figure 1. ",
85
+ "bbox": [
86
+ 173,
87
+ 753,
88
+ 825,
89
+ 851
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The key motivation behind the design of our model is the following: convolution captures the local structure of the text, while the self-attention learns the global interaction between each pair of words. The additional context-query attention is a standard module to construct the query-aware context vector for each position in the context paragraph, which is used in the subsequent modeling layers. The feed-forward nature of our architecture speeds up the model significantly. In our experiments on the SQuAD dataset, our model is $3 \\mathbf { x }$ to $1 3 \\mathrm { x }$ faster in training and 4x to $9 \\mathbf { x }$ faster in inference. As a simple comparison, our model can achieve the same accuracy (77.0 F1 score) as BiDAF model (Seo et al., 2016) within 3 hours training that otherwise should have taken 15 hours. The speed-up gain also allows us to train the model with more iterations to achieve better results than competitive models. For instance, if we allow our model to train for 18 hours, it achieves an F1 score of 82.7 on the dev set, which is much better than (Seo et al., 2016), and is on par with best published results. ",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 256
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "As our model is fast, we can train it with much more data than other models. To further improve the model, we propose a complementary data augmentation technique to enhance the training data. This technique paraphrases the examples by translating the original sentences from English to another language and then back to English, which not only enhances the number of training instances but also diversifies the phrasing. ",
107
+ "bbox": [
108
+ 174,
109
+ 263,
110
+ 823,
111
+ 333
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "On the SQuAD dataset, QANet trained with the augmented data achieves 84.6 F1 score on the test set, which is significantly better than the best published result of 81.8 by Hu et al. (2017).2 We also conduct ablation test to justify the usefulness of each component of our model. In summary, the contribution of this paper are as follows: ",
118
+ "bbox": [
119
+ 176,
120
+ 340,
121
+ 825,
122
+ 396
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "• We propose an efficient reading comprehension model that exclusively built upon convolutions and self-attentions. To the best of our knowledge, we are the first to do so. This combination maintains good accuracy, while achieving up to $1 3 \\mathrm { x }$ speedup in training and $9 \\mathbf { x }$ per training iteration, compared to the RNN counterparts. The speedup gain makes our model the most promising candidate for scaling up to larger datasets. • To improve our result on SQuAD, we propose a novel data augmentation technique to enrich the training data by paraphrasing. It allows the model to achieve higher accuracy that is better than the state-of-the-art. ",
129
+ "bbox": [
130
+ 215,
131
+ 409,
132
+ 823,
133
+ 525
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 THE MODEL ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 174,
143
+ 545,
144
+ 310,
145
+ 561
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "In this section, we first formulate the reading comprehension problem and then describe the proposed model QANet: it is a feedforward model that consists of only convolutions and self-attention, a combination that is empirically effective, and is also a novel contribution of our work. ",
152
+ "bbox": [
153
+ 176,
154
+ 577,
155
+ 823,
156
+ 619
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 PROBLEM FORMULATION ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 174,
166
+ 637,
167
+ 392,
168
+ 651
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "The reading comprehension task considered in this paper, is defined as follows. Given a context paragraph with $n$ words $C = \\{ c _ { 1 } , c _ { 2 } , . . . , c _ { n } \\}$ and the query sentence with $m$ words $Q = \\{ q _ { 1 } , q _ { 2 } , . . . , \\bar { q } _ { m } \\}$ , output a span $S = \\{ c _ { i } , c _ { i + 1 } , . . . , c _ { i + j } \\}$ from the original paragraph $C$ . In the following, we will use $x$ to denote both the original word and its embedded vector, for any $x \\in C , Q$ . ",
175
+ "bbox": [
176
+ 174,
177
+ 662,
178
+ 825,
179
+ 719
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "2.2 MODEL OVERVIEW ",
186
+ "text_level": 1,
187
+ "bbox": [
188
+ 176,
189
+ 736,
190
+ 348,
191
+ 751
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "The high level structure of our model is similar to most existing models that contain five major components: an embedding layer, an embedding encoder layer, a context-query attention layer, a model encoder layer and an output layer, as shown in Figure 1. These are the standard building blocks for most, if not all, existing reading comprehension models. However, the major differences between our approach and other methods are as follow: For both the embedding and modeling encoders, we only use convolutional and self-attention mechanism, discarding RNNs, which are used by most of the existing reading comprehension models. As a result, our model is much faster, as it can process the input tokens in parallel. Note that even though self-attention has already been used extensively in Vaswani et al. (2017a), the combination of convolutions and self-attention is novel, and is significantly better than self-attention alone and gives 2.7 F1 gain in our experiments. The use of convolutions also allows us to take advantage of common regularization methods in ConvNets such as stochastic depth (layer dropout) (Huang et al., 2016), which gives an additional gain of $0 . 2 \\mathrm { F } 1$ in our experiments. ",
198
+ "bbox": [
199
+ 173,
200
+ 762,
201
+ 825,
202
+ 875
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "image",
208
+ "img_path": "images/9f4efb3d6b6401bb890a7c0b5541dd68786a9cf6fd26b697fd8e7e069e03eefa.jpg",
209
+ "image_caption": [
210
+ "Figure 1: An overview of the QANet architecture (left) which has several Encoder Blocks. We use the same Encoder Block (right) throughout the model, only varying the number of convolutional layers for each block. We use layernorm and residual connection between every layer in the Encoder Block. We also share weights of the context and question encoder, and of the three output encoders. A positional encoding is added to the input at the beginning of each encoder layer consisting of sin and cos functions at varying wavelengths, as defined in (Vaswani et al., 2017a). Each sub-layer after the positional encoding (one of convolution, self-attention, or feed-forward-net) inside the encoder structure is wrapped inside a residual block. "
211
+ ],
212
+ "image_footnote": [],
213
+ "bbox": [
214
+ 267,
215
+ 107,
216
+ 727,
217
+ 391
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "",
224
+ "bbox": [
225
+ 174,
226
+ 546,
227
+ 825,
228
+ 616
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "In detail, our model consists of the following five layers: ",
235
+ "bbox": [
236
+ 174,
237
+ 623,
238
+ 544,
239
+ 637
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "1. Input Embedding Layer. We adopt the standard techniques to obtain the embedding of each word $w$ by concatenating its word embedding and character embedding. The word embedding is fixed during training and initialized from the $p _ { 1 } = 3 0 0$ dimensional pre-trained GloVe (Pennington et al., 2014) word vectors, which are fixed during training. All the out-of-vocabulary words are mapped to an ${ \\mathrm { < U N K > } }$ token, whose embedding is trainable with random initialization. The character embedding is obtained as follows: Each character is represented as a trainable vector of dimension $p _ { 2 } = 2 0 0$ , meaning each word can be viewed as the concatenation of the embedding vectors for each of its characters. The length of each word is either truncated or padded to 16. We take maximum value of each row of this matrix to get a fixed-size vector representation of each word. Finally, the output of a given word $x$ from this layer is the concatenation $[ x _ { w } ; x _ { c } ] \\in \\mathbf { R } ^ { p _ { 1 } + p _ { 2 } }$ , where $x _ { w }$ and $x _ { c }$ are the word embedding and the convolution output of character embedding of $x$ respectively. Following Seo et al. (2016), we also adopt a two-layer highway network (Srivastava et al., 2015) on top of this representation. For simplicity, we also use $x$ to denote the output of this layer. ",
246
+ "bbox": [
247
+ 173,
248
+ 656,
249
+ 825,
250
+ 837
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "2. Embedding Encoder Layer. The encoder layer is a stack of the following basic building block: [convolution-layer $\\times \\# +$ self-attention-layer $^ +$ feed-forward-layer], as illustrated in the upper right of Figure 1. We use depthwise separable convolutions (Chollet, 2016) (Kaiser et al., 2017) rather than traditional ones, as we observe that it is memory efficient and has better generalization. The kernel size is 7, the number of filters is $d = 1 2 8$ and the number of conv layers within a block is ",
257
+ "bbox": [
258
+ 174,
259
+ 854,
260
+ 823,
261
+ 922
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "4. For the self-attention-layer, we adopt the multi-head attention mechanism defined in (Vaswani et al., 2017a) which, for each position in the input, called the query, computes a weighted sum of all positions, or keys, in the input based on the similarity between the query and key as measured by the dot product. The number of heads is 8 throughout all the layers. Each of these basic operations (conv/self-attention/ffn) is placed inside a residual block, shown lower-right in Figure 1. For an input $x$ and a given operation $f$ , the output is $f ( l a y e r n o r m ( x ) ) + x$ , meaning there is a full identity path from the input to output of each block, where layernorm indicates layer-normalization proposed in (Ba et al., 2016). The total number of encoder blocks is 1. Note that the input of this layer is a vector of dimension $p _ { 1 } + p _ { 2 } = 5 0 0$ for each individual word, which is immediately mapped to $d = 1 2 8$ by a one-dimensional convolution. The output of this layer is a also of dimension $d = 1 2 8$ . ",
268
+ "bbox": [
269
+ 173,
270
+ 103,
271
+ 825,
272
+ 243
273
+ ],
274
+ "page_idx": 3
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "3. Context-Query Attention Layer. This module is standard in almost every previous reading comprehension models such as Weissenborn et al. (2017) and Chen et al. (2017). We use $C$ and $Q$ to denote the encoded context and query. The context-to-query attention is constructed as follows: We first computer the similarities between each pair of context and query words, rendering a similarity matrix $S \\in \\mathbf { R } ^ { n \\times m }$ . We then normalize each row of $S$ by applying the softmax function, getting a matrix $\\overline { S }$ . Then the context-to-query attention is computed as $\\bar { A } = \\mathbf { \\bar { \\boldsymbol { S } } } \\cdot \\boldsymbol { Q } ^ { T } \\in \\mathbf { R } ^ { n \\times d }$ . The similarity function used here is the trilinear function (Seo et al., 2016): ",
279
+ "bbox": [
280
+ 173,
281
+ 256,
282
+ 825,
283
+ 354
284
+ ],
285
+ "page_idx": 3
286
+ },
287
+ {
288
+ "type": "equation",
289
+ "img_path": "images/6f95650220c2646b0d930e1cb52c4f690f88d3b1bba390b34ab2f2f00c206a7a.jpg",
290
+ "text": "$$\n\\begin{array} { r } { f ( q , c ) = W _ { 0 } [ q , c , q \\odot c ] , } \\end{array}\n$$",
291
+ "text_format": "latex",
292
+ "bbox": [
293
+ 413,
294
+ 357,
295
+ 583,
296
+ 375
297
+ ],
298
+ "page_idx": 3
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "where $\\odot$ is the element-wise multiplication and $W _ { 0 }$ is a trainable variable. ",
303
+ "bbox": [
304
+ 174,
305
+ 376,
306
+ 660,
307
+ 392
308
+ ],
309
+ "page_idx": 3
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "Most high performing models additionally use some form of query-to-context attention, such as BiDaF (Seo et al., 2016) and DCN (Xiong et al., 2016). Empirically, we find that, the DCN attention can provide a little benefit over simply applying context-to-query attention, so we adopt this strategy. More concretely, we compute the column normalized matrix $\\overline { { \\overline { { S } } } }$ of $S$ by softmax function, and the query-to-context attention is B = S · S · C T . ",
314
+ "bbox": [
315
+ 173,
316
+ 397,
317
+ 825,
318
+ 479
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "4. Model Encoder Layer. Similar to Seo et al. (2016), the input of this layer at each position is $\\left[ c , a , c \\odot a , c \\odot b \\right]$ , where $a$ and $b$ are respectively a row of attention matrix $A$ and $B$ . The layer parameters are the same as the Embedding Encoder Layer except that convolution layer number is 2 within a block and the total number of blocks are 7. We share weights between each of the 3 repetitions of the model encoder. ",
325
+ "bbox": [
326
+ 173,
327
+ 492,
328
+ 825,
329
+ 563
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "5. Output layer. This layer is task-specific. Each example in SQuAD is labeled with a span in the context containing the answer. We adopt the strategy of Seo et al. (2016) to predict the probability of each position in the context being the start or end of an answer span. More specifically, the probabilities of the starting and ending position are modeled as ",
336
+ "bbox": [
337
+ 173,
338
+ 577,
339
+ 825,
340
+ 633
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "equation",
346
+ "img_path": "images/702eee08d803d5bff6f20319c424b0fac9a5482b8b7a7c963066d95dabbf855f.jpg",
347
+ "text": "$$\np ^ { 1 } = s o f t m a x ( W _ { 1 } [ M _ { 0 } ; M _ { 1 } ] ) , ~ p ^ { 2 } = s o f t m a x ( W _ { 2 } [ M _ { 0 } ; M _ { 2 } ] ) ,\n$$",
348
+ "text_format": "latex",
349
+ "bbox": [
350
+ 287,
351
+ 635,
352
+ 707,
353
+ 654
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "where $W _ { 1 }$ and $W _ { 2 }$ are two trainable variables and $M _ { 0 } , M _ { 1 } , M _ { 2 }$ are respectively the outputs of the three model encoders, from bottom to top. The score of a span is the product of its start position and end position probabilities. Finally, the objective function is defined as the negative sum of the log probabilities of the predicted distributions indexed by true start and end indices, averaged over all the training examples: ",
360
+ "bbox": [
361
+ 173,
362
+ 655,
363
+ 825,
364
+ 724
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "equation",
370
+ "img_path": "images/61517a40ff86c875cb53582487d29d4e7a5dd307abc99b7a7604432f34661c76.jpg",
371
+ "text": "$$\nL ( \\theta ) = - \\frac { 1 } { N } \\sum _ { i } ^ { N } \\left[ \\log ( p _ { y _ { i } ^ { 1 } } ^ { 1 } ) + \\log ( p _ { y _ { i } ^ { 2 } } ^ { 2 } ) \\right] ,\n$$",
372
+ "text_format": "latex",
373
+ "bbox": [
374
+ 362,
375
+ 723,
376
+ 633,
377
+ 766
378
+ ],
379
+ "page_idx": 3
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "where $y _ { i } ^ { 1 }$ and $y _ { i } ^ { 2 }$ are respectively the groundtruth starting and ending position of example $i$ , and $\\theta$ contains all the trainable variables. The proposed model can be customized to other comprehension tasks, e.g. selecting from the candidate answers, by changing the output layers accordingly. ",
384
+ "bbox": [
385
+ 174,
386
+ 767,
387
+ 825,
388
+ 810
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Inference. At inference time, the predicted span $( s , e )$ is chosen such that $p _ { s } ^ { 1 } p _ { e } ^ { 2 }$ is maximized and $s \\leq e$ . Standard dynamic programming can obtain the result with linear time. ",
395
+ "bbox": [
396
+ 169,
397
+ 815,
398
+ 823,
399
+ 845
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "3 DATA AUGMENTATION BY BACKTRANSLATION ",
406
+ "text_level": 1,
407
+ "bbox": [
408
+ 173,
409
+ 864,
410
+ 596,
411
+ 881
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "Since our model is fast, we can train it with much more data. We therefore combine our model with a simple data augmentation technique to enrich the training data. The idea is to use two translation models, one translation model from English to French (or any other language) and another translation model from French to English, to obtain paraphrases of texts. This approach helps automatically increase the amount of training data for broadly any language-based tasks including the reading comprehension task that we are interested in. With more data, we expect to better regularize our models. The augmentation process is illustrated in Figure 2 with French as a pivotal language. ",
418
+ "bbox": [
419
+ 173,
420
+ 895,
421
+ 823,
422
+ 924
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "",
429
+ "bbox": [
430
+ 174,
431
+ 103,
432
+ 823,
433
+ 174
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "In this work, we consider attention-based neural machine translation (NMT) models Bahdanau et al. (2015); Luong et al. (2015), which have demonstrated excellent translation quality Wu et al. (2016), as the core models of our data augmentation pipeline. Specifically, we utilize the publicly available codebase3 provided by Luong et al. (2017), which replicates the Google’s NMT (GNMT) systems Wu et al. (2016). We train 4-layer GNMT models on the public WMT data for both English-French4 (36M sentence pairs) and English-German5 (4.5M sentence pairs). All data have been tokenized and split into subword units as described in Luong et al. (2017). All models share the same hyperparameters6 and are trained with different numbers of steps, 2M for English-French and 340K for English-German. Our English-French systems achieve 36.7 BLEU on newstest2014 for translating into French and 35.9 BLEU for the reverse direction. For English-German and on newstest2014, we obtain 27.6 BLEU for translating into German and 29.9 BLEU for the reverse direction. ",
440
+ "bbox": [
441
+ 173,
442
+ 180,
443
+ 825,
444
+ 333
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "image",
450
+ "img_path": "images/28706f1cf855b1712c3db553cd3b78da8b285291fe96d2dc7bd8d8823aade21c.jpg",
451
+ "image_caption": [
452
+ "Figure 2: An illustration of the data augmentation process with French as a pivotal language. $\\mathbf { k }$ is the beam width, which is the number of translations generated by the NMT system. "
453
+ ],
454
+ "image_footnote": [],
455
+ "bbox": [
456
+ 269,
457
+ 348,
458
+ 728,
459
+ 517
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "Our paraphrase process works as follows, supposedly with French as a pivotal language. First, we feed an input sequence into the beam decoder of an English-to-French model to obtain $k$ French translations. Each of the French translation is then passed through the beam decoder of a reversed translation model to obtain a total of $k ^ { 2 }$ paraphrases of the input sequence. ",
466
+ "bbox": [
467
+ 174,
468
+ 580,
469
+ 825,
470
+ 636
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "Relation to existing Works. While the concept of backtranslation has been introduced before, it is often used to improve either the same translation task Sennrich et al. (2016) or instrinsic paraphrase evaluations Wieting et al. (2017); Mallinson et al. (2017). Our approach is a novel application of backtranslation to enrich training data for down-stream tasks, in this case, the question answering (QA) task. It is worth to note that (Dong et al., 2017) use paraphrasing techniques to improve QA; however, they only paraphrase questions and did not focus on the data augmentation aspect as we do in this paper. ",
477
+ "bbox": [
478
+ 173,
479
+ 654,
480
+ 825,
481
+ 752
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "Handling SQuAD Documents and Answers. We now discuss our specific procedure for the SQuAD dataset, which is essential for best performance gains. Remember that, each training example of SQuAD is a triple of $( d , q , a )$ in which document $d$ is a multi-sentence paragraph that has the answer $a$ . When paraphrasing, we keep the question $q$ unchanged (to avoid accidentally changing its meaning) and generate new triples of $\\bar { ( d ^ { \\prime } , q , a ^ { \\prime } ) }$ such that the new document $d ^ { \\prime }$ has the new answer $a ^ { \\prime }$ in it. The procedure happens in two steps: (i) document paraphrasing – paraphrase $d$ into $d ^ { \\prime }$ and (b) answer extraction – extract $a ^ { \\prime }$ from $d ^ { \\prime }$ that closely matches $a$ . ",
488
+ "bbox": [
489
+ 174,
490
+ 770,
491
+ 825,
492
+ 840
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "",
499
+ "bbox": [
500
+ 171,
501
+ 103,
502
+ 823,
503
+ 132
504
+ ],
505
+ "page_idx": 5
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "For the document paraphrasing step, we first split paragraphs into sentences and paraphrase them independently. We use $k = 5$ , so each sentence has 25 paraphrase choices. A new document $d ^ { \\prime }$ is formed by simply replacing each sentence in $d$ with a randomly-selected paraphrase. An obvious issue with this na¨ıve approach is that the original answer $a$ might no longer be present in $d ^ { \\prime }$ . ",
510
+ "bbox": [
511
+ 174,
512
+ 138,
513
+ 823,
514
+ 195
515
+ ],
516
+ "page_idx": 5
517
+ },
518
+ {
519
+ "type": "text",
520
+ "text": "The answer extraction addresses the aforementioned issue. Let $s$ be the original sentence that contains the original answer $a$ and $s ^ { \\prime }$ be its paraphrase. We identify the newly-paraphrased answer with simple heuristics as follows. Character-level 2-gram scores are computed between each word in $s ^ { \\prime }$ and the start / end words of $a$ to find start and end positions of possible answers in $s ^ { \\prime }$ . Among all candidate paraphrased answer, the one with the highest character 2-gram score with respect to $a$ is selected as the new answer $a ^ { \\prime }$ . Table 1 shows an example of the new answer found by this process.7 ",
521
+ "bbox": [
522
+ 174,
523
+ 202,
524
+ 823,
525
+ 285
526
+ ],
527
+ "page_idx": 5
528
+ },
529
+ {
530
+ "type": "table",
531
+ "img_path": "images/72e990ec33439a3c6d27a4c1ffc9bfa743b74c375e1b98063bd5a107aa76bbf7.jpg",
532
+ "table_caption": [
533
+ "Table 1: Comparison between answers in original sentence and paraphrased sentence. "
534
+ ],
535
+ "table_footnote": [],
536
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Sentence that contains an answer</td><td rowspan=1 colspan=1>Answer</td></tr><tr><td rowspan=1 colspan=1>Original</td><td rowspan=1 colspan=1>All of the departments in the College of Science offer PhDprograms,except for the Department of Pre-ProfessionalStudies.</td><td rowspan=1 colspan=1>Department of Pre-Professional Studies</td></tr><tr><td rowspan=1 colspan=1>Paraphrase</td><td rowspan=1 colspan=1>All departments in the College of Science offer PHD pro- grams with the exception of the Department of PreparatoryStudies.</td><td rowspan=1 colspan=1>Department of PreparatoryStudies</td></tr></table>",
537
+ "bbox": [
538
+ 181,
539
+ 299,
540
+ 818,
541
+ 392
542
+ ],
543
+ "page_idx": 5
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "The quality and diversity of paraphrases are essential to the data augmentation method. It is still possible to improve the quality and diversity of this method. The quality can be improved by using better translation models. For example, we find paraphrases significantly longer than our models’ maximum training sequence length tend to be cut off in the middle. The diversity can be improved by both sampling during the beam search decoding and paraphrasing questions and answers in the dataset as well. In addition, we can combine this method with other data augmentation methods, such as, the type swap method (Raiman & Miller, 2017), to acquire more diversity in paraphrases. ",
548
+ "bbox": [
549
+ 174,
550
+ 438,
551
+ 825,
552
+ 536
553
+ ],
554
+ "page_idx": 5
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "In our experiments, we observe that the proposed data augmentation can bring non-trivial improvement in terms of accuracy. We believe this technique is also applicable to other supervised natural language processing tasks, especially when the training data is insufficient. ",
559
+ "bbox": [
560
+ 176,
561
+ 542,
562
+ 823,
563
+ 584
564
+ ],
565
+ "page_idx": 5
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "4 EXPERIMENTS ",
570
+ "text_level": 1,
571
+ "bbox": [
572
+ 176,
573
+ 606,
574
+ 326,
575
+ 621
576
+ ],
577
+ "page_idx": 5
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "In this section, we conduct experiments to study the performance of our model and the data augmentation technique. We will primarily benchmark our model on the SQuAD dataset (Rajpurkar et al., 2016), considered to be one of the most competitive datasets in Q&A. We also conduct similar studies on TriviaQA (Joshi et al., 2017), another Q&A dataset, to show that the effectiveness and efficiency of our model are general. ",
582
+ "bbox": [
583
+ 174,
584
+ 637,
585
+ 825,
586
+ 707
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "4.1 EXPERIMENTS ON SQUAD ",
593
+ "text_level": 1,
594
+ "bbox": [
595
+ 176,
596
+ 724,
597
+ 400,
598
+ 739
599
+ ],
600
+ "page_idx": 5
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "4.1.1 DATASET AND EXPERIMENTAL SETTINGS ",
605
+ "text_level": 1,
606
+ "bbox": [
607
+ 174,
608
+ 751,
609
+ 516,
610
+ 766
611
+ ],
612
+ "page_idx": 5
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "Dataset. We consider the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016) for machine reading comprehension.8 SQuAD contains 107.7K query-answer pairs, with $8 7 . 5 \\mathrm { K }$ for training, 10.1K for validation, and another 10.1K for testing. The typical length of the paragraphs is around 250 while the question is of 10 tokens although there are exceptionally long cases. Only the training and validation data are publicly available, while the test data is hidden that one has to submit the code to a Codalab and work with the authors of (Rajpurkar et al., 2016) to retrieve the final test score. In our experiments, we report the test set result of our best single model.9 For further analysis, we only report the performance on the validation set, as we do not want to probe the unseen test set by frequent submissions. According to the observations from our experiments and previous works, such as (Seo et al., 2016; Xiong et al., 2016; Wang et al., 2017; Chen et al., 2017), the validation score is well correlated with the test score. ",
617
+ "bbox": [
618
+ 173,
619
+ 775,
620
+ 825,
621
+ 859
622
+ ],
623
+ "page_idx": 5
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "",
628
+ "bbox": [
629
+ 174,
630
+ 103,
631
+ 825,
632
+ 172
633
+ ],
634
+ "page_idx": 6
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "Data Preprocessing. We use the NLTK tokenizer to preprocess the data.10 The maximum context length is set to 400 and any paragraph longer than that would be discarded. During training, we batch the examples by length and dynamically pad the short sentences with special symbol ${ \\mathrm { < P A D > } }$ . The maximum answer length is set to 30. We use the pretrained 300-D word vectors GLoVe (Pennington et al., 2014), and all the out-of-vocabulary words are replace with ${ \\mathrm { < U N K > } }$ , whose embedding is updated during training. Each character embedding is randomly initialized as a 200-D vector, which is updated in training as well. We generate two additional augmented datasets obtained from Section 3, which contain 140K and $2 4 0 \\mathrm { K }$ examples and are denoted as “data augmentation $\\times 2 ^ { , , }$ and “data augmentation $\\times 3 ^ { \\mathfrak { r } }$ respectively, including the original data. ",
639
+ "bbox": [
640
+ 174,
641
+ 188,
642
+ 825,
643
+ 314
644
+ ],
645
+ "page_idx": 6
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "Training details. We employ two types of standard regularizations. First, we use L2 weight decay on all the trainable variables, with parameter $\\lambda = 3 \\times \\bar { 1 0 } ^ { - 7 }$ . We additionally use dropout on word, character embeddings and between layers, where the word and character dropout rates are 0.1 and 0.05 respectively, and the dropout rate between every two layers is 0.1. We also adopt the stochastic depth method (layer dropout) (Huang et al., 2016) within each embedding or model encoder layer, where sublayer l has survival probability $\\begin{array} { r } { p _ { l } = 1 - \\frac { l } { L } ( 1 - p _ { L } ) } \\end{array}$ where $L$ is the last layer and $p _ { L } = 0 . 9$ . ",
650
+ "bbox": [
651
+ 174,
652
+ 328,
653
+ 823,
654
+ 412
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "The hidden size and the convolution filter number are all 128, the batch size is 32, training steps are 150K for original data, 250K for “data augmentation $\\times 2 ^ { , , }$ , and 340K for “data augmentation $\\times 3 ^ { \\mathfrak { s } }$ . The numbers of convolution layers in the embedding and modeling encoder are 4 and 2, kernel sizes are 7 and 5, and the block numbers for the encoders are 1 and 7, respectively. ",
661
+ "bbox": [
662
+ 174,
663
+ 419,
664
+ 825,
665
+ 474
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We use the ADAM optimizer (Kingma & Ba, 2014) with $\\beta _ { 1 } = 0 . 8 , \\beta _ { 2 } = 0 . 9 9 9 , { \\epsilon } = 1 0 ^ { - 7 }$ . We use a learning rate warm-up scheme with an inverse exponential increase from 0.0 to 0.001 in the first 1000 steps, and then maintain a constant learning rate for the remainder of training. Exponential moving average is applied on all trainable variables with a decay rate 0.9999. ",
672
+ "bbox": [
673
+ 176,
674
+ 481,
675
+ 823,
676
+ 537
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "Finally, we implement our model in Python using Tensorflow (Abadi et al., 2016) and carry out our experiments on an NVIDIA p100 GPU.11 ",
683
+ "bbox": [
684
+ 174,
685
+ 544,
686
+ 823,
687
+ 571
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "4.1.2 RESULTS ",
694
+ "text_level": 1,
695
+ "bbox": [
696
+ 174,
697
+ 587,
698
+ 292,
699
+ 602
700
+ ],
701
+ "page_idx": 6
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "Accuracy. The F1 and Exact Match (EM) are two evaluation metrics of accuracy for the model performance. F1 measures the portion of overlap tokens between the predicted answer and groundtruth, while exact match score is 1 if the prediction is exactly the same as groundtruth or 0 otherwise. We show the results in comparison with other methods in Table 2. To make a fair and thorough comparison, we both report both the published results in their latest papers/preprints and the updated but not documented results on the leaderboard. We deem the latter as the unpublished results. As can be seen from the table, the accuracy (EM/F1) performance of our model is on par with the state-of-the-art models. In particular, our model trained on the original dataset outperforms all the documented results in the literature, in terms of both EM and F1 scores (see second column of Table 2). When trained with the augmented data with proper sampling scheme, our model can get significant gain 1.5/1.1 on EM/F1. Finally, our result on the official test set is 76.2/84.6, which significantly outperforms the best documented result 73.2/81.8. ",
706
+ "bbox": [
707
+ 174,
708
+ 611,
709
+ 825,
710
+ 777
711
+ ],
712
+ "page_idx": 6
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "Speedup over RNNs. To measure the speedup of our model against the RNN models, we also test the corresponding model architecture with each encoder block replaced with a stack of bidirectional ",
717
+ "bbox": [
718
+ 174,
719
+ 792,
720
+ 823,
721
+ 820
722
+ ],
723
+ "page_idx": 6
724
+ },
725
+ {
726
+ "type": "table",
727
+ "img_path": "images/cc9594e3b62f210894b68efbc063aa158c129ccf1657dbbc962796f4f433a62d.jpg",
728
+ "table_caption": [
729
+ "Table 2: The performances of different models on SQuAD dataset. "
730
+ ],
731
+ "table_footnote": [],
732
+ "table_body": "<table><tr><td></td><td>Published12</td><td>LeaderBoard13</td></tr><tr><td>Single Model</td><td>EM/F1</td><td>EM/F1</td></tr><tr><td>LR Baseline (Rajpurkar et al., 2016)</td><td>40.4/51.0</td><td>40.4/51.0</td></tr><tr><td>Dynamic Chunk Reader (Yu et al., 2016)</td><td>62.5 /71.0</td><td>62.5 /71.0</td></tr><tr><td>Match-LSTM with Ans-Ptr(Wang &amp; Jiang,2016)</td><td>64.7 /73.7</td><td>64.7 /73.7</td></tr><tr><td>Multi-Perspective Matching (Wang et al., 2016)</td><td>65.5 /75.1</td><td>70.4/78.8</td></tr><tr><td>Dynamic Coattention Networks (Xiong et al., 2016)</td><td>66.2 /75.9</td><td>66.2/75.9</td></tr><tr><td>FastQA(Weissenborn et al.,2017)</td><td>68.4/ 77.1</td><td>68.4/ 77.1</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>68.0 /77.3</td><td>68.0 /77.3</td></tr><tr><td>SEDT (Liu et al.,2017a)</td><td>68.1 / 77.5</td><td>68.5/78.0</td></tr><tr><td>RaSoR (Lee et al.,2016)</td><td>70.8/78.7</td><td>69.6/77.7</td></tr><tr><td>FastQAExt (Weissenborn et al.,2017)</td><td>70.8 / 78.9</td><td>70.8/78.9</td></tr><tr><td>ReasoNet (Shen et al.,2017b)</td><td>69.1/78.9</td><td>70.6/79.4</td></tr><tr><td>Document Reader (Chen et al., 2017)</td><td>70.0 /79.0</td><td>70.7 /79.4</td></tr><tr><td>Ruminating Reader (Gong &amp; Bowman, 2017)</td><td>70.6 / 79.5</td><td>70.6 / 79.5</td></tr><tr><td>jNet (Zhang et al., 2017)</td><td>70.6 /79.8</td><td>70.6 /79.8</td></tr><tr><td>Conductor-net</td><td>N/A</td><td>72.6 /81.4</td></tr><tr><td>Interactive AoA Reader (Cui etal.,2017)</td><td>N/A</td><td>73.6 /81.9</td></tr><tr><td>Reg-RaSoR</td><td>N/A</td><td>75.8 /83.3</td></tr><tr><td>DCN+</td><td>N/A</td><td>74.9 /82.8</td></tr><tr><td>AIR-FusionNet</td><td>N/A</td><td>76.0 /83.9</td></tr><tr><td>R-Net (Wang et al., 2017)</td><td>72.3 / 80.7</td><td>76.5 /84.3</td></tr><tr><td>BiDAF+ Self Attention+ELMo</td><td>N/A</td><td>77.9/85.3</td></tr><tr><td>Reinforced Mnemonic Reader (Hu et al., 2017)</td><td>73.2 /81.8</td><td>73.2 /81.8</td></tr><tr><td>Dev set: QANet</td><td>73.6/82.7</td><td>N/A</td></tr><tr><td>Dev set: QANet + data augmentation ×2</td><td>74.5 /83.2</td><td>N/A</td></tr><tr><td>Dev set: QANet + data augmentation ×3</td><td>75.1/ 83.8</td><td>N/A</td></tr><tr><td>Test set: QANet + data augmentation ×3</td><td>76.2 / 84.6</td><td>76.2/84.6</td></tr></table>",
733
+ "bbox": [
734
+ 232,
735
+ 102,
736
+ 763,
737
+ 459
738
+ ],
739
+ "page_idx": 7
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "LSTMs as is used in most existing models. Specifically, each (embedding and model) encoder block is replaced with a 1, 2, or 3 layer Bidirectional LSTMs respectively, as such layer numbers fall into the usual range of the reading comprehension models (Chen et al., 2017). All of these LSTMs have hidden size 128. The results of the speedup comparison are shown in Table 3. We can easily see that our model is significantly faster than all the RNN based models and the speedups range from 3 to 13 times in training and 4 to 9 times in inference. ",
744
+ "bbox": [
745
+ 173,
746
+ 522,
747
+ 825,
748
+ 607
749
+ ],
750
+ "page_idx": 7
751
+ },
752
+ {
753
+ "type": "table",
754
+ "img_path": "images/25a07ce3aeb5cbce6630a8537c101c1a7b787cfdbabdb73a6bc54ceb49788693.jpg",
755
+ "table_caption": [
756
+ "Table 3: Speed comparison between our model and RNN-based models on SQuAD dataset, all with batch size 32. RNN- $x$ - $y$ indicates an RNN with $x$ layers each containing $y$ hidden units. Here, we use bidirectional LSTM as the RNN. The speed is measured by batches/second, so higher is faster. "
757
+ ],
758
+ "table_footnote": [],
759
+ "table_body": "<table><tr><td></td><td>QANet</td><td>RNN-1-128</td><td>Speedup</td><td>RNN-2-128</td><td>Speedup</td><td>RNN-3-128 Speedup</td></tr><tr><td>Training</td><td>3.2</td><td>1.1</td><td>2.9x</td><td>0.34</td><td>9.4x</td><td>0.24 13.3x</td></tr><tr><td>Inference</td><td>8.1</td><td>2.2</td><td>3.7x</td><td>1.3</td><td>6.2x</td><td>0.92 8.8x</td></tr></table>",
760
+ "bbox": [
761
+ 186,
762
+ 626,
763
+ 807,
764
+ 667
765
+ ],
766
+ "page_idx": 7
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "Speedup over BiDAF model. In addition, we also use the same hardware (a NVIDIA p100 GPU) and compare the training time of getting the same performance between our model and the BiDAF model14(Seo et al., 2016), a classic RNN-based model on SQuAD. We mostly adopt the default settings in the original code to get its best performance, where the batch sizes for training and inference are both 60. The only part we changed is the optimizer, where Adam with learning 0.001 is used here, as with Adadelta we got a bit worse performance. The result is shown in Table 4 which shows that our model is 4.3 and 7.0 times faster than BiDAF in training and inference speed. Besides, we only need one fifth of the training time to achieve BiDAF’s best F1 score (77.0) on dev set. ",
771
+ "bbox": [
772
+ 174,
773
+ 763,
774
+ 825,
775
+ 888
776
+ ],
777
+ "page_idx": 7
778
+ },
779
+ {
780
+ "type": "table",
781
+ "img_path": "images/d29df3e7e13017656f5dd05e35c01ac857d6f633cfa713fe38cdc4fd88039907.jpg",
782
+ "table_caption": [
783
+ "Table 4: Speed comparison between our model and BiDAF (Seo et al., 2016) on SQuAD dataset. "
784
+ ],
785
+ "table_footnote": [],
786
+ "table_body": "<table><tr><td></td><td>Train time to get 77.0 F1onDev set</td><td>Train speed</td><td>Inference speed</td></tr><tr><td>QANet</td><td>3hours</td><td>102 samples/s</td><td>259 samples/s</td></tr><tr><td>BiDAF</td><td>15 hours</td><td>24 samples/s</td><td>37samples/s</td></tr><tr><td>Speedup</td><td>5.0x</td><td>4.3x</td><td>7.0x</td></tr></table>",
787
+ "bbox": [
788
+ 238,
789
+ 101,
790
+ 758,
791
+ 156
792
+ ],
793
+ "page_idx": 8
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "4.1.3 ABALATION STUDY AND ANALYSIS ",
798
+ "text_level": 1,
799
+ "bbox": [
800
+ 176,
801
+ 213,
802
+ 475,
803
+ 227
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "We conduct ablation studies on components of the proposed model, and investigate the effect of augmented data. The validation scores on the development set are shown in Table 5. As can be seen from the table, the use of convolutions in the encoders is crucial: both F1 and EM drop drastically by almost 3 percent if it is removed. Self-attention in the encoders is also a necessary component that contributes 1.4/1.3 gain of EM/F1 to the ultimate performance. We interpret these phenomena as follows: the convolutions capture the local structure of the context while the self-attention is able to model the global interactions between text. Hence they are complimentary to but cannot replace each other. The use of separable convolutions in lieu of tradition convolutions also has a prominent contribution to the performance, which can be seen by the slightly worse accuracy caused by replacing separable convolution with normal convolution. ",
810
+ "bbox": [
811
+ 174,
812
+ 237,
813
+ 825,
814
+ 376
815
+ ],
816
+ "page_idx": 8
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "The Effect of Data Augmentation. We additionally perform experiments to understand the values of augmented data as their amount increases. As the last block of rows in the table shows, data augmentation proves to be helpful in further boosting performance. Making the training data twice as large by adding the En-Fr-En data only (ratio 1:1 between original training data and augmented data, as indicated by row “data augmentation $\\times 2$ (1:1:0)”) yields an increase in the F1 by 0.5 percent. While adding more augmented data with French as a pivot does not provide performance gain, injecting additional augmented data En-De-En of the same amount brings another 0.2 improvement in F1, as indicated in entry “data augmentation $\\times \\ 3$ (1:1:1)”. We may attribute this gain to the diversity of the new data, which is produced by the translator of the new language. ",
821
+ "bbox": [
822
+ 173,
823
+ 391,
824
+ 825,
825
+ 517
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "The Effect of Sampling Scheme. Although injecting more data beyond $\\times \\ 3$ does not benefit the model, we observe that a good sampling ratio between the original and augmented data during training can further boost the model performance. In particular, when we increase the sampling weight of augmented data from (1:1:1) to (1:2:1), the EM/F1 performance drops by $0 . 5 / 0 . 3$ . We conjecture that it is due to the fact that augmented data is noisy because of the back-translation, so it should not be the dominant data of training. We confirm this point by increasing the ratio of the original data from (1:2:1) to (2:2:1), where $0 . 6 / 0 . 5$ performance gain on EM/F1 is obtained. Then we fix the portion of the augmented data, and search the sample weight of the original data. Empirically, the ratio (3:1:1) yields the best performance, with 1.5/1.1 gain over the base model on EM/F1. This is also the model we submitted for test set evaluation. ",
832
+ "bbox": [
833
+ 174,
834
+ 532,
835
+ 825,
836
+ 671
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "4.1.4 ROBUSTNESS STUDY ",
843
+ "text_level": 1,
844
+ "bbox": [
845
+ 176,
846
+ 686,
847
+ 372,
848
+ 700
849
+ ],
850
+ "page_idx": 8
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "In the following, we conduct experiments on the adversarial SQuAD dataset (Jia & Liang, 2017) to study the robustness of the proposed model. In this dataset, one or more sentences are appended to the original SQuAD context of test set, to intentionally mislead the trained models to produce wrong answers. However, the model is agnostic to those adversarial examples during training. We focus on two types of misleading sentences, namely, AddSent and AddOneSent. AddSent generates sentences that are similar to the question, but not contradictory to the correct answer, while AddOneSent adds a random human-approved sentence that is not necessarily related to the context. ",
855
+ "bbox": [
856
+ 174,
857
+ 712,
858
+ 825,
859
+ 809
860
+ ],
861
+ "page_idx": 8
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "The model in use is exactly the one trained with the original SQuAD data (the one getting 84.6 F1 on test set), but now it is submitted to the adversarial server for evaluation. The results are shown in Table 6, where the F1 scores of other models are all extracted from Jia & Liang (2017).15 Again, we only compare the performance of single models. From Table 6, we can see that our model is on par with the state-of-the-art model Mnemonic, while significantly better than other models by a large margin. The robustness of our model is probably because it is trained with augmented data. ",
866
+ "bbox": [
867
+ 174,
868
+ 815,
869
+ 825,
870
+ 900
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "table",
876
+ "img_path": "images/bc927b735cba47d5ee3de224a26980dc3ddab48f3da46f97c723935bc37ba321.jpg",
877
+ "table_caption": [
878
+ "Table 5: An ablation study of data augmentation and other aspects of our model. The reported results are obtained on the development set. For rows containing entry “data augmentation”, $^ { 6 6 } \\times N ^ { \\prime }$ means the data is enhanced to $N$ times as large as the original size, while the ratio in the bracket indicates the sampling ratio among the original, English-French-English and English-German-English data during training. "
879
+ ],
880
+ "table_footnote": [],
881
+ "table_body": "<table><tr><td colspan=\"2\"></td><td>EM/F1</td><td>Differenceto Base Model EM/F1</td></tr><tr><td colspan=\"2\">Base QANet</td><td>73.6/82.7</td><td></td></tr><tr><td rowspan=\"3\"></td><td>- convolution in encoders</td><td>70.8/ 80.0</td><td>-2.8/-2.7</td></tr><tr><td>- self-attention in encoders</td><td>72.2 /81.4</td><td>-1.4 / -1.3</td></tr><tr><td>replace sep convolution with normal convolution</td><td>72.9 / 82.0</td><td>- 0.7/-0.7</td></tr><tr><td></td><td>+ data augmentation ×2 (1:1:0)</td><td>74.5/83.2</td><td>+0.9/+0.5</td></tr><tr><td></td><td>+ data augmentation ×3 (1:1:1)</td><td>74.8 /83.4</td><td>+1.2/+0.7</td></tr><tr><td></td><td>+ data augmentation ×3 (1:2:1)</td><td>74.3/83.1</td><td>+0.7 /+0.4</td></tr><tr><td></td><td>+ data augmentation ×3 (2:2:1)</td><td>74.9 / 83.6</td><td>+1.3/+0.9</td></tr><tr><td></td><td>+ data augmentation ×3 (2:1:1)</td><td>75.0 / 83.6</td><td>+1.4 /+0.9</td></tr><tr><td></td><td>+ data augmentation ×3 (3:1:1)</td><td>75.1/83.8</td><td>+1.5 / +1.1</td></tr><tr><td></td><td>+ data augmentation ×3 (4:1:1)</td><td>75.0 / 83.6</td><td>+1.4/ +0.9</td></tr><tr><td>+ data augmentation ×3 (5:1:1)</td><td></td><td>74.9 / 83.5</td><td>+1.3 /+0.8</td></tr></table>",
882
+ "bbox": [
883
+ 178,
884
+ 99,
885
+ 818,
886
+ 282
887
+ ],
888
+ "page_idx": 9
889
+ },
890
+ {
891
+ "type": "table",
892
+ "img_path": "images/1a768742b8680b8297a08caa97202881c15308d56b48441086d4b47dad653923.jpg",
893
+ "table_caption": [
894
+ "The injected noise in the training data might not only improve the generalization of the model but also make it robust to the adversarial sentences. ",
895
+ "Table 6: The F1 scores on the adversarial SQuAD test set. "
896
+ ],
897
+ "table_footnote": [],
898
+ "table_body": "<table><tr><td>Single Model</td><td>AddSent</td><td>AddOneSent</td></tr><tr><td>Logistic (Rajpurkar et al.,2016)</td><td>23.2</td><td>30.4</td></tr><tr><td>Match (Wang &amp; Jiang,2016)</td><td>27.3</td><td>39.0</td></tr><tr><td>SEDT (Liu et al., 2017a)</td><td>33.9</td><td>44.8</td></tr><tr><td>DCR (Yu et al., 2016)</td><td>37.8</td><td>45.1</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>34.3</td><td>45.7</td></tr><tr><td>jNet (Zhang et al.,2017)</td><td>37.9</td><td>47.0</td></tr><tr><td>Ruminating (Gong &amp; Bowman, 2017)</td><td>37.4</td><td>47.7</td></tr><tr><td>RaSOR (Lee et al., 2016)</td><td>39.5</td><td>49.5</td></tr><tr><td>MPCM (Wang et al.,2016)</td><td>40.3</td><td>50.0</td></tr><tr><td>ReasoNet (Shen et al.,2017b)</td><td>39.4</td><td>50.3</td></tr><tr><td>Mnemonic (Hu et al.,2017)</td><td>46.6</td><td>56.0</td></tr><tr><td>QANet</td><td>45.2</td><td>55.7</td></tr></table>",
899
+ "bbox": [
900
+ 290,
901
+ 433,
902
+ 705,
903
+ 602
904
+ ],
905
+ "page_idx": 9
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "4.2 EXPERIMENTS ON TRIVIAQA ",
910
+ "text_level": 1,
911
+ "bbox": [
912
+ 176,
913
+ 660,
914
+ 418,
915
+ 675
916
+ ],
917
+ "page_idx": 9
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "In this section, we test our model on another dataset TriviaQA (Joshi et al., 2017), which consists of 650K context-query-answer triples. There are 95K distinct question-answer pairs, which are authored by Trivia enthusiasts, with 6 evidence documents (context) per question on average, which are either crawled from Wikipedia or Web search. Compared to SQuAD, TriviaQA is more challenging in that: 1) its examples have much longer context (2895 tokens per context on average) and may contain several paragraphs, 2) it is much noisier than SQuAD due to the lack of human labeling, 3) it is possible that the context is not related to the answer at all, as it is crawled by key words. ",
922
+ "bbox": [
923
+ 174,
924
+ 686,
925
+ 825,
926
+ 784
927
+ ],
928
+ "page_idx": 9
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "In this paper, we focus on testing our model on the subset consisting of answers from Wikipedia. According to the previous work (Joshi et al., 2017; Hu et al., 2017; Pan et al., 2017), the same model would have similar performance on both Wikipedia and Web, but the latter is five time larger. To keep the training time manageable, we omit the experiment on Web data. ",
933
+ "bbox": [
934
+ 174,
935
+ 791,
936
+ 825,
937
+ 847
938
+ ],
939
+ "page_idx": 9
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "Due to the multi-paragraph nature of the context, researchers also find that simple hierarchical or multi-step reading tricks, such as first predicting which paragraph to read and then apply models like BiDAF to pinpoint the answer within that paragraph (Clark & Gardner, 2017), can significantly boost the performance on TriviaQA. However, in this paper, we focus on comparing with the single-paragraph reading baselines only. We believe that our model can be plugged into other multi-paragraph reading methods to achieve the similar or better performance, but it is out of the scope of this paper. ",
944
+ "bbox": [
945
+ 174,
946
+ 854,
947
+ 823,
948
+ 924
949
+ ],
950
+ "page_idx": 9
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "",
955
+ "bbox": [
956
+ 173,
957
+ 103,
958
+ 823,
959
+ 132
960
+ ],
961
+ "page_idx": 10
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "The Wikipedia sub-dataset contains around 92K training and 11K development examples. The average context and question lengths are 495 and 15 respectively. In addition to the full development set, the authors of Joshi et al. (2017) also pick a verified subset that all the contexts inside can answer the associated questions. As the text could be long, we adopt the data processing similar to Hu et al. (2017); Joshi et al. (2017). In particular, for training and validation, we randomly select a window of length 256 and 400 encapsulating the answer respectively. All the remaining setting are the same as SQuAD experiment, except that the training steps are set to 120K. ",
966
+ "bbox": [
967
+ 174,
968
+ 138,
969
+ 825,
970
+ 236
971
+ ],
972
+ "page_idx": 10
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "Accuracy. The accuracy performance on the development set is shown in Table 7. Again, we can see that our model outperforms the baselines in terms of F1 and EM on Full development set, and is on par with the state-of-the-art on the Verified dev set. ",
977
+ "bbox": [
978
+ 174,
979
+ 252,
980
+ 821,
981
+ 295
982
+ ],
983
+ "page_idx": 10
984
+ },
985
+ {
986
+ "type": "table",
987
+ "img_path": "images/f7d10a8a64ad85797a53ad44f4b8aa0073331e222021e5c5e9224515469e648c.jpg",
988
+ "table_caption": [
989
+ "Table 7: The development set performances of different single-paragraph reading models on the Wikipedia domain of TriviaQA dataset. Note that ∗ indicates the result on test set. "
990
+ ],
991
+ "table_footnote": [],
992
+ "table_body": "<table><tr><td></td><td>Full</td><td>Verified</td></tr><tr><td>Single Model</td><td>EM/F1</td><td>EM/F1</td></tr><tr><td>Random (Joshi et al.,2017)</td><td>12.7 /22.5</td><td>13.8/23.4</td></tr><tr><td>Classifier (Joshi et al., 2017)</td><td>23.4 / 27.7</td><td>23.6 /27.9</td></tr><tr><td>BiDAF (Seo et al., 2016)</td><td>40.3/45.7</td><td>46.5 /52.8</td></tr><tr><td>MEMEN (Pan et al.,2017)</td><td>43.2/46.9</td><td>49.3 / 55.8</td></tr><tr><td>M-Reader (Hu et al., 2017)*</td><td>46.9/ 52.9*</td><td>54.5/ 59.5*</td></tr><tr><td>QANet</td><td>51.1/ 56.6</td><td>53.3/59.2</td></tr></table>",
993
+ "bbox": [
994
+ 316,
995
+ 308,
996
+ 679,
997
+ 414
998
+ ],
999
+ "page_idx": 10
1000
+ },
1001
+ {
1002
+ "type": "table",
1003
+ "img_path": "images/8ce95fcc9e4a5663a753ef2f3dd783933ac2ddce830d17f0930a389c364e10dd.jpg",
1004
+ "table_caption": [
1005
+ "Speedup over RNNs. In addition to accuracy, we also benchmark the speed of our model against the RNN counterparts. As Table 8 shows, not surprisingly, our model has 3 to 11 times speedup in training and 3 to 9 times acceleration in inference, similar to the finding in SQuAD dataset. "
1006
+ ],
1007
+ "table_footnote": [],
1008
+ "table_body": "<table><tr><td></td><td>QANet</td><td>RNN-1-128</td><td>Speedup</td><td>RNN-2-128</td><td>Speedup</td><td>RNN-3-128</td><td>Speedup</td></tr><tr><td>Training</td><td>1.8</td><td>0.41</td><td>4.4x</td><td>0.20</td><td>9.0x</td><td>0.11</td><td>16.4x</td></tr><tr><td>Inference</td><td>3.2</td><td>0.89</td><td>3.6x</td><td>0.47</td><td>6.8x</td><td>0.26</td><td>12.3x</td></tr></table>",
1009
+ "bbox": [
1010
+ 186,
1011
+ 539,
1012
+ 808,
1013
+ 580
1014
+ ],
1015
+ "page_idx": 10
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "Table 8: Speed comparison between the proposed model and RNN-based models on TriviaQA Wikipedia dataset, all with batch size 32. RNN- $x$ - $y$ indicates an RNN with $x$ layers each containing $y$ hidden units. The RNNs used here are bidirectional LSTM. The processing speed is measured by batches/second, so higher is faster. ",
1020
+ "bbox": [
1021
+ 173,
1022
+ 597,
1023
+ 825,
1024
+ 654
1025
+ ],
1026
+ "page_idx": 10
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "5 RELATED WORK ",
1031
+ "text_level": 1,
1032
+ "bbox": [
1033
+ 176,
1034
+ 689,
1035
+ 344,
1036
+ 705
1037
+ ],
1038
+ "page_idx": 10
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Machine reading comprehension and automated question answering has become an important topic in the NLP domain. Their popularity can be attributed to an increase in publicly available annotated datasets, such as SQuAD (Rajpurkar et al., 2016), TriviaQA (Joshi et al., 2017), CNN/Daily News (Hermann et al., 2015), WikiReading (Hewlett et al., 2016), Children Book Test (Hill et al., 2015), etc. A great number of end-to-end neural network models have been proposed to tackle these challenges, including BiDAF (Seo et al., 2016), r-net (Wang et al., 2017), DCN (Xiong et al., 2016), ReasoNet (Shen et al., 2017b), Document Reader (Chen et al., 2017), Interactive AoA Reader (Cui et al., 2017) and Reinforced Mnemonic Reader (Hu et al., 2017). ",
1043
+ "bbox": [
1044
+ 173,
1045
+ 722,
1046
+ 825,
1047
+ 833
1048
+ ],
1049
+ "page_idx": 10
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Recurrent Neural Networks (RNNs) have featured predominatnly in Natural Language Processing in the past few years. The sequential nature of the text coincides with the design philosophy of RNNs, and hence their popularity. In fact, all the reading comprehension models mentioned above are based on RNNs. Despite being common, the sequential nature of RNN prevent parallel computation, as tokens must be fed into the RNN in order. Another drawback of RNNs is difficulty modeling long dependencies, although this is somewhat alleviated by the use of Gated Recurrent Unit (Chung et al., ",
1054
+ "bbox": [
1055
+ 174,
1056
+ 840,
1057
+ 825,
1058
+ 924
1059
+ ],
1060
+ "page_idx": 10
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "2014) or Long Short Term Memory architectures (Hochreiter & Schmidhuber, 1997). For simple tasks such as text classification, with reinforcement learning techniques, models (Yu et al., 2017) have been proposed to skip irrelevant tokens to both further address the long dependencies issue and speed up the procedure. However, it is not clear if such methods can handle complicated tasks such as Q&A. The reading comprehension task considered in this paper always needs to deal with long text, as the context paragraphs may be hundreds of words long. Recently, attempts have been made to replace the recurrent networks by full convolution or full attention architectures (Kim, 2014; Gehring et al., 2017; Vaswani et al., 2017b; Shen et al., 2017a). Those models have been shown to be not only faster than the RNN architectures, but also effective in other tasks, such as text classification, machine translation or sentiment analysis. ",
1065
+ "bbox": [
1066
+ 174,
1067
+ 103,
1068
+ 825,
1069
+ 242
1070
+ ],
1071
+ "page_idx": 11
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "To the best of our knowledge, our paper is the first work to achieve both fast and accurate reading comprehension model, by discarding the recurrent networks in favor of feed forward architectures. Our paper is also the first to mix self-attention and convolutions, which proves to be empirically effective and achieves a significant gain of 2.7 F1. Note that Raiman & Miller (2017) recently proposed to accelerate reading comprehension by avoiding bi-directional attention and making computation conditional on the search beams. Nevertheless, their model is still based on the RNNs and the accuracy is not competitive, with an $\\mathrm { E M } 6 8 . 4$ and F1 76.2. Weissenborn et al. (2017) also tried to build a fast Q&A model by deleting the context-query attention module. However, it again relied on RNN and is thus intrinsically slower than ours. The elimination of attention further has sacrificed the performance (with EM 68.4 and F1 77.1). ",
1076
+ "bbox": [
1077
+ 174,
1078
+ 250,
1079
+ 823,
1080
+ 388
1081
+ ],
1082
+ "page_idx": 11
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Data augmentation has also been explored in natural language processing. For example, Zhang et al. (2015) proposed to enhance the dataset by replacing the words with their synonyms and showed its effectiveness in text classification. Raiman & Miller (2017) suggested using type swap to augment the $\\mathrm { S Q u A D }$ dataset, which essentially replaces the words in the original paragraph with others with the same type. While it was shown to improve the accuracy, the augmented data has the same syntactic structure as the original data, so they are not sufficiently diverse. Zhou et al. (2017) improved the diversity of the SQuAD data by generating more questions. However, as reported by Wang et al. (2017), their method did not help improve the performance. The data augmentation technique proposed in this paper is based on paraphrasing the sentences by translating the original text back and forth. The major benefit is that it can bring more syntactical diversity to the enhanced data. ",
1087
+ "bbox": [
1088
+ 174,
1089
+ 395,
1090
+ 825,
1091
+ 535
1092
+ ],
1093
+ "page_idx": 11
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "6 CONCLUSION ",
1098
+ "text_level": 1,
1099
+ "bbox": [
1100
+ 176,
1101
+ 555,
1102
+ 318,
1103
+ 571
1104
+ ],
1105
+ "page_idx": 11
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "In this paper, we propose a fast and accurate end-to-end model, QANet, for machine reading comprehension. Our core innovation is to completely remove the recurrent networks in the encoder. The resulting model is fully feedforward, composed entirely of separable convolutions, attention, linear layers, and layer normalization, which is suitable for parallel computation. The resulting model is both fast and accurate: It surpasses the best published results on SQuAD dataset while up to 13/9 times faster than a competitive recurrent models for a training/inference iteration. Additionally, we find that we are able to achieve significant gains by utilizing data augmentation consisting of translating context and passage pairs to and from another language as a way of paraphrasing the questions and contexts. ",
1110
+ "bbox": [
1111
+ 174,
1112
+ 588,
1113
+ 825,
1114
+ 713
1115
+ ],
1116
+ "page_idx": 11
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "ACKNOWLEDGEMENT ",
1121
+ "text_level": 1,
1122
+ "bbox": [
1123
+ 176,
1124
+ 734,
1125
+ 356,
1126
+ 750
1127
+ ],
1128
+ "page_idx": 11
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "Adams Wei Yu is supported by NVIDIA PhD Fellowship and CMU Presidential Fellowship. We would like to thank Samy Bengio, Lei Huang, Minjoon Seo, Noam Shazeer, Ashish Vaswani, Barret Zoph and the Google Brain Team for helpful discussions. ",
1133
+ "bbox": [
1134
+ 174,
1135
+ 765,
1136
+ 823,
1137
+ 808
1138
+ ],
1139
+ "page_idx": 11
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "REFERENCES ",
1144
+ "text_level": 1,
1145
+ "bbox": [
1146
+ 174,
1147
+ 830,
1148
+ 285,
1149
+ 844
1150
+ ],
1151
+ "page_idx": 11
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz ´ Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Gor- ´ don Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal ",
1156
+ "bbox": [
1157
+ 176,
1158
+ 854,
1159
+ 823,
1160
+ 924
1161
+ ],
1162
+ "page_idx": 11
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viegas, Oriol Vinyals, ´ Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467. ",
1167
+ "bbox": [
1168
+ 189,
1169
+ 103,
1170
+ 825,
1171
+ 160
1172
+ ],
1173
+ "page_idx": 12
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Lei Jimmy Ba, Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016. URL http://arxiv.org/abs/1607.06450. ",
1178
+ "bbox": [
1179
+ 171,
1180
+ 167,
1181
+ 823,
1182
+ 196
1183
+ ],
1184
+ "page_idx": 12
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015. ",
1189
+ "bbox": [
1190
+ 174,
1191
+ 205,
1192
+ 823,
1193
+ 234
1194
+ ],
1195
+ "page_idx": 12
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1870–1879, 2017. ",
1200
+ "bbox": [
1201
+ 173,
1202
+ 243,
1203
+ 825,
1204
+ 299
1205
+ ],
1206
+ "page_idx": 12
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Franc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. CoRR, abs/1610.02357, 2016. URL http://arxiv.org/abs/1610.02357. ",
1211
+ "bbox": [
1212
+ 173,
1213
+ 308,
1214
+ 821,
1215
+ 338
1216
+ ],
1217
+ "page_idx": 12
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. ",
1222
+ "bbox": [
1223
+ 171,
1224
+ 344,
1225
+ 821,
1226
+ 375
1227
+ ],
1228
+ "page_idx": 12
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Christopher Clark and Matt Gardner. Simple and effective multi-paragraph reading comprehension. CoRR, abs/1710.10723, 2017. URL http://arxiv.org/abs/1710.10723. ",
1233
+ "bbox": [
1234
+ 174,
1235
+ 382,
1236
+ 821,
1237
+ 412
1238
+ ],
1239
+ "page_idx": 12
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 593–602, 2017. ",
1244
+ "bbox": [
1245
+ 174,
1246
+ 420,
1247
+ 825,
1248
+ 477
1249
+ ],
1250
+ "page_idx": 12
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Li Dong, Jonathan Mallinson, Siva Reddy, and Mirella Lapata. Learning to paraphrase for question answering. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 875–886. Association for Computational Linguistics, 2017. URL http://aclweb.org/anthology/D17-1091. ",
1255
+ "bbox": [
1256
+ 173,
1257
+ 486,
1258
+ 825,
1259
+ 542
1260
+ ],
1261
+ "page_idx": 12
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. In International Conference on Machine Learning, 2017. ",
1266
+ "bbox": [
1267
+ 171,
1268
+ 550,
1269
+ 821,
1270
+ 579
1271
+ ],
1272
+ "page_idx": 12
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Yichen Gong and Samuel R. Bowman. Ruminating reader: Reasoning with gated multi-hop attention. CoRR, abs/1704.07415, 2017. URL http://arxiv.org/abs/1704.07415. ",
1277
+ "bbox": [
1278
+ 173,
1279
+ 588,
1280
+ 823,
1281
+ 617
1282
+ ],
1283
+ "page_idx": 12
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 1693–1701, 2015. ",
1288
+ "bbox": [
1289
+ 173,
1290
+ 625,
1291
+ 825,
1292
+ 681
1293
+ ],
1294
+ "page_idx": 12
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Daniel Hewlett, Alexandre Lacoste, Llion Jones, Illia Polosukhin, Andrew Fandrianto, Jay Han, Matthew Kelcey, and David Berthelot. Wikireading: A novel large-scale language understanding task over wikipedia. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers, 2016. ",
1299
+ "bbox": [
1300
+ 173,
1301
+ 689,
1302
+ 825,
1303
+ 760
1304
+ ],
1305
+ "page_idx": 12
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. CoRR, abs/1511.02301, 2015. ",
1310
+ "bbox": [
1311
+ 171,
1312
+ 768,
1313
+ 821,
1314
+ 797
1315
+ ],
1316
+ "page_idx": 12
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1321
+ "bbox": [
1322
+ 171,
1323
+ 806,
1324
+ 823,
1325
+ 835
1326
+ ],
1327
+ "page_idx": 12
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Minghao Hu, Yuxing Peng, and Xipeng Qiu. Reinforced mnemonic reader for machine comprehension. CoRR, abs/1705.02798, 2017. URL http://arxiv.org/abs/1705.02798. ",
1332
+ "bbox": [
1333
+ 173,
1334
+ 843,
1335
+ 823,
1336
+ 873
1337
+ ],
1338
+ "page_idx": 12
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, pp. 646–661, 2016. ",
1343
+ "bbox": [
1344
+ 174,
1345
+ 881,
1346
+ 825,
1347
+ 924
1348
+ ],
1349
+ "page_idx": 12
1350
+ },
1351
+ {
1352
+ "type": "text",
1353
+ "text": "Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 2021–2031, 2017. ",
1354
+ "bbox": [
1355
+ 178,
1356
+ 103,
1357
+ 823,
1358
+ 146
1359
+ ],
1360
+ "page_idx": 13
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1601–1611, 2017. ",
1365
+ "bbox": [
1366
+ 173,
1367
+ 156,
1368
+ 825,
1369
+ 214
1370
+ ],
1371
+ "page_idx": 13
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Lukasz Kaiser, Aidan N Gomez, and Francois Chollet. Depthwise separable convolutions for neural machine translation. arXiv preprint arXiv:1706.03059, 2017. ",
1376
+ "bbox": [
1377
+ 171,
1378
+ 224,
1379
+ 823,
1380
+ 253
1381
+ ],
1382
+ "page_idx": 13
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, October 25- 29, 2014, Doha, Qatar, A meeting of SIGDAT, a Special Interest Group of the ACL, pp. 1746– 1751, 2014. ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 265,
1390
+ 826,
1391
+ 320
1392
+ ],
1393
+ "page_idx": 13
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. ",
1398
+ "bbox": [
1399
+ 173,
1400
+ 332,
1401
+ 823,
1402
+ 361
1403
+ ],
1404
+ "page_idx": 13
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "Kenton Lee, Tom Kwiatkowski, Ankur P. Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. CoRR, abs/1611.01436, 2016. ",
1409
+ "bbox": [
1410
+ 173,
1411
+ 371,
1412
+ 823,
1413
+ 401
1414
+ ],
1415
+ "page_idx": 13
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "Rui Liu, Junjie Hu, Wei Wei, Zi Yang, and Eric Nyberg. Structural embedding of syntactic trees for machine comprehension. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 826–835, 2017a. ",
1420
+ "bbox": [
1421
+ 173,
1422
+ 411,
1423
+ 825,
1424
+ 468
1425
+ ],
1426
+ "page_idx": 13
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "Xiaodong Liu, Yelong Shen, Kevin Duh, and Jianfeng Gao. Stochastic answer networks for machine reading comprehension. CoRR, abs/1712.03556, 2017b. URL http://arxiv.org/abs/ 1712.03556. ",
1431
+ "bbox": [
1432
+ 173,
1433
+ 479,
1434
+ 823,
1435
+ 522
1436
+ ],
1437
+ "page_idx": 13
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. In EMNLP, 2015. ",
1442
+ "bbox": [
1443
+ 173,
1444
+ 532,
1445
+ 821,
1446
+ 561
1447
+ ],
1448
+ "page_idx": 13
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "Minh-Thang Luong, Eugene Brevdo, and Rui Zhao. Neural machine translation (seq2seq) tutorial. https://github.com/tensorflow/nmt, 2017. ",
1453
+ "bbox": [
1454
+ 173,
1455
+ 571,
1456
+ 823,
1457
+ 602
1458
+ ],
1459
+ "page_idx": 13
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "Jonathan Mallinson, Rico Sennrich, and Mirella Lapata. Paraphrasing revisited with neural machine translation. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pp. 881–893. Association for Computational Linguistics, 2017. URL http://aclweb.org/anthology/E17-1083. ",
1464
+ "bbox": [
1465
+ 174,
1466
+ 612,
1467
+ 825,
1468
+ 670
1469
+ ],
1470
+ "page_idx": 13
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "Boyuan Pan, Hao Li, Zhou Zhao, Bin Cao, Deng Cai, and Xiaofei He. MEMEN: multi-layer embedding with memory networks for machine comprehension. CoRR, abs/1707.09098, 2017. ",
1475
+ "bbox": [
1476
+ 169,
1477
+ 679,
1478
+ 823,
1479
+ 709
1480
+ ],
1481
+ "page_idx": 13
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word//w representation. In Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, 2014. URL http://www.aclweb.org/anthology/D14-1162. ",
1486
+ "bbox": [
1487
+ 173,
1488
+ 719,
1489
+ 825,
1490
+ 763
1491
+ ],
1492
+ "page_idx": 13
1493
+ },
1494
+ {
1495
+ "type": "text",
1496
+ "text": "Jonathan Raiman and John Miller. Globally normalized reader. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, Denmark, September 9-11, 2017, pp. 1070–1080, 2017. ",
1497
+ "bbox": [
1498
+ 173,
1499
+ 773,
1500
+ 825,
1501
+ 816
1502
+ ],
1503
+ "page_idx": 13
1504
+ },
1505
+ {
1506
+ "type": "text",
1507
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP 2016, Austin, Texas, USA, November 1-4, 2016, pp. 2383–2392, 2016. ",
1508
+ "bbox": [
1509
+ 173,
1510
+ 827,
1511
+ 825,
1512
+ 883
1513
+ ],
1514
+ "page_idx": 13
1515
+ },
1516
+ {
1517
+ "type": "text",
1518
+ "text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In ACL (1). The Association for Computer Linguistics, 2016. ",
1519
+ "bbox": [
1520
+ 173,
1521
+ 895,
1522
+ 823,
1523
+ 924
1524
+ ],
1525
+ "page_idx": 13
1526
+ },
1527
+ {
1528
+ "type": "text",
1529
+ "text": "Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. CoRR, abs/1611.01603, 2016. URL http://arxiv.org/ abs/1611.01603. ",
1530
+ "bbox": [
1531
+ 173,
1532
+ 103,
1533
+ 823,
1534
+ 146
1535
+ ],
1536
+ "page_idx": 14
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Shirui Pan, and Chengqi Zhang. Disan: Directional self-attention network for rnn/cnn-free language understanding. CoRR, abs/1709.04696, 2017a. URL http://arxiv.org/abs/1709.04696. ",
1541
+ "bbox": [
1542
+ 174,
1543
+ 156,
1544
+ 826,
1545
+ 199
1546
+ ],
1547
+ "page_idx": 14
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13 - 17, 2017, pp. 1047–1055, 2017b. ",
1552
+ "bbox": [
1553
+ 174,
1554
+ 208,
1555
+ 825,
1556
+ 265
1557
+ ],
1558
+ "page_idx": 14
1559
+ },
1560
+ {
1561
+ "type": "text",
1562
+ "text": "Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ CoRR, abs/1505.00387, 2015. URL http://arxiv.org/abs/1505.00387. ",
1563
+ "bbox": [
1564
+ 171,
1565
+ 275,
1566
+ 823,
1567
+ 304
1568
+ ],
1569
+ "page_idx": 14
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "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, 2017a. URL http://arxiv.org/abs/1706.03762. ",
1574
+ "bbox": [
1575
+ 174,
1576
+ 314,
1577
+ 823,
1578
+ 357
1579
+ ],
1580
+ "page_idx": 14
1581
+ },
1582
+ {
1583
+ "type": "text",
1584
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Neural Information Processing Systems, 2017b. ",
1585
+ "bbox": [
1586
+ 173,
1587
+ 366,
1588
+ 825,
1589
+ 409
1590
+ ],
1591
+ "page_idx": 14
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "Shuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. CoRR, abs/1608.07905, 2016. URL http://arxiv.org/abs/1608.07905. ",
1596
+ "bbox": [
1597
+ 173,
1598
+ 419,
1599
+ 823,
1600
+ 448
1601
+ ],
1602
+ "page_idx": 14
1603
+ },
1604
+ {
1605
+ "type": "text",
1606
+ "text": "Wenhui Wang, Nan Yang, Furu Wei, Baobao Chang, and Ming Zhou. Gated self-matching networks for reading comprehension and question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 189–198, 2017. ",
1607
+ "bbox": [
1608
+ 174,
1609
+ 457,
1610
+ 826,
1611
+ 515
1612
+ ],
1613
+ "page_idx": 14
1614
+ },
1615
+ {
1616
+ "type": "text",
1617
+ "text": "Zhiguo Wang, Haitao Mi, Wael Hamza, and Radu Florian. Multi-perspective context matching for machine comprehension. CoRR, abs/1612.04211, 2016. URL http://arxiv.org/abs/ 1612.04211. ",
1618
+ "bbox": [
1619
+ 173,
1620
+ 523,
1621
+ 826,
1622
+ 566
1623
+ ],
1624
+ "page_idx": 14
1625
+ },
1626
+ {
1627
+ "type": "text",
1628
+ "text": "Dirk Weissenborn, Georg Wiese, and Laura Seiffe. Making neural QA as simple as possible but not simpler. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), Vancouver, Canada, August 3-4, 2017, pp. 271–280, 2017. ",
1629
+ "bbox": [
1630
+ 176,
1631
+ 577,
1632
+ 821,
1633
+ 619
1634
+ ],
1635
+ "page_idx": 14
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "John Wieting, Jonathan Mallinson, and Kevin Gimpel. Learning paraphrastic sentence embeddings from back-translated bitext. In EMNLP, pp. 274–285. Association for Computational Linguistics, 2017. ",
1640
+ "bbox": [
1641
+ 174,
1642
+ 628,
1643
+ 823,
1644
+ 671
1645
+ ],
1646
+ "page_idx": 14
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. ",
1651
+ "bbox": [
1652
+ 174,
1653
+ 681,
1654
+ 825,
1655
+ 780
1656
+ ],
1657
+ "page_idx": 14
1658
+ },
1659
+ {
1660
+ "type": "text",
1661
+ "text": "Caiming Xiong, Victor Zhong, and Richard Socher. Dynamic coattention networks for question answering. CoRR, abs/1611.01604, 2016. URL http://arxiv.org/abs/1611.01604. ",
1662
+ "bbox": [
1663
+ 169,
1664
+ 790,
1665
+ 823,
1666
+ 819
1667
+ ],
1668
+ "page_idx": 14
1669
+ },
1670
+ {
1671
+ "type": "text",
1672
+ "text": "Adams Wei Yu, Hongrae Lee, and Quoc V. Le. Learning to skim text. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL 2017, Vancouver, Canada, July 30 - August 4, Volume 1: Long Papers, pp. 1880–1890, 2017. ",
1673
+ "bbox": [
1674
+ 173,
1675
+ 829,
1676
+ 823,
1677
+ 872
1678
+ ],
1679
+ "page_idx": 14
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "Yang Yu, Wei Zhang, Kazi Saidul Hasan, Mo Yu, Bing Xiang, and Bowen Zhou. End-to-end reading comprehension with dynamic answer chunk ranking. CoRR, abs/1610.09996, 2016. URL http: //arxiv.org/abs/1610.09996. ",
1684
+ "bbox": [
1685
+ 176,
1686
+ 882,
1687
+ 823,
1688
+ 924
1689
+ ],
1690
+ "page_idx": 14
1691
+ },
1692
+ {
1693
+ "type": "text",
1694
+ "text": "Junbei Zhang, Xiao-Dan Zhu, Qian Chen, Li-Rong Dai, Si Wei, and Hui Jiang. Exploring question understanding and adaptation in neural-network-based question answering. CoRR, abs/1703.04617, 2017. ",
1695
+ "bbox": [
1696
+ 174,
1697
+ 103,
1698
+ 823,
1699
+ 145
1700
+ ],
1701
+ "page_idx": 15
1702
+ },
1703
+ {
1704
+ "type": "text",
1705
+ "text": "Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 649–657, 2015. ",
1706
+ "bbox": [
1707
+ 174,
1708
+ 155,
1709
+ 825,
1710
+ 212
1711
+ ],
1712
+ "page_idx": 15
1713
+ },
1714
+ {
1715
+ "type": "text",
1716
+ "text": "Qingyu Zhou, Nan Yang, Furu Wei, Chuanqi Tan, Hangbo Bao, and Ming Zhou. Neural question generation from text: A preliminary study. CoRR, abs/1704.01792, 2017. URL http: //arxiv.org/abs/1704.01792. ",
1717
+ "bbox": [
1718
+ 174,
1719
+ 220,
1720
+ 825,
1721
+ 262
1722
+ ],
1723
+ "page_idx": 15
1724
+ }
1725
+ ]
parse/train/B14TlG-RW/B14TlG-RW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B14TlG-RW/B14TlG-RW_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1edvs05Y7/B1edvs05Y7.md ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPARSE BINARY COMPRESSION: TOWARDS DISTRIBUTED DEEP LEARNING WITH MINIMAL COMMUNICATION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Currently, progressively larger deep neural networks are trained on ever growing data corpora. In result, distributed training schemes are becoming increasingly relevant. A major issue in distributed training is the limited communication bandwidth between contributing nodes or prohibitive communication cost in general. To mitigate this problem we propose Sparse Binary Compression (SBC), a compression framework that allows for a drastic reduction of communication cost for distributed training. SBC combines existing techniques of communication delay and gradient sparsification with a novel binarization method and optimal weight update encoding to push compression gains to new limits. By doing so, our method also allows us to smoothly trade-off gradient sparsity and temporal sparsity to adapt to the requirements of the learning task. Our experiments show, that SBC can reduce the upstream communication on a variety of convolutional and recurrent neural network architectures by more than four orders of magnitude without significantly harming the convergence speed in terms of forward-backward passes. For instance, we can train ResNet50 on ImageNet in the same number of iterations to the baseline accuracy, using $\times 3 5 3 1$ less bits or train it to a $1 \%$ lower accuracy using $\times 3 7 2 0 8$ less bits. In the latter case, the total upstream communication required is cut from 125 terabytes to 3.35 gigabytes for every participating client. Our method also achieves state-of-the-art compression rates in a Federated Learning setting with 400 clients.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Distributed Stochastic Gradient Descent (DSGD) is a training setting, in which a number of clients jointly trains a deep learning model using stochastic gradient descent (Dean et al., 2012; Recht et al., 2011; Moritz et al., 2015). Every client holds an individual subset of the training data, used to improve the current master model. The improvement is obtained by investing computational resources to perform iterations of stochastic gradient descent (SGD). This local training produces a weight update $\Delta { \boldsymbol { \nu } } _ { }$ in every participating client, which in regular or irregular intervals ("communication rounds") is exchanged to produce a new master model. This exchange of weight updates can be performed indirectly via a centralized server or directly in an all-reduce operation. In both cases, all clients share the same master model after every communication round (see figure 1). In vanilla DSGD the clients have to communicate a full gradient update during every iteration. Every such update is of the same size as the full model, which can be in the range of gigabytes for modern architectures with millions of parameters (He et al., 2016; Huang et al., 2017). Over the course of multiple hundred thousands of training iterations on big datasets the total communication for every client can easily grow to more than a petabyte. Consequently, if communication bandwidth is limited, or communication is costly, distributed deep learning can become unproductive or even unfeasible. DSGD is a very popular training setting with many applications. On one end of the spectrum, DSGD can be used to greatly reduce the training time of large-scale deep learning models by introducing device-level data parallelism (Chilimbi et al., 2014; Zinkevich et al., 2010; Xing et al., 2015; Li et al., 2014), making use of the fact that the computation of a mini-batch gradient is perfectly parallelizable. In this setting, the clients are usually embodied by hardwired high-performance computation units (i.e. GPUs in a cluster) and every client performs one iteration of SGD per communication round. Since communication is high-frequent in this setting, bandwidth can be a significant bottleneck. On the other end of the spectrum DSGD can also be used to enable privacy-preserving deep learning (Shokri & Shmatikov, 2015; McMahan et al., 2016). Since the clients only ever share weight updates, DSGD makes it possible to train a model from the combined data of all clients without any individual client having to reveal their local training data to a centralized server. In this setting the clients typically are embedded or mobile devices with low network bandwidth, intermittent network connections, and an expensive mobile data plan. In both scenarios, the communication cost between the individual training nodes is a limiting factor for the performance of the whole learning system. For the synchronous distributed training scheme described above, the total amount of bits communicated by every client during training is given by
12
+
13
+ ![](images/bbfd0bb297fd001cc86bbc18d700f0530cf52fa5b998b8a1e2263f9564a97595.jpg)
14
+ Figure 1: One communication round of DSGD: a) Clients synchronize with the server. b) Clients compute a weight update independently based on their local data. c) Clients upload their local weight updates to the server, where they are averaged to produce the new master model.
15
+
16
+ $$
17
+ \begin{array} { r } { \mathsf { b } _ { t o t a l } \in \mathcal { O } ( \underbrace { N _ { i t e r } \times f } _ { \# \mathrm { c o m m u n i c a t i o n ~ r o u n d s } } \times \underbrace { | \Delta \mathcal { W } _ { \neq 0 } | \times ( \bar { \mathrm { b } } _ { p o s } + \bar { \mathrm { b } } _ { v a l } ) } _ { \# \mathrm { b i t s ~ p e r ~ c o m m u n i c a t i o n } } \times \underbrace { K } _ { \# \mathrm { r e c e i v i n g ~ n o d e s } } ) } \end{array}
18
+ $$
19
+
20
+ where $N _ { i t e r }$ is the total number of training iterations (forward-backward passes) every client performs, $f$ is the communication frequency, $| \mathcal { W } _ { \neq 0 } |$ is the sparsity of the weight update, $\bar { \mathrm { b } } _ { p o s }$ , $\bar { \mathrm { b } } _ { v a l }$ are the average number of bits required to communicate the position and the value of the non-zero elements respectively and $K$ is the number of receiving nodes (if $\mathcal { W }$ is dense, the positions of all weights are predetermined and no position bits are required).
21
+
22
+ Substantial research has gone into the effort of reducing the amount of communication necessary between the clients via lossy compression schemes. Using the systematic of equation 1, we can organize prior approaches into three different groups:
23
+
24
+ Sparsification methods restrict weight updates to modifying only a small subset of the parameters, thus reducing $| \Delta \mathcal { W } _ { \neq 0 } |$ . Strom (2015) presents an approach (later modified by Tsuzuku et al. (2018)) in which only gradients with a magnitude greater than a certain predefined threshold are sent to the server. All other gradients are aggregated into a residual. This method achieves compression rates of up to 3 orders of magnitude on an acoustic modeling task. In practice however, it is hard to choose appropriate values for the threshold, as it may vary a lot for different architectures and even different layers. Instead of using a fixed threshold to decide what gradient entries to send, Aji & Heafield (2017) use a fixed sparsity rate. They only communicate the fraction $p$ entries of the gradient with the biggest magnitude, while also collecting all other gradients in a residual. At a sparsity rate of $p = 0 . 0 0 1$ their method slightly degrades the convergence speed and final accuracy of the trained model. Lin et al. (2017) present modifications to the work of Aji et al. which close this performance gap. These modifications include using a curriculum to slowly increase the amount of sparsity in the first couple communication rounds and applying momentum factor masking to overcome the problem of gradient staleness. Their method achieves compression rates ranging from $\times 2 7 0$ to $\times 6 0 0$ on different architectures, without slowdown in convergence speed.
25
+
26
+ Communication delay methods try to reduce the communication frequency $f$ . McMahan et al. (2016) propose Federated Averaging to reduce the cumulative communication. In Federated Averaging, instead of communicating after every iteration, every client performs multiple iterations of SGD to compute a weight update. The authors observe that this delay of communication does not significantly harm the convergence speed in terms of local iterations and report a reduction in the number of necessary communication rounds by a factor of $\times 1 0 - \times 1 0 0$ on different convolutional and recurrent neural network architectures. In a follow-up work Konecnˇ y et al. (2016) combine this \` communication delay with random sparsification and probabilistic quantization. They restrict the clients to learn random sparse weight updates or force random sparsity on them afterwards ("structured" vs "sketched" updates) and combine this sparsification with probabilistic quantization. While their method also combines communication delay with (random) sparsification and quantization, and achieves good compression gains for one particular CNN and LSTM model, it also causes a major drop in convergence speed and final accuracy.
27
+
28
+ Dense quantization methods try to reduce the amount of value bits $\bar { \mathrm { b } } _ { v a l }$ . Different quantization methods have been proposed that reduce the bit-width of the gradients to ternary (Wen et al., 2017), binary (Seide et al., 2014; Bernstein et al., 2018) or arbitrary (Alistarh et al., 2017) bitwidths. While these are theoretically well-founded and come with strong convergence guarantees, they are also limited to a maximum compression rate of $\times 3 2$ , compared to the regular 32-bit encoding.
29
+
30
+ ![](images/16ab61f604048fb48daa23d796e8a481a8582f980e2571e696a8d2c176a492d9.jpg)
31
+ 2 ON THE ACCUMULATION OF GRADIENT INFORMATION
32
+ Figure 2: Sources of noise in SGD (illustration): Left: Optimization noise, caused by Gradient Descent overshooting. Bouncing between the walls of the ravine results in negatively correlated noise. Middle: Batch noise, caused by the batch loss being only a noisy approximation of the full empirical loss. Right: The compressed path converges equally fast, but requires only half of the information to be communicated.
33
+
34
+ Communication delay and sparsification methods as described above already achieve impressive compression rates, however the phenomenon underlying their successes is still only poorly understood. We present a new information-theoretic perspective that is based on the observation that both of these approaches achieve compression by accumulating gradient information locally before sending it to the server. In the case of communication delay all gradients are accumulated uniformly for a fixed amount of iterations, while in the case of sparsification methods they are accumulated non-uniformly until they exceed some fixed or adaptive threshold. In both cases the rate of compression is proportional to the number of steps that the updates are being delayed on average.
35
+
36
+ Consider now the optimization path $\Delta { \mathcal { W } } _ { 1 } , . . , \Delta { \mathcal { W } } _ { T }$ taken by SGD on the loss-surface between some initialization point W0 and the model WT = W0 + PTt=1 trained for $T$ iterations. Following this path, we can model the changes occurring to any individual weight in the network $w$ as a noisy stochastic process via
37
+
38
+ $$
39
+ \Delta w ^ { t } = s ^ { t } + n ^ { t } , t = 1 , . . , T
40
+ $$
41
+
42
+ where $s ^ { t }$ denotes the deterministic signal (i.e. the true direction of the minimum), while $n ^ { t }$ denotes the noise, induced by mini-batch sampling in SGD ("batch noise") and the stochasticity of the learning process itself ("optimization noise", see figure 2 for an illustration). For the sake of simplicity, and motivated by the central limit theorem we can assume (a) that this noise $n ^ { t }$ is normally distributed at every time-step $n ^ { t } \sim \mathcal N ( 0 , \sigma ^ { 2 } )$ with the variance being constant in time $\mathbb { V } ( n ^ { t } ) \stackrel { } { = } \sigma ^ { 2 }$ for all $t = 1 , . . , T$ . Since the optimization process has the tendency to damp noise as investigated for instance in LeCun et al. (2012) it is also reasonable to assume (b) that the noise is (negatively) self-correlated. The noise process is then given by $n ^ { 1 } = N ^ { 1 }$ , $n ^ { t } = \alpha n ^ { t - 1 } + N ^ { t }$ , with $N ^ { t }$ normally distributed and all $N ^ { t }$ uncorrelated, $\alpha \in ( - 1 , 0 )$ . Given these assumptions we can bound the variance of the accumulated parameter updates.
43
+
44
+ Theorem 2.1. Under assumptions (a) and $( b )$ , the variance of the accumulated noise can be bounded by
45
+
46
+ $$
47
+ \mathbb { V } ( \sum _ { t = 1 } ^ { T } n ^ { t } ) \le \sigma ^ { 2 } ( T ( 1 + \alpha ) + 1 ) .
48
+ $$
49
+
50
+ The proof can be found in the supplement. Theorem 2.1 directly leads us to a lower bound on the signal-to-noise ratio of the accumulated weight-updates:
51
+
52
+ Corollary 2.1.1. Under assumptions (a) and $( b )$ , accumulation increases the signal-to-noise ratio from $\bar { s } / \sigma$ to
53
+
54
+ $$
55
+ S N R ( \sum _ { t = 1 } ^ { T } \Delta w ^ { t } ) = \frac { \mathbb { E } [ \sum _ { t = 1 } ^ { T } s ^ { t } + n ^ { t } ] } { \sqrt { \mathbb { V } [ \sum _ { t = 1 } ^ { T } s ^ { t } + n ^ { t } ] } } \geq \frac { \sum _ { t = 1 } ^ { T } s ^ { t } } { \sqrt { \sigma ^ { 2 } ( T ( 1 + \alpha ) + 1 ) } } \approx \frac { \sqrt { T } } { \sqrt { 1 + \alpha } } \frac { \bar { s } } { \sigma }
56
+ $$
57
+
58
+ $\begin{array} { r } { \bar { s } = \frac { 1 } { T } \sum _ { t = 1 } ^ { T } { s ^ { t } } } \end{array}$ being the signal-average over time.
59
+
60
+ This means that a weight-update will be more informative the longer the accumulation period and the stronger the noise correlates temporally. Convergence speed will not be compromised for as long as the information content of the accumulated update is equal to the cumulative information content of the individual updates (c.f. fig. 2 (c)). This line of reasoning helps to shed light on both the successes of communication delay and gradient sparsification. In fact, it implies that both of these approaches are actually very similar in the way they affect the information flow from client to server on the individual weight level.
61
+
62
+ We find that this intuition is also verified empirically. Figure 3 shows validation errors for ResNet32 model trained on CIFAR for 60000 iterations at different levels of communication delay and gradient sparsity. We observe multiple things: 1.) The validation error remains more or less constant along the off-diagonals of the matrix where the total sparsity (i.e. the product of communication delay and gradient sparsity) is constant. 2.) The existing methods of Federated Averaging (McMahan et al., 2016) (purple) and Gradient Dropping/ DGC (Aji & Heafield, 2017; Lin et al., 2017)(yellow) are just lines in the two-dimensional space of possible compression methods. 3.) There exists a roughly triangular area of approximately constant error, optimal compression methods lie along the hypotenuse of this triangle. We find this behavior consistently across different model architectures, more examples can be found in the supplement. These results indicate, that communication delay and sparsification affect the convergence in a roughly multiplicative way and that there seems to exist a fixed information budged in DSGD, necessary to maintain unhindered convergence.
63
+
64
+ ![](images/19e7ea356464d3e97b87fc82605d547a43177538b4a6011a877d3cd1804c873b.jpg)
65
+ Figure 3: Validation Error for ResNet32 trained on CIFAR at different levels of temporal and gradient sparsity (the error is color-coded, brighter means lower error). The prior approaches of Gradient Dropping and Federated Averaging can be embedded in a two-dimensional compression framework.
66
+
67
+ In the following we present a framework that allows us to smoothly trade of these two types of gradient accumulation against one another. By doing so our proposed framework can adapt to the requirements of the distributed learning environment and achieve state-of-the-art compression results by reaping the benefits from both approaches.
68
+
69
+ # 3 SPARSE BINARY COMPRESSION
70
+
71
+ Inspired by our findings in the previous section, we propose Sparse Binary Compression (cf. Figure 4), to drastically reduce the number of communicated bits in distributed training. SBC makes use of multiple compression techniques simultaneously1 to reduce all multiplicative components of equation 1.
72
+
73
+ ![](images/746065ec084d2fd326f7cabd07148c0086f6a804fe554d6536ad8c47ebeb85ba.jpg)
74
+ Figure 4: Step-by-step explanation of techniques used in Sparse Binary Compression: (a) Illustrated is the traversal of the parameter space with regular DSGD (left) and Federated Averaging (right). With this form of communication delay, a bigger region of the loss surface can be traversed, in the same number of communication rounds. That way compression gains of up to $\times 1 0 0 0$ are possible. After a number of iterations, the clients communicate their locally computed weight updates. (b) Before communication, the weight update is first sparsified, by dropping all but the fraction $p$ weight updates with the highest magnitude. This achieves up to $\times 1 0 0 0$ compression gain. (c) Then the sparse weight update is binarized for an additional compression gain of approximately $\times 3 .$ . (d) Finally, we optimally encode the positions of the non-zero elements, using Golomb encoding. This reduces the bit size of the compressed weight update by up to another $\times 2$ compared to naive encoding.
75
+
76
+ In the following $\mathcal { W }$ will refer to the entirety of neural network parameters, while $W \in { \mathcal { W } }$ will refer to one specific tensor of weights. Arithmetic operations on $\mathcal { W }$ are to be understood componentwise.
77
+
78
+ Communication Delay, Fig. 4 (a): We use communication delay, proposed by McMahan et al. (2016), to introduce temporal sparsity into DSGD. Instead of communicating gradients after every local iteration, we allow the clients to compute more informative updates by performing multiple iterations of SGD. These generalized weight updates are given by
79
+
80
+ $$
81
+ \Delta \mathcal { W } _ { i } = \mathrm { S G D } _ { n } ( \mathcal { W } _ { i } , D _ { i } ) - \mathcal { W } _ { i }
82
+ $$
83
+
84
+ where $\mathrm { S G D } _ { n } ( \mathcal { W } _ { i } , D _ { i } )$ refers to the set of weights obtained by performing $n$ iterations of stochastic gradient descent on $\mathcal { W } _ { i }$ , while sampling mini-batches from the i-th client’s training data $D _ { i }$ . Empirical analysis by McMahan et al. (2016) suggests that communication can be delayed drastically, with only marginal degradation of accuracy. For $n = 1$ we obtain regular DSGD.
85
+
86
+ Sparse Binarization, Fig. 4 (b), (c): Following the works of Lin et al. (2017)Strom (2015)Shokri & Shmatikov (2015) and Aji & Heafield (2017) we use the magnitude of an individual weight within a weight update as a heuristic for it’s importance. First, we set all but the fraction $p$ biggest and fraction $p$ smallest weight updates to zero. Next, we compute the mean of all remaining positive and all remaining negative weight updates independently. If the positive mean $\mu ^ { + }$ is bigger than the absolute negative mean $\mu ^ { - }$ , we set all negative values to zero and all positive values to the positive mean and vice versa. The method is illustrated in figure 4 and formalized in algorithm 2. Finding the fraction $p$ smallest and biggest values in a vector $W$ requires $\mathcal { O } ( | W | )$ operations, where $| W |$ refers to the number of elements in $W$ (Cormen et al., 2009). Lin et al. (2017) suggest to reduce the computational cost of this operation, by randomly subsampling from $W$ . However this comes at the cost of introducing (unbiased) noise in the amount of sparsity. Luckily, in our approach communication rounds (and thus compressions) are relatively infrequent, which helps to marginalize the overhead of the sparsification. Quantizing the non-zero elements of the sparsified weight update to the mean reduces the required value bits $\bar { b } _ { v a l }$ from 32 to $O$ . This translates to a reduction in communication cost by a factor of around $\times 3$ . We can get away with averaging out the non-zero weight updates because they are relatively homogeneous in value and because we accumulate our compression errors as described in the next paragraph.
87
+
88
+ Residual Accumulation, Fig. 4 (d): It is well established (Lin et al., 2017; Strom, 2015; Aji & Heafield, 2017; Seide et al., 2014) that the convergence in sparsified DSGD can be greatly accelerated by accumulating the error that arises from only sending sparse approximations of the weight updates. After every communication round, the residual is updated via
89
+
90
+ $$
91
+ \mathcal { R } _ { \tau } = \sum _ { t = 1 } ^ { \tau } ( \Delta \mathcal { W } _ { t } - \Delta \mathcal { W } _ { t } ^ { * } ) = \mathcal { R } _ { \tau - 1 } + \Delta \mathcal { W } _ { \tau } - \Delta \mathcal { W } _ { \tau } ^ { * } .
92
+ $$
93
+
94
+ Error accumulation has the great benefit that no gradient information is lost (it may only become outdated or "stale"). In the context of pure sparsification residual accumulation can be interpreted to be equivalent to increasing the batch size for individual parameters (Lin et al., 2017). Moreover, we can show:
95
+
96
+ Theorem 3.1. Let $\Delta W _ { 1 } , . . , \Delta W _ { T } \in \mathbb { R } ^ { n }$ be (flattened) weight updates, computed by one client in the first $T$ communication rounds. Let $\Delta W _ { 1 } ^ { * } , . . , \Delta W _ { T - 1 } ^ { * } \in \mathcal { S }$ be the actual weight updates, transferred in the previous rounds (restricted to some subspace $s$ ) and $\mathcal { R } _ { \tau }$ be the content of the residual at time $\tau$ as in equation 5. Then the orthogonal projection
97
+
98
+ $$
99
+ v = P r o j _ { S } ( \mathcal { R } _ { T - 1 } + \Delta W _ { T } )
100
+ $$
101
+
102
+ uniquely minimizes the accumulated error
103
+
104
+ $$
105
+ \operatorname { e r r } ( \Delta W _ { T } ^ { * } ) = \| \sum _ { t = 1 } ^ { T } ( \Delta W _ { t } - \Delta W _ { t } ^ { * } ) \|
106
+ $$
107
+
108
+ in S. (Proof in Supplement.)
109
+
110
+ That means that the residual accumulation keeps the compressed optimization path as close as possible to optimization path taken with non-compressed weight updates.
111
+
112
+ <table><tr><td></td><td>Algorithm 1: SynchronousDistributed Stochastic Gradient Descent (DSGD)</td></tr><tr><td></td><td>input: initial parameters W 2 outout: improved parameters W 3 init:all clients Ci are initialized with the</td></tr><tr><td></td><td>same parameters Wi ← W, the initial</td></tr><tr><td></td><td>global weight update and the residuals are set to zero △W,Ri←0</td></tr><tr><td></td><td>4 for t=1,..,T do for i∈ It ≌ {1,..,M} in parallel do</td></tr><tr><td>5 6</td><td>Client Ci does:</td></tr><tr><td>7</td><td>· msg ← downloads→C (msg)</td></tr><tr><td>8</td><td>· △W ← decode(msg)</td></tr><tr><td></td><td>·Wi←Wi+△W</td></tr><tr><td>9</td><td>· △Wi ← Ri+SGDn(Wi,Di)-Wi</td></tr><tr><td>10 11</td><td>· △W* ← compress(△Wi)</td></tr><tr><td>12</td><td>·Ri←△Wi-△W*</td></tr><tr><td></td><td>· msg: ← encode(△W*)</td></tr><tr><td>13 14</td><td>· uploadci→s(msg;)</td></tr><tr><td>15</td><td>end</td></tr><tr><td>16</td><td>Server S does:</td></tr><tr><td>17</td><td>: gatherci→s(△W*), i ∈ It</td></tr><tr><td>18</td><td>△W← £ielt △W*</td></tr><tr><td></td><td>. W←W+△W</td></tr><tr><td>19</td><td></td></tr><tr><td>20</td><td>broadcasts→c (△W), i=1,..,M</td></tr><tr><td>21</td><td>end</td></tr></table>
113
+
114
+ # Algorithm 2: Sparse Binary Compression
115
+
116
+ 1 input: tensor $\Delta W$ , sparsity $p$
117
+ 2 output: sparse tensor $\Delta W ^ { * }$
118
+ $\begin{array} { r l r } { { 3 } } & { { } \bullet } & { \mathrm { v a l ^ { + } } \mathrm { t o p } _ { p \% } ( \Delta W ) ; } \end{array}$ ;
119
+ $\begin{array} { r } { \mathbf { \Sigma } ^ { \mathbf { \textsc { v a l } } } \mathbf { \Sigma } ^ { } \mathbf { \Sigma } ^ { \mathbf { w p } } p \% \mathbf { \Sigma } ^ { \lfloor \Delta \nu \nu \rfloor , } } \\ { \mathbf { v a l } ^ { - } \mathbf { t o p } _ { p \% } ( - \Delta W ) } \end{array}$
120
+ ${ \mathfrak { a } } \bullet \mu ^ { + } \operatorname { m e a n } ( \mathrm { v a l } ^ { + } ) ; \mu ^ { - } \operatorname { m e a n } ( \mathrm { v a l } ^ { - } )$ 5 if $\mu ^ { + } \geq \mu ^ { - }$ then
121
+ 6 return $\Delta W ^ { * } \gets \mu ^ { + } ( W \geq \mathrm { \ m i n } ( \mathrm { v a l } ^ { + } ) )$ 7 else
122
+ 8 return
123
+ $\Delta W ^ { * } \gets - \mu ^ { - } ( W \le - \operatorname* { m i n } ( \mathrm { v a l } ^ { - } ) )$ 9 end
124
+
125
+ # Algorithm 3: Golomb Position Encoding
126
+
127
+ 1 input: sparse tensor $\Delta W ^ { * }$ , sparsity $p$
128
+ 2 output: binary message msg
129
+ 3 • $\bar { \mathcal { T } } \Delta W ^ { * } [ : ] _ { \neq 0 }$
130
+ 4 $\begin{array} { r } { \bullet \ \mathbf { b } ^ { * } 1 + \lfloor \log _ { 2 } ( \frac { \log ( \phi - 1 ) } { \log ( 1 - p ) } ) \rfloor } \end{array}$
131
+ 5 for $i = 1 , . . , | \mathcal { T } |$ do
132
+ 6 • d ← Ii − Ii−1
133
+ 7 • q ← (d − 1) div 2b∗
134
+ 8 • r ← (d − 1) mod 2b∗
135
+ 9 • msg.add(1, .., 1, 0, binaryb∗ (r))
136
+ | {z }q times
137
+ 10 end
138
+ 11 return msg
139
+
140
+ Optimal Position Encoding, Fig. 4 (e): To communicate a set of sparse binary tensors produced by SGC, we only need to transfer the positions of the non-zero elements in the flattened tensors, along with one mean value $\mu ^ { + }$ or $\mu ^ { - }$ ) per tensor. Instead of communicating the absolute non-zero positions it is favorable to only communicate the distances between all non-zero elements. It is possible to show that for big values of $| W |$ and $k = p | W |$ , the distances are approximately geometrically distributed with success probability equal to the sparsity rate $p$ . Therefore, we can optimally encode the distances using the Golomb code Golomb (1966). Golomb encoding reduces the average number of position bits to
141
+
142
+ $$
143
+ \bar { \mathrm { b } } _ { p o s } = \mathbf { b } ^ { * } + \frac { 1 } { 1 - ( 1 - p ) ^ { 2 ^ { \mathbf { b } ^ { * } } } } ,
144
+ $$
145
+
146
+ with b∗ = 1 + blog2( log(φ−1)log(1−p) ) and $\textstyle \phi = { \frac { { \sqrt { 5 } } + 1 } { 2 } }$ being the golden ratio. For a sparsity rate of i.e. $p = 0 . 0 1$ , we get $\bar { \mathrm { b } } _ { p o s } = 8 . 3 8$ , which translates to $\times 1 . 9$ compression, compared to a naive distance encoding with 16 fixed bits. While the overhead for encoding and decoding makes it unproductive to use Golomb encoding in the situation of Strom (2015), this overhead becomes negligible in our situation due to the infrequency of weight update exchange resulting from communication delay. The encoding scheme is given in algorithm 3, while the decoding scheme can be found in the supplement.
147
+
148
+ Momentum Correction, Warm-up Training and Momentum Masking: Lin et al. (2017) introduce multiple minor modifications to the vanilla Gradient Dropping method, to improve the convergence speed. We adopt momentum masking, while momentum correction is implicit to our approach. For more details on this we refer to the supplement.
149
+
150
+ Our proposed method is described in Algorithms 1, 2 and 3. Algorithm 1 describes how compression and residual accumulation can be introduced into DSGD. Algorithm 2 describes our compression method. Algorithm 3 describes the Golomb encoding. Table 1 compares theoretical asymptotic compression rates of different popular compression methods.
151
+
152
+ <table><tr><td colspan="2">Total Bits =</td><td>Baseline</td><td>SignSGD, TernGrad, QSGD</td><td>Gradient Dropping, DGC</td><td>Federated Averaging</td><td>Sparse Binary Compression</td></tr><tr><td rowspan="3">×</td><td>Temporal Sparsity</td><td>100%</td><td>100%</td><td>100%</td><td>0.1% - 10%</td><td>0.1% - 10%</td></tr><tr><td>Gradient Sparsity</td><td>100%</td><td>100%</td><td>0.1%</td><td>100%</td><td>0.1% - 10%</td></tr><tr><td>Value Bits</td><td>32</td><td>1-8</td><td>32</td><td>32</td><td>0</td></tr><tr><td colspan="2">×M Position Bits</td><td>0</td><td>0</td><td>16</td><td>0</td><td>8-14</td></tr><tr><td colspan="2">Compression Rate</td><td>×1</td><td>×4-×32</td><td>×666</td><td>×10-×1000</td><td>-×40000</td></tr></table>
153
+
154
+ Table 1: Theoretical asymptotic compression rates for different compression methods broken down into components. Only SBC reduces all multiplicative components of the total bitsize (cf. eq. 1).
155
+
156
+ # 4 EXPERIMENTS
157
+
158
+ # 4.1 NETWORKS AND DATASETS
159
+
160
+ We evaluate our method on commonly used convolutional and recurrent neural networks with millions of parameters, which we train on well-studied data sets that contain up to multiple millions of samples. We perform experiments with client numbers ranging from 4 to 400 to cover both the distributed training and federated learning use-case.
161
+
162
+ Image Classification: We run experiments for LeNet5-Caffe2 on MNIST LeCun (1998), ResNet18 and ResNet34 He et al. (2016) on CIFAR-10 and CIFAR-100 Krizhevsky et al. (2014) and ResNet50 on ILSVRC12 (ImageNet) Deng et al. (2009). For the i.i.d. setting we split the training data randomly into equally sized shards and assign one shard to every one of the clients. For the non-i.i.d. setting every client is assigned samples from only two classes of the dataset, but the amount of data still remains the same for every client. All models are trained using momentum SGD, except for LeNet5- Caffe, which is trained using the Adam optimizer Kingma & Ba (2014). Learning rate, weight intitiallization and data augmentation are as in the respective papers.
163
+
164
+ <table><tr><td></td><td colspan="2">Compression Method -→</td><td>Baseline</td><td>DGC3</td><td>Federated Averaging4</td><td>SBC (1)</td><td>SBC (2)</td><td>SBC (3)</td></tr><tr><td rowspan="9">taprrisititt</td><td>LeNet5-Caffe @MNIST</td><td>Accuracy</td><td>0.9946</td><td>0.994</td><td>0.994</td><td>0.994</td><td>0.994</td><td>0.991</td></tr><tr><td></td><td>Compression</td><td>×1</td><td>×718</td><td>×500</td><td>×2071</td><td>×3166</td><td>×24935</td></tr><tr><td>ResNet18 @CIFAR10</td><td>Accuracy</td><td>0.946</td><td>0.9383</td><td>0.9279</td><td>0.9422</td><td>0.9435</td><td>0.9219</td></tr><tr><td>ResNet34</td><td>Compression Accuracy</td><td>×1</td><td>×768</td><td>×1000</td><td>×2369</td><td>×3491 0.7655</td><td>× 31664 0.701</td></tr><tr><td>@CIFAR100</td><td>Compression</td><td>0.773 ×1</td><td>0.767 ×718</td><td>0.7316</td><td>0.767 ×2370</td><td>×3166</td><td>×31664</td></tr><tr><td>ResNet50</td><td>Accuracy</td><td>0.737</td><td>0.739</td><td>×1000 0.724</td><td>0.735</td><td>0.737</td><td>0.728</td></tr><tr><td>@ImageNet</td><td>Compression</td><td>×1</td><td>×601</td><td>×1000</td><td>×2569</td><td>×3531</td><td>×37208</td></tr><tr><td>WordLSTM</td><td>Perplexity</td><td>76.02</td><td>75.98</td><td>76.37</td><td>77.73</td><td>78.19</td><td>77.57</td></tr><tr><td>@PTB</td><td>Compression</td><td>×1</td><td>×719</td><td>×1000</td><td>×2371</td><td>×3165</td><td>×31658</td></tr><tr><td>WordLSTM*</td><td>Perplexity</td><td>101.5</td><td>102.318</td><td>131.51</td><td>103.95</td><td>103.95</td><td>104.62</td></tr><tr><td>@WIKI</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Compression</td><td></td><td>×719</td><td>×1000</td><td>×2371</td><td>×3165</td><td>×31657</td></tr><tr><td></td><td></td><td>×1</td><td></td><td></td><td></td><td></td><td></td></tr></table>
165
+
166
+ Table 2: Final accuracy/perplexity achieved on the test split and average compression rate for different compression schemes in a distributed training setting with different numbers of clients.
167
+
168
+ Language Modeling: We experiment with multilayer sequence-to-sequence LSTM models as described in Zaremba et al. (2014) on the Penn Treebank (PTB) Marcus et al. (1993) and Wikitext-2 corpora for next-word prediction. The PTB dataset consists of a sequence 923000 training, and 82000 validation words, while the Wikitext-2 dataset contains 2088628 train and 245569 test words. On both datasets we train a two-layer LSTM model with 650 and 200 hidden units respectively ("WordLSTM" / "WordLSTM\*") with tied weights between encoder and decoder as described in Inan et al. (2016). The training data is split into consecutive subsequences of equal length, out of which we assign one to every client.
169
+
170
+ While the models we use in our experiments do not fully achieve state-of-the-art results on the respective tasks and datasets, they are still sufficient for the purpose of evaluating our compression method and demonstrate, that our method works well with common regularization techniques such as batch normalization Ioffe & Szegedy (2015) and dropout Srivastava et al. (2014). A complete description of models and hyperparameters can be found in the supplement.
171
+
172
+ # 4.2 RESULTS
173
+
174
+ We experiment with three configurations of our method: SBC (1) uses no communication delay and a gradient sparsity of $0 . 1 \%$ , SBC (2) uses 10 iterations of communication delay and $1 \%$ gradient sparsity and SBC (3) uses 100 iterations of communication delay and $1 \%$ gradient sparsity. Our decision for these points on the 2D grid of possible configurations is somewhat arbitrary. The experiments with SBC (1) serve the purpose of enabling us to directly compare our 0-value-bit quantization to the 32-value-bit Deep Gradient Compression (Lin et al., 2017)).
175
+
176
+ Table 2 lists compression rates and final validation accuracies achieved by different compression methods, when applied to the training of neural networks on 5 different datasets. The number of iterations (forward-backward-passes) is held constant for all methods. On all benchmarks, our methods perform comparable to the baseline, while communicating significantly less bits.
177
+
178
+ Figure 5 shows convergence speed in terms of iterations (left) and communicated bits (right) respectively for ResNet50 trained on ImageNet. The convergence speed is only marginally affected, by our different compression methods. In the first 30 epochs SBC (3) even achieves the highest accuracy, using about $\times 3 7 0 0 0$ less bits than the baseline. In total, SBC (3) reduces the upstream communication on this benchmark from 125 terabytes to 3.35 gigabytes for every participating client. After the learning rate is lowered in epochs 30 and 60 progress slows down for SBC (3) relative to the
179
+
180
+ <table><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=2>Compression Method -→</td><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>GradientDroping</td><td rowspan=1 colspan=1>FederatedAveraging</td><td rowspan=1 colspan=1>SBC (1)</td><td rowspan=1 colspan=1>SBC (2)</td><td rowspan=1 colspan=1>SBC (3)</td></tr><tr><td rowspan=1 colspan=8> i.i.d. data</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>ResNet18*5@CIFAR10</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.9254×1</td><td rowspan=1 colspan=1>0.9167×713</td><td rowspan=1 colspan=1>0.911×100</td><td rowspan=1 colspan=1>0.921×2362</td><td rowspan=1 colspan=1>0.902×3166</td><td rowspan=1 colspan=1>0.906×31664</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.979×1</td><td rowspan=1 colspan=1>0.9811×714</td><td rowspan=1 colspan=1>0.967×100</td><td rowspan=1 colspan=1>0.979×2363</td><td rowspan=1 colspan=1>0.9818×3165</td><td rowspan=1 colspan=1>0.9536×31655</td></tr><tr><td rowspan=1 colspan=1>300</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.9758×1</td><td rowspan=1 colspan=1>0.9744×714</td><td rowspan=1 colspan=1>0.899×100</td><td rowspan=1 colspan=1>0.9731×2363</td><td rowspan=1 colspan=1>0.9733×3165</td><td rowspan=1 colspan=1>0.8919×31655</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=8> non-i.i.d. data</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1> AccuracyCompression</td><td rowspan=1 colspan=1>0.9506×1</td><td rowspan=1 colspan=1>0.9498×714</td><td rowspan=1 colspan=1>0.8592×100</td><td rowspan=1 colspan=1>0.9522×2363</td><td rowspan=1 colspan=1>0.9583×3165</td><td rowspan=1 colspan=1>0.8344×31655</td></tr></table>
181
+
182
+ Table 3: Final accuracy achieved on the test split and average compression rate for different compression schemes in a Federated learning setting with different numbers of clients.
183
+
184
+ methods which do not use communication delay. In direct comparison SBC (1) performs very similar to Gradient Dropping, while using about $\times 4$ less bits (that is $\times 2 5 6 9$ less bits than the baseline).
185
+
186
+ ![](images/d95f32a3debc2a8c33cf286c97024edb8738782ebd2391fe72729308fd25a2b0.jpg)
187
+ Figure 5: Left: Top-1 validation accuracy vs number of epochs. Right: Top-1 validation error vs number of transferred bits (log-log). Epochs 30 and 60 at which the learning rate is reduced are marked in the plot. ResNet50 trained on ImageNet.
188
+
189
+ Table 3 shows results for the federated learning setting with much higher numbers of clients trained on both i.i.d. and non-i.i.d. splits of data. We can see that in particular with growing numbers of clients and in the non-i.i.d. case, Federated Averaging significantly slows down the convergence and degrades the final accuracy. SBC (3) also suffers in this scenario as is also relies on 100 steps of communication delay. Conversely, our methods SBC (1) and (2) that rely more heavily on gradient sparsification perform much better in this setting and in some cases even beat the baseline. This behavior is expected, as the frequent exchange of gradient information in SBC (1) and (2) keeps all clients aligned, while they diverge further from one another for every iteration that communication is delayed in Federated Averaging.
190
+
191
+ Our experiments suggest that the distinction between the two formerly treated as separate distributed training settings of federated learning and data-parallel training is somewhat arbitrary and misleading and that better results can be achieved by combining the best approaches from both of these worlds. Contrary to the paradigm suggested in previous literature (McMahan et al., 2016), communication delay does not seem to be a well-suited approach for communication reduction in the federated learning setting. Instead our experiments demonstrate, that drastically better performance can be achieved under an even lower communication budged, if individual weight-updates are sparsified instead of delayed. On the other hand, it’s easy to see that communication delay has the potential to speed-up parallel training as it allows the individual computation devices to perform multiple steps of SGD without interruption. Our experiments with 4 clients demonstrate that introducing communication delay into data parallel training is not harmful to the convergence of the model in terms of training iterations.
192
+
193
+ # 5 CONCLUSION
194
+
195
+ The gradient information for training deep neural networks with SGD is highly redundant (see e.g. Lin et al. (2017)). We exploit this fact to the extreme by combining 3 powerful compression strategies and are able to achieve compression gains of up to four orders of magnitude with only a slight decrease in accuracy. More fundamentally, we present theoretical and empirical evidence suggesting that the formerly treated as separate compression methods of communication delay and gradient sparsification in fact can be viewed as two very similar forms of gradient delay that affect the convergence speed in a roughly multiplicative way. Based on this insight we propose a framework that is able to reap the benefits from both compression approaches and can smoothly adapt to communication-constraints in the learning environment, such as network bandwidth and latency and (SGD-)computation time as well as temporal inhomogeneities therein. This leads to advantages in both federated learning and data-parallel training of deep neural networks. We would like to highlight, that in no case we did modify the hyperparameters of the respective baseline models to accommodate our method. This demonstrates that our method is easily applicable. Note however that an extensive hyperparameter search could further improve the results. Furthermore, our findings in sections 2 and 4 indicate that even higher compression rates are possible if we adapt communication delay and gradient sparsity to the particular training objective. It remains an interesting direction of further research to identify heuristics and theoretical insights that can help to find the optimal balance and thus guide sparsity towards optimality.
196
+
197
+ # REFERENCES
198
+
199
+ Alham Fikri Aji and Kenneth Heafield. Sparse communication for distributed gradient descent. arXiv preprint arXiv:1704.05021, 2017.
200
+
201
+ Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. Qsgd: Communicationefficient sgd via gradient quantization and encoding. In Advances in Neural Information Processing Systems, pp. 1707–1718, 2017.
202
+
203
+ Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Anima Anandkumar. signsgd: compressed optimisation for non-convex problems. arXiv preprint arXiv:1802.04434, 2018.
204
+
205
+ Trishul M Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In OSDI, volume 14, pp. 571–582, 2014.
206
+
207
+ Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2009.
208
+
209
+ Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In Advances in neural information processing systems, pp. 1223–1231, 2012.
210
+
211
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009.
212
+
213
+ Solomon Golomb. Run-length encodings (corresp.). IEEE transactions on information theory, 12(3): 399–401, 1966.
214
+
215
+ 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.
216
+
217
+ Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, volume 1, pp. 3, 2017.
218
+
219
+ Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. arXiv preprint arXiv:1611.01462, 2016.
220
+
221
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pp. 448–456, 2015.
222
+
223
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
224
+
225
+ Jakub Konecnˇ y, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and \` Dave Bacon. Federated learning: Strategies for improving communication efficiency. arXiv preprint arXiv:1610.05492, 2016.
226
+
227
+ Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 2014.
228
+
229
+ Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
230
+
231
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
232
+
233
+ Yann A LeCun, Léon Bottou, Genevieve B Orr, and Klaus-Robert Müller. Efficient backprop. In Neural networks: Tricks of the trade, pp. 9–48. Springer, 2012.
234
+
235
+ Mu Li, David G Andersen, Alexander J Smola, and Kai Yu. Communication efficient distributed machine learning with the parameter server. In Advances in Neural Information Processing Systems, pp. 19–27, 2014.
236
+
237
+ Yujun Lin, Song Han, Huizi Mao, Yu Wang, and William J Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. arXiv preprint arXiv:1712.01887, 2017.
238
+
239
+ Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993.
240
+
241
+ H Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, et al. Communication-efficient learning of deep networks from decentralized data. arXiv preprint arXiv:1602.05629, 2016.
242
+
243
+ Philipp Moritz, Robert Nishihara, Ion Stoica, and Michael I Jordan. Sparknet: Training deep networks in spark. arXiv preprint arXiv:1511.06051, 2015.
244
+
245
+ Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in neural information processing systems, pp. 693–701, 2011.
246
+
247
+ Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech dnns. In Fifteenth Annual Conference of the International Speech Communication Association, 2014.
248
+
249
+ Reza Shokri and Vitaly Shmatikov. Privacy-preserving deep learning. In Proceedings of the 22nd ACM SIGSAC conference on computer and communications security, pp. 1310–1321. ACM, 2015.
250
+
251
+ Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014.
252
+
253
+ Nikko Strom. Scalable distributed dnn training using commodity gpu cloud computing. In Sixteenth Annual Conference of the International Speech Communication Association, 2015.
254
+
255
+ Yusuke Tsuzuku, Hiroto Imachi, and Takuya Akiba. Variance-based gradient compression for efficient distributed deep learning. arXiv preprint arXiv:1802.06058, 2018.
256
+
257
+ Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. arXiv preprint arXiv:1705.07878, 2017.
258
+
259
+ Eric P Xing, Qirong Ho, Wei Dai, Jin Kyu Kim, Jinliang Wei, Seunghak Lee, Xun Zheng, Pengtao Xie, Abhimanu Kumar, and Yaoliang Yu. Petuum: A new platform for distributed machine learning on big data. IEEE Transactions on Big Data, 1(2):49–67, 2015.
260
+
261
+ Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
262
+
263
+ Martin Zinkevich, Markus Weimer, Lihong Li, and Alex J Smola. Parallelized stochastic gradient descent. In Advances in neural information processing systems, pp. 2595–2603, 2010.
264
+
265
+ # 6 SUPPLEMENT
266
+
267
+ 6.1 MOMENTUM CORRECTION, WARM-UP TRAINING AND MOMENTUM MASKING:
268
+
269
+ Lin et al. introduce multiple minor modifications to the vanilla Gradient Dropping method. With these modifications they achieve up to around $1 \%$ higher accuracy compared to Gradient Dropping on a variety of benchmarks. Those modifications include:
270
+
271
+ Momentum correction: Instead of adding the raw gradient to the residuum, the momentum-corrected gradient is added. This is used implicitly in our approach, as our weight updates are already momentum-corrected.
272
+
273
+ Warm-up Training: The sparsity rate is increased exponentially from $2 5 \%$ to $0 . 1 \%$ in the first epochs. We find that warm-up training can indeed speed-up convergence in the beginning of training, but ultimately has no effect on the final accuracy of the model. We therefore omit warm up training in our experiments, as it adds an additional hyperparameter to the method, without any real benefit.
274
+
275
+ Momentum Masking: To avoid stale momentum from carrying the optimization into a wrong direction after a weight update is performed, Lin et al. suggest to set the momentum to zero for updated weights. We adopt momentum correction in our method.
276
+
277
+ # 6.2 GOLOMB POSITION DECODING
278
+
279
+ Algorithm 4 describes the decoding of a binary sequence produced by Golomb Position Encoding (see main paper). Since the shapes of all weight-tensors are known to both the server and all clients, we can omit the shape information in both encoding and decoding.
280
+
281
+ # Algorithm 4: Golomb Position Decoding
282
+
283
+ 1 input: binary message msg, bitsize $\mathbf { b } ^ { * }$ , mean value $\mu$
284
+ 2 output: sparse tensor $\Delta W ^ { * }$
285
+ 3 init: $\Delta W ^ { * } 0 \in \mathbb { R } ^ { n }$
286
+ 4 $i \gets 0$ ; $q \gets 0$ ; $j 0$
287
+ 5 while $i < s i z e ( \mathrm { m s g } )$ do
288
+ 6 i ${ \bf f } \log [ i ] = 0$ then
289
+ 7 • $j \gets j + q 2 ^ { \mathbf { b } ^ { \ast } } + \mathrm { i n t } _ { \mathbf { b } ^ { \ast } } ( \mathrm { m s g } [ i + 1 ] , . . , \mathrm { m s g } [ i + \mathbf { b } ^ { \ast } ] ) + 1$
290
+ 8 • ∆W ∗j ← µ
291
+ 9 q 0; i i + b∗ + 1
292
+ 10 else
293
+ 11 • q ← q + 1; i ← i + 1
294
+ 12 end
295
+ 13 end
296
+ 14 return ∆W ∗
297
+
298
+ # 6.3 MODEL SPECIFICATION
299
+
300
+ Below, we describe the neural network models used in our experiments. Table 4 list the training hyperparameters that were used.
301
+
302
+ Table 4: Hyperparameters used for our experiments in sections 2 and 4.
303
+
304
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Experiment</td><td rowspan=1 colspan=1>Iterations</td><td rowspan=1 colspan=1>Batchsize</td><td rowspan=1 colspan=1>LR</td><td rowspan=1 colspan=1>LR Decay</td><td rowspan=1 colspan=1>Optimizer</td></tr><tr><td rowspan=6 colspan=1>tettittt</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2000</td><td rowspan=1 colspan=1>128×4</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>ResNet18@CIFAR10</td><td rowspan=1 colspan=1>36000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1 @ ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>ResNet34@CIFAR100</td><td rowspan=1 colspan=1>36000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>ResNet50@ImageNet</td><td rowspan=1 colspan=1>900000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ep 30 and 60</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>WordLSTM@PTB</td><td rowspan=1 colspan=1>53000</td><td rowspan=1 colspan=1>5×4</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>decay 0.25 if losshas not decreased</td><td rowspan=1 colspan=1>SGD</td></tr><tr><td rowspan=1 colspan=1>WordLSTM*@WIKI</td><td rowspan=1 colspan=1>120000</td><td rowspan=1 colspan=1>5×4</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>decay 0.25 if losshas not decreased</td><td rowspan=1 colspan=1>SGD</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>Resnet18*@CIFAR10</td><td rowspan=1 colspan=1>23000</td><td rowspan=1 colspan=1>4×50</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2500</td><td rowspan=1 colspan=1>8×100</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2500</td><td rowspan=1 colspan=1>2×400</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>Adam</td></tr></table>
305
+
306
+ LeNet5-Caffe: The model specification can be downloaded from the Caffe MNIST tutorial page: https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet_ train_test.prototxt. (Features convolutional layers, fully connected layers, pooling.)
307
+
308
+ ResNet18, ResNet32, ResNet50: We use the implementation from the official PyTorch repository: https://github.com/pytorch/examples/tree/master/imagenet. (Features skip-connections, batch-normalization.)
309
+
310
+ WordLSTM: We use the implementation from the official PyTorch repository (configuration "medium"): https://github.com/pytorch/examples/tree/master/word_ language_model. (Features trainable word-embeddings, multilayer LSTM-cells, dropout.)
311
+
312
+ # 6.4 PROOF OF THEOREM 2.1.
313
+
314
+ Proof. Since
315
+
316
+ $$
317
+ \begin{array} { r } { n ^ { t } = \alpha n ^ { t - 1 } + N ^ { t } = \alpha ( \alpha n ^ { t - 2 } + N ^ { t - 1 } ) + N ^ { t } = \alpha ^ { 2 } n ^ { t - 2 } + \alpha N ^ { t - 1 } + N ^ { t } } \\ { = \alpha ^ { \tau } n ^ { t - \tau } + \displaystyle \sum _ { i = 0 } ^ { \tau - 1 } \alpha ^ { i } N ^ { t - i } } \end{array}
318
+ $$
319
+
320
+ it holds that
321
+
322
+ $$
323
+ \mathrm { c o v } ( n ^ { t - \tau } , n ^ { t } ) = \mathrm { c o v } ( n ^ { t - \tau } , \alpha ^ { \tau } n ^ { t - \tau } + \sum _ { i = 0 } ^ { \tau - 1 } \alpha ^ { i } N ^ { t - i } ) = \alpha ^ { \tau } \sigma ^ { 2 } + \sum _ { i = 0 } ^ { \tau - 1 } \alpha ^ { i } \underbrace { \mathrm { c o v } ( n ^ { t - \tau } , N ^ { t - i } ) } _ { = 0 } = \alpha ^ { \tau } \sigma ^ { 2 }
324
+ $$
325
+
326
+ With equation equation 10 it follows that
327
+
328
+ $$
329
+ \begin{array} { r l r } { { \mathbb { V } ( \sum _ { t = 1 } ^ { T } n ^ { t } ) = \sum _ { t _ { 1 } = 1 } ^ { T } \sum _ { t _ { 2 } = 1 } ^ { T } \operatorname { c o v } ( n ^ { t _ { 1 } } , n ^ { t _ { 2 } } ) } } \\ & { } & { = \underbrace { \sum _ { t = 1 } ^ { T } \operatorname { c o v } ( n ^ { t } , n ^ { t } ) } _ { T \sigma ^ { 2 } } + 2 \underbrace { \sum _ { t = 1 } ^ { T - 1 } \operatorname { c o v } ( n ^ { t } , n ^ { t + 1 } ) } _ { \alpha ( T - 1 ) \sigma ^ { 2 } } + 2 \underbrace { \sum _ { t = 1 } ^ { T - 2 } \operatorname { c o v } ( n ^ { t } , n ^ { t + 2 } ) } _ { \alpha ^ { 2 } ( T - 2 ) \sigma ^ { 2 } } + \dots + 2 \underbrace { \operatorname { c o v } ( n ^ { 1 } , n ^ { T } ) } _ { \alpha ^ { T - 1 } ( 1 ) \sigma ^ { 2 } } } \end{array}
330
+ $$
331
+
332
+ For negatively correlated noise $\alpha \in ( - 1 , 0 )$ we can bound this term by
333
+
334
+ $$
335
+ \begin{array} { r l } & { \Psi \big ( \displaystyle \sum _ { t = 1 } ^ { T } n ^ { t } \big ) = \sigma ^ { 2 } ( T + 2 \displaystyle \sum _ { \tau = 1 } ^ { T - 1 } \alpha ^ { \tau } ( T - \tau ) ) } \\ & { \qquad = \sigma ^ { 2 } ( T + 2 \frac { \alpha ^ { T + 1 } - \alpha ^ { 2 } T + \alpha T - \alpha } { ( \alpha - 1 ) ^ { 2 } } ) } \\ & { \qquad = \sigma ^ { 2 } ( T + 2 \underbrace { \frac { ( \alpha - \alpha ^ { 2 } ) } { ( \alpha - 1 ) ^ { 2 } } } _ { \le \frac { 1 } { 2 } \alpha } T + 2 \underbrace { \frac { \alpha ^ { T + 1 } - \alpha } { ( \alpha - 1 ) ^ { 2 } } } _ { \le \frac { 1 } { 2 } } ) } \\ & { \qquad \le \sigma ^ { 2 } ( T ( 1 + \alpha ) + 1 ) } \end{array}
336
+ $$
337
+
338
+ # 6.5 PROOF OF THEOREM 3.1.
339
+
340
+ Proof. It holds that
341
+
342
+ $$
343
+ \mathrm { e r r } ( \mathcal { R } _ { T - 1 } + \Delta W _ { T } ) = \| \sum _ { t = 1 } ^ { T } \Delta W _ { t } - \sum _ { t = 1 } ^ { T - 1 } \Delta W _ { t } ^ { * } - \mathcal { R } _ { T - 1 } - \Delta W _ { T } \| = 0 .
344
+ $$
345
+
346
+ Since $s$ is a metric subspace, the projection
347
+
348
+ $$
349
+ \Delta W _ { T } ^ { * } = \mathrm { P r o j } _ { \cal S } ( { \mathcal { R } } _ { T - 1 } + \Delta W _ { T } )
350
+ $$
351
+
352
+ uniquely solves the minimization problem in $s$ .
353
+
354
+ # 6.6 ADDITIONAL RESULTS
355
+
356
+ Figure 6 shows validation error for WordLSTM trained on PTB at different levels of gradient sparsity and temporal sparsity. The total sparsity, defined as the product of temporal and gradient sparsity remains constant along the diagonals of the matrix. We observe that different forms of sparsity perform best during different stages of training. Phrased differently, this means that there is not one optimal sparsity setup, but rather sparsity needs to be adapted to the current training phase to achieve optimal compression.
357
+
358
+ ![](images/570169075c94d2ced3e9339b2521904bac6d1a28ed33fac971c71b090746e136.jpg)
359
+ Figure 6: Perplexity for different levels of gradient sparsity and temporal sparsity at different stages of training. WordLSTM trained on PTB.
parse/train/B1edvs05Y7/B1edvs05Y7_content_list.json ADDED
@@ -0,0 +1,1731 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SPARSE BINARY COMPRESSION: TOWARDS DISTRIBUTED DEEP LEARNING WITH MINIMAL COMMUNICATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 828,
10
+ 170
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 195,
20
+ 398,
21
+ 223
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 261,
32
+ 544,
33
+ 275
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Currently, progressively larger deep neural networks are trained on ever growing data corpora. In result, distributed training schemes are becoming increasingly relevant. A major issue in distributed training is the limited communication bandwidth between contributing nodes or prohibitive communication cost in general. To mitigate this problem we propose Sparse Binary Compression (SBC), a compression framework that allows for a drastic reduction of communication cost for distributed training. SBC combines existing techniques of communication delay and gradient sparsification with a novel binarization method and optimal weight update encoding to push compression gains to new limits. By doing so, our method also allows us to smoothly trade-off gradient sparsity and temporal sparsity to adapt to the requirements of the learning task. Our experiments show, that SBC can reduce the upstream communication on a variety of convolutional and recurrent neural network architectures by more than four orders of magnitude without significantly harming the convergence speed in terms of forward-backward passes. For instance, we can train ResNet50 on ImageNet in the same number of iterations to the baseline accuracy, using $\\times 3 5 3 1$ less bits or train it to a $1 \\%$ lower accuracy using $\\times 3 7 2 0 8$ less bits. In the latter case, the total upstream communication required is cut from 125 terabytes to 3.35 gigabytes for every participating client. Our method also achieves state-of-the-art compression rates in a Federated Learning setting with 400 clients. ",
40
+ "bbox": [
41
+ 233,
42
+ 291,
43
+ 766,
44
+ 569
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 599,
55
+ 336,
56
+ 616
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Distributed Stochastic Gradient Descent (DSGD) is a training setting, in which a number of clients jointly trains a deep learning model using stochastic gradient descent (Dean et al., 2012; Recht et al., 2011; Moritz et al., 2015). Every client holds an individual subset of the training data, used to improve the current master model. The improvement is obtained by investing computational resources to perform iterations of stochastic gradient descent (SGD). This local training produces a weight update $\\Delta { \\boldsymbol { \\nu } } _ { }$ in every participating client, which in regular or irregular intervals (\"communication rounds\") is exchanged to produce a new master model. This exchange of weight updates can be performed indirectly via a centralized server or directly in an all-reduce operation. In both cases, all clients share the same master model after every communication round (see figure 1). In vanilla DSGD the clients have to communicate a full gradient update during every iteration. Every such update is of the same size as the full model, which can be in the range of gigabytes for modern architectures with millions of parameters (He et al., 2016; Huang et al., 2017). Over the course of multiple hundred thousands of training iterations on big datasets the total communication for every client can easily grow to more than a petabyte. Consequently, if communication bandwidth is limited, or communication is costly, distributed deep learning can become unproductive or even unfeasible. DSGD is a very popular training setting with many applications. On one end of the spectrum, DSGD can be used to greatly reduce the training time of large-scale deep learning models by introducing device-level data parallelism (Chilimbi et al., 2014; Zinkevich et al., 2010; Xing et al., 2015; Li et al., 2014), making use of the fact that the computation of a mini-batch gradient is perfectly parallelizable. In this setting, the clients are usually embodied by hardwired high-performance computation units (i.e. GPUs in a cluster) and every client performs one iteration of SGD per communication round. Since communication is high-frequent in this setting, bandwidth can be a significant bottleneck. On the other end of the spectrum DSGD can also be used to enable privacy-preserving deep learning (Shokri & Shmatikov, 2015; McMahan et al., 2016). Since the clients only ever share weight updates, DSGD makes it possible to train a model from the combined data of all clients without any individual client having to reveal their local training data to a centralized server. In this setting the clients typically are embedded or mobile devices with low network bandwidth, intermittent network connections, and an expensive mobile data plan. In both scenarios, the communication cost between the individual training nodes is a limiting factor for the performance of the whole learning system. For the synchronous distributed training scheme described above, the total amount of bits communicated by every client during training is given by ",
63
+ "bbox": [
64
+ 174,
65
+ 632,
66
+ 825,
67
+ 924
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "image",
73
+ "img_path": "images/bbfd0bb297fd001cc86bbc18d700f0530cf52fa5b998b8a1e2263f9564a97595.jpg",
74
+ "image_caption": [
75
+ "Figure 1: One communication round of DSGD: a) Clients synchronize with the server. b) Clients compute a weight update independently based on their local data. c) Clients upload their local weight updates to the server, where they are averaged to produce the new master model. "
76
+ ],
77
+ "image_footnote": [],
78
+ "bbox": [
79
+ 178,
80
+ 102,
81
+ 821,
82
+ 196
83
+ ],
84
+ "page_idx": 1
85
+ },
86
+ {
87
+ "type": "text",
88
+ "text": "",
89
+ "bbox": [
90
+ 173,
91
+ 277,
92
+ 825,
93
+ 417
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "equation",
99
+ "img_path": "images/ac59f44bd27c9292f6f0c84ff8f3b64592d4779f420d0e21eec435c791540086.jpg",
100
+ "text": "$$\n\\begin{array} { r } { \\mathsf { b } _ { t o t a l } \\in \\mathcal { O } ( \\underbrace { N _ { i t e r } \\times f } _ { \\# \\mathrm { c o m m u n i c a t i o n ~ r o u n d s } } \\times \\underbrace { | \\Delta \\mathcal { W } _ { \\neq 0 } | \\times ( \\bar { \\mathrm { b } } _ { p o s } + \\bar { \\mathrm { b } } _ { v a l } ) } _ { \\# \\mathrm { b i t s ~ p e r ~ c o m m u n i c a t i o n } } \\times \\underbrace { K } _ { \\# \\mathrm { r e c e i v i n g ~ n o d e s } } ) } \\end{array}\n$$",
101
+ "text_format": "latex",
102
+ "bbox": [
103
+ 240,
104
+ 425,
105
+ 758,
106
+ 463
107
+ ],
108
+ "page_idx": 1
109
+ },
110
+ {
111
+ "type": "text",
112
+ "text": "where $N _ { i t e r }$ is the total number of training iterations (forward-backward passes) every client performs, $f$ is the communication frequency, $| \\mathcal { W } _ { \\neq 0 } |$ is the sparsity of the weight update, $\\bar { \\mathrm { b } } _ { p o s }$ , $\\bar { \\mathrm { b } } _ { v a l }$ are the average number of bits required to communicate the position and the value of the non-zero elements respectively and $K$ is the number of receiving nodes (if $\\mathcal { W }$ is dense, the positions of all weights are predetermined and no position bits are required). ",
113
+ "bbox": [
114
+ 174,
115
+ 472,
116
+ 825,
117
+ 541
118
+ ],
119
+ "page_idx": 1
120
+ },
121
+ {
122
+ "type": "text",
123
+ "text": "Substantial research has gone into the effort of reducing the amount of communication necessary between the clients via lossy compression schemes. Using the systematic of equation 1, we can organize prior approaches into three different groups: ",
124
+ "bbox": [
125
+ 174,
126
+ 547,
127
+ 825,
128
+ 590
129
+ ],
130
+ "page_idx": 1
131
+ },
132
+ {
133
+ "type": "text",
134
+ "text": "Sparsification methods restrict weight updates to modifying only a small subset of the parameters, thus reducing $| \\Delta \\mathcal { W } _ { \\neq 0 } |$ . Strom (2015) presents an approach (later modified by Tsuzuku et al. (2018)) in which only gradients with a magnitude greater than a certain predefined threshold are sent to the server. All other gradients are aggregated into a residual. This method achieves compression rates of up to 3 orders of magnitude on an acoustic modeling task. In practice however, it is hard to choose appropriate values for the threshold, as it may vary a lot for different architectures and even different layers. Instead of using a fixed threshold to decide what gradient entries to send, Aji & Heafield (2017) use a fixed sparsity rate. They only communicate the fraction $p$ entries of the gradient with the biggest magnitude, while also collecting all other gradients in a residual. At a sparsity rate of $p = 0 . 0 0 1$ their method slightly degrades the convergence speed and final accuracy of the trained model. Lin et al. (2017) present modifications to the work of Aji et al. which close this performance gap. These modifications include using a curriculum to slowly increase the amount of sparsity in the first couple communication rounds and applying momentum factor masking to overcome the problem of gradient staleness. Their method achieves compression rates ranging from $\\times 2 7 0$ to $\\times 6 0 0$ on different architectures, without slowdown in convergence speed. ",
135
+ "bbox": [
136
+ 173,
137
+ 597,
138
+ 825,
139
+ 805
140
+ ],
141
+ "page_idx": 1
142
+ },
143
+ {
144
+ "type": "text",
145
+ "text": "Communication delay methods try to reduce the communication frequency $f$ . McMahan et al. (2016) propose Federated Averaging to reduce the cumulative communication. In Federated Averaging, instead of communicating after every iteration, every client performs multiple iterations of SGD to compute a weight update. The authors observe that this delay of communication does not significantly harm the convergence speed in terms of local iterations and report a reduction in the number of necessary communication rounds by a factor of $\\times 1 0 - \\times 1 0 0$ on different convolutional and recurrent neural network architectures. In a follow-up work Konecnˇ y et al. (2016) combine this \\` communication delay with random sparsification and probabilistic quantization. They restrict the clients to learn random sparse weight updates or force random sparsity on them afterwards (\"structured\" vs \"sketched\" updates) and combine this sparsification with probabilistic quantization. While their method also combines communication delay with (random) sparsification and quantization, and achieves good compression gains for one particular CNN and LSTM model, it also causes a major drop in convergence speed and final accuracy. ",
146
+ "bbox": [
147
+ 174,
148
+ 811,
149
+ 825,
150
+ 924
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "",
157
+ "bbox": [
158
+ 174,
159
+ 103,
160
+ 825,
161
+ 174
162
+ ],
163
+ "page_idx": 2
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "Dense quantization methods try to reduce the amount of value bits $\\bar { \\mathrm { b } } _ { v a l }$ . Different quantization methods have been proposed that reduce the bit-width of the gradients to ternary (Wen et al., 2017), binary (Seide et al., 2014; Bernstein et al., 2018) or arbitrary (Alistarh et al., 2017) bitwidths. While these are theoretically well-founded and come with strong convergence guarantees, they are also limited to a maximum compression rate of $\\times 3 2$ , compared to the regular 32-bit encoding. ",
168
+ "bbox": [
169
+ 174,
170
+ 180,
171
+ 825,
172
+ 251
173
+ ],
174
+ "page_idx": 2
175
+ },
176
+ {
177
+ "type": "image",
178
+ "img_path": "images/16ab61f604048fb48daa23d796e8a481a8582f980e2571e696a8d2c176a492d9.jpg",
179
+ "image_caption": [
180
+ "2 ON THE ACCUMULATION OF GRADIENT INFORMATION ",
181
+ "Figure 2: Sources of noise in SGD (illustration): Left: Optimization noise, caused by Gradient Descent overshooting. Bouncing between the walls of the ravine results in negatively correlated noise. Middle: Batch noise, caused by the batch loss being only a noisy approximation of the full empirical loss. Right: The compressed path converges equally fast, but requires only half of the information to be communicated. "
182
+ ],
183
+ "image_footnote": [],
184
+ "bbox": [
185
+ 183,
186
+ 311,
187
+ 813,
188
+ 462
189
+ ],
190
+ "page_idx": 2
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "Communication delay and sparsification methods as described above already achieve impressive compression rates, however the phenomenon underlying their successes is still only poorly understood. We present a new information-theoretic perspective that is based on the observation that both of these approaches achieve compression by accumulating gradient information locally before sending it to the server. In the case of communication delay all gradients are accumulated uniformly for a fixed amount of iterations, while in the case of sparsification methods they are accumulated non-uniformly until they exceed some fixed or adaptive threshold. In both cases the rate of compression is proportional to the number of steps that the updates are being delayed on average. ",
195
+ "bbox": [
196
+ 173,
197
+ 575,
198
+ 825,
199
+ 688
200
+ ],
201
+ "page_idx": 2
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "Consider now the optimization path $\\Delta { \\mathcal { W } } _ { 1 } , . . , \\Delta { \\mathcal { W } } _ { T }$ taken by SGD on the loss-surface between some initialization point W0 and the model WT = W0 + PTt=1 trained for $T$ iterations. Following this path, we can model the changes occurring to any individual weight in the network $w$ as a noisy stochastic process via ",
206
+ "bbox": [
207
+ 173,
208
+ 694,
209
+ 825,
210
+ 753
211
+ ],
212
+ "page_idx": 2
213
+ },
214
+ {
215
+ "type": "equation",
216
+ "img_path": "images/212cc9d07000b4c26ebe3a0ebc31c73015c3a608b0dadadbb12c62dd4aeb7834.jpg",
217
+ "text": "$$\n\\Delta w ^ { t } = s ^ { t } + n ^ { t } , t = 1 , . . , T\n$$",
218
+ "text_format": "latex",
219
+ "bbox": [
220
+ 405,
221
+ 758,
222
+ 593,
223
+ 776
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "where $s ^ { t }$ denotes the deterministic signal (i.e. the true direction of the minimum), while $n ^ { t }$ denotes the noise, induced by mini-batch sampling in SGD (\"batch noise\") and the stochasticity of the learning process itself (\"optimization noise\", see figure 2 for an illustration). For the sake of simplicity, and motivated by the central limit theorem we can assume (a) that this noise $n ^ { t }$ is normally distributed at every time-step $n ^ { t } \\sim \\mathcal N ( 0 , \\sigma ^ { 2 } )$ with the variance being constant in time $\\mathbb { V } ( n ^ { t } ) \\stackrel { } { = } \\sigma ^ { 2 }$ for all $t = 1 , . . , T$ . Since the optimization process has the tendency to damp noise as investigated for instance in LeCun et al. (2012) it is also reasonable to assume (b) that the noise is (negatively) self-correlated. The noise process is then given by $n ^ { 1 } = N ^ { 1 }$ , $n ^ { t } = \\alpha n ^ { t - 1 } + N ^ { t }$ , with $N ^ { t }$ normally distributed and all $N ^ { t }$ uncorrelated, $\\alpha \\in ( - 1 , 0 )$ . Given these assumptions we can bound the variance of the accumulated parameter updates. ",
230
+ "bbox": [
231
+ 173,
232
+ 784,
233
+ 825,
234
+ 924
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "Theorem 2.1. Under assumptions (a) and $( b )$ , the variance of the accumulated noise can be bounded by ",
241
+ "bbox": [
242
+ 169,
243
+ 103,
244
+ 825,
245
+ 132
246
+ ],
247
+ "page_idx": 3
248
+ },
249
+ {
250
+ "type": "equation",
251
+ "img_path": "images/3e50afe126f9219429604be541b8722ca97970ba408426584698260b8bb18bee.jpg",
252
+ "text": "$$\n\\mathbb { V } ( \\sum _ { t = 1 } ^ { T } n ^ { t } ) \\le \\sigma ^ { 2 } ( T ( 1 + \\alpha ) + 1 ) .\n$$",
253
+ "text_format": "latex",
254
+ "bbox": [
255
+ 388,
256
+ 133,
257
+ 607,
258
+ 179
259
+ ],
260
+ "page_idx": 3
261
+ },
262
+ {
263
+ "type": "text",
264
+ "text": "The proof can be found in the supplement. Theorem 2.1 directly leads us to a lower bound on the signal-to-noise ratio of the accumulated weight-updates: ",
265
+ "bbox": [
266
+ 173,
267
+ 188,
268
+ 823,
269
+ 217
270
+ ],
271
+ "page_idx": 3
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "Corollary 2.1.1. Under assumptions (a) and $( b )$ , accumulation increases the signal-to-noise ratio from $\\bar { s } / \\sigma$ to ",
276
+ "bbox": [
277
+ 174,
278
+ 219,
279
+ 823,
280
+ 247
281
+ ],
282
+ "page_idx": 3
283
+ },
284
+ {
285
+ "type": "equation",
286
+ "img_path": "images/8aeac17ad38dd000580db3076e0296f4067b67d75ea14f49551154c2d8042370.jpg",
287
+ "text": "$$\nS N R ( \\sum _ { t = 1 } ^ { T } \\Delta w ^ { t } ) = \\frac { \\mathbb { E } [ \\sum _ { t = 1 } ^ { T } s ^ { t } + n ^ { t } ] } { \\sqrt { \\mathbb { V } [ \\sum _ { t = 1 } ^ { T } s ^ { t } + n ^ { t } ] } } \\geq \\frac { \\sum _ { t = 1 } ^ { T } s ^ { t } } { \\sqrt { \\sigma ^ { 2 } ( T ( 1 + \\alpha ) + 1 ) } } \\approx \\frac { \\sqrt { T } } { \\sqrt { 1 + \\alpha } } \\frac { \\bar { s } } { \\sigma }\n$$",
288
+ "text_format": "latex",
289
+ "bbox": [
290
+ 241,
291
+ 251,
292
+ 756,
293
+ 300
294
+ ],
295
+ "page_idx": 3
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "$\\begin{array} { r } { \\bar { s } = \\frac { 1 } { T } \\sum _ { t = 1 } ^ { T } { s ^ { t } } } \\end{array}$ being the signal-average over time. ",
300
+ "bbox": [
301
+ 173,
302
+ 303,
303
+ 544,
304
+ 323
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "This means that a weight-update will be more informative the longer the accumulation period and the stronger the noise correlates temporally. Convergence speed will not be compromised for as long as the information content of the accumulated update is equal to the cumulative information content of the individual updates (c.f. fig. 2 (c)). This line of reasoning helps to shed light on both the successes of communication delay and gradient sparsification. In fact, it implies that both of these approaches are actually very similar in the way they affect the information flow from client to server on the individual weight level. ",
311
+ "bbox": [
312
+ 173,
313
+ 330,
314
+ 825,
315
+ 429
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "We find that this intuition is also verified empirically. Figure 3 shows validation errors for ResNet32 model trained on CIFAR for 60000 iterations at different levels of communication delay and gradient sparsity. We observe multiple things: 1.) The validation error remains more or less constant along the off-diagonals of the matrix where the total sparsity (i.e. the product of communication delay and gradient sparsity) is constant. 2.) The existing methods of Federated Averaging (McMahan et al., 2016) (purple) and Gradient Dropping/ DGC (Aji & Heafield, 2017; Lin et al., 2017)(yellow) are just lines in the two-dimensional space of possible compression methods. 3.) There exists a roughly triangular area of approximately constant error, optimal compression methods lie along the hypotenuse of this triangle. We find this behavior consistently across different model architectures, more examples can be found in the supplement. These results indicate, that communication delay and sparsification affect the convergence in a roughly multiplicative way and that there seems to exist a fixed information budged in DSGD, necessary to maintain unhindered convergence. ",
322
+ "bbox": [
323
+ 174,
324
+ 436,
325
+ 486,
326
+ 781
327
+ ],
328
+ "page_idx": 3
329
+ },
330
+ {
331
+ "type": "image",
332
+ "img_path": "images/19e7ea356464d3e97b87fc82605d547a43177538b4a6011a877d3cd1804c873b.jpg",
333
+ "image_caption": [
334
+ "Figure 3: Validation Error for ResNet32 trained on CIFAR at different levels of temporal and gradient sparsity (the error is color-coded, brighter means lower error). The prior approaches of Gradient Dropping and Federated Averaging can be embedded in a two-dimensional compression framework. "
335
+ ],
336
+ "image_footnote": [],
337
+ "bbox": [
338
+ 506,
339
+ 458,
340
+ 816,
341
+ 667
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "In the following we present a framework that allows us to smoothly trade of these two types of gradient accumulation against one another. By doing so our proposed framework can adapt to the requirements of the distributed learning environment and achieve state-of-the-art compression results by reaping the benefits from both approaches. ",
348
+ "bbox": [
349
+ 174,
350
+ 790,
351
+ 826,
352
+ 845
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "3 SPARSE BINARY COMPRESSION ",
359
+ "text_level": 1,
360
+ "bbox": [
361
+ 176,
362
+ 864,
363
+ 468,
364
+ 881
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "Inspired by our findings in the previous section, we propose Sparse Binary Compression (cf. Figure 4), to drastically reduce the number of communicated bits in distributed training. SBC makes use of multiple compression techniques simultaneously1 to reduce all multiplicative components of equation 1. ",
371
+ "bbox": [
372
+ 173,
373
+ 895,
374
+ 825,
375
+ 924
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "",
382
+ "bbox": [
383
+ 171,
384
+ 103,
385
+ 825,
386
+ 133
387
+ ],
388
+ "page_idx": 4
389
+ },
390
+ {
391
+ "type": "image",
392
+ "img_path": "images/746065ec084d2fd326f7cabd07148c0086f6a804fe554d6536ad8c47ebeb85ba.jpg",
393
+ "image_caption": [
394
+ "Figure 4: Step-by-step explanation of techniques used in Sparse Binary Compression: (a) Illustrated is the traversal of the parameter space with regular DSGD (left) and Federated Averaging (right). With this form of communication delay, a bigger region of the loss surface can be traversed, in the same number of communication rounds. That way compression gains of up to $\\times 1 0 0 0$ are possible. After a number of iterations, the clients communicate their locally computed weight updates. (b) Before communication, the weight update is first sparsified, by dropping all but the fraction $p$ weight updates with the highest magnitude. This achieves up to $\\times 1 0 0 0$ compression gain. (c) Then the sparse weight update is binarized for an additional compression gain of approximately $\\times 3 .$ . (d) Finally, we optimally encode the positions of the non-zero elements, using Golomb encoding. This reduces the bit size of the compressed weight update by up to another $\\times 2$ compared to naive encoding. "
395
+ ],
396
+ "image_footnote": [],
397
+ "bbox": [
398
+ 179,
399
+ 154,
400
+ 823,
401
+ 289
402
+ ],
403
+ "page_idx": 4
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "In the following $\\mathcal { W }$ will refer to the entirety of neural network parameters, while $W \\in { \\mathcal { W } }$ will refer to one specific tensor of weights. Arithmetic operations on $\\mathcal { W }$ are to be understood componentwise. ",
408
+ "bbox": [
409
+ 174,
410
+ 474,
411
+ 823,
412
+ 503
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "Communication Delay, Fig. 4 (a): We use communication delay, proposed by McMahan et al. (2016), to introduce temporal sparsity into DSGD. Instead of communicating gradients after every local iteration, we allow the clients to compute more informative updates by performing multiple iterations of SGD. These generalized weight updates are given by ",
419
+ "bbox": [
420
+ 174,
421
+ 511,
422
+ 825,
423
+ 566
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "equation",
429
+ "img_path": "images/4cdccd4925160236acbf7ccbf55ac4487b4a76c3669dda1dd2e408f484d6e75c.jpg",
430
+ "text": "$$\n\\Delta \\mathcal { W } _ { i } = \\mathrm { S G D } _ { n } ( \\mathcal { W } _ { i } , D _ { i } ) - \\mathcal { W } _ { i }\n$$",
431
+ "text_format": "latex",
432
+ "bbox": [
433
+ 397,
434
+ 574,
435
+ 601,
436
+ 592
437
+ ],
438
+ "page_idx": 4
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "where $\\mathrm { S G D } _ { n } ( \\mathcal { W } _ { i } , D _ { i } )$ refers to the set of weights obtained by performing $n$ iterations of stochastic gradient descent on $\\mathcal { W } _ { i }$ , while sampling mini-batches from the i-th client’s training data $D _ { i }$ . Empirical analysis by McMahan et al. (2016) suggests that communication can be delayed drastically, with only marginal degradation of accuracy. For $n = 1$ we obtain regular DSGD. ",
443
+ "bbox": [
444
+ 174,
445
+ 599,
446
+ 825,
447
+ 655
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Sparse Binarization, Fig. 4 (b), (c): Following the works of Lin et al. (2017)Strom (2015)Shokri & Shmatikov (2015) and Aji & Heafield (2017) we use the magnitude of an individual weight within a weight update as a heuristic for it’s importance. First, we set all but the fraction $p$ biggest and fraction $p$ smallest weight updates to zero. Next, we compute the mean of all remaining positive and all remaining negative weight updates independently. If the positive mean $\\mu ^ { + }$ is bigger than the absolute negative mean $\\mu ^ { - }$ , we set all negative values to zero and all positive values to the positive mean and vice versa. The method is illustrated in figure 4 and formalized in algorithm 2. Finding the fraction $p$ smallest and biggest values in a vector $W$ requires $\\mathcal { O } ( | W | )$ operations, where $| W |$ refers to the number of elements in $W$ (Cormen et al., 2009). Lin et al. (2017) suggest to reduce the computational cost of this operation, by randomly subsampling from $W$ . However this comes at the cost of introducing (unbiased) noise in the amount of sparsity. Luckily, in our approach communication rounds (and thus compressions) are relatively infrequent, which helps to marginalize the overhead of the sparsification. Quantizing the non-zero elements of the sparsified weight update to the mean reduces the required value bits $\\bar { b } _ { v a l }$ from 32 to $O$ . This translates to a reduction in communication cost by a factor of around $\\times 3$ . We can get away with averaging out the non-zero weight updates because they are relatively homogeneous in value and because we accumulate our compression errors as described in the next paragraph. ",
454
+ "bbox": [
455
+ 173,
456
+ 661,
457
+ 825,
458
+ 898
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "Residual Accumulation, Fig. 4 (d): It is well established (Lin et al., 2017; Strom, 2015; Aji & Heafield, 2017; Seide et al., 2014) that the convergence in sparsified DSGD can be greatly accelerated by accumulating the error that arises from only sending sparse approximations of the weight updates. After every communication round, the residual is updated via ",
465
+ "bbox": [
466
+ 174,
467
+ 102,
468
+ 826,
469
+ 160
470
+ ],
471
+ "page_idx": 5
472
+ },
473
+ {
474
+ "type": "equation",
475
+ "img_path": "images/7957f127b7bd68af2a12aed9b7dcdf5151a480ef6a46694ff1fe491e5d715362.jpg",
476
+ "text": "$$\n\\mathcal { R } _ { \\tau } = \\sum _ { t = 1 } ^ { \\tau } ( \\Delta \\mathcal { W } _ { t } - \\Delta \\mathcal { W } _ { t } ^ { * } ) = \\mathcal { R } _ { \\tau - 1 } + \\Delta \\mathcal { W } _ { \\tau } - \\Delta \\mathcal { W } _ { \\tau } ^ { * } .\n$$",
477
+ "text_format": "latex",
478
+ "bbox": [
479
+ 318,
480
+ 165,
481
+ 678,
482
+ 205
483
+ ],
484
+ "page_idx": 5
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "Error accumulation has the great benefit that no gradient information is lost (it may only become outdated or \"stale\"). In the context of pure sparsification residual accumulation can be interpreted to be equivalent to increasing the batch size for individual parameters (Lin et al., 2017). Moreover, we can show: ",
489
+ "bbox": [
490
+ 173,
491
+ 209,
492
+ 825,
493
+ 265
494
+ ],
495
+ "page_idx": 5
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "Theorem 3.1. Let $\\Delta W _ { 1 } , . . , \\Delta W _ { T } \\in \\mathbb { R } ^ { n }$ be (flattened) weight updates, computed by one client in the first $T$ communication rounds. Let $\\Delta W _ { 1 } ^ { * } , . . , \\Delta W _ { T - 1 } ^ { * } \\in \\mathcal { S }$ be the actual weight updates, transferred in the previous rounds (restricted to some subspace $s$ ) and $\\mathcal { R } _ { \\tau }$ be the content of the residual at time $\\tau$ as in equation 5. Then the orthogonal projection ",
500
+ "bbox": [
501
+ 173,
502
+ 268,
503
+ 825,
504
+ 327
505
+ ],
506
+ "page_idx": 5
507
+ },
508
+ {
509
+ "type": "equation",
510
+ "img_path": "images/f1edfcb24ae965d3dac24d1b3e5923d9265aa5a0223e3ceaceac22b26a5bd41a.jpg",
511
+ "text": "$$\nv = P r o j _ { S } ( \\mathcal { R } _ { T - 1 } + \\Delta W _ { T } )\n$$",
512
+ "text_format": "latex",
513
+ "bbox": [
514
+ 406,
515
+ 332,
516
+ 591,
517
+ 348
518
+ ],
519
+ "page_idx": 5
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "uniquely minimizes the accumulated error ",
524
+ "bbox": [
525
+ 176,
526
+ 354,
527
+ 450,
528
+ 368
529
+ ],
530
+ "page_idx": 5
531
+ },
532
+ {
533
+ "type": "equation",
534
+ "img_path": "images/d9f2e3ca7cdbf91322cfc33ff4f49053768053c7fac01d6dc2bd0aa9019037c8.jpg",
535
+ "text": "$$\n\\operatorname { e r r } ( \\Delta W _ { T } ^ { * } ) = \\| \\sum _ { t = 1 } ^ { T } ( \\Delta W _ { t } - \\Delta W _ { t } ^ { * } ) \\|\n$$",
536
+ "text_format": "latex",
537
+ "bbox": [
538
+ 375,
539
+ 373,
540
+ 620,
541
+ 416
542
+ ],
543
+ "page_idx": 5
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "in S. (Proof in Supplement.) ",
548
+ "bbox": [
549
+ 174,
550
+ 420,
551
+ 362,
552
+ 435
553
+ ],
554
+ "page_idx": 5
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "That means that the residual accumulation keeps the compressed optimization path as close as possible to optimization path taken with non-compressed weight updates. ",
559
+ "bbox": [
560
+ 173,
561
+ 445,
562
+ 825,
563
+ 476
564
+ ],
565
+ "page_idx": 5
566
+ },
567
+ {
568
+ "type": "table",
569
+ "img_path": "images/3a361b943354d85061c8a4c1066e16be2c3a436797fb607cf9b315eb92aa7e0e.jpg",
570
+ "table_caption": [],
571
+ "table_footnote": [],
572
+ "table_body": "<table><tr><td></td><td>Algorithm 1: SynchronousDistributed Stochastic Gradient Descent (DSGD)</td></tr><tr><td></td><td>input: initial parameters W 2 outout: improved parameters W 3 init:all clients Ci are initialized with the</td></tr><tr><td></td><td>same parameters Wi ← W, the initial</td></tr><tr><td></td><td>global weight update and the residuals are set to zero △W,Ri←0</td></tr><tr><td></td><td>4 for t=1,..,T do for i∈ It ≌ {1,..,M} in parallel do</td></tr><tr><td>5 6</td><td>Client Ci does:</td></tr><tr><td>7</td><td>· msg ← downloads→C (msg)</td></tr><tr><td>8</td><td>· △W ← decode(msg)</td></tr><tr><td></td><td>·Wi←Wi+△W</td></tr><tr><td>9</td><td>· △Wi ← Ri+SGDn(Wi,Di)-Wi</td></tr><tr><td>10 11</td><td>· △W* ← compress(△Wi)</td></tr><tr><td>12</td><td>·Ri←△Wi-△W*</td></tr><tr><td></td><td>· msg: ← encode(△W*)</td></tr><tr><td>13 14</td><td>· uploadci→s(msg;)</td></tr><tr><td>15</td><td>end</td></tr><tr><td>16</td><td>Server S does:</td></tr><tr><td>17</td><td>: gatherci→s(△W*), i ∈ It</td></tr><tr><td>18</td><td>△W← £ielt △W*</td></tr><tr><td></td><td>. W←W+△W</td></tr><tr><td>19</td><td></td></tr><tr><td>20</td><td>broadcasts→c (△W), i=1,..,M</td></tr><tr><td>21</td><td>end</td></tr></table>",
573
+ "bbox": [
574
+ 156,
575
+ 501,
576
+ 470,
577
+ 916
578
+ ],
579
+ "page_idx": 5
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "Algorithm 2: Sparse Binary Compression ",
584
+ "text_level": 1,
585
+ "bbox": [
586
+ 531,
587
+ 503,
588
+ 803,
589
+ 518
590
+ ],
591
+ "page_idx": 5
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "1 input: tensor $\\Delta W$ , sparsity $p$ \n2 output: sparse tensor $\\Delta W ^ { * }$ \n$\\begin{array} { r l r } { { 3 } } & { { } \\bullet } & { \\mathrm { v a l ^ { + } } \\mathrm { t o p } _ { p \\% } ( \\Delta W ) ; } \\end{array}$ ; \n$\\begin{array} { r } { \\mathbf { \\Sigma } ^ { \\mathbf { \\textsc { v a l } } } \\mathbf { \\Sigma } ^ { } \\mathbf { \\Sigma } ^ { \\mathbf { w p } } p \\% \\mathbf { \\Sigma } ^ { \\lfloor \\Delta \\nu \\nu \\rfloor , } } \\\\ { \\mathbf { v a l } ^ { - } \\mathbf { t o p } _ { p \\% } ( - \\Delta W ) } \\end{array}$ \n${ \\mathfrak { a } } \\bullet \\mu ^ { + } \\operatorname { m e a n } ( \\mathrm { v a l } ^ { + } ) ; \\mu ^ { - } \\operatorname { m e a n } ( \\mathrm { v a l } ^ { - } )$ 5 if $\\mu ^ { + } \\geq \\mu ^ { - }$ then \n6 return $\\Delta W ^ { * } \\gets \\mu ^ { + } ( W \\geq \\mathrm { \\ m i n } ( \\mathrm { v a l } ^ { + } ) )$ 7 else \n8 return \n$\\Delta W ^ { * } \\gets - \\mu ^ { - } ( W \\le - \\operatorname* { m i n } ( \\mathrm { v a l } ^ { - } ) )$ 9 end ",
596
+ "bbox": [
597
+ 513,
598
+ 521,
599
+ 815,
600
+ 690
601
+ ],
602
+ "page_idx": 5
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "Algorithm 3: Golomb Position Encoding ",
607
+ "text_level": 1,
608
+ "bbox": [
609
+ 531,
610
+ 703,
611
+ 803,
612
+ 718
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "1 input: sparse tensor $\\Delta W ^ { * }$ , sparsity $p$ \n2 output: binary message msg \n3 • $\\bar { \\mathcal { T } } \\Delta W ^ { * } [ : ] _ { \\neq 0 }$ \n4 $\\begin{array} { r } { \\bullet \\ \\mathbf { b } ^ { * } 1 + \\lfloor \\log _ { 2 } ( \\frac { \\log ( \\phi - 1 ) } { \\log ( 1 - p ) } ) \\rfloor } \\end{array}$ \n5 for $i = 1 , . . , | \\mathcal { T } |$ do \n6 • d ← Ii − Ii−1 \n7 • q ← (d − 1) div 2b∗ \n8 • r ← (d − 1) mod 2b∗ \n9 • msg.add(1, .., 1, 0, binaryb∗ (r)) \n| {z }q times \n10 end \n11 return msg ",
619
+ "bbox": [
620
+ 511,
621
+ 722,
622
+ 779,
623
+ 911
624
+ ],
625
+ "page_idx": 5
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "Optimal Position Encoding, Fig. 4 (e): To communicate a set of sparse binary tensors produced by SGC, we only need to transfer the positions of the non-zero elements in the flattened tensors, along with one mean value $\\mu ^ { + }$ or $\\mu ^ { - }$ ) per tensor. Instead of communicating the absolute non-zero positions it is favorable to only communicate the distances between all non-zero elements. It is possible to show that for big values of $| W |$ and $k = p | W |$ , the distances are approximately geometrically distributed with success probability equal to the sparsity rate $p$ . Therefore, we can optimally encode the distances using the Golomb code Golomb (1966). Golomb encoding reduces the average number of position bits to ",
630
+ "bbox": [
631
+ 173,
632
+ 103,
633
+ 825,
634
+ 214
635
+ ],
636
+ "page_idx": 6
637
+ },
638
+ {
639
+ "type": "equation",
640
+ "img_path": "images/58115fb3f1a70efec6240601a5598074aca3d17819c345d53bae82c627f2925c.jpg",
641
+ "text": "$$\n\\bar { \\mathrm { b } } _ { p o s } = \\mathbf { b } ^ { * } + \\frac { 1 } { 1 - ( 1 - p ) ^ { 2 ^ { \\mathbf { b } ^ { * } } } } ,\n$$",
642
+ "text_format": "latex",
643
+ "bbox": [
644
+ 398,
645
+ 214,
646
+ 598,
647
+ 248
648
+ ],
649
+ "page_idx": 6
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "with b∗ = 1 + blog2( log(φ−1)log(1−p) ) and $\\textstyle \\phi = { \\frac { { \\sqrt { 5 } } + 1 } { 2 } }$ being the golden ratio. For a sparsity rate of i.e. $p = 0 . 0 1$ , we get $\\bar { \\mathrm { b } } _ { p o s } = 8 . 3 8$ , which translates to $\\times 1 . 9$ compression, compared to a naive distance encoding with 16 fixed bits. While the overhead for encoding and decoding makes it unproductive to use Golomb encoding in the situation of Strom (2015), this overhead becomes negligible in our situation due to the infrequency of weight update exchange resulting from communication delay. The encoding scheme is given in algorithm 3, while the decoding scheme can be found in the supplement. ",
654
+ "bbox": [
655
+ 173,
656
+ 252,
657
+ 825,
658
+ 343
659
+ ],
660
+ "page_idx": 6
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "Momentum Correction, Warm-up Training and Momentum Masking: Lin et al. (2017) introduce multiple minor modifications to the vanilla Gradient Dropping method, to improve the convergence speed. We adopt momentum masking, while momentum correction is implicit to our approach. For more details on this we refer to the supplement. ",
665
+ "bbox": [
666
+ 173,
667
+ 349,
668
+ 825,
669
+ 405
670
+ ],
671
+ "page_idx": 6
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "Our proposed method is described in Algorithms 1, 2 and 3. Algorithm 1 describes how compression and residual accumulation can be introduced into DSGD. Algorithm 2 describes our compression method. Algorithm 3 describes the Golomb encoding. Table 1 compares theoretical asymptotic compression rates of different popular compression methods. ",
676
+ "bbox": [
677
+ 174,
678
+ 425,
679
+ 823,
680
+ 483
681
+ ],
682
+ "page_idx": 6
683
+ },
684
+ {
685
+ "type": "table",
686
+ "img_path": "images/0d8e73349a2fa9c63af9ebd71026ef096188627a1e38ad9067835ebe334c3e62.jpg",
687
+ "table_caption": [],
688
+ "table_footnote": [],
689
+ "table_body": "<table><tr><td colspan=\"2\">Total Bits =</td><td>Baseline</td><td>SignSGD, TernGrad, QSGD</td><td>Gradient Dropping, DGC</td><td>Federated Averaging</td><td>Sparse Binary Compression</td></tr><tr><td rowspan=\"3\">×</td><td>Temporal Sparsity</td><td>100%</td><td>100%</td><td>100%</td><td>0.1% - 10%</td><td>0.1% - 10%</td></tr><tr><td>Gradient Sparsity</td><td>100%</td><td>100%</td><td>0.1%</td><td>100%</td><td>0.1% - 10%</td></tr><tr><td>Value Bits</td><td>32</td><td>1-8</td><td>32</td><td>32</td><td>0</td></tr><tr><td colspan=\"2\">×M Position Bits</td><td>0</td><td>0</td><td>16</td><td>0</td><td>8-14</td></tr><tr><td colspan=\"2\">Compression Rate</td><td>×1</td><td>×4-×32</td><td>×666</td><td>×10-×1000</td><td>-×40000</td></tr></table>",
690
+ "bbox": [
691
+ 210,
692
+ 494,
693
+ 781,
694
+ 599
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Table 1: Theoretical asymptotic compression rates for different compression methods broken down into components. Only SBC reduces all multiplicative components of the total bitsize (cf. eq. 1). ",
701
+ "bbox": [
702
+ 173,
703
+ 616,
704
+ 825,
705
+ 643
706
+ ],
707
+ "page_idx": 6
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "4 EXPERIMENTS ",
712
+ "text_level": 1,
713
+ "bbox": [
714
+ 174,
715
+ 670,
716
+ 326,
717
+ 686
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "4.1 NETWORKS AND DATASETS ",
724
+ "text_level": 1,
725
+ "bbox": [
726
+ 176,
727
+ 700,
728
+ 406,
729
+ 715
730
+ ],
731
+ "page_idx": 6
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "We evaluate our method on commonly used convolutional and recurrent neural networks with millions of parameters, which we train on well-studied data sets that contain up to multiple millions of samples. We perform experiments with client numbers ranging from 4 to 400 to cover both the distributed training and federated learning use-case. ",
736
+ "bbox": [
737
+ 173,
738
+ 727,
739
+ 825,
740
+ 784
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "Image Classification: We run experiments for LeNet5-Caffe2 on MNIST LeCun (1998), ResNet18 and ResNet34 He et al. (2016) on CIFAR-10 and CIFAR-100 Krizhevsky et al. (2014) and ResNet50 on ILSVRC12 (ImageNet) Deng et al. (2009). For the i.i.d. setting we split the training data randomly into equally sized shards and assign one shard to every one of the clients. For the non-i.i.d. setting every client is assigned samples from only two classes of the dataset, but the amount of data still remains the same for every client. All models are trained using momentum SGD, except for LeNet5- Caffe, which is trained using the Adam optimizer Kingma & Ba (2014). Learning rate, weight intitiallization and data augmentation are as in the respective papers. ",
747
+ "bbox": [
748
+ 173,
749
+ 789,
750
+ 825,
751
+ 901
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "table",
757
+ "img_path": "images/6f2a8da4af23d87f744e29a96644bcf36b3979838035ad76eea271fcb8482842.jpg",
758
+ "table_caption": [],
759
+ "table_footnote": [],
760
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Compression Method -→</td><td>Baseline</td><td>DGC3</td><td>Federated Averaging4</td><td>SBC (1)</td><td>SBC (2)</td><td>SBC (3)</td></tr><tr><td rowspan=\"9\">taprrisititt</td><td>LeNet5-Caffe @MNIST</td><td>Accuracy</td><td>0.9946</td><td>0.994</td><td>0.994</td><td>0.994</td><td>0.994</td><td>0.991</td></tr><tr><td></td><td>Compression</td><td>×1</td><td>×718</td><td>×500</td><td>×2071</td><td>×3166</td><td>×24935</td></tr><tr><td>ResNet18 @CIFAR10</td><td>Accuracy</td><td>0.946</td><td>0.9383</td><td>0.9279</td><td>0.9422</td><td>0.9435</td><td>0.9219</td></tr><tr><td>ResNet34</td><td>Compression Accuracy</td><td>×1</td><td>×768</td><td>×1000</td><td>×2369</td><td>×3491 0.7655</td><td>× 31664 0.701</td></tr><tr><td>@CIFAR100</td><td>Compression</td><td>0.773 ×1</td><td>0.767 ×718</td><td>0.7316</td><td>0.767 ×2370</td><td>×3166</td><td>×31664</td></tr><tr><td>ResNet50</td><td>Accuracy</td><td>0.737</td><td>0.739</td><td>×1000 0.724</td><td>0.735</td><td>0.737</td><td>0.728</td></tr><tr><td>@ImageNet</td><td>Compression</td><td>×1</td><td>×601</td><td>×1000</td><td>×2569</td><td>×3531</td><td>×37208</td></tr><tr><td>WordLSTM</td><td>Perplexity</td><td>76.02</td><td>75.98</td><td>76.37</td><td>77.73</td><td>78.19</td><td>77.57</td></tr><tr><td>@PTB</td><td>Compression</td><td>×1</td><td>×719</td><td>×1000</td><td>×2371</td><td>×3165</td><td>×31658</td></tr><tr><td>WordLSTM*</td><td>Perplexity</td><td>101.5</td><td>102.318</td><td>131.51</td><td>103.95</td><td>103.95</td><td>104.62</td></tr><tr><td>@WIKI</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Compression</td><td></td><td>×719</td><td>×1000</td><td>×2371</td><td>×3165</td><td>×31657</td></tr><tr><td></td><td></td><td>×1</td><td></td><td></td><td></td><td></td><td></td></tr></table>",
761
+ "bbox": [
762
+ 179,
763
+ 101,
764
+ 825,
765
+ 297
766
+ ],
767
+ "page_idx": 7
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "Table 2: Final accuracy/perplexity achieved on the test split and average compression rate for different compression schemes in a distributed training setting with different numbers of clients. ",
772
+ "bbox": [
773
+ 174,
774
+ 318,
775
+ 823,
776
+ 345
777
+ ],
778
+ "page_idx": 7
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Language Modeling: We experiment with multilayer sequence-to-sequence LSTM models as described in Zaremba et al. (2014) on the Penn Treebank (PTB) Marcus et al. (1993) and Wikitext-2 corpora for next-word prediction. The PTB dataset consists of a sequence 923000 training, and 82000 validation words, while the Wikitext-2 dataset contains 2088628 train and 245569 test words. On both datasets we train a two-layer LSTM model with 650 and 200 hidden units respectively (\"WordLSTM\" / \"WordLSTM\\*\") with tied weights between encoder and decoder as described in Inan et al. (2016). The training data is split into consecutive subsequences of equal length, out of which we assign one to every client. ",
783
+ "bbox": [
784
+ 173,
785
+ 377,
786
+ 825,
787
+ 488
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "While the models we use in our experiments do not fully achieve state-of-the-art results on the respective tasks and datasets, they are still sufficient for the purpose of evaluating our compression method and demonstrate, that our method works well with common regularization techniques such as batch normalization Ioffe & Szegedy (2015) and dropout Srivastava et al. (2014). A complete description of models and hyperparameters can be found in the supplement. ",
794
+ "bbox": [
795
+ 174,
796
+ 496,
797
+ 825,
798
+ 565
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "4.2 RESULTS ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 174,
808
+ 587,
809
+ 277,
810
+ 601
811
+ ],
812
+ "page_idx": 7
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "We experiment with three configurations of our method: SBC (1) uses no communication delay and a gradient sparsity of $0 . 1 \\%$ , SBC (2) uses 10 iterations of communication delay and $1 \\%$ gradient sparsity and SBC (3) uses 100 iterations of communication delay and $1 \\%$ gradient sparsity. Our decision for these points on the 2D grid of possible configurations is somewhat arbitrary. The experiments with SBC (1) serve the purpose of enabling us to directly compare our 0-value-bit quantization to the 32-value-bit Deep Gradient Compression (Lin et al., 2017)). ",
817
+ "bbox": [
818
+ 174,
819
+ 614,
820
+ 825,
821
+ 699
822
+ ],
823
+ "page_idx": 7
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Table 2 lists compression rates and final validation accuracies achieved by different compression methods, when applied to the training of neural networks on 5 different datasets. The number of iterations (forward-backward-passes) is held constant for all methods. On all benchmarks, our methods perform comparable to the baseline, while communicating significantly less bits. ",
828
+ "bbox": [
829
+ 174,
830
+ 705,
831
+ 825,
832
+ 762
833
+ ],
834
+ "page_idx": 7
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "Figure 5 shows convergence speed in terms of iterations (left) and communicated bits (right) respectively for ResNet50 trained on ImageNet. The convergence speed is only marginally affected, by our different compression methods. In the first 30 epochs SBC (3) even achieves the highest accuracy, using about $\\times 3 7 0 0 0$ less bits than the baseline. In total, SBC (3) reduces the upstream communication on this benchmark from 125 terabytes to 3.35 gigabytes for every participating client. After the learning rate is lowered in epochs 30 and 60 progress slows down for SBC (3) relative to the ",
839
+ "bbox": [
840
+ 173,
841
+ 768,
842
+ 825,
843
+ 852
844
+ ],
845
+ "page_idx": 7
846
+ },
847
+ {
848
+ "type": "table",
849
+ "img_path": "images/da3d8276997d2b2ced675ea1d0e165cbf581e3ef4793256517730cc531ffed55.jpg",
850
+ "table_caption": [],
851
+ "table_footnote": [],
852
+ "table_body": "<table><tr><td rowspan=2 colspan=1></td><td rowspan=1 colspan=2>Compression Method -→</td><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>GradientDroping</td><td rowspan=1 colspan=1>FederatedAveraging</td><td rowspan=1 colspan=1>SBC (1)</td><td rowspan=1 colspan=1>SBC (2)</td><td rowspan=1 colspan=1>SBC (3)</td></tr><tr><td rowspan=1 colspan=8> i.i.d. data</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>ResNet18*5@CIFAR10</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.9254×1</td><td rowspan=1 colspan=1>0.9167×713</td><td rowspan=1 colspan=1>0.911×100</td><td rowspan=1 colspan=1>0.921×2362</td><td rowspan=1 colspan=1>0.902×3166</td><td rowspan=1 colspan=1>0.906×31664</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.979×1</td><td rowspan=1 colspan=1>0.9811×714</td><td rowspan=1 colspan=1>0.967×100</td><td rowspan=1 colspan=1>0.979×2363</td><td rowspan=1 colspan=1>0.9818×3165</td><td rowspan=1 colspan=1>0.9536×31655</td></tr><tr><td rowspan=1 colspan=1>300</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>AccuracyCompression</td><td rowspan=1 colspan=1>0.9758×1</td><td rowspan=1 colspan=1>0.9744×714</td><td rowspan=1 colspan=1>0.899×100</td><td rowspan=1 colspan=1>0.9731×2363</td><td rowspan=1 colspan=1>0.9733×3165</td><td rowspan=1 colspan=1>0.8919×31655</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=8> non-i.i.d. data</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1> AccuracyCompression</td><td rowspan=1 colspan=1>0.9506×1</td><td rowspan=1 colspan=1>0.9498×714</td><td rowspan=1 colspan=1>0.8592×100</td><td rowspan=1 colspan=1>0.9522×2363</td><td rowspan=1 colspan=1>0.9583×3165</td><td rowspan=1 colspan=1>0.8344×31655</td></tr></table>",
853
+ "bbox": [
854
+ 178,
855
+ 101,
856
+ 820,
857
+ 275
858
+ ],
859
+ "page_idx": 8
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "Table 3: Final accuracy achieved on the test split and average compression rate for different compression schemes in a Federated learning setting with different numbers of clients. ",
864
+ "bbox": [
865
+ 173,
866
+ 294,
867
+ 825,
868
+ 321
869
+ ],
870
+ "page_idx": 8
871
+ },
872
+ {
873
+ "type": "text",
874
+ "text": "methods which do not use communication delay. In direct comparison SBC (1) performs very similar to Gradient Dropping, while using about $\\times 4$ less bits (that is $\\times 2 5 6 9$ less bits than the baseline). ",
875
+ "bbox": [
876
+ 174,
877
+ 348,
878
+ 825,
879
+ 376
880
+ ],
881
+ "page_idx": 8
882
+ },
883
+ {
884
+ "type": "image",
885
+ "img_path": "images/d95f32a3debc2a8c33cf286c97024edb8738782ebd2391fe72729308fd25a2b0.jpg",
886
+ "image_caption": [
887
+ "Figure 5: Left: Top-1 validation accuracy vs number of epochs. Right: Top-1 validation error vs number of transferred bits (log-log). Epochs 30 and 60 at which the learning rate is reduced are marked in the plot. ResNet50 trained on ImageNet. "
888
+ ],
889
+ "image_footnote": [],
890
+ "bbox": [
891
+ 184,
892
+ 395,
893
+ 802,
894
+ 571
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "Table 3 shows results for the federated learning setting with much higher numbers of clients trained on both i.i.d. and non-i.i.d. splits of data. We can see that in particular with growing numbers of clients and in the non-i.i.d. case, Federated Averaging significantly slows down the convergence and degrades the final accuracy. SBC (3) also suffers in this scenario as is also relies on 100 steps of communication delay. Conversely, our methods SBC (1) and (2) that rely more heavily on gradient sparsification perform much better in this setting and in some cases even beat the baseline. This behavior is expected, as the frequent exchange of gradient information in SBC (1) and (2) keeps all clients aligned, while they diverge further from one another for every iteration that communication is delayed in Federated Averaging. ",
901
+ "bbox": [
902
+ 174,
903
+ 656,
904
+ 825,
905
+ 782
906
+ ],
907
+ "page_idx": 8
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Our experiments suggest that the distinction between the two formerly treated as separate distributed training settings of federated learning and data-parallel training is somewhat arbitrary and misleading and that better results can be achieved by combining the best approaches from both of these worlds. Contrary to the paradigm suggested in previous literature (McMahan et al., 2016), communication delay does not seem to be a well-suited approach for communication reduction in the federated learning setting. Instead our experiments demonstrate, that drastically better performance can be achieved under an even lower communication budged, if individual weight-updates are sparsified instead of delayed. On the other hand, it’s easy to see that communication delay has the potential to speed-up parallel training as it allows the individual computation devices to perform multiple steps of SGD without interruption. Our experiments with 4 clients demonstrate that introducing communication delay into data parallel training is not harmful to the convergence of the model in terms of training iterations. ",
912
+ "bbox": [
913
+ 174,
914
+ 789,
915
+ 825,
916
+ 900
917
+ ],
918
+ "page_idx": 8
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "",
923
+ "bbox": [
924
+ 174,
925
+ 103,
926
+ 823,
927
+ 159
928
+ ],
929
+ "page_idx": 9
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "5 CONCLUSION ",
934
+ "text_level": 1,
935
+ "bbox": [
936
+ 176,
937
+ 181,
938
+ 318,
939
+ 196
940
+ ],
941
+ "page_idx": 9
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "The gradient information for training deep neural networks with SGD is highly redundant (see e.g. Lin et al. (2017)). We exploit this fact to the extreme by combining 3 powerful compression strategies and are able to achieve compression gains of up to four orders of magnitude with only a slight decrease in accuracy. More fundamentally, we present theoretical and empirical evidence suggesting that the formerly treated as separate compression methods of communication delay and gradient sparsification in fact can be viewed as two very similar forms of gradient delay that affect the convergence speed in a roughly multiplicative way. Based on this insight we propose a framework that is able to reap the benefits from both compression approaches and can smoothly adapt to communication-constraints in the learning environment, such as network bandwidth and latency and (SGD-)computation time as well as temporal inhomogeneities therein. This leads to advantages in both federated learning and data-parallel training of deep neural networks. We would like to highlight, that in no case we did modify the hyperparameters of the respective baseline models to accommodate our method. This demonstrates that our method is easily applicable. Note however that an extensive hyperparameter search could further improve the results. Furthermore, our findings in sections 2 and 4 indicate that even higher compression rates are possible if we adapt communication delay and gradient sparsity to the particular training objective. It remains an interesting direction of further research to identify heuristics and theoretical insights that can help to find the optimal balance and thus guide sparsity towards optimality. ",
946
+ "bbox": [
947
+ 174,
948
+ 212,
949
+ 825,
950
+ 463
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "REFERENCES ",
957
+ "text_level": 1,
958
+ "bbox": [
959
+ 176,
960
+ 486,
961
+ 285,
962
+ 500
963
+ ],
964
+ "page_idx": 9
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Alham Fikri Aji and Kenneth Heafield. Sparse communication for distributed gradient descent. arXiv preprint arXiv:1704.05021, 2017. ",
969
+ "bbox": [
970
+ 174,
971
+ 508,
972
+ 823,
973
+ 537
974
+ ],
975
+ "page_idx": 9
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. Qsgd: Communicationefficient sgd via gradient quantization and encoding. In Advances in Neural Information Processing Systems, pp. 1707–1718, 2017. ",
980
+ "bbox": [
981
+ 174,
982
+ 547,
983
+ 823,
984
+ 590
985
+ ],
986
+ "page_idx": 9
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Anima Anandkumar. signsgd: compressed optimisation for non-convex problems. arXiv preprint arXiv:1802.04434, 2018. ",
991
+ "bbox": [
992
+ 169,
993
+ 602,
994
+ 826,
995
+ 631
996
+ ],
997
+ "page_idx": 9
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Trishul M Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In OSDI, volume 14, pp. 571–582, 2014. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 641,
1005
+ 825,
1006
+ 684
1007
+ ],
1008
+ "page_idx": 9
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2009. ",
1013
+ "bbox": [
1014
+ 173,
1015
+ 694,
1016
+ 823,
1017
+ 724
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In Advances in neural information processing systems, pp. 1223–1231, 2012. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 734,
1027
+ 825,
1028
+ 777
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009. ",
1035
+ "bbox": [
1036
+ 173,
1037
+ 787,
1038
+ 825,
1039
+ 830
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Solomon Golomb. Run-length encodings (corresp.). IEEE transactions on information theory, 12(3): 399–401, 1966. ",
1046
+ "bbox": [
1047
+ 171,
1048
+ 842,
1049
+ 825,
1050
+ 871
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
1057
+ "bbox": [
1058
+ 176,
1059
+ 882,
1060
+ 825,
1061
+ 922
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, volume 1, pp. 3, 2017. ",
1068
+ "bbox": [
1069
+ 176,
1070
+ 103,
1071
+ 823,
1072
+ 146
1073
+ ],
1074
+ "page_idx": 10
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Hakan Inan, Khashayar Khosravi, and Richard Socher. Tying word vectors and word classifiers: A loss framework for language modeling. arXiv preprint arXiv:1611.01462, 2016. ",
1079
+ "bbox": [
1080
+ 173,
1081
+ 155,
1082
+ 823,
1083
+ 185
1084
+ ],
1085
+ "page_idx": 10
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pp. 448–456, 2015. ",
1090
+ "bbox": [
1091
+ 174,
1092
+ 194,
1093
+ 826,
1094
+ 236
1095
+ ],
1096
+ "page_idx": 10
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1101
+ "bbox": [
1102
+ 174,
1103
+ 246,
1104
+ 823,
1105
+ 275
1106
+ ],
1107
+ "page_idx": 10
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Jakub Konecnˇ y, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and \\` Dave Bacon. Federated learning: Strategies for improving communication efficiency. arXiv preprint arXiv:1610.05492, 2016. ",
1112
+ "bbox": [
1113
+ 173,
1114
+ 285,
1115
+ 826,
1116
+ 328
1117
+ ],
1118
+ "page_idx": 10
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 2014. ",
1123
+ "bbox": [
1124
+ 173,
1125
+ 337,
1126
+ 823,
1127
+ 367
1128
+ ],
1129
+ "page_idx": 10
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998. ",
1134
+ "bbox": [
1135
+ 176,
1136
+ 376,
1137
+ 818,
1138
+ 392
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1145
+ "bbox": [
1146
+ 171,
1147
+ 401,
1148
+ 823,
1149
+ 430
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Yann A LeCun, Léon Bottou, Genevieve B Orr, and Klaus-Robert Müller. Efficient backprop. In Neural networks: Tricks of the trade, pp. 9–48. Springer, 2012. ",
1156
+ "bbox": [
1157
+ 171,
1158
+ 439,
1159
+ 823,
1160
+ 469
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Mu Li, David G Andersen, Alexander J Smola, and Kai Yu. Communication efficient distributed machine learning with the parameter server. In Advances in Neural Information Processing Systems, pp. 19–27, 2014. ",
1167
+ "bbox": [
1168
+ 174,
1169
+ 478,
1170
+ 825,
1171
+ 521
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Yujun Lin, Song Han, Huizi Mao, Yu Wang, and William J Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. arXiv preprint arXiv:1712.01887, 2017. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 530,
1181
+ 825,
1182
+ 573
1183
+ ],
1184
+ "page_idx": 10
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. ",
1189
+ "bbox": [
1190
+ 173,
1191
+ 583,
1192
+ 823,
1193
+ 613
1194
+ ],
1195
+ "page_idx": 10
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "H Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, et al. Communication-efficient learning of deep networks from decentralized data. arXiv preprint arXiv:1602.05629, 2016. ",
1200
+ "bbox": [
1201
+ 174,
1202
+ 621,
1203
+ 825,
1204
+ 651
1205
+ ],
1206
+ "page_idx": 10
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Philipp Moritz, Robert Nishihara, Ion Stoica, and Michael I Jordan. Sparknet: Training deep networks in spark. arXiv preprint arXiv:1511.06051, 2015. ",
1211
+ "bbox": [
1212
+ 173,
1213
+ 660,
1214
+ 825,
1215
+ 689
1216
+ ],
1217
+ "page_idx": 10
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in neural information processing systems, pp. 693–701, 2011. ",
1222
+ "bbox": [
1223
+ 173,
1224
+ 699,
1225
+ 826,
1226
+ 742
1227
+ ],
1228
+ "page_idx": 10
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech dnns. In Fifteenth Annual Conference of the International Speech Communication Association, 2014. ",
1233
+ "bbox": [
1234
+ 174,
1235
+ 751,
1236
+ 825,
1237
+ 795
1238
+ ],
1239
+ "page_idx": 10
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Reza Shokri and Vitaly Shmatikov. Privacy-preserving deep learning. In Proceedings of the 22nd ACM SIGSAC conference on computer and communications security, pp. 1310–1321. ACM, 2015. ",
1244
+ "bbox": [
1245
+ 169,
1246
+ 804,
1247
+ 825,
1248
+ 833
1249
+ ],
1250
+ "page_idx": 10
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. ",
1255
+ "bbox": [
1256
+ 176,
1257
+ 843,
1258
+ 825,
1259
+ 886
1260
+ ],
1261
+ "page_idx": 10
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "Nikko Strom. Scalable distributed dnn training using commodity gpu cloud computing. In Sixteenth Annual Conference of the International Speech Communication Association, 2015. ",
1266
+ "bbox": [
1267
+ 173,
1268
+ 895,
1269
+ 823,
1270
+ 924
1271
+ ],
1272
+ "page_idx": 10
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Yusuke Tsuzuku, Hiroto Imachi, and Takuya Akiba. Variance-based gradient compression for efficient distributed deep learning. arXiv preprint arXiv:1802.06058, 2018. ",
1277
+ "bbox": [
1278
+ 171,
1279
+ 103,
1280
+ 825,
1281
+ 132
1282
+ ],
1283
+ "page_idx": 11
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. arXiv preprint arXiv:1705.07878, 2017. ",
1288
+ "bbox": [
1289
+ 174,
1290
+ 143,
1291
+ 821,
1292
+ 186
1293
+ ],
1294
+ "page_idx": 11
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Eric P Xing, Qirong Ho, Wei Dai, Jin Kyu Kim, Jinliang Wei, Seunghak Lee, Xun Zheng, Pengtao Xie, Abhimanu Kumar, and Yaoliang Yu. Petuum: A new platform for distributed machine learning on big data. IEEE Transactions on Big Data, 1(2):49–67, 2015. ",
1299
+ "bbox": [
1300
+ 174,
1301
+ 198,
1302
+ 821,
1303
+ 241
1304
+ ],
1305
+ "page_idx": 11
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. ",
1310
+ "bbox": [
1311
+ 173,
1312
+ 252,
1313
+ 823,
1314
+ 281
1315
+ ],
1316
+ "page_idx": 11
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Martin Zinkevich, Markus Weimer, Lihong Li, and Alex J Smola. Parallelized stochastic gradient descent. In Advances in neural information processing systems, pp. 2595–2603, 2010. ",
1321
+ "bbox": [
1322
+ 176,
1323
+ 292,
1324
+ 823,
1325
+ 323
1326
+ ],
1327
+ "page_idx": 11
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "6 SUPPLEMENT ",
1332
+ "text_level": 1,
1333
+ "bbox": [
1334
+ 174,
1335
+ 352,
1336
+ 318,
1337
+ 368
1338
+ ],
1339
+ "page_idx": 11
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "6.1 MOMENTUM CORRECTION, WARM-UP TRAINING AND MOMENTUM MASKING: ",
1344
+ "bbox": [
1345
+ 173,
1346
+ 383,
1347
+ 761,
1348
+ 398
1349
+ ],
1350
+ "page_idx": 11
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Lin et al. introduce multiple minor modifications to the vanilla Gradient Dropping method. With these modifications they achieve up to around $1 \\%$ higher accuracy compared to Gradient Dropping on a variety of benchmarks. Those modifications include: ",
1355
+ "bbox": [
1356
+ 174,
1357
+ 410,
1358
+ 823,
1359
+ 453
1360
+ ],
1361
+ "page_idx": 11
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Momentum correction: Instead of adding the raw gradient to the residuum, the momentum-corrected gradient is added. This is used implicitly in our approach, as our weight updates are already momentum-corrected. ",
1366
+ "bbox": [
1367
+ 176,
1368
+ 460,
1369
+ 825,
1370
+ 501
1371
+ ],
1372
+ "page_idx": 11
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Warm-up Training: The sparsity rate is increased exponentially from $2 5 \\%$ to $0 . 1 \\%$ in the first epochs. We find that warm-up training can indeed speed-up convergence in the beginning of training, but ultimately has no effect on the final accuracy of the model. We therefore omit warm up training in our experiments, as it adds an additional hyperparameter to the method, without any real benefit. ",
1377
+ "bbox": [
1378
+ 174,
1379
+ 502,
1380
+ 825,
1381
+ 556
1382
+ ],
1383
+ "page_idx": 11
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Momentum Masking: To avoid stale momentum from carrying the optimization into a wrong direction after a weight update is performed, Lin et al. suggest to set the momentum to zero for updated weights. We adopt momentum correction in our method. ",
1388
+ "bbox": [
1389
+ 176,
1390
+ 558,
1391
+ 825,
1392
+ 598
1393
+ ],
1394
+ "page_idx": 11
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "6.2 GOLOMB POSITION DECODING ",
1399
+ "text_level": 1,
1400
+ "bbox": [
1401
+ 176,
1402
+ 617,
1403
+ 431,
1404
+ 632
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Algorithm 4 describes the decoding of a binary sequence produced by Golomb Position Encoding (see main paper). Since the shapes of all weight-tensors are known to both the server and all clients, we can omit the shape information in both encoding and decoding. ",
1411
+ "bbox": [
1412
+ 174,
1413
+ 645,
1414
+ 825,
1415
+ 686
1416
+ ],
1417
+ "page_idx": 11
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Algorithm 4: Golomb Position Decoding ",
1422
+ "text_level": 1,
1423
+ "bbox": [
1424
+ 176,
1425
+ 699,
1426
+ 447,
1427
+ 714
1428
+ ],
1429
+ "page_idx": 11
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "1 input: binary message msg, bitsize $\\mathbf { b } ^ { * }$ , mean value $\\mu$ \n2 output: sparse tensor $\\Delta W ^ { * }$ \n3 init: $\\Delta W ^ { * } 0 \\in \\mathbb { R } ^ { n }$ \n4 $i \\gets 0$ ; $q \\gets 0$ ; $j 0$ \n5 while $i < s i z e ( \\mathrm { m s g } )$ do \n6 i ${ \\bf f } \\log [ i ] = 0$ then \n7 • $j \\gets j + q 2 ^ { \\mathbf { b } ^ { \\ast } } + \\mathrm { i n t } _ { \\mathbf { b } ^ { \\ast } } ( \\mathrm { m s g } [ i + 1 ] , . . , \\mathrm { m s g } [ i + \\mathbf { b } ^ { \\ast } ] ) + 1$ \n8 • ∆W ∗j ← µ \n9 q 0; i i + b∗ + 1 \n10 else \n11 • q ← q + 1; i ← i + 1 \n12 end \n13 end \n14 return ∆W ∗ ",
1434
+ "bbox": [
1435
+ 158,
1436
+ 718,
1437
+ 606,
1438
+ 922
1439
+ ],
1440
+ "page_idx": 11
1441
+ },
1442
+ {
1443
+ "type": "text",
1444
+ "text": "6.3 MODEL SPECIFICATION",
1445
+ "text_level": 1,
1446
+ "bbox": [
1447
+ 174,
1448
+ 103,
1449
+ 380,
1450
+ 118
1451
+ ],
1452
+ "page_idx": 12
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "Below, we describe the neural network models used in our experiments. Table 4 list the training hyperparameters that were used. ",
1457
+ "bbox": [
1458
+ 173,
1459
+ 131,
1460
+ 825,
1461
+ 159
1462
+ ],
1463
+ "page_idx": 12
1464
+ },
1465
+ {
1466
+ "type": "table",
1467
+ "img_path": "images/6a9e3a072a201f86c1b2d5bd62b65f3be68b3926c36c490abd2e2b85f6e1f706.jpg",
1468
+ "table_caption": [
1469
+ "Table 4: Hyperparameters used for our experiments in sections 2 and 4. "
1470
+ ],
1471
+ "table_footnote": [],
1472
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Experiment</td><td rowspan=1 colspan=1>Iterations</td><td rowspan=1 colspan=1>Batchsize</td><td rowspan=1 colspan=1>LR</td><td rowspan=1 colspan=1>LR Decay</td><td rowspan=1 colspan=1>Optimizer</td></tr><tr><td rowspan=6 colspan=1>tettittt</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2000</td><td rowspan=1 colspan=1>128×4</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>ResNet18@CIFAR10</td><td rowspan=1 colspan=1>36000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1 @ ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>ResNet34@CIFAR100</td><td rowspan=1 colspan=1>36000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>ResNet50@ImageNet</td><td rowspan=1 colspan=1>900000</td><td rowspan=1 colspan=1>32×4</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ep 30 and 60</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>WordLSTM@PTB</td><td rowspan=1 colspan=1>53000</td><td rowspan=1 colspan=1>5×4</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>decay 0.25 if losshas not decreased</td><td rowspan=1 colspan=1>SGD</td></tr><tr><td rowspan=1 colspan=1>WordLSTM*@WIKI</td><td rowspan=1 colspan=1>120000</td><td rowspan=1 colspan=1>5×4</td><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>decay 0.25 if losshas not decreased</td><td rowspan=1 colspan=1>SGD</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>Resnet18*@CIFAR10</td><td rowspan=1 colspan=1>23000</td><td rowspan=1 colspan=1>4×50</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.1@ ep 40 and 80</td><td rowspan=1 colspan=1>Momentum SGD</td></tr><tr><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2500</td><td rowspan=1 colspan=1>8×100</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>LeNet5-Caffe@MNIST</td><td rowspan=1 colspan=1>2500</td><td rowspan=1 colspan=1>2×400</td><td rowspan=1 colspan=1>0.001</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>Adam</td></tr></table>",
1473
+ "bbox": [
1474
+ 204,
1475
+ 175,
1476
+ 785,
1477
+ 453
1478
+ ],
1479
+ "page_idx": 12
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "LeNet5-Caffe: The model specification can be downloaded from the Caffe MNIST tutorial page: https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet_ train_test.prototxt. (Features convolutional layers, fully connected layers, pooling.) ",
1484
+ "bbox": [
1485
+ 174,
1486
+ 513,
1487
+ 826,
1488
+ 556
1489
+ ],
1490
+ "page_idx": 12
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "ResNet18, ResNet32, ResNet50: We use the implementation from the official PyTorch repository: https://github.com/pytorch/examples/tree/master/imagenet. (Features skip-connections, batch-normalization.) ",
1495
+ "bbox": [
1496
+ 173,
1497
+ 577,
1498
+ 826,
1499
+ 619
1500
+ ],
1501
+ "page_idx": 12
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "WordLSTM: We use the implementation from the official PyTorch repository (configuration \"medium\"): https://github.com/pytorch/examples/tree/master/word_ language_model. (Features trainable word-embeddings, multilayer LSTM-cells, dropout.) ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 638,
1509
+ 826,
1510
+ 683
1511
+ ],
1512
+ "page_idx": 12
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "6.4 PROOF OF THEOREM 2.1. ",
1517
+ "text_level": 1,
1518
+ "bbox": [
1519
+ 174,
1520
+ 715,
1521
+ 390,
1522
+ 729
1523
+ ],
1524
+ "page_idx": 12
1525
+ },
1526
+ {
1527
+ "type": "text",
1528
+ "text": "Proof. Since ",
1529
+ "bbox": [
1530
+ 173,
1531
+ 742,
1532
+ 261,
1533
+ 757
1534
+ ],
1535
+ "page_idx": 12
1536
+ },
1537
+ {
1538
+ "type": "equation",
1539
+ "img_path": "images/4007439e545507f13a5853d6c57f28750410845ddf5a45e020a980dd07ef34f2.jpg",
1540
+ "text": "$$\n\\begin{array} { r } { n ^ { t } = \\alpha n ^ { t - 1 } + N ^ { t } = \\alpha ( \\alpha n ^ { t - 2 } + N ^ { t - 1 } ) + N ^ { t } = \\alpha ^ { 2 } n ^ { t - 2 } + \\alpha N ^ { t - 1 } + N ^ { t } } \\\\ { = \\alpha ^ { \\tau } n ^ { t - \\tau } + \\displaystyle \\sum _ { i = 0 } ^ { \\tau - 1 } \\alpha ^ { i } N ^ { t - i } } \\end{array}\n$$",
1541
+ "text_format": "latex",
1542
+ "bbox": [
1543
+ 253,
1544
+ 765,
1545
+ 745,
1546
+ 830
1547
+ ],
1548
+ "page_idx": 12
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "it holds that ",
1553
+ "bbox": [
1554
+ 173,
1555
+ 838,
1556
+ 254,
1557
+ 852
1558
+ ],
1559
+ "page_idx": 12
1560
+ },
1561
+ {
1562
+ "type": "equation",
1563
+ "img_path": "images/6d2e156871d20e089b1005bba3c91d5b082861dead96599d5686aae85f769969.jpg",
1564
+ "text": "$$\n\\mathrm { c o v } ( n ^ { t - \\tau } , n ^ { t } ) = \\mathrm { c o v } ( n ^ { t - \\tau } , \\alpha ^ { \\tau } n ^ { t - \\tau } + \\sum _ { i = 0 } ^ { \\tau - 1 } \\alpha ^ { i } N ^ { t - i } ) = \\alpha ^ { \\tau } \\sigma ^ { 2 } + \\sum _ { i = 0 } ^ { \\tau - 1 } \\alpha ^ { i } \\underbrace { \\mathrm { c o v } ( n ^ { t - \\tau } , N ^ { t - i } ) } _ { = 0 } = \\alpha ^ { \\tau } \\sigma ^ { 2 }\n$$",
1565
+ "text_format": "latex",
1566
+ "bbox": [
1567
+ 179,
1568
+ 859,
1569
+ 813,
1570
+ 906
1571
+ ],
1572
+ "page_idx": 12
1573
+ },
1574
+ {
1575
+ "type": "text",
1576
+ "text": "With equation equation 10 it follows that ",
1577
+ "bbox": [
1578
+ 173,
1579
+ 103,
1580
+ 442,
1581
+ 118
1582
+ ],
1583
+ "page_idx": 13
1584
+ },
1585
+ {
1586
+ "type": "equation",
1587
+ "img_path": "images/ff6e0a9dfb6f635283a079ca51a87fbb80b3f758dcb2c2bfcdcc6c8d964ffb15.jpg",
1588
+ "text": "$$\n\\begin{array} { r l r } { { \\mathbb { V } ( \\sum _ { t = 1 } ^ { T } n ^ { t } ) = \\sum _ { t _ { 1 } = 1 } ^ { T } \\sum _ { t _ { 2 } = 1 } ^ { T } \\operatorname { c o v } ( n ^ { t _ { 1 } } , n ^ { t _ { 2 } } ) } } \\\\ & { } & { = \\underbrace { \\sum _ { t = 1 } ^ { T } \\operatorname { c o v } ( n ^ { t } , n ^ { t } ) } _ { T \\sigma ^ { 2 } } + 2 \\underbrace { \\sum _ { t = 1 } ^ { T - 1 } \\operatorname { c o v } ( n ^ { t } , n ^ { t + 1 } ) } _ { \\alpha ( T - 1 ) \\sigma ^ { 2 } } + 2 \\underbrace { \\sum _ { t = 1 } ^ { T - 2 } \\operatorname { c o v } ( n ^ { t } , n ^ { t + 2 } ) } _ { \\alpha ^ { 2 } ( T - 2 ) \\sigma ^ { 2 } } + \\dots + 2 \\underbrace { \\operatorname { c o v } ( n ^ { 1 } , n ^ { T } ) } _ { \\alpha ^ { T - 1 } ( 1 ) \\sigma ^ { 2 } } } \\end{array}\n$$",
1589
+ "text_format": "latex",
1590
+ "bbox": [
1591
+ 186,
1592
+ 121,
1593
+ 812,
1594
+ 233
1595
+ ],
1596
+ "page_idx": 13
1597
+ },
1598
+ {
1599
+ "type": "text",
1600
+ "text": "For negatively correlated noise $\\alpha \\in ( - 1 , 0 )$ we can bound this term by ",
1601
+ "bbox": [
1602
+ 173,
1603
+ 250,
1604
+ 637,
1605
+ 266
1606
+ ],
1607
+ "page_idx": 13
1608
+ },
1609
+ {
1610
+ "type": "equation",
1611
+ "img_path": "images/1c1c3d776ec81bffb6a12e2d9aec4acd308b8fc4be98ed1d31fb87d213c354d2.jpg",
1612
+ "text": "$$\n\\begin{array} { r l } & { \\Psi \\big ( \\displaystyle \\sum _ { t = 1 } ^ { T } n ^ { t } \\big ) = \\sigma ^ { 2 } ( T + 2 \\displaystyle \\sum _ { \\tau = 1 } ^ { T - 1 } \\alpha ^ { \\tau } ( T - \\tau ) ) } \\\\ & { \\qquad = \\sigma ^ { 2 } ( T + 2 \\frac { \\alpha ^ { T + 1 } - \\alpha ^ { 2 } T + \\alpha T - \\alpha } { ( \\alpha - 1 ) ^ { 2 } } ) } \\\\ & { \\qquad = \\sigma ^ { 2 } ( T + 2 \\underbrace { \\frac { ( \\alpha - \\alpha ^ { 2 } ) } { ( \\alpha - 1 ) ^ { 2 } } } _ { \\le \\frac { 1 } { 2 } \\alpha } T + 2 \\underbrace { \\frac { \\alpha ^ { T + 1 } - \\alpha } { ( \\alpha - 1 ) ^ { 2 } } } _ { \\le \\frac { 1 } { 2 } } ) } \\\\ & { \\qquad \\le \\sigma ^ { 2 } ( T ( 1 + \\alpha ) + 1 ) } \\end{array}\n$$",
1613
+ "text_format": "latex",
1614
+ "bbox": [
1615
+ 325,
1616
+ 268,
1617
+ 673,
1618
+ 428
1619
+ ],
1620
+ "page_idx": 13
1621
+ },
1622
+ {
1623
+ "type": "text",
1624
+ "text": "6.5 PROOF OF THEOREM 3.1. ",
1625
+ "text_level": 1,
1626
+ "bbox": [
1627
+ 173,
1628
+ 468,
1629
+ 390,
1630
+ 483
1631
+ ],
1632
+ "page_idx": 13
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "Proof. It holds that ",
1637
+ "bbox": [
1638
+ 174,
1639
+ 494,
1640
+ 303,
1641
+ 510
1642
+ ],
1643
+ "page_idx": 13
1644
+ },
1645
+ {
1646
+ "type": "equation",
1647
+ "img_path": "images/e504390ccb4fd4396dc66d7c9766ecc85c60f246239bb6268fb634fb4f691994.jpg",
1648
+ "text": "$$\n\\mathrm { e r r } ( \\mathcal { R } _ { T - 1 } + \\Delta W _ { T } ) = \\| \\sum _ { t = 1 } ^ { T } \\Delta W _ { t } - \\sum _ { t = 1 } ^ { T - 1 } \\Delta W _ { t } ^ { * } - \\mathcal { R } _ { T - 1 } - \\Delta W _ { T } \\| = 0 .\n$$",
1649
+ "text_format": "latex",
1650
+ "bbox": [
1651
+ 258,
1652
+ 512,
1653
+ 738,
1654
+ 556
1655
+ ],
1656
+ "page_idx": 13
1657
+ },
1658
+ {
1659
+ "type": "text",
1660
+ "text": "Since $s$ is a metric subspace, the projection ",
1661
+ "bbox": [
1662
+ 176,
1663
+ 559,
1664
+ 462,
1665
+ 574
1666
+ ],
1667
+ "page_idx": 13
1668
+ },
1669
+ {
1670
+ "type": "equation",
1671
+ "img_path": "images/232ce0be830f6f876b87923056e5c575a303f8a1ef4c6fbf24dd3197ebe81b46.jpg",
1672
+ "text": "$$\n\\Delta W _ { T } ^ { * } = \\mathrm { P r o j } _ { \\cal S } ( { \\mathcal { R } } _ { T - 1 } + \\Delta W _ { T } )\n$$",
1673
+ "text_format": "latex",
1674
+ "bbox": [
1675
+ 392,
1676
+ 578,
1677
+ 606,
1678
+ 595
1679
+ ],
1680
+ "page_idx": 13
1681
+ },
1682
+ {
1683
+ "type": "text",
1684
+ "text": "uniquely solves the minimization problem in $s$ . ",
1685
+ "bbox": [
1686
+ 173,
1687
+ 598,
1688
+ 486,
1689
+ 613
1690
+ ],
1691
+ "page_idx": 13
1692
+ },
1693
+ {
1694
+ "type": "text",
1695
+ "text": "6.6 ADDITIONAL RESULTS ",
1696
+ "text_level": 1,
1697
+ "bbox": [
1698
+ 174,
1699
+ 628,
1700
+ 372,
1701
+ 643
1702
+ ],
1703
+ "page_idx": 13
1704
+ },
1705
+ {
1706
+ "type": "text",
1707
+ "text": "Figure 6 shows validation error for WordLSTM trained on PTB at different levels of gradient sparsity and temporal sparsity. The total sparsity, defined as the product of temporal and gradient sparsity remains constant along the diagonals of the matrix. We observe that different forms of sparsity perform best during different stages of training. Phrased differently, this means that there is not one optimal sparsity setup, but rather sparsity needs to be adapted to the current training phase to achieve optimal compression. ",
1708
+ "bbox": [
1709
+ 173,
1710
+ 655,
1711
+ 825,
1712
+ 739
1713
+ ],
1714
+ "page_idx": 13
1715
+ },
1716
+ {
1717
+ "type": "image",
1718
+ "img_path": "images/570169075c94d2ced3e9339b2521904bac6d1a28ed33fac971c71b090746e136.jpg",
1719
+ "image_caption": [
1720
+ "Figure 6: Perplexity for different levels of gradient sparsity and temporal sparsity at different stages of training. WordLSTM trained on PTB. "
1721
+ ],
1722
+ "image_footnote": [],
1723
+ "bbox": [
1724
+ 178,
1725
+ 756,
1726
+ 816,
1727
+ 862
1728
+ ],
1729
+ "page_idx": 13
1730
+ }
1731
+ ]
parse/train/B1edvs05Y7/B1edvs05Y7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1edvs05Y7/B1edvs05Y7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bk9zbyZCZ/Bk9zbyZCZ.md ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL MAP: STRUCTURED MEMORY FOR DEEP REINFORCEMENT LEARNING
2
+
3
+ Emilio Parisotto & Ruslan Salakhutdinov
4
+ Department of Machine Learning
5
+ Carnegie Mellon University
6
+ Pittsburgh, PA 15213, USA
7
+ {eparisot,rsalakhu}@cs.cmu.edu
8
+
9
+ # ABSTRACT
10
+
11
+ A critical component to enabling intelligent reasoning in partially observable environments is memory. Despite this importance, Deep Reinforcement Learning (DRL) agents have so far used relatively simple memory architectures, with the main methods to overcome partial observability being either a temporal convolution over the past $k$ frames or an LSTM layer. More recent work (Oh et al., 2016) has went beyond these architectures by using memory networks which can allow more sophisticated addressing schemes over the past $k$ frames. But even these architectures are unsatisfactory due to the reason that they are limited to only remembering information from the last $k$ frames. In this paper, we develop a memory system with an adaptable write operator that is customized to the sorts of 3D environments that DRL agents typically interact with. This architecture, called the Neural Map, uses a spatially structured 2D memory image to learn to store arbitrary information about the environment over long time lags. We demonstrate empirically that the Neural Map surpasses previous DRL memories on a set of challenging 2D and 3D maze environments and show that it is capable of generalizing to environments that were not seen during training.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Memory is a crucial aspect of an intelligent agent’s ability to plan and reason in partially observable environments. Without memory, agents must act reflexively according only to their immediate percepts and cannot execute plans that occur over an extended time interval. Recently, Deep Reinforcement Learning agents have been capable of solving many challenging tasks such as Atari Arcade Games (Mnih et al., 2015), robot control (Levine et al., 2016) and 3D games such as Doom (Lample & Chaplot, 2016), but successful behaviours in these tasks have often only been based on a relatively short-term temporal context or even just a single frame. On the other hand, many tasks require long-term planning, such as a robot gathering objects or an agent searching a level to find a key in a role-playing game.
16
+
17
+ Neural networks that utilized external memories have recently had an explosion in variety, which can be distinguished along two main axes: memories with write operators and those without. Writeless external memory systems, often referred to as “Memory Networks” (Sukhbaatar et al., 2015; Oh et al., 2016), typically fix which memories are stored. For example, at each time step, the memory network would store the past M states seen in an environment. What is learnt by the network is therefore how to access or read from this fixed memory pool, rather than what contents to store within it.
18
+
19
+ The memory network approach has been successful in language modeling, question answering (Sukhbaatar et al., 2015) and was shown to be a sucessful memory for deep reinforcement learning agents in complex 3D environments (Oh et al., 2016). By side-steping the difficulty involved in learning what information is salient enough to store in memory, the memory network introduces two main disadvantages. The first disadvantage is that a potentially significant amount of redundant information could be stored. The second disadvantage is that a domain expert must choose what to store in the memory, e.g. for the DRL agent, the expert must set M to a value that is larger than the time horizon of the currently considered task.
20
+
21
+ On the other hand, external neural memories having write operations are potentially far more efficient, since they can learn to store salient information for unbounded time steps and ignore any other useless information, without explicitly needing any a priori knowledge on what to store. One prominent research direction within write-based architectures has been neural memories based on the types of memory structures that are found in computers, such as tapes, RAM, and GPUs. In contrast to typical recurrent neural networks, these neural computer emulators have far more structured memories which follow many of the same design paradigms that digital computers have traditionally utilized. One such model, the Differentiable Neural Computer (DNC) (Graves et al., 2016) and its predecessor the Neural Turing Machine (NTM) (Graves et al., 2014), structure the architecture to explicitly separate memory from computation. The DNC has a recurrent neural controller that can access an external memory resource by executing differentiable read and write operations. This allows the DNC to act and memorize in a structured manner resembling a computer processor, where read and write operations are sequential and data is store distinctly from computation. The DNC has been used sucessfully to solve complicated algorithmic tasks, such as finding shortest paths in a graph or querying a database for entity relations.
22
+
23
+ Building off these previous external memories, we introduce a new architecture called the Neural Map, a structured memory designed specifically for reinforcement learning agents in 3D environments. The Neural Map architecture overcomes some of the shortcomings of the previously mentioned neural memories. First, it uses an adaptable write operation and so its size and computational cost does not grow with the time horizon of the environment as it does with memory networks. Second, we impose a particular inductive bias on the write operation so that it is 1) well suited to 3D environments where navigation is a core component of sucessful behaviours, and 2) uses a sparse write operation that prevents frequent overwriting of memory locations that can occur with NTMs and DNCs. To accomplish this, we structure a DNC-style external memory in the form of a 2-dimensional map, where each position in the map is a distinct memory.
24
+
25
+ To demonstrate the effectiveness of the neural map, we run it on a variety of 2D partially-observable maze-based environments and test it against LSTM and memory network policies. Finally, to establish its scalability, we run a Neural Map agent on a set of challenging 3D maze environments based on the video game Doom.
26
+
27
+ # 2 BACKGROUND
28
+
29
+ A Markov Decision Process (MDP) is defined as a tuple $( S , { \mathcal { A } } , { \mathcal { T } } , \gamma , { \mathcal { R } } )$ where $s$ is a finite set of states, $\mathcal { A }$ is a finite set of actions, $\boldsymbol { \mathcal { T } } ( s ^ { \prime } | s , a )$ is the transition probability of arriving in state $s ^ { \prime }$ when executing action $a$ in initial state $s$ , $\gamma$ is a discount factor, and $\mathcal { R } ( s , a , s ^ { \prime } )$ is the reward function of executing action $a$ in state $s$ and ending up at state $s ^ { \prime }$ . We define a policy $\pi ( \cdot | s )$ as a mapping from a state $s$ to a distribution over actions, where $\pi ( a _ { i } | s )$ denotes the probability of action $a _ { i }$ given that we are in state $s$ . The value of a policy $V ^ { \pi } ( s )$ is the expected discounted cumulative reward when starting from state $s$ and sampling actions according to $\pi$ , i.e.: $\begin{array} { r } { V ^ { \pi } ( s ) = \mathbb { E } _ { \pi } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } R _ { t } | s _ { 0 } = s \right] } \end{array}$ .
30
+
31
+ An optimal value function, denoted $V ^ { * } ( s )$ , is the maximum value we can get from state $s$ according
32
+ to any policy, i.e. $V ^ { * } ( s ) = \operatorname* { m a x } _ { \pi } V ^ { \pi } ( s )$ . An optimal policy $\pi ^ { * }$ is defined as a policy which achieves
33
+ optimal value at each state, i.e. $V ^ { \pi ^ { * } } ( s ) = V ^ { * } ( s )$ . An optimal policy is guaranteed to exist (Sutton &
34
+ Barto, 1998). The REINFORCE algorithm (Williams, 1992) iteratively updates a given policy $\pi$ in the optimal policy. This update direction is defined by being the future cumulated reward for a particular ep $\nabla _ { \pi } \log \pi ( a _ { t } | s _ { t } ) G _ { t }$ with varia $G _ { t } =$
35
+ $\scriptstyle \sum _ { k = 0 } ^ { \infty } \gamma ^ { k } R _ { t + k }$ $b _ { t } ( s _ { t } )$
36
+ of the current state. Therefore the baseline-augmented update equation is $\begin{array} { r } { \nabla _ { \pi } \log \pi ( { a } _ { t } | { s } _ { t } ) ( G _ { t } - } \end{array}$
37
+ $b _ { t } ( s _ { t } ) )$ . The typically used baseline is the value function, $b _ { t } ( s _ { t } ) \stackrel { \textstyle - } { = } V ^ { \pi } ( s _ { t } )$ . This combination of
38
+ REINFORCE with value function baseline is commonly termed the “Actor-Critic” algorithm.
39
+
40
+ In this paper, we utilize Advantage Actor-Critic (A2C) (Mnih et al., 2016) with Generalized Advantage Estimation (Schulman et al., 2015), which can be seen as a specialization of the actor-critic framework when using deep networks to parameterize the policy and value function. The policy is a function of the state, parameterized as a deep neural network: ${ \dot { \pi } } ( a | s ) = f _ { \theta } ( s , a )$ , where f is a deep neural network with parameter vector $\theta$ .
41
+
42
+ # 3 NEURAL MAP
43
+
44
+ In this section, we will describe the details of the neural map. We assume we want our agent to act within some 2- or 3-dimensional environment. The neural map is the agent’s internal memory storage that can be read from and written to during interaction with its environment, but where the write operator is selectively limited to affect only the part of the neural map that represents the area where the agent is currently located. For this paper, we assume for simplicity that we are dealing with a 2-dimensional map. This can easily be extended to 3-dimensional or even higher-dimensional maps (i.e. a 4D map with a 3D sub-map for each cardinal direction the agent can face).
45
+
46
+ Let the agent’s position be $( x , y )$ with $x \in \mathbb { R }$ and $y \in \mathbb { R }$ and let the neural map $M$ be a $C \times H \times W$ feature block, where $C$ is the feature dimension, $H$ is the vertical extent of the map and $W$ is the horizontal extent. Assume there exists some coordinate normalization function $\psi ( x , y )$ such that every unique $( x , y )$ can be mapped into $( x ^ { \prime } , y ^ { \prime } )$ , where $x ^ { \prime } \in \{ 0 , \ldots , W { - } 1 \}$ and $y ^ { \prime } \in \{ 0 , \ldots , H { - } 1 \}$ . For ease of notation, suppose in the sequel that all coordinates have been normalized by $\psi$ into neural map space.
47
+
48
+ Let $s _ { t }$ be the current state embedding, $M _ { t }$ be the current neural map, and $( x _ { t } , y _ { t } )$ be the current position of the agent. The Neural Map is defined by the following set of equations:
49
+
50
+ $$
51
+ \begin{array} { r l } & { { r _ { t } } = r e a d ( M _ { t } ) , ~ { c _ { t } } = c o n t e x t ( M _ { t } , s _ { t } , r _ { t } ) , } \\ & { } \\ { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = w r i t e ( s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) , ~ M _ { t + 1 } = u p d a t e ( M _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) , } \\ & { } \\ { o _ { t } = [ { r _ { t } } , c _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ] , ~ \pi _ { t } ( a | s ) = \mathrm { S o f t m a x } ( f ( o _ { t } ) ) , } \end{array}
52
+ $$
53
+
54
+ where $w _ { t } ^ { ( x _ { t } , y _ { t } ) }$ represents the feature at position $( x _ { t } , y _ { t } )$ at time $t$ , $[ x _ { 1 } , \ldots , x _ { k } ]$ represents a concatenation operation, and $o _ { t }$ is the output of the neural map at time $t$ which is then processed by another deep network $f$ to get the policy outputs $\pi _ { t } ( a | s )$ . We will now separately describe each of the above operations in more detail:
55
+
56
+ Global Read Operation: The read operation passes the current neural map $M _ { t }$ through a deep convolutional network and produces a $C$ -dimensional feature vector $r _ { t }$ . The global read vector $r _ { t }$ summarizes information about the entire map.
57
+
58
+ Context Read Operation: The context operation performs context-based addressing to check whether certain features are stored in the map. It takes as input the current state embedding $s _ { t }$ and the current global read vector $r _ { t }$ and first produces a query vector $q _ { t }$ . The inner product of the query vector and each feature $M _ { t } ^ { ( x , y ) }$ in the neural map is then taken to get scores $a _ { t } ^ { ( x , y ) }$ at all positions $( x , y )$ . The scores are then normalized to get a probability distribution $\alpha _ { t } ^ { ( x , y ) }$ over every position in the map, also known as “soft attention” (Bahdanau et al., 2015). This probability distribution is used to compute a weighted average $c _ { t }$ over all features $M _ { t } ^ { ( x , y ) }$ . To summarize:
59
+
60
+ $$
61
+ \begin{array} { r c l } { { } } & { { } } & { { q _ { t } = W [ s _ { t } , r _ { t } ] , a _ { t } ^ { ( x , y ) } = q _ { t } \cdot M _ { t } ^ { ( x , y ) } , } } \\ { { } } & { { } } & { { \alpha _ { t } ^ { ( x , y ) } = \displaystyle \frac { e ^ { a _ { t } ^ { ( x , y ) } } } { \sum _ { ( w , z ) } e ^ { a _ { t } ^ { ( w , z ) } } } , c _ { t } = \sum _ { ( x , y ) } \alpha _ { t } ^ { ( x , y ) } M _ { t } ^ { ( x , y ) } , } } \end{array}
62
+ $$
63
+
64
+ where $W$ is a weight matrix. The context read operation allows the neural map to operate as an associative memory: the agent provides some possibly incomplete memory (the query vector $q _ { t } \mathrm { ~ . ~ }$ ) and the operation will return the completed memory that most closely matches $q _ { t }$ . So, for example, the agent can query whether it has seen something similar to a particular landmark that is currently within its view.
65
+
66
+ Local Write Operation: Given the agent’s current position $( x _ { t } , y _ { t } )$ at time $t$ , the write operation takes as input the current state embedding $s _ { t }$ , the global read output $r _ { t }$ , the context read vector $c _ { t }$ and the current feature at position $( x _ { t } , y _ { t } )$ in the neural map $M _ { t } ^ { ( x _ { t } , y _ { t } ) }$ and produces, using a deep neural network fw, a new C-dimensional vector w(xt,yt+1 . This vector functions as the new local write candidate vector at the current position $( x _ { t } , y _ { t } )$ : $w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = f _ { w } ( [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] )$
67
+
68
+ GRU-based Local Write Operation As previously defined, the write operation simply replaces the vector at the agent’s current position with a new feature produced by a deep network. Instead of this hard rewrite of the current position’s feature vector, we can use a gated write operation based on the recurrent update equations of the Gated Recurrent Unit (GRU) (Chung et al., 2014). Gated write operations have a long history in unstructured recurrent networks and they have shown a superior ability to maintain information over long time lags versus ungated networks. The GRU-based write operation is defined as:
69
+
70
+ $$
71
+ \begin{array} { r l } & { r _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \sigma ( W _ { r } [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] ) } \\ & { \hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \operatorname { t a n h } ( W _ { \hat { h } } [ s _ { t } , r _ { t } , c _ { t } ] + U _ { \hat { h } } ( r _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } \odot M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) ) } \\ & { z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \sigma ( W _ { z } [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] ) } \\ & { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = ( 1 - z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) \odot M _ { t } ^ { ( x _ { t } , y _ { t } ) } + z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } \odot \hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } , } \end{array}
72
+ $$
73
+
74
+ where $x { \odot } y$ is the Hadamard product between vectors $x$ and $y , \sigma ( \cdot )$ is the sigmoid activation function and W∗ and U∗ are weight matrices. Using GRU terminology, r(xt,yt+1 ) is the reset gate, wˆ(xt,t+1 $\hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) }$ is the candidate activation and the GRU-based update can $z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) }$ is the update gate. By making use of the reset and update gates,e how much the new write vector should differ from the currently stored feature.
75
+
76
+ Map Update Operation: The update operation creates the neural map for the next time step. The new neural map $M _ { t + 1 }$ is equal to the old neural map $M _ { t }$ , except at the current agent position $( x _ { t } , y _ { t } )$ , where the current write candidate vector w(xt,yt+1 is stored:
77
+
78
+ $$
79
+ \begin{array} { r } { M _ { t + 1 } ^ { ( a , b ) } = \left\{ \begin{array} { l l } { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } , } & { \mathrm { f o r } ( a , b ) = ( x _ { t } , y _ { t } ) } \\ { M _ { t } ^ { ( a , b ) } , } & { \mathrm { f o r } ( a , b ) \neq ( x _ { t } , y _ { t } ) } \end{array} \right. } \end{array}
80
+ $$
81
+
82
+ # 4 EGO-CENTRIC NEURAL MAP
83
+
84
+ A major disadvantage of the neural map as previously described is that it requires some oracle to provide the current $( x , y )$ position of the agent. This is a difficult problem in and of itself, and, despite being well studied, it is far from solved. The alternative to using absolute positions within the map is to use relative positions. That is, whenever the agent moves between time steps with some velocity $( u , v )$ , the map is counter-transformed by $\left( - u , - v \right)$ , i.e. each feature in the map is shifted in the $H$ and $W$ dimensions. This will mean that the map will be ego-centric, i.e. the agent’s position will stay stationary in the center of the neural map while the world as defined by the map moves around them. Therefore in this setup we only need some way of extracting the agent’s velocity, which is typically a simpler task in real environments (for example, animals have inner ears and robots have accelerometers). Here we assume that there is some function $ { \boldsymbol { \xi } } ( u ^ { \prime } , v ^ { \prime } )$ that discretizes the agent velocities $( u ^ { \prime } , v ^ { \prime } )$ so that they represent valid velocities within the neural map $( u , v )$ . In the sequel, we assume that all velocies have been properly normalized by $\xi$ into neural map space.
85
+
86
+ Let $( p w , p h )$ be the center position of the neural map. The updated ego-centric neural map operations are shown below:
87
+
88
+ $$
89
+ \begin{array} { r l } & { \overline { { M } } _ { t } = C o u n t e r T r a n s f o r m ( M _ { t } , ( u _ { t } , v _ { t } ) ) } \\ & { \qquad r _ { t } = r e a d ( \overline { { M } } _ { t } ) \quad c _ { t } = c o n t e x t ( \overline { { M } } _ { t } , s _ { t } , r _ { t } ) } \\ & { w _ { t + 1 } ^ { ( p w , p h ) } = w r i t e \big ( s _ { t } , r _ { t } , c _ { t } , \overline { { M } } _ { t } ^ { ( p w , p h ) } \big ) \quad M _ { t + 1 } = e g o u p d a t e ( \overline { { M } } _ { t } , w _ { t + 1 } ^ { ( p w , p h ) } ) } \\ & { \qquad \quad o _ { t } = \big [ r _ { t } , c _ { t } , w _ { t + 1 } ^ { ( p w , p h ) } \big ] \quad \pi _ { t } = \mathrm { S o f t m a x } ( f ( o _ { t } ) ) } \end{array}
90
+ $$
91
+
92
+ Where $\overline { { M } } _ { t }$ is the current neural map $M _ { t }$ reverse transformed by the current velocity $\left( { { u } _ { t } } , { { v } _ { t } } \right)$ so that the agents map position remains in the center $( p w , p h )$ .
93
+
94
+ Counter Transform Operation: The CounterT ransform operation transforms the current neural map $M _ { t }$ by the inverse of the agent’s current velocity $\left( { { u } _ { t } } , { { v } _ { t } } \right)$ . Written formally:
95
+
96
+ $$
97
+ \overline { { { M } } } _ { t } ^ { ( a , b ) } = \left\{ \begin{array} { l r } { { M _ { t } ^ { ( a - u , b - v ) } , } } & { { \mathrm { f o r ~ } ( a - u ) \in \{ 1 , . . . , W \} \wedge ( b - v ) \in \{ 1 , . . . , H \} } } \\ { { 0 , } } & { { \mathrm { e l s e } } } \end{array} \right.
98
+ $$
99
+
100
+ ![](images/48b8373f7563b8c9f4e3fc95fa0ca6cc4755cc7ad4e7b8acb7bb536536aa4e7b.jpg)
101
+ Figure 1: Left: Images showing the 2D maze environment. The left side (Fig. 1a) represents the fully observable maze while the right side (Fig. 1b) represents the agent observations. The agent is represented by the yellow pixel with its orientation indicated by the black arrow within the yellow block. The starting position is always the topmost position of the maze. The red bounding box represents the area of the maze that is subsampled for the agent observation. In “Goal-Search”, the goal of the agent is to find a certain color block (either red or teal), where the correct color is provided by an indicator (either green or blue). This indicator has a fixed position near the start position of the agent. Right: State observations from the “Indicator” Doom maze environment. The agent starts in the middle of a maze looking in the direction of a torch indicator. The torch can be either green (top-left image) or red (bottom-left image) and indicates which of the goals to search for. The goals are two towers which are randomly located within the maze and match the indicator color. The episode ends whenever the agent touches a tower, whereupon it receives a positive reward if it reached the correct tower, while a negative reward otherwise.
102
+
103
+ While here we only deal with reverse translation, it is possible to handle rotations as well if the agent can measure it’s angular velocity.
104
+
105
+ Map Egoupdate Operation: The egoupdate operation is functionally equivalent to the update operation except only the center position $( p w , p h )$ is ever written to:
106
+
107
+ $$
108
+ M _ { t + 1 } ^ { \left( a , b \right) } = \left\{ \begin{array} { l l } { w _ { t + 1 } ^ { \left( p w , p h \right) } , } & { \mathrm { f o r } \left( a , b \right) = \left( p w , p h \right) } \\ { \overline { { M } } _ { t } ^ { \left( a , b \right) } , } & { \mathrm { f o r } \left( a , b \right) \neq \left( p w , p h \right) } \end{array} \right.
109
+ $$
110
+
111
+ # 5 EXPERIMENTS
112
+
113
+ To demonstrate the effectiveness of the Neural Map, we run it on 2D and 3D maze-based environments where memory is crucial to optimal behaviour. We compare to previous memory-based DRL agents, namely a simple LSTM-based agent which consists of a single pre-output LSTM layer as well as MemNN (Oh et al., 2016) agents.
114
+
115
+ # 5.1 2D GOAL-SEARCH ENVIRONMENT
116
+
117
+ The “Goal-Search” environment is adapted from Oh et al. (2016). Here the agent starts in a fixed starting position within some randomly generated maze with two randomly positioned goal states. It then observes an indicator at a fixed position near the starting state (i.e. the green tile at the top of the maze in Fig. 1a). This indicator will tell the agent which of the two goals it needs to go to (blue indicator teal goal, green indicator red goal). If the agent goes to the correct goal, it gains a positive reward while if it goes to the incorrect goal it gains a negative reward. Therefore the agent needs to remember the indicator as it searches for the correct goal state. In depth details of the 2D environment are given in Appendix B. The mazes during training are generated using a random generator. A held-out set of 1000 random mazes is kept for testing. This test set therefore represents maze geometries that have never been seen during training, and measure the agent’s ability to generalize to new environments.
118
+
119
+ The first baseline agent we evaluate is a recurrent network with 128 LSTM units. The other baseline is the MQN, which is a memory-network-based architecture that performs attention over the past K states it has seen (Oh et al., 2016). Both LSTM and MQN models receive a one-hot encoding of the agent’s current location, previous velocity, and current orientation at each time step, in order to make the comparison to the fixed-frame Neural Map fair. We test these baselines against several Neural Map architectures, with each architecture having a different design choice.
120
+
121
+ 2D Goal-Search
122
+ Table 1: Results of several different agent architectures on the “Goal-Search” environment. The “train” columns represents the number of mazes solved (in $\%$ ) when sampling from the same distribution as used during training. The “test” columns represents the number of mazes solved when run on a set of held-out maze samples which are guaranteed not to have been sampled during training.
123
+
124
+ <table><tr><td rowspan="2">Agent</td><td colspan="3">Train</td><td colspan="3">Test</td></tr><tr><td>7-11</td><td>13-15</td><td>Total</td><td>7-11</td><td>13-15</td><td>Total</td></tr><tr><td>Random</td><td>41.9%</td><td>25.7%</td><td>38.1%</td><td>46.0%</td><td>29.6%</td><td>38.8%</td></tr><tr><td>LSTM</td><td>84.7%</td><td>74.1%</td><td>87.4%</td><td>96.3%</td><td>83.4%</td><td>91.4%</td></tr><tr><td>MQN-32</td><td>80.2%</td><td>64.4%</td><td>83.3%</td><td>95.9%</td><td>74.6%</td><td>87.4%</td></tr><tr><td>MQN-64</td><td>83.2%</td><td>69.6%</td><td>85.8%</td><td>96.5%</td><td>76.7%</td><td>88.3%</td></tr><tr><td>Neural Map (15x15)</td><td>92.4%</td><td>80.5%</td><td>89.2%</td><td>93.5%</td><td>87.9%</td><td>91.7%</td></tr><tr><td>Neural Map + GRU (15x15)</td><td>97.0%</td><td>89.2%</td><td>94.9%</td><td>97.7%</td><td>94.0%</td><td>96.4%</td></tr><tr><td>Neural Map + GRU(8x8)</td><td>94.9%</td><td>90.7%</td><td>95.6%</td><td>98.0%</td><td>95.8%</td><td>97.3%</td></tr><tr><td>Neural Map +GRU + Pos (8x8)</td><td>95.0%</td><td>91.0%</td><td>95.9%</td><td>98.3%</td><td>94.3%</td><td>96.5%</td></tr><tr><td>Neural Map + GRU + Pos (6x6)</td><td>90.9%</td><td>83.2%</td><td>91.8%</td><td>97.1%</td><td>90.5%</td><td>94.0%</td></tr><tr><td>Ego Neural Map + GRU (15x15)</td><td>94.6%</td><td>91.1%</td><td>95.4%</td><td>97.7%</td><td>92.1%</td><td>95.5%</td></tr><tr><td>Ego Neural Map +GRU + Pos (15x15)</td><td>74.6%</td><td>63.9%</td><td>78.6%</td><td>87.8%</td><td>73.2%</td><td>82.7%</td></tr></table>
125
+
126
+ The results are reported in Table 1. During testing, we extend the maximum episode length from 100 to 500 steps so that the agent is given more time to solve the maze. The brackets next to the model name represent the Neural Map dimensions of that particular model. From the results we can see that the Neural Map architectures solve the most mazes in both the training and test distributions compared to both LSTM and MQN baselines.
127
+
128
+ The results also demonstrate the effect of certain design decisions. One thing that can be observed is that using GRU updates adds several percentage points to the success rate (“Neural Map (15x15)” v.s. “Neural $\mathrm { M a p } + \mathrm { G R U } \left( 1 5 \mathrm { x } 1 5 \right) ^ { \circ } )$ . We also tried downsampled Neural Maps, such that a pixel in the memory map represents several discrete locations in the environment. The Neural Map seems quite robust to this downsampling, with a downsampling of around 3 (6x6 v.s. 15x15) doing just a few percentage points worse, and still beating all baseline models. The 6x6 model has approximately the same number of memory cells as “MQN- $. 3 2 ^ { \circ }$ , but its performance is much better, showing the benefit of having learnable write operations. For the egocentric model, in order to cover the entire map we set the pixels to be $2 \mathbf { x }$ smaller in each direction, so each pixel is only a quarter of a pixel in the fixed-frame map. Even with this coarser representation, the egocentric model did similarly to the fixed frame one. We demonstrate an example of what the Neural Map learned to address using its context operator in Appendix E.
129
+
130
+ Finally, we tried adding the one-hot position encoding as a state input to the Neural Map, as is done for the baselines. We can see that there is a small improvement, but it is largely marginal, with the Neural Map doing a decent job of learning how to represent its own position without needing to be told explicitly. One interesting thing that we observed is that having the one-hot position encoding as an input to the egocentric map decreased performance, perhaps because it is difficult for the network to learn a mapping between fixed and egocentric frames.
131
+
132
+ Note that sometimes the percentage results are lower for the training distribution. This is mainly because the training set encompases almost all random mazes except the fixed 1000 of the test set, thus making it likely that the agent sees each training map only once.
133
+
134
+ Beyond train/test splits, the results are further separated by maze size. This information reveals that the memory networks are hardest hit by increasing maze size with sometimes a $20 \%$ drop in success on 13-15 v.s. 7-11. This is perhaps unsurprising given the inherent fixed time horizon of memory netwoks, and further reveals the benefit of using write-based memories.
135
+
136
+ ![](images/4214ed9336fcb3cd9e922057d42b4aa5a46c785d9a82e03be29dbdf15a3a7649.jpg)
137
+ Figure 2: Top-down views showing succesful episodes in each of the 3 Doom maze tasks. The red lines indicate the path traveled by the agent. Indicator is shown in Fig. 2a, where the agent receives positive reward when entering the corresponding tower that matches the torch color it saw at the start of the episode and a negative reward otherwise. The episode terminates once the agent has reached a tower. Repeating, shown in Fig. 2b, has the same underlying mechanics except (1) the episode persists for $T$ time steps regardless of towers entered and (2) the torch indicator is removed from the maze after the agent has reached a tower once. Therefore the agent needs to find the correct tower and then optimize its path to that tower. Minotaur shown in Fig. 2c requires the agent to reach the red goal and then return to the green goal that is at its starting position. Here the torch does not have any function. This fully-observable top-down view was not made available to the agent and is only used for visualization.
138
+
139
+ # 5.2 3D DOOM ENVIRONMENT DESCRIPTION
140
+
141
+ To demonstrate that our method can work in much more complicated 3D environments with longer time lags, we implemented three 3D maze environments using the ViZDoom (Kempka et al., 2016) API and a random maze generator. Examples of all three environments are given in Figure 2.
142
+
143
+ Indicator Maze: The first environment is a recreation of the 2D indicator maze task, where an indicator is positioned in view of the player’s starting state which is either a torch of red or green color. The goals are corresponding red/green towers that are randomly positioned throughout the maze that the player must locate.
144
+
145
+ Repeating Maze: The second environment is a variant of this indicator maze but whenever the player enters a goal state, it is teleported back to the beginning of the maze without terminating the episode (i.e. it retains its memory of the current maze). It gains a positive reward if it reaches the correct goal and a negative reward if it reaches the incorrect goal. After the first goal is reached, the correct indicator color is no longer displayed within the maze and a red indicator is displayed afterwards instead (regardless if the correct goal is green). An episode ends after a predetermined number of steps which depends on the maze size. The goal is therefore to find a path to the correct goal, and then optimize that path so that it can reach it as many times as possible.
146
+
147
+ Minotaur Maze: The third environment has the agent start in a fixed starting position next to the green tower, while the red tower is randomly placed somewhere in the maze. The agent receives a small positive reward if it reaches the red tower, and a larger positive reward if after reaching the red tower it returns to the green tower. Therefore the agent must efficiently navigate to the red goal while accurately remember its entire path it so that it can backtrack to the start.
148
+
149
+ All three environments used a $\mathrm { R G B + D }$ image of size $1 0 0 \mathrm { x } 6 0$ as input. We generate maze geometries randomly at train time but make sure to exclude a test set of 10 mazes for each size [4, 5, 6, 7, 8] (50 total). For these environments, we tested out four architectures (see Appendix C for more details on both environments and architectures):
150
+
151
+ Neural Map with Controller LSTM: Standard Neural Map with fixed frame addressing and GRU updates. We combine the neural map design with an LSTM that aggregates past state, read and context vectors and produces the query vector for the next time step’s context read operation. See Appendix A for the modified Neural Map equations.
152
+
153
+ Ego Neural Map with Controller LSTM: Same as previous but with ego-centric addressing. The other difference is that the Ego Neural Map does not receive any positional input unlike the other 3 models, only receiving frame-by-frame ego-motion (quantized to a coarse grid).
154
+
155
+ LSTM: Single pre-output 256-dimensional LSTM layer.
156
+
157
+ <table><tr><td rowspan="2">Agent Maze Size</td><td colspan="6">Indicator</td><td colspan="6">Repeating</td><td colspan="4">Minotaur</td></tr><tr><td>4</td><td></td><td>5</td><td>6</td><td>8</td><td></td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td rowspan="2">LSTM</td><td>Acc</td><td>95.7</td><td>87.5</td><td>81.1</td><td>71.4</td><td>60.3</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>90.0</td><td>71.5</td><td>48.0</td><td>34.2</td><td>29.4</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>1</td><td>1</td><td>-</td><td>7.26</td><td>7.58</td><td>6.065.32</td><td></td><td>4.98</td><td>1.35</td><td>1.07</td><td>0.72</td><td>0.51</td><td>0.44</td></tr><tr><td rowspan="2">FRMQN</td><td>Acc</td><td>87.3</td><td>82.9</td><td>78.0</td><td>72.0</td><td>59.8</td><td>-</td><td>-</td><td>1</td><td>1</td><td>1</td><td>72.7</td><td>54.5</td><td>38.8</td><td>28.8</td><td>23.7</td></tr><tr><td>Rew</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>1.45</td><td>1.65</td><td>1.51</td><td>1.37</td><td>1.09</td><td>1.09</td><td>0.82</td><td>0.58</td><td>0.43</td><td>0.36</td></tr><tr><td rowspan="2">Controller</td><td>Acc</td><td>95.8</td><td>90.3</td><td>81.8</td><td>80.4</td><td>70.3</td><td>-</td><td>1</td><td>1</td><td></td><td></td><td>99.7</td><td>92.2</td><td>67.5</td><td>37.9</td><td>30.2</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>-</td><td>1</td><td>-</td><td>17.4</td><td>17.1</td><td>12.0</td><td>1 11.4</td><td>1 12.3</td><td>1.50</td><td>1.38</td><td>1.01</td><td>0.57</td><td>0.45</td></tr><tr><td>NMap Controller</td><td>Acc</td><td>94.6</td><td>91.0</td><td>87.6</td><td>85.8</td><td>72.2</td><td></td><td>-</td><td></td><td></td><td></td><td>98.6</td><td>90.0</td><td>65.2</td><td>44.7</td><td>33.8</td></tr><tr><td>Ego-NMap</td><td>Rew</td><td>1</td><td>-</td><td>-</td><td>1</td><td>1</td><td>- 12.8</td><td>14.1</td><td>1 11.0</td><td>- 10.4</td><td>- 9.72</td><td>1.48</td><td>1.35</td><td>0.98</td><td>0.67</td><td>0.51</td></tr></table>
158
+
159
+ Table 2: Doom results on mazes not observed during training for the three tasks: Indicator, Repeating and Minotaur. Acc stands for Accuracy and Rew for Reward. Accuracy for Indicator means $\%$ of correct goals reached, while for Minotaur it means $\%$ of episodes where the agent successfully reached the goal and then backtracked to the beginning. Reward for Repeating is number of times correct goal was visited within the allotted time steps $_ { + 1 }$ for correct goal, -1 for incorrect goal). Reward for Minotaur is $+ 0 . 5$ for reaching the goal and then $+ 1 . 0$ for backtracking to start after reaching goal (max episode reward is $+ 1 . 5$ ). We tested on maze sizes between [4,8] with 10 test mazes for each size. For each of the 50 total test mazes we ran 100 episodes with random goal locations and averaged the result.
160
+
161
+ FRMQN (Oh et al., 2016): Memory network with LSTM feedback. This design uses an LSTM to make recurrent context queries to the memory network database. In addition, for the memory network baselines we did not set a fixed $\mathbf { k }$ but instead let it access any state from its entire episode. This means no information is lost to the memory network, it only needs to process its history.
162
+
163
+ The results are shown in Table 2. We can see that the Neural Map architectures work better than the baseline models, even though the memory network has access to its entire episode history at every time step. The ego-centric Neural Map beats the fixed frame map at Indicator, and gets similar performance on both Repeating and Minotaur environments, showing the ability of the Neural Map to function effectively even without global position information. It is possible that having a fixed frame makes path optimization easier, which would explain the larger rewards that the fixed-frame model got in the Repeating task. We also investigated whether the neural map is robust to localization noise, which would be the case in a real world setting where we do not have access to a localization oracle and must instead rely on an error-prone odometry or SLAM-type algorithm to do localization. These results are presented in Appendix D.
164
+
165
+ For the baselines, we can see that FRMQN has difficulty learning on Repeating, only reaching the goal on average once. This could be because the indicator is only shown before the first goal is reached and so afterwards it needs to remember increasingly longer time horizons. Furthermore, because the red indicator is always shown after the first goal is reached, it might be difficult for the model to learn to do retrieval since the original correct indicator must be indexed by time and not image similarity. The FRMQN also has difficulty on Minotaur, probably due to needing to remember and organize a lot of spatial information (i.e. what actions were taken along the path). For Indicator, the FRMQN does similarly to the LSTM. We can see that the spatial structure of the Neural Map aids in optimizing the path in Repeating, averaging 12 goal reaches even in the largest maze size.
166
+
167
+ # 6 RELATED WORK
168
+
169
+ Other than the straightforward architectures of combining an LSTM with Deep Reinforcement Learning (DRL) (Mnih et al., 2016; Hausknecht & Stone, 2015), there has also been work on using more advanced external memory systems with DRL agents to handle partial observability. Oh et al. (2016) used a memory network (MemNN) to solve maze-based environments similar to the ones presented in this paper. MemNN keeps the last $M$ states in memory and encodes them into (key, value) feature pairs. It then queries this memory using a soft attention mechanism similar to the context operation of the Neural Map, except in the Neural Map the key/value features were written by the agent and aren’t just a stored representation of the last $M$ frames seen. Oh et al. (2016) tested a few variants of this basic model, including ones which combined both LSTM and memory-network style memories.
170
+
171
+ In contrast to memory networks, another research direction is to design recurrent architectures that mimic computer memory systems. These architectures explicitly separate computation and memory in a way anagolous to a modern digital computer, in which some neural controller (akin to a CPU) interacts with an external memory (RAM). One recent model is similar to the Neural Map, called the Differentiable Neural Computer (DNC) (Graves et al., 2016), which combines a recurrent controller with an external memory system that allows several types of read/write access. In addition to defining an unconstrained write operator (in contrast to the neural map’s write location being fixed), the DNC has a selective read operation that reads out the memory either by content or in the order that it was written. While the DNC is more specialized to solving algorithmic problems, the Neural Map can be seen as an extension of this Neural Computer framework to 3D environments, with a specific inductive bias on its write operator that allows sparse writes. Recently work has also been done toward sparsifying the read and write operations of the DNC (Rae et al., 2016). This work was not focused on 3D environments and did not make any use of task-specific biases like agent location, but instead used more general biases like “Least-Recently-Used” memory addresses to force sparsity. More recently, the DNC, in conjunction with a VIN planning network (Tamar et al., 2016), has been applied to the task of navigating partially-observable environments (Khan et al., 2018) although it still relied on supervised learning in order to train the complete system.
172
+
173
+ Gupta et al. (2017) designed a similar 2D map structured memory, with the aim to do robot navigation in 3D environments. These environments were based off image scans of real office buildings, and they were preprocessed into a grid-world by quantizing the possible positions and orientations the agent could assume. In contrast to our paper, which presents the Neural Map more as a general memory architecture for DRL agents, Gupta et al. (2017) focuses mainly on solving the task of robot navigation, with the internal map’s representation mainly used to represent free space around the robot. More concretely, the task in these environments was to navigate to a goal state, with the goal position either stated semantically (find a chair) or stated in terms of the position relative to the robot’s coordinate frame. Another key difference was that their formulation lacked a context addressing operation. Finally, their method used DAGGER (Ross et al., 2011), an imitation learning algorithm, to train their agent. Since Doom actions affect translational/rotational accelerations, training using imitation learning is more difficult since a search algorithm cannot be used directly as supervision. An interesting addition they made was the use of a multi-scale map representation and a Value Iteration network (Tamar et al., 2016) to do better path planning. Another related work, Neural SLAM (Zhang et al., 2017) extends spatial memories to settings where localization/odometry is not provided a priori, but instead has to be completed in tandem with the mapping of the environment. In order to accomplish that, a grid-based localization system was combined with a Neural Map-style memory in order to do differentiable SLAM-like combined localization and mapping.
174
+
175
+ # 7 CONCLUSION
176
+
177
+ In this paper we developed a neural memory architecture that organizes the spatial structure of its memory in the form of a 2D map, and allows sparse writes to this memory where the memory address of the write is in a correspondence to the agent’s current position in the environment. We showed its ability to learn, using a reinforcement signal, how to behave within challenging 2D and 3D maze tasks that required storing information over long time steps. The results demonstrated that our architecture surpassed baseline memories used in previous work. Additionally, we showed the benefit of certain design decisions made in our architecture: using GRU updates instead of hard writes, demonstrating that the ego-centric viewpoint does not diminish performance and that the Neural Map is robust to downsampling its memory. Finally, to show that our method can scale up to more difficult 3D environments, we implemented several new maze environments in Doom. Using a hybrid Neural $\mathbf { M a p } + \mathbf { L S T M }$ model, we were able to solve most of the scenarios at a performance higher than previous DRL memory-based architectures. Furthermore, we demonstrated the ability of the Neural Map to be robust to a certain level of drift noise in its localization estimate.
178
+
179
+ # Acknowledgements
180
+
181
+ This work was supported by Apple, DARPA award D17AP00001, the Google focused award. The authors would also like to thank NVidia NVAIL award for donating DGX-1 deep learning machine. This work used the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number OCI-1053575. Specifically, it used the Bridges system, which is supported by NSF award number ACI-1445606, at the Pittsburgh Supercomputing Center (PSC).
182
+
183
+ # REFERENCES
184
+
185
+ D. Bahdanau, K. H. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of the 3rd International Conference on Learning Representations 2015, 2015.
186
+
187
+ J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. URL https://arxiv.org/ abs/1412.3555.
188
+
189
+ A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. URL https://arxiv.org/abs/1410.5401.
190
+
191
+ A. Graves, G. Wayne, M. Reynolds, T. Harley, I. Danihelka, A. Grabska-Barwiska, S. G. Colmenarejo, E. Grefenstette, T. Ramalho, J. Agapiou, A. P. Badia, K. M. Hermann, Y. Zwols, G. Ostrovski, A. Cain, H. King, C. Summerfield, P. Blunsom, K. Kavukcuoglu, and D. Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, 538: 471–476, 2016.
192
+
193
+ S. Gupta, J. Davidson, S. Levine, R. Sukthankar, and J. Malik. Cognitive mapping and planning for visual navigation. CoRR, abs/1702.03920, 2017. URL https://arxiv.org/abs/1702. 03920.
194
+
195
+ M. Hausknecht and P. Stone. Deep recurrent q-learning for partially observable mdps. CoRR, abs/1507.06527, 2015. URL https://arxiv.org/abs/1507.06527.
196
+
197
+ Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. ViZ- ´ Doom: A Doom-based AI research platform for visual reinforcement learning. In IEEE Conference on Computational Intelligence and Games, pp. 341–348, Santorini, Greece, Sep 2016. IEEE.
198
+
199
+ A. Khan, C. Zhang, N. Atanasov, K. Karydis, V. Kumar, and D. D. Lee. Memory augmented control networks. In Proceedings of the 6th International Conference on Learning Representations, 2018.
200
+
201
+ G. Lample and D. S. Chaplot. Playing fps games with deep reinforcement learning. CoRR, abs/1609.05521, 2016. URL https://arxiv.org/abs/1609.05521.
202
+
203
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016.
204
+
205
+ V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518:529–533, 2015.
206
+
207
+ V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Harley, T. P. Lillicrap, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
208
+
209
+ J. Oh, V. Chockalingam, S. Singh, and H. Lee. Control of memory, active perception, and action in minecraft. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
210
+
211
+ J. W. Rae, J. J. Hunt, T. Harley, I. Danihelka, A. Senior, G. Wayne, A. Graves, and T. Lillicrap. Scaling memory-augmented neural networks with sparse reads and writes. CoRR, abs/1610.09027, 2016. URL https://arxiv.org/abs/1610.09027.
212
+
213
+ Stephane Ross, Geoffrey J Gordon, and Drew Bagnell. A reduction of imitation learning and struc-´ tured prediction to no-regret online learning. In AISTATS, volume 1, pp. 6, 2011.
214
+
215
+ John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In Proceedings of the 4th International Conference on Learning Representations 2016, 2015.
216
+
217
+ S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. End-to-end memory networks. In Advances in Neural Information Processing Systems, pp. 2440–2448, 2015.
218
+ R. Sutton and A. Barto. Reinforcement Learning: an Introduction. MIT Press, 1998.
219
+ Aviv Tamar, Yi Wu, Garrett Thomas, Sergey Levine, and Pieter Abbeel. Value iteration networks. In Advances in Neural Information Processing Systems, pp. 2146–2154, 2016.
220
+ R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229–256, 1992.
221
+ J. Zhang, L. Tai, J. Boedecker, W. Burgard, and M. Liu. Neural slam: Learning to explore with external memory. CoRR, abs/1706.09520, 2017. URL https://arxiv.org/abs/1706. 09520.
222
+
223
+ # A CONTROLLER (EGO-)NEURAL MAP
224
+
225
+ Here we describe the modification to the Neural Map we utilized for the 3D maze tasks. We include an extra state $h$ that represents the hidden and cell state of an LSTM. The Neural Map equations are therefore:
226
+
227
+ $$
228
+ \begin{array} { r l } & { r _ { t } = r e a d ( M _ { t } ) , } \\ & { h _ { t } = L S T M ( s _ { t } , r _ { t } , c _ { t - 1 } , h _ { t - 1 } ) , } \\ & { c _ { t } = c o n t e x t ( M _ { t } , h _ { t } ) , } \\ & { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = w r i t e ( s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) , } \\ & { M _ { t + 1 } = w p d a t e ( M _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) , } \\ & { \qquad o _ { t } = [ r _ { t } , c _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ] , } \\ & { \pi _ { t } ( a | s ) = \mathrm { S o f t m a x } ( f ( o _ { t } ) ) , } \end{array}
229
+ $$
230
+
231
+ # B 2D ENVIRONMENT DETAILS
232
+
233
+ The state input for the 2D environment is a $5 \times 1 5 \times 3$ subsample of the complete maze so that the agent is able to see 15 pixel forward and 3 pixels on the side (center pixel $^ +$ one pixel on each side of the agent) which is depicted in Fig.1b. This view is obscured so the agent is prevented from seeing the identity of anything behind walls. The 5 binary channels in the observation represent object identities: channel 1 represents presence of walls, 2 represents the green indicator, 3 the blue indicator, 4 the red goal, and 5 the teal goal. The LSTM and MemNN networks were given auxiliary information such as the one-hot encoding of the current agent’s true position in the maze. Neural Map variants were not given position information in an auxiliary state unless specified by the $^ { 6 6 } +$ Pos” modifier in Table 1. Actions in the environment included moving forward and turning left/right 90 degrees.
234
+
235
+ For optimization, all architectures used the RMSprop optimization algorithm with gradients thresholded to norm 20 for LSTM, 100 for Neural Map variants, and no thresholding for memory networks. We used an auxiliary weighted entropy loss on the Synchronous Actor-Critic with weight 0.01. The learning rates for LSTM models was 0.0025, 0.005 for Neural Map variants, and 0.001 for memory networks. We obtained the hyperparameters during a limited hyperparameter sweep on a simpler version of the environment. We used A2C with number of time steps equal to 5. We trained for 10 million updates.
236
+
237
+ The mazes were generated using an algorithm based on Depth-First Search to form a fully-connected maze. Afterwards each wall was deleted with probability $p . p$ was sampled uniformly from between $[ 0 , 0 . 7 5 ]$ at maze generation time. Each episode, a random maze width was sampled uniformly from between [7, 15].
238
+
239
+ (Ego-)Neural Map Agent Details: For the global read operation, we used a convolutional network with 3 layers of 8 channels and kernel size 3. The strides were set to 1 on the first layer, and 2 to the second and third layers. Padding was 1 on the first layer and 0 on other layers. The 3 convolutional layers were then followed by a fully-connected layer of dimension 256 and then another fullyconnected layer of size 32. All activations were relu except the 32 dimension layer, which was set to tanh. Positions were normalized so that the largest map size used all positions, while smaller mazes used a subset of the map.
240
+
241
+ LSTM Agent Details: The LSTM agent had a single 128-dimension LSTM layer on top of the state embedding. The auxiliary state information was first processed into a 256-dimension embedding.
242
+
243
+ MQN Agent Details: Each past history state was 512-dimensional (256-dimensional key $+ \ 2 5 6$ - dimensional value feature). The input state was processed by a convolutional network with 32 channels, filter size 3, stride 1 and padding 1.
244
+
245
+ # C 3D ENVIRONMENT DETAILS
246
+
247
+ The state input for all 3D environments was a $1 0 0 \mathrm { x } 6 0 \ \mathrm { R G B + D }$ image. This was passed through a convolution network that was the same for all architectures. It first consists of a 2D convolution with 32 channels of filter size 8 with stride 4. This was then passed to another 2D convolution with 64 channels of filter size 4 and stride 2. Finally, the result was passed through a fully-connected layer with 512 features, which represented the current frame embedding. The frame embedding was then augmented with some auxiliary information about the map, which in the case of Neural Map, FRMQN and LSTM architectures was 1) a one-hot encoding of the current time step, 2) the current orientation (North/East/West/South), 3) the 2D velocity (change in x/y position in a top-down 2D quantized grid of possible environment positions), and 4) a one-hot encoding of the agent’s current quantized position. For Ego Neural Map, only 1, 2, 3 are used (i.e. it has no input of the agent’s current true position given by an oracle). The 512 frame encoding is concatenated with the auxiliary state information to form the complete state embedding. Actions in the maze consist of moving forward and turning left or right.
248
+
249
+ For optimization, all architectures used the Adam optimization algorithm with gradients thresholded to a norm of 40. We used an auxiliary weighted entropy loss on the Synchronous Actor-Critic with weight 0.01. The learning rate for LSTM models was 0.0005, while for other architectures it was set to 0.00075. The hyperparameters were obtained during a limited hyperparameter sweep on a simpler version of the Indicator Maze environment. We trained A2C with a number of steps equal to the episode length (no truncated backprop). We trained the agent for 3000 steps, where each step consisted of a gradient obtained from 100 full episodes. The effective batch size was thus upper bounded by $5 0 0 * 1 0 0 = 5 0 0 0 0$ . We used multithreading to calculate the batch gradients efficiently. Each update step took on the order of 1-3 minutes depending on the number of threads available, meaning each agent took on the order of a week to train.
250
+
251
+ The mazes were generated using an algorithm based on Depth-First Search. Once the completed fully-connected maze was generated, random walls were deleted with a probability $p$ . This $p$ probability was chosen at maze creation time and was sampled uniformly from between 0.0 and 0.6. Mazes were between size 4 to size 8. The size of a maze represents how many “cells” there are in the maze, where a cell is an area which can potentially have walls on each side. A set of 50 test maze geometries were sampled to act as a test set, and were made sure to never be sampled during training. These 50 test mazes were generated with $p = 0$ , so they represent the most difficult mazes seen during training due to their higher degree of partial-observability. Goal locations were sampled uniformly at random when the mazes are generated.
252
+
253
+ Indicator Maze Details: The indicator mazes used a curriculum approach to accelerate learning. In $50 \%$ of the episodes sampled, only one goal existed in the environment and the indicator color matched the single goal color, making entering an incorrect goal impossible. This curriculum prevented the agents from learning to always enter a single color goal, which happened often when learning on only double goal environments. The test environments only used double goals. A reward of $+ 1$ was given to correct goal entry, and a negative reward of -1 was given to incorrect goal entry or episode terminating after a maximum number of time steps. These time steps depended on the maze size and were [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000].
254
+
255
+ Repeating Maze Details We included the same curriculum as the indicator maze. Rewards were the same as the indicator maze. After the first time the agent reaches a goal, the red torch is shown at each subsequent episode (regardless of what the correct indicator was). Maximum time steps were again [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000].
256
+
257
+ Minotaur Maze Details: For minotaur maze, a reward of $+ 0 . 5$ was given when reaching the randomly located goal and a reward of $+ 1 . 0$ was given when returning to the initial position. Episodes are terminated once the agent completes the return path, otherwise a negative reward of -1 is given if the agent exceeds the maximum number of steps. The maximum time steps were again [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000].
258
+
259
+ <table><tr><td rowspan="2" colspan="2">Agent Maze Size</td><td colspan="3">Indicator</td><td colspan="3">Repeating</td><td colspan="3">Minotaur</td></tr><tr><td>4</td><td>5</td><td>6</td><td>4</td><td>5</td><td>6</td><td>4</td><td>5</td><td>6</td></tr><tr><td rowspan="2">σ=0</td><td>Acc</td><td>88.4</td><td>84.4</td><td>79.3</td><td>1</td><td>1</td><td>1</td><td>97.3</td><td>89.0</td><td>62.0</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>1</td><td>9.47</td><td>9.91</td><td>5.91</td><td>1.46</td><td>1.34</td><td>0.93</td></tr><tr><td rowspan="2">σ = 0.01</td><td>Acc</td><td>92.4</td><td>91.9</td><td>84.3</td><td>1</td><td>1</td><td>1</td><td>96.7</td><td>86.2</td><td>66.1</td></tr><tr><td>Rew</td><td>1</td><td>1</td><td>1</td><td>12.4</td><td>12.9</td><td>10.9</td><td>1.45</td><td>1.29</td><td>0.99</td></tr></table>
260
+
261
+ Table 3: Results on the three 3D Doom maze tasks for the fixed-frame Neural Map with Controller LSTM. We can see that adding small compounding error does not largely affect the ability of the Neural Map to learn memory tasks and even has a beneficial effect for some tasks. Hyperparameters and architectures used were the same as presented in the main results.
262
+
263
+ (Ego-)Neural Map Agent Details: For the global read operation, we used a convolutional network with 3 layers of 8 channels and kernel size 3. The strides were set to 1 on the first layer, and 2 to the second and third layers. Padding was 1 on the first layer and 0 on other layers. The 3 convolutional layers were then followed by a fully-connected layer of dimension 256 and then another fullyconnected layer of size 32. All activations were relu except the 32 dimension layer, which was set to tanh. The Neural Map itself was size $3 2 \mathrm { x } 1 5 \mathrm { x } 1 5$ . Positions were normalized so that the largest map size used all $1 5 \mathrm { x } 1 5$ positions, while smaller mazes used a subset of the map. Additionally, during writing we split the 32 channels of the map into 8 channels per orientation (so if the agent is facing north, it writes only to the first 8 dimensions, if south, the next 8, and so on).
264
+
265
+ LSTM Agent Details: The LSTM agent had a single 256-dimension LSTM layer on top of the state embedding.
266
+
267
+ FRMQN Agent Details: Each past history state was 64-dimensional (32-dimensional key $\pm \ 3 2 .$ - dimensional value feature). Due to large matrix multiplies from storing the entire episode history, having larger feature sizes causes the attention operation to start becoming prohibitively expensive.
268
+
269
+ # D NEURAL MAP WITH DRIFT NOISE MODEL
270
+
271
+ We did an additional experiment on the Neural Map that featured drift noise to simulate the effects of the agent using a local visual odometry model that had small error in predicting each frame-by-frame transformation. This is meant to represent a more realistic scenario (e.g. robotic navigation) where perfect localization is not feasible but a relatively accurate estimate can be provided, demonstrating the robustness of the architecture to noise. For example, we could assume the Neural Map is run in parallel with a SLAM algorithm which provides an estimate of the agent’s current position.
272
+
273
+ To model this noise, we add a zero-mean gaussian random variable to the oracle position with a variance that depends on the current time-step. In more detail, the noise-corrupted positions $( \hat { x } , \hat { y } )$ in an $W \times W$ size map provided to the Neural Map are:
274
+
275
+ $$
276
+ \begin{array} { r l } & { ( \hat { x } , \hat { y } ) = ( \operatorname* { m a x } \{ \operatorname* { m i n } \{ \lfloor x + \epsilon _ { x } \rfloor , W - 1 \} , 0 \} , \operatorname* { m a x } \{ \operatorname* { m i n } \{ \lfloor y + \epsilon _ { y } \rfloor , W - 1 \} , 0 \} ) , } \\ & { \epsilon _ { x } , \epsilon _ { y } \sim \mathcal { N } ( 0 , \sigma ^ { 2 } t ) } \end{array}
277
+ $$
278
+
279
+ This simulates the effect of an odometry algorithm which has independent zero-mean gaussian error with equal variance. This error compounds over time causing the variance to grow with the time step. We evaluate the Neural Map with noise $\sigma = 1 / 1 0 0$ on smaller versions of the 3D Doom maze tasks (maze sizes [4, 5, 6]) and compare it to the version with perfect odometry. We train for 1500 steps of 100 episodes each step. Results are shown in Table 3. We can see that adding a small amount of error at each time step does not largely affect the results of the memory and can even benefit it, with some noticeable improvements on Indicator and Repeating tasks. It’s possible that the noise acts as a regularizer to speed up learning. For the Minotaur task, since positional information is important because the agent must remember the entire path taken, adding noise causes slight decrease in reward in mazes of size 4 and 5, but otherwise performance is very similar. Therefore this means that the Neural Map is likely to work in the case where a localization oracle is not available and instead only error-prone odometry is.
280
+
281
+ We also plot some example trajectories to compare the effect of noise. We can see that the noise causes some slight aliasing in the position, which increases as time passes. The positions are quantized to a $1 5 \times 1 5$ grid.
282
+
283
+ ![](images/84779dc3af0ef8cc2512e5669cc80a83b8ac4eb6133c3594bfb79ca023c9ef39.jpg)
284
+ Figure 3: Top: Noisy v.s. Groundtruth Position trajectory (quantized to a $1 5 \times 1 5$ grid). As time progresses, the colors get lighter. Center: Neural Map cells addressed by the write operator under the noisy positions. Bottom: Neural Map cells that would have been written to under perfect position estimates.
285
+
286
+ # E SAMPLES OF CONTEXT READ DISTRIBUTION
287
+
288
+ # E.1 2D ENVIRONMENT
289
+
290
+ To provide some insight into what the Neural Map learns, we show samples of the probability distribution given by the context read operation in a 2D maze example. We ran it on an example maze shown in Figure 4. In this figure, the top row of images are the agent observations, the center row are the fully observable mazes and the bottom row are the probability distributions over locations from the context operation, e.g. the $\alpha _ { t } ^ { ( x , y ) }$ values defined by Eq. 2. In this maze, the indicator is blue, which indicates that the teal goal should be visited. We can see that once the agent sees the incorrect red goal, the context distribution faintly focuses on the map location where the agent had observed the indicator. On the other hand, when the agent first observes the correct teal goal, the location where the agent observed the indicator lights up brightly. This means that the agent is using its context retrieval operation to keep track of the landmark (the indicator) that it has previously seen.
291
+
292
+ ![](images/f37c3d73963f794f333ce8aac652a9c3718f675657d2129200e4ba1807da78c9.jpg)
293
+ Figure 4: A few sampled states from an example episode demonstrating how the agent learns to use the context addressing operation of the Neural Map. The top row of images is the observations made by the agent, the center is the fully observable mazes and the bottom image is the probability distributions over locations induced by the context operation at that step.
294
+
295
+ # E.2 3D ENVIRONMENT
296
+
297
+ We draw some examples of the context addressing probability distribution in the 3D Doom environment in Figure 5 (allocentric) and Figure 6 (egocentric). We can see that the Neural Map learns to use its context addressing operator to retrieve the indicator torch identity, until it sees the correct corresponding tower. Once it sees the correct tower there is a shift in how the agent uses the map and the probability map seems to invert, addressing the parts of the map that were unexplored. This effect is consistent in both allocentric and egocentric variants. This might be because the Neural Map variant used on Doom had an internal LSTM which could enable it to remember the indicator identity for the short amount of time it took to walk up to the goal.
298
+
299
+ Indicator Prediction To determine whether the Neural Map was accurately storing the indicator identity within its memory, we train a logistic regression model on memory vectors sampled over 75 episodes. We then attempt to predict the indicator on a held-out set of 25 episodes by taking the max prediction over all positions of the memory at the end of the episode. We can see that a simple logistic regression is capable of recovering the indicator in $100 \%$ of the episodes, showing that the indicator identity can be easily extracted from, e.g., the context operator.
300
+
301
+ <table><tr><td>Agent</td><td>Indicator Accuracy</td></tr><tr><td>Controller NMap</td><td>100%</td></tr><tr><td>Controller Ego-NMap</td><td>100%</td></tr></table>
302
+
303
+ Table 4: Figure showing accuracy of a logistic model to determine indicator identity from the stored Neural Map features.
304
+
305
+ ![](images/c8737215b5e2340ede5c54756af4aab06bafee71e94f71c7ba6af7ecd67225c8.jpg)
306
+ Figure 5: Three example episodes of the (allocentric) context addressing operator on Doom mazes. The top images of each row are the RGB inputs the agent sees, the center images are a top-down representation of the maze, and the bottom images are the $\alpha _ { t } ^ { ( x , y ) }$ of the context operation.
307
+
308
+ ![](images/757865053b472780e55b9e68d9a4bc5550b3e2745354499fdbcb397ce5c372ae.jpg)
309
+ Figure 6: Three example episodes of the (egocentric) context addressing operator on Doom mazes. The top images of each row are the RGB inputs the agent sees, the center images are a top-down representation of the maze, and the bottom images are the (egocentric) $\alpha _ { t } ^ { ( x , y ) }$ of the context operation.
310
+
311
+ # F BACKTRACKING
312
+
313
+ We also explored whether the allocentric and egocentric Neural Maps were capable of using their memories in order to do backtracking, i.e. re-visiting unexplored areas of the maze. To measure this, we developed a variant of the Indicator Maze where the goal states were removed. We want to measure how much of the maze is explored by the agent under this setting where there are no terminal states. To measure how much of the maze was explored, we quantized the 50 test mazes into 11 discrete positions and counted how many of the quantized positions the agent visited. We report results below in Table 5
314
+
315
+ <table><tr><td>Agent</td><td>Visitation Score</td></tr><tr><td>Controller NMap</td><td>71.6%</td></tr><tr><td>Controller Ego-NMap LSTM</td><td>77.6% 68.5%</td></tr></table>
316
+
317
+ Table 5: Visitation scores of the Neural Map models which measure how much of a maze is explored within a set time limit. We can see that the egocentric neural map explores more of the mazes than the allocentric model, exploring on average $7 7 . 6 \%$ of the test mazes. The allocentric neural map explores $7 1 . 6 \%$ of the test mazes. The LSTM is reported to provide a point of comparison.
parse/train/Bk9zbyZCZ/Bk9zbyZCZ_content_list.json ADDED
@@ -0,0 +1,1634 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "NEURAL MAP: STRUCTURED MEMORY FOR DEEP REINFORCEMENT LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Emilio Parisotto & Ruslan Salakhutdinov \nDepartment of Machine Learning \nCarnegie Mellon University \nPittsburgh, PA 15213, USA \n{eparisot,rsalakhu}@cs.cmu.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 477,
21
+ 239
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 276,
32
+ 544,
33
+ 291
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "A critical component to enabling intelligent reasoning in partially observable environments is memory. Despite this importance, Deep Reinforcement Learning (DRL) agents have so far used relatively simple memory architectures, with the main methods to overcome partial observability being either a temporal convolution over the past $k$ frames or an LSTM layer. More recent work (Oh et al., 2016) has went beyond these architectures by using memory networks which can allow more sophisticated addressing schemes over the past $k$ frames. But even these architectures are unsatisfactory due to the reason that they are limited to only remembering information from the last $k$ frames. In this paper, we develop a memory system with an adaptable write operator that is customized to the sorts of 3D environments that DRL agents typically interact with. This architecture, called the Neural Map, uses a spatially structured 2D memory image to learn to store arbitrary information about the environment over long time lags. We demonstrate empirically that the Neural Map surpasses previous DRL memories on a set of challenging 2D and 3D maze environments and show that it is capable of generalizing to environments that were not seen during training. ",
40
+ "bbox": [
41
+ 233,
42
+ 309,
43
+ 764,
44
+ 530
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 549,
55
+ 336,
56
+ 564
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Memory is a crucial aspect of an intelligent agent’s ability to plan and reason in partially observable environments. Without memory, agents must act reflexively according only to their immediate percepts and cannot execute plans that occur over an extended time interval. Recently, Deep Reinforcement Learning agents have been capable of solving many challenging tasks such as Atari Arcade Games (Mnih et al., 2015), robot control (Levine et al., 2016) and 3D games such as Doom (Lample & Chaplot, 2016), but successful behaviours in these tasks have often only been based on a relatively short-term temporal context or even just a single frame. On the other hand, many tasks require long-term planning, such as a robot gathering objects or an agent searching a level to find a key in a role-playing game. ",
63
+ "bbox": [
64
+ 174,
65
+ 575,
66
+ 825,
67
+ 702
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Neural networks that utilized external memories have recently had an explosion in variety, which can be distinguished along two main axes: memories with write operators and those without. Writeless external memory systems, often referred to as “Memory Networks” (Sukhbaatar et al., 2015; Oh et al., 2016), typically fix which memories are stored. For example, at each time step, the memory network would store the past M states seen in an environment. What is learnt by the network is therefore how to access or read from this fixed memory pool, rather than what contents to store within it. ",
74
+ "bbox": [
75
+ 174,
76
+ 708,
77
+ 825,
78
+ 805
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The memory network approach has been successful in language modeling, question answering (Sukhbaatar et al., 2015) and was shown to be a sucessful memory for deep reinforcement learning agents in complex 3D environments (Oh et al., 2016). By side-steping the difficulty involved in learning what information is salient enough to store in memory, the memory network introduces two main disadvantages. The first disadvantage is that a potentially significant amount of redundant information could be stored. The second disadvantage is that a domain expert must choose what to store in the memory, e.g. for the DRL agent, the expert must set M to a value that is larger than the time horizon of the currently considered task. ",
85
+ "bbox": [
86
+ 174,
87
+ 813,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "On the other hand, external neural memories having write operations are potentially far more efficient, since they can learn to store salient information for unbounded time steps and ignore any other useless information, without explicitly needing any a priori knowledge on what to store. One prominent research direction within write-based architectures has been neural memories based on the types of memory structures that are found in computers, such as tapes, RAM, and GPUs. In contrast to typical recurrent neural networks, these neural computer emulators have far more structured memories which follow many of the same design paradigms that digital computers have traditionally utilized. One such model, the Differentiable Neural Computer (DNC) (Graves et al., 2016) and its predecessor the Neural Turing Machine (NTM) (Graves et al., 2014), structure the architecture to explicitly separate memory from computation. The DNC has a recurrent neural controller that can access an external memory resource by executing differentiable read and write operations. This allows the DNC to act and memorize in a structured manner resembling a computer processor, where read and write operations are sequential and data is store distinctly from computation. The DNC has been used sucessfully to solve complicated algorithmic tasks, such as finding shortest paths in a graph or querying a database for entity relations. ",
96
+ "bbox": [
97
+ 174,
98
+ 104,
99
+ 825,
100
+ 311
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Building off these previous external memories, we introduce a new architecture called the Neural Map, a structured memory designed specifically for reinforcement learning agents in 3D environments. The Neural Map architecture overcomes some of the shortcomings of the previously mentioned neural memories. First, it uses an adaptable write operation and so its size and computational cost does not grow with the time horizon of the environment as it does with memory networks. Second, we impose a particular inductive bias on the write operation so that it is 1) well suited to 3D environments where navigation is a core component of sucessful behaviours, and 2) uses a sparse write operation that prevents frequent overwriting of memory locations that can occur with NTMs and DNCs. To accomplish this, we structure a DNC-style external memory in the form of a 2-dimensional map, where each position in the map is a distinct memory. ",
107
+ "bbox": [
108
+ 174,
109
+ 319,
110
+ 825,
111
+ 458
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "To demonstrate the effectiveness of the neural map, we run it on a variety of 2D partially-observable maze-based environments and test it against LSTM and memory network policies. Finally, to establish its scalability, we run a Neural Map agent on a set of challenging 3D maze environments based on the video game Doom. ",
118
+ "bbox": [
119
+ 174,
120
+ 464,
121
+ 825,
122
+ 520
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 BACKGROUND ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 561,
133
+ 326,
134
+ 578
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "A Markov Decision Process (MDP) is defined as a tuple $( S , { \\mathcal { A } } , { \\mathcal { T } } , \\gamma , { \\mathcal { R } } )$ where $s$ is a finite set of states, $\\mathcal { A }$ is a finite set of actions, $\\boldsymbol { \\mathcal { T } } ( s ^ { \\prime } | s , a )$ is the transition probability of arriving in state $s ^ { \\prime }$ when executing action $a$ in initial state $s$ , $\\gamma$ is a discount factor, and $\\mathcal { R } ( s , a , s ^ { \\prime } )$ is the reward function of executing action $a$ in state $s$ and ending up at state $s ^ { \\prime }$ . We define a policy $\\pi ( \\cdot | s )$ as a mapping from a state $s$ to a distribution over actions, where $\\pi ( a _ { i } | s )$ denotes the probability of action $a _ { i }$ given that we are in state $s$ . The value of a policy $V ^ { \\pi } ( s )$ is the expected discounted cumulative reward when starting from state $s$ and sampling actions according to $\\pi$ , i.e.: $\\begin{array} { r } { V ^ { \\pi } ( s ) = \\mathbb { E } _ { \\pi } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } R _ { t } | s _ { 0 } = s \\right] } \\end{array}$ . ",
141
+ "bbox": [
142
+ 174,
143
+ 601,
144
+ 825,
145
+ 700
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "An optimal value function, denoted $V ^ { * } ( s )$ , is the maximum value we can get from state $s$ according \nto any policy, i.e. $V ^ { * } ( s ) = \\operatorname* { m a x } _ { \\pi } V ^ { \\pi } ( s )$ . An optimal policy $\\pi ^ { * }$ is defined as a policy which achieves \noptimal value at each state, i.e. $V ^ { \\pi ^ { * } } ( s ) = V ^ { * } ( s )$ . An optimal policy is guaranteed to exist (Sutton & \nBarto, 1998). The REINFORCE algorithm (Williams, 1992) iteratively updates a given policy $\\pi$ in the optimal policy. This update direction is defined by being the future cumulated reward for a particular ep $\\nabla _ { \\pi } \\log \\pi ( a _ { t } | s _ { t } ) G _ { t }$ with varia $G _ { t } =$ \n$\\scriptstyle \\sum _ { k = 0 } ^ { \\infty } \\gamma ^ { k } R _ { t + k }$ $b _ { t } ( s _ { t } )$ \nof the current state. Therefore the baseline-augmented update equation is $\\begin{array} { r } { \\nabla _ { \\pi } \\log \\pi ( { a } _ { t } | { s } _ { t } ) ( G _ { t } - } \\end{array}$ \n$b _ { t } ( s _ { t } ) )$ . The typically used baseline is the value function, $b _ { t } ( s _ { t } ) \\stackrel { \\textstyle - } { = } V ^ { \\pi } ( s _ { t } )$ . This combination of \nREINFORCE with value function baseline is commonly termed the “Actor-Critic” algorithm. ",
152
+ "bbox": [
153
+ 174,
154
+ 705,
155
+ 825,
156
+ 847
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "In this paper, we utilize Advantage Actor-Critic (A2C) (Mnih et al., 2016) with Generalized Advantage Estimation (Schulman et al., 2015), which can be seen as a specialization of the actor-critic framework when using deep networks to parameterize the policy and value function. The policy is a function of the state, parameterized as a deep neural network: ${ \\dot { \\pi } } ( a | s ) = f _ { \\theta } ( s , a )$ , where f is a deep neural network with parameter vector $\\theta$ . ",
163
+ "bbox": [
164
+ 174,
165
+ 853,
166
+ 823,
167
+ 922
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "3 NEURAL MAP ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 174,
177
+ 102,
178
+ 323,
179
+ 118
180
+ ],
181
+ "page_idx": 2
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "In this section, we will describe the details of the neural map. We assume we want our agent to act within some 2- or 3-dimensional environment. The neural map is the agent’s internal memory storage that can be read from and written to during interaction with its environment, but where the write operator is selectively limited to affect only the part of the neural map that represents the area where the agent is currently located. For this paper, we assume for simplicity that we are dealing with a 2-dimensional map. This can easily be extended to 3-dimensional or even higher-dimensional maps (i.e. a 4D map with a 3D sub-map for each cardinal direction the agent can face). ",
186
+ "bbox": [
187
+ 173,
188
+ 127,
189
+ 825,
190
+ 227
191
+ ],
192
+ "page_idx": 2
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "Let the agent’s position be $( x , y )$ with $x \\in \\mathbb { R }$ and $y \\in \\mathbb { R }$ and let the neural map $M$ be a $C \\times H \\times W$ feature block, where $C$ is the feature dimension, $H$ is the vertical extent of the map and $W$ is the horizontal extent. Assume there exists some coordinate normalization function $\\psi ( x , y )$ such that every unique $( x , y )$ can be mapped into $( x ^ { \\prime } , y ^ { \\prime } )$ , where $x ^ { \\prime } \\in \\{ 0 , \\ldots , W { - } 1 \\}$ and $y ^ { \\prime } \\in \\{ 0 , \\ldots , H { - } 1 \\}$ . For ease of notation, suppose in the sequel that all coordinates have been normalized by $\\psi$ into neural map space. ",
197
+ "bbox": [
198
+ 173,
199
+ 232,
200
+ 825,
201
+ 318
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "Let $s _ { t }$ be the current state embedding, $M _ { t }$ be the current neural map, and $( x _ { t } , y _ { t } )$ be the current position of the agent. The Neural Map is defined by the following set of equations: ",
208
+ "bbox": [
209
+ 173,
210
+ 323,
211
+ 823,
212
+ 353
213
+ ],
214
+ "page_idx": 2
215
+ },
216
+ {
217
+ "type": "equation",
218
+ "img_path": "images/62ead24f1abbe29b7c9c3c326c4cdb5ea35ff00a96226c7199ab10eb752a47c6.jpg",
219
+ "text": "$$\n\\begin{array} { r l } & { { r _ { t } } = r e a d ( M _ { t } ) , ~ { c _ { t } } = c o n t e x t ( M _ { t } , s _ { t } , r _ { t } ) , } \\\\ & { } \\\\ { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = w r i t e ( s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) , ~ M _ { t + 1 } = u p d a t e ( M _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) , } \\\\ & { } \\\\ { o _ { t } = [ { r _ { t } } , c _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ] , ~ \\pi _ { t } ( a | s ) = \\mathrm { S o f t m a x } ( f ( o _ { t } ) ) , } \\end{array}\n$$",
220
+ "text_format": "latex",
221
+ "bbox": [
222
+ 264,
223
+ 357,
224
+ 732,
225
+ 424
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "where $w _ { t } ^ { ( x _ { t } , y _ { t } ) }$ represents the feature at position $( x _ { t } , y _ { t } )$ at time $t$ , $[ x _ { 1 } , \\ldots , x _ { k } ]$ represents a concatenation operation, and $o _ { t }$ is the output of the neural map at time $t$ which is then processed by another deep network $f$ to get the policy outputs $\\pi _ { t } ( a | s )$ . We will now separately describe each of the above operations in more detail: ",
232
+ "bbox": [
233
+ 178,
234
+ 429,
235
+ 820,
236
+ 487
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "Global Read Operation: The read operation passes the current neural map $M _ { t }$ through a deep convolutional network and produces a $C$ -dimensional feature vector $r _ { t }$ . The global read vector $r _ { t }$ summarizes information about the entire map. ",
243
+ "bbox": [
244
+ 174,
245
+ 493,
246
+ 825,
247
+ 536
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "Context Read Operation: The context operation performs context-based addressing to check whether certain features are stored in the map. It takes as input the current state embedding $s _ { t }$ and the current global read vector $r _ { t }$ and first produces a query vector $q _ { t }$ . The inner product of the query vector and each feature $M _ { t } ^ { ( x , y ) }$ in the neural map is then taken to get scores $a _ { t } ^ { ( x , y ) }$ at all positions $( x , y )$ . The scores are then normalized to get a probability distribution $\\alpha _ { t } ^ { ( x , y ) }$ over every position in the map, also known as “soft attention” (Bahdanau et al., 2015). This probability distribution is used to compute a weighted average $c _ { t }$ over all features $M _ { t } ^ { ( x , y ) }$ . To summarize: ",
254
+ "bbox": [
255
+ 173,
256
+ 541,
257
+ 825,
258
+ 651
259
+ ],
260
+ "page_idx": 2
261
+ },
262
+ {
263
+ "type": "equation",
264
+ "img_path": "images/9c8eab6fac19b6fa6dc83e26923fbeb7ca6354d64c2a0793cd2089ef3b37a842.jpg",
265
+ "text": "$$\n\\begin{array} { r c l } { { } } & { { } } & { { q _ { t } = W [ s _ { t } , r _ { t } ] , a _ { t } ^ { ( x , y ) } = q _ { t } \\cdot M _ { t } ^ { ( x , y ) } , } } \\\\ { { } } & { { } } & { { \\alpha _ { t } ^ { ( x , y ) } = \\displaystyle \\frac { e ^ { a _ { t } ^ { ( x , y ) } } } { \\sum _ { ( w , z ) } e ^ { a _ { t } ^ { ( w , z ) } } } , c _ { t } = \\sum _ { ( x , y ) } \\alpha _ { t } ^ { ( x , y ) } M _ { t } ^ { ( x , y ) } , } } \\end{array}\n$$",
266
+ "text_format": "latex",
267
+ "bbox": [
268
+ 330,
269
+ 656,
270
+ 666,
271
+ 724
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "where $W$ is a weight matrix. The context read operation allows the neural map to operate as an associative memory: the agent provides some possibly incomplete memory (the query vector $q _ { t } \\mathrm { ~ . ~ }$ ) and the operation will return the completed memory that most closely matches $q _ { t }$ . So, for example, the agent can query whether it has seen something similar to a particular landmark that is currently within its view. ",
278
+ "bbox": [
279
+ 173,
280
+ 729,
281
+ 825,
282
+ 800
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "Local Write Operation: Given the agent’s current position $( x _ { t } , y _ { t } )$ at time $t$ , the write operation takes as input the current state embedding $s _ { t }$ , the global read output $r _ { t }$ , the context read vector $c _ { t }$ and the current feature at position $( x _ { t } , y _ { t } )$ in the neural map $M _ { t } ^ { ( x _ { t } , y _ { t } ) }$ and produces, using a deep neural network fw, a new C-dimensional vector w(xt,yt+1 . This vector functions as the new local write candidate vector at the current position $( x _ { t } , y _ { t } )$ : $w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = f _ { w } ( [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] )$ ",
289
+ "bbox": [
290
+ 173,
291
+ 806,
292
+ 825,
293
+ 891
294
+ ],
295
+ "page_idx": 2
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "GRU-based Local Write Operation As previously defined, the write operation simply replaces the vector at the agent’s current position with a new feature produced by a deep network. Instead of this hard rewrite of the current position’s feature vector, we can use a gated write operation based on the recurrent update equations of the Gated Recurrent Unit (GRU) (Chung et al., 2014). Gated write operations have a long history in unstructured recurrent networks and they have shown a superior ability to maintain information over long time lags versus ungated networks. The GRU-based write operation is defined as: ",
300
+ "bbox": [
301
+ 173,
302
+ 895,
303
+ 825,
304
+ 924
305
+ ],
306
+ "page_idx": 2
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "",
311
+ "bbox": [
312
+ 176,
313
+ 103,
314
+ 825,
315
+ 174
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "equation",
321
+ "img_path": "images/5b64bca7ddb519824bffec84ae1a856e9b7144f81e0941274a37d8b5a1e1865e.jpg",
322
+ "text": "$$\n\\begin{array} { r l } & { r _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \\sigma ( W _ { r } [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] ) } \\\\ & { \\hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \\operatorname { t a n h } ( W _ { \\hat { h } } [ s _ { t } , r _ { t } , c _ { t } ] + U _ { \\hat { h } } ( r _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } \\odot M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) ) } \\\\ & { z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = \\sigma ( W _ { z } [ s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ] ) } \\\\ & { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = ( 1 - z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) \\odot M _ { t } ^ { ( x _ { t } , y _ { t } ) } + z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } \\odot \\hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } , } \\end{array}\n$$",
323
+ "text_format": "latex",
324
+ "bbox": [
325
+ 303,
326
+ 179,
327
+ 692,
328
+ 270
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "where $x { \\odot } y$ is the Hadamard product between vectors $x$ and $y , \\sigma ( \\cdot )$ is the sigmoid activation function and W∗ and U∗ are weight matrices. Using GRU terminology, r(xt,yt+1 ) is the reset gate, wˆ(xt,t+1 $\\hat { w } _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) }$ is the candidate activation and the GRU-based update can $z _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) }$ is the update gate. By making use of the reset and update gates,e how much the new write vector should differ from the currently stored feature. ",
335
+ "bbox": [
336
+ 173,
337
+ 273,
338
+ 826,
339
+ 352
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "Map Update Operation: The update operation creates the neural map for the next time step. The new neural map $M _ { t + 1 }$ is equal to the old neural map $M _ { t }$ , except at the current agent position $( x _ { t } , y _ { t } )$ , where the current write candidate vector w(xt,yt+1 is stored: ",
346
+ "bbox": [
347
+ 174,
348
+ 358,
349
+ 825,
350
+ 406
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "equation",
356
+ "img_path": "images/897b73aebafa41c72f7158b75f63a4e8454eb64b35ec1c25d9850bf9668eaf26.jpg",
357
+ "text": "$$\n\\begin{array} { r } { M _ { t + 1 } ^ { ( a , b ) } = \\left\\{ \\begin{array} { l l } { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } , } & { \\mathrm { f o r } ( a , b ) = ( x _ { t } , y _ { t } ) } \\\\ { M _ { t } ^ { ( a , b ) } , } & { \\mathrm { f o r } ( a , b ) \\neq ( x _ { t } , y _ { t } ) } \\end{array} \\right. } \\end{array}\n$$",
358
+ "text_format": "latex",
359
+ "bbox": [
360
+ 346,
361
+ 412,
362
+ 642,
363
+ 455
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "4 EGO-CENTRIC NEURAL MAP ",
370
+ "text_level": 1,
371
+ "bbox": [
372
+ 174,
373
+ 469,
374
+ 447,
375
+ 487
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "A major disadvantage of the neural map as previously described is that it requires some oracle to provide the current $( x , y )$ position of the agent. This is a difficult problem in and of itself, and, despite being well studied, it is far from solved. The alternative to using absolute positions within the map is to use relative positions. That is, whenever the agent moves between time steps with some velocity $( u , v )$ , the map is counter-transformed by $\\left( - u , - v \\right)$ , i.e. each feature in the map is shifted in the $H$ and $W$ dimensions. This will mean that the map will be ego-centric, i.e. the agent’s position will stay stationary in the center of the neural map while the world as defined by the map moves around them. Therefore in this setup we only need some way of extracting the agent’s velocity, which is typically a simpler task in real environments (for example, animals have inner ears and robots have accelerometers). Here we assume that there is some function $ { \\boldsymbol { \\xi } } ( u ^ { \\prime } , v ^ { \\prime } )$ that discretizes the agent velocities $( u ^ { \\prime } , v ^ { \\prime } )$ so that they represent valid velocities within the neural map $( u , v )$ . In the sequel, we assume that all velocies have been properly normalized by $\\xi$ into neural map space. ",
382
+ "bbox": [
383
+ 173,
384
+ 501,
385
+ 826,
386
+ 683
387
+ ],
388
+ "page_idx": 3
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "Let $( p w , p h )$ be the center position of the neural map. The updated ego-centric neural map operations are shown below: ",
393
+ "bbox": [
394
+ 171,
395
+ 689,
396
+ 823,
397
+ 718
398
+ ],
399
+ "page_idx": 3
400
+ },
401
+ {
402
+ "type": "equation",
403
+ "img_path": "images/3fff251d6ca8af0228c6bd66d096477c27bc8e4d6c492038ba86706e06fc8598.jpg",
404
+ "text": "$$\n\\begin{array} { r l } & { \\overline { { M } } _ { t } = C o u n t e r T r a n s f o r m ( M _ { t } , ( u _ { t } , v _ { t } ) ) } \\\\ & { \\qquad r _ { t } = r e a d ( \\overline { { M } } _ { t } ) \\quad c _ { t } = c o n t e x t ( \\overline { { M } } _ { t } , s _ { t } , r _ { t } ) } \\\\ & { w _ { t + 1 } ^ { ( p w , p h ) } = w r i t e \\big ( s _ { t } , r _ { t } , c _ { t } , \\overline { { M } } _ { t } ^ { ( p w , p h ) } \\big ) \\quad M _ { t + 1 } = e g o u p d a t e ( \\overline { { M } } _ { t } , w _ { t + 1 } ^ { ( p w , p h ) } ) } \\\\ & { \\qquad \\quad o _ { t } = \\big [ r _ { t } , c _ { t } , w _ { t + 1 } ^ { ( p w , p h ) } \\big ] \\quad \\pi _ { t } = \\mathrm { S o f t m a x } ( f ( o _ { t } ) ) } \\end{array}\n$$",
405
+ "text_format": "latex",
406
+ "bbox": [
407
+ 243,
408
+ 722,
409
+ 753,
410
+ 810
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "Where $\\overline { { M } } _ { t }$ is the current neural map $M _ { t }$ reverse transformed by the current velocity $\\left( { { u } _ { t } } , { { v } _ { t } } \\right)$ so that the agents map position remains in the center $( p w , p h )$ . ",
417
+ "bbox": [
418
+ 169,
419
+ 816,
420
+ 825,
421
+ 845
422
+ ],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "Counter Transform Operation: The CounterT ransform operation transforms the current neural map $M _ { t }$ by the inverse of the agent’s current velocity $\\left( { { u } _ { t } } , { { v } _ { t } } \\right)$ . Written formally: ",
428
+ "bbox": [
429
+ 169,
430
+ 852,
431
+ 821,
432
+ 881
433
+ ],
434
+ "page_idx": 3
435
+ },
436
+ {
437
+ "type": "equation",
438
+ "img_path": "images/a423fb13d38037b0b21541c29a239e271554c6ddb771986bb9ef8a66defb6899.jpg",
439
+ "text": "$$\n\\overline { { { M } } } _ { t } ^ { ( a , b ) } = \\left\\{ \\begin{array} { l r } { { M _ { t } ^ { ( a - u , b - v ) } , } } & { { \\mathrm { f o r ~ } ( a - u ) \\in \\{ 1 , . . . , W \\} \\wedge ( b - v ) \\in \\{ 1 , . . . , H \\} } } \\\\ { { 0 , } } & { { \\mathrm { e l s e } } } \\end{array} \\right.\n$$",
440
+ "text_format": "latex",
441
+ "bbox": [
442
+ 285,
443
+ 886,
444
+ 700,
445
+ 921
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "image",
451
+ "img_path": "images/48b8373f7563b8c9f4e3fc95fa0ca6cc4755cc7ad4e7b8acb7bb536536aa4e7b.jpg",
452
+ "image_caption": [
453
+ "Figure 1: Left: Images showing the 2D maze environment. The left side (Fig. 1a) represents the fully observable maze while the right side (Fig. 1b) represents the agent observations. The agent is represented by the yellow pixel with its orientation indicated by the black arrow within the yellow block. The starting position is always the topmost position of the maze. The red bounding box represents the area of the maze that is subsampled for the agent observation. In “Goal-Search”, the goal of the agent is to find a certain color block (either red or teal), where the correct color is provided by an indicator (either green or blue). This indicator has a fixed position near the start position of the agent. Right: State observations from the “Indicator” Doom maze environment. The agent starts in the middle of a maze looking in the direction of a torch indicator. The torch can be either green (top-left image) or red (bottom-left image) and indicates which of the goals to search for. The goals are two towers which are randomly located within the maze and match the indicator color. The episode ends whenever the agent touches a tower, whereupon it receives a positive reward if it reached the correct tower, while a negative reward otherwise. "
454
+ ],
455
+ "image_footnote": [],
456
+ "bbox": [
457
+ 254,
458
+ 90,
459
+ 761,
460
+ 258
461
+ ],
462
+ "page_idx": 4
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "While here we only deal with reverse translation, it is possible to handle rotations as well if the agent can measure it’s angular velocity. ",
467
+ "bbox": [
468
+ 173,
469
+ 441,
470
+ 823,
471
+ 470
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Map Egoupdate Operation: The egoupdate operation is functionally equivalent to the update operation except only the center position $( p w , p h )$ is ever written to: ",
478
+ "bbox": [
479
+ 171,
480
+ 477,
481
+ 823,
482
+ 506
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "equation",
488
+ "img_path": "images/4a7071f2093fb0551f73da23be6bc48082c91df71bb96cfd99b7eea6bc30fc18.jpg",
489
+ "text": "$$\nM _ { t + 1 } ^ { \\left( a , b \\right) } = \\left\\{ \\begin{array} { l l } { w _ { t + 1 } ^ { \\left( p w , p h \\right) } , } & { \\mathrm { f o r } \\left( a , b \\right) = \\left( p w , p h \\right) } \\\\ { \\overline { { M } } _ { t } ^ { \\left( a , b \\right) } , } & { \\mathrm { f o r } \\left( a , b \\right) \\neq \\left( p w , p h \\right) } \\end{array} \\right.\n$$",
490
+ "text_format": "latex",
491
+ "bbox": [
492
+ 339,
493
+ 513,
494
+ 648,
495
+ 556
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "5 EXPERIMENTS ",
502
+ "text_level": 1,
503
+ "bbox": [
504
+ 174,
505
+ 574,
506
+ 326,
507
+ 590
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "To demonstrate the effectiveness of the Neural Map, we run it on 2D and 3D maze-based environments where memory is crucial to optimal behaviour. We compare to previous memory-based DRL agents, namely a simple LSTM-based agent which consists of a single pre-output LSTM layer as well as MemNN (Oh et al., 2016) agents. ",
514
+ "bbox": [
515
+ 174,
516
+ 606,
517
+ 825,
518
+ 662
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "5.1 2D GOAL-SEARCH ENVIRONMENT ",
525
+ "text_level": 1,
526
+ "bbox": [
527
+ 176,
528
+ 681,
529
+ 455,
530
+ 695
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "The “Goal-Search” environment is adapted from Oh et al. (2016). Here the agent starts in a fixed starting position within some randomly generated maze with two randomly positioned goal states. It then observes an indicator at a fixed position near the starting state (i.e. the green tile at the top of the maze in Fig. 1a). This indicator will tell the agent which of the two goals it needs to go to (blue indicator teal goal, green indicator red goal). If the agent goes to the correct goal, it gains a positive reward while if it goes to the incorrect goal it gains a negative reward. Therefore the agent needs to remember the indicator as it searches for the correct goal state. In depth details of the 2D environment are given in Appendix B. The mazes during training are generated using a random generator. A held-out set of 1000 random mazes is kept for testing. This test set therefore represents maze geometries that have never been seen during training, and measure the agent’s ability to generalize to new environments. ",
537
+ "bbox": [
538
+ 174,
539
+ 707,
540
+ 825,
541
+ 861
542
+ ],
543
+ "page_idx": 4
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "The first baseline agent we evaluate is a recurrent network with 128 LSTM units. The other baseline is the MQN, which is a memory-network-based architecture that performs attention over the past K states it has seen (Oh et al., 2016). Both LSTM and MQN models receive a one-hot encoding of the agent’s current location, previous velocity, and current orientation at each time step, in order to make the comparison to the fixed-frame Neural Map fair. We test these baselines against several Neural Map architectures, with each architecture having a different design choice. ",
548
+ "bbox": [
549
+ 174,
550
+ 867,
551
+ 823,
552
+ 924
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "table",
558
+ "img_path": "images/c86681208ae12052207e3d09248a2dc4e6a11a7fe07a745063b81c9a1d1b2d86.jpg",
559
+ "table_caption": [
560
+ "2D Goal-Search ",
561
+ "Table 1: Results of several different agent architectures on the “Goal-Search” environment. The “train” columns represents the number of mazes solved (in $\\%$ ) when sampling from the same distribution as used during training. The “test” columns represents the number of mazes solved when run on a set of held-out maze samples which are guaranteed not to have been sampled during training. "
562
+ ],
563
+ "table_footnote": [],
564
+ "table_body": "<table><tr><td rowspan=\"2\">Agent</td><td colspan=\"3\">Train</td><td colspan=\"3\">Test</td></tr><tr><td>7-11</td><td>13-15</td><td>Total</td><td>7-11</td><td>13-15</td><td>Total</td></tr><tr><td>Random</td><td>41.9%</td><td>25.7%</td><td>38.1%</td><td>46.0%</td><td>29.6%</td><td>38.8%</td></tr><tr><td>LSTM</td><td>84.7%</td><td>74.1%</td><td>87.4%</td><td>96.3%</td><td>83.4%</td><td>91.4%</td></tr><tr><td>MQN-32</td><td>80.2%</td><td>64.4%</td><td>83.3%</td><td>95.9%</td><td>74.6%</td><td>87.4%</td></tr><tr><td>MQN-64</td><td>83.2%</td><td>69.6%</td><td>85.8%</td><td>96.5%</td><td>76.7%</td><td>88.3%</td></tr><tr><td>Neural Map (15x15)</td><td>92.4%</td><td>80.5%</td><td>89.2%</td><td>93.5%</td><td>87.9%</td><td>91.7%</td></tr><tr><td>Neural Map + GRU (15x15)</td><td>97.0%</td><td>89.2%</td><td>94.9%</td><td>97.7%</td><td>94.0%</td><td>96.4%</td></tr><tr><td>Neural Map + GRU(8x8)</td><td>94.9%</td><td>90.7%</td><td>95.6%</td><td>98.0%</td><td>95.8%</td><td>97.3%</td></tr><tr><td>Neural Map +GRU + Pos (8x8)</td><td>95.0%</td><td>91.0%</td><td>95.9%</td><td>98.3%</td><td>94.3%</td><td>96.5%</td></tr><tr><td>Neural Map + GRU + Pos (6x6)</td><td>90.9%</td><td>83.2%</td><td>91.8%</td><td>97.1%</td><td>90.5%</td><td>94.0%</td></tr><tr><td>Ego Neural Map + GRU (15x15)</td><td>94.6%</td><td>91.1%</td><td>95.4%</td><td>97.7%</td><td>92.1%</td><td>95.5%</td></tr><tr><td>Ego Neural Map +GRU + Pos (15x15)</td><td>74.6%</td><td>63.9%</td><td>78.6%</td><td>87.8%</td><td>73.2%</td><td>82.7%</td></tr></table>",
565
+ "bbox": [
566
+ 199,
567
+ 113,
568
+ 799,
569
+ 281
570
+ ],
571
+ "page_idx": 5
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "",
576
+ "bbox": [
577
+ 173,
578
+ 443,
579
+ 823,
580
+ 470
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "The results are reported in Table 1. During testing, we extend the maximum episode length from 100 to 500 steps so that the agent is given more time to solve the maze. The brackets next to the model name represent the Neural Map dimensions of that particular model. From the results we can see that the Neural Map architectures solve the most mazes in both the training and test distributions compared to both LSTM and MQN baselines. ",
587
+ "bbox": [
588
+ 174,
589
+ 477,
590
+ 825,
591
+ 547
592
+ ],
593
+ "page_idx": 5
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "The results also demonstrate the effect of certain design decisions. One thing that can be observed is that using GRU updates adds several percentage points to the success rate (“Neural Map (15x15)” v.s. “Neural $\\mathrm { M a p } + \\mathrm { G R U } \\left( 1 5 \\mathrm { x } 1 5 \\right) ^ { \\circ } )$ . We also tried downsampled Neural Maps, such that a pixel in the memory map represents several discrete locations in the environment. The Neural Map seems quite robust to this downsampling, with a downsampling of around 3 (6x6 v.s. 15x15) doing just a few percentage points worse, and still beating all baseline models. The 6x6 model has approximately the same number of memory cells as “MQN- $. 3 2 ^ { \\circ }$ , but its performance is much better, showing the benefit of having learnable write operations. For the egocentric model, in order to cover the entire map we set the pixels to be $2 \\mathbf { x }$ smaller in each direction, so each pixel is only a quarter of a pixel in the fixed-frame map. Even with this coarser representation, the egocentric model did similarly to the fixed frame one. We demonstrate an example of what the Neural Map learned to address using its context operator in Appendix E. ",
598
+ "bbox": [
599
+ 173,
600
+ 554,
601
+ 825,
602
+ 720
603
+ ],
604
+ "page_idx": 5
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "Finally, we tried adding the one-hot position encoding as a state input to the Neural Map, as is done for the baselines. We can see that there is a small improvement, but it is largely marginal, with the Neural Map doing a decent job of learning how to represent its own position without needing to be told explicitly. One interesting thing that we observed is that having the one-hot position encoding as an input to the egocentric map decreased performance, perhaps because it is difficult for the network to learn a mapping between fixed and egocentric frames. ",
609
+ "bbox": [
610
+ 174,
611
+ 728,
612
+ 825,
613
+ 813
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "Note that sometimes the percentage results are lower for the training distribution. This is mainly because the training set encompases almost all random mazes except the fixed 1000 of the test set, thus making it likely that the agent sees each training map only once. ",
620
+ "bbox": [
621
+ 174,
622
+ 819,
623
+ 823,
624
+ 861
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "Beyond train/test splits, the results are further separated by maze size. This information reveals that the memory networks are hardest hit by increasing maze size with sometimes a $20 \\%$ drop in success on 13-15 v.s. 7-11. This is perhaps unsurprising given the inherent fixed time horizon of memory netwoks, and further reveals the benefit of using write-based memories. ",
631
+ "bbox": [
632
+ 174,
633
+ 867,
634
+ 823,
635
+ 924
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "image",
641
+ "img_path": "images/4214ed9336fcb3cd9e922057d42b4aa5a46c785d9a82e03be29dbdf15a3a7649.jpg",
642
+ "image_caption": [
643
+ "Figure 2: Top-down views showing succesful episodes in each of the 3 Doom maze tasks. The red lines indicate the path traveled by the agent. Indicator is shown in Fig. 2a, where the agent receives positive reward when entering the corresponding tower that matches the torch color it saw at the start of the episode and a negative reward otherwise. The episode terminates once the agent has reached a tower. Repeating, shown in Fig. 2b, has the same underlying mechanics except (1) the episode persists for $T$ time steps regardless of towers entered and (2) the torch indicator is removed from the maze after the agent has reached a tower once. Therefore the agent needs to find the correct tower and then optimize its path to that tower. Minotaur shown in Fig. 2c requires the agent to reach the red goal and then return to the green goal that is at its starting position. Here the torch does not have any function. This fully-observable top-down view was not made available to the agent and is only used for visualization. "
644
+ ],
645
+ "image_footnote": [],
646
+ "bbox": [
647
+ 173,
648
+ 99,
649
+ 810,
650
+ 223
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "5.2 3D DOOM ENVIRONMENT DESCRIPTION ",
657
+ "text_level": 1,
658
+ "bbox": [
659
+ 176,
660
+ 393,
661
+ 495,
662
+ 409
663
+ ],
664
+ "page_idx": 6
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "To demonstrate that our method can work in much more complicated 3D environments with longer time lags, we implemented three 3D maze environments using the ViZDoom (Kempka et al., 2016) API and a random maze generator. Examples of all three environments are given in Figure 2. ",
669
+ "bbox": [
670
+ 176,
671
+ 426,
672
+ 821,
673
+ 469
674
+ ],
675
+ "page_idx": 6
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "Indicator Maze: The first environment is a recreation of the 2D indicator maze task, where an indicator is positioned in view of the player’s starting state which is either a torch of red or green color. The goals are corresponding red/green towers that are randomly positioned throughout the maze that the player must locate. ",
680
+ "bbox": [
681
+ 173,
682
+ 477,
683
+ 825,
684
+ 532
685
+ ],
686
+ "page_idx": 6
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Repeating Maze: The second environment is a variant of this indicator maze but whenever the player enters a goal state, it is teleported back to the beginning of the maze without terminating the episode (i.e. it retains its memory of the current maze). It gains a positive reward if it reaches the correct goal and a negative reward if it reaches the incorrect goal. After the first goal is reached, the correct indicator color is no longer displayed within the maze and a red indicator is displayed afterwards instead (regardless if the correct goal is green). An episode ends after a predetermined number of steps which depends on the maze size. The goal is therefore to find a path to the correct goal, and then optimize that path so that it can reach it as many times as possible. ",
691
+ "bbox": [
692
+ 173,
693
+ 539,
694
+ 825,
695
+ 651
696
+ ],
697
+ "page_idx": 6
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "Minotaur Maze: The third environment has the agent start in a fixed starting position next to the green tower, while the red tower is randomly placed somewhere in the maze. The agent receives a small positive reward if it reaches the red tower, and a larger positive reward if after reaching the red tower it returns to the green tower. Therefore the agent must efficiently navigate to the red goal while accurately remember its entire path it so that it can backtrack to the start. ",
702
+ "bbox": [
703
+ 174,
704
+ 657,
705
+ 825,
706
+ 728
707
+ ],
708
+ "page_idx": 6
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "All three environments used a $\\mathrm { R G B + D }$ image of size $1 0 0 \\mathrm { x } 6 0$ as input. We generate maze geometries randomly at train time but make sure to exclude a test set of 10 mazes for each size [4, 5, 6, 7, 8] (50 total). For these environments, we tested out four architectures (see Appendix C for more details on both environments and architectures): ",
713
+ "bbox": [
714
+ 174,
715
+ 734,
716
+ 823,
717
+ 790
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "Neural Map with Controller LSTM: Standard Neural Map with fixed frame addressing and GRU updates. We combine the neural map design with an LSTM that aggregates past state, read and context vectors and produces the query vector for the next time step’s context read operation. See Appendix A for the modified Neural Map equations. ",
724
+ "bbox": [
725
+ 174,
726
+ 796,
727
+ 825,
728
+ 853
729
+ ],
730
+ "page_idx": 6
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Ego Neural Map with Controller LSTM: Same as previous but with ego-centric addressing. The other difference is that the Ego Neural Map does not receive any positional input unlike the other 3 models, only receiving frame-by-frame ego-motion (quantized to a coarse grid). ",
735
+ "bbox": [
736
+ 174,
737
+ 859,
738
+ 825,
739
+ 902
740
+ ],
741
+ "page_idx": 6
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "LSTM: Single pre-output 256-dimensional LSTM layer. ",
746
+ "bbox": [
747
+ 173,
748
+ 909,
749
+ 545,
750
+ 924
751
+ ],
752
+ "page_idx": 6
753
+ },
754
+ {
755
+ "type": "table",
756
+ "img_path": "images/614a33b65358de9058b70a8d990532802444c83ce1eed5f800b875855b28cce1.jpg",
757
+ "table_caption": [],
758
+ "table_footnote": [],
759
+ "table_body": "<table><tr><td rowspan=\"2\">Agent Maze Size</td><td colspan=\"6\">Indicator</td><td colspan=\"6\">Repeating</td><td colspan=\"4\">Minotaur</td></tr><tr><td>4</td><td></td><td>5</td><td>6</td><td>8</td><td></td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr><tr><td rowspan=\"2\">LSTM</td><td>Acc</td><td>95.7</td><td>87.5</td><td>81.1</td><td>71.4</td><td>60.3</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>90.0</td><td>71.5</td><td>48.0</td><td>34.2</td><td>29.4</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>1</td><td>1</td><td>-</td><td>7.26</td><td>7.58</td><td>6.065.32</td><td></td><td>4.98</td><td>1.35</td><td>1.07</td><td>0.72</td><td>0.51</td><td>0.44</td></tr><tr><td rowspan=\"2\">FRMQN</td><td>Acc</td><td>87.3</td><td>82.9</td><td>78.0</td><td>72.0</td><td>59.8</td><td>-</td><td>-</td><td>1</td><td>1</td><td>1</td><td>72.7</td><td>54.5</td><td>38.8</td><td>28.8</td><td>23.7</td></tr><tr><td>Rew</td><td>-</td><td>-</td><td>-</td><td>1</td><td>-</td><td>1.45</td><td>1.65</td><td>1.51</td><td>1.37</td><td>1.09</td><td>1.09</td><td>0.82</td><td>0.58</td><td>0.43</td><td>0.36</td></tr><tr><td rowspan=\"2\">Controller</td><td>Acc</td><td>95.8</td><td>90.3</td><td>81.8</td><td>80.4</td><td>70.3</td><td>-</td><td>1</td><td>1</td><td></td><td></td><td>99.7</td><td>92.2</td><td>67.5</td><td>37.9</td><td>30.2</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>-</td><td>1</td><td>-</td><td>17.4</td><td>17.1</td><td>12.0</td><td>1 11.4</td><td>1 12.3</td><td>1.50</td><td>1.38</td><td>1.01</td><td>0.57</td><td>0.45</td></tr><tr><td>NMap Controller</td><td>Acc</td><td>94.6</td><td>91.0</td><td>87.6</td><td>85.8</td><td>72.2</td><td></td><td>-</td><td></td><td></td><td></td><td>98.6</td><td>90.0</td><td>65.2</td><td>44.7</td><td>33.8</td></tr><tr><td>Ego-NMap</td><td>Rew</td><td>1</td><td>-</td><td>-</td><td>1</td><td>1</td><td>- 12.8</td><td>14.1</td><td>1 11.0</td><td>- 10.4</td><td>- 9.72</td><td>1.48</td><td>1.35</td><td>0.98</td><td>0.67</td><td>0.51</td></tr></table>",
760
+ "bbox": [
761
+ 156,
762
+ 102,
763
+ 838,
764
+ 233
765
+ ],
766
+ "page_idx": 7
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "Table 2: Doom results on mazes not observed during training for the three tasks: Indicator, Repeating and Minotaur. Acc stands for Accuracy and Rew for Reward. Accuracy for Indicator means $\\%$ of correct goals reached, while for Minotaur it means $\\%$ of episodes where the agent successfully reached the goal and then backtracked to the beginning. Reward for Repeating is number of times correct goal was visited within the allotted time steps $_ { + 1 }$ for correct goal, -1 for incorrect goal). Reward for Minotaur is $+ 0 . 5$ for reaching the goal and then $+ 1 . 0$ for backtracking to start after reaching goal (max episode reward is $+ 1 . 5$ ). We tested on maze sizes between [4,8] with 10 test mazes for each size. For each of the 50 total test mazes we ran 100 episodes with random goal locations and averaged the result. ",
771
+ "bbox": [
772
+ 173,
773
+ 244,
774
+ 825,
775
+ 347
776
+ ],
777
+ "page_idx": 7
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "FRMQN (Oh et al., 2016): Memory network with LSTM feedback. This design uses an LSTM to make recurrent context queries to the memory network database. In addition, for the memory network baselines we did not set a fixed $\\mathbf { k }$ but instead let it access any state from its entire episode. This means no information is lost to the memory network, it only needs to process its history. ",
782
+ "bbox": [
783
+ 174,
784
+ 363,
785
+ 823,
786
+ 420
787
+ ],
788
+ "page_idx": 7
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "The results are shown in Table 2. We can see that the Neural Map architectures work better than the baseline models, even though the memory network has access to its entire episode history at every time step. The ego-centric Neural Map beats the fixed frame map at Indicator, and gets similar performance on both Repeating and Minotaur environments, showing the ability of the Neural Map to function effectively even without global position information. It is possible that having a fixed frame makes path optimization easier, which would explain the larger rewards that the fixed-frame model got in the Repeating task. We also investigated whether the neural map is robust to localization noise, which would be the case in a real world setting where we do not have access to a localization oracle and must instead rely on an error-prone odometry or SLAM-type algorithm to do localization. These results are presented in Appendix D. ",
793
+ "bbox": [
794
+ 174,
795
+ 426,
796
+ 825,
797
+ 565
798
+ ],
799
+ "page_idx": 7
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "For the baselines, we can see that FRMQN has difficulty learning on Repeating, only reaching the goal on average once. This could be because the indicator is only shown before the first goal is reached and so afterwards it needs to remember increasingly longer time horizons. Furthermore, because the red indicator is always shown after the first goal is reached, it might be difficult for the model to learn to do retrieval since the original correct indicator must be indexed by time and not image similarity. The FRMQN also has difficulty on Minotaur, probably due to needing to remember and organize a lot of spatial information (i.e. what actions were taken along the path). For Indicator, the FRMQN does similarly to the LSTM. We can see that the spatial structure of the Neural Map aids in optimizing the path in Repeating, averaging 12 goal reaches even in the largest maze size. ",
804
+ "bbox": [
805
+ 174,
806
+ 571,
807
+ 825,
808
+ 699
809
+ ],
810
+ "page_idx": 7
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "6 RELATED WORK ",
815
+ "text_level": 1,
816
+ "bbox": [
817
+ 176,
818
+ 718,
819
+ 343,
820
+ 734
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Other than the straightforward architectures of combining an LSTM with Deep Reinforcement Learning (DRL) (Mnih et al., 2016; Hausknecht & Stone, 2015), there has also been work on using more advanced external memory systems with DRL agents to handle partial observability. Oh et al. (2016) used a memory network (MemNN) to solve maze-based environments similar to the ones presented in this paper. MemNN keeps the last $M$ states in memory and encodes them into (key, value) feature pairs. It then queries this memory using a soft attention mechanism similar to the context operation of the Neural Map, except in the Neural Map the key/value features were written by the agent and aren’t just a stored representation of the last $M$ frames seen. Oh et al. (2016) tested a few variants of this basic model, including ones which combined both LSTM and memory-network style memories. ",
827
+ "bbox": [
828
+ 174,
829
+ 750,
830
+ 825,
831
+ 888
832
+ ],
833
+ "page_idx": 7
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "In contrast to memory networks, another research direction is to design recurrent architectures that mimic computer memory systems. These architectures explicitly separate computation and memory in a way anagolous to a modern digital computer, in which some neural controller (akin to a CPU) interacts with an external memory (RAM). One recent model is similar to the Neural Map, called the Differentiable Neural Computer (DNC) (Graves et al., 2016), which combines a recurrent controller with an external memory system that allows several types of read/write access. In addition to defining an unconstrained write operator (in contrast to the neural map’s write location being fixed), the DNC has a selective read operation that reads out the memory either by content or in the order that it was written. While the DNC is more specialized to solving algorithmic problems, the Neural Map can be seen as an extension of this Neural Computer framework to 3D environments, with a specific inductive bias on its write operator that allows sparse writes. Recently work has also been done toward sparsifying the read and write operations of the DNC (Rae et al., 2016). This work was not focused on 3D environments and did not make any use of task-specific biases like agent location, but instead used more general biases like “Least-Recently-Used” memory addresses to force sparsity. More recently, the DNC, in conjunction with a VIN planning network (Tamar et al., 2016), has been applied to the task of navigating partially-observable environments (Khan et al., 2018) although it still relied on supervised learning in order to train the complete system. ",
838
+ "bbox": [
839
+ 173,
840
+ 895,
841
+ 821,
842
+ 924
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "",
849
+ "bbox": [
850
+ 174,
851
+ 104,
852
+ 825,
853
+ 311
854
+ ],
855
+ "page_idx": 8
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "Gupta et al. (2017) designed a similar 2D map structured memory, with the aim to do robot navigation in 3D environments. These environments were based off image scans of real office buildings, and they were preprocessed into a grid-world by quantizing the possible positions and orientations the agent could assume. In contrast to our paper, which presents the Neural Map more as a general memory architecture for DRL agents, Gupta et al. (2017) focuses mainly on solving the task of robot navigation, with the internal map’s representation mainly used to represent free space around the robot. More concretely, the task in these environments was to navigate to a goal state, with the goal position either stated semantically (find a chair) or stated in terms of the position relative to the robot’s coordinate frame. Another key difference was that their formulation lacked a context addressing operation. Finally, their method used DAGGER (Ross et al., 2011), an imitation learning algorithm, to train their agent. Since Doom actions affect translational/rotational accelerations, training using imitation learning is more difficult since a search algorithm cannot be used directly as supervision. An interesting addition they made was the use of a multi-scale map representation and a Value Iteration network (Tamar et al., 2016) to do better path planning. Another related work, Neural SLAM (Zhang et al., 2017) extends spatial memories to settings where localization/odometry is not provided a priori, but instead has to be completed in tandem with the mapping of the environment. In order to accomplish that, a grid-based localization system was combined with a Neural Map-style memory in order to do differentiable SLAM-like combined localization and mapping. ",
860
+ "bbox": [
861
+ 174,
862
+ 318,
863
+ 825,
864
+ 568
865
+ ],
866
+ "page_idx": 8
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "7 CONCLUSION ",
871
+ "text_level": 1,
872
+ "bbox": [
873
+ 176,
874
+ 580,
875
+ 318,
876
+ 595
877
+ ],
878
+ "page_idx": 8
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "In this paper we developed a neural memory architecture that organizes the spatial structure of its memory in the form of a 2D map, and allows sparse writes to this memory where the memory address of the write is in a correspondence to the agent’s current position in the environment. We showed its ability to learn, using a reinforcement signal, how to behave within challenging 2D and 3D maze tasks that required storing information over long time steps. The results demonstrated that our architecture surpassed baseline memories used in previous work. Additionally, we showed the benefit of certain design decisions made in our architecture: using GRU updates instead of hard writes, demonstrating that the ego-centric viewpoint does not diminish performance and that the Neural Map is robust to downsampling its memory. Finally, to show that our method can scale up to more difficult 3D environments, we implemented several new maze environments in Doom. Using a hybrid Neural $\\mathbf { M a p } + \\mathbf { L S T M }$ model, we were able to solve most of the scenarios at a performance higher than previous DRL memory-based architectures. Furthermore, we demonstrated the ability of the Neural Map to be robust to a certain level of drift noise in its localization estimate. ",
883
+ "bbox": [
884
+ 174,
885
+ 612,
886
+ 825,
887
+ 791
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "Acknowledgements ",
894
+ "text_level": 1,
895
+ "bbox": [
896
+ 174,
897
+ 799,
898
+ 310,
899
+ 813
900
+ ],
901
+ "page_idx": 8
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "This work was supported by Apple, DARPA award D17AP00001, the Google focused award. The authors would also like to thank NVidia NVAIL award for donating DGX-1 deep learning machine. This work used the Extreme Science and Engineering Discovery Environment (XSEDE), which is supported by National Science Foundation grant number OCI-1053575. Specifically, it used the Bridges system, which is supported by NSF award number ACI-1445606, at the Pittsburgh Supercomputing Center (PSC). ",
906
+ "bbox": [
907
+ 174,
908
+ 820,
909
+ 825,
910
+ 904
911
+ ],
912
+ "page_idx": 8
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "REFERENCES ",
917
+ "text_level": 1,
918
+ "bbox": [
919
+ 174,
920
+ 103,
921
+ 287,
922
+ 117
923
+ ],
924
+ "page_idx": 9
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "D. Bahdanau, K. H. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of the 3rd International Conference on Learning Representations 2015, 2015. ",
929
+ "bbox": [
930
+ 174,
931
+ 126,
932
+ 823,
933
+ 167
934
+ ],
935
+ "page_idx": 9
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. CoRR, abs/1412.3555, 2014. URL https://arxiv.org/ abs/1412.3555. ",
940
+ "bbox": [
941
+ 173,
942
+ 178,
943
+ 821,
944
+ 220
945
+ ],
946
+ "page_idx": 9
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. URL https://arxiv.org/abs/1410.5401. ",
951
+ "bbox": [
952
+ 168,
953
+ 229,
954
+ 825,
955
+ 260
956
+ ],
957
+ "page_idx": 9
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "A. Graves, G. Wayne, M. Reynolds, T. Harley, I. Danihelka, A. Grabska-Barwiska, S. G. Colmenarejo, E. Grefenstette, T. Ramalho, J. Agapiou, A. P. Badia, K. M. Hermann, Y. Zwols, G. Ostrovski, A. Cain, H. King, C. Summerfield, P. Blunsom, K. Kavukcuoglu, and D. Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, 538: 471–476, 2016. ",
962
+ "bbox": [
963
+ 173,
964
+ 268,
965
+ 825,
966
+ 338
967
+ ],
968
+ "page_idx": 9
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "S. Gupta, J. Davidson, S. Levine, R. Sukthankar, and J. Malik. Cognitive mapping and planning for visual navigation. CoRR, abs/1702.03920, 2017. URL https://arxiv.org/abs/1702. 03920. ",
973
+ "bbox": [
974
+ 173,
975
+ 348,
976
+ 821,
977
+ 391
978
+ ],
979
+ "page_idx": 9
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "M. Hausknecht and P. Stone. Deep recurrent q-learning for partially observable mdps. CoRR, abs/1507.06527, 2015. URL https://arxiv.org/abs/1507.06527. ",
984
+ "bbox": [
985
+ 171,
986
+ 400,
987
+ 821,
988
+ 430
989
+ ],
990
+ "page_idx": 9
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. ViZ- ´ Doom: A Doom-based AI research platform for visual reinforcement learning. In IEEE Conference on Computational Intelligence and Games, pp. 341–348, Santorini, Greece, Sep 2016. IEEE. ",
995
+ "bbox": [
996
+ 174,
997
+ 438,
998
+ 823,
999
+ 494
1000
+ ],
1001
+ "page_idx": 9
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "A. Khan, C. Zhang, N. Atanasov, K. Karydis, V. Kumar, and D. D. Lee. Memory augmented control networks. In Proceedings of the 6th International Conference on Learning Representations, 2018. ",
1006
+ "bbox": [
1007
+ 169,
1008
+ 505,
1009
+ 823,
1010
+ 535
1011
+ ],
1012
+ "page_idx": 9
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "G. Lample and D. S. Chaplot. Playing fps games with deep reinforcement learning. CoRR, abs/1609.05521, 2016. URL https://arxiv.org/abs/1609.05521. ",
1017
+ "bbox": [
1018
+ 174,
1019
+ 542,
1020
+ 823,
1021
+ 573
1022
+ ],
1023
+ "page_idx": 9
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. ",
1028
+ "bbox": [
1029
+ 174,
1030
+ 582,
1031
+ 820,
1032
+ 611
1033
+ ],
1034
+ "page_idx": 9
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518:529–533, 2015. ",
1039
+ "bbox": [
1040
+ 174,
1041
+ 619,
1042
+ 823,
1043
+ 678
1044
+ ],
1045
+ "page_idx": 9
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Harley, T. P. Lillicrap, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. ",
1050
+ "bbox": [
1051
+ 174,
1052
+ 686,
1053
+ 823,
1054
+ 729
1055
+ ],
1056
+ "page_idx": 9
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "J. Oh, V. Chockalingam, S. Singh, and H. Lee. Control of memory, active perception, and action in minecraft. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. ",
1061
+ "bbox": [
1062
+ 171,
1063
+ 738,
1064
+ 823,
1065
+ 781
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "J. W. Rae, J. J. Hunt, T. Harley, I. Danihelka, A. Senior, G. Wayne, A. Graves, and T. Lillicrap. Scaling memory-augmented neural networks with sparse reads and writes. CoRR, abs/1610.09027, 2016. URL https://arxiv.org/abs/1610.09027. ",
1072
+ "bbox": [
1073
+ 174,
1074
+ 790,
1075
+ 823,
1076
+ 834
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "Stephane Ross, Geoffrey J Gordon, and Drew Bagnell. A reduction of imitation learning and struc-´ tured prediction to no-regret online learning. In AISTATS, volume 1, pp. 6, 2011. ",
1083
+ "bbox": [
1084
+ 171,
1085
+ 843,
1086
+ 823,
1087
+ 872
1088
+ ],
1089
+ "page_idx": 9
1090
+ },
1091
+ {
1092
+ "type": "text",
1093
+ "text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In Proceedings of the 4th International Conference on Learning Representations 2016, 2015. ",
1094
+ "bbox": [
1095
+ 174,
1096
+ 882,
1097
+ 825,
1098
+ 924
1099
+ ],
1100
+ "page_idx": 9
1101
+ },
1102
+ {
1103
+ "type": "text",
1104
+ "text": "S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. End-to-end memory networks. In Advances in Neural Information Processing Systems, pp. 2440–2448, 2015. \nR. Sutton and A. Barto. Reinforcement Learning: an Introduction. MIT Press, 1998. \nAviv Tamar, Yi Wu, Garrett Thomas, Sergey Levine, and Pieter Abbeel. Value iteration networks. In Advances in Neural Information Processing Systems, pp. 2146–2154, 2016. \nR. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3):229–256, 1992. \nJ. Zhang, L. Tai, J. Boedecker, W. Burgard, and M. Liu. Neural slam: Learning to explore with external memory. CoRR, abs/1706.09520, 2017. URL https://arxiv.org/abs/1706. 09520. ",
1105
+ "bbox": [
1106
+ 171,
1107
+ 101,
1108
+ 828,
1109
+ 284
1110
+ ],
1111
+ "page_idx": 10
1112
+ },
1113
+ {
1114
+ "type": "text",
1115
+ "text": "A CONTROLLER (EGO-)NEURAL MAP ",
1116
+ "text_level": 1,
1117
+ "bbox": [
1118
+ 176,
1119
+ 102,
1120
+ 508,
1121
+ 118
1122
+ ],
1123
+ "page_idx": 11
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Here we describe the modification to the Neural Map we utilized for the 3D maze tasks. We include an extra state $h$ that represents the hidden and cell state of an LSTM. The Neural Map equations are therefore: ",
1128
+ "bbox": [
1129
+ 174,
1130
+ 143,
1131
+ 825,
1132
+ 185
1133
+ ],
1134
+ "page_idx": 11
1135
+ },
1136
+ {
1137
+ "type": "equation",
1138
+ "img_path": "images/e3c3aacfc80291999f04a9e7e9b01fabc5ae7d00930ec2369e54acd628f00154.jpg",
1139
+ "text": "$$\n\\begin{array} { r l } & { r _ { t } = r e a d ( M _ { t } ) , } \\\\ & { h _ { t } = L S T M ( s _ { t } , r _ { t } , c _ { t - 1 } , h _ { t - 1 } ) , } \\\\ & { c _ { t } = c o n t e x t ( M _ { t } , h _ { t } ) , } \\\\ & { w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } = w r i t e ( s _ { t } , r _ { t } , c _ { t } , M _ { t } ^ { ( x _ { t } , y _ { t } ) } ) , } \\\\ & { M _ { t + 1 } = w p d a t e ( M _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ) , } \\\\ & { \\qquad o _ { t } = [ r _ { t } , c _ { t } , w _ { t + 1 } ^ { ( x _ { t } , y _ { t } ) } ] , } \\\\ & { \\pi _ { t } ( a | s ) = \\mathrm { S o f t m a x } ( f ( o _ { t } ) ) , } \\end{array}\n$$",
1140
+ "text_format": "latex",
1141
+ "bbox": [
1142
+ 369,
1143
+ 209,
1144
+ 625,
1145
+ 351
1146
+ ],
1147
+ "page_idx": 11
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "B 2D ENVIRONMENT DETAILS ",
1152
+ "text_level": 1,
1153
+ "bbox": [
1154
+ 174,
1155
+ 386,
1156
+ 444,
1157
+ 402
1158
+ ],
1159
+ "page_idx": 11
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "The state input for the 2D environment is a $5 \\times 1 5 \\times 3$ subsample of the complete maze so that the agent is able to see 15 pixel forward and 3 pixels on the side (center pixel $^ +$ one pixel on each side of the agent) which is depicted in Fig.1b. This view is obscured so the agent is prevented from seeing the identity of anything behind walls. The 5 binary channels in the observation represent object identities: channel 1 represents presence of walls, 2 represents the green indicator, 3 the blue indicator, 4 the red goal, and 5 the teal goal. The LSTM and MemNN networks were given auxiliary information such as the one-hot encoding of the current agent’s true position in the maze. Neural Map variants were not given position information in an auxiliary state unless specified by the $^ { 6 6 } +$ Pos” modifier in Table 1. Actions in the environment included moving forward and turning left/right 90 degrees. ",
1164
+ "bbox": [
1165
+ 173,
1166
+ 428,
1167
+ 825,
1168
+ 568
1169
+ ],
1170
+ "page_idx": 11
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "For optimization, all architectures used the RMSprop optimization algorithm with gradients thresholded to norm 20 for LSTM, 100 for Neural Map variants, and no thresholding for memory networks. We used an auxiliary weighted entropy loss on the Synchronous Actor-Critic with weight 0.01. The learning rates for LSTM models was 0.0025, 0.005 for Neural Map variants, and 0.001 for memory networks. We obtained the hyperparameters during a limited hyperparameter sweep on a simpler version of the environment. We used A2C with number of time steps equal to 5. We trained for 10 million updates. ",
1175
+ "bbox": [
1176
+ 173,
1177
+ 574,
1178
+ 825,
1179
+ 672
1180
+ ],
1181
+ "page_idx": 11
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "The mazes were generated using an algorithm based on Depth-First Search to form a fully-connected maze. Afterwards each wall was deleted with probability $p . p$ was sampled uniformly from between $[ 0 , 0 . 7 5 ]$ at maze generation time. Each episode, a random maze width was sampled uniformly from between [7, 15]. ",
1186
+ "bbox": [
1187
+ 174,
1188
+ 679,
1189
+ 825,
1190
+ 736
1191
+ ],
1192
+ "page_idx": 11
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "(Ego-)Neural Map Agent Details: For the global read operation, we used a convolutional network with 3 layers of 8 channels and kernel size 3. The strides were set to 1 on the first layer, and 2 to the second and third layers. Padding was 1 on the first layer and 0 on other layers. The 3 convolutional layers were then followed by a fully-connected layer of dimension 256 and then another fullyconnected layer of size 32. All activations were relu except the 32 dimension layer, which was set to tanh. Positions were normalized so that the largest map size used all positions, while smaller mazes used a subset of the map. ",
1197
+ "bbox": [
1198
+ 174,
1199
+ 742,
1200
+ 825,
1201
+ 840
1202
+ ],
1203
+ "page_idx": 11
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "LSTM Agent Details: The LSTM agent had a single 128-dimension LSTM layer on top of the state embedding. The auxiliary state information was first processed into a 256-dimension embedding. ",
1208
+ "bbox": [
1209
+ 174,
1210
+ 845,
1211
+ 821,
1212
+ 875
1213
+ ],
1214
+ "page_idx": 11
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "MQN Agent Details: Each past history state was 512-dimensional (256-dimensional key $+ \\ 2 5 6$ - dimensional value feature). The input state was processed by a convolutional network with 32 channels, filter size 3, stride 1 and padding 1. ",
1219
+ "bbox": [
1220
+ 174,
1221
+ 881,
1222
+ 825,
1223
+ 924
1224
+ ],
1225
+ "page_idx": 11
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "C 3D ENVIRONMENT DETAILS ",
1230
+ "text_level": 1,
1231
+ "bbox": [
1232
+ 174,
1233
+ 102,
1234
+ 444,
1235
+ 117
1236
+ ],
1237
+ "page_idx": 12
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "The state input for all 3D environments was a $1 0 0 \\mathrm { x } 6 0 \\ \\mathrm { R G B + D }$ image. This was passed through a convolution network that was the same for all architectures. It first consists of a 2D convolution with 32 channels of filter size 8 with stride 4. This was then passed to another 2D convolution with 64 channels of filter size 4 and stride 2. Finally, the result was passed through a fully-connected layer with 512 features, which represented the current frame embedding. The frame embedding was then augmented with some auxiliary information about the map, which in the case of Neural Map, FRMQN and LSTM architectures was 1) a one-hot encoding of the current time step, 2) the current orientation (North/East/West/South), 3) the 2D velocity (change in x/y position in a top-down 2D quantized grid of possible environment positions), and 4) a one-hot encoding of the agent’s current quantized position. For Ego Neural Map, only 1, 2, 3 are used (i.e. it has no input of the agent’s current true position given by an oracle). The 512 frame encoding is concatenated with the auxiliary state information to form the complete state embedding. Actions in the maze consist of moving forward and turning left or right. ",
1242
+ "bbox": [
1243
+ 174,
1244
+ 165,
1245
+ 825,
1246
+ 347
1247
+ ],
1248
+ "page_idx": 12
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "For optimization, all architectures used the Adam optimization algorithm with gradients thresholded to a norm of 40. We used an auxiliary weighted entropy loss on the Synchronous Actor-Critic with weight 0.01. The learning rate for LSTM models was 0.0005, while for other architectures it was set to 0.00075. The hyperparameters were obtained during a limited hyperparameter sweep on a simpler version of the Indicator Maze environment. We trained A2C with a number of steps equal to the episode length (no truncated backprop). We trained the agent for 3000 steps, where each step consisted of a gradient obtained from 100 full episodes. The effective batch size was thus upper bounded by $5 0 0 * 1 0 0 = 5 0 0 0 0$ . We used multithreading to calculate the batch gradients efficiently. Each update step took on the order of 1-3 minutes depending on the number of threads available, meaning each agent took on the order of a week to train. ",
1253
+ "bbox": [
1254
+ 174,
1255
+ 353,
1256
+ 825,
1257
+ 492
1258
+ ],
1259
+ "page_idx": 12
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "The mazes were generated using an algorithm based on Depth-First Search. Once the completed fully-connected maze was generated, random walls were deleted with a probability $p$ . This $p$ probability was chosen at maze creation time and was sampled uniformly from between 0.0 and 0.6. Mazes were between size 4 to size 8. The size of a maze represents how many “cells” there are in the maze, where a cell is an area which can potentially have walls on each side. A set of 50 test maze geometries were sampled to act as a test set, and were made sure to never be sampled during training. These 50 test mazes were generated with $p = 0$ , so they represent the most difficult mazes seen during training due to their higher degree of partial-observability. Goal locations were sampled uniformly at random when the mazes are generated. ",
1264
+ "bbox": [
1265
+ 174,
1266
+ 498,
1267
+ 825,
1268
+ 625
1269
+ ],
1270
+ "page_idx": 12
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Indicator Maze Details: The indicator mazes used a curriculum approach to accelerate learning. In $50 \\%$ of the episodes sampled, only one goal existed in the environment and the indicator color matched the single goal color, making entering an incorrect goal impossible. This curriculum prevented the agents from learning to always enter a single color goal, which happened often when learning on only double goal environments. The test environments only used double goals. A reward of $+ 1$ was given to correct goal entry, and a negative reward of -1 was given to incorrect goal entry or episode terminating after a maximum number of time steps. These time steps depended on the maze size and were [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000]. ",
1275
+ "bbox": [
1276
+ 173,
1277
+ 631,
1278
+ 825,
1279
+ 757
1280
+ ],
1281
+ "page_idx": 12
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Repeating Maze Details We included the same curriculum as the indicator maze. Rewards were the same as the indicator maze. After the first time the agent reaches a goal, the red torch is shown at each subsequent episode (regardless of what the correct indicator was). Maximum time steps were again [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000]. ",
1286
+ "bbox": [
1287
+ 174,
1288
+ 763,
1289
+ 823,
1290
+ 833
1291
+ ],
1292
+ "page_idx": 12
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Minotaur Maze Details: For minotaur maze, a reward of $+ 0 . 5$ was given when reaching the randomly located goal and a reward of $+ 1 . 0$ was given when returning to the initial position. Episodes are terminated once the agent completes the return path, otherwise a negative reward of -1 is given if the agent exceeds the maximum number of steps. The maximum time steps were again [150, 250, 300, 400, 500] for maze sizes [4, 5, 6, 7, 8]. At test time, the maximum time steps were extended to [300, 500, 600, 800, 1000]. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 840,
1300
+ 825,
1301
+ 924
1302
+ ],
1303
+ "page_idx": 12
1304
+ },
1305
+ {
1306
+ "type": "table",
1307
+ "img_path": "images/39a5d4834fa9c5f46a1294b0e741925a9eaeb36d96bb1f9d746d2b5375d15943.jpg",
1308
+ "table_caption": [],
1309
+ "table_footnote": [],
1310
+ "table_body": "<table><tr><td rowspan=\"2\" colspan=\"2\">Agent Maze Size</td><td colspan=\"3\">Indicator</td><td colspan=\"3\">Repeating</td><td colspan=\"3\">Minotaur</td></tr><tr><td>4</td><td>5</td><td>6</td><td>4</td><td>5</td><td>6</td><td>4</td><td>5</td><td>6</td></tr><tr><td rowspan=\"2\">σ=0</td><td>Acc</td><td>88.4</td><td>84.4</td><td>79.3</td><td>1</td><td>1</td><td>1</td><td>97.3</td><td>89.0</td><td>62.0</td></tr><tr><td>Rew</td><td>-</td><td>1</td><td>1</td><td>9.47</td><td>9.91</td><td>5.91</td><td>1.46</td><td>1.34</td><td>0.93</td></tr><tr><td rowspan=\"2\">σ = 0.01</td><td>Acc</td><td>92.4</td><td>91.9</td><td>84.3</td><td>1</td><td>1</td><td>1</td><td>96.7</td><td>86.2</td><td>66.1</td></tr><tr><td>Rew</td><td>1</td><td>1</td><td>1</td><td>12.4</td><td>12.9</td><td>10.9</td><td>1.45</td><td>1.29</td><td>0.99</td></tr></table>",
1311
+ "bbox": [
1312
+ 210,
1313
+ 101,
1314
+ 787,
1315
+ 189
1316
+ ],
1317
+ "page_idx": 13
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Table 3: Results on the three 3D Doom maze tasks for the fixed-frame Neural Map with Controller LSTM. We can see that adding small compounding error does not largely affect the ability of the Neural Map to learn memory tasks and even has a beneficial effect for some tasks. Hyperparameters and architectures used were the same as presented in the main results. ",
1322
+ "bbox": [
1323
+ 173,
1324
+ 198,
1325
+ 826,
1326
+ 255
1327
+ ],
1328
+ "page_idx": 13
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "(Ego-)Neural Map Agent Details: For the global read operation, we used a convolutional network with 3 layers of 8 channels and kernel size 3. The strides were set to 1 on the first layer, and 2 to the second and third layers. Padding was 1 on the first layer and 0 on other layers. The 3 convolutional layers were then followed by a fully-connected layer of dimension 256 and then another fullyconnected layer of size 32. All activations were relu except the 32 dimension layer, which was set to tanh. The Neural Map itself was size $3 2 \\mathrm { x } 1 5 \\mathrm { x } 1 5$ . Positions were normalized so that the largest map size used all $1 5 \\mathrm { x } 1 5$ positions, while smaller mazes used a subset of the map. Additionally, during writing we split the 32 channels of the map into 8 channels per orientation (so if the agent is facing north, it writes only to the first 8 dimensions, if south, the next 8, and so on). ",
1333
+ "bbox": [
1334
+ 174,
1335
+ 287,
1336
+ 825,
1337
+ 412
1338
+ ],
1339
+ "page_idx": 13
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "LSTM Agent Details: The LSTM agent had a single 256-dimension LSTM layer on top of the state embedding. ",
1344
+ "bbox": [
1345
+ 173,
1346
+ 420,
1347
+ 821,
1348
+ 449
1349
+ ],
1350
+ "page_idx": 13
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "FRMQN Agent Details: Each past history state was 64-dimensional (32-dimensional key $\\pm \\ 3 2 .$ - dimensional value feature). Due to large matrix multiplies from storing the entire episode history, having larger feature sizes causes the attention operation to start becoming prohibitively expensive. ",
1355
+ "bbox": [
1356
+ 174,
1357
+ 455,
1358
+ 825,
1359
+ 497
1360
+ ],
1361
+ "page_idx": 13
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "D NEURAL MAP WITH DRIFT NOISE MODEL ",
1366
+ "text_level": 1,
1367
+ "bbox": [
1368
+ 174,
1369
+ 525,
1370
+ 560,
1371
+ 541
1372
+ ],
1373
+ "page_idx": 13
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "We did an additional experiment on the Neural Map that featured drift noise to simulate the effects of the agent using a local visual odometry model that had small error in predicting each frame-by-frame transformation. This is meant to represent a more realistic scenario (e.g. robotic navigation) where perfect localization is not feasible but a relatively accurate estimate can be provided, demonstrating the robustness of the architecture to noise. For example, we could assume the Neural Map is run in parallel with a SLAM algorithm which provides an estimate of the agent’s current position. ",
1378
+ "bbox": [
1379
+ 174,
1380
+ 560,
1381
+ 825,
1382
+ 645
1383
+ ],
1384
+ "page_idx": 13
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "To model this noise, we add a zero-mean gaussian random variable to the oracle position with a variance that depends on the current time-step. In more detail, the noise-corrupted positions $( \\hat { x } , \\hat { y } )$ in an $W \\times W$ size map provided to the Neural Map are: ",
1389
+ "bbox": [
1390
+ 174,
1391
+ 651,
1392
+ 823,
1393
+ 694
1394
+ ],
1395
+ "page_idx": 13
1396
+ },
1397
+ {
1398
+ "type": "equation",
1399
+ "img_path": "images/f81b412940d0378e45881e664941817353d545518add3177e6459967eb221fec.jpg",
1400
+ "text": "$$\n\\begin{array} { r l } & { ( \\hat { x } , \\hat { y } ) = ( \\operatorname* { m a x } \\{ \\operatorname* { m i n } \\{ \\lfloor x + \\epsilon _ { x } \\rfloor , W - 1 \\} , 0 \\} , \\operatorname* { m a x } \\{ \\operatorname* { m i n } \\{ \\lfloor y + \\epsilon _ { y } \\rfloor , W - 1 \\} , 0 \\} ) , } \\\\ & { \\epsilon _ { x } , \\epsilon _ { y } \\sim \\mathcal { N } ( 0 , \\sigma ^ { 2 } t ) } \\end{array}\n$$",
1401
+ "text_format": "latex",
1402
+ "bbox": [
1403
+ 238,
1404
+ 705,
1405
+ 759,
1406
+ 746
1407
+ ],
1408
+ "page_idx": 13
1409
+ },
1410
+ {
1411
+ "type": "text",
1412
+ "text": "This simulates the effect of an odometry algorithm which has independent zero-mean gaussian error with equal variance. This error compounds over time causing the variance to grow with the time step. We evaluate the Neural Map with noise $\\sigma = 1 / 1 0 0$ on smaller versions of the 3D Doom maze tasks (maze sizes [4, 5, 6]) and compare it to the version with perfect odometry. We train for 1500 steps of 100 episodes each step. Results are shown in Table 3. We can see that adding a small amount of error at each time step does not largely affect the results of the memory and can even benefit it, with some noticeable improvements on Indicator and Repeating tasks. It’s possible that the noise acts as a regularizer to speed up learning. For the Minotaur task, since positional information is important because the agent must remember the entire path taken, adding noise causes slight decrease in reward in mazes of size 4 and 5, but otherwise performance is very similar. Therefore this means that the Neural Map is likely to work in the case where a localization oracle is not available and instead only error-prone odometry is. ",
1413
+ "bbox": [
1414
+ 173,
1415
+ 757,
1416
+ 825,
1417
+ 924
1418
+ ],
1419
+ "page_idx": 13
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "We also plot some example trajectories to compare the effect of noise. We can see that the noise causes some slight aliasing in the position, which increases as time passes. The positions are quantized to a $1 5 \\times 1 5$ grid. ",
1424
+ "bbox": [
1425
+ 176,
1426
+ 103,
1427
+ 823,
1428
+ 146
1429
+ ],
1430
+ "page_idx": 14
1431
+ },
1432
+ {
1433
+ "type": "image",
1434
+ "img_path": "images/84779dc3af0ef8cc2512e5669cc80a83b8ac4eb6133c3594bfb79ca023c9ef39.jpg",
1435
+ "image_caption": [
1436
+ "Figure 3: Top: Noisy v.s. Groundtruth Position trajectory (quantized to a $1 5 \\times 1 5$ grid). As time progresses, the colors get lighter. Center: Neural Map cells addressed by the write operator under the noisy positions. Bottom: Neural Map cells that would have been written to under perfect position estimates. "
1437
+ ],
1438
+ "image_footnote": [],
1439
+ "bbox": [
1440
+ 205,
1441
+ 159,
1442
+ 794,
1443
+ 574
1444
+ ],
1445
+ "page_idx": 14
1446
+ },
1447
+ {
1448
+ "type": "text",
1449
+ "text": "E SAMPLES OF CONTEXT READ DISTRIBUTION ",
1450
+ "text_level": 1,
1451
+ "bbox": [
1452
+ 173,
1453
+ 102,
1454
+ 583,
1455
+ 118
1456
+ ],
1457
+ "page_idx": 15
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "E.1 2D ENVIRONMENT ",
1462
+ "text_level": 1,
1463
+ "bbox": [
1464
+ 176,
1465
+ 132,
1466
+ 348,
1467
+ 147
1468
+ ],
1469
+ "page_idx": 15
1470
+ },
1471
+ {
1472
+ "type": "text",
1473
+ "text": "To provide some insight into what the Neural Map learns, we show samples of the probability distribution given by the context read operation in a 2D maze example. We ran it on an example maze shown in Figure 4. In this figure, the top row of images are the agent observations, the center row are the fully observable mazes and the bottom row are the probability distributions over locations from the context operation, e.g. the $\\alpha _ { t } ^ { ( x , y ) }$ values defined by Eq. 2. In this maze, the indicator is blue, which indicates that the teal goal should be visited. We can see that once the agent sees the incorrect red goal, the context distribution faintly focuses on the map location where the agent had observed the indicator. On the other hand, when the agent first observes the correct teal goal, the location where the agent observed the indicator lights up brightly. This means that the agent is using its context retrieval operation to keep track of the landmark (the indicator) that it has previously seen. ",
1474
+ "bbox": [
1475
+ 173,
1476
+ 159,
1477
+ 825,
1478
+ 314
1479
+ ],
1480
+ "page_idx": 15
1481
+ },
1482
+ {
1483
+ "type": "image",
1484
+ "img_path": "images/f37c3d73963f794f333ce8aac652a9c3718f675657d2129200e4ba1807da78c9.jpg",
1485
+ "image_caption": [
1486
+ "Figure 4: A few sampled states from an example episode demonstrating how the agent learns to use the context addressing operation of the Neural Map. The top row of images is the observations made by the agent, the center is the fully observable mazes and the bottom image is the probability distributions over locations induced by the context operation at that step. "
1487
+ ],
1488
+ "image_footnote": [],
1489
+ "bbox": [
1490
+ 174,
1491
+ 323,
1492
+ 823,
1493
+ 707
1494
+ ],
1495
+ "page_idx": 15
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "E.2 3D ENVIRONMENT ",
1500
+ "text_level": 1,
1501
+ "bbox": [
1502
+ 176,
1503
+ 786,
1504
+ 348,
1505
+ 800
1506
+ ],
1507
+ "page_idx": 15
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "We draw some examples of the context addressing probability distribution in the 3D Doom environment in Figure 5 (allocentric) and Figure 6 (egocentric). We can see that the Neural Map learns to use its context addressing operator to retrieve the indicator torch identity, until it sees the correct corresponding tower. Once it sees the correct tower there is a shift in how the agent uses the map and the probability map seems to invert, addressing the parts of the map that were unexplored. This effect is consistent in both allocentric and egocentric variants. This might be because the Neural Map variant used on Doom had an internal LSTM which could enable it to remember the indicator identity for the short amount of time it took to walk up to the goal. ",
1512
+ "bbox": [
1513
+ 174,
1514
+ 811,
1515
+ 825,
1516
+ 924
1517
+ ],
1518
+ "page_idx": 15
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "Indicator Prediction To determine whether the Neural Map was accurately storing the indicator identity within its memory, we train a logistic regression model on memory vectors sampled over 75 episodes. We then attempt to predict the indicator on a held-out set of 25 episodes by taking the max prediction over all positions of the memory at the end of the episode. We can see that a simple logistic regression is capable of recovering the indicator in $100 \\%$ of the episodes, showing that the indicator identity can be easily extracted from, e.g., the context operator. ",
1523
+ "bbox": [
1524
+ 173,
1525
+ 103,
1526
+ 825,
1527
+ 188
1528
+ ],
1529
+ "page_idx": 16
1530
+ },
1531
+ {
1532
+ "type": "table",
1533
+ "img_path": "images/bc25c3d69e0cb03e0f3d693dbec51f4c9957f084a1d42ec35c802feb63af7690.jpg",
1534
+ "table_caption": [],
1535
+ "table_footnote": [],
1536
+ "table_body": "<table><tr><td>Agent</td><td>Indicator Accuracy</td></tr><tr><td>Controller NMap</td><td>100%</td></tr><tr><td>Controller Ego-NMap</td><td>100%</td></tr></table>",
1537
+ "bbox": [
1538
+ 341,
1539
+ 200,
1540
+ 653,
1541
+ 246
1542
+ ],
1543
+ "page_idx": 16
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "Table 4: Figure showing accuracy of a logistic model to determine indicator identity from the stored Neural Map features. ",
1548
+ "bbox": [
1549
+ 171,
1550
+ 255,
1551
+ 823,
1552
+ 284
1553
+ ],
1554
+ "page_idx": 16
1555
+ },
1556
+ {
1557
+ "type": "image",
1558
+ "img_path": "images/c8737215b5e2340ede5c54756af4aab06bafee71e94f71c7ba6af7ecd67225c8.jpg",
1559
+ "image_caption": [
1560
+ "Figure 5: Three example episodes of the (allocentric) context addressing operator on Doom mazes. The top images of each row are the RGB inputs the agent sees, the center images are a top-down representation of the maze, and the bottom images are the $\\alpha _ { t } ^ { ( x , y ) }$ of the context operation. "
1561
+ ],
1562
+ "image_footnote": [],
1563
+ "bbox": [
1564
+ 178,
1565
+ 80,
1566
+ 908,
1567
+ 954
1568
+ ],
1569
+ "page_idx": 17
1570
+ },
1571
+ {
1572
+ "type": "image",
1573
+ "img_path": "images/757865053b472780e55b9e68d9a4bc5550b3e2745354499fdbcb397ce5c372ae.jpg",
1574
+ "image_caption": [
1575
+ "Figure 6: Three example episodes of the (egocentric) context addressing operator on Doom mazes. The top images of each row are the RGB inputs the agent sees, the center images are a top-down representation of the maze, and the bottom images are the (egocentric) $\\alpha _ { t } ^ { ( x , y ) }$ of the context operation. "
1576
+ ],
1577
+ "image_footnote": [],
1578
+ "bbox": [
1579
+ 178,
1580
+ 69,
1581
+ 908,
1582
+ 954
1583
+ ],
1584
+ "page_idx": 18
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "F BACKTRACKING ",
1589
+ "text_level": 1,
1590
+ "bbox": [
1591
+ 176,
1592
+ 102,
1593
+ 344,
1594
+ 118
1595
+ ],
1596
+ "page_idx": 19
1597
+ },
1598
+ {
1599
+ "type": "text",
1600
+ "text": "We also explored whether the allocentric and egocentric Neural Maps were capable of using their memories in order to do backtracking, i.e. re-visiting unexplored areas of the maze. To measure this, we developed a variant of the Indicator Maze where the goal states were removed. We want to measure how much of the maze is explored by the agent under this setting where there are no terminal states. To measure how much of the maze was explored, we quantized the 50 test mazes into 11 discrete positions and counted how many of the quantized positions the agent visited. We report results below in Table 5 ",
1601
+ "bbox": [
1602
+ 173,
1603
+ 132,
1604
+ 825,
1605
+ 231
1606
+ ],
1607
+ "page_idx": 19
1608
+ },
1609
+ {
1610
+ "type": "table",
1611
+ "img_path": "images/0c9d7511cf29fc77449aa12eb6eb70ae8f992b70cdf157eda3569175fdea76a0.jpg",
1612
+ "table_caption": [],
1613
+ "table_footnote": [],
1614
+ "table_body": "<table><tr><td>Agent</td><td>Visitation Score</td></tr><tr><td>Controller NMap</td><td>71.6%</td></tr><tr><td>Controller Ego-NMap LSTM</td><td>77.6% 68.5%</td></tr></table>",
1615
+ "bbox": [
1616
+ 354,
1617
+ 243,
1618
+ 638,
1619
+ 303
1620
+ ],
1621
+ "page_idx": 19
1622
+ },
1623
+ {
1624
+ "type": "text",
1625
+ "text": "Table 5: Visitation scores of the Neural Map models which measure how much of a maze is explored within a set time limit. We can see that the egocentric neural map explores more of the mazes than the allocentric model, exploring on average $7 7 . 6 \\%$ of the test mazes. The allocentric neural map explores $7 1 . 6 \\%$ of the test mazes. The LSTM is reported to provide a point of comparison. ",
1626
+ "bbox": [
1627
+ 173,
1628
+ 313,
1629
+ 826,
1630
+ 369
1631
+ ],
1632
+ "page_idx": 19
1633
+ }
1634
+ ]
parse/train/Bk9zbyZCZ/Bk9zbyZCZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bk9zbyZCZ/Bk9zbyZCZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkgWHnR5tm/BkgWHnR5tm.md ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL GRAPH EVOLUTION: TOWARDS EFFICIENT AUTOMATIC ROBOT DESIGN
2
+
3
+ Tingwu Wang1,2∗, Yuhao Zhou1,2∗, Sanja Fidler1,2,3 & Jimmy $\mathbf { B a } ^ { 1 , 2 }$
4
+
5
+ 1 Department of Computer Science, University of Toronto
6
+ 2 Vector Institute
7
+ 3 NVIDIA
8
+ {tingwuwang,henryzhou,fidler,jba}@cs.toronto.e
9
+
10
+ # ABSTRACT
11
+
12
+ Despite the recent successes in robotic locomotion control, the design of robots, i.e., the design of their body structure, still heavily relies on human engineering. Automatic robot design has been a long studied subject, however, progress has been slow due to large combinatorial search space and the difficulty to efficiently evaluate the candidate structures. Note that one needs to both, search over many possible body structures, and choose among them based on how the robot with that structure performs in an environment. The latter means training an optimal controller given a candidate structure, which in itself is costly to obtain. In this paper, we propose Neural Graph Evolution (NGE), which performs evolutionary search in graph space, by iteratively evolving graph structures using simple mutation primitives. Key to our approach is to parameterize the control policies with graph neural networks, which allows us to transfer skills from previously evaluated designs during the graph search. This significantly reduces evaluation cost of new candidates and makes the search process orders of magnitude more efficient than that of past work. In addition, NGE applies Graph Mutation with Uncertainty (GM-UC) by incorporating model uncertainty, which reduces the search space by balancing exploration and exploitation. We show that NGE significantly outperforms previous methods in terms of convergence rate and final performance. As shown in experiments, NGE is the first algorithm that can automatically discover kinematically preferred robotic graph structures, such as a fish with two symmetric flat side-fins and a tail, or a cheetah with athletic front and back legs. NGE is extremely efficient, it finds plausible robotic structures within a day on a single 64 CPU-core Amazon EC2 machine.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ The goal of robot design is to find an optimal body structure and its means of locomotion to best achieve a given objective in an environment. Robot design often relies on careful human-engineering and expert knowledge. The field of automatic robot design aims to search for these structures automatically. This has been a long-studied subject, however, with limited success. There are two major challenges: 1) the search space of all possible designs is large and combinatorial, and 2) the evaluation of each design requires learning or testing a separate optimal controller that is often expensive to obtain.
17
+
18
+ In (Sims, 1994), the authors evolved creatures with 3D-blocks. Recently, soft robots have been studied in (Joachimczak et al., 2014), which were evolved by adding small cells connected to the old ones. In (Cheney et al., 2014), the 3D voxels were treated as the minimum element of the robot. Most evolutionary robots (Duff et al., 2001; Neri, 2010) require heavy engineering of the initial structures, evolving rules and careful human-guidance. Due to the combinatorial nature of the problem, evolutionary, genetic or random structure search have been the de facto algorithms of automatic robot design in the pioneering works (Sims, 1994; Steels, 1993; Mitchell & Forrest, 1994; Langton, 1997; Lee, 1998; Taylor, 2017; Calandra et al., 2016). In terms of the underlying algorithm, most of these works have a similar population-based optimization loop to the one used in (Sims, 1994). None of these algorithms are able to evolve kinematically reasonable structures, as a result of large search space and the inefficient evaluation of candidates.
19
+
20
+ Similar in vein to automatic robot design, automatic neural architecture search also faces a large combinatorial search space and difficulty in evaluation. There have been several approaches to tackle these problems. Bayesian optimization approaches (Snoek et al., 2012) primarily focus on fine-tuning the number of hidden units and layers from a predefined set. Reinforcement learning (Zoph & Le, 2016) and genetic algorithms (Liu et al., 2017) are studied to evolve recurrent neural networks (RNNs) and convolutional neural networks (CNNs) from scratch in order to maximize the validation accuracy. These approaches are computationally expensive because a large number of candidate networks have to be trained from grounds up. (Pham et al., 2018) and (Stanley & Miikkulainen, 2002) propose weight sharing among all possible candidates in the search space to effectively amortize the inner loop training time and thus speed up the architecture search. A typical neural architecture search on ImageNet (Krizhevsky et al., 2012) takes 1.5 days using 200 GPUs (Liu et al., 2017).
21
+
22
+ In this paper, we propose an efficient search method for automatic robot design, Neural Graph Evolution (NGE), that co-evolves both, the robot design and the control policy. Unlike the recent reinforcement learning work, where the control policies are learnt on specific robots carefully designed by human experts (Mnih et al., 2013; Bansal et al., 2017; Heess et al., 2017), NGE aims to adapt the robot design along with policy learning to maximize the agent’s performance. NGE formulates automatic robot design as a graph search problem. It uses a graph as the main backbone of rich design representation and graph neural networks (GNN) as the controller. This is key in order to achieve efficiency of candidate structure evaluation during evolutionary graph search. Similar to previous algorithms like (Sims, 1994), NGE iteratively evolves new graphs and removes graphs based on the performance guided by the learnt GNN controller. The specific contributions of this paper are as follows:
23
+
24
+ • We formulate the automatic robot design as a graph search problem.
25
+ • We utilize graph neural networks (GNNs) to share the weights between the controllers, which greatly reduces the computation time needed to evaluate each new robot design.
26
+ • To balance exploration and exploitation during the search, we developed a mutation scheme that incorporates model uncertainty of the graphs.
27
+
28
+ We show that NGE automatically discovers robot designs that are comparable to the ones designed by human experts in MuJoCo (Todorov et al., 2012), while random graph search or naive evolutionary structure search (Sims, 1994) fail to discover meaningful results on these tasks.
29
+
30
+ # 2 BACKGROUND
31
+
32
+ # 2.1 REINFORCEMENT LEARNING
33
+
34
+ In reinforcement learning (RL), the problem is usually formulated as a Markov Decision Process (MDP). The infinite-horizon discounted MDP consists of a tuple of $( S , { \mathcal { A } } , \gamma , P , R )$ , respectively the state space, action space, discount factor, transition function, and reward function. The objective of the agent is to maximize the total expected reward $\begin{array} { r } { J ( \theta ) = \mathbb { E } _ { \pi } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , a _ { t } ) \right] } \end{array}$ , where the state transition follows the distribution $\bar { P ( } s _ { t + 1 } | s _ { t } , a _ { t } )$ . Here, $s _ { t }$ and $a _ { t }$ denotes the state and action at time step $t$ , and $r ( s _ { t } , a _ { t } )$ is the reward function. In this paper, to evaluate each robot structure, we use PPO to train RL agents (Schulman et al., 2017; Heess et al., 2017). PPO uses a neural network parameterized as $\pi _ { \boldsymbol { \theta } } ( a _ { t } | \boldsymbol { s } _ { t } )$ to represent the policy, and adds a penalty for the KL-divergence between the new and old policy to prevent over-optimistic updates. PPO optimizes the following surrogate objective function instead:
35
+
36
+ $$
37
+ J _ { \mathrm { P P O } } ( \theta ) = \mathbb { E } _ { \pi _ { \theta } } \left[ \sum _ { t = 0 } ^ { \infty } A ^ { t } ( s _ { t } , a _ { t } ) r ^ { t } ( s _ { t } , a _ { t } ) \right] - \beta \operatorname { K L } \left[ \pi _ { \theta } ( : | s _ { t } ) | \pi _ { \theta _ { o l d } } ( : | s _ { t } ) \right] .
38
+ $$
39
+
40
+ We denote the estimate of the expected total reward given the current state-action pair, the value and the advantage functions, as $Q ^ { t } ( s _ { t } , a _ { t } )$ , $V ( s _ { t } )$ and $A ^ { t } ( s _ { t } , a _ { t } )$ respectively. PPO solves the problem by iteratively generating samples and optimizing $J _ { \mathrm { P P O } }$ (Schulman et al., 2017).
41
+
42
+ ![](images/2e9d715889591cf252e6b0c04ff94ec1f8941b9176793190fb0966ecbd604957.jpg)
43
+ Figure 1: In NGE, several mutation operations are allowed. By using Policy Sharing, child species reuse weights from parents, even if the graphs are different. The same color indicates shared and reused weights. For better visualization, we only plot the sharing of propagation model (yellow curves).
44
+
45
+ # 2.2 GRAPH NEURAL NETWORK
46
+
47
+ Graph Neural Networks (GNNs) are suitable for processing data in the form of graph (Bruna et al., 2014; Defferrard et al., 2016; Li et al., 2015; Kipf & Welling, 2017; Duvenaud et al., 2015; Henaff et al., 2015). Recently, the use of GNNs in locomotion control has greatly increased the transferability of controllers (Wang et al., 2018). A GNN operates on a graph whose nodes and edges are denoted respectively as $u \in V$ and $e \in E$ . We consider the following GNN, where at timestep $t$ each node in GNN receives an input feature and is supposed to produce an output at a node level.
48
+
49
+ Input Model: The input feature for node $u$ is denoted as $x _ { u } ^ { t }$ . $x _ { u } ^ { t }$ is a vector of size $d$ , where $d$ is the size of features. In most cases, $x _ { u } ^ { t }$ is produced by the output of an embedding function used to encode information about $u$ into $d$ -dimensional space.
50
+
51
+ Propagation Model: Within each timestep $t$ , the GNN performs $\tau$ internal propagations, so that each node has global (neighbourhood) information. In each propagation, every node communicates with its neighbours, and updates its hidden state by absorbing the input feature and message. We denote the hidden state at the internal propagation step $\tau$ $( \tau \leq \tau )$ as $h _ { u } ^ { t , \tau }$ . Note that $h _ { u } ^ { t , 0 }$ is usually initialized as $h _ { u } ^ { t - 1 , T }$ , i.e., the final hidden state in the previous time step. $\cdot _ { h ^ { 0 , 0 } }$ is usually initialized to zeros. The message that $u$ sends to its neighbors is computed as
52
+
53
+ $$
54
+ m _ { u } ^ { t , \tau } = M ( h _ { u } ^ { t , \tau - 1 } ) ,
55
+ $$
56
+
57
+ where $M$ is the message function. To compute the updated $h _ { u } ^ { t , \tau }$ , we use the following equations:
58
+
59
+ $$
60
+ r _ { u } ^ { t , \tau } = R ( \{ m _ { v } ^ { t , \tau } | \forall v \in \mathcal { N } _ { G } ( u ) \} ) , h _ { u } ^ { t , \tau } = U ( h _ { u } ^ { t , \tau - 1 } , ( r _ { u } ^ { t , \tau } ; x _ { u } ^ { t } ) )
61
+ $$
62
+
63
+ where $R$ and $U$ are the message aggregation function and the update function respectively, and $\mathcal { N } _ { G } ( u )$ denotes the neighbors of $u$ .
64
+
65
+ Output Model: Output function $F$ takes input the node’s hidden states after the last internal propagation. The node-level output for node $u$ is therefore defined as $\mu _ { u } ^ { t } = F ( h _ { u } ^ { t , T } )$ .
66
+
67
+ Functions $M , R , U , F$ in GNNs can be trainable neural networks or linear functions. For details of GNN controllers, we refer readers to (Wang et al., 2018).
68
+
69
+ # 3 NEURAL GRAPH EVOLUTION
70
+
71
+ In robotics design, every component, including the robot arms, finger and foot, can be regarded as a node. The connections between the components can be represented as edges. In locomotion control, the robotic simulators like MuJoCo (Todorov et al., 2012) use an XML file to record the graph of the robot. As we can see, robot design is naturally represented by a graph. To better illustrate Neural Graph Evolution (NGE), we first introduce the terminology and summarize the algorithm.
72
+
73
+ Graph and Species. We use an undirected graph $\mathcal { G } = ( V , E , A )$ to represent each robotic design. $V$ and $E$ are the collection of physical body nodes and edges in the graph, respectively. The mapping
74
+
75
+ # Algorithm 1 Neural Graph Evolution
76
+
77
+ <table><tr><td>1: Initialize generation P°←{(0,G)}1</td><td></td></tr><tr><td>2:while Evolving jth generation do</td><td>Evolution outer loop</td></tr><tr><td>3: for ith species (0²,G) ∈ Pj do</td><td> Species fitness inner loop</td></tr><tr><td>4: 0j+1←Update(0)</td><td>Train policy network</td></tr><tr><td>5: S←s(0+1,G)</td><td>Evaluate fitness</td></tr><tr><td>6: end for</td><td></td></tr><tr><td>7: pj+1←Pj\{(0k,Sk) ∈Pj,∀k ∈ argminx({Si})}.</td><td>Remove worst K species</td></tr><tr><td>P ←{(0h,9h =M(Gh,p)), whereGh,p ~ Uniform(Pj+1)}h=1 8:</td><td>Mutate from survivors</td></tr><tr><td>9: pj+1 √ pj+1 U{(0k,9k) ∈P, ∀k ∈ argmaxx({ξp(Gh)})}. 10: end while</td><td>Pruning</td></tr></table>
78
+
79
+ $A : V \Lambda$ maps the node $u \in V$ to its structural attributes $A ( u ) \in \Lambda$ , where $\Lambda$ is the attributes space. For example, the fish in Figure 1 consists of a set of ellipsoid nodes, and vector $A ( u )$ describes the configurations of each ellipsoid. The controller is a policy network parameterized by weights $\theta$ The tuple formed by the graph and the policy is defined as a species, denoted as $\Omega = ( \mathcal { G } , \theta )$ .
80
+
81
+ Generation and Policy Sharing. In the $j$ -th iteration, NGE evaluates a pool of species called a generation, denoted as $P ^ { j } = \{ ( \mathcal { G } _ { i } ^ { j } , \theta _ { i } ^ { j } ) , \forall i = 1 , 2 , . . . , \mathcal { N } \}$ , where $\mathcal { N }$ is the size of the generation. In NGE, the search space includes not only the graph space, but also the weight or parameter space of the policy network. For better efficiency of NGE, we design a process called Policy Sharing (PS), where weights are reused from parent to child species. The details of PS is described in Section 3.4.
82
+
83
+ Our model can be summarized as follows. NGE performs population-based optimization by iterating among mutation, evaluation and selection. The objective and performance metric of NGE are introduced in Section 3.1. In NGE, we randomly initialize the generation with $\mathcal { N }$ species. For each generation, NGE trains each species and evaluates their fitness separately, the policy of which is described in Section 3.2. During the selection, we eliminate $\kappa$ species with the worst fitness. To mutate $\kappa$ new species from surviving species, we develop a novel mutation scheme called Graph Mutation with Uncertainty (GM-UC), described in Section 3.3, and efficiently inherit policies from the parent species by Policy Sharing, described in Section 3.4. Our method is outlined in Algorithm 1.
84
+
85
+ # 3.1 AMORTIZED FITNESS AND OBJECTIVE FUNCTION
86
+
87
+ Fitness represents the performance of a given $\mathcal { G }$ using the optimal controller parameterized with $\theta ^ { * } ( { \mathcal { G } } )$ . However, $\overleftarrow { \theta ^ { * } } ( \mathcal G )$ is impractical or impossible to obtain for the following reasons. First, each design is computationally expensive to evaluate. To evaluate one graph, the controller needs to be trained and tested. Model-free (MF) algorithms could take more than one million in-game timesteps to train a simple 6-degree-of-freedom cheetah (Schulman et al., 2017), while model-based (MB) controllers usually require much more execution time, without the guarantee of having higher performance than MF controllers (Tassa et al., 2012; Nagabandi et al., 2017; Drews et al., 2017; Chua et al., 2018). Second, the search in robotic graph space can easily get stuck in local-optima. In robotic design, local-optima are difficult to detect as it is hard to tell whether the controller has converged or has reached a temporary optimization plateau. Learning the controllers is a computation bottleneck in optimization.
88
+
89
+ In population-based robot graph search, spending more computation resources on evaluating each species means that fewer different species can be explored. In our work, we enable transferablity between different topologies of NGE (described in Section 3.2 and 3.4). This allows us to introduce amortized fitness (AF) as the objective function across generations for NGE. AF is defined in the following equation as,
90
+
91
+ $$
92
+ \xi ( \mathcal { G } , \boldsymbol { \theta } ) = \mathbb { E } _ { \pi _ { \boldsymbol { \theta } } , \mathcal { G } } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , a _ { t } ) \right] .
93
+ $$
94
+
95
+ In NGE, the mutated species continues the optimization by initializing the parameters with the parameters inherited from its parent species. In past work (Sims, 1994), species in one generation are trained separately for a fixed number of updates, which is biased and potentially undertrained or
96
+
97
+ overtrained. In next generations, new species have to discard old controllers if the graph topology is different, which might waste valuable computation resources.
98
+
99
+ # 3.2 POLICY REPRESENTATION
100
+
101
+ Given a species with graph $\mathcal { G }$ , we train the parameters $\theta$ of policy network $\pi _ { \theta } ( a ^ { t } | s ^ { t } )$ using reinforcement learning. Similar to (Wang et al., 2018), we use a GNN as the policy network of the controller. A graphical representation of our model is shown in Figure 1. We follow notation in Section 2.2.
102
+
103
+ For the input model, we parse the input state vector $s ^ { t }$ obtained from the environment into a graph, where each node $u \in V$ fetches the corresponding observation $o ( u , t )$ from $s ^ { t }$ , and extracts the feature $x _ { u } ^ { O , t }$ with an embedding function $\Phi$ . We also encode the attribute information $A ( u )$ into $x _ { u } ^ { A }$ with an embedding function denoted as $\zeta$ . The input feature $x _ { u } ^ { t }$ is thus calculated as:
104
+
105
+ $$
106
+ \begin{array} { r } { x _ { u } ^ { O , t } = \Phi ( o ( u , t ) ) , ~ x _ { u } ^ { A } = \zeta ( A ( u ) ) , } \\ { x _ { u } ^ { t } = [ x _ { u } ^ { O , t } ; x _ { u } ^ { A } ] , ~ } \end{array}
107
+ $$
108
+
109
+ where $[ . ]$ denotes concatenation. We use $\theta _ { \Phi } , \theta _ { \zeta }$ to denote the weights of embedding functions.
110
+
111
+ The propagation model is described in Section 2.2. We recap the propagation model here briefly: Initial hidden state for node $u$ is denoted as $h _ { u } ^ { t , 0 }$ , which are initialized from hidden states from the last timestep $h _ { u } ^ { t - 1 , T }$ or simply zeros. $\tau$ internal propagation steps are performed for each timestep, during each step (denoted as $\tau \leq \tau \}$ ) of which, every node sends messages to its neighboring nodes, and aggregates the received messages. $h _ { u } ^ { t , \tau + 1 }$ is calculated by an update function that takes in $h _ { u } ^ { t , \tau }$ , node input feature $x _ { u } ^ { t }$ and aggregated message $m _ { u } ^ { t , \tau }$ . We use summation as the aggregation function and a GRU (Chung et al., 2014) as the update function.
112
+
113
+ For the output model, we define the collection of controller nodes as $\mathcal { F }$ , and define Gaussian distributions on each node’s controller as follows:
114
+
115
+ $$
116
+ \begin{array} { r } { \forall u \in \mathcal { F } , ~ \mu _ { u } ^ { t } = F _ { \mu } ( h _ { u } ^ { t , T } ) , } \\ { \sigma _ { u } ^ { t } = F _ { \sigma } ( h _ { u } ^ { t , T } ) , } \end{array}
117
+ $$
118
+
119
+ where $\mu _ { u }$ and $\sigma _ { u }$ are the mean and the standard deviation of the action distribution. The weights of output function are denoted as $\theta _ { F }$ . By combining all the actions produced by each node controller, we have the policy distribution of the agent:
120
+
121
+ $$
122
+ \pi ( a ^ { t } | s ^ { t } ) = \prod _ { u \in \mathcal { F } } \pi _ { u } ( a _ { u } ^ { t } | s ^ { t } ) = \prod _ { u \in \mathcal { F } } \frac { 1 } { \sqrt { 2 \pi ( \sigma _ { u } ^ { t } ) ^ { 2 } } } \mathrm { e x p } \left( \frac { ( a _ { u } ^ { t } - \mu _ { u } ^ { t } ) ^ { 2 } } { 2 ( \sigma _ { u } ^ { t } ) ^ { 2 } } \right)
123
+ $$
124
+
125
+ We optimize $\pi ( \boldsymbol { a } ^ { t } | \boldsymbol { s } ^ { t } )$ with PPO, the details of which are provided in Appendix A.
126
+
127
+ # 3.3 GRAPH MUTATION WITH UNCERTAINTY
128
+
129
+ Between generations, the graphs evolve from parents to children. We allow the following basic operations as the mutation primitives on the parent’s graph $\mathcal { G }$ :
130
+
131
+ $\mathcal { M } _ { 1 }$ , Add-Node: In the $\mathcal { M } _ { 1 }$ (Add-Node) operation, the growing of a new body part is done by sampling a node $v \in V$ from the parent, and append a new node $u$ to it. We randomly initialize $u$ ’s attributes from an uniform distribution in the attribute space.
132
+
133
+ $\mathcal { M } _ { 2 }$ , Add-Graph: The $\mathcal { M } _ { 2 }$ (Add-Graph) operation allows for faster evolution by reusing the subtrees in the graph with good functionality. We sample a sub-graph or leaf node $\bar { \mathcal { G } } ^ { \prime } = ( \bar { V ^ { \prime } } , E ^ { \prime } , A ^ { \prime } )$ from the current graph, and a placement node $u \in V ( { \mathcal { G } } )$ to which to append $\mathcal { G } ^ { \prime }$ . We randomly mirror the attributes of the root node in $\mathcal { G } ^ { \prime }$ to incorporate a symmetry prior.
134
+
135
+ $\mathcal { M } _ { 3 }$ , Del-Graph: The process of removing body parts is defined as $\mathcal { M } _ { 3 }$ (Del-Graph) operation. In this operation, a sub-graph $\mathcal { G } ^ { \prime }$ from $\mathcal { G }$ is sampled and removed from $\mathcal { G }$ .
136
+
137
+ $\mathcal { M } _ { 4 }$ , Pert-Graph: In the $\mathcal { M } _ { 4 }$ (Pert-Graph) operation, we randomly sample a sub-graph $\mathcal { G } ^ { \prime }$ and recursively perturb the parameter of each node $u \in V ( \mathcal { G } ^ { \prime } )$ by adding Gaussian noise to $A ( u )$ .
138
+
139
+ We visualize a pair of example fish in Figure 1. The fish in the top-right is mutated from the fish in the top-left by applying $\mathcal { M } _ { 1 }$ . The new node (2) is colored magenta in the figure. To mutate each new candidate graph, we sample the operation $\mathcal { M }$ and apply $\mathcal { M }$ on $\mathcal { G }$ as
140
+
141
+ $$
142
+ \mathcal { G } ^ { \prime } = \mathcal { M } ( \mathcal { G } ) , \mathrm { w h e r e } \mathcal { M } \in \{ \mathcal { M } _ { l } , l = 1 , 2 , 3 , 4 \} , \ : \mathrm { P } ( \mathcal { M } = \mathcal { M } _ { l } ) = p _ { m } ^ { l } .
143
+ $$
144
+
145
+ $p _ { m } ^ { l }$ is the probability of sampling each operation with $\begin{array} { r } { \sum _ { l } p _ { m } ^ { l } = 1 } \end{array}$
146
+
147
+ To facilitate evolution, we want to avoid wasting computation resources on species with low expected fitness, while encouraging NGE to test species with high uncertainty. We again employ a GNN to predict the fitness of the graph $\mathcal { G }$ , denoted as $\xi _ { P } ( \mathcal G )$ . The weights of this GNN are denoted as $\psi$ . In particular, we predict the AF score with a similar propagation model as our policy network, but the observation feature is only $x _ { u } ^ { A }$ , i.e., the embedding of the attributes. The output model is a graph-level output (as opposed to node-level used in our policy), regressing to the score $\xi$ . After each generation, we train the regression model using the L2 loss.
148
+
149
+ However, pruning the species greedily may easily overfit the model to the existing species since there is no modeling of uncertainty. We thus propose Graph Mutation with Uncertainty (GM-UC) based on Thompson Sampling to balance between exploration and exploitation. We denote the dataset of past species and their AF score as $\mathcal { D }$ . GM-UC selects the best graph candidates by considering the posterior distribution of the surrogate $P \left( \psi | \mathcal { D } \right)$ :
150
+
151
+ $$
152
+ \mathcal { G } ^ { * } = \arg \operatorname* { m a x } _ { \mathcal { G } } \mathbb { E } _ { P \left( \psi \left| \mathcal { D } \right. \right]} \left[ \xi _ { P } \left( \mathcal { G } \right| \psi \right) .
153
+ $$
154
+
155
+ Instead of sampling the full model with $\widetilde { \psi } \sim P \left( \psi | \mathcal { D } \right)$ , we follow Gal & Ghahramani (2016) and perform dropout during inference, which can be viewed as an approximate sampling from the model posterior. At the end of each generation, we randomly mutate ${ \mathcal { C } } \geq { \mathcal { N } }$ new species from surviving species. We then sample a single dropout mask for the surrogate model and only keep $\mathcal { N }$ species with highest $\xi _ { P }$ . The details of GM-UC are given in Appendix F.
156
+
157
+ # 3.4 RAPID ADAPTATION USING POLICY SHARING
158
+
159
+ To leverage the transferability of GNNs across different graphs, we propose Policy Sharing (PS) to reuse old weights from parent species. The weights of a species in NGE are as follows:
160
+
161
+ $$
162
+ \theta _ { G } = ( \theta _ { \Phi } , \theta _ { \zeta } , \theta _ { M } , \theta _ { U } , \theta _ { F } ) ,
163
+ $$
164
+
165
+ where $\theta _ { \Phi } , \theta _ { \zeta } , \theta _ { M } , \theta _ { U } , \theta _ { F }$ are the weights for the models we defined earlier in Section 3.2 and 2.2. Since our policy network is based on GNNs, as we can see from Figure 1, model weights of different graphs share the same cardinality (shape). A different graph will only alter the paths of message propagation. With PS, new species are provided with a strong weight initialization, and the evolution will less likely be dominated by species that are more ancient in the genealogy tree.
166
+
167
+ Previous approaches including naive evolutionary structure search (ESS-Sims) (Sims, 1994) or random graph search (RGS) utilize human-engineered one-layer neural network or a fully connected network, which cannot reuse controllers once the graph structure is changed, as the parameter space for $\theta$ might be different. And even when the parameters happen to be of the same shape, transfer learning with unstructured policy controllers is still hardly successful (Rajeswaran et al., 2017). We denote the old species in generation $j$ , and its mutated species with different topologies as $( \theta _ { B } ^ { j } , \mathcal { G } )$ , $( \theta _ { B } ^ { j + 1 } , \mathcal { G } ^ { \prime } )$ in baseline algorithm ESS-Sims and RGS, and $( \theta _ { G } ^ { j } , \mathcal { G } )$ , $( \theta _ { G } ^ { j + 1 } , \mathcal { G } ^ { \prime } )$ for NGE. We also denote the network initialization scheme for fully-connected networks as $\boldsymbol { B }$ . We show the parameter reuse between generations in Table 1.
168
+
169
+ <table><tr><td rowspan=1 colspan=1>Algorithm</td><td rowspan=1 colspan=1>Mutation</td><td rowspan=1 colspan=1>Parameter Space</td><td rowspan=1 colspan=1>Policy Initialization</td></tr><tr><td rowspan=1 colspan=1>ESS-Sims, RGSNGE</td><td rowspan=1 colspan=1>g→g&#x27;g→g&#x27;</td><td rowspan=1 colspan=1>{0B(9)}n {0B(S&#x27;)}=0{0G(9)}={0G(S&#x27;)}</td><td rowspan=1 colspan=1>B(&#x27;),, 0 not reused01</td></tr></table>
170
+
171
+ Table 1: Parameter reuse between species and its mutated children if the topologies are different.
172
+
173
+ ![](images/38bc5764a077404c9112cc83437462191878af34cc741069550675015886ee62.jpg)
174
+ Figure 2: The performance of the graph search for RGS, ES and NGE. The figures on are the example creatures obtained from each of the method. The graph structure next to the figure are the corresponding graph structure. We included the original species for reference.
175
+
176
+ # 4 EXPERIMENTS
177
+
178
+ In this section, we demonstrate the effectiveness of NGE on various evolution tasks. In particular, we evaluate both, the most challenging problem of searching for the optimal body structure from scratch in Section 4.1, and also show a simpler yet useful problem where we aim to optimize humanengineered species in Section 4.2 using NGE. We also provide an ablation study on GM-UC in Section 4.3, and an ablation study on computational cost or generation size in Section 4.4.
179
+
180
+ Our experiments are simulated with MuJoCo. We design the following environments to test the algorithms. Fish Env: In the fish environment, graph consists of ellipsoids. The reward is the swimming-speed along the $y$ -direction. We denote the reference human-engineered graph (Tassa et al., 2018) as $\mathcal { G } _ { F }$ . Walker Env: We also define a 2D environment walker constructed by cylinders, where the goal is to move along $x$ -direction as fast as possible. We denote the reference humanengineered walker as $\mathcal { G } _ { W }$ and cheetah as $\mathcal { G } _ { C }$ (Tassa et al., 2018). To validate the effectiveness of NGE, baselines including previous approaches are compared. We do a grid search on the hyper-parameters as summarized in Appendix E, and show the averaged curve of each method. The baselines are introduced as follows:
181
+
182
+ ESS-Sims: This method was proposed in (Sims, 1994), and applied in (Cheney et al., 2014; Taylor, 2017), which has been the most classical and successful algorithm in automatic robotic design. In the original paper, the author uses evolutionary strategy to train a human-engineered one layer neural network, and randomly perturbs the graph after each generation. With the recent progress of robotics and reinforcement learning, we replace the network with a 3-layer Multilayer perceptron and train it with PPO instead of evolutionary strategy.
183
+
184
+ ESS-Sims-AF: In the original ESS-Sims, amortized fitness is not used. Although amortized fitness could not be fully applied, it could be applied among species with the same topology. We name this variant as ESS-Sims-AF.
185
+
186
+ ESS-GM-UC: ESS-GM-UC is a variant of ESS-Sims-AF, which combines GM-UC. The goal is to explore how GM-UC affects the performance without the use of a structured model like GNN.
187
+
188
+ ESS-BodyShare: We also want to answer the question of whether GNN is indeed needed. We use both an unstructured models like MLP, as well as a structured model by removing the message propagation model.
189
+
190
+ RGS: In the Random Graph Search (RGS) baseline, a large amount of graphs are generated randomly.
191
+ RGS focuses on exploiting given structures, and does not utilize evolution to generate new graphs.
192
+
193
+ # 4.1 EVOLUTION TOPOLOGY SEARCH
194
+
195
+ In this experiment, the task is to evolve the graph and the controller from scratch. For both fish and walker, species are initialized as random $( { \mathcal { G } } , \theta )$ . Computation cost is often a concern among structure search problems. In our comparison results, for fairness, we allocate the same computation budget to all methods, which is approximately 12 hours on a $\mathtt { E C 2 \ m 4 . 1 6 \times 1 a r g e }$ cluster with 64 cores for one session. A grid search over the hyper-parameters is performed (details in Appendix E). The averaged curves from different runs are shown in Figure 2. In both fish and walker environments, NGE is the best model. We find RGS is not able to efficiently search the space of $\mathcal { G }$ even after evaluating 12, 800 different graphs. The performance of ESS-Sims grows faster for the earlier generations, but is significantly worse than our method in the end. The use of AF and GM-UC on ESS-Sims can improve the performance by a large margin, which indicates that the sub-modules in NGE are effective. By looking at the generated species, ESS-Sims and its variants overfit to local species that dominate the rest of generations. The results of ESS-BodyShare indicates that, the use of structured graph models without message passing might be insufficient in environments that require global features, for example, walker.
196
+
197
+ ![](images/5e50d9c050c8d569952dde06bce8d1d51e7eca8d9b2cb77d12af4f9fb2cac2e7.jpg)
198
+ Figure 3: The genealogy tree generated using NGE for fish. The number next to the node is the reward (the averaged speed of the fish). For better visualization, we down-sample genealogy sub-chain of the winning species. NGE agents gradually grow symmetrical side-fins.
199
+
200
+ ![](images/9b433e8161c629493c0b84edc2c426bbe01e6993718cae2b5d395a7a563768e0.jpg)
201
+ Figure 4: Fine-tuning results on different creatures compared with baseline where structure is fixed. The figures included the species looking from 2 different angles.
202
+
203
+ To better understand the evolution process, we visualize the genealogy tree of fish using our model in Figure 3. Our fish species gradually generates three fins with preferred $\{ A ( u ) \}$ , with two side-fins symmetrical about the fish torso, and one tail-fin lying in the middle line. We obtain similar results for walker, as shown in Appendix C. To the best of our knowledge, our algorithm is the first to automatically discover kinematically plausible robotic graph structures.
204
+
205
+ # 4.2 FINE-TUNING SPECIES
206
+
207
+ Evolving every species from scratch is costly in practice. For many locomotion control tasks, we already have a decent human-engineered robot as a starting point. In the fine-tuning task, we verify the ability of NGE to improve upon the human-engineered design. We showcase both, unconstrained experiments with NGE where the graph $( V , E , A )$ is fine-tuned, and constrained fine-tuning experiments where the topology of the graph is preserved and only the node attributes $\{ A ( u ) \}$ are fine-tuned. In the baseline models, the graph $( V , E , A )$ is fixed, and only the controllers are trained. We can see in Figure 4 that when given the same wall-clock time, it is better to co-evolve the attributes and controllers with NGE than only training the controllers.
208
+
209
+ The figure shows that with NGE, the cheetah gradually transforms the forefoot into a claw, the 3D-fish rotates the pose of the side-fins and tail, and the 2D-walker evolves bigger feet. In general, unconstrained fine-tuning with NGE leads to better performance, but not necessarily preserves the initial structures.
210
+
211
+ ![](images/5fbb41d8252c34ce241a6c560a063ef4faa5d6f1f740b48a07d2a82c2d37c501.jpg)
212
+ Figure 5: Results of ablation study, NGE without uncertainty results and rapid evolution during experiments.
213
+
214
+ # 4.3 GREEDY SEARCH V.S. EXPLORATION UNDER UNCERTAINTY
215
+
216
+ We also investigate the performance of NGE with and without Graph Mutation with Uncertainty, whose hyper-parameters are summarized in Appendix E. In Figure 5a, we applied GM-UC to the evolution graph search task. The final performance of the GM-UC outperforms the baseline on both fish and walker environments. The proposed GM-UC is able to better explore the graph space, showcasing its importance.
217
+
218
+ # 4.4 COMPUTATION COST AND GENERATION SIZE
219
+
220
+ We also investigate how the generation size $\mathcal { N }$ affect the final performance of NGE. We note that as we increase the generation size and the computing resources, NGE achieves marginal improvement on the simple Fish task. A NGE session with 16-core m5.4xlarge $\$ 0.768$ per Hr) AWS machine can achieve almost the same performance with 64-core m4.16xlarge $\$ 3.20$ per Hr) in Fish environment in the same wall-clock time. However, we do notice that there is a trade off between computational resources and performance for the more difficult task. In general, NGE is effective even when the computing resources are limited and it significantly outperforms RGS and ES by using only a small generation size of 16.
221
+
222
+ # 5 DISCUSSION
223
+
224
+ In this paper, we introduced NGE, an efficient graph search algorithm for automatic robot design that co-evolves the robot design graph and its controllers. NGE greatly reduces evaluation cost by transferring the learned GNN-based control policy from previous generations, and better explores the search space by incorporating model uncertainties. Our experiments show that the search over the robotic body structures is challenging, where both random graph search and evolutionary strategy fail to discover meaning robot designs. NGE significantly outperforms the naive approaches in both the final performance and computation time by an order of magnitude, and is the first algorithm that can discovers graphs similar to carefully hand-engineered design. We believe this work is an important step towards automated robot design, and may show itself useful to other graph search problems.
225
+
226
+ Acknowledgements Partially supported by Samsung and NSERC. We also thank NVIDIA for their donation of GPUs.
227
+
228
+ # REFERENCES
229
+
230
+ Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. arXiv preprint arXiv:1710.03748, 2017.
231
+
232
+ Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. ICLR, 2014.
233
+
234
+ Roberto Calandra, André Seyfarth, Jan Peters, and Marc Peter Deisenroth. Bayesian optimization for learning gaits under uncertainty. Annals of Mathematics and Artificial Intelligence, 76(1-2):5–23, 2016.
235
+
236
+ Nick Cheney, Robert MacCurdy, Jeff Clune, and Hod Lipson. Unshackling evolution: Evolving soft robots with multiple materials and a powerful generative encoding. ACM SIGEVOlution, 7(1): 11–23, 2014.
237
+
238
+ Kurtland Chua, Roberto Calandra, Rowan McAllister, and Sergey Levine. Deep reinforcement learning in a handful of trials using probabilistic dynamics models. arXiv preprint arXiv:1805.12114, 2018.
239
+
240
+ Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
241
+
242
+ Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NIPS, 2016.
243
+
244
+ Paul Drews, Grady Williams, Brian Goldfain, Evangelos A Theodorou, and James M Rehg. Aggressive deep driving: Combining convolutional neural networks and model predictive control. In Conference on Robot Learning, pp. 133–142, 2017.
245
+
246
+ David Duff, Mark Yim, and Kimon Roufas. Evolution of polybot: A modular reconfigurable robot. In Proc. of the Harmonic Drive Intl. Symposium, Nagano, Japan, 2001.
247
+
248
+ 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 NIPS, 2015.
249
+
250
+ Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059, 2016.
251
+
252
+ Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017.
253
+
254
+ Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015.
255
+
256
+ Michał Joachimczak, Reiji Suzuki, and Takaya Arita. Fine grained artificial development for bodycontroller coevolution of soft-bodied animats. Artificial life, 14:239–246, 2014.
257
+
258
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. ICLR, 2017.
259
+
260
+ 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.
261
+
262
+ Christopher G Langton. Artificial life: An overview. Mit Press, 1997.
263
+
264
+ Wei-Po Lee. An evolutionary system for automatic robot design. In Systems, Man, and Cybernetics, 1998. 1998 IEEE International Conference on, volume 4, pp. 3477–3482. IEEE, 1998.
265
+
266
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015.
267
+
268
+ Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. arXiv preprint arXiv:1711.00436, 2017.
269
+
270
+ Melanie Mitchell and Stephanie Forrest. Genetic algorithms and artificial life. Artificial life, 1(3): 267–289, 1994.
271
+
272
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
273
+
274
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016.
275
+
276
+ Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. arXiv preprint arXiv:1708.02596, 2017.
277
+
278
+ Ferrante Neri. Memetic compact differential evolution for cartesian robot control. IEEE Computational Intelligence Magazine, 5(2):54–65, 2010.
279
+
280
+ Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018.
281
+
282
+ Aravind Rajeswaran, Kendall Lowrey, Emanuel V Todorov, and Sham M Kakade. Towards generalization and simplicity in continuous control. In Advances in Neural Information Processing Systems, pp. 6553–6564, 2017.
283
+
284
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
285
+
286
+ Karl Sims. Evolving virtual creatures. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques, pp. 15–22. ACM, 1994.
287
+
288
+ Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pp. 2951–2959, 2012.
289
+
290
+ Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
291
+
292
+ Luc Steels. The artificial life roots of artificial intelligence. Artificial life, 1(1_2):75–110, 1993.
293
+
294
+ Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012.
295
+
296
+ Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018.
297
+
298
+ Tim Taylor. Evolution in virtual worlds. arXiv preprint arXiv:1710.06055, 2017.
299
+
300
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
301
+
302
+ Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pp. 1058–1066, 2013.
303
+
304
+ Tingwu Wang, Renjie Liao, Jimmy Ba, and Sanja Fidler. Nervenet: Learning structured policy with graph neural networks. In ICLR, 2018.
305
+
306
+ Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
307
+
308
+ ![](images/b5211ae0f5290b26b5598c34119199588fefd60fcfea62b58bcedd35e02f549a.jpg)
309
+ Figure 6: In this figure, we show the computation graph of NerveNet+ $^ +$ . At each timestep, every node in the graph updates its hidden state by absorbing the messages as well as the input feature. The output function takes the hidden states as input and outputs the controller (or policy) of the agent.
310
+
311
+ # A DETAILS OF NERVENET $^ { + + }$
312
+
313
+ Similar to NerveNet, we parse the agent into a graph, where each node in the graph corresponds to the physical body part of the agents. For example, the fish in Figure 1 can be parsed into a graph of five nodes, namely the torso (0), left-fin (1), right-fin (2), and tail-fin bodies (3, 4). By replacing MLP with NerveNet, the learnt policy has much better performance in terms of robustness and the transfer learning ability. We here propose minor but effective modifications to Wang et al. (2018), and refer to this model as NerveNet++.
314
+
315
+ In the original NerveNet, at every timestep, several propagation steps need to be performed such that every node is able to receive global information before producing the control signal. This is time and memory consuming, with the minimum number of propagation steps constrained by the depth of the graph.
316
+
317
+ Since the episode of each game usually lasts for several hundred timesteps, it is computationally expensive and ineffective to build the full back-propagation graph. Inspired by Mnih et al. (2016), we employ the truncated graph back-propagation to optimize the policy. NerveNet+ $^ { \cdot + }$ is suitable for an evolutionary search or population-based optimization, as it brings speed-up in wall-clock time, and decreases the amount of memory usage.
318
+
319
+ Therefore in NerveNe $^ { + + }$ , we propose a propagation model with the memory state, where each node updates its hidden state by absorbing the input feature and a message with time. The number of propagation steps is no longer constrained by the depth of the graph, and in back-propagation, we save memory and time consumption with truncated computation graph.
320
+
321
+ The computational performance evaluation is provided in Appendix B. NerveNet+ $^ +$ model is trained by the PPO algorithm Schulman et al. (2017); Heess et al. (2017),
322
+
323
+ # B OPTIMIZATION WITH TRUNCATED BACKPROPAGATION
324
+
325
+ During training, the agent generates the rollout data by sampling from the distribution $a _ { t } \sim \pi ( a _ { t } | s _ { t } )$ and stores the training data of $\mathcal { D } = \{ a ^ { t } , s ^ { t } , \{ h _ { u } ^ { t , \tau = 0 } \} \}$ . To train the reinforcement learning agents with memory, the original training objective is
326
+
327
+ $$
328
+ J ( \theta ) = \mathbb { E } _ { \pi } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s ^ { t } , a ^ { t } , \{ h _ { u } ^ { t , \tau = 0 } \} ) \right] ,
329
+ $$
330
+
331
+ where we denote the whole update model as $H$ and
332
+
333
+ $$
334
+ h _ { u } ^ { t + 1 , \tau = 0 } = H ( \{ h _ { v } ^ { t , \tau = 0 } \} , s ^ { t } , a ^ { t } ) .
335
+ $$
336
+
337
+ ![](images/0cf94e39d660ebd29877df92792868564f3a09bea210994b1c774e00bd3db98f.jpg)
338
+ Figure 7: In these two figures, we show that to reach similar performance, NerveNet+ $^ +$ took shorter time comparing to original NerveNet.
339
+
340
+ The memory state $h _ { u } ^ { t + 1 , \tau }$ depends on the previous actions, observations, and states. Therefore, the full back-propagation graph will be the same length as the episode length, which is very computationally intensive. The intuition from the authors in Mnih et al. (2016) is that, for the RL agents, the dependency of the agents on timesteps that are far-away from the current timestep is limited. Thus, negligible accuracy of the gradient estimator will be lost if we truncate the back-propagation graph. We define a back-propagation length $\Gamma$ , and optimize the following objective function instead:
341
+
342
+ $$
343
+ \begin{array} { r l } & { \quad J _ { T } ( \theta ) = \mathbb E _ { \pi } \left[ \displaystyle \sum _ { t = 0 } ^ { \infty } \displaystyle \sum _ { \kappa = 0 } ^ { \Gamma - 1 } \gamma ^ { t + \kappa } r ( s _ { t + \kappa } , a _ { t + \kappa } , \{ h _ { u } ^ { t , \tau = 0 } \} ) \right] , \ : \mathrm { w h e r e } } \\ & { \quad h _ { u } ^ { t + \kappa , \tau = 0 } = \left\{ \begin{array} { l l } { H ( \{ h _ { v } ^ { t + \kappa - 1 , \tau = 0 } , \forall v \} , s _ { t + \kappa - 1 } , a _ { t + \kappa - 1 } ) \quad } & { \kappa \neq 0 , } \\ { h _ { u } ^ { t , \tau = 0 } \in \mathcal D \quad } & { \kappa = 0 , } \end{array} \right. } \end{array}
344
+ $$
345
+
346
+ Essentially this optimization means that we only back-propagate up to $\Gamma$ timesteps, namely at the places where $\kappa = 0$ , we treat the hidden state as input to the network and stop the gradient. To optimize the objective function, we follow same optimization procedure as in Wang et al. (2018), which is a variant of PPO Schulman et al. (2017), where a surrogate loss $J _ { \mathrm { p p o } } ( \theta )$ is optimized. We refer the readers to these papers for algorithm details.
347
+
348
+ # C FULL NGE RESULTS
349
+
350
+ Similar to the fish genealogy tree, in Fig. 8, the simple initial walking agent evolves into a cheetah-like structure, and is able to run with high speed. We also show the species generated by NGE, ESS-Sims (ESS-Sims-AF to be more specific, which has the best performance among all ESS-Sims variants.) and RGS.
351
+
352
+ # D RESETTING CONTROLLER FOR FAIR COMPETITION
353
+
354
+ Although amortized fitness is a better estimation of the ground-truth fitness, it is still biased. Species that appear earlier in the experiment will be trained for more updates if it survives. Indeed, intuitively, it is possible that in real nature, species that appear earlier on will dominate the generation by number, and new species are eliminated even if the new species has better fitness. Therefore, we design the experiment where we reset the weights for all species $\theta = ( \theta _ { \Phi } , \theta _ { \zeta } , \theta _ { M } , \theta _ { U } , \theta _ { F } )$ randomly. By doing this, we are forcing the species to compete fairly. From Fig 10, we notice that this method helps exploration, which leads to a higher reward in the end. However, it usually takes a longer time for the algorithm to converge. Therefore for the graph search task in Fig 2, we do not include the results with the controller-resetting.
355
+
356
+ ![](images/716e206836792ddab9d1fc8348ce669faab16f2ec614d74faee62e59a8209062.jpg)
357
+ Figure 8: Our walker species gradually grows two foot-like structures from randomly initialized body graph.
358
+
359
+ ![](images/a406d83d3adcc19b5eac6dc93df042348580e2442eae8c5093c0f282310809d3.jpg)
360
+ Figure 9: We present qualitative comparison between the three algorithms in the figure. Specifically, the aligned comparison between our method and naive baseline are the representative creatures at the same generation (using same computation resources). Our algorithm notably display stronger dominance in terms of its structure as well as reward.
361
+
362
+ ![](images/c1838debebc25ca3af12e8c06a8bc188ee90c8eab19018442aa7d90a55637911.jpg)
363
+ Figure 10: The results of resetting controller scheme and baselines.
364
+
365
+ # E HYPER-PARAMETERS SEARCHED
366
+
367
+ All methods are given equal amount of computation budget. To be more specific, the number of total timesteps generated by all species for all generations is the same for all methods. For example, if we use 10 training epochs in one generation, each of the epoch with 2000 sampled timesteps, then the computation budget allows NGE to evolve for 200 generations, where each generation has a species size of 64. For NGE, RGS, ESS-Sims-AF models in Fig 11, we run a grid search over the hyper-parameters recorded in Table 2, and Table 3, and plot the curve with the best results respectively.
368
+
369
+ ![](images/e98cbe174974ebb813c4abfefabd4eabdc5fbc42014ba545dd6b2894fb925637.jpg)
370
+ Figure 11: The results of the graph search
371
+
372
+ Since the number of generations for the RGS baseline can be regarded as 1, its curve is plotted with the number of updates normalized by the computation resource as $\mathbf { X }$ -axis.
373
+
374
+ Here we show the detail figures of six baselines, which are: RGS-20, RGS-100, RGS-200, and ESS-Sims-AF-20, ESS-Sims-AF-100, ESS-Sims-AF-200. The number attached to the baseline names indicates the number of inner-loop policy training epochs. In the case of RGS-20, where more than 12800 different graphs are searched over, the average reward is still very low. Increasing the number of inner-loop training of species to 100 and 200 does not help the final performance significantly.
375
+
376
+ To test the performance with and without GM-UC, we use 64-core clusters (generations of size 64).
377
+ Here, the hyper-parameters are chosen to be the first value available in Table 2 and Table 3.
378
+
379
+ Table 2: Hyperparameter grid search options.
380
+
381
+ <table><tr><td>Items</td><td>Value Tried</td></tr><tr><td>Number of Iteration Per Update Number of Species per Generation Elimination Rate Discrete Socket Timesteps per Updates</td><td>10,20,100,200 16,32,64,100 0.15, 0.20, 0.3 Yes, True 2000,4000,6000</td></tr><tr><td>Target KL Learning Rate Schedule Number of Maximum Generation</td><td>0.01 Adaptive</td></tr><tr><td>Prob of Add-Node,Add-Graph Prob of Pert-Graph Prob of Del-Graph</td><td>400 0.15</td></tr></table>
382
+
383
+ # F MODEL BASED SEARCH USING THOMPSON SAMPLING
384
+
385
+ Thompson Sampling is a simple heuristic search strategy that is typically applied to the multi-armed bandit problem. The main idea is to select an action proportional to the probability of the action being optimal. When applied to the graph search problem, Thompson Sampling allows the search to balance the trade-off between exploration and exploitation by maximizing the expected fitness under the posterior distribution of the surrogate model.
386
+
387
+ Table 3: Hyperparameters grid search options for NGE.
388
+
389
+ <table><tr><td>Items</td><td>Value Tried</td></tr><tr><td>Allow Graph-Add</td><td>True, False</td></tr><tr><td>Graph Mutation with Uncertainty</td><td>True,False</td></tr><tr><td>Pruning Temperature</td><td>0.01, 0.1, 1</td></tr><tr><td>Network Structure</td><td>NerveNet,NerveNet++</td></tr><tr><td>Number Candidates before Pruning</td><td>200,400</td></tr></table>
390
+
391
+ Formally, Thompson Sampling selects the best graph candidates at each round according to the expected estimated fitness $\xi _ { P }$ using a surrogate model. The expectation is taken under the posterior distribution of the surrogate $P$ (model|data):
392
+
393
+ $$
394
+ \mathcal { G } ^ { * } = \arg \operatorname* { m a x } _ { \mathcal { G } } \mathbb { E } _ { P ( \mathrm { m o d e l } | \mathrm { d a t a } ) } \left[ \xi _ { P } \left( \mathcal { G } | \mathrm { m o d e l } \right) \right] .
395
+ $$
396
+
397
+ # F.1 SURROGATE MODEL ON GRAPHS.
398
+
399
+ Here we consider a graph neural network (GNN) surrogate model to predict the average fitness of a graph as a Gaussian distribution, namely $\boldsymbol { P } \left( f ( \boldsymbol { \mathcal { G } } ) \right) \ \stackrel { \sim } { \sim } \mathcal { N } \left( \xi _ { P } ( \boldsymbol { \mathcal { G } } ) , \stackrel { \sim } { \sigma } ^ { 2 } ( \boldsymbol { \mathcal { G } } ) \right)$ . We use a simple architecture that predicts the mean of the Gaussian from the last hidden layer activations, $h _ { W } ( { \mathcal { G } } ) \in$ $\mathbb { R } ^ { D }$ , of the GNN, where $W$ are the weights in the GNN up to the last hidden layer.
400
+
401
+ Greedy search. We denoted the size of dataset as $N$ . The GNN weights are trained to predict the average fitness of the graph as a standard regression task:
402
+
403
+ $$
404
+ \operatorname* { m i n } _ { W , W _ { o u t } } \frac { \beta } { 2 } \sum _ { n = 1 } ^ { N } \left( \xi ( \mathcal { G } _ { n } ) - \xi _ { P } ( \mathcal { G } _ { n } ) \right) ^ { 2 } , \quad \mathrm { w h e r e } \quad \xi _ { P } ( \mathcal { G } _ { n } ) = W _ { o u t } ^ { T } h _ { W } ( \mathcal { G } _ { n } )
405
+ $$
406
+
407
+ # Algorithm 2 Greedy Search
408
+
409
+ 1: Initialize generation $\mathcal { P } ^ { 0 }$
410
+ 2: for $j <$ maximum generations do
411
+ 3: Collect the $( \xi _ { i } ^ { k } , \mathcal { G } _ { i } ^ { k } )$ from previous $k \leq j$ generations . Update dataset
412
+ 4: Train $W$ and $W _ { o u t }$ on $\{ ( \xi _ { i } ^ { k } , \mathcal { G } _ { i } ^ { k } ) \} _ { n = 1 } ^ { N }$ . Train GM-UC
413
+ 5: Propose $\mathcal { C }$ new graph $\{ \mathcal { G } _ { i } \} _ { i = 1 } ^ { \mathcal { C } }$ , ${ \mathcal { C } } > > M$ . $\triangleright$ Propose new candidates
414
+ 6: Rank $\{ \xi _ { P } ( \mathcal { G } _ { i } | W , W _ { o u t } ) \} _ { i = 1 } ^ { \mathcal { C } }$ on the proposals and pick the top $\kappa$ . Prune candidates
415
+ 7: Update generation $\mathcal { P } ^ { j }$
416
+ 8: for $m < \mathcal N$ do $\triangleright$ Train and evaluate each species
417
+ 9: for $k <$ maximum parameter updates do
418
+ 10: Train policy πGm
419
+ 11: end for
420
+ 12: Evaluate the fitness $\xi ( \mathcal { G } _ { m } , \theta _ { m } )$
421
+ 13: end for
422
+ 14: end for
423
+
424
+ Thompson Sampling In practice, Thompson Sampling is very similar to the previous greedy search algorithm. Instead of picking the top action according to the best model parameters, at each generation, it draws a sample of the model and takes a greedy action under the sampled model.
425
+
426
+ Approximating Thompson Sampling using Dropout Performing dropout during inference can be viewed as an approximately sampling from the model posterior. At each generation, we will sample a single dropout mask for the surrogate model and rank all the proposed graphs accordingly.
427
+
428
+ # Algorithm 3 Thompson Sampling using Bayesian Neural Networks
429
+
430
+ 1: Initialize generation P0
431
+ 2: for $j <$ maximum generations do
432
+ 3: Collect the $( \xi _ { i } ^ { k } , \mathcal { G } _ { i } ^ { k } )$ from previous $k \leq j$ generations . Update dataset
433
+ 4: Train $W$ and $W _ { o u t }$ on $\{ ( \xi _ { i } ^ { k } , \mathcal { G } _ { i } ^ { k } ) \} _ { n = 1 } ^ { N }$ . Train GM-UC
434
+ 5: Propose $\mathcal { C }$ new graph $\{ \mathcal { G } _ { i } \} _ { i = 1 } ^ { \mathcal { C } } , \mathcal { C } > > M$ . . Propose new candidates
435
+ 6: Sample a model from the posterior of the weights.
436
+ 7: e.g. $\widetilde { W } , \widetilde { W } _ { o u t } \sim P \left( W , W _ { o u t } | D \right) \approx \mathcal { N } \left( [ W , W _ { o u t } ] , [ W , W _ { o u t } ] \right)$
437
+ 8: (similar to DropConnect Wan et al. (2013))
438
+ 9: Rank $\{ \xi _ { P } ( \mathcal { G } _ { i } | \widetilde { W } , \widetilde { W } _ { o u t } ) \} _ { i = 1 } ^ { \mathcal { C } }$ on the proposals and pick the top $\kappa$
439
+ 10: for $m < \mathcal N$ do $\triangleright$ Train and evaluate each species
440
+ 11: for $k <$ maximum parameter updates do
441
+ 12: Train policy πGm
442
+ 13: end for
443
+ 14: Evaluate the fitness $\xi ( \mathcal { G } _ { m } , \theta _ { m } )$
444
+ 15: end for
445
+ 16: end for
446
+
447
+ # Algorithm 4 Thompson Sampling with Dropout
448
+
449
+ 1: Initialize generation $\mathcal { P } ^ { 0 }$
450
+ 2: for $j <$ maximum generations do
451
+ 3: Collect the $( \xi _ { i } ^ { k } , \mathcal { G } _ { i } ^ { k } )$ from previous $k \leq j$ generations $\triangleright$ Update dataset
452
+ 4: Train $W$ and $W _ { o u t }$ on $\{ { \mathcal G } _ { n } , \xi ( { \mathcal G } _ { n } ) \} _ { n = 1 } ^ { N }$ using dropout rate 0.5 on the inputs of the fc layers.
453
+ 5: Propose $\mathcal { C }$ new graph $\{ \mathcal { G } _ { i } \} _ { i = 1 } ^ { \mathcal { C } } , \mathcal { C } > > M$ . . Propose new candidates
454
+ 6: Sample a dropout mask $\mathrm { m } _ { i }$ for the hidden units
455
+ 7: Rank $\{ \xi _ { P } ( \mathcal { G } _ { i } \bar { | } W , W _ { o u t } , \mathbf { m } _ { i } ) \} _ { i = 1 } ^ { J }$ on the proposals and pick the top $\kappa$
456
+ 8: for $m < \mathcal N$ do $\triangleright$ Train and evaluate each species
457
+ 9: for $k <$ maximum parameter updates do
458
+ 10: Train policy πGm
459
+ 11: end for
460
+ 12: Evaluate the fitness $\xi ( \mathcal { G } _ { m } , \theta _ { m } )$
461
+ 13: end for
462
+ 14: end for
parse/train/BkgWHnR5tm/BkgWHnR5tm_content_list.json ADDED
@@ -0,0 +1,2189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "NEURAL GRAPH EVOLUTION: TOWARDS EFFICIENT AUTOMATIC ROBOT DESIGN ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 820,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tingwu Wang1,2∗, Yuhao Zhou1,2∗, Sanja Fidler1,2,3 & Jimmy $\\mathbf { B a } ^ { 1 , 2 }$ ",
17
+ "bbox": [
18
+ 184,
19
+ 167,
20
+ 653,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 Department of Computer Science, University of Toronto \n2 Vector Institute \n3 NVIDIA \n{tingwuwang,henryzhou,fidler,jba}@cs.toronto.e ",
28
+ "bbox": [
29
+ 186,
30
+ 186,
31
+ 627,
32
+ 242
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
+ 292
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Despite the recent successes in robotic locomotion control, the design of robots, i.e., the design of their body structure, still heavily relies on human engineering. Automatic robot design has been a long studied subject, however, progress has been slow due to large combinatorial search space and the difficulty to efficiently evaluate the candidate structures. Note that one needs to both, search over many possible body structures, and choose among them based on how the robot with that structure performs in an environment. The latter means training an optimal controller given a candidate structure, which in itself is costly to obtain. In this paper, we propose Neural Graph Evolution (NGE), which performs evolutionary search in graph space, by iteratively evolving graph structures using simple mutation primitives. Key to our approach is to parameterize the control policies with graph neural networks, which allows us to transfer skills from previously evaluated designs during the graph search. This significantly reduces evaluation cost of new candidates and makes the search process orders of magnitude more efficient than that of past work. In addition, NGE applies Graph Mutation with Uncertainty (GM-UC) by incorporating model uncertainty, which reduces the search space by balancing exploration and exploitation. We show that NGE significantly outperforms previous methods in terms of convergence rate and final performance. As shown in experiments, NGE is the first algorithm that can automatically discover kinematically preferred robotic graph structures, such as a fish with two symmetric flat side-fins and a tail, or a cheetah with athletic front and back legs. NGE is extremely efficient, it finds plausible robotic structures within a day on a single 64 CPU-core Amazon EC2 machine. ",
51
+ "bbox": [
52
+ 232,
53
+ 309,
54
+ 766,
55
+ 627
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 654,
66
+ 336,
67
+ 670
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The goal of robot design is to find an optimal body structure and its means of locomotion to best achieve a given objective in an environment. Robot design often relies on careful human-engineering and expert knowledge. The field of automatic robot design aims to search for these structures automatically. This has been a long-studied subject, however, with limited success. There are two major challenges: 1) the search space of all possible designs is large and combinatorial, and 2) the evaluation of each design requires learning or testing a separate optimal controller that is often expensive to obtain. ",
74
+ "bbox": [
75
+ 174,
76
+ 685,
77
+ 825,
78
+ 782
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In (Sims, 1994), the authors evolved creatures with 3D-blocks. Recently, soft robots have been studied in (Joachimczak et al., 2014), which were evolved by adding small cells connected to the old ones. In (Cheney et al., 2014), the 3D voxels were treated as the minimum element of the robot. Most evolutionary robots (Duff et al., 2001; Neri, 2010) require heavy engineering of the initial structures, evolving rules and careful human-guidance. Due to the combinatorial nature of the problem, evolutionary, genetic or random structure search have been the de facto algorithms of automatic robot design in the pioneering works (Sims, 1994; Steels, 1993; Mitchell & Forrest, 1994; Langton, 1997; Lee, 1998; Taylor, 2017; Calandra et al., 2016). In terms of the underlying algorithm, most of these works have a similar population-based optimization loop to the one used in (Sims, 1994). None of these algorithms are able to evolve kinematically reasonable structures, as a result of large search space and the inefficient evaluation of candidates. ",
85
+ "bbox": [
86
+ 174,
87
+ 790,
88
+ 825,
89
+ 901
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 823,
100
+ 145
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Similar in vein to automatic robot design, automatic neural architecture search also faces a large combinatorial search space and difficulty in evaluation. There have been several approaches to tackle these problems. Bayesian optimization approaches (Snoek et al., 2012) primarily focus on fine-tuning the number of hidden units and layers from a predefined set. Reinforcement learning (Zoph & Le, 2016) and genetic algorithms (Liu et al., 2017) are studied to evolve recurrent neural networks (RNNs) and convolutional neural networks (CNNs) from scratch in order to maximize the validation accuracy. These approaches are computationally expensive because a large number of candidate networks have to be trained from grounds up. (Pham et al., 2018) and (Stanley & Miikkulainen, 2002) propose weight sharing among all possible candidates in the search space to effectively amortize the inner loop training time and thus speed up the architecture search. A typical neural architecture search on ImageNet (Krizhevsky et al., 2012) takes 1.5 days using 200 GPUs (Liu et al., 2017). ",
107
+ "bbox": [
108
+ 173,
109
+ 152,
110
+ 825,
111
+ 305
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this paper, we propose an efficient search method for automatic robot design, Neural Graph Evolution (NGE), that co-evolves both, the robot design and the control policy. Unlike the recent reinforcement learning work, where the control policies are learnt on specific robots carefully designed by human experts (Mnih et al., 2013; Bansal et al., 2017; Heess et al., 2017), NGE aims to adapt the robot design along with policy learning to maximize the agent’s performance. NGE formulates automatic robot design as a graph search problem. It uses a graph as the main backbone of rich design representation and graph neural networks (GNN) as the controller. This is key in order to achieve efficiency of candidate structure evaluation during evolutionary graph search. Similar to previous algorithms like (Sims, 1994), NGE iteratively evolves new graphs and removes graphs based on the performance guided by the learnt GNN controller. The specific contributions of this paper are as follows: ",
118
+ "bbox": [
119
+ 174,
120
+ 313,
121
+ 825,
122
+ 464
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "• We formulate the automatic robot design as a graph search problem. \n• We utilize graph neural networks (GNNs) to share the weights between the controllers, which greatly reduces the computation time needed to evaluate each new robot design. \n• To balance exploration and exploitation during the search, we developed a mutation scheme that incorporates model uncertainty of the graphs. ",
129
+ "bbox": [
130
+ 174,
131
+ 477,
132
+ 825,
133
+ 558
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "We show that NGE automatically discovers robot designs that are comparable to the ones designed by human experts in MuJoCo (Todorov et al., 2012), while random graph search or naive evolutionary structure search (Sims, 1994) fail to discover meaningful results on these tasks. ",
140
+ "bbox": [
141
+ 176,
142
+ 569,
143
+ 825,
144
+ 611
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 BACKGROUND ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 176,
154
+ 631,
155
+ 326,
156
+ 647
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 REINFORCEMENT LEARNING ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 176,
166
+ 662,
167
+ 415,
168
+ 676
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "In reinforcement learning (RL), the problem is usually formulated as a Markov Decision Process (MDP). The infinite-horizon discounted MDP consists of a tuple of $( S , { \\mathcal { A } } , \\gamma , P , R )$ , respectively the state space, action space, discount factor, transition function, and reward function. The objective of the agent is to maximize the total expected reward $\\begin{array} { r } { J ( \\theta ) = \\mathbb { E } _ { \\pi } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r ( s _ { t } , a _ { t } ) \\right] } \\end{array}$ , where the state transition follows the distribution $\\bar { P ( } s _ { t + 1 } | s _ { t } , a _ { t } )$ . Here, $s _ { t }$ and $a _ { t }$ denotes the state and action at time step $t$ , and $r ( s _ { t } , a _ { t } )$ is the reward function. In this paper, to evaluate each robot structure, we use PPO to train RL agents (Schulman et al., 2017; Heess et al., 2017). PPO uses a neural network parameterized as $\\pi _ { \\boldsymbol { \\theta } } ( a _ { t } | \\boldsymbol { s } _ { t } )$ to represent the policy, and adds a penalty for the KL-divergence between the new and old policy to prevent over-optimistic updates. PPO optimizes the following surrogate objective function instead: ",
175
+ "bbox": [
176
+ 173,
177
+ 688,
178
+ 825,
179
+ 828
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "equation",
185
+ "img_path": "images/14ef5f963d44647499e039195f8f80bdaba5d5fbe680d71590e302238438b944.jpg",
186
+ "text": "$$\nJ _ { \\mathrm { P P O } } ( \\theta ) = \\mathbb { E } _ { \\pi _ { \\theta } } \\left[ \\sum _ { t = 0 } ^ { \\infty } A ^ { t } ( s _ { t } , a _ { t } ) r ^ { t } ( s _ { t } , a _ { t } ) \\right] - \\beta \\operatorname { K L } \\left[ \\pi _ { \\theta } ( : | s _ { t } ) | \\pi _ { \\theta _ { o l d } } ( : | s _ { t } ) \\right] .\n$$",
187
+ "text_format": "latex",
188
+ "bbox": [
189
+ 251,
190
+ 833,
191
+ 745,
192
+ 877
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "We denote the estimate of the expected total reward given the current state-action pair, the value and the advantage functions, as $Q ^ { t } ( s _ { t } , a _ { t } )$ , $V ( s _ { t } )$ and $A ^ { t } ( s _ { t } , a _ { t } )$ respectively. PPO solves the problem by iteratively generating samples and optimizing $J _ { \\mathrm { P P O } }$ (Schulman et al., 2017). ",
199
+ "bbox": [
200
+ 174,
201
+ 882,
202
+ 823,
203
+ 925
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "image",
209
+ "img_path": "images/2e9d715889591cf252e6b0c04ff94ec1f8941b9176793190fb0966ecbd604957.jpg",
210
+ "image_caption": [
211
+ "Figure 1: In NGE, several mutation operations are allowed. By using Policy Sharing, child species reuse weights from parents, even if the graphs are different. The same color indicates shared and reused weights. For better visualization, we only plot the sharing of propagation model (yellow curves). "
212
+ ],
213
+ "image_footnote": [],
214
+ "bbox": [
215
+ 183,
216
+ 101,
217
+ 808,
218
+ 272
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "2.2 GRAPH NEURAL NETWORK ",
225
+ "text_level": 1,
226
+ "bbox": [
227
+ 176,
228
+ 339,
229
+ 406,
230
+ 354
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "Graph Neural Networks (GNNs) are suitable for processing data in the form of graph (Bruna et al., 2014; Defferrard et al., 2016; Li et al., 2015; Kipf & Welling, 2017; Duvenaud et al., 2015; Henaff et al., 2015). Recently, the use of GNNs in locomotion control has greatly increased the transferability of controllers (Wang et al., 2018). A GNN operates on a graph whose nodes and edges are denoted respectively as $u \\in V$ and $e \\in E$ . We consider the following GNN, where at timestep $t$ each node in GNN receives an input feature and is supposed to produce an output at a node level. ",
237
+ "bbox": [
238
+ 173,
239
+ 364,
240
+ 825,
241
+ 450
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "Input Model: The input feature for node $u$ is denoted as $x _ { u } ^ { t }$ . $x _ { u } ^ { t }$ is a vector of size $d$ , where $d$ is the size of features. In most cases, $x _ { u } ^ { t }$ is produced by the output of an embedding function used to encode information about $u$ into $d$ -dimensional space. ",
248
+ "bbox": [
249
+ 174,
250
+ 455,
251
+ 825,
252
+ 500
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "Propagation Model: Within each timestep $t$ , the GNN performs $\\tau$ internal propagations, so that each node has global (neighbourhood) information. In each propagation, every node communicates with its neighbours, and updates its hidden state by absorbing the input feature and message. We denote the hidden state at the internal propagation step $\\tau$ $( \\tau \\leq \\tau )$ as $h _ { u } ^ { t , \\tau }$ . Note that $h _ { u } ^ { t , 0 }$ is usually initialized as $h _ { u } ^ { t - 1 , T }$ , i.e., the final hidden state in the previous time step. $\\cdot _ { h ^ { 0 , 0 } }$ is usually initialized to zeros. The message that $u$ sends to its neighbors is computed as ",
259
+ "bbox": [
260
+ 173,
261
+ 505,
262
+ 825,
263
+ 590
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "equation",
269
+ "img_path": "images/981228f1c24e7d68c2f5fa8ea44fd229859c212ddad6f6b44865f0c3298a54fe.jpg",
270
+ "text": "$$\nm _ { u } ^ { t , \\tau } = M ( h _ { u } ^ { t , \\tau - 1 } ) ,\n$$",
271
+ "text_format": "latex",
272
+ "bbox": [
273
+ 423,
274
+ 595,
275
+ 557,
276
+ 614
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "where $M$ is the message function. To compute the updated $h _ { u } ^ { t , \\tau }$ , we use the following equations: ",
283
+ "bbox": [
284
+ 169,
285
+ 622,
286
+ 803,
287
+ 637
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/7cf86a2ef755466885b61a7a2f82737a9b7f7178e49aaba78be828216376ea40.jpg",
294
+ "text": "$$\nr _ { u } ^ { t , \\tau } = R ( \\{ m _ { v } ^ { t , \\tau } | \\forall v \\in \\mathcal { N } _ { G } ( u ) \\} ) , h _ { u } ^ { t , \\tau } = U ( h _ { u } ^ { t , \\tau - 1 } , ( r _ { u } ^ { t , \\tau } ; x _ { u } ^ { t } ) )\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 292,
298
+ 642,
299
+ 704,
300
+ 661
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "where $R$ and $U$ are the message aggregation function and the update function respectively, and $\\mathcal { N } _ { G } ( u )$ denotes the neighbors of $u$ . ",
307
+ "bbox": [
308
+ 173,
309
+ 667,
310
+ 823,
311
+ 696
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "Output Model: Output function $F$ takes input the node’s hidden states after the last internal propagation. The node-level output for node $u$ is therefore defined as $\\mu _ { u } ^ { t } = F ( h _ { u } ^ { t , T } )$ . ",
318
+ "bbox": [
319
+ 171,
320
+ 703,
321
+ 823,
322
+ 732
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Functions $M , R , U , F$ in GNNs can be trainable neural networks or linear functions. For details of GNN controllers, we refer readers to (Wang et al., 2018). ",
329
+ "bbox": [
330
+ 174,
331
+ 738,
332
+ 825,
333
+ 767
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "3 NEURAL GRAPH EVOLUTION ",
340
+ "text_level": 1,
341
+ "bbox": [
342
+ 176,
343
+ 786,
344
+ 449,
345
+ 803
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "In robotics design, every component, including the robot arms, finger and foot, can be regarded as a node. The connections between the components can be represented as edges. In locomotion control, the robotic simulators like MuJoCo (Todorov et al., 2012) use an XML file to record the graph of the robot. As we can see, robot design is naturally represented by a graph. To better illustrate Neural Graph Evolution (NGE), we first introduce the terminology and summarize the algorithm. ",
352
+ "bbox": [
353
+ 174,
354
+ 818,
355
+ 825,
356
+ 888
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Graph and Species. We use an undirected graph $\\mathcal { G } = ( V , E , A )$ to represent each robotic design. $V$ and $E$ are the collection of physical body nodes and edges in the graph, respectively. The mapping ",
363
+ "bbox": [
364
+ 173,
365
+ 895,
366
+ 823,
367
+ 924
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Algorithm 1 Neural Graph Evolution ",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 174,
377
+ 103,
378
+ 406,
379
+ 117
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "table",
385
+ "img_path": "images/a9978583661ad393fa68b2b0276890cf10127a78e6a4ac3f92bbe948df49da7f.jpg",
386
+ "table_caption": [],
387
+ "table_footnote": [],
388
+ "table_body": "<table><tr><td>1: Initialize generation P°←{(0,G)}1</td><td></td></tr><tr><td>2:while Evolving jth generation do</td><td>Evolution outer loop</td></tr><tr><td>3: for ith species (0²,G) ∈ Pj do</td><td> Species fitness inner loop</td></tr><tr><td>4: 0j+1←Update(0)</td><td>Train policy network</td></tr><tr><td>5: S←s(0+1,G)</td><td>Evaluate fitness</td></tr><tr><td>6: end for</td><td></td></tr><tr><td>7: pj+1←Pj\\{(0k,Sk) ∈Pj,∀k ∈ argminx({Si})}.</td><td>Remove worst K species</td></tr><tr><td>P ←{(0h,9h =M(Gh,p)), whereGh,p ~ Uniform(Pj+1)}h=1 8:</td><td>Mutate from survivors</td></tr><tr><td>9: pj+1 √ pj+1 U{(0k,9k) ∈P, ∀k ∈ argmaxx({ξp(Gh)})}. 10: end while</td><td>Pruning</td></tr></table>",
389
+ "bbox": [
390
+ 174,
391
+ 119,
392
+ 825,
393
+ 265
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "$A : V \\Lambda$ maps the node $u \\in V$ to its structural attributes $A ( u ) \\in \\Lambda$ , where $\\Lambda$ is the attributes space. For example, the fish in Figure 1 consists of a set of ellipsoid nodes, and vector $A ( u )$ describes the configurations of each ellipsoid. The controller is a policy network parameterized by weights $\\theta$ The tuple formed by the graph and the policy is defined as a species, denoted as $\\Omega = ( \\mathcal { G } , \\theta )$ . ",
400
+ "bbox": [
401
+ 173,
402
+ 291,
403
+ 825,
404
+ 349
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "Generation and Policy Sharing. In the $j$ -th iteration, NGE evaluates a pool of species called a generation, denoted as $P ^ { j } = \\{ ( \\mathcal { G } _ { i } ^ { j } , \\theta _ { i } ^ { j } ) , \\forall i = 1 , 2 , . . . , \\mathcal { N } \\}$ , where $\\mathcal { N }$ is the size of the generation. In NGE, the search space includes not only the graph space, but also the weight or parameter space of the policy network. For better efficiency of NGE, we design a process called Policy Sharing (PS), where weights are reused from parent to child species. The details of PS is described in Section 3.4. ",
411
+ "bbox": [
412
+ 174,
413
+ 354,
414
+ 825,
415
+ 428
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "Our model can be summarized as follows. NGE performs population-based optimization by iterating among mutation, evaluation and selection. The objective and performance metric of NGE are introduced in Section 3.1. In NGE, we randomly initialize the generation with $\\mathcal { N }$ species. For each generation, NGE trains each species and evaluates their fitness separately, the policy of which is described in Section 3.2. During the selection, we eliminate $\\kappa$ species with the worst fitness. To mutate $\\kappa$ new species from surviving species, we develop a novel mutation scheme called Graph Mutation with Uncertainty (GM-UC), described in Section 3.3, and efficiently inherit policies from the parent species by Policy Sharing, described in Section 3.4. Our method is outlined in Algorithm 1. ",
422
+ "bbox": [
423
+ 174,
424
+ 434,
425
+ 825,
426
+ 546
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "3.1 AMORTIZED FITNESS AND OBJECTIVE FUNCTION ",
433
+ "text_level": 1,
434
+ "bbox": [
435
+ 174,
436
+ 578,
437
+ 560,
438
+ 593
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "Fitness represents the performance of a given $\\mathcal { G }$ using the optimal controller parameterized with $\\theta ^ { * } ( { \\mathcal { G } } )$ . However, $\\overleftarrow { \\theta ^ { * } } ( \\mathcal G )$ is impractical or impossible to obtain for the following reasons. First, each design is computationally expensive to evaluate. To evaluate one graph, the controller needs to be trained and tested. Model-free (MF) algorithms could take more than one million in-game timesteps to train a simple 6-degree-of-freedom cheetah (Schulman et al., 2017), while model-based (MB) controllers usually require much more execution time, without the guarantee of having higher performance than MF controllers (Tassa et al., 2012; Nagabandi et al., 2017; Drews et al., 2017; Chua et al., 2018). Second, the search in robotic graph space can easily get stuck in local-optima. In robotic design, local-optima are difficult to detect as it is hard to tell whether the controller has converged or has reached a temporary optimization plateau. Learning the controllers is a computation bottleneck in optimization. ",
445
+ "bbox": [
446
+ 174,
447
+ 604,
448
+ 826,
449
+ 757
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "In population-based robot graph search, spending more computation resources on evaluating each species means that fewer different species can be explored. In our work, we enable transferablity between different topologies of NGE (described in Section 3.2 and 3.4). This allows us to introduce amortized fitness (AF) as the objective function across generations for NGE. AF is defined in the following equation as, ",
456
+ "bbox": [
457
+ 174,
458
+ 763,
459
+ 825,
460
+ 834
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "equation",
466
+ "img_path": "images/2da1cd2a4602f48e4dfe91141054afe3baa60dd6778a9631b8604a78dccf566a.jpg",
467
+ "text": "$$\n\\xi ( \\mathcal { G } , \\boldsymbol { \\theta } ) = \\mathbb { E } _ { \\pi _ { \\boldsymbol { \\theta } } , \\mathcal { G } } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r ( s _ { t } , a _ { t } ) \\right] .\n$$",
468
+ "text_format": "latex",
469
+ "bbox": [
470
+ 380,
471
+ 834,
472
+ 617,
473
+ 877
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "In NGE, the mutated species continues the optimization by initializing the parameters with the parameters inherited from its parent species. In past work (Sims, 1994), species in one generation are trained separately for a fixed number of updates, which is biased and potentially undertrained or ",
480
+ "bbox": [
481
+ 174,
482
+ 882,
483
+ 823,
484
+ 924
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "overtrained. In next generations, new species have to discard old controllers if the graph topology is different, which might waste valuable computation resources. ",
491
+ "bbox": [
492
+ 171,
493
+ 103,
494
+ 823,
495
+ 132
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "3.2 POLICY REPRESENTATION ",
502
+ "text_level": 1,
503
+ "bbox": [
504
+ 176,
505
+ 148,
506
+ 398,
507
+ 162
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Given a species with graph $\\mathcal { G }$ , we train the parameters $\\theta$ of policy network $\\pi _ { \\theta } ( a ^ { t } | s ^ { t } )$ using reinforcement learning. Similar to (Wang et al., 2018), we use a GNN as the policy network of the controller. A graphical representation of our model is shown in Figure 1. We follow notation in Section 2.2. ",
514
+ "bbox": [
515
+ 174,
516
+ 174,
517
+ 826,
518
+ 217
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "For the input model, we parse the input state vector $s ^ { t }$ obtained from the environment into a graph, where each node $u \\in V$ fetches the corresponding observation $o ( u , t )$ from $s ^ { t }$ , and extracts the feature $x _ { u } ^ { O , t }$ with an embedding function $\\Phi$ . We also encode the attribute information $A ( u )$ into $x _ { u } ^ { A }$ with an embedding function denoted as $\\zeta$ . The input feature $x _ { u } ^ { t }$ is thus calculated as: ",
525
+ "bbox": [
526
+ 173,
527
+ 223,
528
+ 825,
529
+ 280
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "equation",
535
+ "img_path": "images/6e40617ac8b8579e240b905f395d64b491a87aad8af31a04d5355f5fd2ab3052.jpg",
536
+ "text": "$$\n\\begin{array} { r } { x _ { u } ^ { O , t } = \\Phi ( o ( u , t ) ) , ~ x _ { u } ^ { A } = \\zeta ( A ( u ) ) , } \\\\ { x _ { u } ^ { t } = [ x _ { u } ^ { O , t } ; x _ { u } ^ { A } ] , ~ } \\end{array}\n$$",
537
+ "text_format": "latex",
538
+ "bbox": [
539
+ 380,
540
+ 284,
541
+ 617,
542
+ 325
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "where $[ . ]$ denotes concatenation. We use $\\theta _ { \\Phi } , \\theta _ { \\zeta }$ to denote the weights of embedding functions. ",
549
+ "bbox": [
550
+ 168,
551
+ 328,
552
+ 787,
553
+ 344
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "The propagation model is described in Section 2.2. We recap the propagation model here briefly: Initial hidden state for node $u$ is denoted as $h _ { u } ^ { t , 0 }$ , which are initialized from hidden states from the last timestep $h _ { u } ^ { t - 1 , T }$ or simply zeros. $\\tau$ internal propagation steps are performed for each timestep, during each step (denoted as $\\tau \\leq \\tau \\}$ ) of which, every node sends messages to its neighboring nodes, and aggregates the received messages. $h _ { u } ^ { t , \\tau + 1 }$ is calculated by an update function that takes in $h _ { u } ^ { t , \\tau }$ , node input feature $x _ { u } ^ { t }$ and aggregated message $m _ { u } ^ { t , \\tau }$ . We use summation as the aggregation function and a GRU (Chung et al., 2014) as the update function. ",
560
+ "bbox": [
561
+ 173,
562
+ 349,
563
+ 826,
564
+ 448
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "For the output model, we define the collection of controller nodes as $\\mathcal { F }$ , and define Gaussian distributions on each node’s controller as follows: ",
571
+ "bbox": [
572
+ 174,
573
+ 454,
574
+ 823,
575
+ 483
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "equation",
581
+ "img_path": "images/5b730d26f3edd76181105190b87e3f22d2e8dd914f89528f4b03862b3474b9b5.jpg",
582
+ "text": "$$\n\\begin{array} { r } { \\forall u \\in \\mathcal { F } , ~ \\mu _ { u } ^ { t } = F _ { \\mu } ( h _ { u } ^ { t , T } ) , } \\\\ { \\sigma _ { u } ^ { t } = F _ { \\sigma } ( h _ { u } ^ { t , T } ) , } \\end{array}\n$$",
583
+ "text_format": "latex",
584
+ "bbox": [
585
+ 411,
586
+ 484,
587
+ 586,
588
+ 527
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "where $\\mu _ { u }$ and $\\sigma _ { u }$ are the mean and the standard deviation of the action distribution. The weights of output function are denoted as $\\theta _ { F }$ . By combining all the actions produced by each node controller, we have the policy distribution of the agent: ",
595
+ "bbox": [
596
+ 174,
597
+ 529,
598
+ 826,
599
+ 571
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "equation",
605
+ "img_path": "images/f8662e7836047842ccef9704cd260e2535be5dedc6dbbf51db9c472f354126ca.jpg",
606
+ "text": "$$\n\\pi ( a ^ { t } | s ^ { t } ) = \\prod _ { u \\in \\mathcal { F } } \\pi _ { u } ( a _ { u } ^ { t } | s ^ { t } ) = \\prod _ { u \\in \\mathcal { F } } \\frac { 1 } { \\sqrt { 2 \\pi ( \\sigma _ { u } ^ { t } ) ^ { 2 } } } \\mathrm { e x p } \\left( \\frac { ( a _ { u } ^ { t } - \\mu _ { u } ^ { t } ) ^ { 2 } } { 2 ( \\sigma _ { u } ^ { t } ) ^ { 2 } } \\right)\n$$",
607
+ "text_format": "latex",
608
+ "bbox": [
609
+ 282,
610
+ 575,
611
+ 715,
612
+ 616
613
+ ],
614
+ "page_idx": 4
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "We optimize $\\pi ( \\boldsymbol { a } ^ { t } | \\boldsymbol { s } ^ { t } )$ with PPO, the details of which are provided in Appendix A. ",
619
+ "bbox": [
620
+ 174,
621
+ 621,
622
+ 709,
623
+ 636
624
+ ],
625
+ "page_idx": 4
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "3.3 GRAPH MUTATION WITH UNCERTAINTY ",
630
+ "text_level": 1,
631
+ "bbox": [
632
+ 176,
633
+ 651,
634
+ 493,
635
+ 666
636
+ ],
637
+ "page_idx": 4
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "Between generations, the graphs evolve from parents to children. We allow the following basic operations as the mutation primitives on the parent’s graph $\\mathcal { G }$ : ",
642
+ "bbox": [
643
+ 171,
644
+ 678,
645
+ 823,
646
+ 707
647
+ ],
648
+ "page_idx": 4
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "$\\mathcal { M } _ { 1 }$ , Add-Node: In the $\\mathcal { M } _ { 1 }$ (Add-Node) operation, the growing of a new body part is done by sampling a node $v \\in V$ from the parent, and append a new node $u$ to it. We randomly initialize $u$ ’s attributes from an uniform distribution in the attribute space. ",
653
+ "bbox": [
654
+ 174,
655
+ 713,
656
+ 825,
657
+ 756
658
+ ],
659
+ "page_idx": 4
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "$\\mathcal { M } _ { 2 }$ , Add-Graph: The $\\mathcal { M } _ { 2 }$ (Add-Graph) operation allows for faster evolution by reusing the subtrees in the graph with good functionality. We sample a sub-graph or leaf node $\\bar { \\mathcal { G } } ^ { \\prime } = ( \\bar { V ^ { \\prime } } , E ^ { \\prime } , A ^ { \\prime } )$ from the current graph, and a placement node $u \\in V ( { \\mathcal { G } } )$ to which to append $\\mathcal { G } ^ { \\prime }$ . We randomly mirror the attributes of the root node in $\\mathcal { G } ^ { \\prime }$ to incorporate a symmetry prior. ",
664
+ "bbox": [
665
+ 174,
666
+ 761,
667
+ 825,
668
+ 819
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "$\\mathcal { M } _ { 3 }$ , Del-Graph: The process of removing body parts is defined as $\\mathcal { M } _ { 3 }$ (Del-Graph) operation. In this operation, a sub-graph $\\mathcal { G } ^ { \\prime }$ from $\\mathcal { G }$ is sampled and removed from $\\mathcal { G }$ . ",
675
+ "bbox": [
676
+ 174,
677
+ 824,
678
+ 823,
679
+ 853
680
+ ],
681
+ "page_idx": 4
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "$\\mathcal { M } _ { 4 }$ , Pert-Graph: In the $\\mathcal { M } _ { 4 }$ (Pert-Graph) operation, we randomly sample a sub-graph $\\mathcal { G } ^ { \\prime }$ and recursively perturb the parameter of each node $u \\in V ( \\mathcal { G } ^ { \\prime } )$ by adding Gaussian noise to $A ( u )$ . ",
686
+ "bbox": [
687
+ 176,
688
+ 859,
689
+ 823,
690
+ 888
691
+ ],
692
+ "page_idx": 4
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "We visualize a pair of example fish in Figure 1. The fish in the top-right is mutated from the fish in the top-left by applying $\\mathcal { M } _ { 1 }$ . The new node (2) is colored magenta in the figure. To mutate each new candidate graph, we sample the operation $\\mathcal { M }$ and apply $\\mathcal { M }$ on $\\mathcal { G }$ as ",
697
+ "bbox": [
698
+ 173,
699
+ 895,
700
+ 821,
701
+ 924
702
+ ],
703
+ "page_idx": 4
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "",
708
+ "bbox": [
709
+ 173,
710
+ 103,
711
+ 614,
712
+ 118
713
+ ],
714
+ "page_idx": 5
715
+ },
716
+ {
717
+ "type": "equation",
718
+ "img_path": "images/abc2d2f6ee2a05868fa1d4ae70119ab76f19f5a93467c49ec3c8c2e5529461bc.jpg",
719
+ "text": "$$\n\\mathcal { G } ^ { \\prime } = \\mathcal { M } ( \\mathcal { G } ) , \\mathrm { w h e r e } \\mathcal { M } \\in \\{ \\mathcal { M } _ { l } , l = 1 , 2 , 3 , 4 \\} , \\ : \\mathrm { P } ( \\mathcal { M } = \\mathcal { M } _ { l } ) = p _ { m } ^ { l } .\n$$",
720
+ "text_format": "latex",
721
+ "bbox": [
722
+ 276,
723
+ 128,
724
+ 725,
725
+ 147
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "$p _ { m } ^ { l }$ is the probability of sampling each operation with $\\begin{array} { r } { \\sum _ { l } p _ { m } ^ { l } = 1 } \\end{array}$ ",
732
+ "bbox": [
733
+ 174,
734
+ 156,
735
+ 607,
736
+ 174
737
+ ],
738
+ "page_idx": 5
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "To facilitate evolution, we want to avoid wasting computation resources on species with low expected fitness, while encouraging NGE to test species with high uncertainty. We again employ a GNN to predict the fitness of the graph $\\mathcal { G }$ , denoted as $\\xi _ { P } ( \\mathcal G )$ . The weights of this GNN are denoted as $\\psi$ . In particular, we predict the AF score with a similar propagation model as our policy network, but the observation feature is only $x _ { u } ^ { A }$ , i.e., the embedding of the attributes. The output model is a graph-level output (as opposed to node-level used in our policy), regressing to the score $\\xi$ . After each generation, we train the regression model using the L2 loss. ",
743
+ "bbox": [
744
+ 173,
745
+ 179,
746
+ 825,
747
+ 276
748
+ ],
749
+ "page_idx": 5
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "However, pruning the species greedily may easily overfit the model to the existing species since there is no modeling of uncertainty. We thus propose Graph Mutation with Uncertainty (GM-UC) based on Thompson Sampling to balance between exploration and exploitation. We denote the dataset of past species and their AF score as $\\mathcal { D }$ . GM-UC selects the best graph candidates by considering the posterior distribution of the surrogate $P \\left( \\psi | \\mathcal { D } \\right)$ : ",
754
+ "bbox": [
755
+ 173,
756
+ 282,
757
+ 825,
758
+ 353
759
+ ],
760
+ "page_idx": 5
761
+ },
762
+ {
763
+ "type": "equation",
764
+ "img_path": "images/5fbe75e1715723537d3cc5ab0feb06720549c0fe8fddc1104abd3e211158cba1.jpg",
765
+ "text": "$$\n\\mathcal { G } ^ { * } = \\arg \\operatorname* { m a x } _ { \\mathcal { G } } \\mathbb { E } _ { P \\left( \\psi \\left| \\mathcal { D } \\right. \\right]} \\left[ \\xi _ { P } \\left( \\mathcal { G } \\right| \\psi \\right) .\n$$",
766
+ "text_format": "latex",
767
+ "bbox": [
768
+ 377,
769
+ 363,
770
+ 620,
771
+ 387
772
+ ],
773
+ "page_idx": 5
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "Instead of sampling the full model with $\\widetilde { \\psi } \\sim P \\left( \\psi | \\mathcal { D } \\right)$ , we follow Gal & Ghahramani (2016) and perform dropout during inference, which can be viewed as an approximate sampling from the model posterior. At the end of each generation, we randomly mutate ${ \\mathcal { C } } \\geq { \\mathcal { N } }$ new species from surviving species. We then sample a single dropout mask for the surrogate model and only keep $\\mathcal { N }$ species with highest $\\xi _ { P }$ . The details of GM-UC are given in Appendix F. ",
778
+ "bbox": [
779
+ 173,
780
+ 398,
781
+ 825,
782
+ 472
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "3.4 RAPID ADAPTATION USING POLICY SHARING ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 178,
792
+ 492,
793
+ 529,
794
+ 506
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "To leverage the transferability of GNNs across different graphs, we propose Policy Sharing (PS) to reuse old weights from parent species. The weights of a species in NGE are as follows: ",
801
+ "bbox": [
802
+ 174,
803
+ 518,
804
+ 826,
805
+ 547
806
+ ],
807
+ "page_idx": 5
808
+ },
809
+ {
810
+ "type": "equation",
811
+ "img_path": "images/faf480d8a16dc00f52d1adbc178728c0380a527892c4d2ba88a619138158f2d8.jpg",
812
+ "text": "$$\n\\theta _ { G } = ( \\theta _ { \\Phi } , \\theta _ { \\zeta } , \\theta _ { M } , \\theta _ { U } , \\theta _ { F } ) ,\n$$",
813
+ "text_format": "latex",
814
+ "bbox": [
815
+ 406,
816
+ 559,
817
+ 589,
818
+ 575
819
+ ],
820
+ "page_idx": 5
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "where $\\theta _ { \\Phi } , \\theta _ { \\zeta } , \\theta _ { M } , \\theta _ { U } , \\theta _ { F }$ are the weights for the models we defined earlier in Section 3.2 and 2.2. Since our policy network is based on GNNs, as we can see from Figure 1, model weights of different graphs share the same cardinality (shape). A different graph will only alter the paths of message propagation. With PS, new species are provided with a strong weight initialization, and the evolution will less likely be dominated by species that are more ancient in the genealogy tree. ",
825
+ "bbox": [
826
+ 173,
827
+ 585,
828
+ 825,
829
+ 656
830
+ ],
831
+ "page_idx": 5
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Previous approaches including naive evolutionary structure search (ESS-Sims) (Sims, 1994) or random graph search (RGS) utilize human-engineered one-layer neural network or a fully connected network, which cannot reuse controllers once the graph structure is changed, as the parameter space for $\\theta$ might be different. And even when the parameters happen to be of the same shape, transfer learning with unstructured policy controllers is still hardly successful (Rajeswaran et al., 2017). We denote the old species in generation $j$ , and its mutated species with different topologies as $( \\theta _ { B } ^ { j } , \\mathcal { G } )$ , $( \\theta _ { B } ^ { j + 1 } , \\mathcal { G } ^ { \\prime } )$ in baseline algorithm ESS-Sims and RGS, and $( \\theta _ { G } ^ { j } , \\mathcal { G } )$ , $( \\theta _ { G } ^ { j + 1 } , \\mathcal { G } ^ { \\prime } )$ for NGE. We also denote the network initialization scheme for fully-connected networks as $\\boldsymbol { B }$ . We show the parameter reuse between generations in Table 1. ",
836
+ "bbox": [
837
+ 173,
838
+ 661,
839
+ 826,
840
+ 792
841
+ ],
842
+ "page_idx": 5
843
+ },
844
+ {
845
+ "type": "table",
846
+ "img_path": "images/0eeaf6a4c55774ae2724b9f6591746ec9bf90c19b7ebf6027d2ab3f818dad672.jpg",
847
+ "table_caption": [],
848
+ "table_footnote": [],
849
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Algorithm</td><td rowspan=1 colspan=1>Mutation</td><td rowspan=1 colspan=1>Parameter Space</td><td rowspan=1 colspan=1>Policy Initialization</td></tr><tr><td rowspan=1 colspan=1>ESS-Sims, RGSNGE</td><td rowspan=1 colspan=1>g→g&#x27;g→g&#x27;</td><td rowspan=1 colspan=1>{0B(9)}n {0B(S&#x27;)}=0{0G(9)}={0G(S&#x27;)}</td><td rowspan=1 colspan=1>B(&#x27;),, 0 not reused01</td></tr></table>",
850
+ "bbox": [
851
+ 189,
852
+ 809,
853
+ 808,
854
+ 877
855
+ ],
856
+ "page_idx": 5
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "Table 1: Parameter reuse between species and its mutated children if the topologies are different. ",
861
+ "bbox": [
862
+ 181,
863
+ 886,
864
+ 812,
865
+ 901
866
+ ],
867
+ "page_idx": 5
868
+ },
869
+ {
870
+ "type": "image",
871
+ "img_path": "images/38bc5764a077404c9112cc83437462191878af34cc741069550675015886ee62.jpg",
872
+ "image_caption": [
873
+ "Figure 2: The performance of the graph search for RGS, ES and NGE. The figures on are the example creatures obtained from each of the method. The graph structure next to the figure are the corresponding graph structure. We included the original species for reference. "
874
+ ],
875
+ "image_footnote": [],
876
+ "bbox": [
877
+ 173,
878
+ 99,
879
+ 823,
880
+ 196
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "4 EXPERIMENTS ",
887
+ "text_level": 1,
888
+ "bbox": [
889
+ 176,
890
+ 277,
891
+ 326,
892
+ 292
893
+ ],
894
+ "page_idx": 6
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "In this section, we demonstrate the effectiveness of NGE on various evolution tasks. In particular, we evaluate both, the most challenging problem of searching for the optimal body structure from scratch in Section 4.1, and also show a simpler yet useful problem where we aim to optimize humanengineered species in Section 4.2 using NGE. We also provide an ablation study on GM-UC in Section 4.3, and an ablation study on computational cost or generation size in Section 4.4. ",
899
+ "bbox": [
900
+ 174,
901
+ 310,
902
+ 825,
903
+ 381
904
+ ],
905
+ "page_idx": 6
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "Our experiments are simulated with MuJoCo. We design the following environments to test the algorithms. Fish Env: In the fish environment, graph consists of ellipsoids. The reward is the swimming-speed along the $y$ -direction. We denote the reference human-engineered graph (Tassa et al., 2018) as $\\mathcal { G } _ { F }$ . Walker Env: We also define a 2D environment walker constructed by cylinders, where the goal is to move along $x$ -direction as fast as possible. We denote the reference humanengineered walker as $\\mathcal { G } _ { W }$ and cheetah as $\\mathcal { G } _ { C }$ (Tassa et al., 2018). To validate the effectiveness of NGE, baselines including previous approaches are compared. We do a grid search on the hyper-parameters as summarized in Appendix E, and show the averaged curve of each method. The baselines are introduced as follows: ",
910
+ "bbox": [
911
+ 174,
912
+ 387,
913
+ 825,
914
+ 512
915
+ ],
916
+ "page_idx": 6
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "ESS-Sims: This method was proposed in (Sims, 1994), and applied in (Cheney et al., 2014; Taylor, 2017), which has been the most classical and successful algorithm in automatic robotic design. In the original paper, the author uses evolutionary strategy to train a human-engineered one layer neural network, and randomly perturbs the graph after each generation. With the recent progress of robotics and reinforcement learning, we replace the network with a 3-layer Multilayer perceptron and train it with PPO instead of evolutionary strategy. ",
921
+ "bbox": [
922
+ 174,
923
+ 518,
924
+ 825,
925
+ 603
926
+ ],
927
+ "page_idx": 6
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "ESS-Sims-AF: In the original ESS-Sims, amortized fitness is not used. Although amortized fitness could not be fully applied, it could be applied among species with the same topology. We name this variant as ESS-Sims-AF. ",
932
+ "bbox": [
933
+ 174,
934
+ 609,
935
+ 825,
936
+ 652
937
+ ],
938
+ "page_idx": 6
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "ESS-GM-UC: ESS-GM-UC is a variant of ESS-Sims-AF, which combines GM-UC. The goal is to explore how GM-UC affects the performance without the use of a structured model like GNN. ",
943
+ "bbox": [
944
+ 173,
945
+ 659,
946
+ 821,
947
+ 688
948
+ ],
949
+ "page_idx": 6
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "ESS-BodyShare: We also want to answer the question of whether GNN is indeed needed. We use both an unstructured models like MLP, as well as a structured model by removing the message propagation model. ",
954
+ "bbox": [
955
+ 174,
956
+ 694,
957
+ 825,
958
+ 736
959
+ ],
960
+ "page_idx": 6
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "RGS: In the Random Graph Search (RGS) baseline, a large amount of graphs are generated randomly. \nRGS focuses on exploiting given structures, and does not utilize evolution to generate new graphs. ",
965
+ "bbox": [
966
+ 173,
967
+ 743,
968
+ 825,
969
+ 772
970
+ ],
971
+ "page_idx": 6
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "4.1 EVOLUTION TOPOLOGY SEARCH ",
976
+ "text_level": 1,
977
+ "bbox": [
978
+ 176,
979
+ 785,
980
+ 444,
981
+ 799
982
+ ],
983
+ "page_idx": 6
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "In this experiment, the task is to evolve the graph and the controller from scratch. For both fish and walker, species are initialized as random $( { \\mathcal { G } } , \\theta )$ . Computation cost is often a concern among structure search problems. In our comparison results, for fairness, we allocate the same computation budget to all methods, which is approximately 12 hours on a $\\mathtt { E C 2 \\ m 4 . 1 6 \\times 1 a r g e }$ cluster with 64 cores for one session. A grid search over the hyper-parameters is performed (details in Appendix E). The averaged curves from different runs are shown in Figure 2. In both fish and walker environments, NGE is the best model. We find RGS is not able to efficiently search the space of $\\mathcal { G }$ even after evaluating 12, 800 different graphs. The performance of ESS-Sims grows faster for the earlier generations, but is significantly worse than our method in the end. The use of AF and GM-UC on ESS-Sims can improve the performance by a large margin, which indicates that the sub-modules in NGE are effective. By looking at the generated species, ESS-Sims and its variants overfit to local species that dominate the rest of generations. The results of ESS-BodyShare indicates that, the use of structured graph models without message passing might be insufficient in environments that require global features, for example, walker. ",
988
+ "bbox": [
989
+ 174,
990
+ 811,
991
+ 825,
992
+ 924
993
+ ],
994
+ "page_idx": 6
995
+ },
996
+ {
997
+ "type": "image",
998
+ "img_path": "images/5e50d9c050c8d569952dde06bce8d1d51e7eca8d9b2cb77d12af4f9fb2cac2e7.jpg",
999
+ "image_caption": [
1000
+ "Figure 3: The genealogy tree generated using NGE for fish. The number next to the node is the reward (the averaged speed of the fish). For better visualization, we down-sample genealogy sub-chain of the winning species. NGE agents gradually grow symmetrical side-fins. "
1001
+ ],
1002
+ "image_footnote": [],
1003
+ "bbox": [
1004
+ 240,
1005
+ 99,
1006
+ 754,
1007
+ 273
1008
+ ],
1009
+ "page_idx": 7
1010
+ },
1011
+ {
1012
+ "type": "image",
1013
+ "img_path": "images/9b433e8161c629493c0b84edc2c426bbe01e6993718cae2b5d395a7a563768e0.jpg",
1014
+ "image_caption": [
1015
+ "Figure 4: Fine-tuning results on different creatures compared with baseline where structure is fixed. The figures included the species looking from 2 different angles. "
1016
+ ],
1017
+ "image_footnote": [],
1018
+ "bbox": [
1019
+ 214,
1020
+ 344,
1021
+ 784,
1022
+ 474
1023
+ ],
1024
+ "page_idx": 7
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "",
1029
+ "bbox": [
1030
+ 174,
1031
+ 542,
1032
+ 825,
1033
+ 627
1034
+ ],
1035
+ "page_idx": 7
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "To better understand the evolution process, we visualize the genealogy tree of fish using our model in Figure 3. Our fish species gradually generates three fins with preferred $\\{ A ( u ) \\}$ , with two side-fins symmetrical about the fish torso, and one tail-fin lying in the middle line. We obtain similar results for walker, as shown in Appendix C. To the best of our knowledge, our algorithm is the first to automatically discover kinematically plausible robotic graph structures. ",
1040
+ "bbox": [
1041
+ 174,
1042
+ 633,
1043
+ 825,
1044
+ 704
1045
+ ],
1046
+ "page_idx": 7
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "4.2 FINE-TUNING SPECIES ",
1051
+ "text_level": 1,
1052
+ "bbox": [
1053
+ 176,
1054
+ 722,
1055
+ 370,
1056
+ 737
1057
+ ],
1058
+ "page_idx": 7
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Evolving every species from scratch is costly in practice. For many locomotion control tasks, we already have a decent human-engineered robot as a starting point. In the fine-tuning task, we verify the ability of NGE to improve upon the human-engineered design. We showcase both, unconstrained experiments with NGE where the graph $( V , E , A )$ is fine-tuned, and constrained fine-tuning experiments where the topology of the graph is preserved and only the node attributes $\\{ A ( u ) \\}$ are fine-tuned. In the baseline models, the graph $( V , E , A )$ is fixed, and only the controllers are trained. We can see in Figure 4 that when given the same wall-clock time, it is better to co-evolve the attributes and controllers with NGE than only training the controllers. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 750,
1066
+ 825,
1067
+ 861
1068
+ ],
1069
+ "page_idx": 7
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "The figure shows that with NGE, the cheetah gradually transforms the forefoot into a claw, the 3D-fish rotates the pose of the side-fins and tail, and the 2D-walker evolves bigger feet. In general, unconstrained fine-tuning with NGE leads to better performance, but not necessarily preserves the initial structures. ",
1074
+ "bbox": [
1075
+ 176,
1076
+ 867,
1077
+ 825,
1078
+ 924
1079
+ ],
1080
+ "page_idx": 7
1081
+ },
1082
+ {
1083
+ "type": "image",
1084
+ "img_path": "images/5fbb41d8252c34ce241a6c560a063ef4faa5d6f1f740b48a07d2a82c2d37c501.jpg",
1085
+ "image_caption": [
1086
+ "Figure 5: Results of ablation study, NGE without uncertainty results and rapid evolution during experiments. "
1087
+ ],
1088
+ "image_footnote": [],
1089
+ "bbox": [
1090
+ 200,
1091
+ 102,
1092
+ 790,
1093
+ 253
1094
+ ],
1095
+ "page_idx": 8
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "4.3 GREEDY SEARCH V.S. EXPLORATION UNDER UNCERTAINTY ",
1100
+ "text_level": 1,
1101
+ "bbox": [
1102
+ 176,
1103
+ 323,
1104
+ 629,
1105
+ 337
1106
+ ],
1107
+ "page_idx": 8
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "We also investigate the performance of NGE with and without Graph Mutation with Uncertainty, whose hyper-parameters are summarized in Appendix E. In Figure 5a, we applied GM-UC to the evolution graph search task. The final performance of the GM-UC outperforms the baseline on both fish and walker environments. The proposed GM-UC is able to better explore the graph space, showcasing its importance. ",
1112
+ "bbox": [
1113
+ 174,
1114
+ 349,
1115
+ 826,
1116
+ 419
1117
+ ],
1118
+ "page_idx": 8
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "4.4 COMPUTATION COST AND GENERATION SIZE ",
1123
+ "text_level": 1,
1124
+ "bbox": [
1125
+ 176,
1126
+ 438,
1127
+ 529,
1128
+ 452
1129
+ ],
1130
+ "page_idx": 8
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "We also investigate how the generation size $\\mathcal { N }$ affect the final performance of NGE. We note that as we increase the generation size and the computing resources, NGE achieves marginal improvement on the simple Fish task. A NGE session with 16-core m5.4xlarge $\\$ 0.768$ per Hr) AWS machine can achieve almost the same performance with 64-core m4.16xlarge $\\$ 3.20$ per Hr) in Fish environment in the same wall-clock time. However, we do notice that there is a trade off between computational resources and performance for the more difficult task. In general, NGE is effective even when the computing resources are limited and it significantly outperforms RGS and ES by using only a small generation size of 16. ",
1135
+ "bbox": [
1136
+ 174,
1137
+ 465,
1138
+ 825,
1139
+ 577
1140
+ ],
1141
+ "page_idx": 8
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "5 DISCUSSION ",
1146
+ "text_level": 1,
1147
+ "bbox": [
1148
+ 174,
1149
+ 599,
1150
+ 310,
1151
+ 614
1152
+ ],
1153
+ "page_idx": 8
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "In this paper, we introduced NGE, an efficient graph search algorithm for automatic robot design that co-evolves the robot design graph and its controllers. NGE greatly reduces evaluation cost by transferring the learned GNN-based control policy from previous generations, and better explores the search space by incorporating model uncertainties. Our experiments show that the search over the robotic body structures is challenging, where both random graph search and evolutionary strategy fail to discover meaning robot designs. NGE significantly outperforms the naive approaches in both the final performance and computation time by an order of magnitude, and is the first algorithm that can discovers graphs similar to carefully hand-engineered design. We believe this work is an important step towards automated robot design, and may show itself useful to other graph search problems. ",
1158
+ "bbox": [
1159
+ 174,
1160
+ 631,
1161
+ 825,
1162
+ 757
1163
+ ],
1164
+ "page_idx": 8
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Acknowledgements Partially supported by Samsung and NSERC. We also thank NVIDIA for their donation of GPUs. ",
1169
+ "bbox": [
1170
+ 174,
1171
+ 777,
1172
+ 823,
1173
+ 806
1174
+ ],
1175
+ "page_idx": 8
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "REFERENCES ",
1180
+ "text_level": 1,
1181
+ "bbox": [
1182
+ 174,
1183
+ 829,
1184
+ 285,
1185
+ 844
1186
+ ],
1187
+ "page_idx": 8
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. arXiv preprint arXiv:1710.03748, 2017. ",
1192
+ "bbox": [
1193
+ 174,
1194
+ 854,
1195
+ 825,
1196
+ 882
1197
+ ],
1198
+ "page_idx": 8
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. ICLR, 2014. ",
1203
+ "bbox": [
1204
+ 176,
1205
+ 895,
1206
+ 821,
1207
+ 924
1208
+ ],
1209
+ "page_idx": 8
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Roberto Calandra, André Seyfarth, Jan Peters, and Marc Peter Deisenroth. Bayesian optimization for learning gaits under uncertainty. Annals of Mathematics and Artificial Intelligence, 76(1-2):5–23, 2016. ",
1214
+ "bbox": [
1215
+ 173,
1216
+ 103,
1217
+ 823,
1218
+ 145
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "Nick Cheney, Robert MacCurdy, Jeff Clune, and Hod Lipson. Unshackling evolution: Evolving soft robots with multiple materials and a powerful generative encoding. ACM SIGEVOlution, 7(1): 11–23, 2014. ",
1225
+ "bbox": [
1226
+ 173,
1227
+ 155,
1228
+ 823,
1229
+ 196
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Kurtland Chua, Roberto Calandra, Rowan McAllister, and Sergey Levine. Deep reinforcement learning in a handful of trials using probabilistic dynamics models. arXiv preprint arXiv:1805.12114, 2018. ",
1236
+ "bbox": [
1237
+ 174,
1238
+ 207,
1239
+ 826,
1240
+ 248
1241
+ ],
1242
+ "page_idx": 9
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. ",
1247
+ "bbox": [
1248
+ 173,
1249
+ 257,
1250
+ 823,
1251
+ 287
1252
+ ],
1253
+ "page_idx": 9
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NIPS, 2016. ",
1258
+ "bbox": [
1259
+ 173,
1260
+ 295,
1261
+ 823,
1262
+ 325
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Paul Drews, Grady Williams, Brian Goldfain, Evangelos A Theodorou, and James M Rehg. Aggressive deep driving: Combining convolutional neural networks and model predictive control. In Conference on Robot Learning, pp. 133–142, 2017. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 333,
1272
+ 826,
1273
+ 377
1274
+ ],
1275
+ "page_idx": 9
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "David Duff, Mark Yim, and Kimon Roufas. Evolution of polybot: A modular reconfigurable robot. In Proc. of the Harmonic Drive Intl. Symposium, Nagano, Japan, 2001. ",
1280
+ "bbox": [
1281
+ 174,
1282
+ 385,
1283
+ 825,
1284
+ 415
1285
+ ],
1286
+ "page_idx": 9
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "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 NIPS, 2015. ",
1291
+ "bbox": [
1292
+ 174,
1293
+ 422,
1294
+ 826,
1295
+ 467
1296
+ ],
1297
+ "page_idx": 9
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059, 2016. ",
1302
+ "bbox": [
1303
+ 174,
1304
+ 474,
1305
+ 826,
1306
+ 517
1307
+ ],
1308
+ "page_idx": 9
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Nicolas Heess, Srinivasan Sriram, Jay Lemmon, Josh Merel, Greg Wayne, Yuval Tassa, Tom Erez, Ziyu Wang, Ali Eslami, Martin Riedmiller, et al. Emergence of locomotion behaviours in rich environments. arXiv preprint arXiv:1707.02286, 2017. ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 526,
1316
+ 823,
1317
+ 570
1318
+ ],
1319
+ "page_idx": 9
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015. ",
1324
+ "bbox": [
1325
+ 171,
1326
+ 578,
1327
+ 825,
1328
+ 608
1329
+ ],
1330
+ "page_idx": 9
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Michał Joachimczak, Reiji Suzuki, and Takaya Arita. Fine grained artificial development for bodycontroller coevolution of soft-bodied animats. Artificial life, 14:239–246, 2014. ",
1335
+ "bbox": [
1336
+ 171,
1337
+ 616,
1338
+ 825,
1339
+ 646
1340
+ ],
1341
+ "page_idx": 9
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. ICLR, 2017. ",
1346
+ "bbox": [
1347
+ 171,
1348
+ 654,
1349
+ 825,
1350
+ 683
1351
+ ],
1352
+ "page_idx": 9
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "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. ",
1357
+ "bbox": [
1358
+ 176,
1359
+ 691,
1360
+ 826,
1361
+ 734
1362
+ ],
1363
+ "page_idx": 9
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Christopher G Langton. Artificial life: An overview. Mit Press, 1997. ",
1368
+ "bbox": [
1369
+ 174,
1370
+ 743,
1371
+ 629,
1372
+ 760
1373
+ ],
1374
+ "page_idx": 9
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Wei-Po Lee. An evolutionary system for automatic robot design. In Systems, Man, and Cybernetics, 1998. 1998 IEEE International Conference on, volume 4, pp. 3477–3482. IEEE, 1998. ",
1379
+ "bbox": [
1380
+ 174,
1381
+ 767,
1382
+ 826,
1383
+ 796
1384
+ ],
1385
+ "page_idx": 9
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015. ",
1390
+ "bbox": [
1391
+ 173,
1392
+ 805,
1393
+ 825,
1394
+ 835
1395
+ ],
1396
+ "page_idx": 9
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. arXiv preprint arXiv:1711.00436, 2017. ",
1401
+ "bbox": [
1402
+ 174,
1403
+ 843,
1404
+ 826,
1405
+ 886
1406
+ ],
1407
+ "page_idx": 9
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Melanie Mitchell and Stephanie Forrest. Genetic algorithms and artificial life. Artificial life, 1(3): 267–289, 1994. ",
1412
+ "bbox": [
1413
+ 173,
1414
+ 895,
1415
+ 823,
1416
+ 924
1417
+ ],
1418
+ "page_idx": 9
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. ",
1423
+ "bbox": [
1424
+ 176,
1425
+ 103,
1426
+ 823,
1427
+ 146
1428
+ ],
1429
+ "page_idx": 10
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016. ",
1434
+ "bbox": [
1435
+ 176,
1436
+ 155,
1437
+ 823,
1438
+ 198
1439
+ ],
1440
+ "page_idx": 10
1441
+ },
1442
+ {
1443
+ "type": "text",
1444
+ "text": "Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. arXiv preprint arXiv:1708.02596, 2017. ",
1445
+ "bbox": [
1446
+ 174,
1447
+ 207,
1448
+ 823,
1449
+ 250
1450
+ ],
1451
+ "page_idx": 10
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "Ferrante Neri. Memetic compact differential evolution for cartesian robot control. IEEE Computational Intelligence Magazine, 5(2):54–65, 2010. ",
1456
+ "bbox": [
1457
+ 173,
1458
+ 257,
1459
+ 823,
1460
+ 287
1461
+ ],
1462
+ "page_idx": 10
1463
+ },
1464
+ {
1465
+ "type": "text",
1466
+ "text": "Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018. ",
1467
+ "bbox": [
1468
+ 173,
1469
+ 295,
1470
+ 823,
1471
+ 325
1472
+ ],
1473
+ "page_idx": 10
1474
+ },
1475
+ {
1476
+ "type": "text",
1477
+ "text": "Aravind Rajeswaran, Kendall Lowrey, Emanuel V Todorov, and Sham M Kakade. Towards generalization and simplicity in continuous control. In Advances in Neural Information Processing Systems, pp. 6553–6564, 2017. ",
1478
+ "bbox": [
1479
+ 173,
1480
+ 333,
1481
+ 825,
1482
+ 376
1483
+ ],
1484
+ "page_idx": 10
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. ",
1489
+ "bbox": [
1490
+ 173,
1491
+ 385,
1492
+ 823,
1493
+ 414
1494
+ ],
1495
+ "page_idx": 10
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "Karl Sims. Evolving virtual creatures. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques, pp. 15–22. ACM, 1994. ",
1500
+ "bbox": [
1501
+ 174,
1502
+ 422,
1503
+ 823,
1504
+ 452
1505
+ ],
1506
+ "page_idx": 10
1507
+ },
1508
+ {
1509
+ "type": "text",
1510
+ "text": "Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pp. 2951–2959, 2012. ",
1511
+ "bbox": [
1512
+ 173,
1513
+ 460,
1514
+ 825,
1515
+ 489
1516
+ ],
1517
+ "page_idx": 10
1518
+ },
1519
+ {
1520
+ "type": "text",
1521
+ "text": "Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002. ",
1522
+ "bbox": [
1523
+ 173,
1524
+ 498,
1525
+ 823,
1526
+ 527
1527
+ ],
1528
+ "page_idx": 10
1529
+ },
1530
+ {
1531
+ "type": "text",
1532
+ "text": "Luc Steels. The artificial life roots of artificial intelligence. Artificial life, 1(1_2):75–110, 1993. ",
1533
+ "bbox": [
1534
+ 169,
1535
+ 535,
1536
+ 799,
1537
+ 551
1538
+ ],
1539
+ "page_idx": 10
1540
+ },
1541
+ {
1542
+ "type": "text",
1543
+ "text": "Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012. ",
1544
+ "bbox": [
1545
+ 173,
1546
+ 559,
1547
+ 823,
1548
+ 603
1549
+ ],
1550
+ "page_idx": 10
1551
+ },
1552
+ {
1553
+ "type": "text",
1554
+ "text": "Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. arXiv preprint arXiv:1801.00690, 2018. ",
1555
+ "bbox": [
1556
+ 174,
1557
+ 611,
1558
+ 826,
1559
+ 655
1560
+ ],
1561
+ "page_idx": 10
1562
+ },
1563
+ {
1564
+ "type": "text",
1565
+ "text": "Tim Taylor. Evolution in virtual worlds. arXiv preprint arXiv:1710.06055, 2017. ",
1566
+ "bbox": [
1567
+ 173,
1568
+ 662,
1569
+ 705,
1570
+ 679
1571
+ ],
1572
+ "page_idx": 10
1573
+ },
1574
+ {
1575
+ "type": "text",
1576
+ "text": "Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012. ",
1577
+ "bbox": [
1578
+ 173,
1579
+ 686,
1580
+ 828,
1581
+ 729
1582
+ ],
1583
+ "page_idx": 10
1584
+ },
1585
+ {
1586
+ "type": "text",
1587
+ "text": "Li Wan, Matthew Zeiler, Sixin Zhang, Yann Le Cun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning, pp. 1058–1066, 2013. ",
1588
+ "bbox": [
1589
+ 173,
1590
+ 738,
1591
+ 825,
1592
+ 780
1593
+ ],
1594
+ "page_idx": 10
1595
+ },
1596
+ {
1597
+ "type": "text",
1598
+ "text": "Tingwu Wang, Renjie Liao, Jimmy Ba, and Sanja Fidler. Nervenet: Learning structured policy with graph neural networks. In ICLR, 2018. ",
1599
+ "bbox": [
1600
+ 171,
1601
+ 790,
1602
+ 823,
1603
+ 820
1604
+ ],
1605
+ "page_idx": 10
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. ",
1610
+ "bbox": [
1611
+ 171,
1612
+ 828,
1613
+ 823,
1614
+ 858
1615
+ ],
1616
+ "page_idx": 10
1617
+ },
1618
+ {
1619
+ "type": "image",
1620
+ "img_path": "images/b5211ae0f5290b26b5598c34119199588fefd60fcfea62b58bcedd35e02f549a.jpg",
1621
+ "image_caption": [
1622
+ "Figure 6: In this figure, we show the computation graph of NerveNet+ $^ +$ . At each timestep, every node in the graph updates its hidden state by absorbing the messages as well as the input feature. The output function takes the hidden states as input and outputs the controller (or policy) of the agent. "
1623
+ ],
1624
+ "image_footnote": [],
1625
+ "bbox": [
1626
+ 178,
1627
+ 103,
1628
+ 821,
1629
+ 303
1630
+ ],
1631
+ "page_idx": 11
1632
+ },
1633
+ {
1634
+ "type": "text",
1635
+ "text": "A DETAILS OF NERVENET $^ { + + }$ ",
1636
+ "text_level": 1,
1637
+ "bbox": [
1638
+ 178,
1639
+ 386,
1640
+ 433,
1641
+ 401
1642
+ ],
1643
+ "page_idx": 11
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "Similar to NerveNet, we parse the agent into a graph, where each node in the graph corresponds to the physical body part of the agents. For example, the fish in Figure 1 can be parsed into a graph of five nodes, namely the torso (0), left-fin (1), right-fin (2), and tail-fin bodies (3, 4). By replacing MLP with NerveNet, the learnt policy has much better performance in terms of robustness and the transfer learning ability. We here propose minor but effective modifications to Wang et al. (2018), and refer to this model as NerveNet++. ",
1648
+ "bbox": [
1649
+ 173,
1650
+ 417,
1651
+ 825,
1652
+ 501
1653
+ ],
1654
+ "page_idx": 11
1655
+ },
1656
+ {
1657
+ "type": "text",
1658
+ "text": "In the original NerveNet, at every timestep, several propagation steps need to be performed such that every node is able to receive global information before producing the control signal. This is time and memory consuming, with the minimum number of propagation steps constrained by the depth of the graph. ",
1659
+ "bbox": [
1660
+ 174,
1661
+ 507,
1662
+ 825,
1663
+ 564
1664
+ ],
1665
+ "page_idx": 11
1666
+ },
1667
+ {
1668
+ "type": "text",
1669
+ "text": "Since the episode of each game usually lasts for several hundred timesteps, it is computationally expensive and ineffective to build the full back-propagation graph. Inspired by Mnih et al. (2016), we employ the truncated graph back-propagation to optimize the policy. NerveNet+ $^ { \\cdot + }$ is suitable for an evolutionary search or population-based optimization, as it brings speed-up in wall-clock time, and decreases the amount of memory usage. ",
1670
+ "bbox": [
1671
+ 174,
1672
+ 570,
1673
+ 825,
1674
+ 640
1675
+ ],
1676
+ "page_idx": 11
1677
+ },
1678
+ {
1679
+ "type": "text",
1680
+ "text": "Therefore in NerveNe $^ { + + }$ , we propose a propagation model with the memory state, where each node updates its hidden state by absorbing the input feature and a message with time. The number of propagation steps is no longer constrained by the depth of the graph, and in back-propagation, we save memory and time consumption with truncated computation graph. ",
1681
+ "bbox": [
1682
+ 173,
1683
+ 647,
1684
+ 825,
1685
+ 704
1686
+ ],
1687
+ "page_idx": 11
1688
+ },
1689
+ {
1690
+ "type": "text",
1691
+ "text": "The computational performance evaluation is provided in Appendix B. NerveNet+ $^ +$ model is trained by the PPO algorithm Schulman et al. (2017); Heess et al. (2017), ",
1692
+ "bbox": [
1693
+ 174,
1694
+ 710,
1695
+ 823,
1696
+ 739
1697
+ ],
1698
+ "page_idx": 11
1699
+ },
1700
+ {
1701
+ "type": "text",
1702
+ "text": "B OPTIMIZATION WITH TRUNCATED BACKPROPAGATION ",
1703
+ "text_level": 1,
1704
+ "bbox": [
1705
+ 176,
1706
+ 758,
1707
+ 663,
1708
+ 775
1709
+ ],
1710
+ "page_idx": 11
1711
+ },
1712
+ {
1713
+ "type": "text",
1714
+ "text": "During training, the agent generates the rollout data by sampling from the distribution $a _ { t } \\sim \\pi ( a _ { t } | s _ { t } )$ and stores the training data of $\\mathcal { D } = \\{ a ^ { t } , s ^ { t } , \\{ h _ { u } ^ { t , \\tau = 0 } \\} \\}$ . To train the reinforcement learning agents with memory, the original training objective is ",
1715
+ "bbox": [
1716
+ 176,
1717
+ 790,
1718
+ 825,
1719
+ 833
1720
+ ],
1721
+ "page_idx": 11
1722
+ },
1723
+ {
1724
+ "type": "equation",
1725
+ "img_path": "images/4d72c46292f80e4544f7ebf20f13185a81cde2ca29941fd15fe7a08b2667fb47.jpg",
1726
+ "text": "$$\nJ ( \\theta ) = \\mathbb { E } _ { \\pi } \\left[ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r ( s ^ { t } , a ^ { t } , \\{ h _ { u } ^ { t , \\tau = 0 } \\} ) \\right] ,\n$$",
1727
+ "text_format": "latex",
1728
+ "bbox": [
1729
+ 364,
1730
+ 837,
1731
+ 632,
1732
+ 880
1733
+ ],
1734
+ "page_idx": 11
1735
+ },
1736
+ {
1737
+ "type": "text",
1738
+ "text": "where we denote the whole update model as $H$ and ",
1739
+ "bbox": [
1740
+ 173,
1741
+ 883,
1742
+ 511,
1743
+ 898
1744
+ ],
1745
+ "page_idx": 11
1746
+ },
1747
+ {
1748
+ "type": "equation",
1749
+ "img_path": "images/4abb1ced89bffbe22c5457ceedf9f71de01c40ae5763e6ac3818d7bc349bb018.jpg",
1750
+ "text": "$$\nh _ { u } ^ { t + 1 , \\tau = 0 } = H ( \\{ h _ { v } ^ { t , \\tau = 0 } \\} , s ^ { t } , a ^ { t } ) .\n$$",
1751
+ "text_format": "latex",
1752
+ "bbox": [
1753
+ 390,
1754
+ 902,
1755
+ 607,
1756
+ 921
1757
+ ],
1758
+ "page_idx": 11
1759
+ },
1760
+ {
1761
+ "type": "image",
1762
+ "img_path": "images/0cf94e39d660ebd29877df92792868564f3a09bea210994b1c774e00bd3db98f.jpg",
1763
+ "image_caption": [
1764
+ "Figure 7: In these two figures, we show that to reach similar performance, NerveNet+ $^ +$ took shorter time comparing to original NerveNet. "
1765
+ ],
1766
+ "image_footnote": [],
1767
+ "bbox": [
1768
+ 176,
1769
+ 104,
1770
+ 800,
1771
+ 303
1772
+ ],
1773
+ "page_idx": 12
1774
+ },
1775
+ {
1776
+ "type": "text",
1777
+ "text": "The memory state $h _ { u } ^ { t + 1 , \\tau }$ depends on the previous actions, observations, and states. Therefore, the full back-propagation graph will be the same length as the episode length, which is very computationally intensive. The intuition from the authors in Mnih et al. (2016) is that, for the RL agents, the dependency of the agents on timesteps that are far-away from the current timestep is limited. Thus, negligible accuracy of the gradient estimator will be lost if we truncate the back-propagation graph. We define a back-propagation length $\\Gamma$ , and optimize the following objective function instead: ",
1778
+ "bbox": [
1779
+ 173,
1780
+ 372,
1781
+ 826,
1782
+ 457
1783
+ ],
1784
+ "page_idx": 12
1785
+ },
1786
+ {
1787
+ "type": "equation",
1788
+ "img_path": "images/0cc17035cbd39f575923666b1d481b761bc5e85d9d42ffc592d94a63ff7b2855.jpg",
1789
+ "text": "$$\n\\begin{array} { r l } & { \\quad J _ { T } ( \\theta ) = \\mathbb E _ { \\pi } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { \\infty } \\displaystyle \\sum _ { \\kappa = 0 } ^ { \\Gamma - 1 } \\gamma ^ { t + \\kappa } r ( s _ { t + \\kappa } , a _ { t + \\kappa } , \\{ h _ { u } ^ { t , \\tau = 0 } \\} ) \\right] , \\ : \\mathrm { w h e r e } } \\\\ & { \\quad h _ { u } ^ { t + \\kappa , \\tau = 0 } = \\left\\{ \\begin{array} { l l } { H ( \\{ h _ { v } ^ { t + \\kappa - 1 , \\tau = 0 } , \\forall v \\} , s _ { t + \\kappa - 1 } , a _ { t + \\kappa - 1 } ) \\quad } & { \\kappa \\neq 0 , } \\\\ { h _ { u } ^ { t , \\tau = 0 } \\in \\mathcal D \\quad } & { \\kappa = 0 , } \\end{array} \\right. } \\end{array}\n$$",
1790
+ "text_format": "latex",
1791
+ "bbox": [
1792
+ 272,
1793
+ 467,
1794
+ 717,
1795
+ 546
1796
+ ],
1797
+ "page_idx": 12
1798
+ },
1799
+ {
1800
+ "type": "text",
1801
+ "text": "Essentially this optimization means that we only back-propagate up to $\\Gamma$ timesteps, namely at the places where $\\kappa = 0$ , we treat the hidden state as input to the network and stop the gradient. To optimize the objective function, we follow same optimization procedure as in Wang et al. (2018), which is a variant of PPO Schulman et al. (2017), where a surrogate loss $J _ { \\mathrm { p p o } } ( \\theta )$ is optimized. We refer the readers to these papers for algorithm details. ",
1802
+ "bbox": [
1803
+ 174,
1804
+ 555,
1805
+ 825,
1806
+ 626
1807
+ ],
1808
+ "page_idx": 12
1809
+ },
1810
+ {
1811
+ "type": "text",
1812
+ "text": "C FULL NGE RESULTS ",
1813
+ "text_level": 1,
1814
+ "bbox": [
1815
+ 174,
1816
+ 648,
1817
+ 383,
1818
+ 666
1819
+ ],
1820
+ "page_idx": 12
1821
+ },
1822
+ {
1823
+ "type": "text",
1824
+ "text": "Similar to the fish genealogy tree, in Fig. 8, the simple initial walking agent evolves into a cheetah-like structure, and is able to run with high speed. We also show the species generated by NGE, ESS-Sims (ESS-Sims-AF to be more specific, which has the best performance among all ESS-Sims variants.) and RGS. ",
1825
+ "bbox": [
1826
+ 174,
1827
+ 684,
1828
+ 825,
1829
+ 739
1830
+ ],
1831
+ "page_idx": 12
1832
+ },
1833
+ {
1834
+ "type": "text",
1835
+ "text": "D RESETTING CONTROLLER FOR FAIR COMPETITION ",
1836
+ "text_level": 1,
1837
+ "bbox": [
1838
+ 174,
1839
+ 763,
1840
+ 633,
1841
+ 781
1842
+ ],
1843
+ "page_idx": 12
1844
+ },
1845
+ {
1846
+ "type": "text",
1847
+ "text": "Although amortized fitness is a better estimation of the ground-truth fitness, it is still biased. Species that appear earlier in the experiment will be trained for more updates if it survives. Indeed, intuitively, it is possible that in real nature, species that appear earlier on will dominate the generation by number, and new species are eliminated even if the new species has better fitness. Therefore, we design the experiment where we reset the weights for all species $\\theta = ( \\theta _ { \\Phi } , \\theta _ { \\zeta } , \\theta _ { M } , \\theta _ { U } , \\theta _ { F } )$ randomly. By doing this, we are forcing the species to compete fairly. From Fig 10, we notice that this method helps exploration, which leads to a higher reward in the end. However, it usually takes a longer time for the algorithm to converge. Therefore for the graph search task in Fig 2, we do not include the results with the controller-resetting. ",
1848
+ "bbox": [
1849
+ 173,
1850
+ 797,
1851
+ 825,
1852
+ 924
1853
+ ],
1854
+ "page_idx": 12
1855
+ },
1856
+ {
1857
+ "type": "image",
1858
+ "img_path": "images/716e206836792ddab9d1fc8348ce669faab16f2ec614d74faee62e59a8209062.jpg",
1859
+ "image_caption": [
1860
+ "Figure 8: Our walker species gradually grows two foot-like structures from randomly initialized body graph. "
1861
+ ],
1862
+ "image_footnote": [],
1863
+ "bbox": [
1864
+ 173,
1865
+ 99,
1866
+ 826,
1867
+ 328
1868
+ ],
1869
+ "page_idx": 13
1870
+ },
1871
+ {
1872
+ "type": "image",
1873
+ "img_path": "images/a406d83d3adcc19b5eac6dc93df042348580e2442eae8c5093c0f282310809d3.jpg",
1874
+ "image_caption": [
1875
+ "Figure 9: We present qualitative comparison between the three algorithms in the figure. Specifically, the aligned comparison between our method and naive baseline are the representative creatures at the same generation (using same computation resources). Our algorithm notably display stronger dominance in terms of its structure as well as reward. "
1876
+ ],
1877
+ "image_footnote": [],
1878
+ "bbox": [
1879
+ 174,
1880
+ 386,
1881
+ 823,
1882
+ 474
1883
+ ],
1884
+ "page_idx": 13
1885
+ },
1886
+ {
1887
+ "type": "image",
1888
+ "img_path": "images/c1838debebc25ca3af12e8c06a8bc188ee90c8eab19018442aa7d90a55637911.jpg",
1889
+ "image_caption": [
1890
+ "Figure 10: The results of resetting controller scheme and baselines. "
1891
+ ],
1892
+ "image_footnote": [],
1893
+ "bbox": [
1894
+ 338,
1895
+ 564,
1896
+ 655,
1897
+ 748
1898
+ ],
1899
+ "page_idx": 13
1900
+ },
1901
+ {
1902
+ "type": "text",
1903
+ "text": "E HYPER-PARAMETERS SEARCHED ",
1904
+ "text_level": 1,
1905
+ "bbox": [
1906
+ 174,
1907
+ 806,
1908
+ 483,
1909
+ 821
1910
+ ],
1911
+ "page_idx": 13
1912
+ },
1913
+ {
1914
+ "type": "text",
1915
+ "text": "All methods are given equal amount of computation budget. To be more specific, the number of total timesteps generated by all species for all generations is the same for all methods. For example, if we use 10 training epochs in one generation, each of the epoch with 2000 sampled timesteps, then the computation budget allows NGE to evolve for 200 generations, where each generation has a species size of 64. For NGE, RGS, ESS-Sims-AF models in Fig 11, we run a grid search over the hyper-parameters recorded in Table 2, and Table 3, and plot the curve with the best results respectively. ",
1916
+ "bbox": [
1917
+ 173,
1918
+ 840,
1919
+ 826,
1920
+ 924
1921
+ ],
1922
+ "page_idx": 13
1923
+ },
1924
+ {
1925
+ "type": "image",
1926
+ "img_path": "images/e98cbe174974ebb813c4abfefabd4eabdc5fbc42014ba545dd6b2894fb925637.jpg",
1927
+ "image_caption": [
1928
+ "Figure 11: The results of the graph search "
1929
+ ],
1930
+ "image_footnote": [],
1931
+ "bbox": [
1932
+ 184,
1933
+ 103,
1934
+ 813,
1935
+ 308
1936
+ ],
1937
+ "page_idx": 14
1938
+ },
1939
+ {
1940
+ "type": "text",
1941
+ "text": "Since the number of generations for the RGS baseline can be regarded as 1, its curve is plotted with the number of updates normalized by the computation resource as $\\mathbf { X }$ -axis. ",
1942
+ "bbox": [
1943
+ 174,
1944
+ 361,
1945
+ 823,
1946
+ 390
1947
+ ],
1948
+ "page_idx": 14
1949
+ },
1950
+ {
1951
+ "type": "text",
1952
+ "text": "Here we show the detail figures of six baselines, which are: RGS-20, RGS-100, RGS-200, and ESS-Sims-AF-20, ESS-Sims-AF-100, ESS-Sims-AF-200. The number attached to the baseline names indicates the number of inner-loop policy training epochs. In the case of RGS-20, where more than 12800 different graphs are searched over, the average reward is still very low. Increasing the number of inner-loop training of species to 100 and 200 does not help the final performance significantly. ",
1953
+ "bbox": [
1954
+ 173,
1955
+ 396,
1956
+ 825,
1957
+ 481
1958
+ ],
1959
+ "page_idx": 14
1960
+ },
1961
+ {
1962
+ "type": "text",
1963
+ "text": "To test the performance with and without GM-UC, we use 64-core clusters (generations of size 64). \nHere, the hyper-parameters are chosen to be the first value available in Table 2 and Table 3. ",
1964
+ "bbox": [
1965
+ 174,
1966
+ 487,
1967
+ 825,
1968
+ 516
1969
+ ],
1970
+ "page_idx": 14
1971
+ },
1972
+ {
1973
+ "type": "table",
1974
+ "img_path": "images/69f6a63ea216ce981481035abfb93affc103e151bcb303cda292dd88c030aa2e.jpg",
1975
+ "table_caption": [
1976
+ "Table 2: Hyperparameter grid search options. "
1977
+ ],
1978
+ "table_footnote": [],
1979
+ "table_body": "<table><tr><td>Items</td><td>Value Tried</td></tr><tr><td>Number of Iteration Per Update Number of Species per Generation Elimination Rate Discrete Socket Timesteps per Updates</td><td>10,20,100,200 16,32,64,100 0.15, 0.20, 0.3 Yes, True 2000,4000,6000</td></tr><tr><td>Target KL Learning Rate Schedule Number of Maximum Generation</td><td>0.01 Adaptive</td></tr><tr><td>Prob of Add-Node,Add-Graph Prob of Pert-Graph Prob of Del-Graph</td><td>400 0.15</td></tr></table>",
1980
+ "bbox": [
1981
+ 289,
1982
+ 531,
1983
+ 709,
1984
+ 753
1985
+ ],
1986
+ "page_idx": 14
1987
+ },
1988
+ {
1989
+ "type": "text",
1990
+ "text": "F MODEL BASED SEARCH USING THOMPSON SAMPLING ",
1991
+ "text_level": 1,
1992
+ "bbox": [
1993
+ 173,
1994
+ 820,
1995
+ 656,
1996
+ 838
1997
+ ],
1998
+ "page_idx": 14
1999
+ },
2000
+ {
2001
+ "type": "text",
2002
+ "text": "Thompson Sampling is a simple heuristic search strategy that is typically applied to the multi-armed bandit problem. The main idea is to select an action proportional to the probability of the action being optimal. When applied to the graph search problem, Thompson Sampling allows the search to balance the trade-off between exploration and exploitation by maximizing the expected fitness under the posterior distribution of the surrogate model. ",
2003
+ "bbox": [
2004
+ 174,
2005
+ 853,
2006
+ 825,
2007
+ 924
2008
+ ],
2009
+ "page_idx": 14
2010
+ },
2011
+ {
2012
+ "type": "table",
2013
+ "img_path": "images/ff9603a6a5e527410d728295197abe92075ecdfee5a80527c609767874db9922.jpg",
2014
+ "table_caption": [
2015
+ "Table 3: Hyperparameters grid search options for NGE. "
2016
+ ],
2017
+ "table_footnote": [],
2018
+ "table_body": "<table><tr><td>Items</td><td>Value Tried</td></tr><tr><td>Allow Graph-Add</td><td>True, False</td></tr><tr><td>Graph Mutation with Uncertainty</td><td>True,False</td></tr><tr><td>Pruning Temperature</td><td>0.01, 0.1, 1</td></tr><tr><td>Network Structure</td><td>NerveNet,NerveNet++</td></tr><tr><td>Number Candidates before Pruning</td><td>200,400</td></tr></table>",
2019
+ "bbox": [
2020
+ 285,
2021
+ 102,
2022
+ 714,
2023
+ 200
2024
+ ],
2025
+ "page_idx": 15
2026
+ },
2027
+ {
2028
+ "type": "text",
2029
+ "text": "Formally, Thompson Sampling selects the best graph candidates at each round according to the expected estimated fitness $\\xi _ { P }$ using a surrogate model. The expectation is taken under the posterior distribution of the surrogate $P$ (model|data): ",
2030
+ "bbox": [
2031
+ 174,
2032
+ 251,
2033
+ 826,
2034
+ 295
2035
+ ],
2036
+ "page_idx": 15
2037
+ },
2038
+ {
2039
+ "type": "equation",
2040
+ "img_path": "images/b83e3ea31a2d2f35ed7ffc50ae8ff14b20a2c275b6fa1bd82b91c9d1894ffc59.jpg",
2041
+ "text": "$$\n\\mathcal { G } ^ { * } = \\arg \\operatorname* { m a x } _ { \\mathcal { G } } \\mathbb { E } _ { P ( \\mathrm { m o d e l } | \\mathrm { d a t a } ) } \\left[ \\xi _ { P } \\left( \\mathcal { G } | \\mathrm { m o d e l } \\right) \\right] .\n$$",
2042
+ "text_format": "latex",
2043
+ "bbox": [
2044
+ 351,
2045
+ 301,
2046
+ 645,
2047
+ 324
2048
+ ],
2049
+ "page_idx": 15
2050
+ },
2051
+ {
2052
+ "type": "text",
2053
+ "text": "F.1 SURROGATE MODEL ON GRAPHS.",
2054
+ "text_level": 1,
2055
+ "bbox": [
2056
+ 176,
2057
+ 340,
2058
+ 442,
2059
+ 354
2060
+ ],
2061
+ "page_idx": 15
2062
+ },
2063
+ {
2064
+ "type": "text",
2065
+ "text": "Here we consider a graph neural network (GNN) surrogate model to predict the average fitness of a graph as a Gaussian distribution, namely $\\boldsymbol { P } \\left( f ( \\boldsymbol { \\mathcal { G } } ) \\right) \\ \\stackrel { \\sim } { \\sim } \\mathcal { N } \\left( \\xi _ { P } ( \\boldsymbol { \\mathcal { G } } ) , \\stackrel { \\sim } { \\sigma } ^ { 2 } ( \\boldsymbol { \\mathcal { G } } ) \\right)$ . We use a simple architecture that predicts the mean of the Gaussian from the last hidden layer activations, $h _ { W } ( { \\mathcal { G } } ) \\in$ $\\mathbb { R } ^ { D }$ , of the GNN, where $W$ are the weights in the GNN up to the last hidden layer. ",
2066
+ "bbox": [
2067
+ 173,
2068
+ 366,
2069
+ 825,
2070
+ 424
2071
+ ],
2072
+ "page_idx": 15
2073
+ },
2074
+ {
2075
+ "type": "text",
2076
+ "text": "Greedy search. We denoted the size of dataset as $N$ . The GNN weights are trained to predict the average fitness of the graph as a standard regression task: ",
2077
+ "bbox": [
2078
+ 173,
2079
+ 438,
2080
+ 825,
2081
+ 468
2082
+ ],
2083
+ "page_idx": 15
2084
+ },
2085
+ {
2086
+ "type": "equation",
2087
+ "img_path": "images/187dd85dda9307f4619dded083f00332fc27bdcdd7e7f7b00ffc62505d8a04b6.jpg",
2088
+ "text": "$$\n\\operatorname* { m i n } _ { W , W _ { o u t } } \\frac { \\beta } { 2 } \\sum _ { n = 1 } ^ { N } \\left( \\xi ( \\mathcal { G } _ { n } ) - \\xi _ { P } ( \\mathcal { G } _ { n } ) \\right) ^ { 2 } , \\quad \\mathrm { w h e r e } \\quad \\xi _ { P } ( \\mathcal { G } _ { n } ) = W _ { o u t } ^ { T } h _ { W } ( \\mathcal { G } _ { n } )\n$$",
2089
+ "text_format": "latex",
2090
+ "bbox": [
2091
+ 264,
2092
+ 473,
2093
+ 736,
2094
+ 517
2095
+ ],
2096
+ "page_idx": 15
2097
+ },
2098
+ {
2099
+ "type": "text",
2100
+ "text": "Algorithm 2 Greedy Search ",
2101
+ "text_level": 1,
2102
+ "bbox": [
2103
+ 174,
2104
+ 541,
2105
+ 361,
2106
+ 556
2107
+ ],
2108
+ "page_idx": 15
2109
+ },
2110
+ {
2111
+ "type": "text",
2112
+ "text": "1: Initialize generation $\\mathcal { P } ^ { 0 }$ \n2: for $j <$ maximum generations do \n3: Collect the $( \\xi _ { i } ^ { k } , \\mathcal { G } _ { i } ^ { k } )$ from previous $k \\leq j$ generations . Update dataset \n4: Train $W$ and $W _ { o u t }$ on $\\{ ( \\xi _ { i } ^ { k } , \\mathcal { G } _ { i } ^ { k } ) \\} _ { n = 1 } ^ { N }$ . Train GM-UC \n5: Propose $\\mathcal { C }$ new graph $\\{ \\mathcal { G } _ { i } \\} _ { i = 1 } ^ { \\mathcal { C } }$ , ${ \\mathcal { C } } > > M$ . $\\triangleright$ Propose new candidates \n6: Rank $\\{ \\xi _ { P } ( \\mathcal { G } _ { i } | W , W _ { o u t } ) \\} _ { i = 1 } ^ { \\mathcal { C } }$ on the proposals and pick the top $\\kappa$ . Prune candidates \n7: Update generation $\\mathcal { P } ^ { j }$ \n8: for $m < \\mathcal N$ do $\\triangleright$ Train and evaluate each species \n9: for $k <$ maximum parameter updates do \n10: Train policy πGm \n11: end for \n12: Evaluate the fitness $\\xi ( \\mathcal { G } _ { m } , \\theta _ { m } )$ \n13: end for \n14: end for ",
2113
+ "bbox": [
2114
+ 176,
2115
+ 561,
2116
+ 826,
2117
+ 763
2118
+ ],
2119
+ "page_idx": 15
2120
+ },
2121
+ {
2122
+ "type": "text",
2123
+ "text": "Thompson Sampling In practice, Thompson Sampling is very similar to the previous greedy search algorithm. Instead of picking the top action according to the best model parameters, at each generation, it draws a sample of the model and takes a greedy action under the sampled model. ",
2124
+ "bbox": [
2125
+ 174,
2126
+ 796,
2127
+ 825,
2128
+ 840
2129
+ ],
2130
+ "page_idx": 15
2131
+ },
2132
+ {
2133
+ "type": "text",
2134
+ "text": "Approximating Thompson Sampling using Dropout Performing dropout during inference can be viewed as an approximately sampling from the model posterior. At each generation, we will sample a single dropout mask for the surrogate model and rank all the proposed graphs accordingly. ",
2135
+ "bbox": [
2136
+ 176,
2137
+ 854,
2138
+ 825,
2139
+ 897
2140
+ ],
2141
+ "page_idx": 15
2142
+ },
2143
+ {
2144
+ "type": "text",
2145
+ "text": "Algorithm 3 Thompson Sampling using Bayesian Neural Networks ",
2146
+ "text_level": 1,
2147
+ "bbox": [
2148
+ 173,
2149
+ 186,
2150
+ 619,
2151
+ 202
2152
+ ],
2153
+ "page_idx": 16
2154
+ },
2155
+ {
2156
+ "type": "text",
2157
+ "text": "1: Initialize generation P0 \n2: for $j <$ maximum generations do \n3: Collect the $( \\xi _ { i } ^ { k } , \\mathcal { G } _ { i } ^ { k } )$ from previous $k \\leq j$ generations . Update dataset \n4: Train $W$ and $W _ { o u t }$ on $\\{ ( \\xi _ { i } ^ { k } , \\mathcal { G } _ { i } ^ { k } ) \\} _ { n = 1 } ^ { N }$ . Train GM-UC \n5: Propose $\\mathcal { C }$ new graph $\\{ \\mathcal { G } _ { i } \\} _ { i = 1 } ^ { \\mathcal { C } } , \\mathcal { C } > > M$ . . Propose new candidates \n6: Sample a model from the posterior of the weights. \n7: e.g. $\\widetilde { W } , \\widetilde { W } _ { o u t } \\sim P \\left( W , W _ { o u t } | D \\right) \\approx \\mathcal { N } \\left( [ W , W _ { o u t } ] , [ W , W _ { o u t } ] \\right)$ \n8: (similar to DropConnect Wan et al. (2013)) \n9: Rank $\\{ \\xi _ { P } ( \\mathcal { G } _ { i } | \\widetilde { W } , \\widetilde { W } _ { o u t } ) \\} _ { i = 1 } ^ { \\mathcal { C } }$ on the proposals and pick the top $\\kappa$ \n10: for $m < \\mathcal N$ do $\\triangleright$ Train and evaluate each species \n11: for $k <$ maximum parameter updates do \n12: Train policy πGm \n13: end for \n14: Evaluate the fitness $\\xi ( \\mathcal { G } _ { m } , \\theta _ { m } )$ \n15: end for \n16: end for ",
2158
+ "bbox": [
2159
+ 178,
2160
+ 207,
2161
+ 826,
2162
+ 440
2163
+ ],
2164
+ "page_idx": 16
2165
+ },
2166
+ {
2167
+ "type": "text",
2168
+ "text": "Algorithm 4 Thompson Sampling with Dropout ",
2169
+ "text_level": 1,
2170
+ "bbox": [
2171
+ 176,
2172
+ 618,
2173
+ 490,
2174
+ 633
2175
+ ],
2176
+ "page_idx": 16
2177
+ },
2178
+ {
2179
+ "type": "text",
2180
+ "text": "1: Initialize generation $\\mathcal { P } ^ { 0 }$ \n2: for $j <$ maximum generations do \n3: Collect the $( \\xi _ { i } ^ { k } , \\mathcal { G } _ { i } ^ { k } )$ from previous $k \\leq j$ generations $\\triangleright$ Update dataset \n4: Train $W$ and $W _ { o u t }$ on $\\{ { \\mathcal G } _ { n } , \\xi ( { \\mathcal G } _ { n } ) \\} _ { n = 1 } ^ { N }$ using dropout rate 0.5 on the inputs of the fc layers. \n5: Propose $\\mathcal { C }$ new graph $\\{ \\mathcal { G } _ { i } \\} _ { i = 1 } ^ { \\mathcal { C } } , \\mathcal { C } > > M$ . . Propose new candidates \n6: Sample a dropout mask $\\mathrm { m } _ { i }$ for the hidden units \n7: Rank $\\{ \\xi _ { P } ( \\mathcal { G } _ { i } \\bar { | } W , W _ { o u t } , \\mathbf { m } _ { i } ) \\} _ { i = 1 } ^ { J }$ on the proposals and pick the top $\\kappa$ \n8: for $m < \\mathcal N$ do $\\triangleright$ Train and evaluate each species \n9: for $k <$ maximum parameter updates do \n10: Train policy πGm \n11: end for \n12: Evaluate the fitness $\\xi ( \\mathcal { G } _ { m } , \\theta _ { m } )$ \n13: end for \n14: end for ",
2181
+ "bbox": [
2182
+ 178,
2183
+ 637,
2184
+ 826,
2185
+ 837
2186
+ ],
2187
+ "page_idx": 16
2188
+ }
2189
+ ]
parse/train/BkgWHnR5tm/BkgWHnR5tm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkgWHnR5tm/BkgWHnR5tm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByS1VpgRZ/ByS1VpgRZ.md ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CGANS WITH PROJECTION DISCRIMINATOR
2
+
3
+ Takeru Miyato1, Masanori Koyama2 miyato@preferred.jp koyama.masanori@gmail.com 1Preferred Networks, Inc. 2Ritsumeikan University
4
+
5
+ # ABSTRACT
6
+
7
+ We propose a novel, projection based way to incorporate the conditional information into the discriminator of GANs that respects the role of the conditional information in the underlining probabilistic model. This approach is in contrast with most frameworks of conditional GANs used in application today, which use the conditional information by concatenating the (embedded) conditional vector to the feature vectors. With this modification, we were able to significantly improve the quality of the class conditional image generation on ILSVRC2012 (ImageNet) 1000-class image dataset from the current state-of-the-art result, and we achieved this with a single pair of a discriminator and a generator. We were also able to extend the application to super-resolution and succeeded in producing highly discriminative super-resolution images. This new structure also enabled high quality category transformation based on parametric functional transformation of conditional batch normalization layers in the generator. The code with Chainer (Tokui et al., 2015), generated images and pretrained models are available at https://github.com/pfnet-research/sngan_projection.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are a framework to construct a generative model that can mimic the target distribution, and in recent years it has given birth to arrays of state-of-the-art algorithms of generative models on image domain (Radford et al., 2016; Salimans et al., 2016; Ledig et al., 2017; Zhang et al., 2017; Reed et al., 2016). The most distinctive feature of GANs is the discriminator $D ( { \pmb x } )$ that evaluates the divergence between the current generative distribution $p _ { G } ( \pmb { x } )$ and the target distribution $q ( { \pmb x } )$ (Goodfellow et al., 2014; Nowozin et al., 2016; Arjovsky et al., 2017). The algorithm of GANs trains the generator model by iteratively training the discriminator and generator in turn, with the discriminator acting as an increasingly meticulous critic of the current generator.
12
+
13
+ Conditional GANs (cGANs) are a type of GANs that use conditional information (Mirza & Osindero, 2014) for the discriminator and generator, and they have been drawing attention as a promising tool for class conditional image generation (Odena et al., 2017), the generation of the images from text (Reed et al., 2016; Zhang et al., 2017), and image to image translation (Kim et al., 2017; Zhu et al., 2017). Unlike in standard GANs, the discriminator of cGANs discriminates between the generator distribution and the target distribution on the set of the pairs of generated samples $_ { \textbf { \em x } }$ and its intended conditional variable $\textbf { { y } }$ . To the authors’ knowledge, most frameworks of discriminators in cGANs at the time of writing feeds the pair the conditional information $\textbf { { y } }$ into the discriminator by naively concatenating (embedded) $\textbf { { y } }$ to the input or to the feature vector at some middle layer (Mirza & Osindero, 2014; Denton et al., 2015; Reed et al., 2016; Zhang et al., 2017; Perarnau et al., 2016; Saito et al., 2017; Dumoulin et al., 2017a; Sricharan et al., 2017). We would like to however, take into account the structure of the assumed conditional probabilistic models underlined by the structure of the discriminator, which is a function that measures the information theoretic distance between the generative distribution and the target distribution.
14
+
15
+ By construction, any assumption about the form of the distribution would act as a regularization on the choice of the discriminator. In this paper, we propose a specific form of the discriminator, a form motivated by a probabilistic model in which the distribution of the conditional variable $\textbf { { y } }$ given $_ { \textbf { \em x } }$ is
16
+
17
+ ![](images/ec3520e11657fdeb608fe6e00882b71a56ec36ba76d36bdf62da06ae694f1214.jpg)
18
+ Figure 1: Discriminator models for conditional GANs
19
+
20
+ ![](images/dfbb090f2bfa4de6de0efa4df202fa420d3811aa17ffa90e01fbf8972e05b9e1.jpg)
21
+
22
+ ![](images/8dd2760c90cb4a9e736ee0a370b3904e4d6803c56110e65a74098a88406bba67.jpg)
23
+ (a) Images generated with the projection model. (left) Tibetan terrier and (right) mushroom.
24
+ (b) (left) Consecutive category morphing with fixed $_ { z }$ . geyser Tibetan terrier mushroom robin. (right) category morphing from Tibetan terrier to mushroom with different value of fixed $_ { z }$
25
+
26
+ Figure 2: The generator trained with the projection model can generate diverse set of images. For more results, see the experiment section and the appendix section.
27
+
28
+ discrete or uni-modal continuous distributions. This model assumption is in fact common in many real world applications, including class-conditional image generation and super-resolution.
29
+
30
+ As we will explain in the next section, adhering to this assumption will give rise to a structure of the discriminator that requires us to take an inner product between the embedded condition vector $\textbf { { y } }$ and the feature vector (Figure 1d). With this modification, we were able to significantly improve the quality of the class conditional image generation on 1000-class ILSVRC2012 dataset (Russakovsky et al., 2015) with a single pair of a discriminator and generator (see the generated examples in Figure 2). Also, when we applied our model of cGANs to a super-resolution task, we were able to produce high quality super-resolution images that are more discriminative in terms of the accuracy of the label classifier than the cGANs based on concatenation, as well as the bilinear and the bicubic method.
31
+
32
+ # 2 THE ARCHITECTURE OF THE CGAN DISCRIMINATOR WITH A PROBABILISTIC MODEL ASSUMPTIONS
33
+
34
+ Let us denote the input vector by $_ { \textbf { \em x } }$ and the conditional information by $y ^ { 1 }$ . We also denote the cGAN discriminator by $D ( \pmb { x } , \pmb { y } ; \theta ) : = \mathcal { A } ( f ( \pmb { x } , \pmb { y } ; \theta ) )$ , where $f$ is a function of $_ { \textbf { \em x } }$ and $y , \theta$ is the parameters of $f$ , and $\mathcal { A }$ is an activation function of the users’ choice. Using $q$ and $p$ to designate the true distributions and the generator model respectively, the standard adversarial loss for the
35
+
36
+ discriminator is given by:
37
+
38
+ $$
39
+ \mathcal { L } ( D ) = - E _ { q ( y ) } \left[ E _ { q ( x | y ) } \left[ \log ( D ( x , y ) ) \right] \right] - E _ { p ( y ) } \left[ E _ { p ( x | y ) } \left[ \log ( 1 - D ( x , y ) ) \right] \right] ,
40
+ $$
41
+
42
+ with $\mathcal { A }$ in $D$ representing the sigmoid function. By construction, the nature of the ‘critic’ $D$ significantly affects the performance of $G$ . A conventional way of feeding $\textbf { { y } }$ to $D$ until now has been to concatenate the vector $\textbf { { y } }$ to the feature vector $_ { \textbf { \em x } }$ , either at the input layer (Mirza $\&$ Osindero, 2014; Denton et al., 2015; Saito et al., 2017), or at some hidden layer (Reed et al., 2016; Zhang et al., 2017; Perarnau et al., 2016; Dumoulin et al., 2017a; Sricharan et al., 2017) (see Figure 1a and Figure 1b). We would like to propose an alternative to this approach by observing the form of the optimal solution (Goodfellow et al., 2014) for the loss function, Eq. (1), can be decomposed into the sum of two log likelihood ratios:
43
+
44
+ $$
45
+ f ^ { * } ( x , y ) = \log { \frac { q ( x | y ) q ( y ) } { p ( x | y ) p ( y ) } } = \log { \frac { q ( y | x ) } { p ( y | x ) } } + \log { \frac { q ( x ) } { p ( x ) } } : = r ( y | x ) + r ( x ) .
46
+ $$
47
+
48
+ Now, we can model the log likelihood ratio $r ( \pmb { y } | \pmb { x } )$ and $r ( { \pmb x } )$ by some parametric functions $f _ { 1 }$ and $f _ { 2 }$ respectively. If we make a standing assumption that $p ( \pmb { y } | \pmb { x } )$ and $q ( \pmb { y } | \pmb { x } )$ are simple distributions like those that are Gaussian or discrete log linear on the feature space, then, as we will show, the parametrization of the following form becomes natural:
49
+
50
+ $$
51
+ f ( \pmb { x } , \pmb { y } ; \theta ) : = f _ { 1 } ( \pmb { x } , \pmb { y } ; \theta ) + f _ { 2 } ( \pmb { x } ; \theta ) = \pmb { y } ^ { \operatorname { T } } V \phi ( \pmb { x } ; \theta _ { \Phi } ) + \psi ( \phi ( \pmb { x } ; \theta _ { \Phi } ) ; \theta _ { \Psi } ) ,
52
+ $$
53
+
54
+ where $V$ is the embedding matrix of y, $, \phi ( \cdot , \theta _ { \Phi } )$ is a vector output function of $_ { \textbf { \em x } }$ , and $\psi ( \cdot , \theta _ { \Psi } )$ is a scalar function of the same $\phi ( \pmb { x } ; \theta _ { \Phi } )$ that appears in $f _ { 1 }$ (see Figure 1d). The learned parameters $\theta = \{ V , \theta _ { \Phi } , \theta _ { \Psi } \}$ are to be trained to optimize the adversarial loss. From this point on, we will refer to this model of the discriminator as projection for short. In the next section, we would like to elaborate on how we can arrive at this form.
55
+
56
+ # 3 MOTIVATION BEHIND THE projection DISCRIMINATOR
57
+
58
+ In this section, we will begin from specific, often recurring models and show that, with certain regularity assumption, we can write the optimal solution of the discriminator objective function in the form of (3). Let us first consider the a case of categorical variable. Assume that $y$ is a categorical variable taking a value in $\{ 1 , \ldots , C \}$ , which is often common for a class conditional image generation task. The most popular model for $p ( y | \mathbf { \boldsymbol { x } } )$ is the following log linear model:
59
+
60
+ $$
61
+ \log p ( y = c | \pmb { x } ) : = \pmb { v } _ { c } ^ { p \mathrm { T } } \phi ( \pmb { x } ) - \log Z ( \phi ( \pmb { x } ) ) ,
62
+ $$
63
+
64
+ where $\begin{array} { r } { Z ( \phi ( \pmb { x } ) ) : = \left( \sum _ { j = 1 } ^ { C } \exp \left( \pmb { v } _ { j } ^ { p \mathrm { T } } \phi ( \pmb { x } ) \right) \right) } \end{array}$ is the partition function, and $\phi : \pmb { x } \mapsto \mathbb { R } ^ { d ^ { L } }$ is the input to the final layer of the network model. Now, we assume that the target distribution $q$ can also be parametrized in this form, with the same choice of $\phi$ . This way, the log likelihood ratio would take the following form;
65
+
66
+ $$
67
+ r ( y | x ) = \log \frac { q ( y = c | x ) } { p ( y = c | x ) } = ( v _ { c } ^ { q } - v _ { c } ^ { p } ) ^ { \mathrm { T } } \phi ( x ) - ( \log Z ^ { q } ( \phi ( x ) ) - \log Z ^ { p } ( \phi ( x ) ) ) .
68
+ $$
69
+
70
+ If we make the values of $( v _ { c } ^ { q } , v _ { c } ^ { p } )$ implicit and put $\pmb { v } _ { c } : = ( \pmb { v } _ { c } ^ { q } - \pmb { v } _ { c } ^ { p } )$ , we can write $f _ { 1 } ( x , y = c ) =$ ${ \pmb v } _ { c } ^ { \mathrm { T } } \phi ( { \pmb x } )$ . Now, if we can put together the normalization constant $- \left( \log Z ^ { q } ( \phi ( { \pmb x } ) ) - \log Z ^ { p } ( \phi ( { \pmb x } ) ) \right)$ and $r ( { \pmb x } )$ into one expression $\bar { \psi } ( \phi ( { \pmb x } ) )$ , we can rewrite the equation above as
71
+
72
+ $$
73
+ f ( \pmb { x } , \pmb { y } ) : = \pmb { y } ^ { \mathrm { T } } V \phi ( \pmb { x } ) + \psi ( \phi ( \pmb { x } ) ) .
74
+ $$
75
+
76
+ by using $\textbf { { y } }$ to denote a one-hot vector of the label $y$ and using $V$ to denote the matrix consisting of the row vectors $v _ { c }$ . Most notably, this formulation introduces the label information via an inner product, as opposed to concatenation. The form (6) is indeed the form we proposed in (3).
77
+
78
+ We can also arrive at the form (3) for unimodal continuous distributions $p ( \pmb { y } | \pmb { x } )$ as well. Let $\textbf { \textit { y } } \in \ \mathbb { R } ^ { d }$ be a $d$ -dimensional continuous variable, and let us assume that conditional $q ( \pmb { y } | \pmb { x } )$ and $p ( \pmb { y } | \pmb { x } )$ are both given by Gaussian distributions, so that $q ( \pmb { y } | \pmb { x } ) = \mathcal { N } ( \pmb { y } | \pmb { \mu } _ { q } ( \pmb { x } ) , \pmb { \Lambda } _ { q } ^ { - 1 } )$ and
79
+
80
+ $p ( \pmb { y } | \pmb { x } ) = \mathcal { N } ( \pmb { y } | \pmb { \mu } _ { p } ( \pmb { x } ) , \pmb { \Lambda } _ { p } ^ { - 1 } )$ where $\pmb { \mu } _ { q } ( \pmb { x } ) : = W ^ { q } \pmb { \phi } ( \pmb { x } )$ and $\mu _ { p } ( { \pmb x } ) : = W ^ { p } \phi ( { \pmb x } )$ . Then the log density ratio $r ( { \pmb y } | { \pmb x } ) = \log \big ( q ( { \pmb y } | { \pmb x } ) / p ( { \pmb y } | { \pmb x } ) \big )$ is given by:
81
+
82
+ $$
83
+ \begin{array} { r } { r ( \pmb { y } | \pmb { x } ) = \log \left( \sqrt { \frac { | \mathbf { A } _ { q } | } { | \mathbf { A } _ { p } | } } \frac { \exp ( - ( 1 / 2 ) ( \pmb { y } - \pmb { \mu } _ { q } ( \pmb { x } ) ) ^ { \mathrm { T } } \mathbf { A } _ { q } ( \pmb { y } - \pmb { \mu } _ { q } ( \pmb { x } ) ) ) } { \exp ( - ( 1 / 2 ) ( \pmb { y } - \pmb { \mu } _ { p } ( \pmb { x } ) ) ^ { \mathrm { T } } \mathbf { A } _ { p } ( \pmb { y } - \pmb { \mu } _ { p } ( \pmb { x } ) ) ) } \right) } \\ { = - \frac { 1 } { 2 } \pmb { y } ^ { \mathrm { T } } \left( \pmb { \Lambda } _ { q } - \pmb { \Lambda } _ { p } \right) \pmb { y } + \pmb { y } ^ { \mathrm { T } } ( \pmb { \Lambda } _ { q } W ^ { q } - \pmb { \Lambda } _ { p } W ^ { p } ) \phi ( \pmb { x } ) + \psi ( \phi ( \pmb { x } ) ) , } \end{array}
84
+ $$
85
+
86
+ where $\psi ( \phi ( { \pmb x } ) )$ represents the terms independent of $\textbf { { y } }$ . Now, if we assume that $\pmb { \Lambda } _ { q } = \pmb { \Lambda } _ { p } : = \pmb { \Lambda }$ , we can ignore the quadratic term. If we further express $\pmb { \Lambda } _ { q } W ^ { q } - \pmb { \Lambda } _ { p } W ^ { p }$ in the form $V$ , we can arrive at the form (3) again.
87
+
88
+ Indeed, however, the way that this regularization affects the training of the generator $G$ is a little unclear in its formulation. As we have repeatedly explained, our discriminator measures the divergence between the generator distribution $p$ and the target distribution $q$ on the assumption that $p ( \pmb { y } | \pmb { x } )$ and $q ( \pmb { y } | \pmb { x } )$ are relatively simple, and it is highly possible that we are gaining stability in the training process by imposing a regularity condition on the divergence measure. Meanwhile, however, the actual $p ( \boldsymbol { y } | \boldsymbol { x } )$ can only be implicitly derived from $p ( { \pmb x } , { \pmb y } )$ in computation, and can possibly take numerous forms other than the ones we have considered here. We must admit that there is a room here for an important theoretical work to be done in order to assess the relationship between the choice of the function space for the discriminator and training process of the generator.
89
+
90
+ # 4 COMPARISON WITH OTHER METHODS
91
+
92
+ As described above, (3) is a form that is true for frequently occurring situations. In contrast, incorporation of the conditional information by concatenation is rather arbitrary and can possibly include into the pool of candidate functions some sets of functions for which it is difficult to find a logical basis. Indeed, if the situation calls for multimodal $p ( \pmb { y } | \pmb { x } )$ , it might be smart not to use the model that we suggest here. Otherwise, however, we expect our model to perform better; in general, it is preferable to use a discriminator that respects the presumed form of the probabilistic model.
93
+
94
+ Still another way to incorporate the conditional information into the training procedure is to directly manipulate the loss function. The algorithm of AC-GANs (Odena et al., 2017) use a discriminator $( D _ { 1 } )$ that shares a part of its structure with the classifier $( D _ { 2 } )$ , and incorporates the label information into the objective function by augmenting the original discriminator objective with the likelihood score of the classifier on both the generated and training dataset (see Figure 1c). Plug and Play Generative models (PPGNs) (Nguyen et al., 2017) is another approach for the generative model that uses an auxiliary classifier function. It is a method that endeavors to make samples from $p ( { \pmb x } | { \pmb y } )$ using an MCMC sampler based on the Langevin equation with drift terms consisting of the gradient of an autoencoder prior $p ( { \pmb x } )$ and a pretrained auxiliary classifier $p ( y | \mathbf { \boldsymbol { x } } )$ . With these method, one can generate a high quality image. However, these ways of using auxiliary classifier may unwittingly encourage the generator to produce images that are particularly easy for the auxiliary classifier to classify, and deviate the final $p ( { \pmb x } | { \pmb y } )$ from the true $\dot { \mathbf { \ b { q } } } ( \mathbf { \ b { x } } | \mathbf { \ b { y } } )$ . In fact, Odena et al. (2017) reports that this problem has a tendency to exacerbate with increasing number of labels. We were able to reproduce this phenomena in our experiments; when we implemented their algorithm on a dataset with 1000 class categories, the final trained model was able to generate only one image for most classes. Nguyen et al.’s PPGNs is also likely to suffer from the same problem because they are using an order of magnitude greater coefficient for the term corresponding to $p ( y | \mathbf { \boldsymbol { x } } )$ than for the other terms in the Langevin equation.
95
+
96
+ # 5 EXPERIMENTS
97
+
98
+ In order to evaluate the effectiveness of our newly proposed architecture for the discriminator, we conducted two sets of experiments: class conditional image generation and super-resolution on ILSVRC2012 (ImageNet) dataset (Russakovsky et al., 2015). For both tasks, we used the ResNet (He et al., 2016b) based discriminator and the generator used in Gulrajani et al. (2017), and applied spectral normalization (Miyato et al., 2018) to the all of the weights of the discriminator to regularize the Lipschitz constant. For the objective function, we used the following hinge version of the standard adversarial loss (1) (Lim & Ye, 2017; Tran et al., 2017)
99
+
100
+ $$
101
+ \begin{array} { r l r } & { \langle ( \hat { G } , D ) = E _ { q ( y ) } [ E _ { q ( x | y ) } [ \operatorname* { m a x } ( 0 , 1 - D ( \pmb { x } , y ) ] ] + E _ { q ( y ) } [ E _ { p ( z ) } [ \operatorname* { m a x } ( 0 , 1 + D ( \hat { G } ( z , y ) , y ) ) ] ] , } & \\ & { \langle ( G , \hat { D } ) = - E _ { q ( y ) } [ E _ { p ( z ) } [ \hat { D } ( G ( z , y ) , y ) ) ] ] , } & { ( 9 ) } \end{array}
102
+ $$
103
+
104
+ where the last activation function $\mathcal { A }$ of $D$ is identity function. $p ( z )$ is standard Gaussian distribution and $G ( z , y )$ is the generator network. For all experiments, we used Adam optimizer (Kingma & Ba, 2015) with hyper-parameters set to $\alpha = 0 . 0 0 0 2 , \beta _ { 1 } = 0 , \beta _ { 2 } = 0 . 9$ . We updated the discriminator five times per each update of the generator. We will use concat to designate the models (Figure $1 \mathsf { b } ) ^ { 2 }$ , and use projection to designate the proposed model (Figure 1d) .
105
+
106
+ # 5.1 CLASS-CONDITIONAL IMAGE GENERATION
107
+
108
+ The ImageNet dataset used in the experiment of class conditional image generation consisted of 1,000 image classes of approximately 1,300 pictures each. We compressed each images to $1 2 8 \times 1 2 8$ pixels. Unlike for AC-GANs3 we used a single pair of a ResNet-based generator and a discriminator. Also, we used conditional batch normalization (Dumoulin et al., 2017b; de Vries et al., 2017) for the generator. As for the architecture of the generator network used in the experiment, please see Figure 14 for more detail. Our proposed projection model discriminator is equipped with a ‘projection layer’ that takes inner product between the embedded one-hot vector $\textbf { { y } }$ and the intermediate output (Figure 14a). As for the structure of the the concat model discriminator to be compared against, we used the identical bulk architecture as the projection model discriminator, except that we removed the projection layer from the structure and concatenated the spatially replicated embedded conditional vector $\textbf { { y } }$ to the output of third ResBlock. We also experimented with AC-GANs as the current state of the art model. For AC-GANs, we placed the softmax layer classifier to the same structure shared by concat and projection. For each method, we updated the generator 450K times, and applied linear decay for the learning rate after 400K iterations so that the rate would be 0 at the end. For the comparative experiments, we trained the model for 450K iterations, which was ample for the training of concat to stabilize. AC-GANs collapsed prematurely before the completion of 450K iterations, so we reported the result from the peak of its performance ( 80K iterations). For all experiments throughout, we used the training over 450K iterations for comparing the performances. On a separate note, our method continued to improve even after 450K. We therefore also reported the inception score and FID of the extended training (850K iterations) for our method exclusively. See the table 1 for the exact figures.
109
+
110
+ We used inception score (Salimans et al., 2016) for the evaluation of the visual appearance of the generated images. It is in general difficult to evaluate how ‘good’ the generative model is. Indeed, however, either subjective or objective, some definite measures of ‘goodness’ exists, and essential two of them are ‘diversity’ and the sheer visual quality of the images. One possible candidate for quantitative measure of diversity and visual appearance is FID (Heusel et al., 2017). We computed FID between the generated images and dataset images within each class, and designated the values as intra FIDs. More precisely, FID (Heusel et al., 2017) measures the 2-Wasserstein distance between the two distributions $q _ { y }$ and $p _ { y }$ , and is given by $F ( q _ { y } , p _ { y } ) \ = \ \| { \pmb { \mu } } _ { q _ { y } } \ - { \pmb { \mu } } _ { p _ { y } } \| _ { 2 } ^ { 2 } \ +$ trace $\left( C _ { q _ { y } } + C _ { p _ { y } } - 2 ( C _ { q _ { y } } C _ { p _ { y } } ) ^ { 1 / 2 } \right)$ , where $\{ \mu _ { q _ { y } } , C _ { q _ { y } } \}$ , $\{ \mu _ { p _ { y } } , C _ { p _ { y } } \}$ are respectively the mean and the covariance of the final feature vectors produced by the inception model (Szegedy et al., 2015) from the true samples and generated samples of class $y$ . When the set of generated examples have collapsed modes, the trace of $C _ { p _ { y } }$ becomes small and the trace term itself becomes large. In order to compute $C _ { q _ { y } }$ we used all samples in the training data belonging to the class of concern, and used 5000 generated samples for the computation of $C _ { p _ { y } }$ . We empirically observed in our experiments that intra FID is, to a certain extent, serving its purpose well in measuring the diversity and the visual quality.
111
+
112
+ To highlight the effectiveness of our inner-product based approach (projection) of introducing the conditional information into the model, we compared our method against the state of the art ACGANs as well as the conventional incorporation of the conditional information via concatenation at hidden layer (concat). As we can see in the training curves Figure 3, projection outperforms inception score than concat throughout the training. Table 1 compares the intra class FIDs and the inception Score of the images generated by each method. The result shown here for the AC-GANs is that of the model at its prime in terms of the inception score, because the training collapsed at the end. We see that the images generated by projection have lower intra FID scores than both adversaries, indicating that the Wasserstein distance between the generative distribution by projection to the target distribution is smaller. For the record, our model performed better than other models on the CIFAR10 and CIFAR 100 as well (See Appendix A).
113
+
114
+ ![](images/2192e95c50d255416dbc8d3cef02975c1b0b270d3f11d26a257f2780374ad431.jpg)
115
+
116
+ ![](images/3d525ce3d861a0acb3d00d06bf586814dc5726773cf2522420243abf5bcfd5fb.jpg)
117
+ Figure 3: Learning curves of Figure 4: Comparison of intra FID scores for projection cGANs with concat and projection concat, and AC-GANs on ImageNet. Each dot corresponds on ImageNet. to a class.
118
+
119
+ Table 1: Inception score and intra FIDs on ImageNet.
120
+
121
+ <table><tr><td>Method</td><td>Inception Score</td><td>Intra FID</td></tr><tr><td>AC-GANs</td><td>28.5±.20</td><td>260.0</td></tr><tr><td>concat</td><td>21.1±.35</td><td>141.2</td></tr><tr><td>projection</td><td>29.7±.61</td><td>103.1</td></tr><tr><td>*projection (850K iteration)</td><td>36.8±.44</td><td>92.4</td></tr></table>
122
+
123
+ Figure 10a and 10b shows the set of classes for which (a) projection yielded results with better intra FIDs than the concat and (b) the reverse. From the top, the figures are listed in descending order of the ratio between the intra FID score between the two methods. Note that when the concat outperforms projection it only wins by a slight margin, whereas the projection outperforms concat by large margin in the opposite case. A quick glance on the cases in which the concat outperforms the projection suggests that the FID is in fact measuring the visual quality, because both sets looks similar to the human eyes in terms of appearance. Figure 5 shows an arbitrarily selected set of results yielded by AC-GANs from variety of ${ \boldsymbol { z } } \mathbf { s }$ . We can clearly observe the mode-collapse on this batch. This is indeed a tendency reported by the inventors themselves (Odena et al., 2017). ACGANs can generate easily recognizable (i.e classifiable) images, but at the cost of losing diversity and hence at the cost of constructing a generative distribution that is significantly different from the target distribution as a whole. We can also assess the low FID score of projection from different perspective. By construction, the trace term of intra FID measures the degree of diversity within the class. Thus, our result on the intra FID scores also indicates that that our projection is doing better in reproducing the diversity of the original. The GANs with the concat discriminator also suffered from mode-collapse for some classes (see Figure 6). For the set of images generated by projection, we were not able to detect any notable mode-collapse.
124
+
125
+ Figure 7a shows the samples generated with the projection model for the classes on which the cGAN achieved lowest intra FID scores (that is the classes on which the generative distribution were particularly close to target conditional distribution), and Figure 7b the reverse. While most of the images listed in Figure 7a are of relatively high quality, we still observe some degree of mode-collapse. Note that the images in the classes with high FID are featuring complex objects like human; that is, one can expect the diversity within the class to be wide. However, we note that we did not use the most complicated neural network available for the experiments presented on this paper, because we prioritized the completion of the training within a reasonable time frame. It is very possible that, by increasing the complexity of the model, we will be able to further improve the visual quality of the images and the diversity of the distribution. In Appendix D, we list images of numerous classes generated by cGANs trained with our projection model.
126
+
127
+ ![](images/537d54379a8fc36a8717dd27960d5ac73b4f9314a2c3c18cac52a12aaf215700.jpg)
128
+ Figure 5: comparison of the images generated by (a) AC-GANs and (b) projection.
129
+
130
+ ![](images/800874aca51e180b570c20cf4c25fdd54d2d22dd2e2591c73dc1debbad131650.jpg)
131
+ Figure 6: Collapsed images on the concat model.
132
+
133
+ Category Morphing With our new architecture, we were also able to successfully perform category morphism. When there are classes $y _ { 1 }$ and $y _ { 2 }$ , we can create an interpolated generator by simply mixing the parameters of conditional batch normalization layers of the conditional generator corresponding to these two classes. Figure 8 shows the output of the interpolated generator with the same $z$ . Interestingly, the combination is also yielding meaningful images when $y _ { 1 }$ and $y _ { 2 }$ are significantly different.
134
+
135
+ Fine-tuning with the pretrained model on the ILSVRC2012 classification task. As we mentioned in Section 4, the authors of Plug and Play Generative model (PPGNs) (Nguyen et al., 2017) were able to improve the visual appearance of the model by augmenting the cost function with that of the label classifier. We also followed their footstep and augmented the original generator loss with an additional auxiliary classifier loss. As warned earlier regarding this type of approach, however, this type of modification tends to only improve the visual performance of the images that are easy for the pretrained model to classify. In fact, as we can see in Appendix B, we were able to improve the visual appearance the images with the augmentation, but at the cost of diversity.
136
+
137
+ # 5.2 SUPER-RESOLUTION
138
+
139
+ We also evaluated the effectiveness of (3) in its application to the super-resolution task. Put formally, the super-resolution task is to infer the high resolution RGB image of dimension $\pmb { x } \in \mathbb { R } ^ { R _ { H } \times R _ { H } \times \hat { \mathbf { 3 } } }$ from the low resolution RGB image of dimension $\pmb { y } \in \mathbb { R } ^ { R _ { L } \times R _ { L } \times 3 } ; R _ { H } > R _ { L }$ . This task is very much the case that we presumed in our model construction, because $p ( \pmb { y } | \pmb { x } )$ is most likely unimodal even if $p ( { \pmb x } | { \pmb y } )$ is multimodal. For the super-resolution task, we used the following formulation for discriminator function:
140
+
141
+ $$
142
+ f ( { \pmb x } , { \pmb y } ; { \theta } ) = \sum _ { i , j , k } \left( y _ { i j k } F _ { i j k } ( { \phi } ( { \pmb x } ; { \theta } _ { \Phi } ) ) \right) + \psi ( { \phi } ( { \pmb x } ; { \theta } _ { \Phi } ) ; { \theta } _ { \Psi } ) ,
143
+ $$
144
+
145
+ where $\begin{array} { r } { F ( \phi ( \pmb { x } ; \theta _ { \Phi } ) ) = V * \phi ( \pmb { x } ; \theta _ { \Phi } ) } \end{array}$ where $V$ is a convolutional kernel and $^ *$ stands for convolution operator. Please see Figure 15 in the appendix section for the actual network architectures we used for this task. For this set of experiments, we constructed the concat model by removing the module in the projection model containing the the inner product layer and the accompanying convolution layer altogether, and simply concatenated $\textbf { { y } }$ to the output of the ResBlock preceding the inner product module in the original. As for the resolutions of the image datasets, we chose $R _ { H } = 1 2 8$ and $R _ { L } =$ 32, and created the low resolution images by applying bilinear downsampling on high resolution images. We updated the generators 150K times for all methods, and applied linear decay for the learning rate after 100K iterations so that the final learning rate was 0 at 150K-th iteration.
146
+
147
+ ![](images/55f061a8535be4d7c6a950904319ef9f483b316b7f577db5f89f5f58553f04ee.jpg)
148
+ Figure 7: $1 2 8 \times 1 2 8$ pixel images generated by the projection method for the classes with (a) bottom five FID scores and (b) top five FID scores. The string and the value above each panel are respectively the name of the corresponding class and the FID score. The second row in each panel corresponds to the original dataset.
149
+
150
+ Figure 9 shows the result of our super-resolution. The bicubic super-resolution is very blurry, and concat result is suffering from excessively sharp and rough edges. On the other hand, the edges of the images generated by our projection method are much clearer and smoother, and the image itself is much more faithful to the original high resolution images. In order to qualitatively compare the performances of the models, we checked MS-SSIM (Wang et al., 2003) and the classification accuracy of the inception model on the generated images using the validation set of the ILSVRC2012 dataset. As we can see in Table 2, our projection model was able to achieve high inception accuracy and high MS-SSIM when compared to bicubic and concat. Note that the performance of superresolution with concat model even falls behind those of the bilinear and bicubic super-resolutions in terms of the inception accuracy. Also, we used projection model to generate multiple batches of images with different random values of $_ { z }$ to be fed to the generator and computed the average of the logits of the inception model on these batches (MC samples). We then used the so-computed average logits to make prediction of the labels. With an ensemble over 10 seeds ( $1 0 \mathrm { M C }$ in Table 2), we were able to improve the inception accuracy even further. This result indicates that our GANs are learning the super-resolution as an distribution, as opposed to deterministic function. Also, the success with the ensemble also suggests a room for a new way to improve the accuracy of classification task on low resolution images.
151
+
152
+ ![](images/32cddc648d477a401d503a77d877fb1a55955b50be00a272260fa4fb9cd3c72f.jpg)
153
+ Figure 8: Category morphing. More results are in the appendix section.
154
+
155
+ Table 2: Inception accuracy and MS-SSIM on different super-resolution methods. We picked up dataset images from the validation set.
156
+
157
+ <table><tr><td>Method</td><td>biliear</td><td>bicubic</td><td>concat</td><td> projection</td><td> projection (10 MC)</td></tr><tr><td>Inception Acc.(%)</td><td>23.1</td><td>31.4</td><td>11.0</td><td>35.2</td><td>36.4</td></tr><tr><td>MS-SSIM</td><td>0.835</td><td>0.859</td><td>0.829</td><td>0.878</td><td>1</td></tr></table>
158
+
159
+ # 6 CONCLUSION
160
+
161
+ Any specification on the form of the discriminator imposes a regularity condition for the choice for the generator distribution and the target distribution. In this research, we proposed a model for the discriminator of cGANs that is motivated by a commonly occurring family of probabilistic models. This simple modification was able to significantly improve the performance of the trained generator on conditional image generation task and super-resolution task. The result presented in this paper is strongly suggestive of the importance of the choice of the form of the discriminator and the design of the distributional metric. We plan to extend this approach to other applications of cGANs, such as semantic segmentation tasks and image to image translation tasks.
162
+
163
+ ![](images/de90c79076be5c3819a460e5e92251e8aeb7edc82d94dc65978c6b2cc7ffb58a.jpg)
164
+ Figure 9: 32x32 to $1 2 8 \mathrm { x } 1 2 8$ super-resolution by different methods
165
+
166
+ # ACKNOWLEDGMENTS
167
+
168
+ We would like to thank the members of Preferred Networks, Inc., especially Richard Calland, Sosuke Kobayashi and Crissman Loomis, for helpful comments. We would also like to thank Shoichiro Yamaguchi, a graduate student of Kyoto University, for helpful comments.
169
+
170
+ ![](images/bfa07cf264b9631ba798d785bec7f2dcb6e023453799ec788e16784907ed1782.jpg)
171
+ Figure 10: Comparison of concat vs. projection. The value attached above each panel represents the achieved FID score.
172
+
173
+ # REFERENCES
174
+
175
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. In ´ ICML, pp. 214–223, 2017.
176
+ Harm de Vries, Florian Strub, Jer´ emie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Mod- ´ ulating early visual processing by language. In NIPS, pp. 6576–6586, 2017.
177
+ Emily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, pp. 1486–1494, 2015.
178
+ Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In ICLR, 2017a.
179
+ Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. In ICLR, 2017b.
180
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pp. 2672–2680, 2014.
181
+ Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein GANs. arXiv preprint arXiv:1704.00028, 2017.
182
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016a.
183
+ 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, 2016b.
184
+ Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Gunter Klambauer, and Sepp ¨ Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. arXiv preprint arXiv:1706.08500, 2017.
185
+ Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jungkwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In ICML, pp. 1857–1865, 2017.
186
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
187
+ Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew ´ Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image superresolution using a generative adversarial network. In CVPR, 2017.
188
+ Jae Hyun Lim and Jong Chul Ye. Geometric GAN. arXiv preprint arXiv:1705.02894, 2017.
189
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014.
190
+ Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018.
191
+ Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & play generative networks: Conditional iterative generation of images in latent space. In CVPR, 2017.
192
+ Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. In NIPS, pp. 271–279, 2016.
193
+ Augustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with auxiliary classifier GANs. In ICML, pp. 2642–2651, 2017.
194
+ Guim Perarnau, Joost van de Weijer, Bogdan Raducanu, and Jose M Alvarez. Invertible conditional gans for ´ image editing. In NIPS Workshop on Adversarial Training, 2016.
195
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
196
+ Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In ICML, pp. 1060–1069, 2016.
197
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
198
+ Masaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal generative adversarial nets with singular value clipping. In ICCV, 2017.
199
+ Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NIPS, pp. 2226–2234, 2016.
200
+ Kumar Sricharan, Raja Bala, Matthew Shreve, Hui Ding, Kumar Saketh, and Jin Sun. Semi-supervised conditional GANs. arXiv preprint arXiv:1708.05789, 2017.
201
+ 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, pp. 1–9, 2015.
202
+ Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of workshop on machine learning systems (LearningSys) in the twentyninth annual conference on neural information processing systems (NIPS), 2015.
203
+ Antonio Torralba, Rob Fergus, and William T Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE transactions on pattern analysis and machine intelligence, 30 (11):1958–1970, 2008.
204
+ Dustin Tran, Rajesh Ranganath, and David M Blei. Deep and hierarchical implicit models. arXiv preprint arXiv:1702.08896, 2017.
205
+ Zhou Wang, Eero P Simoncelli, and Alan C Bovik. Multiscale structural similarity for image quality assessment. In Asilomar Conference on Signals, Systems and Computers, pp. 1398–1402, 2003.
206
+ Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaolei Huang, Xiaogang Wang, and Dimitris Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In ICCV, 2017.
207
+ Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017.
208
+
209
+ # A RESULTS OF CLASS CONDITIONAL IMAGE GENERATION ON CIFAR-10 AND CIFAR-100
210
+
211
+ As a preliminary experiment, we compared the performance of conditional image generation on CIFAR-10 and CIFAR-100 3. For the discriminator and the generator, we reused the same architecture used in Miyato et al. (2018) for the task on CIFAR-10. For the adversarial objective functions, we used (9), and trained both machine learners with the same optimizer with same hyper parameters we used in Section 5. For our projection model, we added the projection layer to the discriminator in the same way we did in the ImageNet experiment (before the last linear layer). Our projection model achieved better performance than other methods on both CIFAR-10 and CIFAR-100. Concatenation at hidden layer (hidden concat) was performed on the output of second ResBlock of the discriminator. We tested hidden concat as a comparative method in our main experiments on ImageNet, because the concatenation at hidden layer performed better than the concatenation at the input layer (input concat) when the number of classes was large (CIFAR-100).
212
+
213
+ To explore how the hyper-parameters affect the performance of our proposed architecture, we conducted hyper-parameter search on CIFAR-100 about the Adam hyper-parameters (learning rate $\alpha$ and 1st order momentum $\beta _ { 1 . }$ ) for both our proposed architecture and the baselines. Namely, we varied each one of these parameters while keeping the other constant, and reported the inception scores for all methods including several versions of concat architectures to compare. We tested with concat module introduced at (a) input layer, (b) hidden layer, and at (c) output layer. As we can see in Figure 11, our projection architecture excelled over all other architectures for all choice of the parameters, and achieved the inception score of 9.53. Meanwhile, concat architectures were able to achieve all 8.82 at most. The best concat model in term of the inception score on CIFAR-100 was the hidden concat with $\alpha = 0 . 0 0 0 2$ and $\beta _ { 1 } = 0$ , which turns out to be the very choice of the parameters we picked for our ImageNet experiment.
214
+
215
+ Table 3: The performance of class conditional image generation on CIFAR-10 (C10) and CIFAR100 (C100).
216
+
217
+ <table><tr><td>Method</td><td>Inception score C10</td><td>C100</td><td>FID C10 C100</td></tr><tr><td>(Real data)</td><td>11.24</td><td>14.79</td><td>7.60 8.94</td></tr><tr><td>AC-GAN</td><td>8.22</td><td>8.80</td><td>19.7 25.4</td></tr><tr><td> input concat</td><td>8.25</td><td>7.93</td><td>19.2 31.4</td></tr><tr><td>hidden concat</td><td>8.14</td><td>8.82</td><td>19.2 24.8</td></tr><tr><td>(ours) projection</td><td>8.62</td><td>9.04</td><td>17.5 23.2</td></tr></table>
218
+
219
+ ![](images/802214d0fe7e313b4d57605ad6721c042423588c1ef245e8806e4e681daed633.jpg)
220
+ Figure 11: Inception scores on CIFAR-100 with different discriminator models varying hyperparameters ( $\overset { \cdot } { \alpha }$ and $\beta _ { 1 }$ ) of Adam optimizer.
221
+
222
+ ![](images/f09ac1616c4b5401905190295c7ea6c94be9035139cf2497f1add48c249565d7.jpg)
223
+ Figure 12: Effect of the finetuning with auxiliary classifier loss. Same coordinate in panel (a) and (b) corresponds to same value of $_ z$
224
+
225
+ Table 4: Inception score and intra FIDs on ImageNet with a pretrained model on classification tasks for ILSVRC2012 dataset. $^ { \ddag \mathrm { N } }$ guyen et al. (2017)
226
+
227
+ <table><tr><td>Method</td><td>Inception Score</td><td>Intra FID</td></tr><tr><td>PPGNs+</td><td>47.4</td><td>N/A</td></tr><tr><td>projection(finetuned)</td><td>210</td><td>54.2</td></tr></table>
228
+
229
+ # B OBJECTIVE FUNCTION WITH AN AUXILIARY CLASSIFIER COST
230
+
231
+ In this experiment, we followed the footsteps of Plug and Play Generative model (PPGNs) (Nguyen et al., 2017) and augmented the original generator loss with an additional auxiliary classifier loss. In particular, we used the losses given by :
232
+
233
+ $$
234
+ L \left( G , \hat { D } , \hat { p } _ { \mathrm { p r e } } ( y | x ) \right) = - E _ { q ( y ) } \left[ E _ { p ( z ) } \left[ \hat { D } ( G ( z , y ) , y ) - L _ { C } ( \hat { p } _ { \mathrm { p r e } } ( y | G ( z , y ) ) ) \right] \right] ,
235
+ $$
236
+
237
+ where $\hat { p } _ { \mathrm { p r e } } ( y | \pmb { x } )$ is the fixed model pretrained for ILSVRC2012 classification task. For the actual experiment, we trained the generator with the original adversarial loss for the first 400K updates, and used the augmented loss for the last 50K updates. For the learning rate hyper parameter, we adopted the same values as other experiments we described above. For the pretrained classifier, we used ResNet50 model used in He et al. (2016a). Figure 12 compares the results generated by vanilla objective function and the results generated by the augmented objective function. As we can see in Table 4, we were able to significantly outperform PPGNs in terms of inception score. However, note that the images generated here are images that are easy to classify. The method with auxiliary classifier loss seems effective in improving the visual appearance, but not in training faithful generative model.
238
+
239
+ ![](images/f238ed8ab5746c733f3277093cc6d7d4f752a7154edca57a4e2729674c208ddc.jpg)
240
+ (b) ResBlock for the generator.
241
+ Figure 13: Architecture of the ResBlocks used in all experiments. For the generator generator’s Resblock, conditional batch normalization layer (Dumoulin et al., 2017b; de Vries et al., 2017) was used in place of the standard batch normalization layer. For the ResBlock in the generator for the super resolution tasks that implements the upsampling, the random vector $_ z$ was fed to the model by concatenating the vector to the embedded low resolution image vector $\textbf { { y } }$ prior to the first convolution layer within the block. For the procedure of downsampling and upsampling, we followed the implementation by Gulrajani et al. (2017). For the discriminator, we performed downsampling (average pool) after the second conv of the ResBlock. For the generator, we performed upsampling before the first conv of the ResBlock. For the ResBlock that is performing the downsampling, we replaced the identity mapping with 1x1 conv layer followed by downsampling to balance the dimension. We did the essentially same for the Resblock that is performing the upsampling, except that we applied the upsampling before the 1x1 conv.
242
+
243
+ ![](images/0962bcbc2b0a16a4cbcffc020e1ce5de4d97aeba750dbdaba02271b1d9825325.jpg)
244
+ Figure 14: The models we used for the conditional image generation task.
245
+
246
+ ![](images/7b40023e7636d6e1a08658472654e4381183c33e10a7a39b9b5bc264eeb17eb3.jpg)
247
+ Figure 15: The models we used for the super resolution task.
248
+
249
+ # D MORE RESULTS ON THE CONDITIONAL IMAGE GENERATION TASK
250
+
251
+ ![](images/0f88dc2f1d5027682f9a8cbc76dc727127c9850e184973291aceaf1e5e03b3a7.jpg)
252
+ Figure 16: $1 2 8 \times 1 2 8$ generated examples on various categories with projection architecture. Each panel corresponds to a class.
253
+
254
+ ![](images/c3c43653d190b9d75ed4a9dbf3c52426e9fa1f96f9619a209df81e9f13d0bf00.jpg)
255
+ Figure 17: $1 2 8 \times 1 2 8$ generated examples on various categories with projection architecture. Each panel corresponds to a class. From top to bottom, tench, papillon, grey whale, desktop computer, altar, whiskey jug and volcano.
256
+
257
+ # E RESULTS OF CATEGORY MORPHING
258
+
259
+ ![](images/c39939af00d1bc3e38ace98572a248bb753f5e0040afc2c750739e6aa68d435e.jpg)
260
+ Figure 18: Dog (Lhasa apso) to different categories
261
+
262
+ ![](images/8dcf7a13ceec1ddeab354971f2ff49d4d26e578f77d9410c76b46963807f944c.jpg)
263
+
264
+ ![](images/9c0c5542463d8ec56923d821210439ac6bdcda4b65eb43285ced64c953798cad.jpg)
265
+ (a) Hip to Yellow lady’s slipper
266
+
267
+ ![](images/d8e5962ed122548ba7ade6a52a637b935d99506fc2ef25b5e540938e74af4c28.jpg)
268
+ (b) Pirate ship to Yawl
269
+
270
+ ![](images/35db938603fe17ce553f1c7b8cb4514a49e7342feb40dfd50cf6fd4cdbb781d0.jpg)
271
+ (c) Yurt to Castle
272
+
273
+ ![](images/d47dffd614af997cc2fe31335db973ea33bed8759b0c4099c0a12ffcd0256452.jpg)
274
+ (d) Chiffonier to Chinese cabinet
275
+ Figure 19: Morphing between different categories
276
+
277
+ F MORE RESULTS WITH SUPER-RESOLUTION
278
+
279
+ ![](images/8d2019cccf7dd72ba2705b4c679d73810796567bcba7ac7537deb84373a45ff8.jpg)
280
+ Figure 20: $3 2 \mathrm { x } 3 2 $ to $1 2 8 \mathrm { x } 1 2 8$ super-resolution results
parse/train/ByS1VpgRZ/ByS1VpgRZ_content_list.json ADDED
@@ -0,0 +1,1310 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CGANS WITH PROJECTION DISCRIMINATOR ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 704,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Takeru Miyato1, Masanori Koyama2 miyato@preferred.jp koyama.masanori@gmail.com 1Preferred Networks, Inc. 2Ritsumeikan University ",
17
+ "bbox": [
18
+ 184,
19
+ 143,
20
+ 519,
21
+ 202
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 238,
32
+ 544,
33
+ 253
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We propose a novel, projection based way to incorporate the conditional information into the discriminator of GANs that respects the role of the conditional information in the underlining probabilistic model. This approach is in contrast with most frameworks of conditional GANs used in application today, which use the conditional information by concatenating the (embedded) conditional vector to the feature vectors. With this modification, we were able to significantly improve the quality of the class conditional image generation on ILSVRC2012 (ImageNet) 1000-class image dataset from the current state-of-the-art result, and we achieved this with a single pair of a discriminator and a generator. We were also able to extend the application to super-resolution and succeeded in producing highly discriminative super-resolution images. This new structure also enabled high quality category transformation based on parametric functional transformation of conditional batch normalization layers in the generator. The code with Chainer (Tokui et al., 2015), generated images and pretrained models are available at https://github.com/pfnet-research/sngan_projection. ",
40
+ "bbox": [
41
+ 233,
42
+ 272,
43
+ 764,
44
+ 481
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 513,
55
+ 336,
56
+ 530
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are a framework to construct a generative model that can mimic the target distribution, and in recent years it has given birth to arrays of state-of-the-art algorithms of generative models on image domain (Radford et al., 2016; Salimans et al., 2016; Ledig et al., 2017; Zhang et al., 2017; Reed et al., 2016). The most distinctive feature of GANs is the discriminator $D ( { \\pmb x } )$ that evaluates the divergence between the current generative distribution $p _ { G } ( \\pmb { x } )$ and the target distribution $q ( { \\pmb x } )$ (Goodfellow et al., 2014; Nowozin et al., 2016; Arjovsky et al., 2017). The algorithm of GANs trains the generator model by iteratively training the discriminator and generator in turn, with the discriminator acting as an increasingly meticulous critic of the current generator. ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 825,
67
+ 672
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Conditional GANs (cGANs) are a type of GANs that use conditional information (Mirza & Osindero, 2014) for the discriminator and generator, and they have been drawing attention as a promising tool for class conditional image generation (Odena et al., 2017), the generation of the images from text (Reed et al., 2016; Zhang et al., 2017), and image to image translation (Kim et al., 2017; Zhu et al., 2017). Unlike in standard GANs, the discriminator of cGANs discriminates between the generator distribution and the target distribution on the set of the pairs of generated samples $_ { \\textbf { \\em x } }$ and its intended conditional variable $\\textbf { { y } }$ . To the authors’ knowledge, most frameworks of discriminators in cGANs at the time of writing feeds the pair the conditional information $\\textbf { { y } }$ into the discriminator by naively concatenating (embedded) $\\textbf { { y } }$ to the input or to the feature vector at some middle layer (Mirza & Osindero, 2014; Denton et al., 2015; Reed et al., 2016; Zhang et al., 2017; Perarnau et al., 2016; Saito et al., 2017; Dumoulin et al., 2017a; Sricharan et al., 2017). We would like to however, take into account the structure of the assumed conditional probabilistic models underlined by the structure of the discriminator, which is a function that measures the information theoretic distance between the generative distribution and the target distribution. ",
74
+ "bbox": [
75
+ 174,
76
+ 680,
77
+ 825,
78
+ 875
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "By construction, any assumption about the form of the distribution would act as a regularization on the choice of the discriminator. In this paper, we propose a specific form of the discriminator, a form motivated by a probabilistic model in which the distribution of the conditional variable $\\textbf { { y } }$ given $_ { \\textbf { \\em x } }$ is ",
85
+ "bbox": [
86
+ 176,
87
+ 882,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/ec3520e11657fdeb608fe6e00882b71a56ec36ba76d36bdf62da06ae694f1214.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Discriminator models for conditional GANs "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 240,
102
+ 103,
103
+ 758,
104
+ 273
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "image",
110
+ "img_path": "images/dfbb090f2bfa4de6de0efa4df202fa420d3811aa17ffa90e01fbf8972e05b9e1.jpg",
111
+ "image_caption": [],
112
+ "image_footnote": [],
113
+ "bbox": [
114
+ 174,
115
+ 311,
116
+ 823,
117
+ 397
118
+ ],
119
+ "page_idx": 1
120
+ },
121
+ {
122
+ "type": "image",
123
+ "img_path": "images/8dd2760c90cb4a9e736ee0a370b3904e4d6803c56110e65a74098a88406bba67.jpg",
124
+ "image_caption": [
125
+ "(a) Images generated with the projection model. (left) Tibetan terrier and (right) mushroom. ",
126
+ "(b) (left) Consecutive category morphing with fixed $_ { z }$ . geyser Tibetan terrier mushroom robin. (right) category morphing from Tibetan terrier to mushroom with different value of fixed $_ { z }$ "
127
+ ],
128
+ "image_footnote": [],
129
+ "bbox": [
130
+ 189,
131
+ 417,
132
+ 808,
133
+ 515
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Figure 2: The generator trained with the projection model can generate diverse set of images. For more results, see the experiment section and the appendix section. ",
140
+ "bbox": [
141
+ 174,
142
+ 558,
143
+ 821,
144
+ 585
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "discrete or uni-modal continuous distributions. This model assumption is in fact common in many real world applications, including class-conditional image generation and super-resolution. ",
151
+ "bbox": [
152
+ 174,
153
+ 613,
154
+ 821,
155
+ 642
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "As we will explain in the next section, adhering to this assumption will give rise to a structure of the discriminator that requires us to take an inner product between the embedded condition vector $\\textbf { { y } }$ and the feature vector (Figure 1d). With this modification, we were able to significantly improve the quality of the class conditional image generation on 1000-class ILSVRC2012 dataset (Russakovsky et al., 2015) with a single pair of a discriminator and generator (see the generated examples in Figure 2). Also, when we applied our model of cGANs to a super-resolution task, we were able to produce high quality super-resolution images that are more discriminative in terms of the accuracy of the label classifier than the cGANs based on concatenation, as well as the bilinear and the bicubic method. ",
162
+ "bbox": [
163
+ 173,
164
+ 648,
165
+ 825,
166
+ 773
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "2 THE ARCHITECTURE OF THE CGAN DISCRIMINATOR WITH A PROBABILISTIC MODEL ASSUMPTIONS ",
173
+ "text_level": 1,
174
+ "bbox": [
175
+ 174,
176
+ 794,
177
+ 709,
178
+ 828
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Let us denote the input vector by $_ { \\textbf { \\em x } }$ and the conditional information by $y ^ { 1 }$ . We also denote the cGAN discriminator by $D ( \\pmb { x } , \\pmb { y } ; \\theta ) : = \\mathcal { A } ( f ( \\pmb { x } , \\pmb { y } ; \\theta ) )$ , where $f$ is a function of $_ { \\textbf { \\em x } }$ and $y , \\theta$ is the parameters of $f$ , and $\\mathcal { A }$ is an activation function of the users’ choice. Using $q$ and $p$ to designate the true distributions and the generator model respectively, the standard adversarial loss for the ",
185
+ "bbox": [
186
+ 174,
187
+ 843,
188
+ 825,
189
+ 900
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "discriminator is given by: ",
196
+ "bbox": [
197
+ 174,
198
+ 103,
199
+ 343,
200
+ 118
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "equation",
206
+ "img_path": "images/b4065a7a28673d291100074c26afe5d5907908ec4d8cb249c28af73c8a30530f.jpg",
207
+ "text": "$$\n\\mathcal { L } ( D ) = - E _ { q ( y ) } \\left[ E _ { q ( x | y ) } \\left[ \\log ( D ( x , y ) ) \\right] \\right] - E _ { p ( y ) } \\left[ E _ { p ( x | y ) } \\left[ \\log ( 1 - D ( x , y ) ) \\right] \\right] ,\n$$",
208
+ "text_format": "latex",
209
+ "bbox": [
210
+ 228,
211
+ 126,
212
+ 767,
213
+ 146
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "with $\\mathcal { A }$ in $D$ representing the sigmoid function. By construction, the nature of the ‘critic’ $D$ significantly affects the performance of $G$ . A conventional way of feeding $\\textbf { { y } }$ to $D$ until now has been to concatenate the vector $\\textbf { { y } }$ to the feature vector $_ { \\textbf { \\em x } }$ , either at the input layer (Mirza $\\&$ Osindero, 2014; Denton et al., 2015; Saito et al., 2017), or at some hidden layer (Reed et al., 2016; Zhang et al., 2017; Perarnau et al., 2016; Dumoulin et al., 2017a; Sricharan et al., 2017) (see Figure 1a and Figure 1b). We would like to propose an alternative to this approach by observing the form of the optimal solution (Goodfellow et al., 2014) for the loss function, Eq. (1), can be decomposed into the sum of two log likelihood ratios: ",
220
+ "bbox": [
221
+ 173,
222
+ 151,
223
+ 826,
224
+ 263
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "equation",
230
+ "img_path": "images/e9a64d425d67184bf13c2b813267070a30748cfe870c79155cfb50891ee648d7.jpg",
231
+ "text": "$$\nf ^ { * } ( x , y ) = \\log { \\frac { q ( x | y ) q ( y ) } { p ( x | y ) p ( y ) } } = \\log { \\frac { q ( y | x ) } { p ( y | x ) } } + \\log { \\frac { q ( x ) } { p ( x ) } } : = r ( y | x ) + r ( x ) .\n$$",
232
+ "text_format": "latex",
233
+ "bbox": [
234
+ 253,
235
+ 272,
236
+ 745,
237
+ 306
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Now, we can model the log likelihood ratio $r ( \\pmb { y } | \\pmb { x } )$ and $r ( { \\pmb x } )$ by some parametric functions $f _ { 1 }$ and $f _ { 2 }$ respectively. If we make a standing assumption that $p ( \\pmb { y } | \\pmb { x } )$ and $q ( \\pmb { y } | \\pmb { x } )$ are simple distributions like those that are Gaussian or discrete log linear on the feature space, then, as we will show, the parametrization of the following form becomes natural: ",
244
+ "bbox": [
245
+ 173,
246
+ 314,
247
+ 825,
248
+ 371
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "equation",
254
+ "img_path": "images/37ff4e92cb29dd25d81c8ad44a839e566d26f0c89234d11b8d40424a3cdebb71.jpg",
255
+ "text": "$$\nf ( \\pmb { x } , \\pmb { y } ; \\theta ) : = f _ { 1 } ( \\pmb { x } , \\pmb { y } ; \\theta ) + f _ { 2 } ( \\pmb { x } ; \\theta ) = \\pmb { y } ^ { \\operatorname { T } } V \\phi ( \\pmb { x } ; \\theta _ { \\Phi } ) + \\psi ( \\phi ( \\pmb { x } ; \\theta _ { \\Phi } ) ; \\theta _ { \\Psi } ) ,\n$$",
256
+ "text_format": "latex",
257
+ "bbox": [
258
+ 253,
259
+ 378,
260
+ 741,
261
+ 398
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "where $V$ is the embedding matrix of y, $, \\phi ( \\cdot , \\theta _ { \\Phi } )$ is a vector output function of $_ { \\textbf { \\em x } }$ , and $\\psi ( \\cdot , \\theta _ { \\Psi } )$ is a scalar function of the same $\\phi ( \\pmb { x } ; \\theta _ { \\Phi } )$ that appears in $f _ { 1 }$ (see Figure 1d). The learned parameters $\\theta = \\{ V , \\theta _ { \\Phi } , \\theta _ { \\Psi } \\}$ are to be trained to optimize the adversarial loss. From this point on, we will refer to this model of the discriminator as projection for short. In the next section, we would like to elaborate on how we can arrive at this form. ",
268
+ "bbox": [
269
+ 173,
270
+ 405,
271
+ 825,
272
+ 477
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "3 MOTIVATION BEHIND THE projection DISCRIMINATOR ",
279
+ "text_level": 1,
280
+ "bbox": [
281
+ 174,
282
+ 498,
283
+ 647,
284
+ 515
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "In this section, we will begin from specific, often recurring models and show that, with certain regularity assumption, we can write the optimal solution of the discriminator objective function in the form of (3). Let us first consider the a case of categorical variable. Assume that $y$ is a categorical variable taking a value in $\\{ 1 , \\ldots , C \\}$ , which is often common for a class conditional image generation task. The most popular model for $p ( y | \\mathbf { \\boldsymbol { x } } )$ is the following log linear model: ",
291
+ "bbox": [
292
+ 173,
293
+ 530,
294
+ 825,
295
+ 602
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "equation",
301
+ "img_path": "images/4bed0f9e6af0cd25d091587679cf8dcb900911602bfe53c90453307267a2a15a.jpg",
302
+ "text": "$$\n\\log p ( y = c | \\pmb { x } ) : = \\pmb { v } _ { c } ^ { p \\mathrm { T } } \\phi ( \\pmb { x } ) - \\log Z ( \\phi ( \\pmb { x } ) ) ,\n$$",
303
+ "text_format": "latex",
304
+ "bbox": [
305
+ 348,
306
+ 609,
307
+ 647,
308
+ 628
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "where $\\begin{array} { r } { Z ( \\phi ( \\pmb { x } ) ) : = \\left( \\sum _ { j = 1 } ^ { C } \\exp \\left( \\pmb { v } _ { j } ^ { p \\mathrm { T } } \\phi ( \\pmb { x } ) \\right) \\right) } \\end{array}$ is the partition function, and $\\phi : \\pmb { x } \\mapsto \\mathbb { R } ^ { d ^ { L } }$ is the input to the final layer of the network model. Now, we assume that the target distribution $q$ can also be parametrized in this form, with the same choice of $\\phi$ . This way, the log likelihood ratio would take the following form; ",
315
+ "bbox": [
316
+ 173,
317
+ 637,
318
+ 825,
319
+ 704
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "equation",
325
+ "img_path": "images/3bb1612882989e285c513600bafa37f1aba934cc21bba893d66e7d98bee0d34d.jpg",
326
+ "text": "$$\nr ( y | x ) = \\log \\frac { q ( y = c | x ) } { p ( y = c | x ) } = ( v _ { c } ^ { q } - v _ { c } ^ { p } ) ^ { \\mathrm { T } } \\phi ( x ) - ( \\log Z ^ { q } ( \\phi ( x ) ) - \\log Z ^ { p } ( \\phi ( x ) ) ) .\n$$",
327
+ "text_format": "latex",
328
+ "bbox": [
329
+ 225,
330
+ 712,
331
+ 772,
332
+ 746
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "If we make the values of $( v _ { c } ^ { q } , v _ { c } ^ { p } )$ implicit and put $\\pmb { v } _ { c } : = ( \\pmb { v } _ { c } ^ { q } - \\pmb { v } _ { c } ^ { p } )$ , we can write $f _ { 1 } ( x , y = c ) =$ ${ \\pmb v } _ { c } ^ { \\mathrm { T } } \\phi ( { \\pmb x } )$ . Now, if we can put together the normalization constant $- \\left( \\log Z ^ { q } ( \\phi ( { \\pmb x } ) ) - \\log Z ^ { p } ( \\phi ( { \\pmb x } ) ) \\right)$ and $r ( { \\pmb x } )$ into one expression $\\bar { \\psi } ( \\phi ( { \\pmb x } ) )$ , we can rewrite the equation above as ",
339
+ "bbox": [
340
+ 173,
341
+ 753,
342
+ 825,
343
+ 796
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "equation",
349
+ "img_path": "images/bca960cdde563cee042ffce15003faf9fcdfda36b1e2a594a7a2bf809cdb6f52.jpg",
350
+ "text": "$$\nf ( \\pmb { x } , \\pmb { y } ) : = \\pmb { y } ^ { \\mathrm { T } } V \\phi ( \\pmb { x } ) + \\psi ( \\phi ( \\pmb { x } ) ) .\n$$",
351
+ "text_format": "latex",
352
+ "bbox": [
353
+ 382,
354
+ 805,
355
+ 616,
356
+ 824
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "by using $\\textbf { { y } }$ to denote a one-hot vector of the label $y$ and using $V$ to denote the matrix consisting of the row vectors $v _ { c }$ . Most notably, this formulation introduces the label information via an inner product, as opposed to concatenation. The form (6) is indeed the form we proposed in (3). ",
363
+ "bbox": [
364
+ 173,
365
+ 832,
366
+ 825,
367
+ 875
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "We can also arrive at the form (3) for unimodal continuous distributions $p ( \\pmb { y } | \\pmb { x } )$ as well. Let $\\textbf { \\textit { y } } \\in \\ \\mathbb { R } ^ { d }$ be a $d$ -dimensional continuous variable, and let us assume that conditional $q ( \\pmb { y } | \\pmb { x } )$ and $p ( \\pmb { y } | \\pmb { x } )$ are both given by Gaussian distributions, so that $q ( \\pmb { y } | \\pmb { x } ) = \\mathcal { N } ( \\pmb { y } | \\pmb { \\mu } _ { q } ( \\pmb { x } ) , \\pmb { \\Lambda } _ { q } ^ { - 1 } )$ and ",
374
+ "bbox": [
375
+ 174,
376
+ 881,
377
+ 825,
378
+ 924
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "$p ( \\pmb { y } | \\pmb { x } ) = \\mathcal { N } ( \\pmb { y } | \\pmb { \\mu } _ { p } ( \\pmb { x } ) , \\pmb { \\Lambda } _ { p } ^ { - 1 } )$ where $\\pmb { \\mu } _ { q } ( \\pmb { x } ) : = W ^ { q } \\pmb { \\phi } ( \\pmb { x } )$ and $\\mu _ { p } ( { \\pmb x } ) : = W ^ { p } \\phi ( { \\pmb x } )$ . Then the log density ratio $r ( { \\pmb y } | { \\pmb x } ) = \\log \\big ( q ( { \\pmb y } | { \\pmb x } ) / p ( { \\pmb y } | { \\pmb x } ) \\big )$ is given by: ",
385
+ "bbox": [
386
+ 169,
387
+ 102,
388
+ 825,
389
+ 135
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "equation",
395
+ "img_path": "images/ff1abe03c3bffc7ebd9b499c18354228b67e84dfd881f4343f9270a9dc5c5653.jpg",
396
+ "text": "$$\n\\begin{array} { r } { r ( \\pmb { y } | \\pmb { x } ) = \\log \\left( \\sqrt { \\frac { | \\mathbf { A } _ { q } | } { | \\mathbf { A } _ { p } | } } \\frac { \\exp ( - ( 1 / 2 ) ( \\pmb { y } - \\pmb { \\mu } _ { q } ( \\pmb { x } ) ) ^ { \\mathrm { T } } \\mathbf { A } _ { q } ( \\pmb { y } - \\pmb { \\mu } _ { q } ( \\pmb { x } ) ) ) } { \\exp ( - ( 1 / 2 ) ( \\pmb { y } - \\pmb { \\mu } _ { p } ( \\pmb { x } ) ) ^ { \\mathrm { T } } \\mathbf { A } _ { p } ( \\pmb { y } - \\pmb { \\mu } _ { p } ( \\pmb { x } ) ) ) } \\right) } \\\\ { = - \\frac { 1 } { 2 } \\pmb { y } ^ { \\mathrm { T } } \\left( \\pmb { \\Lambda } _ { q } - \\pmb { \\Lambda } _ { p } \\right) \\pmb { y } + \\pmb { y } ^ { \\mathrm { T } } ( \\pmb { \\Lambda } _ { q } W ^ { q } - \\pmb { \\Lambda } _ { p } W ^ { p } ) \\phi ( \\pmb { x } ) + \\psi ( \\phi ( \\pmb { x } ) ) , } \\end{array}\n$$",
397
+ "text_format": "latex",
398
+ "bbox": [
399
+ 253,
400
+ 141,
401
+ 740,
402
+ 217
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "where $\\psi ( \\phi ( { \\pmb x } ) )$ represents the terms independent of $\\textbf { { y } }$ . Now, if we assume that $\\pmb { \\Lambda } _ { q } = \\pmb { \\Lambda } _ { p } : = \\pmb { \\Lambda }$ , we can ignore the quadratic term. If we further express $\\pmb { \\Lambda } _ { q } W ^ { q } - \\pmb { \\Lambda } _ { p } W ^ { p }$ in the form $V$ , we can arrive at the form (3) again. ",
409
+ "bbox": [
410
+ 178,
411
+ 220,
412
+ 820,
413
+ 263
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "Indeed, however, the way that this regularization affects the training of the generator $G$ is a little unclear in its formulation. As we have repeatedly explained, our discriminator measures the divergence between the generator distribution $p$ and the target distribution $q$ on the assumption that $p ( \\pmb { y } | \\pmb { x } )$ and $q ( \\pmb { y } | \\pmb { x } )$ are relatively simple, and it is highly possible that we are gaining stability in the training process by imposing a regularity condition on the divergence measure. Meanwhile, however, the actual $p ( \\boldsymbol { y } | \\boldsymbol { x } )$ can only be implicitly derived from $p ( { \\pmb x } , { \\pmb y } )$ in computation, and can possibly take numerous forms other than the ones we have considered here. We must admit that there is a room here for an important theoretical work to be done in order to assess the relationship between the choice of the function space for the discriminator and training process of the generator. ",
420
+ "bbox": [
421
+ 173,
422
+ 270,
423
+ 825,
424
+ 396
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "text",
430
+ "text": "4 COMPARISON WITH OTHER METHODS ",
431
+ "text_level": 1,
432
+ "bbox": [
433
+ 178,
434
+ 416,
435
+ 516,
436
+ 431
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "As described above, (3) is a form that is true for frequently occurring situations. In contrast, incorporation of the conditional information by concatenation is rather arbitrary and can possibly include into the pool of candidate functions some sets of functions for which it is difficult to find a logical basis. Indeed, if the situation calls for multimodal $p ( \\pmb { y } | \\pmb { x } )$ , it might be smart not to use the model that we suggest here. Otherwise, however, we expect our model to perform better; in general, it is preferable to use a discriminator that respects the presumed form of the probabilistic model. ",
443
+ "bbox": [
444
+ 174,
445
+ 446,
446
+ 823,
447
+ 531
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Still another way to incorporate the conditional information into the training procedure is to directly manipulate the loss function. The algorithm of AC-GANs (Odena et al., 2017) use a discriminator $( D _ { 1 } )$ that shares a part of its structure with the classifier $( D _ { 2 } )$ , and incorporates the label information into the objective function by augmenting the original discriminator objective with the likelihood score of the classifier on both the generated and training dataset (see Figure 1c). Plug and Play Generative models (PPGNs) (Nguyen et al., 2017) is another approach for the generative model that uses an auxiliary classifier function. It is a method that endeavors to make samples from $p ( { \\pmb x } | { \\pmb y } )$ using an MCMC sampler based on the Langevin equation with drift terms consisting of the gradient of an autoencoder prior $p ( { \\pmb x } )$ and a pretrained auxiliary classifier $p ( y | \\mathbf { \\boldsymbol { x } } )$ . With these method, one can generate a high quality image. However, these ways of using auxiliary classifier may unwittingly encourage the generator to produce images that are particularly easy for the auxiliary classifier to classify, and deviate the final $p ( { \\pmb x } | { \\pmb y } )$ from the true $\\dot { \\mathbf { \\ b { q } } } ( \\mathbf { \\ b { x } } | \\mathbf { \\ b { y } } )$ . In fact, Odena et al. (2017) reports that this problem has a tendency to exacerbate with increasing number of labels. We were able to reproduce this phenomena in our experiments; when we implemented their algorithm on a dataset with 1000 class categories, the final trained model was able to generate only one image for most classes. Nguyen et al.’s PPGNs is also likely to suffer from the same problem because they are using an order of magnitude greater coefficient for the term corresponding to $p ( y | \\mathbf { \\boldsymbol { x } } )$ than for the other terms in the Langevin equation. ",
454
+ "bbox": [
455
+ 173,
456
+ 536,
457
+ 825,
458
+ 787
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "5 EXPERIMENTS ",
465
+ "text_level": 1,
466
+ "bbox": [
467
+ 176,
468
+ 809,
469
+ 331,
470
+ 824
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "In order to evaluate the effectiveness of our newly proposed architecture for the discriminator, we conducted two sets of experiments: class conditional image generation and super-resolution on ILSVRC2012 (ImageNet) dataset (Russakovsky et al., 2015). For both tasks, we used the ResNet (He et al., 2016b) based discriminator and the generator used in Gulrajani et al. (2017), and applied spectral normalization (Miyato et al., 2018) to the all of the weights of the discriminator to regularize the Lipschitz constant. For the objective function, we used the following hinge version of the standard adversarial loss (1) (Lim & Ye, 2017; Tran et al., 2017) ",
477
+ "bbox": [
478
+ 174,
479
+ 840,
480
+ 825,
481
+ 924
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "",
488
+ "bbox": [
489
+ 173,
490
+ 103,
491
+ 637,
492
+ 118
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "equation",
498
+ "img_path": "images/d4c663512107ea509105c31d42bf9bf3507112dcb3808ab568087a3be6eb5d81.jpg",
499
+ "text": "$$\n\\begin{array} { r l r } & { \\langle ( \\hat { G } , D ) = E _ { q ( y ) } [ E _ { q ( x | y ) } [ \\operatorname* { m a x } ( 0 , 1 - D ( \\pmb { x } , y ) ] ] + E _ { q ( y ) } [ E _ { p ( z ) } [ \\operatorname* { m a x } ( 0 , 1 + D ( \\hat { G } ( z , y ) , y ) ) ] ] , } & \\\\ & { \\langle ( G , \\hat { D } ) = - E _ { q ( y ) } [ E _ { p ( z ) } [ \\hat { D } ( G ( z , y ) , y ) ) ] ] , } & { ( 9 ) } \\end{array}\n$$",
500
+ "text_format": "latex",
501
+ "bbox": [
502
+ 181,
503
+ 121,
504
+ 830,
505
+ 176
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "where the last activation function $\\mathcal { A }$ of $D$ is identity function. $p ( z )$ is standard Gaussian distribution and $G ( z , y )$ is the generator network. For all experiments, we used Adam optimizer (Kingma & Ba, 2015) with hyper-parameters set to $\\alpha = 0 . 0 0 0 2 , \\beta _ { 1 } = 0 , \\beta _ { 2 } = 0 . 9$ . We updated the discriminator five times per each update of the generator. We will use concat to designate the models (Figure $1 \\mathsf { b } ) ^ { 2 }$ , and use projection to designate the proposed model (Figure 1d) . ",
512
+ "bbox": [
513
+ 174,
514
+ 178,
515
+ 825,
516
+ 248
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "5.1 CLASS-CONDITIONAL IMAGE GENERATION",
523
+ "text_level": 1,
524
+ "bbox": [
525
+ 174,
526
+ 263,
527
+ 516,
528
+ 279
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "The ImageNet dataset used in the experiment of class conditional image generation consisted of 1,000 image classes of approximately 1,300 pictures each. We compressed each images to $1 2 8 \\times 1 2 8$ pixels. Unlike for AC-GANs3 we used a single pair of a ResNet-based generator and a discriminator. Also, we used conditional batch normalization (Dumoulin et al., 2017b; de Vries et al., 2017) for the generator. As for the architecture of the generator network used in the experiment, please see Figure 14 for more detail. Our proposed projection model discriminator is equipped with a ‘projection layer’ that takes inner product between the embedded one-hot vector $\\textbf { { y } }$ and the intermediate output (Figure 14a). As for the structure of the the concat model discriminator to be compared against, we used the identical bulk architecture as the projection model discriminator, except that we removed the projection layer from the structure and concatenated the spatially replicated embedded conditional vector $\\textbf { { y } }$ to the output of third ResBlock. We also experimented with AC-GANs as the current state of the art model. For AC-GANs, we placed the softmax layer classifier to the same structure shared by concat and projection. For each method, we updated the generator 450K times, and applied linear decay for the learning rate after 400K iterations so that the rate would be 0 at the end. For the comparative experiments, we trained the model for 450K iterations, which was ample for the training of concat to stabilize. AC-GANs collapsed prematurely before the completion of 450K iterations, so we reported the result from the peak of its performance ( 80K iterations). For all experiments throughout, we used the training over 450K iterations for comparing the performances. On a separate note, our method continued to improve even after 450K. We therefore also reported the inception score and FID of the extended training (850K iterations) for our method exclusively. See the table 1 for the exact figures. ",
535
+ "bbox": [
536
+ 173,
537
+ 290,
538
+ 825,
539
+ 580
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "We used inception score (Salimans et al., 2016) for the evaluation of the visual appearance of the generated images. It is in general difficult to evaluate how ‘good’ the generative model is. Indeed, however, either subjective or objective, some definite measures of ‘goodness’ exists, and essential two of them are ‘diversity’ and the sheer visual quality of the images. One possible candidate for quantitative measure of diversity and visual appearance is FID (Heusel et al., 2017). We computed FID between the generated images and dataset images within each class, and designated the values as intra FIDs. More precisely, FID (Heusel et al., 2017) measures the 2-Wasserstein distance between the two distributions $q _ { y }$ and $p _ { y }$ , and is given by $F ( q _ { y } , p _ { y } ) \\ = \\ \\| { \\pmb { \\mu } } _ { q _ { y } } \\ - { \\pmb { \\mu } } _ { p _ { y } } \\| _ { 2 } ^ { 2 } \\ +$ trace $\\left( C _ { q _ { y } } + C _ { p _ { y } } - 2 ( C _ { q _ { y } } C _ { p _ { y } } ) ^ { 1 / 2 } \\right)$ , where $\\{ \\mu _ { q _ { y } } , C _ { q _ { y } } \\}$ , $\\{ \\mu _ { p _ { y } } , C _ { p _ { y } } \\}$ are respectively the mean and the covariance of the final feature vectors produced by the inception model (Szegedy et al., 2015) from the true samples and generated samples of class $y$ . When the set of generated examples have collapsed modes, the trace of $C _ { p _ { y } }$ becomes small and the trace term itself becomes large. In order to compute $C _ { q _ { y } }$ we used all samples in the training data belonging to the class of concern, and used 5000 generated samples for the computation of $C _ { p _ { y } }$ . We empirically observed in our experiments that intra FID is, to a certain extent, serving its purpose well in measuring the diversity and the visual quality. ",
546
+ "bbox": [
547
+ 173,
548
+ 588,
549
+ 825,
550
+ 813
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "To highlight the effectiveness of our inner-product based approach (projection) of introducing the conditional information into the model, we compared our method against the state of the art ACGANs as well as the conventional incorporation of the conditional information via concatenation at hidden layer (concat). As we can see in the training curves Figure 3, projection outperforms inception score than concat throughout the training. Table 1 compares the intra class FIDs and the inception Score of the images generated by each method. The result shown here for the AC-GANs is that of the model at its prime in terms of the inception score, because the training collapsed at the end. We see that the images generated by projection have lower intra FID scores than both adversaries, indicating that the Wasserstein distance between the generative distribution by projection to the target distribution is smaller. For the record, our model performed better than other models on the CIFAR10 and CIFAR 100 as well (See Appendix A). ",
557
+ "bbox": [
558
+ 174,
559
+ 820,
560
+ 825,
561
+ 862
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "image",
567
+ "img_path": "images/2192e95c50d255416dbc8d3cef02975c1b0b270d3f11d26a257f2780374ad431.jpg",
568
+ "image_caption": [],
569
+ "image_footnote": [],
570
+ "bbox": [
571
+ 452,
572
+ 102,
573
+ 781,
574
+ 224
575
+ ],
576
+ "page_idx": 5
577
+ },
578
+ {
579
+ "type": "image",
580
+ "img_path": "images/3d525ce3d861a0acb3d00d06bf586814dc5726773cf2522420243abf5bcfd5fb.jpg",
581
+ "image_caption": [
582
+ "Figure 3: Learning curves of Figure 4: Comparison of intra FID scores for projection cGANs with concat and projection concat, and AC-GANs on ImageNet. Each dot corresponds on ImageNet. to a class. "
583
+ ],
584
+ "image_footnote": [],
585
+ "bbox": [
586
+ 222,
587
+ 103,
588
+ 375,
589
+ 220
590
+ ],
591
+ "page_idx": 5
592
+ },
593
+ {
594
+ "type": "table",
595
+ "img_path": "images/a691b7c832d61c4784b18168b06db0dcce33f15aff6f185b71665377f08ba6a2.jpg",
596
+ "table_caption": [
597
+ "Table 1: Inception score and intra FIDs on ImageNet. "
598
+ ],
599
+ "table_footnote": [],
600
+ "table_body": "<table><tr><td>Method</td><td>Inception Score</td><td>Intra FID</td></tr><tr><td>AC-GANs</td><td>28.5±.20</td><td>260.0</td></tr><tr><td>concat</td><td>21.1±.35</td><td>141.2</td></tr><tr><td>projection</td><td>29.7±.61</td><td>103.1</td></tr><tr><td>*projection (850K iteration)</td><td>36.8±.44</td><td>92.4</td></tr></table>",
601
+ "bbox": [
602
+ 294,
603
+ 319,
604
+ 704,
605
+ 411
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "",
612
+ "bbox": [
613
+ 173,
614
+ 438,
615
+ 825,
616
+ 549
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Figure 10a and 10b shows the set of classes for which (a) projection yielded results with better intra FIDs than the concat and (b) the reverse. From the top, the figures are listed in descending order of the ratio between the intra FID score between the two methods. Note that when the concat outperforms projection it only wins by a slight margin, whereas the projection outperforms concat by large margin in the opposite case. A quick glance on the cases in which the concat outperforms the projection suggests that the FID is in fact measuring the visual quality, because both sets looks similar to the human eyes in terms of appearance. Figure 5 shows an arbitrarily selected set of results yielded by AC-GANs from variety of ${ \\boldsymbol { z } } \\mathbf { s }$ . We can clearly observe the mode-collapse on this batch. This is indeed a tendency reported by the inventors themselves (Odena et al., 2017). ACGANs can generate easily recognizable (i.e classifiable) images, but at the cost of losing diversity and hence at the cost of constructing a generative distribution that is significantly different from the target distribution as a whole. We can also assess the low FID score of projection from different perspective. By construction, the trace term of intra FID measures the degree of diversity within the class. Thus, our result on the intra FID scores also indicates that that our projection is doing better in reproducing the diversity of the original. The GANs with the concat discriminator also suffered from mode-collapse for some classes (see Figure 6). For the set of images generated by projection, we were not able to detect any notable mode-collapse. ",
623
+ "bbox": [
624
+ 173,
625
+ 556,
626
+ 825,
627
+ 792
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "Figure 7a shows the samples generated with the projection model for the classes on which the cGAN achieved lowest intra FID scores (that is the classes on which the generative distribution were particularly close to target conditional distribution), and Figure 7b the reverse. While most of the images listed in Figure 7a are of relatively high quality, we still observe some degree of mode-collapse. Note that the images in the classes with high FID are featuring complex objects like human; that is, one can expect the diversity within the class to be wide. However, we note that we did not use the most complicated neural network available for the experiments presented on this paper, because we prioritized the completion of the training within a reasonable time frame. It is very possible that, by increasing the complexity of the model, we will be able to further improve the visual quality of the images and the diversity of the distribution. In Appendix D, we list images of numerous classes generated by cGANs trained with our projection model. ",
634
+ "bbox": [
635
+ 173,
636
+ 799,
637
+ 825,
638
+ 924
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "image",
644
+ "img_path": "images/537d54379a8fc36a8717dd27960d5ac73b4f9314a2c3c18cac52a12aaf215700.jpg",
645
+ "image_caption": [
646
+ "Figure 5: comparison of the images generated by (a) AC-GANs and (b) projection. "
647
+ ],
648
+ "image_footnote": [],
649
+ "bbox": [
650
+ 341,
651
+ 103,
652
+ 661,
653
+ 239
654
+ ],
655
+ "page_idx": 6
656
+ },
657
+ {
658
+ "type": "image",
659
+ "img_path": "images/800874aca51e180b570c20cf4c25fdd54d2d22dd2e2591c73dc1debbad131650.jpg",
660
+ "image_caption": [
661
+ "Figure 6: Collapsed images on the concat model. "
662
+ ],
663
+ "image_footnote": [],
664
+ "bbox": [
665
+ 189,
666
+ 282,
667
+ 808,
668
+ 425
669
+ ],
670
+ "page_idx": 6
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "",
675
+ "bbox": [
676
+ 176,
677
+ 477,
678
+ 825,
679
+ 505
680
+ ],
681
+ "page_idx": 6
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "Category Morphing With our new architecture, we were also able to successfully perform category morphism. When there are classes $y _ { 1 }$ and $y _ { 2 }$ , we can create an interpolated generator by simply mixing the parameters of conditional batch normalization layers of the conditional generator corresponding to these two classes. Figure 8 shows the output of the interpolated generator with the same $z$ . Interestingly, the combination is also yielding meaningful images when $y _ { 1 }$ and $y _ { 2 }$ are significantly different. ",
686
+ "bbox": [
687
+ 174,
688
+ 520,
689
+ 825,
690
+ 603
691
+ ],
692
+ "page_idx": 6
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "Fine-tuning with the pretrained model on the ILSVRC2012 classification task. As we mentioned in Section 4, the authors of Plug and Play Generative model (PPGNs) (Nguyen et al., 2017) were able to improve the visual appearance of the model by augmenting the cost function with that of the label classifier. We also followed their footstep and augmented the original generator loss with an additional auxiliary classifier loss. As warned earlier regarding this type of approach, however, this type of modification tends to only improve the visual performance of the images that are easy for the pretrained model to classify. In fact, as we can see in Appendix B, we were able to improve the visual appearance the images with the augmentation, but at the cost of diversity. ",
697
+ "bbox": [
698
+ 173,
699
+ 617,
700
+ 825,
701
+ 729
702
+ ],
703
+ "page_idx": 6
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "5.2 SUPER-RESOLUTION ",
708
+ "text_level": 1,
709
+ "bbox": [
710
+ 174,
711
+ 746,
712
+ 356,
713
+ 760
714
+ ],
715
+ "page_idx": 6
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "We also evaluated the effectiveness of (3) in its application to the super-resolution task. Put formally, the super-resolution task is to infer the high resolution RGB image of dimension $\\pmb { x } \\in \\mathbb { R } ^ { R _ { H } \\times R _ { H } \\times \\hat { \\mathbf { 3 } } }$ from the low resolution RGB image of dimension $\\pmb { y } \\in \\mathbb { R } ^ { R _ { L } \\times R _ { L } \\times 3 } ; R _ { H } > R _ { L }$ . This task is very much the case that we presumed in our model construction, because $p ( \\pmb { y } | \\pmb { x } )$ is most likely unimodal even if $p ( { \\pmb x } | { \\pmb y } )$ is multimodal. For the super-resolution task, we used the following formulation for discriminator function: ",
720
+ "bbox": [
721
+ 173,
722
+ 771,
723
+ 825,
724
+ 854
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "equation",
730
+ "img_path": "images/fcddc66ff03303a47346117b581c0e0469e27dcc8bfef16654214c0a1d490917.jpg",
731
+ "text": "$$\nf ( { \\pmb x } , { \\pmb y } ; { \\theta } ) = \\sum _ { i , j , k } \\left( y _ { i j k } F _ { i j k } ( { \\phi } ( { \\pmb x } ; { \\theta } _ { \\Phi } ) ) \\right) + \\psi ( { \\phi } ( { \\pmb x } ; { \\theta } _ { \\Phi } ) ; { \\theta } _ { \\Psi } ) ,\n$$",
732
+ "text_format": "latex",
733
+ "bbox": [
734
+ 302,
735
+ 856,
736
+ 694,
737
+ 891
738
+ ],
739
+ "page_idx": 6
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "where $\\begin{array} { r } { F ( \\phi ( \\pmb { x } ; \\theta _ { \\Phi } ) ) = V * \\phi ( \\pmb { x } ; \\theta _ { \\Phi } ) } \\end{array}$ where $V$ is a convolutional kernel and $^ *$ stands for convolution operator. Please see Figure 15 in the appendix section for the actual network architectures we used for this task. For this set of experiments, we constructed the concat model by removing the module in the projection model containing the the inner product layer and the accompanying convolution layer altogether, and simply concatenated $\\textbf { { y } }$ to the output of the ResBlock preceding the inner product module in the original. As for the resolutions of the image datasets, we chose $R _ { H } = 1 2 8$ and $R _ { L } =$ 32, and created the low resolution images by applying bilinear downsampling on high resolution images. We updated the generators 150K times for all methods, and applied linear decay for the learning rate after 100K iterations so that the final learning rate was 0 at 150K-th iteration. ",
744
+ "bbox": [
745
+ 173,
746
+ 895,
747
+ 823,
748
+ 924
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "image",
754
+ "img_path": "images/55f061a8535be4d7c6a950904319ef9f483b316b7f577db5f89f5f58553f04ee.jpg",
755
+ "image_caption": [
756
+ "Figure 7: $1 2 8 \\times 1 2 8$ pixel images generated by the projection method for the classes with (a) bottom five FID scores and (b) top five FID scores. The string and the value above each panel are respectively the name of the corresponding class and the FID score. The second row in each panel corresponds to the original dataset. "
757
+ ],
758
+ "image_footnote": [],
759
+ "bbox": [
760
+ 173,
761
+ 90,
762
+ 825,
763
+ 595
764
+ ],
765
+ "page_idx": 7
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "",
770
+ "bbox": [
771
+ 173,
772
+ 694,
773
+ 825,
774
+ 791
775
+ ],
776
+ "page_idx": 7
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "Figure 9 shows the result of our super-resolution. The bicubic super-resolution is very blurry, and concat result is suffering from excessively sharp and rough edges. On the other hand, the edges of the images generated by our projection method are much clearer and smoother, and the image itself is much more faithful to the original high resolution images. In order to qualitatively compare the performances of the models, we checked MS-SSIM (Wang et al., 2003) and the classification accuracy of the inception model on the generated images using the validation set of the ILSVRC2012 dataset. As we can see in Table 2, our projection model was able to achieve high inception accuracy and high MS-SSIM when compared to bicubic and concat. Note that the performance of superresolution with concat model even falls behind those of the bilinear and bicubic super-resolutions in terms of the inception accuracy. Also, we used projection model to generate multiple batches of images with different random values of $_ { z }$ to be fed to the generator and computed the average of the logits of the inception model on these batches (MC samples). We then used the so-computed average logits to make prediction of the labels. With an ensemble over 10 seeds ( $1 0 \\mathrm { M C }$ in Table 2), we were able to improve the inception accuracy even further. This result indicates that our GANs are learning the super-resolution as an distribution, as opposed to deterministic function. Also, the success with the ensemble also suggests a room for a new way to improve the accuracy of classification task on low resolution images. ",
781
+ "bbox": [
782
+ 173,
783
+ 797,
784
+ 825,
785
+ 924
786
+ ],
787
+ "page_idx": 7
788
+ },
789
+ {
790
+ "type": "image",
791
+ "img_path": "images/32cddc648d477a401d503a77d877fb1a55955b50be00a272260fa4fb9cd3c72f.jpg",
792
+ "image_caption": [
793
+ "Figure 8: Category morphing. More results are in the appendix section. "
794
+ ],
795
+ "image_footnote": [],
796
+ "bbox": [
797
+ 171,
798
+ 83,
799
+ 826,
800
+ 505
801
+ ],
802
+ "page_idx": 8
803
+ },
804
+ {
805
+ "type": "table",
806
+ "img_path": "images/982f6e35f5651b6e7284472287c38c7c48e16478b71f3d76f2bc8efef379992e.jpg",
807
+ "table_caption": [
808
+ "Table 2: Inception accuracy and MS-SSIM on different super-resolution methods. We picked up dataset images from the validation set. "
809
+ ],
810
+ "table_footnote": [],
811
+ "table_body": "<table><tr><td>Method</td><td>biliear</td><td>bicubic</td><td>concat</td><td> projection</td><td> projection (10 MC)</td></tr><tr><td>Inception Acc.(%)</td><td>23.1</td><td>31.4</td><td>11.0</td><td>35.2</td><td>36.4</td></tr><tr><td>MS-SSIM</td><td>0.835</td><td>0.859</td><td>0.829</td><td>0.878</td><td>1</td></tr></table>",
812
+ "bbox": [
813
+ 215,
814
+ 585,
815
+ 781,
816
+ 643
817
+ ],
818
+ "page_idx": 8
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "",
823
+ "bbox": [
824
+ 173,
825
+ 671,
826
+ 825,
827
+ 784
828
+ ],
829
+ "page_idx": 8
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "6 CONCLUSION ",
834
+ "text_level": 1,
835
+ "bbox": [
836
+ 176,
837
+ 806,
838
+ 318,
839
+ 823
840
+ ],
841
+ "page_idx": 8
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "Any specification on the form of the discriminator imposes a regularity condition for the choice for the generator distribution and the target distribution. In this research, we proposed a model for the discriminator of cGANs that is motivated by a commonly occurring family of probabilistic models. This simple modification was able to significantly improve the performance of the trained generator on conditional image generation task and super-resolution task. The result presented in this paper is strongly suggestive of the importance of the choice of the form of the discriminator and the design of the distributional metric. We plan to extend this approach to other applications of cGANs, such as semantic segmentation tasks and image to image translation tasks. ",
846
+ "bbox": [
847
+ 174,
848
+ 840,
849
+ 825,
850
+ 924
851
+ ],
852
+ "page_idx": 8
853
+ },
854
+ {
855
+ "type": "image",
856
+ "img_path": "images/de90c79076be5c3819a460e5e92251e8aeb7edc82d94dc65978c6b2cc7ffb58a.jpg",
857
+ "image_caption": [
858
+ "Figure 9: 32x32 to $1 2 8 \\mathrm { x } 1 2 8$ super-resolution by different methods "
859
+ ],
860
+ "image_footnote": [],
861
+ "bbox": [
862
+ 174,
863
+ 106,
864
+ 825,
865
+ 334
866
+ ],
867
+ "page_idx": 9
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "",
872
+ "bbox": [
873
+ 173,
874
+ 387,
875
+ 823,
876
+ 415
877
+ ],
878
+ "page_idx": 9
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "ACKNOWLEDGMENTS ",
883
+ "text_level": 1,
884
+ "bbox": [
885
+ 176,
886
+ 431,
887
+ 326,
888
+ 444
889
+ ],
890
+ "page_idx": 9
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "We would like to thank the members of Preferred Networks, Inc., especially Richard Calland, Sosuke Kobayashi and Crissman Loomis, for helpful comments. We would also like to thank Shoichiro Yamaguchi, a graduate student of Kyoto University, for helpful comments. ",
895
+ "bbox": [
896
+ 176,
897
+ 455,
898
+ 825,
899
+ 497
900
+ ],
901
+ "page_idx": 9
902
+ },
903
+ {
904
+ "type": "image",
905
+ "img_path": "images/bfa07cf264b9631ba798d785bec7f2dcb6e023453799ec788e16784907ed1782.jpg",
906
+ "image_caption": [
907
+ "Figure 10: Comparison of concat vs. projection. The value attached above each panel represents the achieved FID score. "
908
+ ],
909
+ "image_footnote": [],
910
+ "bbox": [
911
+ 173,
912
+ 251,
913
+ 825,
914
+ 728
915
+ ],
916
+ "page_idx": 10
917
+ },
918
+ {
919
+ "type": "text",
920
+ "text": "REFERENCES ",
921
+ "text_level": 1,
922
+ "bbox": [
923
+ 174,
924
+ 103,
925
+ 285,
926
+ 117
927
+ ],
928
+ "page_idx": 11
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. In ´ ICML, pp. 214–223, 2017. \nHarm de Vries, Florian Strub, Jer´ emie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Mod- ´ ulating early visual processing by language. In NIPS, pp. 6576–6586, 2017. \nEmily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, pp. 1486–1494, 2015. \nVincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In ICLR, 2017a. \nVincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. In ICLR, 2017b. \nIan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pp. 2672–2680, 2014. \nIshaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein GANs. arXiv preprint arXiv:1704.00028, 2017. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016a. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pp. 630–645. Springer, 2016b. \nMartin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Gunter Klambauer, and Sepp ¨ Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. arXiv preprint arXiv:1706.08500, 2017. \nTaeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jungkwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In ICML, pp. 1857–1865, 2017. \nDiederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. \nChristian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew ´ Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image superresolution using a generative adversarial network. In CVPR, 2017. \nJae Hyun Lim and Jong Chul Ye. Geometric GAN. arXiv preprint arXiv:1705.02894, 2017. \nMehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. \nTakeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018. \nAnh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & play generative networks: Conditional iterative generation of images in latent space. In CVPR, 2017. \nSebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-GAN: Training generative neural samplers using variational divergence minimization. In NIPS, pp. 271–279, 2016. \nAugustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with auxiliary classifier GANs. In ICML, pp. 2642–2651, 2017. \nGuim Perarnau, Joost van de Weijer, Bogdan Raducanu, and Jose M Alvarez. Invertible conditional gans for ´ image editing. In NIPS Workshop on Adversarial Training, 2016. \nAlec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. \nScott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In ICML, pp. 1060–1069, 2016. \nOlga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. \nMasaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal generative adversarial nets with singular value clipping. In ICCV, 2017. \nTim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NIPS, pp. 2226–2234, 2016. \nKumar Sricharan, Raja Bala, Matthew Shreve, Hui Ding, Kumar Saketh, and Jin Sun. Semi-supervised conditional GANs. arXiv preprint arXiv:1708.05789, 2017. \nChristian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pp. 1–9, 2015. \nSeiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of workshop on machine learning systems (LearningSys) in the twentyninth annual conference on neural information processing systems (NIPS), 2015. \nAntonio Torralba, Rob Fergus, and William T Freeman. 80 million tiny images: A large data set for nonparametric object and scene recognition. IEEE transactions on pattern analysis and machine intelligence, 30 (11):1958–1970, 2008. \nDustin Tran, Rajesh Ranganath, and David M Blei. Deep and hierarchical implicit models. arXiv preprint arXiv:1702.08896, 2017. \nZhou Wang, Eero P Simoncelli, and Alan C Bovik. Multiscale structural similarity for image quality assessment. In Asilomar Conference on Signals, Systems and Computers, pp. 1398–1402, 2003. \nHan Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaolei Huang, Xiaogang Wang, and Dimitris Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In ICCV, 2017. \nJun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. ",
933
+ "bbox": [
934
+ 171,
935
+ 107,
936
+ 828,
937
+ 922
938
+ ],
939
+ "page_idx": 11
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "",
944
+ "bbox": [
945
+ 173,
946
+ 104,
947
+ 825,
948
+ 219
949
+ ],
950
+ "page_idx": 12
951
+ },
952
+ {
953
+ "type": "text",
954
+ "text": "A RESULTS OF CLASS CONDITIONAL IMAGE GENERATION ON CIFAR-10 AND CIFAR-100 ",
955
+ "text_level": 1,
956
+ "bbox": [
957
+ 173,
958
+ 103,
959
+ 792,
960
+ 135
961
+ ],
962
+ "page_idx": 13
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "As a preliminary experiment, we compared the performance of conditional image generation on CIFAR-10 and CIFAR-100 3. For the discriminator and the generator, we reused the same architecture used in Miyato et al. (2018) for the task on CIFAR-10. For the adversarial objective functions, we used (9), and trained both machine learners with the same optimizer with same hyper parameters we used in Section 5. For our projection model, we added the projection layer to the discriminator in the same way we did in the ImageNet experiment (before the last linear layer). Our projection model achieved better performance than other methods on both CIFAR-10 and CIFAR-100. Concatenation at hidden layer (hidden concat) was performed on the output of second ResBlock of the discriminator. We tested hidden concat as a comparative method in our main experiments on ImageNet, because the concatenation at hidden layer performed better than the concatenation at the input layer (input concat) when the number of classes was large (CIFAR-100). ",
967
+ "bbox": [
968
+ 173,
969
+ 150,
970
+ 825,
971
+ 304
972
+ ],
973
+ "page_idx": 13
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "To explore how the hyper-parameters affect the performance of our proposed architecture, we conducted hyper-parameter search on CIFAR-100 about the Adam hyper-parameters (learning rate $\\alpha$ and 1st order momentum $\\beta _ { 1 . }$ ) for both our proposed architecture and the baselines. Namely, we varied each one of these parameters while keeping the other constant, and reported the inception scores for all methods including several versions of concat architectures to compare. We tested with concat module introduced at (a) input layer, (b) hidden layer, and at (c) output layer. As we can see in Figure 11, our projection architecture excelled over all other architectures for all choice of the parameters, and achieved the inception score of 9.53. Meanwhile, concat architectures were able to achieve all 8.82 at most. The best concat model in term of the inception score on CIFAR-100 was the hidden concat with $\\alpha = 0 . 0 0 0 2$ and $\\beta _ { 1 } = 0$ , which turns out to be the very choice of the parameters we picked for our ImageNet experiment. ",
978
+ "bbox": [
979
+ 174,
980
+ 310,
981
+ 825,
982
+ 463
983
+ ],
984
+ "page_idx": 13
985
+ },
986
+ {
987
+ "type": "table",
988
+ "img_path": "images/baa3887b3395c30b05eed89fddb8582caa340696979b968f628597bc38a9b3a2.jpg",
989
+ "table_caption": [
990
+ "Table 3: The performance of class conditional image generation on CIFAR-10 (C10) and CIFAR100 (C100). "
991
+ ],
992
+ "table_footnote": [],
993
+ "table_body": "<table><tr><td>Method</td><td>Inception score C10</td><td>C100</td><td>FID C10 C100</td></tr><tr><td>(Real data)</td><td>11.24</td><td>14.79</td><td>7.60 8.94</td></tr><tr><td>AC-GAN</td><td>8.22</td><td>8.80</td><td>19.7 25.4</td></tr><tr><td> input concat</td><td>8.25</td><td>7.93</td><td>19.2 31.4</td></tr><tr><td>hidden concat</td><td>8.14</td><td>8.82</td><td>19.2 24.8</td></tr><tr><td>(ours) projection</td><td>8.62</td><td>9.04</td><td>17.5 23.2</td></tr></table>",
994
+ "bbox": [
995
+ 320,
996
+ 515,
997
+ 678,
998
+ 635
999
+ ],
1000
+ "page_idx": 13
1001
+ },
1002
+ {
1003
+ "type": "image",
1004
+ "img_path": "images/802214d0fe7e313b4d57605ad6721c042423588c1ef245e8806e4e681daed633.jpg",
1005
+ "image_caption": [
1006
+ "Figure 11: Inception scores on CIFAR-100 with different discriminator models varying hyperparameters ( $\\overset { \\cdot } { \\alpha }$ and $\\beta _ { 1 }$ ) of Adam optimizer. "
1007
+ ],
1008
+ "image_footnote": [],
1009
+ "bbox": [
1010
+ 241,
1011
+ 656,
1012
+ 754,
1013
+ 875
1014
+ ],
1015
+ "page_idx": 13
1016
+ },
1017
+ {
1018
+ "type": "image",
1019
+ "img_path": "images/f09ac1616c4b5401905190295c7ea6c94be9035139cf2497f1add48c249565d7.jpg",
1020
+ "image_caption": [
1021
+ "Figure 12: Effect of the finetuning with auxiliary classifier loss. Same coordinate in panel (a) and (b) corresponds to same value of $_ z$ "
1022
+ ],
1023
+ "image_footnote": [],
1024
+ "bbox": [
1025
+ 241,
1026
+ 106,
1027
+ 759,
1028
+ 470
1029
+ ],
1030
+ "page_idx": 14
1031
+ },
1032
+ {
1033
+ "type": "table",
1034
+ "img_path": "images/dd205bd3e6d94a01d42fa265fc7bddeadf3975071db36d87b88f83b3c592cd6f.jpg",
1035
+ "table_caption": [
1036
+ "Table 4: Inception score and intra FIDs on ImageNet with a pretrained model on classification tasks for ILSVRC2012 dataset. $^ { \\ddag \\mathrm { N } }$ guyen et al. (2017) "
1037
+ ],
1038
+ "table_footnote": [],
1039
+ "table_body": "<table><tr><td>Method</td><td>Inception Score</td><td>Intra FID</td></tr><tr><td>PPGNs+</td><td>47.4</td><td>N/A</td></tr><tr><td>projection(finetuned)</td><td>210</td><td>54.2</td></tr></table>",
1040
+ "bbox": [
1041
+ 315,
1042
+ 564,
1043
+ 679,
1044
+ 625
1045
+ ],
1046
+ "page_idx": 14
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "B OBJECTIVE FUNCTION WITH AN AUXILIARY CLASSIFIER COST ",
1051
+ "text_level": 1,
1052
+ "bbox": [
1053
+ 173,
1054
+ 648,
1055
+ 728,
1056
+ 664
1057
+ ],
1058
+ "page_idx": 14
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "In this experiment, we followed the footsteps of Plug and Play Generative model (PPGNs) (Nguyen et al., 2017) and augmented the original generator loss with an additional auxiliary classifier loss. In particular, we used the losses given by : ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 678,
1066
+ 826,
1067
+ 722
1068
+ ],
1069
+ "page_idx": 14
1070
+ },
1071
+ {
1072
+ "type": "equation",
1073
+ "img_path": "images/78e468b0c7bcfba71446938c55770f085e6fdd2e6c76bbb703bdc9c3dae0493e.jpg",
1074
+ "text": "$$\nL \\left( G , \\hat { D } , \\hat { p } _ { \\mathrm { p r e } } ( y | x ) \\right) = - E _ { q ( y ) } \\left[ E _ { p ( z ) } \\left[ \\hat { D } ( G ( z , y ) , y ) - L _ { C } ( \\hat { p } _ { \\mathrm { p r e } } ( y | G ( z , y ) ) ) \\right] \\right] ,\n$$",
1075
+ "text_format": "latex",
1076
+ "bbox": [
1077
+ 212,
1078
+ 728,
1079
+ 758,
1080
+ 756
1081
+ ],
1082
+ "page_idx": 14
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "where $\\hat { p } _ { \\mathrm { p r e } } ( y | \\pmb { x } )$ is the fixed model pretrained for ILSVRC2012 classification task. For the actual experiment, we trained the generator with the original adversarial loss for the first 400K updates, and used the augmented loss for the last 50K updates. For the learning rate hyper parameter, we adopted the same values as other experiments we described above. For the pretrained classifier, we used ResNet50 model used in He et al. (2016a). Figure 12 compares the results generated by vanilla objective function and the results generated by the augmented objective function. As we can see in Table 4, we were able to significantly outperform PPGNs in terms of inception score. However, note that the images generated here are images that are easy to classify. The method with auxiliary classifier loss seems effective in improving the visual appearance, but not in training faithful generative model. ",
1087
+ "bbox": [
1088
+ 173,
1089
+ 761,
1090
+ 825,
1091
+ 901
1092
+ ],
1093
+ "page_idx": 14
1094
+ },
1095
+ {
1096
+ "type": "image",
1097
+ "img_path": "images/f238ed8ab5746c733f3277093cc6d7d4f752a7154edca57a4e2729674c208ddc.jpg",
1098
+ "image_caption": [
1099
+ "(b) ResBlock for the generator. ",
1100
+ "Figure 13: Architecture of the ResBlocks used in all experiments. For the generator generator’s Resblock, conditional batch normalization layer (Dumoulin et al., 2017b; de Vries et al., 2017) was used in place of the standard batch normalization layer. For the ResBlock in the generator for the super resolution tasks that implements the upsampling, the random vector $_ z$ was fed to the model by concatenating the vector to the embedded low resolution image vector $\\textbf { { y } }$ prior to the first convolution layer within the block. For the procedure of downsampling and upsampling, we followed the implementation by Gulrajani et al. (2017). For the discriminator, we performed downsampling (average pool) after the second conv of the ResBlock. For the generator, we performed upsampling before the first conv of the ResBlock. For the ResBlock that is performing the downsampling, we replaced the identity mapping with 1x1 conv layer followed by downsampling to balance the dimension. We did the essentially same for the Resblock that is performing the upsampling, except that we applied the upsampling before the 1x1 conv. "
1101
+ ],
1102
+ "image_footnote": [],
1103
+ "bbox": [
1104
+ 253,
1105
+ 138,
1106
+ 745,
1107
+ 477
1108
+ ],
1109
+ "page_idx": 15
1110
+ },
1111
+ {
1112
+ "type": "image",
1113
+ "img_path": "images/0962bcbc2b0a16a4cbcffc020e1ce5de4d97aeba750dbdaba02271b1d9825325.jpg",
1114
+ "image_caption": [
1115
+ "Figure 14: The models we used for the conditional image generation task. "
1116
+ ],
1117
+ "image_footnote": [],
1118
+ "bbox": [
1119
+ 235,
1120
+ 290,
1121
+ 758,
1122
+ 713
1123
+ ],
1124
+ "page_idx": 16
1125
+ },
1126
+ {
1127
+ "type": "image",
1128
+ "img_path": "images/7b40023e7636d6e1a08658472654e4381183c33e10a7a39b9b5bc264eeb17eb3.jpg",
1129
+ "image_caption": [
1130
+ "Figure 15: The models we used for the super resolution task. "
1131
+ ],
1132
+ "image_footnote": [],
1133
+ "bbox": [
1134
+ 209,
1135
+ 244,
1136
+ 777,
1137
+ 761
1138
+ ],
1139
+ "page_idx": 17
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "D MORE RESULTS ON THE CONDITIONAL IMAGE GENERATION TASK ",
1144
+ "text_level": 1,
1145
+ "bbox": [
1146
+ 171,
1147
+ 102,
1148
+ 766,
1149
+ 118
1150
+ ],
1151
+ "page_idx": 18
1152
+ },
1153
+ {
1154
+ "type": "image",
1155
+ "img_path": "images/0f88dc2f1d5027682f9a8cbc76dc727127c9850e184973291aceaf1e5e03b3a7.jpg",
1156
+ "image_caption": [
1157
+ "Figure 16: $1 2 8 \\times 1 2 8$ generated examples on various categories with projection architecture. Each panel corresponds to a class. "
1158
+ ],
1159
+ "image_footnote": [],
1160
+ "bbox": [
1161
+ 174,
1162
+ 137,
1163
+ 823,
1164
+ 762
1165
+ ],
1166
+ "page_idx": 18
1167
+ },
1168
+ {
1169
+ "type": "image",
1170
+ "img_path": "images/c3c43653d190b9d75ed4a9dbf3c52426e9fa1f96f9619a209df81e9f13d0bf00.jpg",
1171
+ "image_caption": [
1172
+ "Figure 17: $1 2 8 \\times 1 2 8$ generated examples on various categories with projection architecture. Each panel corresponds to a class. From top to bottom, tench, papillon, grey whale, desktop computer, altar, whiskey jug and volcano. "
1173
+ ],
1174
+ "image_footnote": [],
1175
+ "bbox": [
1176
+ 174,
1177
+ 142,
1178
+ 823,
1179
+ 825
1180
+ ],
1181
+ "page_idx": 19
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "E RESULTS OF CATEGORY MORPHING ",
1186
+ "text_level": 1,
1187
+ "bbox": [
1188
+ 173,
1189
+ 102,
1190
+ 509,
1191
+ 118
1192
+ ],
1193
+ "page_idx": 20
1194
+ },
1195
+ {
1196
+ "type": "image",
1197
+ "img_path": "images/c39939af00d1bc3e38ace98572a248bb753f5e0040afc2c750739e6aa68d435e.jpg",
1198
+ "image_caption": [
1199
+ "Figure 18: Dog (Lhasa apso) to different categories "
1200
+ ],
1201
+ "image_footnote": [],
1202
+ "bbox": [
1203
+ 238,
1204
+ 127,
1205
+ 759,
1206
+ 834
1207
+ ],
1208
+ "page_idx": 20
1209
+ },
1210
+ {
1211
+ "type": "image",
1212
+ "img_path": "images/8dcf7a13ceec1ddeab354971f2ff49d4d26e578f77d9410c76b46963807f944c.jpg",
1213
+ "image_caption": [],
1214
+ "image_footnote": [],
1215
+ "bbox": [
1216
+ 238,
1217
+ 146,
1218
+ 758,
1219
+ 267
1220
+ ],
1221
+ "page_idx": 21
1222
+ },
1223
+ {
1224
+ "type": "image",
1225
+ "img_path": "images/9c0c5542463d8ec56923d821210439ac6bdcda4b65eb43285ced64c953798cad.jpg",
1226
+ "image_caption": [
1227
+ "(a) Hip to Yellow lady’s slipper "
1228
+ ],
1229
+ "image_footnote": [],
1230
+ "bbox": [
1231
+ 240,
1232
+ 286,
1233
+ 758,
1234
+ 409
1235
+ ],
1236
+ "page_idx": 21
1237
+ },
1238
+ {
1239
+ "type": "image",
1240
+ "img_path": "images/d8e5962ed122548ba7ade6a52a637b935d99506fc2ef25b5e540938e74af4c28.jpg",
1241
+ "image_caption": [
1242
+ "(b) Pirate ship to Yawl "
1243
+ ],
1244
+ "image_footnote": [],
1245
+ "bbox": [
1246
+ 240,
1247
+ 426,
1248
+ 758,
1249
+ 547
1250
+ ],
1251
+ "page_idx": 21
1252
+ },
1253
+ {
1254
+ "type": "image",
1255
+ "img_path": "images/35db938603fe17ce553f1c7b8cb4514a49e7342feb40dfd50cf6fd4cdbb781d0.jpg",
1256
+ "image_caption": [
1257
+ "(c) Yurt to Castle "
1258
+ ],
1259
+ "image_footnote": [],
1260
+ "bbox": [
1261
+ 240,
1262
+ 568,
1263
+ 758,
1264
+ 690
1265
+ ],
1266
+ "page_idx": 21
1267
+ },
1268
+ {
1269
+ "type": "image",
1270
+ "img_path": "images/d47dffd614af997cc2fe31335db973ea33bed8759b0c4099c0a12ffcd0256452.jpg",
1271
+ "image_caption": [
1272
+ "(d) Chiffonier to Chinese cabinet ",
1273
+ "Figure 19: Morphing between different categories "
1274
+ ],
1275
+ "image_footnote": [],
1276
+ "bbox": [
1277
+ 238,
1278
+ 708,
1279
+ 759,
1280
+ 848
1281
+ ],
1282
+ "page_idx": 21
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "F MORE RESULTS WITH SUPER-RESOLUTION ",
1287
+ "bbox": [
1288
+ 173,
1289
+ 103,
1290
+ 563,
1291
+ 118
1292
+ ],
1293
+ "page_idx": 22
1294
+ },
1295
+ {
1296
+ "type": "image",
1297
+ "img_path": "images/8d2019cccf7dd72ba2705b4c679d73810796567bcba7ac7537deb84373a45ff8.jpg",
1298
+ "image_caption": [
1299
+ "Figure 20: $3 2 \\mathrm { x } 3 2 $ to $1 2 8 \\mathrm { x } 1 2 8$ super-resolution results "
1300
+ ],
1301
+ "image_footnote": [],
1302
+ "bbox": [
1303
+ 178,
1304
+ 143,
1305
+ 820,
1306
+ 776
1307
+ ],
1308
+ "page_idx": 22
1309
+ }
1310
+ ]
parse/train/ByS1VpgRZ/ByS1VpgRZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByS1VpgRZ/ByS1VpgRZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1BLjgZCb/H1BLjgZCb.md ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATING NATURAL ADVERSARIAL EXAMPLES
2
+
3
+ # Zhengli Zhao
4
+
5
+ Dheeru Dua University of California Irvine, CA 92697, USA ddua@uci.edu
6
+
7
+ University of California Irvine, CA 92697, USA zhengliz@uci.edu
8
+
9
+ Sameer Singh University of California Irvine, CA 92697, USA sameer@uci.edu
10
+
11
+ # ABSTRACT
12
+
13
+ Due to their complex nature, it is hard to characterize the ways in which machine learning models can misbehave or be exploited when deployed. Recent work on adversarial examples, i.e. inputs with minor perturbations that result in substantially different model predictions, is helpful in evaluating the robustness of these models by exposing the adversarial scenarios where they fail. However, these malicious perturbations are often unnatural, not semantically meaningful, and not applicable to complicated domains such as language. In this paper, we propose a framework to generate natural and legible adversarial examples that lie on the data manifold, by searching in semantic space of dense and continuous data representation, utilizing the recent advances in generative adversarial networks. We present generated adversaries to demonstrate the potential of the proposed approach for black-box classifiers for a wide range of applications such as image classification, textual entailment, and machine translation. We include experiments to show that the generated adversaries are natural, legible to humans, and useful in evaluating and analyzing black-box classifiers.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ With the impressive success and extensive use of machine learning models in various securitysensitive applications, it has become crucial to study vulnerabilities in these systems. Dalvi et al. (2004) show that adversarial manipulations of input data often result in incorrect predictions from classifiers. This raises serious concerns regarding the security and integrity of existing machine learning algorithms, especially when even state-of-the-art models including deep neural networks have been shown to be highly vulnerable to adversarial attacks with intentionally worst-case perturbations to the input (Szegedy et al., 2014; Goodfellow et al., 2015; Kurakin et al., 2016; Papernot et al., 2016b; Kurakin et al., 2017). These adversaries are generated effectively with access to the gradients of target models, resulting in much higher successful attack rates than data perturbed by random noise of even larger magnitude. Further, training models by including such adversaries can provide machine learning models with additional regularization benefits (Goodfellow et al., 2015).
18
+
19
+ Although these adversarial examples expose “blind spots” in machine learning models, they are unnatural, i.e. these worst-case perturbed instances are not ones the classifier is likely to face when deployed. Due to this, it is difficult to gain helpful insights into the fundamental decision behavior inside the black-box classifier: why is the decision different for the adversary, what can we change in order to prevent this behavior, and is the classifier robust to natural variations in the data when not in an adversarial scenario? Moreover, there is often a mismatch between the input space and the semantic space that we can understand. Changes to the input we may not think meaningful, like slight rotation or translation in images, often lead to substantial differences in the input instance. For example, Pei et al. (2017) show that minimal changes in the lighting conditions can fool automated-driving systems, a behavior adversarial examples are unable to discover. Due to the unnatural perturbations, these approaches cannot be applied to complex domains such as language, in which enforcing grammar and semantic similarity is difficult when perturbing instances. Therefore, existing approaches that find adversarial examples for text often result in ungrammatical sentences, as in the examples generated by Li et al. (2016), or require manual intervention, as in Jia & Liang (2017).
20
+
21
+ In this paper, we introduce a framework to generate natural adversarial examples, i.e. instances that are meaningfully similar, valid/legible, and helpful for interpretation. The primary intuition behind our proposed approach is to perform the search for adversaries in a dense and continuous representation of the data instead of searching in the input data space directly. We use generative adversarial networks (GANs) (Goodfellow et al., 2014) to learn a projection to map normally distributed fixed-length vectors to data instances. Given an input instance, we search for adversaries in the neighborhood of its corresponding representation in latent space by sampling within a range that is recursively tightened. Figure 1 provides an example of adversaries for digit recognition. Given a multi-layer perceptron (MLP) for MNIST and an image from test data (Figure 1a), our approach generates a natural adversarial example (Figure 1e) which is classified incorrectly as $z '$ by the classifier. Compared to the adversary generated by the existing Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015) that adds gradient-based noise (Figures 1c and 1b), our adversary (Figure 1e) looks like a hand-written digit similar to the original input. Further, the difference (Figure 1d) provides some insight into the classifier’s behavior, such as the fact that slightly thickening (blue) the bottom stroke and thinning (red) the one above it, fools the classifier.
22
+
23
+ ![](images/a634c435db2dc9f45da75e2007e12906940986463122f6302d7f34beb1939ab4.jpg)
24
+ Figure 1: Adversarial examples. Given an instance (a), existing FGSM approach (Goodfellow et al., 2015) adds small perturbations in (b), that change the prediction of the model (to be “2”, in this case). Instead of such random-looking noise, our framework generates natural adversarial examples, such as in (e), where the differences, shown in (d) (with blue $^ { \prime } +$ , red/-), are meaningful changes to the strokes.
25
+
26
+ We apply our approach to both image and text domains, and generate adversaries that are more natural and grammatical, semantically close to the input, and helpful to interpret the local behavior of black-box models. We present examples of natural adversaries for image classification, textual entailment, and machine translation. Experiments and human evaluation also demonstrate that our approach can help evaluate the robustness of black-box classifiers, even without labeled training data.
27
+
28
+ # 2 FRAMEWORK FOR GENERATING NATURAL ADVERSARIES
29
+
30
+ In this section, we describe the problem setup and details of our framework for generating natural adversarial examples of both continuous images and discrete text data. Given a black-box classifier $f$ and a corpus of unlabeled data $X$ , the goal here is to generate adversarial example $x ^ { * }$ for a given data instance $x$ that results in a different prediction, i.e. $f ( x ^ { * } ) \neq f ( x )$ . In general, the instance $x$ may not be in $X$ , but comes from the same underlying distribution ${ \mathcal P } _ { x }$ , which is the distribution we want to generate $x ^ { * }$ from as well. We want $x ^ { * }$ to be the nearest such instance to $x$ in terms of the manifold that defines the data distribution ${ \mathcal P } _ { x }$ , instead of in the original data representation.
31
+
32
+ Unlike other existing approaches that search directly in the input space for adversaries, we propose to search in a corresponding dense representation of $z$ space. In other words, instead of finding the adversarial $x ^ { * }$ directly, we find the adversarial $z ^ { * }$ in an underlying dense vector space which defines the distribution ${ \mathcal P } _ { x }$ , and then map it back to $x ^ { * }$ with the help of a generative model. By searching for samples in the latent low-dimensional $z$ space and mapping them to $x$ space to identify the adversaries, we encourage these adversaries to be valid (legible for images, and grammatical for sentences) and semantically close to the original input.
33
+
34
+ Background: Generative Adversarial Networks To tackle the problem described above, we need powerful generative models to learn a mapping from the latent low-dimensional representation to the distribution ${ \mathcal P } _ { x }$ , which we estimate using samples in $X$ . GANs are a class of such generative models that can be trained via procedures of minimax game between two competing networks (Goodfellow et al., 2014): given a large amount of unlabeled instances $X$ as training data, the generator $\mathcal { G } _ { \theta }$ learns to map some noise with distribution $p _ { z } ( z )$ where $z \in \mathbb { R } ^ { \mathrm { d } }$ to synthetic data that is as close to the training data as possible; on the other hand, the critic $\mathcal { C } _ { \omega }$ is trained to discriminate the output of the generator from real data samples from $X$ . The original objective function of GANs has been found to be hard to optimize in practice, for reasons theoretically investigated in Arjovsky & Bottou (2017). Arjovsky et al. (2017) refine the objective with Wasserstein-1 distance as:
35
+
36
+ ![](images/fbd590f51dff339cf1f3d2bcf07c11aa224881ffb40df40adc7c593a4eb5ccf8.jpg)
37
+ Figure 2: Training Architecture with a GAN and an Inverter. Loss of the inverter combines reconstruction error of $x$ with divergence between Gaussian distribution $z$ and $\mathcal { T } _ { \gamma } ( \mathcal { G } _ { \theta } ( z ) )$ .
38
+
39
+ $$
40
+ \operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \omega } \mathbb { E } _ { x \sim p _ { x } ( x ) } [ \mathcal { C } _ { \omega } ( x ) ] - \mathbb { E } _ { z \sim p _ { z } ( z ) } [ \mathcal { C } _ { \omega } ( \mathcal { G } _ { \theta } ( z ) ) ] .
41
+ $$
42
+
43
+ Wasserstein GAN achieves improvement in the stability of learning and provides useful learning curves. A number of further improvements to the GAN framework have been introduced (Salimans et al., 2016; Arjovsky & Bottou, 2017; Gulrajani et al., 2017; Rosca et al., 2017) that we discuss in Section 6. We incorporate the structure of WGAN and relevant improvements as a part of our framework for generating natural examples close to the training data distribution, as we describe next.
44
+
45
+ Natural Adversaries In order to represent natural instances of the domain, we first train a WGAN on corpus $X$ , which provides a generator $\mathcal { G } _ { \theta }$ that maps random dense vectors $z \in \mathbb { R } ^ { \mathrm { d } }$ to samples $x$ from the domain of $X$ . We separately train a matching inverter $\mathcal { T } _ { \gamma }$ to map data instances to corresponding dense representations. As in Figure 2, we minimize the reconstruction error of $x$ , and the divergence between sampled $z$ and $\mathcal { T } _ { \gamma } ( \mathcal { G } _ { \theta } ( z ) )$ to encourage the latent space to be normally distributed:
46
+
47
+ $$
48
+ \operatorname* { m i n } _ { \gamma } \mathbb { E } _ { x \sim p _ { x } ( x ) } \lVert \mathcal { G } _ { \theta } ( \mathbb { Z } _ { \gamma } ( x ) ) - x \rVert + \lambda \cdot \mathbb { E } _ { z \sim p _ { z } ( z ) } [ \mathcal { L } ( z , \mathbb { Z } _ { \gamma } ( \mathcal { G } _ { \theta } ( z ) ) ) ] .
49
+ $$
50
+
51
+ Using these learned functions, we define the natural adversarial example $x ^ { * }$ as the following:
52
+
53
+ $$
54
+ \mathcal G _ { \boldsymbol \theta } ( z ^ { * } ) \mathrm { w h e r e } z ^ { * } = \mathrm { a r g m i n } \| \tilde { z } - \mathcal T _ { \gamma } ( x ) \| \mathrm { s . t . } f ( \mathcal G _ { \boldsymbol \theta } ( \tilde { z } ) ) \neq f ( x ) .
55
+ $$
56
+
57
+ Instead of $x$ , we perturb its dense representation $z ^ { \prime } = \mathcal { T } _ { \gamma } ( x )$ , and use the generator to test whether a perturbation $\tilde { z }$ fools the classifier by querying $f$ with $\dot { \tilde { x } } = \mathcal { G } _ { \theta } ( \tilde { z } )$ . Figure 3 shows our generation process. A synthetic example is included for further intuition in Appendix A. As for the divergence $\mathcal { L }$ , we use $L _ { 2 }$ distance with $\lambda = . 1$ for images and Jensen-Shannon distance with $\lambda = 1$ for text data.
58
+
59
+ Search Algorithms We propose two approaches to identify the adversary (pseudocode in Appendix B), both of which utilize the inverter to obtain the latent vector $z ^ { \prime } = \mathcal { T } _ { \gamma } ( x )$ of $x$ , and feed perturbations $\tilde { z }$ in the neighborhood of $z ^ { \prime }$ to the generator to generate natural samples $\tilde { x } = \mathcal { G } _ { \theta } ( \tilde { z } )$ . In iterative stochastic search (Algorithm 1), we incrementally increase the search range (by $\Delta r$ ) within which the perturbations $\tilde { z }$ are randomly sampled $N$ samples for each iteration), until we have generated samples $\check { x }$ that change the prediction. Among these samples $\check { x }$ , we choose the one which has the closest $z ^ { * }$ to the original $z ^ { \prime }$ as an adversarial example $x ^ { * }$ . To improve the efficiency beyond this naive search, we propose a coarse-to-fine strategy we call hybrid shrinking search (Algorithm 2). We first search for adversaries in a wide search range, and recursively tighten the upper bound of the search range with denser sampling in bisections. Extra iterative search steps are taken to further tighten the upper bound of the optimal $\Delta z$ . With the hybrid shrinking search in Algorithm 2, we observe a $4 \times$ speedup while achieving similar results as Algorithm 1. Both these search algorithms are sample-based and applicable to black-box classifiers with no need of access to their gradients. Further, they are guaranteed to find an adversary, i.e. one that upper bounds the optimal adversary.
60
+
61
+ ![](images/7bd1c82ecb7bef6ba77a957ce29e0c2547c954936bc007117d26479ee174d243.jpg)
62
+ Figure 3: Natural Adversary Generation. Given an instance $x$ , our framework generates natural adversaries by perturbing inverted $z ^ { \prime }$ and decoding perturbations $\tilde { z }$ via $\mathcal { G } _ { \theta }$ to query the classifier $f$ .
63
+
64
+ ![](images/a8bb26b880a446aed676fd7319d6dbcb20d8faad1ec9b6397a2e5bd116f67c2f.jpg)
65
+
66
+ # 3 ILLUSTRATIVE EXAMPLES
67
+
68
+ We demonstrate the potential of our approach (Algorithm 1) in generating informative, legible, and natural adversaries by applying it to a number of classifiers for both visual and textual domains.
69
+
70
+ # 3.1 GENERATING IMAGE ADVERSARIES
71
+
72
+ Image classification has been a focus for adversarial example generation due to the recent successes in computer vision. We apply our approach to two standard datasets, MNIST and LSUN, and present generated natural adversaries. We use $\Delta r = 0 . 0 1$ and $N = 5 0 0 0$ with model details in Appendix C.
73
+
74
+ Handwritten Digits Scans of human-written text provide an intuitive definition of what is natural, i.e. do the generated images look like something a person would write? In other words, how would a human change a digit in order to fool a classifier? We train a WGAN with $z \in \mathbb { R } ^ { 6 4 }$ on 60,000 MNIST images following similar procedures as in Gulrajani et al. (2017), with the generator consisting of transposed convolutional layers and the critic consisting of convolutional layers. We include the inverter with fully connected layers on top of the critic’s last hidden layer. We train two target classifiers to generate adversaries against: Random Forests (RF) with 5 trees (test accuracy $9 0 . 4 5 \%$ ), and LeNet, as trained in LeCun et al. (1998) (test accuracy $9 8 . 7 1 \%$ ). We treat both these classifiers as black-boxes, and present the generated adversaries in Table 1 with examples of each digit (from test instances that the GAN or classifiers never observed). Adversaries generated by FGSM look like the original digits eroded by uninterpretable noise (these may not be representative of the approach, as changing $\epsilon$ for the method results in substantially different results). Our natural adversaries against both classifiers are quite similar to the original inputs in overall style and shape, yet provide informative insights into classifiers’ decision behavior around the input. Take the digit $\cdot 5 ^ { \mathrm { , } }$ as an example: dimming the vertical stroke can fool LeNet into predicting $\mathbf { \ddot { \delta } } ^ { 6 } 3 ^ { 9 }$ . Further we observe that adversaries against RF often look closer to the original images in overall shape than those against LeNet. Although generating as impressive natural adversaries against more accurate LeNet is difficult, it implies that compared to RF, LeNet requires more substantial changes to the inputs to be fooled; in other words, RF is less robust than LeNet in classification. We will return to this observation later.
75
+
76
+ Church vs Tower We apply our approach to outdoor, color images of higher resolution. We choose the category of “Church Outdoor” in LSUN dataset (Yu et al., 2015), randomly sample the same amount of 126,227 images from the category of “Tower”, and resize them to resolution of $6 4 \times 6 4$
77
+
78
+ ![](images/50dfe89b67539b53c864ae1055490c0805c96f3f5d5028392a00fdaa59df7beb.jpg)
79
+
80
+ Table 2: Adversarial examples against MLP classifier of LSUN by our approach. 4 original images each of “Church” and “Tower”, with their adversaries of the flipped class in the bottom row.
81
+ Table 3: Textual Entailment. For a pair of premise $( \mathbf { p } : )$ and hypothesis $( \mathbf { h } : )$ , we present the generated adversaries for three classifiers by perturbing the hypothesis $( \mathbf { h } ^ { \prime } : \mathbf { \epsilon } )$ . The last column provides the true label, followed by the changes in the prediction for each classifier.
82
+
83
+ <table><tr><td>Classifiers</td><td>Sentences</td><td>Label</td></tr><tr><td>Original</td><td>p : The man wearing blue jean shorts is grilling. h : The man is walking his dog.</td><td>Contradiction</td></tr><tr><td>Embedding</td><td>h&#x27; : The man is walking by the dog.</td><td>Contradiction →Entailment</td></tr><tr><td>LSTM</td><td>h&#x27;: The person is walking a dog.</td><td>Contradiction →Entailment</td></tr><tr><td>TreeLSTM</td><td>h&#x27;:A man is winning a race.</td><td>Contradiction →Neutral</td></tr></table>
84
+
85
+ The training procedure is similar to MNIST, except that the generator and critic in WGAN are deep residual networks (He et al., 2016) and $z \in \mathbb { R } ^ { 1 2 8 }$ . We train an MLP classifier on these two classes with test accuracy of $7 1 . 3 \%$ . Table 2 presents original images for both classes and corresponding adversarial examples. From looking at these pairs, we can observe that the generated adversaries make changes that are natural for this domain. For example, to change the classifier’s prediction from “Church” to “Tower”, the adversaries sharpen the roof, narrow the buildings, or change a tree into a tower. We can observe similar behavior in the other direction: the image with the Eiffel Tower is changed to a “church” by converting a woman into a building, and narrowing the tower.
86
+
87
+ # 3.2 GENERATING TEXT ADVERSARIES
88
+
89
+ Generating grammatical and linguistically coherent adversarial sentences is a challenging task due to the discrete nature of text: adding imperceptible noise is impossible, and most actual changes to $x$ may not result in grammatical text. Prior approaches on generating textual adversaries (Li et al., 2016; Alvarez-Melis & Jaakkola, 2017; Jia & Liang, 2017) perform word erasures and replacements directly on text input space $x$ , using domain-specific rule based or heuristic based approaches, or require manual intervention. Our approach, on the other hand, performs perturbations in the continuous space $z$ , that has been trained to produce semantically and syntactically coherent sentences automatically.
90
+
91
+ We use the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete text into continuous codes. ARAE model encodes a sentence with an LSTM encoder into continuous code and then performs adversarial training on these codes to capture the data distribution. We introduce an inverter that maps these continuous codes into the Gaussian space of $z \in \mathbb { R } ^ { 1 0 0 }$ . We use a 4-layer strided CNN for the encoder as it yields more coherent sentences than LSTMs from the ARAE model, however LSTM works well as the decoder. We train two MLP models for the generator and the inverter, to learn mappings between noise and continuous codes. We train our framework on the Stanford Natural Language Inference (SNLI) (Bowman et al., 2015) data of 570k labeled human-written English sentence pairs with the same preprocessing as Zhao et al. (2017), using $\Delta r =$ 0.01 and $N = 1 0 0$ . We present details of the architecture and sample perturbations in Appendix D.
92
+
93
+ Textual Entailment Textual Entailment (TE) is a task designed to evaluate common-sense reasoning for language, requiring both natural language understanding and logical inferences for text snippets. In this task, we classify a pair of sentences, a premise and a hypothesis, into three categories depending on whether the hypothesis is entailed by the premise, contradicts the premise, or is neutral to it. For instance, the sentence “There are children present” is entailed by the sentence “Children smiling and waving at camera”, while the sentence “The kids are frowning” contradicts it. We use our approach to generate adversaries by perturbing the hypothesis to deceive classifiers, keeping the premise unchanged. We train three classifiers of varying complexity, namely, an embedding classifier that is a single layer on top of the average word embeddings, an LSTM based model consisting of a single layer on top of the sentence representations, and TreeLSTM (Chen et al., 2017) that uses a hierarchical LSTM on the parses and is a top-performing classifier for this task. A few examples comparing the three classifiers are shown in Table 3 (more examples in Appendix D.1). Although all classifiers correctly predict the label, as the classifiers get more accurate (from embedding to LSTM to TreeLSTM), they require much more substantial changes to the sentences to be fooled.
94
+
95
+ Table 4: Machine Translation. “Adversary” that introduces the word “stehen” into the translation.
96
+
97
+ <table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : A man and woman sitting on the sidewalk.</td><td>Ein Mann und eine Frau, die auf dem Bürgersteig sitzen.</td></tr><tr><td>s&#x27; : A man and woman stand on the bench.</td><td>Ein Mann und eine Frau stehen auf der Bank.</td></tr></table>
98
+
99
+ Table 5: “Adversaries” to find dropped verbs. The left column contains the original sentence s and its adversary $s ^ { \prime }$ , while the right contains their translations, with English translation in red.
100
+
101
+ <table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : People sitting in a dim restaurant eating. s&#x27; : People sitting in a living room eating.</td><td>Leute,die in einem dim Restaurant essen sitzen. Leute,die in einem Wohnzimmeressen sitzen.</td></tr><tr><td>s : Elderly people walking down a city street. s&#x27; : A man walking down a street playing.</td><td>(People sitting in a living room.) Altere Menschen,die eine StadtstraBe hinuntergehen. Ein Mann,der eine StraBe entlang spielt. (A man playing along a street.)</td></tr></table>
102
+
103
+ Machine translation We consider machine translation not only because it is one of the most successful applications of neural approaches to NLP, but also since most practical translation systems lie behind black-box access APIs. The notion of adversary, however, is not so clear here as the output of a translation system is not a class. Instead, we define adversary for machine translation relative to a probing function that tests the translation for certain properties, ones that may lead to linguistic insights into the languages, or detect potential vulnerabilities. We use the same generator and inverter as in entailment, and find such “adversaries” via API access to the currently deployed Google Translate model (as of October 15, 2017) from English to German.
104
+
105
+ First, let us consider the scenario in which we want to generate adversarial English sentences such that a specific German word is introduced into the German translation. The probing function here would test the translation for the presence of that word, and we would have found an adversary (an English sentence) if the probing function passes for a translation. We provide an example of such a probing function that introduces the word “stehen” (“stand” in English) to the translation in Table 4 (more examples in Appendix D.2). Since the translation system is quite strong, such adversaries are not surfacing the vulnerabilities of the model, but instead can be used as a tool to understand or learn different languages (in this example, help a German speaker learn English).
106
+
107
+ We can design more complex probing functions as well, especially ones that target specific vulnerabilities of the translation system. Let us consider translations of English sentences that contain two active verbs, e.g. “People sitting in a restaurant eating”, and see that the German translation has the two verbs as well, “essen” and “sitzen”, respectively. We now define a probing function that passes only if the perturbed English sentence $s ^ { \prime }$ contains both the verbs, but the translation only has one of them. An adversary for such a probing function will be an English sentence $( s ^ { \prime } )$ that is similar to the original sentence (s), but for some reason, its translation is missing one of the verbs. Table 5 presents examples of generated adversaries using such a probing function (with more in Appendix D.2). For example, one that tests whether “essen” is dropped from the translation when its English counterpart “eating” appears in the source sentence (“People sitting in a living room eating.”). These adversaries thus suggest a vulnerability in Google’s English to German translation system: a word acting as a gerund in English often gets dropped from the translation.
108
+
109
+ Table 6: Statistics of adversaries against models for both MNIST and TE. We include the average $\Delta z$ for the adversaries and the proportion where each classifier’s adversary has the largest $\Delta z$ compared to the others for the same instance (significant with $p < 0 . 0 0 0 5$ using the sign test). The higher values correspond to stronger robustness, as is demonstrated by higher test accuracy.
110
+
111
+ <table><tr><td colspan="2"></td><td>Average △z</td><td>P(largest △z)</td><td>Test accuracy (%)</td></tr><tr><td rowspan="2">MNIST</td><td>Random Forests</td><td>1.24</td><td>0.22</td><td>90.45</td></tr><tr><td>LeNet</td><td>1.61</td><td>0.78</td><td>98.71</td></tr><tr><td rowspan="3">Entailment</td><td>Embeddings</td><td>0.12</td><td>0.15</td><td>62.04</td></tr><tr><td>LSTM</td><td>0.14</td><td>0.18</td><td>69.60</td></tr><tr><td>TreeLSTM</td><td>0.26</td><td>0.66</td><td>89.04</td></tr></table>
112
+
113
+ ![](images/c3d115fc778a6779f6074b50f9feffab09db6f379f1b040af37910cf9997b2aa.jpg)
114
+ Figure 4: Classifier accuracy and average $\Delta z$ of their adversaries. In (a) and (b) we vary the number of neurons and dropout rate, respectively. In (c) we present the correlation between accuracy and average $\Delta z$ for 80 different classifiers. (d) shows adversaries for an input image, against a set of classifiers with a single hidden layer, but varying number of neurons.
115
+
116
+ # 4 EXPERIMENTS
117
+
118
+ In this section, we demonstrate that our approach can be utilized to compare and evaluate the robustness of black-box models even without labeled data. We present experimental results on images and text data with evaluations from both statistical analysis and pilot user studies.
119
+
120
+ Robustness of Black-box Classifiers We apply our framework to various black-box classifiers for both images and text, and observe that it is useful for evaluating and interpreting these models via comparisons. The primary intuition behind this analysis is that more accurate classifiers often require more substantial changes to the instance to change their predictions, as noted in the previous section. In the following experiments, we apply the more efficient hybrid shrinking search (Algorithm 2).
121
+
122
+ In order to quantify the extent of change for an adversary, the change in the original $x$ representation may not be meaningful, such as RMSE of the pixels or string edit distances, for the same reason we are generating natural adversaries: they do not correspond to the semantic distance underlying the data manifold. Instead we use the distance of the adversary in the latent space, i.e. $\Delta z = \| \dot { z ^ { * } } - \bar { z } ^ { \prime } \|$ , in order to measure how much each adversary is modified to change the classifier prediction. We also consider the set of adversaries generated for each instance against a group of classifiers, and count how many times the adversary of each classifier has the highest $\Delta z$ . We present these statistics in Table 6 for both MNIST (over 100 test images, 10 per digit) and Textual Entailment (over 1260 test sentences), against the classifiers we described in Section 3. For both the tasks, we observe that more accurate classifiers require larger changes to the inputs (by both measures), indicating that generating such adversaries, even for unlabeled data, can evaluate the accuracy of black-box classifiers.
123
+
124
+ Table 7: Pilot study with MNIST
125
+
126
+ <table><tr><td></td><td>RF</td><td>LeNet</td></tr><tr><td>Looks handwritten?</td><td>0.88</td><td>0.71</td></tr><tr><td>Which closer to original?</td><td>0.87</td><td>0.13</td></tr></table>
127
+
128
+ Table 8: Pilot study with Textual Entailment
129
+
130
+ <table><tr><td></td><td>LSTM</td><td>TreeLSTM</td></tr><tr><td>Is adversary grammatical?</td><td>0.86</td><td>0.78</td></tr><tr><td>Is it similar to the original?</td><td>0.81</td><td>0.58</td></tr></table>
131
+
132
+ We now consider evaluation on a broader set of classifiers, and study the effect of changing hyperparameters of models on the results (focusing on MNIST). We train a set of neural networks with one hidden layer by varying the number of neurons exponentially from 2 to 1024. In Figure 4a, we observe that the average $\Delta z$ of adversaries against these models has a similar trend as their test accuracy. The generated adversaries for a single digit “3” in Figure 4d verify this observation: the adversaries become increasingly different from the original input as classifiers become more complex. We provide similar analysis by fixing the model structure but varying the dropout rates from 0.9 to 0.0 in Figure 4b, and observe a similar trend. To confirm that this correlation holds generally, we train 80 total classifiers that differ in the layer sizes, regularization, and amount of training data, and plot their test set accuracy against the average magnitude of change in their adversaries in Figure 4c. Given this strong correlation, we are confident that our framework for generating natural adversaries can be useful for automatically evaluating black-box classifiers, even in the absence of labeled data.
133
+
134
+ Human Evaluation We carry out a pilot study with human subjects to evaluate how natural the generated adversaries are, and whether the adversaries they think are similar to the original ones correspond with the less accurate classifiers (as in the evaluation above). For both image classification and textual entailment, we select a number of instances randomly, generate adversaries for each against two classifiers, and present a questionnaire to the subjects that evaluates: (1) how natural or legible each generated adversary is; (2) which of the two adversaries is closer to the original instance.
135
+
136
+ For hand-written digits from MNIST, we pick 20 images (2 for each digit), generate adversaries against RF and LeNet (two adversaries for each image), and obtain 13 responses for each of the questions. In Table 7, we see that the subjects agree that our generated adversaries are quite natural, and also, they find RF adversaries to be much closer to the original image than LeNet (i.e. more accurate classifiers, as per test accuracy on their provided labels, have more distant adversaries). We also compare adversaries against LeNet generated by FGSM and our approach, and find that $7 8 \%$ of the time the subjects agree that our adversaries make changes to the original images that are more natural (it is worth noting that FGSM is not applicable to RF for comparison). We carry out a similar pilot study for the textual entailment task to evaluate the quality of the perturbed sentences. We present a set of 20 pairs of sentences (premise and hypothesis), and adversarial hypotheses against both LSTM and TreeLSTM classifiers, and receive 4 responses for each of the questions above. The results in Table 8 also validate our previous results: the generated sentences are found to be grammatical and legible, and classifiers that need more substantial changes to the hypothesis tend to be more accurate. We leave a more detailed user study for future work.
137
+
138
+ # 5 RELATED WORK
139
+
140
+ The fast gradient sign method (FGSM) has been proposed in Goodfellow et al. (2015) to generate adversarial examples fast rather than optimally. Intuitively, the method shifts the input by $\epsilon$ in the direction of minimizing the cost function. Kurakin et al. (2016) propose a simple extension of FGSM by applying it multiple times, which generates adversarial examples with a higher attack rate, but the underlying idea is the same. Another method known as the Jacobian-based saliency map attack (JSMA) has been introduced by Papernot et al. (2016b). Unlike FGSM, JSMA generates adversaries by greedily modifying the input instance feature-wise. A saliency map is computed with gradients to indicate how important each feature is for the prediction, and the most important one is modified repeatedly until the instance changes the resulting classification. Moreover, it has been observed in practice that adversarial examples designed against a model are often likely to successfully attack another model for the same task that has not been given access to. This transferability property of adversarial examples makes it more practical to attack and evaluate deployed machine learning systems in realistic scenarios (Papernot et al., 2016a; 2017).
141
+
142
+ All these attacks above are based on gradients with access to the parameters of differentiable classifiers. Moosavi-Dezfooli et al. (2017) try to find a single noise vector which can cause imperceptible changes in most of data points, and meanwhile reduce the classifier accuracy significantly. Our method is capable of generating adversaries against black-box classifiers, even those without gradients such as Random Forests. Also, the noise added by these methods is uninterpretable, while the natural adversaries generated by our approach provide informative insights into classifiers’ decision behavior.
143
+
144
+ Due to the discrete domains involved in text, adversaries for text have received less attention. Jia & Liang (2017) generate adversarial examples for evaluating reading comprehension systems with predefined rules and candidate words for substitution after analyzing and rephrasing the input sentences. Li et al. (2016) introduce a framework to understand neural network through different levels of representation erasure. However, erasure of words or phrases directly often harms text integrity, resulting in semantically or grammatically incorrect sentences. Ribeiro et al. (2018) replace tokens by random words of the same POS tag with probability proportional to embedding similarity. Belinkov & Bisk (2018) explore approaches to increase the robustness of character-based machine translation models on text corrupted with character-level noise. With the help of expressive generative models, our approach instead perturbs the latent coding of sentences, resulting in legible generated sentences that are grammatical and semantically similar to the original input. These merits make our framework suitable for text applications such as sentiment analysis, textual entailment, and machine translation.
145
+
146
+ # 6 DISCUSSION AND FUTURE WORK
147
+
148
+ Our framework builds upon GANs as the generative models, and thus the capabilities of GANs directly effects the quality of generated examples. In visual domains, although there have been lots of appealing results produced by GANs, the training is well known to be brittle. Many recent approaches address how to improve the training stability and the objective function of GANs (Salimans et al., 2016; Arjovsky et al., 2017). Gulrajani et al. (2017) further improve the training of WGAN with regularization of gradient penalty instead of weight clipping. In our practice, we observe that we need to carefully balance the capacities of the generator, the critic, and the inverter that we introduced, to avoid situations such as model collapse. For natural languages, because of the discrete nature and non-differentiability, applications related to text generation have been relatively less studied. Zhao et al. (2017) propose to incorporate a discrete structure autoencoder with continuous code space regularized by WGAN for text generation. Given that there are some concerns about whether GANs actually learn the distribution (Arora & Zhang, 2017), it is worth noting that we can also incorporate other generative models such as Variational Auto-Encoders (VAEs) (Kingma & Welling, 2014) into our framework, as used in Hu et al. (2017) to generate text with controllable attributes, which we will explore in the future. We focus on GANs because adversarial training often results in higher quality images, while VAEs tend to produce blurrier ones (Goodfellow, 2016). We also plan to apply the fusion and variant of VAEs and GANs such as $\alpha$ -GAN in Rosca et al. (2017) and Wasserstein Auto-Encoders in Tolstikhin et al. (2018). Note that as more advanced GANs are introduced to address these issues, they can be directly incorporated into our framework.
149
+
150
+ Our iterative stochastic search algorithm for identifying adversaries is computationally expensive since it is based on naive sampling and local-search. Search based on gradients such as FGSM are not applicable to our setup because of black-box classifiers and discrete domain applications. We improve the efficiency with hybrid shrinking search by using a coarse-to-fine strategy that finds the upper-bounds by using fewer samples, and then performs finer search in the restricted range. We observe around $4 \times$ speedup with this search while achieving similar results as the iterative search. The accuracy of our inverter mapping the input to its corresponding dense vector in latent space is also important for searching adversaries in the right neighborhood. In our experiments, we find that fine-tuning the latent vector produced by the inverter with a fixed GAN can further refine the generated adversarial examples, and we will investigate other such extensions of the search in future. There is an implicit assumption in this work that the generated samples are within the same class if the added perturbations are small enough, and the generated samples look as if they belong to different classes when the perturbations are large. However, note that it is also the case for FGSM and other such approaches: when their $\epsilon$ is small, the noise is imperceptible; but with a large $\epsilon$ , one often finds noisy instances that might be in a different class (see Table 1, digit 8 for an example). While we do observe this behavior in some cases, the corresponding classifiers require much more substantial changes to the input, which is why we can utilize our approach to evaluate black-box classifiers.
151
+
152
+ # 7 CONCLUSIONS
153
+
154
+ In this paper, we propose a framework for generating natural adversaries against black-box classifiers, and apply the same approach to both visual and textual domains. We obtain adversaries that are legible, grammatical, and meaningfully similar to the input. We show that these natural adversaries can help in interpreting the decision behavior and evaluating the accuracy of black-box classifiers even in absence of labeled training data. We use our approach, built upon recent work in GANs, to generate adversaries for a wide range of applications including image classification, textual entailment, and machine translation (via the Google Translate API). Code used to generate such natural adversaries is available at https://github.com/zhengliz/natural-adversary.
155
+
156
+ # ACKNOWLEDGMENTS
157
+
158
+ We would like to thank Ananya, Casey Graff, Eric Nalisnick, Pouya Pezeshkpour, Robert Logan, and the anonymous reviewers for the discussions and feedback on earlier versions. We would also like to thank Ishaan Gulrajani and Junbo Jake Zhao for making their code available. This work is supported in part by Adobe Research and in part by FICO. The views expressed are those of the authors and do not reflect the official policy or position of the funding agencies.
159
+
160
+ # REFERENCES
161
+
162
+ David Alvarez-Melis and Tommi S. Jaakkola. A causal framework for explaining the predictions of black-box sequence-to-sequence models. In Empirical Methods in Natural Language Processing (EMNLP), 2017.
163
+
164
+ Martin Arjovsky and Leon Bottou. Towards principled methods for training generative adversarial ´ networks. In International Conference on Learning Representations (ICLR), 2017.
165
+
166
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks.´ In International Conference on Machine Learning (ICML), 2017.
167
+
168
+ Sanjeev Arora and Yi Zhang. Do gans actually learn the distribution? an empirical study. arXiv preprint 1706.08224, 2017.
169
+
170
+ Yonatan Belinkov and Yonatan Bisk. Synthetic and natural noise both break neural machine transla tion. In International Conference on Learning Representations (ICLR), 2018.
171
+
172
+ Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large annotated corpus for learning natural language inference. In Empirical Methods in Natural Language Processing (EMNLP), 2015.
173
+
174
+ Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced lstm for natural language inference. In Association for Computational Linguistics (ACL), 2017.
175
+
176
+ Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, and Deepak Verma. Adversarial classification. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2004.
177
+
178
+ Ian Goodfellow. NIPS 2016 Tutorial: Generative Adversarial Networks. arXiv preprint 1701.00160, 2016.
179
+
180
+ 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 (NIPS), 2014.
181
+
182
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015.
183
+
184
+ Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems (NIPS), 2017.
185
+
186
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
187
+
188
+ Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. Toward controlled generation of text. In International Conference on Machine Learning (ICML), 2017.
189
+
190
+ Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Empirical Methods in Natural Language Processing (EMNLP), 2017.
191
+
192
+ Diederik P. Kingma and Max Welling. Stochastic gradient vb and the variational auto-encoder. In International Conference on Learning Representations (ICLR), 2014.
193
+
194
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint 1607.02533, 2016.
195
+
196
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In International Conference on Learning Representations (ICLR), 2017.
197
+
198
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
199
+
200
+ Jiwei Li, Will Monroe, and Dan Jurafsky. Understanding neural networks through representation erasure. arXiv preprint 1612.08220, 2016.
201
+
202
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
203
+
204
+ Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint 1605.07277, 2016a.
205
+
206
+ Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z. Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In IEEE European Symposium on Security and Privacy, 2016b.
207
+
208
+ Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the ACM on Asia Conference on Computer and Communications Security, 2017.
209
+
210
+ Kexin Pei, Yinzhi Cao, Junfeng Yang, and Suman Jana. Deepxplore: Automated whitebox testing of deep learning systems. In the ACM Symposium on Operating Systems Principles, 2017.
211
+
212
+ Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Anchors: High-precision model-agnostic explanations. In AAAI Conference on Artificial Intelligence, 2018.
213
+
214
+ Mihaela Rosca, Balaji Lakshminarayanan, David Warde-Farley, and Shakir Mohamed. Variational approaches for auto-encoding generative adversarial networks. arXiv preprint 1706.04987, 2017.
215
+
216
+ Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems (NIPS), 2016.
217
+
218
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR), 2014.
219
+
220
+ Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Schoelkopf. Wasserstein auto-encoders. In International Conference on Learning Representations (ICLR), 2018.
221
+
222
+ Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint 1506.03365, 2015.
223
+
224
+ Junbo Jake Zhao, Yoon Kim, Kelly Zhang, Alexander M. Rush, and Yann LeCun. Adversarially regularized autoencoders. arXiv preprint 1706.04223, 2017.
225
+
226
+ # APPENDIX
227
+
228
+ # A ILLUSTRATION WITH SYNTHETIC DATA
229
+
230
+ As shown in Figure 5 with a toy example of synthetic data, we can effectively map data instance $x$ to its corresponding latent dense vector $z ^ { \prime }$ with the help of the inverter via ${ \mathcal { T } } _ { \gamma } ( x )$ , and then reconstruct $x$ with the help of the generator via $\mathcal { G } _ { \boldsymbol { \theta } } ( \mathcal { T } _ { \boldsymbol { \gamma } } ( \boldsymbol { x } ) )$ . For a naive classifier with the horizontal line as decision boundary, adversarial examples should be points above the line given input data $x$ in Figure 5c. By searching in corresponding latent space, our approach finds $x ^ { * }$ on the left as a natural adversary because it is the closest one in semantic space (along the curve trace) and it exists within the data manifold. However, the gradient-based approaches may find the $x ^ { * }$ right above $x$ as adversarial in input space regardless of the actual data distribution.
231
+
232
+ # B ALGORITHMS
233
+
234
+ Algorithm 1 shows the pseudocode of the iterative search of our framework. Starting from the corresponding $z$ of the input instance $x$ , we iteratively move the search range outward in latent space until we have generated samples that change the prediction of the classifier $f$ . We improve the efficiency with Algorithm 2 by using a coarse-to-fine strategy and combining recursive and iterative search. We first search for adversaries in a wide search range, and recursively tighten the upper bound of the search range with denser sampling in bisections. Extra iterative search steps are taken to further tighten the upper bound of the optimal $\Delta z$ . This hybrid shrinking search approach, shown in detail in Algorithm 2, is four times faster to achieve similar adversaries as the iterative search.
235
+
236
+ # C ARCHITECTURE FOR CONTINUOUS IMAGES
237
+
238
+ Figure 3 shows the architecture of our framework for continuous images. We adopt WGAN (Arjovsky et al., 2017) with the objective function in Equation 1, and apply gradient penalty as proposed in Gulrajani et al. (2017). On top of the generator obtained from WGAN, we train an inverter by optimizing Equation 2. For handwritten digits from MNIST dataset, we train a WGAN of latent $ { z ^ { \cdot } } \in \mathbb { R } ^ { 6 4 }$ , with a generator consisting of 3 transposed convolutional layers and ReLU activation, and a critic consisting of 3 convolutional layers with filter sizes (64, 128, 256) and strides (2, 2, 2). We include an inverter with 2 fully connected layers of dimensions (4096, 1024) on top of the critic’s last hidden layer. For “Church Outdoor” and “Tower” images from LSUN dataset, we follow similar procedures as in Gulrajani et al. (2017) training a WGAN of latent $z \in \mathbb { R } ^ { 1 2 8 }$ . The generator and critic are both residual networks. We use pre-activation residual blocks with two $3 \times 3$ convolutional layers each and ReLU activation. The critic of 4 residual blocks performs downsampling using mean pooling after the second convolution, while the generator contains 4 residual blocks performing nearest-neighbor upsampling before the second convolution. We include an inverter with 3 fully connected layers of dimensions (8192, 2048, 512) on top of the critic’s last hidden layer.
239
+
240
+ ![](images/d37ed3fdcf22f38faa49390a1becb9f26ab16da3786a9b33629deb293dd77940.jpg)
241
+ Figure 5: Illustration with synthetic data. With training data that lies on a complex manifold (a), the inverter maps input to compact gaussian latent $z ^ { \prime } = \mathcal { T } _ { \gamma } ( x )$ in (b), while the generator reconstructs the data via $\mathcal { G } _ { \boldsymbol { \theta } } ( \mathcal { T } _ { \boldsymbol { \gamma } } ( \boldsymbol { x } ) )$ in (c). Given $f$ as a binary classifier with decision boundary as the horizontal line in (c), for an input $x$ , our approach returns $x ^ { * }$ on the left as natural adversary that lies on the manifold, while existing approaches may find $x ^ { * }$ on the right as the adversary, which is the nearest but impossible.
242
+
243
+ Algorithm 1 Iterative stochastic search in latent space for adversaries
244
+
245
+ Require: a target black-box classifier $f$ , an input instance $x$ , and a corpus of relevant data $X$
246
+ 1: Hyper-parameters: $N$ : number of samples in each iteration, $\Delta r$ : increment of search range
247
+ 2: Train a generator $\mathcal { G } _ { \theta }$ and an inverter $\mathcal { T } _ { \gamma }$ on $X$
248
+ 3: $y f ( x )$ , $z ^ { \prime } \gets \mathcal { T } _ { \gamma } ( x )$ , radius $r \gets 0$
249
+ 4: loop $\triangleright$ loop till we find an adversary
250
+ 5: $\mathbf { \boldsymbol { \bar { S } } } \emptyset$
251
+ 6: for sample $N$ random noise vectors $\epsilon$ of norms within $( r , r + \Delta r ]$ do
252
+ 7: $\tilde { z } z ^ { \prime } + \epsilon$ , $\tilde { x } \mathcal G _ { \theta } ( \tilde { z } ) , \tilde { y } f ( \tilde { x } )$ $\triangleright$ perturbation, sample generation, prediction
253
+ 8: if $\tilde { y } \ne y$ then
254
+ 9: $S \gets S \cup \langle \tilde { x } , \tilde { y } , \tilde { z } \rangle$
255
+ 10: if $S = \emptyset$ then $\triangleright$ no adversary generated
256
+ 11: $r \gets r + \Delta r$ $\triangleright$ move search range outward
257
+ 12: else $\triangleright$ certain adversary generated
258
+ 13: $\begin{array} { r } { \mathbf { r e t u r n } \left. x ^ { * } , y ^ { * } , z ^ { * } \right. = \operatorname * { a r g m i n } _ { \langle \check { x } , \check { y } , \check { z } \rangle \in S } \| \check { z } - z ^ { \prime } \| } \end{array}$ $\triangleright$ return the closest sample
259
+ Require: a target black-box classifier $f$ , an input instance $x$ , and a corpus of relevant data $X$
260
+ 1: Hyper-parameters: $N$ : number of samples in each iteration, $\Delta r$ : increment of search range, $B$ :
261
+ limit of iterations, $r$ : upper limit of search range
262
+ 2: Train a generator $\mathcal { G } _ { \theta }$ and an inverter $\mathcal { T } _ { \gamma }$ on $X$
263
+ 3: $y f ( x )$ , $z ^ { \prime } \gets \mathcal { T } _ { \gamma } ( x )$ , $l \gets 0 , i \gets 0$
264
+ 4: First, recursive search:
265
+ 5: while $r - l \geq \Delta r$ do
266
+ 6: $S \gets \emptyset$
267
+ 7: for sample $N$ random noise vectors $\epsilon$ of magnitude within $( l , r ]$ do
268
+ 8: z˜ ← z0 + , $\tilde { x } \mathcal G _ { \theta } ( \tilde { z } ) , \tilde { y } f ( \tilde { x } )$
269
+ 9: if $\tilde { y } \ne y$ then
270
+ 10: $S \gets S \cup \langle \tilde { x } , \tilde { y } , \tilde { z } \rangle$
271
+ 11: if $S = \emptyset$ then $\triangleright$ no adversary generated
272
+ 12: $l \gets ( l + r ) / 2$ $\triangleright$ shrink search range by half
273
+ 13: else $\triangleright$ certain adversary generated
274
+ 14: $\begin{array} { r l } & { \langle x ^ { * } , y ^ { * } , z ^ { * } \rangle = \mathrm { a r g m i n } _ { \langle \check { x } , \check { y } , \check { z } \rangle \in S } \| \check { z } - z ^ { \prime } \| } \\ & { l 0 , r \| z ^ { * } - z ^ { \prime } \| } \end{array}$ $\triangleright$ store the closest sample
275
+ 15: $\triangleright$ update upper bound of $\Delta z$
276
+ 16: Then, iterative search:
277
+ 17: while $i < B$ and $r > 0$ do
278
+ 18: $S \gets \emptyset , l \gets \operatorname* { m a x } ( 0 , r - \Delta r )$
279
+ 19: for sample $N$ random noise vectors $\epsilon$ of norms within $( l , r ]$ do
280
+ 20: $\tilde { z } \gets z ^ { \prime } + \epsilon , \tilde { x } \gets \mathcal G _ { \theta } ( \tilde { z } ) , \tilde { y } \gets f ( \tilde { x } )$
281
+ 21: if $\tilde { y } \ne y$ then
282
+ 22: $S \gets S \cup \langle \tilde { x } , \tilde { y } , \tilde { z } \rangle$
283
+ 23: if $S = \emptyset$ then
284
+ 24: $i \gets i + 1 , r \gets r - \Delta r$ $\triangleright$ increase counter, continue searching
285
+ 25: else
286
+ 26: $\begin{array} { r l } & { \langle x ^ { * } , y ^ { * } , z ^ { * } \rangle = \mathrm { a r g m i n } _ { \langle \check { x } , \check { y } , \check { z } \rangle \in S } \| \check { z } - z ^ { \prime } \| } \\ & { i 0 , r \| z ^ { * } - z ^ { \prime } \| } \end{array}$ $\triangleright$ store the closest sample
287
+ 27: $\triangleright$ reset counter, update upper bound of $\Delta z$
288
+ 28: return $\langle x ^ { * } , y ^ { * } , z ^ { * } \rangle$
289
+
290
+ # D ARCHITECTURE FOR DISCRETE TEXT
291
+
292
+ We use the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete text into continuous codes as shown in Figure 6. ARAE model encodes a sentence with an LSTM encoder into continuous code and performs adversarial training on the codes generated from noise and data to approximate the data distribution. We introduce an inverter that maps these continuous codes
293
+
294
+ $$
295
+ \begin{array}{c} \begin{array} { r l } & { \mathrm { , ~ } \mathrm { ~ n o i s e ~ } \tilde { z } [ \mathrm { g e n e r a t o r ~ } \mathcal { G } _ { \theta } ] \mathrm { ~ c o d e s ~ } \tilde { c } [ \operatorname* { d e c o d e r } \mathcal { D } _ { \psi } ] \mathrm { ~ s a m p l e s ~ } \tilde { x } } \\ & { \mathrm { , ~ } } \\ & { \mathrm { ~ } \mathrm { ~ } \mathrm { ~ p e r t u r b a t i o n s ~ } } \\ & { \mathrm { ~ } \cdot } \\ & { \mathrm { ~ } \mathrm { ~ l a t e n t ~ } z ^ { \prime } [ \mathrm { i n v e r t e r ~ } \mathcal { Z } _ { \gamma } ] \mathrm { ~ c o d e ~ } c [ \mathrm { e n c o d e r ~ } \mathcal { E } _ { \phi } ] \mathrm { ~ d i s c r e t e ~ } x } \end{array} \sum _ { \mathrm { ~ } \alpha = \nu \mathrm { ~ r a t e r s a r y ~ } } ^ { \mathrm { ~ n a t u r a l ~ } } \end{array}
296
+ $$
297
+
298
+ Figure 6: Model Architecture for Text. Our model incorporates in the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete $x$ into continuous code $c$ and decoding continuous $\tilde { c }$ into discrete $\tilde { x }$ when generating samples.
299
+
300
+ into the Gaussian space of $z \in \mathbb { R } ^ { 1 0 0 }$ . We use 4 layers of CNN with varying filter sizes (300, 500, 700, and 1000), strides (2, 2, 2) and context windows (5, 5, 3) for encoding text $x$ , into continuous space $c \in \mathbb { R } ^ { 3 0 0 }$ . For the decoder, we use a single-layer LSTM with hidden dimension of 300. We also train two MLPs, one each for the generator and the inverter, to learn mappings from noise to continuous codes and continuous codes to noise respectively. The loss functions for different components of the ARAE model, which are autoencoder reconstruction loss and WGAN loss functions for generator and critic, are described in Equations (4), (5), (6) respectively. We first train the ARAE components of encoder, decoder and generator using WGAN strategy, followed by the inverter on top of these with loss function in (7), by minimizing the Jensen-Shannon divergence between the inverted continuous codes and noise samples.
301
+
302
+ $$
303
+ \begin{array} { r l } & { \displaystyle \operatorname* { m i n } _ { \phi , \phi } \mathcal { L } _ { \mathcal { E } , \mathcal { D } } ( \phi , \psi ) = \operatorname* { m a x } _ { \phi , \psi } \mathbb { E } _ { x } [ \log p _ { \psi } ( x | \mathcal { E } _ { \phi } ( x ) ) ] } \\ & { \quad \quad \quad \quad \quad \operatorname* { m i n } _ { \omega } \mathcal { L } _ { \mathcal { C } } ( \omega ) = \operatorname* { m a x } _ { \omega } \mathbb { E } _ { x } [ \mathcal { C } _ { \omega } ( \mathcal { E } _ { \phi } ( x ) ) ] - \mathbb { E } _ { z } [ \mathcal { C } _ { \omega } ( \mathcal { G } _ { \theta } ( z ) ) ] } \\ & { \displaystyle \operatorname* { m i n } _ { \phi , \theta } \mathcal { L } _ { \mathcal { E } , \mathcal { G } } ( \phi , \theta ) = \operatorname* { m i n } _ { \phi , \theta } \mathbb { E } _ { x } [ \mathcal { C } _ { \omega } ( \mathcal { E } _ { \phi } ( x ) ) ] - \mathbb { E } _ { z } [ \mathcal { C } _ { \omega } ( \mathcal { G } _ { \theta } ( z ) ) ] } \\ & { \quad \quad \quad \quad \operatorname* { m i n } _ { \gamma } \mathcal { L } _ { \mathcal { T } } ( \gamma ) = \operatorname* { m i n } _ { \gamma } \mathbb { E } _ { x } \| \mathcal { G } _ { \theta } ( \mathcal { I } _ { \gamma } ( \mathcal { E } _ { \phi } ( x ) ) ) - \mathcal { E } _ { \phi } ( x ) \| + \mathbb { E } _ { z } [ \mathbf { J } \mathbf { S } \mathbf { D } ( z , \mathcal { L } _ { \gamma } ( \mathcal { G } _ { \theta } ( z ) ) ) ] } \end{array}
304
+ $$
305
+
306
+ We train our framework on the sentences up to length 10 from Stanford Natural Language Inference (SNLI) (Bowman et al., 2015) dataset, with hyper-parameters of $\Delta r = 0 . 0 1$ and $N = 1 0 0$ . Table 9 shows some examples of the perturbations generated automatically by our approach, which are grammatical and semantically close to the original sentences.
307
+
308
+ # D.1 TEXTUAL ENTAILMENT EXAMPLES
309
+
310
+ We provide additional examples of generated adversarial hypotheses for sentences from the SNLI corpus in Table 10, which corresponds to the examples in the main text in Table 3.
311
+
312
+ # D.2 MACHINE TRANSLATION EXAMPLES
313
+
314
+ We provide additional examples of the two probing functions in Table 11 and Table 12, corresponding to Table 4 and Table 5 in the main text, respectively.
315
+
316
+ Table 9: Text perturbations. Examples are generated by perturbing the origins in semantic space.
317
+
318
+ <table><tr><td>Original</td><td></td><td>Some dogs are running on a deserted beach.A man playing an electric guitar on stage.</td></tr><tr><td rowspan="5">Perturbation</td><td>Some dogs are running on a grassy field.</td><td>A man is playing an electric guitar.</td></tr><tr><td>Some dogs are walking along a path.</td><td>A man is playing an acoustic guitar.</td></tr><tr><td>Some dogs are running down a hill.</td><td>A man is playing an accordion.</td></tr><tr><td>A dog is running on a grassy field.</td><td>A man is playing with an electronic device.</td></tr><tr><td>A dog is running down a trail.</td><td>A man is playing with an elephant.</td></tr></table>
319
+
320
+ Table 10: Textual Entailment. For a pair of premise $\left( \mathbf { p } : \right)$ and hypothesis $( \mathbf { h } : )$ , we present the generated adversaries for three classifiers by perturbing the hypothesis $( \mathbf { h } ^ { \prime } : \mathbf { \epsilon } )$ . The last column provides the true label, followed by the changes in the prediction from each classifier.
321
+
322
+ <table><tr><td>Classifiers</td><td>Sentences</td><td>Label</td></tr><tr><td>Original</td><td>p : The man walks among the large trees. h : The man is lost in the woods.</td><td>Neutral</td></tr><tr><td>Embedding</td><td>h&#x27;: The man is lost at the woods.</td><td>Contradiction →Neutral</td></tr><tr><td>LSTM</td><td>h&#x27; : The man is crying in the woods.</td><td>Neutral→Contradiction</td></tr><tr><td>TreeLSTM</td><td>h&#x27;:The man is lost ina bed.</td><td>Neutral → Contradiction</td></tr></table>
323
+
324
+ Table 11: Machine Translation. “Adversaries” that introduce the word “stehen” into the Google translation system by perturbing English sentences.
325
+
326
+ <table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s :Asian women are sitting in a Restraunt.</td><td>Asiatische Frauen sitzen in einem Restaurant. s :Asian kids are standing in a Restraunt.Asiatische Kinder stehen in einem Restaurant.</td></tr><tr><td></td><td></td></tr><tr><td>s : People sitting on the floor.</td><td>Leute sitzen auf dem Boden.</td></tr><tr><td>s&#x27; : People standing on the field.</td><td>Leute,die auf dem Feld stehen.</td></tr></table>
327
+
328
+ Table 12: “Adversaries” that find dropped verbs in English-To-German translation. The left column contains the original sentence $s$ and its adversary $s ^ { \prime }$ . The right column contains the translations of $s$ and $s ^ { \prime }$ , with English translation provided for legibility.
329
+
330
+ <table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : A man looks back while laughing and walking. s : A man is laughing walking down the ground.</td><td>Ein Mann schaut beim Lachen und Gehen zurck. Ein Mann lacht auf dem Boden. (A man laughs on the floor.)</td></tr><tr><td>s : She is cooking food while wearing a dress. s&#x27; : She is cooking dressed for a wedding.</td><td>Sie kocht Essen, whrend sie ein Kleid trgt. Sie kocht fr eine Hochzeit. (She cooks for a wedding.)</td></tr></table>
parse/train/H1BLjgZCb/H1BLjgZCb_content_list.json ADDED
@@ -0,0 +1,1558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "GENERATING NATURAL ADVERSARIAL EXAMPLES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 787,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Zhengli Zhao ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 184,
20
+ 145,
21
+ 279,
22
+ 159
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Dheeru Dua University of California Irvine, CA 92697, USA ddua@uci.edu ",
29
+ "bbox": [
30
+ 398,
31
+ 145,
32
+ 558,
33
+ 200
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "University of California Irvine, CA 92697, USA zhengliz@uci.edu ",
40
+ "bbox": [
41
+ 184,
42
+ 161,
43
+ 343,
44
+ 202
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Sameer Singh University of California Irvine, CA 92697, USA sameer@uci.edu ",
51
+ "bbox": [
52
+ 614,
53
+ 145,
54
+ 774,
55
+ 200
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "ABSTRACT ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 454,
65
+ 238,
66
+ 544,
67
+ 252
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Due to their complex nature, it is hard to characterize the ways in which machine learning models can misbehave or be exploited when deployed. Recent work on adversarial examples, i.e. inputs with minor perturbations that result in substantially different model predictions, is helpful in evaluating the robustness of these models by exposing the adversarial scenarios where they fail. However, these malicious perturbations are often unnatural, not semantically meaningful, and not applicable to complicated domains such as language. In this paper, we propose a framework to generate natural and legible adversarial examples that lie on the data manifold, by searching in semantic space of dense and continuous data representation, utilizing the recent advances in generative adversarial networks. We present generated adversaries to demonstrate the potential of the proposed approach for black-box classifiers for a wide range of applications such as image classification, textual entailment, and machine translation. We include experiments to show that the generated adversaries are natural, legible to humans, and useful in evaluating and analyzing black-box classifiers. ",
74
+ "bbox": [
75
+ 233,
76
+ 268,
77
+ 764,
78
+ 477
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "1 INTRODUCTION ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 176,
88
+ 503,
89
+ 336,
90
+ 518
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "With the impressive success and extensive use of machine learning models in various securitysensitive applications, it has become crucial to study vulnerabilities in these systems. Dalvi et al. (2004) show that adversarial manipulations of input data often result in incorrect predictions from classifiers. This raises serious concerns regarding the security and integrity of existing machine learning algorithms, especially when even state-of-the-art models including deep neural networks have been shown to be highly vulnerable to adversarial attacks with intentionally worst-case perturbations to the input (Szegedy et al., 2014; Goodfellow et al., 2015; Kurakin et al., 2016; Papernot et al., 2016b; Kurakin et al., 2017). These adversaries are generated effectively with access to the gradients of target models, resulting in much higher successful attack rates than data perturbed by random noise of even larger magnitude. Further, training models by including such adversaries can provide machine learning models with additional regularization benefits (Goodfellow et al., 2015). ",
97
+ "bbox": [
98
+ 174,
99
+ 535,
100
+ 825,
101
+ 686
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Although these adversarial examples expose “blind spots” in machine learning models, they are unnatural, i.e. these worst-case perturbed instances are not ones the classifier is likely to face when deployed. Due to this, it is difficult to gain helpful insights into the fundamental decision behavior inside the black-box classifier: why is the decision different for the adversary, what can we change in order to prevent this behavior, and is the classifier robust to natural variations in the data when not in an adversarial scenario? Moreover, there is often a mismatch between the input space and the semantic space that we can understand. Changes to the input we may not think meaningful, like slight rotation or translation in images, often lead to substantial differences in the input instance. For example, Pei et al. (2017) show that minimal changes in the lighting conditions can fool automated-driving systems, a behavior adversarial examples are unable to discover. Due to the unnatural perturbations, these approaches cannot be applied to complex domains such as language, in which enforcing grammar and semantic similarity is difficult when perturbing instances. Therefore, existing approaches that find adversarial examples for text often result in ungrammatical sentences, as in the examples generated by Li et al. (2016), or require manual intervention, as in Jia & Liang (2017). ",
108
+ "bbox": [
109
+ 174,
110
+ 694,
111
+ 825,
112
+ 888
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "In this paper, we introduce a framework to generate natural adversarial examples, i.e. instances that are meaningfully similar, valid/legible, and helpful for interpretation. The primary intuition behind our proposed approach is to perform the search for adversaries in a dense and continuous representation of the data instead of searching in the input data space directly. We use generative adversarial networks (GANs) (Goodfellow et al., 2014) to learn a projection to map normally distributed fixed-length vectors to data instances. Given an input instance, we search for adversaries in the neighborhood of its corresponding representation in latent space by sampling within a range that is recursively tightened. Figure 1 provides an example of adversaries for digit recognition. Given a multi-layer perceptron (MLP) for MNIST and an image from test data (Figure 1a), our approach generates a natural adversarial example (Figure 1e) which is classified incorrectly as $z '$ by the classifier. Compared to the adversary generated by the existing Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015) that adds gradient-based noise (Figures 1c and 1b), our adversary (Figure 1e) looks like a hand-written digit similar to the original input. Further, the difference (Figure 1d) provides some insight into the classifier’s behavior, such as the fact that slightly thickening (blue) the bottom stroke and thinning (red) the one above it, fools the classifier. ",
119
+ "bbox": [
120
+ 173,
121
+ 896,
122
+ 821,
123
+ 924
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "image",
129
+ "img_path": "images/a634c435db2dc9f45da75e2007e12906940986463122f6302d7f34beb1939ab4.jpg",
130
+ "image_caption": [
131
+ "Figure 1: Adversarial examples. Given an instance (a), existing FGSM approach (Goodfellow et al., 2015) adds small perturbations in (b), that change the prediction of the model (to be “2”, in this case). Instead of such random-looking noise, our framework generates natural adversarial examples, such as in (e), where the differences, shown in (d) (with blue $^ { \\prime } +$ , red/-), are meaningful changes to the strokes. "
132
+ ],
133
+ "image_footnote": [],
134
+ "bbox": [
135
+ 191,
136
+ 99,
137
+ 810,
138
+ 199
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "",
145
+ "bbox": [
146
+ 174,
147
+ 296,
148
+ 825,
149
+ 477
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "We apply our approach to both image and text domains, and generate adversaries that are more natural and grammatical, semantically close to the input, and helpful to interpret the local behavior of black-box models. We present examples of natural adversaries for image classification, textual entailment, and machine translation. Experiments and human evaluation also demonstrate that our approach can help evaluate the robustness of black-box classifiers, even without labeled training data. ",
156
+ "bbox": [
157
+ 174,
158
+ 484,
159
+ 825,
160
+ 554
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "2 FRAMEWORK FOR GENERATING NATURAL ADVERSARIES ",
167
+ "text_level": 1,
168
+ "bbox": [
169
+ 176,
170
+ 579,
171
+ 684,
172
+ 595
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "In this section, we describe the problem setup and details of our framework for generating natural adversarial examples of both continuous images and discrete text data. Given a black-box classifier $f$ and a corpus of unlabeled data $X$ , the goal here is to generate adversarial example $x ^ { * }$ for a given data instance $x$ that results in a different prediction, i.e. $f ( x ^ { * } ) \\neq f ( x )$ . In general, the instance $x$ may not be in $X$ , but comes from the same underlying distribution ${ \\mathcal P } _ { x }$ , which is the distribution we want to generate $x ^ { * }$ from as well. We want $x ^ { * }$ to be the nearest such instance to $x$ in terms of the manifold that defines the data distribution ${ \\mathcal P } _ { x }$ , instead of in the original data representation. ",
179
+ "bbox": [
180
+ 174,
181
+ 613,
182
+ 825,
183
+ 712
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "Unlike other existing approaches that search directly in the input space for adversaries, we propose to search in a corresponding dense representation of $z$ space. In other words, instead of finding the adversarial $x ^ { * }$ directly, we find the adversarial $z ^ { * }$ in an underlying dense vector space which defines the distribution ${ \\mathcal P } _ { x }$ , and then map it back to $x ^ { * }$ with the help of a generative model. By searching for samples in the latent low-dimensional $z$ space and mapping them to $x$ space to identify the adversaries, we encourage these adversaries to be valid (legible for images, and grammatical for sentences) and semantically close to the original input. ",
190
+ "bbox": [
191
+ 174,
192
+ 718,
193
+ 825,
194
+ 816
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "Background: Generative Adversarial Networks To tackle the problem described above, we need powerful generative models to learn a mapping from the latent low-dimensional representation to the distribution ${ \\mathcal P } _ { x }$ , which we estimate using samples in $X$ . GANs are a class of such generative models that can be trained via procedures of minimax game between two competing networks (Goodfellow et al., 2014): given a large amount of unlabeled instances $X$ as training data, the generator $\\mathcal { G } _ { \\theta }$ learns to map some noise with distribution $p _ { z } ( z )$ where $z \\in \\mathbb { R } ^ { \\mathrm { d } }$ to synthetic data that is as close to the training data as possible; on the other hand, the critic $\\mathcal { C } _ { \\omega }$ is trained to discriminate the output of the generator from real data samples from $X$ . The original objective function of GANs has been found to be hard to optimize in practice, for reasons theoretically investigated in Arjovsky & Bottou (2017). Arjovsky et al. (2017) refine the objective with Wasserstein-1 distance as: ",
201
+ "bbox": [
202
+ 174,
203
+ 827,
204
+ 825,
205
+ 924
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "image",
211
+ "img_path": "images/fbd590f51dff339cf1f3d2bcf07c11aa224881ffb40df40adc7c593a4eb5ccf8.jpg",
212
+ "image_caption": [
213
+ "Figure 2: Training Architecture with a GAN and an Inverter. Loss of the inverter combines reconstruction error of $x$ with divergence between Gaussian distribution $z$ and $\\mathcal { T } _ { \\gamma } ( \\mathcal { G } _ { \\theta } ( z ) )$ . "
214
+ ],
215
+ "image_footnote": [],
216
+ "bbox": [
217
+ 200,
218
+ 98,
219
+ 810,
220
+ 209
221
+ ],
222
+ "page_idx": 2
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "",
227
+ "bbox": [
228
+ 173,
229
+ 273,
230
+ 826,
231
+ 315
232
+ ],
233
+ "page_idx": 2
234
+ },
235
+ {
236
+ "type": "equation",
237
+ "img_path": "images/10a38b07ab597a5a16493d345844978d1e5ccc11b3540482fe2507f8675434c3.jpg",
238
+ "text": "$$\n\\operatorname* { m i n } _ { \\theta } \\operatorname* { m a x } _ { \\omega } \\mathbb { E } _ { x \\sim p _ { x } ( x ) } [ \\mathcal { C } _ { \\omega } ( x ) ] - \\mathbb { E } _ { z \\sim p _ { z } ( z ) } [ \\mathcal { C } _ { \\omega } ( \\mathcal { G } _ { \\theta } ( z ) ) ] .\n$$",
239
+ "text_format": "latex",
240
+ "bbox": [
241
+ 328,
242
+ 321,
243
+ 668,
244
+ 344
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "Wasserstein GAN achieves improvement in the stability of learning and provides useful learning curves. A number of further improvements to the GAN framework have been introduced (Salimans et al., 2016; Arjovsky & Bottou, 2017; Gulrajani et al., 2017; Rosca et al., 2017) that we discuss in Section 6. We incorporate the structure of WGAN and relevant improvements as a part of our framework for generating natural examples close to the training data distribution, as we describe next. ",
251
+ "bbox": [
252
+ 173,
253
+ 349,
254
+ 825,
255
+ 421
256
+ ],
257
+ "page_idx": 2
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "Natural Adversaries In order to represent natural instances of the domain, we first train a WGAN on corpus $X$ , which provides a generator $\\mathcal { G } _ { \\theta }$ that maps random dense vectors $z \\in \\mathbb { R } ^ { \\mathrm { d } }$ to samples $x$ from the domain of $X$ . We separately train a matching inverter $\\mathcal { T } _ { \\gamma }$ to map data instances to corresponding dense representations. As in Figure 2, we minimize the reconstruction error of $x$ , and the divergence between sampled $z$ and $\\mathcal { T } _ { \\gamma } ( \\mathcal { G } _ { \\theta } ( z ) )$ to encourage the latent space to be normally distributed: ",
262
+ "bbox": [
263
+ 173,
264
+ 430,
265
+ 825,
266
+ 502
267
+ ],
268
+ "page_idx": 2
269
+ },
270
+ {
271
+ "type": "equation",
272
+ "img_path": "images/8a4754b83c29e7adda115437893432325188d6a85215c4932a7b912d59c9ed0a.jpg",
273
+ "text": "$$\n\\operatorname* { m i n } _ { \\gamma } \\mathbb { E } _ { x \\sim p _ { x } ( x ) } \\lVert \\mathcal { G } _ { \\theta } ( \\mathbb { Z } _ { \\gamma } ( x ) ) - x \\rVert + \\lambda \\cdot \\mathbb { E } _ { z \\sim p _ { z } ( z ) } [ \\mathcal { L } ( z , \\mathbb { Z } _ { \\gamma } ( \\mathcal { G } _ { \\theta } ( z ) ) ) ] .\n$$",
274
+ "text_format": "latex",
275
+ "bbox": [
276
+ 282,
277
+ 506,
278
+ 715,
279
+ 531
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "Using these learned functions, we define the natural adversarial example $x ^ { * }$ as the following: ",
286
+ "bbox": [
287
+ 171,
288
+ 536,
289
+ 787,
290
+ 551
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "equation",
296
+ "img_path": "images/f80f3098ce669833cae8dd64677ef5948ee5863b684224dd814d3b7458855ec3.jpg",
297
+ "text": "$$\n\\mathcal G _ { \\boldsymbol \\theta } ( z ^ { * } ) \\mathrm { w h e r e } z ^ { * } = \\mathrm { a r g m i n } \\| \\tilde { z } - \\mathcal T _ { \\gamma } ( x ) \\| \\mathrm { s . t . } f ( \\mathcal G _ { \\boldsymbol \\theta } ( \\tilde { z } ) ) \\neq f ( x ) .\n$$",
298
+ "text_format": "latex",
299
+ "bbox": [
300
+ 307,
301
+ 556,
302
+ 725,
303
+ 579
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Instead of $x$ , we perturb its dense representation $z ^ { \\prime } = \\mathcal { T } _ { \\gamma } ( x )$ , and use the generator to test whether a perturbation $\\tilde { z }$ fools the classifier by querying $f$ with $\\dot { \\tilde { x } } = \\mathcal { G } _ { \\theta } ( \\tilde { z } )$ . Figure 3 shows our generation process. A synthetic example is included for further intuition in Appendix A. As for the divergence $\\mathcal { L }$ , we use $L _ { 2 }$ distance with $\\lambda = . 1$ for images and Jensen-Shannon distance with $\\lambda = 1$ for text data. ",
310
+ "bbox": [
311
+ 174,
312
+ 585,
313
+ 826,
314
+ 643
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "Search Algorithms We propose two approaches to identify the adversary (pseudocode in Appendix B), both of which utilize the inverter to obtain the latent vector $z ^ { \\prime } = \\mathcal { T } _ { \\gamma } ( x )$ of $x$ , and feed perturbations $\\tilde { z }$ in the neighborhood of $z ^ { \\prime }$ to the generator to generate natural samples $\\tilde { x } = \\mathcal { G } _ { \\theta } ( \\tilde { z } )$ . In iterative stochastic search (Algorithm 1), we incrementally increase the search range (by $\\Delta r$ ) within which the perturbations $\\tilde { z }$ are randomly sampled $N$ samples for each iteration), until we have generated samples $\\check { x }$ that change the prediction. Among these samples $\\check { x }$ , we choose the one which has the closest $z ^ { * }$ to the original $z ^ { \\prime }$ as an adversarial example $x ^ { * }$ . To improve the efficiency beyond this naive search, we propose a coarse-to-fine strategy we call hybrid shrinking search (Algorithm 2). We first search for adversaries in a wide search range, and recursively tighten the upper bound of the search range with denser sampling in bisections. Extra iterative search steps are taken to further tighten the upper bound of the optimal $\\Delta z$ . With the hybrid shrinking search in Algorithm 2, we observe a $4 \\times$ speedup while achieving similar results as Algorithm 1. Both these search algorithms are sample-based and applicable to black-box classifiers with no need of access to their gradients. Further, they are guaranteed to find an adversary, i.e. one that upper bounds the optimal adversary. ",
321
+ "bbox": [
322
+ 173,
323
+ 652,
324
+ 826,
325
+ 792
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "image",
331
+ "img_path": "images/7bd1c82ecb7bef6ba77a957ce29e0c2547c954936bc007117d26479ee174d243.jpg",
332
+ "image_caption": [
333
+ "Figure 3: Natural Adversary Generation. Given an instance $x$ , our framework generates natural adversaries by perturbing inverted $z ^ { \\prime }$ and decoding perturbations $\\tilde { z }$ via $\\mathcal { G } _ { \\theta }$ to query the classifier $f$ . "
334
+ ],
335
+ "image_footnote": [],
336
+ "bbox": [
337
+ 209,
338
+ 813,
339
+ 787,
340
+ 882
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "image",
346
+ "img_path": "images/a8bb26b880a446aed676fd7319d6dbcb20d8faad1ec9b6397a2e5bd116f67c2f.jpg",
347
+ "image_caption": [],
348
+ "image_footnote": [],
349
+ "bbox": [
350
+ 173,
351
+ 147,
352
+ 825,
353
+ 343
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "",
360
+ "bbox": [
361
+ 174,
362
+ 373,
363
+ 825,
364
+ 429
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "3 ILLUSTRATIVE EXAMPLES ",
371
+ "text_level": 1,
372
+ "bbox": [
373
+ 178,
374
+ 450,
375
+ 426,
376
+ 467
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "We demonstrate the potential of our approach (Algorithm 1) in generating informative, legible, and natural adversaries by applying it to a number of classifiers for both visual and textual domains. ",
383
+ "bbox": [
384
+ 174,
385
+ 482,
386
+ 825,
387
+ 511
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "3.1 GENERATING IMAGE ADVERSARIES ",
394
+ "text_level": 1,
395
+ "bbox": [
396
+ 176,
397
+ 529,
398
+ 462,
399
+ 542
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Image classification has been a focus for adversarial example generation due to the recent successes in computer vision. We apply our approach to two standard datasets, MNIST and LSUN, and present generated natural adversaries. We use $\\Delta r = 0 . 0 1$ and $N = 5 0 0 0$ with model details in Appendix C. ",
406
+ "bbox": [
407
+ 176,
408
+ 555,
409
+ 823,
410
+ 597
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "Handwritten Digits Scans of human-written text provide an intuitive definition of what is natural, i.e. do the generated images look like something a person would write? In other words, how would a human change a digit in order to fool a classifier? We train a WGAN with $z \\in \\mathbb { R } ^ { 6 4 }$ on 60,000 MNIST images following similar procedures as in Gulrajani et al. (2017), with the generator consisting of transposed convolutional layers and the critic consisting of convolutional layers. We include the inverter with fully connected layers on top of the critic’s last hidden layer. We train two target classifiers to generate adversaries against: Random Forests (RF) with 5 trees (test accuracy $9 0 . 4 5 \\%$ ), and LeNet, as trained in LeCun et al. (1998) (test accuracy $9 8 . 7 1 \\%$ ). We treat both these classifiers as black-boxes, and present the generated adversaries in Table 1 with examples of each digit (from test instances that the GAN or classifiers never observed). Adversaries generated by FGSM look like the original digits eroded by uninterpretable noise (these may not be representative of the approach, as changing $\\epsilon$ for the method results in substantially different results). Our natural adversaries against both classifiers are quite similar to the original inputs in overall style and shape, yet provide informative insights into classifiers’ decision behavior around the input. Take the digit $\\cdot 5 ^ { \\mathrm { , } }$ as an example: dimming the vertical stroke can fool LeNet into predicting $\\mathbf { \\ddot { \\delta } } ^ { 6 } 3 ^ { 9 }$ . Further we observe that adversaries against RF often look closer to the original images in overall shape than those against LeNet. Although generating as impressive natural adversaries against more accurate LeNet is difficult, it implies that compared to RF, LeNet requires more substantial changes to the inputs to be fooled; in other words, RF is less robust than LeNet in classification. We will return to this observation later. ",
417
+ "bbox": [
418
+ 174,
419
+ 607,
420
+ 825,
421
+ 871
422
+ ],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "Church vs Tower We apply our approach to outdoor, color images of higher resolution. We choose the category of “Church Outdoor” in LSUN dataset (Yu et al., 2015), randomly sample the same amount of 126,227 images from the category of “Tower”, and resize them to resolution of $6 4 \\times 6 4$ ",
428
+ "bbox": [
429
+ 176,
430
+ 882,
431
+ 823,
432
+ 924
433
+ ],
434
+ "page_idx": 3
435
+ },
436
+ {
437
+ "type": "image",
438
+ "img_path": "images/50dfe89b67539b53c864ae1055490c0805c96f3f5d5028392a00fdaa59df7beb.jpg",
439
+ "image_caption": [],
440
+ "image_footnote": [],
441
+ "bbox": [
442
+ 176,
443
+ 132,
444
+ 818,
445
+ 265
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "table",
451
+ "img_path": "images/4ccaef3da9589e2ad7f7066baaa20f7aace31faeb5b079214cbabd1408e4298f.jpg",
452
+ "table_caption": [
453
+ "Table 2: Adversarial examples against MLP classifier of LSUN by our approach. 4 original images each of “Church” and “Tower”, with their adversaries of the flipped class in the bottom row. ",
454
+ "Table 3: Textual Entailment. For a pair of premise $( \\mathbf { p } : )$ and hypothesis $( \\mathbf { h } : )$ , we present the generated adversaries for three classifiers by perturbing the hypothesis $( \\mathbf { h } ^ { \\prime } : \\mathbf { \\epsilon } )$ . The last column provides the true label, followed by the changes in the prediction for each classifier. "
455
+ ],
456
+ "table_footnote": [],
457
+ "table_body": "<table><tr><td>Classifiers</td><td>Sentences</td><td>Label</td></tr><tr><td>Original</td><td>p : The man wearing blue jean shorts is grilling. h : The man is walking his dog.</td><td>Contradiction</td></tr><tr><td>Embedding</td><td>h&#x27; : The man is walking by the dog.</td><td>Contradiction →Entailment</td></tr><tr><td>LSTM</td><td>h&#x27;: The person is walking a dog.</td><td>Contradiction →Entailment</td></tr><tr><td>TreeLSTM</td><td>h&#x27;:A man is winning a race.</td><td>Contradiction →Neutral</td></tr></table>",
458
+ "bbox": [
459
+ 205,
460
+ 328,
461
+ 789,
462
+ 426
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "The training procedure is similar to MNIST, except that the generator and critic in WGAN are deep residual networks (He et al., 2016) and $z \\in \\mathbb { R } ^ { 1 2 8 }$ . We train an MLP classifier on these two classes with test accuracy of $7 1 . 3 \\%$ . Table 2 presents original images for both classes and corresponding adversarial examples. From looking at these pairs, we can observe that the generated adversaries make changes that are natural for this domain. For example, to change the classifier’s prediction from “Church” to “Tower”, the adversaries sharpen the roof, narrow the buildings, or change a tree into a tower. We can observe similar behavior in the other direction: the image with the Eiffel Tower is changed to a “church” by converting a woman into a building, and narrowing the tower. ",
469
+ "bbox": [
470
+ 173,
471
+ 454,
472
+ 825,
473
+ 565
474
+ ],
475
+ "page_idx": 4
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "3.2 GENERATING TEXT ADVERSARIES ",
480
+ "text_level": 1,
481
+ "bbox": [
482
+ 176,
483
+ 587,
484
+ 454,
485
+ 601
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Generating grammatical and linguistically coherent adversarial sentences is a challenging task due to the discrete nature of text: adding imperceptible noise is impossible, and most actual changes to $x$ may not result in grammatical text. Prior approaches on generating textual adversaries (Li et al., 2016; Alvarez-Melis & Jaakkola, 2017; Jia & Liang, 2017) perform word erasures and replacements directly on text input space $x$ , using domain-specific rule based or heuristic based approaches, or require manual intervention. Our approach, on the other hand, performs perturbations in the continuous space $z$ , that has been trained to produce semantically and syntactically coherent sentences automatically. ",
492
+ "bbox": [
493
+ 174,
494
+ 613,
495
+ 825,
496
+ 712
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "We use the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete text into continuous codes. ARAE model encodes a sentence with an LSTM encoder into continuous code and then performs adversarial training on these codes to capture the data distribution. We introduce an inverter that maps these continuous codes into the Gaussian space of $z \\in \\mathbb { R } ^ { 1 0 0 }$ . We use a 4-layer strided CNN for the encoder as it yields more coherent sentences than LSTMs from the ARAE model, however LSTM works well as the decoder. We train two MLP models for the generator and the inverter, to learn mappings between noise and continuous codes. We train our framework on the Stanford Natural Language Inference (SNLI) (Bowman et al., 2015) data of 570k labeled human-written English sentence pairs with the same preprocessing as Zhao et al. (2017), using $\\Delta r =$ 0.01 and $N = 1 0 0$ . We present details of the architecture and sample perturbations in Appendix D. ",
503
+ "bbox": [
504
+ 174,
505
+ 718,
506
+ 825,
507
+ 857
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Textual Entailment Textual Entailment (TE) is a task designed to evaluate common-sense reasoning for language, requiring both natural language understanding and logical inferences for text snippets. In this task, we classify a pair of sentences, a premise and a hypothesis, into three categories depending on whether the hypothesis is entailed by the premise, contradicts the premise, or is neutral to it. For instance, the sentence “There are children present” is entailed by the sentence “Children smiling and waving at camera”, while the sentence “The kids are frowning” contradicts it. We use our approach to generate adversaries by perturbing the hypothesis to deceive classifiers, keeping the premise unchanged. We train three classifiers of varying complexity, namely, an embedding classifier that is a single layer on top of the average word embeddings, an LSTM based model consisting of a single layer on top of the sentence representations, and TreeLSTM (Chen et al., 2017) that uses a hierarchical LSTM on the parses and is a top-performing classifier for this task. A few examples comparing the three classifiers are shown in Table 3 (more examples in Appendix D.1). Although all classifiers correctly predict the label, as the classifiers get more accurate (from embedding to LSTM to TreeLSTM), they require much more substantial changes to the sentences to be fooled. ",
514
+ "bbox": [
515
+ 174,
516
+ 867,
517
+ 825,
518
+ 924
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "table",
524
+ "img_path": "images/780dc86cbb906909ec7e60783c54728c2f4b5e6a149da0776083107a1925538e.jpg",
525
+ "table_caption": [
526
+ "Table 4: Machine Translation. “Adversary” that introduces the word “stehen” into the translation. "
527
+ ],
528
+ "table_footnote": [],
529
+ "table_body": "<table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : A man and woman sitting on the sidewalk.</td><td>Ein Mann und eine Frau, die auf dem Bürgersteig sitzen.</td></tr><tr><td>s&#x27; : A man and woman stand on the bench.</td><td>Ein Mann und eine Frau stehen auf der Bank.</td></tr></table>",
530
+ "bbox": [
531
+ 174,
532
+ 117,
533
+ 823,
534
+ 171
535
+ ],
536
+ "page_idx": 5
537
+ },
538
+ {
539
+ "type": "table",
540
+ "img_path": "images/fe990707cef0ef1108186dbbb59a7e9d284e1b7a27317ed709ab44d98957cf60.jpg",
541
+ "table_caption": [
542
+ "Table 5: “Adversaries” to find dropped verbs. The left column contains the original sentence s and its adversary $s ^ { \\prime }$ , while the right contains their translations, with English translation in red. "
543
+ ],
544
+ "table_footnote": [],
545
+ "table_body": "<table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : People sitting in a dim restaurant eating. s&#x27; : People sitting in a living room eating.</td><td>Leute,die in einem dim Restaurant essen sitzen. Leute,die in einem Wohnzimmeressen sitzen.</td></tr><tr><td>s : Elderly people walking down a city street. s&#x27; : A man walking down a street playing.</td><td>(People sitting in a living room.) Altere Menschen,die eine StadtstraBe hinuntergehen. Ein Mann,der eine StraBe entlang spielt. (A man playing along a street.)</td></tr></table>",
546
+ "bbox": [
547
+ 179,
548
+ 226,
549
+ 813,
550
+ 334
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "",
557
+ "bbox": [
558
+ 174,
559
+ 371,
560
+ 825,
561
+ 510
562
+ ],
563
+ "page_idx": 5
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "Machine translation We consider machine translation not only because it is one of the most successful applications of neural approaches to NLP, but also since most practical translation systems lie behind black-box access APIs. The notion of adversary, however, is not so clear here as the output of a translation system is not a class. Instead, we define adversary for machine translation relative to a probing function that tests the translation for certain properties, ones that may lead to linguistic insights into the languages, or detect potential vulnerabilities. We use the same generator and inverter as in entailment, and find such “adversaries” via API access to the currently deployed Google Translate model (as of October 15, 2017) from English to German. ",
568
+ "bbox": [
569
+ 174,
570
+ 520,
571
+ 825,
572
+ 632
573
+ ],
574
+ "page_idx": 5
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "First, let us consider the scenario in which we want to generate adversarial English sentences such that a specific German word is introduced into the German translation. The probing function here would test the translation for the presence of that word, and we would have found an adversary (an English sentence) if the probing function passes for a translation. We provide an example of such a probing function that introduces the word “stehen” (“stand” in English) to the translation in Table 4 (more examples in Appendix D.2). Since the translation system is quite strong, such adversaries are not surfacing the vulnerabilities of the model, but instead can be used as a tool to understand or learn different languages (in this example, help a German speaker learn English). ",
579
+ "bbox": [
580
+ 174,
581
+ 638,
582
+ 825,
583
+ 751
584
+ ],
585
+ "page_idx": 5
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "We can design more complex probing functions as well, especially ones that target specific vulnerabilities of the translation system. Let us consider translations of English sentences that contain two active verbs, e.g. “People sitting in a restaurant eating”, and see that the German translation has the two verbs as well, “essen” and “sitzen”, respectively. We now define a probing function that passes only if the perturbed English sentence $s ^ { \\prime }$ contains both the verbs, but the translation only has one of them. An adversary for such a probing function will be an English sentence $( s ^ { \\prime } )$ that is similar to the original sentence (s), but for some reason, its translation is missing one of the verbs. Table 5 presents examples of generated adversaries using such a probing function (with more in Appendix D.2). For example, one that tests whether “essen” is dropped from the translation when its English counterpart “eating” appears in the source sentence (“People sitting in a living room eating.”). These adversaries thus suggest a vulnerability in Google’s English to German translation system: a word acting as a gerund in English often gets dropped from the translation. ",
590
+ "bbox": [
591
+ 173,
592
+ 757,
593
+ 825,
594
+ 924
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "table",
600
+ "img_path": "images/cc0959b52ec3322f12b3811ffa8a3a547bcda5f1d20b9fe677bd03afba43e7b4.jpg",
601
+ "table_caption": [
602
+ "Table 6: Statistics of adversaries against models for both MNIST and TE. We include the average $\\Delta z$ for the adversaries and the proportion where each classifier’s adversary has the largest $\\Delta z$ compared to the others for the same instance (significant with $p < 0 . 0 0 0 5$ using the sign test). The higher values correspond to stronger robustness, as is demonstrated by higher test accuracy. "
603
+ ],
604
+ "table_footnote": [],
605
+ "table_body": "<table><tr><td colspan=\"2\"></td><td>Average △z</td><td>P(largest △z)</td><td>Test accuracy (%)</td></tr><tr><td rowspan=\"2\">MNIST</td><td>Random Forests</td><td>1.24</td><td>0.22</td><td>90.45</td></tr><tr><td>LeNet</td><td>1.61</td><td>0.78</td><td>98.71</td></tr><tr><td rowspan=\"3\">Entailment</td><td>Embeddings</td><td>0.12</td><td>0.15</td><td>62.04</td></tr><tr><td>LSTM</td><td>0.14</td><td>0.18</td><td>69.60</td></tr><tr><td>TreeLSTM</td><td>0.26</td><td>0.66</td><td>89.04</td></tr></table>",
606
+ "bbox": [
607
+ 200,
608
+ 159,
609
+ 790,
610
+ 263
611
+ ],
612
+ "page_idx": 6
613
+ },
614
+ {
615
+ "type": "image",
616
+ "img_path": "images/c3d115fc778a6779f6074b50f9feffab09db6f379f1b040af37910cf9997b2aa.jpg",
617
+ "image_caption": [
618
+ "Figure 4: Classifier accuracy and average $\\Delta z$ of their adversaries. In (a) and (b) we vary the number of neurons and dropout rate, respectively. In (c) we present the correlation between accuracy and average $\\Delta z$ for 80 different classifiers. (d) shows adversaries for an input image, against a set of classifiers with a single hidden layer, but varying number of neurons. "
619
+ ],
620
+ "image_footnote": [],
621
+ "bbox": [
622
+ 179,
623
+ 292,
624
+ 818,
625
+ 497
626
+ ],
627
+ "page_idx": 6
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "4 EXPERIMENTS ",
632
+ "text_level": 1,
633
+ "bbox": [
634
+ 174,
635
+ 602,
636
+ 326,
637
+ 617
638
+ ],
639
+ "page_idx": 6
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "In this section, we demonstrate that our approach can be utilized to compare and evaluate the robustness of black-box models even without labeled data. We present experimental results on images and text data with evaluations from both statistical analysis and pilot user studies. ",
644
+ "bbox": [
645
+ 174,
646
+ 641,
647
+ 823,
648
+ 684
649
+ ],
650
+ "page_idx": 6
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "Robustness of Black-box Classifiers We apply our framework to various black-box classifiers for both images and text, and observe that it is useful for evaluating and interpreting these models via comparisons. The primary intuition behind this analysis is that more accurate classifiers often require more substantial changes to the instance to change their predictions, as noted in the previous section. In the following experiments, we apply the more efficient hybrid shrinking search (Algorithm 2). ",
655
+ "bbox": [
656
+ 174,
657
+ 694,
658
+ 825,
659
+ 763
660
+ ],
661
+ "page_idx": 6
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "In order to quantify the extent of change for an adversary, the change in the original $x$ representation may not be meaningful, such as RMSE of the pixels or string edit distances, for the same reason we are generating natural adversaries: they do not correspond to the semantic distance underlying the data manifold. Instead we use the distance of the adversary in the latent space, i.e. $\\Delta z = \\| \\dot { z ^ { * } } - \\bar { z } ^ { \\prime } \\|$ , in order to measure how much each adversary is modified to change the classifier prediction. We also consider the set of adversaries generated for each instance against a group of classifiers, and count how many times the adversary of each classifier has the highest $\\Delta z$ . We present these statistics in Table 6 for both MNIST (over 100 test images, 10 per digit) and Textual Entailment (over 1260 test sentences), against the classifiers we described in Section 3. For both the tasks, we observe that more accurate classifiers require larger changes to the inputs (by both measures), indicating that generating such adversaries, even for unlabeled data, can evaluate the accuracy of black-box classifiers. ",
666
+ "bbox": [
667
+ 174,
668
+ 771,
669
+ 825,
670
+ 924
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "table",
676
+ "img_path": "images/a2bf820095ae17c6491b97053331c2e4fb76e0f44c9f427316a4fae68907263d.jpg",
677
+ "table_caption": [
678
+ "Table 7: Pilot study with MNIST "
679
+ ],
680
+ "table_footnote": [],
681
+ "table_body": "<table><tr><td></td><td>RF</td><td>LeNet</td></tr><tr><td>Looks handwritten?</td><td>0.88</td><td>0.71</td></tr><tr><td>Which closer to original?</td><td>0.87</td><td>0.13</td></tr></table>",
682
+ "bbox": [
683
+ 174,
684
+ 117,
685
+ 449,
686
+ 171
687
+ ],
688
+ "page_idx": 7
689
+ },
690
+ {
691
+ "type": "table",
692
+ "img_path": "images/1dff5927ce09999f65a5de6fc03e9255f68bef85b9f2c262482cc3566bb0d4b1.jpg",
693
+ "table_caption": [
694
+ "Table 8: Pilot study with Textual Entailment "
695
+ ],
696
+ "table_footnote": [],
697
+ "table_body": "<table><tr><td></td><td>LSTM</td><td>TreeLSTM</td></tr><tr><td>Is adversary grammatical?</td><td>0.86</td><td>0.78</td></tr><tr><td>Is it similar to the original?</td><td>0.81</td><td>0.58</td></tr></table>",
698
+ "bbox": [
699
+ 477,
700
+ 117,
701
+ 810,
702
+ 171
703
+ ],
704
+ "page_idx": 7
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "We now consider evaluation on a broader set of classifiers, and study the effect of changing hyperparameters of models on the results (focusing on MNIST). We train a set of neural networks with one hidden layer by varying the number of neurons exponentially from 2 to 1024. In Figure 4a, we observe that the average $\\Delta z$ of adversaries against these models has a similar trend as their test accuracy. The generated adversaries for a single digit “3” in Figure 4d verify this observation: the adversaries become increasingly different from the original input as classifiers become more complex. We provide similar analysis by fixing the model structure but varying the dropout rates from 0.9 to 0.0 in Figure 4b, and observe a similar trend. To confirm that this correlation holds generally, we train 80 total classifiers that differ in the layer sizes, regularization, and amount of training data, and plot their test set accuracy against the average magnitude of change in their adversaries in Figure 4c. Given this strong correlation, we are confident that our framework for generating natural adversaries can be useful for automatically evaluating black-box classifiers, even in the absence of labeled data. ",
709
+ "bbox": [
710
+ 173,
711
+ 194,
712
+ 826,
713
+ 361
714
+ ],
715
+ "page_idx": 7
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "Human Evaluation We carry out a pilot study with human subjects to evaluate how natural the generated adversaries are, and whether the adversaries they think are similar to the original ones correspond with the less accurate classifiers (as in the evaluation above). For both image classification and textual entailment, we select a number of instances randomly, generate adversaries for each against two classifiers, and present a questionnaire to the subjects that evaluates: (1) how natural or legible each generated adversary is; (2) which of the two adversaries is closer to the original instance. ",
720
+ "bbox": [
721
+ 174,
722
+ 372,
723
+ 825,
724
+ 455
725
+ ],
726
+ "page_idx": 7
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "For hand-written digits from MNIST, we pick 20 images (2 for each digit), generate adversaries against RF and LeNet (two adversaries for each image), and obtain 13 responses for each of the questions. In Table 7, we see that the subjects agree that our generated adversaries are quite natural, and also, they find RF adversaries to be much closer to the original image than LeNet (i.e. more accurate classifiers, as per test accuracy on their provided labels, have more distant adversaries). We also compare adversaries against LeNet generated by FGSM and our approach, and find that $7 8 \\%$ of the time the subjects agree that our adversaries make changes to the original images that are more natural (it is worth noting that FGSM is not applicable to RF for comparison). We carry out a similar pilot study for the textual entailment task to evaluate the quality of the perturbed sentences. We present a set of 20 pairs of sentences (premise and hypothesis), and adversarial hypotheses against both LSTM and TreeLSTM classifiers, and receive 4 responses for each of the questions above. The results in Table 8 also validate our previous results: the generated sentences are found to be grammatical and legible, and classifiers that need more substantial changes to the hypothesis tend to be more accurate. We leave a more detailed user study for future work. ",
731
+ "bbox": [
732
+ 174,
733
+ 462,
734
+ 825,
735
+ 656
736
+ ],
737
+ "page_idx": 7
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "5 RELATED WORK ",
742
+ "text_level": 1,
743
+ "bbox": [
744
+ 176,
745
+ 676,
746
+ 343,
747
+ 693
748
+ ],
749
+ "page_idx": 7
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "The fast gradient sign method (FGSM) has been proposed in Goodfellow et al. (2015) to generate adversarial examples fast rather than optimally. Intuitively, the method shifts the input by $\\epsilon$ in the direction of minimizing the cost function. Kurakin et al. (2016) propose a simple extension of FGSM by applying it multiple times, which generates adversarial examples with a higher attack rate, but the underlying idea is the same. Another method known as the Jacobian-based saliency map attack (JSMA) has been introduced by Papernot et al. (2016b). Unlike FGSM, JSMA generates adversaries by greedily modifying the input instance feature-wise. A saliency map is computed with gradients to indicate how important each feature is for the prediction, and the most important one is modified repeatedly until the instance changes the resulting classification. Moreover, it has been observed in practice that adversarial examples designed against a model are often likely to successfully attack another model for the same task that has not been given access to. This transferability property of adversarial examples makes it more practical to attack and evaluate deployed machine learning systems in realistic scenarios (Papernot et al., 2016a; 2017). ",
754
+ "bbox": [
755
+ 174,
756
+ 708,
757
+ 825,
758
+ 888
759
+ ],
760
+ "page_idx": 7
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "All these attacks above are based on gradients with access to the parameters of differentiable classifiers. Moosavi-Dezfooli et al. (2017) try to find a single noise vector which can cause imperceptible changes in most of data points, and meanwhile reduce the classifier accuracy significantly. Our method is capable of generating adversaries against black-box classifiers, even those without gradients such as Random Forests. Also, the noise added by these methods is uninterpretable, while the natural adversaries generated by our approach provide informative insights into classifiers’ decision behavior. ",
765
+ "bbox": [
766
+ 174,
767
+ 895,
768
+ 823,
769
+ 924
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "",
776
+ "bbox": [
777
+ 174,
778
+ 103,
779
+ 825,
780
+ 159
781
+ ],
782
+ "page_idx": 8
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "Due to the discrete domains involved in text, adversaries for text have received less attention. Jia & Liang (2017) generate adversarial examples for evaluating reading comprehension systems with predefined rules and candidate words for substitution after analyzing and rephrasing the input sentences. Li et al. (2016) introduce a framework to understand neural network through different levels of representation erasure. However, erasure of words or phrases directly often harms text integrity, resulting in semantically or grammatically incorrect sentences. Ribeiro et al. (2018) replace tokens by random words of the same POS tag with probability proportional to embedding similarity. Belinkov & Bisk (2018) explore approaches to increase the robustness of character-based machine translation models on text corrupted with character-level noise. With the help of expressive generative models, our approach instead perturbs the latent coding of sentences, resulting in legible generated sentences that are grammatical and semantically similar to the original input. These merits make our framework suitable for text applications such as sentiment analysis, textual entailment, and machine translation. ",
787
+ "bbox": [
788
+ 174,
789
+ 166,
790
+ 825,
791
+ 347
792
+ ],
793
+ "page_idx": 8
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "6 DISCUSSION AND FUTURE WORK ",
798
+ "text_level": 1,
799
+ "bbox": [
800
+ 176,
801
+ 378,
802
+ 485,
803
+ 395
804
+ ],
805
+ "page_idx": 8
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Our framework builds upon GANs as the generative models, and thus the capabilities of GANs directly effects the quality of generated examples. In visual domains, although there have been lots of appealing results produced by GANs, the training is well known to be brittle. Many recent approaches address how to improve the training stability and the objective function of GANs (Salimans et al., 2016; Arjovsky et al., 2017). Gulrajani et al. (2017) further improve the training of WGAN with regularization of gradient penalty instead of weight clipping. In our practice, we observe that we need to carefully balance the capacities of the generator, the critic, and the inverter that we introduced, to avoid situations such as model collapse. For natural languages, because of the discrete nature and non-differentiability, applications related to text generation have been relatively less studied. Zhao et al. (2017) propose to incorporate a discrete structure autoencoder with continuous code space regularized by WGAN for text generation. Given that there are some concerns about whether GANs actually learn the distribution (Arora & Zhang, 2017), it is worth noting that we can also incorporate other generative models such as Variational Auto-Encoders (VAEs) (Kingma & Welling, 2014) into our framework, as used in Hu et al. (2017) to generate text with controllable attributes, which we will explore in the future. We focus on GANs because adversarial training often results in higher quality images, while VAEs tend to produce blurrier ones (Goodfellow, 2016). We also plan to apply the fusion and variant of VAEs and GANs such as $\\alpha$ -GAN in Rosca et al. (2017) and Wasserstein Auto-Encoders in Tolstikhin et al. (2018). Note that as more advanced GANs are introduced to address these issues, they can be directly incorporated into our framework. ",
810
+ "bbox": [
811
+ 174,
812
+ 416,
813
+ 825,
814
+ 680
815
+ ],
816
+ "page_idx": 8
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "Our iterative stochastic search algorithm for identifying adversaries is computationally expensive since it is based on naive sampling and local-search. Search based on gradients such as FGSM are not applicable to our setup because of black-box classifiers and discrete domain applications. We improve the efficiency with hybrid shrinking search by using a coarse-to-fine strategy that finds the upper-bounds by using fewer samples, and then performs finer search in the restricted range. We observe around $4 \\times$ speedup with this search while achieving similar results as the iterative search. The accuracy of our inverter mapping the input to its corresponding dense vector in latent space is also important for searching adversaries in the right neighborhood. In our experiments, we find that fine-tuning the latent vector produced by the inverter with a fixed GAN can further refine the generated adversarial examples, and we will investigate other such extensions of the search in future. There is an implicit assumption in this work that the generated samples are within the same class if the added perturbations are small enough, and the generated samples look as if they belong to different classes when the perturbations are large. However, note that it is also the case for FGSM and other such approaches: when their $\\epsilon$ is small, the noise is imperceptible; but with a large $\\epsilon$ , one often finds noisy instances that might be in a different class (see Table 1, digit 8 for an example). While we do observe this behavior in some cases, the corresponding classifiers require much more substantial changes to the input, which is why we can utilize our approach to evaluate black-box classifiers. ",
821
+ "bbox": [
822
+ 174,
823
+ 688,
824
+ 825,
825
+ 924
826
+ ],
827
+ "page_idx": 8
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "7 CONCLUSIONS ",
832
+ "text_level": 1,
833
+ "bbox": [
834
+ 176,
835
+ 102,
836
+ 328,
837
+ 117
838
+ ],
839
+ "page_idx": 9
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "In this paper, we propose a framework for generating natural adversaries against black-box classifiers, and apply the same approach to both visual and textual domains. We obtain adversaries that are legible, grammatical, and meaningfully similar to the input. We show that these natural adversaries can help in interpreting the decision behavior and evaluating the accuracy of black-box classifiers even in absence of labeled training data. We use our approach, built upon recent work in GANs, to generate adversaries for a wide range of applications including image classification, textual entailment, and machine translation (via the Google Translate API). Code used to generate such natural adversaries is available at https://github.com/zhengliz/natural-adversary. ",
844
+ "bbox": [
845
+ 174,
846
+ 133,
847
+ 825,
848
+ 244
849
+ ],
850
+ "page_idx": 9
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "ACKNOWLEDGMENTS ",
855
+ "text_level": 1,
856
+ "bbox": [
857
+ 176,
858
+ 261,
859
+ 326,
860
+ 273
861
+ ],
862
+ "page_idx": 9
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "We would like to thank Ananya, Casey Graff, Eric Nalisnick, Pouya Pezeshkpour, Robert Logan, and the anonymous reviewers for the discussions and feedback on earlier versions. We would also like to thank Ishaan Gulrajani and Junbo Jake Zhao for making their code available. This work is supported in part by Adobe Research and in part by FICO. The views expressed are those of the authors and do not reflect the official policy or position of the funding agencies. ",
867
+ "bbox": [
868
+ 174,
869
+ 284,
870
+ 825,
871
+ 353
872
+ ],
873
+ "page_idx": 9
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "REFERENCES ",
878
+ "text_level": 1,
879
+ "bbox": [
880
+ 174,
881
+ 375,
882
+ 285,
883
+ 388
884
+ ],
885
+ "page_idx": 9
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "David Alvarez-Melis and Tommi S. Jaakkola. A causal framework for explaining the predictions of black-box sequence-to-sequence models. In Empirical Methods in Natural Language Processing (EMNLP), 2017. ",
890
+ "bbox": [
891
+ 174,
892
+ 397,
893
+ 825,
894
+ 439
895
+ ],
896
+ "page_idx": 9
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "Martin Arjovsky and Leon Bottou. Towards principled methods for training generative adversarial ´ networks. In International Conference on Learning Representations (ICLR), 2017. ",
901
+ "bbox": [
902
+ 173,
903
+ 446,
904
+ 823,
905
+ 477
906
+ ],
907
+ "page_idx": 9
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks.´ In International Conference on Machine Learning (ICML), 2017. ",
912
+ "bbox": [
913
+ 174,
914
+ 484,
915
+ 823,
916
+ 513
917
+ ],
918
+ "page_idx": 9
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "Sanjeev Arora and Yi Zhang. Do gans actually learn the distribution? an empirical study. arXiv preprint 1706.08224, 2017. ",
923
+ "bbox": [
924
+ 173,
925
+ 521,
926
+ 821,
927
+ 550
928
+ ],
929
+ "page_idx": 9
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "Yonatan Belinkov and Yonatan Bisk. Synthetic and natural noise both break neural machine transla tion. In International Conference on Learning Representations (ICLR), 2018. ",
934
+ "bbox": [
935
+ 173,
936
+ 558,
937
+ 821,
938
+ 587
939
+ ],
940
+ "page_idx": 9
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large annotated corpus for learning natural language inference. In Empirical Methods in Natural Language Processing (EMNLP), 2015. ",
945
+ "bbox": [
946
+ 173,
947
+ 594,
948
+ 826,
949
+ 638
950
+ ],
951
+ "page_idx": 9
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced lstm for natural language inference. In Association for Computational Linguistics (ACL), 2017. ",
956
+ "bbox": [
957
+ 174,
958
+ 645,
959
+ 823,
960
+ 675
961
+ ],
962
+ "page_idx": 9
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, and Deepak Verma. Adversarial classification. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2004. ",
967
+ "bbox": [
968
+ 173,
969
+ 683,
970
+ 825,
971
+ 726
972
+ ],
973
+ "page_idx": 9
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "Ian Goodfellow. NIPS 2016 Tutorial: Generative Adversarial Networks. arXiv preprint 1701.00160, 2016. ",
978
+ "bbox": [
979
+ 171,
980
+ 733,
981
+ 823,
982
+ 762
983
+ ],
984
+ "page_idx": 9
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "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 (NIPS), 2014. ",
989
+ "bbox": [
990
+ 173,
991
+ 770,
992
+ 826,
993
+ 813
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015. ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 820,
1003
+ 823,
1004
+ 851
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems (NIPS), 2017. ",
1011
+ "bbox": [
1012
+ 173,
1013
+ 858,
1014
+ 823,
1015
+ 887
1016
+ ],
1017
+ "page_idx": 9
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. ",
1022
+ "bbox": [
1023
+ 173,
1024
+ 895,
1025
+ 821,
1026
+ 924
1027
+ ],
1028
+ "page_idx": 9
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P. Xing. Toward controlled generation of text. In International Conference on Machine Learning (ICML), 2017. ",
1033
+ "bbox": [
1034
+ 173,
1035
+ 103,
1036
+ 825,
1037
+ 133
1038
+ ],
1039
+ "page_idx": 10
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In Empirical Methods in Natural Language Processing (EMNLP), 2017. ",
1044
+ "bbox": [
1045
+ 173,
1046
+ 140,
1047
+ 823,
1048
+ 171
1049
+ ],
1050
+ "page_idx": 10
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "Diederik P. Kingma and Max Welling. Stochastic gradient vb and the variational auto-encoder. In International Conference on Learning Representations (ICLR), 2014. ",
1055
+ "bbox": [
1056
+ 171,
1057
+ 178,
1058
+ 823,
1059
+ 208
1060
+ ],
1061
+ "page_idx": 10
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint 1607.02533, 2016. ",
1066
+ "bbox": [
1067
+ 171,
1068
+ 215,
1069
+ 825,
1070
+ 246
1071
+ ],
1072
+ "page_idx": 10
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In International Conference on Learning Representations (ICLR), 2017. ",
1077
+ "bbox": [
1078
+ 173,
1079
+ 253,
1080
+ 825,
1081
+ 284
1082
+ ],
1083
+ "page_idx": 10
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1088
+ "bbox": [
1089
+ 173,
1090
+ 291,
1091
+ 823,
1092
+ 321
1093
+ ],
1094
+ "page_idx": 10
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Jiwei Li, Will Monroe, and Dan Jurafsky. Understanding neural networks through representation erasure. arXiv preprint 1612.08220, 2016. ",
1099
+ "bbox": [
1100
+ 173,
1101
+ 329,
1102
+ 823,
1103
+ 359
1104
+ ],
1105
+ "page_idx": 10
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. ",
1110
+ "bbox": [
1111
+ 176,
1112
+ 367,
1113
+ 823,
1114
+ 410
1115
+ ],
1116
+ "page_idx": 10
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint 1605.07277, 2016a. ",
1121
+ "bbox": [
1122
+ 173,
1123
+ 419,
1124
+ 823,
1125
+ 448
1126
+ ],
1127
+ "page_idx": 10
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z. Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In IEEE European Symposium on Security and Privacy, 2016b. ",
1132
+ "bbox": [
1133
+ 173,
1134
+ 457,
1135
+ 823,
1136
+ 500
1137
+ ],
1138
+ "page_idx": 10
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the ACM on Asia Conference on Computer and Communications Security, 2017. ",
1143
+ "bbox": [
1144
+ 173,
1145
+ 507,
1146
+ 825,
1147
+ 551
1148
+ ],
1149
+ "page_idx": 10
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Kexin Pei, Yinzhi Cao, Junfeng Yang, and Suman Jana. Deepxplore: Automated whitebox testing of deep learning systems. In the ACM Symposium on Operating Systems Principles, 2017. ",
1154
+ "bbox": [
1155
+ 174,
1156
+ 559,
1157
+ 825,
1158
+ 589
1159
+ ],
1160
+ "page_idx": 10
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Anchors: High-precision model-agnostic explanations. In AAAI Conference on Artificial Intelligence, 2018. ",
1165
+ "bbox": [
1166
+ 173,
1167
+ 597,
1168
+ 825,
1169
+ 627
1170
+ ],
1171
+ "page_idx": 10
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Mihaela Rosca, Balaji Lakshminarayanan, David Warde-Farley, and Shakir Mohamed. Variational approaches for auto-encoding generative adversarial networks. arXiv preprint 1706.04987, 2017. ",
1176
+ "bbox": [
1177
+ 173,
1178
+ 635,
1179
+ 825,
1180
+ 665
1181
+ ],
1182
+ "page_idx": 10
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems (NIPS), 2016. ",
1187
+ "bbox": [
1188
+ 173,
1189
+ 672,
1190
+ 826,
1191
+ 715
1192
+ ],
1193
+ "page_idx": 10
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations (ICLR), 2014. ",
1198
+ "bbox": [
1199
+ 171,
1200
+ 724,
1201
+ 825,
1202
+ 767
1203
+ ],
1204
+ "page_idx": 10
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Schoelkopf. Wasserstein auto-encoders. In International Conference on Learning Representations (ICLR), 2018. ",
1209
+ "bbox": [
1210
+ 169,
1211
+ 776,
1212
+ 825,
1213
+ 806
1214
+ ],
1215
+ "page_idx": 10
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint 1506.03365, 2015. ",
1220
+ "bbox": [
1221
+ 176,
1222
+ 814,
1223
+ 825,
1224
+ 857
1225
+ ],
1226
+ "page_idx": 10
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Junbo Jake Zhao, Yoon Kim, Kelly Zhang, Alexander M. Rush, and Yann LeCun. Adversarially regularized autoencoders. arXiv preprint 1706.04223, 2017. ",
1231
+ "bbox": [
1232
+ 173,
1233
+ 866,
1234
+ 825,
1235
+ 895
1236
+ ],
1237
+ "page_idx": 10
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "APPENDIX ",
1242
+ "text_level": 1,
1243
+ "bbox": [
1244
+ 176,
1245
+ 103,
1246
+ 263,
1247
+ 117
1248
+ ],
1249
+ "page_idx": 11
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "A ILLUSTRATION WITH SYNTHETIC DATA ",
1254
+ "text_level": 1,
1255
+ "bbox": [
1256
+ 176,
1257
+ 135,
1258
+ 539,
1259
+ 151
1260
+ ],
1261
+ "page_idx": 11
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "As shown in Figure 5 with a toy example of synthetic data, we can effectively map data instance $x$ to its corresponding latent dense vector $z ^ { \\prime }$ with the help of the inverter via ${ \\mathcal { T } } _ { \\gamma } ( x )$ , and then reconstruct $x$ with the help of the generator via $\\mathcal { G } _ { \\boldsymbol { \\theta } } ( \\mathcal { T } _ { \\boldsymbol { \\gamma } } ( \\boldsymbol { x } ) )$ . For a naive classifier with the horizontal line as decision boundary, adversarial examples should be points above the line given input data $x$ in Figure 5c. By searching in corresponding latent space, our approach finds $x ^ { * }$ on the left as a natural adversary because it is the closest one in semantic space (along the curve trace) and it exists within the data manifold. However, the gradient-based approaches may find the $x ^ { * }$ right above $x$ as adversarial in input space regardless of the actual data distribution. ",
1266
+ "bbox": [
1267
+ 174,
1268
+ 165,
1269
+ 825,
1270
+ 277
1271
+ ],
1272
+ "page_idx": 11
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "B ALGORITHMS ",
1277
+ "text_level": 1,
1278
+ "bbox": [
1279
+ 176,
1280
+ 297,
1281
+ 325,
1282
+ 313
1283
+ ],
1284
+ "page_idx": 11
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Algorithm 1 shows the pseudocode of the iterative search of our framework. Starting from the corresponding $z$ of the input instance $x$ , we iteratively move the search range outward in latent space until we have generated samples that change the prediction of the classifier $f$ . We improve the efficiency with Algorithm 2 by using a coarse-to-fine strategy and combining recursive and iterative search. We first search for adversaries in a wide search range, and recursively tighten the upper bound of the search range with denser sampling in bisections. Extra iterative search steps are taken to further tighten the upper bound of the optimal $\\Delta z$ . This hybrid shrinking search approach, shown in detail in Algorithm 2, is four times faster to achieve similar adversaries as the iterative search. ",
1289
+ "bbox": [
1290
+ 173,
1291
+ 327,
1292
+ 825,
1293
+ 439
1294
+ ],
1295
+ "page_idx": 11
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "C ARCHITECTURE FOR CONTINUOUS IMAGES ",
1300
+ "text_level": 1,
1301
+ "bbox": [
1302
+ 174,
1303
+ 458,
1304
+ 571,
1305
+ 474
1306
+ ],
1307
+ "page_idx": 11
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Figure 3 shows the architecture of our framework for continuous images. We adopt WGAN (Arjovsky et al., 2017) with the objective function in Equation 1, and apply gradient penalty as proposed in Gulrajani et al. (2017). On top of the generator obtained from WGAN, we train an inverter by optimizing Equation 2. For handwritten digits from MNIST dataset, we train a WGAN of latent $ { z ^ { \\cdot } } \\in \\mathbb { R } ^ { 6 4 }$ , with a generator consisting of 3 transposed convolutional layers and ReLU activation, and a critic consisting of 3 convolutional layers with filter sizes (64, 128, 256) and strides (2, 2, 2). We include an inverter with 2 fully connected layers of dimensions (4096, 1024) on top of the critic’s last hidden layer. For “Church Outdoor” and “Tower” images from LSUN dataset, we follow similar procedures as in Gulrajani et al. (2017) training a WGAN of latent $z \\in \\mathbb { R } ^ { 1 2 8 }$ . The generator and critic are both residual networks. We use pre-activation residual blocks with two $3 \\times 3$ convolutional layers each and ReLU activation. The critic of 4 residual blocks performs downsampling using mean pooling after the second convolution, while the generator contains 4 residual blocks performing nearest-neighbor upsampling before the second convolution. We include an inverter with 3 fully connected layers of dimensions (8192, 2048, 512) on top of the critic’s last hidden layer. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 489,
1315
+ 825,
1316
+ 684
1317
+ ],
1318
+ "page_idx": 11
1319
+ },
1320
+ {
1321
+ "type": "image",
1322
+ "img_path": "images/d37ed3fdcf22f38faa49390a1becb9f26ab16da3786a9b33629deb293dd77940.jpg",
1323
+ "image_caption": [
1324
+ "Figure 5: Illustration with synthetic data. With training data that lies on a complex manifold (a), the inverter maps input to compact gaussian latent $z ^ { \\prime } = \\mathcal { T } _ { \\gamma } ( x )$ in (b), while the generator reconstructs the data via $\\mathcal { G } _ { \\boldsymbol { \\theta } } ( \\mathcal { T } _ { \\boldsymbol { \\gamma } } ( \\boldsymbol { x } ) )$ in (c). Given $f$ as a binary classifier with decision boundary as the horizontal line in (c), for an input $x$ , our approach returns $x ^ { * }$ on the left as natural adversary that lies on the manifold, while existing approaches may find $x ^ { * }$ on the right as the adversary, which is the nearest but impossible. "
1325
+ ],
1326
+ "image_footnote": [],
1327
+ "bbox": [
1328
+ 215,
1329
+ 704,
1330
+ 789,
1331
+ 825
1332
+ ],
1333
+ "page_idx": 11
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Algorithm 1 Iterative stochastic search in latent space for adversaries ",
1338
+ "bbox": [
1339
+ 173,
1340
+ 103,
1341
+ 630,
1342
+ 118
1343
+ ],
1344
+ "page_idx": 12
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Require: a target black-box classifier $f$ , an input instance $x$ , and a corpus of relevant data $X$ \n1: Hyper-parameters: $N$ : number of samples in each iteration, $\\Delta r$ : increment of search range \n2: Train a generator $\\mathcal { G } _ { \\theta }$ and an inverter $\\mathcal { T } _ { \\gamma }$ on $X$ \n3: $y f ( x )$ , $z ^ { \\prime } \\gets \\mathcal { T } _ { \\gamma } ( x )$ , radius $r \\gets 0$ \n4: loop $\\triangleright$ loop till we find an adversary \n5: $\\mathbf { \\boldsymbol { \\bar { S } } } \\emptyset$ \n6: for sample $N$ random noise vectors $\\epsilon$ of norms within $( r , r + \\Delta r ]$ do \n7: $\\tilde { z } z ^ { \\prime } + \\epsilon$ , $\\tilde { x } \\mathcal G _ { \\theta } ( \\tilde { z } ) , \\tilde { y } f ( \\tilde { x } )$ $\\triangleright$ perturbation, sample generation, prediction \n8: if $\\tilde { y } \\ne y$ then \n9: $S \\gets S \\cup \\langle \\tilde { x } , \\tilde { y } , \\tilde { z } \\rangle$ \n10: if $S = \\emptyset$ then $\\triangleright$ no adversary generated \n11: $r \\gets r + \\Delta r$ $\\triangleright$ move search range outward \n12: else $\\triangleright$ certain adversary generated \n13: $\\begin{array} { r } { \\mathbf { r e t u r n } \\left. x ^ { * } , y ^ { * } , z ^ { * } \\right. = \\operatorname * { a r g m i n } _ { \\langle \\check { x } , \\check { y } , \\check { z } \\rangle \\in S } \\| \\check { z } - z ^ { \\prime } \\| } \\end{array}$ $\\triangleright$ return the closest sample \nRequire: a target black-box classifier $f$ , an input instance $x$ , and a corpus of relevant data $X$ \n1: Hyper-parameters: $N$ : number of samples in each iteration, $\\Delta r$ : increment of search range, $B$ : \nlimit of iterations, $r$ : upper limit of search range \n2: Train a generator $\\mathcal { G } _ { \\theta }$ and an inverter $\\mathcal { T } _ { \\gamma }$ on $X$ \n3: $y f ( x )$ , $z ^ { \\prime } \\gets \\mathcal { T } _ { \\gamma } ( x )$ , $l \\gets 0 , i \\gets 0$ \n4: First, recursive search: \n5: while $r - l \\geq \\Delta r$ do \n6: $S \\gets \\emptyset$ \n7: for sample $N$ random noise vectors $\\epsilon$ of magnitude within $( l , r ]$ do \n8: z˜ ← z0 + \u000f, $\\tilde { x } \\mathcal G _ { \\theta } ( \\tilde { z } ) , \\tilde { y } f ( \\tilde { x } )$ \n9: if $\\tilde { y } \\ne y$ then \n10: $S \\gets S \\cup \\langle \\tilde { x } , \\tilde { y } , \\tilde { z } \\rangle$ \n11: if $S = \\emptyset$ then $\\triangleright$ no adversary generated \n12: $l \\gets ( l + r ) / 2$ $\\triangleright$ shrink search range by half \n13: else $\\triangleright$ certain adversary generated \n14: $\\begin{array} { r l } & { \\langle x ^ { * } , y ^ { * } , z ^ { * } \\rangle = \\mathrm { a r g m i n } _ { \\langle \\check { x } , \\check { y } , \\check { z } \\rangle \\in S } \\| \\check { z } - z ^ { \\prime } \\| } \\\\ & { l 0 , r \\| z ^ { * } - z ^ { \\prime } \\| } \\end{array}$ $\\triangleright$ store the closest sample \n15: $\\triangleright$ update upper bound of $\\Delta z$ \n16: Then, iterative search: \n17: while $i < B$ and $r > 0$ do \n18: $S \\gets \\emptyset , l \\gets \\operatorname* { m a x } ( 0 , r - \\Delta r )$ \n19: for sample $N$ random noise vectors $\\epsilon$ of norms within $( l , r ]$ do \n20: $\\tilde { z } \\gets z ^ { \\prime } + \\epsilon , \\tilde { x } \\gets \\mathcal G _ { \\theta } ( \\tilde { z } ) , \\tilde { y } \\gets f ( \\tilde { x } )$ \n21: if $\\tilde { y } \\ne y$ then \n22: $S \\gets S \\cup \\langle \\tilde { x } , \\tilde { y } , \\tilde { z } \\rangle$ \n23: if $S = \\emptyset$ then \n24: $i \\gets i + 1 , r \\gets r - \\Delta r$ $\\triangleright$ increase counter, continue searching \n25: else \n26: $\\begin{array} { r l } & { \\langle x ^ { * } , y ^ { * } , z ^ { * } \\rangle = \\mathrm { a r g m i n } _ { \\langle \\check { x } , \\check { y } , \\check { z } \\rangle \\in S } \\| \\check { z } - z ^ { \\prime } \\| } \\\\ & { i 0 , r \\| z ^ { * } - z ^ { \\prime } \\| } \\end{array}$ $\\triangleright$ store the closest sample \n27: $\\triangleright$ reset counter, update upper bound of $\\Delta z$ \n28: return $\\langle x ^ { * } , y ^ { * } , z ^ { * } \\rangle$ ",
1349
+ "bbox": [
1350
+ 178,
1351
+ 122,
1352
+ 826,
1353
+ 327
1354
+ ],
1355
+ "page_idx": 12
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "",
1360
+ "bbox": [
1361
+ 173,
1362
+ 368,
1363
+ 826,
1364
+ 803
1365
+ ],
1366
+ "page_idx": 12
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "D ARCHITECTURE FOR DISCRETE TEXT ",
1371
+ "text_level": 1,
1372
+ "bbox": [
1373
+ 174,
1374
+ 833,
1375
+ 524,
1376
+ 849
1377
+ ],
1378
+ "page_idx": 12
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "We use the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete text into continuous codes as shown in Figure 6. ARAE model encodes a sentence with an LSTM encoder into continuous code and performs adversarial training on the codes generated from noise and data to approximate the data distribution. We introduce an inverter that maps these continuous codes ",
1383
+ "bbox": [
1384
+ 174,
1385
+ 867,
1386
+ 825,
1387
+ 924
1388
+ ],
1389
+ "page_idx": 12
1390
+ },
1391
+ {
1392
+ "type": "equation",
1393
+ "img_path": "images/b225da031e8b914c3e393286a235c87a27aa8ad38d6262a61fd148f64e912018.jpg",
1394
+ "text": "$$\n\\begin{array}{c} \\begin{array} { r l } & { \\mathrm { , ~ } \\mathrm { ~ n o i s e ~ } \\tilde { z } [ \\mathrm { g e n e r a t o r ~ } \\mathcal { G } _ { \\theta } ] \\mathrm { ~ c o d e s ~ } \\tilde { c } [ \\operatorname* { d e c o d e r } \\mathcal { D } _ { \\psi } ] \\mathrm { ~ s a m p l e s ~ } \\tilde { x } } \\\\ & { \\mathrm { , ~ } } \\\\ & { \\mathrm { ~ } \\mathrm { ~ } \\mathrm { ~ p e r t u r b a t i o n s ~ } } \\\\ & { \\mathrm { ~ } \\cdot } \\\\ & { \\mathrm { ~ } \\mathrm { ~ l a t e n t ~ } z ^ { \\prime } [ \\mathrm { i n v e r t e r ~ } \\mathcal { Z } _ { \\gamma } ] \\mathrm { ~ c o d e ~ } c [ \\mathrm { e n c o d e r ~ } \\mathcal { E } _ { \\phi } ] \\mathrm { ~ d i s c r e t e ~ } x } \\end{array} \\sum _ { \\mathrm { ~ } \\alpha = \\nu \\mathrm { ~ r a t e r s a r y ~ } } ^ { \\mathrm { ~ n a t u r a l ~ } } \\end{array}\n$$",
1395
+ "text_format": "latex",
1396
+ "bbox": [
1397
+ 183,
1398
+ 98,
1399
+ 834,
1400
+ 188
1401
+ ],
1402
+ "page_idx": 13
1403
+ },
1404
+ {
1405
+ "type": "image",
1406
+ "img_path": "",
1407
+ "image_caption": [
1408
+ "Figure 6: Model Architecture for Text. Our model incorporates in the adversarially regularized autoencoder (ARAE) (Zhao et al., 2017) for encoding discrete $x$ into continuous code $c$ and decoding continuous $\\tilde { c }$ into discrete $\\tilde { x }$ when generating samples. "
1409
+ ],
1410
+ "image_footnote": [],
1411
+ "page_idx": 13
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "into the Gaussian space of $z \\in \\mathbb { R } ^ { 1 0 0 }$ . We use 4 layers of CNN with varying filter sizes (300, 500, 700, and 1000), strides (2, 2, 2) and context windows (5, 5, 3) for encoding text $x$ , into continuous space $c \\in \\mathbb { R } ^ { 3 0 0 }$ . For the decoder, we use a single-layer LSTM with hidden dimension of 300. We also train two MLPs, one each for the generator and the inverter, to learn mappings from noise to continuous codes and continuous codes to noise respectively. The loss functions for different components of the ARAE model, which are autoencoder reconstruction loss and WGAN loss functions for generator and critic, are described in Equations (4), (5), (6) respectively. We first train the ARAE components of encoder, decoder and generator using WGAN strategy, followed by the inverter on top of these with loss function in (7), by minimizing the Jensen-Shannon divergence between the inverted continuous codes and noise samples. ",
1416
+ "bbox": [
1417
+ 173,
1418
+ 273,
1419
+ 825,
1420
+ 415
1421
+ ],
1422
+ "page_idx": 13
1423
+ },
1424
+ {
1425
+ "type": "equation",
1426
+ "img_path": "images/cf246e13bd84e160b06e67afc0507fcfb4d409540e5de505fe932fbeb4a3563e.jpg",
1427
+ "text": "$$\n\\begin{array} { r l } & { \\displaystyle \\operatorname* { m i n } _ { \\phi , \\phi } \\mathcal { L } _ { \\mathcal { E } , \\mathcal { D } } ( \\phi , \\psi ) = \\operatorname* { m a x } _ { \\phi , \\psi } \\mathbb { E } _ { x } [ \\log p _ { \\psi } ( x | \\mathcal { E } _ { \\phi } ( x ) ) ] } \\\\ & { \\quad \\quad \\quad \\quad \\quad \\operatorname* { m i n } _ { \\omega } \\mathcal { L } _ { \\mathcal { C } } ( \\omega ) = \\operatorname* { m a x } _ { \\omega } \\mathbb { E } _ { x } [ \\mathcal { C } _ { \\omega } ( \\mathcal { E } _ { \\phi } ( x ) ) ] - \\mathbb { E } _ { z } [ \\mathcal { C } _ { \\omega } ( \\mathcal { G } _ { \\theta } ( z ) ) ] } \\\\ & { \\displaystyle \\operatorname* { m i n } _ { \\phi , \\theta } \\mathcal { L } _ { \\mathcal { E } , \\mathcal { G } } ( \\phi , \\theta ) = \\operatorname* { m i n } _ { \\phi , \\theta } \\mathbb { E } _ { x } [ \\mathcal { C } _ { \\omega } ( \\mathcal { E } _ { \\phi } ( x ) ) ] - \\mathbb { E } _ { z } [ \\mathcal { C } _ { \\omega } ( \\mathcal { G } _ { \\theta } ( z ) ) ] } \\\\ & { \\quad \\quad \\quad \\quad \\operatorname* { m i n } _ { \\gamma } \\mathcal { L } _ { \\mathcal { T } } ( \\gamma ) = \\operatorname* { m i n } _ { \\gamma } \\mathbb { E } _ { x } \\| \\mathcal { G } _ { \\theta } ( \\mathcal { I } _ { \\gamma } ( \\mathcal { E } _ { \\phi } ( x ) ) ) - \\mathcal { E } _ { \\phi } ( x ) \\| + \\mathbb { E } _ { z } [ \\mathbf { J } \\mathbf { S } \\mathbf { D } ( z , \\mathcal { L } _ { \\gamma } ( \\mathcal { G } _ { \\theta } ( z ) ) ) ] } \\end{array}\n$$",
1428
+ "text_format": "latex",
1429
+ "bbox": [
1430
+ 236,
1431
+ 429,
1432
+ 761,
1433
+ 532
1434
+ ],
1435
+ "page_idx": 13
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "We train our framework on the sentences up to length 10 from Stanford Natural Language Inference (SNLI) (Bowman et al., 2015) dataset, with hyper-parameters of $\\Delta r = 0 . 0 1$ and $N = 1 0 0$ . Table 9 shows some examples of the perturbations generated automatically by our approach, which are grammatical and semantically close to the original sentences. ",
1440
+ "bbox": [
1441
+ 173,
1442
+ 546,
1443
+ 826,
1444
+ 604
1445
+ ],
1446
+ "page_idx": 13
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "D.1 TEXTUAL ENTAILMENT EXAMPLES ",
1451
+ "text_level": 1,
1452
+ "bbox": [
1453
+ 176,
1454
+ 632,
1455
+ 464,
1456
+ 646
1457
+ ],
1458
+ "page_idx": 13
1459
+ },
1460
+ {
1461
+ "type": "text",
1462
+ "text": "We provide additional examples of generated adversarial hypotheses for sentences from the SNLI corpus in Table 10, which corresponds to the examples in the main text in Table 3. ",
1463
+ "bbox": [
1464
+ 173,
1465
+ 662,
1466
+ 823,
1467
+ 690
1468
+ ],
1469
+ "page_idx": 13
1470
+ },
1471
+ {
1472
+ "type": "text",
1473
+ "text": "D.2 MACHINE TRANSLATION EXAMPLES",
1474
+ "text_level": 1,
1475
+ "bbox": [
1476
+ 176,
1477
+ 719,
1478
+ 472,
1479
+ 734
1480
+ ],
1481
+ "page_idx": 13
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "We provide additional examples of the two probing functions in Table 11 and Table 12, corresponding to Table 4 and Table 5 in the main text, respectively. ",
1486
+ "bbox": [
1487
+ 173,
1488
+ 750,
1489
+ 823,
1490
+ 779
1491
+ ],
1492
+ "page_idx": 13
1493
+ },
1494
+ {
1495
+ "type": "table",
1496
+ "img_path": "images/20e7648ebbb7607e9d8fd5ba8a6abad464fa22a0ff92227e243a622f8529be1b.jpg",
1497
+ "table_caption": [
1498
+ "Table 9: Text perturbations. Examples are generated by perturbing the origins in semantic space. "
1499
+ ],
1500
+ "table_footnote": [],
1501
+ "table_body": "<table><tr><td>Original</td><td></td><td>Some dogs are running on a deserted beach.A man playing an electric guitar on stage.</td></tr><tr><td rowspan=\"5\">Perturbation</td><td>Some dogs are running on a grassy field.</td><td>A man is playing an electric guitar.</td></tr><tr><td>Some dogs are walking along a path.</td><td>A man is playing an acoustic guitar.</td></tr><tr><td>Some dogs are running down a hill.</td><td>A man is playing an accordion.</td></tr><tr><td>A dog is running on a grassy field.</td><td>A man is playing with an electronic device.</td></tr><tr><td>A dog is running down a trail.</td><td>A man is playing with an elephant.</td></tr></table>",
1502
+ "bbox": [
1503
+ 173,
1504
+ 829,
1505
+ 820,
1506
+ 921
1507
+ ],
1508
+ "page_idx": 13
1509
+ },
1510
+ {
1511
+ "type": "table",
1512
+ "img_path": "images/33a5bf1ee63a150cd359d649a99f2d5d6019c6fb095dcd2668d0de77bb32be3e.jpg",
1513
+ "table_caption": [
1514
+ "Table 10: Textual Entailment. For a pair of premise $\\left( \\mathbf { p } : \\right)$ and hypothesis $( \\mathbf { h } : )$ , we present the generated adversaries for three classifiers by perturbing the hypothesis $( \\mathbf { h } ^ { \\prime } : \\mathbf { \\epsilon } )$ . The last column provides the true label, followed by the changes in the prediction from each classifier. "
1515
+ ],
1516
+ "table_footnote": [],
1517
+ "table_body": "<table><tr><td>Classifiers</td><td>Sentences</td><td>Label</td></tr><tr><td>Original</td><td>p : The man walks among the large trees. h : The man is lost in the woods.</td><td>Neutral</td></tr><tr><td>Embedding</td><td>h&#x27;: The man is lost at the woods.</td><td>Contradiction →Neutral</td></tr><tr><td>LSTM</td><td>h&#x27; : The man is crying in the woods.</td><td>Neutral→Contradiction</td></tr><tr><td>TreeLSTM</td><td>h&#x27;:The man is lost ina bed.</td><td>Neutral → Contradiction</td></tr></table>",
1518
+ "bbox": [
1519
+ 235,
1520
+ 155,
1521
+ 758,
1522
+ 253
1523
+ ],
1524
+ "page_idx": 14
1525
+ },
1526
+ {
1527
+ "type": "table",
1528
+ "img_path": "images/7abcee71ae60877307b43068841c3f0c19346b1a086f762201c100b0f790734a.jpg",
1529
+ "table_caption": [
1530
+ "Table 11: Machine Translation. “Adversaries” that introduce the word “stehen” into the Google translation system by perturbing English sentences. "
1531
+ ],
1532
+ "table_footnote": [],
1533
+ "table_body": "<table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s :Asian women are sitting in a Restraunt.</td><td>Asiatische Frauen sitzen in einem Restaurant. s :Asian kids are standing in a Restraunt.Asiatische Kinder stehen in einem Restaurant.</td></tr><tr><td></td><td></td></tr><tr><td>s : People sitting on the floor.</td><td>Leute sitzen auf dem Boden.</td></tr><tr><td>s&#x27; : People standing on the field.</td><td>Leute,die auf dem Feld stehen.</td></tr></table>",
1534
+ "bbox": [
1535
+ 210,
1536
+ 323,
1537
+ 782,
1538
+ 410
1539
+ ],
1540
+ "page_idx": 14
1541
+ },
1542
+ {
1543
+ "type": "table",
1544
+ "img_path": "images/e32763f05b9d7e6d4408cf78d38fce1317ee750c93ed2ecf7787fa118d02d008.jpg",
1545
+ "table_caption": [
1546
+ "Table 12: “Adversaries” that find dropped verbs in English-To-German translation. The left column contains the original sentence $s$ and its adversary $s ^ { \\prime }$ . The right column contains the translations of $s$ and $s ^ { \\prime }$ , with English translation provided for legibility. "
1547
+ ],
1548
+ "table_footnote": [],
1549
+ "table_body": "<table><tr><td>Source Sentence (English)</td><td>Generated Translation (German)</td></tr><tr><td>s : A man looks back while laughing and walking. s : A man is laughing walking down the ground.</td><td>Ein Mann schaut beim Lachen und Gehen zurck. Ein Mann lacht auf dem Boden. (A man laughs on the floor.)</td></tr><tr><td>s : She is cooking food while wearing a dress. s&#x27; : She is cooking dressed for a wedding.</td><td>Sie kocht Essen, whrend sie ein Kleid trgt. Sie kocht fr eine Hochzeit. (She cooks for a wedding.)</td></tr></table>",
1550
+ "bbox": [
1551
+ 181,
1552
+ 492,
1553
+ 812,
1554
+ 604
1555
+ ],
1556
+ "page_idx": 14
1557
+ }
1558
+ ]
parse/train/H1BLjgZCb/H1BLjgZCb_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1BLjgZCb/H1BLjgZCb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/IDFQI9OY6K/IDFQI9OY6K.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/IDFQI9OY6K/IDFQI9OY6K_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/IDFQI9OY6K/IDFQI9OY6K_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/IDFQI9OY6K/IDFQI9OY6K_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/i80OPhOCVH2/i80OPhOCVH2.md ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ON THE BOTTLENECK OF GRAPH NEURAL NETWORKS AND ITS PRACTICAL IMPLICATIONS
2
+
3
+ Uri Alon & Eran Yahav
4
+ Technion, Israel
5
+ {urialon,yahave}@cs.technion.ac.il
6
+
7
+ # ABSTRACT
8
+
9
+ Since the proposal of the graph neural network (GNN) by Gori et al. (2005) and Scarselli et al. (2008), one of the major problems in training GNNs was their struggle to propagate information between distant nodes in the graph. We propose a new explanation for this problem: GNNs are susceptible to a bottleneck when aggregating messages across a long path. This bottleneck causes the over-squashing of exponentially growing information into fixed-size vectors. As a result, GNNs fail to propagate messages originating from distant nodes and perform poorly when the prediction task depends on long-range interaction. In this paper, we highlight the inherent problem of over-squashing in GNNs: we demonstrate that the bottleneck hinders popular GNNs from fitting long-range signals in the training data; we further show that GNNs that absorb incoming edges equally, such as GCN and GIN, are more susceptible to over-squashing than GAT and GGNN; finally, we show that prior work, which extensively tuned GNN models of long-range problems, suffer from over-squashing, and that breaking the bottleneck improves their state-of-the-art results without any tuning or additional weights. Our code is available at https://github.com/tech-srl/bottleneck/ .
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Graph neural networks (GNNs) (Gori et al., 2005; Scarselli et al., 2008; Micheli, 2009) have seen sharply growing popularity over the last few years (Duvenaud et al., 2015; Hamilton et al., 2017; Xu et al., 2019). GNNs provide a general framework to model complex structural data containing elements (nodes) with relationships (edges) between them. A variety of real-world domains such as social networks, computer programs, chemical and biological systems can be naturally represented as graphs. Thus, many graph-structured domains are commonly modeled using GNNs.
14
+
15
+ A GNN layer can be viewed as a message-passing step (Gilmer et al., 2017), where each node updates its state by aggregating messages flowing from its direct neighbors. GNN variants (Li et al., 2016; Velickovi ˇ c et al., 2018; Kipf and Welling, 2017) mostly differ in how each node aggregates the ´ representations of its neighbors with its own representation. However, most problems also require the interaction between nodes that are not directly connected, and they achieve this by stacking multiple GNN layers. Different learning problems require different ranges of interaction between nodes in the graph to be solved. We call this required range of interaction between nodes – the problem radius.
16
+
17
+ In practice, GNNs were observed not to benefit from more than few layers. The accepted explanation for this phenomenon is over-smoothing: node representations become indistinguishable when the number of layers increases (Wu et al., 2020). Nonetheless, over-smoothing was mostly demonstrated in short-range tasks (Li et al., 2018; Klicpera et al., 2018; Chen et al., 2020a; Oono and Suzuki, 2020; Zhao and Akoglu, 2020; Rong et al., 2020; Chen et al., 2020b) – tasks that have small problem radii, where a node’s correct prediction mostly depends on its local neighborhood. Such tasks include paper subject classification (Sen et al., 2008) and product category classification (Shchur et al., 2018). Since the learning problems depend mostly on short-range information in these datasets, it makes sense why more layers than the problem radius might be extraneous. In contrast, in tasks that also depend on long-range information (and thus have larger problem radii), we hypothesize that the explanation for limited performance is over-squashing. We further discuss the differences between over-squashing and over-smoothing in Section 6.
18
+
19
+ ![](images/8407bf079c7c5171bd2ed7821254a824983cb2959bb1186fbf6ece862d24d3c3.jpg)
20
+ Figure 1: The bottleneck that existed in RNN seq2seq models (before attention) is strictly more harmful in GNNs: information from a node’s exponentially-growing receptive field is compressed into a fixed-size vector. Black arrows are graph edges; red curved arrows illustrate information flow.
21
+
22
+ To allow a node to receive information from other nodes at a radius of $K$ , the GNN needs to have at least $K$ layers, or otherwise, it will suffer from under-reaching – these distant nodes will simply not be aware of each other. Clearly, to avoid under-reaching, problems that depend on long-range interaction require as many GNN layers as the range of the interaction. However, as the number of layers increases, the number of nodes in each node’s receptive field grows exponentially. This causes over-squashing: information from the exponentially-growing receptive field is compressed into fixed-length node vectors. Consequently, the graph fails to propagate messages flowing from distant nodes, and learns only short-range signals from the training data.
23
+
24
+ In fact, the GNN bottleneck is analogous to the bottleneck of sequential RNN models. Traditional seq2seq models (Sutskever et al., 2014; Cho et al., 2014a;b) suffered from a bottleneck at every decoder state – the model had to encapsulate the entire input sequence into a fixed-size vector. In RNNs, the receptive field of a node grows linearly with the number of recursive applications. However in GNNs, the bottleneck is asymptotically more harmful, because the receptive field of a node grows exponentially. This difference is illustrated in Figure 1.
25
+
26
+ This work does not aim to propose a new GNN variant. Rather, our main contribution is introducing the over-squashing phenomenon – a novel explanation for the major and well-known issue of training GNNs for long-range problems, and showing its harmful practical implications. We use a controlled problem to demonstrate how over-squashing prevents GNNs from fitting long-range patterns in the data, and to provide theoretical lower bounds for the required hidden size given the problem radius (Section 5). We show, analytically and empirically, that GCN (Kipf and Welling, 2017) and GIN (Xu et al., 2019) are susceptible to over-squashing more than other types of GNNs such as GAT (Velickovi ˇ c et al., 2018) and GGNN (Li et al., 2016). We further show that prior work that extensively ´ tuned GNNs to real-world datasets suffer from over-squashing: breaking the bottleneck using a simple fully adjacent layer reduces the error rate by $42 \%$ in the QM9 dataset, by $12 \%$ in ENZYMES, by $4 . 8 \%$ in NCI1, and improves accuracy in VARMISUSE, without any additional tuning.
27
+
28
+ # 2 PRELIMINARIES
29
+
30
+ A directed graph $\mathcal { G } = ( \nu , \mathcal { E } )$ contains nodes $\nu$ and edges $\mathcal { E }$ , where $( u , v ) \in \mathcal { E }$ denotes an edge from a node $u$ to a node $v$ . For brevity, in the following definitions we treat all edges as having the same type; in general, every edge can have a type and features (Schlichtkrull et al., 2018).
31
+
32
+ Graph neural networks Graph neural networks operate by propagating neural messages between neighboring nodes. At every propagation step (a graph layer): the network computes each node’s sent message; every node aggregates its received messages; and each node updates its representation by combining the aggregated incoming messages with its own previous representation.
33
+
34
+ Formally, each node is associated with an initial representation $\mathbf { h } _ { v } ^ { ( 0 ) } \in \mathcal { R } ^ { d _ { 0 } }$ . This representation is usually derived from the node’s label or its given features. Then, a GNN layer updates each node’s representation given its neighbors, yielding $\mathbf { h } _ { v } ^ { ( 1 ) } \in \mathcal { R } ^ { d }$ . In general, the $k$ -th layer of a GNN is a parametric function $f _ { k }$ that is applied to each node by considering its neighbors:
35
+
36
+ ![](images/9e6301e40ec83ebbb2857dd270e87de35b9baea6b4b06af69d18e8c42e7cfa21.jpg)
37
+ Figure 2: The NEIGHBORSMATCH: green nodes $\textcircled{4}$ , $\textcircled{8}$ , $\textcircled{ C} )$ have blue neighbors $\textcircled{)}$ and an alphabetical label. The goal is to predict the label (A, B, or C) of the green node that has the same number of blue neighbors as the target node $\textcircled{2}$ in the same graph. In this example, the correct label is $\mathbf { C }$ , because the target node has two blue neighbors, like the node marked with $\textrm { C }$ in the same graph.
38
+
39
+ $$
40
+ \mathbf h _ { v } ^ { ( k ) } = f _ { k } \left( \mathbf h _ { v } ^ { ( k - 1 ) } , \{ \mathbf h _ { u } ^ { ( k - 1 ) } \ | \ u \in \mathcal N _ { v } \} ; \theta _ { k } \right)
41
+ $$
42
+
43
+ where $\mathcal { N } _ { v }$ is the set of nodes that have edges to $v$ : $\mathcal { N } _ { v } = \{ u \in \mathcal { V } | ( u , v ) \in \mathcal { E } \}$ . The total number of layers $K$ is usually determined empirically as a hyperparameter.
44
+
45
+ The design of the function $f$ is what mostly distinguishes one type of GNN from the other. For example, graph convolutional networks (GCN) define $f$ as:
46
+
47
+ $$
48
+ \mathbf { h } _ { v } ^ { ( k ) } = \sigma \left( \sum _ { u \in \mathcal { N } _ { v } \cup \{ v \} } \frac { 1 } { c _ { u , v } } W ^ { ( k ) } \mathbf { h } _ { u } ^ { ( k - 1 ) } \right)
49
+ $$
50
+
51
+ where $\sigma$ is a nonlinearity such as $R e L U$ , and $c _ { u , v }$ is a normalization factor often set to $\sqrt { \left| \mathcal { N } _ { v } \right| \cdot \left| \mathcal { N } _ { u } \right| }$ or $| \mathcal { N } _ { v } |$ (Hamilton et al., 2017). As another example, graph isomorphism networks (GIN) (Xu et al., 2019) update a node’s representation using the following definition:
52
+
53
+ $$
54
+ \mathbf { h } _ { v } ^ { ( k ) } = M L P ^ { ( k ) } \left( \left( 1 + \epsilon ^ { ( k ) } \right) \mathbf { h } _ { v } ^ { ( k - 1 ) } + \sum _ { u \in \mathcal { N } _ { v } } \mathbf { h } _ { u } ^ { ( k - 1 ) } \right)
55
+ $$
56
+
57
+ Usually, the last ( $K$ -th) layer’s output is used for prediction: in node-prediction, $\mathbf { h } _ { v } ^ { ( K ) }$ is used to predict a label for $v$ ; in graph-prediction, a permutation-invariant “readout” function aggregates the nodes of the final layer using summation, averaging, or a weighted sum (Li et al., 2016).
58
+
59
+ # 3 THE GNN BOTTLENECK
60
+
61
+ Given a graph $\mathcal { G } = ( \nu , \mathcal { E } )$ and a given node $v$ , we denote the problem’s required range of interaction, the problem radius, by $r , \ r$ is generally unknown in advance, and usually approximated empirically by tuning the number of layers $K$ . We denote the set of nodes in the receptive field of $v$ by $\mathcal { N } _ { v } ^ { \breve { K } }$ , which is defined recursively as $\mathcal { N } _ { v } ^ { 1 } : = \mathcal { N } _ { v }$ and $\mathcal { N } _ { v } ^ { K } : = \mathcal { N } _ { v } ^ { K - 1 } \cup \{ w \mid ( w , u ) \in \mathcal { E } \wedge u \in \mathcal { N } _ { v } ^ { K ^ { - 1 } } \}$ .
62
+
63
+ When a prediction problem relies on long-range interaction between nodes, the GNN must have as many layers $K$ as the estimated range of these interactions, or otherwise, these distant nodes would not be able to interact. It is thus required that $K \geq r$ . However, the number of nodes in each node’s receptive field grows exponentially with the number of layers: $\left| \mathcal { N } _ { v } ^ { K } \right| = \mathcal { O } \left( \exp \left( K \right) \right)$ (Chen et al., 2018). As a result, an exponentially-growing amount of information is squashed into a fixed-length vector (the vector resulting from the $\bar { \sum }$ in Equations (2) and (3)), and crucial messages fail to reach their distant destinations. Instead, the model learns only short-ranged signals from the training data and consequently might generalize poorly at test time.
64
+
65
+ Example Consider the NEIGHBORSMATCH problem of Figure 2. Green nodes $( \textcircled { \textbf { A } } , \textcircled { \textbf { B } } , \textcircled { \textbf { C } } )$ have a varying number of blue neighbors $\textcircled{)}$ and an alphabetical label. Each example in the dataset is a different graph that has a different mapping from numbers of neighbors to labels. The rest of the graph (marked as ) represents a general, unknown, graph structure. The goal is to predict a label for the target node, which is marked with a question mark $\textcircled{2}$ , according to its number of blue neighbors. The correct answer is C in this case, because the target node has two blue neighbors, like the node marked with C in the same graph. Every example in the dataset has a different mapping from numbers of neighbors to labels, and thus message propagation and matching between the target node and all the green nodes must be performed for every graph in the dataset.
66
+
67
+ Since the model must propagate information from all green nodes before predicting the label, a bottleneck at the target node is inevitable. This bottleneck causes over-squashing, which can prevent the model from fitting the training data perfectly. We demonstrate the bottleneck empirically in this problem in Section 4; in Section 5, we provide theoretical lower bounds for the GNN’s hidden size. Obviously, adding direct edges between the target node and the green nodes, or making the existing edges bidirectional, could ease information flow for this specific problem. However, in real-life domains (e.g., molecules), we do not know the optimal message propagation structure a priori, and must use the given relations (such as bonds between atoms) as the graph’s edges.
68
+
69
+ Although this is a contrived problem, it resembles real-world problems that are often modeled as graphs. For example, a computer program in a language such as Python may declare multiple variables (i.e., the green nodes in Figure 2) along with their types and values (their numbers of blue neighbors in Figure 2); later in the program, predicting which variable should be used in a specific location (predict the alphabetical label in Figure 2) must use one of the variables that are available in scope based on the required type and the required value at that point. We experiment with this VARMISUSE problem in Section 4.4.
70
+
71
+ Short- vs. long-range problems Much of prior GNN work has focused on problems that were local in nature, with small problem radii, where the underlying inductive bias was that a node’s most relevant context is its local neighborhood, and long-range interaction was not necessarily needed. With the growing popularity of GNNs, their adoption expanded to domains that required longer-range information propagation as well, without addressing the inherent bottleneck. In this paper, we focus on problems that require long-range information. That is, a correct prediction requires considering the local environment of a node and interactions beyond the close neighborhood. For example, a chemical property of a molecule (Ramakrishnan et al., 2014; Gilmer et al., 2017) can depend on the combination of atoms that reside in the molecule’s opposite sides. Problems of this kind require long-range interaction, and thus, a large number of GNN layers. Since the receptive field of each node grows exponentially with the number of layers, the more layers – over-squashing is more harmful.
72
+
73
+ In problems that are local in nature (small $r$ ) – the bottleneck is less troublesome, because a GNN can perform well with only few layers (e.g., $K { = } 2$ layers in Kipf and Welling (2017)), and the receptive field of a node can be exponentially smaller. Domains such as citation networks (Sen et al., 2008), social networks (Leskovec and Mcauley, 2012), and product recommendations (Shchur et al., 2018) usually raise short-range problems and are thus not the focus of this paper. So, how long is long-range? We discuss and analyze this question in Section 5.
74
+
75
+ # 4 EVALUATION
76
+
77
+ First, we wish to empirically show that the GNN bottleneck exists, and find the smallest values of $r$ that raise over-squashing. We generated a synthetic benchmark that is theoretically solvable; however, in practice, all GNNs fail to reach $100 \%$ training accuracy because of the bottleneck (Section 4.1). Second, we examine whether the bottleneck exists in prior work, which addressed real-world problems (Sections 4.2 to 4.4).
78
+
79
+ # 4.1 SYNTHETIC BENCHMARK: NEIGHBORSMATCH
80
+
81
+ The NEIGHBORSMATCH problem (Figure 2) is a contrived problem that we designed to provide an intuition to the extent of the effect of over-squashing, while allowing us to control the problem radius $r$ , and thus control the intensity of over-squashing. We focus on the training accuracy of a model, to show that over-squashing prevents models from fitting long-range signals in the training set.
82
+
83
+ TREE-NEIGHBORSMATCH From the perspective of a single node $v$ , the rest of the graph may look like a tree of height $K$ , rooted at $v$ ( $\mathrm { { X u } }$ et al., 2018; Garg et al., 2020). To simulate this exponentially-growing receptive field, we created an instance of the general NEIGHBORSMATCH problem that we described in Section 3 and portrayed in Figure 2. We instantiated the subgraph in the middle of the graph (marked as $\textcircled{8}$ in Figure 2) as a binary tree of depth depth where the green nodes are its leaves, and the target node is the tree’s root. All edges are directed toward the root, such that information is propagated from all nodes toward the target node. The goal, as in Section 3, is to predict a label for the target node, where the correct answer is the label of the green node that has the same number of blue neighbors as the target node. An illustration is shown in Figure 5 in the appendix. This allows us to control the problem radius, i.e., $\begin{array} { r } { r = d e p t h { } } \end{array}$ . In this section we observe the bottleneck empirically; in Section 5 we provide a lower bound for the GNN’s hidden size given $r$
84
+
85
+ Model We implemented a network with $r { \mathrm { + } } 1$ graph layers to allow an additional nonlinearity after the information from the leaves reaches the target node. Our PyTorch Geometric (Fey and Lenssen, 2019) implementation is available at https://github.com/tech-srl/bottleneck/. Our training configuration and hyperparameter ranges are detailed in Appendix A.
86
+
87
+ Results Figure 3 shows the following surprising results: some GNNs fail to fit the dataset starting from $r { = } 4$ . For example, the training accuracy of GCN (Kipf and Welling, 2017) at $r { = } 4$ is $70 \%$ . At $r { = } 5$ , all GNNs fail to perfectly fit the data. Starting from $r { = } 4$ , the models suffered from oversquashing that resulted in underfitting: the bottleneck prevented the models from distinguishing between different training examples, even after they were observed tens of thousands of times. These results clearly show the existence of over-squashing, starting from $r { = } 4$ .
88
+
89
+ ![](images/a9eb670cf23b5285f37ad7a8dd40f7843778c7fe3847a7a76d62059a2fd31c64.jpg)
90
+ Figure 3: Accuracy across problem radius (tree depth) in the NEIGHBORSMATCH problem. Over-squashing starts to affect GCN and GIN even at $r = 4$ .
91
+
92
+ Why did some GNNs perform better than others? GCN and GIN managed to perfectly fit $r { = } 3$ at most, while GGNN and GAT also reached $100 \%$ accuracy at $r { = } 4$ . This difference can be explained by their neighbor aggregation computation: consider the target node that receives messages in the $r ^ { \mathrm { : } }$ ’th step. GCN and GIN aggregate all neighbors before combining them with the target node’s representation; they thus must compress the information flowing from all leaves into a single vector, and only afterward interact with the target node’s own representation (Equations (2) and (3)). In contrast, GAT uses attention to weight incoming messages given the target’s representation: at the last layer only, the target node can ignore the irrelevant incoming edge, and absorb only the relevant incoming edge, which contains information flowing from half of the leaves. That is, a single vector compresses only half of the information. Since the number of leaves grows exponentially with $r$ , it is expected that GNNs that need to compress only half of the information (GGNN and GAT) will succeed at an $r$ that is larger by 1. Following Levy et al. (2018), we hypothesize that the GRU cell in GGNNs filters incoming edges as GAT, but perform this filtering as element-wise attention.
93
+
94
+ If all GNNs have reached low training accuracy, how do GNN-based models usually do fit the training data in public datasets of long-range problems? We hypothesize that they overfit shortrange signals and artifacts from the training set, rather than learning the long-range information that was squashed in the bottleneck, and thus generalize poorly at test time.
95
+
96
+ # 4.2 QUANTUM CHEMISTRY: QM9
97
+
98
+ We wish to measure over-squashing in existing models. But, how can we measure over-squashing? Instead, we measure whether breaking the bottleneck improves the results of long-range problems.
99
+
100
+ Adding a fully-adjacent layer (FA) In Sections 4.2 to 4.4, we took extensively tuned models from previous work, and modified adjacency in the last layer: given a GNN with $K$ layers, we modified the $K$ -th layer to be a fully-adjacent layer (FA). A fully-adjacent layer is a GNN layer in which every pair of nodes is connected by an edge. In terms of Equations (1) to (3), converting an existing layer to be fully-adjacent means that $\mathcal { N } _ { v } : = \mathcal { V }$ for every node $v \in \mathcal V$ , in that layer only. This does not change the type of layer nor add weights, but only changes adjacency of a data sample in a single layer. Thus, the $K - 1$ graph layers exploit the graph structure using their original sparse topology, and only the
101
+
102
+ Table 1: Average error rates (5 runs $\pm$ stdev for each property) on the QM9 dataset. The best result for every property in every GNN type is highlighted in bold. Results marked with $\dagger$ were previously reported by Brockschmidt (2020) and reproduced by us.
103
+
104
+ <table><tr><td rowspan="2">Property</td><td colspan="2">R-GIN</td><td colspan="2">R-GAT</td><td colspan="2">GGNN</td></tr><tr><td>baset</td><td>+FA</td><td>baset</td><td>+FA</td><td>baset</td><td>+FA</td></tr><tr><td>mu</td><td>2.64±0.11</td><td>2.54±0.09</td><td>2.68±0.06</td><td>2.73±0.07</td><td>3.85±0.16</td><td>3.53±0.13</td></tr><tr><td>alpha</td><td>4.67±0.52</td><td>2.28±0.04</td><td>4.65±0.44</td><td>2.32±0.16</td><td>5.22±0.86</td><td>2.72±0.12</td></tr><tr><td>HOMO</td><td>1.42±0.01</td><td>1.26±0.02</td><td>1.48±0.03</td><td>1.43±0.02</td><td>1.67±0.07</td><td>1.45±0.04</td></tr><tr><td>LUMO</td><td>1.50±0.09</td><td>1.34±0.04</td><td>1.53±0.07</td><td>1.41±0.03</td><td>1.74±0.06</td><td>1.63±0.06</td></tr><tr><td>gap</td><td>2.27±0.09</td><td>1.96±0.04</td><td>2.31±0.06</td><td>2.08±0.05</td><td>2.60±0.06</td><td>2.30±0.05</td></tr><tr><td>R2</td><td>15.63±1.40</td><td>12.61±0.37</td><td>52.39 ±42.5</td><td>15.76±1.17</td><td>35.94±35.7</td><td>14.33±0.47</td></tr><tr><td>ZPVE</td><td>12.93±1.81</td><td>5.03±0.36</td><td>14.87±2.88</td><td>5.98±0.43</td><td>17.84±3.61</td><td>5.24±0.30</td></tr><tr><td>UO</td><td>5.88±1.01</td><td>2.21±0.12</td><td>7.61±0.46</td><td>2.19±0.25</td><td>8.65±2.46</td><td>3.35±1.68</td></tr><tr><td>U</td><td>18.71±23.36</td><td>2.32±0.18</td><td>6.86±0.53</td><td>2.11±0.10</td><td>9.24±2.26</td><td>2.49±0.34</td></tr><tr><td>H</td><td>5.62±0.81</td><td>2.26±0.19</td><td>7.64±0.92</td><td>2.27±0.29</td><td>9.35±0.96</td><td>2.31±0.15</td></tr><tr><td>G</td><td>5.38±0.75</td><td>2.04±0.24</td><td>6.54±0.36</td><td>2.07±0.07</td><td>7.14±1.15</td><td>2.17±0.29</td></tr><tr><td>Cv</td><td>3.53±0.37</td><td>1.86±0.03</td><td>4.11±0.27</td><td>2.03±0.14</td><td>8.86±9.07</td><td>2.25±0.20</td></tr><tr><td>Omega</td><td>1.05±0.11</td><td>0.80±0.04</td><td>1.48±0.87</td><td>0.73±0.04</td><td>1.57±0.53</td><td>0.87±0.09</td></tr><tr><td>Relative:</td><td></td><td>-39.54%</td><td></td><td>-44.58%</td><td></td><td>-47.42%</td></tr></table>
105
+
106
+ $K$ -th layer is an FA layer that allows the topology-aware node-representations to interact directly and consider nodes beyond their original neighbors. Hopefully, this would ease information flow, prevent over-squashing, and reduce the effect of the previously-existed bottleneck. We re-trained the models using the authors’ original code, without performing any additional tuning, to rule out hyperparameter tuning as the source of improvement. Statistics of all datasets can be found in Appendix D.
107
+
108
+ We note that an FA layer is a simple solution. Its purpose is merely to demonstrate that over-squashing in GNNs is so prevalent and untreated that even the simplest solution helps. Our main contribution is not the solution, but rather, highlighting and explaining the over-squashing problem. This simple solution opens the path for a variety of follow-up improvements and solutions for over-squashing.
109
+
110
+ Data The QM9 dataset (Ramakrishnan et al., 2014; Gilmer et al., 2017; Wu et al., 2018) contains \~130,000 graphs with ${ \sim } 1 8$ nodes. Each graph is a molecule where nodes are atoms, and undirected, typed edges are different types of bonds between the atoms. The goal is to regress each graph to 13 real-valued quantum chemical properties such as dipole moment and isotropic polarizability.
111
+
112
+ Models We modified the implementation of Brockschmidt (2020) who performed an extensive hyperparameter tuning for multiple GNNs, by searching over 500 configurations; we took the same splits and their best-found configurations. For most GNNs, Brockschmidt found that the best results are achieved using $K { = } 8$ layers. This hints that this problem depends on long-range information and relies on both graph structure and distant nodes. We re-trained each modified model for each target property using the same code, configuration, and training scheme as Brockschmidt (2020), training each model five times (using different random seeds) for each target property task. We compare the “base” models, reported by Brockschmidt, with our modified and re-trained $ { \mathrm { \^ 6 + F A } } ^ { { \gamma } }$ models.
113
+
114
+ Results Results for the top GNNs are shown in Table 1. The main results are that breaking the bottleneck by modifying a single layer to be an FA layer significantly reduces the error rate, by $42 \%$ on average, across six GNN types. These experiments clearly show evidence for a bottleneck in the original GNN models. Results for the other GNNs are shown in Appendix B due to space limitation.
115
+
116
+ Over-squashing or under-reaching? Barceló et al. (2020) discuss the inability of a GNN node to observe nodes that are farther away than the number of layers $K$ . We denote this limitation as underreaching: for every fixed number of layers $K$ , local information cannot travel farther than distance $K$ along edges. So, was the improvement of the FA layer in Table 1 achieved thanks to the reduction in over-squashing, or did the FA layer only extend the nodes’ reachability and prevent under-reaching? To answer this, we measured the graphs’ diameter in the QM9 dataset – the maximum shortest path between any two nodes in a graph. We found that the average diameter is $6 . 3 5 { \pm } 0 . 9 1 $ , the maximum diameter is 10, and the 90’th percentile is 8, while most models were trained with $K { = } 8$ layers. That is, at least $90 \%$ of the examples in the dataset certainly did not suffer from under-reaching, because the number of layers was greater or equal than their diameter. We trained another set of models with 10 layers, which did not show an improvement over the base models. We conclude that the source of improvement was clearly not the increased reachability, but instead, the reduction in over-squashing.
117
+
118
+ Table 2: Average accuracy (30 runs $\pm$ stdev) on the biological datasets. $\dagger -$ previously reported by Errica et al. (2020).
119
+
120
+ <table><tr><td colspan="2"></td><td>NCI1</td><td>ENZYMES</td></tr><tr><td>No Struct</td><td></td><td>69.8±2.2</td><td>65.2±6.4</td></tr><tr><td>DiffPool</td><td>baset +FA</td><td>76.9±1.9 77.6±1.3</td><td>59.5±5.6 65.7±4.8</td></tr><tr><td>GraphSAGE</td><td>baset +FA</td><td>76.0±1.8 77.7±1.8</td><td>58.2±6.0 60.8±4.5</td></tr><tr><td>DGCNN</td><td>base† +FA</td><td>76.4±1.7 76.8±1.5</td><td>38.9±5.7 42.8±5.3</td></tr><tr><td>GIN</td><td>baset +FA</td><td>80.0±1.4 81.5±1.2</td><td>59.6±4.5 67.7±5.3</td></tr></table>
121
+
122
+ Table 3: Average accuracy (5 runs±stdev) on VARMISUSE. † – previously reported by Brockschmidt (2020).
123
+
124
+ <table><tr><td colspan="3">SeenProj</td><td>UnseenProj</td></tr><tr><td rowspan="2">+ GGNN</td><td>baset</td><td>85.7±0.5</td><td>79.3±1.2</td></tr><tr><td>+FA</td><td>86.3±0.7</td><td>79.1±1.1</td></tr><tr><td rowspan="2">R-GCN</td><td>baset</td><td>88.3±0.4</td><td>82.9±0.8</td></tr><tr><td>+FA</td><td>88.4±0.7</td><td>83.8±1.0</td></tr><tr><td rowspan="2">R-GIN</td><td>baset</td><td>87.1±0.1</td><td>81.1±0.9</td></tr><tr><td>+FA</td><td>87.5±0.7</td><td>81.7±1.2</td></tr><tr><td rowspan="2">GNN-MLP</td><td>baset</td><td>86.9±0.3</td><td>81.4±0.7</td></tr><tr><td>+FA</td><td>87.3±0.2</td><td>81.2±0.5</td></tr><tr><td rowspan="2">R-GAT</td><td>baset</td><td>86.9±0.7</td><td>81.2±0.9</td></tr><tr><td>+FA</td><td>87.9±1.0</td><td>82.0±1.9</td></tr></table>
125
+
126
+ Can larger hidden sizes achieve a similar improvement? We trained another set of models with doubled dimensions. These models achieved only $5 . 5 \%$ improvement over the base model (Appendix B.2), while adding the FA layer achieved $42 \%$ improvement using the original dimensions and without adding weights. Consistently, in Section 5 we present an analysis that shows how dimensionality increase is ineffective in preventing over-squashing.
127
+
128
+ Is the entire FA layer needed? We experimented with using only a sampled fraction of edges in the FA layer. As Appendix B.3 shows, the fraction of added edges in the last layer correlates with the decrease in error. For example, using only half of the possible edges in the last layer (a “semi-adjacent” layer) still reduces the error rate by $3 1 . 5 \%$ on average compared to “base”.
129
+
130
+ If all GNNs benefitted from direct interaction between all nodes, maybe the graph structure is not even needed? We trained another set of models (Appendix B.2) where all $K$ layers are FA layers, thus ignoring the original graph topology; these models produced $1 5 0 0 \%$ higher (worse) error.
131
+
132
+ # 4.3 BIOLOGICAL BENCHMARKS
133
+
134
+ Data The NCI1 dataset (Wale et al., 2008) contains 4110 graphs with ${ \sim } 3 0 $ nodes on average, and its task is to predict whether a biochemical compound contains anti-lung-cancer activity. ENZYMES (Borgwardt et al., 2005) contains 600 graphs with ${ \sim } 3 6$ nodes on average, and its task is to classify an enzyme to one out of six classes. We used the same 10-folds and split as Errica et al. (2020).
135
+
136
+ Models We used the implementation of Errica et al. (2020) who performed a fair and thorough comparison between GNNs. The final reported result is the average of 30 test runs (10 folds $\times 3$ random seeds). Additional training details are provided in Appendix C.
137
+
138
+ In ENZYMES, Errica et al. found that a baseline that does not use the graph topology at all (“No Struct”) performs better than all GNNs. In NCI1, GIN performed best. We converted the last layer into an FA layer by modifying the implementation of Errica et al., and repeated the same training procedure. We compare the “base” models from Errica et al. with our re-trained $\cdot _ { \mathrm { + F A } } ,$ models.
139
+
140
+ Results Results are shown in Table 2. The main results are as follows: (a) in NCI1, $\mathrm { G I N + F A }$ improves by $1 . 5 \%$ over GIN-base, which was previously the best performing model; (b) in ENZYMES, where Errica et al. (2020) found that none of the GNNs exploit the topology of the graph, we find that $\mathrm { G I N + F A }$ does exploit the structure and improves by $8 . 1 \%$ over GIN-base and by $2 . 5 \%$ over No Struct.
141
+
142
+ On average, models with FA layers relatively reduce the error rate by $12 \%$ in ENZYMES and by $4 . 8 \%$ in NCI1. These experiments clearly show evidence for a bottleneck in the original GNN models.
143
+
144
+ # 4.4 PROGRAMS: VARMISUSE
145
+
146
+ Data VARMISUSE (Allamanis et al., 2018) is a node-prediction problem that depends on long-range information in computer programs. We used the same splits as Allamanis et al. (2018).
147
+
148
+ Models We use the implementation of Brockschmidt (2020) who performed an extensive hyperparameter tuning by searching over 30 configurations for each GNN type. The best results were found using 6-10 layers, which hints that this problem requires long-range information. We modified the last layer to be an FA layer, and used the resulting representations for node classification. We used the same best found configurations as Brockschmidt (2020) add re-trained each model five times.
149
+
150
+ Results Results are shown in Table 3. The main result is that adding an FA layer to all GNNs improves their SeenProjTest accuracy, obtaining a new state-of-the-art of $8 8 . 4 \%$ . In the UnseenProjTest set, adding an an FA layer improves the results of some of most of the GNNs, obtaining a new stateof-the-art of $8 3 . 8 \%$ . These improvements are significant, especially since they were achieved on extensively tuned models, without any further tuning by us.
151
+
152
+ # 5 HOW LONG IS LONG-RANGE?
153
+
154
+ In this section, we analyze oversquashing combinatorially in the TREE-NEIGHBORSMATCH problem. We provide a combinatorial lower bound for the minimal hidden size that a GNN requires to perfectly fit the data (learn to $100 \%$ training accuracy) given its problem radius $r$ . We denote the arity of such a tree by $m$ ${ \bf \omega } ( = 2$ in our experiments); the counting base as $b { = } 2$ ; the number of bits in a floating-point variable as $f { = } 3 2$ ; and the hidden dimension of the GNN, i.e., the size of a node vector $\mathbf { h } _ { v } ^ { ( k ) }$ , as $d$ .
155
+
156
+ ![](images/a42cde334485d3ed02ad70fec04a3372e9c145897723a7f2bcd7fe12b437624a.jpg)
157
+ Figure 4: Combinatorial and empirical lower bounds of the model dimension given the problem radius.
158
+
159
+ A full tree of arity $m$ and problem radius $r { = }$ depth has $m ^ { r }$ green label-nodes. All $( m ^ { r } ) !$ ! possible permutations of the labels $\{ \mathbf { A } , \mathbf { B } , \mathbf { C } , \mathbf { \Psi } . . . \}$ are valid, disregarding the
160
+
161
+ order of sibling nodes. Thus, the number of label assignments of green nodes is $( m ^ { r } ) ! / \left( m ! \right) ^ { m ^ { r } - 1 }$ (there are $m ^ { r } - 1$ parent nodes, where the order of each of their $m$ siblings can be permutated). Right before interacting with the target node and predicting the label, a single vector of size $d$ must encapsulate the information flowing from all green nodes (Equations (2) and (3)).1 Such a vector contains $d$ floating-point elements, each of them is stored as $f$ bits. Overall, the number of possible cases that this vector can distinguish between is $b ^ { f \cdot d }$ . The number of possible cases that the vector can distinguish between must be greater than the number of different examples that this vector may encounter in the training data. This requirement is expressed in Equation (4). Considering binary trees $( m { = } 2 )$ , and floating-point values of $f { = } 3 2$ binary $\scriptstyle ( b = 2 )$ bits, we get Equation (5):
162
+
163
+ $$
164
+ b ^ { f \cdot d } > \frac { ( m ^ { r } ) ! } { { ( m ! ) } ^ { m ^ { r } - 1 } }
165
+ $$
166
+
167
+ $$
168
+ 2 ^ { 3 2 \cdot d } > \frac { ( 2 ^ { r } ) ! } { 2 ^ { 2 ^ { r } - 1 } }
169
+ $$
170
+
171
+ Since factorial grows faster than an exponent with a constant base, a small increase in $r$ requires a much larger increase in $d$ . Specifically, for $d { = } 3 2$ as in the experiments in Section 4.1, the maximal problem radius is as low as $r { = } 7$ . That is, a model with $d { = } 3 2$ cannot obtain $100 \%$ accuracy for $r { > } 7$
172
+
173
+ In practice, the problem is worse; i.e., the empirical minimal $d$ is higher than the combinatorial, because even if a solution to storing some information in a vector of a certain size exists, a gradient descent-based algorithm is not guaranteed to find it. Figure 4 shows the combinatorial lower bound of $d$ given $r$ . We also repeated the experiments from Section 4.1 and report the minimal empirical $d$ for each value of $r$ . As shown in Figure 4, the empirical and the theoretical minimal $d$ grow exponentially with $r$ ; for example, even $d { = } 5 1 2$ can empirically fit $r { = } 7$ at most.
174
+
175
+ # 6 RELATED WORK
176
+
177
+ Under-reaching Barceló et al. (2020) found that the expressiveness of GNNs captures only a small fragment of first-order logic. The main limitation arises from the inability of a node to be aware of nodes that are farther away than the number of layers $K$ , while the existence of such nodes can be easily described using logic. We denote this limitation as under-reaching. Nevertheless, even when information is reachable within $K$ edges, we show that this information might be over-squashed along the way. Thus, the over-squashing limitation described in this paper is tighter than under-reaching.
178
+
179
+ Over-smoothing As observed before, node representations become indistinguishable and prediction performance severely degrades as the number of layers increases. The accepted explanation to this phenomenon is over-smoothing (Li et al., 2018; Wu et al., 2020; Oono and Suzuki, 2020). This might explain the empirical optimality of few layers in short-range tasks (e.g., only $K { = } 2$ layers in Kipf and Welling (2017)). Nonetheless, some problems depend on longer-range information propagation and thus require more layers, to avoid under-reaching. We hypothesize that in long-range problems, the explanation for the degraded performance is over-squashing rather than over-smoothing. For further discussion of over-smoothing vs. over-squashing, see Appendix E.
180
+
181
+ Avoiding over-squashing Some previous work avoid over-squashing by various profitable means: Gilmer et al. (2017) add “virtual edges” to shorten long distances; Scarselli et al. (2008) add “supersource nodes”; and Allamanis et al. (2018) designed program analyses that serve as 16 “shortcut” edge types. However, none of these explicitly explained these solutions using over-squashing, and did not identify the bottleneck and its negative cross-domain implications.
182
+
183
+ # 7 CONCLUSION
184
+
185
+ We propose a novel explanation to a well known limitation in training graph neural networks: a bottleneck that causes over-squashing. Problems that depend on long-range interaction require as many GNN layers as the desired radius of each node’s receptive field. This causes an exponentiallygrowing amount of information to be squashed into a fixed-length vector. As a result, the GNN fails to propagate long-range information, learns only short-range signals from the training data instead, and performs poorly when the prediction task depends on long-range interaction.
186
+
187
+ We demonstrate the existence of the bottleneck in a controlled problem, provide theoretical lower bounds for the hidden size given the problem radius, and show that GCN and GIN are more susceptible to over-squashing than GAT and GGNN. We further show that prior models of chemical, biological and programmatical benchmarks suffer from over-squashing by showing that they can be dramatically improved using a simple FA layer. We conclude that over-squashing in GNNs is so prevalent and untreated in some benchmarks – that even the simplest solution helps. Our observations open the path for a variety of follow-up improvements and even better solutions for over-squashing.
188
+
189
+ # ACKNOWLEDGMENTS
190
+
191
+ We would like to thank Federico Errica and Marc Brockschmidt for their help in using their frameworks. We are also grateful to (alphabetically): Chen Zarfati, Elad Nachmias, Gail Weiss, Horace He, Jorge Perez, Lotem Fridman, Moritz Plenz, Pavol Bielik, Petar Velickovi ˇ c, Roy Sadaka, Shaked ´ Brody, Yoav Goldberg, and the anonymous reviewers for their useful comments and suggestions.
192
+
193
+ # REFERENCES
194
+
195
+ Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. In International Conference on Learning Representations, 2018. URL https: //openreview.net/forum?id $\equiv$ BJOFETxR-.
196
+
197
+ Pablo Barceló, Egor V. Kostylev, Mikael Monet, Jorge Pérez, Juan Reutter, and Juan Pablo Silva. The logical expressiveness of graph neural networks. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ r1lZ7AEKvB.
198
+
199
+ Karsten M Borgwardt, Cheng Soon Ong, Stefan Schönauer, SVN Vishwanathan, Alex J Smola, and Hans-Peter Kriegel. Protein function prediction via graph kernels. Bioinformatics, 21(suppl_1): i47–i56, 2005.
200
+
201
+ Marc Brockschmidt. Gnn-film: Graph neural networks with feature-wise linear modulation. Proceedings of the 36th International Conference on Machine Learning, ICML, 2020.
202
+
203
+ Deli Chen, Yankai Lin, Wei Li, Peng Li, Jie Zhou, and Xu Sun. Measuring and relieving the oversmoothing problem for graph neural networks from the topological view. In Proceedings of the Thirty-Fourth Conference on Association for the Advancement of Artificial Intelligence (AAAI), 2020a.
204
+
205
+ Jianfei Chen, Jun Zhu, and Le Song. Stochastic training of graph convolutional networks with variance reduction. In International Conference on Machine Learning, pages 942–950, 2018.
206
+
207
+ Ming Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding, and Yaliang Li. Simple and deep graph convolutional networks. In International Conference on Machine Learning, pages 1725–1735. PMLR, 2020b.
208
+
209
+ Kyunghyun Cho, Bart van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder–decoder approaches. In Proceedings of SSST-8, Eighth Workshop on Syntax, Semantics and Structure in Statistical Translation, pages 103–111, 2014a.
210
+
211
+ Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014b.
212
+
213
+ 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 Advances in neural information processing systems, pages 2224–2232, 2015.
214
+
215
+ Federico Errica, Marco Podda, Davide Bacciu, and Alessio Micheli. A fair comparison of graph neural networks for graph classification. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id ${ . } = { }$ HygDF6NFPB.
216
+
217
+ Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
218
+
219
+ Vikas K Garg, Stefanie Jegelka, and Tommi Jaakkola. Generalization and representational limits of graph neural networks. arXiv preprint arXiv:2002.06157, 2020.
220
+
221
+ Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1263–1272. JMLR. org, 2017.
222
+
223
+ Marco Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In Proceedings. 2005 IEEE International Joint Conference on Neural Networks, 2005., volume 2, pages 729–734. IEEE, 2005.
224
+
225
+ Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in neural information processing systems, pages 1024–1034, 2017.
226
+
227
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
228
+
229
+ Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. In International Conference on Learning Representations, 2018.
230
+
231
+ Jure Leskovec and Julian J Mcauley. Learning to discover social circles in ego networks. In Advances in neural information processing systems, pages 539–547, 2012.
232
+
233
+ Omer Levy, Kenton Lee, Nicholas FitzGerald, and Luke Zettlemoyer. Long short-term memory as a dynamically computed element-wise weighted sum. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 732–739, 2018.
234
+
235
+ Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
236
+
237
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In International Conference on Learning Representations, 2016.
238
+
239
+ Alessio Micheli. Neural network for graphs: A contextual constructive approach. IEEE Transactions on Neural Networks, 20(3):498–511, 2009.
240
+
241
+ Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ S1ldO2EFPr.
242
+
243
+ 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.
244
+
245
+ Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id ${ . } = { }$ Hkx1qkrKPr.
246
+
247
+ 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, 2008.
248
+
249
+ 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, pages 593–607. Springer, 2018.
250
+
251
+ Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
252
+
253
+ Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. Relational Representation Learning Workshop, NeurIPS 2018, 2018.
254
+
255
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pages 3104–3112, 2014.
256
+
257
+ Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. In International Conference on Learning Representations, 2018.
258
+
259
+ Nikil Wale, Ian A Watson, and George Karypis. Comparison of descriptor spaces for chemical compound retrieval and classification. Knowledge and Information Systems, 14(3):347–375, 2008.
260
+
261
+ 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.
262
+
263
+ Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 2020.
264
+
265
+ Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In International Conference on Machine Learning, pages 5453–5462, 2018.
266
+
267
+ Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ ryGs6iA5Km.
268
+
269
+ Lingxiao Zhao and Leman Akoglu. Pairnorm: Tackling oversmoothing in gnns. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum? id $=$ rkecl1rtwB.
270
+
271
+ ![](images/e3bfdbbfc6537790bf9570445b100eb496fab97ea7294f9e56265432a731cada.jpg)
272
+ Figure 5: An example of a TREE-NEIGHBORSMATCH, that is an instance of the general NEIGHBORSMATCH problem that we examine in Section 4. The target node $\textcircled{2}$ is the root of a tree of depth $\mathord { \left. \vert - 3 \right. }$ (from the target node to the green nodes). The green nodes ( $\textcircled{4}$ , $\textcircled{8}$ , $\textcircled{ C}$ , ...) have blue neighbors $\textcircled{)}$ and an alphabetical label. The node $\textcircled{8}$ has a single blue neighbor; the node $\textcircled{ C}$ has two blue neighbors; and the node $\textcircled{ D}$ has no blue neighbors; each other green node has another unique number of blue neighbors. The goal it to predict a label for the target node $\textcircled{2}$ according to its number of blue neighbors. The correct answer is C in this example, because the target node has two blue neighbors, like the green node that is marked with C in the same graph. To make a correct prediction, the network must propagate information from all leaves toward the target node, and make the decision given a single fixed-sized vector that compresses all this information.
273
+
274
+ # A TREE-NEIGHBORSMATCH – TRAINING DETAILS
275
+
276
+ Data We created a separate dataset for every tree depth (which is equal to $r$ , the problem radius) and sampled up to 32,000 examples per dataset. The label of each leaf (“A”, “B”, “C” in Figure 2) is represented as a one-hot vector. To tease the effect of the bottleneck from the ability of a GNN to count neighbors, we concatenated each leaf node’s initial representation with a 1-hot vector representing the number of blue neighbors, instead of creating the blue nodes. The target node is initialized with a learned vector as its (missing) label, concatenated with a 1-hot vector representing its number of blue neighbors. Intermediate nodes are initialized with another learned vector.
277
+
278
+ Model The network has an initial linear layer, followed by $r + 1$ GNN layers. Afterward, the final target node representation goes through a linear layer and a softmax to predict its label. We experimented with GCN (Kipf and Welling, 2017), GGNN (Li et al., 2016), GIN (Xu et al., 2019) and GAT (Velickovi ˇ c et al., 2018) as the graph layers. ´
279
+
280
+ In Section 4.1, we used model dimensions of $d { = } 3 2$ . Larger values led to the exact same trend. We added residual connections, summing every node with its own representation in the previous layer to increase expressivity, and layer normalization which eased convergence. We used the Adam optimizer with a learning rate of $1 0 ^ { - 3 }$ , decayed by 0.5 after every 1000 epochs without an increase in training accuracy, and stopped training after 2000 epochs of no training accuracy improvement. This usually led to tens of thousands of training epochs, sometimes reaching 100,000 epochs.
281
+
282
+ Table 4: Average error rates and standard deviations on the QM9 targets. Best result for every property in every GNN type is highlighted in bold. Results marked with $\dagger$ were previously reported by Brockschmidt (2020).
283
+
284
+ <table><tr><td></td><td colspan="2">MLP</td><td colspan="2">R-GCN</td><td colspan="2">GNN-FiLM</td></tr><tr><td>Property</td><td>baset</td><td>+FA</td><td>baset</td><td>+FA</td><td>baset</td><td>+FA</td></tr><tr><td>mu</td><td>2.36±0.04</td><td>2.19±0.04</td><td>3.21±0.06</td><td>2.92±0.07</td><td>2.38±0.13</td><td>2.26±0.06</td></tr><tr><td>alpha</td><td>4.27±0.36</td><td>1.92±0.06</td><td>4.22±0.45</td><td>2.14±0.08</td><td>3.75±0.11</td><td>1.93±0.08</td></tr><tr><td>HOMO</td><td>1.25±0.04</td><td>1.19±0.04</td><td>1.45±0.01</td><td>1.37±0.02</td><td>1.22±0.07</td><td>1.11±0.01</td></tr><tr><td>LUMO</td><td>1.35±0.04</td><td>1.20±0.05</td><td>1.62±0.04</td><td>1.41±0.01</td><td>1.30±0.05</td><td>1.21±0.05</td></tr><tr><td>gap</td><td>2.04±0.05</td><td>1.82±0.05</td><td>2.42±0.14</td><td>2.03±0.03</td><td>1.96±0.06</td><td>1.79±0.07</td></tr><tr><td>R2</td><td>14.86±1.62</td><td>12.40±0.84</td><td>16.38±0.49</td><td>13.55±0.50</td><td>15.59±1.38</td><td>11.89±0.73</td></tr><tr><td>ZPVE</td><td>12.00±1.66</td><td>4.68±0.29</td><td>17.40±3.56</td><td>5.81±0.61</td><td>11.00±0.74</td><td>4.68±0.49</td></tr><tr><td>U0</td><td>5.55±0.38</td><td>1.71±0.13</td><td>7.82±0.80</td><td>1.75±0.18</td><td>5.43±0.96</td><td>1.60±0.12</td></tr><tr><td>U</td><td>6.20±0.88</td><td>1.72±0.12</td><td>8.24±1.25</td><td>1.88±0.22</td><td>5.95±0.46</td><td>1.75±0.08</td></tr><tr><td>H</td><td>5.96±0.45</td><td>1.70±0.08</td><td>9.05±1.21</td><td>1.85±0.18</td><td>5.59±0.57</td><td>1.93±0.42</td></tr><tr><td>G</td><td>5.09±0.57</td><td>1.53±0.15</td><td>7.00±1.51</td><td>1.76±0.15</td><td>5.17±1.13</td><td>1.77±0.05</td></tr><tr><td>Cv</td><td>3.38±0.20</td><td>1.69±0.08</td><td>3.93±0.48</td><td>1.90±0.07</td><td>3.46±0.21</td><td>1.64±0.10</td></tr><tr><td>Omega</td><td>0.84±0.02</td><td>0.63±0.04</td><td>1.02±0.05</td><td>0.75±0.04</td><td>0.98±0.06</td><td>0.69±0.05</td></tr><tr><td>Relative:</td><td></td><td>-40.33%</td><td></td><td>-43.40%</td><td></td><td>-39.53%</td></tr></table>
285
+
286
+ To rule out hyperparameter tuning as the source of degraded performance, we experimented with changing activations (ReLu, tanh, MLP, none), using layer normalization and batch normalization, residual connections, various batch sizes, and whether or not the same GNN weights should be “unrolled” over time steps. The presented results were obtained using the configurations that achieved the best results.
287
+
288
+ Over-squashing or just long-range? To rule out the possibility that the long-range itself is preventing the GNNs from fitting the data, we repeated the experiment of Figure 3 for depths 4 to 8, where the distance between the leaves and the target node remained the same, but the amount of over-squashing was as in $r { = } 2$ . That is, the graph looks like a tree of depth $\Longrightarrow 2$ , where the root is connected to a “chain” of length of up to 6, and the target node is at the other side of the chain. This setting maintains the long-range as in the original problem, but reduces the amount of information that needs to be squashed. In other words, This setting disentangles of the effect of the long-range itself from the effect of the growing amount of information (i.e., from over-squashing). In this setting, all GNN types managed to easily fit the data to close to $100 \%$ across all distances, showing that the problem is the amount of over-squashing, rather than the long-range itself.
289
+
290
+ # B QM9 – ADDITIONAL RESULTS
291
+
292
+ # B.1 ADDITIONAL GNN TYPES
293
+
294
+ Because of space limitations, in Section 4.2 we presented results on the QM9 dataset only for R-GIN, R-GAT and GGNN. In this section, we show that additional GNN architectures benefit from breaking the bottleneck using a fully-adjacent layer: GNN-MLP , R-GCN (Schlichtkrull et al., 2018) and GNN-FiLM (Brockschmidt, 2020).
295
+
296
+ All experiments were performed using the extensively-tuned implementation of Brockschmidt (2020) who experimented with over 500 hyperparameter configurations.
297
+
298
+ Table 4 contains additional results for GGNN, R-GCN and R-GIN. As shown in Table 4, adding an FA layer significantly improves results across all GNN architectures, for all properties.
299
+
300
+ # B.2 ALTERNATIVE SOLUTIONS
301
+
302
+ Table 5 shows additional experiments, all performed using GCN. base† is the original model of Brockschmidt (2020) as in Table 4. $+ F A$ is the model that we re-trained with the last layer modified to an FA layer.
303
+
304
+ Table 5: Average error rates and standard deviations on the QM9 targets with GCN using alternative solutions.
305
+
306
+ <table><tr><td>Property</td><td>baset</td><td>+FA</td><td>2xd</td><td>All FA</td><td>2×FA</td><td>Penultimate FA</td></tr><tr><td>mu</td><td>3.21±0.06</td><td>2.92±0.07</td><td>2.99±0.08</td><td>11.52</td><td>2.89±0.08</td><td>2.80±0.08</td></tr><tr><td>alpha</td><td>4.22±0.45</td><td>2.14±0.08</td><td>3.57±0.40</td><td>9.19</td><td>2.23±0.04</td><td>2.14±0.10</td></tr><tr><td>HOMO</td><td>1.45±0.01</td><td>1.37±0.02</td><td>1.36±1.87</td><td>9.95</td><td>1.39±0.02</td><td>1.34±0.03</td></tr><tr><td>LUMO</td><td>1.62±0.04</td><td>1.41±0.01</td><td>1.43±0.04</td><td>19.13</td><td>1.42±0.04</td><td>1.37±0.02</td></tr><tr><td>gap</td><td>2.42±0.14</td><td>2.03±0.03</td><td>2.33±0.23</td><td>24.62</td><td>2.06±0.05</td><td>2.00±0.03</td></tr><tr><td>R2</td><td>16.38±0.49</td><td>13.55±0.50</td><td>18.4±0.76</td><td>168.09</td><td>13.97±0.56</td><td>12.92±0.11</td></tr><tr><td>ZPVE</td><td>17.40±3.56</td><td>5.81±0.61</td><td>15.8±2.59</td><td>591.33</td><td>5.79±0.50</td><td>4.53±0.62</td></tr><tr><td>UO</td><td>7.82±0.80</td><td>1.75±0.18</td><td>7.60±2.07</td><td>188.59</td><td>1.90±0.1</td><td>1.98±0.25</td></tr><tr><td>U</td><td>8.24±1.25</td><td>1.88±0.22</td><td>7.65±1.51</td><td>189.72</td><td>1.71±0.16</td><td>2.05±0.23</td></tr><tr><td>H</td><td>9.05±1.21</td><td>1.85±0.18</td><td>8.67±1.10</td><td>191.11</td><td>1.83±0.11</td><td>1.73±0.14</td></tr><tr><td>G</td><td>7.00±1.51</td><td>1.76±0.15</td><td>2.90±1.15</td><td>173.68</td><td>1.93±0.11</td><td>1.96±0.42</td></tr><tr><td>Cv</td><td>3.93±0.48</td><td>1.90±0.07</td><td>3.99±0.07</td><td>64.18</td><td>1.90±0.14</td><td>1.83±0.11</td></tr><tr><td>Omega</td><td>1.02±0.05</td><td>0.75±0.04</td><td>1.03±0.54</td><td>23.89</td><td>0.69±0.06</td><td>0.67±0.01</td></tr><tr><td>relative</td><td>0.0%</td><td>-43.40%</td><td>-5.50%</td><td>+1520%</td><td>-43.30%</td><td>-45.2%</td></tr></table>
307
+
308
+ $2 \times d$ is a model that was trained with a doubled hidden dimension size, $d = 2 5 6$ instead of $d = 1 2 8$ as in the base model. As shown, doubling the hidden dimension size leads to a small improvement of only $5 . 5 \%$ reduction in error. In comparison, the $+ \mathrm { F A }$ model used the original dimension sizes and achieves a much larger improvement of $4 3 . 4 0 \%$ .
309
+
310
+ All FA is a model that was trained with all GNN layers converted into FA layers, practically ignoring the graph topology. This led to much worse results of more than $1 5 0 0 \%$ higher error. This shows that the graph topology is important in this benchmark, and that a direct interaction between nodes (as in a single FA layer) must be performed in addition to considering the topology.
311
+
312
+ $2 \times F A$ is a model where the last layer was modified into an FA layer, and an additional FA layer was stacked on top of it. This led to results that are very similar to $+ \mathrm { F A }$ .
313
+
314
+ Penultimate $F A$ is a model where the FA layer is the penultimate layer (the $K - 1$ -th), followed by a standard GNN layer as the $K$ -th layer. This led to results that are even slightly better than $+ \mathrm { F A }$ .
315
+
316
+ Table 6: Average error rates and standard deviations on the QM9 targets with GCN, where we use only a fraction of the edges in the FA layer.
317
+
318
+ <table><tr><td></td><td>base†</td><td>0.25×FA</td><td>0.5× FA</td><td>0.75× FA</td><td>+FA (as in Table 4)</td></tr><tr><td>Avg. error compared to baset</td><td>-0%</td><td>-8.4%</td><td>-31.5%</td><td>-37.1%</td><td>-43.4%</td></tr></table>
319
+
320
+ # B.3 PARTIAL-FA LAYERS
321
+
322
+ We also examined whether instead of adding a “full fully-adjacent layer”, we can randomly sample only a fraction of these edges. We randomly sampled only $\{ 0 . 2 5 , 0 . 5 , 0 . 7 5 \}$ of the edges in the full FA layer in every example, and trained the model for each target property 5 times. Table 6 shows the results of these experiments using GCN. base† is the original model of Brockschmidt (2020) as in Table 4. $+ F A$ is the model that we re-trained with the last layer modified to an FA layer. $\{ 0 . 2 5 , 0 . 5 , 0 . 7 5 \} \times F A$ are the models were only a fraction of the edges in the FA layer were used.
323
+
324
+ As shown in Table 6, the full FA layer achieves the largest reduction in error $( - 4 3 . 4 \% )$ , but even adding a fraction of the edges improves the results over the base model. For example, using only half of the edges $( 0 . 5 \times F A )$ reduces the error by $3 1 . 5 \%$ . Overall, the percentage of used edges in the partial-FA layer is correlated with its reduction in error.
325
+
326
+ # C BIOLOGICAL BENCHMARKS – TRAINING DETAILS
327
+
328
+ We used the implementation of Errica et al. (2020) who performed a fair and thorough comparison between GNNs, by splitting each dataset to 10-folds; then, for each GNN type they select a configuration among a grid of 72 configurations according to the validation set; finally, the best configuration for each fold is trained three additional times, early stopped using the validation set, and evaluated on the test set. The final reported result is the average of all 30 test runs (10-folds $\times 3$ ). The final standard deviation is computed among the average results of each of the ten folds.
329
+
330
+ # D DATA STATISTICS
331
+
332
+ D.1 SYNTHETIC DATASET: TREE-NEIGHBORSMATCH
333
+
334
+ Statistics of the synthetic TREE-NEIGHBORSMATCH dataset are shown in Table 7.
335
+
336
+ Table 7: The number of examples, in our experiments and combinatorially, for every value of depth.
337
+
338
+ <table><tr><td>depth</td><td># Training examples sampled</td><td>Total combinatorial: (2depth!) . 2depth</td></tr><tr><td>2</td><td>96</td><td>96</td></tr><tr><td>3</td><td>8000</td><td>&gt;3·105</td></tr><tr><td>4</td><td>16,000</td><td>&gt;3·1014</td></tr><tr><td>5</td><td>32,000</td><td>&gt;1036</td></tr><tr><td>6</td><td>32,000</td><td>&gt;1090</td></tr><tr><td>7</td><td>32,000</td><td>&gt;10217</td></tr><tr><td>8</td><td>32,000</td><td>&gt;10509</td></tr></table>
339
+
340
+ # D.2 QUANTUM CHEMISTRY: QM9
341
+
342
+ Statistics of the quantum chemistry QM9 dataset, as used in Brockschmidt (2020) are shown in Table 8.
343
+
344
+ Table 8: Statistics of the QM9 chemical dataset (Ramakrishnan et al., 2014) as used by Brockschmidt (2020).
345
+
346
+ <table><tr><td></td><td>Training</td><td>Validation</td><td>Test</td></tr><tr><td># examples</td><td>110,462</td><td>10,000</td><td>10,000</td></tr><tr><td># nodes-average</td><td>18.03</td><td>18.06</td><td>18.09</td></tr><tr><td># nodes - standard deviation</td><td>2.9</td><td>2.9</td><td>2.9</td></tr><tr><td># edges - average</td><td>18.65</td><td>18.67</td><td>18.72</td></tr><tr><td># edges - standard deviation</td><td>3.1</td><td>3.1</td><td>3.1</td></tr></table>
347
+
348
+ # D.3 BIOLOGICAL BENCHMARKS
349
+
350
+ Statistics of the biological datasets, as used in Errica et al. (2020), are shown in Table 9.
351
+
352
+ # D.4 VARMISUSE
353
+
354
+ Statistics of the VARMISUSE dataset, as used in Allamanis et al. (2018) and Brockschmidt (2020), are shown in Table 10.
355
+
356
+ Table 9: Statistics of the biological datasets, as used by Errica et al. (2020).
357
+
358
+ <table><tr><td></td><td>NCI1 (Wale et al., 2008)</td><td>ENZYMES (Borgwardt et al., 2005)</td></tr><tr><td># examples</td><td>4110</td><td>600</td></tr><tr><td># classes</td><td>2</td><td>6</td></tr><tr><td># nodes -average</td><td>29.87</td><td>32.63</td></tr><tr><td># nodes - standard deviation</td><td>13.6</td><td>15.3</td></tr><tr><td># edges - average</td><td>32.30</td><td>64.14</td></tr><tr><td># edges - standard deviation</td><td>14.9</td><td>25.5</td></tr><tr><td># node labels</td><td>37</td><td>3</td></tr></table>
359
+
360
+ Table 10: Statistics of the VARMISUSE dataset (Allamanis et al., 2018) as used by Brockschmidt (2020).
361
+
362
+ <table><tr><td></td><td>Training</td><td>Validation</td><td>UnseenProject Test</td><td>SeenProject Test</td></tr><tr><td># graphs</td><td>254360</td><td>42654</td><td>117036</td><td>59974</td></tr><tr><td># nodes -average</td><td>2377</td><td>1742</td><td>1959</td><td>3986</td></tr><tr><td># edges - average</td><td>7298</td><td>7851</td><td>5882</td><td>12925</td></tr></table>
363
+
364
+ # E DISCUSSION: OVER-SMOOTHING VS. OVER-SQUASHING
365
+
366
+ Although over-smoothing and over-squashing are related, they are disparate phenomena that occur in different types of problems. For example, imagine a triangular graph containing only three nodes, where every node has a scalar value, an edge to each of the other nodes, and needs to compute a function of its own value and the other nodes’ values. The problem radius $r$ in this case is $r { = } 1$ . As we increase the number of layers, the representations of the nodes might become indistinguishable, and thus suffer from over-smoothing. However, there will be no over-squashing in this case, because there is no growing amount of information that is squashed into fixed-sized vectors while passing long-range messages. Contrarily, in the TREE-NEIGHBORSMATCH problem, there is no reason for over-smoothing to occur, because there are no two nodes that can converge to the same representation. A node in a “higher” level in the tree contains twice the information than a node in a “lower” level. Thus, this is a case where over-squashing can occur without over-smoothing.
parse/train/i80OPhOCVH2/i80OPhOCVH2_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/i80OPhOCVH2/i80OPhOCVH2_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/i80OPhOCVH2/i80OPhOCVH2_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/dev/0sEIBFb4cs/0.png ADDED

Git LFS Details

  • SHA256: df7845fb6277ded60c333280faadfb7eda5147d387cf316562b2677bfd7e200f
  • Pointer size: 131 Bytes
  • Size of remote file: 542 kB
vlm/dev/0sEIBFb4cs/1.png ADDED

Git LFS Details

  • SHA256: 39d4c694514c35f110d2ebc70ff80128fd1cde40a39cf9fccf78f29019716c25
  • Pointer size: 131 Bytes
  • Size of remote file: 640 kB
vlm/dev/0sEIBFb4cs/10.png ADDED

Git LFS Details

  • SHA256: 5f938235f49e9fd35994a86d3a5321c0d13b8adc62de0745e238c6dee7f85fc4
  • Pointer size: 131 Bytes
  • Size of remote file: 575 kB
vlm/dev/0sEIBFb4cs/11.png ADDED

Git LFS Details

  • SHA256: e216ac24bb361e36720e77b9e2e30575eaa627f666f243c538fccb08dc0a7d6a
  • Pointer size: 131 Bytes
  • Size of remote file: 541 kB
vlm/dev/0sEIBFb4cs/12.png ADDED

Git LFS Details

  • SHA256: 52a1c8360ecea9d9dc4f5c178d535237038aae552a0e3e2a9cde8784ec469a6e
  • Pointer size: 131 Bytes
  • Size of remote file: 155 kB
vlm/dev/0sEIBFb4cs/13.png ADDED

Git LFS Details

  • SHA256: 24a3b093c596bf2ce9fa1184ec62e84af09a8fa7ed4431929ef5878f61c57952
  • Pointer size: 131 Bytes
  • Size of remote file: 470 kB
vlm/dev/0sEIBFb4cs/14.png ADDED

Git LFS Details

  • SHA256: 21111d0f15ab8287659b23937f416b9827a5bb487d932ff6bfc78eca04bd4540
  • Pointer size: 131 Bytes
  • Size of remote file: 448 kB
vlm/dev/0sEIBFb4cs/15.png ADDED

Git LFS Details

  • SHA256: 80865b59c298a4148e459ae5f44807f8140e678d3579fd055064056d9333f8d1
  • Pointer size: 131 Bytes
  • Size of remote file: 386 kB
vlm/dev/0sEIBFb4cs/16.png ADDED

Git LFS Details

  • SHA256: 364a99045618253a0f6faa1ee8b586795c55754663fedf0deae4b5a23e76c944
  • Pointer size: 131 Bytes
  • Size of remote file: 220 kB
vlm/dev/0sEIBFb4cs/17.png ADDED

Git LFS Details

  • SHA256: 9158479c5765edd925ed2835e9ba9b8a6ce7e967043c996d412a595f8d084650
  • Pointer size: 131 Bytes
  • Size of remote file: 438 kB