ZHANGYUXUAN-zR commited on
Commit
ad4085c
·
verified ·
1 Parent(s): 7c84d5a

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/BXewfAYMmJw/BXewfAYMmJw.md +448 -0
  2. parse/train/BXewfAYMmJw/BXewfAYMmJw_content_list.json +0 -0
  3. parse/train/BXewfAYMmJw/BXewfAYMmJw_middle.json +0 -0
  4. parse/train/BXewfAYMmJw/BXewfAYMmJw_model.json +0 -0
  5. parse/train/BkMn9jAcYQ/BkMn9jAcYQ.md +301 -0
  6. parse/train/BkMn9jAcYQ/BkMn9jAcYQ_content_list.json +1589 -0
  7. parse/train/BkMn9jAcYQ/BkMn9jAcYQ_middle.json +0 -0
  8. parse/train/BkMn9jAcYQ/BkMn9jAcYQ_model.json +0 -0
  9. parse/train/Byx1VnR9K7/Byx1VnR9K7.md +164 -0
  10. parse/train/Byx1VnR9K7/Byx1VnR9K7_content_list.json +912 -0
  11. parse/train/Byx1VnR9K7/Byx1VnR9K7_middle.json +0 -0
  12. parse/train/Byx1VnR9K7/Byx1VnR9K7_model.json +0 -0
  13. parse/train/GlEWs-V9boR/GlEWs-V9boR.md +307 -0
  14. parse/train/GlEWs-V9boR/GlEWs-V9boR_content_list.json +1282 -0
  15. parse/train/GlEWs-V9boR/GlEWs-V9boR_middle.json +0 -0
  16. parse/train/GlEWs-V9boR/GlEWs-V9boR_model.json +0 -0
  17. parse/train/H1cKvl-Rb/H1cKvl-Rb.md +403 -0
  18. parse/train/H1cKvl-Rb/H1cKvl-Rb_middle.json +0 -0
  19. parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J.md +212 -0
  20. parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_content_list.json +1023 -0
  21. parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_middle.json +0 -0
  22. parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_model.json +0 -0
  23. parse/train/MJmYbFnJAGa/MJmYbFnJAGa.md +0 -0
  24. parse/train/MJmYbFnJAGa/MJmYbFnJAGa_content_list.json +0 -0
  25. parse/train/MJmYbFnJAGa/MJmYbFnJAGa_middle.json +0 -0
  26. parse/train/MJmYbFnJAGa/MJmYbFnJAGa_model.json +0 -0
  27. parse/train/S1gNc3NtvB/S1gNc3NtvB.md +299 -0
  28. parse/train/S1gNc3NtvB/S1gNc3NtvB_content_list.json +1651 -0
  29. parse/train/S1gNc3NtvB/S1gNc3NtvB_middle.json +0 -0
  30. parse/train/S1gNc3NtvB/S1gNc3NtvB_model.json +0 -0
  31. parse/train/SJ6yPD5xg/SJ6yPD5xg.md +281 -0
  32. parse/train/SJ6yPD5xg/SJ6yPD5xg_content_list.json +1578 -0
  33. parse/train/SJ6yPD5xg/SJ6yPD5xg_middle.json +0 -0
  34. parse/train/SJ6yPD5xg/SJ6yPD5xg_model.json +0 -0
  35. parse/train/SJl47yBYPS/SJl47yBYPS.md +415 -0
  36. parse/train/SJl47yBYPS/SJl47yBYPS_content_list.json +0 -0
  37. parse/train/SJl47yBYPS/SJl47yBYPS_middle.json +0 -0
  38. parse/train/SJl47yBYPS/SJl47yBYPS_model.json +0 -0
  39. parse/train/SJxhNTNYwB/SJxhNTNYwB.md +404 -0
  40. parse/train/SJxhNTNYwB/SJxhNTNYwB_content_list.json +0 -0
  41. parse/train/SJxhNTNYwB/SJxhNTNYwB_middle.json +0 -0
  42. parse/train/SJxhNTNYwB/SJxhNTNYwB_model.json +0 -0
  43. parse/train/SkeGURNtDH/SkeGURNtDH.md +379 -0
  44. parse/train/SkeGURNtDH/SkeGURNtDH_content_list.json +1739 -0
  45. parse/train/SkeGURNtDH/SkeGURNtDH_middle.json +0 -0
  46. parse/train/SkeGURNtDH/SkeGURNtDH_model.json +0 -0
  47. parse/train/ePh9bvqIgKL/ePh9bvqIgKL.md +251 -0
  48. parse/train/ePh9bvqIgKL/ePh9bvqIgKL_content_list.json +1281 -0
  49. parse/train/ePh9bvqIgKL/ePh9bvqIgKL_middle.json +0 -0
  50. parse/train/ePh9bvqIgKL/ePh9bvqIgKL_model.json +0 -0
parse/train/BXewfAYMmJw/BXewfAYMmJw.md ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COUNTERFACTUAL GENERATIVE NETWORKS
2
+
3
+ Axel Sauer1,2 & Andreas Geiger1,2
4
+ Autonomous Vision Group
5
+ 1Max Planck Institute for Intelligent Systems, Tubingen ¨ 2University of Tubingen ¨
6
+ {firstname.lastname}@tue.mpg.de
7
+
8
+ # ABSTRACT
9
+
10
+ Neural networks are prone to learning shortcuts – they often model simple correlations, ignoring more complex ones that potentially generalize better. Prior works on image classification show that instead of learning a connection to object shape, deep classifiers tend to exploit spurious correlations with low-level texture or the background for solving the classification task. In this work, we take a step towards more robust and interpretable classifiers that explicitly expose the task’s causal structure. Building on current advances in deep generative modeling, we propose to decompose the image generation process into independent causal mechanisms that we train without direct supervision. By exploiting appropriate inductive biases, these mechanisms disentangle object shape, object texture, and background; hence, they allow for generating counterfactual images. We demonstrate the ability of our model to generate such images on MNIST and ImageNet. Further, we show that the counterfactual images can improve out-of-distribution robustness with a marginal drop in performance on the original classification task, despite being synthetic. Lastly, our generative model can be trained efficiently on a single GPU, exploiting common pre-trained models as inductive biases.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ Deep neural networks (DNNs) are the main building blocks of many state-of-the-art machine learning systems that address diverse tasks such as image classification (He et al., 2016), natural language processing (Brown et al., 2020), and autonomous driving (Ohn-Bar et al., 2020). Despite the considerable successes of DNNs, they still struggle in many situations, e.g., classifying images perturbed by an adversary (Szegedy et al., 2013), or failing to recognize known objects in unfamiliar contexts (Rosenfeld et al., 2018) or from unseen poses (Alcorn et al., 2019).
15
+
16
+ Many of these failures can be attributed to dataset biases (Torralba & Efros, 2011) or shortcut learning (Geirhos et al., 2020). The DNN learns the simplest correlations and tends to ignore more complex ones. This characteristic becomes problematic when the simple correlation is spurious, i.e., not present during inference. The motivational example of (Beery et al., 2018) considers the setting of a DNN that is trained to recognize cows in images. A real-world dataset will typically depict cows on green pastures in most images. The most straightforward correlation a classifier can learn to predict the label ”cow” is hence the connection to a green, grass-textured background. Generally, this is not a problem during inference as long as the test data follows the same distribution. However, if we provide the classifier an image depicting a purple cow on the moon, the classifier should still confidently assign the label ”cow.” Thus, if we want to achieve robust generalization beyond the training data, we need to disentangle possibly spurious correlations from causal relationships.
17
+
18
+ Distinguishing between spurious and causal correlations is one of the core questions in causality research (Pearl, 2009; Peters et al., 2017; Scholkopf, 2019). One central concept in causality is the ¨ assumption of independent mechanisms (IM), which states that a causal generative process is composed of autonomous modules that do not influence each other. In the context of image classification (e.g., on ImageNet), we can interpret the generation of an image as a causal process (Kocaoglu et al., 2018; Goyal et al., 2019; Suter et al., 2019). We decompose this process into separate IMs, each controlling one factor of variation (FoV) of the image. Concretely, we consider three IMs: one generates the object’s shape, the second generates the object’s texture, and the third generates the background. With access to these IMs, we can produce counterfactual images, i.e., images of unseen combinations of FoVs. We can then train an ensemble of invariant classifiers on the generated counterfactual images, such that every classifier relies on only a single one of those factors. The main idea is illustrated in Figure 1. By exploiting concepts from causality, this paper links two previously distinct domains: disentangled generative models and robust classification. This allows us to scale our experiments beyond small toy datasets typically used in either domain. The main contributions of our work are as follows:
19
+
20
+ ![](images/e5fa5a9ed594f410c306e0b5058ab9647763c3466035ea204b26215511d96a9e.jpg)
21
+ Figure 1: Out-of-Domain (OOD) Classification. A classifier focuses on all factors of variation (FoV) in an image. For OOD data, this can be problematic: a FoV might be a spurious correlation, hence, impairing the classifier’s performance. An ensemble, e.g., a classifier with a common backbone and multiple heads, each head invariant to all but one FoV, increases OOD robustness.
22
+
23
+ • We present an approach for generating high-quality counterfactual images with direct control over shape, texture, and background. Supervision is only provided by the class label and certain inductive biases we impose on the learning problem. We demonstrate the usefulness of the generated counterfactual images for the downstream task of image classification on both MNIST and ImageNet. Our model improves the classifier’s out-of-domain robustness while only marginally degrading its overall accuracy. • We show that our generative model demonstrates interesting emerging properties, such as generating high-quality binary object masks and unsupervised image inpainting.
24
+
25
+ We release our code at https://github.com/autonomousvision/counterfactual generative networks
26
+
27
+ # 2 STRUCTURAL CAUSAL MODELS FOR IMAGE GENERATION
28
+
29
+ In this section, we first introduce our ideas on a conceptual level. Concretely, we form a connection between the areas of causality, disentangled representation learning, and invariant classifiers, and highlight that domain randomization (Tobin et al., 2017) is a particular instance of these ideas. In section 3, we will then formulate a concrete model that implements these ideas for image classification. Our goals are two-fold: (i) We aim at generating counterfactual images with previously unseen combinations like a cat with elephant texture or the proverbial ”bull in a china shop.” (ii) We utilize these images to train a classifier invariant to chosen factors of variation.
30
+
31
+ In the following, we first formalize the problem setting we address. Second, we describe how we can address this setting by structuring a generator network as a structural causal model (SCM). Third, we show how to use the SCM for training robust classifiers.
32
+
33
+ # 2.1 PROBLEM SETTING
34
+
35
+ Consider a dataset comprised of (high-dimensional) observations $\mathbf { x }$ (e.g. images), and corresponding labels $y$ (e.g. classes). A common assumption is that each $\mathbf { x }$ can be described by lower-dimensional, semantically meaningful factors of variation $\mathbf { z }$ (e.g., color or shape of objects in the image). If we can disentangle these factors, we are able to control their influence on the classifier’s decision. In the disentanglement literature, the factors are often assumed to be statistically independent, i.e., $\mathbf { z }$ is distributed according to $p ( \mathbf { z } ) = \Pi _ { i = 1 } ^ { n } ( z _ { i } )$ (Locatello et al., 2018). However, assuming independence is problematic because certain factors might be correlated in the training data, or the combination of some factors may not exist. Consider the colored MNIST dataset (Kim et al., 2019), where both the digit’s color and its shape correspond to the label. The simplest decision rule a classifier can learn is to count the number of pixels of a specific color value; no notion of the digit’s shape is required. This kind of correlation is not limited to constructed datasets – classifiers trained on ImageNet (Deng et al., 2009) strongly rely on texture for classification, significantly more than on the object’s shape (Geirhos et al., 2018). While texture or color is a powerful classification cue, we do not want the classifier to ignore shape information completely. Therefore, we advocate a generative viewpoint. However, simply training, e.g., a disentangled VAE (Higgins et al., 2017) on this dataset, does not allow for generating data points of unseen combinations – the VAE cannot generate green zeros if all zeros in the training data are red (see Appendix A for a visualization). We therefore propose a novel generative model which enables full control over several FoVs relevant for classification. We then train a classifier on these images while randomizing all factors but one. The classifier focuses on the non-randomized factor and becomes invariant wrt. the randomized ones.
36
+
37
+ # 2.2 STRUCTURAL CAUSAL MODELS
38
+
39
+ In representation learning, it is commonly assumed that a potentially complex function $f$ generates images from a small set of high-level semantic variables (e.g., position or color of objects) (Bengio et al., 2013). Most previous work (Goyal et al., 2019; Suter et al., 2019) imposes no restrictions on $f$ , i.e., a neural network is trained to map directly from a low-dimensional latent space to images. We follow the argument that rather than training a monolithic network to map from a latent space to images, the mapping should be decomposed into several functions. Each of these functions is autonomous, e.g., we can modify the background of an image while keeping all other aspects of the image unchanged. These demands coincide with the concept of structural causal models (SCMs) and independent mechanisms (IMs). An SCM ${ \mathfrak C }$ is defined as a collection of $d$ (structural) assignments
40
+
41
+ $$
42
+ S _ { j } : = f _ { j } \left( \mathbf { P A } _ { j } , U _ { j } \right) , \quad j = 1 , \ldots , d
43
+ $$
44
+
45
+ where each random variable $S _ { j }$ is a function of its parents $\mathbf { P A } _ { j } \subseteq \{ S _ { 1 } , \ldots , S _ { d } \} \setminus \{ S _ { j } \}$ and a noise variable $U _ { j }$ . The noise variables $U _ { 1 } , \ldots , U _ { d }$ are jointly independent. The functions $f _ { i }$ are independent mechanisms, intervening on one mechanism $f _ { j }$ does not change the other mechanisms $\{ f _ { 1 } , \cdot \cdot \cdot , f _ { d } \} \backslash \{ f _ { j } \}$ . The $\operatorname { S C M } { \mathfrak { C } }$ defines a unique distribution over the variables $\mathbf { S } = ( S _ { 1 } , \ldots , S _ { d } )$ which is referred to as the entailed distribution $P _ { \mathbf { S } } ^ { \mathfrak { C } }$ . If one or more structural assignments are replaced, i.e., $S _ { k } : = \tilde { f } ( \tilde { \mathbf { P } } \mathbf { \tilde { A } } _ { k } , \tilde { U } _ { k } )$ , this is called an intervention. We consider the case of atomic changes to the intervention distribution P C;do(Sk:=a)S , where the do refers to the intervention. A interventions, when thorough review of these concepts can be found in (Peters et al., 2017). Our goal is to represent $\tilde { f } ( \tilde { \mathbf { P A } _ { k } } , \tilde { U } _ { k } )$ puts a point mass on a real value . The entailed distribution then the image generation process with an SCM. If we learn a sensible set of IMs, we can intervene on a subset of them and generate interventional images $\mathbf { x } _ { I V }$ . These images were not part of the training data $\mathbf { x }$ as they are generated from the intervention distribution $P _ { \mathbf { S } } ^ { \bar { \mathfrak { C } } ; d o ( S _ { k } : = a ) }$ . To generate a set of counterfactual images , we fix the noise and randomly draw $a$ , hence answering counterfactual questions such as ”How would this image look like with a different background?”. In our case, $a$ corresponds to a class label that we provide as input, denoted as $y _ { C F }$ in the following.
46
+
47
+ # 2.3 TRAINING AN INVARIANT CLASSIFIER
48
+
49
+ To train an invariant classifier, we generate counterfactual images $\mathbf { x } _ { C F }$ , by intervening on all $f _ { j }$ simultaneously. Towards this goal, we draw labels uniformly from the set of possible labels $\mathcal { V }$ for each $f _ { j }$ , i.e., each IM is conditioned on a different label. We denote the domain of images generated by all possible label permutations as $\mathcal { X } _ { \mathcal { C F } }$ . The task of the invariant classifier $r : \mathcal { X } _ { \mathcal { C } \mathcal { F } } \to \mathcal { Y } _ { C F , k }$ is then to predict the label $_ { \mathbf { y } _ { C F , k } }$ that was provided to one specific IM $f _ { k }$ – rendering $r$ invariant wrt. all other IMs. This type of invariance is reminiscent of the idea of domain randomization (Tobin et al., 2017). Here, the goal is to solve a robotics task while randomizing all task-irrelevant attributes. The randomization improves the performance of the learned policy in the real-world. In domain randomization, we commonly assume access to the true generative model (the simulator). This assumption is not feasible if we do not have access to this model. Similar connections of causality and data augmentation have been made in (Ilse et al., 2020). It is also possible to train on interventional images $\mathbf { x } _ { I V }$ , i.e., generating a single image per sampled noise vector. Empirically, we find that counterfactual images improve performance over interventional ones. We hypothesize that counterfactuals provide a more stable signal.
50
+
51
+ # 3 COUNTERFACTUAL GENERATIVE NETWORKS
52
+
53
+ In this section, we apply our ideas outlined above to the particular problem of image classification. Our goal is to decompose the image generation process into several IMs. In image classification, there is generally one principal object in the image. Hence, we assume three IMs for this specific task: object shape, object texture, and background. Our goal is to train the generator consisting of these mechanisms in an end-to-end manner. The inherent structure of the model allows us to generate meaningful counterfactuals by construction. In the following, we describe the inductive biases we use (network architectures, losses, pre-trained models) and how to train the invariant classifier. We refer to the entire generative model using IMs as a Counterfactual Generative Network (CGN).
54
+
55
+ ![](images/96098ef4d86c378ff1dd04f7d3b65fe7700d8a19cf49db82b47d9ccb3c94adad.jpg)
56
+ Figure 2: Counterfactual Generative Network (CGN). Here, we illustrate the architecture used for the ImageNet experiments. The CGN is split into four mechanisms, the shape mechanism $f _ { s h a p e }$ , the texture mechanism $f _ { t e x t }$ , the background mechanism $f _ { b g }$ , and the composer $C$ . Components with trainable parameters are blue, components with fixed parameters are green. The primary supervision is provided by an unconstrained conditional GAN (cGAN) via the reconstruction loss $\mathcal { L } _ { r e c }$ . The cGAN is only used for training, as indicated by the dotted lines. Each mechanism takes as input the noise vector u (sampled from a spherical Gaussian) and the label $y$ (drawn uniformly from the set of possible labels $\mathcal { V }$ ) and minimizes its respective loss $\mathcal { L } _ { s h a p e }$ , $\mathcal { L } _ { t e x t }$ , and $\mathcal { L } _ { b g . }$ ). To generate a set of counterfactual images, we sample $\mathbf { u }$ and then independently sample $y$ for each mechanism.
57
+
58
+ # 3.1 INDEPENDENT MECHANISMS
59
+
60
+ We assume the causal structure to be known, and consider three learned IMs for generating shape, texture, and background, respectively. The only difference between the MNIST variants and ImageNet is the background mechanism. For the MNIST variants, we can simplify the SCM to include a second texture mechanism instead of a dedicated background mechanism. There is no need for a globally coherent background in the MNIST setting. An explicit formulation of both SCM is shown in Appendix B. In both cases, the learned IMs feed into another, fixed, IM: the composer. An overview of our CGN is shown in Figure 2. All IM-specific losses are optimized jointly end-to-end. For the experiments on ImageNet, we initialize each IM backbone with weights from a pre-trained BigGAN-deep-256 (Brock et al., 2018), the current state-of-the-art for conditional image generation. BigGAN has been trained as a single monolithic function; hence, it cannot generate images of only texture or only background, since these would be outside of the training domain.
61
+
62
+ Composition Mechanism. The function of the composer is not learned but defined analytically. For this work, we build on common assumptions from compositional image synthesis (Yang et al., 2017) and deploy a simple image formation model. Given the generated masks, textures and backgrounds, we composite the image ${ \bf x } _ { g e n }$ using alpha blending, denoted as $C$ :
63
+
64
+ $$
65
+ \mathbf { x } _ { g e n } = C ( \mathbf { m } , \mathbf { f } , \mathbf { b } ) = \mathbf { m } \odot \mathbf { f } + ( 1 - \mathbf { m } ) \odot \mathbf { b }
66
+ $$
67
+
68
+ where $\mathbf { m }$ is the mask (or alpha map), f is the foreground, and $\mathbf { b }$ is the background. The operator $\odot$ denotes elementwise multiplication. While, in general, IMs may be stochastic (Eq. 1), we did not find this to be necessary for the composer; therefore, we leave this mechanism deterministic. This fixed composition is a strong inductive bias in itself – the generator needs to generate realistic images through this bottleneck. To optimize the composite image, we could use an adversarial loss between real and composite images. While applicable to simple datasets such as MNIST, we found that an adversarial approach does not scale well to more complex datasets like ImageNet. To get a stronger and more stable supervisory signal, we, therefore, use an unconstrained, conditional GAN (cGAN) to generate pseudo-ground-truth images $\mathbf { x } _ { g t }$ from noise $\mathbf { u }$ and label $y$ . We feed the same $\mathbf { u }$ and $y$ into the IMs to generate ${ \bf x } _ { g e n }$ and minimize a reconstruction loss $\mathcal { L } _ { r e c } ( \mathbf { x } _ { g t } , \mathbf { x } _ { g e n } )$ . We find a combination of L1 loss and perceptual loss (Johnson et al., 2016) to work well. Note that during training, we utilize the same noise $\mathbf { u }$ and label $y$ to reconstruct the image generated by the cGAN. However, at inference time, we generate counterfactual images by randomizing both $\mathbf { u }$ and $y$ separately per mechanism.
69
+
70
+ Shape Mechanism. We model the shape using a binary mask predicted by shape IM $f _ { s h a p e }$ , where 0 corresponds to the background and 1 to the object. Effectively, this mechanism implements foreground segmentation. The loss is comprised of two terms: $\mathcal { L } _ { b i n a r y }$ and $\mathcal { L } _ { m a s k }$ . $\mathcal { L } _ { b i n a r y }$ is the pixelwise binary entropy of the mask; hence, minimizing it forces the output to be close to either 0 or 1. $\mathcal { L } _ { m a s k }$ prohibits trivial solutions, i.e., masks with all 0’s or 1’s that are outside of a defined interval (see Appendix C for details). As we utilize a BigGAN backbone for our ImageNet-Experiments, we need to extract a binary mask from the backbone’s output. Therefore, we add a pre-trained U2-Net (Qin et al., 2020) as a head on top of the BigGAN backbone. The U2-Net was trained for salient object detection on DUTS-TR (10553 images) (Wang et al., 2017). Hence, it is class agnostic; it generates an object mask for a salient object in the image. While the U2-Net presents a strong bias towards binary object masks, it does not fully solve the task at hand as it captures non-class specific parts (e.g., parts of trees in an elephant-class picture, see Figure 5). By fine-tuning the BigGAN backbone, we learn to generate images of the relevant part with exaggerated features to increase saliency. We refer to these as pre-masks ˜m.
71
+
72
+ Texture Mechanism. The texture mechanism $f _ { t e x t }$ is responsible for generating the foreground object’s appearance, while not capturing any object shape or background cues. For MNIST, we use an architectural bias – an additional layer before the final output. This layer spatially divides its input into patches and randomly rearranges them, similar to a shuffled sliding puzzle. This conceptually simple idea does not work on ImageNet, as we want to preserve local object structure, e.g., the position of an eye. We, therefore, sample patches from the full composite image and concatenate them into a grid. We denote this patch grid as pg. The patches are sampled from regions where the mask values are highest (hence, the object is likely located). We then minimize a perceptual loss between the foreground f (the output of $f _ { t e x t , }$ ) and the patchgrid: $\mathcal { L } _ { t e x t } ( \mathbf { f } , \mathbf { p } \mathbf { g } )$ . Over training, the background gradually transforms into object texture, resulting in texture maps, as shown in Figure 5. More details can be found in Appendix C.
73
+
74
+ Background Mechanism. The background mechanism $f _ { b g }$ needs to capture the background’s global structure while the object must be removed and inpainted realistically. However, we found that we cannot use standard inpainting techniques because classical methods (Barnes et al., 2009) slow down training too much, and deep learning methods (Liu et al., 2018) do not work well on synthetic data because of the domain shift. Instead, we exploit the same U2-Net as used for the shape mechanism $f _ { s h a p e }$ . Again, we feed the output of the BigGAN backbone through the U2-Net with fixed weights. However, this time, we minimize the predicted saliency. Over the progress of training, this leads to the object shrinking and finally disappearing, while the model learns to inpaint the object region (see Figure 5 and Appendix E). We refer to this loss as $\mathcal { L } _ { b g }$ . We attribute this loss’s success mainly the powerful pre-trained backbone network. BigGAN is already able to generate objects on realistic backgrounds; it only needs to unlearn the object generation.
75
+
76
+ # 3.2 GENERATING COUNTERFACTUALS TO TRAIN CLASSIFIERS
77
+
78
+ After training our CGN, each IM network has learned a class-conditional distribution over shapes, textures, or backgrounds. By randomizing the label input $y$ and noise $\mathbf { u }$ of each network, we can generate counterfactual images. The number of possible combinations is the number of classes to the power of the number of IM’s. For ImageNet, this is $1 0 0 0 ^ { 3 }$ . The amount of possible images is even larger since we learn distributions, i.e., we can generate a nearly unlimited variety of shapes, textures, and backgrounds, per class. We train on both real and counterfactual images. For MNIST, more counterfactual images always increase the test domain results; see the ablation study in Appendix A.3. On Imagenet, we provide evenly sized batches of real and counterfactual images; i.e., we use a ratio of 1. A ratio below 1 leads to inferior performance; a ratio above 1 leads to longer training times without an increase in performance. Similar results were reported for training on BigGAN samples in Ravuri & Vinyals (2019).
79
+
80
+ ![](images/b1cfbd31cda2e127f02929147331bd6f6c4aca3050e9fb106e31a2a100f0ce49.jpg)
81
+ Figure 3: MNISTs. Left: Samples of the different MNIST variations (for brevity, we show only the first four classes). Right: Counterfactual samples generated by our CGN. Note that the CGN learned class-conditional distributions, i.e., it generates varying shapes, colors, and textures.
82
+
83
+ # 4 EXPERIMENTS
84
+
85
+ Our experiments aim to answer the following questions: (i) Does our approach reliably learn the disentangled IMs on datasets of different complexity? (ii) Which inductive biases are necessary to achieve this? (iii) Do counterfactual images enable training invariant classifiers? We first apply our approach to different versions of MNIST: colored-, double-colored- and Wildlife-MNIST (details about their generation are in Appendix A.2). The label is encoded in the digit shape, foreground color or texture, and the background color or texture, see Figure 3. Our work focuses on a setting where the spurious signal is a strong predictor of the label; hence we assume a correlation strength of at least $90 \%$ between signal and label in our simulated environments. This assumption is in line with latest related work on visual bias (Goyal et al., 2019; Wang et al., 2020), which considers a strong correlation to be above $9 5 \ \%$ . We then scale our approach to ImageNet and demonstrate that we can improve the robustness of ImageNet classifiers. Implementation details about architectures, loss parameters, and hyperparameters can be found in Appendix C.
86
+
87
+ # 4.1 DOES OUR APPROACH LEARN THE DISENTANGLED INDEPENDENT MECHANISMS?
88
+
89
+ Standard metrics like the Inception Score (IS) (Salimans et al., 2016) are not applicable since the counterfactual images are outside of the natural image domain. We thus focus on qualitative results in this section. For a quantitative analysis, we refer the reader to Section 4.3 where we analyze the accuracy, robustness, and invariance of classifiers trained on the generated counterfactual data.
90
+
91
+ MNISTs. The generated counterfactual images are shown in Figure 3 (right). None of the counterfactual combinations were present in the training data. We can see that CGN successfully generates high-quality counterfactuals. The results on Wildlife MNIST are surprisingly good, considering that the object texture is only observable on the relatively thin digits. Nevertheless, the texture IM learns to generate realistic textures. All experiments on MNIST are done without pre-training any network.
92
+
93
+ ImageNet. As shown in Figure 4, our CGN generates counterfactuals of high visual fidelity. We train a single CGN for all 1000 classes. We also find an unexpected benefit of our approach. In some instances, the composite images eliminate structural artifacts of the original BigGAN images, such as surplus legs, as shown in Figure 5. We hypothesize that $f _ { s h a p e }$ learns a general shape concept per class, resulting in outliers, like elephants with eight legs, being smoothed out. We show more samples, individual IM outputs, and interpolations in Appendix D. The CGN can fail to produce high-quality texture maps for very small objects, e.g., for a bird high up in the sky, the texture map will still show large portions of the sky. Also, in some instances, a residue of the object is left on the background, e.g., a dog snout. For generating counterfactual images, this is not a problem as a different object will cover the residue. Lastly, the enforced constraints can lead to a reduction in realism of the composite images $\mathbf { x _ { g e n } }$ compared to the original BigGAN samples. We show examples and propose solutions for these problems in Appendix F.
94
+
95
+ # 4.2 WHICH INDUCTIVE BIASES ARE NEEDED TO ACHIEVE DISENTANGLEMENT?
96
+
97
+ We employ two kinds of biases: pre-training of modules and IM-specific losses. We find that pretraining is not necessary for our experiments on MNIST. However, when scaling to ImageNet, powerful pre-trained models are key for achieving good results. Furthermore, this allows to train the whole CGN on a single NVIDIA GTX 1080Ti within 12 hours, in contrast to BigGAN, which was trained on a Google TPU v3 Pod with 512 cores for up to 48 hours. To investigate each loss’ influence, we disable one loss at a time and measure its influence on the quality of the composite images. The composite images are on the image manifold, hence, we can calculate their Inception score (IS). As we train with pseudo ground truth, the performance of the unconstrained BigGAN is a natural upper bound. The used model reaches an IS of 202.9. To measure if the CGN collapsed during training, we monitor the mean value of the generated mask $\mu _ { m a s k }$ . A $\mu _ { m a s k }$ close to 1 means that $f _ { t e x t }$ is not training. Instead, it generates the output of the pre-trained BigGAN, hence, a mask of 1’s trivially minimizes the reconstruction loss $\mathcal { L } _ { r e c } ( \mathbf { x } _ { g t } , \mathbf { x } _ { g e n } )$ . The same is true for $\mu _ { m a s k }$ close to 0 and $f _ { b g }$ . The results in Table 1 indicate that each loss is necessary, and jointly optimizing all of them end-to-end is needed for a high IS without a collapse of $\mu _ { m a s k }$ . Removing $\mathcal { L } _ { s h a p e }$ , leads to bad quality masks (non-binary, only partially capturing the object). This results in a low IS since object texture and background get mixed in the composited image. Not using either $\mathcal { L } _ { t e x t }$ or $\mathcal { L } _ { b g }$ results in a high IS (as the output is close to the original BigGAN output), but a collapse of $\mu _ { m a s k }$ . The mechanisms do not disentangle their respective signal. Finally, disabling $\mathcal { L } _ { r e c }$ leads to a very low IS, since the IMs can optimize their respective loss without any constraint on the composite image. We show the evolution and collapse of the masks over training in Appendix G.
98
+
99
+ ![](images/f80588a958dd382179a1dc49b7511d48aa07c0919d90b679f15a2122b185b4fa.jpg)
100
+
101
+ ![](images/121952e9c12f27977974cd896d1add8b5081fe061888cc3f3fa39113a5d74421.jpg)
102
+ Figure 4: ImageNet Counterfactuals. The CGN successfully learns the disentangled shape, texture, and background mechanisms, and enables the generation of numerous permutations thereof.
103
+ Figure 5: Individual IM Outputs over Training. We show pre-masks ˜m, masks m, foregrounds f, and backgrounds b. The arrows indicate the beginning and end of the training. The initial output of the pre-trained models is gradually transformed while the composite image only marginally changes.
104
+
105
+ # 4.3 DO COUNTERFACTUAL IMAGES ENABLE TRAINING OF INVARIANT CLASSIFIERS?
106
+
107
+ The following experiments investigate if we can instill invariance into a classifier. We perform experiments on the MNIST variants, a cue-conflict dataset, and an OOD version of ImageNet.
108
+
109
+ MNIST Classification. In the training domain, shapes, colors, and textures are correlated with the class label. In the test domain, only the shapes correspond to the correct class. We compare to current approaches for training invariant classifiers: IRM (Arjovsky et al., 2019) and Learning-not-to-learn (LNTL) (Kim et al., 2019). For a detailed description we refer to Appendix C. Original $+ \ C G N$ is additionally trained on counterfactual data to predict the input labels of the shape IM. Original $^ +$ $G A N$ is a baseline that is trained on real and generated, non-counterfactual samples. IRM considers a signal to be causal if it is stable across several environments. We train IRM on 2 environments (90 $\%$ and $100 \%$ correlation) or 5 environments $90 \%$ , $9 2 . 5 ~ \%$ , $95 \%$ , $9 7 . 5 \ \%$ , and $100 \%$ correlation). LNTL considers color to be spurious, whereas we assume (complementary) that shapes are causal. Alternatively, we can follow the same assumption as IRM with an additional causal identification step, see Appendix H. The results in Table 2 confirm that training on counterfactual data leads to classifiers that are invariant to the spurious signals. We hypothesize that the difference between environments may be hard to pick up for IRM, especially if only a few are available. We find that we can further improve IRM’s performance by adding more environments. However, continually increasing the number of environments is an unrealistic premise and only feasible in simulated environments. Our results indicate that LNTL and IRM have trouble scaling to more complex data.
110
+
111
+ Table 1: Loss Ablation Study. We turn off one loss at a time. Values indicating mask collapse are red.
112
+
113
+ <table><tr><td>Lshape</td><td>Ltext</td><td>Lbg</td><td>Lrec</td><td>IS个</td><td>μmask</td></tr><tr><td>X</td><td></td><td></td><td></td><td>85.9</td><td>0.2±0.2%</td></tr><tr><td>√</td><td>×</td><td>√</td><td>√</td><td>198.4</td><td>0.9 ±0.1 %</td></tr><tr><td>√</td><td>√</td><td>×</td><td>√</td><td>195.6</td><td>0.1±0.1 %</td></tr><tr><td>√</td><td>√</td><td>√</td><td>X</td><td>38.39</td><td>0.3±0.2%</td></tr><tr><td></td><td></td><td>√</td><td>√</td><td>130.2</td><td>0.3±0.2%</td></tr><tr><td colspan="4">BigGAN (Upper Bound)</td><td>202.9</td><td>-</td></tr></table>
114
+
115
+ Table 2: MNISTs Classification. In the test set, colors and textures are randomized, only the digit’s shape corresponds to the class label. Random performance is at $1 0 \%$ .
116
+
117
+ <table><tr><td></td><td colspan="2">colored MNIST</td><td colspan="2">double-colored MNIST</td><td colspan="2">Wildlife MNIST</td></tr><tr><td></td><td>Train Acc 个</td><td>Test Acc 介</td><td>Train Acc 个</td><td>Test Acc 介</td><td>Train Acc 介</td><td>Test Acc ↑</td></tr><tr><td>Original</td><td>99.5%</td><td>35.9 %</td><td>100.0%</td><td>10.3 %</td><td>100.0 %</td><td>10.1 %</td></tr><tr><td>IRM(2 Envs)</td><td>99.6%</td><td>59.8 %</td><td>100.0%</td><td>67.7%</td><td>99.9 %</td><td>11.3 %</td></tr><tr><td>IRM (5 Envs)</td><td>-</td><td>-</td><td>99.9%</td><td>78.9 %</td><td>99.8%</td><td>76.8%</td></tr><tr><td>LNTL</td><td>99.3%</td><td>81.8 %</td><td>98.7%</td><td>69.9 %</td><td>99.9 %</td><td>11.5 %</td></tr><tr><td>Original + GAN</td><td>99.8 %</td><td>40.7 %</td><td>100.0%</td><td>10.8 %</td><td>100.0 %</td><td>10.4 %</td></tr><tr><td>Original + CGN</td><td>99.7%</td><td>95.1 %</td><td>97.4 %</td><td>89.0 %</td><td>99.2 %</td><td>85.7 %</td></tr></table>
118
+
119
+ Table 3: Shape vs. Texture. We can control the classifier’s shape or texture preference.
120
+
121
+ <table><tr><td>Trained on</td><td>Shape Bias</td><td>top-1 IN Acc 个</td><td>top-5 IN Acc 介</td></tr><tr><td>IN</td><td>21.39 %</td><td>76.13 %</td><td>92.86 %</td></tr><tr><td>SIN</td><td>81.37 %</td><td>60.18 %</td><td>82.62 %</td></tr><tr><td>IN + SIN</td><td>34.65 %</td><td>74.59 %</td><td>90.03 %</td></tr><tr><td>IN + CGN/Shape</td><td>54.82 %</td><td></td><td></td></tr><tr><td>IN + CGN/Text</td><td>16.67 %</td><td>73.98 %</td><td>91.71 %</td></tr><tr><td>IN + CGN/Bg</td><td>22.89 %</td><td></td><td></td></tr></table>
122
+
123
+ <table><tr><td></td><td colspan="3">Top-1 Test Accuracies</td></tr><tr><td>Trained on</td><td>IN-9个</td><td>Mixed-Same 价</td><td>Mixed-Rand 介</td><td>BG-Gap ↓</td></tr><tr><td>IN</td><td>95.6%</td><td>86.2%</td><td>78.9%</td><td>7.3%</td></tr><tr><td>SIN</td><td>89.2%</td><td>73.1 %</td><td>63.7%</td><td>9.4 %</td></tr><tr><td>IN + SIN</td><td>94.7%</td><td>85.9%</td><td>78.5%</td><td>7.4 %</td></tr><tr><td>Mixed-Rand</td><td>73.3%</td><td>71.5%</td><td>71.3%</td><td>0.2%</td></tr><tr><td>IN + CGN</td><td>94.2 %</td><td>83.4%</td><td>80.1%</td><td>3.3%</td></tr></table>
124
+
125
+ Table 4: Accuracies on IN-9. The reported accuracies are all obtained using a Resnet-50.
126
+
127
+ Texture vs. Shape Bias. The Cue Conflict dataset consists of images generated using iterative style transfer (Gatys et al., 2015) between a texture and a content image. A high shape bias corresponds to classification according to the content label and vice versa for texture. Their approach is trained on stylized ImageNet (SIN), either as a drop-in for ImageNet (IN) or as augmentation. We use a classifier ensemble, i.e., a classifier with a common backbone and multiple heads, each head invariant to all but one FoV. We average the predicted log-probabilies of each head for the final output of the ensemble. We conduct all experiments using a Resnet-50 architecture. As shown in Table 3, we can influence the individual bias of each classifier head without significant degradation in the ensemble’s performance.
128
+
129
+ Invariance over Backgrounds. Xiao et al. (2020) propose the BG-Gap to measure a classifier’s dependence on the background signal. Based on ImageNet-9 (IN-9), a subset of ImageNet with 9 coarse-grained classes, they build synthetic datasets. For Mixed-Rand, the backgrounds are randomized, while the object remains unchanged, hence background an class are decorrelated. For Mixed-Same they sample class-consistent backgrounds. The BG-Gap is the difference in performance between the two. Training on IN or SIN does not make it possible to disentangle and omit the background signal, as shown in Table 4. Directly training on Mixed-Rand leads to a drop in performance on the original data which might be due to the smaller training dataset. We can generate unlimited data of this type, hence, we are able to reduce the gap while achieving high accuracy on IN-9. However, a gap to a fully invariant classifier remains. We partially attribute this to the general remaining domain gap between generated and real images.
130
+
131
+ # 5 RELATED WORK
132
+
133
+ Our work is related to disentangled representation learning and the training of invariant classifiers.
134
+
135
+ Disentangled Representation Learning. A recent line of work in image synthesis aims to learn disentangled features for controlling the image generation process (Chen et al., 2016; Higgins et al., 2017; Liao et al., 2020). The challenge of the task is that the underlying factors can be highly correlated. Closely related to our work is (Li et al., 2020), which aims to disentangle background, shape, pose, and texture, using object bounding boxes for supervision. Their methods assumes images of a single object category (e.g. birds). We scale our approach to all classes of ImageNet which enables us to generate inter-class counterfactuals. A recent research direction explores the discovery of interpretable directions in GANs trained on ImageNet (Plumerault et al., 2020; Voynov & Babenko, 2020; Peebles et al., 2020). These approaches do not allow for generating counterfactual images. Kocaoglu et al. (2018) train two separate generative models, one generating binary feature labels (mustache, young), the other generating images conditioned on these labels. Their model can create images of previously unseen combinations of attributes, e.g., women with mustaches. This approach assumes a data set with fine-grained labels; hence it would not be suited to our application since labels for high-level concepts like shape are hard to obtain. Besserve et al. (2019) also leverage the idea of independent mechanisms to discover modularity in pre-trained generative models. Their approach does not allow for direct control of image attributes. Lastly, methods for causal generative modeling utilizing competing experts (von Kugelgen et al., 2020) have been demonstrated on toy ¨ datasets only. Further, none of the works above aim to use the generated images to improve upon a downstream task such as image classification.
136
+
137
+ Invariant Classification. Current approaches do not take an underlying causal model into account. Instead, they rely on different assumptions. Arjovsky et al. (2019) assume that the training data is collected into separate environments (e.g. different measurement circumstances). Correlations that are stable across environments are considered to be causal. Kim et al. (2019) aim to learn features that are uninformative of a given bias (spurious) signal. As mentioned above, attaining labels for shape or texture is expensive and not straight-forward. A recent strand of work is concerned with data augmentation for improving invariance against spurious correlations. Shetty et al. (2020) propose to train object detectors on generated semantic adversarial data, effectively reducing the texture dependency of their model. Their finding is in line with (Geirhos et al., 2018) that proposes to transfer the style of paintings onto images and use them for data augmentation. These approaches, however, do not allow to choose the specific signal we want invariance for, e.g., the background. The use of counterfactual data has been previously explored in natural language inference (Kaushik et al., 2020) and visual question answering (Teney et al., 2020).
138
+
139
+ # 6 DISCUSSION
140
+
141
+ We assume that an image can be neatly distinguished into a class foreground and background throughout this work. This assumption breaks once we consider more complex scenes with different object instances or for tasks without a clear foreground-background distinction, e.g., in medical images. The composition mechanism is a powerful bias, and crucial to making our model work. In other domains, equally strong biases may need to be identified to enable learning the SCM. An exciting research direction is to explore different configurations of IMs to tackle these challenges.
142
+
143
+ The additional constraints that we enforce during the CGN training lead to a reduced realism, as evidenced by the lower IS. We also find that our generated images can significantly influence a classifier’s preference, but their quality is not high enough to improve performance on ImageNet. However, even state-of-the-art generative models (with higher IS) are not good enough yet to generate data for training competitive ImageNet classifiers (Ravuri & Vinyals, 2019).
144
+
145
+ Lastly, in our experiments, we assume the causal structure to be known. This assumption is substantially stronger than the ones in more general standard disentanglement frameworks (Chen et al., 2016; Higgins et al., 2017). A possible extension to our work could leverage causal discovery to isolate IMs in a domain-agnostic manner, e.g., via meta-learning (Bengio et al., 2020). On the other hand, the definition of a causal structure and the approximation through IMs may be a principled way to integrate domain knowledge into a machine learning system, The need for better interfaces to integrate domain knowledge has recently been highlighted in (D’Amour et al., 2020).
146
+
147
+ # 7 CONCLUSION
148
+
149
+ In this work, we apply ideas from causality to generative modeling and the training of invariant classifiers. We structure a generative network into independent mechanisms to generate counterfactual images useful for training classifiers. With the use of several inductive biases, we demonstrate our approach on various MNIST variants as well as ImageNet. Our ideas are orthogonal to advances in generative modeling - with advances therein, our obtained results will further improve.
150
+
151
+ # ACKNOWLEDGMENTS
152
+
153
+ We acknowledge the financial support by the BMWi in the project KI Delta Learning (project number 19A19013O). Andreas Geiger was supported by the ERC Starting Grant LEGO-3D (850533). We would like to thank Yiyi Lao, Michael Niemeyer, and Elie Aljalbout for comments on an earlier paper draft and Songyou Peng, Michael Oechsle, and Kashyap Chitta for last-minute proofreading. We would also like to thank Vanessa Sauer for her general support and constructive criticism on the generated counterfactuals in earlier stages.
154
+
155
+ # REFERENCES
156
+
157
+ Michael A Alcorn, Qi Li, Zhitao Gong, Chengfei Wang, Long Mai, Wei-Shinn Ku, and Anh Nguyen. Strike (with) a pose: Neural networks are easily fooled by strange poses of familiar objects. In CVPR, 2019.
158
+
159
+ Martin Arjovsky, Leon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. ´ arXiv preprint arXiv:1907.02893, 2019.
160
+
161
+ Connelly Barnes, Eli Shechtman, Adam Finkelstein, and Dan B Goldman. Patchmatch: A randomized correspondence algorithm for structural image editing. In ACM TOG, 2009.
162
+
163
+ Sara Beery, Grant Van Horn, and Pietro Perona. Recognition in terra incognita. In ECCV, 2018.
164
+
165
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. TPAMI, 2013.
166
+
167
+ Yoshua Bengio, Tristan Deleu, Nasim Rahaman, Rosemary Ke, Sebastien Lachapelle, Olexa Bila- ´ niuk, Anirudh Goyal, and Christopher Pal. A meta-transfer objective for learning to disentangle causal mechanisms. In ICLR, 2020.
168
+
169
+ Michel Besserve, Arash Mehrjou, Remy Sun, and Bernhard Sch ´ olkopf. Counterfactuals uncover the ¨ modular structure of deep generative models. In ICLR, 2019.
170
+
171
+ Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. In ICLR, 2018.
172
+
173
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
174
+
175
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In NeurIPS, 2016.
176
+
177
+ M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In CVPR, 2014.
178
+
179
+ Alexander D’Amour, Katherine Heller, Dan Moldovan, Ben Adlam, Babak Alipanahi, Alex Beutel, Christina Chen, Jonathan Deaton, Jacob Eisenstein, Matthew D. Hoffman, Farhad Hormozdiari, Neil Houlsby, Shaobo Hou, Ghassen Jerfel, Alan Karthikesalingam, Mario Lucic, Yian Ma, Cory McLean, Diana Mincu, Akinori Mitani, Andrea Montanari, Zachary Nado, Vivek Natarajan, Christopher Nielson, Thomas F. Osborne, Rajiv Raman, Kim Ramasamy, Rory Sayres, Jessica Schrouff, Martin Seneviratne, Shannon Sequeira, Harini Suresh, Victor Veitch, Max Vladymyrov, Xuezhi Wang, Kellie Webster, Steve Yadlowsky, Taedong Yun, Xiaohua Zhai, and D. Sculley. Underspecification presents challenges for credibility in modern machine learning. arXiv preprint arXiv:2011.03395, 2020.
180
+
181
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
182
+
183
+ Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015.
184
+
185
+ Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In ICLR, 2018.
186
+
187
+ Robert Geirhos, Jorn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel,¨ Matthias Bethge, and Felix A Wichmann. Shortcut learning in deep neural networks. arXiv preprint arXiv:2004.07780, 2020.
188
+
189
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
190
+
191
+ Yash Goyal, Amir Feder, Uri Shalit, and Been Kim. Explaining classifiers with causal concept effect (CACE). arXiv preprint arXiv:1907.07165, 2019.
192
+
193
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
194
+
195
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017.
196
+
197
+ Maximilian Ilse, Jakub M Tomczak, and Patrick Forre. Designing data augmentation for simulating ´ interventions. arXiv preprint arXiv:2005.01856, 2020.
198
+
199
+ Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016.
200
+
201
+ Divyansh Kaushik, Eduard Hovy, and Zachary C Lipton. Learning the difference that makes a difference with counterfactually-augmented data. In ICLR, 2020.
202
+
203
+ Byungju Kim, Hyunwoo Kim, Kyungsu Kim, Sungjin Kim, and Junmo Kim. Learning not to learn: Training deep neural networks with biased data. In CVPR, 2019.
204
+
205
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
206
+
207
+ Murat Kocaoglu, Christopher Snyder, Alexandros G Dimakis, and Sriram Vishwanath. Causalgan: Learning causal implicit generative models with adversarial training. In ICLR, 2018.
208
+
209
+ Yuheng Li, Krishna Kumar Singh, Utkarsh Ojha, and Yong Jae Lee. Mixnmatch: Multifactor disentanglement and encoding for conditional image generation. In CVPR, 2020.
210
+
211
+ Yiyi Liao, Katja Schwarz, Lars Mescheder, and Andreas Geiger. Towards unsupervised learning of generative models for 3d controllable image synthesis. In CVPR, 2020.
212
+
213
+ Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In ECCV, 2018.
214
+
215
+ Francesco Locatello, Stefan Bauer, Mario Lucic, Sylvain Gelly, Bernhard Scholkopf, and Olivier ¨ Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. In ICML, 2018.
216
+
217
+ Eshed Ohn-Bar, Aditya Prakash, Aseem Behl, Kashyap Chitta, and Andreas Geiger. Learning situational driving. In CVPR, 2020.
218
+
219
+ Judea Pearl. Causality. Cambridge University Press, 2009.
220
+
221
+ William Peebles, John Peebles, Jun-Yan Zhu, Alexei A. Efros, and Antonio Torralba. The hessian penalty: A weak prior for unsupervised disentanglement. In ECCV, 2020.
222
+
223
+ Jonas Peters, Dominik Janzing, and Bernhard Scholkopf. ¨ Elements of causal inference. The MIT Press, 2017.
224
+
225
+ Antoine Plumerault, Herve Le Borgne, and C ´ eline Hudelot. Controlling generative models with ´ continuous factors of variations. In ICLR, 2020.
226
+
227
+ Xuebin Qin, Zichen Zhang, Chenyang Huang, Masood Dehghan, Osmar R Zaiane, and Martin Jagersand. U2-net: Going deeper with nested u-structure for salient object detection. Pattern Recognition, 2020.
228
+
229
+ Suman Ravuri and Oriol Vinyals. Seeing is not necessarily believing: Limitations of biggans for data augmentation. In ICLR Workshop LLD, 2019.
230
+
231
+ Amir Rosenfeld, Richard Zemel, and John K Tsotsos. The elephant in the room. arXiv preprint arXiv:1808.03305, 2018.
232
+
233
+ Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In NeurIPS, 2016.
234
+
235
+ Bernhard Scholkopf. Causality for machine learning. ¨ arXiv preprint arXiv:1911.10500, 2019.
236
+
237
+ Rakshith Shetty, Mario Fritz, and Bernt Schiele. Towards automated testing and robustification by semantic adversarial data generation. In ECCV, 2020.
238
+
239
+ Raphael Suter, Djordje Miladinovic, Bernhard Scholkopf, and Stefan Bauer. Robustly disentangled ¨ causal mechanisms: Validating deep representations for interventional robustness. In ICML, 2019.
240
+
241
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
242
+
243
+ Damien Teney, Ehsan Abbasnedjad, and Anton van den Hengel. Learning what makes a difference from counterfactual examples and gradient supervision. In ECCV, 2020.
244
+
245
+ Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IROS, 2017.
246
+
247
+ Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. In CVPR, 2011.
248
+
249
+ Julius von Kugelgen, Ivan Ustyuzhaninov, Peter Gehler, Matthias Bethge, and Bernhard Sch ¨ olkopf.¨ Towards causal generative scene models via competition of experts. In ICLR Workshop CLDM, 2020.
250
+
251
+ Andrey Voynov and Artem Babenko. Unsupervised discovery of interpretable directions in the gan latent space. arXiv preprint arXiv:2002.03754, 2020.
252
+
253
+ Lijun Wang, Huchuan Lu, Yifan Wang, Mengyang Feng, Dong Wang, Baocai Yin, and Xiang Ruan. Learning to detect salient objects with image-level supervision. In CVPR, 2017.
254
+
255
+ Zeyu Wang, Klint Qinami, Ioannis Christos Karakozis, Kyle Genova, Prem Nair, Kenji Hata, and Olga Russakovsky. Towards fairness in visual recognition: Effective strategies for bias mitigation. In CVPR, 2020.
256
+
257
+ Kai Xiao, Logan Engstrom, Andrew Ilyas, and Aleksander Madry. Noise or signal: The role of image backgrounds in object recognition. arXiv preprint arXiv:2006.09994, 2020.
258
+
259
+ Jianwei Yang, Anitha Kannan, Dhruv Batra, and Devi Parikh. Lr-gan: Layered recursive generative adversarial networks for image generation. arXiv preprint arXiv:1703.01560, 2017.
260
+
261
+ # APPENDIX A MNIST VARIANTS
262
+
263
+ # A.1 VARIATIONAL AUTOENCODERS ON COLORED MNIST
264
+
265
+ Figure 6 shows the latent space of a $\beta$ -VAE (Higgins et al., 2017) trained on colored MNIST. The VAE disentangles the data into different clusters present in the data. However, the axes do not correspond to color and shape, i.e., color and shape vary when traversing one latent. We used only two latent dimensions for visualization purposes; the problem is not resolved by adding more dimensions. The same behaviour can be observed for unconstrained GANs (Goodfellow et al., 2014), as a GAN also approximates the training distribution.
266
+
267
+ ![](images/ed465749fd0e3825bbf1f6a1a2a435b05f8ea10a2bf3071d89b0e7c1d6778b0c.jpg)
268
+ Figure 6: Colored MNIST. (left) Examples of data points. (right) Training a disentangled VAE with two latent dimensions on colored MNIST.
269
+
270
+ # A.2 MNISTS GENERATION
271
+
272
+ Colored MNIST. This dataset was proposed by Kim et al. (2019). They select ten distinct colors and assign each of them to a class. For each training image, they sample a color from a normal distribution with the class color as the mean. In the test set, the colors are randomly assigned. The variance $\sigma$ of the normal distribution can be used to control the amount of bias. We evaluate on the hardest, i.e., most biased, setting with $\sigma = 0 . 0 2$ .
273
+
274
+ Double-Colored MNIST. We follow the same procedure as for colored MNIST. We additionally encode the class label in the background color.
275
+
276
+ Wildlife MNIST. To build a version of MNIST closer to an ImageNet setting, we add a texture bias to the data. We follow the same procedure as for double-colored MNIST. We take textures from (Cimpoi et al., 2014) and use ten images of the texture class ”striped” to encode the label in the foreground. Similarly, we encode the label in the background with textures of the texture class ”veiny.” We do not add noise to texture to add stochasticity. Instead, we sample a $3 2 \mathrm { x } 3 2 $ patch from the larger texture image. The textures are multi-modal; hence, these patches can look quite different.
277
+
278
+ # A.3 ABLATION STUDIES
279
+
280
+ In Figure 7, we study the effects of the number of counterfactual data points on the test accuracy. We increase the amount of counterfactual data while the amount of real data is fixed (50k for MNIST). We also ablate the amount of counterfactual drawn per sampled noise $u$ . We find that the higher the number of counterfactual data points, the better. Also, it is advantageous to draw several counterfactuals per $u$ . Our intuition is that several counterfactuals provide a more stable signal of the non-spurious factor.
281
+
282
+ ![](images/b2c10e801b393cc80a5c8b85c3a59bdc9baacfb6f9b7b738c9a2f4e8e6c27a57.jpg)
283
+ Figure 7: MNIST Ablation Study. To improve visibility, we start with $1 0 ^ { 4 }$ counterfactual data points, below the performance is marginally better than the fully biased baseline. The CF ratio indicates how many counterfactuals we generate per sampled noise. For colored MNIST, the maximum CF ratio is ten as there are only ten possible colors per shape.
284
+
285
+ # APPENDIX B CAUSAL STRUCTURES
286
+
287
+ The two SCM’s are as follows:
288
+
289
+ # MNISTs
290
+
291
+ # ImageNet
292
+
293
+ $$
294
+ \begin{array} { r } { \mathbf { M } : = f _ { s h a p e } ( Y _ { 1 } , U _ { 1 } ) } \\ { \mathbf { F } : = f _ { t e x t , 1 } ( Y _ { 2 } , U _ { 2 } ) } \\ { \mathbf { B } : = f _ { t e x t , 2 } ( Y _ { 3 } , U _ { 3 } ) } \\ { \mathbf { X _ { g e n } } : = C ( \mathbf { M } , \mathbf { F } , \mathbf { B } ) } \end{array}
295
+ $$
296
+
297
+ $$
298
+ \begin{array} { c } { { \bf M } : = f _ { s h a p e } ( Y _ { 1 } , U _ { 1 } ) } \\ { { \bf F } : = f _ { t e x t } ( Y _ { 2 } , U _ { 2 } ) } \\ { { \bf B } : = f _ { b g } ( Y _ { 3 } , U _ { 3 } ) } \\ { { \bf X _ { g e n } } : = C ( { \bf M } , { \bf F } , { \bf B } ) } \end{array}
299
+ $$
300
+
301
+ where $\mathbf { M }$ is the mask, $\mathbf { F }$ is the foreground, $\mathbf { B }$ is the background, $U _ { j }$ is the exogenous noise, $Y _ { j }$ is the class label, $\mathbf { X } _ { \mathbf { g e n } }$ is the generated image, and $f _ { j }$ and $C$ are the independent mechanisms.
302
+
303
+ # APPENDIX C IMPLEMENTATION DETAILS
304
+
305
+ # C.1 SHAPE LOSS DETAILS
306
+
307
+ The full shape loss is as follows:
308
+
309
+ $$
310
+ \begin{array} { l } { \mathcal { L } _ { s h a p e } ( f _ { s } ) = \mathcal { L } _ { b i n a r y } ( f _ { s } ) + \mathcal { L } _ { m a s k } ( f _ { s } ) } \\ { = \mathbb { E } _ { p ( \mathbf { u } , y ) } \left[ \displaystyle \sum _ { i = 1 } ^ { N } - m _ { i } \log _ { 2 } ( m _ { i } ) - ( 1 - m _ { i } ) * \log _ { 2 } ( 1 - m _ { i } ) \right] } \\ { \displaystyle \qquad + \mathbb { E } _ { p ( \mathbf { u } , y ) } \left[ \operatorname* { m a x } \left( 0 , \tau - \frac { 1 } { N } \displaystyle \sum _ { i = 1 } ^ { N } m _ { i } \right) + \operatorname* { m a x } \left( 0 , \frac { 1 } { N } \displaystyle \sum _ { i = 1 } ^ { N } m _ { i } - \tau \right) \right] } \end{array}
311
+ $$
312
+
313
+ where $\mathcal { L } _ { b i n a r y }$ is the pixel-wise binary entropy, $\mathcal { L } _ { m a s k }$ is the mask loss, $\mathbf { m } = f _ { s h a p e } ( \mathbf { u } , y )$ is the mask generated by $f _ { s h a p e }$ and $\tau$ is a scalar threshold. $\mathcal { L } _ { b i n a r y }$ enforces the output to be close to either 0 or 1. $\mathcal { L } _ { m a s k }$ prohibits trivial solutions, i.e., masks with all 0’s or $1 { \mathrm { : } } \mathrm { s }$ , that are outside the interval defined by $\tau$ . We set $\tau = 0 . 1$ in all experiments. A $\tau$ of 0.1 means that $\mu _ { m a s k }$ is forced to be in the interval of [0.1, 0.9] – the main object should occupy more than $1 0 \%$ and less than $9 0 \%$ of the image.
314
+
315
+ # C.2 TEXTURE LOSS DETAILS
316
+
317
+ The sampling procedure for $\mathcal { L } _ { t e x t }$ is as follows: we sample 36 patches of size $1 5 \times 1 5$ from the regions where the mask is closest to 1. Out of these 36 patches, we build a $6 \times 6$ patch grid. Finally, we upscale the grid to the full $2 5 6 \times 2 5 6$ resolution; we denote this grid as pg. We then minimize a perceptual loss between the foreground f (the output of $f _ { t e x t . }$ ) and the patchgrid: $\mathcal { L } _ { t e x t } ( \mathbf { f } , \mathbf { p } \mathbf { g } )$ .
318
+
319
+ # C.3 CGN TRAINING ON IMAGENET.
320
+
321
+ Training Settings. For training the CGN, we jointly optimize the following loss:
322
+
323
+ $$
324
+ \begin{array} { l } { { \mathcal { L } = \mathcal { L } _ { r e c } + \mathcal { L } _ { s h a p e } + \lambda _ { 5 } \mathcal { L } _ { t e x t } + \lambda _ { 6 } \mathcal { L } _ { b g } } } \\ { { \phantom { \mathcal { L } = \mathcal { L } _ { { L } } } } } \\ { { \phantom { \mathcal { L } = \mathcal { L } _ { { L } e c } + \lambda _ { 2 } \mathcal { L } _ { p e r c } + \lambda _ { 3 } \mathcal { L } _ { b i n a r y } + \lambda _ { 4 } \mathcal { L } _ { m a s k } + \lambda _ { 5 } \mathcal { L } _ { t e x t } + \lambda _ { 6 } \mathcal { L } _ { b g } } } } \end{array}
325
+ $$
326
+
327
+ We use the following lambdas: $\lambda _ { 1 } = 1 0 0 , \lambda _ { 2 } = 5 , \lambda _ { 3 } = 3 0 0 , \lambda _ { 4 } = 5 0 0 , \lambda _ { 5 } = 5 , \lambda _ { 6 } = 2 0 0 0$ . For the optimization we use Adam (Kingma & Ba, 2014), and set the learning rate of $f _ { s h a p e }$ to 8e-6, and for both $f _ { t e x t }$ and $f _ { b g }$ to 1e-5. We do not use real data for training the CGN so we do not need to any data loading. We sample a single image from BigGAN and the CGN and accumulate the loss gradients for 4000 steps before taking a gradient step. Accumulating large pseudo-batches proved crucial for high-quality gradients, confirming the observations of (Brock et al., 2018). Further, using a batch size of one makes it possible to train on a single GPU. For the perceptual losses, i.e., $\mathcal { L } _ { p e r c }$ and $\mathcal { L } _ { t e x t }$ , we use pre-trained VGG16 with batch normalization layers. We calculate the style reconstruction loss (Johnson et al., 2016) of the features after the first four max-pooling layers.
328
+
329
+ We use the pre-trained BigGAN models from https://github.com/huggingface/ pytorch-pretrained-BigGAN. We experiment with different values for the truncation value of the truncated normal distribution used to sample the input noise. However, we find it does not impact the performance of the CGN. Also, a low value leads to worse performance of the trained classifiers; hence, we leave the truncation value at 1.
330
+
331
+ Hyperparameter Search. We measure the Inception score (IS) during training and the mean value of the masks $\mu _ { m a s k }$ to detect mask collapse. We also observe the generated images for a fixed noise vector; see the outputs in Figure 5. Our overall objective is a high IS and a stable $\mu _ { m a s k }$ . Further, we aim for high-quality output of all IMs (Masks: binary, capture only class-specific parts; Textures: no background/global shape visible, Background: no trace of foreground objects visible). We observe these outputs for several classes during optimization. The hyperparameters can be tuned mostly independently from each other, i.e., a better lambda for the mask loss does not influence the quality of the texture maps much.
332
+
333
+ # C.4 CLASSIFIER TRAINING
334
+
335
+ MNIST. We use the same CNN architecture for all experiments and approaches. For IRM, we produce versions of double-colored MNIST and Wildlife MNIST with different degree of correlation between the label and the foreground colors/textures and background colors/textures. We then train IRM on 2 environments $90 \%$ and $100 \%$ correlation) or 5 environments $90 \%$ , $9 2 . 5 \%$ , $9 5 \%$ , $9 7 . 5 \%$ , and $100 \%$ correlation). We schedule the gradient norm penalty weight, starting from 0, then linearly increasing it over the training episodes. We find the scheduling to be crucial for IRM to converge and achieve good performance.
336
+
337
+ ImageNet. We use a ResNet-50 from PyTorch torchvision. We share the weight up to the last layer as a common backbone and add three fully-connected heads (shape, texture, background). Each of the heads is provided its respective label when training on the counterfactual images. On the real images, we average the logits of all heads. This approach allows the single classifiers to focus on its assigned FoV while the ensemble performs well overall. Similarly to the experiments by (Geirhos et al., 2018), we begin the training with pre-trained weights from ImageNet. We train for 70 episodes with Stochastic Gradient Descent using a batch size of 512. Of the 512 images, 256 are real images, 256 are counterfactual images. We find that an even ratio between real and counterfactual images leads to the best results in terms of optimization stability and performance. We use a momentum of 0.9, weight decay (1e-4), and a learning rate of 0.1, multiplied by a factor of 0.001 after 30 and 60 epochs.
338
+
339
+ # APPENDIX D MORE SAMPLES AND INTERPOLATIONS
340
+
341
+ # D.1 INDIVIDUAL IM OUTPUTS FOR DIFFERENT CLASS TYPES
342
+
343
+ In the following we illustrate the individual outputs of each IM for different classes. In each figure, we show from top to bottom: pre-masks ˜m, masks m, texture maps f, backgrounds b, and composite images ${ \bf x } _ { g e n }$ . For all shown outputs, we set the truncation parameter for the noise to 0.5.
344
+
345
+ ![](images/a726550bd8943b5a6da699319e761992de36d1174b21906786f20414a3d409e1.jpg)
346
+ Figure 8: IM Outputs for ’jay’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
347
+
348
+ ![](images/2ef6468f6968992e29b0881e055cbfb1dd547189adc991b8b207c8388e1b32ee.jpg)
349
+ Figure 9: IM Outputs for ’wallaby’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
350
+
351
+ ![](images/ff8846d919104cdf6e6490b0687f4319bf94b5a310bb866850f88bdb1f3772fe.jpg)
352
+ Figure 10: IM Outputs for ’king penguin’. From top to bottom: ˜m, m, f , b, xgen.
353
+
354
+ ![](images/781dea76d37f3aeef072ed869b8ef70856df599dfd16bc5837689549e24eef56.jpg)
355
+ Figure 11: IM Outputs for ’vizsla’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
356
+
357
+ ![](images/7ddca73eb8fc4b7b5c440d2af2927120f3d79eca2d01c29767ac3bbfe379bbaf.jpg)
358
+ Figure 12: IM Outputs for ’barn’. From top to bottom: ˜m, m, f , b, ${ \bf x } _ { g e n }$ .
359
+
360
+ ![](images/807199a77858629c8aa7651c15af649edba3b6997abdd03bbc799da9bb6e8a23.jpg)
361
+ Figure 13: IM Outputs for ’speedboat’. From top to bottom: ˜m, m, f , b, ${ \bf x } _ { g e n }$ .
362
+
363
+ ![](images/953ee35f7fe66fd2d27b31c3f6362f93356e1b14c1efb50a6a87405f9e48273c.jpg)
364
+ Figure 14: IM Outputs for ’viaduct’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
365
+
366
+ ![](images/30134a87478d49668a530ae4edfd78c7ac192c351b65211e9fc7e98b0c0072ed.jpg)
367
+ Figure 15: IM Outputs for ’cauliflower’. From top to bottom: ˜m, m, f , b, xgen.
368
+
369
+ ![](images/1a01bf5e7adf44b1af992af33432d5050742066c93e79c49b7ac6373b0f71044.jpg)
370
+ Figure 16: IM Outputs for ’bell pepper’. From top to bottom: ˜m, m, f , b, xgen.
371
+
372
+ ![](images/dcedcc002e51cedbfd64a8cf8d454671ae4d2f5a496a05d599b3599355720fee.jpg)
373
+ Figure 17: IM Outputs for ’strawberry’. From top to bottom: $\mathbf { \tilde { n } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
374
+
375
+ ![](images/02cbc05ef6161cc89c79089211af170f6f202ce5236e96be18d2aa0a80405cb1.jpg)
376
+ Figure 18: IM Outputs for ’geyser’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
377
+
378
+ ![](images/d7ea937311b25b09a8360e026912a2b212969ad2d34d903d7794f92d2abf9b9c.jpg)
379
+ Figure 19: IM Outputs for ’agaric’. From top to bottom: $\tilde { \mathbf { m } } , \mathbf { m } , \mathbf { f } , \mathbf { b } , \mathbf { x } _ { g e n }$ .
380
+
381
+ ![](images/d17c5360c449b5dfd80d7c4b9ff684ac457e35dcac78f58761e8f42a0f9b028b.jpg)
382
+ Figure 20: Interpolating Shapes. We interpolate between $u$ and $y$ pairs.
383
+
384
+ jack-o'- lantern
385
+
386
+ monarch butterfly
387
+
388
+ ![](images/2196d2765b0db06e8315e10abbd533f9e305b6ecef172a191076be9b4879ea10.jpg)
389
+ Figure 21: Interpolating Textures. We interpolate between $u$ and $y$ pairs.
390
+
391
+ ![](images/9b3f8d1df132c88f3add58bfbfa20cb62b252fb874b69b60ba5e06d883fbe557.jpg)
392
+ Figure 22: Interpolating Backgrounds. We interpolate between $u$ and $y$ pairs.
393
+
394
+ # D.3 MORE COUNTERFACTUAL SAMPLES
395
+
396
+ ![](images/f208fa0cd4b34c5c09390be75bcd73fcef4adda55aef56d9edb8a084e5a80749.jpg)
397
+ Figure 23: MNIST Counterfactuals. From Left to Right: colored, double-colored-, and Wildlife MNIST.
398
+
399
+ ![](images/8618f3392f54df2de489b1b1159370e8690a6272cbc14fd38ba32c9c9ca7c20b.jpg)
400
+
401
+ ![](images/62ee59fe95f92de5fd192baa77450abd9d659a0474b4935bb2c228f2229cca1f.jpg)
402
+
403
+ Figure 24: ImageNet Counterfactuals. Top: Counterfactual Images. Bottom: ImageNet labels.
404
+
405
+ <table><tr><td rowspan=1 colspan=1>Row</td><td rowspan=1 colspan=1>Column</td><td rowspan=1 colspan=1>Shape</td><td rowspan=1 colspan=1>Texture</td><td rowspan=1 colspan=1>Background</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>offshore rig</td><td rowspan=1 colspan=1>ambulance</td><td rowspan=1 colspan=1>breakwater</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>mushroom</td><td rowspan=1 colspan=1>sand viper</td><td rowspan=1 colspan=1>ostrich</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>snowmobile</td><td rowspan=1 colspan=1>French Loaf</td><td rowspan=1 colspan=1>Arabian camel</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>katamaran</td><td rowspan=1 colspan=1>cheetah</td><td rowspan=1 colspan=1> garden spider</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>bald eagle</td><td rowspan=1 colspan=1>strawberry</td><td rowspan=1 colspan=1>spike</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>triumphal arc</td><td rowspan=1 colspan=1>standard poodle</td><td rowspan=1 colspan=1>bullfrog</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>forklift</td><td rowspan=1 colspan=1>theater curtain</td><td rowspan=1 colspan=1>valley</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>whine bottle</td><td rowspan=1 colspan=1>pill bottle</td><td rowspan=1 colspan=1>alp</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1> pirate ship</td><td rowspan=1 colspan=1>trench coat</td><td rowspan=1 colspan=1>beaver</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>submarine</td><td rowspan=1 colspan=1>race car</td><td rowspan=1 colspan=1>hay</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>wood rabbit</td><td rowspan=1 colspan=1> jack-o&#x27;-lantern</td><td rowspan=1 colspan=1>water ouzel</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1> teapot</td><td rowspan=1 colspan=1>military uniform</td><td rowspan=1 colspan=1>baseball</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr></table>
406
+
407
+ In the following we illustrate the individual outputs of each IM over the course of training. In each figure, we show from top to bottom: pre-masks ˜m, masks m, texture maps f, backgrounds b, and composite images ${ \bf x } _ { g e n }$ .
408
+
409
+ ![](images/5e983ca31a5c9fe82c419fc44222dec0a7f11646ac9f92641915b89626cc63b5.jpg)
410
+ Figure 25: IM Outputs over Training for ’dalmatian’ The arrows indicate the beginning and end of the training.
411
+
412
+ ![](images/d5b1e1e3cb1a98171d5ad98330070b28d20a4a4d9c94db2fe95cb12486620abb.jpg)
413
+ Figure 26: IM Outputs over Training for ’cauliflower’ The arrows indicate the beginning and end of the training.
414
+
415
+ ![](images/9646160ff9ceb8a5ef74c06c1e00beff64805db8ce93e4c4ecaa171ae38bacdb.jpg)
416
+ Figure 27: IM Outputs over Training for ’castle’ The arrows indicate the beginning and end of the training.
417
+
418
+ ![](images/8279076015204fade1772909d39e58976ddfe047d92332f1ded6150892ff4b42.jpg)
419
+ Figure 28: IM Outputs over Training for ’ringtailed lemur’ The arrows indicate the beginning and end of the training.
420
+
421
+ ![](images/4869e317c99f56cf30a4892dc72b1386f6b5dd72cdbee248cd6ad45c9b269dcd.jpg)
422
+ Figure 29: IM Outputs over Training for ’mushroom’ The arrows indicate the beginning and end of the training.
423
+
424
+ ![](images/3f9c327c7cf1065327fecf2aae2c7d345c8e639213a9f2f7caeda834dbc87bba.jpg)
425
+ Figure 30: Texture-Background Entanglement. For relatively small objects, the texture maps can still show traces of the background. A possible remedy would be to choose the patch size for $\mathcal { L } _ { t e x t }$ dependent on the relative object size.
426
+
427
+ ![](images/43a6776fb0a5591d7984aa43f2957d0ad493e1f281a4f26ffdafa77d84f38b30.jpg)
428
+ Figure 31: Background Residues. Especially for large objects, i.e., where large regions need to be in-painted, there can be faint artifacts visible. For the composite images, this is not a problem as an object will cover the residue.
429
+
430
+ ![](images/d840304061e7922037dc6afcfb53868798a836d974540dbdbb1e2108efc3bfc0.jpg)
431
+ Figure 32: Reduced Realism. As evidence by the lower IS, the generated images $x _ { g e n }$ are generally lower in realism. This reduced realism is due to the constraints that we enforce and the simplified composition mechanism. A solution might be to add a shallow refinement network after the composer.
432
+
433
+ # APPENDIX G COLLAPSING MASKS
434
+
435
+ ![](images/084316d6e69bb5d78bd263eb76cf2925ee59e115d5ffd6403f54ef98cf4eff2c.jpg)
436
+ Figure 33: Masks when disabling different losses. From left to right: the beginning of training, training without $\mathcal { L } _ { s h a p e }$ , training without $\mathcal { L } _ { t e x t }$ , training without $\mathcal { L } _ { b g }$ , training with all losses. The third and fourth columns show the collapse of the masks, as described in section 4.2.
437
+
438
+ # APPENDIX H CGN AUGMENTATION WITH IRM ASSUMPTIONS
439
+
440
+ We can drop the assumption of a priori knowledge of the causal signal and follow the same assumption as IRM: several environments with varying correlations, an invariant signal is considered causal. In the following, we train a CGN on double-colored MNIST. We then generate counterfactual data to train three classifiers:
441
+
442
+ • Shape classifier (SC): invariant wrt. object color and background color • Object color classifier (OCC): invariant wrt. object shape and background color • Background color classifier (BCC): one invariant wrt. object shape and object color
443
+
444
+ We can measure their respective performance in the environments used to train IRM. In these environments, only the shape is stably correlated with the label; the foreground and background color vary in their degree of correlation. Based on the results in Table 5, we can determine the shape to be the causal signal as only the test accuracy of SC is stable across environments.
445
+
446
+ <table><tr><td>Degree of Correlation</td><td>Accuracy SC[%]</td><td>Accuracy OCC[%]</td><td>Accuracy ] BCC[%]</td></tr><tr><td>90 %</td><td>85.05 ± 0.12</td><td>58.72 ± 0.67</td><td>82.47 ± 0.13</td></tr><tr><td>95 %</td><td>85.08 ± 0.07</td><td>62.69 ± 0.58</td><td>87.96 ± 0.12</td></tr><tr><td>100 %</td><td>85.14 ± 0.10</td><td>65.05 ± 1.32</td><td>90.16 ± 0.13</td></tr></table>
447
+
448
+ Table 5: Test Accuracy on double-colored MNIST. We report the mean and standard deviation over three random seeds.
parse/train/BXewfAYMmJw/BXewfAYMmJw_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BXewfAYMmJw/BXewfAYMmJw_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BXewfAYMmJw/BXewfAYMmJw_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMn9jAcYQ/BkMn9jAcYQ.md ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COUNTERING LANGUAGE DRIFT VIA GROUNDING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ While reinforcement learning (RL) shows a lot of promise for natural language processing—e.g. when fine-tuning natural language systems for optimizing a certain objective—there has been little investigation into potential language drift: when an external reward is used to train a system, the agents’ communication protocol may easily and radically diverge from natural language. By re-casting translation as a communication game, we show that language drift indeed happens when pre-trained agents are fine-tuned with policy gradient methods. We contend that simply adding a “naturalness” constraint to the reward, e.g. by using language model log likelihood, does not fully address the issue, and argue that (perceptual) grounding is required. That is, while language model constraints impose syntactic conformity, they do not lead to semantic correspondence. Our experiments show that grounded models give the best communication performance, while retaining English syntax along with the ability to convey the intended semantics.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In the summer of 2017, the internet was briefly abuzz with the mistaken viral message that a leading AI research lab had to “unplug its AI” because it “had gone rogue”. What had in fact happened was that two chatbots, under certain conditions, had, rather unsurprisingly, started diverging from their English training data and had instead reverted to their own ungrammatical communication protocol for solving a negotiation task (Lewis et al., 2017). Instead of saying something like “hats have no value for me” the system would starting saying things like “hat have zero to me to me to me to me”. As was soon made clear by the parties involved, this sort of language drift is to be expected if we are optimizing for an external reward, for example one based on whether or not two agents successfully accomplish a negotiation.
12
+
13
+ While language drift is to be expected under external reward, it is natural to ask what we can do to avoid it. Consider policy gradient methods, for example, and suppose we sample an output sequence from an English language decoder for a given task: sampling a non-grammatical sequence might still be rewarded if we manage to solve the task (e.g., due to some correct words; or because an interlocutor understood us anyway, or guessed correctly), which would quickly move the decoder away (drifting) from English. If we were able to keep drift in check, we could maximize reward while retaining the “Englishness” of the decoder, with obvious benefits for interpretability and interaction with humans. That is, while search space size prohibits the direct usage of policy gradient methods for training natural language decoders from scratch, we could prevent pre-trained models from drifting while we optimize for the desired reward using policy gradients.
14
+
15
+ Thus, the ability to stop policy gradient methods from diverging from natural language enables interesting long-term possibilities for exploration: imagine e.g. fine-tuning a pre-trained language model trained on large amounts of data, call it a “language module”, for a given generation task with limited data. When training chit-chat dialogue agents, for example, we often want to optimize for some very high-level reward, such as engagingness or consistency, with hardly enough data to learn simple English grammar. Or consider what might happen when we train agents using self-play to actively use natural language to change the other agent’s (mental) state, rather than having a model passively observe language usage in some corpus or dataset, as usually happens.
16
+
17
+ In this work, we study the question of language drift. Drawing inspiration from Lee et al. (2018), we re-cast translation as a communication game. Two machine translation (MT) agents—i.e., encoderdecoder models with attention—are tasked with successfully translating source language sequences to the target language using a third pivot language as an intermediary. The communication channel (the output of the first agent’s decoder, which is fed to the second agent’s encoder as input) is updated via policy gradient methods to optimize for translating into the target language, effectively fine-tuning two separate pre-trained MT models via a pivot language.
18
+
19
+ ![](images/53614ee295bce2f819a6bb953e51c3e581ad69c269e32405f55577253146ce19.jpg)
20
+ Figure 1: Diagram of our communication game.
21
+
22
+ While the subject of communication need not be language (e.g., for Lee et al. (2018), agents learn to translate by communicating about images), three-way translation via pivot is an excellent way for studying the current problem: we can check exactly to what extent the communicated sequence corresponds to both the intended meaning, as well as to the gold standard sequence. We can think of this setup as an agent aiming to communicate its state to another agent via some protocol—yet in this case, the mental states and intermediary communication protocol are completely interpretable.
23
+
24
+ In what follows, we show that language drift happens, and quite dramatically so, when fine-tuning using policy gradients. We then show that the most intuitive way of solving this problem—adding an “Englishness” constraint, such as the log-probability assigned by a language model, to the reward function—does not in fact lead to the desired consequences. Indeed, there is nothing preventing such models from learning to translate “Two giraffes standing next to a white truck in the savanna” from French to German via “Democracy is a political system” as the English intermediary.
25
+
26
+ Hence, we contend that what is missing is grounding: while language model constraints impose syntactic conformity, they do not lead to semantic correspondence. Humans don’t invent unique idiolects for every individual interlocutor, exactly because they are grounded: we share strong priors, social and behavioral norms, and a common sensorimotor experience of our physical environment. Thus, “not going rogue” means not only sticking to the prescribed language, but more importantly preserving meaning, which means staying grounded.
27
+
28
+ Our experiments show that fine-tuning the communication channel with visual grounding leads to the highest communication performance $( \mathrm { F r E n D e } )$ ) as well as the best retention of original syntax and intended semantics. Our token frequency analysis corroborates our hypothesis, and shows that grounding is key for preserving the token frequency distribution of the pivot language (English).
29
+
30
+ # 2 PRIOR WORK
31
+
32
+ Our work is inspired by recent work in protocols or languages that emerge from multi-agent interaction (Lazaridou et al., 2017; Lee et al., 2018; Andreas et al., 2017; Evtimova et al., 2018; Kottur et al., 2017; Havrylov & Titov, 2017; Mordatch & Abbeel, 2017). Work on the emergence of language in multi-agent settings goes back a long way (Steels, 1997; Nowak & Krakauer, 1999; Kirby, 2001; Briscoe, 2002; Skyrms, 2010). In our case, we are specifically interested in tabula inscripta agents that are already pre-trained to generate natural language, and we are primarily concerned with keeping their language natural during further training.
33
+
34
+ Reinforcement Learning (RL) has been applied to fine-tuning models for various natural language generation tasks, including summarization (Ranzato et al., 2015; Paulus et al., 2017), information retrieval (Nogueira & Cho, 2017), MT (Gu et al., 2017; Bahdanau et al., 2016) and dialogue (Li et al., 2017). Our work can be viewed as fine-tuning MT systems using an intermediary pivot language. In MT, there is a long line of work of pivot-based approaches, most notably Muraki (1986) and more recently with neural approaches (Wang et al., 2017; Cheng et al., 2017; Chen et al., 2018). There has also been work on using visual pivots directly (Hitschler et al., 2016; Nakayama & Nishida, 2017; Lee et al., 2018). Grounded language learning in general has been shown to give significant practical improvements in various natural language understanding tasks (Gella et al., 2017; Elliott & Kad´ ar, 2017; Chrupała et al., 2015; Kiela et al., 2017; K ´ ad´ ar et al., 2018). Meanwhile, Bowman ´ et al. (2016) found a powerful decoder to ignore the latent representation in VAEs for language.
35
+
36
+ # 3 TASK AND MODELS
37
+
38
+ We recast translation as a communication game involving two MT agents: $\mathrm { F r } { } \mathrm { E n }$ and $\mathrm { E n } { } \mathrm { D e }$ (see Figure 1). Our dataset consists of $N$ triples of aligned sentences $\{ \mathrm { F r } _ { i } , \mathrm { E n } _ { i } , \mathrm { D e } _ { i } \} _ { i = 1 } ^ { N }$ , where $\operatorname { E n } _ { i }$ is only used for evaluation. We first feed the French sentence $\mathrm { F r } _ { i }$ to Agent A, which generates an English message $\overline { { \mathrm { E n } _ { i } } }$ as output. Agent B is then trained to maximize the log likelihood of the ground truth German sentence given the English message, i.e. $\log p ( \mathrm { D e } _ { i } | \overline { { \mathrm { E n } _ { i } } } )$ . Agent A is trained using REINFORCE (Williams, 1992) with reward $R = \log p _ { B } ( { \bf D e } _ { i } | \overline { { \bf E n _ { i } } } )$ .1 This encourages Agent A to develop helpful communication policies for Agent B, and allows Agent B to adapt to Agent A’s new policies. In other words: communication via the pivot language (English) is a success if we are able to translate the intended source sequence (French) into the desired target sequence (German).
39
+
40
+ Both agents are pre-trained individually before communication, meaning that we start off with English as an intermediate language in the early stages of the game. This work examines what happens to the intermediate language as we fine-tune the system jointly: will the agents keep communicating in English, or diverge? And if so, what can we do to prevent that from happening?
41
+
42
+ # 3.1 AUXILIARY TASKS
43
+
44
+ To help reduce the search space of intermediate languages, we use two auxiliary tasks: language modelling (LM) and image-caption retrieval (henceforth called the grounding model).
45
+
46
+ Language Model Given a language model pre-trained on a standard English corpus, the log likelihood of the English message informs its general “Englishness”. We incorporate this into the reward for Agent A, so that it learns to send messages that are plausible English.2 Reward for Agent A is:
47
+
48
+ $$
49
+ R _ { \mathrm { L M } } = \log p _ { B } ( \mathrm { D e } _ { i } | \overline { { \mathrm { E n } _ { i } } } ) + \beta _ { L M } \log p _ { L M } ( \overline { { \mathrm { E n } _ { i } } } ) .
50
+ $$
51
+
52
+ Grounding Model Let us assume we have access to a set of images $\{ \mathrm { I m } \mathbf { g } _ { i } \}$ associated with each triple $\{ \mathrm { F r } _ { i } , \mathrm { E n } _ { i } , \mathrm { D e } _ { i } \}$ . Given a pre-trained image-caption retrieval model, such as ${ \mathrm { V S E } } { + } { + }$ (Faghri et al., 2018), the log likelihood of the image given the English message (and vice versa) informs how much the English message is grounded in the original semantic content (Kiela et al., 2017). We incorporate the ranking loss into Agent A’s reward.
53
+
54
+ $$
55
+ R _ { { \bf G } } = \log p _ { B } ( { \bf D e } _ { i } | \overline { { { \bf E } { \bf n } _ { i } } } ) + \beta _ { G } \log p _ { G } ( { \bf I m g } _ { i } | \overline { { { \bf E } { \bf n } _ { i } } } ) .
56
+ $$
57
+
58
+ Note that $\beta _ { L M } , \beta _ { G }$ are hyperparameters.
59
+
60
+ # 3.2 TRAINING OBJECTIVE
61
+
62
+ For brevity the $t$ -th token in the $i$ -th English sentence $\mathrm { E n } _ { i ; t }$ is abbreviated to $\mathrm { E n } _ { t }$ , and $\operatorname { E n } _ { i }$ to En.
63
+
64
+ Policy Gradient Training At decoding timestep $t$ , Agent A takes an action (outputs token $\overline { { \mathrm { E n } _ { t } } }$ ) given an environment (previous hidden states and previous token $\overline { { \mathrm { E n } _ { t - 1 } } } )$ . It receives reward $R$ at the end of the sequence, from which we subtract a state-dependent baseline $\overline { { R _ { t } } }$ to reduce variance. Therefore, we maximize $( R - \overline { { R _ { t } } } ) \log p ( \overline { { \mathrm { E n } _ { t } } } | \overline { { \mathrm { E n } _ { < t } } } , \mathrm { F r } )$ . In addition, we employ entropy regularization on Agent A’s decoder to encourage exploration. Hence, Agent A’s overall objective function is given as:
65
+
66
+ $$
67
+ \mathbb { L } _ { A } = \alpha _ { \mathrm { p g } } ( R - \overline { { R } } _ { t } ) \log p ( \overline { { \mathrm { E n } _ { t } } } | \overline { { \mathrm { E n } _ { < t } } } , \mathrm { F r } ) + \alpha _ { \mathrm { e n t } } H ( p ( \overline { { \mathrm { E n } _ { t } } } | \overline { { \mathrm { E n } _ { < t } } } , \mathrm { F r } ) ) - \alpha _ { \mathrm { b } } \mathbf { M } \mathrm { S E } ( R , \overline { { R } } _ { t } ) ,
68
+ $$
69
+
70
+ where $H$ and MSE denote entropy and mean squared error losses.
71
+
72
+ Cross Entropy Training Agent $\mathbf { B }$ is trained using standard cross entropy loss, i.e.
73
+
74
+ $$
75
+ \mathbb { L } _ { B } = \log p ( \mathrm { { D e } } _ { t } | { \mathrm { D e } } _ { < t } , \overline { { \mathrm { E n } } } ) .
76
+ $$
77
+
78
+ We jointly train both agents by maximizing $\mathbb { L } = \mathbb { L } _ { A } + \mathbb { L } _ { B }$
79
+
80
+ # 4 EXPERIMENTAL SETTINGS
81
+
82
+ In this section we provide the details of our experimental setup: a $\mathrm { F r } \mathrm { X } \mathrm { D e }$ translation task where the intermediate language X is initialized as English, and subsequently fine-tuned with policy gradient. On a trilingual corpus consisting of three languages (Fr, En and De), we can measure communication success with $\mathrm { F r } { }$ De BLEU (Papineni et al., 2002), while $\mathrm { F r } { } \mathrm { E n }$ BLEU informs how closely the intermediate language resembles English, at any given point during fine-tuning.
83
+
84
+ Datasets Agents are initially pre-trained on IWSLT $\mathrm { F r } { } \mathrm { E n }$ and $\mathrm { E n } { } \mathrm { D e }$ . Fine-tuning is performed on Multi30k Task 1(Elliott et al., 2016). That is, importantly, there is no overlap in the pre-training data and the fine-tuning data. Multi30k Task 1 consists of $3 0 \mathrm { k }$ images and one caption per image in English, French, German and Czech (of which we only use the first three). For the English language model, we compare four different datasets: WikiText103, MS COCO and Flickr30k. The image-caption retrieval model is trained on Flickr30k: the same set of $3 0 \mathrm { k }$ images as Multi30k but containing 5 English captions per image. Following Faghri et al. (2018), we randomly crop training images at every epoch. We use 2048-dimensional final-layer features from a pretrained and fixed ResNet-152 (He et al., 2016).
85
+
86
+ Preprocessing The same tokenization and vocabulary are used across different tasks and datasets. We lowercase and tokenize our corpora with Moses (Koehn et al., 2007) and use subword tokenization with Byte Pair Encoding (BPE) (Sennrich et al., 2016) with $1 0 \mathrm { k }$ merge operations. This allows us to use the same vocabulary across different models seamlessly (translation, language model, image-caption ranker model).
87
+
88
+ Controlling the English message length When fine-tuning the agents, we observe that the length of English messages becomes excessively long. As Agent A has no explicit incentive to output the $\langle { \mathrm { E O S } } \rangle$ symbol, it tends to keep transmitting the same token repeatedly. Excessively long messages obscure evaluation of the communication protocol. For instance, BLEU score quickly deteriorates as the message length becomes longer, as it is a precision metric. When the message length is fixed, a drop in BLEU score will by necessity mean that the intermediate language has drifted away more. For this reason, we constrain the length of English messages to be no longer than the length of their French source sentence, or shorter if the model outputs the $\langle { \mathrm { E O S } } \rangle$ symbol early. Recall that Agent B is supervised to predict the $\langle \mathrm { E O S } \rangle$ symbol, so does not suffer from this issue.
89
+
90
+ Model Architecture and Pretraining Our MT agents are standard sequence-to-sequence models with attention (Bahdanau et al., 2015) with unidirectional, 1-layer GRU with 256 hidden units and 256-dimensional embeddings. During initial pre-training on IWSLT, we early-stop based on BLEU score on the development set (tst2013). The best checkpoints give 34.05 BLEU and 21.94 BLEU on IWSLT $\mathrm { F r } { } \mathrm { E n }$ and $\mathrm { E n } { } \mathrm { D e }$ development sets with greedy decoding. For our value function, we use a 2-layer MLP with a ReLU nonlinearity.
91
+
92
+ The language model is a 1-layer recurrent language model with 512 LSTM hidden units. The imagecaption retrieval model is a recently proposed ${ \mathrm { V S E } } { + } { + }$ model (Faghri et al., 2018), with unidirectional 1-layer GRU with 512 hidden units and a single fully connected layer from 2048-dimensional ResNet features to 512-dimensional GRU hidden states. We report the performance of the pretrained models used in our experiments in Tables 1, 2 and 3.
93
+
94
+ Table 1: Translation performance of our pre-trained agents (BLEU)
95
+
96
+ <table><tr><td></td><td>IWSLT</td><td>Multi30k</td></tr><tr><td>Fr-→En</td><td>34.05</td><td>26.80</td></tr><tr><td>En→De</td><td>21.94</td><td>18.56</td></tr></table>
97
+
98
+ Table 2: Development NLL of pretrained language models
99
+
100
+ <table><tr><td>WikiText103</td><td>3.51</td></tr><tr><td>MS COCO</td><td>2.66</td></tr><tr><td>Flickr30k</td><td>2.85</td></tr></table>
101
+
102
+ Table 3: Retrieval results for our ${ \mathrm { V S E } } { + } { + }$ model on Flickr30k test set.
103
+
104
+ <table><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>Caption</td><td>50.1</td><td>76.3</td><td>84.6</td></tr><tr><td>Image</td><td>35.7</td><td>65.3</td><td>75.9</td></tr></table>
105
+
106
+ Training Details When fine-tuning our agents, we perform learning rate annealing and early stopping based on $\mathrm { F r { } D e }$ BLEU (communication performance) on the Multi30k development set. We use Adam (Kingma & Ba, 2014) with initial learning rate of 0.001 and dropout (Srivastava et al., 2014) rate of 0.1. We grid search over learning rate schedule and reward coefficients $( \alpha _ { \mathrm { p g } } , \alpha _ { \mathrm { e n t r } } , \alpha _ { \mathbf { b } } , \beta _ { L M } , \beta _ { G } )$ .
107
+
108
+ For our joint systems with policy gradient fine-tuning, we run every model three times with different random seeds and report averaged results (see Table 4).
109
+
110
+ Baseline and Upper Bound Our main quantitative experiment has three baselines:
111
+
112
+ • Pretrained checkpoints (on IWSLT).
113
+ • Ensembling $:$ Given Fr, we let Agent A generate $K$ English hypotheses with beam search, $\{ \overline { { \mathrm { E n } _ { j } } } \} _ { j = 1 } ^ { K }$ . Then, we let Agent B generate the German translation $\overline { { \mathrm { D e } } }$ using an ensemble of $K$ source sentences (Firat et al., 2016; Zoph & Knight, 2016).
114
+ • $\mathrm { F r } { }$ En fixed $:$ We fix Agent A and only fine-tune Agent B using $\mathbb { L } _ { B }$ .
115
+
116
+ Meanwhile, we also train an NMT model of the same architecture and size directly on the $\mathrm { F r } { } \mathrm { D e }$ task in Multi30k Task 1. This serves as an upper bound on the $\mathrm { F r D e }$ performance achievable with available data.
117
+
118
+ # 5 QUANTITATIVE RESULTS
119
+
120
+ Table 4: Results in BLEU score on Multi30k Task 1. For our models using policy gradient fine-tuning, we report results averaged over three runs and provide standard deviations in brackets. PG: trained with vanilla policy gradient fine-tuning. $_ \mathrm { P G + L M }$ : trained with the “Englishness” constraint in reward. For MS COCO and Flickr30k, the LM was trained directly on image captions. $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ : trained with grounding loss as well as the LM loss. $\mathrm { F r } { } \mathrm { E n }$ : degree of intermediate language drift from English; lower indicates more drift. $\mathrm { F r } \mathrm { E n } \mathrm { D e }$ : metric for communication accuracy; higher is better. All: LM was trained on all three datasets combined. Improvements of $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ over $_ { \mathrm { P G + L M } }$ were found to be significant in all cases, using the approximate randomization test for significance testing (Riezler & Maxwell III, 2005).
121
+
122
+ <table><tr><td></td><td>LM</td><td>Ranker</td><td>Fr-→En</td><td>Fr→En→De</td></tr><tr><td>Pretrained</td><td></td><td></td><td>27.18</td><td>16.30</td></tr><tr><td>Ensembling</td><td></td><td></td><td></td><td>16.95</td></tr><tr><td>Fr-→En fixed</td><td></td><td></td><td>27.18</td><td>22.37</td></tr><tr><td>PG</td><td>No LM</td><td></td><td>12.38 (0.67)</td><td>24.51 (1.48)</td></tr><tr><td rowspan="4">PG+LM</td><td>WikiText103</td><td></td><td>21.63 (1.25)</td><td>26.88 (0.12)</td></tr><tr><td>MS COCO</td><td></td><td>25.05 (1.40)</td><td>27.66 (0.34)</td></tr><tr><td>Flickr30k</td><td></td><td>24.85 (1.14)</td><td>27.60 (0.27)</td></tr><tr><td>All</td><td></td><td>23.60 (1.05)</td><td>27.67 (0.39)</td></tr><tr><td rowspan="5">PG+LM+G</td><td>No LM</td><td>1</td><td>14.20 (1.58)</td><td>26.23 (1.08)</td></tr><tr><td>WikiText103</td><td></td><td>23.65 (1.91)</td><td>27.87 (0.15)</td></tr><tr><td>MS COCO</td><td>v</td><td>26.24 (0.28)</td><td>27.86 (0.24)</td></tr><tr><td>Flickr30k</td><td>←</td><td>25.99 (1.62)</td><td>27.82 (0.41)</td></tr><tr><td>All</td><td>专</td><td>24.75 (0.40)</td><td>28.08 (0.73)</td></tr><tr><td>Fr→De</td><td></td><td></td><td></td><td>30.73</td></tr></table>
123
+
124
+ In Table 4, the top three rows are our baselines. The pretrained model performs relatively poorly on $\mathrm { F r { } D e }$ , conceivably because it was pretrained on a different corpus, and Agent B was was given Agent A’s output as source. Ensembling multiple English hypotheses for Agent B (row 2) gives negligible increase in $\mathrm { F r { } D e }$ performance. When only Agent B is fine-tuned, we observe 6 BLEU score increase in $\mathrm { F r } { } \mathrm { D e }$ .
125
+
126
+ When the joint system is fine-tuned on German log likelihood with policy gradients (PG), we observe a large, 8 BLEU increase increase in $\mathrm { F r { } D e }$ at the cost of a substanstial, 15 BLEU score drop in $\mathrm { F r } { } \mathrm { E n }$ . This clearly shows that optimizing on some external reward causes a drastic language drift.
127
+
128
+ ![](images/2e6473a16038c59a8aaa522125782b8b39bf55d63c60d9db4ff14d556179de4a.jpg)
129
+ Figure 2: Learning curves for PG, $_ \mathrm { P G + L M }$ and $\mathrm { P G + L M + G }$ . En LM NLL curves show the NLL of English messages, computed by a language model trained on WikiText103. Lower En BLEU indicates more language drift, and higher En LM NLL indicates more language drift.
130
+
131
+ When the agent is trained with the “Englishness” constraint $( \mathrm { P G + L M } )$ , we notice a significant improvement in $\mathrm { F r } { } \mathrm { E n }$ BLEU. When the LM is trained on WikiText103, a widely used language modelling dataset, we observe improvement of 9 BLEU scores. When the training corpus is closer to the target domain, such as MS COCO or Flickr30k, we see more than 10 BLEU score increase. $\mathrm { F r { } D e }$ translation also improves by 2–3 BLEU scores.
132
+
133
+ However, we see the biggest improvements in performance when agents are trained using visual grounding feedback. This is particularly pronounced with the LM trained on WikiText103: introducing visual grounding leads to more than 2 BLEU score improvement in $\mathrm { F r } { } \mathrm { E n }$ , and 1 BLEU score improvement in $\mathrm { F r } { } \mathrm { D e }$ . We hypothesize that the “Englishness” constraint forces agents to communicate with correct syntax and fluency, while the image-caption retrieval model restricts the search space of languages to ones that are grounded by visual semantics. To see if grounding is really necessary, we train a stronger LM on all three datasets combined, but find this still leads to more language drift than using visual grounding: the $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ model with the LM trained on MS COCO outperforms this by 3 BLEU scores on $\mathrm { F r } { } \mathrm { E n }$ .
134
+
135
+ In Figure 2, we observe that vanilla PG fine-tuning quickly leads to highly “un-English” communication, as can be seen from a distinct increase in LM NLL. It is also worth noting that while $\mathrm { P G } { + } \mathrm { L M }$ achieves better LM NLL than $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ , it gives much lower $\mathrm { F r } { } \mathrm { E n }$ BLEU score than the grounded model $\mathbf { \left( P G + L M + G \right) }$ ). This is another indication that simply encouraging naturalness is not enough; grounding is key.
136
+
137
+ A close investigation into the token statistics of each communication strategy reveals that PG finetuning causes the word frequency distribution to be flatter. The PG model has negative frequency difference values for the most frequent tokens, indicating that PG downweighs frequent words severely. On the other hand, $\mathrm { P G + L M }$ gives highly positive frequency differences, meaning that language modelling alone disproportionately emphasizes frequent tokens. Visual grounding keeps the token frequency distribution close to the original pretrained regimes. Analyzing the top- $\mathbf { \nabla } \cdot \mathbf { k }$ most frequent
138
+
139
+ ![](images/bf2a3c8025d92e906f110c433c6960b32090a0846ae259233c5305646f5999a4.jpg)
140
+ Figure 3: Token frequency analysis on three different models (PG, $_ \mathrm { P G + L M }$ , $\mathrm { P G + L M + G }$ ) as well as the pretrained model before any fine-tuning (Pretrained). We show the word frequency curves (sorted in decreasing order) for each model, after subtracting the reference English frequency statistics (also sorted). Positive y values indicate higher frequency values than the English reference, and negative y values indicate lower frequency values than English. Note that y-axis is the frequency difference in thousands, and $\mathbf { X }$ -axis shows the vocabulary index (sorted with frequency) in log scale.
141
+
142
+ words shows that $\mathrm { P G } { + } \mathrm { L M }$ disproportionately favors quotation marks, which are very common tokens in many language modelling datasets but occur rarely in Multi30k (see also Appendix A).
143
+ Table 5: Additional token frequency analysis. unique: the number of unique English tokens used in the whole development set. /sent: the number of unique English tokens used per sentence. /all: (the number of unique English tokens / the number of all English tokens.)
144
+
145
+ <table><tr><td></td><td colspan="3">IWSLT</td><td colspan="3">Multi30k</td></tr><tr><td></td><td>unique</td><td>/sent</td><td>/all</td><td>unique</td><td>/sent</td><td>/all</td></tr><tr><td>Reference</td><td>5,303</td><td>19.7</td><td>0.86</td><td>3,046</td><td>11.9</td><td>0.91</td></tr><tr><td>Pretrained</td><td>4,657</td><td>17.9</td><td>0.85</td><td>2,867</td><td>12.0</td><td>0.87</td></tr><tr><td>PG</td><td>4,933</td><td>13.6</td><td>0.56</td><td>3,197</td><td>9.2</td><td>0.65</td></tr><tr><td>PG+LM</td><td>3,819</td><td>14.6</td><td>0.61</td><td>2,438</td><td>10.9</td><td>0.78</td></tr><tr><td>PG+LM+G</td><td>4,327</td><td>15.7</td><td>0.74</td><td>2,550</td><td>10.7</td><td>0.84</td></tr></table>
146
+
147
+ Table 5 reinforces the finding that vanilla PG fine-tuning leads to flatter token frequency distributions, as the number of unique tokens used by PG is greater than that of the pretrained model. Meanwhile, $\mathrm { P G + L M }$ uses fewer tokens overall, signifying that it uses a relatively small set of tokens frequently.
148
+
149
+ Also note that PG, despite using a more diverse set of tokens, uses the smallest number of unique symbols per sentence (/sent) and overall (/all). This implies that PG communication is often repetitive. Introducing extra tasks seems to mitigate this, and the grounded model $\mathrm { ( P G + L M + G }$ ) learns a frequency distribution that most closely resembles the original distribution.
150
+
151
+ To gain further insight into the agents’ communication protocols, we compare the degree of drift by part-of-speech. Table 6 shows that PG tends to ignore function words, such as periods and infinitives. Models trained with LM and grounding losses retain function words with much higher accuracy. PG fares relatively better with content words (nouns and verbs), but adding LM and grounding losses still outperform PG. Grounding leads to overall improvements in recall, particularly with content words.
152
+
153
+ Conceivably, when optimizing Agent A’s policy on the communication task alone, it is more crucial to relay content information to Agent B, and this might cause agents to ignore syntactic conformity in the original intermediate language. We argue that LM and grounding reduces the space of intermediate languages to a much reasonable language space, facilitating learning.
154
+
155
+ # 6 QUALITATIVE RESULTS
156
+
157
+ In the first example of Table 7, it is clear that PG’s English message has significantly diverged from English: it is highly repetitive (“table table table table table”) and is missing some key content words such as “man” and “jacket”. However, Agent B still generates the German word for ‘man’. The grounded model’s message $\mathbf { \Gamma } ( \mathbf { P G + L M + G }$ ) is distinctly the most fluent and semantically correct.
158
+
159
+ In the second example, observe that the PG Agent B misinterprets “talking talking a coach a coach” into “spricht mit einem spieler” (talking to a player). The $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ model again generates a flawless English sentence. Also note that it communicates both colors (red and white) successfully from French to German, while the other two models fail to do so.
160
+
161
+ Table 6: Exact-match word recall by POS-tag on IWSLT development set: when the English reference contains a word of a certain POS tag, how often does the agent correctly produces that word. TO: infinitive to, (.): period, DT: determiner, Noun: (NN, NNS, NNP, NNPS), Verb: (VB, VBD, VBG, VBN, VBP, VBZ), Adj: adjective (JJ, JJR, JJS), Adv: adverb (RB, RBR, RBS)
162
+
163
+ <table><tr><td></td><td colspan="3">Function words</td><td colspan="4">Content words</td></tr><tr><td></td><td>TO</td><td>:</td><td>DT</td><td>Noun</td><td>Verb</td><td>Adj</td><td>Adv</td></tr><tr><td>PG</td><td>0.22</td><td>0.36</td><td>0.57</td><td>0.38</td><td>0.17</td><td>0.32</td><td>0.26</td></tr><tr><td>PG+LM</td><td>0.55</td><td>0.84</td><td>0.72</td><td>0.39</td><td>0.18</td><td>0.21</td><td>0.25</td></tr><tr><td>PG+LM+G</td><td>0.62</td><td>0.88</td><td>0.74</td><td>0.43</td><td>0.26</td><td>0.33</td><td>0.29</td></tr></table>
164
+
165
+ ![](images/b8bd9351b4fea398c0d397a493640b4af135973616c5c8b1d5f10437ca4bcc25.jpg)
166
+
167
+ ![](images/4726323f7f35665892b7da69121761a1df8453ebbbde432c6c2e91c381fc4bf2.jpg)
168
+
169
+ Table 7: Two random examples from Multi30k development set with different models (PG, $\mathrm { P G + L M } .$ , $\mathrm { P G + L M + G }$ . The top three rows list the ground truth sentences, the middle three rows are the English messages sent by the $\mathrm { F r } { } \mathrm { E n }$ agent, and the bottom three rows show the German output from the $\mathrm { E n } { } \mathrm { D e }$ agent. We also show the corresponding images, which were only used to train the image-caption retrieval modal.
170
+
171
+ <table><tr><td>Ref</td><td>Fr De En</td><td>un vieil homme vétu d&#x27;une veste noire regarde sur la table ein alter mann in einer schwarzen jacke blickt auf den tisch an old man wearing a black jacket is looking on the table</td></tr><tr><td>En</td><td>PG +LM +G</td><td>a old teaching black watching on the table table table table table table a old man in a jacket looking on the table .”” an old man in a black jacket looking on the table .</td></tr><tr><td>De</td><td>PG +LM +G</td><td>ein älterer mann in einem schwarzen hemd schaut auf den tisch. einalter mann in einer jacke beobachtet einen tisch . ein älterer mann in einer schwarzen jacke schaut auf den tisch .</td></tr><tr><td>Ref</td><td>Fr De En</td><td>un joueur de football américain en blanc et rouge parle â un entraineur . einrot-weiB gekleideter footballspieler spricht mit einem trainer . a football player in red and white is talking to a coach .</td></tr><tr><td>En</td><td>PG +LM +G PG</td><td>a player football american football american and red talking talking a coach a player of white and red talking to a coach .””” a football player in white and red talking to a coach . ein footballspieler spricht mit einem spieler in einem roten trikot .</td></tr><tr><td>De</td><td>+LM +G</td><td>ein weiB gekleideter fuBballspieler spricht zu einem trainer. ein fuBballspieler in einem rot-weiBen trikot spricht mit einem trainer .</td></tr></table>
172
+
173
+ ![](images/e5a1c81ab55fbbd4fc089d67ea7e21f83e1026db91dcd7e04eda1ef185ccb23d.jpg)
174
+
175
+ Table 8: Evidence of token flipping in the PG model.
176
+
177
+ <table><tr><td>Fr src En ref En hyp De ref De hyp Fr src</td><td>un enfant assis sur un rocher. a child sitting on a rock formation. a punk sitting sitting on on a broken ein kind sitzt auf einem felsen. ein kind sitzt auf einem felsen .</td></tr></table>
178
+
179
+ We observe some instances of token flipping with the PG model. For example, one particular PG model uses “punk” to describe “child” (see Table 8). As no occurrence of “punk” in any training data is associated with “child”, the agents must have acquired this new meaning assignment during fine-tuning. Among 35 examples in Multi30k development set where the English reference contains “child”, the model uses “punk” 15 times, indicating this is no random phenomenon. We show similar examples from the $\mathrm { P G } { + } \mathrm { L M }$ model in Appendix B. We did not observe such examples with the $\mathrm { P G } { + } \mathrm { L M } { + } \mathrm { G }$ model.
180
+
181
+ # 7 CONCLUSION
182
+
183
+ In this paper, we show that language drift happens when fine-tuning natural language agents with some external (non-linguistic) reward using policy gradients, and propose a few approaches to avoid this. Most importantly, we find that simply encouraging “naturalness”, e.g. via adding a language model log likelihood to the reward, does not lead to the desired consequences. Instead, we contend that grounding is what we need to avoid language drift. Our empirical results show that grounding leads to best communication performance (highest $\mathrm { F r { } D e }$ BLEU), while also showing least signs of language drift (highest $\mathrm { F r } { } \mathrm { E n }$ BLEU). Analyzing token frequencies in exchanged messages reveals that pure PG finetuning tends to learn flatter token distributions, and encouraging naturalness disproportionately emphasizes frequent tokens, while the grounded model best retains the original token frequencies.
184
+
185
+ # ACKNOWLEDGMENTS
186
+
187
+ # REFERENCES
188
+
189
+ Jacob Andreas, Anca D. Dragan, and Dan Klein. Translating neuralese. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 232–242, 2017.
190
+
191
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations (ICLR), 2015.
192
+
193
+ Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron C. Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016.
194
+
195
+ Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew M. Dai, Rafal Jozefowicz, and Samy ´ Bengio. Generating sentences from a continuous space. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, CoNLL 2016, Berlin, Germany, August 11-12, 2016, pp. 10–21, 2016.
196
+
197
+ Ted Briscoe. Linguistic evolution through language acquisition. Cambridge University Press, 2002.
198
+
199
+ Yun Chen, Yang Liu, and Victor O. K. Li. Zero-resource neural machine translation with multiagent communication game. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
200
+
201
+ Yong Cheng, Qian Yang, Yang Liu, Maosong Sun, and Wei Xu. Joint training for pivot-based neural machine translation. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, pp. 3974–3980, 2017.
202
+
203
+ Grzegorz Chrupała, Akos Kad´ ar, and Afra Alishahi. Learning language through pictures. ´ arXiv preprint arXiv:1506.03694, 2015.
204
+
205
+ Desmond Elliott and Akos Kad´ ar. Imagination improves multimodal translation. ´ arXiv preprint arXiv:1705.04350, 2017.
206
+
207
+ Desmond Elliott, Stella Frank, Khalil Sima’an, and Lucia Specia. Multi30k: Multilingual englishgerman image descriptions. In Proceedings of the 5th Workshop on Vision and Language, pp. 70–74, 2016.
208
+
209
+ Katrina Evtimova, Andrew Drozdov, Douwe Kiela, and Kyunghyun Cho. Emergent language in a multi-modal, multi-step referential game. In Proceedings of the International Conference on Learning Representations, 2018.
210
+
211
+ Fartash Faghri, David J. Fleet, Jamie Kiros, and Sanja Fidler. ${ \mathrm { V S E } } { + } { + }$ : improving visual-semantic embeddings with hard negatives. In British Machine Vision Conference, pp. 12, 2018.
212
+
213
+ Orhan Firat, Baskaran Sankaran, Yaser Al-Onaizan, Fatos T Yarman Vural, and Kyunghyun Cho. Zero-resource translation with multi-lingual neural machine translation. arXiv preprint arXiv:1606.04164, 2016.
214
+
215
+ Spandana Gella, Rico Sennrich, Frank Keller, and Mirella Lapata. Image pivoting for learning multilingual multimodal representations. arXiv preprint arXiv:1707.07601, 2017.
216
+
217
+ Jiatao Gu, Kyunghyun Cho, and Victor O. K. Li. Trainable greedy decoding for neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1968–1978, 2017.
218
+
219
+ Serhii Havrylov and Ivan Titov. Emergence of language with multi-agent games: Learning to communicate with sequences of symbols. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems, pp. 2146–2156, 2017.
220
+
221
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR, pp. 770– 778, 2016.
222
+
223
+ Julian Hitschler, Shigehiko Schamoni, and Stefan Riezler. Multimodal pivots for image caption translation. arXiv preprint arXiv:1601.03916, 2016.
224
+
225
+ Akos K ´ ad´ ar, Desmond Elliott, Marc-Alexandre C ´ otˆ e, Grzegorz Chrupała, and Afra Alishahi. ´ Lessons learned in multilingual grounded language learning. arXiv preprint arXiv:1809.07615, 2018.
226
+
227
+ Douwe Kiela, Alexis Conneau, Allan Jabri, and Maximilian Nickel. Learning visually grounded sentence representations. arXiv preprint arXiv:1707.06320, 2017.
228
+
229
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014.
230
+
231
+ Simon Kirby. Spontaneous evolution of linguistic structure-an iterated learning model of the emergence of regularity and irregularity. IEEE Transactions on Evolutionary Computation, 5(2):102– 110, 2001.
232
+
233
+ Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics, 2007.
234
+
235
+ Satwik Kottur, Jose M. F. Moura, Stefan Lee, and Dhruv Batra. Natural language does not emerge ´ ’naturally’ in multi-agent dialog. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2962–2967, 2017.
236
+
237
+ Angeliki Lazaridou, Alexander Peysakhovich, and Marco Baroni. Multi-agent cooperation and the emergence of (natural) language. In Proceedings of the International Conference on Learning Representations, 2017.
238
+
239
+ Jason Lee, Kyunghyun Cho, Jason Weston, and Douwe Kiela. Emergent translation in multi-agent communication. In Proceedings of the International Conference on Learning Representations, 2018.
240
+
241
+ Mike Lewis, Denis Yarats, Yann N Dauphin, Devi Parikh, and Dhruv Batra. Deal or no deal? endto-end learning for negotiation dialogues. arXiv preprint arXiv:1706.05125, 2017.
242
+
243
+ Jiwei Li, Will Monroe, Tianlin Shi, Sebastien Jean, Alan Ritter, and Dan Jurafsky. Adversarial´ learning for neural dialogue generation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2157–2169, 2017.
244
+
245
+ Igor Mordatch and Pieter Abbeel. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1705.10369, 2017.
246
+
247
+ Kazunori Muraki. VENUS: two-phase machine translation system. Future Generation Comp. Syst., 2(2):117–119, 1986.
248
+
249
+ Hideki Nakayama and Noriki Nishida. Zero-resource machine translation by multimodal encoder– decoder network with multimedia pivot. Machine Translation, 31(1-2):49–64, 2017.
250
+
251
+ Rodrigo Nogueira and Kyunghyun Cho. Task-oriented query reformulation with reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 574–583, 2017.
252
+
253
+ Martin A Nowak and David C Krakauer. The evolution of language. Proceedings of the National Academy of Sciences, 96(14):8028–8033, 1999.
254
+
255
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pp. 311–318, 2002.
256
+
257
+ Romain Paulus, Caiming Xiong, and Richard Socher. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304, 2017.
258
+
259
+ Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015.
260
+
261
+ Stefan Riezler and John T. Maxwell III. On some pitfalls in automatic evaluation and significance testing for MT. In Proceedings of the Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, pp. 57–64, 2005.
262
+
263
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, 2016.
264
+
265
+ Brian Skyrms. Signals: Evolution, learning, and information. Oxford University Press, 2010.
266
+
267
+ Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014.
268
+
269
+ Luc Steels. The synthetic modeling of language origins. Evolution of communication, 1(1):1–34, 1997.
270
+
271
+ Yining Wang, Yang Zhao, Jiajun Zhang, Chengqing Zong, and Zhengshan Xue. Towards neural machine translation with partially aligned corpora. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, pp. 384–393, 2017.
272
+
273
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
274
+
275
+ Barret Zoph and Kevin Knight. Multi-source neural translation. arXiv preprint arXiv:1601.00710, 2016.
276
+
277
+ # A FREQUENCY ANALYSIS
278
+
279
+ ![](images/9e511079724de538a32385cc7d00d066fef883bd26a28323d6a23aff275760a7.jpg)
280
+ Figure 4: Token frequency analysis similar to Figure 3, but with the $\mathbf { X }$ -axis fixed to the token indices sorted with respect to English reference, in decreasing order.
281
+
282
+ In Figure 4, where the $\mathbf { X }$ -axis is fixed to the token indices sorted with respect to the English reference, we observe that the $_ { \mathrm { P G + L M } }$ model does indeed favor one word particularly strongly. From investigating top- $\mathbf { \nabla } \cdot \mathbf { k }$ most frequent tokens in each model, we find that quotation mark is the most common token for $\mathrm { P G } { + } \mathrm { L M }$ in both datasets we experimented with. It is plausible that quotation marks occur with high frequency in language modelling datasets, causing them to be disproportionately overweighed during fine-tuning.
283
+
284
+ Table 9: Top 20 most frequent tokens in English reference (Reference) or the output from $\mathrm { F r } { } \mathrm { E n }$ models.
285
+
286
+ <table><tr><td colspan="2">IWSLT</td></tr><tr><td>Reference Pretrained PG PG+LM PG+LM+G</td><td>,. the and to of a that i in is it you we &amp;apos;s this &amp;quot; , the .to of and a i that in it we you &amp;apos;s is this &amp;quot; was a the and ,. in i &amp;quot; this of to is we you ? that not for &amp;quot; the ,of .and in a to this is i es you for we that with the ,. of a and to in is i this es we for that you at what</td></tr><tr><td colspan="2">Multi30k</td></tr></table>
287
+
288
+ ![](images/cdc9523d1fd0a40d08c8cb48cf753b771e9f9b219b763ce2e343543a98889b45.jpg)
289
+ Figure 5: Token frequency curves (before subtracting the reference frequencies). Both $\mathbf { X }$ (vocabulary index) and y (frequency) axes are in log scale.
290
+
291
+ In Figure 5, we show the token frequency curves before subtracting the reference frequencies. Similarly to Figure 4, we observe that the PG model discourages frequent (mostly functional) words, while the $\mathrm { P G + L M }$ model excessively prefers frequent words.
292
+
293
+ # B EVIDENCE OF TOKEN FLIPPING IN THE PG+LM MODEL
294
+
295
+ ![](images/8610b3cd658e44b02f9aebeb193fb86d3b8c66dec8b2faf3ffd2fc745d7d06e8.jpg)
296
+
297
+ Table 10: Evidence of token flipping in the $\mathrm { P G + L M }$ model.
298
+
299
+ <table><tr><td>Fr src En ref En hyp De ref</td><td>un caniche noir joue avec un autre chien sur un terrain sec. a black poodle plays with another dog in a dry field . a canblack on a day,a day,a day,a day,</td></tr></table>
300
+
301
+ Similar to Table 8, we find evidence of token flipping for the $\mathrm { P G + L M }$ model, where the agents use “can $@ ( a ) ^ { , }$ ( $@ \textcircled{ a }$ is a subword BPE token marker) to mean “poodle”. This shows that language drift still happens even when a language model is used.
parse/train/BkMn9jAcYQ/BkMn9jAcYQ_content_list.json ADDED
@@ -0,0 +1,1589 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "COUNTERING LANGUAGE DRIFT VIA GROUNDING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 178,
8
+ 98,
9
+ 776,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "While reinforcement learning (RL) shows a lot of promise for natural language processing—e.g. when fine-tuning natural language systems for optimizing a certain objective—there has been little investigation into potential language drift: when an external reward is used to train a system, the agents’ communication protocol may easily and radically diverge from natural language. By re-casting translation as a communication game, we show that language drift indeed happens when pre-trained agents are fine-tuned with policy gradient methods. We contend that simply adding a “naturalness” constraint to the reward, e.g. by using language model log likelihood, does not fully address the issue, and argue that (perceptual) grounding is required. That is, while language model constraints impose syntactic conformity, they do not lead to semantic correspondence. Our experiments show that grounded models give the best communication performance, while retaining English syntax along with the ability to convey the intended semantics. ",
40
+ "bbox": [
41
+ 233,
42
+ 242,
43
+ 764,
44
+ 422
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 453,
55
+ 336,
56
+ 468
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In the summer of 2017, the internet was briefly abuzz with the mistaken viral message that a leading AI research lab had to “unplug its AI” because it “had gone rogue”. What had in fact happened was that two chatbots, under certain conditions, had, rather unsurprisingly, started diverging from their English training data and had instead reverted to their own ungrammatical communication protocol for solving a negotiation task (Lewis et al., 2017). Instead of saying something like “hats have no value for me” the system would starting saying things like “hat have zero to me to me to me to me”. As was soon made clear by the parties involved, this sort of language drift is to be expected if we are optimizing for an external reward, for example one based on whether or not two agents successfully accomplish a negotiation. ",
63
+ "bbox": [
64
+ 174,
65
+ 484,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "While language drift is to be expected under external reward, it is natural to ask what we can do to avoid it. Consider policy gradient methods, for example, and suppose we sample an output sequence from an English language decoder for a given task: sampling a non-grammatical sequence might still be rewarded if we manage to solve the task (e.g., due to some correct words; or because an interlocutor understood us anyway, or guessed correctly), which would quickly move the decoder away (drifting) from English. If we were able to keep drift in check, we could maximize reward while retaining the “Englishness” of the decoder, with obvious benefits for interpretability and interaction with humans. That is, while search space size prohibits the direct usage of policy gradient methods for training natural language decoders from scratch, we could prevent pre-trained models from drifting while we optimize for the desired reward using policy gradients. ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 756
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Thus, the ability to stop policy gradient methods from diverging from natural language enables interesting long-term possibilities for exploration: imagine e.g. fine-tuning a pre-trained language model trained on large amounts of data, call it a “language module”, for a given generation task with limited data. When training chit-chat dialogue agents, for example, we often want to optimize for some very high-level reward, such as engagingness or consistency, with hardly enough data to learn simple English grammar. Or consider what might happen when we train agents using self-play to actively use natural language to change the other agent’s (mental) state, rather than having a model passively observe language usage in some corpus or dataset, as usually happens. ",
85
+ "bbox": [
86
+ 174,
87
+ 763,
88
+ 823,
89
+ 875
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this work, we study the question of language drift. Drawing inspiration from Lee et al. (2018), we re-cast translation as a communication game. Two machine translation (MT) agents—i.e., encoderdecoder models with attention—are tasked with successfully translating source language sequences to the target language using a third pivot language as an intermediary. The communication channel (the output of the first agent’s decoder, which is fed to the second agent’s encoder as input) is updated via policy gradient methods to optimize for translating into the target language, effectively fine-tuning two separate pre-trained MT models via a pivot language. ",
96
+ "bbox": [
97
+ 176,
98
+ 882,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/53614ee295bce2f819a6bb953e51c3e581ad69c269e32405f55577253146ce19.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Diagram of our communication game. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 323,
113
+ 98,
114
+ 674,
115
+ 175
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 173,
124
+ 223,
125
+ 825,
126
+ 280
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "While the subject of communication need not be language (e.g., for Lee et al. (2018), agents learn to translate by communicating about images), three-way translation via pivot is an excellent way for studying the current problem: we can check exactly to what extent the communicated sequence corresponds to both the intended meaning, as well as to the gold standard sequence. We can think of this setup as an agent aiming to communicate its state to another agent via some protocol—yet in this case, the mental states and intermediary communication protocol are completely interpretable. ",
133
+ "bbox": [
134
+ 174,
135
+ 286,
136
+ 825,
137
+ 371
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "In what follows, we show that language drift happens, and quite dramatically so, when fine-tuning using policy gradients. We then show that the most intuitive way of solving this problem—adding an “Englishness” constraint, such as the log-probability assigned by a language model, to the reward function—does not in fact lead to the desired consequences. Indeed, there is nothing preventing such models from learning to translate “Two giraffes standing next to a white truck in the savanna” from French to German via “Democracy is a political system” as the English intermediary. ",
144
+ "bbox": [
145
+ 174,
146
+ 377,
147
+ 825,
148
+ 462
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Hence, we contend that what is missing is grounding: while language model constraints impose syntactic conformity, they do not lead to semantic correspondence. Humans don’t invent unique idiolects for every individual interlocutor, exactly because they are grounded: we share strong priors, social and behavioral norms, and a common sensorimotor experience of our physical environment. Thus, “not going rogue” means not only sticking to the prescribed language, but more importantly preserving meaning, which means staying grounded. ",
155
+ "bbox": [
156
+ 174,
157
+ 468,
158
+ 825,
159
+ 551
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "Our experiments show that fine-tuning the communication channel with visual grounding leads to the highest communication performance $( \\mathrm { F r E n D e } )$ ) as well as the best retention of original syntax and intended semantics. Our token frequency analysis corroborates our hypothesis, and shows that grounding is key for preserving the token frequency distribution of the pivot language (English). ",
166
+ "bbox": [
167
+ 174,
168
+ 559,
169
+ 823,
170
+ 614
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "2 PRIOR WORK ",
177
+ "text_level": 1,
178
+ "bbox": [
179
+ 176,
180
+ 633,
181
+ 318,
182
+ 650
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Our work is inspired by recent work in protocols or languages that emerge from multi-agent interaction (Lazaridou et al., 2017; Lee et al., 2018; Andreas et al., 2017; Evtimova et al., 2018; Kottur et al., 2017; Havrylov & Titov, 2017; Mordatch & Abbeel, 2017). Work on the emergence of language in multi-agent settings goes back a long way (Steels, 1997; Nowak & Krakauer, 1999; Kirby, 2001; Briscoe, 2002; Skyrms, 2010). In our case, we are specifically interested in tabula inscripta agents that are already pre-trained to generate natural language, and we are primarily concerned with keeping their language natural during further training. ",
189
+ "bbox": [
190
+ 173,
191
+ 666,
192
+ 825,
193
+ 765
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Reinforcement Learning (RL) has been applied to fine-tuning models for various natural language generation tasks, including summarization (Ranzato et al., 2015; Paulus et al., 2017), information retrieval (Nogueira & Cho, 2017), MT (Gu et al., 2017; Bahdanau et al., 2016) and dialogue (Li et al., 2017). Our work can be viewed as fine-tuning MT systems using an intermediary pivot language. In MT, there is a long line of work of pivot-based approaches, most notably Muraki (1986) and more recently with neural approaches (Wang et al., 2017; Cheng et al., 2017; Chen et al., 2018). There has also been work on using visual pivots directly (Hitschler et al., 2016; Nakayama & Nishida, 2017; Lee et al., 2018). Grounded language learning in general has been shown to give significant practical improvements in various natural language understanding tasks (Gella et al., 2017; Elliott & Kad´ ar, 2017; Chrupała et al., 2015; Kiela et al., 2017; K ´ ad´ ar et al., 2018). Meanwhile, Bowman ´ et al. (2016) found a powerful decoder to ignore the latent representation in VAEs for language. ",
200
+ "bbox": [
201
+ 173,
202
+ 770,
203
+ 825,
204
+ 924
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "3 TASK AND MODELS ",
211
+ "text_level": 1,
212
+ "bbox": [
213
+ 176,
214
+ 102,
215
+ 370,
216
+ 118
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "We recast translation as a communication game involving two MT agents: $\\mathrm { F r } { } \\mathrm { E n }$ and $\\mathrm { E n } { } \\mathrm { D e }$ (see Figure 1). Our dataset consists of $N$ triples of aligned sentences $\\{ \\mathrm { F r } _ { i } , \\mathrm { E n } _ { i } , \\mathrm { D e } _ { i } \\} _ { i = 1 } ^ { N }$ , where $\\operatorname { E n } _ { i }$ is only used for evaluation. We first feed the French sentence $\\mathrm { F r } _ { i }$ to Agent A, which generates an English message $\\overline { { \\mathrm { E n } _ { i } } }$ as output. Agent B is then trained to maximize the log likelihood of the ground truth German sentence given the English message, i.e. $\\log p ( \\mathrm { D e } _ { i } | \\overline { { \\mathrm { E n } _ { i } } } )$ . Agent A is trained using REINFORCE (Williams, 1992) with reward $R = \\log p _ { B } ( { \\bf D e } _ { i } | \\overline { { \\bf E n _ { i } } } )$ .1 This encourages Agent A to develop helpful communication policies for Agent B, and allows Agent B to adapt to Agent A’s new policies. In other words: communication via the pivot language (English) is a success if we are able to translate the intended source sequence (French) into the desired target sequence (German). ",
223
+ "bbox": [
224
+ 173,
225
+ 132,
226
+ 825,
227
+ 260
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "Both agents are pre-trained individually before communication, meaning that we start off with English as an intermediate language in the early stages of the game. This work examines what happens to the intermediate language as we fine-tune the system jointly: will the agents keep communicating in English, or diverge? And if so, what can we do to prevent that from happening? ",
234
+ "bbox": [
235
+ 173,
236
+ 266,
237
+ 825,
238
+ 323
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "3.1 AUXILIARY TASKS ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 174,
248
+ 338,
249
+ 346,
250
+ 353
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "To help reduce the search space of intermediate languages, we use two auxiliary tasks: language modelling (LM) and image-caption retrieval (henceforth called the grounding model). ",
257
+ "bbox": [
258
+ 171,
259
+ 364,
260
+ 823,
261
+ 393
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Language Model Given a language model pre-trained on a standard English corpus, the log likelihood of the English message informs its general “Englishness”. We incorporate this into the reward for Agent A, so that it learns to send messages that are plausible English.2 Reward for Agent A is: ",
268
+ "bbox": [
269
+ 173,
270
+ 407,
271
+ 825,
272
+ 449
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "equation",
278
+ "img_path": "images/06950ccb6ad7668ab95fcbc4f665b9b9379a041da3eb1c515bf8ec615d75121b.jpg",
279
+ "text": "$$\nR _ { \\mathrm { L M } } = \\log p _ { B } ( \\mathrm { D e } _ { i } | \\overline { { \\mathrm { E n } _ { i } } } ) + \\beta _ { L M } \\log p _ { L M } ( \\overline { { \\mathrm { E n } _ { i } } } ) .\n$$",
280
+ "text_format": "latex",
281
+ "bbox": [
282
+ 339,
283
+ 452,
284
+ 656,
285
+ 469
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "Grounding Model Let us assume we have access to a set of images $\\{ \\mathrm { I m } \\mathbf { g } _ { i } \\}$ associated with each triple $\\{ \\mathrm { F r } _ { i } , \\mathrm { E n } _ { i } , \\mathrm { D e } _ { i } \\}$ . Given a pre-trained image-caption retrieval model, such as ${ \\mathrm { V S E } } { + } { + }$ (Faghri et al., 2018), the log likelihood of the image given the English message (and vice versa) informs how much the English message is grounded in the original semantic content (Kiela et al., 2017). We incorporate the ranking loss into Agent A’s reward. ",
292
+ "bbox": [
293
+ 173,
294
+ 478,
295
+ 825,
296
+ 549
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "equation",
302
+ "img_path": "images/b4d40677749102a9ad4451f2c098c093a7cb712381a4b801c0d50d96857e277c.jpg",
303
+ "text": "$$\nR _ { { \\bf G } } = \\log p _ { B } ( { \\bf D e } _ { i } | \\overline { { { \\bf E } { \\bf n } _ { i } } } ) + \\beta _ { G } \\log p _ { G } ( { \\bf I m g } _ { i } | \\overline { { { \\bf E } { \\bf n } _ { i } } } ) .\n$$",
304
+ "text_format": "latex",
305
+ "bbox": [
306
+ 338,
307
+ 551,
308
+ 658,
309
+ 569
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Note that $\\beta _ { L M } , \\beta _ { G }$ are hyperparameters. ",
316
+ "bbox": [
317
+ 174,
318
+ 579,
319
+ 441,
320
+ 594
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "3.2 TRAINING OBJECTIVE ",
327
+ "text_level": 1,
328
+ "bbox": [
329
+ 176,
330
+ 609,
331
+ 370,
332
+ 625
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "For brevity the $t$ -th token in the $i$ -th English sentence $\\mathrm { E n } _ { i ; t }$ is abbreviated to $\\mathrm { E n } _ { t }$ , and $\\operatorname { E n } _ { i }$ to En. ",
339
+ "bbox": [
340
+ 169,
341
+ 635,
342
+ 800,
343
+ 651
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "Policy Gradient Training At decoding timestep $t$ , Agent A takes an action (outputs token $\\overline { { \\mathrm { E n } _ { t } } }$ ) given an environment (previous hidden states and previous token $\\overline { { \\mathrm { E n } _ { t - 1 } } } )$ . It receives reward $R$ at the end of the sequence, from which we subtract a state-dependent baseline $\\overline { { R _ { t } } }$ to reduce variance. Therefore, we maximize $( R - \\overline { { R _ { t } } } ) \\log p ( \\overline { { \\mathrm { E n } _ { t } } } | \\overline { { \\mathrm { E n } _ { < t } } } , \\mathrm { F r } )$ . In addition, we employ entropy regularization on Agent A’s decoder to encourage exploration. Hence, Agent A’s overall objective function is given as: ",
350
+ "bbox": [
351
+ 173,
352
+ 666,
353
+ 826,
354
+ 752
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "equation",
360
+ "img_path": "images/46d7da7c7eb59cf9cc3543f08d6227313c78f6696058d42b72020364a6bb486e.jpg",
361
+ "text": "$$\n\\mathbb { L } _ { A } = \\alpha _ { \\mathrm { p g } } ( R - \\overline { { R } } _ { t } ) \\log p ( \\overline { { \\mathrm { E n } _ { t } } } | \\overline { { \\mathrm { E n } _ { < t } } } , \\mathrm { F r } ) + \\alpha _ { \\mathrm { e n t } } H ( p ( \\overline { { \\mathrm { E n } _ { t } } } | \\overline { { \\mathrm { E n } _ { < t } } } , \\mathrm { F r } ) ) - \\alpha _ { \\mathrm { b } } \\mathbf { M } \\mathrm { S E } ( R , \\overline { { R } } _ { t } ) ,\n$$",
362
+ "text_format": "latex",
363
+ "bbox": [
364
+ 212,
365
+ 753,
366
+ 784,
367
+ 772
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "where $H$ and MSE denote entropy and mean squared error losses. ",
374
+ "bbox": [
375
+ 171,
376
+ 775,
377
+ 611,
378
+ 790
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "Cross Entropy Training Agent $\\mathbf { B }$ is trained using standard cross entropy loss, i.e. ",
385
+ "bbox": [
386
+ 174,
387
+ 803,
388
+ 723,
389
+ 818
390
+ ],
391
+ "page_idx": 2
392
+ },
393
+ {
394
+ "type": "equation",
395
+ "img_path": "images/c5a9e1fe87a899d1cb166da90e14d0fbace551bf6ec1dfc9a854b0ba1768cd95.jpg",
396
+ "text": "$$\n\\mathbb { L } _ { B } = \\log p ( \\mathrm { { D e } } _ { t } | { \\mathrm { D e } } _ { < t } , \\overline { { \\mathrm { E n } } } ) .\n$$",
397
+ "text_format": "latex",
398
+ "bbox": [
399
+ 405,
400
+ 820,
401
+ 589,
402
+ 838
403
+ ],
404
+ "page_idx": 2
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "We jointly train both agents by maximizing $\\mathbb { L } = \\mathbb { L } _ { A } + \\mathbb { L } _ { B }$ ",
409
+ "bbox": [
410
+ 173,
411
+ 848,
412
+ 563,
413
+ 863
414
+ ],
415
+ "page_idx": 2
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "4 EXPERIMENTAL SETTINGS ",
420
+ "text_level": 1,
421
+ "bbox": [
422
+ 176,
423
+ 102,
424
+ 428,
425
+ 118
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "In this section we provide the details of our experimental setup: a $\\mathrm { F r } \\mathrm { X } \\mathrm { D e }$ translation task where the intermediate language X is initialized as English, and subsequently fine-tuned with policy gradient. On a trilingual corpus consisting of three languages (Fr, En and De), we can measure communication success with $\\mathrm { F r } { }$ De BLEU (Papineni et al., 2002), while $\\mathrm { F r } { } \\mathrm { E n }$ BLEU informs how closely the intermediate language resembles English, at any given point during fine-tuning. ",
432
+ "bbox": [
433
+ 174,
434
+ 135,
435
+ 825,
436
+ 205
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "Datasets Agents are initially pre-trained on IWSLT $\\mathrm { F r } { } \\mathrm { E n }$ and $\\mathrm { E n } { } \\mathrm { D e }$ . Fine-tuning is performed on Multi30k Task 1(Elliott et al., 2016). That is, importantly, there is no overlap in the pre-training data and the fine-tuning data. Multi30k Task 1 consists of $3 0 \\mathrm { k }$ images and one caption per image in English, French, German and Czech (of which we only use the first three). For the English language model, we compare four different datasets: WikiText103, MS COCO and Flickr30k. The image-caption retrieval model is trained on Flickr30k: the same set of $3 0 \\mathrm { k }$ images as Multi30k but containing 5 English captions per image. Following Faghri et al. (2018), we randomly crop training images at every epoch. We use 2048-dimensional final-layer features from a pretrained and fixed ResNet-152 (He et al., 2016). ",
443
+ "bbox": [
444
+ 174,
445
+ 223,
446
+ 825,
447
+ 348
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Preprocessing The same tokenization and vocabulary are used across different tasks and datasets. We lowercase and tokenize our corpora with Moses (Koehn et al., 2007) and use subword tokenization with Byte Pair Encoding (BPE) (Sennrich et al., 2016) with $1 0 \\mathrm { k }$ merge operations. This allows us to use the same vocabulary across different models seamlessly (translation, language model, image-caption ranker model). ",
454
+ "bbox": [
455
+ 174,
456
+ 367,
457
+ 825,
458
+ 436
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "Controlling the English message length When fine-tuning the agents, we observe that the length of English messages becomes excessively long. As Agent A has no explicit incentive to output the $\\langle { \\mathrm { E O S } } \\rangle$ symbol, it tends to keep transmitting the same token repeatedly. Excessively long messages obscure evaluation of the communication protocol. For instance, BLEU score quickly deteriorates as the message length becomes longer, as it is a precision metric. When the message length is fixed, a drop in BLEU score will by necessity mean that the intermediate language has drifted away more. For this reason, we constrain the length of English messages to be no longer than the length of their French source sentence, or shorter if the model outputs the $\\langle { \\mathrm { E O S } } \\rangle$ symbol early. Recall that Agent B is supervised to predict the $\\langle \\mathrm { E O S } \\rangle$ symbol, so does not suffer from this issue. ",
465
+ "bbox": [
466
+ 174,
467
+ 455,
468
+ 825,
469
+ 580
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "Model Architecture and Pretraining Our MT agents are standard sequence-to-sequence models with attention (Bahdanau et al., 2015) with unidirectional, 1-layer GRU with 256 hidden units and 256-dimensional embeddings. During initial pre-training on IWSLT, we early-stop based on BLEU score on the development set (tst2013). The best checkpoints give 34.05 BLEU and 21.94 BLEU on IWSLT $\\mathrm { F r } { } \\mathrm { E n }$ and $\\mathrm { E n } { } \\mathrm { D e }$ development sets with greedy decoding. For our value function, we use a 2-layer MLP with a ReLU nonlinearity. ",
476
+ "bbox": [
477
+ 174,
478
+ 598,
479
+ 825,
480
+ 681
481
+ ],
482
+ "page_idx": 3
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "The language model is a 1-layer recurrent language model with 512 LSTM hidden units. The imagecaption retrieval model is a recently proposed ${ \\mathrm { V S E } } { + } { + }$ model (Faghri et al., 2018), with unidirectional 1-layer GRU with 512 hidden units and a single fully connected layer from 2048-dimensional ResNet features to 512-dimensional GRU hidden states. We report the performance of the pretrained models used in our experiments in Tables 1, 2 and 3. ",
487
+ "bbox": [
488
+ 174,
489
+ 689,
490
+ 823,
491
+ 758
492
+ ],
493
+ "page_idx": 3
494
+ },
495
+ {
496
+ "type": "table",
497
+ "img_path": "images/8d712c81f5b7175a22ce07dc23e59bbc953d14dca978c2896e317be8e62f7cb0.jpg",
498
+ "table_caption": [
499
+ "Table 1: Translation performance of our pre-trained agents (BLEU) "
500
+ ],
501
+ "table_footnote": [],
502
+ "table_body": "<table><tr><td></td><td>IWSLT</td><td>Multi30k</td></tr><tr><td>Fr-→En</td><td>34.05</td><td>26.80</td></tr><tr><td>En→De</td><td>21.94</td><td>18.56</td></tr></table>",
503
+ "bbox": [
504
+ 173,
505
+ 775,
506
+ 383,
507
+ 829
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "table",
513
+ "img_path": "images/a9487eef0eff2fbf2220f7e652292c05dc628b5ec2b2395de97a756e98a4e727.jpg",
514
+ "table_caption": [
515
+ "Table 2: Development NLL of pretrained language models "
516
+ ],
517
+ "table_footnote": [],
518
+ "table_body": "<table><tr><td>WikiText103</td><td>3.51</td></tr><tr><td>MS COCO</td><td>2.66</td></tr><tr><td>Flickr30k</td><td>2.85</td></tr></table>",
519
+ "bbox": [
520
+ 410,
521
+ 773,
522
+ 557,
523
+ 830
524
+ ],
525
+ "page_idx": 3
526
+ },
527
+ {
528
+ "type": "table",
529
+ "img_path": "images/aa5411793fa4fd8c89a468998e1b06602903ac4629a2160bfd591c278fdf3dd5.jpg",
530
+ "table_caption": [
531
+ "Table 3: Retrieval results for our ${ \\mathrm { V S E } } { + } { + }$ model on Flickr30k test set. "
532
+ ],
533
+ "table_footnote": [],
534
+ "table_body": "<table><tr><td></td><td>R@1</td><td>R@5</td><td>R@10</td></tr><tr><td>Caption</td><td>50.1</td><td>76.3</td><td>84.6</td></tr><tr><td>Image</td><td>35.7</td><td>65.3</td><td>75.9</td></tr></table>",
535
+ "bbox": [
536
+ 593,
537
+ 775,
538
+ 823,
539
+ 829
540
+ ],
541
+ "page_idx": 3
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Training Details When fine-tuning our agents, we perform learning rate annealing and early stopping based on $\\mathrm { F r { } D e }$ BLEU (communication performance) on the Multi30k development set. We use Adam (Kingma & Ba, 2014) with initial learning rate of 0.001 and dropout (Srivastava et al., 2014) rate of 0.1. We grid search over learning rate schedule and reward coefficients $( \\alpha _ { \\mathrm { p g } } , \\alpha _ { \\mathrm { e n t r } } , \\alpha _ { \\mathbf { b } } , \\beta _ { L M } , \\beta _ { G } )$ . ",
546
+ "bbox": [
547
+ 174,
548
+ 895,
549
+ 821,
550
+ 924
551
+ ],
552
+ "page_idx": 3
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "",
557
+ "bbox": [
558
+ 174,
559
+ 103,
560
+ 823,
561
+ 147
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "For our joint systems with policy gradient fine-tuning, we run every model three times with different random seeds and report averaged results (see Table 4). ",
568
+ "bbox": [
569
+ 173,
570
+ 152,
571
+ 823,
572
+ 181
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "Baseline and Upper Bound Our main quantitative experiment has three baselines: ",
579
+ "bbox": [
580
+ 171,
581
+ 198,
582
+ 728,
583
+ 213
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "• Pretrained checkpoints (on IWSLT). \n• Ensembling $:$ Given Fr, we let Agent A generate $K$ English hypotheses with beam search, $\\{ \\overline { { \\mathrm { E n } _ { j } } } \\} _ { j = 1 } ^ { K }$ . Then, we let Agent B generate the German translation $\\overline { { \\mathrm { D e } } }$ using an ensemble of $K$ source sentences (Firat et al., 2016; Zoph & Knight, 2016). \n• $\\mathrm { F r } { }$ En fixed $:$ We fix Agent A and only fine-tune Agent B using $\\mathbb { L } _ { B }$ . ",
590
+ "bbox": [
591
+ 215,
592
+ 224,
593
+ 828,
594
+ 310
595
+ ],
596
+ "page_idx": 4
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "Meanwhile, we also train an NMT model of the same architecture and size directly on the $\\mathrm { F r } { } \\mathrm { D e }$ task in Multi30k Task 1. This serves as an upper bound on the $\\mathrm { F r D e }$ performance achievable with available data. ",
601
+ "bbox": [
602
+ 178,
603
+ 321,
604
+ 825,
605
+ 364
606
+ ],
607
+ "page_idx": 4
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "5 QUANTITATIVE RESULTS ",
612
+ "text_level": 1,
613
+ "bbox": [
614
+ 176,
615
+ 386,
616
+ 413,
617
+ 402
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "table",
623
+ "img_path": "images/771f7367b239bc98e28ffe11feb718361b932f26a76e03c3852785fffdb08902.jpg",
624
+ "table_caption": [
625
+ "Table 4: Results in BLEU score on Multi30k Task 1. For our models using policy gradient fine-tuning, we report results averaged over three runs and provide standard deviations in brackets. PG: trained with vanilla policy gradient fine-tuning. $_ \\mathrm { P G + L M }$ : trained with the “Englishness” constraint in reward. For MS COCO and Flickr30k, the LM was trained directly on image captions. $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ : trained with grounding loss as well as the LM loss. $\\mathrm { F r } { } \\mathrm { E n }$ : degree of intermediate language drift from English; lower indicates more drift. $\\mathrm { F r } \\mathrm { E n } \\mathrm { D e }$ : metric for communication accuracy; higher is better. All: LM was trained on all three datasets combined. Improvements of $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ over $_ { \\mathrm { P G + L M } }$ were found to be significant in all cases, using the approximate randomization test for significance testing (Riezler & Maxwell III, 2005). "
626
+ ],
627
+ "table_footnote": [],
628
+ "table_body": "<table><tr><td></td><td>LM</td><td>Ranker</td><td>Fr-→En</td><td>Fr→En→De</td></tr><tr><td>Pretrained</td><td></td><td></td><td>27.18</td><td>16.30</td></tr><tr><td>Ensembling</td><td></td><td></td><td></td><td>16.95</td></tr><tr><td>Fr-→En fixed</td><td></td><td></td><td>27.18</td><td>22.37</td></tr><tr><td>PG</td><td>No LM</td><td></td><td>12.38 (0.67)</td><td>24.51 (1.48)</td></tr><tr><td rowspan=\"4\">PG+LM</td><td>WikiText103</td><td></td><td>21.63 (1.25)</td><td>26.88 (0.12)</td></tr><tr><td>MS COCO</td><td></td><td>25.05 (1.40)</td><td>27.66 (0.34)</td></tr><tr><td>Flickr30k</td><td></td><td>24.85 (1.14)</td><td>27.60 (0.27)</td></tr><tr><td>All</td><td></td><td>23.60 (1.05)</td><td>27.67 (0.39)</td></tr><tr><td rowspan=\"5\">PG+LM+G</td><td>No LM</td><td>1</td><td>14.20 (1.58)</td><td>26.23 (1.08)</td></tr><tr><td>WikiText103</td><td></td><td>23.65 (1.91)</td><td>27.87 (0.15)</td></tr><tr><td>MS COCO</td><td>v</td><td>26.24 (0.28)</td><td>27.86 (0.24)</td></tr><tr><td>Flickr30k</td><td>←</td><td>25.99 (1.62)</td><td>27.82 (0.41)</td></tr><tr><td>All</td><td>专</td><td>24.75 (0.40)</td><td>28.08 (0.73)</td></tr><tr><td>Fr→De</td><td></td><td></td><td></td><td>30.73</td></tr></table>",
629
+ "bbox": [
630
+ 279,
631
+ 426,
632
+ 717,
633
+ 670
634
+ ],
635
+ "page_idx": 4
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "In Table 4, the top three rows are our baselines. The pretrained model performs relatively poorly on $\\mathrm { F r { } D e }$ , conceivably because it was pretrained on a different corpus, and Agent B was was given Agent A’s output as source. Ensembling multiple English hypotheses for Agent B (row 2) gives negligible increase in $\\mathrm { F r { } D e }$ performance. When only Agent B is fine-tuned, we observe 6 BLEU score increase in $\\mathrm { F r } { } \\mathrm { D e }$ . ",
640
+ "bbox": [
641
+ 174,
642
+ 804,
643
+ 825,
644
+ 875
645
+ ],
646
+ "page_idx": 4
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "When the joint system is fine-tuned on German log likelihood with policy gradients (PG), we observe a large, 8 BLEU increase increase in $\\mathrm { F r { } D e }$ at the cost of a substanstial, 15 BLEU score drop in $\\mathrm { F r } { } \\mathrm { E n }$ . This clearly shows that optimizing on some external reward causes a drastic language drift. ",
651
+ "bbox": [
652
+ 176,
653
+ 881,
654
+ 823,
655
+ 924
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "image",
661
+ "img_path": "images/2e6473a16038c59a8aaa522125782b8b39bf55d63c60d9db4ff14d556179de4a.jpg",
662
+ "image_caption": [
663
+ "Figure 2: Learning curves for PG, $_ \\mathrm { P G + L M }$ and $\\mathrm { P G + L M + G }$ . En LM NLL curves show the NLL of English messages, computed by a language model trained on WikiText103. Lower En BLEU indicates more language drift, and higher En LM NLL indicates more language drift. "
664
+ ],
665
+ "image_footnote": [],
666
+ "bbox": [
667
+ 174,
668
+ 101,
669
+ 821,
670
+ 223
671
+ ],
672
+ "page_idx": 5
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "When the agent is trained with the “Englishness” constraint $( \\mathrm { P G + L M } )$ , we notice a significant improvement in $\\mathrm { F r } { } \\mathrm { E n }$ BLEU. When the LM is trained on WikiText103, a widely used language modelling dataset, we observe improvement of 9 BLEU scores. When the training corpus is closer to the target domain, such as MS COCO or Flickr30k, we see more than 10 BLEU score increase. $\\mathrm { F r { } D e }$ translation also improves by 2–3 BLEU scores. ",
677
+ "bbox": [
678
+ 174,
679
+ 303,
680
+ 825,
681
+ 372
682
+ ],
683
+ "page_idx": 5
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "However, we see the biggest improvements in performance when agents are trained using visual grounding feedback. This is particularly pronounced with the LM trained on WikiText103: introducing visual grounding leads to more than 2 BLEU score improvement in $\\mathrm { F r } { } \\mathrm { E n }$ , and 1 BLEU score improvement in $\\mathrm { F r } { } \\mathrm { D e }$ . We hypothesize that the “Englishness” constraint forces agents to communicate with correct syntax and fluency, while the image-caption retrieval model restricts the search space of languages to ones that are grounded by visual semantics. To see if grounding is really necessary, we train a stronger LM on all three datasets combined, but find this still leads to more language drift than using visual grounding: the $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ model with the LM trained on MS COCO outperforms this by 3 BLEU scores on $\\mathrm { F r } { } \\mathrm { E n }$ . ",
688
+ "bbox": [
689
+ 173,
690
+ 380,
691
+ 825,
692
+ 506
693
+ ],
694
+ "page_idx": 5
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "In Figure 2, we observe that vanilla PG fine-tuning quickly leads to highly “un-English” communication, as can be seen from a distinct increase in LM NLL. It is also worth noting that while $\\mathrm { P G } { + } \\mathrm { L M }$ achieves better LM NLL than $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ , it gives much lower $\\mathrm { F r } { } \\mathrm { E n }$ BLEU score than the grounded model $\\mathbf { \\left( P G + L M + G \\right) }$ ). This is another indication that simply encouraging naturalness is not enough; grounding is key. ",
699
+ "bbox": [
700
+ 174,
701
+ 512,
702
+ 823,
703
+ 582
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "A close investigation into the token statistics of each communication strategy reveals that PG finetuning causes the word frequency distribution to be flatter. The PG model has negative frequency difference values for the most frequent tokens, indicating that PG downweighs frequent words severely. On the other hand, $\\mathrm { P G + L M }$ gives highly positive frequency differences, meaning that language modelling alone disproportionately emphasizes frequent tokens. Visual grounding keeps the token frequency distribution close to the original pretrained regimes. Analyzing the top- $\\mathbf { \\nabla } \\cdot \\mathbf { k }$ most frequent ",
710
+ "bbox": [
711
+ 173,
712
+ 588,
713
+ 825,
714
+ 672
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "image",
720
+ "img_path": "images/bf2a3c8025d92e906f110c433c6960b32090a0846ae259233c5305646f5999a4.jpg",
721
+ "image_caption": [
722
+ "Figure 3: Token frequency analysis on three different models (PG, $_ \\mathrm { P G + L M }$ , $\\mathrm { P G + L M + G }$ ) as well as the pretrained model before any fine-tuning (Pretrained). We show the word frequency curves (sorted in decreasing order) for each model, after subtracting the reference English frequency statistics (also sorted). Positive y values indicate higher frequency values than the English reference, and negative y values indicate lower frequency values than English. Note that y-axis is the frequency difference in thousands, and $\\mathbf { X }$ -axis shows the vocabulary index (sorted with frequency) in log scale. "
723
+ ],
724
+ "image_footnote": [],
725
+ "bbox": [
726
+ 266,
727
+ 702,
728
+ 723,
729
+ 832
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "table",
735
+ "img_path": "images/3387697be3df0a6c12359a7e6b47bb0bf478b97a8608190e006bc9544b44e3ee.jpg",
736
+ "table_caption": [
737
+ "words shows that $\\mathrm { P G } { + } \\mathrm { L M }$ disproportionately favors quotation marks, which are very common tokens in many language modelling datasets but occur rarely in Multi30k (see also Appendix A). ",
738
+ "Table 5: Additional token frequency analysis. unique: the number of unique English tokens used in the whole development set. /sent: the number of unique English tokens used per sentence. /all: (the number of unique English tokens / the number of all English tokens.) "
739
+ ],
740
+ "table_footnote": [],
741
+ "table_body": "<table><tr><td></td><td colspan=\"3\">IWSLT</td><td colspan=\"3\">Multi30k</td></tr><tr><td></td><td>unique</td><td>/sent</td><td>/all</td><td>unique</td><td>/sent</td><td>/all</td></tr><tr><td>Reference</td><td>5,303</td><td>19.7</td><td>0.86</td><td>3,046</td><td>11.9</td><td>0.91</td></tr><tr><td>Pretrained</td><td>4,657</td><td>17.9</td><td>0.85</td><td>2,867</td><td>12.0</td><td>0.87</td></tr><tr><td>PG</td><td>4,933</td><td>13.6</td><td>0.56</td><td>3,197</td><td>9.2</td><td>0.65</td></tr><tr><td>PG+LM</td><td>3,819</td><td>14.6</td><td>0.61</td><td>2,438</td><td>10.9</td><td>0.78</td></tr><tr><td>PG+LM+G</td><td>4,327</td><td>15.7</td><td>0.74</td><td>2,550</td><td>10.7</td><td>0.84</td></tr></table>",
742
+ "bbox": [
743
+ 300,
744
+ 142,
745
+ 696,
746
+ 255
747
+ ],
748
+ "page_idx": 6
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "Table 5 reinforces the finding that vanilla PG fine-tuning leads to flatter token frequency distributions, as the number of unique tokens used by PG is greater than that of the pretrained model. Meanwhile, $\\mathrm { P G + L M }$ uses fewer tokens overall, signifying that it uses a relatively small set of tokens frequently. ",
753
+ "bbox": [
754
+ 173,
755
+ 318,
756
+ 825,
757
+ 375
758
+ ],
759
+ "page_idx": 6
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Also note that PG, despite using a more diverse set of tokens, uses the smallest number of unique symbols per sentence (/sent) and overall (/all). This implies that PG communication is often repetitive. Introducing extra tasks seems to mitigate this, and the grounded model $\\mathrm { ( P G + L M + G }$ ) learns a frequency distribution that most closely resembles the original distribution. ",
764
+ "bbox": [
765
+ 174,
766
+ 380,
767
+ 825,
768
+ 436
769
+ ],
770
+ "page_idx": 6
771
+ },
772
+ {
773
+ "type": "text",
774
+ "text": "To gain further insight into the agents’ communication protocols, we compare the degree of drift by part-of-speech. Table 6 shows that PG tends to ignore function words, such as periods and infinitives. Models trained with LM and grounding losses retain function words with much higher accuracy. PG fares relatively better with content words (nouns and verbs), but adding LM and grounding losses still outperform PG. Grounding leads to overall improvements in recall, particularly with content words. ",
775
+ "bbox": [
776
+ 174,
777
+ 444,
778
+ 825,
779
+ 526
780
+ ],
781
+ "page_idx": 6
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "Conceivably, when optimizing Agent A’s policy on the communication task alone, it is more crucial to relay content information to Agent B, and this might cause agents to ignore syntactic conformity in the original intermediate language. We argue that LM and grounding reduces the space of intermediate languages to a much reasonable language space, facilitating learning. ",
786
+ "bbox": [
787
+ 174,
788
+ 534,
789
+ 825,
790
+ 590
791
+ ],
792
+ "page_idx": 6
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "6 QUALITATIVE RESULTS ",
797
+ "text_level": 1,
798
+ "bbox": [
799
+ 176,
800
+ 609,
801
+ 401,
802
+ 626
803
+ ],
804
+ "page_idx": 6
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "In the first example of Table 7, it is clear that PG’s English message has significantly diverged from English: it is highly repetitive (“table table table table table”) and is missing some key content words such as “man” and “jacket”. However, Agent B still generates the German word for ‘man’. The grounded model’s message $\\mathbf { \\Gamma } ( \\mathbf { P G + L M + G }$ ) is distinctly the most fluent and semantically correct. ",
809
+ "bbox": [
810
+ 174,
811
+ 640,
812
+ 825,
813
+ 696
814
+ ],
815
+ "page_idx": 6
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "In the second example, observe that the PG Agent B misinterprets “talking talking a coach a coach” into “spricht mit einem spieler” (talking to a player). The $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ model again generates a flawless English sentence. Also note that it communicates both colors (red and white) successfully from French to German, while the other two models fail to do so. ",
820
+ "bbox": [
821
+ 174,
822
+ 703,
823
+ 823,
824
+ 760
825
+ ],
826
+ "page_idx": 6
827
+ },
828
+ {
829
+ "type": "table",
830
+ "img_path": "images/ea03400f19c2c70b0a89542b0d7a682480306aac862289bb474be45d5b48390e.jpg",
831
+ "table_caption": [
832
+ "Table 6: Exact-match word recall by POS-tag on IWSLT development set: when the English reference contains a word of a certain POS tag, how often does the agent correctly produces that word. TO: infinitive to, (.): period, DT: determiner, Noun: (NN, NNS, NNP, NNPS), Verb: (VB, VBD, VBG, VBN, VBP, VBZ), Adj: adjective (JJ, JJR, JJS), Adv: adverb (RB, RBR, RBS) "
833
+ ],
834
+ "table_footnote": [],
835
+ "table_body": "<table><tr><td></td><td colspan=\"3\">Function words</td><td colspan=\"4\">Content words</td></tr><tr><td></td><td>TO</td><td>:</td><td>DT</td><td>Noun</td><td>Verb</td><td>Adj</td><td>Adv</td></tr><tr><td>PG</td><td>0.22</td><td>0.36</td><td>0.57</td><td>0.38</td><td>0.17</td><td>0.32</td><td>0.26</td></tr><tr><td>PG+LM</td><td>0.55</td><td>0.84</td><td>0.72</td><td>0.39</td><td>0.18</td><td>0.21</td><td>0.25</td></tr><tr><td>PG+LM+G</td><td>0.62</td><td>0.88</td><td>0.74</td><td>0.43</td><td>0.26</td><td>0.33</td><td>0.29</td></tr></table>",
836
+ "bbox": [
837
+ 289,
838
+ 779,
839
+ 709,
840
+ 858
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "image",
846
+ "img_path": "images/b8bd9351b4fea398c0d397a493640b4af135973616c5c8b1d5f10437ca4bcc25.jpg",
847
+ "image_caption": [],
848
+ "image_footnote": [],
849
+ "bbox": [
850
+ 174,
851
+ 116,
852
+ 258,
853
+ 210
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "image",
859
+ "img_path": "images/4726323f7f35665892b7da69121761a1df8453ebbbde432c6c2e91c381fc4bf2.jpg",
860
+ "image_caption": [],
861
+ "image_footnote": [],
862
+ "bbox": [
863
+ 173,
864
+ 236,
865
+ 258,
866
+ 353
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "table",
872
+ "img_path": "images/47394a81739951eccf3168f9e16904f2caccdc92cf53f0f593b2e4f6aa9947c5.jpg",
873
+ "table_caption": [
874
+ "Table 7: Two random examples from Multi30k development set with different models (PG, $\\mathrm { P G + L M } .$ , $\\mathrm { P G + L M + G }$ . The top three rows list the ground truth sentences, the middle three rows are the English messages sent by the $\\mathrm { F r } { } \\mathrm { E n }$ agent, and the bottom three rows show the German output from the $\\mathrm { E n } { } \\mathrm { D e }$ agent. We also show the corresponding images, which were only used to train the image-caption retrieval modal. "
875
+ ],
876
+ "table_footnote": [],
877
+ "table_body": "<table><tr><td>Ref</td><td>Fr De En</td><td>un vieil homme vétu d&#x27;une veste noire regarde sur la table ein alter mann in einer schwarzen jacke blickt auf den tisch an old man wearing a black jacket is looking on the table</td></tr><tr><td>En</td><td>PG +LM +G</td><td>a old teaching black watching on the table table table table table table a old man in a jacket looking on the table .”” an old man in a black jacket looking on the table .</td></tr><tr><td>De</td><td>PG +LM +G</td><td>ein älterer mann in einem schwarzen hemd schaut auf den tisch. einalter mann in einer jacke beobachtet einen tisch . ein älterer mann in einer schwarzen jacke schaut auf den tisch .</td></tr><tr><td>Ref</td><td>Fr De En</td><td>un joueur de football américain en blanc et rouge parle â un entraineur . einrot-weiB gekleideter footballspieler spricht mit einem trainer . a football player in red and white is talking to a coach .</td></tr><tr><td>En</td><td>PG +LM +G PG</td><td>a player football american football american and red talking talking a coach a player of white and red talking to a coach .””” a football player in white and red talking to a coach . ein footballspieler spricht mit einem spieler in einem roten trikot .</td></tr><tr><td>De</td><td>+LM +G</td><td>ein weiB gekleideter fuBballspieler spricht zu einem trainer. ein fuBballspieler in einem rot-weiBen trikot spricht mit einem trainer .</td></tr></table>",
878
+ "bbox": [
879
+ 266,
880
+ 103,
881
+ 820,
882
+ 368
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "image",
888
+ "img_path": "images/e5a1c81ab55fbbd4fc089d67ea7e21f83e1026db91dcd7e04eda1ef185ccb23d.jpg",
889
+ "image_caption": [],
890
+ "image_footnote": [],
891
+ "bbox": [
892
+ 174,
893
+ 450,
894
+ 295,
895
+ 592
896
+ ],
897
+ "page_idx": 7
898
+ },
899
+ {
900
+ "type": "table",
901
+ "img_path": "images/820cf03235e0c8e11fea69abbc48e9c4ec96dee06f133d6543f6b648c78dca60.jpg",
902
+ "table_caption": [
903
+ "Table 8: Evidence of token flipping in the PG model. "
904
+ ],
905
+ "table_footnote": [],
906
+ "table_body": "<table><tr><td>Fr src En ref En hyp De ref De hyp Fr src</td><td>un enfant assis sur un rocher. a child sitting on a rock formation. a punk sitting sitting on on a broken ein kind sitzt auf einem felsen. ein kind sitzt auf einem felsen .</td></tr></table>",
907
+ "bbox": [
908
+ 310,
909
+ 452,
910
+ 776,
911
+ 593
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "We observe some instances of token flipping with the PG model. For example, one particular PG model uses “punk” to describe “child” (see Table 8). As no occurrence of “punk” in any training data is associated with “child”, the agents must have acquired this new meaning assignment during fine-tuning. Among 35 examples in Multi30k development set where the English reference contains “child”, the model uses “punk” 15 times, indicating this is no random phenomenon. We show similar examples from the $\\mathrm { P G } { + } \\mathrm { L M }$ model in Appendix B. We did not observe such examples with the $\\mathrm { P G } { + } \\mathrm { L M } { + } \\mathrm { G }$ model. ",
918
+ "bbox": [
919
+ 174,
920
+ 645,
921
+ 825,
922
+ 743
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "7 CONCLUSION ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 176,
932
+ 758,
933
+ 318,
934
+ 775
935
+ ],
936
+ "page_idx": 7
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "In this paper, we show that language drift happens when fine-tuning natural language agents with some external (non-linguistic) reward using policy gradients, and propose a few approaches to avoid this. Most importantly, we find that simply encouraging “naturalness”, e.g. via adding a language model log likelihood to the reward, does not lead to the desired consequences. Instead, we contend that grounding is what we need to avoid language drift. Our empirical results show that grounding leads to best communication performance (highest $\\mathrm { F r { } D e }$ BLEU), while also showing least signs of language drift (highest $\\mathrm { F r } { } \\mathrm { E n }$ BLEU). Analyzing token frequencies in exchanged messages reveals that pure PG finetuning tends to learn flatter token distributions, and encouraging naturalness disproportionately emphasizes frequent tokens, while the grounded model best retains the original token frequencies. ",
941
+ "bbox": [
942
+ 173,
943
+ 785,
944
+ 825,
945
+ 924
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "ACKNOWLEDGMENTS ",
952
+ "text_level": 1,
953
+ "bbox": [
954
+ 176,
955
+ 103,
956
+ 356,
957
+ 118
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "REFERENCES ",
964
+ "text_level": 1,
965
+ "bbox": [
966
+ 176,
967
+ 137,
968
+ 285,
969
+ 152
970
+ ],
971
+ "page_idx": 8
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "Jacob Andreas, Anca D. Dragan, and Dan Klein. Translating neuralese. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, pp. 232–242, 2017. ",
976
+ "bbox": [
977
+ 173,
978
+ 160,
979
+ 825,
980
+ 190
981
+ ],
982
+ "page_idx": 8
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. ",
987
+ "bbox": [
988
+ 174,
989
+ 200,
990
+ 823,
991
+ 242
992
+ ],
993
+ "page_idx": 8
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron C. Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. arXiv preprint arXiv:1607.07086, 2016. ",
998
+ "bbox": [
999
+ 176,
1000
+ 253,
1001
+ 823,
1002
+ 296
1003
+ ],
1004
+ "page_idx": 8
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew M. Dai, Rafal Jozefowicz, and Samy ´ Bengio. Generating sentences from a continuous space. In Proceedings of the 20th SIGNLL Conference on Computational Natural Language Learning, CoNLL 2016, Berlin, Germany, August 11-12, 2016, pp. 10–21, 2016. ",
1009
+ "bbox": [
1010
+ 173,
1011
+ 306,
1012
+ 825,
1013
+ 364
1014
+ ],
1015
+ "page_idx": 8
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "Ted Briscoe. Linguistic evolution through language acquisition. Cambridge University Press, 2002. ",
1020
+ "bbox": [
1021
+ 169,
1022
+ 375,
1023
+ 823,
1024
+ 391
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "Yun Chen, Yang Liu, and Victor O. K. Li. Zero-resource neural machine translation with multiagent communication game. In Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, 2018. ",
1031
+ "bbox": [
1032
+ 174,
1033
+ 400,
1034
+ 823,
1035
+ 444
1036
+ ],
1037
+ "page_idx": 8
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "Yong Cheng, Qian Yang, Yang Liu, Maosong Sun, and Wei Xu. Joint training for pivot-based neural machine translation. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, pp. 3974–3980, 2017. ",
1042
+ "bbox": [
1043
+ 176,
1044
+ 454,
1045
+ 823,
1046
+ 497
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Grzegorz Chrupała, Akos Kad´ ar, and Afra Alishahi. Learning language through pictures. ´ arXiv preprint arXiv:1506.03694, 2015. ",
1053
+ "bbox": [
1054
+ 173,
1055
+ 507,
1056
+ 823,
1057
+ 536
1058
+ ],
1059
+ "page_idx": 8
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "Desmond Elliott and Akos Kad´ ar. Imagination improves multimodal translation. ´ arXiv preprint arXiv:1705.04350, 2017. ",
1064
+ "bbox": [
1065
+ 173,
1066
+ 547,
1067
+ 823,
1068
+ 577
1069
+ ],
1070
+ "page_idx": 8
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "Desmond Elliott, Stella Frank, Khalil Sima’an, and Lucia Specia. Multi30k: Multilingual englishgerman image descriptions. In Proceedings of the 5th Workshop on Vision and Language, pp. 70–74, 2016. ",
1075
+ "bbox": [
1076
+ 173,
1077
+ 587,
1078
+ 825,
1079
+ 630
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "Katrina Evtimova, Andrew Drozdov, Douwe Kiela, and Kyunghyun Cho. Emergent language in a multi-modal, multi-step referential game. In Proceedings of the International Conference on Learning Representations, 2018. ",
1086
+ "bbox": [
1087
+ 173,
1088
+ 640,
1089
+ 825,
1090
+ 684
1091
+ ],
1092
+ "page_idx": 8
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "Fartash Faghri, David J. Fleet, Jamie Kiros, and Sanja Fidler. ${ \\mathrm { V S E } } { + } { + }$ : improving visual-semantic embeddings with hard negatives. In British Machine Vision Conference, pp. 12, 2018. ",
1097
+ "bbox": [
1098
+ 171,
1099
+ 694,
1100
+ 825,
1101
+ 723
1102
+ ],
1103
+ "page_idx": 8
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "Orhan Firat, Baskaran Sankaran, Yaser Al-Onaizan, Fatos T Yarman Vural, and Kyunghyun Cho. Zero-resource translation with multi-lingual neural machine translation. arXiv preprint arXiv:1606.04164, 2016. ",
1108
+ "bbox": [
1109
+ 173,
1110
+ 733,
1111
+ 826,
1112
+ 776
1113
+ ],
1114
+ "page_idx": 8
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "Spandana Gella, Rico Sennrich, Frank Keller, and Mirella Lapata. Image pivoting for learning multilingual multimodal representations. arXiv preprint arXiv:1707.07601, 2017. ",
1119
+ "bbox": [
1120
+ 171,
1121
+ 787,
1122
+ 825,
1123
+ 818
1124
+ ],
1125
+ "page_idx": 8
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "Jiatao Gu, Kyunghyun Cho, and Victor O. K. Li. Trainable greedy decoding for neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1968–1978, 2017. ",
1130
+ "bbox": [
1131
+ 176,
1132
+ 827,
1133
+ 823,
1134
+ 871
1135
+ ],
1136
+ "page_idx": 8
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "Serhii Havrylov and Ivan Titov. Emergence of language with multi-agent games: Learning to communicate with sequences of symbols. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems, pp. 2146–2156, 2017. ",
1141
+ "bbox": [
1142
+ 174,
1143
+ 881,
1144
+ 823,
1145
+ 924
1146
+ ],
1147
+ "page_idx": 8
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR, pp. 770– 778, 2016. ",
1152
+ "bbox": [
1153
+ 174,
1154
+ 103,
1155
+ 821,
1156
+ 146
1157
+ ],
1158
+ "page_idx": 9
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "Julian Hitschler, Shigehiko Schamoni, and Stefan Riezler. Multimodal pivots for image caption translation. arXiv preprint arXiv:1601.03916, 2016. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 155,
1166
+ 823,
1167
+ 184
1168
+ ],
1169
+ "page_idx": 9
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "Akos K ´ ad´ ar, Desmond Elliott, Marc-Alexandre C ´ otˆ e, Grzegorz Chrupała, and Afra Alishahi. ´ Lessons learned in multilingual grounded language learning. arXiv preprint arXiv:1809.07615, 2018. ",
1174
+ "bbox": [
1175
+ 174,
1176
+ 193,
1177
+ 825,
1178
+ 236
1179
+ ],
1180
+ "page_idx": 9
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Douwe Kiela, Alexis Conneau, Allan Jabri, and Maximilian Nickel. Learning visually grounded sentence representations. arXiv preprint arXiv:1707.06320, 2017. ",
1185
+ "bbox": [
1186
+ 173,
1187
+ 244,
1188
+ 821,
1189
+ 273
1190
+ ],
1191
+ "page_idx": 9
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014. ",
1196
+ "bbox": [
1197
+ 173,
1198
+ 282,
1199
+ 799,
1200
+ 297
1201
+ ],
1202
+ "page_idx": 9
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Simon Kirby. Spontaneous evolution of linguistic structure-an iterated learning model of the emergence of regularity and irregularity. IEEE Transactions on Evolutionary Computation, 5(2):102– 110, 2001. ",
1207
+ "bbox": [
1208
+ 174,
1209
+ 306,
1210
+ 825,
1211
+ 348
1212
+ ],
1213
+ "page_idx": 9
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondrej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics, 2007. ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 357,
1221
+ 825,
1222
+ 428
1223
+ ],
1224
+ "page_idx": 9
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Satwik Kottur, Jose M. F. Moura, Stefan Lee, and Dhruv Batra. Natural language does not emerge ´ ’naturally’ in multi-agent dialog. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2962–2967, 2017. ",
1229
+ "bbox": [
1230
+ 174,
1231
+ 435,
1232
+ 825,
1233
+ 479
1234
+ ],
1235
+ "page_idx": 9
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "Angeliki Lazaridou, Alexander Peysakhovich, and Marco Baroni. Multi-agent cooperation and the emergence of (natural) language. In Proceedings of the International Conference on Learning Representations, 2017. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 487,
1243
+ 825,
1244
+ 531
1245
+ ],
1246
+ "page_idx": 9
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "Jason Lee, Kyunghyun Cho, Jason Weston, and Douwe Kiela. Emergent translation in multi-agent communication. In Proceedings of the International Conference on Learning Representations, 2018. ",
1251
+ "bbox": [
1252
+ 174,
1253
+ 539,
1254
+ 823,
1255
+ 582
1256
+ ],
1257
+ "page_idx": 9
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "Mike Lewis, Denis Yarats, Yann N Dauphin, Devi Parikh, and Dhruv Batra. Deal or no deal? endto-end learning for negotiation dialogues. arXiv preprint arXiv:1706.05125, 2017. ",
1262
+ "bbox": [
1263
+ 171,
1264
+ 590,
1265
+ 821,
1266
+ 621
1267
+ ],
1268
+ "page_idx": 9
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "Jiwei Li, Will Monroe, Tianlin Shi, Sebastien Jean, Alan Ritter, and Dan Jurafsky. Adversarial´ learning for neural dialogue generation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2157–2169, 2017. ",
1273
+ "bbox": [
1274
+ 176,
1275
+ 627,
1276
+ 823,
1277
+ 671
1278
+ ],
1279
+ "page_idx": 9
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "Igor Mordatch and Pieter Abbeel. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1705.10369, 2017. ",
1284
+ "bbox": [
1285
+ 171,
1286
+ 679,
1287
+ 823,
1288
+ 709
1289
+ ],
1290
+ "page_idx": 9
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "Kazunori Muraki. VENUS: two-phase machine translation system. Future Generation Comp. Syst., 2(2):117–119, 1986. ",
1295
+ "bbox": [
1296
+ 173,
1297
+ 717,
1298
+ 823,
1299
+ 746
1300
+ ],
1301
+ "page_idx": 9
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "Hideki Nakayama and Noriki Nishida. Zero-resource machine translation by multimodal encoder– decoder network with multimedia pivot. Machine Translation, 31(1-2):49–64, 2017. ",
1306
+ "bbox": [
1307
+ 171,
1308
+ 755,
1309
+ 823,
1310
+ 784
1311
+ ],
1312
+ "page_idx": 9
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Rodrigo Nogueira and Kyunghyun Cho. Task-oriented query reformulation with reinforcement learning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 574–583, 2017. ",
1317
+ "bbox": [
1318
+ 174,
1319
+ 792,
1320
+ 825,
1321
+ 835
1322
+ ],
1323
+ "page_idx": 9
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "Martin A Nowak and David C Krakauer. The evolution of language. Proceedings of the National Academy of Sciences, 96(14):8028–8033, 1999. ",
1328
+ "bbox": [
1329
+ 168,
1330
+ 843,
1331
+ 825,
1332
+ 872
1333
+ ],
1334
+ "page_idx": 9
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pp. 311–318, 2002. ",
1339
+ "bbox": [
1340
+ 174,
1341
+ 881,
1342
+ 825,
1343
+ 924
1344
+ ],
1345
+ "page_idx": 9
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "Romain Paulus, Caiming Xiong, and Richard Socher. A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304, 2017. ",
1350
+ "bbox": [
1351
+ 171,
1352
+ 103,
1353
+ 823,
1354
+ 132
1355
+ ],
1356
+ "page_idx": 10
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. ",
1361
+ "bbox": [
1362
+ 171,
1363
+ 140,
1364
+ 823,
1365
+ 170
1366
+ ],
1367
+ "page_idx": 10
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "Stefan Riezler and John T. Maxwell III. On some pitfalls in automatic evaluation and significance testing for MT. In Proceedings of the Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, pp. 57–64, 2005. ",
1372
+ "bbox": [
1373
+ 178,
1374
+ 178,
1375
+ 823,
1376
+ 222
1377
+ ],
1378
+ "page_idx": 10
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, 2016. ",
1383
+ "bbox": [
1384
+ 174,
1385
+ 229,
1386
+ 825,
1387
+ 273
1388
+ ],
1389
+ "page_idx": 10
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "Brian Skyrms. Signals: Evolution, learning, and information. Oxford University Press, 2010. ",
1394
+ "bbox": [
1395
+ 171,
1396
+ 281,
1397
+ 789,
1398
+ 297
1399
+ ],
1400
+ "page_idx": 10
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. ",
1405
+ "bbox": [
1406
+ 176,
1407
+ 305,
1408
+ 823,
1409
+ 348
1410
+ ],
1411
+ "page_idx": 10
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "Luc Steels. The synthetic modeling of language origins. Evolution of communication, 1(1):1–34, 1997. ",
1416
+ "bbox": [
1417
+ 174,
1418
+ 357,
1419
+ 821,
1420
+ 386
1421
+ ],
1422
+ "page_idx": 10
1423
+ },
1424
+ {
1425
+ "type": "text",
1426
+ "text": "Yining Wang, Yang Zhao, Jiajun Zhang, Chengqing Zong, and Zhengshan Xue. Towards neural machine translation with partially aligned corpora. In Proceedings of the Eighth International Joint Conference on Natural Language Processing, pp. 384–393, 2017. ",
1427
+ "bbox": [
1428
+ 174,
1429
+ 395,
1430
+ 825,
1431
+ 438
1432
+ ],
1433
+ "page_idx": 10
1434
+ },
1435
+ {
1436
+ "type": "text",
1437
+ "text": "Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. ",
1438
+ "bbox": [
1439
+ 174,
1440
+ 446,
1441
+ 823,
1442
+ 476
1443
+ ],
1444
+ "page_idx": 10
1445
+ },
1446
+ {
1447
+ "type": "text",
1448
+ "text": "Barret Zoph and Kevin Knight. Multi-source neural translation. arXiv preprint arXiv:1601.00710, 2016. ",
1449
+ "bbox": [
1450
+ 174,
1451
+ 484,
1452
+ 823,
1453
+ 513
1454
+ ],
1455
+ "page_idx": 10
1456
+ },
1457
+ {
1458
+ "type": "text",
1459
+ "text": "A FREQUENCY ANALYSIS ",
1460
+ "text_level": 1,
1461
+ "bbox": [
1462
+ 176,
1463
+ 102,
1464
+ 405,
1465
+ 117
1466
+ ],
1467
+ "page_idx": 11
1468
+ },
1469
+ {
1470
+ "type": "image",
1471
+ "img_path": "images/9e511079724de538a32385cc7d00d066fef883bd26a28323d6a23aff275760a7.jpg",
1472
+ "image_caption": [
1473
+ "Figure 4: Token frequency analysis similar to Figure 3, but with the $\\mathbf { X }$ -axis fixed to the token indices sorted with respect to English reference, in decreasing order. "
1474
+ ],
1475
+ "image_footnote": [],
1476
+ "bbox": [
1477
+ 267,
1478
+ 143,
1479
+ 720,
1480
+ 273
1481
+ ],
1482
+ "page_idx": 11
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "In Figure 4, where the $\\mathbf { X }$ -axis is fixed to the token indices sorted with respect to the English reference, we observe that the $_ { \\mathrm { P G + L M } }$ model does indeed favor one word particularly strongly. From investigating top- $\\mathbf { \\nabla } \\cdot \\mathbf { k }$ most frequent tokens in each model, we find that quotation mark is the most common token for $\\mathrm { P G } { + } \\mathrm { L M }$ in both datasets we experimented with. It is plausible that quotation marks occur with high frequency in language modelling datasets, causing them to be disproportionately overweighed during fine-tuning. ",
1487
+ "bbox": [
1488
+ 174,
1489
+ 329,
1490
+ 825,
1491
+ 414
1492
+ ],
1493
+ "page_idx": 11
1494
+ },
1495
+ {
1496
+ "type": "table",
1497
+ "img_path": "images/0ba4603f02ef7d1c3d77e8210c0a23c81d19c905fb4f8887c438615f08af1da3.jpg",
1498
+ "table_caption": [
1499
+ "Table 9: Top 20 most frequent tokens in English reference (Reference) or the output from $\\mathrm { F r } { } \\mathrm { E n }$ models. "
1500
+ ],
1501
+ "table_footnote": [],
1502
+ "table_body": "<table><tr><td colspan=\"2\">IWSLT</td></tr><tr><td>Reference Pretrained PG PG+LM PG+LM+G</td><td>,. the and to of a that i in is it you we &amp;apos;s this &amp;quot; , the .to of and a i that in it we you &amp;apos;s is this &amp;quot; was a the and ,. in i &amp;quot; this of to is we you ? that not for &amp;quot; the ,of .and in a to this is i es you for we that with the ,. of a and to in is i this es we for that you at what</td></tr><tr><td colspan=\"2\">Multi30k</td></tr></table>",
1503
+ "bbox": [
1504
+ 179,
1505
+ 429,
1506
+ 818,
1507
+ 636
1508
+ ],
1509
+ "page_idx": 11
1510
+ },
1511
+ {
1512
+ "type": "image",
1513
+ "img_path": "images/cdc9523d1fd0a40d08c8cb48cf753b771e9f9b219b763ce2e343543a98889b45.jpg",
1514
+ "image_caption": [
1515
+ "Figure 5: Token frequency curves (before subtracting the reference frequencies). Both $\\mathbf { X }$ (vocabulary index) and y (frequency) axes are in log scale. "
1516
+ ],
1517
+ "image_footnote": [],
1518
+ "bbox": [
1519
+ 267,
1520
+ 695,
1521
+ 728,
1522
+ 825
1523
+ ],
1524
+ "page_idx": 11
1525
+ },
1526
+ {
1527
+ "type": "text",
1528
+ "text": "In Figure 5, we show the token frequency curves before subtracting the reference frequencies. Similarly to Figure 4, we observe that the PG model discourages frequent (mostly functional) words, while the $\\mathrm { P G + L M }$ model excessively prefers frequent words. ",
1529
+ "bbox": [
1530
+ 176,
1531
+ 882,
1532
+ 823,
1533
+ 924
1534
+ ],
1535
+ "page_idx": 11
1536
+ },
1537
+ {
1538
+ "type": "text",
1539
+ "text": "B EVIDENCE OF TOKEN FLIPPING IN THE PG+LM MODEL ",
1540
+ "text_level": 1,
1541
+ "bbox": [
1542
+ 173,
1543
+ 102,
1544
+ 668,
1545
+ 118
1546
+ ],
1547
+ "page_idx": 12
1548
+ },
1549
+ {
1550
+ "type": "image",
1551
+ "img_path": "images/8610b3cd658e44b02f9aebeb193fb86d3b8c66dec8b2faf3ffd2fc745d7d06e8.jpg",
1552
+ "image_caption": [],
1553
+ "image_footnote": [],
1554
+ "bbox": [
1555
+ 174,
1556
+ 157,
1557
+ 272,
1558
+ 267
1559
+ ],
1560
+ "page_idx": 12
1561
+ },
1562
+ {
1563
+ "type": "table",
1564
+ "img_path": "images/f34ac3ec09d0226f549cae04e119bc735cf6e0ffb1bdbbf7e5439d68b01ef959.jpg",
1565
+ "table_caption": [
1566
+ "Table 10: Evidence of token flipping in the $\\mathrm { P G + L M }$ model. "
1567
+ ],
1568
+ "table_footnote": [],
1569
+ "table_body": "<table><tr><td>Fr src En ref En hyp De ref</td><td>un caniche noir joue avec un autre chien sur un terrain sec. a black poodle plays with another dog in a dry field . a canblack on a day,a day,a day,a day,</td></tr></table>",
1570
+ "bbox": [
1571
+ 279,
1572
+ 142,
1573
+ 861,
1574
+ 284
1575
+ ],
1576
+ "page_idx": 12
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "Similar to Table 8, we find evidence of token flipping for the $\\mathrm { P G + L M }$ model, where the agents use “can $@ ( a ) ^ { , }$ ( $@ \\textcircled{ a }$ is a subword BPE token marker) to mean “poodle”. This shows that language drift still happens even when a language model is used. ",
1581
+ "bbox": [
1582
+ 174,
1583
+ 325,
1584
+ 828,
1585
+ 368
1586
+ ],
1587
+ "page_idx": 12
1588
+ }
1589
+ ]
parse/train/BkMn9jAcYQ/BkMn9jAcYQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkMn9jAcYQ/BkMn9jAcYQ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Byx1VnR9K7/Byx1VnR9K7.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TRAJECTORY VAE FOR MULTI-MODAL IMITATION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We address the problem of imitating multi-modal expert demonstrations in sequential decision making problems. In many practical applications, for example video games, behavioural demonstrations are readily available that contain multi-modal structure not captured by typical existing imitation learning approaches. For example, differences in the observed players’ behaviours may be representative of different underlying playstyles.
8
+
9
+ In this paper, we use a generative model to capture different emergent playstyles in an unsupervised manner, enabling the imitation of a diverse range of distinct behaviours. We utilise a variational autoencoder to learn an embedding of the different types of expert demonstrations on the trajectory level, and jointly learn a latent representation with a policy. In experiments on a range of 2D continuous control problems representative of Minecraft environments, we empirically demonstrate that our model can capture a multi-modal structured latent space from the demonstrated behavioural trajectories.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Imitation learning has become successful in a wide range of sequential decision making problems, in which the goal is to mimic expert behaviour given demonstrations (Ziebart et al., 2008; Wang et al., 2017; Li et al., 2017; D’Este et al., 2003). Compared with reinforcement learning, imitation learning does not require access to a reward function – a key advantage in domains where rewards are not naturally or easily obtained. Instead, the agent learns a behavioural policy implicitly through demonstrated trajectories.
14
+
15
+ Expert demonstrations are typically assumed to be provided by a human demonstrator and generally can vary from person to person, e.g., according to their personality, experience and skill at the task. Therefore, when capturing demonstrations from multiple humans, observed behaviours may be distinctly different due to multi-modal structure caused by differences between demonstrators. Variations like these, which are very common in video games where players often cluster into distinct play styles, are typically not modelled explicitly as the structure of these differences is not known a priori but instead emerge over time as part of the changing meta-game.
16
+
17
+ In this paper, we propose Trajectory Variational Autoencoder (T-VAE) a deep generative model that learns a structured representation of the latent features of human demonstrations that result in diverse behaviour, enabling the imitation of different types of emergent behaviour. In particular, we use a Variational Autoencoder (VAE) to maximise the Evidence Lower Bound (ELBO) of the log likelihood of the expert demonstrations on the trajectory level where the policy is directly learned from optimising the ELBO. Not only can our model reconstruct expert demonstrations, but we empirically demonstrate it learns a meaningful latent representation of distinct emergent variances in the observed trajectories.
18
+
19
+ # 2 RELATED WORK
20
+
21
+ Popular imitation learning methods include behavior cloning (BC) (Pomerleau, 1991), which is a supervised learning method that learns a policy from expert demonstration of state-action pairs. However, this approach assumes independent observations which is not the case for sequential decision making problems, as future observations depend on previous actions. It has been shown that BC cannot generalise well to unseen observations (Ross & Bagnell, 2010). Ross et al. (2011) proposed a new iterative algorithm, which trains a stationary deterministic policy with no regret learning in an online setting to overcome this issue. Torabi et al. (2018) also improve behaviour cloning with a two-phase approach where the agent first learns an inverse dynamics model via interacting with the environment in a self-supervised fashion, and then use the model to infer missing actions given expert demonstrations. An alternative approach is Apprenticeship Learning (AC) (Abbeel & Ng, 2004), which uses inverse reinforcement learning to infer a reward function from expert trajectories. However, it suffers from expensive computation due to the requirement of repeatedly performing reinforcement learning from tabula-rasa to convergence. Whilst each of these methods has had successful applications, none are able to capture multi-modal structure in the demonstration data representative of underlying emergent differences in playstyle.
22
+
23
+ More recently, the learning of a latent space for imitation learning has been studied in the literature. Generative Adversarial Imitation Learning (GAIL) (Ho & Ermon, 2016) learns a latent space of demonstrations with a Generative Adverserial Network (GAN) (Goodfellow et al., 2014) like approach which is inherently mode-seeking and does not explicitly model multi-modal structure in the demonstrations. This limitation was addressed by (Li et al., 2017), who built on the GAIL framework to infer a latent structure of expert demonstrations enabling imitation of diverse behaviours. Similarly, (Wang et al., 2017) combined a VAE with a GAN architecture to imitate diverse behaviours. However, these methods require interacting with the environment and rollouts of the policy whilst learning. For comparison we note our method does not need access to the environment simulator during training and is computationally cheaper, as the policy is learned simply by gradient descent using a fixed dataset of trajectories. Additionally, whilst the aim in GAIL is to keep the agent behaviour close to the expert’s state distribution, our model can serve as an alternative approach to capturing state sequence structure.
24
+
25
+ In work more closely related to our approach, (Co-Reyes et al., 2018) have also proposed a Variational Auto encoder (VAE) (Kingma & Welling, 2013) that embeds the expert demonstration on the trajectory level which showed promising results. However their approach only encodes the trajectories of the states whereas ours encodes both the state and action trajectories, which also allows us to learn the policy directly from the probabilistic model rather than adding a penalty term to the ELBO. Rabinowitz et al. (2018) also learns an interpretable representation of the latent space in a hierarchical way, but their focus is more on representing the mental states of other agents and is different from our goal of imitating diverse emergent behaviours.
26
+
27
+ # 3 METHODS
28
+
29
+ # 3.1 PRELIMINARIES
30
+
31
+ Let the tuple $( S , { \mathcal { A } } , P , r , I )$ denote the infinite-horizon Markov Decision Processes $( M D P )$ with: $s$ the state space, $\mathcal { A }$ the action space, $P$ the transition probability distribution, $r$ the reward function and $I$ the distribution of the initial state $s _ { 0 }$ . Let $\pi _ { E } : S \times A \to [ 0 , 1 ]$ denote the expert policy which we do not know, under which expert trajectories $\tau$ of states and actions are generated from, i.e., $s _ { 0 } \sim I , a _ { t } \sim \pi _ { E } ( a _ { t } | s _ { t } ) , s _ { t + 1 } \sim \bar { P } ( s _ { t + 1 } | a _ { t } , s _ { t } )$ . The goal of imitation learning is to learn a policy $\pi$ that best explains the trajectories without knowledge of the reward signal $r$ .
32
+
33
+ # 3.2 TRAJECTORY VAE (T-VAE)
34
+
35
+ Given $N$ demonstrated trajectories $\{ \tau ^ { ( i ) } \} _ { i = 1 } ^ { N }$ of states and actions, where each $\begin{array} { r l } { \tau ^ { ( i ) } } & { { } = } \end{array}$ $\{ ( s _ { t } ^ { ( i ) } , a _ { t } ^ { ( i ) } ) \} _ { t = 1 } ^ { T _ { i } }$ t )} it=1 , where $T _ { i }$ is the length of trajectory $\tau ^ { ( i ) }$ . The marginal likelihood of the set $\begin{array} { r } { \log p _ { \theta } \big ( \tau ^ { ( 1 ) } , \cdot \cdot \cdot , \tau ^ { ( N ) } \big ) = \sum _ { i = 1 } ^ { N } \log p _ { \theta } \big ( \tau ^ { ( i ) } \big ) } \end{array}$ the marginal likelihoods of each individual trajectory. We use a latent variable model and assume the prior Rather than a VAE which is applied on the data point $z$
36
+ level, we use a VAE on the trajectory level (which consists of a time sequence of data points), as shown in Figure 1a. We call our model Trajectory $V A E \left( T – V A E \right)$ .
37
+
38
+ ![](images/c6ffb7f9335a673833f680a4ac208af0d3cac62fa7bd060c704ff6de4ac94a86.jpg)
39
+
40
+ # 3.2.1 ENCODER NETWORK
41
+
42
+ We encode whole trajectories into the latent space in order to embed useful features of different behaviours and extract distinguishing features which differ from trajectory to trajectory. Note that the latent $z$ is therefore a single variable rather than a sequence that depends on $t$ . In order to utilise all information, we encode both the states and actions, i.e., $q _ { \phi } ( z | \tau ^ { ( i ) } ) = q _ { \phi } ( z | \{ ( s _ { t } ^ { ( i ) } , a _ { t } ^ { ( i ) } ) \} _ { t = 1 } ^ { T _ { i } } )$ We assume that the approximate posterior $\boldsymbol { q } _ { \phi } \big ( \boldsymbol { z } \big | \tau ^ { ( i ) } \big )$ has a Gaussian distribution, whose mean and log variance parameters are constructed as follows (and illustrated in the top half of Figure 1b): 1) concatenate states with actions at each time step $[ s _ { t } , a _ { t } ]$ ; 2) feed the sequence into a bidirectional LSTM; 3)mean-pool over the outputs along the time horizon $( T ^ { ( i ) } ) ; 4 )$ ) pass through two separate fully connected layers.
43
+
44
+ # 3.2.2 DECODER NETWORK
45
+
46
+ The decoder $p ( \tau ^ { ( i ) } | z )$ can be decomposed as
47
+
48
+ $$
49
+ p _ { \theta } ( \tau ^ { ( i ) } | z ) = p _ { \theta _ { S D } } ( \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z ) p _ { \theta _ { P D } } ( \{ a _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z , \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } )
50
+ $$
51
+
52
+ where we call $p _ { \theta _ { S D } } ( \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z )$ the state decoder and $p _ { \theta _ { P D } } ( \{ a _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z , \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } )$ the policy decoder. Instead of having a separate policy decoder and control it to be consistent with the state decoder (as proposed by (Co-Reyes et al., 2018)), T-VAE models the policy and state decoder jointly and enables consistency inherently. Note that the state decoder does not depend on the policy and therefore during training, we do not need to interact with the environment nor conduct rollouts of the policy, making the learning process simpler and computationally relatively cheap.
53
+
54
+ For the state decoder, we assume Gaussian distribution on each $s _ { t } ^ { ( i ) }$ where the variance is fixed and the mean $\hat { s } _ { t } ^ { ( i ) }$ is computed recursively. At time $t < = T ^ { ( i ) }$ , we concatenate $\hat { s } _ { t } ^ { ( i ) }$ with the latent $z$ to form [ˆs(i)t , which is fed into a LSTM cell, the output is then fed into a fully connected layer to produce $\hat { s } _ { t + 1 } ^ { ( i ) }$ . The fully connected layers guarantee that the dimensionality is preserved ( $\hat { s } _ { t }$ has the same dimension as $s _ { t }$ ).
55
+
56
+ For the action decoder, we assume Gaussian distribution over $a _ { t }$ for continuous actions and Multinomial/Bernoulli distributions for discrete actions. The variational parameter to be learned $\hat { a } _ { t + 1 } ^ { ( i ) }$ is therefore the mean and the logits vector in the two cases respectively. Similarly as the state decoder, $\hat { a } _ { t + 1 } ^ { ( i ) }$ is generated recursively from $[ \hat { a } _ { t } ^ { ( i ) } , \hat { s } _ { t } ^ { ( i ) } , z ]$ which is fed into a LSTM followed by a fully connected layer. Continuous actions are output at this stage, or an additional softmax/sigmoid activation function is applied to the output to generate discrete actions. If the action space consists of a mixture of continuous and discrete actions, we assume the actions are independent conditional on the states and latent variable, and the policy decoder can be factored as the product. An illustration of the entire model can be found in figure 1b with the bottom half representative of the decoder network.
57
+
58
+ # 3.2.3 VARIATIONAL BOUND
59
+
60
+ The marginal likelihood for each trajectory can be written as
61
+
62
+ $$
63
+ \log p _ { \theta } ( \tau ^ { ( i ) } ) = D _ { K L } \big ( q _ { \phi } ( z | \tau ^ { ( i ) } ) | | p _ { \theta } ( z | \tau ^ { ( i ) } ) \big ) + \mathcal { L } ( \theta , \phi ; \tau ^ { ( i ) } )
64
+ $$
65
+
66
+ where $D _ { K L }$ represents the KL divergence between the approximate posterior and the true posterior, and $\mathcal { L } ( \theta , \phi ; \tau ^ { ( i ) } )$ is the variational lower bound of the marginal likelihood of $\tau ^ { ( i ) }$ which is decomposed into 3 terms: the $L 2$ reconstruction loss for the state decoder, the $L 2$ or cross entropy/sigmoid reconstruction loss for the policy decoder and a KL divergence between the posterior and prior distribution of the latent variable $z$ . Formally:
67
+
68
+ $$
69
+ \begin{array} { r l } & { \mathcal { L } ( \theta , \phi ; \tau ^ { ( i ) } ) = \mathbf { E } _ { q _ { \phi } ( z | \tau ^ { ( i ) } ) } [ - \log q _ { \phi } ( z | \tau ^ { ( i ) } ) + \log p _ { \theta } ( \tau ^ { ( i ) } , z ) ] } \\ & { = \mathbf { E } _ { q _ { \phi } ( z | \tau ^ { ( i ) } ) } [ \log p _ { \theta } ( \tau ^ { ( i ) } | z ) ] - D _ { K L } ( q _ { \phi } ( z | \tau ^ { ( i ) } ) | p _ { \theta } ( z ) ) } \\ & { = \mathbf { E } _ { q _ { \phi } ( z | \tau ^ { ( i ) } ) } [ \log p _ { \theta } ( \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z ) + \log p _ { \theta } ( \{ a _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } , z ) ] - D _ { K L } ( q _ { \phi } ( z | \tau ^ { ( i ) } ) | p _ { \theta } ( z ) ) } \end{array}
70
+ $$
71
+
72
+ As $\log p _ { \theta } ( \tau ^ { ( i ) } ) \geq \mathcal { L } ( \theta , \phi ; \tau ^ { ( i ) } )$ , the encoder and decoder network parameters can then be optimised with stochastic gradient descent.
73
+
74
+ # 3.3 GENERATING TRAJECTORIES
75
+
76
+ After learning the latent representaspace; 2) using the state decoder ate trajectories by: 1) sampling a to decode the trajectory of stat $z$ $p _ { \theta _ { S D } } ( \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z )$ $\{ s _ { t } \} _ { t = 1 } ^ { T } ; 3 )$ applying the policy decoder $p _ { \theta _ { P D } } ( \{ a _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } | z , \{ s _ { t } ^ { ( i ) } \} _ { t = 1 } ^ { T } )$ to decode a sequence of $\{ a _ { t } \} _ { t = 1 } ^ { T }$ . In other words, all of the actions are predicted before the agent interacting with the environment. This may not be desired if the environment is noisy or the episode does not have a fixed length. Instead, one can use a rolling window to predict the trajectories for the next $n$ steps and refit the model with the new observation every $n$ steps, until the episode ends. We will discuss in more details the effect of the rolling window size $n$ later in section 4.3.
77
+
78
+ # 4 EXPERIMENT
79
+
80
+ # 4.1 2D NAVIGATION EXAMPLE
81
+
82
+ ![](images/a9ce54c9604aae1af40f078988b65db1bc31b4579dffe4e17765555503861a8e.jpg)
83
+ Figure 2: (a) Ground truth for test set; (b) reconstructed test set from state decoder; (c) reconstructed test set from policy decoder and (d) learned latent space for test set, each point in the latent space represents a trajectory.
84
+
85
+ We first apply our model to a 2D navigation example with 3 types of trajectories representative of players moving towards different goal locations. This experiment confirms our approach can detect and imitate multi-modal structure demonstrations, and learns a meaningful and consistent latent representation. Starting from $( 0 , 0 )$ , the state space consists of the 2D (continuous) coordinates and the action is the angle along which to move a fixed distance $( = 1 )$ ). The time horizon is fixed to be 100.
86
+
87
+ In Figure 2, the ground truth trajectories are given in (a), and we reconstruct the trajectories through the state decoder and the policy decoder in (b) and (c) respectively. It can be seen that they are consistent with each other and represent the test set well. The latent embedding can be found in (d), where we can clearly identify 3 clusters corresponding to the 3 types of trajectories.
88
+
89
+ Figure 3 shows interpolations as we navigate through the latent space, i.e. we sample a 4 by 4 grid in the latent space, and generate trajectories using the state decoder and the policy decoder. We can see that the T-VAE shows consistent behaviour as we interpolate in the latent space. This confirms that our approach can detect and imitate latent structure, and that it learns a meaningful latent representation that captures the main dimensions of variation.
90
+
91
+ ![](images/c6b1af3d7ac9fc3327547433821968ee3c652b1d36210e36f695f3d2e7bf40a7.jpg)
92
+ Figure 3: Intepolation of latent space for (a) state decoder; and (b) policy decoder. It can be observed that the top left corner, top right corner and bottom right corner behave like the red, blue and green type of trajectories respectively and the bottom left corner has a mixed behaviour.
93
+
94
+ # 4.2 2D CIRCLE EXAMPLE
95
+
96
+ ![](images/577aa3609a206332aed2b9a1b0b0d39c654f8874a0be2b56eeecabfb77cd5be7.jpg)
97
+ Figure 4: (a):Ground truth of trajectories on the test set; (b): reconstructed trajectories with state decoder; (c) reconstructed trajectories with policy decoder; (d) 2D latent space.
98
+
99
+ We next apply our model to another 2D example, designed to replicate the experimental setting in Figure 1 of Li et al. (2017). There are three types of circles (in the figures these are coloured in red, blue and green) as shown in Figure 4a. The agent starts from $( 0 , 0 )$ , the observation consists of the continuous 2D coordinates and the action is the relative angle towards which the agent moves. The reconstructed test set using state decoder and policy decoder, and visualisations of the 2D latent space can be found in Figure 4.
100
+
101
+ These results show that when the sequence length is not fixed (as in the previous example), T-VAE is still able to produce consistency between the state and policy decoders and learn latent features that underpins different behaviours. Furthermore, as figure 1 in Li et al. (2017) already showed that both behaviour cloning and GAIL fail at this task whereas InfoGAIL and now T-VAE perform well, it seems that using a latent representation to capture long term dependency is crucial in this example.
102
+
103
+ # 4.3 ZOMBIE ATTACK SCENARIO
104
+
105
+ Finally, we evaluate our model on a simplified 2D Minecraft-like environment. This set of experiments show that T-VAE is able to capture long-term dependencies, model mixed action space, and the performance is improved when using a rolling window during prediction. In each episode, the agent needs to reach a goal. There is a zombie moving towards the agent and there are two types of demonstrated expert behaviour: the ”attacking” behaviour where the agent moves to the zombie and attacks it before going to the goal, or the ”avoiding” behaviour where the agent avoids the zombie and reaches the goal. The initial position of the agent and the goal are kept fixed whereas the initial position of the zombie is sampled uniformly at random. The observation space consists of the distance and angle to the goal and the zombie respectively, and there are two types of actions: 1) the angle along which the agent moves by a fixed step size $_ { ( = 0 . 5 ) }$ , and 2) a Bernoulli variable indicating whether to attack the zombie in a given timestep or not, which is very sparse and typically only equals to 1 once for the ’attacking’ behaviour. Thus, this experiment setup exemplifies a mixed continuous-discrete action space. Episodes end when the agent reaches the goal or the number of time steps reaches the maximum number allowed, which is defined to be the maximum sequence length in the training set (30).
106
+
107
+ Figure 5 shows the ground truth and reconstruction of the two types of behaviours on the test set, and Figure 6 shows the learned latent space. We also provide animations: https: //youtu.be/fvcJbYnRND8 and ’avoiding’ ’region’https://youtu.be/DAruY-Dd9z8. These show test time behaviour where we randomly sample from the posterior distribution of the latent variable $z$ in the latent space corresponding to the ’attacking’ cluster.
108
+
109
+ To examine the diversity of the generated behaviour, we randomly select a latent $z$ in the ’attacking’ and ’avoiding’ clusters in Figure 6a and generate 1000 trajectories. The histogram for different statistics are displayed in Figure 7, where the top and bottom rows represent ’attacking’ and ’avoiding’ behaviour respectively. We can see a clear differentiation between these two different latent variables. Although the agent does not always succeed in killing the zombie, as shown in Figure 7b, the closest distances to the zombie (shown in Figure 7d) are almost all within the demonstrated range, meaning that the agent moves to the zombie but attacked at slightly different timing.
110
+
111
+ Results comparing with different rolling window length can be found in Figure 8. For the attacking agent, each episode is a success if the zombie is dead and the agent reaches the goal. For the avoiding agent, each episode is a success if the agent reaches the goal and is beyond the zombie’s attacking range. It can be seen that for small rolling window lengths, the performance is worse for ’attacking’ agent, since the model fails to capture long-term dependencies but provided a sufficient window length diverse behaviours can be imitated.
112
+
113
+ # 5 CONCLUSION
114
+
115
+ In this paper, we proposed a new method – Trajectory Variational Autoencoder $( T - V A E ) -$ for imitation learning that is designed to capture latent multi-modal structure in demonstrated behaviour. Our approach encodes trajectories of state-action pairs and learns latent representations with a VAE on the trajectory level.
116
+
117
+ T-VAE encourages consistency between the state and action decoders, helping avoid compound errors that are common in simpler behavioural cloning approaches to imitation learning. We demonstrate that this approach successfully avoids compound errors in several tasks that require long-term consistency and generalisation.
118
+
119
+ Our model is successful in generating diverse behaviours and learning a policy directly from a probabilistic model. It is simple to train and gives promising results in a range of tasks, including a zombie task that requires generalisation given a moving opponent as well as a mixed continuousdiscrete action space.
120
+
121
+ ![](images/216875a50ab4e46ec02cd9bee31cfb0b3d421f8c47b6c15dc04d61ac54e7065b.jpg)
122
+ Figure 5: (a) Ground truth and (b) reconstruction (b) for the zombie attack scenario. The agent starts at $( 0 , 0 )$ , the goal is positioned at $( 5 , 5 )$ , and the zombie starts at a random location and moves towards the agent.
123
+
124
+ ![](images/0bdbb6715ab8b2ef6e9959c455362d38400214a6c8b7ed8da766363d78fea3da.jpg)
125
+ Figure 6: Latent representation of the zombie example which is clearly structured. The red and blue points represent the attacking or avoiding behaviour. We also encode partial trajectories before and after the zombie is dead for the ’attacking’ agents, which are plotted in purple and green respectively.
126
+
127
+ ![](images/630f296f6260548d0d16ce0f7cc5bbe4f62a6007d481480f648e2eb5cdaecae2.jpg)
128
+ Figure 7: Top row and bottom row display the results of the trajectories generating from the ’attacking’ and ’avoiding’ cluster respectively. The first and second column show whether the agent attacks the zombie and whether the zombie is dead in the episode, the difference is sometimes agents attacks the zombie but are not in the attacking range so that the zombie does not die. The third and fourth column show the closest distance to the goal and the zombie in each episode. The agent reaches the goal when the distance to it is $< 0 . 5$ which is indicated by the red dash line (successful).
129
+
130
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2> goals reached</td><td rowspan=1 colspan=2> success rate</td><td rowspan=1 colspan=1>dead zombie</td></tr><tr><td rowspan=1 colspan=1>n</td><td rowspan=1 colspan=1> attack</td><td rowspan=1 colspan=1>avoid</td><td rowspan=1 colspan=1> attack</td><td rowspan=1 colspan=1> avoid</td><td rowspan=1 colspan=1> attack</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>84.30%</td><td rowspan=1 colspan=1>90.50%</td><td rowspan=1 colspan=1>0%</td><td rowspan=1 colspan=1>53.00%</td><td rowspan=1 colspan=1>0%</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>89.50%</td><td rowspan=1 colspan=1>90.70%</td><td rowspan=1 colspan=1>20.50%</td><td rowspan=1 colspan=1>52.00%</td><td rowspan=1 colspan=1>28.40%</td></tr><tr><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>91%</td><td rowspan=1 colspan=1>99.50%</td><td rowspan=1 colspan=1>62.90%</td><td rowspan=1 colspan=1>38.70%</td><td rowspan=1 colspan=1>71.50%</td></tr></table>
131
+
132
+ Figure 8: Comparison of performance in the zombie attack scenario with varying window length.
133
+
134
+ A wide range of future work can be built upon ours. For example, bootstrapping reinforcement learning with these initial policies to improve beyond demonstrated behaviour provided an additional reward signal whilst aiming to maintain the diversity in behaviours.
135
+
136
+ # REFERENCES
137
+
138
+ Pieter Abbeel and Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ . Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 1. ACM, 2004.
139
+
140
+ John D Co-Reyes, YuXuan Liu, Abhishek Gupta, Benjamin Eysenbach, Pieter Abbeel, and Sergey Levine. Self-consistent trajectory autoencoder: Hierarchical reinforcement learning with trajectory embeddings. arXiv preprint arXiv:1806.02813, 2018.
141
+
142
+ Claire D’Este, Mark O’Sullivan, and Nicholas Hannah. Behavioural cloning and robot control. In Robotics and Applications, pp. 179–182, 2003.
143
+
144
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
145
+
146
+ Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, pp. 4565–4573, 2016.
147
+
148
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
149
+
150
+ Yunzhu Li, Jiaming Song, and Stefano Ermon. Infogail: Interpretable imitation learning from visual demonstrations. In Advances in Neural Information Processing Systems, pp. 3812–3822, 2017.
151
+
152
+ Dean A Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991.
153
+
154
+ Neil C Rabinowitz, Frank Perbet, H Francis Song, Chiyuan Zhang, SM Eslami, and Matthew Botvinick. Machine theory of mind. arXiv preprint arXiv:1802.07740, 2018.
155
+
156
+ Stephane Ross and Drew Bagnell. Efficient reductions for imitation learning. In ´ Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 661–668, 2010.
157
+
158
+ Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured ´ prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011.
159
+
160
+ Faraz Torabi, Garrett Warnell, and Peter Stone. Behavioral cloning from observation. arXiv preprint arXiv:1805.01954, 2018.
161
+
162
+ Ziyu Wang, Josh S Merel, Scott E Reed, Nando de Freitas, Gregory Wayne, and Nicolas Heess. Robust imitation of diverse behaviors. In Advances in Neural Information Processing Systems, pp. 5320–5329, 2017.
163
+
164
+ Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
parse/train/Byx1VnR9K7/Byx1VnR9K7_content_list.json ADDED
@@ -0,0 +1,912 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "TRAJECTORY VAE FOR MULTI-MODAL IMITATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 781,
10
+ 122
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 398,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 224
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We address the problem of imitating multi-modal expert demonstrations in sequential decision making problems. In many practical applications, for example video games, behavioural demonstrations are readily available that contain multi-modal structure not captured by typical existing imitation learning approaches. For example, differences in the observed players’ behaviours may be representative of different underlying playstyles. ",
40
+ "bbox": [
41
+ 233,
42
+ 241,
43
+ 766,
44
+ 325
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "In this paper, we use a generative model to capture different emergent playstyles in an unsupervised manner, enabling the imitation of a diverse range of distinct behaviours. We utilise a variational autoencoder to learn an embedding of the different types of expert demonstrations on the trajectory level, and jointly learn a latent representation with a policy. In experiments on a range of 2D continuous control problems representative of Minecraft environments, we empirically demonstrate that our model can capture a multi-modal structured latent space from the demonstrated behavioural trajectories. ",
51
+ "bbox": [
52
+ 233,
53
+ 327,
54
+ 766,
55
+ 438
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 464,
66
+ 336,
67
+ 479
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Imitation learning has become successful in a wide range of sequential decision making problems, in which the goal is to mimic expert behaviour given demonstrations (Ziebart et al., 2008; Wang et al., 2017; Li et al., 2017; D’Este et al., 2003). Compared with reinforcement learning, imitation learning does not require access to a reward function – a key advantage in domains where rewards are not naturally or easily obtained. Instead, the agent learns a behavioural policy implicitly through demonstrated trajectories. ",
74
+ "bbox": [
75
+ 174,
76
+ 496,
77
+ 825,
78
+ 579
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Expert demonstrations are typically assumed to be provided by a human demonstrator and generally can vary from person to person, e.g., according to their personality, experience and skill at the task. Therefore, when capturing demonstrations from multiple humans, observed behaviours may be distinctly different due to multi-modal structure caused by differences between demonstrators. Variations like these, which are very common in video games where players often cluster into distinct play styles, are typically not modelled explicitly as the structure of these differences is not known a priori but instead emerge over time as part of the changing meta-game. ",
85
+ "bbox": [
86
+ 174,
87
+ 599,
88
+ 825,
89
+ 698
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this paper, we propose Trajectory Variational Autoencoder (T-VAE) a deep generative model that learns a structured representation of the latent features of human demonstrations that result in diverse behaviour, enabling the imitation of different types of emergent behaviour. In particular, we use a Variational Autoencoder (VAE) to maximise the Evidence Lower Bound (ELBO) of the log likelihood of the expert demonstrations on the trajectory level where the policy is directly learned from optimising the ELBO. Not only can our model reconstruct expert demonstrations, but we empirically demonstrate it learns a meaningful latent representation of distinct emergent variances in the observed trajectories. ",
96
+ "bbox": [
97
+ 174,
98
+ 718,
99
+ 825,
100
+ 829
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "2 RELATED WORK ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 176,
110
+ 849,
111
+ 344,
112
+ 866
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Popular imitation learning methods include behavior cloning (BC) (Pomerleau, 1991), which is a supervised learning method that learns a policy from expert demonstration of state-action pairs. However, this approach assumes independent observations which is not the case for sequential decision making problems, as future observations depend on previous actions. It has been shown that BC cannot generalise well to unseen observations (Ross & Bagnell, 2010). Ross et al. (2011) proposed a new iterative algorithm, which trains a stationary deterministic policy with no regret learning in an online setting to overcome this issue. Torabi et al. (2018) also improve behaviour cloning with a two-phase approach where the agent first learns an inverse dynamics model via interacting with the environment in a self-supervised fashion, and then use the model to infer missing actions given expert demonstrations. An alternative approach is Apprenticeship Learning (AC) (Abbeel & Ng, 2004), which uses inverse reinforcement learning to infer a reward function from expert trajectories. However, it suffers from expensive computation due to the requirement of repeatedly performing reinforcement learning from tabula-rasa to convergence. Whilst each of these methods has had successful applications, none are able to capture multi-modal structure in the demonstration data representative of underlying emergent differences in playstyle. ",
119
+ "bbox": [
120
+ 176,
121
+ 882,
122
+ 825,
123
+ 922
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "",
130
+ "bbox": [
131
+ 174,
132
+ 103,
133
+ 825,
134
+ 270
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "More recently, the learning of a latent space for imitation learning has been studied in the literature. Generative Adversarial Imitation Learning (GAIL) (Ho & Ermon, 2016) learns a latent space of demonstrations with a Generative Adverserial Network (GAN) (Goodfellow et al., 2014) like approach which is inherently mode-seeking and does not explicitly model multi-modal structure in the demonstrations. This limitation was addressed by (Li et al., 2017), who built on the GAIL framework to infer a latent structure of expert demonstrations enabling imitation of diverse behaviours. Similarly, (Wang et al., 2017) combined a VAE with a GAN architecture to imitate diverse behaviours. However, these methods require interacting with the environment and rollouts of the policy whilst learning. For comparison we note our method does not need access to the environment simulator during training and is computationally cheaper, as the policy is learned simply by gradient descent using a fixed dataset of trajectories. Additionally, whilst the aim in GAIL is to keep the agent behaviour close to the expert’s state distribution, our model can serve as an alternative approach to capturing state sequence structure. ",
141
+ "bbox": [
142
+ 174,
143
+ 290,
144
+ 826,
145
+ 470
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "In work more closely related to our approach, (Co-Reyes et al., 2018) have also proposed a Variational Auto encoder (VAE) (Kingma & Welling, 2013) that embeds the expert demonstration on the trajectory level which showed promising results. However their approach only encodes the trajectories of the states whereas ours encodes both the state and action trajectories, which also allows us to learn the policy directly from the probabilistic model rather than adding a penalty term to the ELBO. Rabinowitz et al. (2018) also learns an interpretable representation of the latent space in a hierarchical way, but their focus is more on representing the mental states of other agents and is different from our goal of imitating diverse emergent behaviours. ",
152
+ "bbox": [
153
+ 174,
154
+ 478,
155
+ 825,
156
+ 590
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "3 METHODS ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 174,
166
+ 627,
167
+ 290,
168
+ 643
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "3.1 PRELIMINARIES ",
175
+ "text_level": 1,
176
+ "bbox": [
177
+ 174,
178
+ 660,
179
+ 326,
180
+ 675
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "Let the tuple $( S , { \\mathcal { A } } , P , r , I )$ denote the infinite-horizon Markov Decision Processes $( M D P )$ with: $s$ the state space, $\\mathcal { A }$ the action space, $P$ the transition probability distribution, $r$ the reward function and $I$ the distribution of the initial state $s _ { 0 }$ . Let $\\pi _ { E } : S \\times A \\to [ 0 , 1 ]$ denote the expert policy which we do not know, under which expert trajectories $\\tau$ of states and actions are generated from, i.e., $s _ { 0 } \\sim I , a _ { t } \\sim \\pi _ { E } ( a _ { t } | s _ { t } ) , s _ { t + 1 } \\sim \\bar { P } ( s _ { t + 1 } | a _ { t } , s _ { t } )$ . The goal of imitation learning is to learn a policy $\\pi$ that best explains the trajectories without knowledge of the reward signal $r$ . ",
187
+ "bbox": [
188
+ 173,
189
+ 688,
190
+ 825,
191
+ 772
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "3.2 TRAJECTORY VAE (T-VAE) ",
198
+ "text_level": 1,
199
+ "bbox": [
200
+ 176,
201
+ 791,
202
+ 411,
203
+ 808
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "Given $N$ demonstrated trajectories $\\{ \\tau ^ { ( i ) } \\} _ { i = 1 } ^ { N }$ of states and actions, where each $\\begin{array} { r l } { \\tau ^ { ( i ) } } & { { } = } \\end{array}$ $\\{ ( s _ { t } ^ { ( i ) } , a _ { t } ^ { ( i ) } ) \\} _ { t = 1 } ^ { T _ { i } }$ t )} it=1 , where $T _ { i }$ is the length of trajectory $\\tau ^ { ( i ) }$ . The marginal likelihood of the set $\\begin{array} { r } { \\log p _ { \\theta } \\big ( \\tau ^ { ( 1 ) } , \\cdot \\cdot \\cdot , \\tau ^ { ( N ) } \\big ) = \\sum _ { i = 1 } ^ { N } \\log p _ { \\theta } \\big ( \\tau ^ { ( i ) } \\big ) } \\end{array}$ the marginal likelihoods of each individual trajectory. We use a latent variable model and assume the prior Rather than a VAE which is applied on the data point $z$ \nlevel, we use a VAE on the trajectory level (which consists of a time sequence of data points), as shown in Figure 1a. We call our model Trajectory $V A E \\left( T – V A E \\right)$ . ",
210
+ "bbox": [
211
+ 174,
212
+ 818,
213
+ 825,
214
+ 924
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "image",
220
+ "img_path": "images/c6ffb7f9335a673833f680a4ac208af0d3cac62fa7bd060c704ff6de4ac94a86.jpg",
221
+ "image_caption": [],
222
+ "image_footnote": [],
223
+ "bbox": [
224
+ 235,
225
+ 99,
226
+ 763,
227
+ 314
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "3.2.1 ENCODER NETWORK ",
234
+ "text_level": 1,
235
+ "bbox": [
236
+ 174,
237
+ 338,
238
+ 375,
239
+ 353
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "We encode whole trajectories into the latent space in order to embed useful features of different behaviours and extract distinguishing features which differ from trajectory to trajectory. Note that the latent $z$ is therefore a single variable rather than a sequence that depends on $t$ . In order to utilise all information, we encode both the states and actions, i.e., $q _ { \\phi } ( z | \\tau ^ { ( i ) } ) = q _ { \\phi } ( z | \\{ ( s _ { t } ^ { ( i ) } , a _ { t } ^ { ( i ) } ) \\} _ { t = 1 } ^ { T _ { i } } )$ We assume that the approximate posterior $\\boldsymbol { q } _ { \\phi } \\big ( \\boldsymbol { z } \\big | \\tau ^ { ( i ) } \\big )$ has a Gaussian distribution, whose mean and log variance parameters are constructed as follows (and illustrated in the top half of Figure 1b): 1) concatenate states with actions at each time step $[ s _ { t } , a _ { t } ]$ ; 2) feed the sequence into a bidirectional LSTM; 3)mean-pool over the outputs along the time horizon $( T ^ { ( i ) } ) ; 4 )$ ) pass through two separate fully connected layers. ",
246
+ "bbox": [
247
+ 173,
248
+ 363,
249
+ 826,
250
+ 497
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "3.2.2 DECODER NETWORK ",
257
+ "text_level": 1,
258
+ "bbox": [
259
+ 174,
260
+ 512,
261
+ 375,
262
+ 526
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "The decoder $p ( \\tau ^ { ( i ) } | z )$ can be decomposed as ",
269
+ "bbox": [
270
+ 174,
271
+ 536,
272
+ 468,
273
+ 553
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "equation",
279
+ "img_path": "images/d497697f14032d31d3a9fc5abfbd8a9a92acdac22912c3d0c2e8a603ee50f884.jpg",
280
+ "text": "$$\np _ { \\theta } ( \\tau ^ { ( i ) } | z ) = p _ { \\theta _ { S D } } ( \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z ) p _ { \\theta _ { P D } } ( \\{ a _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z , \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } )\n$$",
281
+ "text_format": "latex",
282
+ "bbox": [
283
+ 297,
284
+ 559,
285
+ 699,
286
+ 582
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "where we call $p _ { \\theta _ { S D } } ( \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z )$ the state decoder and $p _ { \\theta _ { P D } } ( \\{ a _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z , \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } )$ the policy decoder. Instead of having a separate policy decoder and control it to be consistent with the state decoder (as proposed by (Co-Reyes et al., 2018)), T-VAE models the policy and state decoder jointly and enables consistency inherently. Note that the state decoder does not depend on the policy and therefore during training, we do not need to interact with the environment nor conduct rollouts of the policy, making the learning process simpler and computationally relatively cheap. ",
293
+ "bbox": [
294
+ 173,
295
+ 597,
296
+ 825,
297
+ 685
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "For the state decoder, we assume Gaussian distribution on each $s _ { t } ^ { ( i ) }$ where the variance is fixed and the mean $\\hat { s } _ { t } ^ { ( i ) }$ is computed recursively. At time $t < = T ^ { ( i ) }$ , we concatenate $\\hat { s } _ { t } ^ { ( i ) }$ with the latent $z$ to form [ˆs(i)t , which is fed into a LSTM cell, the output is then fed into a fully connected layer to produce $\\hat { s } _ { t + 1 } ^ { ( i ) }$ . The fully connected layers guarantee that the dimensionality is preserved ( $\\hat { s } _ { t }$ has the same dimension as $s _ { t }$ ). ",
304
+ "bbox": [
305
+ 174,
306
+ 702,
307
+ 825,
308
+ 786
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "For the action decoder, we assume Gaussian distribution over $a _ { t }$ for continuous actions and Multinomial/Bernoulli distributions for discrete actions. The variational parameter to be learned $\\hat { a } _ { t + 1 } ^ { ( i ) }$ is therefore the mean and the logits vector in the two cases respectively. Similarly as the state decoder, $\\hat { a } _ { t + 1 } ^ { ( i ) }$ is generated recursively from $[ \\hat { a } _ { t } ^ { ( i ) } , \\hat { s } _ { t } ^ { ( i ) } , z ]$ which is fed into a LSTM followed by a fully connected layer. Continuous actions are output at this stage, or an additional softmax/sigmoid activation function is applied to the output to generate discrete actions. If the action space consists of a mixture of continuous and discrete actions, we assume the actions are independent conditional on the states and latent variable, and the policy decoder can be factored as the product. An illustration of the entire model can be found in figure 1b with the bottom half representative of the decoder network. ",
315
+ "bbox": [
316
+ 173,
317
+ 791,
318
+ 826,
319
+ 924
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "3.2.3 VARIATIONAL BOUND ",
326
+ "text_level": 1,
327
+ "bbox": [
328
+ 174,
329
+ 103,
330
+ 382,
331
+ 117
332
+ ],
333
+ "page_idx": 3
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "The marginal likelihood for each trajectory can be written as ",
338
+ "bbox": [
339
+ 173,
340
+ 127,
341
+ 570,
342
+ 142
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "equation",
348
+ "img_path": "images/707ebe37d02b28f0ee010b713eb221ef9deb6c488cf920b89112eb69760d3c80.jpg",
349
+ "text": "$$\n\\log p _ { \\theta } ( \\tau ^ { ( i ) } ) = D _ { K L } \\big ( q _ { \\phi } ( z | \\tau ^ { ( i ) } ) | | p _ { \\theta } ( z | \\tau ^ { ( i ) } ) \\big ) + \\mathcal { L } ( \\theta , \\phi ; \\tau ^ { ( i ) } )\n$$",
350
+ "text_format": "latex",
351
+ "bbox": [
352
+ 302,
353
+ 166,
354
+ 694,
355
+ 186
356
+ ],
357
+ "page_idx": 3
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "where $D _ { K L }$ represents the KL divergence between the approximate posterior and the true posterior, and $\\mathcal { L } ( \\theta , \\phi ; \\tau ^ { ( i ) } )$ is the variational lower bound of the marginal likelihood of $\\tau ^ { ( i ) }$ which is decomposed into 3 terms: the $L 2$ reconstruction loss for the state decoder, the $L 2$ or cross entropy/sigmoid reconstruction loss for the policy decoder and a KL divergence between the posterior and prior distribution of the latent variable $z$ . Formally: ",
362
+ "bbox": [
363
+ 174,
364
+ 190,
365
+ 825,
366
+ 262
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "equation",
372
+ "img_path": "images/3e31929d60f54c8c314b880192533e1603c3a31cbaa208ca08bec63b5026426c.jpg",
373
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } ( \\theta , \\phi ; \\tau ^ { ( i ) } ) = \\mathbf { E } _ { q _ { \\phi } ( z | \\tau ^ { ( i ) } ) } [ - \\log q _ { \\phi } ( z | \\tau ^ { ( i ) } ) + \\log p _ { \\theta } ( \\tau ^ { ( i ) } , z ) ] } \\\\ & { = \\mathbf { E } _ { q _ { \\phi } ( z | \\tau ^ { ( i ) } ) } [ \\log p _ { \\theta } ( \\tau ^ { ( i ) } | z ) ] - D _ { K L } ( q _ { \\phi } ( z | \\tau ^ { ( i ) } ) | p _ { \\theta } ( z ) ) } \\\\ & { = \\mathbf { E } _ { q _ { \\phi } ( z | \\tau ^ { ( i ) } ) } [ \\log p _ { \\theta } ( \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z ) + \\log p _ { \\theta } ( \\{ a _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } , z ) ] - D _ { K L } ( q _ { \\phi } ( z | \\tau ^ { ( i ) } ) | p _ { \\theta } ( z ) ) } \\end{array}\n$$",
374
+ "text_format": "latex",
375
+ "bbox": [
376
+ 187,
377
+ 285,
378
+ 807,
379
+ 357
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "As $\\log p _ { \\theta } ( \\tau ^ { ( i ) } ) \\geq \\mathcal { L } ( \\theta , \\phi ; \\tau ^ { ( i ) } )$ , the encoder and decoder network parameters can then be optimised with stochastic gradient descent. ",
386
+ "bbox": [
387
+ 176,
388
+ 382,
389
+ 825,
390
+ 411
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "3.3 GENERATING TRAJECTORIES ",
397
+ "text_level": 1,
398
+ "bbox": [
399
+ 176,
400
+ 428,
401
+ 415,
402
+ 443
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "After learning the latent representaspace; 2) using the state decoder ate trajectories by: 1) sampling a to decode the trajectory of stat $z$ $p _ { \\theta _ { S D } } ( \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z )$ $\\{ s _ { t } \\} _ { t = 1 } ^ { T } ; 3 )$ applying the policy decoder $p _ { \\theta _ { P D } } ( \\{ a _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } | z , \\{ s _ { t } ^ { ( i ) } \\} _ { t = 1 } ^ { T } )$ to decode a sequence of $\\{ a _ { t } \\} _ { t = 1 } ^ { T }$ . In other words, all of the actions are predicted before the agent interacting with the environment. This may not be desired if the environment is noisy or the episode does not have a fixed length. Instead, one can use a rolling window to predict the trajectories for the next $n$ steps and refit the model with the new observation every $n$ steps, until the episode ends. We will discuss in more details the effect of the rolling window size $n$ later in section 4.3. ",
409
+ "bbox": [
410
+ 173,
411
+ 453,
412
+ 825,
413
+ 573
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "4 EXPERIMENT ",
420
+ "text_level": 1,
421
+ "bbox": [
422
+ 174,
423
+ 592,
424
+ 316,
425
+ 608
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "4.1 2D NAVIGATION EXAMPLE ",
432
+ "text_level": 1,
433
+ "bbox": [
434
+ 174,
435
+ 623,
436
+ 403,
437
+ 637
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "image",
443
+ "img_path": "images/a9ce54c9604aae1af40f078988b65db1bc31b4579dffe4e17765555503861a8e.jpg",
444
+ "image_caption": [
445
+ "Figure 2: (a) Ground truth for test set; (b) reconstructed test set from state decoder; (c) reconstructed test set from policy decoder and (d) learned latent space for test set, each point in the latent space represents a trajectory. "
446
+ ],
447
+ "image_footnote": [],
448
+ "bbox": [
449
+ 194,
450
+ 655,
451
+ 795,
452
+ 761
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "We first apply our model to a 2D navigation example with 3 types of trajectories representative of players moving towards different goal locations. This experiment confirms our approach can detect and imitate multi-modal structure demonstrations, and learns a meaningful and consistent latent representation. Starting from $( 0 , 0 )$ , the state space consists of the 2D (continuous) coordinates and the action is the angle along which to move a fixed distance $( = 1 )$ ). The time horizon is fixed to be 100. ",
459
+ "bbox": [
460
+ 174,
461
+ 839,
462
+ 825,
463
+ 910
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "In Figure 2, the ground truth trajectories are given in (a), and we reconstruct the trajectories through the state decoder and the policy decoder in (b) and (c) respectively. It can be seen that they are consistent with each other and represent the test set well. The latent embedding can be found in (d), where we can clearly identify 3 clusters corresponding to the 3 types of trajectories. ",
470
+ "bbox": [
471
+ 173,
472
+ 103,
473
+ 825,
474
+ 160
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Figure 3 shows interpolations as we navigate through the latent space, i.e. we sample a 4 by 4 grid in the latent space, and generate trajectories using the state decoder and the policy decoder. We can see that the T-VAE shows consistent behaviour as we interpolate in the latent space. This confirms that our approach can detect and imitate latent structure, and that it learns a meaningful latent representation that captures the main dimensions of variation. ",
481
+ "bbox": [
482
+ 173,
483
+ 166,
484
+ 825,
485
+ 236
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "image",
491
+ "img_path": "images/c6b1af3d7ac9fc3327547433821968ee3c652b1d36210e36f695f3d2e7bf40a7.jpg",
492
+ "image_caption": [
493
+ "Figure 3: Intepolation of latent space for (a) state decoder; and (b) policy decoder. It can be observed that the top left corner, top right corner and bottom right corner behave like the red, blue and green type of trajectories respectively and the bottom left corner has a mixed behaviour. "
494
+ ],
495
+ "image_footnote": [],
496
+ "bbox": [
497
+ 228,
498
+ 267,
499
+ 779,
500
+ 449
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "4.2 2D CIRCLE EXAMPLE ",
507
+ "text_level": 1,
508
+ "bbox": [
509
+ 174,
510
+ 531,
511
+ 362,
512
+ 544
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "image",
518
+ "img_path": "images/577aa3609a206332aed2b9a1b0b0d39c654f8874a0be2b56eeecabfb77cd5be7.jpg",
519
+ "image_caption": [
520
+ "Figure 4: (a):Ground truth of trajectories on the test set; (b): reconstructed trajectories with state decoder; (c) reconstructed trajectories with policy decoder; (d) 2D latent space. "
521
+ ],
522
+ "image_footnote": [],
523
+ "bbox": [
524
+ 192,
525
+ 568,
526
+ 799,
527
+ 738
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "We next apply our model to another 2D example, designed to replicate the experimental setting in Figure 1 of Li et al. (2017). There are three types of circles (in the figures these are coloured in red, blue and green) as shown in Figure 4a. The agent starts from $( 0 , 0 )$ , the observation consists of the continuous 2D coordinates and the action is the relative angle towards which the agent moves. The reconstructed test set using state decoder and policy decoder, and visualisations of the 2D latent space can be found in Figure 4. ",
534
+ "bbox": [
535
+ 174,
536
+ 804,
537
+ 825,
538
+ 888
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "These results show that when the sequence length is not fixed (as in the previous example), T-VAE is still able to produce consistency between the state and policy decoders and learn latent features that underpins different behaviours. Furthermore, as figure 1 in Li et al. (2017) already showed that both behaviour cloning and GAIL fail at this task whereas InfoGAIL and now T-VAE perform well, it seems that using a latent representation to capture long term dependency is crucial in this example. ",
545
+ "bbox": [
546
+ 173,
547
+ 895,
548
+ 823,
549
+ 924
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "",
556
+ "bbox": [
557
+ 174,
558
+ 103,
559
+ 825,
560
+ 146
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "4.3 ZOMBIE ATTACK SCENARIO ",
567
+ "text_level": 1,
568
+ "bbox": [
569
+ 176,
570
+ 165,
571
+ 410,
572
+ 179
573
+ ],
574
+ "page_idx": 5
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "Finally, we evaluate our model on a simplified 2D Minecraft-like environment. This set of experiments show that T-VAE is able to capture long-term dependencies, model mixed action space, and the performance is improved when using a rolling window during prediction. In each episode, the agent needs to reach a goal. There is a zombie moving towards the agent and there are two types of demonstrated expert behaviour: the ”attacking” behaviour where the agent moves to the zombie and attacks it before going to the goal, or the ”avoiding” behaviour where the agent avoids the zombie and reaches the goal. The initial position of the agent and the goal are kept fixed whereas the initial position of the zombie is sampled uniformly at random. The observation space consists of the distance and angle to the goal and the zombie respectively, and there are two types of actions: 1) the angle along which the agent moves by a fixed step size $_ { ( = 0 . 5 ) }$ , and 2) a Bernoulli variable indicating whether to attack the zombie in a given timestep or not, which is very sparse and typically only equals to 1 once for the ’attacking’ behaviour. Thus, this experiment setup exemplifies a mixed continuous-discrete action space. Episodes end when the agent reaches the goal or the number of time steps reaches the maximum number allowed, which is defined to be the maximum sequence length in the training set (30). ",
579
+ "bbox": [
580
+ 174,
581
+ 193,
582
+ 825,
583
+ 400
584
+ ],
585
+ "page_idx": 5
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "Figure 5 shows the ground truth and reconstruction of the two types of behaviours on the test set, and Figure 6 shows the learned latent space. We also provide animations: https: //youtu.be/fvcJbYnRND8 and ’avoiding’ ’region’https://youtu.be/DAruY-Dd9z8. These show test time behaviour where we randomly sample from the posterior distribution of the latent variable $z$ in the latent space corresponding to the ’attacking’ cluster. ",
590
+ "bbox": [
591
+ 174,
592
+ 407,
593
+ 825,
594
+ 477
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "To examine the diversity of the generated behaviour, we randomly select a latent $z$ in the ’attacking’ and ’avoiding’ clusters in Figure 6a and generate 1000 trajectories. The histogram for different statistics are displayed in Figure 7, where the top and bottom rows represent ’attacking’ and ’avoiding’ behaviour respectively. We can see a clear differentiation between these two different latent variables. Although the agent does not always succeed in killing the zombie, as shown in Figure 7b, the closest distances to the zombie (shown in Figure 7d) are almost all within the demonstrated range, meaning that the agent moves to the zombie but attacked at slightly different timing. ",
601
+ "bbox": [
602
+ 174,
603
+ 497,
604
+ 825,
605
+ 595
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Results comparing with different rolling window length can be found in Figure 8. For the attacking agent, each episode is a success if the zombie is dead and the agent reaches the goal. For the avoiding agent, each episode is a success if the agent reaches the goal and is beyond the zombie’s attacking range. It can be seen that for small rolling window lengths, the performance is worse for ’attacking’ agent, since the model fails to capture long-term dependencies but provided a sufficient window length diverse behaviours can be imitated. ",
612
+ "bbox": [
613
+ 174,
614
+ 602,
615
+ 825,
616
+ 685
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "5 CONCLUSION ",
623
+ "text_level": 1,
624
+ "bbox": [
625
+ 176,
626
+ 708,
627
+ 318,
628
+ 724
629
+ ],
630
+ "page_idx": 5
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "In this paper, we proposed a new method – Trajectory Variational Autoencoder $( T - V A E ) -$ for imitation learning that is designed to capture latent multi-modal structure in demonstrated behaviour. Our approach encodes trajectories of state-action pairs and learns latent representations with a VAE on the trajectory level. ",
635
+ "bbox": [
636
+ 174,
637
+ 742,
638
+ 825,
639
+ 797
640
+ ],
641
+ "page_idx": 5
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "T-VAE encourages consistency between the state and action decoders, helping avoid compound errors that are common in simpler behavioural cloning approaches to imitation learning. We demonstrate that this approach successfully avoids compound errors in several tasks that require long-term consistency and generalisation. ",
646
+ "bbox": [
647
+ 174,
648
+ 805,
649
+ 823,
650
+ 861
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "Our model is successful in generating diverse behaviours and learning a policy directly from a probabilistic model. It is simple to train and gives promising results in a range of tasks, including a zombie task that requires generalisation given a moving opponent as well as a mixed continuousdiscrete action space. ",
657
+ "bbox": [
658
+ 176,
659
+ 867,
660
+ 825,
661
+ 924
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "image",
667
+ "img_path": "images/216875a50ab4e46ec02cd9bee31cfb0b3d421f8c47b6c15dc04d61ac54e7065b.jpg",
668
+ "image_caption": [
669
+ "Figure 5: (a) Ground truth and (b) reconstruction (b) for the zombie attack scenario. The agent starts at $( 0 , 0 )$ , the goal is positioned at $( 5 , 5 )$ , and the zombie starts at a random location and moves towards the agent. "
670
+ ],
671
+ "image_footnote": [],
672
+ "bbox": [
673
+ 228,
674
+ 114,
675
+ 767,
676
+ 297
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "image",
682
+ "img_path": "images/0bdbb6715ab8b2ef6e9959c455362d38400214a6c8b7ed8da766363d78fea3da.jpg",
683
+ "image_caption": [
684
+ "Figure 6: Latent representation of the zombie example which is clearly structured. The red and blue points represent the attacking or avoiding behaviour. We also encode partial trajectories before and after the zombie is dead for the ’attacking’ agents, which are plotted in purple and green respectively. "
685
+ ],
686
+ "image_footnote": [],
687
+ "bbox": [
688
+ 187,
689
+ 378,
690
+ 799,
691
+ 517
692
+ ],
693
+ "page_idx": 6
694
+ },
695
+ {
696
+ "type": "image",
697
+ "img_path": "images/630f296f6260548d0d16ce0f7cc5bbe4f62a6007d481480f648e2eb5cdaecae2.jpg",
698
+ "image_caption": [
699
+ "Figure 7: Top row and bottom row display the results of the trajectories generating from the ’attacking’ and ’avoiding’ cluster respectively. The first and second column show whether the agent attacks the zombie and whether the zombie is dead in the episode, the difference is sometimes agents attacks the zombie but are not in the attacking range so that the zombie does not die. The third and fourth column show the closest distance to the goal and the zombie in each episode. The agent reaches the goal when the distance to it is $< 0 . 5$ which is indicated by the red dash line (successful). "
700
+ ],
701
+ "image_footnote": [],
702
+ "bbox": [
703
+ 176,
704
+ 595,
705
+ 810,
706
+ 818
707
+ ],
708
+ "page_idx": 6
709
+ },
710
+ {
711
+ "type": "table",
712
+ "img_path": "images/9f87b8bca5ea4dc0116d41403910c19a7db55f5855a5c49cb081e09b85b15542.jpg",
713
+ "table_caption": [],
714
+ "table_footnote": [],
715
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2> goals reached</td><td rowspan=1 colspan=2> success rate</td><td rowspan=1 colspan=1>dead zombie</td></tr><tr><td rowspan=1 colspan=1>n</td><td rowspan=1 colspan=1> attack</td><td rowspan=1 colspan=1>avoid</td><td rowspan=1 colspan=1> attack</td><td rowspan=1 colspan=1> avoid</td><td rowspan=1 colspan=1> attack</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>84.30%</td><td rowspan=1 colspan=1>90.50%</td><td rowspan=1 colspan=1>0%</td><td rowspan=1 colspan=1>53.00%</td><td rowspan=1 colspan=1>0%</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>89.50%</td><td rowspan=1 colspan=1>90.70%</td><td rowspan=1 colspan=1>20.50%</td><td rowspan=1 colspan=1>52.00%</td><td rowspan=1 colspan=1>28.40%</td></tr><tr><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>91%</td><td rowspan=1 colspan=1>99.50%</td><td rowspan=1 colspan=1>62.90%</td><td rowspan=1 colspan=1>38.70%</td><td rowspan=1 colspan=1>71.50%</td></tr></table>",
716
+ "bbox": [
717
+ 269,
718
+ 102,
719
+ 725,
720
+ 183
721
+ ],
722
+ "page_idx": 7
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "Figure 8: Comparison of performance in the zombie attack scenario with varying window length. ",
727
+ "bbox": [
728
+ 176,
729
+ 194,
730
+ 815,
731
+ 209
732
+ ],
733
+ "page_idx": 7
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "A wide range of future work can be built upon ours. For example, bootstrapping reinforcement learning with these initial policies to improve beyond demonstrated behaviour provided an additional reward signal whilst aiming to maintain the diversity in behaviours. ",
738
+ "bbox": [
739
+ 174,
740
+ 236,
741
+ 825,
742
+ 279
743
+ ],
744
+ "page_idx": 7
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "REFERENCES ",
749
+ "text_level": 1,
750
+ "bbox": [
751
+ 174,
752
+ 299,
753
+ 285,
754
+ 314
755
+ ],
756
+ "page_idx": 7
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Pieter Abbeel and Andrew $\\mathrm { ~ Y ~ N ~ g ~ }$ . Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 1. ACM, 2004. ",
761
+ "bbox": [
762
+ 176,
763
+ 323,
764
+ 825,
765
+ 352
766
+ ],
767
+ "page_idx": 7
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "John D Co-Reyes, YuXuan Liu, Abhishek Gupta, Benjamin Eysenbach, Pieter Abbeel, and Sergey Levine. Self-consistent trajectory autoencoder: Hierarchical reinforcement learning with trajectory embeddings. arXiv preprint arXiv:1806.02813, 2018. ",
772
+ "bbox": [
773
+ 176,
774
+ 359,
775
+ 823,
776
+ 402
777
+ ],
778
+ "page_idx": 7
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Claire D’Este, Mark O’Sullivan, and Nicholas Hannah. Behavioural cloning and robot control. In Robotics and Applications, pp. 179–182, 2003. ",
783
+ "bbox": [
784
+ 174,
785
+ 411,
786
+ 823,
787
+ 440
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "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, pp. 2672–2680, 2014. ",
794
+ "bbox": [
795
+ 174,
796
+ 449,
797
+ 825,
798
+ 492
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, pp. 4565–4573, 2016. ",
805
+ "bbox": [
806
+ 169,
807
+ 501,
808
+ 825,
809
+ 530
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
816
+ "bbox": [
817
+ 174,
818
+ 537,
819
+ 825,
820
+ 568
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Yunzhu Li, Jiaming Song, and Stefano Ermon. Infogail: Interpretable imitation learning from visual demonstrations. In Advances in Neural Information Processing Systems, pp. 3812–3822, 2017. ",
827
+ "bbox": [
828
+ 171,
829
+ 575,
830
+ 823,
831
+ 606
832
+ ],
833
+ "page_idx": 7
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Dean A Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991. ",
838
+ "bbox": [
839
+ 171,
840
+ 614,
841
+ 825,
842
+ 643
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "Neil C Rabinowitz, Frank Perbet, H Francis Song, Chiyuan Zhang, SM Eslami, and Matthew Botvinick. Machine theory of mind. arXiv preprint arXiv:1802.07740, 2018. ",
849
+ "bbox": [
850
+ 171,
851
+ 651,
852
+ 823,
853
+ 681
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "Stephane Ross and Drew Bagnell. Efficient reductions for imitation learning. In ´ Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 661–668, 2010. ",
860
+ "bbox": [
861
+ 169,
862
+ 689,
863
+ 823,
864
+ 719
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured ´ prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011. ",
871
+ "bbox": [
872
+ 176,
873
+ 727,
874
+ 823,
875
+ 771
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "Faraz Torabi, Garrett Warnell, and Peter Stone. Behavioral cloning from observation. arXiv preprint arXiv:1805.01954, 2018. ",
882
+ "bbox": [
883
+ 169,
884
+ 779,
885
+ 825,
886
+ 808
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Ziyu Wang, Josh S Merel, Scott E Reed, Nando de Freitas, Gregory Wayne, and Nicolas Heess. Robust imitation of diverse behaviors. In Advances in Neural Information Processing Systems, pp. 5320–5329, 2017. ",
893
+ "bbox": [
894
+ 171,
895
+ 816,
896
+ 823,
897
+ 859
898
+ ],
899
+ "page_idx": 7
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008. ",
904
+ "bbox": [
905
+ 171,
906
+ 868,
907
+ 823,
908
+ 897
909
+ ],
910
+ "page_idx": 7
911
+ }
912
+ ]
parse/train/Byx1VnR9K7/Byx1VnR9K7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Byx1VnR9K7/Byx1VnR9K7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/GlEWs-V9boR/GlEWs-V9boR.md ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Volume Rendering of Neural Implicit Surfaces
2
+
3
+ Lior Yariv1 Jiatao Gu2 Yoni Kasten1 Yaron Lipman1,2 1Weizmann Institute of Science 2Facebook AI Research
4
+
5
+ # Abstract
6
+
7
+ Neural volume rendering became increasingly popular recently due to its success in synthesizing novel views of a scene from a sparse set of input images. So far, the geometry learned by neural volume rendering techniques was modeled using a generic density function. Furthermore, the geometry itself was extracted using an arbitrary level set of the density function leading to a noisy, often low fidelity reconstruction. The goal of this paper is to improve geometry representation and reconstruction in neural volume rendering. We achieve that by modeling the volume density as a function of the geometry. This is in contrast to previous work modeling the geometry as a function of the volume density. In more detail, we define the volume density function as Laplace’s cumulative distribution function (CDF) applied to a signed distance function (SDF) representation. This simple density representation has three benefits: (i) it provides a useful inductive bias to the geometry learned in the neural volume rendering process; (ii) it facilitates a bound on the opacity approximation error, leading to an accurate sampling of the viewing ray. Accurate sampling is important to provide a precise coupling of geometry and radiance; and (iii) it allows efficient unsupervised disentanglement of shape and appearance in volume rendering. Applying this new density representation to challenging scene multiview datasets produced high quality geometry reconstructions, outperforming relevant baselines. Furthermore, switching shape and appearance between scenes is possible due to the disentanglement of the two.
8
+
9
+ # 1 Introduction
10
+
11
+ Volume rendering [18] is a set of techniques that renders volume density in radiance fields by the so called volume rendering integral. It has recently been shown that representing both the density and radiance fields as neural networks can lead to excellent prediction of novel views by learning only from a sparse set of input images. This neural volume rendering approach, presented in [21] and developed by its follow-ups [34, 2] approximates the integral as alpha-composition in a differentiable way, allowing to learn simultaneously both from input images. Although this coupling indeed leads to good generalization of novel viewing directions, the density part is not as successful in faithfully predicting the scene’s actual geometry, often producing noisy, low fidelity geometry approximation.
12
+
13
+ We propose VolSDF to devise a different model for the density in neural volume rendering, leading to better approximation of the scene’s geometry while maintaining the quality of view synthesis. The key idea is to represent the density as a function of the signed distance to the scene’s surface, see Figure 1. Such density function enjoys several benefits. First, it guarantees the existence of a well-defined surface that generates the density. This provides a useful inductive bias for disentangling density and radiance fields, which in turn provides a more accurate geometry approximation. Second, we show this density formulation allows bounding the approximation error of the opacity along rays. This bound is used to sample the viewing ray so to provide a faithful coupling of density and radiance field in the volume rendering integral. E.g., without such a bound the computed radiance along a ray (pixel color) can potentially miss or extend surface parts leading to incorrect radiance approximation.
14
+
15
+ ![](images/755aa32d36536ca2dbae3dc8843e1bcb086effd252230c842d44bbe299f7378c.jpg)
16
+ Figure 1: VolSDF: given a set of input images (left) we learn a volumetric density (center-left, sliced) defined by a signed distance function (center-right, sliced) to produce a neural rendering (right). This definition of density facilitates high quality geometry reconstruction (gray surfaces, middle).
17
+
18
+ A closely related line of research, often referred to as neural implicit surfaces [22, 38, 14], have been focusing on representing the scene’s geometry implicitly using a neural network, making the surface rendering process differentiable. The main drawback of these methods is their requirement of masks that separate objects from the background. Also, learning to render surfaces directly tends to grow extraneous parts due to optimization problems, which are avoided by volume rendering. In a sense, our work combines the best of both worlds: volume rendering with neural implicit surfaces.
19
+
20
+ We demonstrate the efficacy of VolSDF by reconstructing surfaces from the DTU [12] and BlendedMVS [37] datasets. VolSDF produces more accurate surface reconstructions compared to NeRF [21] and $_ \mathrm { N e R F + + }$ [39], and comparable reconstruction compared to IDR [38], while avoiding the use of object masks. Furthermore, we show disentanglement results with our method, i.e., switching the density and radiance fields of different scenes, which is shown to fail in NeRF-based models.
21
+
22
+ # 2 Related work
23
+
24
+ Neural Scene Representation & Rendering Implicit functions are traditionally adopted in modeling 3D scenes [24, 11, 4]. Recent studies have been focusing on model implicit functions with multi-layer perceptron (MLP) due to its expressive representation power and low memory foot-print, including scene (geometry & appearance) representation [9, 20, 19, 23, 25, 29, 36, 28, 35] and free-view rendering [33, 16, 30, 26, 17, 21, 15, 39, 34, 2]. In particular, NeRF [21] has opened up a line of research (see [6] for an overview) combining neural implicit functions together with volume rendering to achieve photo-realistic rendering results. However, it is non-trivial to find a proper threshold to extract surfaces from the predicted density, and the recovered geometry is far from satisfactory. Furthermore, sampling of points along a ray for rendering a pixel is done using an opacity function that is approximated from another network without any guarantee for correct approximation.
25
+
26
+ Multi-view 3D Reconstruction Image-based 3D surface reconstruction (multi-view stereo) has been a longstanding problem in the past decades. Classical multi-view stereo approaches are generally either depth-based [1, 31, 8, 7] or voxel-based [5, 3, 32]. For instance, in COLMAP [31] (a typical depth-based method) image features are extracted and matched across different views to estimate depth. Then the predicted depth maps are fused to obtain dense point clouds. To obtain the surface, an additional meshing step e.g. Poisson surface reconstruction [13] is applied. However, these methods with complex pipelines may accumulate errors at each stage and usually result in incomplete 3D models, especially for non-Lambertian surfaces as they can not handle view dependent colors. On the contrary, although it produces complete models by directly modeling objects in a volume, voxel-based approaches are limited to low resolution due to high memory consumption. Recently, neural-based approaches such as DVR [22], IDR [38], NLR [14] have also been proposed to reconstruct scene geometry from multi-view images. However, these methods require accurate object masks and appropriate weight initialization due to the difficulty of propagating gradients.
27
+
28
+ Independently from and concurrently with our work here, [27] also use implicit surface representation incorporated into volume rendering. In particular, they replace the local transparency function with an occupancy network [19]. This allows adding surface smoothing term to the loss, improving the quality of the resulting surfaces. Differently from their approach, we use signed distance representation, regularized with an Eikonal loss [38, 10] without any explicit smoothing term. Furthermore, we show that the choice of using signed distance allows bounding the opacity approximation error, facilitating the approximation of the volume rendering integral for the suggested family of densities.
29
+
30
+ # 3 Method
31
+
32
+ In this section we introduce a novel parameterization for volume density, defined as transformed signed distance function. Then we show how this definition facilitates the volume rendering process. In particular, we derive a bound of the error in the opacity approximation and consequently devise a sampling procedure for approximating the volume rendering integral.
33
+
34
+ # 3.1 Density as transformed SDF
35
+
36
+ Let the set $\Omega \subset \mathbb { R } ^ { 3 }$ represent the space occupied by some object in $\mathbb { R } ^ { 3 }$ , and $\mathcal { M } = \partial \Omega$ its boundary surface. We denote by $\mathbf { 1 } _ { \Omega }$ the $\Omega$ indicator function, and by $d _ { \Omega }$ the Signed Distance Function (SDF) to its boundary $\mathcal { M }$ ,
37
+
38
+ $$
39
+ \mathbf { 1 } _ { \Omega } ( { \pmb x } ) = \{ \begin{array} { l l } { 1 } & { \mathrm { i f } { \pmb x } \in \Omega } \\ { 0 } & { \mathrm { i f } { \pmb x } \notin \Omega } \end{array} , \quad \mathrm { a n d } \ d _ { \Omega } ( { \pmb x } ) = ( - 1 ) ^ { \mathbf { 1 } _ { \Omega } ( { \pmb x } ) } \operatorname* { m i n } _ { y \in \mathcal { M } } \| { \pmb x } - { \pmb y } \| ,
40
+ $$
41
+
42
+ where $\lVert \cdot \rVert$ is the standard Euclidean 2-norm. In neural volume rendering the volume density $\sigma :$ $\mathbb { R } ^ { 3 } \to \ddot { \mathbb { R } } _ { + }$ is a scalar volumetric function, where $\sigma ( { \pmb x } )$ is the rate that light is occluded at point $_ { \textbf { \em x } }$ ; $\sigma$ is called density since it is proportional to the particle count per unit volume at $_ { \textbf { \em x } }$ [18]. In previous neural volumetric rendering approaches [21, 15, 39], the density function, $\sigma$ , was modeled with a general-purpose Multi-Layer Perceptron (MLP). In this work we suggest to model the density using a certain transformation of a learnable Signed Distance Function (SDF) $d _ { \Omega }$ , namely
43
+
44
+ $$
45
+ \begin{array} { r } { \sigma ( \pmb { x } ) = \alpha \Psi _ { \beta } \left( - d _ { \Omega } ( \pmb { x } ) \right) , } \end{array}
46
+ $$
47
+
48
+ where $\alpha , \beta > 0$ are learnable parameters, and $\Psi _ { \beta }$ is the Cumulative Distribution Function (CDF) of the Laplace distribution with zero mean and $\beta$ scale (i.e., mean absolute deviation, which is intuitively the $L _ { 1 }$ version of the standard deviation),
49
+
50
+ $$
51
+ \Psi _ { \beta } ( s ) = { \left\{ \begin{array} { l l } { { \frac { 1 } { 2 } } \exp \left( { \frac { s } { \beta } } \right) } & { { \mathrm { i f ~ } } s \leq 0 } \\ { 1 - { \frac { 1 } { 2 } } \exp \left( - { \frac { s } { \beta } } \right) } & { { \mathrm { i f ~ } } s > 0 } \end{array} \right. }
52
+ $$
53
+
54
+ Figure 1 (center left and right) depicts an example of such a density and SDF. As can be readily checked from this definition, as $\beta$ approach zero, the density $\sigma$ converges to a scaled indicator function of $\Omega$ , that is $\sigma \to \alpha \mathbf { 1 } _ { \Omega }$ for all points $\pmb { x } \in \Omega \setminus \mathcal { M }$ .
55
+
56
+ Intuitively, the density $\sigma$ models a homogeneous object with a constant density $\alpha$ that smoothly decreases near the object’s boundary, where the smoothing amount is controlled by $\beta$ . The benefit in defining the density as in equation 2 is two-fold: First, it provides a useful inductive bias for the surface geometry $\mathcal { M }$ , and provides a principled way to reconstruct the surface, i.e., as the zero level-set of $d _ { \Omega }$ . This is in contrast to previous work where the reconstruction was chosen as an arbitrary level set of the learned density. Second, the particular form of the density as defined in equation 2 facilitates a bound on the error of the opacity (or, equivalently the transparency) of the rendered volume, a crucial component in the volumetric rendering pipeline. In contrast, such a bound will be hard to devise for a generic MLP densities.
57
+
58
+ # 3.2 Volume rendering of $\sigma$
59
+
60
+ In this section we review the volume rendering integral and the numerical integration commonly used to approximate it, requiring a set $s$ of sample points per ray. In the following section (Section 3.3), we explore the properties of the density $\sigma$ and derive a bound on the opacity approximation error along viewing rays. Finally, in Section 3.4 we derive an algorithm for producing a sample $s$ to be used in the volume rendering numerical integration.
61
+
62
+ In volume rendering we consider a ray $_ { \textbf { \em x } }$ emanating from a camera position $c \in \mathbb { R } ^ { 3 }$ in direction $\boldsymbol { v } \in \mathbb { R } ^ { 3 }$ , $\lVert \boldsymbol { v } \rVert = 1$ , defined by $\pmb { x } ( t ) = \pmb { c } + t \pmb { v } , t \geq 0$ . In essence, volume rendering is all about approximating the integrated (i.e., summed) light radiance along this ray reaching the camera. There are two important quantities that participate in this computation: the volume’s opacity $O$ , or equivalently, its transperancy $T$ , and the radiance field $L$ .
63
+
64
+ The transparency function of the volume along a ray $_ { \textbf { \em x } }$ , denoted $T$ , indicates, for each $t \geq 0$ , the probability a light particle succeeds traversing the segment $[ { \pmb c } , { \pmb x } ( t ) ]$ without bouncing off,
65
+
66
+ $$
67
+ T ( t ) = \exp \left( - \int _ { 0 } ^ { t } \sigma ( \pmb { x } ( s ) ) d s \right) ,
68
+ $$
69
+
70
+ and the opacity $O$ is the complement probability,
71
+
72
+ $$
73
+ O ( t ) = 1 - T ( t ) .
74
+ $$
75
+
76
+ Note that $O$ is a monotonic increasing function where $O ( 0 ) = 0$ , and assuming that every ray is eventually occluded $O ( \infty ) = 1$ . In that sense we can think of $O$ as a CDF, and
77
+
78
+ $$
79
+ { \boldsymbol { \tau } } ( t ) = { \frac { d O } { d t } } ( t ) = \sigma ( \mathbf { x } ( t ) ) T ( t )
80
+ $$
81
+
82
+ is its Probability Density Function (PDF). The volume rendering equation is the expected light along the ray,
83
+
84
+ $$
85
+ I ( c , \pmb { v } ) = \int _ { 0 } ^ { \infty } L ( \pmb { x } ( t ) , \pmb { n } ( t ) , \pmb { v } ) \tau ( t ) d t ,
86
+ $$
87
+
88
+ ![](images/d111657a37e6779d4593df14a61b9e3cb7f4f5c1310853579dfa3edaa9d1d7a1.jpg)
89
+ Figure 2: Qualitative comparison to NeRF. VolSDF shows less artifacts.
90
+
91
+ where $L ( x , n , v )$ is the radiance field, namely the amount of light emanating from point $_ { \textbf { \em x } }$ in direction $\textbf { { v } }$ ; in our formulation we also allow $L$ to depend on the level-set’s normal, i.e., ${ \pmb n } ( t ) = \nabla _ { { \pmb x } } d _ { \Omega } ( { \pmb x } ( t ) )$ . Adding this dependency is motivated by the fact that BRDFs of common materials are often encoded with respect to the surface normal, facilitating disentanglement as done in surface rendering [38]. We will get back to disentanglement in the experiments section. The integral in equation 7 is approximated using a numerical quadrature, namely the rectangle rule, at some discrete samples $\boldsymbol { S } = \bar { \{ \boldsymbol { s } _ { i } \} } _ { i = 1 } ^ { m }$ , $0 = s _ { 1 } < s _ { 2 } < . . . < s _ { m } = M$ , where $M$ is some large constant:
92
+
93
+ $$
94
+ I ( \pmb { c } , \pmb { v } ) \approx \hat { I } _ { S } ( \pmb { c } , \pmb { v } ) = \sum _ { i = 1 } ^ { m - 1 } \hat { \tau } _ { i } L _ { i } ,
95
+ $$
96
+
97
+ where we use the subscript $s$ in $\hat { I } _ { \mathcal { S } }$ to highlight the dependence of the approximation on the sample set $s$ ${ \sf S } , \hat { \tau } _ { i } \approx \tau ( s _ { i } ) \bar { \Delta } s$ is the approximated PDF multiplied by the interval length, and ${ \cal L } _ { i } \stackrel { - } { = } { \cal L } ( { \pmb x } ( s _ { i } ) , { \pmb n } ( s _ { i } ) , { \pmb v } )$ is the sampled radiance field. We provide full derivation and detail of $\hat { \tau } _ { i }$ in the supplementary.
98
+
99
+ Sampling. Since the PDF $\tau$ is typically extremely concentrated near the object’s boundary (see e.g., Figure 3, right) the choice of the sample points $s$ has a crucial effect on the approximation quality of equation 8. One solution is to use an adaptive sample, e.g., $s$ computed with the inverse CDF, i.e., $\hat { O } ^ { - 1 }$ . However, $O$ depends on the density model $\sigma$ and is not given explicitly. In [21] a second, coarse network was trained specifically for the approximation of the opacity $O$ , and was used for inverse sampling. However, the second network’s density does not necessarily faithfully represents the first network’s density, for which we wish to compute the volume integral. Furthermore, as we show later, one level of sampling could be insufficient to produce an accurate sample $s$ . Using a naive or crude approximation of $O$ would lead to a sub-optimal sample set $s$ that misses, or over extends non-negligible $\tau$ values. Consequently, incorrect radiance approximations can occur (i.e., pixel color), potentially harming the learned density-radiance field decomposition. Our solution works with a single density $\sigma$ , and the sampling $s$ is computed by a sampling algorithm based on an error bound for the opacity approximation. Figure 2 compares the NeRF and VolSDF renderings for the same scene. Note the salt and pepper artifacts in the NeRF rendering caused by the random samples; using fixed (uniformly spaced) sampling in NeRF leads to a different type of artifacts shown in the supplementary.
100
+
101
+ # 3.3 Bound on the opacity approximation error
102
+
103
+ In this section we develop a bound on the opacity approximation error using the rectangle rule. For a set of samples $\boldsymbol { \mathcal { T } } = \left\{ \boldsymbol { t } _ { i } \right\} _ { i = 1 } ^ { \bar { n } }$ $= \left\{ t _ { i } \right\} _ { i = 1 } ^ { n } , 0 = t _ { 1 } < t _ { 2 } < \cdots < t _ { n } = M$ , we let $\delta _ { i } = t _ { i + 1 } - t _ { i }$ , and $\bar { \sigma } _ { i } = \sigma ( \pmb { x } ( t _ { i } ) )$ . Given some $t \in ( 0 , M ]$ , assume $t \in [ t _ { k } , t _ { k + 1 } ]$ , and apply the rectangle rule (i.e., left Riemann sum) to get the approximation:
104
+
105
+ $$
106
+ \int _ { 0 } ^ { t } \sigma ( { x ( s ) } ) d s = \widehat { R } ( t ) + E ( t ) , \quad \mathrm { w h e r e ~ } \widehat { R } ( t ) = \sum _ { i = 1 } ^ { k - 1 } \delta _ { i } \sigma _ { i } + ( t - t _ { k } ) \sigma _ { k }
107
+ $$
108
+
109
+ is the rectangle rule approximation, and $E ( t )$ denotes the error in this approximation. The corresponding approximation of the opacity function (equation 5) is
110
+
111
+ $$
112
+ \widehat { O } ( t ) = 1 - \exp \Big ( { - } \widehat { R } ( t ) \Big ) .
113
+ $$
114
+
115
+ Our goal in this section is to derive a uniform bound over $[ 0 , M ]$ to the approximation $\widehat { O } \approx O$ . The key is the following bound on the derivative1 of the density $\sigma$ inside an interval along the ray ${ \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf { } } { \mathbf } { } \mathbf { } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf { } \mathbf { } } { \mathbf } { \mathbf { } } { \mathbf } { \mathbf } { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } { \mathbf } { \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } { \mathbf } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf { \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf { } \mathbf \mathbf } { \mathbf \mathbf } \mathbf { \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf } \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf } \mathbf \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf \mathbf } \mathbf \mathbf { \mathbf \mathbf } $ :
116
+
117
+ Theorem 1. The derivative of the density $\sigma$ within a segment $[ t _ { i } , t _ { i + 1 } ]$ satisfies
118
+
119
+ $$
120
+ \left| \frac { d } { d s } \sigma ( \pmb { x } ( s ) ) \right| \leq \frac { \alpha } { 2 \beta } \exp \left( - \frac { d _ { i } ^ { \star } } { \beta } \right) , w h e r e d _ { i } ^ { \star } = \operatorname* { m i n } _ { s \in [ t _ { i } , t _ { i + 1 } ] \atop y \notin B _ { i } \cup B _ { i + 1 } } \| \pmb { x } ( s ) - \pmb { y } \| ,
121
+ $$
122
+
123
+ The proof of this theorem, which is provided in the supplementary, makes a principled use of the signed distance function’s unique properties; the explicit formula for $d _ { i } ^ { * }$ is a bit cumbersome and therefore is deferred to the supplementary as-well. The inset depicts the boundary of the open balls union $B _ { i } \cup B _ { i + 1 }$ , the interval $[ \mathbf { \bar { x } } ( t _ { i } ) , \mathbf { \bar { x } } ( t _ { i + 1 } ) ]$ and the bound is defined in terms of the minimal distance between these two sets, i.e., $d _ { i } ^ { * }$ .
124
+
125
+ ![](images/970c8a3fe5c63e87775685f30ddcd0292997b9f46e7a4725c1ca3b34558c05ef.jpg)
126
+
127
+ The benefit in Theorem 1 is that it allows to bound the density’s derivative in each interval $[ t _ { i } , t _ { i - 1 } ]$ based only on the unsigned distance at the interval’s end points, $| d _ { i } | , | d _ { i + 1 } |$ , and the density parameters $\alpha , \beta$ . This bound can be used to derive an error bound for the rectangle rule’s approximation of the opacity,
128
+
129
+ $$
130
+ | E ( t ) | \leq \widehat { E } ( t ) = \frac { \alpha } { 4 \beta } \left( \sum _ { i = 1 } ^ { k - 1 } \delta _ { i } ^ { 2 } e ^ { - \frac { d _ { i } ^ { \star } } { \beta } } + ( t - t _ { k } ) ^ { 2 } e ^ { - \frac { d _ { k } ^ { \star } } { \beta } } \right) .
131
+ $$
132
+
133
+ Details are in the supplementary. Equation 12 leads to the following opacity error bound, also proved in the supplementary:
134
+
135
+ Theorem 2. For $t \in [ 0 , M ]$ , the error of the approximated opacity $\hat { O }$ can be bounded as follows:
136
+
137
+ $$
138
+ \begin{array} { r } { \left| O ( t ) - \widehat { O } ( t ) \right| \le \exp \left( - \widehat { R } ( t ) \right) \left( \exp \left( \widehat { E } ( t ) \right) - 1 \right) } \end{array}
139
+ $$
140
+
141
+ Finally, we can bound the opacity error for $t \in [ t _ { k } , t _ { k + 1 } ]$ by noting that $\widehat { E } ( t )$ , and consequently also $\exp ( \widehat { E } ( t ) )$ are monotonically increasing in $t$ , while $\exp ( - \widehat { R } ( t ) )$ is monotonically decreasing in $t$ , and therefore
142
+
143
+ $$
144
+ \operatorname* { m a x } _ { t \in \left[ t _ { k } , t _ { k + 1 } \right] } \left| O ( t ) - \widehat { O } ( t ) \right| \leq \exp \left( - \widehat { R } ( t _ { k } ) \right) \left( \exp ( \widehat { E } ( t _ { k + 1 } ) ) - 1 \right) .
145
+ $$
146
+
147
+ Taking the maximum over all intervals furnishes a bound $B _ { T , \beta }$ as a function of $\tau$ and $\beta$ ,
148
+
149
+ $$
150
+ \operatorname* { m a x } _ { t \in \left[ 0 , M \right] } \left| O ( t ) - \widehat { O } ( t ) \right| \leq B _ { \mathcal { T } , \beta } = \operatorname* { m a x } _ { k \in \left[ n - 1 \right] } \left\{ \exp \left( - \widehat { R } ( t _ { k } ) \right) \left( \exp ( \widehat { E } ( t _ { k + 1 } ) ) - 1 \right) \right\} ,
151
+ $$
152
+
153
+ where by convention $\widehat { R } ( t _ { 0 } ) = 0$ , and $[ \ell ] = \{ 1 , 2 , \dots , \ell \}$ . See Figure 3, where this bound is visualized in faint-red.
154
+
155
+ To conclude this section we derive two useful properties, proved in the supplementary. The first, is that sufficiently dense sampling is guaranteed to reduce the error bound $B _ { T , \epsilon }$ :
156
+
157
+ Lemma 1. Fix $\beta > 0$ . For any $\epsilon > 0$ a sufficient dense sampling $\tau$ will provide $B _ { T , \beta } < \epsilon$
158
+
159
+ Second, with a fixed number of samples we can set $\beta$ such that the error bound is below $\epsilon$ :
160
+
161
+ Lemma 2. Fix $n > 0$ . For any $\epsilon > 0$ a sufficiently large $\beta$ that satisfies
162
+
163
+ $$
164
+ \beta \ge { \frac { \alpha M ^ { 2 } } { 4 ( n - 1 ) \log ( 1 + \epsilon ) } }
165
+ $$
166
+
167
+ will provide $B \tau , \beta \leq \epsilon .$
168
+
169
+ ![](images/7bf61ad44265d7cc7e56764ac6cc7670a058bfd80a9bfb085e4c1bdf563563a9.jpg)
170
+ Figure 3: Qualitative evaluation of Algorithm 1 after 1, 2 and 5 iterations. Left-bottom: per-pixel $\beta _ { + }$ heatmap; Left-top: rendering of areas marked with black squares. Right-top: for a single ray indicated by white pixel we show the approximated (orange), true opacity (blue), the SDF (black), and $\widehat { O } ^ { - 1 }$ sample example (yellow dots). Right-bottom: for the same ray we now show the true opacity error (red), and error bound (faint red). After 5 iterations most of the rays converged, as can be inspected by the blue colors in the heatmap, providing a guaranteed $\epsilon$ approximation to the opacity, resulting in a crisp and more accurate rendering (center-left, top).
171
+
172
+ # 3.4 Sampling algorithm
173
+
174
+ In this section we develop an algorithm for computing the sampling $s$ to be used in equation 8. This is done by first utilizing the bound in equation 15 to find samples $\tau$ so that $\widehat { O }$ (via equation 10) provides an $\epsilon$ approximation to the true opacity $O$ , where $\epsilon$ is a hyper-parameter, that is $B \tau , \beta < \epsilon$ . Second, we perform inverse CDF sampling with $\hat { O }$ , as described in Section 3.2.
175
+
176
+ Note that from Lemma 1 it follows that we can simply choose large enough $n$ to ensure $B \tau , \beta < \epsilon$ . However, this would lead to prohibitively large number of samples. Instead, we suggest a simple algorithm to reduce the number of required samples in practice and allows working with a limited budget of sample points. In a nutshell, we start with a uniform sampling $\mathcal { T } = \mathcal { T } _ { 0 }$ , and use Lemma 2 to initially set a $\beta _ { + } > \beta$ that satisfies $B _ { T , \beta _ { + } } \leq \epsilon$ . Then, we repeatedly upsample $\tau$ to reduce $\beta _ { + }$ while maintaining $B \tau , \beta _ { + } \le \epsilon$ . Even though this simple strategy is not guaranteed to converge, we find that $\beta _ { + }$ usually converges to $\beta$ (typically $8 5 \%$ , see also Figure 3), and even in cases it does not, the algorithm provides $\beta _ { + }$ for which the opacity approximation still maintains an $\epsilon$ error. The algorithm is presented below (Algorithm 1).
177
+
178
+ We initialize $\tau$ (Line 1 in Algorithm 1) with uniform sampling $\mathcal { T } _ { 0 } = \left\{ t _ { i } \right\} _ { i = 1 } ^ { n }$ , where $\begin{array} { r } { t _ { k } = ( k - 1 ) \frac { M } { n - 1 } } \end{array}$ $k \in [ n ]$ (we use $n = 1 2 8$ in our implementation). Given this sampling we next pick $\beta _ { + } > \beta$ according to Lemma 2 so that the error bound satisfies the required $\epsilon$ bound (Line 2 in Algorithm 1).
179
+
180
+ In order to reduce $\beta _ { + }$ while keep $B _ { T , \beta _ { + } } \leq \epsilon .$ , $n$ samples are added to $\tau$ (Line 4 in Algorithm 1), where the number of points sampled from each interval is proportional to its current error bound, equation 14. Assuming $\tau$ was sufficiently upsampled and satisfy $B _ { T , \beta _ { + } } < \epsilon$ , we decrease $\beta _ { + }$ towards $\beta$ . Since the algorithm did not stop we have that $B \tau , \beta > \epsilon$ . Therefore the Mean Value Theorem implies the existence of $\beta _ { \star } \in ( \beta , \beta _ { + } )$ such that $B _ { T , \beta _ { \star } } = \epsilon$ . We use the bisection method (with maximum of 10 iterations) to efficiently search for $\beta _ { \star }$ and update $\beta _ { + }$ accordingly (Lines 6 and 7 in Algorithm 1). The algorithm runs iteratively until $B \tau , \beta \leq \epsilon$ or a maximal number of 5 iterations is reached. Either way, we use the final $\tau$ and $\beta _ { + }$ (guaranteed to provide $B _ { T , \beta _ { + } } \leq \epsilon )$ to estimate the current opacity $\widehat { O }$ , Line 10 in Algorithm 1). Finally we return a fresh set of $m = 6 4$ samples $\hat { O }$ using inverse transform sampling (Line 11 in Algorithm 1). Figure 3 shows qualitative illustration of Algorithm 1, for $\beta = 0 . 0 0 1$ and $\epsilon = 0 . 1$ (typical values).
181
+
182
+ # Algorithm 1: Sampling algorithm.
183
+
184
+ Input: error threshold $\epsilon > 0$ ; $\beta$
185
+
186
+ 1 Initialize $\mathcal { T } = \mathcal { T } _ { 0 }$
187
+ 2 Initialize $\beta _ { + }$ such that $B \tau , \beta _ { + } \leq \epsilon$
188
+ 3 while $B \tau , \beta > \epsilon$ and not max_iter do
189
+ 4 upsample $\tau$
190
+ 5 if $B \tau _ { \cdot , \beta _ { + } } < \epsilon$ then
191
+ 6 Find $\beta _ { \star } \in \left( \beta , \beta _ { + } \right)$ so that
192
+ $B _ { T , \beta _ { \star } } = \epsilon$
193
+ 7 Update $\beta _ { + } \beta _ { \star }$
194
+ 8 end
195
+ 9 end
196
+ 10 Estimate $\widehat { O }$ using $\tau$ and $\beta _ { + }$
197
+ 11 $S \gets \mathrm { g e t }$ fresh $m$ samples using $\hat { O } ^ { - 1 }$
198
+ 12 return $s$
199
+
200
+ ![](images/f94b0eb5c22d9610e96a5703e40a66cf26e23f71159661fc6ba5c9894fda5f75.jpg)
201
+ Figure 4: Qualitative results for reconstructed geometries of objects from the DTU dataset.
202
+
203
+ # 3.5 Training
204
+
205
+ Our system consists of two Multi-Layer Perceptrons (MLP): (i) $f _ { \varphi }$ approximating the SDF of the learned geometry, as well as global geometry feature $_ z$ of dimension 256, i.e., ${ \pmb f } _ { \varphi } ( { \pmb x } ) =$ $( d ( \pmb { x } ) , z ( \pmb { x } ) ) \in \mathbb { R } ^ { 1 + 2 5 6 }$ , where $\varphi$ denotes its learnable parameters; (ii) $L _ { \psi } ( \pmb { x } , \pmb { n } , \pmb { v } , z ) \in \mathbb { R } ^ { 3 }$ representing the scene’s radiance field with learnable parameters $\psi$ . In addition we have two scalar learnable parameters $\alpha , \beta \in \mathbb { R }$ . In fact, in our implementation we make the choice $\alpha = \beta ^ { - 1 }$ . We denote by $\theta \in \mathbb { R } ^ { p }$ the collection of all learnable parameters of the model, $\theta = ( \varphi , \psi , \beta )$ . To facilitate the learning of high frequency details of the geometry and radiance field, we exploit positional encoding [21] for the position $_ { \textbf { \em x } }$ and view direction $\pmb { v }$ in the geometry and radiance field. The influence of different positional encoding choices are presented in the supplementary.
206
+
207
+ Our data consists of a collection of images with camera parameters. From this data we extract pixel level data: for each pixel $p$ we have a triplet $( I _ { p } , c _ { p } , v _ { p } )$ , where $I _ { p } \in \mathbb { R } ^ { 3 }$ is its intensity (RGB color), $c _ { p } \in \mathbb { R } ^ { 3 }$ is its camera location, and $\boldsymbol { v } _ { p } \in \mathbb { R } ^ { 3 }$ is the viewing direction (camera to pixel). Our training loss consists of two terms:
208
+
209
+ $$
210
+ \begin{array} { r } { \mathcal { L } ( \theta ) = \mathcal { L } _ { \mathrm { R G B } } ( \theta ) + \lambda \mathcal { L } _ { \mathrm { S D F } } ( \varphi ) , \quad \mathrm { w h e r e } } \end{array}
211
+ $$
212
+
213
+ $$
214
+ \begin{array} { r } { \mathcal { L } _ { \mathrm { R G B } } ( \theta ) = \mathbb { E } _ { p } \left\| I _ { p } - \hat { I } _ { S } ( \boldsymbol { c } _ { p } , \boldsymbol { v } _ { p } ) \right\| _ { 1 } , \quad \mathrm { a n d } \mathcal { L } _ { \mathrm { S D F } } ( \varphi ) = \mathbb { E } _ { z } \left( \left\| \nabla d ( z ) \right\| - 1 \right) ^ { 2 } , } \end{array}
215
+ $$
216
+
217
+ where $\mathcal { L } _ { \mathrm { { R G B } } }$ is the color loss; $\left\| \cdot \right\| _ { 1 }$ denotes the 1-norm, $s$ is computed with Algorithm 1, and $\hat { I } _ { S }$ is the numerical approximation to the volume rendering integral in equation 8; here we also incorporate the global feature in the radiance field, i.e., $L _ { i } = L _ { \psi } ( \pmb { x } ( s _ { i } ) , \pmb { n } ( s _ { i } ) , \pmb { v } _ { p } , z ( \pmb { x } ( s _ { i } ) ) )$ . $\mathcal { L } _ { \mathrm { S D F } }$ is the Eikonal loss encouraging $d$ to approximate a signed distance function [10]; the samples $_ z$ are taken to combine a single random uniform space point and a single point from $s$ for each pixel $p$ . We train with batches of size 1024 pixels $p$ . $\lambda$ is a hyper-parameter set to 0.1 throughout the the experiments. Further implementation details are provided in the supplementary.
218
+
219
+ # 4 Experiments
220
+
221
+ We evaluate our method on the challenging task of multiview 3D surface reconstruction. We use two datasets: DTU [12] and BlendedMVS [37], both containing real objects with different materials that are captured from multiple views. In Section 4.1 we show qualitative and quantitative 3D surface reconstruction results of VolSDF, comparing favorably to relevant baselines. In Section 4.2 we demonstrate that, in contrast to NeRF [21], our model is able to successfully disentangle the geometry and appearance of the captured objects.
222
+
223
+ <table><tr><td>Scan</td><td></td><td>24</td><td>37</td><td>40</td><td>55</td><td>63</td><td>65</td><td>69</td><td>83</td><td>97</td><td>105</td><td>106</td><td>110</td><td>114</td><td>118</td><td>122</td><td>Mean</td></tr><tr><td></td><td>IDR</td><td>1.63</td><td>1.87</td><td>0.63</td><td>0.48</td><td>1.04</td><td>0.79</td><td>0.77</td><td>1.33</td><td>1.16</td><td>0.76</td><td>0.67</td><td>0.90</td><td>0.42</td><td>0.51</td><td>0.53</td><td>0.90</td></tr><tr><td>erreistteatettec</td><td>colmap7</td><td>0.45</td><td>0.91</td><td>0.37</td><td>0.37</td><td>0.90</td><td>1.00</td><td>0.54</td><td>1.22</td><td>1.08</td><td>0.64</td><td>0.48</td><td>0.59</td><td>0.32</td><td>0.45</td><td>0.43</td><td>0.65</td></tr><tr><td></td><td>colmapo</td><td>0.81</td><td>2.05</td><td>0.73</td><td>1.22</td><td>1.79</td><td>1.58</td><td>1.02</td><td>3.05</td><td>1.40</td><td>2.05</td><td>1.00</td><td>1.32</td><td>0.49</td><td>0.78</td><td>1.17</td><td>1.36</td></tr><tr><td></td><td>NeRF</td><td>1.92</td><td>1.73</td><td>1.92</td><td>0.80</td><td>3.41</td><td>1.39</td><td>1.51</td><td>5.44</td><td>2.04</td><td>1.10</td><td>1.01</td><td>2.88</td><td>0.91</td><td>1.00</td><td>0.79</td><td>1.89</td></tr><tr><td></td><td>VolSDF</td><td>1.14</td><td>1.26</td><td>0.81</td><td>0.49</td><td>1.25</td><td>0.70</td><td>0.72</td><td>1.29</td><td>1.18</td><td>0.70</td><td>0.66</td><td>1.08</td><td>0.42</td><td>0.61</td><td>0.55</td><td>0.86</td></tr><tr><td>JPSH</td><td>NeRF</td><td>26.24 25.74 26.79 27.57 31.96 31.50 29.58 32.78 28.35 32.08 33.49 31.54 31.0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>35.59 35.51</td><td>30.65</td></tr><tr><td></td><td>VolSDF</td><td></td><td></td><td>26.2825.61 26.55 26.76 31.57</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>31.529.38 33.23 28.03 32.13 33.16 31.49 30.33</td><td></td><td></td><td></td><td>34.934.7530.38</td></tr></table>
224
+
225
+ ![](images/e528190f4300fd324fefcf6500404eaeb02953cb1a480d883c7e39df6201f3ec.jpg)
226
+ Table 1: Quantitative results for the DTU dataset.
227
+ Figure 5: Qualitative results sampled from the BlendedMVS dataset. For each scan we present a visualization of a rendered image and the reconstructed 3D geometry.
228
+
229
+ # 4.1 Multi-view 3D reconstruction
230
+
231
+ DTU The DTU [12] dataset contains multi-view image (49 or 64) of different objects with fixed camera and lighting parameters. We evaluate our method on the 15 scans that were selected by [38]. We compare our surface accuracy using the Chamfer $l _ { 1 }$ loss (measured in mm) to $\mathrm { C O L M A P _ { 0 } }$ (which is watertight reconstruction; $\mathrm { C O L M A P _ { 7 } }$ is not watertight and provided only for reference) [31], NeRF [21] and IDR [38], where for fair comparison with IDR we only evaluate the reconstruction inside the visual hull of the objects (defined by the segmentation masks of [38]). We further evaluate the PSNR of our rendering compared to [21]. Quantitative results are presented in Table 1. It can be observed that our method is on par with IDR (that uses object masks for all images) and outperforms NeRF and COLMAP in terms of reconstruction accuracy. Our rendering quality is comparable to NeRF’s.
232
+
233
+ BlendedMVS The BlendedMVS dataset [37] contains a large collection of 113 scenes captured from multiple views. It supplies high quality ground truth 3D models for evaluation, various camera configurations, and a variety of indoor/outdoor real environments. We selected 9 different scenes and used our method to reconstruct the surface of each object. In contrast to the DTU dataset, BlendedMVS scenes have complex backgrounds. Therefore we use $_ \mathrm { N e R F + + }$ [39] as a baseline for this dataset. In Table 2 we present our results compared to $_ \mathrm { N e R F + + }$ . Qualitative comparisons are presented in Fig. 5; since the units are unknown in this case we present relative improvement of
234
+
235
+ Chamfer distance (in $\%$ ) compared to NeRF. Also in this case, we improve NeRF reconstructions considerably, while being on-par in terms of the rendering quality (PSNR).
236
+
237
+ Comparison to [38] IDR [38] is the state of the art 3D surface
238
+ reconstruction method using implicit representation. However, it
239
+ suffers from two drawbacks: first, it requires object masks for
240
+ training, which is a strong supervision signal. Second, since it sets
241
+ the pixel color based only on the single point of intersection of the
242
+ corresponding viewing ray, it is more pruned to local minima that
243
+ sometimes appear in the form of extraneous surface parts. Figure 6 compares the same scene trained
244
+
245
+ ![](images/7a379328c684569053c7deb4e4d2d6406c854f69f9484dc18659971bc90ca4df.jpg)
246
+ Figure 6: IDR extraneous parts.
247
+
248
+ Table 2: Quantitative results for the BlendedMVS dataset.
249
+
250
+ <table><tr><td></td><td>Scene</td><td>Doll</td><td>Egg</td><td>Head</td><td>Angel</td><td>Bull</td><td>Robot</td><td>Dog</td><td>Bread</td><td>Camera</td><td>Mean</td></tr><tr><td>Chamfer l1</td><td>Our Improvement (%)</td><td>54.0</td><td>91.2</td><td>24.3</td><td>75.1</td><td>60.7</td><td>27.2</td><td>47.7</td><td>34.6</td><td>51.8</td><td>51.8</td></tr><tr><td rowspan="2">PSNR</td><td>NeRF++</td><td>26.95</td><td>27.34</td><td>27.23</td><td>30.06</td><td>26.65</td><td>26.73</td><td>27.90</td><td>31.68</td><td>23.44</td><td>27.55</td></tr><tr><td>VolSDF</td><td>25.49</td><td>27.18</td><td>26.36</td><td>29.79</td><td>26.01</td><td>26.03</td><td>28.65</td><td>31.24</td><td>22.97</td><td>27.08</td></tr></table>
251
+
252
+ with IDR with the addition of ground truth masks, and VolSDF trained without masks. Note that IDR introduces some extraneous surface parts (e.g., in marked red), while VolSDF provides a more faithful result in this case.
253
+
254
+ # 4.2 Disentanglement of geometry and appearance
255
+
256
+ We have tested the disentanglement of scenes to geometry (density) and appearance (radiance field) by switching the radiance fields of two trained scenes. For VolSDF we switched $L _ { \psi }$ . For NeRF [21] we note that the radiance field is computed as $L _ { \psi } ( z , v )$ , where $L _ { \psi }$ is a fully connected network with one hidden layer (of width 128 and ReLU activation) and $_ z$ is a feature vector. We tested two versions of NeRF disentanglement: First, by switching the original radiance fields $L _ { \psi }$ of trained NeRF networks. Second, by switching the radiance fields of trained NeRF models with an identical radiance field model to ours, namely $L _ { \psi } ( { \pmb x } , { \pmb n } , { \pmb v } , z )$ . As shown in Figure 7 both versions of NeRF fail to produce a correct disentanglement in these scenes, while VolSDF successfully switches the materials of the two objects. We attribute this to the specific inductive bias injected with the use of the density in equation 2.
257
+
258
+ ![](images/928ceb27070b8ce43e615aa3bdce1ddf4e35f88506240345ba2acec696b6409c.jpg)
259
+ Figure 7: Geometry and radiance disentanglement is physically plausible with VolSDF.
260
+
261
+ # 5 Conclusions
262
+
263
+ We introduce VolSDF, a volume rendering framework for implicit neural surfaces. We represent the volume density as a transformed version of the signed distance function to the learned surface geometry. This seemingly simple definition provides a useful inductive bias, allowing disentanglement of geometry (i.e., density) and radiance field, and improves the geometry approximation over previous neural volume rendering techniques. Furthermore, it allows to bound the opacity approximation error leading to high fidelity sampling of the volume rendering integral.
264
+
265
+ Some limitations of our method present interesting future research opportunities. First, although working well in practice, we do not have a proof of correctness for the sampling algorithm. We believe providing such a proof, or finding a version of this algorithm that has a proof would be a useful contribution. In general, we believe working with bounds in volume rendering could improve learning and disentanglement and push the field forward. Second, representing non-watertight manifolds and/or manifolds with boundaries, such as zero thickness surfaces, is not possible with an SDF. Generalizations such as multiple implicits and unsigned fields could be proven valuable. Third, our current formulation assumes homogeneous density; extending it to more general density models would allow representing a broader class of geometries. Fourth, now that high quality geometries can be learned in an unsupervised manner it will be interesting to learn dynamic geometries and shape spaces directly from collections of images. Lastly, although we don’t see immediate negative societal impact of our work, we do note that accurate geometry reconstruction from images can be used for malice purposes.
266
+
267
+ # Acknowledgments
268
+
269
+ LY is supported by the European Research Council (ERC Consolidator Grant, "LiftMatch" 771136), the Israel Science Foundation (Grant No. 1830/17), and Carolito Stiftung (WAIC). YK is supported by the U.S.- Israel Binational Science Foundation, grant number 2018680, Carolito Stiftung (WAIC), and by the Kahn foundation.
270
+
271
+ # References
272
+
273
+ [1] C. Barnes, E. Shechtman, A. Finkelstein, and D. B. Goldman. PatchMatch: A randomized correspondence algorithm for structural image editing. ACM Transactions on Graphics (Proc. SIGGRAPH), 28(3), Aug. 2009. [2] M. Boss, R. Braun, V. Jampani, J. T. Barron, C. Liu, and H. P. Lensch. Nerd: Neural reflectance decomposition from image collections, 2020. [3] A. Broadhurst, T. Drummond, and R. Cipolla. A probabilistic framework for space carving. In Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, volume 1, pages 388–393 vol.1, 2001.
274
+ [4] A. Dai, M. Nießner, M. Zollhöfer, S. Izadi, and C. Theobalt. Bundlefusion: Real-time globally consistent 3d reconstruction using on-the-fly surface reintegration. ACM Transactions on Graphics (ToG), 36(4):1, 2017. [5] J. S. De Bonet and P. Viola. Poxels: Probabilistic voxelized volume reconstruction. In Proceedings of the IEEE International Conference on Computer Vision. ICCV 1999, 1999.
275
+ [6] F. Dellaert and L. Yen-Chen. Neural volume rendering: Nerf and beyond. arXiv preprint arXiv:2101.05204, 2020.
276
+ [7] Y. Furukawa and J. Ponce. Accurate, dense, and robust multiview stereopsis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(8):1362–1376, 2010.
277
+ [8] S. Galliani, K. Lasinger, and K. Schindler. Massively parallel multiview stereopsis by surface normal diffusion. In Proceedings of the IEEE International Conference on Computer Vision, pages 873–881, 2015. [9] K. Genova, F. Cole, D. Vlasic, A. Sarna, W. T. Freeman, and T. Funkhouser. Learning shape templates with structured implicit functions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7154–7164, 2019.
278
+ [10] A. Gropp, L. Yariv, N. Haim, M. Atzmon, and Y. Lipman. Implicit geometric regularization for learning shapes. arXiv preprint arXiv:2002.10099, 2020.
279
+ [11] S. Izadi, D. Kim, O. Hilliges, D. Molyneaux, R. Newcombe, P. Kohli, J. Shotton, S. Hodges, D. Freeman, A. Davison, et al. Kinectfusion: real-time 3d reconstruction and interaction using a moving depth camera. In Proceedings of the 24th annual ACM symposium on User interface software and technology, pages 559–568, 2011.
280
+ [12] R. Jensen, A. Dahl, G. Vogiatzis, E. Tola, and H. Aanæs. Large scale multi-view stereopsis evaluation. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 406–413. IEEE, 2014.
281
+ [13] M. Kazhdan, M. Bolitho, and H. Hoppe. Poisson Surface Reconstruction. In A. Sheffer and K. Polthier, editors, Symposium on Geometry Processing. The Eurographics Association, 2006.
282
+ [14] P. Kellnhofer, L. Jebe, A. Jones, R. Spicer, K. Pulli, and G. Wetzstein. Neural lumigraph rendering. In CVPR, 2021.
283
+ [15] L. Liu, J. Gu, K. Zaw Lin, T.-S. Chua, and C. Theobalt. Neural sparse voxel fields. Advances in Neural Information Processing Systems, 33, 2020.
284
+ [16] S. Liu, Y. Zhang, S. Peng, B. Shi, M. Pollefeys, and Z. Cui. Dist: Rendering deep implicit signed distance function with differentiable sphere tracing. arXiv preprint arXiv:1911.13225, 2019.
285
+ [17] S. Lombardi, T. Simon, J. Saragih, G. Schwartz, A. Lehrmann, and Y. Sheikh. Neural volumes: Learning dynamic renderable volumes from images. arXiv preprint arXiv:1906.07751, 2019.
286
+ [18] N. Max. Optical models for direct volume rendering. IEEE Transactions on Visualization and Computer Graphics, 1(2):99–108, 1995.
287
+ [19] L. Mescheder, M. Oechsle, M. Niemeyer, S. Nowozin, and A. Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4460–4470, 2019.
288
+ [20] M. Michalkiewicz, J. K. Pontes, D. Jack, M. Baktashmotlagh, and A. Eriksson. Implicit surface representations as layers in neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4743–4752, 2019.
289
+ [21] B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020.
290
+ [22] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision. arXiv preprint arXiv:1912.07372, 2019.
291
+ [23] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5379–5389, 2019.
292
+ [24] M. Nießner, M. Zollhöfer, S. Izadi, and M. Stamminger. Real-time 3d reconstruction at scale using voxel hashing. ACM Trans. Graph., 32(6), Nov. 2013.
293
+ [25] M. Oechsle, L. Mescheder, M. Niemeyer, T. Strauss, and A. Geiger. Texture fields: Learning texture representations in function space. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4531–4540, 2019.
294
+ [26] M. Oechsle, M. Niemeyer, L. Mescheder, T. Strauss, and A. Geiger. Learning implicit surface light fields. arXiv preprint arXiv:2003.12406, 2020.
295
+ [27] M. Oechsle, S. Peng, and A. Geiger. Unisurf: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction. arXiv preprint arXiv:2104.10078, 2021.
296
+ [28] J. J. Park, P. Florence, J. Straub, R. Newcombe, and S. Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 165–174, 2019.
297
+ [29] S. Peng, M. Niemeyer, L. Mescheder, M. Pollefeys, and A. Geiger. Convolutional occupancy networks. In A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm, editors, Computer Vision – ECCV 2020, pages 523–540, Cham, 2020. Springer International Publishing.
298
+ [30] S. Saito, Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2304–2314, 2019.
299
+ [31] J. L. Schönberger, E. Zheng, M. Pollefeys, and J.-M. Frahm. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016.
300
+ [32] S. M. Seitz and C. R. Dyer. Photorealistic scene reconstruction by voxel coloring. International Journal of Computer Vision, 35(2):151–173, 1999.
301
+ [33] V. Sitzmann, M. Zollhöfer, and G. Wetzstein. Scene representation networks: Continuous 3d-structureaware neural scene representations. In Advances in Neural Information Processing Systems, pages 1119–1130, 2019.
302
+ [34] P. P. Srinivasan, B. Deng, X. Zhang, M. Tancik, B. Mildenhall, and J. T. Barron. Nerv: Neural reflectance and visibility fields for relighting and view synthesis. In CVPR, 2021.
303
+ [35] T. Takikawa, J. Litalien, K. Yin, K. Kreis, C. Loop, D. Nowrouzezahrai, A. Jacobson, M. McGuire, and S. Fidler. Neural geometric level of detail: Real-time rendering with implicit 3d shapes. arXiv preprint arXiv:2101.10994, 2021.
304
+ [36] Q. Xu, W. Wang, D. Ceylan, R. Mech, and U. Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. arXiv preprint arXiv:1905.10711, 2019.
305
+ [37] Y. Yao, Z. Luo, S. Li, J. Zhang, Y. Ren, L. Zhou, T. Fang, and L. Quan. Blendedmvs: A large-scale dataset for generalized multi-view stereo networks. Computer Vision and Pattern Recognition (CVPR), 2020.
306
+ [38] L. Yariv, Y. Kasten, D. Moran, M. Galun, M. Atzmon, B. Ronen, and Y. Lipman. Multiview neural surface reconstruction by disentangling geometry and appearance. Advances in Neural Information Processing Systems, 33, 2020.
307
+ [39] K. Zhang, G. Riegler, N. Snavely, and V. Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020.
parse/train/GlEWs-V9boR/GlEWs-V9boR_content_list.json ADDED
@@ -0,0 +1,1282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Volume Rendering of Neural Implicit Surfaces ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 215,
8
+ 122,
9
+ 779,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Lior Yariv1 Jiatao Gu2 Yoni Kasten1 Yaron Lipman1,2 1Weizmann Institute of Science 2Facebook AI Research ",
17
+ "bbox": [
18
+ 220,
19
+ 199,
20
+ 772,
21
+ 238
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 284,
32
+ 535,
33
+ 300
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Neural volume rendering became increasingly popular recently due to its success in synthesizing novel views of a scene from a sparse set of input images. So far, the geometry learned by neural volume rendering techniques was modeled using a generic density function. Furthermore, the geometry itself was extracted using an arbitrary level set of the density function leading to a noisy, often low fidelity reconstruction. The goal of this paper is to improve geometry representation and reconstruction in neural volume rendering. We achieve that by modeling the volume density as a function of the geometry. This is in contrast to previous work modeling the geometry as a function of the volume density. In more detail, we define the volume density function as Laplace’s cumulative distribution function (CDF) applied to a signed distance function (SDF) representation. This simple density representation has three benefits: (i) it provides a useful inductive bias to the geometry learned in the neural volume rendering process; (ii) it facilitates a bound on the opacity approximation error, leading to an accurate sampling of the viewing ray. Accurate sampling is important to provide a precise coupling of geometry and radiance; and (iii) it allows efficient unsupervised disentanglement of shape and appearance in volume rendering. Applying this new density representation to challenging scene multiview datasets produced high quality geometry reconstructions, outperforming relevant baselines. Furthermore, switching shape and appearance between scenes is possible due to the disentanglement of the two. ",
40
+ "bbox": [
41
+ 232,
42
+ 313,
43
+ 766,
44
+ 590
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 614,
55
+ 310,
56
+ 632
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Volume rendering [18] is a set of techniques that renders volume density in radiance fields by the so called volume rendering integral. It has recently been shown that representing both the density and radiance fields as neural networks can lead to excellent prediction of novel views by learning only from a sparse set of input images. This neural volume rendering approach, presented in [21] and developed by its follow-ups [34, 2] approximates the integral as alpha-composition in a differentiable way, allowing to learn simultaneously both from input images. Although this coupling indeed leads to good generalization of novel viewing directions, the density part is not as successful in faithfully predicting the scene’s actual geometry, often producing noisy, low fidelity geometry approximation. ",
63
+ "bbox": [
64
+ 174,
65
+ 646,
66
+ 825,
67
+ 757
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "We propose VolSDF to devise a different model for the density in neural volume rendering, leading to better approximation of the scene’s geometry while maintaining the quality of view synthesis. The key idea is to represent the density as a function of the signed distance to the scene’s surface, see Figure 1. Such density function enjoys several benefits. First, it guarantees the existence of a well-defined surface that generates the density. This provides a useful inductive bias for disentangling density and radiance fields, which in turn provides a more accurate geometry approximation. Second, we show this density formulation allows bounding the approximation error of the opacity along rays. This bound is used to sample the viewing ray so to provide a faithful coupling of density and radiance field in the volume rendering integral. E.g., without such a bound the computed radiance along a ray (pixel color) can potentially miss or extend surface parts leading to incorrect radiance approximation. ",
74
+ "bbox": [
75
+ 174,
76
+ 763,
77
+ 826,
78
+ 902
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/755aa32d36536ca2dbae3dc8843e1bcb086effd252230c842d44bbe299f7378c.jpg",
85
+ "image_caption": [
86
+ "Figure 1: VolSDF: given a set of input images (left) we learn a volumetric density (center-left, sliced) defined by a signed distance function (center-right, sliced) to produce a neural rendering (right). This definition of density facilitates high quality geometry reconstruction (gray surfaces, middle). "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 166,
91
+ 87,
92
+ 816,
93
+ 184
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "A closely related line of research, often referred to as neural implicit surfaces [22, 38, 14], have been focusing on representing the scene’s geometry implicitly using a neural network, making the surface rendering process differentiable. The main drawback of these methods is their requirement of masks that separate objects from the background. Also, learning to render surfaces directly tends to grow extraneous parts due to optimization problems, which are avoided by volume rendering. In a sense, our work combines the best of both worlds: volume rendering with neural implicit surfaces. ",
100
+ "bbox": [
101
+ 174,
102
+ 256,
103
+ 825,
104
+ 339
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "We demonstrate the efficacy of VolSDF by reconstructing surfaces from the DTU [12] and BlendedMVS [37] datasets. VolSDF produces more accurate surface reconstructions compared to NeRF [21] and $_ \\mathrm { N e R F + + }$ [39], and comparable reconstruction compared to IDR [38], while avoiding the use of object masks. Furthermore, we show disentanglement results with our method, i.e., switching the density and radiance fields of different scenes, which is shown to fail in NeRF-based models. ",
111
+ "bbox": [
112
+ 174,
113
+ 345,
114
+ 825,
115
+ 415
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 Related work ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 174,
125
+ 445,
126
+ 316,
127
+ 462
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Neural Scene Representation & Rendering Implicit functions are traditionally adopted in modeling 3D scenes [24, 11, 4]. Recent studies have been focusing on model implicit functions with multi-layer perceptron (MLP) due to its expressive representation power and low memory foot-print, including scene (geometry & appearance) representation [9, 20, 19, 23, 25, 29, 36, 28, 35] and free-view rendering [33, 16, 30, 26, 17, 21, 15, 39, 34, 2]. In particular, NeRF [21] has opened up a line of research (see [6] for an overview) combining neural implicit functions together with volume rendering to achieve photo-realistic rendering results. However, it is non-trivial to find a proper threshold to extract surfaces from the predicted density, and the recovered geometry is far from satisfactory. Furthermore, sampling of points along a ray for rendering a pixel is done using an opacity function that is approximated from another network without any guarantee for correct approximation. ",
134
+ "bbox": [
135
+ 174,
136
+ 483,
137
+ 825,
138
+ 622
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Multi-view 3D Reconstruction Image-based 3D surface reconstruction (multi-view stereo) has been a longstanding problem in the past decades. Classical multi-view stereo approaches are generally either depth-based [1, 31, 8, 7] or voxel-based [5, 3, 32]. For instance, in COLMAP [31] (a typical depth-based method) image features are extracted and matched across different views to estimate depth. Then the predicted depth maps are fused to obtain dense point clouds. To obtain the surface, an additional meshing step e.g. Poisson surface reconstruction [13] is applied. However, these methods with complex pipelines may accumulate errors at each stage and usually result in incomplete 3D models, especially for non-Lambertian surfaces as they can not handle view dependent colors. On the contrary, although it produces complete models by directly modeling objects in a volume, voxel-based approaches are limited to low resolution due to high memory consumption. Recently, neural-based approaches such as DVR [22], IDR [38], NLR [14] have also been proposed to reconstruct scene geometry from multi-view images. However, these methods require accurate object masks and appropriate weight initialization due to the difficulty of propagating gradients. ",
145
+ "bbox": [
146
+ 174,
147
+ 628,
148
+ 825,
149
+ 808
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Independently from and concurrently with our work here, [27] also use implicit surface representation incorporated into volume rendering. In particular, they replace the local transparency function with an occupancy network [19]. This allows adding surface smoothing term to the loss, improving the quality of the resulting surfaces. Differently from their approach, we use signed distance representation, regularized with an Eikonal loss [38, 10] without any explicit smoothing term. Furthermore, we show that the choice of using signed distance allows bounding the opacity approximation error, facilitating the approximation of the volume rendering integral for the suggested family of densities. ",
156
+ "bbox": [
157
+ 174,
158
+ 814,
159
+ 825,
160
+ 911
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "3 Method ",
167
+ "text_level": 1,
168
+ "bbox": [
169
+ 173,
170
+ 89,
171
+ 271,
172
+ 106
173
+ ],
174
+ "page_idx": 2
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "In this section we introduce a novel parameterization for volume density, defined as transformed signed distance function. Then we show how this definition facilitates the volume rendering process. In particular, we derive a bound of the error in the opacity approximation and consequently devise a sampling procedure for approximating the volume rendering integral. ",
179
+ "bbox": [
180
+ 174,
181
+ 113,
182
+ 825,
183
+ 170
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "3.1 Density as transformed SDF ",
190
+ "text_level": 1,
191
+ "bbox": [
192
+ 174,
193
+ 184,
194
+ 408,
195
+ 199
196
+ ],
197
+ "page_idx": 2
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "Let the set $\\Omega \\subset \\mathbb { R } ^ { 3 }$ represent the space occupied by some object in $\\mathbb { R } ^ { 3 }$ , and $\\mathcal { M } = \\partial \\Omega$ its boundary surface. We denote by $\\mathbf { 1 } _ { \\Omega }$ the $\\Omega$ indicator function, and by $d _ { \\Omega }$ the Signed Distance Function (SDF) to its boundary $\\mathcal { M }$ , ",
202
+ "bbox": [
203
+ 173,
204
+ 208,
205
+ 825,
206
+ 252
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "equation",
212
+ "img_path": "images/8089adcbeec8a97c2aea1fc12ccfc14b6437b6dde793b97cbf9967b34a0d0591.jpg",
213
+ "text": "$$\n\\mathbf { 1 } _ { \\Omega } ( { \\pmb x } ) = \\{ \\begin{array} { l l } { 1 } & { \\mathrm { i f } { \\pmb x } \\in \\Omega } \\\\ { 0 } & { \\mathrm { i f } { \\pmb x } \\notin \\Omega } \\end{array} , \\quad \\mathrm { a n d } \\ d _ { \\Omega } ( { \\pmb x } ) = ( - 1 ) ^ { \\mathbf { 1 } _ { \\Omega } ( { \\pmb x } ) } \\operatorname* { m i n } _ { y \\in \\mathcal { M } } \\| { \\pmb x } - { \\pmb y } \\| ,\n$$",
214
+ "text_format": "latex",
215
+ "bbox": [
216
+ 269,
217
+ 253,
218
+ 727,
219
+ 287
220
+ ],
221
+ "page_idx": 2
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "where $\\lVert \\cdot \\rVert$ is the standard Euclidean 2-norm. In neural volume rendering the volume density $\\sigma :$ $\\mathbb { R } ^ { 3 } \\to \\ddot { \\mathbb { R } } _ { + }$ is a scalar volumetric function, where $\\sigma ( { \\pmb x } )$ is the rate that light is occluded at point $_ { \\textbf { \\em x } }$ ; $\\sigma$ is called density since it is proportional to the particle count per unit volume at $_ { \\textbf { \\em x } }$ [18]. In previous neural volumetric rendering approaches [21, 15, 39], the density function, $\\sigma$ , was modeled with a general-purpose Multi-Layer Perceptron (MLP). In this work we suggest to model the density using a certain transformation of a learnable Signed Distance Function (SDF) $d _ { \\Omega }$ , namely ",
226
+ "bbox": [
227
+ 173,
228
+ 290,
229
+ 825,
230
+ 375
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "equation",
236
+ "img_path": "images/b1d0b270360d242266f288d549997e29b1b6f01119634970857a74af050e7feb.jpg",
237
+ "text": "$$\n\\begin{array} { r } { \\sigma ( \\pmb { x } ) = \\alpha \\Psi _ { \\beta } \\left( - d _ { \\Omega } ( \\pmb { x } ) \\right) , } \\end{array}\n$$",
238
+ "text_format": "latex",
239
+ "bbox": [
240
+ 415,
241
+ 375,
242
+ 581,
243
+ 392
244
+ ],
245
+ "page_idx": 2
246
+ },
247
+ {
248
+ "type": "text",
249
+ "text": "where $\\alpha , \\beta > 0$ are learnable parameters, and $\\Psi _ { \\beta }$ is the Cumulative Distribution Function (CDF) of the Laplace distribution with zero mean and $\\beta$ scale (i.e., mean absolute deviation, which is intuitively the $L _ { 1 }$ version of the standard deviation), ",
250
+ "bbox": [
251
+ 176,
252
+ 393,
253
+ 826,
254
+ 435
255
+ ],
256
+ "page_idx": 2
257
+ },
258
+ {
259
+ "type": "equation",
260
+ "img_path": "images/1f6ccc071b24d907e713e1ba05193eeedb4f42a78e36190ef3238a15129a5998.jpg",
261
+ "text": "$$\n\\Psi _ { \\beta } ( s ) = { \\left\\{ \\begin{array} { l l } { { \\frac { 1 } { 2 } } \\exp \\left( { \\frac { s } { \\beta } } \\right) } & { { \\mathrm { i f ~ } } s \\leq 0 } \\\\ { 1 - { \\frac { 1 } { 2 } } \\exp \\left( - { \\frac { s } { \\beta } } \\right) } & { { \\mathrm { i f ~ } } s > 0 } \\end{array} \\right. }\n$$",
262
+ "text_format": "latex",
263
+ "bbox": [
264
+ 367,
265
+ 435,
266
+ 632,
267
+ 486
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "Figure 1 (center left and right) depicts an example of such a density and SDF. As can be readily checked from this definition, as $\\beta$ approach zero, the density $\\sigma$ converges to a scaled indicator function of $\\Omega$ , that is $\\sigma \\to \\alpha \\mathbf { 1 } _ { \\Omega }$ for all points $\\pmb { x } \\in \\Omega \\setminus \\mathcal { M }$ . ",
274
+ "bbox": [
275
+ 173,
276
+ 486,
277
+ 825,
278
+ 529
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "Intuitively, the density $\\sigma$ models a homogeneous object with a constant density $\\alpha$ that smoothly decreases near the object’s boundary, where the smoothing amount is controlled by $\\beta$ . The benefit in defining the density as in equation 2 is two-fold: First, it provides a useful inductive bias for the surface geometry $\\mathcal { M }$ , and provides a principled way to reconstruct the surface, i.e., as the zero level-set of $d _ { \\Omega }$ . This is in contrast to previous work where the reconstruction was chosen as an arbitrary level set of the learned density. Second, the particular form of the density as defined in equation 2 facilitates a bound on the error of the opacity (or, equivalently the transparency) of the rendered volume, a crucial component in the volumetric rendering pipeline. In contrast, such a bound will be hard to devise for a generic MLP densities. ",
285
+ "bbox": [
286
+ 173,
287
+ 534,
288
+ 825,
289
+ 659
290
+ ],
291
+ "page_idx": 2
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "3.2 Volume rendering of $\\sigma$ ",
296
+ "text_level": 1,
297
+ "bbox": [
298
+ 174,
299
+ 674,
300
+ 369,
301
+ 688
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "In this section we review the volume rendering integral and the numerical integration commonly used to approximate it, requiring a set $s$ of sample points per ray. In the following section (Section 3.3), we explore the properties of the density $\\sigma$ and derive a bound on the opacity approximation error along viewing rays. Finally, in Section 3.4 we derive an algorithm for producing a sample $s$ to be used in the volume rendering numerical integration. ",
308
+ "bbox": [
309
+ 173,
310
+ 699,
311
+ 825,
312
+ 768
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "In volume rendering we consider a ray $_ { \\textbf { \\em x } }$ emanating from a camera position $c \\in \\mathbb { R } ^ { 3 }$ in direction $\\boldsymbol { v } \\in \\mathbb { R } ^ { 3 }$ , $\\lVert \\boldsymbol { v } \\rVert = 1$ , defined by $\\pmb { x } ( t ) = \\pmb { c } + t \\pmb { v } , t \\geq 0$ . In essence, volume rendering is all about approximating the integrated (i.e., summed) light radiance along this ray reaching the camera. There are two important quantities that participate in this computation: the volume’s opacity $O$ , or equivalently, its transperancy $T$ , and the radiance field $L$ . ",
319
+ "bbox": [
320
+ 173,
321
+ 773,
322
+ 825,
323
+ 844
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "The transparency function of the volume along a ray $_ { \\textbf { \\em x } }$ , denoted $T$ , indicates, for each $t \\geq 0$ , the probability a light particle succeeds traversing the segment $[ { \\pmb c } , { \\pmb x } ( t ) ]$ without bouncing off, ",
330
+ "bbox": [
331
+ 174,
332
+ 849,
333
+ 823,
334
+ 878
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "equation",
340
+ "img_path": "images/279b0e44a974d4e295e42fb0b95366b60e3bfbbbd327300232f2f3f09c8083ba.jpg",
341
+ "text": "$$\nT ( t ) = \\exp \\left( - \\int _ { 0 } ^ { t } \\sigma ( \\pmb { x } ( s ) ) d s \\right) ,\n$$",
342
+ "text_format": "latex",
343
+ "bbox": [
344
+ 385,
345
+ 881,
346
+ 611,
347
+ 916
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "and the opacity $O$ is the complement probability, ",
354
+ "bbox": [
355
+ 176,
356
+ 92,
357
+ 493,
358
+ 106
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "equation",
364
+ "img_path": "images/2c14c7c2792903923e1ec3a2f338d77d9496ff0eb274552e6c064733c63ea3c1.jpg",
365
+ "text": "$$\nO ( t ) = 1 - T ( t ) .\n$$",
366
+ "text_format": "latex",
367
+ "bbox": [
368
+ 302,
369
+ 109,
370
+ 421,
371
+ 127
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "Note that $O$ is a monotonic increasing function where $O ( 0 ) = 0$ , and assuming that every ray is eventually occluded $O ( \\infty ) = 1$ . In that sense we can think of $O$ as a CDF, and ",
378
+ "bbox": [
379
+ 173,
380
+ 131,
381
+ 549,
382
+ 186
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "equation",
388
+ "img_path": "images/b324117d32b3cf34778ca516800c9b709b093fcc84ccfa60d9a1a9c2a589e934.jpg",
389
+ "text": "$$\n{ \\boldsymbol { \\tau } } ( t ) = { \\frac { d O } { d t } } ( t ) = \\sigma ( \\mathbf { x } ( t ) ) T ( t )\n$$",
390
+ "text_format": "latex",
391
+ "bbox": [
392
+ 259,
393
+ 190,
394
+ 462,
395
+ 222
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "is its Probability Density Function (PDF). The volume rendering equation is the expected light along the ray, ",
402
+ "bbox": [
403
+ 173,
404
+ 224,
405
+ 547,
406
+ 252
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "equation",
412
+ "img_path": "images/36f8d85bff42b64a4a7b594d6d1efe8e9fed3ab3e3d8fd595da9eaabaf900c6a.jpg",
413
+ "text": "$$\nI ( c , \\pmb { v } ) = \\int _ { 0 } ^ { \\infty } L ( \\pmb { x } ( t ) , \\pmb { n } ( t ) , \\pmb { v } ) \\tau ( t ) d t ,\n$$",
414
+ "text_format": "latex",
415
+ "bbox": [
416
+ 232,
417
+ 256,
418
+ 490,
419
+ 290
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "image",
425
+ "img_path": "images/d111657a37e6779d4593df14a61b9e3cb7f4f5c1310853579dfa3edaa9d1d7a1.jpg",
426
+ "image_caption": [
427
+ "Figure 2: Qualitative comparison to NeRF. VolSDF shows less artifacts. "
428
+ ],
429
+ "image_footnote": [],
430
+ "bbox": [
431
+ 563,
432
+ 93,
433
+ 821,
434
+ 345
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "where $L ( x , n , v )$ is the radiance field, namely the amount of light emanating from point $_ { \\textbf { \\em x } }$ in direction $\\textbf { { v } }$ ; in our formulation we also allow $L$ to depend on the level-set’s normal, i.e., ${ \\pmb n } ( t ) = \\nabla _ { { \\pmb x } } d _ { \\Omega } ( { \\pmb x } ( t ) )$ . Adding this dependency is motivated by the fact that BRDFs of common materials are often encoded with respect to the surface normal, facilitating disentanglement as done in surface rendering [38]. We will get back to disentanglement in the experiments section. The integral in equation 7 is approximated using a numerical quadrature, namely the rectangle rule, at some discrete samples $\\boldsymbol { S } = \\bar { \\{ \\boldsymbol { s } _ { i } \\} } _ { i = 1 } ^ { m }$ , $0 = s _ { 1 } < s _ { 2 } < . . . < s _ { m } = M$ , where $M$ is some large constant: ",
441
+ "bbox": [
442
+ 173,
443
+ 294,
444
+ 550,
445
+ 392
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "",
452
+ "bbox": [
453
+ 174,
454
+ 392,
455
+ 825,
456
+ 434
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "equation",
462
+ "img_path": "images/86bef798aeb72f55ac0f19ac8d62f19179ddb96d17c985fc474491d20f5a2fc8.jpg",
463
+ "text": "$$\nI ( \\pmb { c } , \\pmb { v } ) \\approx \\hat { I } _ { S } ( \\pmb { c } , \\pmb { v } ) = \\sum _ { i = 1 } ^ { m - 1 } \\hat { \\tau } _ { i } L _ { i } ,\n$$",
464
+ "text_format": "latex",
465
+ "bbox": [
466
+ 392,
467
+ 438,
468
+ 604,
469
+ 481
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "where we use the subscript $s$ in $\\hat { I } _ { \\mathcal { S } }$ to highlight the dependence of the approximation on the sample set $s$ ${ \\sf S } , \\hat { \\tau } _ { i } \\approx \\tau ( s _ { i } ) \\bar { \\Delta } s$ is the approximated PDF multiplied by the interval length, and ${ \\cal L } _ { i } \\stackrel { - } { = } { \\cal L } ( { \\pmb x } ( s _ { i } ) , { \\pmb n } ( s _ { i } ) , { \\pmb v } )$ is the sampled radiance field. We provide full derivation and detail of $\\hat { \\tau } _ { i }$ in the supplementary. ",
476
+ "bbox": [
477
+ 174,
478
+ 486,
479
+ 825,
480
+ 544
481
+ ],
482
+ "page_idx": 3
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "Sampling. Since the PDF $\\tau$ is typically extremely concentrated near the object’s boundary (see e.g., Figure 3, right) the choice of the sample points $s$ has a crucial effect on the approximation quality of equation 8. One solution is to use an adaptive sample, e.g., $s$ computed with the inverse CDF, i.e., $\\hat { O } ^ { - 1 }$ . However, $O$ depends on the density model $\\sigma$ and is not given explicitly. In [21] a second, coarse network was trained specifically for the approximation of the opacity $O$ , and was used for inverse sampling. However, the second network’s density does not necessarily faithfully represents the first network’s density, for which we wish to compute the volume integral. Furthermore, as we show later, one level of sampling could be insufficient to produce an accurate sample $s$ . Using a naive or crude approximation of $O$ would lead to a sub-optimal sample set $s$ that misses, or over extends non-negligible $\\tau$ values. Consequently, incorrect radiance approximations can occur (i.e., pixel color), potentially harming the learned density-radiance field decomposition. Our solution works with a single density $\\sigma$ , and the sampling $s$ is computed by a sampling algorithm based on an error bound for the opacity approximation. Figure 2 compares the NeRF and VolSDF renderings for the same scene. Note the salt and pepper artifacts in the NeRF rendering caused by the random samples; using fixed (uniformly spaced) sampling in NeRF leads to a different type of artifacts shown in the supplementary. ",
487
+ "bbox": [
488
+ 173,
489
+ 549,
490
+ 826,
491
+ 772
492
+ ],
493
+ "page_idx": 3
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "3.3 Bound on the opacity approximation error ",
498
+ "text_level": 1,
499
+ "bbox": [
500
+ 173,
501
+ 786,
502
+ 509,
503
+ 803
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "In this section we develop a bound on the opacity approximation error using the rectangle rule. For a set of samples $\\boldsymbol { \\mathcal { T } } = \\left\\{ \\boldsymbol { t } _ { i } \\right\\} _ { i = 1 } ^ { \\bar { n } }$ $= \\left\\{ t _ { i } \\right\\} _ { i = 1 } ^ { n } , 0 = t _ { 1 } < t _ { 2 } < \\cdots < t _ { n } = M$ , we let $\\delta _ { i } = t _ { i + 1 } - t _ { i }$ , and $\\bar { \\sigma } _ { i } = \\sigma ( \\pmb { x } ( t _ { i } ) )$ . Given some $t \\in ( 0 , M ]$ , assume $t \\in [ t _ { k } , t _ { k + 1 } ]$ , and apply the rectangle rule (i.e., left Riemann sum) to get the approximation: ",
510
+ "bbox": [
511
+ 174,
512
+ 811,
513
+ 826,
514
+ 868
515
+ ],
516
+ "page_idx": 3
517
+ },
518
+ {
519
+ "type": "equation",
520
+ "img_path": "images/ea1852cfa2ac7d9956d146015a310b5bf5c5210361ab4e7b211d69f0a5eb98a4.jpg",
521
+ "text": "$$\n\\int _ { 0 } ^ { t } \\sigma ( { x ( s ) } ) d s = \\widehat { R } ( t ) + E ( t ) , \\quad \\mathrm { w h e r e ~ } \\widehat { R } ( t ) = \\sum _ { i = 1 } ^ { k - 1 } \\delta _ { i } \\sigma _ { i } + ( t - t _ { k } ) \\sigma _ { k }\n$$",
522
+ "text_format": "latex",
523
+ "bbox": [
524
+ 261,
525
+ 872,
526
+ 735,
527
+ 916
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "is the rectangle rule approximation, and $E ( t )$ denotes the error in this approximation. The corresponding approximation of the opacity function (equation 5) is ",
534
+ "bbox": [
535
+ 171,
536
+ 90,
537
+ 825,
538
+ 119
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "equation",
544
+ "img_path": "images/5c645542e4fc5e921fc2d7828c990b46ac40e9ae315691f5ff81ab8ff75a4cbf.jpg",
545
+ "text": "$$\n\\widehat { O } ( t ) = 1 - \\exp \\Big ( { - } \\widehat { R } ( t ) \\Big ) .\n$$",
546
+ "text_format": "latex",
547
+ "bbox": [
548
+ 406,
549
+ 122,
550
+ 591,
551
+ 150
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "Our goal in this section is to derive a uniform bound over $[ 0 , M ]$ to the approximation $\\widehat { O } \\approx O$ . The key is the following bound on the derivative1 of the density $\\sigma$ inside an interval along the ray ${ \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf { } } { \\mathbf } { \\mathbf { } } { \\mathbf { } } { \\mathbf } { } \\mathbf { } { \\mathbf { } \\mathbf { } } { \\mathbf { } \\mathbf { } } { \\mathbf { } \\mathbf { } } { \\mathbf } { \\mathbf { } } { \\mathbf } { \\mathbf } { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } { \\mathbf } { \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } } { \\mathbf } { \\mathbf } { \\mathbf } { \\mathbf } { \\mathbf } { \\mathbf } { \\mathbf } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf \\mathbf { } \\mathbf { } \\mathbf \\mathbf { } \\mathbf { } \\mathbf \\mathbf { } \\mathbf \\mathbf { } \\mathbf { \\mathbf \\mathbf { } \\mathbf \\mathbf { } \\mathbf \\mathbf { } \\mathbf \\mathbf { } \\mathbf \\mathbf { } \\mathbf \\mathbf } { \\mathbf \\mathbf } \\mathbf { \\mathbf } \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf { \\mathbf } \\mathbf { \\mathbf \\mathbf } \\mathbf \\mathbf { \\mathbf } \\mathbf \\mathbf { \\mathbf \\mathbf } \\mathbf \\mathbf { \\mathbf \\mathbf } \\mathbf \\mathbf { \\mathbf \\mathbf } $ : ",
558
+ "bbox": [
559
+ 173,
560
+ 155,
561
+ 825,
562
+ 185
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "Theorem 1. The derivative of the density $\\sigma$ within a segment $[ t _ { i } , t _ { i + 1 } ]$ satisfies ",
569
+ "bbox": [
570
+ 179,
571
+ 186,
572
+ 696,
573
+ 202
574
+ ],
575
+ "page_idx": 4
576
+ },
577
+ {
578
+ "type": "equation",
579
+ "img_path": "images/e0263f4f07cf6c404b4417b2f940744ec96f161c0441e7a5a427a2edccf1e66f.jpg",
580
+ "text": "$$\n\\left| \\frac { d } { d s } \\sigma ( \\pmb { x } ( s ) ) \\right| \\leq \\frac { \\alpha } { 2 \\beta } \\exp \\left( - \\frac { d _ { i } ^ { \\star } } { \\beta } \\right) , w h e r e d _ { i } ^ { \\star } = \\operatorname* { m i n } _ { s \\in [ t _ { i } , t _ { i + 1 } ] \\atop y \\notin B _ { i } \\cup B _ { i + 1 } } \\| \\pmb { x } ( s ) - \\pmb { y } \\| ,\n$$",
581
+ "text_format": "latex",
582
+ "bbox": [
583
+ 261,
584
+ 205,
585
+ 735,
586
+ 250
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "The proof of this theorem, which is provided in the supplementary, makes a principled use of the signed distance function’s unique properties; the explicit formula for $d _ { i } ^ { * }$ is a bit cumbersome and therefore is deferred to the supplementary as-well. The inset depicts the boundary of the open balls union $B _ { i } \\cup B _ { i + 1 }$ , the interval $[ \\mathbf { \\bar { x } } ( t _ { i } ) , \\mathbf { \\bar { x } } ( t _ { i + 1 } ) ]$ and the bound is defined in terms of the minimal distance between these two sets, i.e., $d _ { i } ^ { * }$ . ",
593
+ "bbox": [
594
+ 173,
595
+ 277,
596
+ 616,
597
+ 376
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "image",
603
+ "img_path": "images/970c8a3fe5c63e87775685f30ddcd0292997b9f46e7a4725c1ca3b34558c05ef.jpg",
604
+ "image_caption": [],
605
+ "image_footnote": [],
606
+ "bbox": [
607
+ 627,
608
+ 258,
609
+ 825,
610
+ 378
611
+ ],
612
+ "page_idx": 4
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "The benefit in Theorem 1 is that it allows to bound the density’s derivative in each interval $[ t _ { i } , t _ { i - 1 } ]$ based only on the unsigned distance at the interval’s end points, $| d _ { i } | , | d _ { i + 1 } |$ , and the density parameters $\\alpha , \\beta$ . This bound can be used to derive an error bound for the rectangle rule’s approximation of the opacity, ",
617
+ "bbox": [
618
+ 173,
619
+ 381,
620
+ 825,
621
+ 438
622
+ ],
623
+ "page_idx": 4
624
+ },
625
+ {
626
+ "type": "equation",
627
+ "img_path": "images/ca6ad901019907384ec4dec63285df07987211a5562f616d23a954b9ed54510e.jpg",
628
+ "text": "$$\n| E ( t ) | \\leq \\widehat { E } ( t ) = \\frac { \\alpha } { 4 \\beta } \\left( \\sum _ { i = 1 } ^ { k - 1 } \\delta _ { i } ^ { 2 } e ^ { - \\frac { d _ { i } ^ { \\star } } { \\beta } } + ( t - t _ { k } ) ^ { 2 } e ^ { - \\frac { d _ { k } ^ { \\star } } { \\beta } } \\right) .\n$$",
629
+ "text_format": "latex",
630
+ "bbox": [
631
+ 313,
632
+ 435,
633
+ 683,
634
+ 479
635
+ ],
636
+ "page_idx": 4
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "Details are in the supplementary. Equation 12 leads to the following opacity error bound, also proved in the supplementary: ",
641
+ "bbox": [
642
+ 176,
643
+ 479,
644
+ 821,
645
+ 508
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "Theorem 2. For $t \\in [ 0 , M ]$ , the error of the approximated opacity $\\hat { O }$ can be bounded as follows: ",
652
+ "bbox": [
653
+ 176,
654
+ 511,
655
+ 808,
656
+ 527
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "equation",
662
+ "img_path": "images/43f3c9501848e9e9fbb94dd5af67d47b7b744d099f5c17dce46a0cd6e6cf122a.jpg",
663
+ "text": "$$\n\\begin{array} { r } { \\left| O ( t ) - \\widehat { O } ( t ) \\right| \\le \\exp \\left( - \\widehat { R } ( t ) \\right) \\left( \\exp \\left( \\widehat { E } ( t ) \\right) - 1 \\right) } \\end{array}\n$$",
664
+ "text_format": "latex",
665
+ "bbox": [
666
+ 328,
667
+ 531,
668
+ 668,
669
+ 559
670
+ ],
671
+ "page_idx": 4
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "Finally, we can bound the opacity error for $t \\in [ t _ { k } , t _ { k + 1 } ]$ by noting that $\\widehat { E } ( t )$ , and consequently also $\\exp ( \\widehat { E } ( t ) )$ are monotonically increasing in $t$ , while $\\exp ( - \\widehat { R } ( t ) )$ is monotonically decreasing in $t$ , and therefore ",
676
+ "bbox": [
677
+ 173,
678
+ 570,
679
+ 826,
680
+ 616
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "equation",
686
+ "img_path": "images/cf13feeb29a99873983293d7bce4465eb9d9537c9a674096063efb4bfe1c1935.jpg",
687
+ "text": "$$\n\\operatorname* { m a x } _ { t \\in \\left[ t _ { k } , t _ { k + 1 } \\right] } \\left| O ( t ) - \\widehat { O } ( t ) \\right| \\leq \\exp \\left( - \\widehat { R } ( t _ { k } ) \\right) \\left( \\exp ( \\widehat { E } ( t _ { k + 1 } ) ) - 1 \\right) .\n$$",
688
+ "text_format": "latex",
689
+ "bbox": [
690
+ 279,
691
+ 616,
692
+ 717,
693
+ 647
694
+ ],
695
+ "page_idx": 4
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "Taking the maximum over all intervals furnishes a bound $B _ { T , \\beta }$ as a function of $\\tau$ and $\\beta$ , ",
700
+ "bbox": [
701
+ 174,
702
+ 650,
703
+ 754,
704
+ 666
705
+ ],
706
+ "page_idx": 4
707
+ },
708
+ {
709
+ "type": "equation",
710
+ "img_path": "images/495fef6bb8065cd28ae7a9486efdb06fb23085f65fbdb2d5afdd9d49c020bf12.jpg",
711
+ "text": "$$\n\\operatorname* { m a x } _ { t \\in \\left[ 0 , M \\right] } \\left| O ( t ) - \\widehat { O } ( t ) \\right| \\leq B _ { \\mathcal { T } , \\beta } = \\operatorname* { m a x } _ { k \\in \\left[ n - 1 \\right] } \\left\\{ \\exp \\left( - \\widehat { R } ( t _ { k } ) \\right) \\left( \\exp ( \\widehat { E } ( t _ { k + 1 } ) ) - 1 \\right) \\right\\} ,\n$$",
712
+ "text_format": "latex",
713
+ "bbox": [
714
+ 210,
715
+ 669,
716
+ 758,
717
+ 699
718
+ ],
719
+ "page_idx": 4
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "where by convention $\\widehat { R } ( t _ { 0 } ) = 0$ , and $[ \\ell ] = \\{ 1 , 2 , \\dots , \\ell \\}$ . See Figure 3, where this bound is visualized in faint-red. ",
724
+ "bbox": [
725
+ 173,
726
+ 705,
727
+ 823,
728
+ 734
729
+ ],
730
+ "page_idx": 4
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "To conclude this section we derive two useful properties, proved in the supplementary. The first, is that sufficiently dense sampling is guaranteed to reduce the error bound $B _ { T , \\epsilon }$ : ",
735
+ "bbox": [
736
+ 173,
737
+ 741,
738
+ 823,
739
+ 770
740
+ ],
741
+ "page_idx": 4
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "Lemma 1. Fix $\\beta > 0$ . For any $\\epsilon > 0$ a sufficient dense sampling $\\tau$ will provide $B _ { T , \\beta } < \\epsilon$ ",
746
+ "bbox": [
747
+ 169,
748
+ 772,
749
+ 769,
750
+ 787
751
+ ],
752
+ "page_idx": 4
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Second, with a fixed number of samples we can set $\\beta$ such that the error bound is below $\\epsilon$ : ",
757
+ "bbox": [
758
+ 171,
759
+ 796,
760
+ 764,
761
+ 811
762
+ ],
763
+ "page_idx": 4
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Lemma 2. Fix $n > 0$ . For any $\\epsilon > 0$ a sufficiently large $\\beta$ that satisfies ",
768
+ "bbox": [
769
+ 171,
770
+ 814,
771
+ 645,
772
+ 829
773
+ ],
774
+ "page_idx": 4
775
+ },
776
+ {
777
+ "type": "equation",
778
+ "img_path": "images/5558063be0178cc73271ec65b326ac4d29cfe5ea40c121144840b5778402e763.jpg",
779
+ "text": "$$\n\\beta \\ge { \\frac { \\alpha M ^ { 2 } } { 4 ( n - 1 ) \\log ( 1 + \\epsilon ) } }\n$$",
780
+ "text_format": "latex",
781
+ "bbox": [
782
+ 413,
783
+ 832,
784
+ 583,
785
+ 867
786
+ ],
787
+ "page_idx": 4
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "will provide $B \\tau , \\beta \\leq \\epsilon .$ ",
792
+ "bbox": [
793
+ 173,
794
+ 869,
795
+ 325,
796
+ 886
797
+ ],
798
+ "page_idx": 4
799
+ },
800
+ {
801
+ "type": "image",
802
+ "img_path": "images/7bf61ad44265d7cc7e56764ac6cc7670a058bfd80a9bfb085e4c1bdf563563a9.jpg",
803
+ "image_caption": [
804
+ "Figure 3: Qualitative evaluation of Algorithm 1 after 1, 2 and 5 iterations. Left-bottom: per-pixel $\\beta _ { + }$ heatmap; Left-top: rendering of areas marked with black squares. Right-top: for a single ray indicated by white pixel we show the approximated (orange), true opacity (blue), the SDF (black), and $\\widehat { O } ^ { - 1 }$ sample example (yellow dots). Right-bottom: for the same ray we now show the true opacity error (red), and error bound (faint red). After 5 iterations most of the rays converged, as can be inspected by the blue colors in the heatmap, providing a guaranteed $\\epsilon$ approximation to the opacity, resulting in a crisp and more accurate rendering (center-left, top). "
805
+ ],
806
+ "image_footnote": [],
807
+ "bbox": [
808
+ 179,
809
+ 88,
810
+ 820,
811
+ 210
812
+ ],
813
+ "page_idx": 5
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "3.4 Sampling algorithm ",
818
+ "text_level": 1,
819
+ "bbox": [
820
+ 174,
821
+ 348,
822
+ 351,
823
+ 363
824
+ ],
825
+ "page_idx": 5
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "In this section we develop an algorithm for computing the sampling $s$ to be used in equation 8. This is done by first utilizing the bound in equation 15 to find samples $\\tau$ so that $\\widehat { O }$ (via equation 10) provides an $\\epsilon$ approximation to the true opacity $O$ , where $\\epsilon$ is a hyper-parameter, that is $B \\tau , \\beta < \\epsilon$ . Second, we perform inverse CDF sampling with $\\hat { O }$ , as described in Section 3.2. ",
830
+ "bbox": [
831
+ 174,
832
+ 378,
833
+ 826,
834
+ 441
835
+ ],
836
+ "page_idx": 5
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "Note that from Lemma 1 it follows that we can simply choose large enough $n$ to ensure $B \\tau , \\beta < \\epsilon$ . However, this would lead to prohibitively large number of samples. Instead, we suggest a simple algorithm to reduce the number of required samples in practice and allows working with a limited budget of sample points. In a nutshell, we start with a uniform sampling $\\mathcal { T } = \\mathcal { T } _ { 0 }$ , and use Lemma 2 to initially set a $\\beta _ { + } > \\beta$ that satisfies $B _ { T , \\beta _ { + } } \\leq \\epsilon$ . Then, we repeatedly upsample $\\tau$ to reduce $\\beta _ { + }$ while maintaining $B \\tau , \\beta _ { + } \\le \\epsilon$ . Even though this simple strategy is not guaranteed to converge, we find that $\\beta _ { + }$ usually converges to $\\beta$ (typically $8 5 \\%$ , see also Figure 3), and even in cases it does not, the algorithm provides $\\beta _ { + }$ for which the opacity approximation still maintains an $\\epsilon$ error. The algorithm is presented below (Algorithm 1). ",
841
+ "bbox": [
842
+ 173,
843
+ 446,
844
+ 826,
845
+ 573
846
+ ],
847
+ "page_idx": 5
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "We initialize $\\tau$ (Line 1 in Algorithm 1) with uniform sampling $\\mathcal { T } _ { 0 } = \\left\\{ t _ { i } \\right\\} _ { i = 1 } ^ { n }$ , where $\\begin{array} { r } { t _ { k } = ( k - 1 ) \\frac { M } { n - 1 } } \\end{array}$ $k \\in [ n ]$ (we use $n = 1 2 8$ in our implementation). Given this sampling we next pick $\\beta _ { + } > \\beta$ according to Lemma 2 so that the error bound satisfies the required $\\epsilon$ bound (Line 2 in Algorithm 1). ",
852
+ "bbox": [
853
+ 173,
854
+ 578,
855
+ 825,
856
+ 622
857
+ ],
858
+ "page_idx": 5
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "In order to reduce $\\beta _ { + }$ while keep $B _ { T , \\beta _ { + } } \\leq \\epsilon .$ , $n$ samples are added to $\\tau$ (Line 4 in Algorithm 1), where the number of points sampled from each interval is proportional to its current error bound, equation 14. Assuming $\\tau$ was sufficiently upsampled and satisfy $B _ { T , \\beta _ { + } } < \\epsilon$ , we decrease $\\beta _ { + }$ towards $\\beta$ . Since the algorithm did not stop we have that $B \\tau , \\beta > \\epsilon$ . Therefore the Mean Value Theorem implies the existence of $\\beta _ { \\star } \\in ( \\beta , \\beta _ { + } )$ such that $B _ { T , \\beta _ { \\star } } = \\epsilon$ . We use the bisection method (with maximum of 10 iterations) to efficiently search for $\\beta _ { \\star }$ and update $\\beta _ { + }$ accordingly (Lines 6 and 7 in Algorithm 1). The algorithm runs iteratively until $B \\tau , \\beta \\leq \\epsilon$ or a maximal number of 5 iterations is reached. Either way, we use the final $\\tau$ and $\\beta _ { + }$ (guaranteed to provide $B _ { T , \\beta _ { + } } \\leq \\epsilon )$ to estimate the current opacity $\\widehat { O }$ , Line 10 in Algorithm 1). Finally we return a fresh set of $m = 6 4$ samples $\\hat { O }$ using inverse transform sampling (Line 11 in Algorithm 1). Figure 3 shows qualitative illustration of Algorithm 1, for $\\beta = 0 . 0 0 1$ and $\\epsilon = 0 . 1$ (typical values). ",
863
+ "bbox": [
864
+ 174,
865
+ 628,
866
+ 524,
867
+ 911
868
+ ],
869
+ "page_idx": 5
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "Algorithm 1: Sampling algorithm. ",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 555,
877
+ 633,
878
+ 782,
879
+ 648
880
+ ],
881
+ "page_idx": 5
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "Input: error threshold $\\epsilon > 0$ ; $\\beta$ ",
886
+ "bbox": [
887
+ 555,
888
+ 651,
889
+ 764,
890
+ 665
891
+ ],
892
+ "page_idx": 5
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "1 Initialize $\\mathcal { T } = \\mathcal { T } _ { 0 }$ \n2 Initialize $\\beta _ { + }$ such that $B \\tau , \\beta _ { + } \\leq \\epsilon$ \n3 while $B \\tau , \\beta > \\epsilon$ and not max_iter do \n4 upsample $\\tau$ \n5 if $B \\tau _ { \\cdot , \\beta _ { + } } < \\epsilon$ then \n6 Find $\\beta _ { \\star } \\in \\left( \\beta , \\beta _ { + } \\right)$ so that \n$B _ { T , \\beta _ { \\star } } = \\epsilon$ \n7 Update $\\beta _ { + } \\beta _ { \\star }$ \n8 end \n9 end \n10 Estimate $\\widehat { O }$ using $\\tau$ and $\\beta _ { + }$ \n11 $S \\gets \\mathrm { g e t }$ fresh $m$ samples using $\\hat { O } ^ { - 1 }$ \n12 return $s$ ",
897
+ "bbox": [
898
+ 539,
899
+ 667,
900
+ 805,
901
+ 906
902
+ ],
903
+ "page_idx": 5
904
+ },
905
+ {
906
+ "type": "image",
907
+ "img_path": "images/f94b0eb5c22d9610e96a5703e40a66cf26e23f71159661fc6ba5c9894fda5f75.jpg",
908
+ "image_caption": [
909
+ "Figure 4: Qualitative results for reconstructed geometries of objects from the DTU dataset. "
910
+ ],
911
+ "image_footnote": [],
912
+ "bbox": [
913
+ 160,
914
+ 85,
915
+ 808,
916
+ 366
917
+ ],
918
+ "page_idx": 6
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "3.5 Training ",
923
+ "text_level": 1,
924
+ "bbox": [
925
+ 173,
926
+ 414,
927
+ 274,
928
+ 429
929
+ ],
930
+ "page_idx": 6
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Our system consists of two Multi-Layer Perceptrons (MLP): (i) $f _ { \\varphi }$ approximating the SDF of the learned geometry, as well as global geometry feature $_ z$ of dimension 256, i.e., ${ \\pmb f } _ { \\varphi } ( { \\pmb x } ) =$ $( d ( \\pmb { x } ) , z ( \\pmb { x } ) ) \\in \\mathbb { R } ^ { 1 + 2 5 6 }$ , where $\\varphi$ denotes its learnable parameters; (ii) $L _ { \\psi } ( \\pmb { x } , \\pmb { n } , \\pmb { v } , z ) \\in \\mathbb { R } ^ { 3 }$ representing the scene’s radiance field with learnable parameters $\\psi$ . In addition we have two scalar learnable parameters $\\alpha , \\beta \\in \\mathbb { R }$ . In fact, in our implementation we make the choice $\\alpha = \\beta ^ { - 1 }$ . We denote by $\\theta \\in \\mathbb { R } ^ { p }$ the collection of all learnable parameters of the model, $\\theta = ( \\varphi , \\psi , \\beta )$ . To facilitate the learning of high frequency details of the geometry and radiance field, we exploit positional encoding [21] for the position $_ { \\textbf { \\em x } }$ and view direction $\\pmb { v }$ in the geometry and radiance field. The influence of different positional encoding choices are presented in the supplementary. ",
935
+ "bbox": [
936
+ 173,
937
+ 438,
938
+ 825,
939
+ 565
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Our data consists of a collection of images with camera parameters. From this data we extract pixel level data: for each pixel $p$ we have a triplet $( I _ { p } , c _ { p } , v _ { p } )$ , where $I _ { p } \\in \\mathbb { R } ^ { 3 }$ is its intensity (RGB color), $c _ { p } \\in \\mathbb { R } ^ { 3 }$ is its camera location, and $\\boldsymbol { v } _ { p } \\in \\mathbb { R } ^ { 3 }$ is the viewing direction (camera to pixel). Our training loss consists of two terms: ",
946
+ "bbox": [
947
+ 174,
948
+ 571,
949
+ 825,
950
+ 628
951
+ ],
952
+ "page_idx": 6
953
+ },
954
+ {
955
+ "type": "equation",
956
+ "img_path": "images/ba10dba9474c960dcb1ce48197c4fff409f14f518fbe424708e2d3ee77df2ee2.jpg",
957
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } ( \\theta ) = \\mathcal { L } _ { \\mathrm { R G B } } ( \\theta ) + \\lambda \\mathcal { L } _ { \\mathrm { S D F } } ( \\varphi ) , \\quad \\mathrm { w h e r e } } \\end{array}\n$$",
958
+ "text_format": "latex",
959
+ "bbox": [
960
+ 364,
961
+ 635,
962
+ 629,
963
+ 652
964
+ ],
965
+ "page_idx": 6
966
+ },
967
+ {
968
+ "type": "equation",
969
+ "img_path": "images/1c99b61f1b8f664b0c2dd9aa2696c360b03c725f5b6962b3d5db10e2b9353908.jpg",
970
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { R G B } } ( \\theta ) = \\mathbb { E } _ { p } \\left\\| I _ { p } - \\hat { I } _ { S } ( \\boldsymbol { c } _ { p } , \\boldsymbol { v } _ { p } ) \\right\\| _ { 1 } , \\quad \\mathrm { a n d } \\mathcal { L } _ { \\mathrm { S D F } } ( \\varphi ) = \\mathbb { E } _ { z } \\left( \\left\\| \\nabla d ( z ) \\right\\| - 1 \\right) ^ { 2 } , } \\end{array}\n$$",
971
+ "text_format": "latex",
972
+ "bbox": [
973
+ 246,
974
+ 660,
975
+ 748,
976
+ 688
977
+ ],
978
+ "page_idx": 6
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "where $\\mathcal { L } _ { \\mathrm { { R G B } } }$ is the color loss; $\\left\\| \\cdot \\right\\| _ { 1 }$ denotes the 1-norm, $s$ is computed with Algorithm 1, and $\\hat { I } _ { S }$ is the numerical approximation to the volume rendering integral in equation 8; here we also incorporate the global feature in the radiance field, i.e., $L _ { i } = L _ { \\psi } ( \\pmb { x } ( s _ { i } ) , \\pmb { n } ( s _ { i } ) , \\pmb { v } _ { p } , z ( \\pmb { x } ( s _ { i } ) ) )$ . $\\mathcal { L } _ { \\mathrm { S D F } }$ is the Eikonal loss encouraging $d$ to approximate a signed distance function [10]; the samples $_ z$ are taken to combine a single random uniform space point and a single point from $s$ for each pixel $p$ . We train with batches of size 1024 pixels $p$ . $\\lambda$ is a hyper-parameter set to 0.1 throughout the the experiments. Further implementation details are provided in the supplementary. ",
983
+ "bbox": [
984
+ 173,
985
+ 693,
986
+ 825,
987
+ 791
988
+ ],
989
+ "page_idx": 6
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "4 Experiments ",
994
+ "text_level": 1,
995
+ "bbox": [
996
+ 174,
997
+ 803,
998
+ 313,
999
+ 820
1000
+ ],
1001
+ "page_idx": 6
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "We evaluate our method on the challenging task of multiview 3D surface reconstruction. We use two datasets: DTU [12] and BlendedMVS [37], both containing real objects with different materials that are captured from multiple views. In Section 4.1 we show qualitative and quantitative 3D surface reconstruction results of VolSDF, comparing favorably to relevant baselines. In Section 4.2 we demonstrate that, in contrast to NeRF [21], our model is able to successfully disentangle the geometry and appearance of the captured objects. ",
1006
+ "bbox": [
1007
+ 174,
1008
+ 827,
1009
+ 825,
1010
+ 911
1011
+ ],
1012
+ "page_idx": 6
1013
+ },
1014
+ {
1015
+ "type": "table",
1016
+ "img_path": "images/96b6f6dd7d1c148c25d1d1629d315b7a739313d567f8cf733a75e9b8d88c5ba7.jpg",
1017
+ "table_caption": [],
1018
+ "table_footnote": [],
1019
+ "table_body": "<table><tr><td>Scan</td><td></td><td>24</td><td>37</td><td>40</td><td>55</td><td>63</td><td>65</td><td>69</td><td>83</td><td>97</td><td>105</td><td>106</td><td>110</td><td>114</td><td>118</td><td>122</td><td>Mean</td></tr><tr><td></td><td>IDR</td><td>1.63</td><td>1.87</td><td>0.63</td><td>0.48</td><td>1.04</td><td>0.79</td><td>0.77</td><td>1.33</td><td>1.16</td><td>0.76</td><td>0.67</td><td>0.90</td><td>0.42</td><td>0.51</td><td>0.53</td><td>0.90</td></tr><tr><td>erreistteatettec</td><td>colmap7</td><td>0.45</td><td>0.91</td><td>0.37</td><td>0.37</td><td>0.90</td><td>1.00</td><td>0.54</td><td>1.22</td><td>1.08</td><td>0.64</td><td>0.48</td><td>0.59</td><td>0.32</td><td>0.45</td><td>0.43</td><td>0.65</td></tr><tr><td></td><td>colmapo</td><td>0.81</td><td>2.05</td><td>0.73</td><td>1.22</td><td>1.79</td><td>1.58</td><td>1.02</td><td>3.05</td><td>1.40</td><td>2.05</td><td>1.00</td><td>1.32</td><td>0.49</td><td>0.78</td><td>1.17</td><td>1.36</td></tr><tr><td></td><td>NeRF</td><td>1.92</td><td>1.73</td><td>1.92</td><td>0.80</td><td>3.41</td><td>1.39</td><td>1.51</td><td>5.44</td><td>2.04</td><td>1.10</td><td>1.01</td><td>2.88</td><td>0.91</td><td>1.00</td><td>0.79</td><td>1.89</td></tr><tr><td></td><td>VolSDF</td><td>1.14</td><td>1.26</td><td>0.81</td><td>0.49</td><td>1.25</td><td>0.70</td><td>0.72</td><td>1.29</td><td>1.18</td><td>0.70</td><td>0.66</td><td>1.08</td><td>0.42</td><td>0.61</td><td>0.55</td><td>0.86</td></tr><tr><td>JPSH</td><td>NeRF</td><td>26.24 25.74 26.79 27.57 31.96 31.50 29.58 32.78 28.35 32.08 33.49 31.54 31.0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>35.59 35.51</td><td>30.65</td></tr><tr><td></td><td>VolSDF</td><td></td><td></td><td>26.2825.61 26.55 26.76 31.57</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>31.529.38 33.23 28.03 32.13 33.16 31.49 30.33</td><td></td><td></td><td></td><td>34.934.7530.38</td></tr></table>",
1020
+ "bbox": [
1021
+ 171,
1022
+ 88,
1023
+ 820,
1024
+ 234
1025
+ ],
1026
+ "page_idx": 7
1027
+ },
1028
+ {
1029
+ "type": "image",
1030
+ "img_path": "images/e528190f4300fd324fefcf6500404eaeb02953cb1a480d883c7e39df6201f3ec.jpg",
1031
+ "image_caption": [
1032
+ "Table 1: Quantitative results for the DTU dataset. ",
1033
+ "Figure 5: Qualitative results sampled from the BlendedMVS dataset. For each scan we present a visualization of a rendered image and the reconstructed 3D geometry. "
1034
+ ],
1035
+ "image_footnote": [],
1036
+ "bbox": [
1037
+ 160,
1038
+ 261,
1039
+ 808,
1040
+ 444
1041
+ ],
1042
+ "page_idx": 7
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "4.1 Multi-view 3D reconstruction ",
1047
+ "text_level": 1,
1048
+ "bbox": [
1049
+ 174,
1050
+ 497,
1051
+ 418,
1052
+ 512
1053
+ ],
1054
+ "page_idx": 7
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "DTU The DTU [12] dataset contains multi-view image (49 or 64) of different objects with fixed camera and lighting parameters. We evaluate our method on the 15 scans that were selected by [38]. We compare our surface accuracy using the Chamfer $l _ { 1 }$ loss (measured in mm) to $\\mathrm { C O L M A P _ { 0 } }$ (which is watertight reconstruction; $\\mathrm { C O L M A P _ { 7 } }$ is not watertight and provided only for reference) [31], NeRF [21] and IDR [38], where for fair comparison with IDR we only evaluate the reconstruction inside the visual hull of the objects (defined by the segmentation masks of [38]). We further evaluate the PSNR of our rendering compared to [21]. Quantitative results are presented in Table 1. It can be observed that our method is on par with IDR (that uses object masks for all images) and outperforms NeRF and COLMAP in terms of reconstruction accuracy. Our rendering quality is comparable to NeRF’s. ",
1059
+ "bbox": [
1060
+ 174,
1061
+ 525,
1062
+ 825,
1063
+ 662
1064
+ ],
1065
+ "page_idx": 7
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "BlendedMVS The BlendedMVS dataset [37] contains a large collection of 113 scenes captured from multiple views. It supplies high quality ground truth 3D models for evaluation, various camera configurations, and a variety of indoor/outdoor real environments. We selected 9 different scenes and used our method to reconstruct the surface of each object. In contrast to the DTU dataset, BlendedMVS scenes have complex backgrounds. Therefore we use $_ \\mathrm { N e R F + + }$ [39] as a baseline for this dataset. In Table 2 we present our results compared to $_ \\mathrm { N e R F + + }$ . Qualitative comparisons are presented in Fig. 5; since the units are unknown in this case we present relative improvement of ",
1070
+ "bbox": [
1071
+ 173,
1072
+ 669,
1073
+ 826,
1074
+ 767
1075
+ ],
1076
+ "page_idx": 7
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Chamfer distance (in $\\%$ ) compared to NeRF. Also in this case, we improve NeRF reconstructions considerably, while being on-par in terms of the rendering quality (PSNR). ",
1081
+ "bbox": [
1082
+ 174,
1083
+ 767,
1084
+ 606,
1085
+ 808
1086
+ ],
1087
+ "page_idx": 7
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Comparison to [38] IDR [38] is the state of the art 3D surface \nreconstruction method using implicit representation. However, it \nsuffers from two drawbacks: first, it requires object masks for \ntraining, which is a strong supervision signal. Second, since it sets \nthe pixel color based only on the single point of intersection of the \ncorresponding viewing ray, it is more pruned to local minima that \nsometimes appear in the form of extraneous surface parts. Figure 6 compares the same scene trained ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 814,
1095
+ 607,
1096
+ 911
1097
+ ],
1098
+ "page_idx": 7
1099
+ },
1100
+ {
1101
+ "type": "image",
1102
+ "img_path": "images/7a379328c684569053c7deb4e4d2d6406c854f69f9484dc18659971bc90ca4df.jpg",
1103
+ "image_caption": [
1104
+ "Figure 6: IDR extraneous parts. "
1105
+ ],
1106
+ "image_footnote": [],
1107
+ "bbox": [
1108
+ 624,
1109
+ 779,
1110
+ 820,
1111
+ 877
1112
+ ],
1113
+ "page_idx": 7
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "",
1118
+ "bbox": [
1119
+ 179,
1120
+ 897,
1121
+ 823,
1122
+ 911
1123
+ ],
1124
+ "page_idx": 7
1125
+ },
1126
+ {
1127
+ "type": "table",
1128
+ "img_path": "images/635312ca6da5001040a2fa8ba6d0a94c5c4660ad8b0271e57a638b9ab32b83fb.jpg",
1129
+ "table_caption": [
1130
+ "Table 2: Quantitative results for the BlendedMVS dataset. "
1131
+ ],
1132
+ "table_footnote": [],
1133
+ "table_body": "<table><tr><td></td><td>Scene</td><td>Doll</td><td>Egg</td><td>Head</td><td>Angel</td><td>Bull</td><td>Robot</td><td>Dog</td><td>Bread</td><td>Camera</td><td>Mean</td></tr><tr><td>Chamfer l1</td><td>Our Improvement (%)</td><td>54.0</td><td>91.2</td><td>24.3</td><td>75.1</td><td>60.7</td><td>27.2</td><td>47.7</td><td>34.6</td><td>51.8</td><td>51.8</td></tr><tr><td rowspan=\"2\">PSNR</td><td>NeRF++</td><td>26.95</td><td>27.34</td><td>27.23</td><td>30.06</td><td>26.65</td><td>26.73</td><td>27.90</td><td>31.68</td><td>23.44</td><td>27.55</td></tr><tr><td>VolSDF</td><td>25.49</td><td>27.18</td><td>26.36</td><td>29.79</td><td>26.01</td><td>26.03</td><td>28.65</td><td>31.24</td><td>22.97</td><td>27.08</td></tr></table>",
1134
+ "bbox": [
1135
+ 176,
1136
+ 102,
1137
+ 825,
1138
+ 172
1139
+ ],
1140
+ "page_idx": 8
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "with IDR with the addition of ground truth masks, and VolSDF trained without masks. Note that IDR introduces some extraneous surface parts (e.g., in marked red), while VolSDF provides a more faithful result in this case. ",
1145
+ "bbox": [
1146
+ 174,
1147
+ 210,
1148
+ 825,
1149
+ 253
1150
+ ],
1151
+ "page_idx": 8
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "4.2 Disentanglement of geometry and appearance ",
1156
+ "text_level": 1,
1157
+ "bbox": [
1158
+ 174,
1159
+ 270,
1160
+ 531,
1161
+ 285
1162
+ ],
1163
+ "page_idx": 8
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "We have tested the disentanglement of scenes to geometry (density) and appearance (radiance field) by switching the radiance fields of two trained scenes. For VolSDF we switched $L _ { \\psi }$ . For NeRF [21] we note that the radiance field is computed as $L _ { \\psi } ( z , v )$ , where $L _ { \\psi }$ is a fully connected network with one hidden layer (of width 128 and ReLU activation) and $_ z$ is a feature vector. We tested two versions of NeRF disentanglement: First, by switching the original radiance fields $L _ { \\psi }$ of trained NeRF networks. Second, by switching the radiance fields of trained NeRF models with an identical radiance field model to ours, namely $L _ { \\psi } ( { \\pmb x } , { \\pmb n } , { \\pmb v } , z )$ . As shown in Figure 7 both versions of NeRF fail to produce a correct disentanglement in these scenes, while VolSDF successfully switches the materials of the two objects. We attribute this to the specific inductive bias injected with the use of the density in equation 2. ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 295,
1171
+ 825,
1172
+ 434
1173
+ ],
1174
+ "page_idx": 8
1175
+ },
1176
+ {
1177
+ "type": "image",
1178
+ "img_path": "images/928ceb27070b8ce43e615aa3bdce1ddf4e35f88506240345ba2acec696b6409c.jpg",
1179
+ "image_caption": [
1180
+ "Figure 7: Geometry and radiance disentanglement is physically plausible with VolSDF. "
1181
+ ],
1182
+ "image_footnote": [],
1183
+ "bbox": [
1184
+ 186,
1185
+ 446,
1186
+ 812,
1187
+ 582
1188
+ ],
1189
+ "page_idx": 8
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "5 Conclusions ",
1194
+ "text_level": 1,
1195
+ "bbox": [
1196
+ 173,
1197
+ 617,
1198
+ 307,
1199
+ 633
1200
+ ],
1201
+ "page_idx": 8
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "We introduce VolSDF, a volume rendering framework for implicit neural surfaces. We represent the volume density as a transformed version of the signed distance function to the learned surface geometry. This seemingly simple definition provides a useful inductive bias, allowing disentanglement of geometry (i.e., density) and radiance field, and improves the geometry approximation over previous neural volume rendering techniques. Furthermore, it allows to bound the opacity approximation error leading to high fidelity sampling of the volume rendering integral. ",
1206
+ "bbox": [
1207
+ 173,
1208
+ 642,
1209
+ 825,
1210
+ 726
1211
+ ],
1212
+ "page_idx": 8
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Some limitations of our method present interesting future research opportunities. First, although working well in practice, we do not have a proof of correctness for the sampling algorithm. We believe providing such a proof, or finding a version of this algorithm that has a proof would be a useful contribution. In general, we believe working with bounds in volume rendering could improve learning and disentanglement and push the field forward. Second, representing non-watertight manifolds and/or manifolds with boundaries, such as zero thickness surfaces, is not possible with an SDF. Generalizations such as multiple implicits and unsigned fields could be proven valuable. Third, our current formulation assumes homogeneous density; extending it to more general density models would allow representing a broader class of geometries. Fourth, now that high quality geometries can be learned in an unsupervised manner it will be interesting to learn dynamic geometries and shape spaces directly from collections of images. Lastly, although we don’t see immediate negative societal impact of our work, we do note that accurate geometry reconstruction from images can be used for malice purposes. ",
1217
+ "bbox": [
1218
+ 174,
1219
+ 731,
1220
+ 825,
1221
+ 911
1222
+ ],
1223
+ "page_idx": 8
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Acknowledgments ",
1228
+ "text_level": 1,
1229
+ "bbox": [
1230
+ 176,
1231
+ 89,
1232
+ 328,
1233
+ 106
1234
+ ],
1235
+ "page_idx": 9
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "LY is supported by the European Research Council (ERC Consolidator Grant, \"LiftMatch\" 771136), the Israel Science Foundation (Grant No. 1830/17), and Carolito Stiftung (WAIC). YK is supported by the U.S.- Israel Binational Science Foundation, grant number 2018680, Carolito Stiftung (WAIC), and by the Kahn foundation. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 121,
1243
+ 826,
1244
+ 176
1245
+ ],
1246
+ "page_idx": 9
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "References ",
1251
+ "text_level": 1,
1252
+ "bbox": [
1253
+ 174,
1254
+ 194,
1255
+ 266,
1256
+ 210
1257
+ ],
1258
+ "page_idx": 9
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "[1] C. Barnes, E. Shechtman, A. Finkelstein, and D. B. Goldman. PatchMatch: A randomized correspondence algorithm for structural image editing. ACM Transactions on Graphics (Proc. SIGGRAPH), 28(3), Aug. 2009. [2] M. Boss, R. Braun, V. Jampani, J. T. Barron, C. Liu, and H. P. Lensch. Nerd: Neural reflectance decomposition from image collections, 2020. [3] A. Broadhurst, T. Drummond, and R. Cipolla. A probabilistic framework for space carving. In Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, volume 1, pages 388–393 vol.1, 2001. \n[4] A. Dai, M. Nießner, M. Zollhöfer, S. Izadi, and C. Theobalt. Bundlefusion: Real-time globally consistent 3d reconstruction using on-the-fly surface reintegration. ACM Transactions on Graphics (ToG), 36(4):1, 2017. [5] J. S. De Bonet and P. Viola. Poxels: Probabilistic voxelized volume reconstruction. In Proceedings of the IEEE International Conference on Computer Vision. ICCV 1999, 1999. \n[6] F. Dellaert and L. Yen-Chen. Neural volume rendering: Nerf and beyond. arXiv preprint arXiv:2101.05204, 2020. \n[7] Y. Furukawa and J. Ponce. Accurate, dense, and robust multiview stereopsis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(8):1362–1376, 2010. \n[8] S. Galliani, K. Lasinger, and K. Schindler. Massively parallel multiview stereopsis by surface normal diffusion. In Proceedings of the IEEE International Conference on Computer Vision, pages 873–881, 2015. [9] K. Genova, F. Cole, D. Vlasic, A. Sarna, W. T. Freeman, and T. Funkhouser. Learning shape templates with structured implicit functions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7154–7164, 2019. \n[10] A. Gropp, L. Yariv, N. Haim, M. Atzmon, and Y. Lipman. Implicit geometric regularization for learning shapes. arXiv preprint arXiv:2002.10099, 2020. \n[11] S. Izadi, D. Kim, O. Hilliges, D. Molyneaux, R. Newcombe, P. Kohli, J. Shotton, S. Hodges, D. Freeman, A. Davison, et al. Kinectfusion: real-time 3d reconstruction and interaction using a moving depth camera. In Proceedings of the 24th annual ACM symposium on User interface software and technology, pages 559–568, 2011. \n[12] R. Jensen, A. Dahl, G. Vogiatzis, E. Tola, and H. Aanæs. Large scale multi-view stereopsis evaluation. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 406–413. IEEE, 2014. \n[13] M. Kazhdan, M. Bolitho, and H. Hoppe. Poisson Surface Reconstruction. In A. Sheffer and K. Polthier, editors, Symposium on Geometry Processing. The Eurographics Association, 2006. \n[14] P. Kellnhofer, L. Jebe, A. Jones, R. Spicer, K. Pulli, and G. Wetzstein. Neural lumigraph rendering. In CVPR, 2021. \n[15] L. Liu, J. Gu, K. Zaw Lin, T.-S. Chua, and C. Theobalt. Neural sparse voxel fields. Advances in Neural Information Processing Systems, 33, 2020. \n[16] S. Liu, Y. Zhang, S. Peng, B. Shi, M. Pollefeys, and Z. Cui. Dist: Rendering deep implicit signed distance function with differentiable sphere tracing. arXiv preprint arXiv:1911.13225, 2019. \n[17] S. Lombardi, T. Simon, J. Saragih, G. Schwartz, A. Lehrmann, and Y. Sheikh. Neural volumes: Learning dynamic renderable volumes from images. arXiv preprint arXiv:1906.07751, 2019. \n[18] N. Max. Optical models for direct volume rendering. IEEE Transactions on Visualization and Computer Graphics, 1(2):99–108, 1995. \n[19] L. Mescheder, M. Oechsle, M. Niemeyer, S. Nowozin, and A. Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4460–4470, 2019. \n[20] M. Michalkiewicz, J. K. Pontes, D. Jack, M. Baktashmotlagh, and A. Eriksson. Implicit surface representations as layers in neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4743–4752, 2019. \n[21] B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020. \n[22] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision. arXiv preprint arXiv:1912.07372, 2019. \n[23] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 5379–5389, 2019. \n[24] M. Nießner, M. Zollhöfer, S. Izadi, and M. Stamminger. Real-time 3d reconstruction at scale using voxel hashing. ACM Trans. Graph., 32(6), Nov. 2013. \n[25] M. Oechsle, L. Mescheder, M. Niemeyer, T. Strauss, and A. Geiger. Texture fields: Learning texture representations in function space. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4531–4540, 2019. \n[26] M. Oechsle, M. Niemeyer, L. Mescheder, T. Strauss, and A. Geiger. Learning implicit surface light fields. arXiv preprint arXiv:2003.12406, 2020. \n[27] M. Oechsle, S. Peng, and A. Geiger. Unisurf: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction. arXiv preprint arXiv:2104.10078, 2021. \n[28] J. J. Park, P. Florence, J. Straub, R. Newcombe, and S. Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 165–174, 2019. \n[29] S. Peng, M. Niemeyer, L. Mescheder, M. Pollefeys, and A. Geiger. Convolutional occupancy networks. In A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm, editors, Computer Vision – ECCV 2020, pages 523–540, Cham, 2020. Springer International Publishing. \n[30] S. Saito, Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2304–2314, 2019. \n[31] J. L. Schönberger, E. Zheng, M. Pollefeys, and J.-M. Frahm. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016. \n[32] S. M. Seitz and C. R. Dyer. Photorealistic scene reconstruction by voxel coloring. International Journal of Computer Vision, 35(2):151–173, 1999. \n[33] V. Sitzmann, M. Zollhöfer, and G. Wetzstein. Scene representation networks: Continuous 3d-structureaware neural scene representations. In Advances in Neural Information Processing Systems, pages 1119–1130, 2019. \n[34] P. P. Srinivasan, B. Deng, X. Zhang, M. Tancik, B. Mildenhall, and J. T. Barron. Nerv: Neural reflectance and visibility fields for relighting and view synthesis. In CVPR, 2021. \n[35] T. Takikawa, J. Litalien, K. Yin, K. Kreis, C. Loop, D. Nowrouzezahrai, A. Jacobson, M. McGuire, and S. Fidler. Neural geometric level of detail: Real-time rendering with implicit 3d shapes. arXiv preprint arXiv:2101.10994, 2021. \n[36] Q. Xu, W. Wang, D. Ceylan, R. Mech, and U. Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. arXiv preprint arXiv:1905.10711, 2019. \n[37] Y. Yao, Z. Luo, S. Li, J. Zhang, Y. Ren, L. Zhou, T. Fang, and L. Quan. Blendedmvs: A large-scale dataset for generalized multi-view stereo networks. Computer Vision and Pattern Recognition (CVPR), 2020. \n[38] L. Yariv, Y. Kasten, D. Moran, M. Galun, M. Atzmon, B. Ronen, and Y. Lipman. Multiview neural surface reconstruction by disentangling geometry and appearance. Advances in Neural Information Processing Systems, 33, 2020. \n[39] K. Zhang, G. Riegler, N. Snavely, and V. Koltun. Nerf++: Analyzing and improving neural radiance fields. arXiv:2010.07492, 2020. ",
1263
+ "bbox": [
1264
+ 174,
1265
+ 212,
1266
+ 828,
1267
+ 917
1268
+ ],
1269
+ "page_idx": 9
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "",
1274
+ "bbox": [
1275
+ 171,
1276
+ 68,
1277
+ 828,
1278
+ 917
1279
+ ],
1280
+ "page_idx": 10
1281
+ }
1282
+ ]
parse/train/GlEWs-V9boR/GlEWs-V9boR_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/GlEWs-V9boR/GlEWs-V9boR_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1cKvl-Rb/H1cKvl-Rb.md ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UCB EXPLORATION VIA $Q$ -ENSEMBLES
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We show how an ensemble of $Q ^ { * }$ -functions can be leveraged for more effective exploration in deep reinforcement learning. We build on well established algorithms from the bandit setting, and adapt them to the $Q$ -learning setting. We propose an exploration strategy based on upper-confidence bounds (UCB). Our experiments show significant gains on the Atari benchmark.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep reinforcement learning seeks to learn mappings from high-dimensional observations to actions. Deep $Q$ -learning (Mnih et al. (2015)) is a leading technique that has been used successfully, especially for video game benchmarks. However, fundamental challenges remain, for example, improving sample efficiency and ensuring convergence to high quality solutions. Provably optimal solutions exist in the bandit setting and for small MDPs, and at the core of these solutions are exploration schemes. However these provably optimal exploration techniques do not extend to deep RL in a straightforward way.
12
+
13
+ Bootstrapped DQN (Osband et al. (2016)) is a previous attempt at adapting a theoretically verified approach to deep RL. In particular, it draws inspiration from posterior sampling for reinforcement learning (PSRL, Osband et al. (2013); Osband and Van Roy (2016)), which has near-optimal regret bounds. PSRL samples an MDP from its posterior each episode and exactly solves $Q ^ { * }$ , its optimal $Q$ -function. However, in high-dimensional settings, both approximating the posterior over MDPs and solving the sampled MDP are intractable. Bootstrapped DQN avoids having to establish and sample from the posterior over MDPs by instead approximating the posterior over $Q ^ { * }$ . In addition, bootstrapped DQN uses a multi-headed neural network to represent the $Q$ -ensemble. While the authors proposed bootstrapping to estimate the posterior distribution, their empirical findings show best performance is attained by simply relying on different initializations for the different heads, not requiring the sampling-with-replacement process that is prescribed by bootstrapping.
14
+
15
+ In this paper, we design new algorithms that build on the $Q$ -ensemble approach from Osband et al. (2016). However, instead of using posterior sampling for exploration, we construct uncertainty estimates from the $Q$ -ensemble. Specifically, we first propose the Ensemble Voting algorithm where the agent takes action by a majority vote from the $Q$ -ensemble. Next, we propose the UCB exploration strategy. This strategy is inspired by established UCB algorithms in the bandit setting and constructs uncertainty estimates of the $Q$ -values. In this strategy, agents are optimistic and take actions with the highest UCB. We demonstrate that our algorithms significantly improve performance on the Atari benchmark.
16
+
17
+ # 2 BACKGROUND
18
+
19
+ # 2.1 NOTATION
20
+
21
+ We model reinforcement learning as a Markov decision process (MDP). We define an MDP as $( S , A , T , R , p _ { 0 } , \gamma )$ , in which both the state space $s$ and action space $\mathcal { A }$ are discrete, $T : S \times \mathcal { A } \times \mathcal { S } \mapsto$ $\mathbb { R } _ { + }$ is the transition distribution, $R : S \times \mathcal { A } \mapsto \mathbb { R }$ is the reward function, assumed deterministic given the state and action, and $\gamma \in ( 0 , 1 ]$ is a discount factor, and $p _ { 0 }$ is the initial state distribution. We denote a transition experience as $\tau = ( s , a , r , s ^ { \prime } )$ where $s ^ { \prime } \sim T ( s ^ { \prime } | s , a )$ and $r = R ( s , a )$ . A policy $\pi : { \mathcal { S } } \mapsto A$ specifies the action taken after observing a state. We denote the $Q$ -function for policy $\pi$ as $\begin{array} { r } { Q ^ { \pi } ( s , a ) : = \mathbb E _ { \pi } \big [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } | s _ { 0 } = s , a _ { 0 } = a \big ] } \end{array}$ where $r _ { t } = R ( s _ { t } , a _ { t } )$ . The optimal $Q ^ { * }$ -function
22
+
23
+ corresponds to taking the optimal policy
24
+
25
+ $$
26
+ Q ^ { \ast } ( s , a ) : = \operatorname* { s u p } _ { \pi } Q ^ { \pi } ( s , a )
27
+ $$
28
+
29
+ and satisfies the Bellman equation
30
+
31
+ $$
32
+ Q ^ { * } ( s , a ) = \mathbb { E } _ { s ^ { \prime } \sim T ( \cdot \mid s , a ) } \big [ r + \gamma \cdot \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { * } ( s ^ { \prime } , a ^ { \prime } ) \big ] .
33
+ $$
34
+
35
+ # 2.2 EXPLORATION IN REINFORCEMENT LEARNING
36
+
37
+ A notable early optimality result in reinforcement learning was the proof by Watkins and Dayan Watkins (1989); Watkins and Dayan (1992) that an online $Q$ -learning algorithm is guaranteed to converge to the optimal policy, provided that every state is visited an infinite number of times. However, the convergence of Watkins’ Q-learning can be prohibitively slow in MDPs where $\epsilon$ - greedy action selection explores state space randomly. Later work developed reinforcement learning algorithms with provably fast (polynomial-time) convergence (Kearns and Singh (2002); Brafman and Tennenholtz (2002); Strehl et al. (2006)). At the core of these provably-optimal learning methods is some exploration strategy, which actively encourages the agent to visit novel state-action pairs. For example, R-MAX optimistically assumes that infrequently-visited states provide maximal reward, and delayed $Q$ -learning initializes the $Q$ -function with high values to ensure that each state-action is chosen enough times to drive the value down.
38
+
39
+ Since the theoretically sound RL algorithms are not computationally practical in the deep RL setting, deep RL implementations often use simple exploration methods such as $\epsilon$ -greedy and Boltzmann exploration, which are often sample-inefficient and fail to find good policies. One common approach of exploration in deep RL is to construct an exploration bonus, which adds a reward for visiting state-action pairs that are deemed to be novel or informative. In particular, several prior methods define an exploration bonus based on a density model or dynamics model. Examples include VIME by Houthooft et al. (2016), which uses variational inference on the forward-dynamics model, and Tang et al. (2016), Bellemare et al. (2016), Ostrovski et al. (2017), Fu et al. (2017). While these methods yield successful exploration in some problems, a major drawback is that this exploration bonus does not depend on the rewards, so the exploration may focus on irrelevant aspects of the environment, which are unrelated to reward.
40
+
41
+ # 2.3 BAYESIAN REINFORCEMENT LEARNING
42
+
43
+ Earlier works on Bayesian reinforcement learning include Dearden et al. (1998; 1999). Dearden et al. (1998) studied Bayesian $Q$ -learning in the model-free setting and learned the distribution of $Q ^ { * }$ - values through Bayesian updates. The prior and posterior specification relied on several simplifying assumptions, some of which are not compatible with the MDP setting. Dearden et al. (1999) took a model-based approach that updates the posterior distribution of the MDP. The algorithm samples from the MDP posterior multiple times and solving the $Q ^ { * }$ values at every step. This approach is only feasible for RL problems with very small state space and action space. Strens (2000) proposed posterior sampling for reinforcement learning (PSRL). PSRL instead takes a single sample of the MDP from the posterior in each episode and solves the $Q ^ { * }$ values. Recent works including Osband et al. (2013) and Osband and Van Roy (2016) established near-optimal Bayesian regret bounds for episodic RL. Sorg et al. (2012) models the environment and constructs exploration bonus from variance of model parameters. These methods are experimented on low dimensional problems only, because the computational cost of these methods is intractable for high dimensional RL.
44
+
45
+ # 2.4 BOOTSTRAPPED DQN
46
+
47
+ Inspired by PSRL, but wanting to reduce computational cost, prior work developed approximate methods. Osband et al. (2014) proposed randomized least-square value iteration for linearly-parameterized value functions. Bootstrapped DQN Osband et al. (2016) applies to $Q$ -functions parameterized by deep neural networks. Bootstrapped DQN (Osband et al. (2016)) maintains a $Q$ -ensemble, represented by a multi-head neural net structure to parameterize $K \in \mathbb { N } _ { + }$ $Q$ -functions. This multi-head structure shares the convolution layers but includes multiple “heads”, each of which defines a $Q$ -function $Q _ { k }$ .
48
+
49
+ Bootstrapped DQN diversifies the $Q$ -ensemble through two mechanisms. The first mechanism is independent initialization. The second mechanism applies different samples to train each $Q$ -function.
50
+
51
+ These $Q$ -functions can be trained simultaneously by combining their loss functions with the help of a random mask $m _ { \tau } \in \mathbb { R } _ { + } ^ { K }$ C
52
+
53
+ $$
54
+ L = \sum _ { \tau \in { \cal B } _ { \mathrm { m i n i } } } \sum _ { k = 1 } ^ { K } m _ { \tau } ^ { k } \cdot ( Q ^ { k } ( s , a ; \theta ) - y _ { \tau } ^ { Q _ { k } } ) ^ { 2 } ,
55
+ $$
56
+
57
+ where $y _ { \tau } ^ { Q _ { k } }$ is the target of the $k$ th $Q$ -function. Thus, the transition $\tau$ updates $Q _ { k }$ only if $m _ { \tau } ^ { k }$ is nonzero. To avoid the overestimation issue in DQN, bootstrapped DQN calculates the target value $y _ { \tau } ^ { Q _ { k } }$ using the approach of Double DQN (Van Hasselt et al. (2016)), such that the current $Q _ { k } ( \cdot ; \theta _ { t } )$ network determines the optimal action and the target network $Q _ { k } \big ( \cdot ; \theta ^ { - } \big )$ estimates the value
58
+
59
+ $$
60
+ y _ { \tau } ^ { Q _ { k } } = r + \gamma \operatorname* { m a x } _ { a } Q ^ { k } ( s ^ { \prime } , \operatorname * { a r g m a x } _ { a } Q _ { k } ( s ^ { \prime } , a ; \theta _ { t } ) ; \theta ^ { - } ) .
61
+ $$
62
+
63
+ In their experiments on Atari games, Osband et al. (2016) set the mask $m _ { \tau } = ( 1 , \ldots , 1 )$ such that all $\left\{ Q _ { k } \right\}$ are trained with the same samples and their only difference is initialization. Bootstrapped DQN picks one $Q _ { k }$ uniformly at random at the start of an episode and follows the greedy action $a _ { t } = \operatorname { a r g m a x } _ { a } Q _ { k } ( s _ { t } , a )$ for the whole episode.
64
+
65
+ # 3 ENSEMBLE VOTING
66
+
67
+ Ignoring computational costs, the ideal Bayesian approach to reinforcement learning is to maintain a posterior over the MDP. However, with limited computation and model capacity, it is more tractable to maintain a posterior of the $Q ^ { * }$ -function. This motivates using a $Q$ -ensemble as a particle filter-based approach to approximate the posterior over $Q ^ { * }$ -function and we display our first proposed method, Ensemble Voting, in Algorithm 1.
68
+
69
+ Each $Q _ { k }$ in the $Q$ -ensemble $\{ Q _ { k } \} _ { k = 1 } ^ { K }$ is parametrized with a deep neural network whose parameters are initialized independently at the start of training. Each $Q _ { k }$ proposes an action that maximizes the $Q$ -value according to $Q _ { k }$ at every time step and the agent chooses the action by a majority vote
70
+
71
+ $$
72
+ a _ { t } = \mathop { \mathrm { M a j o r i t y } } \mathrm { V o t e } ( \{ \operatorname { a r g m a x } Q _ { k } ( s _ { t } , a ) \} _ { k = 1 } ^ { K } ) .
73
+ $$
74
+
75
+ At each learning interval, a minibatch of transitions is sampled from the replay buffer and each $Q _ { k }$ takes a Bellman update based on this minibatch. For stability, Algorithm 1 also uses a target network for each $Q _ { k }$ as in Double DQN in the batched update.
76
+
77
+ We point out that the difference among the parameters of the $Q$ -ensemble $\left\{ Q _ { k } \right\}$ comes only from the independent random initialization. The deep neural network parametrization of the $Q$ -ensemble introduces nonconvexity into the objective function of Bellman update, so the $Q$ -ensemble $\left\{ Q _ { k } \right\}$ do not converge to the same $Q$ -function during training even though they are trained with the same minibatches at every update. We also experimented with bagging by updating each $Q _ { k }$ using an independently drawn minibatch. However, bagging led to inferior learning performance. This phenomenon that that bagging deteriorates the performance of deep ensembles is also observed in supervised learning settings. Lee et al. (2015) observed that supervised learning trained with deep ensembles with random initializations perform better than bagging for deep ensembles. Lakshminarayanan et al. (2016) used deep ensembles for uncertainty estimates and also observed that bagging deteriorated performance in their experiments.
78
+
79
+ Lu and Van Roy (2017) develop ensemble sampling for bandit problems with deep neural network parametrized policies and the theoretical justification. We derive a posterior update rule for the $Q ^ { * }$ function and approximations to the posterior update using ensembles in Appendix C. We note that in bootstrapped DQN, ensemble voting is applied for evaluation while Algorithm 1 uses ensemble voting during learning. In the experiments (Sec. 5), we demonstrate that Algorithm 1 is superior to bootstrapped DQN. The action choice of Algorithm 1 is exploitation only. In the next section, we propose our UCB exploration strategy.
80
+
81
+ # Algorithm 1 Ensemble Voting
82
+
83
+ 1: Input: $K \in \mathbb { N } _ { + }$ copies of independently initialized $Q ^ { * }$ -functions $\{ Q _ { k } \} _ { k = 1 } ^ { K }$ .
84
+ 2: Let $B$ be a replay buffer storing transitions for training
85
+ 3: for each episode do do
86
+ 4: Obtain initial state from environment $s _ { 0 }$
87
+ 5: for step $t = 1 , \dots$ until end of episode do
88
+ 6: Pick an action according to $\hat { a } _ { t } = \mathrm { M a j o r i t y V o t e } ( \{ \operatorname { a r g m a x } _ { a } Q _ { k } ( s _ { t } , a ) \} _ { k = 1 } ^ { K } )$
89
+ 7: Execute $a _ { t }$ . Receive state $s _ { t + 1 }$ and reward $r _ { t }$ from the environment
90
+ 8: Add $\left( { { s _ { t } } , { a _ { t } } , { r _ { t } } , { s _ { t + 1 } } } \right)$ to replay buffer $B$
91
+ 9: At learning interval, sample random minibatch and update $\left\{ Q _ { k } \right\}$
92
+ 10: end for
93
+ 11: end for
94
+
95
+ # 4 UCB EXPLORATION STRATEGY USING $Q$ -ENSEMBLES
96
+
97
+ In this section, we propose optimism-based exploration by adapting the UCB algorithms (Auer et al. (2002); Audibert et al. (2009)) from the bandit setting. The UCB algorithms maintain an upper-confidence bound for each arm, such that the expected reward from pulling each arm is smaller than this bound with high probability. At every time step, the agent optimistically chooses the arm with the highest UCB. Auer et al. (2002) constructed the UCB based on empirical reward and the number of times each arm is chosen. Audibert et al. (2009) incorporated the empirical variance of each arm’s reward into the UCB, such that at time step $t$ , an arm $A _ { t }$ is pulled according to
98
+
99
+ $$
100
+ A _ { t } = \underset { i } { \operatorname { a r g m a x } } \left\{ \hat { r } _ { i , t } + c _ { 1 } \cdot \sqrt { \frac { \hat { V } _ { i , t } \log ( t ) } { n _ { i , t } } } + c _ { 2 } \cdot \frac { \log ( t ) } { n _ { i , t } } \right\}
101
+ $$
102
+
103
+ where $\hat { r } _ { i , t }$ and $\hat { V } _ { i , t }$ are the empirical reward and variance of arm $i$ at time $t$ , $n _ { i , t }$ is the number of times arm $i$ has been pulled up to time $t$ , and $c _ { 1 } , c _ { 2 }$ are positive constants.
104
+
105
+ We extend the intuition of UCB algorithms to the RL setting. Using the outputs of the $\left\{ Q _ { k } \right\}$ functions, we construct a UCB by adding the empirical standard deviation $\tilde { \sigma } ( s _ { t } , a )$ of $\{ Q _ { k } ( s _ { t } , a ) \} _ { k = 1 } ^ { K }$ to the empirical mean $\tilde { \mu } ( s _ { t } , a )$ of $\{ Q _ { k } ( s _ { t } , a ) \} _ { k = 1 } ^ { K }$ . The agent chooses the action that maximizes this UCB
106
+
107
+ $$
108
+ a _ { t } \in \mathop { \operatorname { a r g m a x } } _ { a } \left\{ \tilde { \mu } ( s _ { t } , a ) + \lambda \cdot \tilde { \sigma } ( s _ { t } , a ) \right\} ,
109
+ $$
110
+
111
+ where $\lambda \in \mathbb { R } _ { + }$ is a hyperparameter.
112
+
113
+ We present Algorithm 2, which incorporates the UCB exploration. The hyperparemeter $\lambda$ controls the degrees of exploration. In Section 5, we compare the performance of our algorithms on Atari games using a consistent set of parameters.
114
+
115
+ # Algorithm 2 UCB Exploration with $Q$ -Ensembles
116
+
117
+ 1: Input: Value function networks $Q$ with $K$ outputs $\{ Q _ { k } \} _ { k = 1 } ^ { K }$ . Hyperparameter $\lambda$ .
118
+ 2: Let $B$ be a replay buffer storing experience for training.
119
+ 3: for each episode do
120
+ 4: Obtain initial state from environment $s _ { 0 }$
121
+ 5: for step $t = 1 , \dots$ until end of episode do
122
+ 6: Pick an action according to $\begin{array} { r } { \grave { a _ { t } } \in \mathrm { a r g m a x } _ { a } \left\{ \tilde { \mu } ( s _ { t } , a ) + \lambda \cdot \tilde { \sigma } ( s _ { t } , a ) \right\} } \end{array}$
123
+ 7: Receive state $s _ { t + 1 }$ and reward $r _ { t }$ from environment, having taken action $a _ { t }$
124
+ 8: Add $\left( { { s _ { t } } , { a _ { t } } , { r _ { t } } , { s _ { t + 1 } } } \right)$ to replay buffer $B$
125
+ 9: At learning interval, sample random minibatch and update $\left\{ Q _ { k } \right\}$
126
+ 10: end for
127
+ 11: end for
128
+
129
+ # 5 EXPERIMENT
130
+
131
+ In this section, we conduct experiments to answer the following questions:
132
+
133
+ 1. does Ensemble Voting, Algorithm 1, improve upon existing algorithms including Double DQN and bootstrapped DQN?
134
+ 2. is the proposed UCB exploration strategy of Algorithm 2 effective in improving learning compared to Algorithm 1, Double DQN and bootstrapped DQN?
135
+ 3. how does UCB exploration compare with prior exploration methods such as the count-based exploration method of Bellemare et al. (2016)?
136
+
137
+ We evaluate the algorithms on each Atari game of the Arcade Learning Environment (Bellemare et al. (2013)). We use the multi-head neural net architecture of Osband et al. (2016). We fix the common hyperparameters of all algorithms based on a well-tuned double DQN implementation, which uses the Adam optimizer (Kingma and Ba (2014)), different learning rate and exploration schedules compared to Mnih et al. (2015). Appendix A tabulates the hyperparameters. The number of $\left\{ Q _ { k } \right\}$ functions is $K = 1 0$ . Experiments are conducted on the OpenAI Gym platform (Brockman et al. (2016)) and trained with 40 million frames and 2 trials on each game.
138
+
139
+ We take the following directions to evaluate the performance of our algorithms:
140
+
141
+ 1. we compare Algorithm 1 against Double DQN and bootstrapped DQN,
142
+ 2. we isolate the impact of UCB exploration by comparing Algorithm 2 with $\lambda = 0 . 1$ , denoted as ucb exploration, against Algorithm 1, Double DQN, and bootstrapped DQN.
143
+ 3. we compare Algorithm 1 and Algorithm 2 with the count-based exploration method of Bellemare et al. (2016).
144
+ 4. we aggregate the comparison according to different categories of games, to understand when our methods are suprior.
145
+
146
+ Figure 1 compares the normalized learning curves of all algorithms across Atari games. Overall, Ensemble Voting, Algorithm 1, outperforms both Double DQN and bootstrapped DQN. With exploration, ucb exploration improves further by outperforming Ensemble Voting.
147
+
148
+ In Appendix B, we tabulate detailed results that compare our algorithms, Ensemble Voting and ucb exploration, against prior methods. In Table 2, we tabulate the maximal mean reward in 100 consecutive episodes for Ensemble Voting, ucb exploration, bootstrapped DQN and Double DQN. Without exploration, Ensemble Voting already achieves higher maximal mean reward than both Double DQN and bootstrapped DQN in a majority of Atari games. Ensemble Voting performs better than Double DQN in 37 games out of the total 49 games evaluated, better than bootstrapped DQN in 41 games. ucb exploration achieves the highest maximal mean reward among these four algorithms in 30 games out of the total 49 games evaluated. Specifically, ucb exploration performs better than Double DQN in 38 out of 49 games evaluated, better than bootstrapped DQN in 45 games, and better than Ensemble Voting in 35 games. Figure 2 displays the learning curves of these five algorithms on a set of six Atari games. Ensemble Voting outperforms Double DQN and bootstrapped DQN. ucb exploration outperforms Ensemble Voting.
149
+
150
+ In Table 3, we compare our proposed methods with the count-based exploration method ${ \bf A } 3 { \bf C } +$ of Bellemare et al. (2016) based on their published results of ${ \bf A } 3 { \bf C } +$ trained with 200 million frames. We point out that even though our methods were trained with only 40 million frames, much less than ${ \bf A } 3 { \bf C } +$ ’s 200 million frames, UCB exploration achieves the highest average reward in 28 games, Ensemble Voting in 10 games, and ${ \bf A } 3 { \bf C } +$ in 10 games. Our approach outperforms ${ \bf A } 3 { \bf C } +$ .
151
+
152
+ Finally to understand why and when the proposed methods are superior, we aggregate the comparison results according to four categories: Human Optimal, Score Explicit, Dense Reward, and Sparse Reward. These categories follow the taxonomy in Table 1 of Ostrovski et al. (2017). Out of all games evaluated, 23 games are Human Optimal, 8 are Score Explicit, 8 are Dense Reward, and 5 are Sparse Reward. The comparison results are tabulated in Table 4, where we see ucb exploration achieves top performance in more games than Ensemble Voting, Double DQN, and Bootstrapped DQN in the categories of Human Optimal, Score Explicit, and Dense Reward. In Sparse Reward, both ucb exploration and Ensemble Voting achieve best performance in 2 games out of total of 5. Thus, we conclude that ucb exploration improves prior methods consistently across different game categories within the Arcade Learning Environment.
153
+
154
+ ![](images/755944a1fbb499ae90c0dbc15edc278a059fe19214caa71c8855f17a85eb8094.jpg)
155
+ Figure 1: Comparison of algorithms in normalized learning curve. The normalized learning curve is calculated as follows: first, we normalize learning curves for all algorithms in the same game to the interval [0, 1]; next, average the normalized learning curve from all games for each algorithm.
156
+
157
+ ![](images/187b14c9628fc4f8130883728517c533abd226a73264ac629bbd4c497df9fc9f.jpg)
158
+ Figure 2: Comparison of UCB Exploration and Ensemble Voting against Double DQN and Bootstrapped DQN.
159
+
160
+ # 6 CONCLUSION
161
+
162
+ We proposed a $Q$ -ensemble approach to deep $Q$ -learning, a computationally practical algorithm inspired by Bayesian reinforcement learning that outperforms Double DQN and bootstrapped DQN, as evaluated on Atari. The key ingredient is the UCB exploration strategy, inspired by bandit algorithms. Our experiments show that the exploration strategy achieves improved learning performance on the majority of Atari games.
163
+
164
+ # REFERENCES
165
+
166
+ Jean-Yves Audibert, Rémi Munos, and Csaba Szepesvári. Exploration–exploitation tradeoff using variance estimates in multi-armed bandits. Theor. Comput. Sci., 410(19):1876–1902, 2009.
167
+
168
+ Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Mach. Learn., 47(2-3):235–256, 2002.
169
+
170
+ Marc Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, pages 1471–1479, 2016.
171
+
172
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. J. Artif. Intell. Res., 47:253–279, 2013.
173
+
174
+ Ronen I Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for nearoptimal reinforcement learning. J. Mach. Learn. Res., 3(Oct):213–231, 2002.
175
+
176
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. OpenAI Gym. arXiv preprint arXiv:1606.01540, 2016.
177
+
178
+ Richard Dearden, Nir Friedman, and Stuart Russell. Bayesian Q-learning. In AAAI/IAAI, pages 761–768, 1998.
179
+
180
+ Richard Dearden, Nir Friedman, and David Andre. Model based Bayesian exploration. In UAI, pages 150–159, 1999.
181
+
182
+ Justin Fu, John D Co-Reyes, and Sergey Levine. EX2: Exploration with exemplar models for deep reinforcement learning. arXiv preprint arXiv:1703.01260, 2017.
183
+
184
+ Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. VIME: Variational information maximizing exploration. In NIPS, pages 1109–1117, 2016.
185
+
186
+ Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Mach. Learn., 49(2-3):209–232, 2002.
187
+
188
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
189
+
190
+ Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. arXiv preprint arXiv:1612.01474, 2016.
191
+
192
+ Stefan Lee, Senthil Purushwalkam, Michael Cogswell, David Crandall, and Dhruv Batra. Why M heads are better than one: Training a diverse ensemble of deep networks. arXiv preprint arXiv:1511.06314, 2015.
193
+
194
+ Xiuyuan Lu and Benjamin Van Roy. Ensemble sampling. 2017.
195
+
196
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
197
+
198
+ Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning. arXiv preprint arXiv:1607.00215, 2016.
199
+
200
+ Ian Osband, Dan Russo, and Benjamin Van Roy. (More) efficient reinforcement learning via posterior sampling. In NIPS, pages 3003–3011, 2013.
201
+
202
+ Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. arXiv preprint arXiv:1402.0635, 2014.
203
+ Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped DQN. In NIPS, pages 4026–4034, 2016.
204
+ Georg Ostrovski, Marc G Bellemare, Aaron van den Oord, and Remi Munos. Count-based exploration with neural density models. arXiv preprint arXiv:1703.01310, 2017.
205
+ Jonathan Sorg, Satinder Singh, and Richard L Lewis. Variance-based rewards for approximate bayesian reinforcement learning. arXiv preprint arXiv:1203.3518, 2012.
206
+ Alexander L Strehl, Lihong Li, Eric Wiewiora, John Langford, and Michael L Littman. Pac model-free reinforcement learning. In ICML, pages 881–888. ACM, 2006.
207
+ Malcolm Strens. A Bayesian framework for reinforcement learning. In ICML, pages 943–950, 2000.
208
+ Yi Sun, Faustino Gomez, and Jürgen Schmidhuber. Planning to be surprised: Optimal Bayesian exploration in dynamic environments. In ICAGI, pages 41–51. Springer, 2011.
209
+ Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. # Exploration: A study of count-based exploration for deep reinforcement learning. arXiv preprint arXiv:1611.04717, 2016.
210
+ Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Qlearning. In AAAI, pages 2094–2100, 2016.
211
+ Christopher JCH Watkins and Peter Dayan. Q-learning. Mach. Learn., 8(3-4):279–292, 1992.
212
+ Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989.
213
+
214
+ # A HYPERPARAMETERS
215
+
216
+ We tabulate the hyperparameters in our well-tuned implementation of double DQN in Table 1:
217
+
218
+ Table 1: Double DQN hyperparameters. These hyperparameters are selected based on performances of seven Atari games: Beam Rider, Breakout, Pong, Enduro, Qbert, Seaquest, and Space Invaders. $I n t e r p ( \cdot , \cdot )$ is linear interpolation between two values.
219
+
220
+ <table><tr><td colspan="4">value</td></tr><tr><td>hyperparameter total training frames</td><td>40 million</td><td>descriptions</td><td>Length of training for each game.</td></tr><tr><td>minibatch size</td><td colspan="3">32</td></tr><tr><td>replay buffer size</td><td>1000000</td><td>parameter update.</td><td>The number of most recent frames</td></tr><tr><td>agent history length</td><td colspan="3">4</td></tr><tr><td></td><td></td><td>length.</td><td>concatenated as input to the Q net- work. Total number of iterations = total training frames /agent history</td></tr><tr><td>target network update10000 frequency</td><td colspan="3"></td></tr><tr><td>discount factor</td><td colspan="3">0.99</td></tr><tr><td>action repeat</td><td colspan="3">4</td></tr><tr><td>update frequency 4</td><td colspan="3"></td></tr><tr><td>optimizer</td><td colspan="2">Adam</td><td>Optimizer for parameter updates.</td></tr><tr><td>β1 0.9</td><td colspan="3">Adam optimizer parameter.</td></tr><tr><td>β</td><td colspan="2">0.99</td><td>Adam optimizer parameter.</td></tr><tr><td>E 10-4</td><td colspan="2"></td><td>Adam optimizer parameter.</td></tr><tr><td>learning rate schedule 2</td><td>10-4 Interp(10-4,5 * 10-5) 5*10-5</td><td>t≤106 otherwise t&gt;5*106</td><td>Learning rate for Adam optimizer, as a function of iteration t.</td></tr><tr><td>exploration schedule</td><td>Interp(1,0.1) Interp(0.1,0.01) 0.01</td><td colspan="2">t&lt;106 otherwise Probability of random action in e- t&gt;5*106</td></tr><tr><td></td><td></td><td colspan="2">greedy exploration, as a function of the iteration t . Number of uniform random ac- tions taken before learning starts.</td></tr><tr><td>replay start size</td><td colspan="3">50000</td></tr></table>
221
+
222
+ # B RESULTS TABLES
223
+
224
+ <table><tr><td colspan="4"></td><td rowspan="2">UCB-Exploration</td></tr><tr><td></td><td>Bootstrapped DQN</td><td>DoubleDQN</td><td>Ensemble Voting 2282.8</td></tr><tr><td>Alien</td><td>1445.1</td><td>2059.7</td><td></td><td>2817.6</td></tr><tr><td>Amidar</td><td>430.58</td><td>667.5</td><td>683.72</td><td>663.8</td></tr><tr><td>Assault</td><td>2519.06</td><td>2820.61</td><td>3213.58</td><td>3702.76</td></tr><tr><td>Asterix</td><td>3829.0</td><td>7639.5</td><td>8740.0</td><td>8732.0</td></tr><tr><td>Asteroids</td><td>1009.5</td><td>1002.3</td><td>1149.3</td><td>1007.8</td></tr><tr><td>Atlantis</td><td>1314058.0</td><td>1982677.0</td><td>1786305.0</td><td>2016145.0</td></tr><tr><td>Bank Heist</td><td>795.1</td><td>789.9</td><td>869.4</td><td>906.9</td></tr><tr><td>Battle Zone</td><td>26230.0</td><td>24880.0</td><td>27430.0</td><td>26770.0</td></tr><tr><td>Beam Rider</td><td>8006.58</td><td>7743.74</td><td>7991.9</td><td>9188.26</td></tr><tr><td>Bowling</td><td>28.62</td><td>30.92</td><td>32.92</td><td>38.06</td></tr><tr><td>Boxing</td><td>85.91</td><td>94.07</td><td>94.47</td><td>98.08</td></tr><tr><td>Breakout</td><td>400.22</td><td>467.45</td><td>426.78</td><td>411.31</td></tr><tr><td>Centipede</td><td>5328.77</td><td>5177.51</td><td>6153.28</td><td>6237.18</td></tr><tr><td>Chopper Command</td><td>2153.0</td><td>3260.0</td><td>3544.0</td><td>3677.0</td></tr><tr><td>Crazy Climber</td><td>110926.0</td><td>124456.0</td><td>126677.0</td><td>127754.0</td></tr><tr><td>Demon Attack</td><td>9811.45</td><td>23562.55</td><td>30004.4</td><td>59861.9</td></tr><tr><td>Double Dunk</td><td>-10.82</td><td>-14.58</td><td>-11.94</td><td>-4.08</td></tr><tr><td>Enduro</td><td>1314.31</td><td>1439.59</td><td>1999.88</td><td>2752.55</td></tr><tr><td>Fishing Derby</td><td>21.89</td><td>23.69</td><td>30.02</td><td>29.71</td></tr><tr><td>Freeway</td><td>33.57</td><td>32.93</td><td>33.92</td><td>33.96</td></tr><tr><td>Frostbite</td><td>1284.8</td><td>529.2</td><td>1196.0</td><td>1903.0</td></tr><tr><td>Gopher</td><td>7652.2</td><td>12030.0</td><td>10993.2</td><td>12910.8</td></tr><tr><td>Gravitar</td><td>227.5</td><td>279.5</td><td>371.5</td><td>318.0</td></tr><tr><td>Ice Hockey</td><td>-4.62</td><td>-4.63</td><td>-1.73</td><td>-4.71</td></tr><tr><td>Jamesbond</td><td>594.5</td><td>594.0</td><td>602.0</td><td>710.0</td></tr><tr><td>Kangaroo</td><td>8186.0</td><td>7787.0</td><td>8174.0</td><td>14196.0</td></tr><tr><td>Krull</td><td>8537.52</td><td>8517.91</td><td>8669.17</td><td>9171.61</td></tr><tr><td>Kung Fu Master</td><td>24153.0</td><td>32896.0</td><td>30988.0</td><td>31291.0</td></tr><tr><td>Montezuma Revenge</td><td>2.0</td><td>4.0</td><td>1.0</td><td>4.0</td></tr><tr><td>Ms Pacman</td><td>2508.7</td><td>2498.1</td><td>3039.7</td><td>3425.4</td></tr><tr><td>Name This Game</td><td>8212.4</td><td>9806.9</td><td>9255.1</td><td>9570.5</td></tr><tr><td>Pitfall</td><td>-5.99</td><td>-7.57</td><td>-3.37</td><td>-1.47</td></tr><tr><td>Pong</td><td>21.0</td><td>20.67</td><td>21.0</td><td>20.95</td></tr><tr><td>Private Eye</td><td>1815.19</td><td>788.63</td><td>1845.28</td><td>1252.01</td></tr><tr><td>Qbert</td><td>10557.25</td><td>6529.5</td><td>12036.5</td><td>14198.25</td></tr><tr><td>Riverraid</td><td>11528.0</td><td>11834.7</td><td>12785.8</td><td>15622.2</td></tr><tr><td>Road Runner</td><td>52489.0</td><td>49039.0</td><td>54768.0</td><td>53596.0</td></tr><tr><td>Robotank</td><td>21.03</td><td>29.8</td><td>31.83</td><td>41.04</td></tr><tr><td>Seaquest</td><td>9320.7</td><td>18056.4</td><td>20458.6</td><td>24001.6</td></tr><tr><td>Space Invaders</td><td>1549.9</td><td>1917.5</td><td>1890.8</td><td>2626.55</td></tr><tr><td>Star Gunner</td><td>20115.0</td><td>52283.0</td><td>41684.0</td><td>47367.0</td></tr><tr><td>Tennis</td><td>-15.11</td><td>-14.04</td><td>-11.63</td><td>-7.8</td></tr><tr><td>Time Pilot</td><td>5088.0</td><td>5548.0</td><td>6153.0</td><td>6490.0</td></tr><tr><td>Tutankham</td><td>167.47</td><td>223.43</td><td>208.61</td><td>200.76</td></tr><tr><td>Up N Down</td><td>9049.1</td><td>11815.3</td><td>19528.3</td><td>19827.3</td></tr><tr><td>Venture</td><td>115.0</td><td>96.0</td><td>78.0</td><td>67.0</td></tr><tr><td>Video Pinball</td><td>364600.85</td><td>374686.89</td><td>343380.29</td><td>372564.11</td></tr><tr><td>Wizard Of Wor</td><td>2860.0</td><td>3877.0</td><td>5451.0</td><td>5873.0</td></tr><tr><td>Zaxxon</td><td>592.0</td><td>8903.0</td><td>3901.0</td><td>3695.0</td></tr><tr><td>Times best</td><td>1</td><td>7</td><td>9</td><td>30</td></tr></table>
225
+
226
+ Table 2: Comparison of maximal mean rewards achieved by agents. Maximal mean reward is calculated in a window of 100 consecutive episodes. Bold denotes the highest value in each row.
227
+
228
+ <table><tr><td colspan="2">Ensemble Voting</td><td>UCB-Exploration</td><td>A3C+</td></tr><tr><td>Alien</td><td>2282.8</td><td>2817.6</td><td>1848.33</td></tr><tr><td>Amidar</td><td>683.72</td><td>663.8</td><td>964.77</td></tr><tr><td>Assault</td><td>3213.58</td><td>3702.76</td><td>2607.28</td></tr><tr><td>Asterix</td><td>8740.0</td><td>8732.0</td><td>7262.77</td></tr><tr><td>Asteroids</td><td>1149.3</td><td>1007.8</td><td>2257.92</td></tr><tr><td>Atlantis</td><td>1786305.0</td><td>2016145.0</td><td>1733528.71</td></tr><tr><td>Bank Heist</td><td>869.4</td><td>906.9</td><td>991.96</td></tr><tr><td>Battle Zone</td><td>27430.0</td><td>26770.0</td><td>7428.99</td></tr><tr><td>Beam Rider</td><td>7991.9</td><td>9188.26</td><td>5992.08</td></tr><tr><td>Bowling</td><td>32.92</td><td>38.06</td><td>68.72</td></tr><tr><td>Boxing</td><td>94.47</td><td>98.08</td><td>13.82</td></tr><tr><td>Breakout</td><td>426.78</td><td>411.31</td><td>323.21</td></tr><tr><td>Centipede</td><td>6153.28</td><td>6237.18</td><td>5338.24</td></tr><tr><td>Chopper Command</td><td>3544.0</td><td>3677.0</td><td>5388.22</td></tr><tr><td>Crazy Climber</td><td>126677.0</td><td>127754.0</td><td>104083.51</td></tr><tr><td>Demon Attack</td><td>30004.4</td><td>59861.9</td><td>19589.95</td></tr><tr><td>Double Dunk</td><td>-11.94</td><td>-4.08</td><td>-8.88</td></tr><tr><td>Enduro</td><td>1999.88</td><td>2752.55</td><td>749.11</td></tr><tr><td>Fishing Derby</td><td>30.02</td><td>29.71</td><td>29.46</td></tr><tr><td>Freeway</td><td>33.92</td><td>33.96</td><td>27.33</td></tr><tr><td>Frostbite</td><td>1196.0</td><td>1903.0</td><td>506.61</td></tr><tr><td>Gopher</td><td>10993.2</td><td>12910.8</td><td>5948.40</td></tr><tr><td>Gravitar</td><td>371.5</td><td>318.0</td><td>246.02</td></tr><tr><td>Ice Hockey</td><td>-1.73</td><td>-4.71</td><td>-7.05</td></tr><tr><td>Jamesbond</td><td>602.0</td><td>710.0</td><td>1024.16</td></tr><tr><td>Kangaroo</td><td>8174.0</td><td>14196.0</td><td>5475.73</td></tr><tr><td>Krull</td><td>8669.17</td><td>9171.61</td><td>7587.58</td></tr><tr><td>Kung Fu Master</td><td>30988.0</td><td>31291.0</td><td>26593.67</td></tr><tr><td>Montezuma Revenge</td><td>1.0</td><td>4.0</td><td>142.50</td></tr><tr><td>Ms Pacman</td><td>3039.7</td><td>3425.4</td><td>2380.58</td></tr><tr><td>Name This Game</td><td>9255.1</td><td>9570.5</td><td>6427.51</td></tr><tr><td>Pitfall</td><td>-3.37</td><td>-1.47</td><td>-155.97</td></tr><tr><td>Pong</td><td>21.0</td><td>20.95</td><td>17.33</td></tr><tr><td>Private Eye</td><td>1845.28</td><td>1252.01</td><td>100.0</td></tr><tr><td>Qbert</td><td>12036.5</td><td>14198.25</td><td>15804.72</td></tr><tr><td>Riverraid</td><td>12785.8</td><td>15622.2</td><td>10331.56</td></tr><tr><td>Road Runner</td><td>54768.0</td><td>53596.0</td><td>49029.74</td></tr><tr><td>Robotank</td><td>31.83</td><td>41.04</td><td>6.68</td></tr><tr><td>Seaquest</td><td>20458.6</td><td>24001.6</td><td>2274.06</td></tr><tr><td>Space Invaders</td><td>1890.8</td><td>2626.55</td><td>1466.01</td></tr><tr><td> Star Gunner</td><td>41684.0</td><td>47367.0</td><td>52466.84</td></tr><tr><td>Tennis</td><td>-11.63</td><td>-7.8</td><td>-20.49</td></tr><tr><td>Time Pilot</td><td>6153.0</td><td>6490.0</td><td>3816.38</td></tr><tr><td>Tutankham</td><td>208.61</td><td>200.76</td><td>132.67</td></tr><tr><td>Up N Down</td><td>19528.3</td><td>19827.3</td><td>8705.64</td></tr><tr><td>Venture</td><td>78.0</td><td>67.0</td><td>0.00</td></tr><tr><td>Video Pinball</td><td>343380.29</td><td>372564.11</td><td>35515.92</td></tr><tr><td>Wizard Of Wor</td><td>5451.0</td><td>5873.0</td><td>3657.65</td></tr><tr><td>Zaxxon</td><td>3901.0</td><td>3695.0</td><td>7956.05</td></tr><tr><td>Times Best</td><td>10</td><td>28</td><td>10</td></tr></table>
229
+
230
+ Table 3: Comparison of Ensemble Voting, UCB Exploration, both trained with 40 million frames and ${ \bf A } 3 { \bf C } +$ of Bellemare et al. (2016), trained with 200 million frames
231
+
232
+ <table><tr><td>Category</td><td>Total</td><td>Bootstrapped DQN</td><td>Double DQN</td><td>Ensemble Voting</td><td>UCB-Exploration</td></tr><tr><td>Human Optimal</td><td>23</td><td>0</td><td>3</td><td>5</td><td>15</td></tr><tr><td>Score Explicit</td><td>8</td><td>0</td><td>2</td><td>1</td><td>5</td></tr><tr><td>Dense Reward</td><td>8</td><td>0</td><td>1</td><td>1</td><td>6</td></tr><tr><td>Sparse Reward</td><td>5</td><td>1</td><td>0</td><td>2</td><td>2</td></tr></table>
233
+
234
+ Table 4: Comparison of each method across different game categories. The Atari games are separated into four categories: human optimal, score explicit, dense reward, and sparse reward. In each row, we present the number of games in this category, the total number of games where each algorithm achieves the optimal performance according to Table 2. The game categories follow the taxonomy in Table 1 of Ostrovski et al. (2017)
235
+
236
+ # C APPROXIMATING BAYESIAN $Q$ -LEARNING WITH $Q$ -ENSEMBLES
237
+
238
+ In this section, we first derive a posterior update formula for the $Q ^ { * }$ -function under full exploration assumption and this formula turns out to depend on the transition Markov chain. Next, we approximate the posterior update with $Q$ -ensembles $\{ { \bar { Q } } _ { k } \}$ and demonstrate that the Bellman equation emerges as the approximate update rule for each $Q _ { k }$ .
239
+
240
+ # C.1 POSTERIOR UPDATE FOR THE $Q ^ { * }$ -FUNCTION
241
+
242
+ An MDP is specified by the transition probability $T$ and the reward function $R$ . Unlike prior works outlined in Section 2.3 which learned the posterior of the MDP, we will consider the joint distribution over $( Q ^ { * } , T )$ . Note that $R$ can be recovered from $Q ^ { * }$ given $T$ . So $( Q ^ { * } , T )$ determines a unique MDP. In this section, we assume that the agent samples $( s , a )$ according to a fixed distribution. The corresponding reward $r$ and next state $s ^ { \prime }$ given by the MDP append to $( s , a )$ to form a transition ${ \boldsymbol \tau } = ( s , a , r , s ^ { \prime } )$ , for updating the posterior of $( Q ^ { * } , T )$ . Recall that the $Q ^ { * }$ -function satisfies the Bellman equation
243
+
244
+ $$
245
+ Q ( s , a ) = r + \mathbb { E } _ { s ^ { \prime } \sim T ( \cdot | s , a ) } \left[ \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q ( s ^ { \prime } , a ^ { \prime } ) \right] .
246
+ $$
247
+
248
+ Denote the joint prior distribution as $p ( Q ^ { * } , T )$ and the posterior as $\tilde { p }$ . We apply Bayes’ formula to expand the posterior:
249
+
250
+ $$
251
+ \begin{array} { r l } & { \tilde { p } ( Q ^ { * } , T | \tau ) = \frac { p ( \tau | Q ^ { * } , T ) \cdot p ( Q ^ { * } , T ) } { Z ( \tau ) } } \\ & { \qquad = \frac { p ( Q ^ { * } , T ) \cdot p ( s ^ { \prime } | Q ^ { * } , T , ( s , a ) ) \cdot p ( r | Q ^ { * } , T , ( s , a , s ^ { \prime } ) ) \cdot p ( s , a ) } { Z ( \tau ) } , } \end{array}
252
+ $$
253
+
254
+ where $Z ( \tau )$ is a normalizing constant and the second equality is because $s$ and $a$ are sampled randomly from $s$ and $\mathcal { A }$ . Next, we calculate the two conditional probabilities in (1). First,
255
+
256
+ $$
257
+ p ( s ^ { \prime } | Q ^ { * } , T , ( s , a ) ) = p ( s ^ { \prime } | T , ( s , a ) ) = T ( s ^ { \prime } | s , a ) ,
258
+ $$
259
+
260
+ where the first equality is because given $T$ , $Q ^ { * }$ does not influence the transition. Second,
261
+
262
+ $$
263
+ \begin{array} { r l } & { p ( r | Q ^ { * } , T , ( s , a , s ^ { \prime } ) ) = p ( r | Q ^ { * } , T , ( s , a ) ) } \\ & { \phantom { p s p a c e } = \mathbb { 1 } _ { \{ Q ^ { * } ( s , a ) = r + \gamma \cdot \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot \cdot \vert s , a ) } \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { * } ( s ^ { \prime \prime } , a ^ { \prime } ) \} } } \\ & { \phantom { p s p a c e } : = \mathbb { 1 } ( Q ^ { * } , T ) , } \end{array}
264
+ $$
265
+
266
+ where $\mathbb { 1 } _ { \{ \cdot \} }$ is the indicator function and in the last equation we abbreviate it as $\mathbb { 1 } ( Q ^ { * } , T )$ . Substituting (2) and (3) into (1), we obtain the joint posterior of $Q ^ { * }$ and $T$ after observing an additional randomly sampled transition $\tau$
267
+
268
+ $$
269
+ \tilde { p } ( Q ^ { * } , T | \tau ) = \frac { p ( Q ^ { * } , T ) \cdot T ( s ^ { \prime } | s , a ) \cdot p ( s , a ) } { Z ( \tau ) } \cdot \mathbb { 1 } ( Q ^ { * } , T ) .
270
+ $$
271
+
272
+ # C.2 APPROXIMATIONS WITH $Q$ -ENSEMBLES
273
+
274
+ The exact $Q ^ { * }$ -posterior update (4) is intractable in high-dimensional RL due to the large space of $( Q ^ { * } , T )$ . Thus, we make several approximations to the $Q ^ { * }$ -posterior update. First, we approximate the prior of $Q ^ { * }$ by sampling $K \in \mathbb { N } _ { + }$ independently initialized $Q ^ { * }$ -functions $\{ Q _ { k } \} _ { k = 1 } ^ { K }$ . Next, we update them as more transitions are sampled. The resulting $\left\{ Q _ { k } \right\}$ approximate samples drawn from the posterior. The agent chooses the action by taking a majority vote from the actions determined by each $Q _ { k }$ .
275
+
276
+ We derive the update rule for $\left\{ Q _ { k } \right\}$ after observing a new transition $\tau = ( s , a , r , s ^ { \prime } )$ . At iteration $i$ , given $Q ^ { * } = Q _ { k , i } ( \cdot ; \theta _ { k } )$ parametrized by $\theta _ { k }$ the joint probability of $( Q ^ { * } , T )$ factors into
277
+
278
+ $$
279
+ p ( Q _ { k , i } , T ) = p ( Q ^ { * } , T | Q ^ { * } = Q _ { k , i } ) = p ( T | Q _ { k , i } ) .
280
+ $$
281
+
282
+ Substitute (5) into (4) and we obtain the corresponding posterior for each $Q _ { k , i + 1 }$ at iteration $i + 1$ as
283
+
284
+ $$
285
+ \begin{array} { r l r } { { \tilde { p } ( Q _ { k , i + 1 } , T | \tau ) = \frac { p ( T | Q _ { k , i } ) \cdot T ( s ^ { \prime } | s , a ) \cdot p ( s , a ) } { Z ( \tau ) } \cdot \mathbb { 1 } ( Q _ { k , i + 1 } , T ) . } } \\ & { } & { \tilde { p } ( Q _ { k , i + 1 } | \tau ) = \int _ { T } \tilde { p } ( Q _ { k , i + 1 } , T | \tau ) \mathrm { d } T = p ( s , a ) \cdot \int _ { T } \tilde { p } ( T | Q _ { k , i } , \tau ) \cdot \mathbb { 1 } ( Q _ { k , i + 1 } , T ) \mathrm { d } T . } \end{array}
286
+ $$
287
+
288
+ We update $Q _ { k , i }$ to $Q _ { k , i + 1 }$ according to
289
+
290
+ $$
291
+ Q _ { k , i + 1 } \operatorname * { a r g m a x } _ { Q _ { k , i + 1 } } \tilde { p } ( Q _ { k , i + 1 } | \tau ) .
292
+ $$
293
+
294
+ We first derive a lower bound of the the posterior $\tilde { p } ( Q _ { k , i + 1 } | \tau )$ :
295
+
296
+ $$
297
+ \begin{array} { r l r } { { \operatorname { i } ( Q _ { k , i + 1 } \lvert \tau \rangle = p ( s , a ) \cdot \mathbb { E } _ { T \sim \tilde { p } ( T \lvert Q _ { k , i } , \tau ) } \mathbb { 1 } ( Q _ { k , i + 1 } , T ) } } \\ & { = p ( s , a ) \cdot \mathbb { E } _ { T \sim \tilde { p } ( T \lvert Q _ { k , i } , \tau ) } \underset { c \to + \infty } { \operatorname { i m } } \exp ( - c [ Q _ { k , i + 1 } ( s , a ) - r - \gamma \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot \lvert s , a ) } \underset { a ^ { \prime } } { \operatorname { m a x } } Q _ { k , i + 1 } ( s ^ { \prime \prime } , a ^ { \prime } ) ] ^ { 2 } ) } \\ & { = p ( s , a ) \cdot \underset { c \to + \infty } { \operatorname* { i m } } \mathbb { E } _ { T \sim \tilde { p } ( T \lvert Q _ { k , i } , \tau ) } \exp ( - c [ Q _ { k , i + 1 } ( s , a ) - r - \gamma \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot \lvert s , a ) } \underset { a ^ { \prime } } { \operatorname { m a x } } Q _ { k , i + 1 } ( s ^ { \prime \prime } , a ^ { \prime } ) ] ^ { 2 } ) } \\ & { \geq p ( s , a ) \cdot \underset { c \to + \infty } { \operatorname* { i m } } \exp ( - c \mathbb { E } _ { T \sim \tilde { p } ( T \lvert Q _ { k , i } , \tau ) } [ Q _ { k , i + 1 } ( s , a ) - r - \gamma \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot \lvert s , a ) } \underset { a ^ { \prime } } { \operatorname { m a x } } Q _ { k , i + 1 } ( s ^ { \prime \prime } , a ^ { \prime } ) ] ^ { 2 } ) } \\ & { = p ( s , a ) \cdot \underset { c \to + \infty } { \operatorname* { l i m } } \underset { c \to \tau ( \tau \lvert Q _ { k , i } , \tau ) } { \operatorname* { i m } } [ Q _ { k , i + 1 } ( s , a ) - r - \gamma \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot \lvert s , a ) } \underset { a ^ { \prime } } { \operatorname* { m a x } } Q _ { k , i + 1 } ( s ^ { \prime \prime } , a ^ { \prime } ) ] ^ { 2 } } \\ & = p ( s , a ) \cdot \mathbb { E } _ { T \sim \tilde { p } ( T \lvert Q _ { k , i } , \tau ) } [ Q _ k , \end{array}
298
+ $$
299
+
300
+ where we apply a limit representation of the indicator function in the third equation. The fourth equation is due to the bounded convergence theorem. The inequality is Jensen’s inequality. The last equation (9) replaces the limit with an indicator function.
301
+
302
+ A sufficient condition for (8) is to maximize the lower-bound of the posterior distribution in (9) by ensuring the indicator function in (9) to hold. We can replace (8) with the following update
303
+
304
+ $$
305
+ Q _ { k , i + 1 } \underset { Q _ { k , i + 1 } } { \mathrm { a r g m i n } } \mathbb { E } _ { T \sim \tilde { p } ( T | Q _ { k , i } , \tau ) } [ Q _ { k , i + 1 } ( s , a ) - ( r + \gamma \cdot \mathbb { E } _ { s ^ { \prime \prime } \sim T ( \cdot | s , a ) } \operatorname* { m a x } _ { a ^ { \prime } } Q _ { k , i + 1 } ( s ^ { \prime \prime } , a ^ { \prime } ) ) ] ^ { 2 } .
306
+ $$
307
+
308
+ However, (10) is not tractable because the expectation in (10) is taken with respect to the posterior $\tilde { p } ( T | Q _ { k , i } , \tau )$ of the transition $T$ . To overcome this challenge, we approximate the posterior update by reusing the one-sample next state $s ^ { \prime }$ from $\tau$ . Solving the exact minimal for each $Q _ { k , i + 1 }$ is impractical, thus we take a gradient step on $Q _ { k , i + 1 }$ according to the following gradient
309
+
310
+ $$
311
+ \theta _ { k } \theta _ { k } + \eta \cdot ( Q _ { k } ( s , a ; \theta _ { k } ) - ( r + \gamma \cdot \operatorname* { m a x } _ { a ^ { \prime } } Q _ { k } ( s ^ { \prime } , a ^ { \prime } ; \theta _ { k } ) ) ) \nabla _ { \theta _ { k } } Q _ { k } ( s , a ; \theta _ { k } ) ,
312
+ $$
313
+
314
+ where $\eta$ is the step size. Instead of updating $Q _ { k }$ after each transition, we use an experience replay buffer $B$ to store observed transitions and sample a minibatch $B _ { \mathrm { m i n i } }$ of transitions $( s , a , r , s ^ { \prime } )$ for each update. In this case, the batched update of each $Q _ { k , i }$ to $Q _ { k , i + 1 }$ becomes a standard Bellman update
315
+
316
+ $$
317
+ \theta _ { k } \gets \theta _ { k } + \eta \cdot \mathbb { E } _ { ( s , a , r , s ^ { \prime } ) \in B _ { \operatorname* { m i n } } } \big [ \big ( Q _ { k } \big ( s , a ; \theta _ { k } \big ) - \big ( r + \gamma \cdot \operatorname* { m a x } _ { a ^ { \prime } } Q _ { k } \big ( s ^ { \prime } , a ^ { \prime } ; \theta _ { k } \big ) \big ) \big ) \nabla _ { \theta _ { k } } Q _ { k } \big ( s , a ; \theta _ { k } \big ) \big ] .
318
+ $$
319
+
320
+ # D INFOGAIN EXPLORATION
321
+
322
+ In this section, we also studied an “InfoGain” exploration bonus, which encourages agents to gain information about the $Q ^ { * }$ -function and examine its effectiveness. We found it had some benefits on top of Ensemble Voting, but no uniform additional benefits once already using Q-ensembles on top of Double DQN. We describe the approach and our experimental findings.
323
+
324
+ Similar to Sun et al. (2011), we define the information gain from observing an additional transition $\tau _ { n }$ as
325
+
326
+ $$
327
+ H _ { \tau _ { t } | \tau _ { 1 } , \dots , \tau _ { n - 1 } } = D _ { K L } ( \tilde { p } ( Q ^ { * } | \tau _ { 1 } , \dots , \tau _ { n } ) | | \tilde { p } ( Q ^ { * } | \tau _ { 1 } , \dots , \tau _ { n - 1 } ) )
328
+ $$
329
+
330
+ where $\tilde { p } ( Q ^ { * } | \tau _ { 1 } , \dots , \tau _ { n } )$ is the posterior distribution of $Q ^ { * }$ after observing a sequence of transitions $\left( \tau _ { 1 } , \dots , \tau _ { n } \right)$ . The total information gain is
331
+
332
+ $$
333
+ H _ { \tau _ { 1 } , \dots , \tau _ { N } } = \sum _ { n = 1 } ^ { N } H _ { \tau _ { n } | \tau _ { 1 } , \dots , \tau _ { n - 1 } } .
334
+ $$
335
+
336
+ Our Ensemble Voting, Algorithm 1, does not maintain the posterior $\tilde { p }$ , thus we cannot calculate (11) explicitly. Instead, inspired by Lakshminarayanan et al. (2016), we define an InfoGain exploration bonus that measures the disagreement among $\left\{ Q _ { k } \right\}$ . Note that
337
+
338
+ $$
339
+ H _ { \tau _ { 1 } , \dots , \tau _ { N } } + \mathsf { H } ( \tilde { p } ( Q ^ { * } | \tau _ { 1 } , \dots , \tau _ { N } ) ) = \mathsf { H } ( p ( Q ^ { * } ) ) ,
340
+ $$
341
+
342
+ where $\mathsf { H } ( \cdot )$ is the entropy. If $H _ { \tau _ { 1 } , \dots , \tau _ { N } }$ is small, then the posterior distribution has high entropy and high residual information. Since $\left\{ Q _ { k } \right\}$ are approximate samples from the posterior, high entropy of the posterior leads to large discrepancy among $\left\{ Q _ { k } \right\}$ . Thus, the exploration bonus is monotonous with respect to the residual information in the posterior $\mathsf { H } ( \tilde { p } ( Q ^ { * } | \tau _ { 1 } , \dots , \tau _ { N } ) )$ . We first compute the Boltzmann distribution for each $Q _ { k }$
343
+
344
+ $$
345
+ P _ { \mathsf { T } , k } ( a | s ) = \frac { \exp \left( Q _ { k } ( s , a ) / \mathsf { T } \right) } { \sum _ { a ^ { \prime } } \exp \left( Q _ { k } ( s , a ^ { \prime } ) / \mathsf { T } \right) } ,
346
+ $$
347
+
348
+ where $\mathsf T > 0$ is a temperature parameter. Next, calculate the average Boltzmann distribution
349
+
350
+ $$
351
+ P _ { \mathsf { T } , \mathrm { a v g } } = \frac { 1 } { K } \cdot \sum _ { k = 1 } ^ { K } P _ { \mathsf { T } , k } ( a | s ) .
352
+ $$
353
+
354
+ The InfoGain exploration bonus is the average KL-divergence from $\{ P _ { \mathsf { T } , k } \} _ { k = 1 } ^ { K }$ to $P _ { \mathrm { { T , a v g } } }$
355
+
356
+ $$
357
+ b _ { \mathsf { T } } ( s ) = \frac { 1 } { K } \cdot \sum _ { k = 1 } ^ { K } \mathrm { D } _ { K L } [ P _ { \mathsf { T } , k } | | P _ { \mathsf { T } , \mathrm { a v g } } ] .
358
+ $$
359
+
360
+ The modified reward is
361
+
362
+ $$
363
+ \hat { r } ( s , a , s ^ { \prime } ) = r ( s , a ) + \rho \cdot b \tau ( s ) ,
364
+ $$
365
+
366
+ where $\rho \in \mathbb { R } _ { + }$ is a hyperparameter that controls the degree of exploration.
367
+
368
+ The exploration bonus $b _ { \mathsf { T } } ( s _ { t } )$ encourages the agent to explore where $\left\{ Q _ { k } \right\}$ disagree. The temperature parameter $\top$ controls the sensitivity to discrepancies among $\{ Q _ { k } \}$ . When $\mathsf { T } \to + \infty$ , $\{ P _ { \top , k } \}$ converge to the uniform distribution on the action space and $b _ { \mathsf { T } } ( s ) \to 0$ . When $\top$ is small, the differences among $\left\{ Q _ { k } \right\}$ are magnified and $b _ { \mathsf { T } } ( s )$ is large.
369
+
370
+ We display Algorithrim 3, which incorporates our InfoGain exploration bonus into Algorithm 2. The hyperparameters $\lambda$ , $\top$ and $\rho$ vary for each game.
371
+
372
+ # Algorithm 3 UCB + InfoGain Exploration with $Q$ -Ensembles
373
+
374
+ 1: Input: Value function networks $Q$ with $K$ outputs $\{ Q _ { k } \} _ { k = 1 } ^ { K }$ . Hyperparameters $\tau , \lambda$ , and $\rho$ .
375
+ 2: Let $B$ be a replay buffer storing experience for training.
376
+ 3: for each episode do
377
+ 4: Obtain initial state from environment $s _ { 0 }$
378
+ 5: for step $t = 1 , \dots$ until end of episode do
379
+ 6: Pick an action according to $\begin{array} { r } { \grave { a _ { t } } \in \mathrm { a r g m a x } _ { a } \left\{ \tilde { \mu } ( s _ { t } , a ) + \lambda \cdot \tilde { \sigma } ( s _ { t } , a ) \right\} } \end{array}$
380
+ 7: Receive state $s _ { t + 1 }$ and reward $r _ { t }$ from environment, having taken action $a _ { t }$
381
+ 8: Calculate exploration bonus $b _ { \mathsf { T } } ( s _ { t } )$ according to (12)
382
+ 9: Add $( s _ { t } , a _ { t } , r _ { t } + \rho \cdot b _ { \mathsf { T } } ( s _ { t } ) , s _ { t + 1 } )$ to replay buffer $B$
383
+ 10: At learning interval, sample random minibatch and update $\left\{ Q _ { k } \right\}$
384
+ 11: end for
385
+ 12: end for
386
+
387
+ ![](images/939ce04cb216d1efd18ae513f715268a3148f6d9a0bb94bd5582028e5311ce05.jpg)
388
+ Figure 3: Comparison of all algorithms in normalized curve. The normalized learning curve is calculated as follows: first, we normalize learning curves for all algorithms in the same game to the interval [0, 1]; next, average the normalized learning curve from all games for each algorithm.
389
+
390
+ # D.1 PERFORMANCE OF UCB $^ +$ INFOGAIN EXPLORATION
391
+
392
+ We demonstrate the performance of the combined UCB+InfoGain exploration in Figure 3 and Figure 3. We augment the previous figures in Section 5 with the performance of ucb+infogain exploration, where we set $\lambda = 0 . 1 , \rho = 1$ , and ${ \mathsf T } = 1$ in Algorithm 3.
393
+
394
+ Figure 3 shows that combining UCB and InfoGain exploration does not lead to uniform improvement in the normalized learning curve.
395
+
396
+ At the individual game level, Figure 3 shows that the impact of InfoGain exploration varies. UCB exploration achieves sufficient exploration in games including Demon Attack and Kangaroo and Riverraid, while InfoGain exploration further improves learning on Enduro, Seaquest, and Up N Down. The effect of InfoGain exploration depends on the choice of the temperature $\top$ . The optimal temperature parameter varies across games. In Figure 5, we display the behavior of ucb+infogain exploration with different temperature values. Thus, we see the InfoGain exploration bonus, tuned with the appropriate temperature parameter, can lead to improved learning for games that require extra exploration, such as ChopperCommand, KungFuMaster, Seaquest, UpNDown.
397
+
398
+ ![](images/298f295b77aa13e16d25b06d19768431fd0cd7bebf49664568a091f6ffef1383.jpg)
399
+ Figure 4: Comparison of algorithms against Double DQN and bootstrapped DQN.
400
+
401
+ ![](images/bb37003bba1e0413ac880ed76c095033248f764b2a5e78eee9d9c0b3878a47c9.jpg)
402
+ D.2 UCB $^ +$ INFOGAIN EXPLORATION WITH DIFFERENT TEMPERATURES
403
+ Figure 5: Comparison of UCB+InfoGain exploration with different temperatures versus UCB exploration.
parse/train/H1cKvl-Rb/H1cKvl-Rb_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J.md ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Unit Tests for Stochastic Optimization
2
+
3
+ # Tom Schaul
4
+
5
+ # Ioannis Antonoglou
6
+
7
+ David Silver
8
+
9
+ DeepMind Technologies 130 Fenchurch Street, London, UK {tom,ioannis,david}@deepmind.com
10
+
11
+ # Abstract
12
+
13
+ Optimization by stochastic gradient descent is an important component of many large-scale machine learning algorithms. A wide variety of such optimization algorithms have been devised; however, it is unclear whether these algorithms are robust and widely applicable across many different optimization landscapes. In this paper we develop a collection of unit tests for stochastic optimization. Each unit test rapidly evaluates an optimization algorithm on a small-scale, isolated, and well-understood difficulty, rather than in real-world scenarios where many such issues are entangled. Passing these unit tests is not sufficient, but absolutely necessary for any algorithms with claims to generality or robustness. We give initial quantitative and qualitative results on numerous established algorithms. The testing framework is open-source, extensible, and easy to apply to new algorithms.
14
+
15
+ # 1 Introduction
16
+
17
+ Stochastic optimization [1] is among the most widely used components in large-scale machine learning, thanks to its linear complexity, efficient data usage, and often superior generalization [2, 3, 4]. In this context, numerous variants of stochastic gradient descent have been proposed, in order to improve performance, robustness, or reduce tuning effort [5, 6, 7, 8, 9]. These algorithms may derive from simplifying assumptions on the optimization landscape [10], but in practice, they tend to be used as general-purpose tools, often outside of the space of assumptions their designers intended. The troublesome conclusion is that practitioners find it difficult to discern where potential weaknesses of new (or old) algorithms may lie [11], and when they are applicable – an issue that is separate from raw performance. This results in essentially a trial-and-error procedure for finding the appropriate algorithm variant and hyper-parameter settings, every time that the dataset, loss function, regularization parameters, or model architecture change [12].
18
+
19
+ The objective of this paper is to establish a collection of benchmarks to evaluate stochastic optimization algorithms and guide algorithm design toward robust variants. Our approach is akin to unit testing, in that it evaluates algorithms on a very broad range of small-scale, isolated, and wellunderstood difficulties, rather than in real-world scenarios where many such issues are entangled. Passing these unit tests is not sufficient, but absolutely necessary for any algorithms with claims to generality or robustness. This is a similar approach to the very fruitful one taken by the black-box optimization community [13, 14].
20
+
21
+ The core assumption we make is that stochastic optimization algorithms are acting locally, that is, they aim for a short-term reduction in loss given the current noisy gradient information, and possibly some internal variables that capture local properties of the optimization landscape. These local actions include both approaching nearby optima, and navigating slopes, valleys or plateaus that are far from an optimum. The locality property stems from computational efficiency concerns, but it has the additional benefits of minimizing initialization bias and allowing for non-stationary optimization, because properties of the obervation surface observed earlier in the process (and their conseuences for the algorithm state) are quickly forgotten. We therefore concentrate on building local unit tests, that investigate algorithm dynamics on a broad range of local scenarios, because we expect that detecting local failure modes will flag an algorithm as unlikely to be robust on more complex tasks – and as a first approximation, optimization on such a complex task can be seen as a sequence of many smaller optimization problems (many of which will not have local optima).
22
+
23
+ ![](images/f14b3d6f0db7c2017f3921391274b02737a8918629e982e60ebf7c0f55b07c7b.jpg)
24
+ Figure 1: Some one-dimensional shape prototypes. The first six example shapes are atomic prototypes: a quadratic bowl, an absolute value, a cliff with a non differential point after which the derivative increases by a factor ten, a rectified linear shape followed by a bend, an inverse Gaussian, an inverse Laplacian. The next six example shapes are concatenations of atomic prototypes: a sigmoid as a concatenation of a non convex Gaussian a line and an exponential, a quadratic bowl followed by a cliff and then by an exponential function, a quadratic bowl followed by a cliff and another quadratic bowl, a sinusoid as a concatenation of quadratic bowls, a line followed by a Gaussian bowl, a quadratic bowl and a cliff and finally, a Laplace bowl followed by a cliff and another Laplace bowl.
25
+
26
+ Our divide-and-conquer approach consists of disentangling potential difficulties and testing them in isolation or in simple couplings. Given that our unit tests are small and quick to evaluate, we can have a much larger collection of them, testing hundreds of qualitatively different aspects in less time than it would take to optimize a single traditional benchmark to convergence, thus allowing us to spot and address potential weaknesses early.
27
+
28
+ Our main contribution is a testing framework, with unit tests designed to test aspects such as: discontinuous or non-differentiable surfaces, curvature scales, various noise conditions and outliers, saddle-points and plateaus, cliffs and asymmetry, and curl and bootstrapping. It also allows test cases to be concatenated by chaining them in a temporal series, or by combining them into multidimensional unit tests (with or without variable coupling). We give initial quantitative and qualitative results on a number of established algorithms.
29
+
30
+ We do not expect this to replace traditional benchmark domains that are closer to the real-world, but to complement it in terms of breadth and robustness. We have tried to keep the framework general and extendable, in the hope it will further grow in diversity, and help others in doing robust algorithm design.
31
+
32
+ # 2 Unit test Construction
33
+
34
+ Our testing framework is an open-source library containing a collection of unit tests and visualization tools. Each unit test is defined by a prototype function to be optimized, a prototypical scale, a noise prototype, and optionally a non-stationarity prototype. A prototype function is the concatenation of one or more local shape prototypes. A multi-dimensional unit test is a composition of onedimensional unit tests, optionally with a rotation prototype or curl prototype.
35
+
36
+ # 2.1 Shape Prototypes
37
+
38
+ Shape prototypes are functions defined on an interval, and our collection includes linear slopes (zero curvature), quadratic curves (fixed curvature), convex or concave curves (varying curvature), and curves with exponentially increasing or decreasing slope. Further, there are a number of nondifferentiable local shape prototypes (absolute value, rectified-linear, cliff). All of these occur in realistic learning scenarios, for example in logistic regression the loss surface is part concave and part convex, an MSE loss is the prototypical quadratic bowl, but then regularization such as L1 introduces non-differentiable bends (as do rectified-linear or maxout units in deep learning [15, 16]). Steep cliffs in the loss surface are a common occurrence when training recurrent neural networks, as discussed in [11]. See the top rows of Figure 1 for some examples of shape prototypes.
39
+
40
+ # 2.2 One-dimensional Concatenation
41
+
42
+ In our framework, we can chain together a number of shape prototypes, in such a way that the resulting function is continuous and differentiable at all junction points. We can thus produce many prototype functions that closely mimic existing functions, e.g., the Laplace function, sinusoids, saddlepoints, step-functions, etc. See the bottom rows of Figure 1 for some examples.
43
+
44
+ A single scale parameter determines the scaling of a concatenated function across all its shapes using the junction constraints. Varying the scales is an important aspect of testing robustness because it is not possible to guarantee well-scaled gradients without substantial overhead. In many learning problems, effort is put into proper normalization [17], but that is insufficient to guarantee homogeneous scaling, for example throughout all the layers of a deep neural network.
45
+
46
+ # 2.3 Noise Prototypes
47
+
48
+ The distinguishing feature of stochastic gradient optimization (compared to batch methods) is that it relies on sample gradients (coming from a subset of even a single element of the dataset) which are inherently noisy. In out unit tests, we model this by four types of stochasticity:
49
+
50
+ • Scale-independent additive Gaussian noise on the gradients, which is equivalent to random translations of inputs in a linear model with MSE loss. Note that this type of noise flips the sign of the gradient near the optimum and makes it difficult to approach precisely. Multiplicative (scale-dependent) Gaussian noise on the gradients, which multiplies the gradients by a positive random number (signs are preserved). This corresponds to a learning scenario where the loss curvature is different for different samples near the current point. • Additive zero-median Cauchy noise, mimicking the presence of outliers in the dataset. • Mask-out noise, which zeros the gradient (independently for each dimension) with a certain probability. This mimics both training with drop-out [18], and scenarios with rectified linear units where a unit will be inactive for some input samples, but not for others.
51
+
52
+ For the first three, we can vary the noise scale, while for mask-out we pick a drop-out frequency. This noise is not necessarily unbiased (as in the Cauchy case), breaking common assumptions made in algorithm design (but the modifications in section 2.5 are even worse). See Figure 2 for an illustration of the first two noise prototypes. Noise prototypes and prototype functions can be combined independently into one-dimensional unit tests.
53
+
54
+ ![](images/506088503700b5806cf79203f514873534687e1c86ed16c5d3bb931076328867.jpg)
55
+ Figure 2: Examples of noise applied on prototype functions, green dashed are typical sample gradients, and the standard deviation range is the blue area. The upper two subplots depict Gaussian additive noise, while the lower two show Gaussian multiplicative noise. In the left column, the noise is applied to the gradients of a quadratic bowl prototype (note how the multiplicative noise goes to zero around the optimum in the middle), and on the right it is applied to a concatenation of prototypes.
56
+
57
+ # 2.4 Multi-dimensional Composition
58
+
59
+ A whole range of difficulties for optimization only exist in higher dimensional parameter spaces (e.g., saddle points, conditoning, correlation). Therefore, we build high-dimensional unit tests by composing together one-dimensional unit tests. For example for two one-dimensional prototype shapes $\mathcal { L } _ { a }$ and $\mathcal { L } _ { b }$ combined with a $p$ -norm, the composition is $\begin{array} { r } { \mathcal { L } _ { ( a , b ) } ( \theta ) = ( \mathcal { L } _ { a } ( \theta _ { 1 } ) ^ { p } + \mathcal { L } _ { b } ( \theta _ { 2 } ) ^ { p } ) ^ { \frac { 1 } { p } } } \end{array}$ . Noise prototypes are composed independently of shape prototypes. While they may be composed of concatenated one-dimensional prototypes, higher-dimensional prototypes are not concatenated themselves. Various levels of conditioning can be achieved by having dramatically different scales in different component dimensions.
60
+
61
+ In addition to the choice of prototypes to be combined, and their scale, we permit a rotation in input space, which couples the dimensions together and avoids axis-alignment. These rotations are particularly important for testing diagonal/element-wise optimization algorithms.
62
+
63
+ # 2.5 Curl
64
+
65
+ In reinforcement learning a value function (the expected discounted reward for each state) can be learned using temporal-difference learning (TD), an update procedure that uses bootstrapping: i.e. it pulls the value of the current state towards the value of its successor state [19]. These stochastic update directions are not proper gradients of any scalar energy field [20], but they still form a (more general) vector field with non-zero curl, where the objective for the optimization algorithm is to converge to its fixed-point(s). See Figure 4 for a detailed example. We implemented this aspect by allowing different amounts of curl to be added on top of a multi-dimensional vector field in our unit tests, which is done by rotating the produced gradient vectors using a fixed rotation matrix. This is reasonably realistic; in fact, for the TD example in Figure 4, the resulting vector field is exactly the gradient field of a quadratic combined with a (small-angle) rotation.
66
+
67
+ # 2.6 Non-stationarity
68
+
69
+ In many settings it is necessary to optimize a non-stationary objective function. This may typically occur in a non-stationary task where the problem to be solved changes over time. However, nonstationary optimization can even be important in large stationary tasks (with temporal structure in the samples), when the algorithm chooses to track a particular dynamic aspect of the problem, rather than attempting to converge to a global but static solution of the problem [21]. In addition, reinforcement learning (RL) tasks often involve non-stationary optimization. For example, many RL algorithms proceed by evaluating the value function using the TD algorithm described in the previous section. This results in two sources of non-stationarity: the target value changes at every step (resulting in the previously described curl); and also the state distribution changes as the value function improves and better actions are selected. These scenarios can be therefore be viewed as non-stationary loss functions, but whose optimum moves as a function of the current parameter values.
70
+
71
+ ![](images/c499d54b95076dc38072d7c065a7038b4b38eedd8e01116bcdf75e6a5820c2b2.jpg)
72
+ Figure 3: Examples of multivariate prototypes. The first subplot depicts an asymmetric quadratic bowl with correlated dimensions, the second a surface with a saddle point, the third a sharp valley surface, the fourth a half-pipe surface where the first dimension is a line and the second one a quadratic bowl. The fifth subplot depicts a surface with an ill conditioned minimum in the point where the two canyons overlap. The surface in the last subplot is the composition of a quadratic bowl in the first dimension and of a cliff in the second.
73
+
74
+ ![](images/fc0c8ec15c37bd504b5686efed19778eab13973e72bbbf0e0ed2f67eb8467687.jpg)
75
+ Figure 4: Here, we consider a very simple Markov process, with two states and stochastic transitions between them, and a reward of 0 in the first and of 1 in the second state. Consider the parameters of our optimization $\theta$ to be the two state values. Each TD update changes one of them, depending on the stochastic transition observed. In this figure, we plot the vector field of expected update directions (blue arrows) as a function of $\theta$ , as well as one sampled trajectory of the TD algorithm. Note how this vector field is not actually a gradient field, but instead has substantial curl, making it a challenging stochastic optimization task.
76
+
77
+ We test non-stationarity in three different ways. We let the location of the optimum move smoothly, via random translations of the parameter space, or we let the the scale of the shape prototype vary randomly (on average by $10 \%$ in each direction), or, on noisy unit tests, we let the scale of the noise vary randomly. Currently, these changes happen once every 10 steps. A type of non-stationarity that involves more abrupt switching is discussed in section 4.1.
78
+
79
+ # 3 Experiments
80
+
81
+ # 3.1 Setup and Algorithms
82
+
83
+ For our experiments, we test the candidate algorithms on over 3000 unit tests, with up to 10 parameter dimensions. Each algorithm-unit test pairing is repeated 10 times, but with reusing the same 10 random seeds across all algorithms and setups. For eat the parameter value reached after 100 update steps $k$ te the true expected loss. $\mathcal { L } ^ { ( k ) } = \mathbb { E } \left[ \mathcal { L } \left( \theta _ { 1 0 0 } ^ { ( k ) } \right) \right]$
84
+
85
+ The algorithms evaluated are SGD with fixed learning rate $\eta _ { 0 } \in [ 1 0 ^ { - 6 } , 1 0 ]$ , SGD with annealing with decay factor in $[ 1 0 ^ { - 2 } , 1 ]$ and initial rates $\eta _ { 0 }$ , SGD with momentum (regular or Nesterov’s variant [22]) [0.1, 0.999] and initial rates $\eta _ { 0 }$ , SGD with parameter averaging $[ ]$ with decay term in $[ 1 0 ^ { - 4 } , 0 . 5 ]$ and exponent in $\left\{ { \frac { 1 } { 2 } } , { \frac { 3 } { 4 } } , 1 \right\}$ , ADAGRAD [10] with initial rates $\eta _ { 0 }$ , ADADELTA [23] with decay parameter $( 1 - \gamma ) \in [ 1 0 ^ { - 4 } , 0 . 5 ]$ and regularizer in $[ 1 0 ^ { - 6 } , 1 0 ^ { - 2 }$ , the incremental delta-bardelta algorithm (IDBD [24]), RPROP [25] with initial stepsizes $\eta _ { 0 }$ , RMSprop [26] with minimal learning rates $\eta _ { 0 }$ , maximal learning rates in $[ 1 0 , 1 0 ^ { 3 } ]$ and decay parameter $\gamma$ , as well as conjugate gradients. For the hyper-parameters ranges, we always consider one value per order of magnitude, and exhaustively sweep all combinations.
86
+
87
+ # 3.2 Reference performance
88
+
89
+ Each unit test is associated with a reference performance $\mathcal { L } _ { s g d }$ , and a corresponding reference learning rate $\eta _ { b e s t }$ that is determined by doing a parameter sweep over all fixed learning rates for SGD (34 values log-uniform between $1 \dot { 0 } ^ { - 1 0 }$ and 10) and retaining the best-performing one.
90
+
91
+ In our aggregate plots, unit tests are sorted (per group) by their reference learning rate, i.e., those that require small steps on the left, and those where large steps are best on the right. Algorithm setups are sorted as well, on the vertical axis, by their median performance on a reference unit test (quadratic, additive noise).
92
+
93
+ # 3.3 Qualitative Evaluation
94
+
95
+ The algorithm performance $\mathcal { L } ^ { ( k ) }$ is converted to a normalized value $\begin{array} { r } { \mathcal { L } _ { n o r m } ^ { ( k ) } = \frac { \mathcal { L } ^ { ( k ) } - \mathcal { L } _ { i n i t } } { \mathcal { L } _ { s g d } - \mathcal { L } _ { i n i t } } } \end{array}$ where ${ \mathcal { L } } _ { i n i t } = \mathbb { E } [ { \mathcal { L } } ( \theta _ { 0 } ) ]$ is the expected loss value at the initial point, similar to the approach taken in [27], but even more condensed. In other words, a normalized value near zero corresponds to no progress, negative denotes divergence, and a value near one is equivalent to the best SGD. Based on these results, we assign a qualitative color value to the performance of each algorithm setup on each unit test, to able to represent it in a single pixel in the resulting figures:
96
+
97
+ • Red: Divergence or numerical instability in all run.
98
+ • Violet: Divergence or numerical instability in at least one run.
99
+ • Orange: Insufficient progress: median $( \mathcal { L } _ { n o r m } ) < 0 . 1$
100
+ • Yellow: Good progress: median $( \mathcal { L } _ { n o r m } ) > 0 . 1$ and high variability: $\mathcal { L } _ { n o r m } < 0 . 1$ for at least $\textstyle { \frac { 1 } { 4 } }$ of the runs.
101
+ • Green: Good progress: median $( \mathcal { L } _ { n o r m } ) > 0 . 1$ and low variability: $\mathcal { L } _ { n o r m } < 0 . 1$ for at most $\textstyle { \frac { 1 } { 4 } }$ of the runs.
102
+ • Blue: Excellent progress: median $( { \mathcal { L } } _ { n o r m } ) > 2$ .
103
+
104
+ # 3.4 Results
105
+
106
+ Figures 5 and 6 shows the qualitative results of all algorithm variants on all the unit tests. There is a wealth of information in these visualizations. For example the relatively scarce amount of blue indicate that it is difficult to substantially beat well-tuned SGD in performance on most unit tests. Another unsurprising conclusion is that hyper-parameter tuning matters much less for the adaptive algorithms (ADAGRAD, ADADELTA, RPROP, RMSprop) than for the non-adaptive SGD variants. Also, while some unit tests are more tricky than others on average, there is quite some diversity in the sense that some algorithms may outdo SGD on a unit test where other algorithms fail (especially on the non-differentiable functions).
107
+
108
+ # 4 Realism and Future Work
109
+
110
+ We do not expect to replace real-world benchmark domains, but rather to complement them with our suite of unit tests. Still, it is important to have sufficient coverage of the types of potential difficulties encountered in realistic settings. To a much lesser degree, we may not want to clutter the test suite with unit tests that measure issues which never occur in realistic problems.
111
+
112
+ It is not straightforward to map very high-dimensional real-world loss functions down to lowdimensional prototype shapes, but it is not impossible. For example, in Figure 8 we show some random projections in parameter space of the loss function in an MNIST classification task with an MLP [28]. We defer a fuller investigation of this type, namely obtaining statistics on how commonly different prototypes are occurring, to future work.
113
+
114
+ However, the unit tests capture the properties of some examples that can be analyzed. One of them was discussed in section 2.5, another one is the simple loss function of a one-dimensional autoencoder:
115
+
116
+ $$
117
+ \mathcal { L } _ { \boldsymbol { \theta } } ( \boldsymbol { x } ) = \left( \boldsymbol { x } + \boldsymbol { \theta } _ { 2 } \cdot \boldsymbol { \sigma } ( \boldsymbol { x } \cdot \boldsymbol { \theta } _ { 1 } ) \right) ^ { 2 }
118
+ $$
119
+
120
+ where $\sigma$ is the sigmoid function. Even in the absence of noise, this minimal scenario has a saddlepoint near $\theta = ( 0 , 0 )$ , a plateau shape away from the axes, a cliff shape near the vertical axis, and a correlated valley near $\bar { \theta } = ( 1 , 1 )$ , as illustrated in Figure 7. All of these prototypical shapes are included in our set of unit tests.
121
+
122
+ An alternative approach is predictive: if the performance on the unit tests is highly predictive of an algorithm’s performance on a some real-world task, then those unit tests must be capturing the essential aspects of the task. Again, building such a predictor is an objective for future work.
123
+
124
+ # 4.1 Algorithm Dynamics
125
+
126
+ Our long-term objective is to be able to do systematic testing and a full investigation of the optimization dynamics for a given algorithm. Of course, it is not possible to test it exhaustively on all possible loss functions (because there are infinitely many), but a divide-and-conquer approach may be the next best thing. For this, we introduce the notion of algorithm state, which is changing during optimization (e.g., the current stepsize or momentum). Now, a long optimization process can be seen as the chaining of a number of unit tests, while preserving the algorithm state in-between them. Our hypothesis is that the set of all possible chains of unit tests in our collection covers most of the qualitatively different (stationary or non-stationary) loss functions an optimization algorithm may encounter.
127
+
128
+ To evaluate an algorithm’s robustness (rather than its expected performance), we can assume that an adversary picks the worst-case unit tests at each step in the sequence. An algorithm is only truly robust if it does not diverge under any sequence of unit tests. Besides the worst-case, we may also want to study typical expected behavior, namely whether the dynamics have an attractor in the algorithm’s state space. If an attractor exists where the algorithm is stable, then it becomes useful to look at the secondary criterion for the algorithm, namely its expected (normalized) performance.
129
+
130
+ ![](images/f60e1f785661b9849aa84b85d25b947a590f3c6bdf6a36b49373dae75c361235.jpg)
131
+
132
+ ![](images/4d1f5a08230b342b05198e8f1a2cc85b5d7a53c1de436297e41279c35d686aa8.jpg)
133
+
134
+ ![](images/f720ad6d5f34d39e18934886609bf2dd1270a688327fb4bfe2138e161fbba508.jpg)
135
+ Figure 7: Illustration of the loss surface of a one-dimensional auto-encoder, as defined in the text, where the darkest blue corresponds to the lowest loss. Left: from the zoomed-out perspective if appears to be roughly a vertical valley, leading an optimizer toward the y-axis from almost anywhere in the space. Center: the zoomed-in perspective around the origin, which is looking like a prototypical saddle point. Right: the shape of the valley in the lower left quadrant, the walls of which become steeper the more the search progresses.
136
+
137
+ ![](images/26cc29179b3ead1060589ded203c34d428470b0640c1be4f01cb06c98778ea4f.jpg)
138
+ Figure 8: Left: collection of 64 random projections into two dimensions of the MNIST loss surface (based on one randomly sampled digit for each column). The projections are centered around the weights learned after one epoch of training, and different projections are plotted on scales between 0.05 (top row) and 0.5 (bottom row). Right: the same as on the left, but with axis-aligned projections.
139
+
140
+ We conjecture that this analysis may lead to novel insights into how to design robust and adaptive optimization algorithms.
141
+
142
+ # 5 Conclusion
143
+
144
+ This paper established a large collection of simple comparative benchmarks to evaluate stochastic optimization algorithms, on a broad range of small-scale, isolated, and well-understood difficulties. This approach helps disentangle issues that tend to be confounded in real-world scenarios, while retaining realistic properties. Our initial results on a dozen established algorithms (under a variety of different hyperparameter settings) show that robustness is non-trivial, and that different algorithms struggle on different unit tests. The testing framework is open-source, extensible to new function classes, and easy to use for evaluating the robustness of new algorithms.
145
+
146
+ The full source code (see also Appendix A) is available under BSD license at:
147
+
148
+ https://github.com/IoannisAntonoglou/optimBench
149
+
150
+ # Acknowledgements
151
+
152
+ We thank the anonymous ICLR reviewers for their many constructive comments.
153
+
154
+ # References
155
+
156
+ [1] H. Robbins and S. Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22:400–407, 1951.
157
+ [2] Leon Bottou. Online Algorithms and Stochastic Approximations. In David Saad, editor, ´ Online Learning and Neural Networks. Cambridge University Press, Cambridge, UK, 1998.
158
+ [3] Leon Bottou and Yann LeCun. Large Scale Online Learning. In Sebastian Thrun, Lawrence ´ Saul, and Bernhard Scholkopf, editors, ¨ Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004.
159
+ [4] Leon Bottou and Olivier Bousquet. The Tradeoffs of Large Scale Learning. In J.C. Platt, ´ D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems, volume 20, pages 161–168. NIPS Foundation (http://books.nips.cc), 2008.
160
+ [5] A. Benveniste, M. Metivier, and P. Priouret. Adaptive Algorithms and Stochastic Approximations. Springer Verlag, Berlin, New York, 1990.
161
+ [6] N. Le Roux, P.A. Manzagol, and Y. Bengio. Topmoumoute online natural gradient algorithm, 2008.
162
+ [7] Antoine Bordes, Leon Bottou, and Patrick Gallinari. SGD-QN: Careful Quasi-Newton ´ Stochastic Gradient Descent. Journal of Machine Learning Research, 10:1737–1754, July 2009. [8] Wei Xu. Towards Optimal One Pass Large Scale Learning with Averaged Stochastic Gradient Descent. ArXiv-CoRR, abs/1107.2490, 2011.
163
+ [9] Tom Schaul, Sixin Zhang, and Yann LeCun. No More Pesky Learning Rates. In International Conference on Machine Learning (ICML), 2013.
164
+ [10] John C. Duchi, Elad Hazan, and Yoram Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. 2010.
165
+ [11] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. Understanding the exploding gradient problem. arXiv preprint arXiv:1211.5063, 2012.
166
+ [12] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In G. Orr and Muller K., editors, Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), pages 249–256. Society for Artificial Intelligence and Statistics, 2010.
167
+ [13] Nikolaus Hansen, Anne Auger, Steffen Finck, Raymond Ros, et al. Real-parameter black-box optimization benchmarking 2010: Experimental setup. 2010.
168
+ [14] Nikolaus Hansen, Anne Auger, Raymond Ros, Steffen Finck, and Petr Posˇ´ık. Comparing results of 31 algorithms from the black-box optimization benchmarking BBOB-2009. In Proceedings of the 12th annual conference companion on Genetic and evolutionary computation, pages 1689–1696. ACM, 2010.
169
+ [15] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pages 1106–1114, 2012.
170
+ [16] Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013.
171
+ [17] Y. LeCun, L. Bottou, G. Orr, and K. Muller. Efficient BackProp. In G. Orr and Muller K., editors, Neural Networks: Tricks of the trade. Springer, 1998.
172
+ [18] Geoffrey E Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012.
173
+ [19] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. IEEE Transactions on Neural Networks, 9(5):1054–1054, Sep 1998.
174
+ [20] Etienne Barnard. Temporal-difference methods and Markov models. IEEE Transactions on Systems, Man, and Cybernetics, 23(2):357–365, 1993.
175
+ [21] Richard S. Sutton, Anna Koop, and David Silver. On the role of tracking in stationary environments. In Proceedings of the Twenty-Fourth International Conference on Machine Learning (ICML 2007, pages 871–878. ACM Press, 2007.
176
+ [22] Yurii Nesterov and Arkadii Semenovich Nemirovskii. Interior-point polynomial algorithms in convex programming, volume 13. SIAM, 1994.
177
+ [23] Matthew D Zeiler. ADADELTA: An Adaptive Learning Rate Method. arXiv preprint arXiv:1212.5701, 2012.
178
+ [24] Richard S Sutton. Adapting bias by gradient descent: An incremental version of delta-bardelta. In AAAI, pages 171–176, 1992.
179
+ [25] Martin Riedmiller and Heinrich Braun. A direct adaptive method for faster backpropagation learning: The RPROP algorithm. In Neural Networks, 1993., IEEE International Conference on, pages 586–591. IEEE, 1993.
180
+ [26] T Tieleman and G Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012.
181
+ [27] Tom Schaul and Yann LeCun. Adaptive learning rates and parallelization for stochastic, sparse, non-smooth gradients. In International Conference on Learning Representations, Scottsdale, AZ, 2013.
182
+ [28] Yann LeCun and Corinna Cortes. The MNIST dataset of handwritten digits. 1998. http://yann.lecun.com/exdb/mnist/.
183
+
184
+ # A Appendix: Framework Software
185
+
186
+ As part of this work a software framework was developed for the computing and managing all the results obtained for all the different configurations of function prototypes and algorithms. The main component of the system is a database where all the results are stored and can be easily retrieved by querying the database accordingly. The building blocks of this database are the individual experiments, where each experiment is associated to a unit test and an algorithm with fixed parameters. An instance of an experiment database can either be loaded from the disk, or it can be created on the fly by running the associated experiments as needed. The code below creates a database and runs all the experiments for all the readily available algorithms and default unit tests, and then saves them to disk:
187
+
188
+ require ’experiment’ local db $=$ experimentsDB() db:runExperiments() db:save(’experimentsDB’)
189
+
190
+ This database now can be loaded from the disk, and the user can query it in order to retrieve specific experiments, using filters. An example is shown below:
191
+
192
+ local db $=$ experimentsDB()
193
+ db:load(’experimentsDB’)
194
+ local experiments $=$ db:filter({fun ${ } = { }$ {’quad’, ’line’}, $\mathsf { a l g o } \mathrm { = } \{ \mathsf { \Omega } ^ { \prime } \mathsf { s g d } ^ { \prime } \mathsf { \Omega } \}$ , learningRat $\scriptstyle \mathtt { e } = 1 \in - 4 \ \}$ )
195
+
196
+ The code above loads an experiment database from the disk and it retrieves all the experiments for all the quadratic and line prototype shapes, for all different types of noise and all scales, further selecting the subset of experiments to those optimized using SGD with learningRate equal to 1e4. The user can rerun the extracted experiments or have access to the associated results, i.e., the expected value of the function in different optimization steps, along with the associated parameters values. In order to qualitatively assess the results the following code can be used:
197
+
198
+ The code above computes the reference expected values for each prototype function, it removes the experiments for which no reference value is available, then it qualitatively assesses the performance of all the available experiments and finally it plots the results given the color configuration described in section 3.3. It is really easy to add a new algorithm in the database in order to evaluate its robustness. The code below illustrates a simple example:
199
+
200
+ db:addAlgorithm(algoname, algofun, opt) db:testAlgorithm(algoname) db:plotExperiments({}, {algoname})
201
+
202
+ Here a new algorithm with name algoname, function instance algo (which should satisfy the optim interface), and a table of different parameter configurations opt is added to the database and it is tested under all available functions prototypes. Finally, the last line plots a graph with all the results for this algorithm.
203
+
204
+ It is also possible to add a set of new unit tests to the database, and subsequently run a set of experiments associated with them. There are different parameters to be defined for the creation of a set of unit tests (that allow wildcard specification too):
205
+
206
+ 1. the concatenated shape prototypes for each dimension,
207
+ 2. the noise prototype to be applied to each dimension,
208
+ 3. the scale of each dimension of the function,
209
+ 4. in case of multivariate unit tests, a parameter specifies which $p$ -norm is used for the com
210
+ bination,
211
+ 5. a rotation parameter that induces correlation of the different parameter dimensions, and
212
+ 6. a curl parameter that changes the vector field of a multivariate function.
parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_content_list.json ADDED
@@ -0,0 +1,1023 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Unit Tests for Stochastic Optimization ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 267,
8
+ 135,
9
+ 730,
10
+ 160
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tom Schaul ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 212,
20
+ 213,
21
+ 295,
22
+ 228
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Ioannis Antonoglou ",
29
+ "text_level": 1,
30
+ "bbox": [
31
+ 428,
32
+ 213,
33
+ 566,
34
+ 228
35
+ ],
36
+ "page_idx": 0
37
+ },
38
+ {
39
+ "type": "text",
40
+ "text": "David Silver ",
41
+ "bbox": [
42
+ 697,
43
+ 213,
44
+ 784,
45
+ 227
46
+ ],
47
+ "page_idx": 0
48
+ },
49
+ {
50
+ "type": "text",
51
+ "text": "DeepMind Technologies 130 Fenchurch Street, London, UK {tom,ioannis,david}@deepmind.com ",
52
+ "bbox": [
53
+ 341,
54
+ 241,
55
+ 653,
56
+ 284
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Abstract ",
63
+ "text_level": 1,
64
+ "bbox": [
65
+ 462,
66
+ 319,
67
+ 535,
68
+ 335
69
+ ],
70
+ "page_idx": 0
71
+ },
72
+ {
73
+ "type": "text",
74
+ "text": "Optimization by stochastic gradient descent is an important component of many large-scale machine learning algorithms. A wide variety of such optimization algorithms have been devised; however, it is unclear whether these algorithms are robust and widely applicable across many different optimization landscapes. In this paper we develop a collection of unit tests for stochastic optimization. Each unit test rapidly evaluates an optimization algorithm on a small-scale, isolated, and well-understood difficulty, rather than in real-world scenarios where many such issues are entangled. Passing these unit tests is not sufficient, but absolutely necessary for any algorithms with claims to generality or robustness. We give initial quantitative and qualitative results on numerous established algorithms. The testing framework is open-source, extensible, and easy to apply to new algorithms. ",
75
+ "bbox": [
76
+ 233,
77
+ 351,
78
+ 764,
79
+ 503
80
+ ],
81
+ "page_idx": 0
82
+ },
83
+ {
84
+ "type": "text",
85
+ "text": "1 Introduction ",
86
+ "text_level": 1,
87
+ "bbox": [
88
+ 174,
89
+ 530,
90
+ 310,
91
+ 546
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "Stochastic optimization [1] is among the most widely used components in large-scale machine learning, thanks to its linear complexity, efficient data usage, and often superior generalization [2, 3, 4]. In this context, numerous variants of stochastic gradient descent have been proposed, in order to improve performance, robustness, or reduce tuning effort [5, 6, 7, 8, 9]. These algorithms may derive from simplifying assumptions on the optimization landscape [10], but in practice, they tend to be used as general-purpose tools, often outside of the space of assumptions their designers intended. The troublesome conclusion is that practitioners find it difficult to discern where potential weaknesses of new (or old) algorithms may lie [11], and when they are applicable – an issue that is separate from raw performance. This results in essentially a trial-and-error procedure for finding the appropriate algorithm variant and hyper-parameter settings, every time that the dataset, loss function, regularization parameters, or model architecture change [12]. ",
98
+ "bbox": [
99
+ 174,
100
+ 563,
101
+ 825,
102
+ 714
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "The objective of this paper is to establish a collection of benchmarks to evaluate stochastic optimization algorithms and guide algorithm design toward robust variants. Our approach is akin to unit testing, in that it evaluates algorithms on a very broad range of small-scale, isolated, and wellunderstood difficulties, rather than in real-world scenarios where many such issues are entangled. Passing these unit tests is not sufficient, but absolutely necessary for any algorithms with claims to generality or robustness. This is a similar approach to the very fruitful one taken by the black-box optimization community [13, 14]. ",
109
+ "bbox": [
110
+ 174,
111
+ 722,
112
+ 825,
113
+ 819
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "The core assumption we make is that stochastic optimization algorithms are acting locally, that is, they aim for a short-term reduction in loss given the current noisy gradient information, and possibly some internal variables that capture local properties of the optimization landscape. These local actions include both approaching nearby optima, and navigating slopes, valleys or plateaus that are far from an optimum. The locality property stems from computational efficiency concerns, but it has the additional benefits of minimizing initialization bias and allowing for non-stationary optimization, because properties of the obervation surface observed earlier in the process (and their conseuences for the algorithm state) are quickly forgotten. We therefore concentrate on building local unit tests, that investigate algorithm dynamics on a broad range of local scenarios, because we expect that detecting local failure modes will flag an algorithm as unlikely to be robust on more complex tasks – and as a first approximation, optimization on such a complex task can be seen as a sequence of many smaller optimization problems (many of which will not have local optima). ",
120
+ "bbox": [
121
+ 174,
122
+ 827,
123
+ 823,
124
+ 924
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "image",
130
+ "img_path": "images/f14b3d6f0db7c2017f3921391274b02737a8918629e982e60ebf7c0f55b07c7b.jpg",
131
+ "image_caption": [
132
+ "Figure 1: Some one-dimensional shape prototypes. The first six example shapes are atomic prototypes: a quadratic bowl, an absolute value, a cliff with a non differential point after which the derivative increases by a factor ten, a rectified linear shape followed by a bend, an inverse Gaussian, an inverse Laplacian. The next six example shapes are concatenations of atomic prototypes: a sigmoid as a concatenation of a non convex Gaussian a line and an exponential, a quadratic bowl followed by a cliff and then by an exponential function, a quadratic bowl followed by a cliff and another quadratic bowl, a sinusoid as a concatenation of quadratic bowls, a line followed by a Gaussian bowl, a quadratic bowl and a cliff and finally, a Laplace bowl followed by a cliff and another Laplace bowl. "
133
+ ],
134
+ "image_footnote": [],
135
+ "bbox": [
136
+ 205,
137
+ 114,
138
+ 787,
139
+ 431
140
+ ],
141
+ "page_idx": 1
142
+ },
143
+ {
144
+ "type": "text",
145
+ "text": "",
146
+ "bbox": [
147
+ 174,
148
+ 623,
149
+ 825,
150
+ 694
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Our divide-and-conquer approach consists of disentangling potential difficulties and testing them in isolation or in simple couplings. Given that our unit tests are small and quick to evaluate, we can have a much larger collection of them, testing hundreds of qualitatively different aspects in less time than it would take to optimize a single traditional benchmark to convergence, thus allowing us to spot and address potential weaknesses early. ",
157
+ "bbox": [
158
+ 174,
159
+ 700,
160
+ 825,
161
+ 770
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "Our main contribution is a testing framework, with unit tests designed to test aspects such as: discontinuous or non-differentiable surfaces, curvature scales, various noise conditions and outliers, saddle-points and plateaus, cliffs and asymmetry, and curl and bootstrapping. It also allows test cases to be concatenated by chaining them in a temporal series, or by combining them into multidimensional unit tests (with or without variable coupling). We give initial quantitative and qualitative results on a number of established algorithms. ",
168
+ "bbox": [
169
+ 174,
170
+ 776,
171
+ 825,
172
+ 861
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "We do not expect this to replace traditional benchmark domains that are closer to the real-world, but to complement it in terms of breadth and robustness. We have tried to keep the framework general and extendable, in the hope it will further grow in diversity, and help others in doing robust algorithm design. ",
179
+ "bbox": [
180
+ 174,
181
+ 867,
182
+ 823,
183
+ 924
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "2 Unit test Construction ",
190
+ "text_level": 1,
191
+ "bbox": [
192
+ 174,
193
+ 102,
194
+ 392,
195
+ 118
196
+ ],
197
+ "page_idx": 2
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "Our testing framework is an open-source library containing a collection of unit tests and visualization tools. Each unit test is defined by a prototype function to be optimized, a prototypical scale, a noise prototype, and optionally a non-stationarity prototype. A prototype function is the concatenation of one or more local shape prototypes. A multi-dimensional unit test is a composition of onedimensional unit tests, optionally with a rotation prototype or curl prototype. ",
202
+ "bbox": [
203
+ 174,
204
+ 137,
205
+ 825,
206
+ 207
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "2.1 Shape Prototypes ",
213
+ "text_level": 1,
214
+ "bbox": [
215
+ 174,
216
+ 228,
217
+ 334,
218
+ 243
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "Shape prototypes are functions defined on an interval, and our collection includes linear slopes (zero curvature), quadratic curves (fixed curvature), convex or concave curves (varying curvature), and curves with exponentially increasing or decreasing slope. Further, there are a number of nondifferentiable local shape prototypes (absolute value, rectified-linear, cliff). All of these occur in realistic learning scenarios, for example in logistic regression the loss surface is part concave and part convex, an MSE loss is the prototypical quadratic bowl, but then regularization such as L1 introduces non-differentiable bends (as do rectified-linear or maxout units in deep learning [15, 16]). Steep cliffs in the loss surface are a common occurrence when training recurrent neural networks, as discussed in [11]. See the top rows of Figure 1 for some examples of shape prototypes. ",
225
+ "bbox": [
226
+ 174,
227
+ 257,
228
+ 825,
229
+ 382
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "text",
235
+ "text": "2.2 One-dimensional Concatenation ",
236
+ "text_level": 1,
237
+ "bbox": [
238
+ 176,
239
+ 404,
240
+ 436,
241
+ 419
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "In our framework, we can chain together a number of shape prototypes, in such a way that the resulting function is continuous and differentiable at all junction points. We can thus produce many prototype functions that closely mimic existing functions, e.g., the Laplace function, sinusoids, saddlepoints, step-functions, etc. See the bottom rows of Figure 1 for some examples. ",
248
+ "bbox": [
249
+ 174,
250
+ 433,
251
+ 823,
252
+ 488
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "A single scale parameter determines the scaling of a concatenated function across all its shapes using the junction constraints. Varying the scales is an important aspect of testing robustness because it is not possible to guarantee well-scaled gradients without substantial overhead. In many learning problems, effort is put into proper normalization [17], but that is insufficient to guarantee homogeneous scaling, for example throughout all the layers of a deep neural network. ",
259
+ "bbox": [
260
+ 174,
261
+ 494,
262
+ 823,
263
+ 565
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "2.3 Noise Prototypes ",
270
+ "text_level": 1,
271
+ "bbox": [
272
+ 176,
273
+ 587,
274
+ 330,
275
+ 602
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "The distinguishing feature of stochastic gradient optimization (compared to batch methods) is that it relies on sample gradients (coming from a subset of even a single element of the dataset) which are inherently noisy. In out unit tests, we model this by four types of stochasticity: ",
282
+ "bbox": [
283
+ 176,
284
+ 614,
285
+ 823,
286
+ 657
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "• Scale-independent additive Gaussian noise on the gradients, which is equivalent to random translations of inputs in a linear model with MSE loss. Note that this type of noise flips the sign of the gradient near the optimum and makes it difficult to approach precisely. Multiplicative (scale-dependent) Gaussian noise on the gradients, which multiplies the gradients by a positive random number (signs are preserved). This corresponds to a learning scenario where the loss curvature is different for different samples near the current point. • Additive zero-median Cauchy noise, mimicking the presence of outliers in the dataset. • Mask-out noise, which zeros the gradient (independently for each dimension) with a certain probability. This mimics both training with drop-out [18], and scenarios with rectified linear units where a unit will be inactive for some input samples, but not for others. ",
293
+ "bbox": [
294
+ 215,
295
+ 671,
296
+ 825,
297
+ 839
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "For the first three, we can vary the noise scale, while for mask-out we pick a drop-out frequency. This noise is not necessarily unbiased (as in the Cauchy case), breaking common assumptions made in algorithm design (but the modifications in section 2.5 are even worse). See Figure 2 for an illustration of the first two noise prototypes. Noise prototypes and prototype functions can be combined independently into one-dimensional unit tests. ",
304
+ "bbox": [
305
+ 174,
306
+ 854,
307
+ 823,
308
+ 922
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "image",
314
+ "img_path": "images/506088503700b5806cf79203f514873534687e1c86ed16c5d3bb931076328867.jpg",
315
+ "image_caption": [
316
+ "Figure 2: Examples of noise applied on prototype functions, green dashed are typical sample gradients, and the standard deviation range is the blue area. The upper two subplots depict Gaussian additive noise, while the lower two show Gaussian multiplicative noise. In the left column, the noise is applied to the gradients of a quadratic bowl prototype (note how the multiplicative noise goes to zero around the optimum in the middle), and on the right it is applied to a concatenation of prototypes. "
317
+ ],
318
+ "image_footnote": [],
319
+ "bbox": [
320
+ 269,
321
+ 101,
322
+ 727,
323
+ 348
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "2.4 Multi-dimensional Composition ",
330
+ "text_level": 1,
331
+ "bbox": [
332
+ 176,
333
+ 478,
334
+ 433,
335
+ 493
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "A whole range of difficulties for optimization only exist in higher dimensional parameter spaces (e.g., saddle points, conditoning, correlation). Therefore, we build high-dimensional unit tests by composing together one-dimensional unit tests. For example for two one-dimensional prototype shapes $\\mathcal { L } _ { a }$ and $\\mathcal { L } _ { b }$ combined with a $p$ -norm, the composition is $\\begin{array} { r } { \\mathcal { L } _ { ( a , b ) } ( \\theta ) = ( \\mathcal { L } _ { a } ( \\theta _ { 1 } ) ^ { p } + \\mathcal { L } _ { b } ( \\theta _ { 2 } ) ^ { p } ) ^ { \\frac { 1 } { p } } } \\end{array}$ . Noise prototypes are composed independently of shape prototypes. While they may be composed of concatenated one-dimensional prototypes, higher-dimensional prototypes are not concatenated themselves. Various levels of conditioning can be achieved by having dramatically different scales in different component dimensions. ",
342
+ "bbox": [
343
+ 173,
344
+ 505,
345
+ 825,
346
+ 619
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "In addition to the choice of prototypes to be combined, and their scale, we permit a rotation in input space, which couples the dimensions together and avoids axis-alignment. These rotations are particularly important for testing diagonal/element-wise optimization algorithms. ",
353
+ "bbox": [
354
+ 176,
355
+ 627,
356
+ 821,
357
+ 670
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "2.5 Curl ",
364
+ "text_level": 1,
365
+ "bbox": [
366
+ 174,
367
+ 686,
368
+ 246,
369
+ 700
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "In reinforcement learning a value function (the expected discounted reward for each state) can be learned using temporal-difference learning (TD), an update procedure that uses bootstrapping: i.e. it pulls the value of the current state towards the value of its successor state [19]. These stochastic update directions are not proper gradients of any scalar energy field [20], but they still form a (more general) vector field with non-zero curl, where the objective for the optimization algorithm is to converge to its fixed-point(s). See Figure 4 for a detailed example. We implemented this aspect by allowing different amounts of curl to be added on top of a multi-dimensional vector field in our unit tests, which is done by rotating the produced gradient vectors using a fixed rotation matrix. This is reasonably realistic; in fact, for the TD example in Figure 4, the resulting vector field is exactly the gradient field of a quadratic combined with a (small-angle) rotation. ",
376
+ "bbox": [
377
+ 174,
378
+ 712,
379
+ 825,
380
+ 852
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "2.6 Non-stationarity ",
387
+ "text_level": 1,
388
+ "bbox": [
389
+ 174,
390
+ 869,
391
+ 326,
392
+ 883
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "In many settings it is necessary to optimize a non-stationary objective function. This may typically occur in a non-stationary task where the problem to be solved changes over time. However, nonstationary optimization can even be important in large stationary tasks (with temporal structure in the samples), when the algorithm chooses to track a particular dynamic aspect of the problem, rather than attempting to converge to a global but static solution of the problem [21]. In addition, reinforcement learning (RL) tasks often involve non-stationary optimization. For example, many RL algorithms proceed by evaluating the value function using the TD algorithm described in the previous section. This results in two sources of non-stationarity: the target value changes at every step (resulting in the previously described curl); and also the state distribution changes as the value function improves and better actions are selected. These scenarios can be therefore be viewed as non-stationary loss functions, but whose optimum moves as a function of the current parameter values. ",
399
+ "bbox": [
400
+ 174,
401
+ 895,
402
+ 823,
403
+ 924
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "image",
409
+ "img_path": "images/c499d54b95076dc38072d7c065a7038b4b38eedd8e01116bcdf75e6a5820c2b2.jpg",
410
+ "image_caption": [
411
+ "Figure 3: Examples of multivariate prototypes. The first subplot depicts an asymmetric quadratic bowl with correlated dimensions, the second a surface with a saddle point, the third a sharp valley surface, the fourth a half-pipe surface where the first dimension is a line and the second one a quadratic bowl. The fifth subplot depicts a surface with an ill conditioned minimum in the point where the two canyons overlap. The surface in the last subplot is the composition of a quadratic bowl in the first dimension and of a cliff in the second. "
412
+ ],
413
+ "image_footnote": [],
414
+ "bbox": [
415
+ 207,
416
+ 101,
417
+ 795,
418
+ 428
419
+ ],
420
+ "page_idx": 4
421
+ },
422
+ {
423
+ "type": "image",
424
+ "img_path": "images/fc0c8ec15c37bd504b5686efed19778eab13973e72bbbf0e0ed2f67eb8467687.jpg",
425
+ "image_caption": [
426
+ "Figure 4: Here, we consider a very simple Markov process, with two states and stochastic transitions between them, and a reward of 0 in the first and of 1 in the second state. Consider the parameters of our optimization $\\theta$ to be the two state values. Each TD update changes one of them, depending on the stochastic transition observed. In this figure, we plot the vector field of expected update directions (blue arrows) as a function of $\\theta$ , as well as one sampled trajectory of the TD algorithm. Note how this vector field is not actually a gradient field, but instead has substantial curl, making it a challenging stochastic optimization task. "
427
+ ],
428
+ "image_footnote": [],
429
+ "bbox": [
430
+ 334,
431
+ 546,
432
+ 661,
433
+ 704
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "",
440
+ "bbox": [
441
+ 174,
442
+ 853,
443
+ 823,
444
+ 924
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "",
451
+ "bbox": [
452
+ 174,
453
+ 103,
454
+ 825,
455
+ 172
456
+ ],
457
+ "page_idx": 5
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "We test non-stationarity in three different ways. We let the location of the optimum move smoothly, via random translations of the parameter space, or we let the the scale of the shape prototype vary randomly (on average by $10 \\%$ in each direction), or, on noisy unit tests, we let the scale of the noise vary randomly. Currently, these changes happen once every 10 steps. A type of non-stationarity that involves more abrupt switching is discussed in section 4.1. ",
462
+ "bbox": [
463
+ 174,
464
+ 180,
465
+ 825,
466
+ 251
467
+ ],
468
+ "page_idx": 5
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "3 Experiments ",
473
+ "text_level": 1,
474
+ "bbox": [
475
+ 174,
476
+ 272,
477
+ 312,
478
+ 290
479
+ ],
480
+ "page_idx": 5
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "3.1 Setup and Algorithms ",
485
+ "text_level": 1,
486
+ "bbox": [
487
+ 174,
488
+ 305,
489
+ 366,
490
+ 320
491
+ ],
492
+ "page_idx": 5
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "For our experiments, we test the candidate algorithms on over 3000 unit tests, with up to 10 parameter dimensions. Each algorithm-unit test pairing is repeated 10 times, but with reusing the same 10 random seeds across all algorithms and setups. For eat the parameter value reached after 100 update steps $k$ te the true expected loss. $\\mathcal { L } ^ { ( k ) } = \\mathbb { E } \\left[ \\mathcal { L } \\left( \\theta _ { 1 0 0 } ^ { ( k ) } \\right) \\right]$ ",
497
+ "bbox": [
498
+ 173,
499
+ 332,
500
+ 825,
501
+ 400
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The algorithms evaluated are SGD with fixed learning rate $\\eta _ { 0 } \\in [ 1 0 ^ { - 6 } , 1 0 ]$ , SGD with annealing with decay factor in $[ 1 0 ^ { - 2 } , 1 ]$ and initial rates $\\eta _ { 0 }$ , SGD with momentum (regular or Nesterov’s variant [22]) [0.1, 0.999] and initial rates $\\eta _ { 0 }$ , SGD with parameter averaging $[ ]$ with decay term in $[ 1 0 ^ { - 4 } , 0 . 5 ]$ and exponent in $\\left\\{ { \\frac { 1 } { 2 } } , { \\frac { 3 } { 4 } } , 1 \\right\\}$ , ADAGRAD [10] with initial rates $\\eta _ { 0 }$ , ADADELTA [23] with decay parameter $( 1 - \\gamma ) \\in [ 1 0 ^ { - 4 } , 0 . 5 ]$ and regularizer in $[ 1 0 ^ { - 6 } , 1 0 ^ { - 2 }$ , the incremental delta-bardelta algorithm (IDBD [24]), RPROP [25] with initial stepsizes $\\eta _ { 0 }$ , RMSprop [26] with minimal learning rates $\\eta _ { 0 }$ , maximal learning rates in $[ 1 0 , 1 0 ^ { 3 } ]$ and decay parameter $\\gamma$ , as well as conjugate gradients. For the hyper-parameters ranges, we always consider one value per order of magnitude, and exhaustively sweep all combinations. ",
508
+ "bbox": [
509
+ 174,
510
+ 405,
511
+ 825,
512
+ 534
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "3.2 Reference performance ",
519
+ "text_level": 1,
520
+ "bbox": [
521
+ 174,
522
+ 551,
523
+ 375,
524
+ 566
525
+ ],
526
+ "page_idx": 5
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "Each unit test is associated with a reference performance $\\mathcal { L } _ { s g d }$ , and a corresponding reference learning rate $\\eta _ { b e s t }$ that is determined by doing a parameter sweep over all fixed learning rates for SGD (34 values log-uniform between $1 \\dot { 0 } ^ { - 1 0 }$ and 10) and retaining the best-performing one. ",
531
+ "bbox": [
532
+ 174,
533
+ 578,
534
+ 823,
535
+ 621
536
+ ],
537
+ "page_idx": 5
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "In our aggregate plots, unit tests are sorted (per group) by their reference learning rate, i.e., those that require small steps on the left, and those where large steps are best on the right. Algorithm setups are sorted as well, on the vertical axis, by their median performance on a reference unit test (quadratic, additive noise). ",
542
+ "bbox": [
543
+ 174,
544
+ 627,
545
+ 825,
546
+ 683
547
+ ],
548
+ "page_idx": 5
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "3.3 Qualitative Evaluation ",
553
+ "text_level": 1,
554
+ "bbox": [
555
+ 176,
556
+ 702,
557
+ 370,
558
+ 717
559
+ ],
560
+ "page_idx": 5
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "The algorithm performance $\\mathcal { L } ^ { ( k ) }$ is converted to a normalized value $\\begin{array} { r } { \\mathcal { L } _ { n o r m } ^ { ( k ) } = \\frac { \\mathcal { L } ^ { ( k ) } - \\mathcal { L } _ { i n i t } } { \\mathcal { L } _ { s g d } - \\mathcal { L } _ { i n i t } } } \\end{array}$ where ${ \\mathcal { L } } _ { i n i t } = \\mathbb { E } [ { \\mathcal { L } } ( \\theta _ { 0 } ) ]$ is the expected loss value at the initial point, similar to the approach taken in [27], but even more condensed. In other words, a normalized value near zero corresponds to no progress, negative denotes divergence, and a value near one is equivalent to the best SGD. Based on these results, we assign a qualitative color value to the performance of each algorithm setup on each unit test, to able to represent it in a single pixel in the resulting figures: ",
565
+ "bbox": [
566
+ 173,
567
+ 729,
568
+ 825,
569
+ 820
570
+ ],
571
+ "page_idx": 5
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "• Red: Divergence or numerical instability in all run. \n• Violet: Divergence or numerical instability in at least one run. \n• Orange: Insufficient progress: median $( \\mathcal { L } _ { n o r m } ) < 0 . 1$ \n• Yellow: Good progress: median $( \\mathcal { L } _ { n o r m } ) > 0 . 1$ and high variability: $\\mathcal { L } _ { n o r m } < 0 . 1$ for at least $\\textstyle { \\frac { 1 } { 4 } }$ of the runs. \n• Green: Good progress: median $( \\mathcal { L } _ { n o r m } ) > 0 . 1$ and low variability: $\\mathcal { L } _ { n o r m } < 0 . 1$ for at most $\\textstyle { \\frac { 1 } { 4 } }$ of the runs. \n• Blue: Excellent progress: median $( { \\mathcal { L } } _ { n o r m } ) > 2$ . ",
576
+ "bbox": [
577
+ 215,
578
+ 833,
579
+ 826,
580
+ 925
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "",
587
+ "bbox": [
588
+ 212,
589
+ 103,
590
+ 825,
591
+ 151
592
+ ],
593
+ "page_idx": 6
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "3.4 Results ",
598
+ "text_level": 1,
599
+ "bbox": [
600
+ 173,
601
+ 171,
602
+ 264,
603
+ 186
604
+ ],
605
+ "page_idx": 6
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "Figures 5 and 6 shows the qualitative results of all algorithm variants on all the unit tests. There is a wealth of information in these visualizations. For example the relatively scarce amount of blue indicate that it is difficult to substantially beat well-tuned SGD in performance on most unit tests. Another unsurprising conclusion is that hyper-parameter tuning matters much less for the adaptive algorithms (ADAGRAD, ADADELTA, RPROP, RMSprop) than for the non-adaptive SGD variants. Also, while some unit tests are more tricky than others on average, there is quite some diversity in the sense that some algorithms may outdo SGD on a unit test where other algorithms fail (especially on the non-differentiable functions). ",
610
+ "bbox": [
611
+ 173,
612
+ 196,
613
+ 825,
614
+ 309
615
+ ],
616
+ "page_idx": 6
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "4 Realism and Future Work ",
621
+ "text_level": 1,
622
+ "bbox": [
623
+ 174,
624
+ 329,
625
+ 423,
626
+ 347
627
+ ],
628
+ "page_idx": 6
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "We do not expect to replace real-world benchmark domains, but rather to complement them with our suite of unit tests. Still, it is important to have sufficient coverage of the types of potential difficulties encountered in realistic settings. To a much lesser degree, we may not want to clutter the test suite with unit tests that measure issues which never occur in realistic problems. ",
633
+ "bbox": [
634
+ 174,
635
+ 361,
636
+ 823,
637
+ 416
638
+ ],
639
+ "page_idx": 6
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "It is not straightforward to map very high-dimensional real-world loss functions down to lowdimensional prototype shapes, but it is not impossible. For example, in Figure 8 we show some random projections in parameter space of the loss function in an MNIST classification task with an MLP [28]. We defer a fuller investigation of this type, namely obtaining statistics on how commonly different prototypes are occurring, to future work. ",
644
+ "bbox": [
645
+ 174,
646
+ 422,
647
+ 825,
648
+ 494
649
+ ],
650
+ "page_idx": 6
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "However, the unit tests capture the properties of some examples that can be analyzed. One of them was discussed in section 2.5, another one is the simple loss function of a one-dimensional autoencoder: ",
655
+ "bbox": [
656
+ 174,
657
+ 501,
658
+ 825,
659
+ 541
660
+ ],
661
+ "page_idx": 6
662
+ },
663
+ {
664
+ "type": "equation",
665
+ "img_path": "images/50a56534711a3acbf97fbcf8764f5014f21c1fd69ccd5c3b4120edd6da132bb4.jpg",
666
+ "text": "$$\n\\mathcal { L } _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } ) = \\left( \\boldsymbol { x } + \\boldsymbol { \\theta } _ { 2 } \\cdot \\boldsymbol { \\sigma } ( \\boldsymbol { x } \\cdot \\boldsymbol { \\theta } _ { 1 } ) \\right) ^ { 2 }\n$$",
667
+ "text_format": "latex",
668
+ "bbox": [
669
+ 398,
670
+ 537,
671
+ 599,
672
+ 558
673
+ ],
674
+ "page_idx": 6
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "where $\\sigma$ is the sigmoid function. Even in the absence of noise, this minimal scenario has a saddlepoint near $\\theta = ( 0 , 0 )$ , a plateau shape away from the axes, a cliff shape near the vertical axis, and a correlated valley near $\\bar { \\theta } = ( 1 , 1 )$ , as illustrated in Figure 7. All of these prototypical shapes are included in our set of unit tests. ",
679
+ "bbox": [
680
+ 174,
681
+ 559,
682
+ 825,
683
+ 616
684
+ ],
685
+ "page_idx": 6
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "An alternative approach is predictive: if the performance on the unit tests is highly predictive of an algorithm’s performance on a some real-world task, then those unit tests must be capturing the essential aspects of the task. Again, building such a predictor is an objective for future work. ",
690
+ "bbox": [
691
+ 174,
692
+ 622,
693
+ 825,
694
+ 665
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "4.1 Algorithm Dynamics ",
701
+ "text_level": 1,
702
+ "bbox": [
703
+ 174,
704
+ 681,
705
+ 357,
706
+ 696
707
+ ],
708
+ "page_idx": 6
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "Our long-term objective is to be able to do systematic testing and a full investigation of the optimization dynamics for a given algorithm. Of course, it is not possible to test it exhaustively on all possible loss functions (because there are infinitely many), but a divide-and-conquer approach may be the next best thing. For this, we introduce the notion of algorithm state, which is changing during optimization (e.g., the current stepsize or momentum). Now, a long optimization process can be seen as the chaining of a number of unit tests, while preserving the algorithm state in-between them. Our hypothesis is that the set of all possible chains of unit tests in our collection covers most of the qualitatively different (stationary or non-stationary) loss functions an optimization algorithm may encounter. ",
713
+ "bbox": [
714
+ 173,
715
+ 707,
716
+ 825,
717
+ 833
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "To evaluate an algorithm’s robustness (rather than its expected performance), we can assume that an adversary picks the worst-case unit tests at each step in the sequence. An algorithm is only truly robust if it does not diverge under any sequence of unit tests. Besides the worst-case, we may also want to study typical expected behavior, namely whether the dynamics have an attractor in the algorithm’s state space. If an attractor exists where the algorithm is stable, then it becomes useful to look at the secondary criterion for the algorithm, namely its expected (normalized) performance. ",
724
+ "bbox": [
725
+ 173,
726
+ 840,
727
+ 825,
728
+ 924
729
+ ],
730
+ "page_idx": 6
731
+ },
732
+ {
733
+ "type": "image",
734
+ "img_path": "images/f60e1f785661b9849aa84b85d25b947a590f3c6bdf6a36b49373dae75c361235.jpg",
735
+ "image_caption": [],
736
+ "image_footnote": [],
737
+ "bbox": [
738
+ 243,
739
+ 92,
740
+ 678,
741
+ 977
742
+ ],
743
+ "page_idx": 7
744
+ },
745
+ {
746
+ "type": "image",
747
+ "img_path": "images/4d1f5a08230b342b05198e8f1a2cc85b5d7a53c1de436297e41279c35d686aa8.jpg",
748
+ "image_caption": [],
749
+ "image_footnote": [],
750
+ "bbox": [
751
+ 166,
752
+ 60,
753
+ 754,
754
+ 977
755
+ ],
756
+ "page_idx": 8
757
+ },
758
+ {
759
+ "type": "image",
760
+ "img_path": "images/f720ad6d5f34d39e18934886609bf2dd1270a688327fb4bfe2138e161fbba508.jpg",
761
+ "image_caption": [
762
+ "Figure 7: Illustration of the loss surface of a one-dimensional auto-encoder, as defined in the text, where the darkest blue corresponds to the lowest loss. Left: from the zoomed-out perspective if appears to be roughly a vertical valley, leading an optimizer toward the y-axis from almost anywhere in the space. Center: the zoomed-in perspective around the origin, which is looking like a prototypical saddle point. Right: the shape of the valley in the lower left quadrant, the walls of which become steeper the more the search progresses. "
763
+ ],
764
+ "image_footnote": [],
765
+ "bbox": [
766
+ 174,
767
+ 102,
768
+ 821,
769
+ 228
770
+ ],
771
+ "page_idx": 9
772
+ },
773
+ {
774
+ "type": "image",
775
+ "img_path": "images/26cc29179b3ead1060589ded203c34d428470b0640c1be4f01cb06c98778ea4f.jpg",
776
+ "image_caption": [
777
+ "Figure 8: Left: collection of 64 random projections into two dimensions of the MNIST loss surface (based on one randomly sampled digit for each column). The projections are centered around the weights learned after one epoch of training, and different projections are plotted on scales between 0.05 (top row) and 0.5 (bottom row). Right: the same as on the left, but with axis-aligned projections. "
778
+ ],
779
+ "image_footnote": [],
780
+ "bbox": [
781
+ 178,
782
+ 347,
783
+ 820,
784
+ 585
785
+ ],
786
+ "page_idx": 9
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "We conjecture that this analysis may lead to novel insights into how to design robust and adaptive optimization algorithms. ",
791
+ "bbox": [
792
+ 174,
793
+ 703,
794
+ 823,
795
+ 731
796
+ ],
797
+ "page_idx": 9
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "5 Conclusion ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 174,
805
+ 751,
806
+ 299,
807
+ 768
808
+ ],
809
+ "page_idx": 9
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "This paper established a large collection of simple comparative benchmarks to evaluate stochastic optimization algorithms, on a broad range of small-scale, isolated, and well-understood difficulties. This approach helps disentangle issues that tend to be confounded in real-world scenarios, while retaining realistic properties. Our initial results on a dozen established algorithms (under a variety of different hyperparameter settings) show that robustness is non-trivial, and that different algorithms struggle on different unit tests. The testing framework is open-source, extensible to new function classes, and easy to use for evaluating the robustness of new algorithms. ",
814
+ "bbox": [
815
+ 174,
816
+ 784,
817
+ 825,
818
+ 881
819
+ ],
820
+ "page_idx": 9
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "The full source code (see also Appendix A) is available under BSD license at: ",
825
+ "bbox": [
826
+ 174,
827
+ 887,
828
+ 683,
829
+ 902
830
+ ],
831
+ "page_idx": 9
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "https://github.com/IoannisAntonoglou/optimBench ",
836
+ "bbox": [
837
+ 251,
838
+ 910,
839
+ 714,
840
+ 924
841
+ ],
842
+ "page_idx": 9
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Acknowledgements ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 104,
851
+ 310,
852
+ 118
853
+ ],
854
+ "page_idx": 10
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We thank the anonymous ICLR reviewers for their many constructive comments. ",
859
+ "bbox": [
860
+ 176,
861
+ 130,
862
+ 702,
863
+ 145
864
+ ],
865
+ "page_idx": 10
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "References ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 174,
873
+ 164,
874
+ 266,
875
+ 180
876
+ ],
877
+ "page_idx": 10
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "[1] H. Robbins and S. Monro. A stochastic approximation method. Annals of Mathematical Statistics, 22:400–407, 1951. \n[2] Leon Bottou. Online Algorithms and Stochastic Approximations. In David Saad, editor, ´ Online Learning and Neural Networks. Cambridge University Press, Cambridge, UK, 1998. \n[3] Leon Bottou and Yann LeCun. Large Scale Online Learning. In Sebastian Thrun, Lawrence ´ Saul, and Bernhard Scholkopf, editors, ¨ Advances in Neural Information Processing Systems 16. MIT Press, Cambridge, MA, 2004. \n[4] Leon Bottou and Olivier Bousquet. The Tradeoffs of Large Scale Learning. In J.C. Platt, ´ D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems, volume 20, pages 161–168. NIPS Foundation (http://books.nips.cc), 2008. \n[5] A. Benveniste, M. Metivier, and P. Priouret. Adaptive Algorithms and Stochastic Approximations. Springer Verlag, Berlin, New York, 1990. \n[6] N. Le Roux, P.A. Manzagol, and Y. Bengio. Topmoumoute online natural gradient algorithm, 2008. \n[7] Antoine Bordes, Leon Bottou, and Patrick Gallinari. SGD-QN: Careful Quasi-Newton ´ Stochastic Gradient Descent. Journal of Machine Learning Research, 10:1737–1754, July 2009. [8] Wei Xu. Towards Optimal One Pass Large Scale Learning with Averaged Stochastic Gradient Descent. ArXiv-CoRR, abs/1107.2490, 2011. \n[9] Tom Schaul, Sixin Zhang, and Yann LeCun. No More Pesky Learning Rates. In International Conference on Machine Learning (ICML), 2013. \n[10] John C. Duchi, Elad Hazan, and Yoram Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. 2010. \n[11] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. Understanding the exploding gradient problem. arXiv preprint arXiv:1211.5063, 2012. \n[12] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In G. Orr and Muller K., editors, Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), pages 249–256. Society for Artificial Intelligence and Statistics, 2010. \n[13] Nikolaus Hansen, Anne Auger, Steffen Finck, Raymond Ros, et al. Real-parameter black-box optimization benchmarking 2010: Experimental setup. 2010. \n[14] Nikolaus Hansen, Anne Auger, Raymond Ros, Steffen Finck, and Petr Posˇ´ık. Comparing results of 31 algorithms from the black-box optimization benchmarking BBOB-2009. In Proceedings of the 12th annual conference companion on Genetic and evolutionary computation, pages 1689–1696. ACM, 2010. \n[15] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pages 1106–1114, 2012. \n[16] Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. \n[17] Y. LeCun, L. Bottou, G. Orr, and K. Muller. Efficient BackProp. In G. Orr and Muller K., editors, Neural Networks: Tricks of the trade. Springer, 1998. \n[18] Geoffrey E Hinton, Nitish Srivastava, Alex Krizhevsky, Ilya Sutskever, and Ruslan R Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012. \n[19] R.S. Sutton and A.G. Barto. Reinforcement Learning: An Introduction. IEEE Transactions on Neural Networks, 9(5):1054–1054, Sep 1998. \n[20] Etienne Barnard. Temporal-difference methods and Markov models. IEEE Transactions on Systems, Man, and Cybernetics, 23(2):357–365, 1993. \n[21] Richard S. Sutton, Anna Koop, and David Silver. On the role of tracking in stationary environments. In Proceedings of the Twenty-Fourth International Conference on Machine Learning (ICML 2007, pages 871–878. ACM Press, 2007. \n[22] Yurii Nesterov and Arkadii Semenovich Nemirovskii. Interior-point polynomial algorithms in convex programming, volume 13. SIAM, 1994. \n[23] Matthew D Zeiler. ADADELTA: An Adaptive Learning Rate Method. arXiv preprint arXiv:1212.5701, 2012. \n[24] Richard S Sutton. Adapting bias by gradient descent: An incremental version of delta-bardelta. In AAAI, pages 171–176, 1992. \n[25] Martin Riedmiller and Heinrich Braun. A direct adaptive method for faster backpropagation learning: The RPROP algorithm. In Neural Networks, 1993., IEEE International Conference on, pages 586–591. IEEE, 1993. \n[26] T Tieleman and G Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012. \n[27] Tom Schaul and Yann LeCun. Adaptive learning rates and parallelization for stochastic, sparse, non-smooth gradients. In International Conference on Learning Representations, Scottsdale, AZ, 2013. \n[28] Yann LeCun and Corinna Cortes. The MNIST dataset of handwritten digits. 1998. http://yann.lecun.com/exdb/mnist/. ",
882
+ "bbox": [
883
+ 173,
884
+ 181,
885
+ 828,
886
+ 925
887
+ ],
888
+ "page_idx": 10
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "",
893
+ "bbox": [
894
+ 171,
895
+ 102,
896
+ 826,
897
+ 434
898
+ ],
899
+ "page_idx": 11
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "A Appendix: Framework Software ",
904
+ "text_level": 1,
905
+ "bbox": [
906
+ 174,
907
+ 453,
908
+ 480,
909
+ 470
910
+ ],
911
+ "page_idx": 11
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "As part of this work a software framework was developed for the computing and managing all the results obtained for all the different configurations of function prototypes and algorithms. The main component of the system is a database where all the results are stored and can be easily retrieved by querying the database accordingly. The building blocks of this database are the individual experiments, where each experiment is associated to a unit test and an algorithm with fixed parameters. An instance of an experiment database can either be loaded from the disk, or it can be created on the fly by running the associated experiments as needed. The code below creates a database and runs all the experiments for all the readily available algorithms and default unit tests, and then saves them to disk: ",
916
+ "bbox": [
917
+ 173,
918
+ 484,
919
+ 825,
920
+ 609
921
+ ],
922
+ "page_idx": 11
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "require ’experiment’ local db $=$ experimentsDB() db:runExperiments() db:save(’experimentsDB’) ",
927
+ "bbox": [
928
+ 184,
929
+ 622,
930
+ 437,
931
+ 678
932
+ ],
933
+ "page_idx": 11
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "This database now can be loaded from the disk, and the user can query it in order to retrieve specific experiments, using filters. An example is shown below: ",
938
+ "bbox": [
939
+ 171,
940
+ 689,
941
+ 823,
942
+ 718
943
+ ],
944
+ "page_idx": 11
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "local db $=$ experimentsDB() \ndb:load(’experimentsDB’) \nlocal experiments $=$ db:filter({fun ${ } = { }$ {’quad’, ’line’}, $\\mathsf { a l g o } \\mathrm { = } \\{ \\mathsf { \\Omega } ^ { \\prime } \\mathsf { s g d } ^ { \\prime } \\mathsf { \\Omega } \\}$ , learningRat $\\scriptstyle \\mathtt { e } = 1 \\in - 4 \\ \\}$ ) ",
949
+ "bbox": [
950
+ 183,
951
+ 731,
952
+ 810,
953
+ 786
954
+ ],
955
+ "page_idx": 11
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "The code above loads an experiment database from the disk and it retrieves all the experiments for all the quadratic and line prototype shapes, for all different types of noise and all scales, further selecting the subset of experiments to those optimized using SGD with learningRate equal to 1e4. The user can rerun the extracted experiments or have access to the associated results, i.e., the expected value of the function in different optimization steps, along with the associated parameters values. In order to qualitatively assess the results the following code can be used: ",
960
+ "bbox": [
961
+ 173,
962
+ 799,
963
+ 825,
964
+ 883
965
+ ],
966
+ "page_idx": 11
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "The code above computes the reference expected values for each prototype function, it removes the experiments for which no reference value is available, then it qualitatively assesses the performance of all the available experiments and finally it plots the results given the color configuration described in section 3.3. It is really easy to add a new algorithm in the database in order to evaluate its robustness. The code below illustrates a simple example: ",
971
+ "bbox": [
972
+ 174,
973
+ 145,
974
+ 826,
975
+ 215
976
+ ],
977
+ "page_idx": 12
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "db:addAlgorithm(algoname, algofun, opt) db:testAlgorithm(algoname) db:plotExperiments({}, {algoname}) ",
982
+ "bbox": [
983
+ 181,
984
+ 228,
985
+ 563,
986
+ 271
987
+ ],
988
+ "page_idx": 12
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Here a new algorithm with name algoname, function instance algo (which should satisfy the optim interface), and a table of different parameter configurations opt is added to the database and it is tested under all available functions prototypes. Finally, the last line plots a graph with all the results for this algorithm. ",
993
+ "bbox": [
994
+ 174,
995
+ 284,
996
+ 825,
997
+ 339
998
+ ],
999
+ "page_idx": 12
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "It is also possible to add a set of new unit tests to the database, and subsequently run a set of experiments associated with them. There are different parameters to be defined for the creation of a set of unit tests (that allow wildcard specification too): ",
1004
+ "bbox": [
1005
+ 174,
1006
+ 347,
1007
+ 826,
1008
+ 388
1009
+ ],
1010
+ "page_idx": 12
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "1. the concatenated shape prototypes for each dimension, \n2. the noise prototype to be applied to each dimension, \n3. the scale of each dimension of the function, \n4. in case of multivariate unit tests, a parameter specifies which $p$ -norm is used for the com \nbination, \n5. a rotation parameter that induces correlation of the different parameter dimensions, and \n6. a curl parameter that changes the vector field of a multivariate function. ",
1015
+ "bbox": [
1016
+ 210,
1017
+ 400,
1018
+ 825,
1019
+ 525
1020
+ ],
1021
+ "page_idx": 12
1022
+ }
1023
+ ]
parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/LwyBkw8Nh6Y1J/LwyBkw8Nh6Y1J_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MJmYbFnJAGa/MJmYbFnJAGa.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MJmYbFnJAGa/MJmYbFnJAGa_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MJmYbFnJAGa/MJmYbFnJAGa_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MJmYbFnJAGa/MJmYbFnJAGa_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1gNc3NtvB/S1gNc3NtvB.md ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING ALGORITHMIC SOLUTIONS TO SYMBOLIC PLANNING TASKS WITH A NEURAL COMPUTER
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ A key feature of intelligent behavior is the ability to learn abstract strategies that transfer to unfamiliar problems. Therefore, we present a novel architecture, based on memory-augmented networks, that is inspired by the von Neumann and Harvard architectures of modern computers. This architecture enables the learning of abstract algorithmic solutions via Evolution Strategies in a reinforcement learning setting. Applied to Sokoban, sliding block puzzle and robotic manipulation tasks, we show that the architecture can learn algorithmic solutions with strong generalization and abstraction: scaling to arbitrary task configurations and complexities, and being independent of both the data representation and the task domain.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Transferring solution strategies from one problem to another is a crucial ability for intelligent behavior (Silver et al., 2013). Current learning systems can learn a multitude of specialized tasks, but extracting the underlying structure of the solution for effective transfer is an open research problem (Taylor & Stone, 2009). Abstraction is key to enable these transfers (Tenenbaum et al., 2011) and the concept of algorithms in computer science is an ideal example for such transferable abstract strategies. An algorithm is a sequence of instructions, which solves a given problem when executed, independent of the specific instantiation of the problem. For example, consider the task of sorting a set of objects. The algorithmic solution, specified as the sequence of instructions, is able to sort any number of arbitrary classes of objects in any order, e.g., toys by color, waste by type, or numbers by value, by using the same sequence of instructions, as long as the features and compare operations defining the order are specified. Learning such structured, abstract strategies enables the transfer to new domains and representations (Tenenbaum et al., 2011). Moreover, abstract strategies as algorithms have built-in generalization capabilities to new task configurations and complexities.
12
+
13
+ Here, we present a novel architecture for learning abstract strategies in the form of algorithmic solutions. Based on the Differential Neural Computer (Graves et al., 2016) and inspired by the von Neumann and Harvard architectures of modern computers, the architectures modular structure allows for straightforward transfer by reusing learned modules instead of relearning, prior knowledge can be included, and the behavior of the modules can be examined and interpreted. Moreover, the individual modules of the architecture can be learned with different learning settings and strategies – or be hardcoded if applicable – allowing to split the overall task into easier subproblems, contrary to the end-to-end learning philosophy of most deep learning architectures. Building on memory-augmented neural networks (Graves et al., 2016; Neelakantan et al., 2016; Weston et al., 2015; Joulin & Mikolov, 2015), we propose a flexible architecture for learning abstract strategies as algorithmic solutions and show the learning and transferring of such in symbolic planning tasks.
14
+
15
+ # 1.1 THE PROBLEM OF LEARNING ALGORITHMIC SOLUTIONS
16
+
17
+ We investigate the problem of learning algorithmic solutions which are characterized by three requirements: R1 – generalization to different and unseen task configurations and task complexities, R2 – independence of the data representation, and R3 – independence of the task domain.
18
+
19
+ Picking up the sorting algorithm example again, R1 represents the ability to sort lists of arbitrary length and initial order, while R2 and R3 represent the abstract nature of the solution. This abstraction enables the algorithm, for example, to sort a list of binary numbers while being trained only on hexadecimal numbers (R2). Furthermore, the algorithm trained on numbers is able to sort lists of strings (R3). If R1 – R3 are fulfilled, the algorithmic solution does not need to be retrained or adapted to solve unforeseen task instantiations – only the data specific operations need to be adjusted.
20
+
21
+ ![](images/490cd57b36abafb628db85e20787d1e9e83d5e0b8bdbd6fc5ae93c20f5ea787a.jpg)
22
+ Figure 1: The proposed architecture with its modules inspired by computer architectures. In this work the modules are based on neural networks. Information flow is divided into data and control streams. The modules inside the highlighted area are learning the algorithmic solution in a reinforcement learning setting, whereas the others (data modules) are learned independently in a supervised setting or can use hardcoded information.
23
+
24
+ Research on learning algorithms typically focuses on identifying algorithmic generated patterns or solving algorithmic problems (Neelakantan et al., 2016; Zaremba & Sutskever, 2014; Kaiser & Sutskever, 2016; Kaiser & Bengio, 2016), less on finding algorithmic solutions (Joulin & Mikolov, 2015; Zaremba et al., 2016) fulfilling the three discussed requirements R1 – R3. While R1 is typically tackled, as it represents the overall goal of generalization in machine learning, the abstraction abilities from R2 and R3 are missing. Additionally, most algorithms require a form of feedback, using computed intermediate results from one computational step in subsequent steps, and a variable number of computational steps to solve a problem instance. Thus, it is necessary to be able to cope with varying numbers of steps and determining when to stop, in contrast to using a fixed number of steps (Neelakantan et al., 2016; Sukhbaatar et al., 2015), making the learning problem more challenging in addition.
25
+
26
+ A crucial feature for algorithms is the ability to save and retrieve data. Therefore, augmenting neural networks with different forms of external memory, e.g., matrices, stacks, tapes or grids, to increase their expressiveness and to separate computation from memory, especially in long time dependencies setups, is an active research direction (Graves et al., 2016; Weston et al., 2015; Joulin & Mikolov, 2015; Zaremba et al., 2016; Sukhbaatar et al., 2015; Kumar et al., 2016; Greve et al., 2016) with earlier work in the field of grammar learning (Das et al., 1992; Mozer & Das, 1993; Zeng et al., 1994). These memory-augmented networks improve performance on a variety of tasks like reasoning and inference in natural language (Graves et al., 2016; Weston et al., 2015; Sukhbaatar et al., 2015; Kumar et al., 2016), learning of simple algorithms and algorithmic patterns (Joulin & Mikolov, 2015; Zaremba et al., 2016; Graves et al., 2014), and navigation tasks (Wayne et al., 2018).
27
+
28
+ The contribution of this paper is a novel modular architecture building on a memory-augmented neural network (DNC (Graves et al., 2016)) for learning algorithmic solutions in a reinforcement learning setting. We show that the learned solutions fulfill all three requirements R1 – R3 for an algorithmic solution and the architecture can process a variable number of computational steps.
29
+
30
+ # 2 A NEURAL COMPUTER ARCHITECTURE FOR ALGORITHMIC SOLUTIONS
31
+
32
+ In this section, we introduce the novel modular architecture for learning algorithmic solutions, shown in Figure 1. The architecture builds on the Differential Neural Computer (DNC) (Graves et al., 2016) and its modular design is inspired by modern computer architectures, related to (Neelakantan et al., 2016; Weston et al., 2015).
33
+
34
+ The DNC augments a controller neural network with a differentiable autoassociative external memory to separate computation from memory, as memorization is usually done in the networks weights. The controller network learns to write and read information from that memory by emitting an interface vector which is mapped onto different vectors by linear transformations. These vectors control the read and write operations of the memory, called read and write heads. For writing and reading, multiple attention mechanisms are employed, including content lookup, temporal linkage and memory allocation. Due to the design of the interface and the attention mechanisms, the DNC is independent of the memory size and fully differentiable, allowing gradient-based end-to-end learning.
35
+
36
+ Our architecture. In order to learn algorithmic solutions, the computations need to be decoupled from the specific data and task. To enable such data and task independent computations, we propose multiple alterations and extensions to the DNC, inspired by modern computer architectures.
37
+
38
+ First, information flow is divided into two streams, data and control. This separation allows to disentangle data representation dependent manipulations from data independent algorithmic instructions. Due to this separation, the algorithmic modules need to be extended to include two memories, a data and a computational memory. The data memory stores and retrieves the data stream, whereas the computational memory works on information generated by the control signal flow through the learnable controller and memory transformations. The two memories are coupled, operating on the same locations, and these locations are determined by the computational memory, and hence by the control stream. As with the DNC, multiple read and write heads can be used. In our experiments, one read and two write heads are used, with one write head constrained to the previously read location.
39
+
40
+ In contrast to the DNC, but in line with the computer architecture-inspired design and the goal of learning deterministic algorithms, writing and reading uses hard attentions instead of soft attentions. Hard attention means that only one memory location can be written to and read from (unique addresses), instead of an weighted average over all locations as with soft attentions. Such hard attention was shown to be beneficial for generalization (Greve et al., 2016). We also employed an additional attention mechanism for reading, called usage linkage, similar to the temporal linkage of the DNC, but instead of capturing temporal relations, it captures usage relations, i.e., the relation between written memory location and previously read location. With both linkages in two directions and the content look up, the model has five attention mechanisms for reading. While the final read memory location is determined by a weighted combination of these attentions (see attention in Figure 5 in the Appendix), each attention mechanism itself uses hard decisions, returning only one memory location. See Appendix C for the effect of the introduced modifications and extensions.
41
+
42
+ For computing the actual solution, operating only on the control stream is not enough, as the model still needs to manipulate the data. Therefore, we added several modules operating on the data stream, inspired by the architecture of computers. In particular, an Input, TransformD, ALU (arithmetic logic unit) and Output module were added (more details in Section 2.2). These modules manipulate the data, steered by the algorithmic modules. The full architecture is shown in Figure 1.
43
+
44
+ As algorithms typically involve recursive or iterative data manipulation, the model receives its own output as input in the next computation step, making the whole architecture an output-input model. With all aforementioned extensions, algorithmic solutions fulfilling R1 – R3 can be learned.
45
+
46
+ # 2.1 THE ALGORITHMIC MODULES
47
+
48
+ The algorithmic modules consist of the Controller, the Memory and the $T \mathrm { r a n s f o r m } _ { C }$ module and build the core of the model. These modules learn the algorithmic solution operating on the control stream. With $t$ as the current computational step and $c$ as the control stream (see Figure 1), the input-output of the modules are $C ( c _ { i , t } , c _ { m , t - 1 } , c _ { f , t - 1 } , c _ { a , t - 1 } , c _ { o , t - 1 } ) \longmapsto c _ { c , t }$ , $M ( c _ { i , t } , c _ { c , t } ) \longmapsto$ $c _ { m , t } , d _ { m , t }$ and $T _ { C } ( c _ { c , t } , c _ { m , t } , c _ { i , t } ) \longmapsto c _ { f , t }$ . The algorithmic modules are based on the DNC with the alterations and extensions described before. Next we discuss how these algorithmic modules can be learned before looking into the data-dependent modules.
49
+
50
+ # 2.1.1 LEARNING OF THE ALGORITHMIC MODULES
51
+
52
+ Learning the algorithmic modules, and hence the algorithmic solution, is done in a reinforcement learning setting using Natural Evolution Strategies (NES) (Wierstra et al., 2014). NES is a blackbox optimizer that does not require differentiable models, giving more freedom to the model design, e.g., the hard attention mechanisms are not differentiable. NES updates a search distribution of the parameters to be learned by following the natural gradient towards regions of higher fitness using a population of offsprings (altered parameters) for exploration. Let $\theta$ be the parameters to be learned and using an isotropic multivariate Gaussian search distribution with fixed variance $\sigma ^ { 2 }$ , th e stochastic natural gradient at iteration $t$ is given by
53
+
54
+ $$
55
+ \nabla _ { \theta _ { t } } \mathbb { E } _ { \epsilon \sim N ( 0 , I ) } \left[ u ( \theta _ { t } + \sigma \epsilon ) \right] \approx \frac { 1 } { P \sigma } \sum _ { i = 1 } ^ { P } u ( \theta _ { t } ^ { i } ) \epsilon _ { i } \ ,
56
+ $$
57
+
58
+ where $P$ is the population size and $u ( \cdot )$ is the rank transformed fitness (Wierstra et al., 2014). The parameters are updated by
59
+
60
+ $$
61
+ \theta _ { t + 1 } = \theta _ { t } + \frac { \alpha } { P \sigma } \sum _ { i = 1 } ^ { P } u ( \theta _ { t } ^ { i } ) \epsilon _ { i } ,
62
+ $$
63
+
64
+ with learning rate $\alpha$ . Recent research showed that NES and related approaches like Random Search (Mania et al., 2018) or NEAT (Stanley & Miikkulainen, 2002) are powerful alternatives in reinforcement learning. They are easier to implement and scale, perform better with sparse rewards and credit assignment over long time scales, have fewer hyperparameters (Salimans et al., 2017) and were used to train memory-augmented networks (Greve et al., 2016; Merrild et al., 2018).
65
+
66
+ For robustness and learning efficiency, weight decay for regularization (Krogh & Hertz, 1992) and automatic restarts of runs stuck in local optima are used as in (Wierstra et al., 2014). This restarting can be seen as another level of evolution, where some lineages die out. Another way of dealing with early converged or stuck lineages is to add intrinsic motivation signals like novelty, that help to get attracted by another local optima, as in NSRA-ES (Conti et al., 2018). In the experiments however, we found that within our setting, restarting – or having an additional survival of the fittest on the lineages – was more effective, see Appendix C for a comparison.
67
+
68
+ The algorithmic solutions are learned in a curriculum learning setup (Bengio et al., 2009) with sampling from old lessons (Zaremba & Sutskever, 2014) to prevent unlearning and to foster generalization. Furthermore, we created bad memories, a learning from mistakes strategy, similar to the idea of AdaBoost (Freund & Schapire, 1997), which samples previously failed tasks to encourage focusing on the hard tasks. This can also be seen as a form of experience replay (Mnih et al., 2015; Lin, 1992), but only using the task configurations, the initial input to the model, not the full generated sequence. Bad memories were developed for training the data-dependent modules to ensure their robustness and $1 0 0 \%$ accuracy, which is crucial to learn algorithmic solutions. If the individual modules do not have $1 0 0 \%$ accuracy, no stable algorithmic solution can be learned even if the algorithmic modules are doing the correct computations. For example, if one module has an accuracy of $9 9 \%$ , the $1 \%$ error prevents learning an algorithmic solution that works always. This problem is even reinforced as the proposed model is an output-input architecture that works over multiple computation steps using its own output as the new input – meaning the overall accuracy drops to $3 6 . 6 \%$ for 100 computation steps. Therefore using the bad memories strategy, and thus focusing on the mistakes, helps significantly in achieving robust results when learning the modules, enabling the learning of algorithmic solutions. While the bad memories strategy was crucial to achieve $1 0 0 \%$ robustness when training the data-dependent modules, the effect on learning the algorithmic solutions was less significant (see Appendix C for an evaluation).
69
+
70
+ # 2.2 DATA-DEPENDENT MODULES
71
+
72
+ The data-dependent modules (Input, ALU, TransformD and Output) are responsible for all operations that involve direct data contact, such as receiving the input data from the outside or manipulating a data word with an operation chosen by the algorithmic modules. Thus, these modules need to be learned or designed for a specific data representation and task. However, as all modules only have to perform a certain subtask, these modules are typically easier to train.
73
+
74
+ As learning the algorithmic modules via NES does not rely on gradients and due to the information flow split, the data-dependent modules can be instantiated arbitrarily, e.g., can have nondifferentiable parts, do not need to be neural networks or can be hardcoded. Therefore, prior knowledge can be incorporated by implementing it directly into these modules. The modular design facilitates the transfer of learned modules, e.g., using the same algorithmic solution in a new domain without retraining the algorithmic modules or learning a new algorithm within the same domain without retraining the data modules. Next the general functionality of the modules will be explained.
75
+
76
+ The Input module is the interface to the external world and responsible for data preprocessing. Therefore, it receives the external input data and the data from the previous computational step. It sends data to the memory and control signals to the subsequent modules with information about the presented data or the state of the algorithm – formally as $I ( d _ { e , t } , d _ { o , t - 1 } ) \longmapsto c _ { i , t } , d _ { i , t }$ .
77
+
78
+ The ALU module performs the basic operations which the architecture can use to modify data. Therefore, it receives the data and a control signal indicating which operation to apply and outputs the modified data and control signals about the operation – $A \left( c _ { f , t } , d _ { f , t } \right) \longmapsto c _ { a , t } , d _ { a , t }$ . As in many applications the basic operations only modify a part of the data and to reduce the complexity of the ALU, a TransformD module extracts the relevant part from the data beforehand – $\bar { T _ { D } } ( d _ { m , t } ) \longmapsto$ $d _ { f , t } - \mathrm { o r }$ just transfers the unmodified data if no transformation is required for the task.
79
+
80
+ ![](images/22fdb5285dbc6a5bf67a8f2351c6f3f43392b893db8cc165fdf9d5fd5fa20050.jpg)
81
+ Figure 2: Examples of search trees that the architecture implicitly learned to generate to solve a given symbolic planning task, where $s _ { i }$ corresponds to task configurations and $a _ { k }$ to ALU operations that transform the task configuration. (a) corresponds to a task from curriculum level 3 with a maximum number of computations steps of 15 including backtracking. $\mathbf { ( b ) }$ shows the tree for a task that required 330.631 computation steps (corresponds to level 82.656) that was solved by an algorithmic solution that triggered learning only until 15 steps, the complexity shown in (a).
82
+
83
+ The Output module combines the result of the data manipulation operation from the ALU module and the data before the manipulation. It inserts the local change done by the ALU into the original data word – $\cdot O ( c _ { a , t } , d _ { a , t } , d _ { m , t } ) \longmapsto c _ { o , t } , d _ { o , t }$ . As before with the Transformation module, depending on the task, the Output module can also be designed to just pass on the received data.
84
+
85
+ # 3 EXPERIMENTS
86
+
87
+ We investigate the learning of symbolic planning tasks, where task complexity is measured as the number of computational steps required to solve a task, i.e., the size of the corresponding search tree (see Figure 2). Learning is done in the Sokoban domain, whereas the generalization and abstraction requirements $\mathbf { R } 1 - \mathbf { R } 3$ are shown by transferring to (1) longer planning tasks, (2) bigger Sokoban worlds, (3) a different data representation, and (4) two different task domains – sliding block puzzle and robotic manipulation.
88
+
89
+ In Sokoban, an agent interacts in a grid world with four actions – moving up, right, down or left. Therefore, the ALU can perform four operations and additionally a nop operation that leaves the given configuration unchanged. The world contains empty spaces that can be entered, walls that block movement and boxes that can be pushed onto empty space. A task is given by a start configuration of the world and the desired goal configuration. For learning, we use a world of size $6 \times 6$ that is enclosed by walls. A world is represented with binary vectors and four-dimensional one-hot encodings for each position, resulting in 144-dimensional data words. The configuration of each world – inner walls, boxes and agent position – is sampled randomly. Each world is generated by sampling uniformly the number of additional inner walls from [0, 2] and boxes from [1, 5]. The positions of these walls, boxes and the position of the agent are sampled uniformly from the empty spaces. An example task and the learned solution is shown in the Appendix in Figure 5 – the penguin is the agent, icebergs are boxes, iceblocks are walls and water is empty space.
90
+
91
+ # 3.1 ALGORITHMIC MODULES
92
+
93
+ In the experiments we use a feedforward neural network as Controller with a layer size of 16 neurons and tanh activation. The TransformC is a linear layer projecting its 27-dimensional input onto the 5 operations of the ALU using leaky-ReLU activation and one-hot encoding. The computational memory has a word size of 8 bit, the Input module generates 3 control signals (2 for Learning to Search), and the ALU and Output module control signal feedback is not used here. Thus, the input to the Controller consists of 16 control signals and in total there are about 1600 parameters.
94
+
95
+ # 3.1.1 LEARNING OF THE DATA-DEPENDENT MODULES
96
+
97
+ All data-dependent modules are trained in a supervised setting and consist of feedforward networks. They optimize a cross entropy loss using Adam (Kingma & Ba, 2015) on a mini-batch size of
98
+
99
+ 20. To improve their generalization and robustness, the bad memories mechanism described in Section 2.1.1 is used with a buffer size of 200 and $5 0 \%$ of the samples within a mini-batch are sampled from that. The following task-dependent instantiations of the data-dependent modules are examples used for the Sokoban domain.
100
+
101
+ The Input module learns an equality function using differential rectifier units as inductive bias (Weyde & Kopparti, 2018) and consists of a feedforward network with 10 hidden units and leaky-ReLU activation. Using the learned binary equality signal $I _ { e , t }$ at step $t$ , it produces three binary control signals according to $c _ { i , t } ^ { [ 1 ] } = ( 1 - I _ { e , t } ) - c _ { i , t - 1 } ^ { [ 2 ] }$ , $c _ { i , t } ^ { [ 2 ] } = I _ { e , t } + c _ { i , t - 1 } ^ { [ 2 ] }$ , and $c _ { i , t } ^ { [ 3 ] } = I _ { e , t } c _ { i , t - 1 } ^ { [ 2 ] }$ indicating the different phases of the algorithm. For the Learning to Search experiment only the first two signals are used.
102
+
103
+ The TransformD module extracts a different view on the data, if required by the ALU, as described in Section 2.2. Here, it consists of a feedforward network with 500 hidden neurons and uses leaky-ReLU activation. For the Sokoban domain, the actions that the agent can take – and therefore the operation the ALU can apply – only change the world locally. Thus, the TransformD module extracts a local observation of the world $d _ { f }$ , i.e., the agent and the two adjacent locations in all four directions, as these are the only locations where an action can produce a change.
104
+
105
+ The ALU module receives the data view extracted by TransformD and the control signal from TransformC, that encodes the operation to apply. It learns to apply the operations, i.e., it learns an action model by learning preconditions and effects, and outputs the (potential) local change together with a control signal indicating if the action changed the world or not. The local change is encoded as the direction of the change and the three according spaces. The module consists of two feedforward networks, one for the control signal $c _ { a }$ and one for applying the actions producing the manipulated data $d _ { a }$ . The learned $c _ { a }$ is used to gate the output between the output of the action network and the data input without change. The control network has two hidden layers with sizes [64, 64], the action network has hidden layers with [128, 64] neurons and both use leaky-ReLU activations.
106
+
107
+ The Output module inserts the (locally) changed data from the ALU into the data stream. It receives the data from the memory $d _ { m }$ , the data $d _ { a }$ and control stream $c _ { a }$ from the ALU. It consists of two feedforward networks for learning the data $d _ { o }$ and the control signal $c _ { o }$ stream. The control network has two hidden layers with sizes [500, 250], the data network has hidden layers with [500, 500] neurons and both use leaky-ReLU activations. The control signal $c _ { o }$ is used for gating between the data with the inserted change and the original data $d _ { m }$ . To ensure that the Output module uses the manipulated data of the ALU and is not learning to manipulate the data itself, it is constrained to learn a binary mask that indicates where the change needs to be inserted. This binary map indicates for each position in $d _ { a }$ where to insert it in $d _ { m }$ and can be seen as a structured prediction problem. Note, the training data only consists of data and control signals, the true binary mask is not known.
108
+
109
+ # 3.2 LEARNING ALGORITHMIC SOLUTIONS
110
+
111
+ We investigate the learning of two algorithms, (1) a search algorithm and (2) a search-based planning algorithm. The data-dependent modules do not need to be retrained for the different algorithms. For evaluating that the learned strategy is an abstract algorithmic solution, we show that it fulfills the three requirements R1 – R3 discussed in Section 1.1.
112
+
113
+ # 3.2.1 LEARNING TO SEARCH
114
+
115
+ In the first task, the model has to learn breadth-first-search to find the desired goal configuration. For that purpose, the initial input to the model is the start and goal configuration and subsequent inputs are the goal configuration and the output of the model from the previous computation step. To solve the task, the model has to learn to produce the correct search tree and recognizing that the goal configuration is reached by choosing the nop operation for the correct computation step.
116
+
117
+ For the curriculum learning the levels are defined as the number of nodes from the search tree that have to be fully explored, e.g., for Level 1, up to five correct computation steps have to be performed on the initial configuration; for Level 3 the initial configuration as well as the two subsequently found configurations need to be fully explored (see Figure 2(a)). This requires up to 13 correct computational steps. Curriculum levels are specified up to Level 21 that involves up to 85 correct computation steps to be solved. An additional Level 22 is activated afterwards that consists of new samples from all 21 levels for evaluation. To prevent unlearning of previous levels, $2 0 \%$ of the samples in the mini-batch are sampled uniformly from previous levels. As in (Wierstra et al., 2014)
118
+
119
+ we use restarting, but here the run automatically restarts if the maximum fitness of a level is not reached within 2500 iterations. All experiments have a total budget of 10.000 iterations.
120
+
121
+ The fitness function $f$ uses step-wise binary losses computed as comparison to the correct solution over mini-batches of $N$ samples and is defined as
122
+
123
+ $$
124
+ f = \left\{ \begin{array} { l l } { \frac { 1 } { N } \sum _ { n } ^ { N } f _ { e } ^ { [ n ] } } & { \mathrm { ~ i f ~ } \frac { 1 } { N } \sum _ { n } ^ { N } f _ { e } ^ { [ n ] } < 1 0 0 } \\ { \frac { 1 } { N } \sum _ { n } ^ { N } f _ { e } ^ { [ n ] } + f _ { b } ^ { [ n ] } } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right. \quad , \mathrm { ~ w i t h ~ }
125
+ $$
126
+
127
+ $$
128
+ f _ { \epsilon } ^ { [ n ] } = \frac { 1 0 0 } { 3 T _ { \epsilon } ^ { [ n ] } } \sum _ { t = 1 } ^ { T _ { \epsilon } ^ { [ n ] } } I ( c _ { f , t } ^ { [ n ] } = \tilde { c } _ { f , t } ^ { [ n ] } ) + 2 I ( d _ { m , t } ^ { [ n ] } = \tilde { d } _ { m , t } ^ { [ n ] } ) \quad \mathrm { a n d } \quad f _ { b } ^ { [ n ] } = 2 0 I ( c _ { f , T _ { \epsilon } ^ { [ n ] } + 1 } ^ { [ n ] } = \mathrm { n o p } ) \ .
129
+ $$
130
+
131
+ where $T _ { e }$ is the number of steps required for constructing the search tree or when the first mistake occurs, $c _ { f , t }$ is the operation chosen to be applied by the ALU from TransformC at step $t$ , $d _ { m , t }$ is the data word read from the memory, and $\tilde { c } _ { f , t }$ and $\tilde { d } _ { m , t }$ are the correct choices respectively. The exploration fitness $f _ { e } ^ { [ n ] }$ captures the fraction of correct computation steps until the goal configuration is found, scaled to $0 . 1 0 0 \%$ . Note that, NES therefore only uses a single scalar value that summarizes the performance of the parameters over $N$ samples and all computational steps. The learning rate $\alpha$ is to 0.01, the $\sigma$ of the search distribution to 0.1, weight decay is applied with 0.9995, mini-batch size is $N = 2 0$ and the population size is $P = 2 0$ .
132
+
133
+ We use a gini coefficient based ranking that gives more importance to samples with higher fitness (Schaul et al., 2010). The maximum fitness is 120 for all levels and a level is solved when 250 subsequent iterations have the maximum fitness, i.e., 5000 samples are solved correctly. The bad memories consist of 200 samples and $2 5 \%$ of the samples within a mini-batch are sampled uniformly from those. Whenever 10 subsequent iterations achieve the maximum fitness, the buffer is cleared and no learning is performed.
134
+
135
+ # 3.2.2 LEARNING TO PLAN (SEARCH $^ +$ BACKTRACK)
136
+
137
+ In the second task, the model has to learn, in addition to the breadth-first-algorithm that computes a search tree to the goal configuration, to also extract the path from the search tree that encodes the solution to the given planning problem (see Figure 2 and Figure 5 in the Appendix). Therefore, the model has to not only learn to encode and perform two different algorithms, but also to switch between them at the correct computation step.
138
+
139
+ The initial input to the model is the start and goal configuration and subsequent inputs are the goal configuration and the output of the model from the previous computation step, as before. When the goal configuration is found by the model, the input is the start configuration and the previous output. To solve the task, the model has to learn to produce the search tree and recognizing that the goal configuration is reached as before. In addition, after recognizing the goal configuration, the model needs to switch behavior and output the path of the search tree encoding the planning solution. This solution consists of the states from the initial to the goal configuration and nop operations in reverse order. Therefore, the number of maximum computation steps increases up to 89 in Level 21. The fitness function is defined as in Equation equation 1 but with
140
+
141
+ $$
142
+ f _ { b } ^ { [ n ] } = \frac { 5 0 } { 3 T _ { b } ^ { [ n ] } } \sum _ { t = T _ { e } ^ { [ n ] } + 1 } ^ { T _ { e } ^ { [ n ] } + T _ { b } ^ { [ n ] } } I ( c _ { f , t } ^ { [ n ] } = \mathrm { n o p } ) + 2 I ( d _ { m , t } ^ { [ n ] } = \tilde { d } _ { m , t } ^ { [ n ] } ) ,
143
+ $$
144
+
145
+ where $T _ { b }$ is the number of steps required for backtracking the solution or when the first mistakes occurs. The maximum fitness is 150 and all other settings remain as before.
146
+
147
+ # 3.3 R1 – GENERALIZATION TO UNSEEN TASK CONFIGURATIONS AND COMPLEXITIES
148
+
149
+ A main goal in all learning tasks, is to achieve generalization – to not only learn to solve seen situations, but to learn a solution that generalizes to unseen situations. One evaluation of this generalization ability is built into our learning process itself. A curriculum level is solved after 250 subsequent iterations (5000 samples) with maximum fitness and iterations with maximum fitness do not trigger learning. Thus, if presenting a new level that involves more complex tasks, the fitness stays at maximum and no learning is triggered, the previously learned solution generalizes to the new setting – generalizes to more complex tasks (see Figure 2).
150
+
151
+ ![](images/4c4da13a0512749a6d02ab75b77afa3f2368239b9101bc736d0c9d41cd56eb8a.jpg)
152
+ Figure 3: (a-c) The gray dashed line marks the maximum fitness and the colored lines show the fitness. The light colors indicate that the maximum fitness is achieved and no learning is triggered. The colored dashed lines indicate when a curriculum level was solved successfully. When no learning is triggered after a new level is unlocked, the model generalized to more complex tasks. The top numbers indicate the number of computational steps the model needs to perform correctly to solve samples of the associated curriculum level. (c) Comparison with the original DNC and a stack-augmented neural network on the Learning to Search task over 10 runs. In contrast to our architecture, both methods are trained in a supervised setup with gradient descent and crossentropy loss, i.e., have a richer and localized training signal. For comparison the mean and standard deviation of the same fitness function that our model uses for training is shown. Both are not able to successfully solve Level 1 within considerably more iterations. (d) 15 runs of the two learning tasks, highlighting that learning happens during the first levels and generalizes to the subsequent levels. Bar plot shows mean and standard deviation of the number of learning iterations, numbers on top of the bars show the number of runs that triggered learning in that level. Lower plot shows the number of runs that solved the according curriculum level, i.e., where they ended after the budget of 10.000 iterations.
153
+
154
+ This generalization is shown in Figure 3. For example, in the Learning to Plan setup (Figure 3(b)), after 3 levels the algorithmic solution is found and no learning is triggered anymore during the run. Moreover, the last triggered learning was for curriculum Level 3 – meaning a complexity of 15 computational steps – and the found solution generalizes up to the highest specified curriculum Level 21 with 89 computational steps. Learning the algorithmic solution is done within 3 levels and 2563 iterations. Figure 3(d) shows the evaluation of learning to solve the two tasks over 15 runs each. In contrast, the original DNC (Graves et al., 2016) model and a stack-augmented recurrent neural network for algorithmic patterns (Joulin & Mikolov, 2015) are not able to solve Level 1 when trained in a supervised setup with gradient descent and considerably more training iterations, see Figure 3(c) and the Appendix B for implementation details.
155
+
156
+ Task complexity. Additionally, we evaluated the learned algorithmic solution with task complexities far beyond the specified curriculum learning levels, i.e., complexities experienced during training. Therefore, we used the run shown in Figure 3(b) and solved tasks requiring 330.631 computational steps (corresponds to level 82.656), having been trained only up to 15 steps (see Figure 2 for the complexities) and having been tested during training only up to 89 steps. Remember the models recurrent output-input structure, given the initial task input, the model performs 330.631 computational steps, i.e., learns to build a search tree with over 330.600 nodes, autonomously correct to compute and output the solution. Moreover, the solution learned in $6 \times 6$ environments, successfully solved all tasks within $8 \times 8$ environments. Thus, the learned strategy represents an abstract algorithmic solution that generalizes and scales to arbitrary task configurations and complexities, fulfilling R1. The learned algorithmic solution is explained with an example in the Appendix A.
157
+
158
+ # 3.4 R2 – INDEPENDENCE OF THE DATA REPRESENTATION
159
+
160
+ Algorithmic solutions are independent of the data representation, meaning the abstract strategy is still working if the encoding is changed, as long as the data-dependent operations are adjusted. Consider again a sorting algorithm. Its algorithmic behavior stays the same independent of if it has to sort a list of numbers encoded binary or hexadecimally, as long as the compare operators are defined. To show that our learned algorithmic solutions have this feature and fulfill R2, we change the representation of the data, but reuse the learned algorithmic modules and the model can still solve all tasks without retraining. The data-dependent modules are adapted and relearned. The changed representation, e.g., the penguin represents a wall instead of the agent, and results over 10.000 iterations (200.000 samples) over all curriculum levels are shown in Figure 4 (left). The fitness is at maximum from the start, showing that all samples in all levels are successfully solved without triggering learning while operating on the new data representation and hence, R2 is fulfilled.
161
+
162
+ ![](images/a7f481f576b36e0d41ec5345892b53cef890e2270495f2f58e467c99eaadf639.jpg)
163
+ Figure 4: Transferring the learned algorithmic solution (left) to a new data representation (R2) and (middle & right) to two new task domains (R3). In all setups, all 200.000 samples over all curriculum levels are solved correctly without triggering learning, indicated by the constant maximum fitness, showing the straightforward transfer of the learned solution – the abstract features R2 and R3 of the learned solution.
164
+
165
+ # 3.5 R3 – INDEPENDENCE OF THE TASK DOMAIN
166
+
167
+ Requirement R3 states that an algorithmic solution is independent of the task domain. Consider again the sorting algorithm example: as long as the compare operators are defined, it is able sort arbitrary objects. Therefore, the data-dependent modules are adapted and relearned but we reuse the learned algorithmic solution on two new task domains.
168
+
169
+ As new domains, $3 \times 3$ sliding block puzzles and a robotic manipulation task are used (Figure 4). Configurations are represented with binary vectors as described for Sokoban in Section 3. For the puzzle domain, actions are sliding adjacent tiles onto the free (white) space from four directions. A task configuration is given as a start and goal board configuration. In the robotic manipulation domain, a task is given as start and goal configuration of the objects. The available actions are the four locations on which objects can be stacked, e.g., the action pos1 encodes to move the gripper to the position and place the grasped object on top, or to pick up the top object if no object is grasped. The maximum stacking height is 3 boxes, resulting in a discrete representation of the object configuration with a $3 \times 4$ grid. As with the new data representation, the learned algorithmic solution is able to solve all 200.000 presented samples from all curriculum levels in the new domains without triggering learning (Figure 4), showing the independence of the task domain, fulfilling R3.
170
+
171
+ # 4 CONCLUSION
172
+
173
+ We present a novel architecture for learning algorithmic solutions and showed how it can learn abstract strategies that generalize and scale to arbitrary task configurations and complexities (R1) (Section 3.3), and are independent to both, the data representation (R2) (Section 3.4) and the task domain (R3) (Section 3.5). Such algorithmic solutions represent abstract strategies that can be transferred directly to novel problem instantiations, a crucial ability for intelligent behavior.
174
+
175
+ To show that our architecture is capable of learning strategies fulfilling the algorithm requirements R1 – R3 in symbolic planning tasks, we performed experiments with complexities orders of magnitude higher than seen during training (15 vs. 330.631 steps, and Figure 2 & 3), and transferred the learned solution to bigger state spaces, a new data representation and two new task domains (Figure 4) – showing, to the best of our knowledge, for the first time how such abstract strategies can be represented and learned with memory-augmented networks. The learned algorithmic solution can be applied to any problem that can be framed as such a symbolic search or planning problem.
176
+
177
+ The modular structure and the information flow of the architecture enable the learning of algorithmic solutions, the transfer of those, and the incorporation of prior knowledge. Using Natural Evolution Strategies for learning removes constraints on the individual modules, allowing for arbitrary module instantiations and combinations, and the beneficial use of a non-differentiable memory module (Greve et al., 2016). As the complexity and structure of the algorithmic modules need to be specified, it is an interesting road for future work to learn these in addition, building on the ideas from Greve et al. (2016); Merrild et al. (2018). Showing how algorithmic solutions characterized by R1 – R3 can be represented and learned with memory-augmented networks sets the foundation for future work, extending beyond symbolic planning and incorporating intrinsic motivation (Oudeyer & Kaplan, 2009; Baldassarre & Mirolli, 2013) to discover new and unexpected strategies.
178
+
179
+ # REFERENCES
180
+
181
+ Gianluca Baldassarre and Marco Mirolli. Intrinsically motivated learning systems: an overview. In Intrinsically motivated learning in natural and artificial systems, pp. 1–14. Springer, 2013.
182
+
183
+ Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ International Conference on Machine Learning, pp. 41–48. ACM, 2009.
184
+
185
+ Edoardo Conti, Vashisht Madhavan, Felipe Petroski Such, Joel Lehman, Kenneth Stanley, and Jeff Clune. Improving exploration in evolution strategies for deep reinforcement learning via a population of novelty-seeking agents. In Advances in Neural Information Processing Systems, pp. 5027–5038, 2018.
186
+
187
+ Sreerupa Das, C Lee Giles, and Guo-Zheng Sun. Learning context-free grammars: Capabilities and limitations of a recurrent neural network with an external stack memory. In Conference of Cognitive Science Societyy, pp. 14, 1992.
188
+
189
+ Yoav Freund and Robert E Schapire. A decision-theoretic generalization of online learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997.
190
+
191
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv:1410.5401, 2014.
192
+
193
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471, 2016.
194
+
195
+ Rasmus Boll Greve, Emil Juul Jacobsen, and Sebastian Risi. Evolving neural turing machines for reward-based learning. In Proceedings of the Genetic and Evolutionary Computation Conference 2016, pp. 117–124. ACM, 2016.
196
+
197
+ Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems, pp. 190–198, 2015.
198
+
199
+ Łukasz Kaiser and Samy Bengio. Can active memory replace attention? In Advances in Neural Information Processing Systems, pp. 3781–3789, 2016.
200
+
201
+ Łukasz Kaiser and Ilya Sutskever. Neural GPUs learn algorithms. International Conference on Learning Representations, 2016.
202
+
203
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015.
204
+
205
+ Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in Neural Information Processing Systems, pp. 950–957, 1992.
206
+
207
+ Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In International Conference on Machine Learning, pp. 1378–1387, 2016.
208
+
209
+ Long-Ji Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine Learning, 8(3-4):293–321, 1992.
210
+
211
+ Horia Mania, Aurelia Guy, and Benjamin Recht. Simple random search of static linear policies is competitive for reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1803–1812. 2018.
212
+
213
+ Jakob Merrild, Mikkel Angaju Rasmussen, and Sebastian Risi. HyperNTM: evolving scalable neural turing machines through HyperNEAT. In International Conference on the Applications of Evolutionary Computation, pp. 750–766. Springer, 2018.
214
+
215
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
216
+
217
+ Michael C Mozer and Sreerupa Das. A connectionist symbol manipulator that discovers the structure of context-free languages. In Advances in Neural Information Processing Systems, pp. 863–870, 1993.
218
+
219
+ Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. International Conference on Learning Representations, 2016.
220
+
221
+ Pierre-Yves Oudeyer and Frederic Kaplan. What is intrinsic motivation? a typology of computational approaches. Frontiers in neurorobotics, 1:6, 2009.
222
+
223
+ Tim Salimans, Jonathan Ho, Xi Chen, Szymon Sidor, and Ilya Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv:1703.03864, 2017.
224
+
225
+ Tom Schaul, Justin Bayer, Daan Wierstra, Yi Sun, Martin Felder, Frank Sehnke, Thomas Ruckstieß,¨ and Jurgen Schmidhuber. Pybrain. ¨ Journal of Machine Learning Research, 11(Feb):743–746, 2010.
226
+
227
+ Daniel L Silver, Qiang Yang, and Lianghao Li. Lifelong machine learning systems: Beyond learning algorithms. In AAAI Spring Symposium: Lifelong Machine Learning, volume 13, pp. 05, 2013.
228
+
229
+ Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
230
+
231
+ Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in Neural Information Processing Systems, pp. 2440–2448, 2015.
232
+
233
+ Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009.
234
+
235
+ Joshua B Tenenbaum, Charles Kemp, Thomas L Griffiths, and Noah D Goodman. How to grow a mind: Statistics, structure, and abstraction. Science, 331(6022):1279–1285, 2011.
236
+
237
+ Greg Wayne, Chia-Chun Hung, David Amos, Mehdi Mirza, Arun Ahuja, Agnieszka GrabskaBarwinska, Jack Rae, Piotr Mirowski, Joel Z Leibo, Adam Santoro, et al. Unsupervised predictive memory in a goal-directed agent. arXiv:1803.10760, 2018.
238
+
239
+ Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In International Conference on Learning Representations, 2015.
240
+
241
+ Tillman Weyde and Radha Manisha Kopparti. Feed-forward neural networks need inductive bias to learn equality relations. arXiv:1812.01662, 2018.
242
+
243
+ Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jurgen Schmidhuber. ¨ Natural evolution strategies. Journal of Machine Learning Research, 15(1):949–980, 2014.
244
+
245
+ Wojciech Zaremba and Ilya Sutskever. Learning to execute. arXiv:1410.4615, 2014.
246
+
247
+ Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. In International Conference on Machine Learning, pp. 421–429, 2016.
248
+
249
+ Zheng Zeng, Rodney M Goodman, and Padhraic Smyth. Discrete recurrent neural networks for grammatical inference. IEEE Transactions on Neural Networks, 5(2):320–330, 1994.
250
+
251
+ Figure 5 highlights the learned algorithmic behavior – one memory location is read with content lookup attention repeatedly until all operations have been applied, the node is fully explored. Then attention shifts towards temporal linkage to read the next data to be explored. This pattern continuous until the goal configuration is found in step 11. After that, behavior changes to output the backtracking solution by switching to usage linkage attention and nop operations until reaching the initial configuration.
252
+
253
+ ![](images/ad6a35ac08285aacc2d93c3148de10352f548ea59292f9c11725e38638ed462a.jpg)
254
+ Figure 5: The behavior of the learned model on a task from Level 3 (see Sec. 3.2 for details) and the corresponding search tree that is constructing implicitly. In the search phase, the model fully explores one node by successively applying all operations, before reading the next node, until the goal is found. Then behavior changes in the backtrack phase, where the solution of the planning task is emitted as the states from start to goal in reverse order along with nop operations. The algorithmic behavior can also be seen in the repetitive patterns of the attention vector, showing the five attention mechanisms for reading (temporal and usage linkage in both directions, and content lookup), that represents how strong each mechanism for reading is used in each computation step.
255
+
256
+ # B DETAILS ON THE IMPLEMENTATIONS OF THE COMPARISON METHODS
257
+
258
+ Both models, the orignal Differential Neural Computer (DNC) (Graves et al., 2016) and the stackaugmented recurrent network (Joulin & Mikolov, 2015) are trained in a supervised setting with cross-entropy losses for 500.000 iterations to compensate the pretraining of the data modules. They use the same output-input loop as our architecture, i.e., receiving their own output as input in the next computation step in addition to the goal configuration. The loss is computed based on the correct sequences of configurations and the control signal indicating that the goal has been reached, similar like the fitness function from our architecture in equation 1. Both use a LSTM network with 256 hidden units as controller and the memory word size is set to 152, equal to our model. Like our architecture, the DNC has one read and two write heads. The stack-augmented model uses four stacks with the three actions PUSH, POP, and NO OP.
259
+
260
+ ![](images/1604945984e519e93941e57fec5e3e7bbd547abb33df12bbc0d063a1a4a75ceb.jpg)
261
+
262
+ (a) Differential Neural Computer, reprinted with permission from (Graves et al., 2016).
263
+
264
+ (b) Stack-augmented recurrent network, reprinted with permission from (Joulin & Mikolov, 2015) .
265
+
266
+ # C EVALUATION OF THE LEARNING PROCESS AND MODEL COMPONENTS
267
+
268
+ For evaluation the effect of the individual modifications and extensions we compared our architecture with and without them on the Learning to Search task. In all setups all runs had a budget of 10.000 iterations. The bar plots show mean and standard deviation of the number of learning iterations, numbers on top of the bars show the number of runs that triggered learning in that level. Plots below the bar plot show the number of runs that successfully solved the according curriculum level, i.e., where they ended after the budget of 10.000 iterations. All comparisons are done without the restarting mechanisms, except in the evaluation for that mechanism.
269
+
270
+ # NOVELTY AND RESTARTS
271
+
272
+ Here two mechanisms to face the problem of getting stuck in local optima are evaluated, namely the automatic restart as in the original NES (Wierstra et al., 2014) and the use of an additional novelty signal as in NSRA-ES (Conti et al., 2018). For the novelty calculation, we defined the behavior as the sequence of read memory locations and applied ALU operations. The baseline model does not use either of the two mechanisms. While we did not observe an improvement using novelty, the automatic restarts reduced the number of learning iterations, see Figure 7. Note that the baseline and novelty model are also able to learn algorithmic solutions, but they require more iterations and, hence, they die out before the final curriculum level due to reaching the budget of 10.000 iterations.
273
+
274
+ ![](images/d84676d3a03c774606a7e0cd5fdf73c9ebaf606ff172ae85039d5ff49bfe9995.jpg)
275
+ Figure 7: Evaluation of an additional novelty signal and automatic restarts.
276
+
277
+ # CONSTRAINED WRITE HEAD
278
+
279
+ Here we evaluated the introduced constrained write head, that updates the previously read memory location. We compared against two models without this constrained head, one with one write head and one with two write heads to compensate the missing constrained head. The constrained head was a necessary modification to enable the efficient learning of algorithmic solutions, see Figure 8.
280
+
281
+ ![](images/e7c12a38032523ea6431ec5610e4cae169961a0a02777fc9533d4b66307bb922.jpg)
282
+ Figure 8: Evaluation of the introduced constrained write head.
283
+
284
+ # USAGE-LINKAGE AND HARD ATTENTION VS. SOFT ATTENTION
285
+
286
+ Here the introduced usage-linkage and hard attention mechanism for memory access are evaluated. While using hard attention instead of soft attention was a necessary modification to enable efficient learning of algorithmic solutions, the introduced usage-linkage had a smaller impact on the Learning to Search task, as shown in Figure 9. When applied to the Learning to Plan setup however, the usagelinkage improved the learning of algorithmic solutions significantly, see Figure 10. Both results show that the model learns to use the attention mechanisms that are required for the algorithmic solution, i.e., the usage-linkage is especially useful for the backtracking in the Learning to Plan setup compared to the Learning to Search setup where no backtracking is required.
287
+
288
+ ![](images/b8995f9b8808eba39ce8b31de2a1a6344efa7e1cd3efa29efc8e8f871e3ab7f9.jpg)
289
+ Figure 9: Evaluation of the introduced usage-linkage attention and the hard attention memory access.
290
+
291
+ ![](images/7eef0d11a1356ac3f506171e95fc2d88bc5d1895e164a14113aa4a4754a93cf7.jpg)
292
+ Figure 10: Evaluation of the usage-linkage attention on the Learning to Plan setup.
293
+
294
+ BAD MEMORIES
295
+
296
+ The bad memories approach was developed while learning the data-dependent modules and was a necessary mechanism to learn robust and generalized modules with $1 \bar { 0 } 0 \%$ accuracy, as explained in Section 2.1.1. For learning the algorithmic solutions, the impact of this learning from mistakes strategy was less significant, see Figure 11.
297
+
298
+ ![](images/761af117c5e5af29f04ad32295caa301c167a30faeafc701111278fbdaa83847.jpg)
299
+ Figure 11: Evaluation of the bad memories mechanism.
parse/train/S1gNc3NtvB/S1gNc3NtvB_content_list.json ADDED
@@ -0,0 +1,1651 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING ALGORITHMIC SOLUTIONS TO SYMBOLIC PLANNING TASKS WITH A NEURAL COMPUTER ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "A key feature of intelligent behavior is the ability to learn abstract strategies that transfer to unfamiliar problems. Therefore, we present a novel architecture, based on memory-augmented networks, that is inspired by the von Neumann and Harvard architectures of modern computers. This architecture enables the learning of abstract algorithmic solutions via Evolution Strategies in a reinforcement learning setting. Applied to Sokoban, sliding block puzzle and robotic manipulation tasks, we show that the architecture can learn algorithmic solutions with strong generalization and abstraction: scaling to arbitrary task configurations and complexities, and being independent of both the data representation and the task domain. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 392
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 420,
55
+ 336,
56
+ 436
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Transferring solution strategies from one problem to another is a crucial ability for intelligent behavior (Silver et al., 2013). Current learning systems can learn a multitude of specialized tasks, but extracting the underlying structure of the solution for effective transfer is an open research problem (Taylor & Stone, 2009). Abstraction is key to enable these transfers (Tenenbaum et al., 2011) and the concept of algorithms in computer science is an ideal example for such transferable abstract strategies. An algorithm is a sequence of instructions, which solves a given problem when executed, independent of the specific instantiation of the problem. For example, consider the task of sorting a set of objects. The algorithmic solution, specified as the sequence of instructions, is able to sort any number of arbitrary classes of objects in any order, e.g., toys by color, waste by type, or numbers by value, by using the same sequence of instructions, as long as the features and compare operations defining the order are specified. Learning such structured, abstract strategies enables the transfer to new domains and representations (Tenenbaum et al., 2011). Moreover, abstract strategies as algorithms have built-in generalization capabilities to new task configurations and complexities. ",
63
+ "bbox": [
64
+ 174,
65
+ 446,
66
+ 825,
67
+ 626
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Here, we present a novel architecture for learning abstract strategies in the form of algorithmic solutions. Based on the Differential Neural Computer (Graves et al., 2016) and inspired by the von Neumann and Harvard architectures of modern computers, the architectures modular structure allows for straightforward transfer by reusing learned modules instead of relearning, prior knowledge can be included, and the behavior of the modules can be examined and interpreted. Moreover, the individual modules of the architecture can be learned with different learning settings and strategies – or be hardcoded if applicable – allowing to split the overall task into easier subproblems, contrary to the end-to-end learning philosophy of most deep learning architectures. Building on memory-augmented neural networks (Graves et al., 2016; Neelakantan et al., 2016; Weston et al., 2015; Joulin & Mikolov, 2015), we propose a flexible architecture for learning abstract strategies as algorithmic solutions and show the learning and transferring of such in symbolic planning tasks. ",
74
+ "bbox": [
75
+ 174,
76
+ 633,
77
+ 825,
78
+ 786
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "1.1 THE PROBLEM OF LEARNING ALGORITHMIC SOLUTIONS ",
85
+ "text_level": 1,
86
+ "bbox": [
87
+ 174,
88
+ 799,
89
+ 611,
90
+ 813
91
+ ],
92
+ "page_idx": 0
93
+ },
94
+ {
95
+ "type": "text",
96
+ "text": "We investigate the problem of learning algorithmic solutions which are characterized by three requirements: R1 – generalization to different and unseen task configurations and task complexities, R2 – independence of the data representation, and R3 – independence of the task domain. ",
97
+ "bbox": [
98
+ 174,
99
+ 819,
100
+ 823,
101
+ 861
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Picking up the sorting algorithm example again, R1 represents the ability to sort lists of arbitrary length and initial order, while R2 and R3 represent the abstract nature of the solution. This abstraction enables the algorithm, for example, to sort a list of binary numbers while being trained only on hexadecimal numbers (R2). Furthermore, the algorithm trained on numbers is able to sort lists of strings (R3). If R1 – R3 are fulfilled, the algorithmic solution does not need to be retrained or adapted to solve unforeseen task instantiations – only the data specific operations need to be adjusted. ",
108
+ "bbox": [
109
+ 174,
110
+ 867,
111
+ 823,
112
+ 924
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "image",
118
+ "img_path": "images/490cd57b36abafb628db85e20787d1e9e83d5e0b8bdbd6fc5ae93c20f5ea787a.jpg",
119
+ "image_caption": [
120
+ "Figure 1: The proposed architecture with its modules inspired by computer architectures. In this work the modules are based on neural networks. Information flow is divided into data and control streams. The modules inside the highlighted area are learning the algorithmic solution in a reinforcement learning setting, whereas the others (data modules) are learned independently in a supervised setting or can use hardcoded information. "
121
+ ],
122
+ "image_footnote": [],
123
+ "bbox": [
124
+ 173,
125
+ 101,
126
+ 818,
127
+ 212
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "",
134
+ "bbox": [
135
+ 174,
136
+ 287,
137
+ 825,
138
+ 329
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Research on learning algorithms typically focuses on identifying algorithmic generated patterns or solving algorithmic problems (Neelakantan et al., 2016; Zaremba & Sutskever, 2014; Kaiser & Sutskever, 2016; Kaiser & Bengio, 2016), less on finding algorithmic solutions (Joulin & Mikolov, 2015; Zaremba et al., 2016) fulfilling the three discussed requirements R1 – R3. While R1 is typically tackled, as it represents the overall goal of generalization in machine learning, the abstraction abilities from R2 and R3 are missing. Additionally, most algorithms require a form of feedback, using computed intermediate results from one computational step in subsequent steps, and a variable number of computational steps to solve a problem instance. Thus, it is necessary to be able to cope with varying numbers of steps and determining when to stop, in contrast to using a fixed number of steps (Neelakantan et al., 2016; Sukhbaatar et al., 2015), making the learning problem more challenging in addition. ",
145
+ "bbox": [
146
+ 174,
147
+ 337,
148
+ 825,
149
+ 489
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "A crucial feature for algorithms is the ability to save and retrieve data. Therefore, augmenting neural networks with different forms of external memory, e.g., matrices, stacks, tapes or grids, to increase their expressiveness and to separate computation from memory, especially in long time dependencies setups, is an active research direction (Graves et al., 2016; Weston et al., 2015; Joulin & Mikolov, 2015; Zaremba et al., 2016; Sukhbaatar et al., 2015; Kumar et al., 2016; Greve et al., 2016) with earlier work in the field of grammar learning (Das et al., 1992; Mozer & Das, 1993; Zeng et al., 1994). These memory-augmented networks improve performance on a variety of tasks like reasoning and inference in natural language (Graves et al., 2016; Weston et al., 2015; Sukhbaatar et al., 2015; Kumar et al., 2016), learning of simple algorithms and algorithmic patterns (Joulin & Mikolov, 2015; Zaremba et al., 2016; Graves et al., 2014), and navigation tasks (Wayne et al., 2018). ",
156
+ "bbox": [
157
+ 174,
158
+ 496,
159
+ 825,
160
+ 636
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "The contribution of this paper is a novel modular architecture building on a memory-augmented neural network (DNC (Graves et al., 2016)) for learning algorithmic solutions in a reinforcement learning setting. We show that the learned solutions fulfill all three requirements R1 – R3 for an algorithmic solution and the architecture can process a variable number of computational steps. ",
167
+ "bbox": [
168
+ 174,
169
+ 642,
170
+ 825,
171
+ 699
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "2 A NEURAL COMPUTER ARCHITECTURE FOR ALGORITHMIC SOLUTIONS ",
178
+ "text_level": 1,
179
+ "bbox": [
180
+ 173,
181
+ 720,
182
+ 803,
183
+ 736
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "In this section, we introduce the novel modular architecture for learning algorithmic solutions, shown in Figure 1. The architecture builds on the Differential Neural Computer (DNC) (Graves et al., 2016) and its modular design is inspired by modern computer architectures, related to (Neelakantan et al., 2016; Weston et al., 2015). ",
190
+ "bbox": [
191
+ 174,
192
+ 750,
193
+ 825,
194
+ 805
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "The DNC augments a controller neural network with a differentiable autoassociative external memory to separate computation from memory, as memorization is usually done in the networks weights. The controller network learns to write and read information from that memory by emitting an interface vector which is mapped onto different vectors by linear transformations. These vectors control the read and write operations of the memory, called read and write heads. For writing and reading, multiple attention mechanisms are employed, including content lookup, temporal linkage and memory allocation. Due to the design of the interface and the attention mechanisms, the DNC is independent of the memory size and fully differentiable, allowing gradient-based end-to-end learning. ",
201
+ "bbox": [
202
+ 174,
203
+ 811,
204
+ 825,
205
+ 924
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "Our architecture. In order to learn algorithmic solutions, the computations need to be decoupled from the specific data and task. To enable such data and task independent computations, we propose multiple alterations and extensions to the DNC, inspired by modern computer architectures. ",
212
+ "bbox": [
213
+ 174,
214
+ 103,
215
+ 823,
216
+ 146
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "First, information flow is divided into two streams, data and control. This separation allows to disentangle data representation dependent manipulations from data independent algorithmic instructions. Due to this separation, the algorithmic modules need to be extended to include two memories, a data and a computational memory. The data memory stores and retrieves the data stream, whereas the computational memory works on information generated by the control signal flow through the learnable controller and memory transformations. The two memories are coupled, operating on the same locations, and these locations are determined by the computational memory, and hence by the control stream. As with the DNC, multiple read and write heads can be used. In our experiments, one read and two write heads are used, with one write head constrained to the previously read location. ",
223
+ "bbox": [
224
+ 174,
225
+ 152,
226
+ 825,
227
+ 277
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "In contrast to the DNC, but in line with the computer architecture-inspired design and the goal of learning deterministic algorithms, writing and reading uses hard attentions instead of soft attentions. Hard attention means that only one memory location can be written to and read from (unique addresses), instead of an weighted average over all locations as with soft attentions. Such hard attention was shown to be beneficial for generalization (Greve et al., 2016). We also employed an additional attention mechanism for reading, called usage linkage, similar to the temporal linkage of the DNC, but instead of capturing temporal relations, it captures usage relations, i.e., the relation between written memory location and previously read location. With both linkages in two directions and the content look up, the model has five attention mechanisms for reading. While the final read memory location is determined by a weighted combination of these attentions (see attention in Figure 5 in the Appendix), each attention mechanism itself uses hard decisions, returning only one memory location. See Appendix C for the effect of the introduced modifications and extensions. ",
234
+ "bbox": [
235
+ 174,
236
+ 285,
237
+ 825,
238
+ 450
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "For computing the actual solution, operating only on the control stream is not enough, as the model still needs to manipulate the data. Therefore, we added several modules operating on the data stream, inspired by the architecture of computers. In particular, an Input, TransformD, ALU (arithmetic logic unit) and Output module were added (more details in Section 2.2). These modules manipulate the data, steered by the algorithmic modules. The full architecture is shown in Figure 1. ",
245
+ "bbox": [
246
+ 174,
247
+ 458,
248
+ 825,
249
+ 529
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "As algorithms typically involve recursive or iterative data manipulation, the model receives its own output as input in the next computation step, making the whole architecture an output-input model. With all aforementioned extensions, algorithmic solutions fulfilling R1 – R3 can be learned. ",
256
+ "bbox": [
257
+ 174,
258
+ 535,
259
+ 823,
260
+ 577
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "2.1 THE ALGORITHMIC MODULES ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 176,
270
+ 595,
271
+ 426,
272
+ 609
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "The algorithmic modules consist of the Controller, the Memory and the $T \\mathrm { r a n s f o r m } _ { C }$ module and build the core of the model. These modules learn the algorithmic solution operating on the control stream. With $t$ as the current computational step and $c$ as the control stream (see Figure 1), the input-output of the modules are $C ( c _ { i , t } , c _ { m , t - 1 } , c _ { f , t - 1 } , c _ { a , t - 1 } , c _ { o , t - 1 } ) \\longmapsto c _ { c , t }$ , $M ( c _ { i , t } , c _ { c , t } ) \\longmapsto$ $c _ { m , t } , d _ { m , t }$ and $T _ { C } ( c _ { c , t } , c _ { m , t } , c _ { i , t } ) \\longmapsto c _ { f , t }$ . The algorithmic modules are based on the DNC with the alterations and extensions described before. Next we discuss how these algorithmic modules can be learned before looking into the data-dependent modules. ",
279
+ "bbox": [
280
+ 174,
281
+ 618,
282
+ 825,
283
+ 715
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "2.1.1 LEARNING OF THE ALGORITHMIC MODULES ",
290
+ "text_level": 1,
291
+ "bbox": [
292
+ 174,
293
+ 733,
294
+ 540,
295
+ 747
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "Learning the algorithmic modules, and hence the algorithmic solution, is done in a reinforcement learning setting using Natural Evolution Strategies (NES) (Wierstra et al., 2014). NES is a blackbox optimizer that does not require differentiable models, giving more freedom to the model design, e.g., the hard attention mechanisms are not differentiable. NES updates a search distribution of the parameters to be learned by following the natural gradient towards regions of higher fitness using a population of offsprings (altered parameters) for exploration. Let $\\theta$ be the parameters to be learned and using an isotropic multivariate Gaussian search distribution with fixed variance $\\sigma ^ { 2 }$ , th e stochastic natural gradient at iteration $t$ is given by ",
302
+ "bbox": [
303
+ 173,
304
+ 753,
305
+ 825,
306
+ 866
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "equation",
312
+ "img_path": "images/4c996e4ae06a2d25e758f71db6798936c4e4937af7ca679589297a810802e68f.jpg",
313
+ "text": "$$\n\\nabla _ { \\theta _ { t } } \\mathbb { E } _ { \\epsilon \\sim N ( 0 , I ) } \\left[ u ( \\theta _ { t } + \\sigma \\epsilon ) \\right] \\approx \\frac { 1 } { P \\sigma } \\sum _ { i = 1 } ^ { P } u ( \\theta _ { t } ^ { i } ) \\epsilon _ { i } \\ ,\n$$",
314
+ "text_format": "latex",
315
+ "bbox": [
316
+ 343,
317
+ 878,
318
+ 655,
319
+ 922
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "where $P$ is the population size and $u ( \\cdot )$ is the rank transformed fitness (Wierstra et al., 2014). The parameters are updated by ",
326
+ "bbox": [
327
+ 171,
328
+ 103,
329
+ 825,
330
+ 132
331
+ ],
332
+ "page_idx": 3
333
+ },
334
+ {
335
+ "type": "equation",
336
+ "img_path": "images/8cf553ee651a2dec0e982156128e0bb56527146e54fd4ba6060372ebba3435f7.jpg",
337
+ "text": "$$\n\\theta _ { t + 1 } = \\theta _ { t } + \\frac { \\alpha } { P \\sigma } \\sum _ { i = 1 } ^ { P } u ( \\theta _ { t } ^ { i } ) \\epsilon _ { i } ,\n$$",
338
+ "text_format": "latex",
339
+ "bbox": [
340
+ 398,
341
+ 138,
342
+ 598,
343
+ 183
344
+ ],
345
+ "page_idx": 3
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "with learning rate $\\alpha$ . Recent research showed that NES and related approaches like Random Search (Mania et al., 2018) or NEAT (Stanley & Miikkulainen, 2002) are powerful alternatives in reinforcement learning. They are easier to implement and scale, perform better with sparse rewards and credit assignment over long time scales, have fewer hyperparameters (Salimans et al., 2017) and were used to train memory-augmented networks (Greve et al., 2016; Merrild et al., 2018). ",
350
+ "bbox": [
351
+ 174,
352
+ 189,
353
+ 825,
354
+ 258
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "For robustness and learning efficiency, weight decay for regularization (Krogh & Hertz, 1992) and automatic restarts of runs stuck in local optima are used as in (Wierstra et al., 2014). This restarting can be seen as another level of evolution, where some lineages die out. Another way of dealing with early converged or stuck lineages is to add intrinsic motivation signals like novelty, that help to get attracted by another local optima, as in NSRA-ES (Conti et al., 2018). In the experiments however, we found that within our setting, restarting – or having an additional survival of the fittest on the lineages – was more effective, see Appendix C for a comparison. ",
361
+ "bbox": [
362
+ 174,
363
+ 265,
364
+ 825,
365
+ 364
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "The algorithmic solutions are learned in a curriculum learning setup (Bengio et al., 2009) with sampling from old lessons (Zaremba & Sutskever, 2014) to prevent unlearning and to foster generalization. Furthermore, we created bad memories, a learning from mistakes strategy, similar to the idea of AdaBoost (Freund & Schapire, 1997), which samples previously failed tasks to encourage focusing on the hard tasks. This can also be seen as a form of experience replay (Mnih et al., 2015; Lin, 1992), but only using the task configurations, the initial input to the model, not the full generated sequence. Bad memories were developed for training the data-dependent modules to ensure their robustness and $1 0 0 \\%$ accuracy, which is crucial to learn algorithmic solutions. If the individual modules do not have $1 0 0 \\%$ accuracy, no stable algorithmic solution can be learned even if the algorithmic modules are doing the correct computations. For example, if one module has an accuracy of $9 9 \\%$ , the $1 \\%$ error prevents learning an algorithmic solution that works always. This problem is even reinforced as the proposed model is an output-input architecture that works over multiple computation steps using its own output as the new input – meaning the overall accuracy drops to $3 6 . 6 \\%$ for 100 computation steps. Therefore using the bad memories strategy, and thus focusing on the mistakes, helps significantly in achieving robust results when learning the modules, enabling the learning of algorithmic solutions. While the bad memories strategy was crucial to achieve $1 0 0 \\%$ robustness when training the data-dependent modules, the effect on learning the algorithmic solutions was less significant (see Appendix C for an evaluation). ",
372
+ "bbox": [
373
+ 173,
374
+ 369,
375
+ 825,
376
+ 619
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "2.2 DATA-DEPENDENT MODULES ",
383
+ "text_level": 1,
384
+ "bbox": [
385
+ 176,
386
+ 631,
387
+ 419,
388
+ 645
389
+ ],
390
+ "page_idx": 3
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "The data-dependent modules (Input, ALU, TransformD and Output) are responsible for all operations that involve direct data contact, such as receiving the input data from the outside or manipulating a data word with an operation chosen by the algorithmic modules. Thus, these modules need to be learned or designed for a specific data representation and task. However, as all modules only have to perform a certain subtask, these modules are typically easier to train. ",
395
+ "bbox": [
396
+ 174,
397
+ 651,
398
+ 825,
399
+ 722
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "As learning the algorithmic modules via NES does not rely on gradients and due to the information flow split, the data-dependent modules can be instantiated arbitrarily, e.g., can have nondifferentiable parts, do not need to be neural networks or can be hardcoded. Therefore, prior knowledge can be incorporated by implementing it directly into these modules. The modular design facilitates the transfer of learned modules, e.g., using the same algorithmic solution in a new domain without retraining the algorithmic modules or learning a new algorithm within the same domain without retraining the data modules. Next the general functionality of the modules will be explained. ",
406
+ "bbox": [
407
+ 174,
408
+ 728,
409
+ 823,
410
+ 827
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "The Input module is the interface to the external world and responsible for data preprocessing. Therefore, it receives the external input data and the data from the previous computational step. It sends data to the memory and control signals to the subsequent modules with information about the presented data or the state of the algorithm – formally as $I ( d _ { e , t } , d _ { o , t - 1 } ) \\longmapsto c _ { i , t } , d _ { i , t }$ . ",
417
+ "bbox": [
418
+ 176,
419
+ 833,
420
+ 823,
421
+ 890
422
+ ],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "The ALU module performs the basic operations which the architecture can use to modify data. Therefore, it receives the data and a control signal indicating which operation to apply and outputs the modified data and control signals about the operation – $A \\left( c _ { f , t } , d _ { f , t } \\right) \\longmapsto c _ { a , t } , d _ { a , t }$ . As in many applications the basic operations only modify a part of the data and to reduce the complexity of the ALU, a TransformD module extracts the relevant part from the data beforehand – $\\bar { T _ { D } } ( d _ { m , t } ) \\longmapsto$ $d _ { f , t } - \\mathrm { o r }$ just transfers the unmodified data if no transformation is required for the task. ",
428
+ "bbox": [
429
+ 174,
430
+ 895,
431
+ 823,
432
+ 924
433
+ ],
434
+ "page_idx": 3
435
+ },
436
+ {
437
+ "type": "image",
438
+ "img_path": "images/22fdb5285dbc6a5bf67a8f2351c6f3f43392b893db8cc165fdf9d5fd5fa20050.jpg",
439
+ "image_caption": [
440
+ "Figure 2: Examples of search trees that the architecture implicitly learned to generate to solve a given symbolic planning task, where $s _ { i }$ corresponds to task configurations and $a _ { k }$ to ALU operations that transform the task configuration. (a) corresponds to a task from curriculum level 3 with a maximum number of computations steps of 15 including backtracking. $\\mathbf { ( b ) }$ shows the tree for a task that required 330.631 computation steps (corresponds to level 82.656) that was solved by an algorithmic solution that triggered learning only until 15 steps, the complexity shown in (a). "
441
+ ],
442
+ "image_footnote": [],
443
+ "bbox": [
444
+ 178,
445
+ 107,
446
+ 823,
447
+ 236
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "",
454
+ "bbox": [
455
+ 174,
456
+ 338,
457
+ 825,
458
+ 395
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "The Output module combines the result of the data manipulation operation from the ALU module and the data before the manipulation. It inserts the local change done by the ALU into the original data word – $\\cdot O ( c _ { a , t } , d _ { a , t } , d _ { m , t } ) \\longmapsto c _ { o , t } , d _ { o , t }$ . As before with the Transformation module, depending on the task, the Output module can also be designed to just pass on the received data. ",
465
+ "bbox": [
466
+ 174,
467
+ 401,
468
+ 825,
469
+ 458
470
+ ],
471
+ "page_idx": 4
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "3 EXPERIMENTS ",
476
+ "text_level": 1,
477
+ "bbox": [
478
+ 176,
479
+ 472,
480
+ 326,
481
+ 487
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "We investigate the learning of symbolic planning tasks, where task complexity is measured as the number of computational steps required to solve a task, i.e., the size of the corresponding search tree (see Figure 2). Learning is done in the Sokoban domain, whereas the generalization and abstraction requirements $\\mathbf { R } 1 - \\mathbf { R } 3$ are shown by transferring to (1) longer planning tasks, (2) bigger Sokoban worlds, (3) a different data representation, and (4) two different task domains – sliding block puzzle and robotic manipulation. ",
488
+ "bbox": [
489
+ 174,
490
+ 496,
491
+ 825,
492
+ 580
493
+ ],
494
+ "page_idx": 4
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "In Sokoban, an agent interacts in a grid world with four actions – moving up, right, down or left. Therefore, the ALU can perform four operations and additionally a nop operation that leaves the given configuration unchanged. The world contains empty spaces that can be entered, walls that block movement and boxes that can be pushed onto empty space. A task is given by a start configuration of the world and the desired goal configuration. For learning, we use a world of size $6 \\times 6$ that is enclosed by walls. A world is represented with binary vectors and four-dimensional one-hot encodings for each position, resulting in 144-dimensional data words. The configuration of each world – inner walls, boxes and agent position – is sampled randomly. Each world is generated by sampling uniformly the number of additional inner walls from [0, 2] and boxes from [1, 5]. The positions of these walls, boxes and the position of the agent are sampled uniformly from the empty spaces. An example task and the learned solution is shown in the Appendix in Figure 5 – the penguin is the agent, icebergs are boxes, iceblocks are walls and water is empty space. ",
499
+ "bbox": [
500
+ 174,
501
+ 588,
502
+ 825,
503
+ 753
504
+ ],
505
+ "page_idx": 4
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "3.1 ALGORITHMIC MODULES ",
510
+ "text_level": 1,
511
+ "bbox": [
512
+ 174,
513
+ 765,
514
+ 393,
515
+ 779
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "In the experiments we use a feedforward neural network as Controller with a layer size of 16 neurons and tanh activation. The TransformC is a linear layer projecting its 27-dimensional input onto the 5 operations of the ALU using leaky-ReLU activation and one-hot encoding. The computational memory has a word size of 8 bit, the Input module generates 3 control signals (2 for Learning to Search), and the ALU and Output module control signal feedback is not used here. Thus, the input to the Controller consists of 16 control signals and in total there are about 1600 parameters. ",
522
+ "bbox": [
523
+ 174,
524
+ 785,
525
+ 825,
526
+ 868
527
+ ],
528
+ "page_idx": 4
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "3.1.1 LEARNING OF THE DATA-DEPENDENT MODULES ",
533
+ "text_level": 1,
534
+ "bbox": [
535
+ 173,
536
+ 877,
537
+ 566,
538
+ 891
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "All data-dependent modules are trained in a supervised setting and consist of feedforward networks. They optimize a cross entropy loss using Adam (Kingma & Ba, 2015) on a mini-batch size of ",
545
+ "bbox": [
546
+ 174,
547
+ 895,
548
+ 825,
549
+ 924
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "20. To improve their generalization and robustness, the bad memories mechanism described in Section 2.1.1 is used with a buffer size of 200 and $5 0 \\%$ of the samples within a mini-batch are sampled from that. The following task-dependent instantiations of the data-dependent modules are examples used for the Sokoban domain. ",
556
+ "bbox": [
557
+ 174,
558
+ 103,
559
+ 823,
560
+ 159
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "The Input module learns an equality function using differential rectifier units as inductive bias (Weyde & Kopparti, 2018) and consists of a feedforward network with 10 hidden units and leaky-ReLU activation. Using the learned binary equality signal $I _ { e , t }$ at step $t$ , it produces three binary control signals according to $c _ { i , t } ^ { [ 1 ] } = ( 1 - I _ { e , t } ) - c _ { i , t - 1 } ^ { [ 2 ] }$ , $c _ { i , t } ^ { [ 2 ] } = I _ { e , t } + c _ { i , t - 1 } ^ { [ 2 ] }$ , and $c _ { i , t } ^ { [ 3 ] } = I _ { e , t } c _ { i , t - 1 } ^ { [ 2 ] }$ indicating the different phases of the algorithm. For the Learning to Search experiment only the first two signals are used. ",
567
+ "bbox": [
568
+ 173,
569
+ 166,
570
+ 825,
571
+ 253
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "The TransformD module extracts a different view on the data, if required by the ALU, as described in Section 2.2. Here, it consists of a feedforward network with 500 hidden neurons and uses leaky-ReLU activation. For the Sokoban domain, the actions that the agent can take – and therefore the operation the ALU can apply – only change the world locally. Thus, the TransformD module extracts a local observation of the world $d _ { f }$ , i.e., the agent and the two adjacent locations in all four directions, as these are the only locations where an action can produce a change. ",
578
+ "bbox": [
579
+ 174,
580
+ 261,
581
+ 825,
582
+ 344
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "The ALU module receives the data view extracted by TransformD and the control signal from TransformC, that encodes the operation to apply. It learns to apply the operations, i.e., it learns an action model by learning preconditions and effects, and outputs the (potential) local change together with a control signal indicating if the action changed the world or not. The local change is encoded as the direction of the change and the three according spaces. The module consists of two feedforward networks, one for the control signal $c _ { a }$ and one for applying the actions producing the manipulated data $d _ { a }$ . The learned $c _ { a }$ is used to gate the output between the output of the action network and the data input without change. The control network has two hidden layers with sizes [64, 64], the action network has hidden layers with [128, 64] neurons and both use leaky-ReLU activations. ",
589
+ "bbox": [
590
+ 174,
591
+ 352,
592
+ 825,
593
+ 477
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "The Output module inserts the (locally) changed data from the ALU into the data stream. It receives the data from the memory $d _ { m }$ , the data $d _ { a }$ and control stream $c _ { a }$ from the ALU. It consists of two feedforward networks for learning the data $d _ { o }$ and the control signal $c _ { o }$ stream. The control network has two hidden layers with sizes [500, 250], the data network has hidden layers with [500, 500] neurons and both use leaky-ReLU activations. The control signal $c _ { o }$ is used for gating between the data with the inserted change and the original data $d _ { m }$ . To ensure that the Output module uses the manipulated data of the ALU and is not learning to manipulate the data itself, it is constrained to learn a binary mask that indicates where the change needs to be inserted. This binary map indicates for each position in $d _ { a }$ where to insert it in $d _ { m }$ and can be seen as a structured prediction problem. Note, the training data only consists of data and control signals, the true binary mask is not known. ",
600
+ "bbox": [
601
+ 174,
602
+ 484,
603
+ 825,
604
+ 623
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "3.2 LEARNING ALGORITHMIC SOLUTIONS ",
611
+ "text_level": 1,
612
+ "bbox": [
613
+ 176,
614
+ 633,
615
+ 482,
616
+ 647
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "We investigate the learning of two algorithms, (1) a search algorithm and (2) a search-based planning algorithm. The data-dependent modules do not need to be retrained for the different algorithms. For evaluating that the learned strategy is an abstract algorithmic solution, we show that it fulfills the three requirements R1 – R3 discussed in Section 1.1. ",
623
+ "bbox": [
624
+ 174,
625
+ 654,
626
+ 825,
627
+ 708
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "3.2.1 LEARNING TO SEARCH ",
634
+ "text_level": 1,
635
+ "bbox": [
636
+ 174,
637
+ 718,
638
+ 390,
639
+ 732
640
+ ],
641
+ "page_idx": 5
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "In the first task, the model has to learn breadth-first-search to find the desired goal configuration. For that purpose, the initial input to the model is the start and goal configuration and subsequent inputs are the goal configuration and the output of the model from the previous computation step. To solve the task, the model has to learn to produce the correct search tree and recognizing that the goal configuration is reached by choosing the nop operation for the correct computation step. ",
646
+ "bbox": [
647
+ 174,
648
+ 736,
649
+ 823,
650
+ 805
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "For the curriculum learning the levels are defined as the number of nodes from the search tree that have to be fully explored, e.g., for Level 1, up to five correct computation steps have to be performed on the initial configuration; for Level 3 the initial configuration as well as the two subsequently found configurations need to be fully explored (see Figure 2(a)). This requires up to 13 correct computational steps. Curriculum levels are specified up to Level 21 that involves up to 85 correct computation steps to be solved. An additional Level 22 is activated afterwards that consists of new samples from all 21 levels for evaluation. To prevent unlearning of previous levels, $2 0 \\%$ of the samples in the mini-batch are sampled uniformly from previous levels. As in (Wierstra et al., 2014) ",
657
+ "bbox": [
658
+ 174,
659
+ 811,
660
+ 823,
661
+ 924
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "we use restarting, but here the run automatically restarts if the maximum fitness of a level is not reached within 2500 iterations. All experiments have a total budget of 10.000 iterations. ",
668
+ "bbox": [
669
+ 171,
670
+ 103,
671
+ 823,
672
+ 132
673
+ ],
674
+ "page_idx": 6
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "The fitness function $f$ uses step-wise binary losses computed as comparison to the correct solution over mini-batches of $N$ samples and is defined as ",
679
+ "bbox": [
680
+ 173,
681
+ 138,
682
+ 825,
683
+ 167
684
+ ],
685
+ "page_idx": 6
686
+ },
687
+ {
688
+ "type": "equation",
689
+ "img_path": "images/f126fd13f4d21dfc29cdf3355863cdbd1ea6b20730cc2f57d768977540616948.jpg",
690
+ "text": "$$\nf = \\left\\{ \\begin{array} { l l } { \\frac { 1 } { N } \\sum _ { n } ^ { N } f _ { e } ^ { [ n ] } } & { \\mathrm { ~ i f ~ } \\frac { 1 } { N } \\sum _ { n } ^ { N } f _ { e } ^ { [ n ] } < 1 0 0 } \\\\ { \\frac { 1 } { N } \\sum _ { n } ^ { N } f _ { e } ^ { [ n ] } + f _ { b } ^ { [ n ] } } & { \\mathrm { ~ o t h e r w i s e } } \\end{array} \\right. \\quad , \\mathrm { ~ w i t h ~ }\n$$",
691
+ "text_format": "latex",
692
+ "bbox": [
693
+ 333,
694
+ 174,
695
+ 727,
696
+ 217
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "equation",
702
+ "img_path": "images/e193b260422d1e4fbe1770458e486a6a205c915e020da381d6a28508e6a8fc47.jpg",
703
+ "text": "$$\nf _ { \\epsilon } ^ { [ n ] } = \\frac { 1 0 0 } { 3 T _ { \\epsilon } ^ { [ n ] } } \\sum _ { t = 1 } ^ { T _ { \\epsilon } ^ { [ n ] } } I ( c _ { f , t } ^ { [ n ] } = \\tilde { c } _ { f , t } ^ { [ n ] } ) + 2 I ( d _ { m , t } ^ { [ n ] } = \\tilde { d } _ { m , t } ^ { [ n ] } ) \\quad \\mathrm { a n d } \\quad f _ { b } ^ { [ n ] } = 2 0 I ( c _ { f , T _ { \\epsilon } ^ { [ n ] } + 1 } ^ { [ n ] } = \\mathrm { n o p } ) \\ .\n$$",
704
+ "text_format": "latex",
705
+ "bbox": [
706
+ 186,
707
+ 231,
708
+ 807,
709
+ 270
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "where $T _ { e }$ is the number of steps required for constructing the search tree or when the first mistake occurs, $c _ { f , t }$ is the operation chosen to be applied by the ALU from TransformC at step $t$ , $d _ { m , t }$ is the data word read from the memory, and $\\tilde { c } _ { f , t }$ and $\\tilde { d } _ { m , t }$ are the correct choices respectively. The exploration fitness $f _ { e } ^ { [ n ] }$ captures the fraction of correct computation steps until the goal configuration is found, scaled to $0 . 1 0 0 \\%$ . Note that, NES therefore only uses a single scalar value that summarizes the performance of the parameters over $N$ samples and all computational steps. The learning rate $\\alpha$ is to 0.01, the $\\sigma$ of the search distribution to 0.1, weight decay is applied with 0.9995, mini-batch size is $N = 2 0$ and the population size is $P = 2 0$ . ",
716
+ "bbox": [
717
+ 173,
718
+ 273,
719
+ 825,
720
+ 393
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "We use a gini coefficient based ranking that gives more importance to samples with higher fitness (Schaul et al., 2010). The maximum fitness is 120 for all levels and a level is solved when 250 subsequent iterations have the maximum fitness, i.e., 5000 samples are solved correctly. The bad memories consist of 200 samples and $2 5 \\%$ of the samples within a mini-batch are sampled uniformly from those. Whenever 10 subsequent iterations achieve the maximum fitness, the buffer is cleared and no learning is performed. ",
727
+ "bbox": [
728
+ 173,
729
+ 400,
730
+ 825,
731
+ 484
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "3.2.2 LEARNING TO PLAN (SEARCH $^ +$ BACKTRACK) ",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 173,
741
+ 493,
742
+ 552,
743
+ 508
744
+ ],
745
+ "page_idx": 6
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "In the second task, the model has to learn, in addition to the breadth-first-algorithm that computes a search tree to the goal configuration, to also extract the path from the search tree that encodes the solution to the given planning problem (see Figure 2 and Figure 5 in the Appendix). Therefore, the model has to not only learn to encode and perform two different algorithms, but also to switch between them at the correct computation step. ",
750
+ "bbox": [
751
+ 173,
752
+ 512,
753
+ 825,
754
+ 582
755
+ ],
756
+ "page_idx": 6
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "The initial input to the model is the start and goal configuration and subsequent inputs are the goal configuration and the output of the model from the previous computation step, as before. When the goal configuration is found by the model, the input is the start configuration and the previous output. To solve the task, the model has to learn to produce the search tree and recognizing that the goal configuration is reached as before. In addition, after recognizing the goal configuration, the model needs to switch behavior and output the path of the search tree encoding the planning solution. This solution consists of the states from the initial to the goal configuration and nop operations in reverse order. Therefore, the number of maximum computation steps increases up to 89 in Level 21. The fitness function is defined as in Equation equation 1 but with ",
761
+ "bbox": [
762
+ 173,
763
+ 588,
764
+ 825,
765
+ 714
766
+ ],
767
+ "page_idx": 6
768
+ },
769
+ {
770
+ "type": "equation",
771
+ "img_path": "images/686ec54b737e7903b8ca0436716be7a727782278ded4e829c6549e8b0a2a6cb6.jpg",
772
+ "text": "$$\nf _ { b } ^ { [ n ] } = \\frac { 5 0 } { 3 T _ { b } ^ { [ n ] } } \\sum _ { t = T _ { e } ^ { [ n ] } + 1 } ^ { T _ { e } ^ { [ n ] } + T _ { b } ^ { [ n ] } } I ( c _ { f , t } ^ { [ n ] } = \\mathrm { n o p } ) + 2 I ( d _ { m , t } ^ { [ n ] } = \\tilde { d } _ { m , t } ^ { [ n ] } ) ,\n$$",
773
+ "text_format": "latex",
774
+ "bbox": [
775
+ 292,
776
+ 720,
777
+ 704,
778
+ 760
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "where $T _ { b }$ is the number of steps required for backtracking the solution or when the first mistakes occurs. The maximum fitness is 150 and all other settings remain as before. ",
785
+ "bbox": [
786
+ 171,
787
+ 766,
788
+ 825,
789
+ 795
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "3.3 R1 – GENERALIZATION TO UNSEEN TASK CONFIGURATIONS AND COMPLEXITIES ",
796
+ "text_level": 1,
797
+ "bbox": [
798
+ 173,
799
+ 805,
800
+ 782,
801
+ 820
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "A main goal in all learning tasks, is to achieve generalization – to not only learn to solve seen situations, but to learn a solution that generalizes to unseen situations. One evaluation of this generalization ability is built into our learning process itself. A curriculum level is solved after 250 subsequent iterations (5000 samples) with maximum fitness and iterations with maximum fitness do not trigger learning. Thus, if presenting a new level that involves more complex tasks, the fitness stays at maximum and no learning is triggered, the previously learned solution generalizes to the new setting – generalizes to more complex tasks (see Figure 2). ",
808
+ "bbox": [
809
+ 173,
810
+ 825,
811
+ 825,
812
+ 924
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "image",
818
+ "img_path": "images/4c4da13a0512749a6d02ab75b77afa3f2368239b9101bc736d0c9d41cd56eb8a.jpg",
819
+ "image_caption": [
820
+ "Figure 3: (a-c) The gray dashed line marks the maximum fitness and the colored lines show the fitness. The light colors indicate that the maximum fitness is achieved and no learning is triggered. The colored dashed lines indicate when a curriculum level was solved successfully. When no learning is triggered after a new level is unlocked, the model generalized to more complex tasks. The top numbers indicate the number of computational steps the model needs to perform correctly to solve samples of the associated curriculum level. (c) Comparison with the original DNC and a stack-augmented neural network on the Learning to Search task over 10 runs. In contrast to our architecture, both methods are trained in a supervised setup with gradient descent and crossentropy loss, i.e., have a richer and localized training signal. For comparison the mean and standard deviation of the same fitness function that our model uses for training is shown. Both are not able to successfully solve Level 1 within considerably more iterations. (d) 15 runs of the two learning tasks, highlighting that learning happens during the first levels and generalizes to the subsequent levels. Bar plot shows mean and standard deviation of the number of learning iterations, numbers on top of the bars show the number of runs that triggered learning in that level. Lower plot shows the number of runs that solved the according curriculum level, i.e., where they ended after the budget of 10.000 iterations. "
821
+ ],
822
+ "image_footnote": [],
823
+ "bbox": [
824
+ 174,
825
+ 106,
826
+ 821,
827
+ 303
828
+ ],
829
+ "page_idx": 7
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "This generalization is shown in Figure 3. For example, in the Learning to Plan setup (Figure 3(b)), after 3 levels the algorithmic solution is found and no learning is triggered anymore during the run. Moreover, the last triggered learning was for curriculum Level 3 – meaning a complexity of 15 computational steps – and the found solution generalizes up to the highest specified curriculum Level 21 with 89 computational steps. Learning the algorithmic solution is done within 3 levels and 2563 iterations. Figure 3(d) shows the evaluation of learning to solve the two tasks over 15 runs each. In contrast, the original DNC (Graves et al., 2016) model and a stack-augmented recurrent neural network for algorithmic patterns (Joulin & Mikolov, 2015) are not able to solve Level 1 when trained in a supervised setup with gradient descent and considerably more training iterations, see Figure 3(c) and the Appendix B for implementation details. ",
834
+ "bbox": [
835
+ 174,
836
+ 507,
837
+ 825,
838
+ 646
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "Task complexity. Additionally, we evaluated the learned algorithmic solution with task complexities far beyond the specified curriculum learning levels, i.e., complexities experienced during training. Therefore, we used the run shown in Figure 3(b) and solved tasks requiring 330.631 computational steps (corresponds to level 82.656), having been trained only up to 15 steps (see Figure 2 for the complexities) and having been tested during training only up to 89 steps. Remember the models recurrent output-input structure, given the initial task input, the model performs 330.631 computational steps, i.e., learns to build a search tree with over 330.600 nodes, autonomously correct to compute and output the solution. Moreover, the solution learned in $6 \\times 6$ environments, successfully solved all tasks within $8 \\times 8$ environments. Thus, the learned strategy represents an abstract algorithmic solution that generalizes and scales to arbitrary task configurations and complexities, fulfilling R1. The learned algorithmic solution is explained with an example in the Appendix A. ",
845
+ "bbox": [
846
+ 174,
847
+ 654,
848
+ 825,
849
+ 806
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "3.4 R2 – INDEPENDENCE OF THE DATA REPRESENTATION ",
856
+ "text_level": 1,
857
+ "bbox": [
858
+ 174,
859
+ 820,
860
+ 589,
861
+ 834
862
+ ],
863
+ "page_idx": 7
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "Algorithmic solutions are independent of the data representation, meaning the abstract strategy is still working if the encoding is changed, as long as the data-dependent operations are adjusted. Consider again a sorting algorithm. Its algorithmic behavior stays the same independent of if it has to sort a list of numbers encoded binary or hexadecimally, as long as the compare operators are defined. To show that our learned algorithmic solutions have this feature and fulfill R2, we change the representation of the data, but reuse the learned algorithmic modules and the model can still solve all tasks without retraining. The data-dependent modules are adapted and relearned. The changed representation, e.g., the penguin represents a wall instead of the agent, and results over 10.000 iterations (200.000 samples) over all curriculum levels are shown in Figure 4 (left). The fitness is at maximum from the start, showing that all samples in all levels are successfully solved without triggering learning while operating on the new data representation and hence, R2 is fulfilled. ",
868
+ "bbox": [
869
+ 174,
870
+ 840,
871
+ 825,
872
+ 922
873
+ ],
874
+ "page_idx": 7
875
+ },
876
+ {
877
+ "type": "image",
878
+ "img_path": "images/a7f481f576b36e0d41ec5345892b53cef890e2270495f2f58e467c99eaadf639.jpg",
879
+ "image_caption": [
880
+ "Figure 4: Transferring the learned algorithmic solution (left) to a new data representation (R2) and (middle & right) to two new task domains (R3). In all setups, all 200.000 samples over all curriculum levels are solved correctly without triggering learning, indicated by the constant maximum fitness, showing the straightforward transfer of the learned solution – the abstract features R2 and R3 of the learned solution. "
881
+ ],
882
+ "image_footnote": [],
883
+ "bbox": [
884
+ 176,
885
+ 98,
886
+ 818,
887
+ 196
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "",
894
+ "bbox": [
895
+ 174,
896
+ 260,
897
+ 825,
898
+ 329
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "3.5 R3 – INDEPENDENCE OF THE TASK DOMAIN ",
905
+ "text_level": 1,
906
+ "bbox": [
907
+ 174,
908
+ 335,
909
+ 526,
910
+ 351
911
+ ],
912
+ "page_idx": 8
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "Requirement R3 states that an algorithmic solution is independent of the task domain. Consider again the sorting algorithm example: as long as the compare operators are defined, it is able sort arbitrary objects. Therefore, the data-dependent modules are adapted and relearned but we reuse the learned algorithmic solution on two new task domains. ",
917
+ "bbox": [
918
+ 174,
919
+ 354,
920
+ 825,
921
+ 410
922
+ ],
923
+ "page_idx": 8
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "As new domains, $3 \\times 3$ sliding block puzzles and a robotic manipulation task are used (Figure 4). Configurations are represented with binary vectors as described for Sokoban in Section 3. For the puzzle domain, actions are sliding adjacent tiles onto the free (white) space from four directions. A task configuration is given as a start and goal board configuration. In the robotic manipulation domain, a task is given as start and goal configuration of the objects. The available actions are the four locations on which objects can be stacked, e.g., the action pos1 encodes to move the gripper to the position and place the grasped object on top, or to pick up the top object if no object is grasped. The maximum stacking height is 3 boxes, resulting in a discrete representation of the object configuration with a $3 \\times 4$ grid. As with the new data representation, the learned algorithmic solution is able to solve all 200.000 presented samples from all curriculum levels in the new domains without triggering learning (Figure 4), showing the independence of the task domain, fulfilling R3. ",
928
+ "bbox": [
929
+ 174,
930
+ 417,
931
+ 825,
932
+ 571
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "4 CONCLUSION ",
939
+ "text_level": 1,
940
+ "bbox": [
941
+ 176,
942
+ 582,
943
+ 318,
944
+ 597
945
+ ],
946
+ "page_idx": 8
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "We present a novel architecture for learning algorithmic solutions and showed how it can learn abstract strategies that generalize and scale to arbitrary task configurations and complexities (R1) (Section 3.3), and are independent to both, the data representation (R2) (Section 3.4) and the task domain (R3) (Section 3.5). Such algorithmic solutions represent abstract strategies that can be transferred directly to novel problem instantiations, a crucial ability for intelligent behavior. ",
951
+ "bbox": [
952
+ 174,
953
+ 603,
954
+ 823,
955
+ 674
956
+ ],
957
+ "page_idx": 8
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "To show that our architecture is capable of learning strategies fulfilling the algorithm requirements R1 – R3 in symbolic planning tasks, we performed experiments with complexities orders of magnitude higher than seen during training (15 vs. 330.631 steps, and Figure 2 & 3), and transferred the learned solution to bigger state spaces, a new data representation and two new task domains (Figure 4) – showing, to the best of our knowledge, for the first time how such abstract strategies can be represented and learned with memory-augmented networks. The learned algorithmic solution can be applied to any problem that can be framed as such a symbolic search or planning problem. ",
962
+ "bbox": [
963
+ 173,
964
+ 680,
965
+ 825,
966
+ 777
967
+ ],
968
+ "page_idx": 8
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "The modular structure and the information flow of the architecture enable the learning of algorithmic solutions, the transfer of those, and the incorporation of prior knowledge. Using Natural Evolution Strategies for learning removes constraints on the individual modules, allowing for arbitrary module instantiations and combinations, and the beneficial use of a non-differentiable memory module (Greve et al., 2016). As the complexity and structure of the algorithmic modules need to be specified, it is an interesting road for future work to learn these in addition, building on the ideas from Greve et al. (2016); Merrild et al. (2018). Showing how algorithmic solutions characterized by R1 – R3 can be represented and learned with memory-augmented networks sets the foundation for future work, extending beyond symbolic planning and incorporating intrinsic motivation (Oudeyer & Kaplan, 2009; Baldassarre & Mirolli, 2013) to discover new and unexpected strategies. ",
973
+ "bbox": [
974
+ 174,
975
+ 785,
976
+ 825,
977
+ 924
978
+ ],
979
+ "page_idx": 8
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "REFERENCES ",
984
+ "text_level": 1,
985
+ "bbox": [
986
+ 176,
987
+ 102,
988
+ 285,
989
+ 117
990
+ ],
991
+ "page_idx": 9
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "Gianluca Baldassarre and Marco Mirolli. Intrinsically motivated learning systems: an overview. In Intrinsically motivated learning in natural and artificial systems, pp. 1–14. Springer, 2013. ",
996
+ "bbox": [
997
+ 174,
998
+ 126,
999
+ 823,
1000
+ 155
1001
+ ],
1002
+ "page_idx": 9
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ International Conference on Machine Learning, pp. 41–48. ACM, 2009. ",
1007
+ "bbox": [
1008
+ 174,
1009
+ 161,
1010
+ 823,
1011
+ 191
1012
+ ],
1013
+ "page_idx": 9
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "Edoardo Conti, Vashisht Madhavan, Felipe Petroski Such, Joel Lehman, Kenneth Stanley, and Jeff Clune. Improving exploration in evolution strategies for deep reinforcement learning via a population of novelty-seeking agents. In Advances in Neural Information Processing Systems, pp. 5027–5038, 2018. ",
1018
+ "bbox": [
1019
+ 173,
1020
+ 199,
1021
+ 825,
1022
+ 256
1023
+ ],
1024
+ "page_idx": 9
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "Sreerupa Das, C Lee Giles, and Guo-Zheng Sun. Learning context-free grammars: Capabilities and limitations of a recurrent neural network with an external stack memory. In Conference of Cognitive Science Societyy, pp. 14, 1992. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 265,
1032
+ 823,
1033
+ 308
1034
+ ],
1035
+ "page_idx": 9
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "Yoav Freund and Robert E Schapire. A decision-theoretic generalization of online learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997. ",
1040
+ "bbox": [
1041
+ 171,
1042
+ 315,
1043
+ 823,
1044
+ 344
1045
+ ],
1046
+ "page_idx": 9
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv:1410.5401, 2014. ",
1051
+ "bbox": [
1052
+ 173,
1053
+ 352,
1054
+ 803,
1055
+ 368
1056
+ ],
1057
+ "page_idx": 9
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471, 2016. ",
1062
+ "bbox": [
1063
+ 173,
1064
+ 376,
1065
+ 825,
1066
+ 433
1067
+ ],
1068
+ "page_idx": 9
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "Rasmus Boll Greve, Emil Juul Jacobsen, and Sebastian Risi. Evolving neural turing machines for reward-based learning. In Proceedings of the Genetic and Evolutionary Computation Conference 2016, pp. 117–124. ACM, 2016. ",
1073
+ "bbox": [
1074
+ 174,
1075
+ 440,
1076
+ 823,
1077
+ 483
1078
+ ],
1079
+ "page_idx": 9
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems, pp. 190–198, 2015. ",
1084
+ "bbox": [
1085
+ 169,
1086
+ 491,
1087
+ 823,
1088
+ 521
1089
+ ],
1090
+ "page_idx": 9
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "Łukasz Kaiser and Samy Bengio. Can active memory replace attention? In Advances in Neural Information Processing Systems, pp. 3781–3789, 2016. ",
1095
+ "bbox": [
1096
+ 171,
1097
+ 529,
1098
+ 823,
1099
+ 558
1100
+ ],
1101
+ "page_idx": 9
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Łukasz Kaiser and Ilya Sutskever. Neural GPUs learn algorithms. International Conference on Learning Representations, 2016. ",
1106
+ "bbox": [
1107
+ 171,
1108
+ 565,
1109
+ 823,
1110
+ 594
1111
+ ],
1112
+ "page_idx": 9
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015. ",
1117
+ "bbox": [
1118
+ 171,
1119
+ 603,
1120
+ 823,
1121
+ 632
1122
+ ],
1123
+ "page_idx": 9
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in Neural Information Processing Systems, pp. 950–957, 1992. ",
1128
+ "bbox": [
1129
+ 171,
1130
+ 640,
1131
+ 823,
1132
+ 670
1133
+ ],
1134
+ "page_idx": 9
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In International Conference on Machine Learning, pp. 1378–1387, 2016. ",
1139
+ "bbox": [
1140
+ 174,
1141
+ 676,
1142
+ 825,
1143
+ 733
1144
+ ],
1145
+ "page_idx": 9
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "Long-Ji Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine Learning, 8(3-4):293–321, 1992. ",
1150
+ "bbox": [
1151
+ 171,
1152
+ 742,
1153
+ 823,
1154
+ 771
1155
+ ],
1156
+ "page_idx": 9
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "Horia Mania, Aurelia Guy, and Benjamin Recht. Simple random search of static linear policies is competitive for reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1803–1812. 2018. ",
1161
+ "bbox": [
1162
+ 171,
1163
+ 779,
1164
+ 823,
1165
+ 821
1166
+ ],
1167
+ "page_idx": 9
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "Jakob Merrild, Mikkel Angaju Rasmussen, and Sebastian Risi. HyperNTM: evolving scalable neural turing machines through HyperNEAT. In International Conference on the Applications of Evolutionary Computation, pp. 750–766. Springer, 2018. ",
1172
+ "bbox": [
1173
+ 173,
1174
+ 829,
1175
+ 825,
1176
+ 873
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015. ",
1183
+ "bbox": [
1184
+ 176,
1185
+ 881,
1186
+ 825,
1187
+ 924
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Michael C Mozer and Sreerupa Das. A connectionist symbol manipulator that discovers the structure of context-free languages. In Advances in Neural Information Processing Systems, pp. 863–870, 1993. ",
1194
+ "bbox": [
1195
+ 174,
1196
+ 103,
1197
+ 823,
1198
+ 146
1199
+ ],
1200
+ "page_idx": 10
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. International Conference on Learning Representations, 2016. ",
1205
+ "bbox": [
1206
+ 173,
1207
+ 155,
1208
+ 823,
1209
+ 184
1210
+ ],
1211
+ "page_idx": 10
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Pierre-Yves Oudeyer and Frederic Kaplan. What is intrinsic motivation? a typology of computational approaches. Frontiers in neurorobotics, 1:6, 2009. ",
1216
+ "bbox": [
1217
+ 173,
1218
+ 193,
1219
+ 823,
1220
+ 222
1221
+ ],
1222
+ "page_idx": 10
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Tim Salimans, Jonathan Ho, Xi Chen, Szymon Sidor, and Ilya Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv:1703.03864, 2017. ",
1227
+ "bbox": [
1228
+ 173,
1229
+ 229,
1230
+ 823,
1231
+ 260
1232
+ ],
1233
+ "page_idx": 10
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "Tom Schaul, Justin Bayer, Daan Wierstra, Yi Sun, Martin Felder, Frank Sehnke, Thomas Ruckstieß,¨ and Jurgen Schmidhuber. Pybrain. ¨ Journal of Machine Learning Research, 11(Feb):743–746, 2010. ",
1238
+ "bbox": [
1239
+ 176,
1240
+ 267,
1241
+ 825,
1242
+ 310
1243
+ ],
1244
+ "page_idx": 10
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Daniel L Silver, Qiang Yang, and Lianghao Li. Lifelong machine learning systems: Beyond learning algorithms. In AAAI Spring Symposium: Lifelong Machine Learning, volume 13, pp. 05, 2013. ",
1249
+ "bbox": [
1250
+ 173,
1251
+ 319,
1252
+ 823,
1253
+ 349
1254
+ ],
1255
+ "page_idx": 10
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002. ",
1260
+ "bbox": [
1261
+ 173,
1262
+ 357,
1263
+ 820,
1264
+ 387
1265
+ ],
1266
+ "page_idx": 10
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in Neural Information Processing Systems, pp. 2440–2448, 2015. ",
1271
+ "bbox": [
1272
+ 174,
1273
+ 395,
1274
+ 821,
1275
+ 425
1276
+ ],
1277
+ "page_idx": 10
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009. ",
1282
+ "bbox": [
1283
+ 173,
1284
+ 433,
1285
+ 821,
1286
+ 462
1287
+ ],
1288
+ "page_idx": 10
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "Joshua B Tenenbaum, Charles Kemp, Thomas L Griffiths, and Noah D Goodman. How to grow a mind: Statistics, structure, and abstraction. Science, 331(6022):1279–1285, 2011. ",
1293
+ "bbox": [
1294
+ 173,
1295
+ 469,
1296
+ 821,
1297
+ 500
1298
+ ],
1299
+ "page_idx": 10
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Greg Wayne, Chia-Chun Hung, David Amos, Mehdi Mirza, Arun Ahuja, Agnieszka GrabskaBarwinska, Jack Rae, Piotr Mirowski, Joel Z Leibo, Adam Santoro, et al. Unsupervised predictive memory in a goal-directed agent. arXiv:1803.10760, 2018. ",
1304
+ "bbox": [
1305
+ 174,
1306
+ 507,
1307
+ 823,
1308
+ 551
1309
+ ],
1310
+ "page_idx": 10
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In International Conference on Learning Representations, 2015. ",
1315
+ "bbox": [
1316
+ 173,
1317
+ 560,
1318
+ 823,
1319
+ 589
1320
+ ],
1321
+ "page_idx": 10
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Tillman Weyde and Radha Manisha Kopparti. Feed-forward neural networks need inductive bias to learn equality relations. arXiv:1812.01662, 2018. ",
1326
+ "bbox": [
1327
+ 173,
1328
+ 598,
1329
+ 823,
1330
+ 627
1331
+ ],
1332
+ "page_idx": 10
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jurgen Schmidhuber. ¨ Natural evolution strategies. Journal of Machine Learning Research, 15(1):949–980, 2014. ",
1337
+ "bbox": [
1338
+ 173,
1339
+ 635,
1340
+ 823,
1341
+ 665
1342
+ ],
1343
+ "page_idx": 10
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "Wojciech Zaremba and Ilya Sutskever. Learning to execute. arXiv:1410.4615, 2014. ",
1348
+ "bbox": [
1349
+ 176,
1350
+ 672,
1351
+ 730,
1352
+ 689
1353
+ ],
1354
+ "page_idx": 10
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. In International Conference on Machine Learning, pp. 421–429, 2016. ",
1359
+ "bbox": [
1360
+ 174,
1361
+ 696,
1362
+ 825,
1363
+ 727
1364
+ ],
1365
+ "page_idx": 10
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "Zheng Zeng, Rodney M Goodman, and Padhraic Smyth. Discrete recurrent neural networks for grammatical inference. IEEE Transactions on Neural Networks, 5(2):320–330, 1994. ",
1370
+ "bbox": [
1371
+ 174,
1372
+ 734,
1373
+ 825,
1374
+ 765
1375
+ ],
1376
+ "page_idx": 10
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "Figure 5 highlights the learned algorithmic behavior – one memory location is read with content lookup attention repeatedly until all operations have been applied, the node is fully explored. Then attention shifts towards temporal linkage to read the next data to be explored. This pattern continuous until the goal configuration is found in step 11. After that, behavior changes to output the backtracking solution by switching to usage linkage attention and nop operations until reaching the initial configuration. ",
1381
+ "bbox": [
1382
+ 173,
1383
+ 133,
1384
+ 825,
1385
+ 217
1386
+ ],
1387
+ "page_idx": 11
1388
+ },
1389
+ {
1390
+ "type": "image",
1391
+ "img_path": "images/ad6a35ac08285aacc2d93c3148de10352f548ea59292f9c11725e38638ed462a.jpg",
1392
+ "image_caption": [
1393
+ "Figure 5: The behavior of the learned model on a task from Level 3 (see Sec. 3.2 for details) and the corresponding search tree that is constructing implicitly. In the search phase, the model fully explores one node by successively applying all operations, before reading the next node, until the goal is found. Then behavior changes in the backtrack phase, where the solution of the planning task is emitted as the states from start to goal in reverse order along with nop operations. The algorithmic behavior can also be seen in the repetitive patterns of the attention vector, showing the five attention mechanisms for reading (temporal and usage linkage in both directions, and content lookup), that represents how strong each mechanism for reading is used in each computation step. "
1394
+ ],
1395
+ "image_footnote": [],
1396
+ "bbox": [
1397
+ 173,
1398
+ 229,
1399
+ 820,
1400
+ 387
1401
+ ],
1402
+ "page_idx": 11
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "B DETAILS ON THE IMPLEMENTATIONS OF THE COMPARISON METHODS ",
1407
+ "text_level": 1,
1408
+ "bbox": [
1409
+ 174,
1410
+ 508,
1411
+ 782,
1412
+ 523
1413
+ ],
1414
+ "page_idx": 11
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "text": "Both models, the orignal Differential Neural Computer (DNC) (Graves et al., 2016) and the stackaugmented recurrent network (Joulin & Mikolov, 2015) are trained in a supervised setting with cross-entropy losses for 500.000 iterations to compensate the pretraining of the data modules. They use the same output-input loop as our architecture, i.e., receiving their own output as input in the next computation step in addition to the goal configuration. The loss is computed based on the correct sequences of configurations and the control signal indicating that the goal has been reached, similar like the fitness function from our architecture in equation 1. Both use a LSTM network with 256 hidden units as controller and the memory word size is set to 152, equal to our model. Like our architecture, the DNC has one read and two write heads. The stack-augmented model uses four stacks with the three actions PUSH, POP, and NO OP. ",
1419
+ "bbox": [
1420
+ 173,
1421
+ 539,
1422
+ 825,
1423
+ 678
1424
+ ],
1425
+ "page_idx": 11
1426
+ },
1427
+ {
1428
+ "type": "image",
1429
+ "img_path": "images/1604945984e519e93941e57fec5e3e7bbd547abb33df12bbc0d063a1a4a75ceb.jpg",
1430
+ "image_caption": [],
1431
+ "image_footnote": [],
1432
+ "bbox": [
1433
+ 214,
1434
+ 693,
1435
+ 781,
1436
+ 844
1437
+ ],
1438
+ "page_idx": 11
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "(a) Differential Neural Computer, reprinted with permission from (Graves et al., 2016). ",
1443
+ "bbox": [
1444
+ 209,
1445
+ 849,
1446
+ 566,
1447
+ 876
1448
+ ],
1449
+ "page_idx": 11
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "(b) Stack-augmented recurrent network, reprinted with permission from (Joulin & Mikolov, 2015) . ",
1454
+ "bbox": [
1455
+ 573,
1456
+ 849,
1457
+ 784,
1458
+ 888
1459
+ ],
1460
+ "page_idx": 11
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "C EVALUATION OF THE LEARNING PROCESS AND MODEL COMPONENTS ",
1465
+ "text_level": 1,
1466
+ "bbox": [
1467
+ 171,
1468
+ 103,
1469
+ 782,
1470
+ 117
1471
+ ],
1472
+ "page_idx": 12
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "For evaluation the effect of the individual modifications and extensions we compared our architecture with and without them on the Learning to Search task. In all setups all runs had a budget of 10.000 iterations. The bar plots show mean and standard deviation of the number of learning iterations, numbers on top of the bars show the number of runs that triggered learning in that level. Plots below the bar plot show the number of runs that successfully solved the according curriculum level, i.e., where they ended after the budget of 10.000 iterations. All comparisons are done without the restarting mechanisms, except in the evaluation for that mechanism. ",
1477
+ "bbox": [
1478
+ 173,
1479
+ 133,
1480
+ 825,
1481
+ 231
1482
+ ],
1483
+ "page_idx": 12
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "NOVELTY AND RESTARTS ",
1488
+ "text_level": 1,
1489
+ "bbox": [
1490
+ 176,
1491
+ 250,
1492
+ 351,
1493
+ 262
1494
+ ],
1495
+ "page_idx": 12
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "Here two mechanisms to face the problem of getting stuck in local optima are evaluated, namely the automatic restart as in the original NES (Wierstra et al., 2014) and the use of an additional novelty signal as in NSRA-ES (Conti et al., 2018). For the novelty calculation, we defined the behavior as the sequence of read memory locations and applied ALU operations. The baseline model does not use either of the two mechanisms. While we did not observe an improvement using novelty, the automatic restarts reduced the number of learning iterations, see Figure 7. Note that the baseline and novelty model are also able to learn algorithmic solutions, but they require more iterations and, hence, they die out before the final curriculum level due to reaching the budget of 10.000 iterations. ",
1500
+ "bbox": [
1501
+ 173,
1502
+ 273,
1503
+ 825,
1504
+ 386
1505
+ ],
1506
+ "page_idx": 12
1507
+ },
1508
+ {
1509
+ "type": "image",
1510
+ "img_path": "images/d84676d3a03c774606a7e0cd5fdf73c9ebaf606ff172ae85039d5ff49bfe9995.jpg",
1511
+ "image_caption": [
1512
+ "Figure 7: Evaluation of an additional novelty signal and automatic restarts. "
1513
+ ],
1514
+ "image_footnote": [],
1515
+ "bbox": [
1516
+ 178,
1517
+ 401,
1518
+ 816,
1519
+ 558
1520
+ ],
1521
+ "page_idx": 12
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "CONSTRAINED WRITE HEAD ",
1526
+ "text_level": 1,
1527
+ "bbox": [
1528
+ 174,
1529
+ 590,
1530
+ 372,
1531
+ 604
1532
+ ],
1533
+ "page_idx": 12
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "Here we evaluated the introduced constrained write head, that updates the previously read memory location. We compared against two models without this constrained head, one with one write head and one with two write heads to compensate the missing constrained head. The constrained head was a necessary modification to enable the efficient learning of algorithmic solutions, see Figure 8. ",
1538
+ "bbox": [
1539
+ 173,
1540
+ 616,
1541
+ 825,
1542
+ 671
1543
+ ],
1544
+ "page_idx": 12
1545
+ },
1546
+ {
1547
+ "type": "image",
1548
+ "img_path": "images/e7c12a38032523ea6431ec5610e4cae169961a0a02777fc9533d4b66307bb922.jpg",
1549
+ "image_caption": [
1550
+ "Figure 8: Evaluation of the introduced constrained write head. "
1551
+ ],
1552
+ "image_footnote": [],
1553
+ "bbox": [
1554
+ 178,
1555
+ 688,
1556
+ 816,
1557
+ 844
1558
+ ],
1559
+ "page_idx": 12
1560
+ },
1561
+ {
1562
+ "type": "text",
1563
+ "text": "USAGE-LINKAGE AND HARD ATTENTION VS. SOFT ATTENTION ",
1564
+ "text_level": 1,
1565
+ "bbox": [
1566
+ 183,
1567
+ 104,
1568
+ 611,
1569
+ 117
1570
+ ],
1571
+ "page_idx": 13
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "Here the introduced usage-linkage and hard attention mechanism for memory access are evaluated. While using hard attention instead of soft attention was a necessary modification to enable efficient learning of algorithmic solutions, the introduced usage-linkage had a smaller impact on the Learning to Search task, as shown in Figure 9. When applied to the Learning to Plan setup however, the usagelinkage improved the learning of algorithmic solutions significantly, see Figure 10. Both results show that the model learns to use the attention mechanisms that are required for the algorithmic solution, i.e., the usage-linkage is especially useful for the backtracking in the Learning to Plan setup compared to the Learning to Search setup where no backtracking is required. ",
1576
+ "bbox": [
1577
+ 173,
1578
+ 128,
1579
+ 825,
1580
+ 241
1581
+ ],
1582
+ "page_idx": 13
1583
+ },
1584
+ {
1585
+ "type": "image",
1586
+ "img_path": "images/b8995f9b8808eba39ce8b31de2a1a6344efa7e1cd3efa29efc8e8f871e3ab7f9.jpg",
1587
+ "image_caption": [
1588
+ "Figure 9: Evaluation of the introduced usage-linkage attention and the hard attention memory access. "
1589
+ ],
1590
+ "image_footnote": [],
1591
+ "bbox": [
1592
+ 178,
1593
+ 257,
1594
+ 816,
1595
+ 412
1596
+ ],
1597
+ "page_idx": 13
1598
+ },
1599
+ {
1600
+ "type": "image",
1601
+ "img_path": "images/7eef0d11a1356ac3f506171e95fc2d88bc5d1895e164a14113aa4a4754a93cf7.jpg",
1602
+ "image_caption": [
1603
+ "Figure 10: Evaluation of the usage-linkage attention on the Learning to Plan setup. "
1604
+ ],
1605
+ "image_footnote": [],
1606
+ "bbox": [
1607
+ 178,
1608
+ 462,
1609
+ 816,
1610
+ 619
1611
+ ],
1612
+ "page_idx": 13
1613
+ },
1614
+ {
1615
+ "type": "text",
1616
+ "text": "BAD MEMORIES ",
1617
+ "bbox": [
1618
+ 174,
1619
+ 652,
1620
+ 287,
1621
+ 666
1622
+ ],
1623
+ "page_idx": 13
1624
+ },
1625
+ {
1626
+ "type": "text",
1627
+ "text": "The bad memories approach was developed while learning the data-dependent modules and was a necessary mechanism to learn robust and generalized modules with $1 \\bar { 0 } 0 \\%$ accuracy, as explained in Section 2.1.1. For learning the algorithmic solutions, the impact of this learning from mistakes strategy was less significant, see Figure 11. ",
1628
+ "bbox": [
1629
+ 174,
1630
+ 678,
1631
+ 825,
1632
+ 734
1633
+ ],
1634
+ "page_idx": 13
1635
+ },
1636
+ {
1637
+ "type": "image",
1638
+ "img_path": "images/761af117c5e5af29f04ad32295caa301c167a30faeafc701111278fbdaa83847.jpg",
1639
+ "image_caption": [
1640
+ "Figure 11: Evaluation of the bad memories mechanism. "
1641
+ ],
1642
+ "image_footnote": [],
1643
+ "bbox": [
1644
+ 178,
1645
+ 748,
1646
+ 818,
1647
+ 906
1648
+ ],
1649
+ "page_idx": 13
1650
+ }
1651
+ ]
parse/train/S1gNc3NtvB/S1gNc3NtvB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1gNc3NtvB/S1gNc3NtvB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJ6yPD5xg/SJ6yPD5xg.md ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REINFORCEMENT LEARNING WITH UNSUPERVISED AUXILIARY TASKS
2
+
3
+ Max Jaderberg∗, Volodymyr Mnih\*, Wojciech Marian Czarnecki\*
4
+ Tom Schaul, Joel Z Leibo, David Silver & Koray Kavukcuoglu
5
+ DeepMind
6
+ London, UK
7
+ {jaderberg,vmnih,lejlot,schaul,jzl,davidsilver,
8
+
9
+ # ABSTRACT
10
+
11
+ Deep reinforcement learning agents have achieved state-of-the-art results by directly maximising cumulative reward. However, environments contain a much wider variety of possible training signals. In this paper, we introduce an agent that also learns separate policies for maximising many other pseudo-reward functions simultaneously by reinforcement learning. All of these tasks share a common representation that, like unsupervised learning, continues to develop in the absence of extrinsic rewards. We also introduce a novel mechanism for focusing this representation upon extrinsic rewards, so that learning can rapidly adapt to the most relevant aspects of the actual task. Our agent significantly outperforms the previous state-of-the-art on Atari, averaging $880 \%$ expert human performance, and a challenging suite of first-person, three-dimensional Labyrinth tasks leading to a mean speedup in learning of $1 0 \times$ and averaging $87 \%$ expert human performance on Labyrinth.
12
+
13
+ Natural and artificial agents live in a stream of sensorimotor data. At each time step $t$ , the agent receives observations $o _ { t }$ and executes actions $a _ { t }$ . These actions influence the future course of the sensorimotor stream. In this paper we develop agents that learn to predict and control this stream, by solving a host of reinforcement learning problems, each focusing on a distinct feature of the sensorimotor stream. Our hypothesis is that an agent that can flexibly control its future experiences will also be able to achieve any goal with which it is presented, such as maximising its future rewards.
14
+
15
+ The classic reinforcement learning paradigm focuses on the maximisation of extrinsic reward. However, in many interesting domains, extrinsic rewards are only rarely observed. This raises questions of what and how to learn in their absence. Even if extrinsic rewards are frequent, the sensorimotor stream contains an abundance of other possible learning targets. Traditionally, unsupervised learning attempts to reconstruct these targets, such as the pixels in the current or subsequent frame. It is typically used to accelerate the acquisition of a useful representation. In contrast, our learning objective is to predict and control features of the sensorimotor stream, by treating them as pseudorewards for reinforcement learning. Intuitively, this set of tasks is more closely matched with the agent’s long-term goals, potentially leading to more useful representations.
16
+
17
+ Consider a baby that learns to maximise the cumulative amount of red that it observes. To correctly predict the optimal value, the baby must understand how to increase “redness” by various means, including manipulation (bringing a red object closer to the eyes); locomotion (moving in front of a red object); and communication (crying until the parents bring a red object). These behaviours are likely to recur for many other goals that the baby may subsequently encounter. No understanding of these behaviours is required to simply reconstruct the redness of current or subsequent images.
18
+
19
+ Our architecture uses reinforcement learning to approximate both the optimal policy and optimal value function for many different pseudo-rewards. It also makes other auxiliary predictions that serve to focus the agent on important aspects of the task. These include the long-term goal of predicting cumulative extrinsic reward as well as short-term predictions of extrinsic reward. To learn more efficiently, our agents use an experience replay mechanism to provide additional updates to the critics. Just as animals dream about positively or negatively rewarding events more frequently (Olafsdottir et al., 2015; Schacter et al., 2012), our agents preferentially replay sequences containing rewarding events.
20
+
21
+ ![](images/aead18b15b5dd08676ae009c1257cf16f4773194f523ae7b41eb184dddd87214.jpg)
22
+ Figure 1: Overview of the UNREAL agent. (a) The base agent is a CNN-LSTM agent trained on-policy with the A3C loss (Mnih et al., 2016). Observations, rewards, and actions are stored in a small replay buffer which encapsulates a short history of agent experience. This experience is used by auxiliary learning tasks. (b) Pixel Control – auxiliary policies $Q ^ { \mathrm { a u x } }$ are trained to maximise change in pixel intensity of different regions of the input. The agent CNN and LSTM are used for this task along with an auxiliary deconvolution network. This auxiliary control task requires the agent to learn how to control the environment. (c) Reward Prediction – given three recent frames, the network must predict the reward that will be obtained in the next unobserved timestep. This task network uses instances of the agent CNN, and is trained on reward biased sequences to remove the perceptual sparsity of rewards. (d) Value Function Replay – further training of the value function using the agent network is performed to promote faster value iteration. Further visualisation of the agent can be found in https://youtu.be/Uz-zGYrYEjA
23
+
24
+ Importantly, both the auxiliary control and auxiliary prediction tasks share the convolutional neural network and LSTM that the base agent uses to act. By using this jointly learned representation, the base agent learns to optimise extrinsic reward much faster and, in many cases, achieves better policies at the end of training.
25
+
26
+ This paper brings together the state-of-the-art Asynchronous Advantage Actor-Critic (A3C) framework (Mnih et al., 2016), outlined in Section 2, with auxiliary control tasks and auxiliary reward tasks, defined in sections Section 3.1 and Section 3.2 respectively. These auxiliary tasks do not require any extra supervision or signals from the environment than the vanilla A3C agent. The result is our UNsupervised REinforcement and Auxiliary Learning (UNREAL) agent (Section 3.4)
27
+
28
+ In Section 4 we apply our UNREAL agent to a challenging set of 3D-vision based domains known as the Labyrinth (Mnih et al., 2016), learning solely from the raw RGB pixels of a first-person view. Our agent significantly outperforms the baseline agent using vanilla A3C, even when the baseline was augmented with an unsupervised reconstruction loss, in terms of speed of learning, robustness to hyperparameters, and final performance. The result is an agent which on average achieves $87 \%$ of expert human-normalised score, compared to $54 \%$ with A3C, and on average $1 0 \times$ faster than A3C. Our UNREAL agent also significantly outperforms the previous state-of-the-art in the Atari domain.
29
+
30
+ # 1 RELATED WORK
31
+
32
+ A variety of reinforcement learning architectures have focused on learning temporal abstractions, such as options (Sutton et al., 1999b), with policies that may maximise pseudo-rewards (Konidaris & Barreto, 2009; Silver & Ciosek, 2012). The emphasis here has typically been on the development of temporal abstractions that facilitate high-level learning and planning. In contrast, our agents do not make any direct use of the pseudo-reward maximising policies that they learn (although this is an interesting direction for future research). Instead, they are used solely as auxiliary objectives for developing a more effective representation.
33
+
34
+ The Horde architecture (Sutton et al., 2011) also applied reinforcement learning to identify value functions for a multitude of distinct pseudo-rewards. However, this architecture was not used for representation learning; instead each value function was trained separately using distinct weights.
35
+
36
+ The UVFA architecture (Schaul et al., 2015a) is a factored representation of a continuous set of optimal value functions, combining features of the state with an embedding of the pseudo-reward function. Initial work on UVFAs focused primarily on architectural choices and learning rules for these continuous embeddings. A pre-trained UVFA representation was successfully transferred to novel pseudo-rewards in a simple task.
37
+
38
+ Similarly, the successor representation (Dayan, 1993; Barreto et al., 2016; Kulkarni et al., 2016) factors a continuous set of expected value functions for a fixed policy, by combining an expectation over features of the state with an embedding of the pseudo-reward function. Successor representations have been used to transfer representations from one pseudo-reward to another (Barreto et al., 2016) or to different scales of reward (Kulkarni et al., 2016).
39
+
40
+ Another, related line of work involves learning models of the environment (Schmidhuber, 2010; Xie et al., 2015; Oh et al., 2015). Although learning environment models as auxiliary tasks could improve RL agents (e.g. Lin & Mitchell (1992); Li et al. (2015)), this has not yet been shown to work in rich visual environments.
41
+
42
+ More recently, auxiliary predictions tasks have been studied in 3D reinforcement learning environments. Lample & Chaplot (2016) showed that predicting internal features of the emulator, such as the presence of an enemy on the screen, is beneficial. Mirowski et al. (2016) study auxiliary prediction of depth in the context of navigation.
43
+
44
+ # 2 BACKGROUND
45
+
46
+ We assume the standard reinforcement learning setting where an agent interacts with an environment over a number of discrete time steps. At time $t$ the agent receives an observation $o _ { t }$ along with a reward $r _ { t }$ and produces an action $a _ { t }$ . The agent’s state $s _ { t }$ is a function of its experience up until t sum of rewards, time , $s _ { t } = f ( o _ { 1 } , r _ { 1 } , a _ { 1 } , . . . , o _ { t } , r _ { t } ) ,$ $\begin{array} { r } { R _ { t : t + n } = \sum _ { i = 1 } ^ { n } \gamma ^ { i - 1 } r _ { t + i } } \end{array}$ . The $n$ -step return t:t+n . The value function is the expected return from state $R _ { t : t + n }$ at time is defined as the discounted $s$ , $V ^ { \pi } ( s ) = \mathbb { E } \left[ R _ { t : \infty } | s _ { t } = s , \overline { { \pi } } \right]$ , when actions are selected accorded to a policy $\pi ( a | s )$ . The actionvalue function $Q ^ { \pi } ( s , a ) = \mathbb { E } \left[ \bar { R } _ { t : \infty } | s _ { t } = s , a _ { t } = a , \pi \right]$ is the expected return following action $a$ from state $s$ .
47
+
48
+ Value-based reinforcement learning algorithms, such as Q-learning (Watkins, 1989), or its deep learning instantiations DQN (Mnih et al., 2015) and asynchronous Q-learning (Mnih et al., 2016), approximate the action-value function $Q ( s , a ; \theta )$ using parameters $\theta$ , and then update parameters to minimise the mean-squared error, for example by optimising an $n$ -step lookahead loss (Peng & Williams, 1996), $\begin{array} { r } { \dot { \mathcal { L } _ { Q } } = \mathbb { E } \left[ \left( R _ { t : t + n } + \gamma ^ { n } \operatorname* { m a x } _ { a ^ { \prime } } Q ( s ^ { \prime } , a ^ { \prime } ; \theta ^ { - } ) - Q ( s , a ; \theta ) \right) ^ { 2 } \right] } \end{array}$ ; where $\theta ^ { - }$ are previous parameters and the optimisation is with respect to $\theta$ .
49
+
50
+ Policy gradient algorithms adjust the policy to maximise the expected reward, $\mathbb { E } _ { s \sim \pi } \left[ R _ { 1 : \infty } \right]$ , using the gradient $\begin{array} { r } { \frac { \partial \mathbb { E } _ { s \sim \pi } \left[ R _ { 1 : \infty } \right] } { \partial \theta } = \mathbb { E } \left[ \frac { \partial } { \partial \theta } \log \pi ( \boldsymbol { a } | s ) ( Q ^ { \pi } ( \underline { { s } } , \boldsymbol { a } ) - V ^ { \pi } ( s ) ) \right] } \end{array}$ ∼ ∞(Watkins, 1989; Sutton et al., 1999a); in practice the true value functions $Q ^ { \pi }$ and $V ^ { \pi }$ are substituted with approximations. The Asynchronous Advantage Actor-Critic (A3C) algorithm (Mnih et al., 2016) constructs an approximation to both the policy $\pi ( a | s , \theta )$ and the value function $V ( s , \theta )$ using parameters $\theta$ . Both policy and value are adjusted towards an $n$ -step lookahead value, $R _ { t : t + n } + \gamma ^ { n } V ( s _ { t + n + 1 } , \theta )$ , using an entropy regularisation penalty, ${ \mathcal L } _ { \mathrm { A 3 C } } \approx { \mathcal L } _ { \mathrm { V R } } + { \mathcal L } _ { \pi } - { \mathbb E } _ { s \sim \pi } [ \alpha H ( \pi ( s , \cdot , \theta ) ]$ , where $\mathcal { L } _ { \mathrm { V R } } ~ =$ $\mathbb { E } _ { s \sim \pi } \left[ ( \stackrel { \sim } { R } _ { t : t + n } + \gamma ^ { n } V ( s _ { t + n + 1 } , \stackrel { \sim } { \theta ^ { - } } ) - V ( s _ { t } , \theta ) ) ^ { 2 } \right]$ .
51
+
52
+ In A3C many instances of the agent interact in parallel with many instances of the environment, which both accelerates and stabilises learning. The A3C agent architecture we build on uses an LSTM to jointly approximate both policy $\pi$ and value function $V$ , given the entire history of experience as inputs (see Figure 1 (a)).
53
+
54
+ # 3 AUXILIARY TASKS FOR REINFORCEMENT LEARNING
55
+
56
+ In this section we incorporate auxiliary tasks into the reinforcement learning framework in order to promote faster training, more robust learning, and ultimately higher performance for our agents. Section 3.1 introduces the use of auxiliary control tasks, Section 3.2 describes the addition of reward focussed auxiliary tasks, and Section 3.4 describes the complete UNREAL agent combining these auxiliary tasks.
57
+
58
+ # 3.1 AUXILIARY CONTROL TASKS
59
+
60
+ The auxiliary control tasks we consider are defined as additional pseudo-reward functions in the environment the agent is interacting with. We formally define an auxiliary control task $c$ by a reward function $r ^ { ( c ) } : \mathcal { S } \times \mathcal { A } \mathbb { R }$ , where $s$ is the space of possible states and $\mathcal { A }$ is the space of available actions. The underlying state space $s$ includes both the history of observations and rewards as well as the state of the agent itself, i.e. the activations of the hidden units of the network.
61
+
62
+ Given a set of auxiliary control tasks $\mathcal { C }$ , let $\pi ^ { ( c ) }$ be the agent’s policy for each auxiliary task $c \in { \mathcal { C } }$ and let $\pi$ be the agent’s policy on the base task. The overall objective is to maximise total performance across all these auxiliary tasks,
63
+
64
+ $$
65
+ \underset { \theta } { \arg \operatorname* { m a x } } \mathbb { E } _ { \pi } [ R _ { 1 : \infty } ] + \lambda _ { C } \sum _ { c \in \mathcal { C } } \mathbb { E } _ { \pi _ { c } } [ R _ { 1 : \infty } ^ { ( c ) } ] ,
66
+ $$
67
+
68
+ where, $\begin{array} { r } { R _ { t : t + n } ^ { ( c ) } = \sum _ { k = 1 } ^ { n } \gamma ^ { k - 1 } r _ { t + k } ^ { ( c ) } } \end{array}$ is the discounted return for auxiliary reward $r ^ { ( c ) }$ , and $\theta$ is the set of parameters of $\pi$ and all $\pi ^ { ( c ) }$ ’s. By sharing some of the parameters of $\pi$ and all $\pi ^ { ( c ) }$ the agent must balance improving its performance with respect to the global reward $r _ { t }$ with improving performance on the auxiliary tasks.
69
+
70
+ In principle, any reinforcement learning method could be applied to maximise these objectives. However, to efficiently learn to maximise many different pseudo-rewards simultaneously in parallel from a single stream of experience, it is necessary to use off-policy reinforcement learning. We focus on value-based RL methods that approximate the optimal action-values by Qlearning. Specifically, for each control task $c$ we optimise an $n$ -step Q-learning loss $\mathcal { L } _ { Q } ^ { ( c ) } \ =$ $\begin{array} { r } { \mathbb { E } \left[ \left( R _ { t : t + n } + \gamma ^ { n } \operatorname* { m a x } _ { a ^ { \prime } } Q ^ { ( c ) } ( s ^ { \prime } , a ^ { \prime } , \theta ^ { - } ) - Q ^ { ( c ) } ( s , a , \theta ) \right) ^ { 2 } \right] } \end{array}$ , as described in Mnih et al. (2016).
71
+
72
+ While many types of auxiliary reward functions can be defined from these quantities we focus on two specific types:
73
+
74
+ • Pixel changes - Changes in the perceptual stream often correspond to important events in an environment. We train agents that learn a separate policy for maximally changing the pixels in each cell of an $n \times n$ non-overlapping grid placed over the input image. We refer to these auxiliary tasks as pixel control. See Section 4 for a complete description. • Network features - Since the policy or value networks of an agent learn to extract taskrelevant high-level features of the environment (Mnih et al., 2015; Zahavy et al., 2016; Silver et al., 2016) they can be useful quantities for the agent to learn to control. Hence, the activation of any hidden unit of the agent’s neural network can itself be an auxiliary reward. We train agents that learn a separate policy for maximally activating each of the units in a specific hidden layer. We refer to these tasks as feature control.
75
+
76
+ The Figure 1 (b) shows an A3C agent architecture augmented with a set of auxiliary pixel control tasks. In this case, the base policy $\pi$ shares both the convolutional visual stream and the LSTM with the auxiliary policies. The output of the auxiliary network head is an $N _ { \mathrm { a c t } } \times n \times n$ tensor $Q ^ { \mathrm { a u x } }$ where $Q ^ { \mathrm { a u x } } ( a , i , j )$ represents the network’s current estimate of the optimal discounted expected change in cell $( i , j )$ of the input after taking action $a$ . We exploit the spatial nature of the auxiliary tasks by using a deconvolutional neural network to produce the auxiliary values $Q ^ { \mathrm { a u x } }$ .
77
+
78
+ # 3.2 AUXILIARY REWARD TASKS
79
+
80
+ In addition to learning generally about the dynamics of the environment, an agent must learn to maximise the global reward stream. To learn a policy to maximise rewards, an agent requires features that recognise states that lead to high reward and value. An agent with a good representation of rewarding states, will allow the learning of good value functions, and in turn should allow the easy learning of a policy.
81
+
82
+ ![](images/f2e602856d63f45e1956a683bbe09a0d9cc79d8a665045e4e430984e405da66f.jpg)
83
+ Figure 2: The raw RGB frame from the environment is the observation that is given as input to the agent, along with the last action and reward. This observation is shown for a sample of a maze from the nav maze all random 02 level in Labyrinth. The agent must navigate this unseen maze and pick up apples giving $+ 1$ reward and reach the goal giving $+ 1 0$ reward, after which it will respawn. Top down views of samples from this maze generator show the variety of mazes procedurally created. A video showing the agent playing Labyrinth levels can be viewed at https://youtu.be/Uz-zGYrYEjA
84
+
85
+ However, in many interesting environments reward is encountered very sparsely, meaning that it can take a long time to train feature extractors adept at recognising states which signify the onset of reward. We want to remove the perceptual sparsity of rewards and rewarding states to aid the training of an agent, but to do so in a way which does not introduce bias to the agent’s policy.
86
+
87
+ To do this, we introduce the auxiliary task of reward prediction – that of predicting the onset of immediate reward given some historical context. This task consists of processing a sequence of consecutive observations, and requiring the agent to predict the reward picked up in the subsequent unseen frame. This is similar to value learning focused on immediate reward $( \gamma = 0$ ).
88
+
89
+ Unlike learning a value function, which is used to estimate returns and as a baseline while learning a policy, the reward predictor is not used for anything other than shaping the features of the agent. This keeps us free to bias the data distribution, therefore biasing the reward predictor and feature shaping, without biasing the value function or policy.
90
+
91
+ We train the reward prediction task on sequences ${ \cal S } _ { \tau } = ( s _ { \tau - k } , s _ { \tau - k + 1 } , . . . , s _ { \tau - 1 } )$ to predict the reward $r _ { \tau }$ , and sample $S _ { \tau }$ from the experience of our policy $\pi$ in a skewed manner so as to overrepresent rewarding events (presuming rewards are sparse within the environment). Specifically, we sample such that zero rewards and non-zero rewards are equally represented, i.e. the predicted probability of a non-zero reward is $P ( r _ { \tau } \neq 0 ) = 0 . 5$ . The reward prediction is trained to minimise a loss $\mathcal { L } _ { \mathrm { R P } }$ . In our experiments we use a multiclass cross-entropy classification loss across three classes (zero, positive, or negative reward), although a mean-squared error loss is also feasible.
92
+
93
+ The auxiliary reward predictions may use a different architecture to the agent’s main policy. Rather than simply “hanging” the auxiliary predictions off the LSTM, we use a simpler feedforward network that concatenates a stack of states $S _ { \tau }$ after being encoded by the agent’s CNN, see Figure 1 (c). The idea is to simplify the temporal aspects of the prediction task in both the future direction (focusing only on immediate reward prediction rather than long-term returns) and past direction (focusing only on immediate predecessor states rather than the complete history); the features discovered in this manner are shared with the primary LSTM (via shared weights in the convolutional encoder) to enable the policy to be learned more efficiently.
94
+
95
+ # 3.3 EXPERIENCE REPLAY
96
+
97
+ Experience replay has proven to be an effective mechanism for improving both the data efficiency and stability of deep reinforcement learning algorithms (Mnih et al., 2015). The main idea is to store transitions in a replay buffer, and then apply learning updates to sampled transitions from this buffer.
98
+
99
+ Experience replay provides a natural mechanism for skewing the distribution of reward prediction samples towards rewarding events: we simply split the replay buffer into rewarding and nonrewarding subsets, and replay equally from both subsets. The skewed sampling of transitions from a replay buffer means that rare rewarding states will be oversampled, and learnt from far more frequently than if we sampled sequences directly from the behaviour policy. This approach can be viewed as a simple form of prioritised replay (Schaul et al., 2015b).
100
+
101
+ In addition to reward prediction, we also use the replay buffer to perform value function replay (see Figure 1). This amounts to resampling recent historical sequences from the behaviour policy distribution and performing extra value function regression in addition to the on-policy value function regression in A3C. By resampling previous experience, and randomly varying the temporal position of the truncation window over which the n-step return is computed, value function replay performs value iteration and exploits newly discovered features shaped by reward prediction. We do not skew the distribution for this case.
102
+
103
+ Experience replay is also used to increase the efficiency and stability of the auxiliary control tasks. Q-learning updates are applied to sampled experiences that are drawn from the replay buffer, allowing features to be developed extremely efficiently.
104
+
105
+ # 3.4 UNREAL AGENT
106
+
107
+ The UNREAL algorithm combines the benefits of two separate, state-of-the-art approaches to deep reinforcement learning. The primary policy is trained with A3C (Mnih et al., 2016): it learns from parallel streams of experience to gain efficiency and stability; it is updated online using policy gradient methods; and it uses a recurrent neural network to encode the complete history of experience. This allows the agent to learn effectively in partially observed environments.
108
+
109
+ The auxiliary tasks are trained on very recent sequences of experience that are stored and randomly sampled; these sequences may be prioritised (in our case according to immediate rewards) (Schaul et al., 2015b); these targets are trained off-policy by Q-learning; and they may use simpler feedforward architectures. This allows the representation to be trained with maximum efficiency.
110
+
111
+ The UNREAL algorithm optimises a single combined loss function with respect to the joint parameters of the agent, $\begin{array} { r } { \mathcal { L } _ { \mathrm { P C } } = \sum _ { c } \mathcal { L } _ { Q } ^ { ( c ) } } \end{array}$ , auxiliary reward prediction loss $\theta$ , that combines the A3C loss $\mathcal { L } _ { \mathrm { R P } }$ $\mathcal { L } _ { \mathrm { A 3 C } }$ and replayed value loss together with an auxiliary control loss $\mathcal { L } _ { \mathrm { V R } }$ ,
112
+
113
+ $$
114
+ \mathcal { L } _ { U N R E A L } ( \theta ) = \mathcal { L } _ { \mathrm { A 3 C } } + \lambda _ { \mathrm { V R } } \mathcal { L } _ { \mathrm { V R } } + \lambda _ { \mathrm { P C } } \sum _ { c } \mathcal { L } _ { Q } ^ { ( c ) } + \lambda _ { \mathrm { R P } } \mathcal { L } _ { \mathrm { R P } }
115
+ $$
116
+
117
+ where $\lambda _ { \mathrm { V R } } , \lambda _ { \mathrm { P C } } , \lambda _ { \mathrm { R P } }$ are weighting terms on the individual loss components.
118
+
119
+ In practice, the loss is broken down into separate components that are computed either on-policy, directly from experience; or off-policy, on replayed transitions. Specifically, the A3C loss $\mathcal { L } _ { \mathrm { { A 3 C } } }$ is minimised on-policy; while the value function loss $\mathcal { L } _ { \mathrm { V R } }$ is optimised from replayed data, in addition to the A3C loss (of which it is one component, see Section 2). The auxiliary control loss $\mathcal { L } _ { \mathrm { P C } }$ is optimised off-policy from replayed data, by $n$ -step Q-learning. Finally, the reward loss $\mathcal { L } _ { \mathrm { R P } }$ is optimised from rebalanced replay data.
120
+
121
+ # 4 EXPERIMENTS
122
+
123
+ In this section we give the results of experiments performed on the 3D environment Labyrinth in Section 4.1 and Atari in Section 4.2.
124
+
125
+ In all our experiments we used an A3C CNN-LSTM agent as our baseline and the UNREAL agent along with its ablated variants added auxiliary outputs and losses to this base agent. The agent is trained on-policy with 20-step returns and the auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent. The replay buffer stores the most recent $2 \mathrm { k }$ observations, actions, and rewards taken by the base agent. In Labyrinth we use the same set of 17 discrete actions for all games and on Atari the action set is game dependent (between 3 and 18 discrete actions). The full implementation details can be found in Section B.
126
+
127
+ # 4.1 LABYRINTH RESULTS
128
+
129
+ Labyrinth (see Figure 2) is a first-person 3D game platform extended from OpenArena (contributors, 2005), which is itself based on Quake3 (id software, 1999). Labyrinth is comparable to other firstperson 3D game platforms for AI research like VizDoom (Kempka et al., 2016) or Minecraft (Tessler et al., 2016). However, in comparison, Labyrinth has considerably richer visuals and more realistic physics. Textures in Labyrinth are often dynamic (animated) so as to convey a game world where walls and floors shimmer and pulse, adding significant complexity to the perceptual task. The action space allows for fine-grained pointing in a fully 3D world. Labyrinth also supports continuous motion unlike the Minecraft platform of (Oh et al., 2016), which is a 3D grid world.
130
+
131
+ ![](images/6f6ad55f716b5b0dd7cb6551583a335ab7b8c6318795317705a062a21feacd06.jpg)
132
+ Figure 3: An overview of performance averaged across all levels on Labyrinth (Top) and Atari (Bottom). In the ablated versions RP is reward prediction, VR is value function replay, and PC is pixel control, with the UNREAL agent being the combination of all. Left: The mean human-normalised performance over last 100 episodes of the top-3 jobs at every point in training. In Labyrinth, we achieve an average of $87 \%$ humannormalised score, with every element of the agent improving upon the $54 \%$ human-normalised score of vanilla A3C. Prior. Duel Clip and Duel Clip are Dueling Networks with gradient clipped to 10 as reported in Wang et al. (2016) Right: The final human-normalised score of every job in our hyperparameter sweep, sorted by score. On both Labyrinth and Atari, the UNREAL agent increases the robustness to the hyperparameters (namely learning rate and entropy cost).
133
+
134
+ We evaluated agent performance on 13 Labyrinth levels that tested a range of different agent abilities. A top-down visualization showing the layout of each level can be found in Figure 9 of the Appendix. A gallery of example images from the first-person perspective of the agent are in Figure 10 of the Appendix. The levels can be divided into four categories:
135
+
136
+ 1. Simple fruit gathering levels with a static map (seekavoid arena 01 and stairway to melon 01). The goal of these levels is to collect apples (small positive reward) and melons (large positive reward) while avoiding lemons (small negative reward). 2. Navigation levels with a static map layout (nav maze static $. 0 \{ 1 , 2 , 3 \}$ and nav maze random goal ${ \bf \mathrm { - 0 \{ 1 , 2 , 3 \} } }$ ). These levels test the agent’s ability to find their way to a goal in a fixed maze that remains the same across episodes. The starting location is random. In this case, agents could encode the structure of the maze in network weights. In the random goal variant, the location of the goal changes in every episode. The optimal policy is to find the goal’s location at the start of each episode and then use long-term knowledge of the maze layout to return to it as quickly as possible from any location. The static variant is simpler in that the goal location is always fixed for all episodes and only the agent’s starting location changes so the optimal policy does not require the first step of exploring to find the current goal location. 3. Procedurally-generated navigation levels requiring effective exploration of a new maze generated on-the-fly at the start of each episode (nav maze all random $. 0 \{ 1 , 2 , 3 \} )$ ). These levels test the agent’s ability to effectively explore a totally new environment. The optimal policy would begin by exploring the maze to rapidly learn its layout and then exploit that knowledge to repeatedly return to the goal as many times as possible before the end of the episode (between 60 and 300 seconds).
137
+
138
+ 4. Laser-tag levels requiring agents to wield laser-like science fiction gadgets to tag bots controlled by the game’s in-built AI (lt horse shoe color and lt hallway slope). A reward of 1 is delivered whenever the agent tags a bot by reducing its shield to 0. These levels approximate the default OpenArena/Quake3 gameplay mode. In lt hallway slope there is a sloped arena, requiring the agent to look up and down. In lt horse shoe color, the colors and textures of the bots are randomly generated at the start of each episode. This prevents agents from relying on color for bot detection. These levels test aspects of fine-control (for aiming), planning (to anticipate where bots are likely to move), strategy (to control key areas of the map such as gadget spawn points), and robustness to the substantial visual complexity arising from the large numbers of independently moving objects (gadget projectiles and bots).
139
+
140
+ # 4.1.1 RESULTS
141
+
142
+ We compared the full UNREAL agent to a basic A3C LSTM agent along with several ablated versions of UNREAL with different components turned off. A video of the final agent performance, as well as visualisations of the activations and auxiliary task outputs can be viewed at https://youtu.be/Uz-zGYrYEjA.
143
+
144
+ Figure 3 (top left) shows curves of mean human-normalised scores over the 13 Labyrinth levels. Adding each of our proposed auxiliary tasks to an A3C agent substantially improves the performance. Combining different auxiliary tasks leads to further improvements over the individual auxiliary tasks. The UNREAL agent, which combines all three auxiliary tasks, achieves more than twice the final human-normalised mean performance of A3C, increasing from $54 \%$ to $87 \%$ ( $45 \%$ to $92 \%$ for median performance). This includes a human-normalised score of $116 \%$ on lt hallway slope and $100 \%$ on nav maze random goal 02.
145
+
146
+ Perhaps of equal importance, aside from final performance on the games, UNREAL is significantly faster at learning and therefore more data efficient, achieving a mean speedup of the number of steps to reach A3C best performance of $1 0 \times$ (median $1 1 \times$ ) across all levels and up to $1 8 \times$ on nav maze random goal 02. This translates in a drastic improvement in the data efficiency of UNREAL over A3C, requiring less than $10 \%$ of the data to reach the final performance of A3C. We can also measure the robustness of our learning algorithms to hyperparameters by measuring the performance over all hyperparameters (namely learning rate and entropy cost). This is shown in Figure 3 Top Right: every auxiliary task in our agent improves robustness. A breakdown of the performance of A3C, UNREAL and UNREAL without pixel control on the individual Labyrinth levels is shown in Figure 4.
147
+
148
+ Unsupervised Reinforcement Learning In order to better understand the benefits of auxiliary control tasks we compared it to two simple baselines on three Labyrinth levels. The first baseline was A3C augmented with a pixel reconstruction loss, which has been shown to improve performance on 3D environments (Kulkarni et al., 2016). The second baseline was A3C augmented with an input change prediction loss, which can be seen as simply predicting the immediate auxiliary reward instead of learning to control. Finally, we include preliminary results for A3C augmented with the feature control auxiliary task on one of the levels. We retuned the hyperparameters of all methods (including learning rate and the weight placed on the auxiliary loss) for each of the three Labyrinth levels. Figure 5 shows the learning curves for the top 5 hyperparameter settings on three Labyrinth navigation levels. The results show that learning to control pixel changes is indeed better than simply predicting immediate pixel changes, which in turn is better than simply learning to reconstruct the input. In fact, learning to reconstruct only led to faster initial learning and actually made the final scores worse when compared to vanilla A3C. Our hypothesis is that input reconstruction hurts final performance because it puts too much focus on reconstructing irrelevant parts of the visual input instead of visual cues for rewards, which rewarding objects are rarely visible. We saw a substantial improvement from including the feature control auxiliary task, which was only slightly worse than for pixel control. Combining feature control with other auxiliary tasks is a promising future direction.
149
+
150
+ ![](images/0cf8e451251429aa2f3c5407f44381d81b1760354f6d60b8a9515be10349b945.jpg)
151
+ Figure 4: A breakdown of the improvement over A3C due to our auxiliary tasks for each level on Labyrinth. The values for $_ { \mathrm { A 3 C + R P + V R } }$ (reward prediction and value function replay) and UNREAL (reward prediction, value function replay and pixel control) are normalised by the A3C value. AUC Performance gives the robustness to hyperparameters (area under the robustness curve Figure 3 Right). Data Efficiency is area under the mean learning curve for the top-5 jobs, and Top5 Speedup is the speedup for the mean of the top-5 jobs to reach the maximum top-5 mean score set by A3C. Speedup is not defined for stairway to melon as A3C did not learn throughout training.
152
+
153
+ ![](images/0b7c880bcb10e1c2e61dd8c91d48b339c4be42b819d7b6e4a5dc1ff7cf0964a1.jpg)
154
+ Figure 5: Comparison of various forms of self-supervised learning on random maze navigation. Adding an input reconstruction loss to the objective leads to faster learning compared to an A3C baseline. Predicting changes in the inputs works better than simple image reconstruction. Learning to control changes leads to the best results.
155
+
156
+ # 4.2 ATARI
157
+
158
+ We applied the UNREAL agent as well as UNREAL without pixel control to 57 Atari games from the Arcade Learning Environment (Bellemare et al., 2012) domain. We use the same evaluation protocol as for our Labyrinth experiments where we evaluate 50 different random hyper parameter settings (learning rate and entropy cost) on each game. The results are shown in the bottom row of Figure 3. The left side shows the average performance curves of the top 3 agents for all three methods the right half shows sorted average human-normalised scores for each hyperparameter setting. More detailed learning curves for individual levels can be found in Figure 6. We see that UNREAL surpasses the current state-of-the-art agents, i.e. A3C and Prioritized Dueling DQN (Wang et al., 2016), across all levels attaining $8 8 0 \%$ mean and $2 5 0 \%$ median performance. Notably, UNREAL is also substantially more robust to hyper parameter settings than A3C.
159
+
160
+ # 5 CONCLUSION
161
+
162
+ We have shown how augmenting a deep reinforcement learning agent with auxiliary control and reward prediction tasks can drastically improve both data efficiency and robustness to hyperparameter settings. Most notably, our proposed UNREAL architecture more than doubled the previous stateof-the-art results on the challenging set of 3D Labyrinth levels, bringing the average scores to over $8 7 \%$ of human scores. The same UNREAL architecture also significantly improved both the learning speed and the robustness of A3C over 57 Atari games.
163
+
164
+ # ACKNOWLEDGEMENTS
165
+
166
+ We thank Charles Beattie, Julian Schrittwieser, Marcus Wainwright, and Stig Petersen for environment design and development, and Amir Sadik and Sarah York for expert human game testing. We also thank Joseph Modayil, Andrea Banino, Hubert Soyer, Razvan Pascanu, and Raia Hadsell for many helpful discussions.
167
+
168
+ # REFERENCES
169
+
170
+ Andre Barreto, R ´ emi Munos, Tom Schaul, and David Silver. Successor features for transfer in ´ reinforcement learning. arXiv preprint arXiv:1606.05312, 2016.
171
+
172
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012.
173
+
174
+ OpenArena contributors. The openarena manual. 2005. URL http://openarena.wikia. com/wiki/Manual.
175
+
176
+ Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613–624, 1993.
177
+
178
+ Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction¨ with lstm. Neural computation, 12(10):2451–2471, 2000.
179
+
180
+ id software. Quake3. 1999. URL https://github.com/id-Software/ Quake-III-Arena.
181
+
182
+ Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. Viz- ´ doom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016.
183
+
184
+ George Konidaris and Andre S Barreto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems, pp. 1015– 1023, 2009.
185
+
186
+ Tejas D Kulkarni, Ardavan Saeedi, Simanta Gautam, and Samuel J Gershman. Deep successor reinforcement learning. arXiv preprint arXiv:1606.02396, 2016.
187
+
188
+ Guillaume Lample and Devendra Singh Chaplot. Playing FPS games with deep reinforcement learning. CoRR, abs/1609.05521, 2016.
189
+
190
+ Xiujun Li, Lihong Li, Jianfeng Gao, Xiaodong He, Jianshu Chen, Li Deng, and Ji He. Recurrent reinforcement learning: A hybrid approach. arXiv preprint arXiv:1509.03044, 2015.
191
+
192
+ Long-Ji Lin and Tom M Mitchell. Memory approaches to reinforcement learning in non-markovian domains. Technical report, Carnegie Mellon University, School of Computer Science, 1992.
193
+
194
+ Piotr Mirowski, Razvan Pascanu, Fabio Viola, Andrea Banino, Hubert Soyer, Andy Ballard, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, Dharshan Kumaran, and Raia Hadsell. Learning to navigate in complex environments. 2016.
195
+
196
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. In NIPS Deep Learning Workshop. 2013.
197
+
198
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015. URL http://dx.doi.org/10.1038/ nature14236.
199
+
200
+ Volodymyr Mnih, Adria Puigdom \` enech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim \` Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 1928–1937, 2016.
201
+
202
+ Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pp. 2863–2871, 2015.
203
+
204
+ Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. arXiv preprint arXiv:1605.09128, 2016.
205
+
206
+ H Freyja Olafsdottir, Caswell Barry, Aman B Saleem, Demis Hassabis, and Hugo J Spiers. Hippocampal place cells construct reward related sequences through unexplored space. Elife, 4: e06063, 2015.
207
+
208
+ Jing Peng and Ronald J Williams. Incremental multi-step q-learning. Machine Learning, 22(1-3): 283–290, 1996.
209
+
210
+ Daniel L Schacter, Donna Rose Addis, Demis Hassabis, Victoria C Martin, R Nathan Spreng, and Karl K Szpunar. The future of memory: remembering, imagining, and the brain. Neuron, 76(4): 677–694, 2012.
211
+
212
+ Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1312–1320, 2015a.
213
+
214
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015b.
215
+
216
+ Jurgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). ¨ IEEE Transactions on Autonomous Mental Development, 2(3):230–247, 2010.
217
+
218
+ David Silver and Kamil Ciosek. Compositional planning using optimal option models. arXiv preprint arXiv:1206.6473, 2012.
219
+
220
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
221
+
222
+ Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pp. 1057– 1063, 1999a.
223
+
224
+ Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999b.
225
+
226
+ Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011.
227
+
228
+ Chen Tessler, Shahar Givony, Tom Zahavy, Daniel J Mankowitz, and Shie Mannor. A deep hierarchical approach to lifelong learning in minecraft. arXiv preprint arXiv:1604.07255, 2016.
229
+
230
+ Z. Wang, N. de Freitas, and M. Lanctot. Dueling Network Architectures for Deep Reinforcement Learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016.
231
+
232
+ Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989.
233
+
234
+ Christopher Xie, Sachin Patil, Teodor Mihai Moldovan, Sergey Levine, and Pieter Abbeel. Modelbased reinforcement learning with parametrized physical models and optimism-driven exploration. CoRR, abs/1509.06824, 2015.
235
+
236
+ Tom Zahavy, Nir Ben Zrihem, and Shie Mannor. Graying the black box: Understanding dqns. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
237
+
238
+ ![](images/39195cf9194c529ae26862da0a7a539cab4fab714a907851d7ccd374c9c7dc93.jpg)
239
+ Figure 6: Learning curves for three example Atari games. Semi-transparent lines are agents with different seeds and hyperparameters, the bold line is a mean over population and dotted line is the best agent (in terms of final performance).
240
+
241
+ # B IMPLEMENTATION DETAILS
242
+
243
+ The input to the agent at each timestep was an $8 4 \times 8 4$ RGB image. All agents processed the input with the convolutional neural network (CNN) originally used for Atari by Mnih et al. (2013). The network consists of two convolutional layers. The first one has $1 6 8 \times 8$ filters applied with stride 4, while the second one has $3 2 4 \times 4$ filters with stride 2. This is followed by a fully connected layer with 256 units. All three layers are followed by a ReLU non-linearity. All agents used an LSTM with forget gates (Gers et al., 2000) with 256 cells which take in the CNN-encoded observation concatenated with the previous action taken and current reward. The policy and value function are linear projections of the LSTM output. The agent is trained with 20-step unrolls. The action space of the agent in the environment is game dependent for Atari (between 3 and 18 discrete actions), and 17 discrete actions for Labyrinth. Labyrinth runs at 60 frames-per-second. We use an action repeat of four, meaning that each action is repeated four times, with the agent receiving the final fourth frame as input to the next processing step.
244
+
245
+ For the pixel control auxiliary tasks we trained policies to control the central $8 0 \times 8 0$ crop of the inputs. The cropped region was subdivided into a $2 0 \times 2 0$ grid of non-overlapping $4 \times 4$ cells. The instantaneous reward in each cell was defined as the average absolute difference from the previous frame, where the average is taken over both pixels and channels in the cell. The output tensor of auxiliary values, $Q ^ { \mathrm { a u x } }$ , is produced from the LSTM outputs by a deconvolutional network. The LSTM outputs are first mapped to a $3 2 \times 7 \times 7$ spatial feature map with a linear layer followed by a ReLU. This is followed by a doconvolutional layer of $3 2 3 \times 3$ filters and a ReLU, resulting in a $3 2 \times 9 \times 9$ feature map. Deconvolution layers with 1 and $N _ { \mathrm { a c t } }$ filters of size $4 \times 4$ and stride 2 map the $3 2 \times 9 \times 9$ into a value tensor and an advantage tensor respectively. The spatial map is then decoded into Q-values using the dueling parametrization (Wang et al., 2016) producing the $N _ { \mathrm { a c t } } \times 2 0 \times 2 0$ output $Q ^ { \mathrm { a u x } }$ . There is a final ReLU nonlinearity on the $Q ^ { \mathrm { a u x } }$ output.
246
+
247
+ The architecture for feature control was similar. We learned to control the second hidden layer, which is a spatial feature map with size $3 2 \times 9 \times 9$ . Similarly to pixel control, we exploit the spatial structure in the data and used a deconvolutional network to produce $Q ^ { \mathrm { a u x } }$ from the LSTM outputs.
248
+
249
+ The reward prediction task is performed on a sequence of three observations, which are fed through three instances of the agent’s CNN. The three encoded CNN outputs are concatenated and fed through a fully connected layer of 128 units with ReLU activations, followed by a final linear threeclass classifier and softmax. The reward is predicted as one of three classes: positive, negative, or zero and trained with a task weight $\lambda _ { \mathrm { R P } } = 1$ . The value function replay is performed on a sequence of length 20 with a task weight $\lambda _ { \mathrm { V R } } = 1$ .
250
+
251
+ The auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent, once the replay buffer has filled with agent experience. The replay buffer stores the most recent 2k observations, actions, and rewards taken by the base agent.
252
+
253
+ The agents are optimised over 32 asynchronous threads with shared RMSprop (Mnih et al., 2016). The learning rates are sampled from a log-uniform distribution between 0.0001 and 0.005. The entropy costs are sampled from the log-uniform distribution between 0.0005 and 0.01. Task weight $\lambda _ { \mathrm { P C } }$ is sampled from log-uniform distribution between 0.01 and 0.1 for Labyrinth and 0.0001 and 0.01 for Atari (since Atari games are not homogeneous in terms of pixel intensities changes, thus we need to fit this normalization factor).
254
+
255
+ # C RANDOMNESS ROBUSTNESS
256
+
257
+ Each agent was trained with 45 randomly sampled values of hyperparameters. Each of them also starts with a different random seed (however, due to asynchronous nature of A3C this does not determinise the learning procedure).
258
+
259
+ Previous sections showed that the UNREAL agent is more robust to the choice of hyperparameters than A3C. To present an even clearer picture of this effect, we show learning curves averaged over all hyperparamters/seeds used in the experiments in Figure 7. It is worth noting, that standard error for such curves is not increased despite adding our auxiliary tasks.
260
+
261
+ ![](images/b19703264cc1e05ee8b692b916f91e90ee4fc8e8188a972b403499c6f563a7d0.jpg)
262
+ Figure 7: Learning curves averaged across all hyperparameters (left), and the same curves for three types of agent plotted with standard error (right).
263
+
264
+ We also include scatter plots of averaged final human normalised performance with respect to the two main hyperparameters (learning rate and entropy cost) in Figure 8. The final performance across all levels varies rather smoothly across similar hyperparameters, showing that learning is not significantly affected by random seeds. The only significant inconsistency, which can be spotted around $( - 3 , - 3 )$ point in UNREAL plot is an effect of the third hyperparamer - $\lambda _ { \mathrm { P C } }$ , which differs a lot between these runs.
265
+
266
+ ![](images/92506848462b33e63ba73227fb4b773a11e30f2bdbf8d3d54d8fe4f97ec8546e.jpg)
267
+ Figure 8: Human normalised performance for each hyperparameter setting with respect to the main hyperparameters of A3C - learning rate and entropy cost.
268
+
269
+ # D RAW ATARI SCORES
270
+
271
+ Table 1: Raw scores of the best UNREAL agent (selected according to the learning curve) for all Atari games considered. Scores are averaged over 200 runs with random starts. Normalised score of $s$ is $( s - s _ { \mathrm { r a n d o m } } ) / ( s _ { \mathrm { h u m a n } } - s _ { \mathrm { r a n d o m } } )$ .
272
+
273
+ <table><tr><td rowspan="2"></td><td rowspan="2">Random Raw</td><td colspan="2">UNREAL (random starts)</td><td rowspan="2">Human Raw</td></tr><tr><td>Raw</td><td>Normalised</td></tr><tr><td>alien</td><td>228</td><td>2087</td><td>30%</td><td>6371</td></tr><tr><td>amidar</td><td>6</td><td>4463</td><td>290%</td><td>1540</td></tr><tr><td>assault</td><td>222</td><td>16853</td><td>4091%</td><td>629</td></tr><tr><td>asterix</td><td>210</td><td>154818</td><td>2110%</td><td>7536</td></tr><tr><td>asteroids</td><td>719</td><td>248289</td><td>692%</td><td>36517</td></tr><tr><td>atlantis</td><td>12850</td><td>990904</td><td>7126%</td><td>26575</td></tr><tr><td>bank_heist</td><td>14</td><td>1353</td><td>212%</td><td>644</td></tr><tr><td>battle_zone</td><td>2360</td><td>147700</td><td>474%</td><td>33030</td></tr><tr><td>beam_rider</td><td>364</td><td>39250</td><td>266%</td><td>14961</td></tr><tr><td>berzerk</td><td>124</td><td>41489</td><td>1957%</td><td>2238</td></tr><tr><td>bowling</td><td>23</td><td>58</td><td>29%</td><td>146</td></tr><tr><td>boxing</td><td>0</td><td>94</td><td>980%</td><td>10</td></tr><tr><td>breakout</td><td>2</td><td>751</td><td>2861%</td><td>28</td></tr><tr><td>centipede</td><td>2091</td><td>4612</td><td>31%</td><td>10322</td></tr><tr><td>chopper_command</td><td>811</td><td>75028</td><td>914%</td><td>8930</td></tr><tr><td>crazy_climber</td><td>10780</td><td>129674</td><td>543%</td><td>32667</td></tr><tr><td>defender</td><td>2874</td><td>417812</td><td>3633%</td><td>14296</td></tr><tr><td>demon_attack</td><td>152</td><td>106937</td><td>3245%</td><td>3443</td></tr><tr><td>double_dunk</td><td>-19</td><td>21</td><td>943%</td><td>-14</td></tr><tr><td>enduro</td><td>0</td><td>0</td><td>0%</td><td>740</td></tr><tr><td>fishing_derby</td><td>-92 0</td><td>42</td><td>138%</td><td>5</td></tr><tr><td>freeway</td><td>65</td><td>34</td><td>133%</td><td>26</td></tr><tr><td>frostbite</td><td></td><td>3795</td><td>90%</td><td>4203</td></tr><tr><td>gopher</td><td>258</td><td>54007</td><td>2618%</td><td>2311</td></tr><tr><td>gravitar</td><td>173</td><td>6310</td><td>209%</td><td>3116</td></tr><tr><td>hero</td><td>1027</td><td>37291</td><td>146%</td><td>25839</td></tr><tr><td>ice_hockey</td><td>-11</td><td>16</td><td>233%</td><td>0</td></tr><tr><td>jamesbond</td><td>29</td><td>69872</td><td>20572%</td><td>368</td></tr><tr><td>kangaroo</td><td>52</td><td>14838</td><td>550%</td><td>2739</td></tr><tr><td>krull</td><td>1598</td><td>10587</td><td>1759%</td><td>2109</td></tr><tr><td>kung_fu_master</td><td>258</td><td>76676</td><td>372%</td><td>20787</td></tr><tr><td>montezuma_revenge</td><td>0</td><td>2902</td><td>69%</td><td>4182</td></tr><tr><td>ms_pacman</td><td>307 2292</td><td>5423</td><td>34%</td><td>15375</td></tr><tr><td>name_this-game</td><td></td><td>12602</td><td>229%</td><td>6796</td></tr><tr><td>phoenix</td><td>761 -229</td><td>404280</td><td>6811%</td><td>6686</td></tr><tr><td>pitfall</td><td>-21</td><td>0</td><td>4%</td><td>5999</td></tr><tr><td>pong</td><td>25</td><td>8</td><td>79%</td><td>16</td></tr><tr><td>private_eye</td><td>164</td><td>546</td><td>1%</td><td>64169</td></tr><tr><td>qbert riverraid</td><td>1338</td><td>26437</td><td>220%</td><td>12085</td></tr><tr><td></td><td>12</td><td>19077</td><td>136%</td><td>14382</td></tr><tr><td>road_runner</td><td></td><td>52596</td><td>766%</td><td>6878</td></tr><tr><td>robotank</td><td>2</td><td>79</td><td>1136%</td><td>9</td></tr><tr><td>seaquest</td><td>68</td><td>5305</td><td>13%</td><td>40426</td></tr><tr><td>skiing</td><td>-17098</td><td>-8988</td><td>60%</td><td>-3687</td></tr><tr><td>solaris</td><td>1236</td><td>2895</td><td>17%</td><td>11033</td></tr><tr><td>space_invaders</td><td>148</td><td>25851</td><td>1952%</td><td>1465</td></tr><tr><td>star_gunner</td><td>664</td><td>72864</td><td>815%</td><td>9528</td></tr><tr><td>surround</td><td>-10</td><td>10</td><td>128%</td><td>5</td></tr><tr><td>tennis</td><td>-24</td><td>-0</td><td>136%</td><td>-7</td></tr><tr><td>time_pilot</td><td>3568</td><td>89559</td><td>4130%</td><td>5650</td></tr><tr><td>tutankham</td><td>11</td><td>294</td><td>222%</td><td>138</td></tr><tr><td>up_n_down</td><td>533</td><td>339119</td><td>3616%</td><td>9896</td></tr><tr><td>venture</td><td>0</td><td>0</td><td>0%</td><td>1039</td></tr><tr><td>video_pinball</td><td>0</td><td>518567</td><td>3315%</td><td>15641</td></tr><tr><td>wizard_of_wor</td><td>564</td><td>35344</td><td>871%</td><td>4556</td></tr><tr><td>yars_revenge</td><td>3093</td><td>42889</td><td>90%</td><td>47135</td></tr><tr><td>zaxxon</td><td>32</td><td>60044</td><td>714%</td><td>8443</td></tr><tr><td>Mean Median</td><td>■</td><td>= =</td><td>1453% 331%</td><td>■ ■</td></tr></table>
274
+
275
+ #
276
+
277
+ ![](images/5870747e077392dbb2898d5e4ab9f2d540e2beaf09711b1026124bbc6daa8d78.jpg)
278
+ Figure 9: Top-down renderings of each Labyrinth level. The nav $\mathrm { . m a z e * . 0 \{ 1 , 2 , 3 \} }$ levels show one example maze layout. In the all random case, a new maze was randomly generated at the start of each episode.
279
+
280
+ ![](images/4bc0fc184fd7539e5d4337ccbbfa868b0141ecebc45d1bd8a40fa142b4363f3e.jpg)
281
+ Figure 10: Example images from the agent’s egocentric viewpoint for each Labyrinth level.
parse/train/SJ6yPD5xg/SJ6yPD5xg_content_list.json ADDED
@@ -0,0 +1,1578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "REINFORCEMENT LEARNING WITH UNSUPERVISED AUXILIARY TASKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 823,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Max Jaderberg∗, Volodymyr Mnih\\*, Wojciech Marian Czarnecki\\* \nTom Schaul, Joel Z Leibo, David Silver & Koray Kavukcuoglu \nDeepMind \nLondon, UK \n{jaderberg,vmnih,lejlot,schaul,jzl,davidsilver, ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 642,
21
+ 241
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": "Deep reinforcement learning agents have achieved state-of-the-art results by directly maximising cumulative reward. However, environments contain a much wider variety of possible training signals. In this paper, we introduce an agent that also learns separate policies for maximising many other pseudo-reward functions simultaneously by reinforcement learning. All of these tasks share a common representation that, like unsupervised learning, continues to develop in the absence of extrinsic rewards. We also introduce a novel mechanism for focusing this representation upon extrinsic rewards, so that learning can rapidly adapt to the most relevant aspects of the actual task. Our agent significantly outperforms the previous state-of-the-art on Atari, averaging $880 \\%$ expert human performance, and a challenging suite of first-person, three-dimensional Labyrinth tasks leading to a mean speedup in learning of $1 0 \\times$ and averaging $87 \\%$ expert human performance on Labyrinth. ",
40
+ "bbox": [
41
+ 233,
42
+ 306,
43
+ 764,
44
+ 487
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Natural and artificial agents live in a stream of sensorimotor data. At each time step $t$ , the agent receives observations $o _ { t }$ and executes actions $a _ { t }$ . These actions influence the future course of the sensorimotor stream. In this paper we develop agents that learn to predict and control this stream, by solving a host of reinforcement learning problems, each focusing on a distinct feature of the sensorimotor stream. Our hypothesis is that an agent that can flexibly control its future experiences will also be able to achieve any goal with which it is presented, such as maximising its future rewards. ",
51
+ "bbox": [
52
+ 173,
53
+ 506,
54
+ 825,
55
+ 602
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "The classic reinforcement learning paradigm focuses on the maximisation of extrinsic reward. However, in many interesting domains, extrinsic rewards are only rarely observed. This raises questions of what and how to learn in their absence. Even if extrinsic rewards are frequent, the sensorimotor stream contains an abundance of other possible learning targets. Traditionally, unsupervised learning attempts to reconstruct these targets, such as the pixels in the current or subsequent frame. It is typically used to accelerate the acquisition of a useful representation. In contrast, our learning objective is to predict and control features of the sensorimotor stream, by treating them as pseudorewards for reinforcement learning. Intuitively, this set of tasks is more closely matched with the agent’s long-term goals, potentially leading to more useful representations. ",
62
+ "bbox": [
63
+ 174,
64
+ 609,
65
+ 825,
66
+ 734
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Consider a baby that learns to maximise the cumulative amount of red that it observes. To correctly predict the optimal value, the baby must understand how to increase “redness” by various means, including manipulation (bringing a red object closer to the eyes); locomotion (moving in front of a red object); and communication (crying until the parents bring a red object). These behaviours are likely to recur for many other goals that the baby may subsequently encounter. No understanding of these behaviours is required to simply reconstruct the redness of current or subsequent images. ",
73
+ "bbox": [
74
+ 174,
75
+ 742,
76
+ 825,
77
+ 825
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "Our architecture uses reinforcement learning to approximate both the optimal policy and optimal value function for many different pseudo-rewards. It also makes other auxiliary predictions that serve to focus the agent on important aspects of the task. These include the long-term goal of predicting cumulative extrinsic reward as well as short-term predictions of extrinsic reward. To learn more efficiently, our agents use an experience replay mechanism to provide additional updates to the critics. Just as animals dream about positively or negatively rewarding events more frequently (Olafsdottir et al., 2015; Schacter et al., 2012), our agents preferentially replay sequences containing rewarding events. ",
84
+ "bbox": [
85
+ 174,
86
+ 832,
87
+ 823,
88
+ 902
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "image",
94
+ "img_path": "images/aead18b15b5dd08676ae009c1257cf16f4773194f523ae7b41eb184dddd87214.jpg",
95
+ "image_caption": [
96
+ "Figure 1: Overview of the UNREAL agent. (a) The base agent is a CNN-LSTM agent trained on-policy with the A3C loss (Mnih et al., 2016). Observations, rewards, and actions are stored in a small replay buffer which encapsulates a short history of agent experience. This experience is used by auxiliary learning tasks. (b) Pixel Control – auxiliary policies $Q ^ { \\mathrm { a u x } }$ are trained to maximise change in pixel intensity of different regions of the input. The agent CNN and LSTM are used for this task along with an auxiliary deconvolution network. This auxiliary control task requires the agent to learn how to control the environment. (c) Reward Prediction – given three recent frames, the network must predict the reward that will be obtained in the next unobserved timestep. This task network uses instances of the agent CNN, and is trained on reward biased sequences to remove the perceptual sparsity of rewards. (d) Value Function Replay – further training of the value function using the agent network is performed to promote faster value iteration. Further visualisation of the agent can be found in https://youtu.be/Uz-zGYrYEjA "
97
+ ],
98
+ "image_footnote": [],
99
+ "bbox": [
100
+ 171,
101
+ 59,
102
+ 808,
103
+ 352
104
+ ],
105
+ "page_idx": 1
106
+ },
107
+ {
108
+ "type": "text",
109
+ "text": "",
110
+ "bbox": [
111
+ 178,
112
+ 526,
113
+ 820,
114
+ 569
115
+ ],
116
+ "page_idx": 1
117
+ },
118
+ {
119
+ "type": "text",
120
+ "text": "Importantly, both the auxiliary control and auxiliary prediction tasks share the convolutional neural network and LSTM that the base agent uses to act. By using this jointly learned representation, the base agent learns to optimise extrinsic reward much faster and, in many cases, achieves better policies at the end of training. ",
121
+ "bbox": [
122
+ 174,
123
+ 575,
124
+ 825,
125
+ 632
126
+ ],
127
+ "page_idx": 1
128
+ },
129
+ {
130
+ "type": "text",
131
+ "text": "This paper brings together the state-of-the-art Asynchronous Advantage Actor-Critic (A3C) framework (Mnih et al., 2016), outlined in Section 2, with auxiliary control tasks and auxiliary reward tasks, defined in sections Section 3.1 and Section 3.2 respectively. These auxiliary tasks do not require any extra supervision or signals from the environment than the vanilla A3C agent. The result is our UNsupervised REinforcement and Auxiliary Learning (UNREAL) agent (Section 3.4) ",
132
+ "bbox": [
133
+ 174,
134
+ 638,
135
+ 823,
136
+ 708
137
+ ],
138
+ "page_idx": 1
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "In Section 4 we apply our UNREAL agent to a challenging set of 3D-vision based domains known as the Labyrinth (Mnih et al., 2016), learning solely from the raw RGB pixels of a first-person view. Our agent significantly outperforms the baseline agent using vanilla A3C, even when the baseline was augmented with an unsupervised reconstruction loss, in terms of speed of learning, robustness to hyperparameters, and final performance. The result is an agent which on average achieves $87 \\%$ of expert human-normalised score, compared to $54 \\%$ with A3C, and on average $1 0 \\times$ faster than A3C. Our UNREAL agent also significantly outperforms the previous state-of-the-art in the Atari domain. ",
143
+ "bbox": [
144
+ 174,
145
+ 715,
146
+ 825,
147
+ 813
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "1 RELATED WORK ",
154
+ "text_level": 1,
155
+ "bbox": [
156
+ 176,
157
+ 835,
158
+ 344,
159
+ 851
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "A variety of reinforcement learning architectures have focused on learning temporal abstractions, such as options (Sutton et al., 1999b), with policies that may maximise pseudo-rewards (Konidaris & Barreto, 2009; Silver & Ciosek, 2012). The emphasis here has typically been on the development of temporal abstractions that facilitate high-level learning and planning. In contrast, our agents do not make any direct use of the pseudo-reward maximising policies that they learn (although this is an interesting direction for future research). Instead, they are used solely as auxiliary objectives for developing a more effective representation. ",
166
+ "bbox": [
167
+ 176,
168
+ 867,
169
+ 823,
170
+ 924
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "",
177
+ "bbox": [
178
+ 176,
179
+ 103,
180
+ 823,
181
+ 146
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "The Horde architecture (Sutton et al., 2011) also applied reinforcement learning to identify value functions for a multitude of distinct pseudo-rewards. However, this architecture was not used for representation learning; instead each value function was trained separately using distinct weights. ",
188
+ "bbox": [
189
+ 176,
190
+ 152,
191
+ 823,
192
+ 195
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "The UVFA architecture (Schaul et al., 2015a) is a factored representation of a continuous set of optimal value functions, combining features of the state with an embedding of the pseudo-reward function. Initial work on UVFAs focused primarily on architectural choices and learning rules for these continuous embeddings. A pre-trained UVFA representation was successfully transferred to novel pseudo-rewards in a simple task. ",
199
+ "bbox": [
200
+ 174,
201
+ 200,
202
+ 825,
203
+ 271
204
+ ],
205
+ "page_idx": 2
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "Similarly, the successor representation (Dayan, 1993; Barreto et al., 2016; Kulkarni et al., 2016) factors a continuous set of expected value functions for a fixed policy, by combining an expectation over features of the state with an embedding of the pseudo-reward function. Successor representations have been used to transfer representations from one pseudo-reward to another (Barreto et al., 2016) or to different scales of reward (Kulkarni et al., 2016). ",
210
+ "bbox": [
211
+ 174,
212
+ 279,
213
+ 825,
214
+ 348
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "Another, related line of work involves learning models of the environment (Schmidhuber, 2010; Xie et al., 2015; Oh et al., 2015). Although learning environment models as auxiliary tasks could improve RL agents (e.g. Lin & Mitchell (1992); Li et al. (2015)), this has not yet been shown to work in rich visual environments. ",
221
+ "bbox": [
222
+ 174,
223
+ 354,
224
+ 823,
225
+ 411
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "More recently, auxiliary predictions tasks have been studied in 3D reinforcement learning environments. Lample & Chaplot (2016) showed that predicting internal features of the emulator, such as the presence of an enemy on the screen, is beneficial. Mirowski et al. (2016) study auxiliary prediction of depth in the context of navigation. ",
232
+ "bbox": [
233
+ 174,
234
+ 417,
235
+ 825,
236
+ 474
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "2 BACKGROUND ",
243
+ "text_level": 1,
244
+ "bbox": [
245
+ 174,
246
+ 498,
247
+ 326,
248
+ 513
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "We assume the standard reinforcement learning setting where an agent interacts with an environment over a number of discrete time steps. At time $t$ the agent receives an observation $o _ { t }$ along with a reward $r _ { t }$ and produces an action $a _ { t }$ . The agent’s state $s _ { t }$ is a function of its experience up until t sum of rewards, time , $s _ { t } = f ( o _ { 1 } , r _ { 1 } , a _ { 1 } , . . . , o _ { t } , r _ { t } ) ,$ $\\begin{array} { r } { R _ { t : t + n } = \\sum _ { i = 1 } ^ { n } \\gamma ^ { i - 1 } r _ { t + i } } \\end{array}$ . The $n$ -step return t:t+n . The value function is the expected return from state $R _ { t : t + n }$ at time is defined as the discounted $s$ , $V ^ { \\pi } ( s ) = \\mathbb { E } \\left[ R _ { t : \\infty } | s _ { t } = s , \\overline { { \\pi } } \\right]$ , when actions are selected accorded to a policy $\\pi ( a | s )$ . The actionvalue function $Q ^ { \\pi } ( s , a ) = \\mathbb { E } \\left[ \\bar { R } _ { t : \\infty } | s _ { t } = s , a _ { t } = a , \\pi \\right]$ is the expected return following action $a$ from state $s$ . ",
255
+ "bbox": [
256
+ 173,
257
+ 518,
258
+ 825,
259
+ 631
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "Value-based reinforcement learning algorithms, such as Q-learning (Watkins, 1989), or its deep learning instantiations DQN (Mnih et al., 2015) and asynchronous Q-learning (Mnih et al., 2016), approximate the action-value function $Q ( s , a ; \\theta )$ using parameters $\\theta$ , and then update parameters to minimise the mean-squared error, for example by optimising an $n$ -step lookahead loss (Peng & Williams, 1996), $\\begin{array} { r } { \\dot { \\mathcal { L } _ { Q } } = \\mathbb { E } \\left[ \\left( R _ { t : t + n } + \\gamma ^ { n } \\operatorname* { m a x } _ { a ^ { \\prime } } Q ( s ^ { \\prime } , a ^ { \\prime } ; \\theta ^ { - } ) - Q ( s , a ; \\theta ) \\right) ^ { 2 } \\right] } \\end{array}$ ; where $\\theta ^ { - }$ are previous parameters and the optimisation is with respect to $\\theta$ . ",
266
+ "bbox": [
267
+ 173,
268
+ 637,
269
+ 825,
270
+ 731
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "Policy gradient algorithms adjust the policy to maximise the expected reward, $\\mathbb { E } _ { s \\sim \\pi } \\left[ R _ { 1 : \\infty } \\right]$ , using the gradient $\\begin{array} { r } { \\frac { \\partial \\mathbb { E } _ { s \\sim \\pi } \\left[ R _ { 1 : \\infty } \\right] } { \\partial \\theta } = \\mathbb { E } \\left[ \\frac { \\partial } { \\partial \\theta } \\log \\pi ( \\boldsymbol { a } | s ) ( Q ^ { \\pi } ( \\underline { { s } } , \\boldsymbol { a } ) - V ^ { \\pi } ( s ) ) \\right] } \\end{array}$ ∼ ∞(Watkins, 1989; Sutton et al., 1999a); in practice the true value functions $Q ^ { \\pi }$ and $V ^ { \\pi }$ are substituted with approximations. The Asynchronous Advantage Actor-Critic (A3C) algorithm (Mnih et al., 2016) constructs an approximation to both the policy $\\pi ( a | s , \\theta )$ and the value function $V ( s , \\theta )$ using parameters $\\theta$ . Both policy and value are adjusted towards an $n$ -step lookahead value, $R _ { t : t + n } + \\gamma ^ { n } V ( s _ { t + n + 1 } , \\theta )$ , using an entropy regularisation penalty, ${ \\mathcal L } _ { \\mathrm { A 3 C } } \\approx { \\mathcal L } _ { \\mathrm { V R } } + { \\mathcal L } _ { \\pi } - { \\mathbb E } _ { s \\sim \\pi } [ \\alpha H ( \\pi ( s , \\cdot , \\theta ) ]$ , where $\\mathcal { L } _ { \\mathrm { V R } } ~ =$ $\\mathbb { E } _ { s \\sim \\pi } \\left[ ( \\stackrel { \\sim } { R } _ { t : t + n } + \\gamma ^ { n } V ( s _ { t + n + 1 } , \\stackrel { \\sim } { \\theta ^ { - } } ) - V ( s _ { t } , \\theta ) ) ^ { 2 } \\right]$ . ",
277
+ "bbox": [
278
+ 173,
279
+ 736,
280
+ 825,
281
+ 863
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "In A3C many instances of the agent interact in parallel with many instances of the environment, which both accelerates and stabilises learning. The A3C agent architecture we build on uses an LSTM to jointly approximate both policy $\\pi$ and value function $V$ , given the entire history of experience as inputs (see Figure 1 (a)). ",
288
+ "bbox": [
289
+ 174,
290
+ 867,
291
+ 823,
292
+ 924
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "3 AUXILIARY TASKS FOR REINFORCEMENT LEARNING ",
299
+ "text_level": 1,
300
+ "bbox": [
301
+ 174,
302
+ 102,
303
+ 647,
304
+ 118
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "In this section we incorporate auxiliary tasks into the reinforcement learning framework in order to promote faster training, more robust learning, and ultimately higher performance for our agents. Section 3.1 introduces the use of auxiliary control tasks, Section 3.2 describes the addition of reward focussed auxiliary tasks, and Section 3.4 describes the complete UNREAL agent combining these auxiliary tasks. ",
311
+ "bbox": [
312
+ 174,
313
+ 132,
314
+ 825,
315
+ 203
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "3.1 AUXILIARY CONTROL TASKS ",
322
+ "text_level": 1,
323
+ "bbox": [
324
+ 176,
325
+ 218,
326
+ 418,
327
+ 233
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "The auxiliary control tasks we consider are defined as additional pseudo-reward functions in the environment the agent is interacting with. We formally define an auxiliary control task $c$ by a reward function $r ^ { ( c ) } : \\mathcal { S } \\times \\mathcal { A } \\mathbb { R }$ , where $s$ is the space of possible states and $\\mathcal { A }$ is the space of available actions. The underlying state space $s$ includes both the history of observations and rewards as well as the state of the agent itself, i.e. the activations of the hidden units of the network. ",
334
+ "bbox": [
335
+ 174,
336
+ 244,
337
+ 825,
338
+ 316
339
+ ],
340
+ "page_idx": 3
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "Given a set of auxiliary control tasks $\\mathcal { C }$ , let $\\pi ^ { ( c ) }$ be the agent’s policy for each auxiliary task $c \\in { \\mathcal { C } }$ and let $\\pi$ be the agent’s policy on the base task. The overall objective is to maximise total performance across all these auxiliary tasks, ",
345
+ "bbox": [
346
+ 174,
347
+ 323,
348
+ 825,
349
+ 366
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "equation",
355
+ "img_path": "images/9f3299a37d63aa2136502207bbab04b805252114c415f925f8b034f403fc3f29.jpg",
356
+ "text": "$$\n\\underset { \\theta } { \\arg \\operatorname* { m a x } } \\mathbb { E } _ { \\pi } [ R _ { 1 : \\infty } ] + \\lambda _ { C } \\sum _ { c \\in \\mathcal { C } } \\mathbb { E } _ { \\pi _ { c } } [ R _ { 1 : \\infty } ^ { ( c ) } ] ,\n$$",
357
+ "text_format": "latex",
358
+ "bbox": [
359
+ 362,
360
+ 367,
361
+ 632,
362
+ 401
363
+ ],
364
+ "page_idx": 3
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "where, $\\begin{array} { r } { R _ { t : t + n } ^ { ( c ) } = \\sum _ { k = 1 } ^ { n } \\gamma ^ { k - 1 } r _ { t + k } ^ { ( c ) } } \\end{array}$ is the discounted return for auxiliary reward $r ^ { ( c ) }$ , and $\\theta$ is the set of parameters of $\\pi$ and all $\\pi ^ { ( c ) }$ ’s. By sharing some of the parameters of $\\pi$ and all $\\pi ^ { ( c ) }$ the agent must balance improving its performance with respect to the global reward $r _ { t }$ with improving performance on the auxiliary tasks. ",
369
+ "bbox": [
370
+ 174,
371
+ 404,
372
+ 825,
373
+ 467
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "In principle, any reinforcement learning method could be applied to maximise these objectives. However, to efficiently learn to maximise many different pseudo-rewards simultaneously in parallel from a single stream of experience, it is necessary to use off-policy reinforcement learning. We focus on value-based RL methods that approximate the optimal action-values by Qlearning. Specifically, for each control task $c$ we optimise an $n$ -step Q-learning loss $\\mathcal { L } _ { Q } ^ { ( c ) } \\ =$ $\\begin{array} { r } { \\mathbb { E } \\left[ \\left( R _ { t : t + n } + \\gamma ^ { n } \\operatorname* { m a x } _ { a ^ { \\prime } } Q ^ { ( c ) } ( s ^ { \\prime } , a ^ { \\prime } , \\theta ^ { - } ) - Q ^ { ( c ) } ( s , a , \\theta ) \\right) ^ { 2 } \\right] } \\end{array}$ , as described in Mnih et al. (2016). ",
380
+ "bbox": [
381
+ 173,
382
+ 473,
383
+ 825,
384
+ 574
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "While many types of auxiliary reward functions can be defined from these quantities we focus on two specific types: ",
391
+ "bbox": [
392
+ 173,
393
+ 578,
394
+ 823,
395
+ 608
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "• Pixel changes - Changes in the perceptual stream often correspond to important events in an environment. We train agents that learn a separate policy for maximally changing the pixels in each cell of an $n \\times n$ non-overlapping grid placed over the input image. We refer to these auxiliary tasks as pixel control. See Section 4 for a complete description. • Network features - Since the policy or value networks of an agent learn to extract taskrelevant high-level features of the environment (Mnih et al., 2015; Zahavy et al., 2016; Silver et al., 2016) they can be useful quantities for the agent to learn to control. Hence, the activation of any hidden unit of the agent’s neural network can itself be an auxiliary reward. We train agents that learn a separate policy for maximally activating each of the units in a specific hidden layer. We refer to these tasks as feature control. ",
402
+ "bbox": [
403
+ 215,
404
+ 617,
405
+ 825,
406
+ 760
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "The Figure 1 (b) shows an A3C agent architecture augmented with a set of auxiliary pixel control tasks. In this case, the base policy $\\pi$ shares both the convolutional visual stream and the LSTM with the auxiliary policies. The output of the auxiliary network head is an $N _ { \\mathrm { a c t } } \\times n \\times n$ tensor $Q ^ { \\mathrm { a u x } }$ where $Q ^ { \\mathrm { a u x } } ( a , i , j )$ represents the network’s current estimate of the optimal discounted expected change in cell $( i , j )$ of the input after taking action $a$ . We exploit the spatial nature of the auxiliary tasks by using a deconvolutional neural network to produce the auxiliary values $Q ^ { \\mathrm { a u x } }$ . ",
413
+ "bbox": [
414
+ 174,
415
+ 770,
416
+ 825,
417
+ 853
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "3.2 AUXILIARY REWARD TASKS ",
424
+ "text_level": 1,
425
+ "bbox": [
426
+ 176,
427
+ 869,
428
+ 411,
429
+ 883
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "In addition to learning generally about the dynamics of the environment, an agent must learn to maximise the global reward stream. To learn a policy to maximise rewards, an agent requires features that recognise states that lead to high reward and value. An agent with a good representation of rewarding states, will allow the learning of good value functions, and in turn should allow the easy learning of a policy. ",
436
+ "bbox": [
437
+ 174,
438
+ 895,
439
+ 823,
440
+ 924
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "image",
446
+ "img_path": "images/f2e602856d63f45e1956a683bbe09a0d9cc79d8a665045e4e430984e405da66f.jpg",
447
+ "image_caption": [
448
+ "Figure 2: The raw RGB frame from the environment is the observation that is given as input to the agent, along with the last action and reward. This observation is shown for a sample of a maze from the nav maze all random 02 level in Labyrinth. The agent must navigate this unseen maze and pick up apples giving $+ 1$ reward and reach the goal giving $+ 1 0$ reward, after which it will respawn. Top down views of samples from this maze generator show the variety of mazes procedurally created. A video showing the agent playing Labyrinth levels can be viewed at https://youtu.be/Uz-zGYrYEjA "
449
+ ],
450
+ "image_footnote": [],
451
+ "bbox": [
452
+ 169,
453
+ 56,
454
+ 812,
455
+ 231
456
+ ],
457
+ "page_idx": 4
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "",
462
+ "bbox": [
463
+ 174,
464
+ 332,
465
+ 825,
466
+ 375
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "However, in many interesting environments reward is encountered very sparsely, meaning that it can take a long time to train feature extractors adept at recognising states which signify the onset of reward. We want to remove the perceptual sparsity of rewards and rewarding states to aid the training of an agent, but to do so in a way which does not introduce bias to the agent’s policy. ",
473
+ "bbox": [
474
+ 174,
475
+ 381,
476
+ 825,
477
+ 438
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "To do this, we introduce the auxiliary task of reward prediction – that of predicting the onset of immediate reward given some historical context. This task consists of processing a sequence of consecutive observations, and requiring the agent to predict the reward picked up in the subsequent unseen frame. This is similar to value learning focused on immediate reward $( \\gamma = 0$ ). ",
484
+ "bbox": [
485
+ 174,
486
+ 444,
487
+ 825,
488
+ 501
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Unlike learning a value function, which is used to estimate returns and as a baseline while learning a policy, the reward predictor is not used for anything other than shaping the features of the agent. This keeps us free to bias the data distribution, therefore biasing the reward predictor and feature shaping, without biasing the value function or policy. ",
495
+ "bbox": [
496
+ 174,
497
+ 507,
498
+ 825,
499
+ 563
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "We train the reward prediction task on sequences ${ \\cal S } _ { \\tau } = ( s _ { \\tau - k } , s _ { \\tau - k + 1 } , . . . , s _ { \\tau - 1 } )$ to predict the reward $r _ { \\tau }$ , and sample $S _ { \\tau }$ from the experience of our policy $\\pi$ in a skewed manner so as to overrepresent rewarding events (presuming rewards are sparse within the environment). Specifically, we sample such that zero rewards and non-zero rewards are equally represented, i.e. the predicted probability of a non-zero reward is $P ( r _ { \\tau } \\neq 0 ) = 0 . 5$ . The reward prediction is trained to minimise a loss $\\mathcal { L } _ { \\mathrm { R P } }$ . In our experiments we use a multiclass cross-entropy classification loss across three classes (zero, positive, or negative reward), although a mean-squared error loss is also feasible. ",
506
+ "bbox": [
507
+ 174,
508
+ 569,
509
+ 825,
510
+ 667
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "The auxiliary reward predictions may use a different architecture to the agent’s main policy. Rather than simply “hanging” the auxiliary predictions off the LSTM, we use a simpler feedforward network that concatenates a stack of states $S _ { \\tau }$ after being encoded by the agent’s CNN, see Figure 1 (c). The idea is to simplify the temporal aspects of the prediction task in both the future direction (focusing only on immediate reward prediction rather than long-term returns) and past direction (focusing only on immediate predecessor states rather than the complete history); the features discovered in this manner are shared with the primary LSTM (via shared weights in the convolutional encoder) to enable the policy to be learned more efficiently. ",
517
+ "bbox": [
518
+ 174,
519
+ 674,
520
+ 825,
521
+ 786
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "3.3 EXPERIENCE REPLAY ",
528
+ "text_level": 1,
529
+ "bbox": [
530
+ 176,
531
+ 805,
532
+ 364,
533
+ 819
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "Experience replay has proven to be an effective mechanism for improving both the data efficiency and stability of deep reinforcement learning algorithms (Mnih et al., 2015). The main idea is to store transitions in a replay buffer, and then apply learning updates to sampled transitions from this buffer. ",
540
+ "bbox": [
541
+ 176,
542
+ 833,
543
+ 823,
544
+ 875
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "Experience replay provides a natural mechanism for skewing the distribution of reward prediction samples towards rewarding events: we simply split the replay buffer into rewarding and nonrewarding subsets, and replay equally from both subsets. The skewed sampling of transitions from a replay buffer means that rare rewarding states will be oversampled, and learnt from far more frequently than if we sampled sequences directly from the behaviour policy. This approach can be viewed as a simple form of prioritised replay (Schaul et al., 2015b). ",
551
+ "bbox": [
552
+ 176,
553
+ 882,
554
+ 823,
555
+ 924
556
+ ],
557
+ "page_idx": 4
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "",
562
+ "bbox": [
563
+ 174,
564
+ 103,
565
+ 823,
566
+ 146
567
+ ],
568
+ "page_idx": 5
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "In addition to reward prediction, we also use the replay buffer to perform value function replay (see Figure 1). This amounts to resampling recent historical sequences from the behaviour policy distribution and performing extra value function regression in addition to the on-policy value function regression in A3C. By resampling previous experience, and randomly varying the temporal position of the truncation window over which the n-step return is computed, value function replay performs value iteration and exploits newly discovered features shaped by reward prediction. We do not skew the distribution for this case. ",
573
+ "bbox": [
574
+ 174,
575
+ 152,
576
+ 825,
577
+ 251
578
+ ],
579
+ "page_idx": 5
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "Experience replay is also used to increase the efficiency and stability of the auxiliary control tasks. Q-learning updates are applied to sampled experiences that are drawn from the replay buffer, allowing features to be developed extremely efficiently. ",
584
+ "bbox": [
585
+ 176,
586
+ 257,
587
+ 823,
588
+ 299
589
+ ],
590
+ "page_idx": 5
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "3.4 UNREAL AGENT ",
595
+ "text_level": 1,
596
+ "bbox": [
597
+ 176,
598
+ 315,
599
+ 331,
600
+ 329
601
+ ],
602
+ "page_idx": 5
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "The UNREAL algorithm combines the benefits of two separate, state-of-the-art approaches to deep reinforcement learning. The primary policy is trained with A3C (Mnih et al., 2016): it learns from parallel streams of experience to gain efficiency and stability; it is updated online using policy gradient methods; and it uses a recurrent neural network to encode the complete history of experience. This allows the agent to learn effectively in partially observed environments. ",
607
+ "bbox": [
608
+ 174,
609
+ 342,
610
+ 823,
611
+ 411
612
+ ],
613
+ "page_idx": 5
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "The auxiliary tasks are trained on very recent sequences of experience that are stored and randomly sampled; these sequences may be prioritised (in our case according to immediate rewards) (Schaul et al., 2015b); these targets are trained off-policy by Q-learning; and they may use simpler feedforward architectures. This allows the representation to be trained with maximum efficiency. ",
618
+ "bbox": [
619
+ 174,
620
+ 417,
621
+ 823,
622
+ 474
623
+ ],
624
+ "page_idx": 5
625
+ },
626
+ {
627
+ "type": "text",
628
+ "text": "The UNREAL algorithm optimises a single combined loss function with respect to the joint parameters of the agent, $\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { P C } } = \\sum _ { c } \\mathcal { L } _ { Q } ^ { ( c ) } } \\end{array}$ , auxiliary reward prediction loss $\\theta$ , that combines the A3C loss $\\mathcal { L } _ { \\mathrm { R P } }$ $\\mathcal { L } _ { \\mathrm { A 3 C } }$ and replayed value loss together with an auxiliary control loss $\\mathcal { L } _ { \\mathrm { V R } }$ , ",
629
+ "bbox": [
630
+ 174,
631
+ 481,
632
+ 823,
633
+ 527
634
+ ],
635
+ "page_idx": 5
636
+ },
637
+ {
638
+ "type": "equation",
639
+ "img_path": "images/bccfa9943765f7cdaabbf4b328e4e42902546d9e32df82ede3b9fa4d019e79d9.jpg",
640
+ "text": "$$\n\\mathcal { L } _ { U N R E A L } ( \\theta ) = \\mathcal { L } _ { \\mathrm { A 3 C } } + \\lambda _ { \\mathrm { V R } } \\mathcal { L } _ { \\mathrm { V R } } + \\lambda _ { \\mathrm { P C } } \\sum _ { c } \\mathcal { L } _ { Q } ^ { ( c ) } + \\lambda _ { \\mathrm { R P } } \\mathcal { L } _ { \\mathrm { R P } }\n$$",
641
+ "text_format": "latex",
642
+ "bbox": [
643
+ 295,
644
+ 531,
645
+ 700,
646
+ 564
647
+ ],
648
+ "page_idx": 5
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "where $\\lambda _ { \\mathrm { V R } } , \\lambda _ { \\mathrm { P C } } , \\lambda _ { \\mathrm { R P } }$ are weighting terms on the individual loss components. ",
653
+ "bbox": [
654
+ 176,
655
+ 565,
656
+ 683,
657
+ 580
658
+ ],
659
+ "page_idx": 5
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "In practice, the loss is broken down into separate components that are computed either on-policy, directly from experience; or off-policy, on replayed transitions. Specifically, the A3C loss $\\mathcal { L } _ { \\mathrm { { A 3 C } } }$ is minimised on-policy; while the value function loss $\\mathcal { L } _ { \\mathrm { V R } }$ is optimised from replayed data, in addition to the A3C loss (of which it is one component, see Section 2). The auxiliary control loss $\\mathcal { L } _ { \\mathrm { P C } }$ is optimised off-policy from replayed data, by $n$ -step Q-learning. Finally, the reward loss $\\mathcal { L } _ { \\mathrm { R P } }$ is optimised from rebalanced replay data. ",
664
+ "bbox": [
665
+ 174,
666
+ 585,
667
+ 825,
668
+ 671
669
+ ],
670
+ "page_idx": 5
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "4 EXPERIMENTS ",
675
+ "text_level": 1,
676
+ "bbox": [
677
+ 176,
678
+ 689,
679
+ 326,
680
+ 705
681
+ ],
682
+ "page_idx": 5
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "In this section we give the results of experiments performed on the 3D environment Labyrinth in Section 4.1 and Atari in Section 4.2. ",
687
+ "bbox": [
688
+ 176,
689
+ 719,
690
+ 821,
691
+ 748
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "In all our experiments we used an A3C CNN-LSTM agent as our baseline and the UNREAL agent along with its ablated variants added auxiliary outputs and losses to this base agent. The agent is trained on-policy with 20-step returns and the auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent. The replay buffer stores the most recent $2 \\mathrm { k }$ observations, actions, and rewards taken by the base agent. In Labyrinth we use the same set of 17 discrete actions for all games and on Atari the action set is game dependent (between 3 and 18 discrete actions). The full implementation details can be found in Section B. ",
698
+ "bbox": [
699
+ 174,
700
+ 756,
701
+ 825,
702
+ 853
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "4.1 LABYRINTH RESULTS ",
709
+ "text_level": 1,
710
+ "bbox": [
711
+ 176,
712
+ 869,
713
+ 366,
714
+ 883
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Labyrinth (see Figure 2) is a first-person 3D game platform extended from OpenArena (contributors, 2005), which is itself based on Quake3 (id software, 1999). Labyrinth is comparable to other firstperson 3D game platforms for AI research like VizDoom (Kempka et al., 2016) or Minecraft (Tessler et al., 2016). However, in comparison, Labyrinth has considerably richer visuals and more realistic physics. Textures in Labyrinth are often dynamic (animated) so as to convey a game world where walls and floors shimmer and pulse, adding significant complexity to the perceptual task. The action space allows for fine-grained pointing in a fully 3D world. Labyrinth also supports continuous motion unlike the Minecraft platform of (Oh et al., 2016), which is a 3D grid world. ",
721
+ "bbox": [
722
+ 174,
723
+ 895,
724
+ 823,
725
+ 924
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "image",
731
+ "img_path": "images/6f6ad55f716b5b0dd7cb6551583a335ab7b8c6318795317705a062a21feacd06.jpg",
732
+ "image_caption": [
733
+ "Figure 3: An overview of performance averaged across all levels on Labyrinth (Top) and Atari (Bottom). In the ablated versions RP is reward prediction, VR is value function replay, and PC is pixel control, with the UNREAL agent being the combination of all. Left: The mean human-normalised performance over last 100 episodes of the top-3 jobs at every point in training. In Labyrinth, we achieve an average of $87 \\%$ humannormalised score, with every element of the agent improving upon the $54 \\%$ human-normalised score of vanilla A3C. Prior. Duel Clip and Duel Clip are Dueling Networks with gradient clipped to 10 as reported in Wang et al. (2016) Right: The final human-normalised score of every job in our hyperparameter sweep, sorted by score. On both Labyrinth and Atari, the UNREAL agent increases the robustness to the hyperparameters (namely learning rate and entropy cost). "
734
+ ],
735
+ "image_footnote": [],
736
+ "bbox": [
737
+ 173,
738
+ 56,
739
+ 805,
740
+ 395
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "",
747
+ "bbox": [
748
+ 174,
749
+ 532,
750
+ 825,
751
+ 617
752
+ ],
753
+ "page_idx": 6
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "We evaluated agent performance on 13 Labyrinth levels that tested a range of different agent abilities. A top-down visualization showing the layout of each level can be found in Figure 9 of the Appendix. A gallery of example images from the first-person perspective of the agent are in Figure 10 of the Appendix. The levels can be divided into four categories: ",
758
+ "bbox": [
759
+ 176,
760
+ 625,
761
+ 825,
762
+ 680
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "1. Simple fruit gathering levels with a static map (seekavoid arena 01 and stairway to melon 01). The goal of these levels is to collect apples (small positive reward) and melons (large positive reward) while avoiding lemons (small negative reward). 2. Navigation levels with a static map layout (nav maze static $. 0 \\{ 1 , 2 , 3 \\}$ and nav maze random goal ${ \\bf \\mathrm { - 0 \\{ 1 , 2 , 3 \\} } }$ ). These levels test the agent’s ability to find their way to a goal in a fixed maze that remains the same across episodes. The starting location is random. In this case, agents could encode the structure of the maze in network weights. In the random goal variant, the location of the goal changes in every episode. The optimal policy is to find the goal’s location at the start of each episode and then use long-term knowledge of the maze layout to return to it as quickly as possible from any location. The static variant is simpler in that the goal location is always fixed for all episodes and only the agent’s starting location changes so the optimal policy does not require the first step of exploring to find the current goal location. 3. Procedurally-generated navigation levels requiring effective exploration of a new maze generated on-the-fly at the start of each episode (nav maze all random $. 0 \\{ 1 , 2 , 3 \\} )$ ). These levels test the agent’s ability to effectively explore a totally new environment. The optimal policy would begin by exploring the maze to rapidly learn its layout and then exploit that knowledge to repeatedly return to the goal as many times as possible before the end of the episode (between 60 and 300 seconds). ",
769
+ "bbox": [
770
+ 210,
771
+ 691,
772
+ 825,
773
+ 924
774
+ ],
775
+ "page_idx": 6
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "",
780
+ "bbox": [
781
+ 232,
782
+ 103,
783
+ 823,
784
+ 145
785
+ ],
786
+ "page_idx": 7
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "4. Laser-tag levels requiring agents to wield laser-like science fiction gadgets to tag bots controlled by the game’s in-built AI (lt horse shoe color and lt hallway slope). A reward of 1 is delivered whenever the agent tags a bot by reducing its shield to 0. These levels approximate the default OpenArena/Quake3 gameplay mode. In lt hallway slope there is a sloped arena, requiring the agent to look up and down. In lt horse shoe color, the colors and textures of the bots are randomly generated at the start of each episode. This prevents agents from relying on color for bot detection. These levels test aspects of fine-control (for aiming), planning (to anticipate where bots are likely to move), strategy (to control key areas of the map such as gadget spawn points), and robustness to the substantial visual complexity arising from the large numbers of independently moving objects (gadget projectiles and bots). ",
791
+ "bbox": [
792
+ 212,
793
+ 152,
794
+ 823,
795
+ 305
796
+ ],
797
+ "page_idx": 7
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "4.1.1 RESULTS ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 174,
805
+ 324,
806
+ 292,
807
+ 338
808
+ ],
809
+ "page_idx": 7
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "We compared the full UNREAL agent to a basic A3C LSTM agent along with several ablated versions of UNREAL with different components turned off. A video of the final agent performance, as well as visualisations of the activations and auxiliary task outputs can be viewed at https://youtu.be/Uz-zGYrYEjA. ",
814
+ "bbox": [
815
+ 174,
816
+ 349,
817
+ 823,
818
+ 405
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "Figure 3 (top left) shows curves of mean human-normalised scores over the 13 Labyrinth levels. Adding each of our proposed auxiliary tasks to an A3C agent substantially improves the performance. Combining different auxiliary tasks leads to further improvements over the individual auxiliary tasks. The UNREAL agent, which combines all three auxiliary tasks, achieves more than twice the final human-normalised mean performance of A3C, increasing from $54 \\%$ to $87 \\%$ ( $45 \\%$ to $92 \\%$ for median performance). This includes a human-normalised score of $116 \\%$ on lt hallway slope and $100 \\%$ on nav maze random goal 02. ",
825
+ "bbox": [
826
+ 174,
827
+ 412,
828
+ 823,
829
+ 510
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Perhaps of equal importance, aside from final performance on the games, UNREAL is significantly faster at learning and therefore more data efficient, achieving a mean speedup of the number of steps to reach A3C best performance of $1 0 \\times$ (median $1 1 \\times$ ) across all levels and up to $1 8 \\times$ on nav maze random goal 02. This translates in a drastic improvement in the data efficiency of UNREAL over A3C, requiring less than $10 \\%$ of the data to reach the final performance of A3C. We can also measure the robustness of our learning algorithms to hyperparameters by measuring the performance over all hyperparameters (namely learning rate and entropy cost). This is shown in Figure 3 Top Right: every auxiliary task in our agent improves robustness. A breakdown of the performance of A3C, UNREAL and UNREAL without pixel control on the individual Labyrinth levels is shown in Figure 4. ",
836
+ "bbox": [
837
+ 174,
838
+ 517,
839
+ 825,
840
+ 656
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Unsupervised Reinforcement Learning In order to better understand the benefits of auxiliary control tasks we compared it to two simple baselines on three Labyrinth levels. The first baseline was A3C augmented with a pixel reconstruction loss, which has been shown to improve performance on 3D environments (Kulkarni et al., 2016). The second baseline was A3C augmented with an input change prediction loss, which can be seen as simply predicting the immediate auxiliary reward instead of learning to control. Finally, we include preliminary results for A3C augmented with the feature control auxiliary task on one of the levels. We retuned the hyperparameters of all methods (including learning rate and the weight placed on the auxiliary loss) for each of the three Labyrinth levels. Figure 5 shows the learning curves for the top 5 hyperparameter settings on three Labyrinth navigation levels. The results show that learning to control pixel changes is indeed better than simply predicting immediate pixel changes, which in turn is better than simply learning to reconstruct the input. In fact, learning to reconstruct only led to faster initial learning and actually made the final scores worse when compared to vanilla A3C. Our hypothesis is that input reconstruction hurts final performance because it puts too much focus on reconstructing irrelevant parts of the visual input instead of visual cues for rewards, which rewarding objects are rarely visible. We saw a substantial improvement from including the feature control auxiliary task, which was only slightly worse than for pixel control. Combining feature control with other auxiliary tasks is a promising future direction. ",
847
+ "bbox": [
848
+ 173,
849
+ 674,
850
+ 825,
851
+ 924
852
+ ],
853
+ "page_idx": 7
854
+ },
855
+ {
856
+ "type": "image",
857
+ "img_path": "images/0cf8e451251429aa2f3c5407f44381d81b1760354f6d60b8a9515be10349b945.jpg",
858
+ "image_caption": [
859
+ "Figure 4: A breakdown of the improvement over A3C due to our auxiliary tasks for each level on Labyrinth. The values for $_ { \\mathrm { A 3 C + R P + V R } }$ (reward prediction and value function replay) and UNREAL (reward prediction, value function replay and pixel control) are normalised by the A3C value. AUC Performance gives the robustness to hyperparameters (area under the robustness curve Figure 3 Right). Data Efficiency is area under the mean learning curve for the top-5 jobs, and Top5 Speedup is the speedup for the mean of the top-5 jobs to reach the maximum top-5 mean score set by A3C. Speedup is not defined for stairway to melon as A3C did not learn throughout training. "
860
+ ],
861
+ "image_footnote": [],
862
+ "bbox": [
863
+ 181,
864
+ 54,
865
+ 794,
866
+ 305
867
+ ],
868
+ "page_idx": 8
869
+ },
870
+ {
871
+ "type": "image",
872
+ "img_path": "images/0b7c880bcb10e1c2e61dd8c91d48b339c4be42b819d7b6e4a5dc1ff7cf0964a1.jpg",
873
+ "image_caption": [
874
+ "Figure 5: Comparison of various forms of self-supervised learning on random maze navigation. Adding an input reconstruction loss to the objective leads to faster learning compared to an A3C baseline. Predicting changes in the inputs works better than simple image reconstruction. Learning to control changes leads to the best results. "
875
+ ],
876
+ "image_footnote": [],
877
+ "bbox": [
878
+ 191,
879
+ 419,
880
+ 808,
881
+ 536
882
+ ],
883
+ "page_idx": 8
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "4.2 ATARI ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 174,
891
+ 616,
892
+ 258,
893
+ 628
894
+ ],
895
+ "page_idx": 8
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "We applied the UNREAL agent as well as UNREAL without pixel control to 57 Atari games from the Arcade Learning Environment (Bellemare et al., 2012) domain. We use the same evaluation protocol as for our Labyrinth experiments where we evaluate 50 different random hyper parameter settings (learning rate and entropy cost) on each game. The results are shown in the bottom row of Figure 3. The left side shows the average performance curves of the top 3 agents for all three methods the right half shows sorted average human-normalised scores for each hyperparameter setting. More detailed learning curves for individual levels can be found in Figure 6. We see that UNREAL surpasses the current state-of-the-art agents, i.e. A3C and Prioritized Dueling DQN (Wang et al., 2016), across all levels attaining $8 8 0 \\%$ mean and $2 5 0 \\%$ median performance. Notably, UNREAL is also substantially more robust to hyper parameter settings than A3C. ",
900
+ "bbox": [
901
+ 173,
902
+ 642,
903
+ 825,
904
+ 781
905
+ ],
906
+ "page_idx": 8
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "5 CONCLUSION ",
911
+ "text_level": 1,
912
+ "bbox": [
913
+ 176,
914
+ 806,
915
+ 318,
916
+ 821
917
+ ],
918
+ "page_idx": 8
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "We have shown how augmenting a deep reinforcement learning agent with auxiliary control and reward prediction tasks can drastically improve both data efficiency and robustness to hyperparameter settings. Most notably, our proposed UNREAL architecture more than doubled the previous stateof-the-art results on the challenging set of 3D Labyrinth levels, bringing the average scores to over $8 7 \\%$ of human scores. The same UNREAL architecture also significantly improved both the learning speed and the robustness of A3C over 57 Atari games. ",
923
+ "bbox": [
924
+ 174,
925
+ 840,
926
+ 825,
927
+ 924
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "ACKNOWLEDGEMENTS ",
934
+ "text_level": 1,
935
+ "bbox": [
936
+ 176,
937
+ 103,
938
+ 367,
939
+ 117
940
+ ],
941
+ "page_idx": 9
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "We thank Charles Beattie, Julian Schrittwieser, Marcus Wainwright, and Stig Petersen for environment design and development, and Amir Sadik and Sarah York for expert human game testing. We also thank Joseph Modayil, Andrea Banino, Hubert Soyer, Razvan Pascanu, and Raia Hadsell for many helpful discussions. ",
946
+ "bbox": [
947
+ 174,
948
+ 133,
949
+ 825,
950
+ 189
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "REFERENCES ",
957
+ "text_level": 1,
958
+ "bbox": [
959
+ 174,
960
+ 212,
961
+ 287,
962
+ 227
963
+ ],
964
+ "page_idx": 9
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Andre Barreto, R ´ emi Munos, Tom Schaul, and David Silver. Successor features for transfer in ´ reinforcement learning. arXiv preprint arXiv:1606.05312, 2016. ",
969
+ "bbox": [
970
+ 173,
971
+ 234,
972
+ 823,
973
+ 263
974
+ ],
975
+ "page_idx": 9
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012. ",
980
+ "bbox": [
981
+ 173,
982
+ 272,
983
+ 825,
984
+ 314
985
+ ],
986
+ "page_idx": 9
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "OpenArena contributors. The openarena manual. 2005. URL http://openarena.wikia. com/wiki/Manual. ",
991
+ "bbox": [
992
+ 174,
993
+ 324,
994
+ 818,
995
+ 353
996
+ ],
997
+ "page_idx": 9
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613–624, 1993. ",
1002
+ "bbox": [
1003
+ 173,
1004
+ 363,
1005
+ 821,
1006
+ 392
1007
+ ],
1008
+ "page_idx": 9
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Felix A Gers, Jurgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction¨ with lstm. Neural computation, 12(10):2451–2471, 2000. ",
1013
+ "bbox": [
1014
+ 169,
1015
+ 401,
1016
+ 825,
1017
+ 430
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "id software. Quake3. 1999. URL https://github.com/id-Software/ Quake-III-Arena. ",
1024
+ "bbox": [
1025
+ 171,
1026
+ 439,
1027
+ 823,
1028
+ 469
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. Viz- ´ doom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016. ",
1035
+ "bbox": [
1036
+ 174,
1037
+ 478,
1038
+ 823,
1039
+ 520
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "George Konidaris and Andre S Barreto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems, pp. 1015– 1023, 2009. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 530,
1049
+ 823,
1050
+ 573
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Tejas D Kulkarni, Ardavan Saeedi, Simanta Gautam, and Samuel J Gershman. Deep successor reinforcement learning. arXiv preprint arXiv:1606.02396, 2016. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 582,
1060
+ 821,
1061
+ 612
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Guillaume Lample and Devendra Singh Chaplot. Playing FPS games with deep reinforcement learning. CoRR, abs/1609.05521, 2016. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 619,
1071
+ 821,
1072
+ 650
1073
+ ],
1074
+ "page_idx": 9
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Xiujun Li, Lihong Li, Jianfeng Gao, Xiaodong He, Jianshu Chen, Li Deng, and Ji He. Recurrent reinforcement learning: A hybrid approach. arXiv preprint arXiv:1509.03044, 2015. ",
1079
+ "bbox": [
1080
+ 173,
1081
+ 659,
1082
+ 823,
1083
+ 689
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Long-Ji Lin and Tom M Mitchell. Memory approaches to reinforcement learning in non-markovian domains. Technical report, Carnegie Mellon University, School of Computer Science, 1992. ",
1090
+ "bbox": [
1091
+ 173,
1092
+ 696,
1093
+ 825,
1094
+ 727
1095
+ ],
1096
+ "page_idx": 9
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Piotr Mirowski, Razvan Pascanu, Fabio Viola, Andrea Banino, Hubert Soyer, Andy Ballard, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, Dharshan Kumaran, and Raia Hadsell. Learning to navigate in complex environments. 2016. ",
1101
+ "bbox": [
1102
+ 174,
1103
+ 734,
1104
+ 825,
1105
+ 779
1106
+ ],
1107
+ "page_idx": 9
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. In NIPS Deep Learning Workshop. 2013. ",
1112
+ "bbox": [
1113
+ 174,
1114
+ 786,
1115
+ 825,
1116
+ 830
1117
+ ],
1118
+ "page_idx": 9
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015. URL http://dx.doi.org/10.1038/ nature14236. ",
1123
+ "bbox": [
1124
+ 174,
1125
+ 839,
1126
+ 825,
1127
+ 922
1128
+ ],
1129
+ "page_idx": 9
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Volodymyr Mnih, Adria Puigdom \\` enech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim \\` Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 1928–1937, 2016. ",
1134
+ "bbox": [
1135
+ 176,
1136
+ 103,
1137
+ 825,
1138
+ 159
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pp. 2863–2871, 2015. ",
1145
+ "bbox": [
1146
+ 173,
1147
+ 170,
1148
+ 825,
1149
+ 213
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. arXiv preprint arXiv:1605.09128, 2016. ",
1156
+ "bbox": [
1157
+ 171,
1158
+ 222,
1159
+ 823,
1160
+ 252
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "H Freyja Olafsdottir, Caswell Barry, Aman B Saleem, Demis Hassabis, and Hugo J Spiers. Hippocampal place cells construct reward related sequences through unexplored space. Elife, 4: e06063, 2015. ",
1167
+ "bbox": [
1168
+ 173,
1169
+ 262,
1170
+ 825,
1171
+ 304
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Jing Peng and Ronald J Williams. Incremental multi-step q-learning. Machine Learning, 22(1-3): 283–290, 1996. ",
1178
+ "bbox": [
1179
+ 169,
1180
+ 314,
1181
+ 823,
1182
+ 344
1183
+ ],
1184
+ "page_idx": 10
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Daniel L Schacter, Donna Rose Addis, Demis Hassabis, Victoria C Martin, R Nathan Spreng, and Karl K Szpunar. The future of memory: remembering, imagining, and the brain. Neuron, 76(4): 677–694, 2012. ",
1189
+ "bbox": [
1190
+ 173,
1191
+ 353,
1192
+ 823,
1193
+ 397
1194
+ ],
1195
+ "page_idx": 10
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1312–1320, 2015a. ",
1200
+ "bbox": [
1201
+ 174,
1202
+ 406,
1203
+ 825,
1204
+ 449
1205
+ ],
1206
+ "page_idx": 10
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015b. ",
1211
+ "bbox": [
1212
+ 174,
1213
+ 459,
1214
+ 823,
1215
+ 489
1216
+ ],
1217
+ "page_idx": 10
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Jurgen Schmidhuber. Formal theory of creativity, fun, and intrinsic motivation (1990–2010). ¨ IEEE Transactions on Autonomous Mental Development, 2(3):230–247, 2010. ",
1222
+ "bbox": [
1223
+ 173,
1224
+ 500,
1225
+ 825,
1226
+ 529
1227
+ ],
1228
+ "page_idx": 10
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "David Silver and Kamil Ciosek. Compositional planning using optimal option models. arXiv preprint arXiv:1206.6473, 2012. ",
1233
+ "bbox": [
1234
+ 174,
1235
+ 537,
1236
+ 823,
1237
+ 568
1238
+ ],
1239
+ "page_idx": 10
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. ",
1244
+ "bbox": [
1245
+ 176,
1246
+ 577,
1247
+ 823,
1248
+ 621
1249
+ ],
1250
+ "page_idx": 10
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Richard S Sutton, David A McAllester, Satinder P Singh, Yishay Mansour, et al. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, pp. 1057– 1063, 1999a. ",
1255
+ "bbox": [
1256
+ 173,
1257
+ 630,
1258
+ 823,
1259
+ 672
1260
+ ],
1261
+ "page_idx": 10
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999b. ",
1266
+ "bbox": [
1267
+ 173,
1268
+ 683,
1269
+ 820,
1270
+ 712
1271
+ ],
1272
+ "page_idx": 10
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011. ",
1277
+ "bbox": [
1278
+ 173,
1279
+ 722,
1280
+ 825,
1281
+ 792
1282
+ ],
1283
+ "page_idx": 10
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Chen Tessler, Shahar Givony, Tom Zahavy, Daniel J Mankowitz, and Shie Mannor. A deep hierarchical approach to lifelong learning in minecraft. arXiv preprint arXiv:1604.07255, 2016. ",
1288
+ "bbox": [
1289
+ 171,
1290
+ 803,
1291
+ 821,
1292
+ 833
1293
+ ],
1294
+ "page_idx": 10
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Z. Wang, N. de Freitas, and M. Lanctot. Dueling Network Architectures for Deep Reinforcement Learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. ",
1299
+ "bbox": [
1300
+ 176,
1301
+ 842,
1302
+ 825,
1303
+ 885
1304
+ ],
1305
+ "page_idx": 10
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Christopher John Cornish Hellaby Watkins. Learning from delayed rewards. PhD thesis, University of Cambridge England, 1989. ",
1310
+ "bbox": [
1311
+ 174,
1312
+ 895,
1313
+ 821,
1314
+ 924
1315
+ ],
1316
+ "page_idx": 10
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Christopher Xie, Sachin Patil, Teodor Mihai Moldovan, Sergey Levine, and Pieter Abbeel. Modelbased reinforcement learning with parametrized physical models and optimism-driven exploration. CoRR, abs/1509.06824, 2015. ",
1321
+ "bbox": [
1322
+ 174,
1323
+ 103,
1324
+ 823,
1325
+ 146
1326
+ ],
1327
+ "page_idx": 11
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Tom Zahavy, Nir Ben Zrihem, and Shie Mannor. Graying the black box: Understanding dqns. In Proceedings of the 33rd International Conference on Machine Learning, 2016. ",
1332
+ "bbox": [
1333
+ 173,
1334
+ 155,
1335
+ 825,
1336
+ 184
1337
+ ],
1338
+ "page_idx": 11
1339
+ },
1340
+ {
1341
+ "type": "image",
1342
+ "img_path": "images/39195cf9194c529ae26862da0a7a539cab4fab714a907851d7ccd374c9c7dc93.jpg",
1343
+ "image_caption": [
1344
+ "Figure 6: Learning curves for three example Atari games. Semi-transparent lines are agents with different seeds and hyperparameters, the bold line is a mean over population and dotted line is the best agent (in terms of final performance). "
1345
+ ],
1346
+ "image_footnote": [],
1347
+ "bbox": [
1348
+ 176,
1349
+ 103,
1350
+ 813,
1351
+ 226
1352
+ ],
1353
+ "page_idx": 12
1354
+ },
1355
+ {
1356
+ "type": "text",
1357
+ "text": "B IMPLEMENTATION DETAILS ",
1358
+ "text_level": 1,
1359
+ "bbox": [
1360
+ 176,
1361
+ 287,
1362
+ 437,
1363
+ 303
1364
+ ],
1365
+ "page_idx": 12
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "The input to the agent at each timestep was an $8 4 \\times 8 4$ RGB image. All agents processed the input with the convolutional neural network (CNN) originally used for Atari by Mnih et al. (2013). The network consists of two convolutional layers. The first one has $1 6 8 \\times 8$ filters applied with stride 4, while the second one has $3 2 4 \\times 4$ filters with stride 2. This is followed by a fully connected layer with 256 units. All three layers are followed by a ReLU non-linearity. All agents used an LSTM with forget gates (Gers et al., 2000) with 256 cells which take in the CNN-encoded observation concatenated with the previous action taken and current reward. The policy and value function are linear projections of the LSTM output. The agent is trained with 20-step unrolls. The action space of the agent in the environment is game dependent for Atari (between 3 and 18 discrete actions), and 17 discrete actions for Labyrinth. Labyrinth runs at 60 frames-per-second. We use an action repeat of four, meaning that each action is repeated four times, with the agent receiving the final fourth frame as input to the next processing step. ",
1370
+ "bbox": [
1371
+ 174,
1372
+ 318,
1373
+ 825,
1374
+ 484
1375
+ ],
1376
+ "page_idx": 12
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "For the pixel control auxiliary tasks we trained policies to control the central $8 0 \\times 8 0$ crop of the inputs. The cropped region was subdivided into a $2 0 \\times 2 0$ grid of non-overlapping $4 \\times 4$ cells. The instantaneous reward in each cell was defined as the average absolute difference from the previous frame, where the average is taken over both pixels and channels in the cell. The output tensor of auxiliary values, $Q ^ { \\mathrm { a u x } }$ , is produced from the LSTM outputs by a deconvolutional network. The LSTM outputs are first mapped to a $3 2 \\times 7 \\times 7$ spatial feature map with a linear layer followed by a ReLU. This is followed by a doconvolutional layer of $3 2 3 \\times 3$ filters and a ReLU, resulting in a $3 2 \\times 9 \\times 9$ feature map. Deconvolution layers with 1 and $N _ { \\mathrm { a c t } }$ filters of size $4 \\times 4$ and stride 2 map the $3 2 \\times 9 \\times 9$ into a value tensor and an advantage tensor respectively. The spatial map is then decoded into Q-values using the dueling parametrization (Wang et al., 2016) producing the $N _ { \\mathrm { a c t } } \\times 2 0 \\times 2 0$ output $Q ^ { \\mathrm { a u x } }$ . There is a final ReLU nonlinearity on the $Q ^ { \\mathrm { a u x } }$ output. ",
1381
+ "bbox": [
1382
+ 173,
1383
+ 492,
1384
+ 825,
1385
+ 645
1386
+ ],
1387
+ "page_idx": 12
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "The architecture for feature control was similar. We learned to control the second hidden layer, which is a spatial feature map with size $3 2 \\times 9 \\times 9$ . Similarly to pixel control, we exploit the spatial structure in the data and used a deconvolutional network to produce $Q ^ { \\mathrm { a u x } }$ from the LSTM outputs. ",
1392
+ "bbox": [
1393
+ 178,
1394
+ 651,
1395
+ 820,
1396
+ 694
1397
+ ],
1398
+ "page_idx": 12
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "The reward prediction task is performed on a sequence of three observations, which are fed through three instances of the agent’s CNN. The three encoded CNN outputs are concatenated and fed through a fully connected layer of 128 units with ReLU activations, followed by a final linear threeclass classifier and softmax. The reward is predicted as one of three classes: positive, negative, or zero and trained with a task weight $\\lambda _ { \\mathrm { R P } } = 1$ . The value function replay is performed on a sequence of length 20 with a task weight $\\lambda _ { \\mathrm { V R } } = 1$ . ",
1403
+ "bbox": [
1404
+ 174,
1405
+ 700,
1406
+ 825,
1407
+ 785
1408
+ ],
1409
+ "page_idx": 12
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "The auxiliary tasks are performed every 20 environment steps, corresponding to every update of the base A3C agent, once the replay buffer has filled with agent experience. The replay buffer stores the most recent 2k observations, actions, and rewards taken by the base agent. ",
1414
+ "bbox": [
1415
+ 176,
1416
+ 791,
1417
+ 821,
1418
+ 833
1419
+ ],
1420
+ "page_idx": 12
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "The agents are optimised over 32 asynchronous threads with shared RMSprop (Mnih et al., 2016). The learning rates are sampled from a log-uniform distribution between 0.0001 and 0.005. The entropy costs are sampled from the log-uniform distribution between 0.0005 and 0.01. Task weight $\\lambda _ { \\mathrm { P C } }$ is sampled from log-uniform distribution between 0.01 and 0.1 for Labyrinth and 0.0001 and 0.01 for Atari (since Atari games are not homogeneous in terms of pixel intensities changes, thus we need to fit this normalization factor). ",
1425
+ "bbox": [
1426
+ 174,
1427
+ 840,
1428
+ 825,
1429
+ 924
1430
+ ],
1431
+ "page_idx": 12
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "C RANDOMNESS ROBUSTNESS ",
1436
+ "text_level": 1,
1437
+ "bbox": [
1438
+ 176,
1439
+ 102,
1440
+ 442,
1441
+ 117
1442
+ ],
1443
+ "page_idx": 13
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Each agent was trained with 45 randomly sampled values of hyperparameters. Each of them also starts with a different random seed (however, due to asynchronous nature of A3C this does not determinise the learning procedure). ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 133,
1451
+ 825,
1452
+ 175
1453
+ ],
1454
+ "page_idx": 13
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Previous sections showed that the UNREAL agent is more robust to the choice of hyperparameters than A3C. To present an even clearer picture of this effect, we show learning curves averaged over all hyperparamters/seeds used in the experiments in Figure 7. It is worth noting, that standard error for such curves is not increased despite adding our auxiliary tasks. ",
1459
+ "bbox": [
1460
+ 174,
1461
+ 183,
1462
+ 825,
1463
+ 238
1464
+ ],
1465
+ "page_idx": 13
1466
+ },
1467
+ {
1468
+ "type": "image",
1469
+ "img_path": "images/b19703264cc1e05ee8b692b916f91e90ee4fc8e8188a972b403499c6f563a7d0.jpg",
1470
+ "image_caption": [
1471
+ "Figure 7: Learning curves averaged across all hyperparameters (left), and the same curves for three types of agent plotted with standard error (right). "
1472
+ ],
1473
+ "image_footnote": [],
1474
+ "bbox": [
1475
+ 174,
1476
+ 252,
1477
+ 826,
1478
+ 393
1479
+ ],
1480
+ "page_idx": 13
1481
+ },
1482
+ {
1483
+ "type": "text",
1484
+ "text": "We also include scatter plots of averaged final human normalised performance with respect to the two main hyperparameters (learning rate and entropy cost) in Figure 8. The final performance across all levels varies rather smoothly across similar hyperparameters, showing that learning is not significantly affected by random seeds. The only significant inconsistency, which can be spotted around $( - 3 , - 3 )$ point in UNREAL plot is an effect of the third hyperparamer - $\\lambda _ { \\mathrm { P C } }$ , which differs a lot between these runs. ",
1485
+ "bbox": [
1486
+ 173,
1487
+ 459,
1488
+ 825,
1489
+ 542
1490
+ ],
1491
+ "page_idx": 13
1492
+ },
1493
+ {
1494
+ "type": "image",
1495
+ "img_path": "images/92506848462b33e63ba73227fb4b773a11e30f2bdbf8d3d54d8fe4f97ec8546e.jpg",
1496
+ "image_caption": [
1497
+ "Figure 8: Human normalised performance for each hyperparameter setting with respect to the main hyperparameters of A3C - learning rate and entropy cost. "
1498
+ ],
1499
+ "image_footnote": [],
1500
+ "bbox": [
1501
+ 173,
1502
+ 553,
1503
+ 810,
1504
+ 674
1505
+ ],
1506
+ "page_idx": 13
1507
+ },
1508
+ {
1509
+ "type": "text",
1510
+ "text": "D RAW ATARI SCORES ",
1511
+ "text_level": 1,
1512
+ "bbox": [
1513
+ 174,
1514
+ 102,
1515
+ 380,
1516
+ 117
1517
+ ],
1518
+ "page_idx": 14
1519
+ },
1520
+ {
1521
+ "type": "table",
1522
+ "img_path": "images/9d947b8b3e7a321228bdd909e107c7c8514853ebdeec7629dedd04f0778b08d1.jpg",
1523
+ "table_caption": [
1524
+ "Table 1: Raw scores of the best UNREAL agent (selected according to the learning curve) for all Atari games considered. Scores are averaged over 200 runs with random starts. Normalised score of $s$ is $( s - s _ { \\mathrm { r a n d o m } } ) / ( s _ { \\mathrm { h u m a n } } - s _ { \\mathrm { r a n d o m } } )$ . "
1525
+ ],
1526
+ "table_footnote": [],
1527
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">Random Raw</td><td colspan=\"2\">UNREAL (random starts)</td><td rowspan=\"2\">Human Raw</td></tr><tr><td>Raw</td><td>Normalised</td></tr><tr><td>alien</td><td>228</td><td>2087</td><td>30%</td><td>6371</td></tr><tr><td>amidar</td><td>6</td><td>4463</td><td>290%</td><td>1540</td></tr><tr><td>assault</td><td>222</td><td>16853</td><td>4091%</td><td>629</td></tr><tr><td>asterix</td><td>210</td><td>154818</td><td>2110%</td><td>7536</td></tr><tr><td>asteroids</td><td>719</td><td>248289</td><td>692%</td><td>36517</td></tr><tr><td>atlantis</td><td>12850</td><td>990904</td><td>7126%</td><td>26575</td></tr><tr><td>bank_heist</td><td>14</td><td>1353</td><td>212%</td><td>644</td></tr><tr><td>battle_zone</td><td>2360</td><td>147700</td><td>474%</td><td>33030</td></tr><tr><td>beam_rider</td><td>364</td><td>39250</td><td>266%</td><td>14961</td></tr><tr><td>berzerk</td><td>124</td><td>41489</td><td>1957%</td><td>2238</td></tr><tr><td>bowling</td><td>23</td><td>58</td><td>29%</td><td>146</td></tr><tr><td>boxing</td><td>0</td><td>94</td><td>980%</td><td>10</td></tr><tr><td>breakout</td><td>2</td><td>751</td><td>2861%</td><td>28</td></tr><tr><td>centipede</td><td>2091</td><td>4612</td><td>31%</td><td>10322</td></tr><tr><td>chopper_command</td><td>811</td><td>75028</td><td>914%</td><td>8930</td></tr><tr><td>crazy_climber</td><td>10780</td><td>129674</td><td>543%</td><td>32667</td></tr><tr><td>defender</td><td>2874</td><td>417812</td><td>3633%</td><td>14296</td></tr><tr><td>demon_attack</td><td>152</td><td>106937</td><td>3245%</td><td>3443</td></tr><tr><td>double_dunk</td><td>-19</td><td>21</td><td>943%</td><td>-14</td></tr><tr><td>enduro</td><td>0</td><td>0</td><td>0%</td><td>740</td></tr><tr><td>fishing_derby</td><td>-92 0</td><td>42</td><td>138%</td><td>5</td></tr><tr><td>freeway</td><td>65</td><td>34</td><td>133%</td><td>26</td></tr><tr><td>frostbite</td><td></td><td>3795</td><td>90%</td><td>4203</td></tr><tr><td>gopher</td><td>258</td><td>54007</td><td>2618%</td><td>2311</td></tr><tr><td>gravitar</td><td>173</td><td>6310</td><td>209%</td><td>3116</td></tr><tr><td>hero</td><td>1027</td><td>37291</td><td>146%</td><td>25839</td></tr><tr><td>ice_hockey</td><td>-11</td><td>16</td><td>233%</td><td>0</td></tr><tr><td>jamesbond</td><td>29</td><td>69872</td><td>20572%</td><td>368</td></tr><tr><td>kangaroo</td><td>52</td><td>14838</td><td>550%</td><td>2739</td></tr><tr><td>krull</td><td>1598</td><td>10587</td><td>1759%</td><td>2109</td></tr><tr><td>kung_fu_master</td><td>258</td><td>76676</td><td>372%</td><td>20787</td></tr><tr><td>montezuma_revenge</td><td>0</td><td>2902</td><td>69%</td><td>4182</td></tr><tr><td>ms_pacman</td><td>307 2292</td><td>5423</td><td>34%</td><td>15375</td></tr><tr><td>name_this-game</td><td></td><td>12602</td><td>229%</td><td>6796</td></tr><tr><td>phoenix</td><td>761 -229</td><td>404280</td><td>6811%</td><td>6686</td></tr><tr><td>pitfall</td><td>-21</td><td>0</td><td>4%</td><td>5999</td></tr><tr><td>pong</td><td>25</td><td>8</td><td>79%</td><td>16</td></tr><tr><td>private_eye</td><td>164</td><td>546</td><td>1%</td><td>64169</td></tr><tr><td>qbert riverraid</td><td>1338</td><td>26437</td><td>220%</td><td>12085</td></tr><tr><td></td><td>12</td><td>19077</td><td>136%</td><td>14382</td></tr><tr><td>road_runner</td><td></td><td>52596</td><td>766%</td><td>6878</td></tr><tr><td>robotank</td><td>2</td><td>79</td><td>1136%</td><td>9</td></tr><tr><td>seaquest</td><td>68</td><td>5305</td><td>13%</td><td>40426</td></tr><tr><td>skiing</td><td>-17098</td><td>-8988</td><td>60%</td><td>-3687</td></tr><tr><td>solaris</td><td>1236</td><td>2895</td><td>17%</td><td>11033</td></tr><tr><td>space_invaders</td><td>148</td><td>25851</td><td>1952%</td><td>1465</td></tr><tr><td>star_gunner</td><td>664</td><td>72864</td><td>815%</td><td>9528</td></tr><tr><td>surround</td><td>-10</td><td>10</td><td>128%</td><td>5</td></tr><tr><td>tennis</td><td>-24</td><td>-0</td><td>136%</td><td>-7</td></tr><tr><td>time_pilot</td><td>3568</td><td>89559</td><td>4130%</td><td>5650</td></tr><tr><td>tutankham</td><td>11</td><td>294</td><td>222%</td><td>138</td></tr><tr><td>up_n_down</td><td>533</td><td>339119</td><td>3616%</td><td>9896</td></tr><tr><td>venture</td><td>0</td><td>0</td><td>0%</td><td>1039</td></tr><tr><td>video_pinball</td><td>0</td><td>518567</td><td>3315%</td><td>15641</td></tr><tr><td>wizard_of_wor</td><td>564</td><td>35344</td><td>871%</td><td>4556</td></tr><tr><td>yars_revenge</td><td>3093</td><td>42889</td><td>90%</td><td>47135</td></tr><tr><td>zaxxon</td><td>32</td><td>60044</td><td>714%</td><td>8443</td></tr><tr><td>Mean Median</td><td>■</td><td>= =</td><td>1453% 331%</td><td>■ ■</td></tr></table>",
1528
+ "bbox": [
1529
+ 305,
1530
+ 133,
1531
+ 686,
1532
+ 833
1533
+ ],
1534
+ "page_idx": 14
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "",
1539
+ "text_level": 1,
1540
+ "bbox": [
1541
+ 174,
1542
+ 102,
1543
+ 382,
1544
+ 118
1545
+ ],
1546
+ "page_idx": 15
1547
+ },
1548
+ {
1549
+ "type": "image",
1550
+ "img_path": "images/5870747e077392dbb2898d5e4ab9f2d540e2beaf09711b1026124bbc6daa8d78.jpg",
1551
+ "image_caption": [
1552
+ "Figure 9: Top-down renderings of each Labyrinth level. The nav $\\mathrm { . m a z e * . 0 \\{ 1 , 2 , 3 \\} }$ levels show one example maze layout. In the all random case, a new maze was randomly generated at the start of each episode. "
1553
+ ],
1554
+ "image_footnote": [],
1555
+ "bbox": [
1556
+ 220,
1557
+ 102,
1558
+ 777,
1559
+ 849
1560
+ ],
1561
+ "page_idx": 15
1562
+ },
1563
+ {
1564
+ "type": "image",
1565
+ "img_path": "images/4bc0fc184fd7539e5d4337ccbbfa868b0141ecebc45d1bd8a40fa142b4363f3e.jpg",
1566
+ "image_caption": [
1567
+ "Figure 10: Example images from the agent’s egocentric viewpoint for each Labyrinth level. "
1568
+ ],
1569
+ "image_footnote": [],
1570
+ "bbox": [
1571
+ 233,
1572
+ 99,
1573
+ 761,
1574
+ 897
1575
+ ],
1576
+ "page_idx": 16
1577
+ }
1578
+ ]
parse/train/SJ6yPD5xg/SJ6yPD5xg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJ6yPD5xg/SJ6yPD5xg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJl47yBYPS/SJl47yBYPS.md ADDED
@@ -0,0 +1,415 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TOWARDS SIMPLICITY IN DEEP REINFORCEMENT LEARNING: STREAMLINED OFF-POLICY LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The field of Deep Reinforcement Learning (DRL) has recently seen a surge in the popularity of maximum entropy reinforcement learning algorithms. Their popularity stems from the intuitive interpretation of the maximum entropy objective and their superior sample efficiency on standard benchmarks. In this paper, we seek to understand the primary contribution of the entropy term to the performance of maximum entropy algorithms. For the Mujoco benchmark, we demonstrate that the entropy term in Soft Actor Critic (SAC) principally addresses the bounded nature of the action spaces. With this insight, we show how streamlined algorithms without entropy maximization can match the performance of SAC. We also propose a simple non-uniform sampling method for selecting transitions from the replay buffer during training. We further show that the streamlined algorithm with the simple non-uniform sampling scheme outperforms SAC and achieves state-of-the-art performance on challenging continuous control tasks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Off-policy Deep Reinforcement Learning (RL) algorithms aim to improve sample efficiency by reusing past experience. Recently a number of new off-policy Deep Reinforcement Learning algorithms have been proposed for control tasks with continuous state and action spaces, including Deep Deterministic Policy Gradient (DDPG) and Twin Delayed DDPG (TD3) (Lillicrap et al., 2015; Fujimoto et al., 2018). TD3, which introduced clipped double-Q learning, delayed policy updates and target policy smoothing, has been shown to be significantly more sample efficient than popular on-policy methods for a wide range of Mujoco benchmarks.
12
+
13
+ The field of Deep Reinforcement Learning (DRL) has also recently seen a surge in the popularity of maximum entropy RL algorithms. Their popularity stems from the intuitive interpretation of the maximum entropy objective and their superior sample efficiency on standard benchmarks. In particular, Soft Actor Critic (SAC), which combines off-policy learning with maximum-entropy RL, not only has many attractive theoretical properties, but can also give superior performance on a wide-range of Mujoco environments, including on the high-dimensional environment Humanoid for which both DDPG and TD3 perform poorly (Haarnoja et al., 2018a;b; Langlois et al., 2019). SAC has a similar structure to TD3, but also employs maximum entropy reinforcement learning.
14
+
15
+ In this paper, we first seek to understand the primary contribution of the entropy term to the performance of maximum entropy algorithms. For the Mujoco benchmark, we demonstrate that when using the standard objective without entropy along with standard additive noise exploration, there is often insufficient exploration due to the bounded nature of the action spaces. Specifically, the outputs of the policy network are often way outside the bounds of the action space, so that they need to be squashed to fit within the action space. The squashing results in actions persistently taking on their maximal values, so that there is insufficient exploration. In contrast, the entropy term in the SAC objective forces the outputs to have sensible values, so that even with squashing, exploration is maintained. We conclude that the entropy term in the objective for Soft Actor Critic principally addresses the bounded nature of the action spaces in the Mujoco environments.
16
+
17
+ With this insight, we propose Streamlined Off Policy (SOP), a streamlined algorithm using the standard objective without the entropy term. SOP employs a simple normalization scheme to address the bounded nature of the action spaces, allowing satisfactory exploration throughout training. We also consider replacing the aforementioned normalization scheme with inverting gradients (IG)
18
+
19
+ Hausknecht & Stone (2015). Our results show that SOP and IG match the sample-efficiency and robustness performance of SAC, including on the more challenging Ant and Humanoid environments. This demonstrates a need to revisit the importance of entropy maximization in DRL.
20
+
21
+ Keeping with the theme of simplicity with the goal of meeting Occam’s principle, we also propose a simple non-uniform sampling method for selecting transitions from the replay buffer during training. In vanilla SOP (as well as in DDPG, TD3, and SAC), samples from the replay buffer are chosen uniformly at random during training. Our method, called Emphasizing Recent Experience (ERE), samples more aggressively recent experience while not neglecting past experience. Unlike Priority Experience Replay (PER) (Schaul et al., 2015), a popular non-uniform sampling scheme for the Atari environments, ERE is only a few lines of code and does not rely on any sophisticated data structures. We show that SOP combined with ERE out-performs SAC and provides state of the art performance. For example, for Ant and Humanoid, it improves over SAC by $2 1 \%$ and $2 4 \%$ , respectively, with one million samples. Furthermore, we also investigate combining SOP with PER, and show SOP+ERE also out-performs the more complicated SOP $+$ PER scheme.
22
+
23
+ The contributions of this paper are thus threefold. First, we uncover the primary contribution of the entropy term of maximum entropy RL algorithms when the environments have bounded action spaces. Second, we propose a streamlined algorithm which do not employ entropy maximization but nevertheless matches the sampling efficiency and robustness performance of SAC for the Mujoco benchmarks. And third, we combine our streamlined algorithms with a simple non-uniform sampling scheme to achieve state-of-the art performance for the Mujoco benchmarks. We provide anonymized code for reproducibility 1.
24
+
25
+ # 2 PRELIMINARIES
26
+
27
+ We represent an environment as a Markov Decision Process (MDP) which is defined by the tuple $( S , { \mathcal { A } } , r , p , \gamma )$ , where $s$ and $\mathcal { A }$ are continuous multi-dimensional state and action spaces, $r ( s , a )$ is a bounded reward function, $p ( s ^ { \prime } | s , a )$ is a transition function, and $\gamma$ is the discount factor. Let $s ( t )$ and $a ( t )$ respectively denote the state of the environment and the action chosen at time $t$ . Let $\pi { \dot { = } } \pi ( a | s )$ , $s \in \mathcal S , a \in \mathcal A$ denote the policy. We further denote $K$ for the dimension of the action space, and write $a _ { k }$ for the $k$ th component of an action $a \in { \mathcal { A } }$ , that is, $a = ( a _ { 1 } , \ldots , a _ { K } )$ .
28
+
29
+ The expected discounted return for policy $\pi$ beginning in state $s$ is given by:
30
+
31
+ $$
32
+ V _ { \pi } ( s ) = \mathbb { E } _ { \pi } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s ( t ) , a ( t ) ) | s ( 0 ) = s ]
33
+ $$
34
+
35
+ Standard MDP and RL problem formulations seek to maximize $V _ { \pi } ( s )$ over policies $\pi$ . For finite state and action spaces, under suitable conditions for continuous state and action spaces, there exists an optimal policy that is deterministic (Puterman, 2014; Bertsekas & Tsitsiklis, 1996). In RL with unknown environment, exploration is required to learn a suitable policy.
36
+
37
+ In DRL with continuous action spaces, typically the policy is modeled by a parameterized policy network which takes as input a state $s$ and outputs a value $\mu ( s ; \theta )$ , where $\theta$ represents the current parameters of the policy network (Schulman et al., 2015; 2017; Vuong et al., 2018; Lillicrap et al., 2015; Fujimoto et al., 2018). During training, typically additive random noise is added for exploration, so that the actual action taken when in state $s$ takes the form $a = \mu ( s ; \theta ) + \epsilon$ where $\epsilon$ is a $K$ -dimensional Gaussian random vector with each component having zero mean and variance $\sigma$ . During testing, $\epsilon$ is set to zero.
38
+
39
+ # 2.1 ENTROPY MAXIMIZATION RL
40
+
41
+ Maximum entropy reinforcement learning takes a different approach than (1) by optimizing policies to maximize both the expected return and the expected entropy of the policy (Ziebart et al., 2008; Ziebart, 2010; Todorov, 2008; Rawlik et al., 2013; Levine & Koltun, 2013; Levine et al., 2016; Nachum et al., 2017; Haarnoja et al., 2017; 2018a;b).
42
+
43
+ In particular, with maximization entropy RL, the objective is to maximize
44
+
45
+ $$
46
+ V _ { \pi } ( s ) = \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \mathbb { E } _ { \pi } [ r ( s ( t ) , a ( t ) ) + \lambda H ( \pi ( \cdot | s ( t ) ) ) | s ( 0 ) = s ]
47
+ $$
48
+
49
+ where $H ( \pi ( \cdot | s ) )$ is the entropy of the policy when in state $s$ , and the temperature parameter $\lambda$ determines the relative importance of the entropy term against the reward.
50
+
51
+ For entropy maximization DRL, when given state $s$ the policy network will typically output a $K$ - dimensional vector $\sigma ( s ; \theta )$ in addition to the vector $\mu ( s ; \theta )$ . The action selected when in state $s$ is then modeled as $\mu ( s ; \theta ) + \epsilon$ where $\epsilon \sim { \cal N } ( 0 , \sigma ( s ; \theta ) )$ .
52
+
53
+ Maximum entropy RL has been touted to have a number of conceptual and practical advantages for DRL (Haarnoja et al., 2018a;b). For example, it has been argued that the policy is incentivized to explore more widely, while giving up on clearly unpromising avenues. It has also been argued that the policy can capture multiple modes of near-optimal behavior, that is, in problem settings where multiple actions seem equally attractive, the policy will commit equal probability mass to those actions. In this paper, we show for the Mujoco benchmarks that the standard additive noise exploration suffices and can achieve the same performance as maximum entropy RL.
54
+
55
+ # 3 THE SQUASHING EXPLORATION PROBLEM
56
+
57
+ # 3.1 BOUNDED ACTION SPACES
58
+
59
+ Continuous environments typically have bounded action spaces, that is, along each action dimension $k$ there is a minimum possible action value $a _ { k } ^ { \mathrm { m i n } }$ and a maximum possible action value $a _ { k } ^ { \mathrm { m a x } }$ . When selecting an action, the action needs to be selected within these bounds before the action can be taken. DRL algorithms often handle this by squashing the action so that it fits within the bounds. For example, if along any one dimension the value $\mu ( s ; \theta ) + \epsilon$ exceeds $a _ { \mathrm { m a x } }$ , the action is set (clipped) to $a _ { \mathrm { m a x } }$ . Alternatively, a smooth form of squashing can be employed. For example, suppose $a _ { k } ^ { \mathrm { m i n } } =$ $- M$ and $a _ { k } ^ { \mathrm { m a x } } = + M$ for some positive number $M$ , then a smooth form of squashing could use $a = M \operatorname { t a n h } ( \mu ( s ; \theta ) + \epsilon )$ in which $\operatorname { t a n h } ( )$ is being applied to each component of the $K$ -dimensional vector. DDPG (Hou et al., 2017) and TD3 (Fujimoto et al., 2018) use clipping, and SAC (Haarnoja et al., 2018a;b) uses smooth squashing with the $\operatorname { t a n h } ( )$ function. For concreteness, henceforth we will assume that smooth squashing with the tanh() is employed.
60
+
61
+ We note that an environment may actually allow the agent to input actions that are outside the bounds. In this case, the environment will typically first clip the actions internally before passing them on to the “actual” environment (Fujita $\&$ Maeda, 2018).
62
+
63
+ We now make a simple but crucial observation: squashing actions to fit into a bounded action space can have a disastrous effect on additive-noise exploration strategies. To see this, let the output of the policy network be $\mu ( s ) = ( \mu _ { 1 } ( s ) , \ldots , \mu _ { K } ( s ) )$ . Consider an action taken along one dimension $k$ , and suppose $\mu _ { k } ( s ) > > 1$ and $\left| \epsilon _ { k } \right|$ is relatively small compared to $\mu _ { k } ( s )$ . Then the action $a _ { k } =$ $M \operatorname { t a n h } ( \mu _ { k } ( s ) + \epsilon _ { k } )$ will be very close (essentially equal) to $M$ . If the condition $\mu _ { k } ( s ) > > 1$ persists over many consecutive states, then $a _ { k }$ will remain close to 1 for all these states, and consequently there will be essentially no exploration along the $k$ th dimension. We will refer to this problem as the squashing exploration problem. A similar observation was made in Hausknecht & Stone (2015). We will argue that algorithms such as DDPG and TD3 based on the standard objective (1) with additive noise exploration can be greatly impaired by squashing exploration.
64
+
65
+ # 3.2 WHAT DOES ENTROPY MAXIMIZATION BRING TO SAC FOR THE MUJUCO ENVIRONMENTS?
66
+
67
+ SAC is a maximum-entropy based off-policy DRL algorithm which provides good performance across all of the Mujuco benchmark environments. To the best of our knowledge, it currently provides state of the art performance for the Mujoco benchmark. In this section, we argue that the principal contribution of the entropy term in the SAC objective is to resolve the squashing exploration problem, thereby maintaining sufficient exploration when facing bounded action spaces. To argue this, we consider two DRL algorithms: SAC with adaptive temperature (Haarnoja et al., 2018b), and
68
+
69
+ SAC with entropy removed altogether (temperature set to zero) but everything else the same. We refer to them as $S A C$ and as $S A C$ without entropy. For SAC without entropy, for exploration we use additive zero-mean Gaussian noise with $\sigma$ fixed at 0.3. Both algorithms use tanh squashing. We compare these two algorithms on two Mujoco environments: Humanoid-v2 and Walker-v2.
70
+
71
+ Figure 1 shows the performance of the two algorithms with 10 seeds. For Humanoid, SAC performs much better than SAC without entropy. However, for Walker, SAC without entropy performs nearly as well as SAC, implying maximum entropy RL is not as critical for this environment.
72
+
73
+ ![](images/219162d1cd1bf8bc2f19ed86a415e646bc8c9cfbe32e46472131c28c4a625905.jpg)
74
+ Figure 1: SAC performance with and without entropy maximization
75
+
76
+ To understand why entropy maximization is important for one environment but less so for another, we examine the actions selected when training these two algorithms. Humanoid and Walker have action dimensions $K = 1 7$ and $K = 6$ , respectively. Here we show representative results for one dimension for both environments, and provide the full results in the Appendix. The top and bottom rows of Figure 2 shows results for Humanoid and Walker, respectively. The first column shows the $\mu _ { k }$ values for an interval of 1,000 consecutive time steps, namely, for time steps 599,000 to 600,000. The second column shows the actual action values passed to the environment for these time steps. The third and fourth columns show a concatenation of 10 such intervals of 1000 time steps, with each interval coming from a larger interval of 100,000 time steps.
77
+
78
+ The top and bottom rows of Figure 2 are strikingly different. For Humanoid using SAC with entropy, the $\left| \mu _ { k } \right|$ values are small, mostly in the range [-1.5,1.5], and fluctuate significantly. This allows the action values to also fluctuate significantly, providing exploration in the action space. On the other hand, for SAC without entropy the $\left| \mu _ { k } \right|$ values are typically huge, most of which are well outside the interval [-10,10]. This causes the actions $a _ { k }$ to be persistently clustered at either $M$ or - $- M$ , leading to essentially no exploration along that dimension. As shown in the Appendix, this property (lack of exploration for SAC without entropy maximization) holds for all 17 action dimensions. For Walker, we see that for both algorithms, the $\mu _ { k }$ values are sensible, mostly in the range [-1,1] and therefore the actions chosen by both algorithms exhibit exploration.
79
+
80
+ In conclusion, the principle benefit of maximum entropy RL in SAC for the Mujuco environments is that it resolves the squashing exploration problem. For some environments (such as Walker), the outputs of the policy network take on sensible values, so that sufficient exploration is maintained and overall good performance is achieved without the need for entropy maximization. For other environments (such as Humanoid), entropy maximization is needed to reduce the magnitudes of the outputs so that exploration is maintained and overall good performance is achieved.
81
+
82
+ # 4 STREAMLINED OFF-POLICY (SOP) ALGORITHM
83
+
84
+ Given the observations in the previous section, a natural question is: is it possible to design a streamlined off policy algorithm that does not employ entropy maximization but offers performance comparable to SAC (which has entropy maximization)?
85
+
86
+ As we observed in the previous section, without entropy maximization, in some environments the policy network output values $\left| \mu _ { k } \right|$ , $k = 1 , \ldots , K$ can become persistently huge, which leads to insufficient exploration due to the squashing. A simple solution is to modify the outputs of the policy network by normalizing the output values when they collectively (across the action dimensions) become too large. To this end, let $\boldsymbol { \mu } = \left( \mu _ { 1 } , \ldots , \mu _ { K } \right)$ be the output of the original policy network, and let $\begin{array} { r } { G = \sum _ { k } | \bar { \mu _ { k } } | / K } \end{array}$ . The $G$ is simply the average of the magnitudes of the components of $\mu$ . The normalization procedure is as follows. If $G > 1$ , then we reset $\mu _ { k } \mu _ { k } / G$ for all $k = 1 , \ldots , K$ ; otherwise, we leave $\mu$ unchanged. With this simple normalization, we are assured that the average of the normalized magnitudes is never greater than one. Henceforth we assume the policy network has been modified with the simple normalization scheme just described.
87
+
88
+ ![](images/05212525676040ea6efb61cfcb1304aeace075d5f5c018c548343aa1f033b039.jpg)
89
+ Figure 2: $\mu _ { k }$ and $a _ { k }$ values from SAC and SAC without entropy maximization
90
+
91
+ Our Streamlined Off Policy (SOP) algorithm is described in Algorithm 1. The algorithm is essentially DDPG plus the normalization described above, plus clipped double Q-learning and target policy smoothing (Fujimoto et al., 2018). Another way of looking at it is as TD3 plus the normalization described above, minus the delayed policy updates and the target policy parameters. SOP also uses tanh squashing instead of clipping, since tanh gives somewhat better performance in our experiments. The SOP algorithm is “streamlined” as it has no entropy terms, temperature adaptation, target policy parameters or delayed policy updates. In our experiments, we also consider TD3 plus the simple normalization, and also another streamlined algorithm in which we replace the simple normalization scheme described above with the inverting gradients (IG) scheme as described in Hausknecht & Stone (2015). The basic idea is: when gradients suggest increasing the action magnitudes, gradients will be downscaled if actions are within the boundaries, and inverted entirely if actions are outside the boundaries. More implementation details can be found in the Appendix.
92
+
93
+ # Algorithm 1 Streamlined Off-Policy
94
+
95
+ <table><tr><td>1: 2: repeat</td><td>:Input: initial policy parameters 0,Q-function parameters Φ1,Φ2,empty replay buffer D Set target parameters equal to main parameters $targ ← Φ for i= 1, 2</td></tr><tr><td>3:</td><td></td></tr><tr><td>4: 5:</td><td>Generate an episode using actions a = Mtanh(μe(s) + ε) where ∈ ~ N(O,01). for j in range(however many updates) do</td></tr><tr><td>6:</td><td>Randomly sample a batch of transitions,B = {(s,a,r,s)} from D</td></tr><tr><td>7:</td><td>Compute targets for Q functions:</td></tr><tr><td>8:</td><td>yq(r,s&#x27;)=r+γmini=1,2 QΦarg(s&#x27;,Mtanh(μe(s&#x27;)+δ))δ~N(0,σ2) Update Q-functions by one step of gradient descent using</td></tr><tr><td>9:</td><td>ViB∑(s,a,r,s)∈B(Q:(s,a)-yq(r,s)²fori=1,2 Update policy by one step of gradient ascent using</td></tr><tr><td>10:</td><td>VB∑s∈B QΦ1(s,Mtanh(μθ(s))) Update target networks with targ;← pΦtarg +(1-ρ)Φi for i=1,2</td></tr></table>
96
+
97
+ # 4.1 EXPERIMENTAL RESULTS FOR SOP
98
+
99
+ Figure 3 compares SAC (with temperature adaptation (Haarnoja et al., 2018a;b)) with SOP, $\mathrm { T D } 3 +$ (that is, TD3 plus the simple normalization), and inverting gradients (IG) for five of the most challenging Mujuco environments. Using the same baseline code, we train with ten different random seeds for each of the two algorithms. Each algorithm performs five evaluation rollouts every 5000 environment steps. The solid curves correspond to the mean, and the shaded region to the standard deviation of the returns over the ten seeds.
100
+
101
+ Results show that SOP, SAC and IG have similar sample-efficiency performance and robustness across all environments. $\mathrm { T D } 3 +$ has slightly weaker asymptotic performance for Walker and Humanoid. IG initially learns slowly for Humanoid with high variance across random seeds, but gives similar asymptotic performance. This confirms that with a simple output normalization scheme in the policy network, the performance of SAC can be achieved without maximum entropy RL.
102
+
103
+ In the Appendix we provide an ablation study for SOP, which shows a major performance drop when removing either double Q-learning or normalization, whereas removing target policy smoothing (Fujimoto et al., 2018) results in only a small performance drop in some environments.
104
+
105
+ ![](images/39252b2fb870b529c74797173bc3397fc70ed66480e6d23d70b419f6fc1612f5.jpg)
106
+ Figure 3: Streamlined Off-Policy (SOP) versus SAC, $\mathrm { T D } 3 +$ and IG
107
+
108
+ # 5 NON-UNIFORM SAMPLING
109
+
110
+ We now show how a small change in the sampling scheme for SOP can achieve state of the art performance for the Mujoco benchmark. We call this sampling scheme Emphasizing Recent Experience (ERE). ERE has 3 core features: $( i )$ It is a general method applicable to any off-policy algorithm; $( i i )$ It requires no special data structure, is very simple to implement, and has near-zero computational overhead; $( i i i )$ It only introduces one additional important hyper-parameter.
111
+
112
+ The basic idea is: during the parameter update phase, the first mini-batch is sampled from the entire buffer, then for each subsequent mini-batch we gradually reduce our range of sampling to sample more aggressively from more recent data. Specifically, assume that in the current update phase we are to make $1 0 0 0 \mathrm { { m i n i } }$ -batch updates. Let $N$ be the max size of the buffer. Then for the $k ^ { t \mathbf { \hat { h } } }$ update, we sample uniformly from the most recent $c _ { k }$ data points, where $c _ { k } = N \cdot \eta ^ { k }$ and $\eta \in \mathsf { ( 0 , 1 ] }$ is a hyper-parameter that determines how much emphasis we put on recent data. $\eta = 1$ is uniform sampling. When $\eta \ : < \ : 1$ , $c _ { k }$ decreases as we perform each update. $\eta$ can made to adapt to the learning speed of the agent so that we do not have to tune it for each environment.
113
+
114
+ The effect of such a sampling formulation is twofold. The first is recent data have a higher chance of being sampled. The second is that we do this in an ordered way: we first sample from all the data in the buffer, and gradually shrink the range of sampling to only sample from the most recent data. This scheme reduces the chance of over-writing parameter changes made by new data with parameter changes made by old data (French, 1999; McClelland et al., 1995; McCloskey & Cohen, 1989; Ratcliff, 1990; Robins, 1995). This process allows us to quickly obtain new information from recent data, and better approximate the value functions near recently-visited states, while still maintaining an acceptable approximation near states visited in the more distant past.
115
+
116
+ What is the effect of replacing uniform sampling with ERE? First note if we do uniform sampling on a fixed buffer, the expected number of times a data point is sampled is the same for all data points. Now consider a scenario where we have a buffer of size 1000 (FIFO queue), we collect one data at a time, and then perform one update with mini-batch size of one. If we start with an empty buffer and sample uniformly, as data fills the buffer, each data point gets less and less chance of being sampled. Specifically, over a period of 1000 updates, the expected number of times the tth data is sampled is: $1 / t + \dot { 1 / ( t + 1 ) } \dot { + } \cdot \cdot \cdot + 1 / T$ . Figure 4f shows the expected number of times a data is sampled as a function of its position in the buffer. We see that older data are expected to get sampled much more than newer data. This is undesirable because when the agent is improving and exploring new areas of the state space; new data points may contain more interesting information than the old ones, which have already been updated many times.
117
+
118
+ When we apply the ERE scheme, we effectively skew the curve towards assigning higher expected number of samples for the newer data, allowing the newer data to be frequently sampled soon after being collected, which can accelerate the learning process. In the Appendix, we provide further algorithmic detail and analysis on ERE, and compare ERE to two other sampling schemes: an exponential sampling scheme and Prioritized Experience Replay (Schaul et al., 2015).
119
+
120
+ # 5.1 EXPERIMENTAL RESULTS FOR SOP $^ +$ ERE
121
+
122
+ Figure 4 compares the performance of SOP, SOP $^ +$ ERE, SAC and SAC+ERE. With ERE, both SAC and SOP gain a significant performance improvement in all environments. SOP+ERE learns faster than SAC and vanilla SOP in all Mujoco environments. SOP+ERE also greatly improves overall performance for the two most challenging environments, Ant and Humanoid, and has the best performance for Humanoid. In table 1, we show the mean test episode return and std across 10 random seeds at 1M timesteps for all environments. The last column displays the percentage improvement of $\mathrm { { S O P + } }$ ERE over SAC, showing that $_ { \mathrm { S O P + E R E } }$ achieves state of the art performance. In Ant and Humanoid, $_ { \mathrm { S O P + E R E } }$ improves performance by $21 \%$ and $24 \%$ over SAC at 1 million timesteps, respectively. As for the std, $\mathrm { S O P + }$ ERE gives lower values, and for Humanoid a higher value.
123
+
124
+ ![](images/3fa684a327ffba12579ae16a9256212442944e96892136d18c91a626e908b948.jpg)
125
+ Figure 4: (a) to (e) show the performance of SOP and SAC with ERE sampling. (f) shows over a period of 1000 updates, the expected number of times the tth data point is sampled (with $\eta = 0 . 9 9 6 )$ . ERE allows new data to be sampled many times soon after being collected.
126
+
127
+ Table 1: Performance comparison at one million samples. Last column shows percentage improvement of SOP+ERE over SAC.
128
+
129
+ <table><tr><td>Environment</td><td> SAC Adaptive</td><td>SOP</td><td>SOP+ERE</td><td>Improvement</td></tr><tr><td>Hopper</td><td>3161.2 ± 381.0</td><td>3317.3 ± 133.9</td><td>3201.5 ± 248.7</td><td>1.3%</td></tr><tr><td>Walker</td><td>4801.5 ± 514.5</td><td>4666.5 ± 474.5</td><td>5145.9 ± 512.3</td><td>7.2%</td></tr><tr><td>HalfCheetah</td><td>10963.7 ± 512.4</td><td>9968.0 ± 497.4</td><td>11335.1 ± 478.3</td><td>3.4%</td></tr><tr><td>Ant</td><td>4153.7 ± 925.0</td><td>4674.0 ± 588.8</td><td>5023.3 ± 891.6</td><td>21.0%</td></tr><tr><td>Humanoid</td><td>5076.2 ± 148.1</td><td>4900.9 ± 316.6</td><td>6297.7 ± 500.0</td><td>24.1%</td></tr></table>
130
+
131
+ # 6 RELATED WORK
132
+
133
+ In recent years, there has been significant progress in improving the sample efficiency of DRL for continuous robotic locomotion tasks with off-policy algorithms (Lillicrap et al., 2015; Fujimoto et al., 2018; Haarnoja et al., 2018a;b). There is also a significant body of research on maximum entropy RL methods (Ziebart et al., 2008; Ziebart, 2010; Todorov, 2008; Rawlik et al., 2013; Levine & Koltun, 2013; Levine et al., 2016; Nachum et al., 2017; Haarnoja et al., 2017; 2018a;b). Ahmed et al. (2019) very recently shed light on how entropy leads to a smoother optimization landscape.
134
+
135
+ By taking clipping in the Mujoco environments explicitly into account, Fujita & Maeda (2018) modified the policy gradient algorithm to reduce variance and provide superior performance among on-policy algorithms. Eisenach et al. (2018) extend the work of Fujita & Maeda (2018) for when an action may be direction. Hausknecht & Stone (2015) introduce Inverting Gradients, for which we provide expermintal results in this paper for the Mujoco environments. Chou et al. (2017) also explores DRL in the context of bounded action spaces. Dalal et al. (2018) consider safe exploration in the context of constrained action spaces.
136
+
137
+ Uniform sampling is the most common way to sample from a replay buffer. One of the most wellknown alternatives is prioritized experience replay (PER) (Schaul et al., 2015). PER uses the absolute TD-error of a data point as the measure for priority, and data points with higher priority will have a higher chance of being sampled. This method has been tested on DQN (Mnih et al., 2015) and double DQN (DDQN) (Van Hasselt et al., 2016) with significant improvement and applied successfully in other algorithms (Wang et al., 2015; Schulze & Schulze, 2018; Hessel et al., 2018; Hou et al., 2017) and can be implemented in a distributed manner (Horgan et al., 2018). There are other methods proposed to make better use of the replay buffer. The ACER algorithm has an on-policy part and an off-policy part, with a hyper-parameter controlling the ratio of off-policy to on-policy updates (Wang et al., 2016). The RACER algorithm (Novati & Koumoutsakos, 2018) selectively removes data points from the buffer, based on the degree of ”off-policyness”, bringing improvement to DDPG (Lillicrap et al., 2015), NAF (Gu et al., 2016) and PPO (Schulman et al., 2017). In De Bruin et al. (2015), replay buffers of different sizes were tested, showing large buffer with data diversity can lead to better performance. Finally, with Hindsight Experience Replay(Andrychowicz et al., 2017), priority can be given to trajectories with lower density estimation(Zhao & Tresp, 2019) to tackle multi-goal, sparse reward environments.
138
+
139
+ # 7 CONCLUSION
140
+
141
+ In this paper we first showed that the primary role of maximum entropy RL for the Mujoco benchmark is to maintain satisfactory exploration in the presence of bounded action spaces. We then developed a new streamlined algorithm which does not employ entropy maximization but nevertheless matches the sampling efficiency and robustness performance of SAC for the Mujoco benchmarks. Our experimental results demonstrate a need to revisit the benefits of entropy regularization in DRL. Finally, we combined our streamlined algorithm with a simple non-uniform sampling scheme to achieve state-of-the art performance for the Mujoco benchmark.
142
+
143
+ # REFERENCES
144
+
145
+ Zafarali Ahmed, Nicolas Le Roux, Mohammad Norouzi, and Dale Schuurmans. Understanding the impact of entropy on policy optimization. In International Conference on Machine Learning, pp. 151–160, 2019.
146
+
147
+ Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, OpenAI Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems, pp. 5048–5058, 2017.
148
+
149
+ Dimitri P Bertsekas and John N Tsitsiklis. Neuro-dynamic programming, volume 5. Athena Scientific Belmont, MA, 1996.
150
+
151
+ Po-Wei Chou, Daniel Maturana, and Sebastian Scherer. Improving stochastic policy gradients in continuous control with deep reinforcement learning using the beta distribution. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 834–843. JMLR. org, 2017.
152
+
153
+ Gal Dalal, Krishnamurthy Dvijotham, Matej Vecerik, Todd Hester, Cosmin Paduraru, and Yuval Tassa. Safe exploration in continuous action spaces. arXiv preprint arXiv:1801.08757, 2018.
154
+
155
+ Tim De Bruin, Jens Kober, Karl Tuyls, and Robert Babuska. The importance of experience replay ˇ database composition in deep reinforcement learning. In Deep reinforcement learning workshop, NIPS, 2015.
156
+
157
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, pp. 1329–1338, 2016.
158
+
159
+ Carson Eisenach, Haichuan Yang, Ji Liu, and Han Liu. Marginal policy gradients: A unified family of estimators for bounded action spaces with applications. arXiv preprint arXiv:1806.05134, 2018.
160
+
161
+ Robert M French. Catastrophic forgetting in connectionist networks. Trends in cognitive sciences, 3(4):128–135, 1999.
162
+
163
+ Justin Fu, Aviral Kumar, Matthew Soh, and Sergey Levine. Diagnosing bottlenecks in deep qlearning algorithms. arXiv preprint arXiv:1902.10250, 2019.
164
+
165
+ Scott Fujimoto, Herke van Hoof, and Dave Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
166
+
167
+ Yasuhiro Fujita and Shin-ichi Maeda. Clipped action policy gradient. arXiv preprint arXiv:1802.07564, 2018.
168
+
169
+ Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In International Conference on Machine Learning, pp. 2829– 2838, 2016.
170
+
171
+ Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1352–1361. JMLR. org, 2017.
172
+
173
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018a.
174
+
175
+ Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, et al. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018b.
176
+
177
+ Matthew Hausknecht and Peter Stone. Deep reinforcement learning in parameterized action space. arXiv preprint arXiv:1511.04143, 2015.
178
+
179
+ Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
180
+
181
+ Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
182
+
183
+ Dan Horgan, John Quan, David Budden, Gabriel Barth-Maron, Matteo Hessel, Hado Van Hasselt, and David Silver. Distributed prioritized experience replay. arXiv preprint arXiv:1803.00933, 2018.
184
+
185
+ Yuenan Hou, Lifeng Liu, Qing Wei, Xudong Xu, and Chunlin Chen. A novel ddpg method with prioritized experience replay. In 2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC), pp. 316–321. IEEE, 2017.
186
+
187
+ Riashat Islam, Peter Henderson, Maziar Gomrokchi, and Doina Precup. Reproducibility of benchmarked deep reinforcement learning tasks for continuous control. arXiv preprint arXiv:1708.04133, 2017.
188
+
189
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
190
+
191
+ Eric Langlois, Shunshi Zhang, Guodong Zhang, Pieter Abbeel, and Jimmy Ba. Benchmarking model-based reinforcement learning. arXiv preprint arXiv:1907.02057, 2019.
192
+
193
+ Sergey Levine and Vladlen Koltun. Guided policy search. In International Conference on Machine Learning, pp. 1–9, 2013.
194
+
195
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. The Journal of Machine Learning Research, 17(1):1334–1373, 2016.
196
+
197
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
198
+
199
+ James L McClelland, Bruce L McNaughton, and Randall C O’reilly. Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory. Psychological review, 102(3):419, 1995.
200
+
201
+ Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989.
202
+
203
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
204
+
205
+ Ofir Nachum, Mohammad Norouzi, Kelvin Xu, and Dale Schuurmans. Bridging the gap between value and policy based reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2775–2785, 2017.
206
+
207
+ Guido Novati and Petros Koumoutsakos. Remember and forget for experience replay. arXiv preprint arXiv:1807.05827, 2018.
208
+
209
+ Martin L Puterman. Markov Decision Processes.: Discrete Stochastic Dynamic Programming. John Wiley & Sons, 2014.
210
+
211
+ Roger Ratcliff. Connectionist models of recognition memory: constraints imposed by learning and forgetting functions. Psychological review, 97(2):285, 1990.
212
+
213
+ Konrad Rawlik, Marc Toussaint, and Sethu Vijayakumar. On stochastic optimal control and reinforcement learning by approximate inference. In Twenty-Third International Joint Conference on Artificial Intelligence, 2013.
214
+
215
+ Anthony Robins. Catastrophic forgetting, rehearsal and pseudorehearsal. Connection Science, 7(2): 123–146, 1995.
216
+
217
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
218
+
219
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International Conference on Machine Learning, pp. 1889–1897, 2015.
220
+
221
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
222
+
223
+ Christopher Schulze and Marcus Schulze. Vizdoom: Drqn with prioritized experience replay, double-q learning and snapshot ensembling. In Proceedings of SAI Intelligent Systems Conference, pp. 1–17. Springer, 2018.
224
+
225
+ Emanuel Todorov. General duality between optimal control and estimation. In 2008 47th IEEE Conference on Decision and Control, pp. 4286–4292. IEEE, 2008.
226
+
227
+ Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In AAAI, volume 2, pp. 5. Phoenix, AZ, 2016.
228
+
229
+ Quan Vuong, Yiming Zhang, and Keith W Ross. Supervised policy update for deep reinforcement learning. arXiv preprint arXiv:1805.11706, 2018.
230
+
231
+ Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Van Hasselt, Marc Lanctot, and Nando De Freitas. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581, 2015.
232
+
233
+ Ziyu Wang, Victor Bapst, Nicolas Heess, Volodymyr Mnih, Remi Munos, Koray Kavukcuoglu, and Nando de Freitas. Sample efficient actor-critic with experience replay. arXiv preprint arXiv:1611.01224, 2016.
234
+
235
+ Rui Zhao and Volker Tresp. Curiosity-driven experience prioritization via density estimation. arXiv preprint arXiv:1902.08039, 2019.
236
+
237
+ Brian D Ziebart. Modeling purposeful adaptive behavior with the principle of maximum causal entropy. PhD thesis, figshare, 2010.
238
+
239
+ Brian D Ziebart, Andrew Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. 2008.
240
+
241
+ # A ABLATION STUDY
242
+
243
+ In this ablation study we separately examine the importance of $( i )$ the normalization at the output of the policy network; $( i i )$ the double Q networks; (iii) and randomization used in the line 8 of the SOP algorithm (that is, target policy smoothing (Fujimoto et al., 2018)).
244
+
245
+ Figure 5 shows the results for the five environments considered in this paper. In Figure 5, “no normalization” is SOP without the normalization of the outputs of the policy network; “single $\mathrm { Q } ^ { \mathrm { , } }$ is SOP with one Q-network instead of two; and “no smoothing” is SOP without the randomness in line 8 of the algorithm.
246
+
247
+ Figure 5 confirms that double Q-networks are critical for obtaining good performance (Van Hasselt et al., 2016; Fujimoto et al., 2018; Haarnoja et al., 2018a). Figure 5 also shows that output normalization is also critical. Without output normalization, performance fluctuates wildly, and average performance can decrease dramatically, particularly for Humanoid and HalfCheetah. Target policy smoothing improves performance by a relatively small amount.
248
+
249
+ ![](images/f121a25f03fa18b60add965b59fe16370fefc3650fc75a7b95f3f7f5da43bfc5.jpg)
250
+ Figure 5: Ablation Study
251
+
252
+ # B HYPERPARAMETERS
253
+
254
+ Table 2 shows hyperparameters used for SOP, $_ { \mathrm { S O P + E R E } }$ and $\mathrm { S O P { + } P E R }$ . For adaptive SAC, we use our own PyTorch implementation for the comparisons. Our implementation uses the same hyperparameters as used in the original paper (Haarnoja et al., 2018b). Our implementation of SOP variants and adaptive SAC share most of the code base. For TD3, our implementation uses the same hyperparamters as used in the authors’ implementation, which is different from the ones in the original paper (Fujimoto et al., 2018). They claimed that the new set of hyperparamters can improve performance for TD3. We now discuss hyperparameter search for better clarity, fairness and reproducibility (Henderson et al., 2018; Duan et al., 2016; Islam et al., 2017).
255
+
256
+ For the $\eta$ value in the ERE scheme, in our early experiments we tried the values (0.993, 0.994, 0.995, 0.996, 0.997, 0.998) on the Ant and found 0.995 to work well. This initial range of values was decided by computing the ERE sampling range for the oldest data. We found that for smaller values, the range would simply be too small. For the PER scheme, we did some informal preliminary search, then searched on Ant for $\beta _ { 1 }$ in (0, 0.4, 0.6, 0.8), $\beta _ { 2 }$ in (0, 0.4, 0.5, 0.6, 1), and learning rate in (1e-4, 2e-4, 3e-4, 5e-4, 8e-4, 1e-3), we decided to search these values because the original paper used $\beta _ { 1 } = 0 . 6$ , $\beta _ { 2 } = 0 . 4$ and with reduced learning rate. For the exponential sampling scheme, we searched the $\lambda$ value in (3e-7, 1e-6, 3e-6, 5e-6, 1e-5, 3e-5, 5e-5, 1e-4) in Ant, this search range was decided by plotting out the probabilities of sampling, and then pick a set of values that are not too extreme. For $\sigma$ in SOP, in some of our early experiments with SAC, we accidentally found that $\sigma = 0 . 3$ gives good performance for SAC without entropy and with Gaussian noise. We searched values (0.27, 0.28, 0.29, 0.3). For $\sigma$ values for $\mathrm { T D } 3 +$ , we searched values (0.1, 0.15, 0.2, 0.25, 0.3).
257
+
258
+ Table 2: SOP Hyperparameters
259
+
260
+ <table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>Value</td></tr><tr><td rowspan=1 colspan=1>Sharedoptimizerlearning ratediscount (γ)target smoothing coefficient (p)target update intervalreplay buffer sizenumber of hidden layers for all networksnumber of hidden units per layermini-batch sizenonlinearity</td><td rowspan=1 colspan=1>Adam (Kingma &amp; Ba,2014)3.10-40.990.00511062256256ReLU</td></tr><tr><td rowspan=1 colspan=1>SAC adaptiveentropy target</td><td rowspan=1 colspan=1>dim(A) (e.g., 6 for HalfCheetah-v2)</td></tr><tr><td rowspan=1 colspan=1>SOPgaussian noise std σ = O1 = 02</td><td rowspan=1 colspan=1>0.29</td></tr><tr><td rowspan=1 colspan=1>TD3gaussian noise std for data collection o guassian noise std for target policy smoothing o</td><td rowspan=1 colspan=1>0.1 * action limit0.2</td></tr><tr><td rowspan=1 colspan=1>TD3+gaussian noise std for data collection o guassian noise std for target policy smoothing </td><td rowspan=1 colspan=1>0.150.2</td></tr><tr><td rowspan=1 colspan=1>EREERE initial no</td><td rowspan=1 colspan=1>0.995</td></tr><tr><td rowspan=1 colspan=1>PERPER βi (α in PER paper)PER β2 (β in PER paper)</td><td rowspan=1 colspan=1>0.40.4</td></tr><tr><td rowspan=1 colspan=1>EXPExponential 入</td><td rowspan=1 colspan=1>5e-06</td></tr></table>
261
+
262
+ # C ERE PSEUDOCODE
263
+
264
+ 1: Input: initial policy parameters $\theta$ , Q-function parameters $\phi _ { 1 }$ , $\phi _ { 2 }$ , empty replay buffer $\mathcal { D }$ of s $N$ , initial $\eta _ { 0 }$ , recent and max performance improvement $I _ { r e c e n t } = I _ { m a x } = 0$ .
265
+ 2: Set target parameters equal to main parameters $\phi _ { \mathrm { t a r g , i } } \phi _ { i }$ for $\mathrm { i } = 1 , 2$
266
+ 3: repeat
267
+ 4: Generate an episode using actions $a = M \mathrm { t a n h } ( \mu _ { \theta } ( s ) + \epsilon )$ where $\epsilon \sim \mathcal { N } ( 0 , \sigma _ { 1 } )$ .
268
+ 5: update $I _ { r e c e n t } , I _ { m a x }$ with training episode returns, let $K =$ length of episode
269
+ 6: co ute $\begin{array} { r } { \eta = \eta _ { 0 } \cdot \frac { I _ { r e c e n t } } { I _ { m a x } } + ( 1 - \frac { I _ { r e c e n t } } { I _ { m a x } } ) } \end{array}$
270
+ 7: 8: for $j$ in rangompute $( K )$ $c _ { k } = N \cdot \eta ^ { k { \frac { 1 0 0 0 } { K } } }$
271
+ 9: Sample a batch of transitions, $B = \{ ( s , a , r , s ) \}$ from most recent $c _ { k }$ data in $\mathcal { D }$
272
+ 10: Compute targets for Q functions: $\begin{array} { r } { \dot { y } _ { q } ( r , s ^ { \prime } ) = r + \gamma \operatorname* { m i n } _ { i = 1 , 2 } Q _ { \phi _ { \mathrm { t a r g } , i } } ( s ^ { \prime } , M \mathrm { t a n h } ( \mu _ { \theta } ( s ^ { \prime } ) + \delta ) ) \quad \delta \sim \mathcal { N } ( 0 , \sigma _ { 2 } ) } \end{array}$
273
+ 11: Update Q-functions by one step of gradient descent using $\begin{array} { r } { \nabla _ { \phi _ { i } } \frac { 1 } { | B | } \sum _ { ( s , a , r , s ^ { \prime } ) \in B } \big ( Q _ { \phi , i } ( s , a ) - y _ { q } ( r , s ^ { \prime } ) \big ) ^ { 2 } } \end{array}$ for $i = 1 , 2$
274
+ 12: Update policy by one step of gradient ascent using $\begin{array} { r } { \nabla _ { \boldsymbol { \theta } } \frac { 1 } { | \boldsymbol { B } | } \dot { \sum _ { s \in B } } Q _ { \phi , 1 } \big ( \dot { s } , M \operatorname { t a n h } ( \mu _ { \boldsymbol { \theta } } ( s ) ) \big ) } \end{array}$
275
+ 13: Update target networks with ${ \phi } _ { \mathrm { t a r g , i } } \dot { } \rho { \phi } _ { \mathrm { t a r g , i } } + ( 1 - \rho ) { \phi } _ { i } \mathrm { f o r } i = 1 , 2$
276
+
277
+ # D INVERTING GRADIENT METHOD
278
+
279
+ In this section we discuss the details of the Inverting Gradient method.
280
+
281
+ Hausknecht & Stone (2015) discussed three different methods for bounded parameter space learning: Zeroing Gradients, Squashing Gradients and Inverting Gradients, they analyzed and tested the three methods and found that Inverting Gradients method can achieve much stronger performance than the other two. In our implementation, we remove the tanh function from SOP and use Inverting Gradients instead to bound the actions. Let $p$ indicate the output of the last layer of the policy network. During exploration $p$ will be the mean of a normal distribution that we sample actions from, the IG approach can be summarized by the following equation (Hausknecht & Stone, 2015):
282
+
283
+ $$
284
+ \nabla _ { p } = \nabla _ { p } \cdot \left\{ \begin{array} { l l } { ( p _ { \mathrm { m a x } } - p ) / ( p _ { \mathrm { m a x } } - p _ { \mathrm { m i n } } ) } & { \mathrm { i f ~ } \nabla _ { p } \mathrm { ~ s u g g e s t s ~ i n c r e a s i n g ~ } p } \\ { ( p - p _ { \mathrm { m i n } } ) / ( p _ { \mathrm { m a x } } - p _ { \mathrm { m i n } } ) } & { \mathrm { o t h e r w i s e } } \end{array} \right.
285
+ $$
286
+
287
+ Where $\nabla _ { p }$ is the gradient of the policy loss w.r.t to $p$ . During a policy network update, we first backpropagate the gradients from the outputs of the Q network to the output of the policy network for each data point in the batch, we then compute the ratio $( p _ { \mathrm { m a x } } - p ) / ( p _ { \mathrm { m a x } } - p _ { \mathrm { m i n } } )$ or $( p _ { \mathrm { m a x } } -$ $p ) / ( p _ { \mathrm { m a x } } - \bar { p _ { \mathrm { m i n } } } )$ for each $p$ value (each action dimension), depending on the sign of the gradient. We then backpropagate from the output of the policy network to parameters of the policy network, and we modify the gradients in the policy network according to the ratios we computed. We made an efficient implementation and further discuss the computation efficiency of IG in the implementation details section.
288
+
289
+ # E SOP WITH OTHER SAMPLING SCHEMES
290
+
291
+ We also investigate the effect of other interesting sampling schemes.
292
+
293
+ # E.1 SAC WITH PRIORITIZED EXPERIENCE REPLAY
294
+
295
+ We also implement the proportional variant of Prioritized Experience Replay (Schaul et al., 2015) with SOP.
296
+
297
+ Since SOP has two Q-networks, we redefine the absolute TD error $| \delta |$ of a transition $( s , a , r , s ^ { \prime } )$ to be the average absolute TD error in the Q network update:
298
+
299
+ $$
300
+ \vert \delta \vert = \frac 1 2 \sum _ { l = 1 } ^ { 2 } \vert y _ { q } ( r , s ^ { \prime } ) - Q _ { \phi , l } ( s , a ) \vert
301
+ $$
302
+
303
+ Within the sum, the first term $\begin{array} { r } { y _ { q } ( r , s ^ { \prime } ) = r + \gamma \operatorname* { m i n } _ { i = 1 , 2 } Q _ { \phi _ { \mathrm { t a r g } , i } } ( s ^ { \prime } , \operatorname { t a n h } ( \mu _ { \theta } ( s ^ { \prime } ) + \delta ) ) , \delta \sim \mathcal N ( 0 , \sigma _ { 2 } ) } \end{array}$ is simply the target for the Q network, and the term $Q _ { \theta , l } ( s , a )$ is the current estimate of the $l ^ { t h } \textbf { Q }$ network. For the $i ^ { t h }$ data point, the definition of the priority value $p _ { i }$ is $p _ { i } = | \delta _ { i } | + \epsilon$ . The probability of sampling a data point $P ( i )$ is computed as:
304
+
305
+ $$
306
+ P ( i ) = \frac { p _ { i } ^ { \beta _ { 1 } } } { \sum _ { j } p _ { j } ^ { \beta _ { 1 } } }
307
+ $$
308
+
309
+ where $\beta _ { 1 }$ is a hyperparameter that controls how much the priority value affects the sampling probability, which is denoted by $\alpha$ in Schaul et al. (2015), but to avoid confusion with the $\alpha$ in SAC, we denote it as $\beta _ { 1 }$ . The importance sampling (IS) weight $w _ { i }$ for a data point is computed as:
310
+
311
+ $$
312
+ w _ { i } = ( \frac { 1 } { N } \cdot \frac { 1 } { P ( i ) } ) ^ { \beta _ { 2 } }
313
+ $$
314
+
315
+ where $\beta _ { 2 }$ is denoted as $\beta$ in Schaul et al. (2015).
316
+
317
+ Based on the SOP algorithm, we change the sampling method from uniform sampling to sampling using the probabilities $P ( i )$ , and for the Q updates we apply the IS weight $w _ { i }$ . This gives SOP with Prioritized Experience Replay (SOP+PER). We note that as compared with $\mathrm { S O P { + } P E R }$ , ERE does not require a special data structure and has negligible extra cost, while PER uses a sum-tree structure with some additional computational cost. We also tried several variants of $\mathrm { S O P { + } P E R }$ , but preliminary results show that it is unclear whether there is improvement in performance, so we kept the algorithm simple.
318
+
319
+ # E.2 SOP WITH EXPONENTIAL SAMPLING
320
+
321
+ The ERE scheme is similar to an exponential sampling scheme where we assign the probability of sampling according to the probability density function of an exponential distribution. Essentially, in such a sampling scheme, the more recent data points get exponentially more probability of being sampled compared to older data.
322
+
323
+ For the $i ^ { t h }$ most recent data point, the probability of sampling a data point $P ( i )$ is computed as:
324
+
325
+ $$
326
+ P ( i ) = \lambda e ^ { - \lambda x }
327
+ $$
328
+
329
+ We apply this sampling scheme to SOP and refer to this variant as SOP+EXP.
330
+
331
+ # E.3 PER AND EXP EXPERIMENT RESULTS
332
+
333
+ Figure 6 shows a performance comparison of SOP, SOP $+$ ERE, $\mathrm { S O P { + } E X P }$ and SOP+PER. Results show that the exponential sampling scheme gives a boost to the performance of SOP, and especially in the Humanoid environment, although not as good as ERE. Surprisingly, SOP+PER does not give a significant performance boost to SOP (if any boost at all). We also found that it is difficult to find hyperparameter settings for $\mathrm { S O P { + } P E R }$ that work well for all environments. Some of the other hyperparameter settings actually reduce performance. It is unclear why PER does not work so well for SOP. A similar result has been found in another recent paper (Fu et al., 2019), showing that PER can significantly reduce performance on TD3. Further research is needed to understand how PER can be successfully adapted to environments with continuous action spaces and dense reward structure.
334
+
335
+ ![](images/c6e5d3de5aaf676639243467053f3171722a3785080a07f283480f09babe6955.jpg)
336
+ Figure 6: Streamlined Off-Policy (SOP), with ERE and PER sampling schemes
337
+
338
+ # F ADDITIONAL ERE ANALYSIS
339
+
340
+ Figure 7 shows, for fixed $\eta$ , how $\eta$ affects the data sampling process, under the ERE sampling scheme. Recent data points have a much higher probability of being sampled compared to older data, and a smaller $\eta$ value gives more emphasis to recent data.
341
+
342
+ Different $\eta$ values are desirable depending on how fast the agent is learning and how fast the past experiences become obsolete. So to make ERE work well in different environments with different reward scales and learning progress, we adapt $\eta$ to the the speed of learning. To this end, define performance to be the training episode return. Define $I _ { r e c e n t }$ to be how much performance improved from $N / 2$ timesteps ago, and $I _ { m a x }$ to be the maximum improvement throughout training, where $N$ is the buffer size. Let the hyperparameter $\eta _ { 0 }$ be the initial $\eta$ value. We then adapt $\eta$ according to the formula: $\eta = \eta _ { 0 } \cdot I _ { r e c e n t } / I _ { m a x } + 1 - ( I _ { r e c e n t } / I _ { m a x } )$ .
343
+
344
+ Under such an adaptive scheme, when the agent learns quickly, the $\eta$ value is low in order to learn quickly from new data. When progress is slow, $\eta$ is higher to make use of the stabilizing effect of uniform sampling from the whole buffer.
345
+
346
+ ![](images/3b8c311ff8da3cd184d83e3df6a46db4181aa6a1e5df8658994ead13d30cb150.jpg)
347
+ Figure 7: Effect of different $\eta$ values. The plots assume a replay buffer with 1 million samples, and $1 { , } 0 0 0 \mathrm { m i n i }$ -batches of size 256 in an update phase. Figure $\mathrm { 7 a }$ plots $c _ { k }$ (ranging from 0 to 1 million) as a function of $k$ (ranging from 1 to 1,000). Figure $\mathrm { 7 b }$ plots the expected number of times a data point in the buffer is sampled, with the data points ordered from most to least recent.
348
+
349
+ # G ADDITIONAL IMPLEMENTATION DETAILS
350
+
351
+ # G.1 ERE IMPLEMENTATION
352
+
353
+ In this section we discuss some programming details. These details are not necessary for understanding the algorithm, but they might help with reproducibility.
354
+
355
+ In the ERE scheme, the sampling range always starts with the entire buffer (1M data) and then gradually shrinks. This is true even when the buffer is not full. So even if there are not many data points in the buffer, we compute $c _ { k }$ based as if there are 1M data points in the buffer. One can also modify the design slightly to obtain a variant that uses the current amount of data points to compute $c _ { k }$ . In addition to the reported scheme, we also tried shrinking the sampling range linearly, but it gives less performance gain.
356
+
357
+ In our implementation we set the number of updates after an episode to be the same as the number of timesteps in that episode. Since environments do not always end at 1000 timesteps, we can give a more general formula for $c _ { k }$ . Let $K$ be the number of mini-batch updates, let $N$ be the max size of the replay buffer, then:
358
+
359
+ $$
360
+ c _ { k } = N \cdot \eta ^ { k { \frac { 1 0 0 0 } { K } } }
361
+ $$
362
+
363
+ With this formulation, the range of sampling shrinks in more or less the same way with varying number of mini-batch updates. We always do uniform sampling in the first update, and we always have ηK 1000K $\eta ^ { K \frac { 1 0 0 0 } { K } } = \eta ^ { 1 0 0 0 }$ η1000 in the last update.
364
+
365
+ When $\eta$ is small, $c _ { k }$ can also become small for some of the mini-batches. To prevent getting a minibatch with too many repeating data points, we set the minimum value for $c _ { k }$ to 5000. We did not find this value to be too important and did not find the need to tune it. It also does not have any effect for any $\eta \geq 0 . 9 9 5$ since the sampling range cannot be lower than 6000.
366
+
367
+ In the adaptive scheme with buffer of size 1M, the recent performance improvement is computed as the difference of the current episode return compared to the episode return 500,000 timesteps earlier.
368
+
369
+ Before we reach 500,000 timesteps, we simply use $\eta _ { 0 }$ . The exact way of computing performance improvement does not have a significant effect on performance as long as it is reasonable.
370
+
371
+ # G.2 PROGRAMMING AND COMPUTATION COMPLEXITY
372
+
373
+ In this section we give analysis on the additional programming and computation complexity brought by ERE and PER.
374
+
375
+ In terms of programming complexity, ERE is a clear winner since it only requires a small adjustment to how we sample mini-batches. It does not modify how the buffer stores the data, and does not require a special data structure to make it work efficiently. Thus the implementation difficulty is minimal. PER (proportional variant) requires a sum-tree data structure to make it run efficiently. The implementation is not too complicated, but compared to ERE it is a lot more work.
376
+
377
+ The exponential sampling scheme is very easy to implement, although a naive implementation will incur a significant computation overhead when sampling from a large buffer. To improve its computation efficiency, we instead uses an approximate sampling method. We first sample data indexes from segments of size 100 from the replay buffer, and then for each segment sampled, we sample one data point uniformly from that segment.
378
+
379
+ In terms of computation complexity (not sample efficiency), and wall-clock time, ERE’s extra computation is negligible. In practice we observe no difference in computation time between SOP and SOP+ERE. PER needs to update the priority of its data points constantly and compute sampling probabilities for all the data points. The complexity for sampling and updates is $\bar { O ( l o g ( N ) ) }$ , and the rank-based variant is similar (Schaul et al., 2015). Although this is not too bad, it does impose a significant overhead on SOP: SOP+PER runs twice as long as SOP. Also note that this overhead grows linearly with the size of the mini-batch. The overhead for the Mujoco environments is higher compared to Atari, possibly because the Mujoco environments have a smaller state space dimension while a larger batch size is used, making PER take up a larger portion of computation cost. For the exponential sampling scheme, the extra computation is also close to negligible when using the approximate sampling method.
380
+
381
+ In terms of the proposed normalization scheme and the Inverting Gradients (IG) method, the normalization is very simple and can be easily implemented and has negligible computation overhead. IG has a simple idea, but its implementation is slightly more complicated than the normalization scheme. When implemented naively, IG can have a large computation overhead, but it can be largely avoided by making sure the gradient computation is still done in a batch-manner. We have made a very efficient implementation and our code is publicly available so that interested reader can easily reproduce it.
382
+
383
+ # H ADDITIONAL EXPERIMENTAL RESULTS
384
+
385
+ # H.1 INVERTING GRADIENTS WITH ERE
386
+
387
+ In Figure 8 we show additional results on applying ERE to $\mathrm { S O P { + } I G }$ . The result shows that after applying the ERE scheme, SOP and IG both get a performance boost. The performance of the $\mathrm { S O P + }$ ERE and $\mathrm { I G } +$ ERE are similar.
388
+
389
+ # H.2 TD3 VERSUS TD3+
390
+
391
+ In figure 9, we show additional results comparing TD3 with TD3 plus our normalization scheme, which we refer as $\mathrm { T D } 3 +$ . The results show that after applying our normalization scheme, $\mathrm { T D } 3 +$ has a significant performance boost in Humanoid, while in other environments, both algorithms achieve similar performance.
392
+
393
+ ![](images/8f7dd1103a27e903cbfbfeadb55a5e9f1a033831cbacff2811c2dcf22f1fa2f8.jpg)
394
+ Figure 8: SOP and inverting gradients with ERE sampling scheme
395
+
396
+ ![](images/7045d822d7700f36c75f37ca47f6c3dab00c6a21b4a2301e841389f146889a93.jpg)
397
+ Figure 9: TD3 versus $\mathrm { T D } 3 +$ (TD3 plus the normalization scheme)
398
+
399
+ # I ADDITIONAL ANALYSIS AND RESULTS COMPARING SAC WITH AND WITHOUT ENTROPY
400
+
401
+ To understand why entropy maximization is important for one environment but less so for another, we examine the actions selected when training SAC with and without entropy. Humanoid and Walker2d have action dimensions $K \ : = \ : 1 7$ and $K \ : = \ : 6$ , respectively. In addition to the representative results shown for one dimension for both environments in Section 3.2, the results for all the dimensions are provided here in Figures 10 and 11.
402
+
403
+ From Figure 10, we see that for Humanoid using SAC (which uses entropy maximization), the $\left| \mu _ { k } \right|$ values are small and fluctuate significantly for all 17 dimensions. On the other hand, for SAC without entropy the $\left| \mu _ { k } \right|$ values are typically huge, again for all 17 dimensions. This causes the actions $a _ { k }$ to be persistently clustered at either $M$ or - $. M$ . As for Walker, the $\left| \mu _ { k } \right|$ values are sensible for both algorithms for all 6 dimensions, as shown in figure 11.
404
+
405
+ ![](images/6015d4f7d6c478b78b3cc4e75f09ebdbcdfdb6556d8f32f3a1bc3e8a48055e44.jpg)
406
+ Figure 10: Humanoid-v2: $\mu _ { k }$ and $a _ { k }$ values from SAC and SAC without entropy maximization
407
+
408
+ ![](images/b92a975e229174b4c46170be26078d6908746e7ca97115346a55c5db4d4af0b3.jpg)
409
+ Figure 10: Humanoid-v2: $\mu _ { k }$ and $a _ { k }$ values from SAC and SAC without entropy maximization
410
+
411
+ ![](images/53d141253c51cb5282a0e113f4f760a51dbee67098f7bf61002c14aee1a50296.jpg)
412
+ Figure 10: Humanoid-v2: $\mu _ { k }$ and $a _ { k }$ values from SAC and SAC without entropy maximization
413
+
414
+ ![](images/cbcfe5f433989053fc09e9bad90042c630532ca66c5f36f888be6f928c356df1.jpg)
415
+ Figure 11: Walker2d-v2: $\mu _ { k }$ and $a _ { k }$ values from SAC and SAC without entropy maximization
parse/train/SJl47yBYPS/SJl47yBYPS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJl47yBYPS/SJl47yBYPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJl47yBYPS/SJl47yBYPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJxhNTNYwB/SJxhNTNYwB.md ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BLACK-BOX ADVERSARIAL ATTACK WITH TRANSFERABLE MODEL-BASED EMBEDDING
2
+
3
+ Zhichao Huang, Tong Zhang
4
+ The Hong Kong University of Science and Technology
5
+ zhuangbx@connect.ust.hk, tongzhang@tongzhang-ml.org
6
+
7
+ # ABSTRACT
8
+
9
+ We present a new method for black-box adversarial attack. Unlike previous methods that combined transfer-based and scored-based methods by using the gradient or initialization of a surrogate white-box model, this new method tries to learn a low-dimensional embedding using a pretrained model, and then performs efficient search within the embedding space to attack an unknown target network. The method produces adversarial perturbations with high level semantic patterns that are easily transferable. We show that this approach can greatly improve the query efficiency of black-box adversarial attack across different target network architectures. We evaluate our approach on MNIST, ImageNet and Google Cloud Vision API, resulting in a significant reduction on the number of queries. We also attack adversarially defended networks on CIFAR10 and ImageNet, where our method not only reduces the number of queries, but also improves the attack success rate.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ The wide adoption of neural network models in modern applications has caused major security concerns, as such models are known to be vulnerable to adversarial examples that can fool neural networks to make wrong predictions (Szegedy et al., 2014). Methods to attack neural networks can be divided into two categories based on whether the parameters of the neural network are assumed to be known to the attacker: white-box attack and black-box attack. There are several approaches to find adversarial examples for black-box neural networks. The transfer-based attack methods first pretrain a source model and then generate adversarial examples using a standard white-box attack method on the source model to attack an unknown target network (Goodfellow et al., 2015; Madry et al., 2018; Carlini & Wagner, 2017; Papernot et al., 2016a). The score-based attack requires a loss-oracle, which enables the attacker to query the target network at multiple points to approximate its gradient. The attacker can then apply the white-box attack techniques with the approximated gradient (Chen et al., 2017; Ilyas et al., 2018a; Tu et al., 2018).
14
+
15
+ A major problem of the transfer-based attack is that it can not achieve very high success rate. And transfer-based attack is weak in targeted attack. On the contrary, the success rate of score-based attack has only small gap to the white-box attack but it requires many queries. Thus, it is natural to combine the two black-box attack approaches, so that we can take advantage of a pretrained white-box source neural network to perform more efficient search to attack an unknown target black-box model.
16
+
17
+ In fact, in the recent NeurIPS 2018 Adversarial Vision Challenge (Brendel et al., 2018), many teams transferred adversarial examples from a source network as the starting point to carry out black-box boundary attack (Brendel et al., 2017). N Attack also used a regression network as initialization in the score-based attack (Li et al., 2019a). The transferred adversarial example could be a good starting point that lies close to the decision boundary for the target network and accelerate further optimization. P-RGF (Cheng et al., 2019) used the gradient information from the source model to accelerate searching process. However, gradient information is localized and sometimes it is misleading. In this paper, we push the idea of using a pretrained white-box source network to guide black-box attack significantly further, by proposing a method called TRansferable EMbedding based Black-box Attack (TREMBA). TREMBA contains two stages: (1) train an encoder-decoder that can effectively generate adversarial perturbations for the source network with a low-dimensional embedding space; (2) apply NES (Natural Evolution Strategy) of (Wierstra et al., 2014) to the low-dimensional embedding space of the pretrained generator to search adversarial examples for the target network. TREMBA uses global information of the source model, capturing high level semantic adversarial features that are insensitive to different models. Unlike noise-like perturbations, such perturbations would have much higher transferablity across different models. Therefore we could gain query efficiency by performing queries in the embedding space.
18
+
19
+ We note that there have been a number of earlier works on using generators to produce adversarial perturbations in the white-box setting (Baluja & Fischer, 2018; Xiao et al., 2018; Wang & Yu, 2019). While black-box attacks were also considered there, they focused on training generators with dynamic distillation. These early approaches required many queries to fine-tune the classifier for different target networks, which may not be practical for real applications. While our approach also relies on a generator, we train it as an encoder-decoder that produces a low-dimensional embedding space. By applying a standard black-box attack method such as NES on the embedding space, adversarial perturbations can be found efficiently for a target model.
20
+
21
+ It is worth noting that the embedding approach has also been used in AutoZOOM (Tu et al., 2018). However, it only trained the autoencoder to reconstruct the input, and it did not take advantage of the information of a pretrained network. Although it also produces structural perturbations, these perturbations are usually not suitable for attacking regular networks and sometimes its performance is even worse than directly applying NES to the images (Cheng et al., 2019; Guo et al., 2019). TREMBA, on the other hand, tries to learn an embedding space that can efficiently generate adversarial perturbations for a pretrained source network. Compared to AutoZOOM, our new method produces adversarial perturbation with high level semantic features that could hugely affect arbitrary target networks, resulting in significantly lower number of queries.
22
+
23
+ We summarize our contributions as follows:
24
+
25
+ 1. We propose TREMBA, an attack method that explores a novel way to utilize the information of a pretrained source network to improve the query efficiency of black-box attack on a target network.
26
+ 2. We show that TREMBA can produce adversarial perturbations with high level semantic patterns, which are effective across different networks, resulting in much lower queries on MNIST and ImageNet especially for the targeted attack that has low transferablity.
27
+ 3. We demonstrate that TREMBA can be applied to SOTA defended models (Madry et al., 2018; Xie et al., 2018). Compared with other black-box attacks, TREMBA increases success rate by approximately $1 0 \%$ while reduces the number of queries by more than $5 0 \%$ .
28
+
29
+ # 2 RELATED WORKS
30
+
31
+ There have been a vast literature on adversarial examples. We will cover the most relevant topics including white-box attack, black-box attack and defense methods.
32
+
33
+ White-Box Attack White-box attack requires the full knowledge of the target model. It was first discovered by (Szegedy et al., 2014) that adversarial examples could be found by solving an optimization problem with L-BFGS (Nocedal, 1980). Later on, other methods were proposed to find adversarial examples with improved success rate and efficiency (Goodfellow et al., 2015; Kurakin et al., 2016; Papernot et al., 2016b; Moosavi-Dezfooli et al., 2016). More recently, it was shown that generators can also construct adversarial noises with high success rate (Xiao et al., 2018; Baluja & Fischer, 2018).
34
+
35
+ Black-Box Attack Black-box attack can be divided into three categories: transfer-based, score-based and decision-based. It is well known that adversaries have high transferablity across different networks (Papernot et al., 2016a). Transfer-based methods generate adversarial noises on a source model and then transfer it to an unknown target network. It is known that targeted attack is harder than untargeted attack for transfer-based methods, and using an ensemble of source models can improve the success rate (Liu et al., 2016). Score-based attack assumes that the attacker can query the output scores of the target network. The attacker usually uses sampling methods to approximate the true gradient (Chen et al., 2017; Ilyas et al., 2018a; Li et al., 2019a; Chen et al., 2018). AutoZOOM tried to improve the query efficiency by reducing the sampling space with a bilinear transformation or an autoencoder (Tu et al., 2018). (Ilyas et al., 2018b) incorporated data and time prior to accelerate attacking. In contrast to the gradient based method, (Moon et al., 2019) used combinatorial optimization to achieve good efficiency. In decision-based attack, the attacker only knows the output label of the classifier. Boundary attack and its variants are very powerful in this setting (Brendel et al., 2017; Dong et al., 2019). In NeutIPS 2018 Adversarial Vision Challenge (Brendel et al., 2018), some teams combined transfer-based attack and decision-based attack in their attacking methods (Brunner et al., 2018). And in a similar spirit, $\mathcal { N }$ Attack also used a regression network as initialization in score-based attack (Li et al., 2019a). Gradient information from the surrogate model could also be used to accelerate the scored-based attack (Cheng et al., 2019) .
36
+
37
+ Defense Methods Several methods have been proposed to overcome the vulnerability of neural networks. Gradient masking based methods add non-differential operations in the model, interrupting the backward pass of gradients. However, they are vulnerable to adversarial attacks with the approximated gradient (Athalye et al., 2018; Li et al., 2019a). Adversarial training is the SOTA method that can be used to improve the robustness of neural networks. Adversarial training is a minimax game. The outside minimizer performs regular training of the neural network, and the inner maximizer finds a perturbation of the input to attack the network. The inner maximization process can be approximated with FGSM (Goodfellow et al., 2015), PGD (Madry et al., 2018), adversarial generator (Wang & Yu, 2019) etc. Moreover, feature denoising can improve the robustness of neural networks on ImageNet (Xie et al., 2018).
38
+
39
+ # 3 BLACK-BOX ADVERSARIAL ATTACK WITH GENERATOR
40
+
41
+ Consider a DNN classifier $F ( x )$ . Let $x \in [ 0 , 1 ] ^ { \dim ( x ) }$ be an input, and let $F ( x )$ be the output vector obtained before the softmax layer. We denote $F ( x ) _ { i }$ as the $i$ -th component for the output vector and $y$ as the label for the input. For un-targeted attack, our goal is to find a small perturbation $\delta$ such that the classifier predicts the wrong label, i.e. arg max $F ( x + \delta ) \neq y$ . And for targeted attack, we want the classifier to predicts the target label $t$ , i.e. arg max $F ( x + \delta ) = t$ . The perturbation $\delta$ is usually bounded by $\ell _ { p }$ norm: $\| \delta \| _ { p } \leq \varepsilon$ , with a small $\varepsilon > 0$ .
42
+
43
+ Adversarial perturbations often have high transferablity across different DNNs. Given a white-box source DNN $F _ { s }$ with known architecture and parameters, we can transfer its white-box adversarial perturbation $\delta _ { s }$ to a black-box target DNN $F _ { t }$ with reasonably good success rate. It is known that even if $x + \delta _ { s }$ fails to be an adversarial example, $\delta _ { s }$ can still act as a good starting point for searching adversarial examples using a score-based attack method. This paper shows that the information of $F _ { s }$ can be further utilized to train a generator, and performing search on its embedding space leads to more efficient black-box attacks of an unknown target network $F _ { t }$ .
44
+
45
+ # 3.1 GENERATING ADVERSARIAL PERTURBATIONS WITH GENERATOR
46
+
47
+ Adversarial perturbations can be generated by a generator network $\mathcal { G }$ . We explicitly divide the generator into two parts: an encoder $\mathcal { E }$ and a decoder $\mathcal { D }$ . The encoder takes the origin input $x$ and output a latent vector $z = \mathcal { E } ( x )$ , where $\dim ( z ) \ll \dim ( x )$ . The decoder takes $z$ as the input and outputs an adversarial perturbation $\delta = \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z ) )$ with $\dim ( \delta ) = \dim ( x )$ . In our new method, we will train the generator $\mathcal { G }$ so that $\delta = \varepsilon \operatorname { t a n h } ( \mathcal { G } ( x ) )$ can fool the source network $F _ { s }$ .
48
+
49
+ Suppose we have a training set $\left\{ \left( x _ { 1 } , y _ { 1 } \right) , \ldots , \left( x _ { n } , y _ { n } \right) \right\}$ , where $x _ { i }$ denotes the input and $y _ { i }$ denotes its label. For un-targeted attack, we train the desired generator by minimizing the hinge loss used in the C&W attack (Carlini & Wagner, 2017):
50
+
51
+ $$
52
+ \mathcal { L } _ { \mathrm { u n t a r g e t } } ( x _ { i } , y _ { i } ) = \operatorname* { m a x } \left( F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { G } ( x _ { i } ) ) + x _ { i } ) _ { y _ { i } } - \operatorname* { m a x } _ { j \neq y _ { i } } F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { G } ( x _ { i } ) ) + x _ { i } ) _ { j } , - \kappa \right) ,
53
+ $$
54
+
55
+ And for targeted, we use
56
+
57
+ $$
58
+ \mathcal { L } _ { \mathrm { t a r g e t } } ( x _ { i } , t ) = \operatorname* { m a x } \left( \operatorname* { m a x } _ { j \neq t } F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { G } ( x _ { i } ) ) + x _ { i } ) _ { j } - F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { G } ( x _ { i } ) ) + x _ { i } ) _ { t } , - \kappa \right) ,
59
+ $$
60
+
61
+ where $t$ denotes the targeted class and $\kappa$ is the margin parameter that can be used to adjust transferability of the generator. A higher value of $\kappa$ leads to higher transferability to other models (Carlini & Wagner, 2017). We focus on $\ell _ { \infty }$ norm in this work. By adding point-wise tanh function to an unnormalized output $\mathcal { D } ( z )$ , and scaling it with $\varepsilon$ $, \delta = \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z ) )$ is already bounded as $\| \delta \| _ { \infty } < \varepsilon$ .
62
+
63
+ Therefore we employ this transformation, so that we do not need to impose the infinity norm constraint explicitly. While hinge loss is employed in this paper, we believe other loss functions such the cross entropy loss will also work.
64
+
65
+ # 3.2 SEARCH OVER LATENT SPACE WITH NES
66
+
67
+ Given a new black-box DNN classifier $F _ { t } ( x )$ , for which we can only query its output at any given point $x$ . As in (Ilyas et al., 2018a; Wierstra et al., 2014), we can employ NES to approximate the gradient of a properly defined surrogate loss in order to find an adversarial example. Denote the surrogate loss by $\mathcal { L }$ , rather than calculating $\nabla _ { \delta } \mathcal { L } ( x + \delta , y )$ directly, NES update $\delta$ by using $\nabla _ { \delta } \mathbb { E } _ { \omega \sim \mathcal { N } ( \delta , \sigma ^ { 2 } ) } [ L ( x + \omega , y ) ]$ , which can be transformed into $\mathbb { E } _ { \omega \sim \mathcal { N } ( \delta , \sigma ^ { 2 } ) } [ L ( x + \omega , y ) \nabla _ { \omega } \log ( \mathcal { N } ( \omega | \delta , \sigma ^ { 2 } ) ) ]$ . The expectation can be approximated by taking finite samples. And we could use the following equation to iteratively update $\delta$ :
68
+
69
+ $$
70
+ \delta _ { t + 1 } = \prod _ { [ - \varepsilon , \varepsilon ] } ( \delta _ { t } - \eta \cdot \mathrm { s i g n } ( \frac { 1 } { b } \sum _ { k = 1 } ^ { b } \mathcal { L } ( x + \omega _ { k } , y ) \nabla \log \mathcal { N } ( \omega _ { k } | \delta _ { t } , \sigma ^ { 2 } ) ) ) ,
71
+ $$
72
+
73
+ where $\eta$ is the learning rate, $b$ is the minibatch sample size, $\omega _ { k }$ is the sample from the gaussian distribution and $\Pi _ { [ - \varepsilon , \varepsilon ] }$ represents a clipping operation, which projects $\delta$ onto the $\ell _ { \infty }$ ball. The sign function provides an approximation of the gradient, which has been widely used in adversarial attack (Ilyas et al., 2018a; Madry et al., 2018). However, it is observed that more effective attacks can be obtained by removing the sign function (Li et al., 2019b). Therefore in this work, we remove the sign function from Eqn (3) and directly use the estimated gradient.
74
+
75
+ Instead of performing search on the input space, TREMBA performs search on the embedding space $z$ . The generator $\mathcal { G }$ explores the weakness of the source DNN $F _ { s }$ so that $\mathcal { D }$ produces perturbations that can effective attack $F _ { s }$ . For a different unknown target network $F _ { t }$ , we show that our method can still generate perturbations leading to more effective attack of $F _ { t }$ . Given an input $x$ and its label $y$ we choose a starting point $z ^ { 0 } = \mathcal { E } \bar { ( x ) }$ . The gradient of $z ^ { t }$ given by NES can be estimated as:
76
+
77
+ $$
78
+ \begin{array} { r l } & { \nabla _ { z ^ { t } } \mathcal { L } ( x + \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z ^ { t } ) ) , y ) \approx \nabla _ { z ^ { t } } \mathbb { E } _ { \nu \sim \mathcal { N } ( z ^ { t } , \sigma ^ { 2 } ) } \left[ \mathcal { L } ( x + \varepsilon \operatorname { t a n h } ( \mathcal { D } ( \nu ) ) , y ) \right] } \\ & { \qquad \approx \displaystyle \frac { 1 } { b } \sum _ { k = 1 } ^ { b } \mathcal { L } ( x + \varepsilon \operatorname { t a n h } ( \mathcal { D } ( \nu _ { k } ) ) , y ) \nabla _ { z ^ { t } } \log \mathcal { N } ( \nu _ { k } | z ^ { t } , \sigma ^ { 2 } ) . } \end{array}
79
+ $$
80
+
81
+ where $\nu _ { k }$ is the sample from the gaussian distribution $\mathcal { N } ( z ^ { t } , \sigma ^ { 2 } )$ . Moreover, $z ^ { t }$ is updated with stochastic gradient descent. The detailed procedure is presented in Algorithm 1. We do not need to do projection explicitly since $\delta$ already satisfies $\| \delta \| _ { \infty } < \varepsilon$ .
82
+
83
+ Next we shall briefly explain why applying NES on the embedding space $z$ can accelerate the search process. Adversarial examples can be viewed as a distribution lying around a given input. Usually this distribution is concentrated on some small regions, making the search process relatively slow. After training on the source network, the adversarial perturbations of TREMBA would have high level semantic patterns that are likely to be adversarial patterns of the target network. Therefore searching over $z$ is like searching adversarial examples in a lower dimensional space containing likely adversarial patterns. The distribution of adversarial perturbations in this space is much less concentrated. It is thus much easier to find effective adversarial patterns in the embedding space.
84
+
85
+ # 4 EXPERIMENTS
86
+
87
+ We evaluated the number of queries versus success rate of TREMBA on undefended network in two datasets: MNIST (LeCun et al., 1998) and ImageNet (Russakovsky et al., 2015). Moreover, we evaluated the efficiency of our method on adversarially defended networks in CIFAR10 (Krizhevsky & Hinton, 2009) and ImageNet. We also attacked Google Cloud Vision API to show TREMBA can generalize to truly black-box model.1 We used the hinge loss from Eqn 1 and 2 as the surrogate loss for un-targeted and targeted attack respectively.
88
+
89
+ We compared TREMBA to four methods: (1) NES: Method introduced by (Ilyas et al., 2018a), but without the sign function for reasons explained earlier. (2) Trans-NES: Take an adversarial
90
+
91
+ Input: Target Network $F _ { t }$ ; Input $x$ and its label $y$ or the target class $t$ ; Encoder $\mathcal { E }$ ; Decoder $\mathcal { D }$ ; Standard deviation $\sigma$ ; Learning rate $\eta$ ; Sample size $b$ ; Iterations $T$ ; Bound for adversarial perturbation $\varepsilon$
92
+ Output: Adversarial perturbation $\delta$
93
+ 1: $\bar { z } _ { 0 } = \mathcal { E } ( x )$
94
+ 2: for $t = 1$ to $T$ do
95
+ 3: Sample Gaussian noise $\nu _ { 1 } , \nu _ { 2 } , \cdot \cdot \cdot , \nu _ { b } \sim \mathcal { N } ( z _ { t - 1 } , \sigma ^ { 2 } )$
96
+ 4: Calculate $\begin{array} { r } { \mathcal { L } _ { i } = \mathcal { L } _ { \mathrm { u n t a r g e t } } ( x , y ) } \end{array}$ or $\mathcal { L } _ { \mathrm { t a r g e t } } ( x , t )$
97
+ 5: Update $\begin{array} { r } { z _ { t } = z _ { t - 1 } - \frac { \eta } { b } \sum _ { i = 1 } ^ { b } \mathcal { L } _ { i } \nabla _ { z _ { t - 1 } } \log \mathcal { N } ( \nu _ { i } | z _ { t - 1 } , \sigma ^ { 2 } ) } \end{array}$
98
+ 6: end for
99
+ 7: return $\delta = \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z _ { T } ) )$
100
+
101
+ perturbation generated by PGD or FGSM on the source model to initialize NES. (3) AutoZOOM: Attack target network with an unsupervised autoencoder described in (Tu et al., 2018). For fair comparisons with other methods, the strategy of choosing sample size was removed. (4) P-RGF: Prior-guided random gradient-free method proposed in (Cheng et al., 2019). The $\mathrm { P - R G F _ { D } } ( \lambda ^ { * } )$ version was compared. We also combined P-RGF with initialization from Trans- ${ \bf \cdot N E S _ { P G D } }$ to form a more efficient method for comparison, denoted by Trans-P-RGF.
102
+
103
+ Since different methods achieve different success rates, we need to compare their efficiency at different levels of success rate. For method $i$ with success rate $s _ { i }$ , the average number of queries is $q _ { i }$ for all success examples. Let $q ^ { * }$ denote the upper limit of queries, we modified the average number of queries to be $q _ { i } ^ { * } = [ ( \operatorname* { m a x } _ { j } s _ { j } - s _ { i } ) \cdot q ^ { * } + s _ { i } \cdot q _ { i } ] / \operatorname* { m a x } _ { j } s _ { j }$ , which unified the level of success rate and treated queries of failure examples as the upper limit on the number of queries. Average queries sometimes could be misleading due to the the heavy tail distribution of queries. Therefore we plot the curve of success rate at different query levels to show the detailed behavior of different attacks.
104
+
105
+ The upper limit on the number of queries was set to 50000 for all datasets, which already gave very high success rate for nearly all the methods. Only correctly classified images were counted towards success rate and average queries. And to fairly compare these methods, we chose the sample size to be the same for all methods. We also added momentum and learning decay for optimization. And we counted the queries as one if its starting point successfully attacks the target classifier. The learning rate was fine-tuned for all algorithms. We listed the hyperparameters and architectures of generators and classifiers in Appendix B and C.
106
+
107
+ # 4.1 BLACK-BOX ATTACK ON MNIST
108
+
109
+ We trained four neural networks on MNIST, denoted by ConvNet1, ConvNet1\*, ConvNet2 and FCNet. ConvNet1\* and ConvNet1 have the same architecture but different parameters. All the network achieved about $9 9 \%$ accuracy. The generator $\mathcal { G }$ was trained on ConvNet1\* using all images from the training set. Each attack was tested on images from the MNIST test set. The limit of $\ell _ { \infty }$ was $\varepsilon = 0 . 2$
110
+
111
+ We performed un-targeted attack on MNIST. Table 1 lists the success rate and the average queries. Although the success rate of TREMBA is slightly lower than Trans-NES in ConvNet1 and FCNet, their success rate are already close to $1 0 0 \%$ and TREMBA achieves about $5 0 \%$ reduction of queries compared with other attacks. In contrast to efficient attack on ImageNet, P-RGF and Trans-P-RGF behaves very bad on MNIST. Figure 4.1 shows that TREMBA consistently achieves higher success rate at nearly all query levels.
112
+
113
+ # 4.2 BLACK-BOX ATTACK ON IMAGENET
114
+
115
+ We randomly divided the ImageNet validation set into two parts, containing 49000 and 1000 images respectively. The first part was used as the training data for the generator $\mathcal { G }$ , and the second part was used for evaluating the attacks. We evaluated the efficiency of all adversarial attacks on VGG19 (Simonyan & Zisserman, 2014), Resnet34 (He et al., 2016), DenseNet121 (Huang et al., 2017) and MobilenetV2 (Sandler et al., 2018). All networks were downloaded using torchvision package. We set $\varepsilon = 0 . 0 3 1 2 5$ .
116
+
117
+ Table 1: Success rate and average queries of un-targeted attack on MNIST. $\varepsilon = 0 . 2$
118
+
119
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">ConvNet1</td><td colspan="2">ConvNet2</td><td colspan="2">FCNet</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>97.88%</td><td>4380</td><td>90.32%</td><td>5428</td><td>99.98%</td><td>1183</td></tr><tr><td>Trans-NESPGD</td><td>98.65%</td><td>2113</td><td>90.22%</td><td>4691</td><td>99.99 %</td><td>818</td></tr><tr><td>Trans-NESFGSM</td><td>98.34%</td><td>3592</td><td>91.32%</td><td>4218</td><td>99.99%</td><td>1540</td></tr><tr><td>AutoZOOM</td><td>93.39%</td><td>5874</td><td>91.21%</td><td>2645</td><td>99.69%</td><td>823</td></tr><tr><td>P-RGF</td><td>68.53%</td><td>16135</td><td>39.85%</td><td>29692</td><td>90.42%</td><td>8289</td></tr><tr><td>Trans-P-RGF</td><td>66.34%</td><td>16428</td><td>27.57%</td><td>35576</td><td>68.39%</td><td>18818</td></tr><tr><td>TREMBA</td><td>98.00%</td><td>1064</td><td>92.63%</td><td>1359</td><td>99.75%</td><td>470</td></tr></table>
120
+
121
+ ![](images/62477a1ba933fee061fd231bbb9e64a52892f505e208cb4783fe74c2be01827c.jpg)
122
+ Figure 1: Success rate of un-targeted attack at different query levels for undefended MNIST models.
123
+
124
+ Following (Liu et al., 2016), we used an ensemble (VGG16, Resnet18, Squeezenet (Iandola et al., 2016) and Googlenet (Szegedy et al., 2015)) as the source model to improve transferablity (Liu et al., 2016) for both targeted and un-targeted attack. TREMBA, Trans-NES, P-RGF and Trans-P-RGF all used the same source model for fair comparison. We chose several target class. Here, we show the result of attacking class 0 (tench) in Table 2 and Figure 2. And we leave the result of attacking other classes in Appendix A.1. The average queries for TREMBA is about 1000 while nearly all the average queries for other methods are more than 6000. TREMBA also achieves much lower queries for un-targeted attack on ImageNet. The result is shown in Appendix A.2 due to space limitation. And we also compared TREMBA with CombOpt (Moon et al., 2019) in the Appendix A.9.
125
+
126
+ Figure 3 shows the adversarial perturbations of different methods. Unlike adversarial perturbations produced by PGD, the perturbations of TREMBA reflect some high level semantic patterns of the targeted class such as the fish scale. As neural networks usually capture such patterns for classification, the adversarial perturbation of TREMBA would be more easy to transfer than the noise-like perturbation produced by PGD. Therefore TREMBA can search very effectively for the target network. More examples of perturbations of TREMBA are shown in Appendix A.3.
127
+
128
+ Choice of ensemble: We performed attack on different ensembles of source model, which is shown in Appendix A.4. TREMBA outperforms the other methods in different ensemble model. And more source networks lead to better transferability for TREMBA, Trans-NES and Trans-P-RGF.
129
+
130
+ Varying $\varepsilon$ : We also changed $\varepsilon$ and performed attack on $\varepsilon \ = \ 0 . 0 2$ and $\varepsilon ~ = ~ 0 . 0 4$ . As shown in Appendix A.5, TREMBA still outperforms the other methods despite using the $\mathcal { G }$ trained on $\varepsilon = 0 . 0 3 1 2 5$ . We also show the result of TREMBA for commonly used $\varepsilon = 0 . 0 5$ .
131
+
132
+ Sample size and dimension the embedding space: To justify the choice of sample size, we performed a hyperparameter sweep over $b$ and the result is shown in Appendix A.6. And we also changed the dimension of the embedding space for AutoZOOM and Trans-P-RGF. As shown in Appendix A.7, the performance gain of TREMBA does not purely come from the diminishing of dimension of the embedding space.
133
+
134
+ # 4.3 BLACK-BOX ATTACK ON DEFENDED MODELS
135
+
136
+ This section presents the results for attacking defended networks. We performed un-targeted attack on two SOTA defense methods on CIFAR10 and ImageNet. MNIST is not studied since it is already robust against very strong white-box attacks. For CIFAR10, the defense model was going through PGD minimax training (Madry et al., 2018). We directly used their model as the source network2, denoted by WResnet. To test whether these methods can transfer to a defended network with a different architecture, we trained a defended ResNeXt (Xie et al., 2017) using the same method. For ImageNet, we used the SOTA model3 from (Xie et al., 2018). We used "ResNet152 Denoise" as the source model and transfered adversarial perturbations to the most robust "ResNeXt101 DenoiseAll". Following the previous settings, we set $\varepsilon = 0 . 0 3 1 2 5$ for both CIFAR10 and ImageNet.
137
+
138
+ Table 2: Success rate and average queries of black-box targeted attack on ImageNet. Targeted class is class 0 (tench). $\varepsilon = 0 . 0 3 1 2 5$
139
+
140
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>94.86%</td><td>12283</td><td>93.89%</td><td>14418</td><td>95.65%</td><td>12538</td><td>97.76%</td><td>10276</td></tr><tr><td>Trans-NESPGD</td><td>96.26%</td><td>6854</td><td>95.97%</td><td>8737</td><td>96.59%</td><td>8627</td><td>98.04%</td><td>9375</td></tr><tr><td>Trans-NESFGSM</td><td>90.85%</td><td>12885</td><td>91.81%</td><td>14090</td><td>93.61%</td><td>12859</td><td>97.48%</td><td>9983</td></tr><tr><td>AutoZOOM</td><td>25.80%</td><td>40195</td><td>26.25%</td><td>39681</td><td>31.98%</td><td>37628</td><td>27.03%</td><td>39689</td></tr><tr><td>P-RGF</td><td>96.12%</td><td>6951</td><td>90.28%</td><td>10221</td><td>91.84%</td><td>11563</td><td>88.94%</td><td>14596</td></tr><tr><td>Trans-P-RGF</td><td>98.06%</td><td>2262</td><td>93.61%</td><td>6309</td><td>94.69%</td><td>7263</td><td>91.60%</td><td>10048</td></tr><tr><td>TREMBA</td><td>98.47%</td><td>853</td><td>96.38%</td><td>1206</td><td>98.50%</td><td>1124</td><td>99.16%</td><td>1210</td></tr></table>
141
+
142
+ ![](images/39740db59edfe97f8e352e9e85b41520b0ee4ad16eaddb24968de5b4c4dc5804.jpg)
143
+ Figure 2: The success rate of black-box adversarial targeted attack at different query levels for ImageNet models. The targeted class is tench
144
+
145
+ ![](images/b2b014bf7c795555e27940cc09cc94ede76a925f4db69d34200ae8000fd64c81.jpg)
146
+ Figure 3: Visualization of adversarial perturbations targeted at tench
147
+
148
+ As shown in Table 3, TREMBA achieves higher success rates with lower number of queries. TREMBA achieves about $1 0 \%$ improvement of success rate while the average queries are reduced by more than $5 0 \%$ on ImageNet and by $8 0 \%$ on CIFAR10. The curves in Figure 4(a) and 4(b) show detailed behaviors. The performance of AutoZOOM surpasses Trans-NES on defended models. We suspect that low-frequency adversarial perturbations produced by AutoZOOM will be more suitable to fool the defended models than the regular networks. However, the patterns learned by AutoZOOM are still worse than adversarial patterns learned by TREMBA from the source network.
149
+
150
+ Table 3: Success rate of average queries of black-box un-targeted attack on defended CIFAR10 and ImageNet model. Source network is WResNet and ResNet152 Denoise.
151
+
152
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">CIFAR10 ResneXt</td><td colspan="2">ImageNet RexneXt101 DenoiseAll</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>32.17%</td><td>24521</td><td>29.72%</td><td>26526</td></tr><tr><td>Trans-NESPGD</td><td>32.92%</td><td>20735</td><td>32.84%</td><td>20446</td></tr><tr><td>Trans-NESFGSM</td><td>33.17%</td><td>20873</td><td>33.66%</td><td>18547</td></tr><tr><td>AutoZOOM</td><td>33.70%</td><td>14870</td><td>38.75%</td><td>14605</td></tr><tr><td>P-RGF</td><td>22.37%</td><td>25818</td><td>32.51%</td><td>17926</td></tr><tr><td>Trans-P-RGF</td><td>20.88%</td><td>27222</td><td>31.03%</td><td>19262</td></tr><tr><td>TREMBA</td><td>42.73%</td><td>2528</td><td>49.59%</td><td>5985</td></tr><tr><td>TREMBAoSP</td><td>41.56%</td><td>4994</td><td>50.41%</td><td>4771</td></tr></table>
153
+
154
+ ![](images/30f8ae897e88cefc589a0c55c6e999bf8bea782c67b5049c0de9d88e6baaf067.jpg)
155
+ Figure 4: The success rate at different query levels for defended CIFAR10 and ImageNet models. (a)CIFAR10; (b)ImageNet.
156
+
157
+ Table 4: Success rate and average queries of un-targeted attack of 10 images on Google Vision API.
158
+
159
+ <table><tr><td>Method</td><td>NES</td><td>AutoZOOM</td><td>Trans-NESPGD</td><td>P-RGF</td><td>Trans-P-RGF</td><td>TREMBA</td></tr><tr><td>Success</td><td>70.00%</td><td>20.00%</td><td>70.00%</td><td>50.00%</td><td>60.00%</td><td>90.00%</td></tr><tr><td>Queries</td><td>245</td><td>410</td><td>114</td><td>324</td><td>167</td><td>8</td></tr></table>
160
+
161
+ An optimized starting point for TREMBA: $z _ { 0 } = \mathcal { E } ( x )$ is already a good starting point for attacking undefended networks. However, the capability of generator is limited for defended networks (Wang & Yu, 2019). Therefore, $z _ { \mathrm { 0 } }$ may not be the best starting point we can get from the defended source network. To enhance the usefulness of the starting point, we optimized $z$ on the source network by gradient descent and found
162
+
163
+ $$
164
+ z _ { 0 } ^ { * } = \underset { z } { \mathrm { a r g } } \underset { n } { \mathrm { m i n } } \operatorname* { m a x } \left( F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z ) ) + x ) _ { y } - \underset { j \neq y _ { i } } { \mathrm { m a x } } F _ { s } ( \varepsilon \operatorname { t a n h } ( \mathcal { D } ( z ) ) + x ) _ { j } , - \kappa \right) .
165
+ $$
166
+
167
+ The method is denoted by TREMBAOSP (TREMBA with optimized starting point). Figure 4 shows TREMBAOSP has higher success rate at small query levels, which means its starting point is better than TREMBA.
168
+
169
+ # 4.4 ATTACK GOOGLE CLOUD VISION API
170
+
171
+ We also attacked the Google Cloud Vision API, which was much harder to attack than the single neural network. Therefore we set $\varepsilon = 0 . 0 5$ and perform un-targeted attack on the API, changing the top1 label to whatever is not on top1 before. We chose 10 images for the ImageNet dataset and set query limit to be 500 due to high cost to use the API. As shown Table 4, TREMBA achieves much higher accuracy success rate and lower number of queries. We show the example of successfully attacked image in Appendix A.8.
172
+
173
+ # 5 CONCLUSION
174
+
175
+ We propose a novel method, TREMBA, to generate likely adversarial patterns for an unknown network. The method contains two stages: (1) training an encoder-decoder to generate adversarial perturbations for the source network; (2) search adversarial perturbations on the low-dimensional embedding space of the generator for any unknown target network. Compared with SOTA methods, TREMBA learns an embedding space that is more transferable across different network architectures. It achieves two to six times improvements in black-box adversarial attacks on MNIST and ImageNet and it is especially efficient in performing targeted attack. Furthermore, TREMBA demonstrates great capability in attacking defended networks, resulting in a nearly $1 0 \%$ improvement on the attack success rate, with two to six times of reductions in the number of queries. TREMBA opens up new ways to combine transfer-based and score-based attack methods to achieve higher efficiency in searching adversarial examples.
176
+
177
+ For targeted attack, TREMBA requires different generators to attack different classes. We believe methods from conditional image generation (Mirza & Osindero, 2014) may be combined with TREMBA to form a single generator that could attack multiple targeted classes. We leave it as a future work.
178
+
179
+ # REFERENCES
180
+
181
+ Anish Athalye, Nicholas Carlini, and David A. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, 2018. URL http://proceedings.mlr. press/v80/athalye18a.html.
182
+
183
+ Shumeet Baluja and Ian Fischer. Learning to attack: Adversarial transformation networks. In Proceedings of AAAI-2018, 2018. URL http://www.esprockets.com/papers/aaai2018. pdf.
184
+
185
+ Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. arXiv preprint arXiv:1712.04248, 2017.
186
+
187
+ Wieland Brendel, Jonas Rauber, Alexey Kurakin, Nicolas Papernot, Behar Veliqi, Marcel Salathé, Sharada P Mohanty, and Matthias Bethge. Adversarial vision challenge. In 32nd Conference on Neural Information Processing Systems (NIPS 2018) Competition Track, 2018. URL https: //arxiv.org/abs/1808.01976.
188
+
189
+ Thomas Brunner, Frederik Diehl, Michael Truong Le, and Alois Knoll. Guessing smart: Biased sampling for efficient black-box adversarial attacks. arXiv preprint arXiv:1812.09803, 2018.
190
+
191
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pp. 39–57. IEEE, 2017.
192
+
193
+ Jinghui Chen, Jinfeng Yi, and Quanquan Gu. A frank-wolfe framework for efficient and effective adversarial attacks. arXiv preprint arXiv:1811.10828, 2018.
194
+
195
+ Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 15–26. ACM, 2017.
196
+
197
+ Shuyu Cheng, Yinpeng Dong, Tianyu Pang, Hang Su, and Jun Zhu. Improving black-box adversarial attacks with a transfer-based prior. arXiv preprint arXiv:1906.06919, 2019.
198
+
199
+ Yinpeng Dong, Hang Su, Baoyuan Wu, Zhifeng Li, Wei Liu, Tong Zhang, and Jun Zhu. Efficient decision-based black-box adversarial attacks on face recognition. arXiv preprint arXiv:1904.04433, 2019.
200
+
201
+ Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. URL http:// arxiv.org/abs/1412.6572.
202
+
203
+ Chuan Guo, Jacob R Gardner, Yurong You, Andrew Gordon Wilson, and Kilian Q Weinberger. Simple black-box adversarial attacks. arXiv preprint arXiv:1905.07121, 2019.
204
+
205
+ 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.
206
+
207
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4700–4708, 2017.
208
+
209
+ Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with $5 0 \mathrm { x }$ fewer parameters and $< 0 . 5 \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
210
+
211
+ Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In Jennifer Dy and Andreas Krause (eds.), Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pp. 2137–2146, Stockholmsmässan, Stockholm Sweden, 10–15 Jul 2018a. PMLR.
212
+
213
+ Andrew Ilyas, Logan Engstrom, and Aleksander Madry. Prior convictions: Black-box adversarial attacks with bandits and priors. arXiv preprint arXiv:1807.07978, 2018b.
214
+
215
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
216
+
217
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016.
218
+
219
+ Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
220
+
221
+ Yandong Li, Lijun Li, Liqiang Wang, Tong Zhang, and Boqing Gong. Nattack: Learning the distributions of adversarial examples for an improved black-box attack on deep neural networks. arXiv preprint arXiv:1905.00441, 2019a.
222
+
223
+ Yandong Li, Lijun Li, Liqiang Wang, Tong Zhang, and Boqing Gong. NATTACK: A STRONG AND UNIVERSAL GAUSSIAN BLACK-BOX ADVERSARIAL ATTACK, 2019b. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ ryeoxnRqKQ.
224
+
225
+ Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016.
226
+
227
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ rJzIBfZAb.
228
+
229
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014.
230
+
231
+ Seungyong Moon, Gaon An, and Hyun Oh Song. Parsimonious black-box adversarial attacks via efficient combinatorial optimization. arXiv preprint arXiv:1905.06635, 2019.
232
+
233
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2574–2582, 2016.
234
+
235
+ Jorge Nocedal. Updating quasi-newton matrices with limited storage. Mathematics of computation, 35(151):773–782, 1980.
236
+
237
+ Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016a.
238
+
239
+ Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In 2016 IEEE European Symposium on Security and Privacy (EuroS&P), pp. 372–387. IEEE, 2016b.
240
+
241
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
242
+
243
+ Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4510–4520, 2018.
244
+
245
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
246
+
247
+ 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, 2014. URL http://arxiv.org/abs/1312.6199.
248
+
249
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
250
+
251
+ Chun-Chen Tu, Paishun Ting, Pin-Yu Chen, Sijia Liu, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh, and Shin-Ming Cheng. Autozoom: Autoencoder-based zeroth order optimization method for attacking black-box neural networks. arXiv preprint arXiv:1805.11770, 2018.
252
+
253
+ Huaxia Wang and Chun-Nam Yu. A direct approach to robust deep learning using adversarial networks. In International Conference on Learning Representations, 2019. URL https:// openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ S1lIMn05F7.
254
+
255
+ Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jürgen Schmidhuber. Natural evolution strategies. The Journal of Machine Learning Research, 15(1):949–980, 2014.
256
+
257
+ Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HknbyQbC-.
258
+
259
+ Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. arXiv preprint arXiv:1812.03411, 2018.
260
+
261
+ Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1492–1500, 2017.
262
+
263
+ # A EXPERIMENT RESULT
264
+
265
+ A.1 TARGETED ATTACK ON IMAGENET
266
+
267
+ Figure 9 shows result of the targeted attack on dipper, American chameleon, night snake, ruffed grouse and black swan. TREMBA achieves much higher success rate than other methods at almost all queries level.
268
+
269
+ # A.2 UN-TARGETED ATTACK ON IMAGENET
270
+
271
+ We used the same source model from targeted attack as the source model for un-targeted attack. We report our evaluation results in Table 5 and Figure 5. Compared with Trans-P-RGF, TREMBA reduces the number of queries by more than a half in ResNet34, DenseNet121 and MobilenetV2. Searching in the embedding space of generator remains very effective even when the target network architecture differs significantly from the networks in the source model.
272
+
273
+ Table 5: Success rate and average queries of un-targeted attack on ImageNet. $\varepsilon = 0 . 0 3 1 2 5$
274
+
275
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td> Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>100%</td><td>924</td><td>100%</td><td>1255</td><td>100%</td><td>1235</td><td>99.86%</td><td>872</td></tr><tr><td>Trans-NESPGD</td><td>100%</td><td>441</td><td>100%</td><td>827</td><td>100%</td><td>838</td><td>100%</td><td>733</td></tr><tr><td>Trans-NESFGSM</td><td>100%</td><td>586</td><td>100%</td><td>982</td><td>100%</td><td>961</td><td>100%</td><td>648</td></tr><tr><td>AutoZOOM</td><td>94.18%</td><td>5184</td><td>96.25%</td><td>3754</td><td>94.56%</td><td>4567</td><td>95.38%</td><td>4213</td></tr><tr><td>P-RGF</td><td>100%</td><td>277</td><td>99.72%</td><td>635</td><td>100%</td><td>709</td><td>99.72%</td><td>730</td></tr><tr><td>Trans-P-RGF</td><td>100%</td><td>130</td><td>99.86%</td><td>371</td><td>99.18%</td><td>806</td><td>99.86%</td><td>522</td></tr><tr><td>TREMBA</td><td>100%</td><td>88</td><td>100%</td><td>183</td><td>100%</td><td>172</td><td>100%</td><td>61</td></tr></table>
276
+
277
+ ![](images/f45f4f634355a94b1907d5d479ca61455d14143bcbb864fa2935d439fbcd6602.jpg)
278
+ Figure 5: The success rate of un-targeted black-box adversarial attack at different query levels for undefended ImageNet models.
279
+
280
+ # A.3 VISUALIZATION OF TARGETED PERTURBATION
281
+
282
+ Figure 10 shows some examples of adversarial perturbations produced by TREMBA. The first column is one image of the target class and other columns are examples of perturbations (amplified by 10 times). It is easy to discover some features of the target class in the adversarial perturbation such as the feather for birds and the body for snakes.
283
+
284
+ # A.4 EXPERIMENTS ON DIFFERENT ENSEMBLES
285
+
286
+ We chose two more source ensemble models for evaluation. The first ensemble contains VGG16 and Squeezenet. And the second ensemble is consist of VGG16, Squeezenet and Googlenet. Figure 6 shows our result for targeted attack for ImageNet. We only compared Trans-NESPGD and Trans-PRGF since they are the best variants from Trans-NES and P-RGF.
287
+
288
+ ![](images/a0aa16b99546c014863fe8cacddad3ddd0bb64dd4171e7d1507fb1ebe3f29029.jpg)
289
+ Figure 6: We show the success rate at different query levels for targeted attack for different ensemble source networks. V represents VGG16; S represents Squeezenet; G represents Googlenet; R represents Resnet18
290
+
291
+ # A.5 VARYING $\varepsilon$
292
+
293
+ We chose $\varepsilon = 0 . 0 2$ and $\varepsilon = 0 . 0 4$ and performed targeted attack on ImageNet. Although TREMBA used the same model that is trained on $\varepsilon = 0 . 0 3 1 2 5$ , it still outperformed other methods, which shows that TREMBA can also generalize to different strength of adversarial attack with different $\varepsilon$ .
294
+
295
+ For the commonly used $\varepsilon = 0 . 0 5$ , TREMBA also performs well. The results are shown in Table 6, Table 7, and Figure 8.
296
+
297
+ # A.6 VARYING SAMPLE SIZE
298
+
299
+ We performed a hyperparameter sweep over $b$ on Densenet121 on un-targeted attack on ImageNet. $b = 2 0$ may not be the best choice Trans-NES, but it is not the best for TREMBA, either. Generally, the performance is not very sensitive to $b$ , and TREMBA will also outperform other methods even if we fine-tune the sample size for all the methods.
300
+
301
+ # A.7 DIMENSION OF THE EMBEDDING SPACE
302
+
303
+ We slightly changed the architecture of the autoencoder by adding max pooling layers and changing the number of filters and perform un-targeted attack on ImageNet. More specifically, we added additional max pooling layers after the first and the fourth convolution layers and changed the number of filters of the last layer in the encoder to be 8. Thus, the dimension of the embedding space would be $8 \times 8 \times 8$ . And we also changed the factor of bilinear sampling in the decoder. The remaining settings are the same in Appendix A.2. As shown in Table 9, this autoencoder is even worse than the original autoencoder despite small dimension of the embedding space. In addition, we also changed to dimension of the data-dependent prior of Trans-P-RGF to match the dimension of TREMBA, whose performance is also not better than before. They show that simply diminishing the size of the embedding space may not lead to better performance. The performance gain of TREMBA comes beyond the effect of diminishing the dimension of the embedding space.
304
+
305
+ ![](images/17cfbe81f4cd64c6141a4277c8d4b3cc88d04e190595c75b6298a2417586b7ee.jpg)
306
+ Figure 7: We show the success rate at different query levels for attack at different $\varepsilon$ for ImageNet.
307
+
308
+ Table 6: Success rate and average queries of un-targeted attack on ImageNet. $\varepsilon = 0 . 0 5$
309
+
310
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>100%</td><td>651</td><td>100%</td><td>850</td><td>100%</td><td>840</td><td>99.86%</td><td>640</td></tr><tr><td>Trans-NESPGD</td><td>100%</td><td>74</td><td>100%</td><td>196</td><td>100%</td><td>235</td><td>100%</td><td>169</td></tr><tr><td>Trans-NESFGSM</td><td>100%</td><td>232</td><td>100%</td><td>401</td><td>100%</td><td>361</td><td>100%</td><td>272</td></tr><tr><td>AutoZOOM</td><td>99.72%</td><td>1743</td><td>99.58%</td><td>1481</td><td>99.32%</td><td>1730</td><td>99.29%</td><td>1672</td></tr><tr><td>P-RGF</td><td>100%</td><td>178</td><td>100%</td><td>328</td><td>100%</td><td>436</td><td>100%</td><td>402</td></tr><tr><td>Trans-P-RGF</td><td>100%</td><td>44</td><td>99.44%</td><td>418</td><td>98.09%</td><td>1049</td><td>100%</td><td>157</td></tr><tr><td>TREMBA</td><td>100%</td><td>8</td><td>100%</td><td>27</td><td>100%</td><td>19</td><td>100%</td><td>8</td></tr></table>
311
+
312
+ Table 7: Success rate and average queries of targeted attack on ImageNet. $\varepsilon = 0 . 0 5$
313
+
314
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td> Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>99.03%</td><td>6364</td><td>98.89%</td><td>8003</td><td>99.32%</td><td>7525</td><td>99.72$</td><td>5610</td></tr><tr><td>Trans-NESPGD</td><td>99.31%</td><td>1968</td><td>99.31%</td><td>3549</td><td>99.46%</td><td>3731</td><td>99.86%</td><td>3223</td></tr><tr><td>Trans-NESFGSM</td><td>99.03%</td><td>4997</td><td>98.33%</td><td>7298</td><td>98.23%</td><td>6874</td><td>99.16%</td><td>5034</td></tr><tr><td>AutoZOOM</td><td>51.04%</td><td>30032</td><td>52.36%</td><td>28547</td><td>60.00%</td><td>25836</td><td>53.78%</td><td>28356</td></tr><tr><td>P-RGF</td><td>99.17%</td><td>3704</td><td>98.05%</td><td>5498</td><td>97.96%</td><td>5769</td><td>98.17%</td><td>6896</td></tr><tr><td>Trans-P-RGF</td><td>99.58%</td><td>662</td><td>99.31%</td><td>1896</td><td>99.05%</td><td>2267</td><td>99.16%</td><td>3192</td></tr><tr><td>TREMBA</td><td>99.72%</td><td>285</td><td>99.44%</td><td>443</td><td>99.72%</td><td>224</td><td>99.72%</td><td>422</td></tr></table>
315
+
316
+ # A.8 EXAMPLES OF ATTACKING GOOGLE CLOUD VISION API
317
+
318
+ Figure 11 shows one example of attacking Google Cloud Vision API. TREMBA successfully make the shark to be classified as green. Compared with Trans- ${ \bf \cdot N E S _ { P G D } }$ , TREMBA hugely changes the
319
+
320
+ ![](images/66473406521a67388c57f8479e1b6594b24878ea18c9bbafbb649b4e02d7f015.jpg)
321
+ Figure 8: We show the success rate at different query levels for targeted and un-targeted attack at $\varepsilon = 0 . 0 5$ for ImageNet.
322
+
323
+ Table 8: Hyperparameter sweep over $b$ on Densenet121 for un-targeted attack on ImageNet
324
+
325
+ <table><tr><td rowspan="2">Sweep over b</td><td colspan="2">b=10</td><td colspan="2">b=30</td><td colspan="2">b=40</td><td colspan="2">b= 50</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>NES</td><td>100%</td><td>1323</td><td>100%</td><td>1284</td><td>100%</td><td>1433</td><td>100%</td><td>1639</td></tr><tr><td>Trans-NESPGD</td><td>100%</td><td>915</td><td>100%</td><td>791</td><td>100%</td><td>707</td><td>100%</td><td>639</td></tr><tr><td>Trans-NESFGSM</td><td>100%</td><td>1037</td><td>100%</td><td>916</td><td>100%</td><td>879</td><td>100%</td><td>886</td></tr><tr><td>AutoZOOM</td><td>90.9%</td><td>6052</td><td>96.2%</td><td>4148</td><td>97.1%</td><td>4066</td><td>97.3%</td><td>4366</td></tr><tr><td>P-RGF</td><td>99.73%</td><td>717</td><td>99.86%</td><td>860</td><td>99.86%</td><td>949</td><td>99.86%</td><td>1095</td></tr><tr><td>Trans-P-RGF</td><td>98.50%</td><td>1139</td><td>99.86%</td><td>479</td><td>99.86%</td><td>487</td><td>100%</td><td>427</td></tr><tr><td>TREMBA</td><td>100%</td><td>150</td><td>100%</td><td>205</td><td>100%</td><td>274</td><td>100%</td><td>299</td></tr></table>
326
+
327
+ Table 9: Change of dimension of the embedding space of AutoZOOM. The task is un-targeted attack on ImageNet.
328
+
329
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>AutoZ0OM</td><td>64.35%</td><td>19684</td><td>71.94%</td><td>16931</td><td>68.44%</td><td>17871</td><td>71.15%</td><td>16134</td></tr><tr><td>Trans-P-RGF</td><td>99.86%</td><td>194</td><td>99.58%</td><td>508</td><td>99.59%</td><td>610</td><td>99.58%</td><td>705</td></tr></table>
330
+
331
+ labels of the image. It is hard to say the overall classification of Trans- $\mathbf { \cdot N E S _ { P G D } }$ is wrong. However, the labels of TREMBA are definitely not correct.
332
+
333
+ ![](images/3f2f8df2f6a73b87639c5c3c58772f2f61fb3f141de9473cf7895fee3543fb43.jpg)
334
+ Figure 9: The success rate at different query levels for attack targeted at different class. Targeted classes are: (a)Dipper; (b)American chameleon; (c)Night snake; (d)Ruffed grouse; (e)Black swan
335
+
336
+ ![](images/cb446ab0a9f6ed206ea6d2284aa3175e01a28c6c4c504837f1e1a89473ab112c.jpg)
337
+ Figure 10: Visualization of adversarial perturbations for targeted attack on ImageNet. The first column shows one example of the target class. Other columns show the adversarial perturbations.
338
+
339
+ ![](images/793e2caa32be1917242f6ff648d498241539ddaf408bcfabccfe8ce57ea0feb6.jpg)
340
+ Figure 11: One example of adversarial image for attacking Google Cloud Vision API
341
+
342
+ Table 10: Comparision between CombOpt and TREMBA for un-targeted attack on Imagenet.
343
+
344
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>CombOpt</td><td>100%</td><td>567</td><td>100%</td><td>499</td><td>100%</td><td>569</td><td>100%</td><td>522</td></tr><tr><td>TREMBA</td><td>100%</td><td>88</td><td>100%</td><td>183</td><td>100%</td><td>172</td><td>100%</td><td>61</td></tr></table>
345
+
346
+ Table 11: Comparision between CombOpt and TREMBA for targeted attack on Imagenet.
347
+
348
+ <table><tr><td rowspan="2">Attack</td><td colspan="2">VGG19</td><td colspan="2">Resnet34</td><td colspan="2">DenseNet121</td><td colspan="2">MobilenetV2</td></tr><tr><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td><td>Success</td><td>Queries</td></tr><tr><td>CombOpt</td><td>93.76%</td><td>9767</td><td>94.86%</td><td>8024</td><td>97.41%</td><td>6970</td><td>96.92%</td><td>8575</td></tr><tr><td>TREMBA</td><td>98.47%</td><td>853</td><td>96.38%</td><td>1206</td><td>98.50%</td><td>1124</td><td>99.16%</td><td>1210</td></tr></table>
349
+
350
+ # A.9 COMPARISION BETWEEN TREMBA AND COMBOPT
351
+
352
+ CombOpt is one of the SOTA score-based black-box attack. We compared our method with it on the targeted and un-targeted attack on Imagenet. The targeted attack is 0 and $\varepsilon = 0 . 0 3 1 2 5$ . As shown in Table 10 and Table 11, TREMBA requires much lower queries than CombOpt. It demonstrates the great improvement by combining the transfer-based and score-based attack.
353
+
354
+ # B ARCHITECTURE OF CLASSIFIERS AND GENERATORS
355
+
356
+ # B.1 CLASSIFIER
357
+
358
+ Table 12: Model architectures for the MNIST
359
+
360
+ <table><tr><td>ConvNet1</td><td>ConvNet2</td><td>FCNet</td></tr><tr><td>Conv(64, 5, 5)+ReLU MaxPool(2,2)</td><td>Conv(16,3,3)+ReLU Conv(16,3,3)+ReLU</td><td>FC(512)+ReLU FC(10)+Softmax</td></tr><tr><td>Conv(64,5,5)+ReLU</td><td>MaxPool(2,2)</td><td></td></tr><tr><td>MaxPool(2,2)</td><td>Conv(32,3,3)+ReLU</td><td></td></tr><tr><td>Dropout(0.25)</td><td>Conv(32,3, 3)+ReLU</td><td></td></tr><tr><td>FC(128)+ReLU</td><td>Conv(32,3,3)+ReLU</td><td></td></tr><tr><td>Dropout(0.5)</td><td>MaxPool(2,2)</td><td></td></tr><tr><td>FC(10)+Softmax</td><td>FC(512)+ReLU</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td>FC(10)+Softmax</td><td></td></tr></table>
361
+
362
+ Table 12 lists the architectures of ConvNet1, ConvNet2 and FCNet. The architecture of ResNeXt used in CIFAR10 is from https://github.com/prlz77/ResNeXt.pytorch. We set the depth to be 20, the cardinality to be 8 and the widen factor to be 4. Other architectures of classifiers are specified in the corresponding paper.
363
+
364
+ # B.2 GENERATOR
365
+
366
+ Table 13 lists the architectures of generator for three datasets. For AutoZOOM, we find our architectures are not suitable and use the same generators in the corresponding paper.
367
+
368
+ # C HYPERPARAMETERS
369
+
370
+ # C.1 TRAINING GENERATOR
371
+
372
+ We trained the generators with learning rate starting at 0.01 and decaying half every 50 epochs. The whole training process was 500 epochs. The batch size was determined by the memory of GPU. Specifically, we set batch size to be 256 for MNIST and CIFAR10 defense model, 64 for ImageNet model. All large $\kappa$ will work well for our method and we chose $\kappa = 2 0 0 . 0$ . All the experiments were performed using pytorch on NVIDIA RTX 2080Ti.
373
+
374
+ Table 13: Architectures of encoder and decoder. ConvReLUBN and DeconvReLUBN represent convolution or deconvolution followed by ReLU and batch normalization. The parameters $( c , m , n )$ used in ConvReLUBN or DeconvReLUBN mean $c$ channels with $m \times n$ kernel size. $\mathbf { M a x P o o l } ( m , n )$ represents max pooling with $( m , n )$ kernel size and $( m , n )$ stride.
375
+
376
+ <table><tr><td></td><td>MNIST ConvReLUBN(16,3,3)</td><td>CIFAR10 ConvReLUBN(16,3,3)</td><td>ImageNet ConvReLUBN(16,3,3)</td></tr><tr><td>Encoder</td><td>ConvReLUBN(32,3,3) ConvReLUBN(32,3,3) MaxPool(2,2) ConvReLUBN(32,3,3) ConvReLUBN(16,3,3) ConvReLUBN(2,3,3) MaxPool(2,2)</td><td>ConvReLUBN(32,3,3) ConvReLUBN(32,3,3) MaxPool(2,2) ConvReLUBN(32,3,3) ConvReLUBN(32,3,3) ConvReLUBN(8,3,3) MaxPool(2,2)</td><td>ConvReLUBN(32,3,3) MaxPool(2,2) ConvReLUBN(64,3,3) ConvReLUBN(64,3,3) MaxPool(2,2) ConvReLUBN(128,3,3) ConvReLUBN(128,3,3) MaxPool(2,2) ConvReLUBN(32,3,3)</td></tr><tr><td>Decoder</td><td>ConvReLUBN(32,3,3) ConvReLUBN(32,3,3) DeconvReLUBN(64,3,3) ConvReLUBN(64,3,3) ConvReLUBN(64,3,3) DeconvReLUBN(16,3,3) Conv(1,1,1)</td><td>ConvReLUBN(32,3,3) ConvReLUBN(32,3,3) DeconvReLUBN(64,3,3) ConvReLUBN(64,3,3) ConvReLUBN(64,3,3) DeconvReLUBN(16,3,3) Conv(3,1,1)</td><td>ConvReLUBN(8,3,3) MaxPool(2,2) ConvReLUBN(32,3,3) DeconvReLUBN(64,3,3) ConvReLUBN(128,3,3) DeconvReLUBN(128,3,3) ConvReLUBN(128,3,3) DeconvReLUBN(64,3,3) ConvReLUBN(32,3,3) DeconvReLUBN(16,3,3) ConvReLUBN(3,1,1)</td></tr></table>
377
+
378
+ # C.2 EVALUATION
379
+
380
+ Table 14 to 19 list the hyperparameters for all the algorithms. The learning rate was fine-tuned for all the algorithms. We set sample size $b = 2 0$ for all the algorithms for fair comparisons.
381
+
382
+ Table 14: Hyperparameters for NES
383
+
384
+ <table><tr><td rowspan="2"></td><td rowspan="2">MNIST</td><td rowspan="2">CIFAR10</td><td colspan="3">ImageNet</td></tr><tr><td>Un-targeted</td><td>Targeted</td><td>Un-targeted Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>0.2</td><td>0.05</td><td>0.1</td><td>0.05</td><td>0.1</td></tr></table>
385
+
386
+ Table 15: Hyperparameters for Trans- ${ \cdot } \mathrm { N E S } _ { \mathrm { P G D } }$ and Trans-NESFGSM. White-box iteration, white-box margin and white-box learning rate mean the hyperparameters for generating the starting point on the source network for Trans-NESPGD.
387
+
388
+ <table><tr><td rowspan="2"></td><td rowspan="2">MNIST</td><td rowspan="2">CIFAR10</td><td colspan="3">ImageNet</td></tr><tr><td>Un-targeted</td><td>Targeted</td><td>Un-targeted Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>0.2</td><td>0.05</td><td>0.1</td><td>0.05</td><td>0.1</td></tr><tr><td>White-box iteration</td><td>50</td><td>100</td><td>50</td><td>50</td><td>100</td></tr><tr><td>White-box margin(κ)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>White-box learning rate</td><td>0.05</td><td>0.1</td><td>0.01</td><td>0.005</td><td>0.1</td></tr></table>
389
+
390
+ Table 16: Hyperparameters for AutoZOOM.
391
+
392
+ <table><tr><td rowspan="2"></td><td rowspan="2">MNIST</td><td rowspan="2">CIFAR10</td><td colspan="3">ImageNet</td></tr><tr><td>Un-targeted</td><td>Targeted</td><td>Un-targeted Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>5.0</td><td>20.0</td><td>5.0</td><td>3.0</td><td>5.0</td></tr></table>
393
+
394
+ Table 17: Hyperparameters for P-RGF and Trans-P-RGF.
395
+
396
+ <table><tr><td rowspan="2"></td><td rowspan="2">MNIST</td><td rowspan="2">CIFAR10</td><td colspan="3">ImageNet</td></tr><tr><td>Un-targeted</td><td>Targeted</td><td>Un-targeted Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>0.1</td><td>0.05</td><td>0.005</td><td>0.003</td><td>0.005</td></tr><tr><td>White-box iteration</td><td>50</td><td>100</td><td>50</td><td>50</td><td>100</td></tr><tr><td>White-box margin(κ)</td><td>100</td><td>100</td><td>100</td><td>100</td><td>100</td></tr><tr><td>White-box learning rate</td><td>0.05</td><td>0.1</td><td>0.01</td><td>0.01</td><td>0.1</td></tr></table>
397
+
398
+ Table 18: Hyperparameters for TREMBA.
399
+
400
+ <table><tr><td rowspan="2"></td><td rowspan="2">MNIST</td><td rowspan="2">CIFAR10</td><td colspan="3">ImageNet</td></tr><tr><td>Un-targeted</td><td>Targeted</td><td>Un-targeted Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td><td>20</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>0.3</td><td>2.0</td><td>5.0</td><td>3.0</td><td>5.0</td></tr></table>
401
+
402
+ Table 19: Hyperparameters for TREMBAOSP .
403
+
404
+ <table><tr><td></td><td>CIFAR10 Defense</td><td>ImageNet Defense</td></tr><tr><td>Sample size (b)</td><td>20</td><td>20</td></tr><tr><td>Learning rate (n)</td><td>2.0</td><td>5.0</td></tr><tr><td>White-box iteration</td><td>100</td><td>100</td></tr><tr><td>White-box margin(κ)</td><td>100</td><td>100</td></tr><tr><td>White-box learning rate</td><td>1.0</td><td>2.0</td></tr></table>
parse/train/SJxhNTNYwB/SJxhNTNYwB_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJxhNTNYwB/SJxhNTNYwB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJxhNTNYwB/SJxhNTNYwB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkeGURNtDH/SkeGURNtDH.md ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MultiGrain: a unified image embedding for classes and instances
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # Abstract
6
+
7
+ We introduce MultiGrain, a neural network architecture that generates compact image embedding vectors that solve multiple tasks of different granularity: class, instance, and copy recognition. MultiGrain is trained jointly for classification by optimizing the cross-entropy loss and for instance/copy recognition by optimizing a self-supervised ranking loss. The self-supervised loss only uses data augmentation and thus does not require additional labels. Remarkably, the unified embeddings are not only much more compact than using several specialized embeddings, but they also have the same or better accuracy. When fed to a linear classifier, MultiGrain using ResNet-50 achieves $7 9 . 4 \%$ top-1 accuracy on ImageNet, a $+ 1 . 8 \%$ absolute improvement over the the current state-of-the-art AutoAugment method. The same embeddings perform on par with state-of-the-art instance retrieval with images of moderate resolution. An ablation study shows that our approach benefits from the self-supervision, the pooling method and the mini-batches with repeated augmentations of the same image.
8
+
9
+ # 1 Introduction
10
+
11
+ Image recognition is central to computer vision, with dozens of new approaches being proposed every year, each optimized for particular aspects of the problem. From coarse to fine, we may distinguish the recognition of (a) classes, where one looks for a certain type of object regardless of intra-class variations, (b) instances, where one looks for a particular object despite changes in the viewing conditions, and (c) copies, where one looks for a copy of a specific image despite edits. While these problems are in many ways similar, the standard practice is to use specialized, and thus incompatible, image representations for each case.
12
+
13
+ Consider for example image retrieval, where the goal is to match a query image to a large database of other images, whose applications include detection of copyrighted images and exemplar-based recognition of unseen objects. Often one would like to search the same collection with multiple granularities, by matching the query by class, instance, or copy. Adopting multiple image embeddings, narrowly optimized for each granularity, means multiplying the resource usage. Using a single embedding relevant to all these tasks reduces both the computing time and the storage space. However, this might come at the cost of a reduced accuracy.
14
+
15
+ In this paper we introduce MultiGrain, a compact embedding that, as illustrated in fig. 1, can solve recognition tasks of different granularities while maintaining or surpassing the accuracy of specialized embeddings. MultiGrain is obtained by training a Convolutional Neural Network (CNN) jointly on the different tasks. CNNs trained for image classification are known to be good universal features extractors. However, authors (Babenko & Lempitsky, 2015) have noted that the intermediate layers of such CNNs are generally better for low-level tasks such as instance and copy recognition. In contrast, our work extracts a single global embedding at the top of the network. The key is to optimize this embedding simultaneously for classification and instance retrieval. In this manner, the same representation integrates different degrees of invariance. Indeed, by definition, copies of the same image contain the same instance, and images that contain the same instance also contain the same class.
16
+
17
+ ![](images/d1ae48e80899194c59adbfe03e907ef15317de66b11fe5116b41e56fd8e029cd.jpg)
18
+ Figure 1: Top: Our goal is to extract an image descriptor incorporating different levels of granularity, so that we can solve, classification and particular object recognition tasks: The descriptor is either fed to a linear classifier, or directly compared with cosine similarity.
19
+
20
+ Right: The MultiGrain architecture.
21
+
22
+ ![](images/748b845b9b2c5141ca70cfae892e16028de41518669726df842bf1c8f01981b1.jpg)
23
+
24
+ As an additional contribution, we show that MultiGrain can be learned using only class-level labels via self-supervised learning (Caron et al., 2018). The instance recognition is learned for free, without labels specific to instance recognition: we use the identity of arbitrary images as labels, and data augmentation to generate different versions of each image. We also find that, unexpectedly, forming batches with multiple augmentations of the same image, improves the classifier performance, even for models trained only for classification. This contradicts the common knowledge that training batches should maximize diversity. Finally, we incorporate in MultiGrain a pooling layer inspired by image retrieval that boosts the classification accuracy for high-resolution images.
25
+
26
+ Overall, MultiGrain offers compelling performance both for classification and image retrieval, including outperforming the SoTA classification accuracy on ImageNet for ResNet-50.
27
+
28
+ # 2 Related work
29
+
30
+ Image classification. Most CNNs designed for a wide range of tasks leverage a trunk designed for classification, such as Residual networks (He et al., 2016). An improvement on the trunk architecture translates to better accuracies in other tasks (He et al., 2017), see eg. the detection task of LSVRC’15. Architectural improvements (Hu et al., 2018; Huang et al., 2017; Xie et al., 2017) exhibit additional gains; training on weakly annotated data (Mahajan et al., 2018) or using embedding loss at the class level (Wen et al., 2016) can also improve the accuracy. To our knowledge, the state of the art on ILSVRC 2012 for a model learned from scratch on Imagenet data only is currently held by the gigantic AmoebaNet-B architecture (Huang et al., 2018) (557M parameters), which takes 480 $\times$ 480 images as input. In our paper, we choose ResNet-50 (He et al., 2016) (25.6M parameters), as this architecture is adopted in the literature in many works both on image classification and instance retrieval.
31
+
32
+ Image search. The objective of Image search is to find the images most similar to the query in a large image collection. It is usually evaluated for more specific problems such as landmark recognition (Philbin et al., 2007; J´egou et al., 2008), particular object recognition (Nister $\&$ Stewenius, 2006) or copy detection (Douze et al., 2009). In this paper image retrieval refers to instance-level retrieval, where object instances are as broad as possible, i.e., not restricted to buildings, as in the Oxford/Paris benchmark. Typically, a query image is described by an embedding vector, and the task amounts to searching the nearest neighbors of this vector in the embedding space. Refinement steps include as geometric verification (Philbin et al., 2007), query expansion (Chum et al., 2007; Tolias & J´egou, 2014), or database-side pre-processing or augmentation (Tolias et al., 2016; Turcot & Lowe, 2009), but this paper focuses on the first part. Traditionally, local image descriptors are aggregated to image embeddings, as in the bag-of-words model (Sivic & Zisserman, 2003). It has since become apparent that CNNs trained on classification datasets are competitive image feature extractors for instance retrieval (Babenko et al., 2014; Gong et al., 2014; Razavian et al., 2014).
33
+
34
+ Table 1: Differences between classification and image retrieval: Retrieval architectures incorporate a final pooling layer that is regionalized (RMAC of Tolias $\&$ J´egou (2014)) or magnifies activations (GeM of Radenovi´c et al. (2018)). The triplet loss (Gordo et al., 2016) requires a batching strategy with pairs of matching images.
35
+
36
+ <table><tr><td></td><td>classification</td><td>retrieval</td></tr><tr><td>spatial pool.</td><td>avg. pooling</td><td>RMAC or GeM</td></tr><tr><td>loss</td><td>cross-entropy</td><td>triplet</td></tr><tr><td>batch samp.</td><td>diverse</td><td>not diverse</td></tr><tr><td>whitening</td><td>no</td><td>yes</td></tr><tr><td rowspan="2">resolution</td><td>low</td><td>high</td></tr><tr><td>(224²-3002)</td><td>(800-1k×scaled)</td></tr></table>
37
+
38
+ Architectures for instance search are regular classification trunks, modified so the pooling stage gives more spatial locality, to cope with small objects and clutter. A competitive baseline for instance retrieval is the R-MAC image descriptor (Tolias et al., 2015). It aggregates regionally pooled features extracted from an activation map. This pooling combined with PCA whitening (J´egou & Chum, 2012) leads to efficient many-to-many comparisons between image regions. Gordo et al. (2016; 2017) fine-tune this representation end-to-end on an external image retrieval dataset. Unlike their approach, we do not assume in this work that we have a domain-specific training set. Radenovi´c et al. (2018) depart from regional pooling by adopting a generalized mean pooling (see section 3.2). It is a spatial pooling of the features raised to an exponent $p$ over the whole image, which offers some benefits as analyzed by Boureau et al. (2010) with respect to noise-to-signal ratio and in simple image classification tasks.
39
+
40
+ Multi-task training stems from the observation that CNNs transfer to a wide range of vision tasks (Razavian et al., 2014) and exhibit a high level of compressibility (Han et al., 2015). Despite some successes with multi-task networks such as UberNet (Kokkinos, 2017), their design and training still involve numerous heuristics. Ongoing lines of work investigate efficient sharing of parameters (Rebuffi et al., 2018), and proper hyper-parameters settings to weight the gradients from different tasks (Guo et al., 2018).
41
+
42
+ Data augmentation improves generalization and reduces over-fitting (Krizhevsky et al., 2012). Traditionally, batches were made to contain random samples of the training set. The recently introduced batch augmented (BA) (Hoffer et al., 2019) sampling strategy consists in augmenting the size of the batches and filling them with data-augmented copies of the same image. This yields better generalization performance, and uses computing resources more efficiently through reduced data processing time. We show that this improvement can be obtained using the same batch size, i.e., , with a lower number of distinct images per batch. We see this repeated augmentations (RA) scheme as a way to boost the effect of data augmentation over the course of the optimization. Thus, RA is a technique of general interest, beyond large-scale distributed training.
43
+
44
+ # 3 Architecture design
45
+
46
+ In the current best practices, the architectures and training procedures used for class and instance recognition differ significantly. This section describes the differences, summarized in table 1, and our solutions to bridge them, leading to the MultiGrain architecture in fig. 1.
47
+
48
+ # 3.1 Training objective
49
+
50
+ MultiGrain is jointly optimized for the classification and retrieval tasks, which is obtained by combining a classification loss and an instance retrieval loss in the optimization.
51
+
52
+ Classification loss. We adopt the standard cross-entropy loss. Given $e _ { i } \in \mathbb { R } ^ { d }$ the output of eq. (4) for image $i$ , $\pmb { w } _ { c } \in \mathbb { R } ^ { d }$ the parameters of a linear classifier1 for class $c = 1 , \ldots , C$ , and $y _ { i }$ the ground-truth class for that image, then
53
+
54
+ $$
55
+ \ell ^ { \mathrm { c l a s s } } ( e _ { i } , [ { \pmb w } _ { 1 } , \ldots , { \pmb w } _ { C } ] , y _ { i } ) = - \langle { \pmb w } _ { y _ { i } } , { \pmb e } _ { i } \rangle + \log \sum _ { c = 1 } ^ { C } \exp \langle { \pmb w } _ { c } , { \pmb e } _ { i } \rangle .
56
+ $$
57
+
58
+ Retrieval loss. The triplet loss (Schroff et al., 2015) imposes that a query image embedding must be closer to the embedding of an image that matches it than to other embeddings. The contrastive loss (Hadsell et al., 2006) imposes a stricter condition: all embedding distances between pairs of matching images must be smaller than all embedding distances between pairs of non-matching images. Optimizing both these losses depends on hard-to-tune hyper-parameters, including how pairs and triplets are sampled.
59
+
60
+ Some of these issues are solved by the approach of Wu et al. (2017), which starts from a batch of images and (1) normalizes their embeddings to the unit sphere, (2) samples negative pairs using the current embedding similarity, and (3) uses the pairs in a margin loss (that combines contrastive and triplet loss). Given images $i , j \in B$ in a batch, the margin loss is given by:
61
+
62
+ $$
63
+ \ell ^ { \mathrm { r e t r } } ( e _ { i } , e _ { j } , \beta , y _ { i j } ) = \operatorname* { m a x } \{ 0 , \ \alpha + y _ { i j } ( D ( e _ { i } , e _ { j } ) - \beta ) \}
64
+ $$
65
+
66
+ where $D ( e _ { i } , e _ { j } ) = \| e _ { i } / \| e _ { i } \| - e _ { j } / \| e _ { j } \| \big |$ is the Euclidean distance between the normalized embeddings, the label $y _ { i j }$ is equal to $+ 1$ if the images match and to $^ { - 1 }$ otherwise, $\alpha > 0$ i s the margin (a hyper-parameter), and $\beta > 0$ is a learnable parameter controlling the volume of the space occupied embedding vectors. Due to the normalization, $D ( e _ { i } , e _ { j } )$ is equivalent to a cosine similarity, which, up to whitening (section 3.4), is commonly used in retrieval.
67
+
68
+ We use distance-weighted sampling to sample pairs of images (see appendix A for details). This sampling is suited to our joint training: it tolerates relatively small batch sizes ( $| B | \sim 8 0$ to 120) and a small amount of positives images (3 to 5) of each instance in the batch, without the need for elaborate parameter tuning or offline sampling.
69
+
70
+ Joint loss. The joint loss on batch $\boldsymbol { B }$ is a combination weighted by a factor $\lambda \in \left[ 0 , 1 \right]$ :
71
+
72
+ $$
73
+ \frac { \lambda } { | \mathcal { B } | } \cdot \sum _ { i \in \mathcal { B } } \ell ^ { \mathrm { c l a s s } } ( e _ { i } , w , y _ { i } ) + \frac { 1 - \lambda } { | \mathcal { P } ( \mathcal { B } ) | } \cdot \sum _ { ( i , j ) \in \mathcal { P } ( \mathcal { B } ) } \ell ^ { \mathrm { r e t r } } ( e _ { i } , e _ { j } , \beta , y _ { i j } ) .
74
+ $$
75
+
76
+ Note that the losses are normalized by the number of items in the corresponding summations.
77
+
78
+ # 3.2 Spatial pooling operators
79
+
80
+ For recognition tasks, one requires to encode the whole image as a single vector. The latter is usually obtained by applying a global spatial pooling operator to the 3D activation tensor produced by the convolutional trunk of the network. This should be contrasted with local pooling operators, typically max pooling, that are found throughout the layers of CNNs to achieve local invariance to small translations.
81
+
82
+ The choice of global pooling operator has a significant effect on the representation. Recent architectures for classification, such as ResNet and DenseNet, use average pooling. Average pooling is permutation invariant and hence less sensitive to geometric transformations. It is also flexible as it allows the model to be applied to images of any size.
83
+
84
+ Image retrieval, on the other hand, requires more localized and fine-grained geometric information than the one captured by average pooling. This is because (i) the representation requires less invariance since object instances and landmarks are visually more similar and (ii) images are often more cluttered, with just a small distinctive part that warrants identification. Hence, the pooling should preserve local information. Next, we discuss the generalized mean pooling operator as a solution to this problem.
85
+
86
+ Let $\pmb { x } \in \mathbb { R } ^ { C \times W \times H }$ be the feature tensor computed by a convolutional neural network for a given input image. The tensor represents a feature map with $C$ channels, height $H$ and width $W$ . Let $u \in \Omega = \{ 1 , \dots , H \} \times \{ 1 , \dots , W \}$ be “pixel” in the map, $c$ the channel, and by $x _ { c u }$ the tensor element at location $u$ and channel $c$ , so that $\pmb { x } = [ x _ { c u } ] _ { c = 1 , . . . , C , u \in \Omega }$ . The generalized mean pooling (GeM) layer computes the generalized mean of each channel:
87
+
88
+ $$
89
+ e = \left[ \left( \frac { 1 } { | \Omega | } \sum _ { u \in \Omega } x _ { c u } ^ { p } \right) ^ { \frac { 1 } { p } } \right] _ { c = 1 , \dots , C }
90
+ $$
91
+
92
+ where the exponent $p > 0$ is a parameter. Average pooling and max pooling are equivalent to GeM with $p = 1$ , and $p = \infty$ , respectively. Exponents in the range $1 < p < \infty$ are a trade-off between the two (Bo & Sminchisescu, 2009; Boureau et al., 2010; Doll´ar et al., 2009). GeM was introduced for image retrieval as a component of R-MAC that approximates max pooling (Doll´ar et al., 2009), but (Radenovi´c et al., 2018) showed it is competitive on its own. (Boureau et al., 2010) studied this layer in the context of scene recognition/image classification. MultiGrain uses it to bridge the two worlds, as well as to dynamically adapt the network to varying image resolution.
93
+
94
+ # 3.3 Batching with repeated augmentation (RA)
95
+
96
+ We introduce repeated augmentations, a sampling scheme for training with SGD and data augmentation. In RA we form an image batch $\boldsymbol { B }$ by sampling $\lceil \lvert B \rvert / m \rceil$ different images, and transform them up to $m$ times by a set of data augmentations. Thus, the instance level ground-truth $y _ { i j } = + 1$ iff images $i$ and $j$ are two augmented versions of the same image. The key difference with the standard sampling scheme in SGD is that samples are not independent.
97
+
98
+ For a given learning rate, RA has lower performance than the standard i.i.d. scheme for small batch sizes, but outperforms it with larger batches. This is different from the observation of (Hoffer et al., 2019), who also consider repeated samples in a batch, but simultaneously increase its size.
99
+
100
+ With standard sampling, two versions of the same image are seen only in different epochs. We conjecture that correlated RA samples facilitate learning features that are invariant to the only difference between the repeated images — the augmentations. Appendix D shows this phenomenon in a simple artificial setting.
101
+
102
+ # 3.4 PCA whitening
103
+
104
+ We apply a step of PCA whitening to the embeddings to use them for retrieval, in accordance with previous works (Gordo et al., 2017; J´egou $\&$ Chum, 2012). The Euclidean distance between transformed features is equivalent to the Mahalanobis distance between the input descriptors. The PCA is trained at the end of the CNN training, using an external dataset of unlabelled images. The whitening operation $\Phi$ can be written as $\Phi ( e ) = \mathbf { S } \left( e / | | e | | - \mu \right)$ given the whitening matrix $\mathbf { s }$ and centering vector $\pmb { \mu }$ .
105
+
106
+ The parameters of the classification layer have to be modified to take the whitened embeddings as input. For the classifier $\langle { \pmb w } _ { \underline { { c } } } , { \pmb e } \rangle$ of eq. (1), we have $\begin{array} { r } { \langle \pmb { w } _ { c } , \pmb { e } \rangle = \langle \pmb { w } _ { c } , \pmb { \Phi } ^ { - 1 } ( \pmb { \Phi } ( \pmb { e } ) ) \rangle = } \end{array}$ $\| e \| \left( \langle \pmb { w } _ { c } ^ { \prime } , \Phi ( e ) \rangle + b _ { c } ^ { \prime } \right)$ where ${ \pmb w } _ { c } ^ { \prime } = S ^ { - \top } { \pmb w } _ { c }$ and $b _ { c } ^ { \prime } = \langle { \pmb w } _ { c } , { \mu } \rangle$ are the modified weight and bias for class $c$ . We observed that inducing decorrelation via a loss (Cogswell et al., 2016) is insufficient to ensure that features generalize well, which concurs with prior works (Gordo et al., 2017; Radenovi´c et al., 2018).
107
+
108
+ # 3.5 Input sizes
109
+
110
+ In image classification, it is standard to resize and center-crop input images to a low resolution, e.g. $2 2 4 \times 2 2 4$ pixels (Krizhevsky et al., 2012). The benefits are a smaller memory footprint, faster inference, and the possibility of batching the inputs if they are cropped to a common size. On the other hand, image retrieval depends on finer details in the images, as an instance can small or seen under a variety of scales. Feature extractors for image retrieval therefore commonly use input sizes of 800 (Gordo et al., 2017) or 1024 (Radenovi´c et al., 2018) pixels, without cropping the image to a square. This is impractical for end-to-end training.
111
+
112
+ We train MultiGrain at the standard $2 2 4 \times 2 2 4$ resolution, and use larger resolutions at test time. Indeed, a network trained with a pooling exponent $p$ and resolution $s$ can be evaluated at a larger resolution $s ^ { * } > s$ using a larger pooling exponent $p ^ { * } > p$ , see section 4.3.
113
+
114
+ Proxy task to cross-validate $p ^ { * }$ . To select the exponent $p ^ { * }$ , suitable for all tasks, we create a synthetic retrieval task IN-aug: we sample 2,000 images from the training set of ImageNet, 2 per class, and create 5 augmented copies of each of them. We query all images using the retrieval embeddings and evaluate the retrieval accuracy on IN-aug by measuring how many of the first 5 augmentations of the image are ranked in top 5 positions. The best-performing $p ^ { * } \in \{ 1 , 2 , . . . , 1 0 \}$ on IN-aug is shown in the table.
115
+
116
+ <table><tr><td>入s*=</td><td></td><td>224</td><td>500</td><td>800</td></tr><tr><td></td><td>1p 二</td><td>3</td><td>4</td><td>4</td></tr><tr><td>0.5</td><td>p* 二</td><td>3</td><td>4</td><td>5</td></tr></table>
117
+
118
+ The optimal $p ^ { * }$ obtained on IN-aug is a trade-off between retrieval and classification. Experimentally, we observed that other choices are suitable for setting this parameter: fine-tuning the $p ^ { * }$ using training inputs at a given resolution and back-propagating the cross-entropy loss provides similar results and values of $p ^ { * }$ (but is more complex).
119
+
120
+ # 4 Experiments and Results
121
+
122
+ # 4.1 Experimental settings
123
+
124
+ Base architecture. We build MultiGrain using ResNet-50 as convolutional trunk (He et al., 2016). The latter is optimized using SGD, starting with a learning rate of 0.2 which is reduced tenfold at epochs $3 0 , 6 0 , 9 0$ for a total of 120 epochs (a standard setting (Paszke et al., 2017)). The batch size is $| B | = 5 1 2$ and an epoch “sees” a fixed number $T = 5 0 0 5$ batches. With uniform sampling, one epoch does two passes over the training set; with RA and $m = 3$ , one epoch sees $\sim 2 / 3$ of the images of the training set. The baselines are trained using this longer schedule for a fair comparison.
125
+
126
+ Data augmentation. Use a standard set of data augmentations (Howard, 2013) detailed in the appendix (table E.1); we refer to this set of augmentations as “full”. The baseline CNN reaches $7 6 . 2 \%$ top-1 validation error when trained with cross-entropy alone and uniform batch sampling (see table 2). This is on the high end of accuracies reported for the ResNet50 network (Goyal et al., 2017; He et al., 2016) without specially-crafted regularization terms (Zhang et al., 2018), data augmentations (Cubuk et al., 2018) or external data.
127
+
128
+ Pooling exponent. During the training of our network, we consider two settings for the GeM layer of section 3.2: we set either $p = 1$ or $p = 3$ . Related work (Radenovi´c et al., 2018) and our preliminary experiments suggest that the value $p = 3$ improves the retrieval performance. Appendix B illustrates the effect of this choice.
129
+
130
+ Input size and cropping. As described in section 3.5, we train our network on crops of $2 2 4 \times 2 2 4$ pixels. For testing, we experiment with resolutions $s ^ { * } = 2 2 4 , 5 0 0 , 8 0 0$ . For resolution $s ^ { * } = 2 2 4$ , we follow the usual classification protocol: the smallest side of the image is resized to 256 and then a $2 2 4 \times 2 2 4$ central crop is extracted. For resolution $s ^ { * } > 2 2 4$ , we instead follow the protocol common in image retrieval: resize the largest side of the image to $s ^ { * }$ and evaluate the network on the rectangular image without cropping.
131
+
132
+ Margin loss and batch sampling. We use $m = 3$ RA repetitions per batch. We use the default margin loss hyperparameters of (Wu et al., 2017) (see appendix E). As in (Wu et al., 2017) distance-weighted sampling is performed independently on each of the 4 GPUs used for training.
133
+
134
+ Datasets. We train our networks on the ImageNet-2012 training set. Classification accuracies are reported on the validation images. For image retrieval, we report the mean average precision on the Holidays dataset (J´egou et al., 2008), with images rotated manually when necessary, as in prior evaluations (Gordo et al., 2016). We also report the accuracy on the UKB object recognition benchmark (Nister & Stewenius, 2006), which shows 2,550 objects under 4 viewpoints each; each image is used as a query to find its 4 closest neighbors in embedding space; the number of correct neighbors is averaged across all images (i.e., the score is in $\lfloor 0 , 4 \rfloor$ ). We report the performance of our network in a copy detection setting, indicating the mean average precision on the “strong” subset of the Inria Copydays dataset (Douze et al., 2009), combined with 10k distractor images randomly sampled from YFCC100M (Thomee et al., 2016). We call the combination C10k. The PCA whitening transformations are computed from the features of 20k images from YFCC100M, distinct from the C10k distractors.
135
+
136
+ # 4.2 Effect of the pooling exponent $p ^ { * }$ and the loss weighting $\lambda$
137
+
138
+ As a starting point, we use RA sampling and pooling exponent $p = 3$ . This gives a 76.9% top-1 validation accuracy on ImageNet, 0.7% points above the baseline, see table 2.
139
+
140
+ ![](images/14c514fdd8f9b958d325b41c122172820d2b552903981b49eb45629c8d5c73c3.jpg)
141
+ Figure 2: Retrieval and classification accuracies as a function of pooling exponent $p ^ { * }$ and the image resolution. At training time, the pooling was $p = 3$ . Note the clear interaction between the resolution $s ^ { * }$ and the pooling exponent $p ^ { * }$ .
142
+
143
+ We now use larger images at test time, i.e., , we set $s ^ { * } > 2 2 4$ and vary the exponents $p ^ { * } \neq p = 3$ Figures 2a and 2b show the classification accuracy and the retrieval accuracy at different resolutions, for different values of the exponent $p ^ { * }$ . As expected, at $s ^ { * } = 2 2 4$ , the pooling exponent yielding best accuracy in classification is the exponent with which the network has been trained, $p ^ { * } = 3$ ; instead, testing at larger scale requires an exponent $p ^ { * } > p$ , both for classification and for retrieval. In the following, we adopt the values obtained by our cross-validation on IN-aug, see section 3.5.
144
+
145
+ We defer to appendix C for the study on the weighting parameter $\lambda$ . We set $\lambda { = } 0 . 5$ in our following experiments, as it gives the best classification accuracy at the practical resolutions $s ^ { * } = 2 2 4$ and 500 pixels. As a reference, we also report a few results with $\lambda = 1$ (i.e., ignoring the retrieval loss).
146
+
147
+ # 4.3 Classification results
148
+
149
+ From now on, our MultiGrain nets are trained at resolution $s = 2 2 4$ with exponent $p = 1$ or $p = 3$ in the GeM pooling. For each evaluation resolutions $s ^ { * } = 2 2 4 , 5 0 0 , 8 0 0$ , the same exponent $p ^ { * }$ is selected according to section 3.5, yielding a single embedding for classification and for retrieval. Table 2 presents the classification results. There is a large improvement in classification performance from our baseline ResNet-50 with $p = 1 , s = 2 2 4$ , “full” data augmentation (76.2% top-1 accuracy), to a MultiGrain model at $p { = } 3 , ~ \lambda { = } 0 . 5 , ~ s { = } 5 0 0$ (78.6% top-1). We identify four sources for this improvement:
150
+
151
+ 1. The RA batch sampling (section 3.3) yields an improvement of +0.6% ( $p = 1$ ).
152
+ 2. The retrieval loss helps the generalizing effect of data augmentation: +0.2% ( $p = 1$ ).
153
+ 3. $p { = } 3$ pooling: GeM at training (section 3.2) allows the margin loss to have a much stronger effect thanks to increased localization of the features: $+ 0 . 4 \%$ .
154
+ 4. Expanding resolution: evaluating at resolution 500 adds $+ 1 . 2 \%$ to the $p = 3$ MultiGrain network, reaching the 78.6 top-1 accuracy. The $p { = } 3$ training yields sparser features, more generalizable over different resolutions, and the $p ^ { * }$ pooling adaptation (without it the performance at this resolution is only $7 8 . 0 \%$ ).
155
+
156
+ The $p ^ { * }$ selection for evaluation at higher resolutions has its limits: at 800 pixels, due to the large discrepancy between the training and testing scale for the feature extractor, the accuracy drops to $7 7 . 2 \%$ (76.2% without the $p ^ { * }$ adaptation).
157
+
158
+ AutoAugment (AA) is a reinforcement learning approach to find data augmentations that improve the accuracy of CNNs (Cubuk et al., 2018). We integrate the augmentations found on their ResNet-50 model. To give more impact to AA, we do 270 passes over the dataset, with batch size 512. MultiGrain with AA reaches $7 8 . 2 \%$ top-1 accuracy at $s ^ { * } = 2 2 4$ ( $p { = } 3$ , $\lambda = 0 . 5$ ). To the best of our knowledge, this is the state-of-the-art for ResNet-50 when evaluating at this resolution: it outperforms AA alone (77.6%) and mixup (Zhang et al., 2018) (76.7%). Increasing the test resolution improves the accuracy to $7 9 . 4 \%$ at $s ^ { * } = 5 0 0$ .
159
+
160
+ We also experimented with other architecture, see appendix G. We observed that the GeM pooling substantially increase the accuracy of off-the-shelf networks, with only a tiny fine
161
+
162
+ <table><tr><td>Architecture</td><td>入</td><td>data aug.</td><td>resol. S*</td><td>train-time pooling p=1</td><td>p=3</td></tr><tr><td>ResNet-50</td><td></td><td>full</td><td>224</td><td>76.2 / 92.9</td><td>76.2/ 93.1</td></tr><tr><td>MultiGrain</td><td>1</td><td>full</td><td>224</td><td>76.8 / 93.2</td><td>76.9/ 93.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>224</td><td>77.0/93.6</td><td>77.4/ 93.6</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>224</td><td>77.4/ 93.6</td><td>78.2 / 93.9</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>500</td><td>76.5 / 93.5</td><td>78.6 94.4</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>500</td><td>77.7 94.0</td><td>79.4 94.8</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>800</td><td>73.5 / 93.5</td><td>77.2 93.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>800</td><td>74.1 / 91.8</td><td>77.8 / 93.9</td></tr><tr><td colspan="2">PyTorch model zoo</td><td></td><td>224</td><td>76.1 92.9</td><td></td></tr><tr><td colspan="2">mixup</td><td></td><td>224</td><td>76.7 / 94.4</td><td></td></tr><tr><td colspan="2">BA (|B|= 1024)</td><td></td><td>224</td><td>76.9 / 1</td><td></td></tr><tr><td colspan="2"></td><td></td><td>224</td><td>77.6 / 93.8</td><td></td></tr><tr><td colspan="2">AutoAugment</td><td></td><td></td><td></td><td></td></tr></table>
163
+
164
+ Table 2: ImageNet 2012 validation performance at top-1 / top5 accuracies ( $\%$ ). Resnet-50 is a classification baseline trained with cross-entropy with our training schedule, data augmentation, and uniform batch sampling. MultiGrain uses the same Resnet50 trunk. At resolutions $s ^ { * } > 2 2 4$ we evaluate with exponent $p ^ { * }$ as described in section 3.5. We compare mixup (Zhang et al., 2018), BA (Hoffer et al., 2019), and AutoAugment (Cubuk et al., 2018).
165
+
166
+ <table><tr><td colspan="4">Method resol. s* Holidays UKB CD10k</td></tr><tr><td>MultiGrain λ=1</td><td>500 800</td><td>91.8 3.89 3.91</td><td>81.1</td></tr><tr><td>MultiGrain λ=1 MultiGrain 入= 0.5</td><td>500</td><td>91.6 91.5 3.90</td><td>82.5 80.7</td></tr><tr><td>MultiGrain 入= 0.5</td><td>800 92.5</td><td>3.91</td><td>78.6</td></tr><tr><td>Fisher vectors Neural codes</td><td>800 63.4</td><td>3.35</td><td>42.7</td></tr><tr><td>ResNet-50 RMAC ResNet-50 RMAC</td><td>224 79.3 724 90.9</td><td>3.56</td><td></td></tr></table>
167
+
168
+ Table 3: Instance search results and baselines, on Holidays ( $\%$ mAP) and UKB (/4). We set $p = 3$ pooling at training time for our MultiGrain models, and $p ^ { * }$ set as given in section 3.5. We compare Fisher vectors (J´egou et al., 2012), neural codes (Babenko et al., 2014), RMAC (Gordo et al., 2016), and GeM (Radenovi´c et al., 2018). $\dagger$ GeM is fine-tuned at resolution 362×362 on additional retrieval data and uses multi-scale input processing at an extra cost.
169
+
170
+ tuning. For example, we obtain a top-1 accuracy of 83.6 with a PNASNet-5-Large, a $+ 0 . 9 \%$ improvement over the original (Liu et al., 2018).
171
+
172
+ # 4.4 Retrieval results
173
+
174
+ Retrieval results are in table 3, an ablation study and copy detection results are in the F. Our MultiGrain nets improve accuracies on all datasets with respect to the ResNet-50 baseline for comparable resolutions. Repeated augmentations (RA) is again a key ingredient in this context. We compare with reported accuracies in (Gordo et al., 2016; 2017), without additional training data. MultiGrain compares favorably with their results at the same resolution ( $s ^ { * } = 8 0 0$ ). They reach accuracies above 93% mAP on Holidays but this requires a resolution $s \geq 1 0 0 0$ pixels.
175
+
176
+ Note that MultiGrain reaches a reasonable retrieval performance at resolution $s ^ { * } = 5 0 0$ , an interesting operating point compared to the traditional inference resolutions $s = 8 0 0 \ – 1 0 0 0$ for retrieval. Indeed, a forward pass of ResNet-50 on 16 processor cores takes 3.80s at resolution 500, against 18.9s at resolution 1024 ( $5 \times$ slower). Because of this quadratic increase in timing, and the single embedding computed by MultiGrain, our solution is particularly apt in large-scale or low-resource vision applications. At resolutions 500 the results with margin loss ( $\lambda = 0 . 5$ ) are slightly lower than without ( $\lambda { = } 1$ ). This is partly due to the limited transfer from the IN-aug task to the variations observed in retrieval datasets.
177
+
178
+ # 5 Conclusion
179
+
180
+ MultiGrain is a unified embedding for image classification and instance retrieval. It relies on a classical CNN trunk, with a GeM pooling layer, topped with two heads at training time. We have discovered that this pooling layer allows us to increase the resolution of images used at inference time, while maintaining a small resolution at training time. We have shown that MultiGrain embeddings can perform well on classification and retrieval. Interestingly, MultiGrain also sets a new state of the art on pure classification compared to all results obtained with the same convolutional trunk. Our approach will be open-sourced.
181
+
182
+ References
183
+ A. Babenko and V. Lempitsky. Aggregating deep convolutional features for image retrieval. In Proc. ICCV, 2015. 1
184
+ Artem Babenko, Anton Slesarev, Alexandr Chigorin, and Victor Lempitsky. Neural codes for image retrieval. In Proc. ECCV, pp. 584–599. Springer, 2014. 2, 8, 16
185
+ Liefeng Bo and Cristian Sminchisescu. Efficient match kernel between sets of features for visual recognition. In Proc. NIPS, 2009. 5
186
+ Y-Lan Boureau, Jean Ponce, and Yann LeCun. A theoretical analysis of feature pooling in visual recognition. In Proc. ICML, 2010. 3, 5, 12
187
+ Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proc. ECCV, 2018. 2
188
+ Ondrej Chum, James Philbin, Josef Sivic, Michael Isard, and Andrew Zisserman. Total recall: Automatic query expansion with a generative feature model for object retrieval. In Proc. ICCV, 2007. 2
189
+ Michael Cogswell, Faruk Ahmed, Ross B. Girshick, C. Lawrence Zitnick, and Dhruv Batra. Reducing overfitting in deep networks by decorrelating representations. CoRR, abs/1511.06068, 2016. 5
190
+ Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv:1805.09501, 2018. 6, 7, 8
191
+ Piotr Doll´ar, Zhuowen Tu, Pietro Perona, and Serge Belongie. Integral channel features. In Proc. BMVC, 2009. 5
192
+ Matthijs Douze, Herv´e J´egou, Harsimrat Sandhawalia, Laurent Amsaleg, and Cordelia Schmid. Evaluation of gist descriptors for web-scale image search. In Proc. CIVR, 2009. 2, 6
193
+ Yunchao Gong, Liwei Wang, Ruiqi Guo, and Svetlana Lazebnik. Multi-scale orderless pooling of deep convolutional activation features. In Proc. ECCV, pp. 392–407. Springer, 2014. 2
194
+ Albert Gordo, Jon Almaz´an, J´erˆome Revaud, and Diane Larlus. Deep image retrieval: Learning global representations for image search. In Proc. ECCV, 2016. 3, 6, 8
195
+ Albert Gordo, Jon Almaz´an, J´erˆome Revaud, and Diane Larlus. End-to-end learning of deep visual representations for image retrieval. IJCV, 124:237–254, 2017. 3, 5, 8
196
+ Priya Goyal, Piotr Doll´ar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: training imagenet in 1 hour. arXiv:1706.02677, 2017. 6
197
+ Michelle Guo, Albert Haque, De-An Huang, Serena Yeung, and Li Fei-Fei. Dynamic task prioritization for multitask learning. In Proc. ECCV, pp. 282–299. Springer, 2018. 3
198
+ Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Proc. CVPR, 2006. 4
199
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv:1510.00149, 2015. 3
200
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, 2016. 2, 6
201
+ Kaiming He, Georgia Gkioxari, Piotr Doll´ar, and Ross Girshick. Mask r-cnn. In Proc. ICCV, 2017. 2
202
+ Elad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: better training with larger batches. arXiv e-prints, art. arXiv:1901.09335, January 2019. 3, 5, 8
203
+ Andrew G Howard. Some improvements on deep convolutional neural network based image classification. arXiv:1312.5402, 2013. 6
204
+ Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proc. CVPR, 2018. 2, 16
205
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proc. CVPR, 2017. 2
206
+ Yanping Huang, Yonglong Cheng, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, and Zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. arXiv:1811.06965, 2018. 2
207
+ Herv´e J´egou and Ondˇrej Chum. Negative evidences and co-occurences in image retrieval: The benefit of pca and whitening. In Proc. ECCV, pp. 774–787. Springer, 2012. 3, 5
208
+ Herv´e J´egou, Matthijs Douze, and Cordelia Schmid. Hamming embedding and weak geometric consistency for large scale image search. In Proc. ECCV, 2008. 2, 6
209
+ Herv´e J´egou, Florent Perronnin, Matthijs Douze, Jorge S´anchez, Patrick Perez, and Cordelia Schmid. Aggregating local image descriptors into compact codes. PAMI, 34(9), 2012. 8
210
+ Iasonas Kokkinos. Ubernet: Training a universal convolutional neural network for low-, mid-, and high-level vision using diverse datasets and limited memory. Proc. CVPR, pp. 5454–5463, 2017. 3
211
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Proc. NIPS, pp. 1097–1105, 2012. 3, 5
212
+ Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In Proc. ECCV, pp. 19–34, 2018. 8, 16
213
+ Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proc. ECCV, 2018. 2
214
+ David Nister and Henrik Stewenius. Scalable recognition with a vocabulary tree. In Proc. CVPR, 2006. 2, 6
215
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS Autodiff Workshop, 2017. 6
216
+ J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Object retrieval with large vocabularies and fast spatial matching. In Proc. CVPR, 2007. 2
217
+ Filip Radenovi´c, Giorgos Tolias, and Ondrej Chum. Fine-tuning CNN image retrieval with no human annotation. TPAMI, 2018. 3, 5, 6, 8
218
+ Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. Proc. CVPR Workshop, pp. 512–519, 2014. 2, 3
219
+ Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Efficient parametrization of multi-domain deep neural networks. In Proc. CVPR, pp. 8119–8127, 2018. 3
220
+ Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proc. CVPR, pp. 815–823, 2015. 4
221
+ Josef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Proc. ICCV, 2003. 2
222
+ Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc100m: the new data in multimedia research. Commun. ACM, 59:64–73, 2016. 6
223
+ Giorgos Tolias and Herv´e J´egou. Visual query expansion with or without geometry: Refining local descriptors by feature aggregation. Pattern Recognition, 47(10), 2014. 2, 3
224
+ Giorgos Tolias, Ronan Sicre, and Herv´e J´egou. Particular object retrieval with integral max-pooling of cnn activations. CoRR, abs/1511.05879, 2015. 3
225
+ Giorgos Tolias, Yannis Avrithis, and Herv´e J´egou. Image search with selective match kernels: aggregation across single and multiple images. IJCV, 116(3):247–261, 2016. 2
226
+ Panu Turcot and David G Lowe. Better matching with fewer features: The selection of useful features in large database recognition problems. In Proc. ICCV, 2009. 2
227
+ Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Proc. ECCV, 2016. 2
228
+ Chao-Yuan Wu, R Manmatha, Alexander J Smola, and Philipp Kr¨ahenb¨uhl. Sampling matters in deep embedding learning. In Proc. ICCV, 2017. 4, 6, 12
229
+ Saining Xie, Ross B. Girshick, Piotr Doll´ar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. Proc. CVPR, pp. 5987–5995, 2017. 2
230
+ Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In Proc. ICLR, 2018. URL https://openreview.net/forum?id=r1Ddp1-Rb. 6, 7, 8
231
+ Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proc. CVPR, pp. 8697–8710, 2018. 16
232
+
233
+ # Appendix
234
+
235
+ We report a few details and additional experiments that did not fit in the main paper. Appendix A outlines the repeated augmentation sampling algorithm. Appendix B illustrates the effect of GeM pooling on activation maps. Appendix C studies the effect of the loss weighting parameter. Appendix D shows the effect of data-augmented batches when training a simple toy model. Appendix E lists the values of a few hyper-parameters used in our method. Appendix F gives a some more ablation results in the retrieval setting. Finally, Appendix G shows how to use the ingredients of MultiGrain to improve the accuracy of an off-the-shelf pre-trained ConvNet at almost no additional training cost. It obtains what appear to be the best reported classification results on imagenet-2012 for a convnet with publicly available weights.
236
+
237
+ # A Sampling pairs in image batches
238
+
239
+ We formalize the algorithm used to sample batches with repeated augmentations.
240
+
241
+ The loss of eq. (2) is computed on a subset of positive and negative pairs ${ \mathcal { P } } ( B ) \subset B ^ { 2 }$ obtained as $\mathscr { P } ( B ) = \mathscr { P } _ { + } ( B ) \cup \mathscr { P } _ { - } ( B )$ where (Wu et al., 2017):
242
+
243
+ $$
244
+ { \mathcal P } _ { + } ( B ) = \{ ( i , j ) \in B ^ { 2 } : y _ { i j } = 1 \} , \qquad { \mathcal P } _ { - } ( B ) = \bigcup _ { ( i , j ) \in { \mathcal P } _ { + } } \{ ( i , j ^ { * } ) \mathrm { ~ w i t h ~ } j ^ { * } \sim p ( \cdot | i ) \} .
245
+ $$
246
+
247
+ This means that one retains all positive pairs in the batch and then, for each positive pair $( i , j )$ , generates a negative pair $( i , j ^ { * } )$ by sampling $j ^ { * }$ with probability
248
+
249
+ $$
250
+ p ( j | i ) \propto \operatorname* { m i n } \{ \tau , q ^ { - 1 } ( D ( e _ { i } , e _ { j } ) ) \} \cdot \mathbf { 1 } _ { \{ y _ { i j } = - 1 \} } ,
251
+ $$
252
+
253
+ where $\tau > 0$ is a parameter and $q ( z ) \propto z ^ { d - 2 } ( 1 - z ^ { 2 } / 4 ) ^ { \frac { d - 3 } { 2 } }$ is a PDF that depends on the embedding dimension $d$ .
254
+
255
+ # B Illustration of the effect of $p ^ { * }$
256
+
257
+ We visualize the effect of changing the GeM pooling exponent $p$ on activation maps at different resolutions. We focus on a single class (racing car) and make the simplistic assumption that there is one channel of the activation map that reacts strongly to that class.
258
+
259
+ Then we can visualize the activation map for that channel on images. Figure B.1 shows a typical result. By setting $p = 3$ , the car is detected with high confidence and without spurious detections. Boureau et al. (2010) analyse average- and max-pooling of sparse features. They find that when the number of pooled features increases, it is beneficial to make them more sparse, which is consistent with the observation we make here.
260
+
261
+ # C Analysis of the tradeoff parameter
262
+
263
+ We analyze the impact of the tradeoff parameter $\lambda$ between the two components of the loss of eq. (3). Note, this parameter does not directly reflect the relative importance of the two loss terms during training, since these are not homogeneous: $\lambda { = } 0 . 5$ does not mean that they have equal importance.
264
+
265
+ Figure C.1 analyzes the actual relative importance of the classification and margin loss terms, by measuring the average norm of the gradient back-propagated through the network at epochs 0 and 120. One can see that $\lambda = 0 . 5$ means that the classification has slightly more weight at the beginning of the training. The classification term becomes dominant at the end of the training, meaning that the network has already learned to cancel data augmentation.
266
+
267
+ In terms of performance, $\lambda { = } 0 . 1$ leads to a poor classification accuracy. Interestingly, the classification performance is higher for the intermediate $\lambda = 0 . 5$ (77.4% at $s ^ { * } = 2 2 4$ ) than for $\lambda = 1$ , see Table 2. Thus, the margin loss leads to a performance gain for the classification task.
268
+
269
+ We set $\lambda = 0 . 5$ in our following experiments, as it gives the best classification accuracy at the practical resolutions $s ^ { * } = 2 2 4$ and 500 pixels. As a reference, we also report a few results with $\lambda = 1$ .
270
+
271
+ ![](images/27f0ff0ca50e63031e8ce73101a047091601bb4113839959c28d71de1b51837d.jpg)
272
+ Figure B.1: An off-the-shelf ResNet-50 reacts strongly on channel 909 of the last activation map for class “racing car”. The image on the left is a hard example for the class. We show channel 909 for that image, at several resolutions and with GeM parameters $p ^ { * } = 1$ and $p ^ { * } = 3$ . In the low resolution version, the cars are too small to be visible individually on the activation map. In the full resolution version, the location of the cars is more clear. In addition, $p ^ { * } = 3$ reduces the noisy detections relative to the true locations.
273
+
274
+ ![](images/333f6d70dbbb36d2c755b93ed9e97808e4ded486cafa63151290047b1173f08a.jpg)
275
+ Figure C.1: Classification vs retrieval loss, measured as $\lVert g ^ { \mathrm { c l a s s } } \rVert / ( \lVert g ^ { \mathrm { c l a s s } } \rVert + \lVert g ^ { \mathrm { r e t r } } \rVert )$ , where the $g ^ { \mathrm { c l a s s } }$ vector is the gradient from the $\lambda \ell ^ { \mathrm { c l a s s } }$ component.
276
+
277
+ ![](images/024e5cfed4881205f1bda40598e139c271b2f5ea6f7627a2a395c80e7a1857f5.jpg)
278
+ Figure D.1: Evolution of the validation accuracy on ImageNet-val with and without dataaugmented batches.
279
+
280
+ ![](images/0fedeada6961d9029d67330b38157f2cb97b68e003e9ac8715ab42cfdf260124.jpg)
281
+ Figure D.2: Training set for the toy model in appendix D.
282
+
283
+ # D Data-augmented batches: toy model
284
+
285
+ We have observed in section 3.3 and appendix C that training our architecture (ResNet-50 trunk) with data-augmented batches yields improvements with respect to the vanilla uniform sampling scheme, despite the decrease in image diversity.
286
+
287
+ This observation holds even in the absence of ranking triplet loss, all things being equal otherwise: same number of iterations per epoch, number of epochs, learning rate schedule, and batch size. As an example, fig. D.1 shows the evolution of the validation accuracy of our network trained under cross-entropy with our training schedule and a $p = 1$ pooling, batches of size 512, with the data augmentation introduced in section 4.1, with uniform batches vs. with batch sampling. While initial epochs suffer from the reduced diversity of the batches compared to the uniformly-sampled variant, the reinforced effect on data augmentation compensates for this in the long run, and makes the batch-augmented variant reach a higher final accuracy.
288
+
289
+ Since we observe this better performance even for a pure image classification task, an interesting question is whether this benefit is specific to our architecture and training method (batch-norm, etc), or if it is more generally applicable? Hereafter we analyse a linear model and synthetic classification task that seems to align with the second hypothesis.
290
+
291
+ We consider an idealized model of the effect of including different data-augmented instances of the same image in one batch using standard stochastic gradient descent. We create a synthetic training set $\mathcal { D }$ of points pictured in fig. D.2 of $N = 1 0 0$ positive and $N = 1 0 0$ negative training points $\pmb { p } ^ { i } = ( p _ { x } ^ { i } , p _ { y } ^ { i } )$ by sampling from two 2D Gaussian distributions:
292
+
293
+ $$
294
+ \begin{array} { r } { p _ { x } ^ { i } \sim \mathcal N ( \mu = 0 , \sigma = 1 ) } \\ { p _ { y } ^ { i } \sim \mathcal N ( \mu = y _ { i } ^ { * } , \sigma = 1 ) } \end{array}
295
+ $$
296
+
297
+ with $y _ { i } ^ { * } = \pm 1$ being the ground truth label. We sample a test dataset in the same manner.
298
+
299
+ ![](images/4364837678a38aa0a99e0d189796890b158d662a93dc73036a361dc2ab7c2a1e.jpg)
300
+ Figure D.3: Evolution of the test accuracy of the SVM trained on the synthetic data, averaged accross 100 runs.
301
+
302
+ Table E.1: Margin loss and data-augmentation parameters
303
+
304
+ <table><tr><td>parameter</td><td>value</td></tr><tr><td>margin α</td><td rowspan="3">0.2 1.2</td></tr><tr><td>initial βo</td></tr><tr><td>β learning rate</td></tr></table>
305
+
306
+ We consider the SGD training of an SVM
307
+
308
+ $$
309
+ f _ { w } ( \pmb { p } _ { i } ) = \pmb { w } ^ { \top } \pmb { p } _ { i }
310
+ $$
311
+
312
+ using the Hinge loss
313
+
314
+ $$
315
+ \ell ^ { \mathrm { h i n g e } } = \operatorname* { m a x } { ( 1 - y _ { i } ^ { * } f _ { w } ( p _ { i } ) , 0 ) } .
316
+ $$
317
+
318
+ We consider the symmetry across the x-axis
319
+
320
+ $$
321
+ \phi ( ( p _ { x } ^ { i } , p _ { y } ^ { i } ) ) = \phi ( ( p _ { x } ^ { i } , - p _ { y } ^ { i } ) )
322
+ $$
323
+
324
+ as a label-preserving data-augmentation suited to our synthetic dataset. We train the SVM (equation D.2) using one pass through the data-augmented dataset $\mathcal { D }$ of size $4 N$ , using batches of size 2.
325
+
326
+ The only difference between the two optimization schedules is the order in which the samples are batched and presented to the optimizer. We consider two batch sampling strategies:
327
+
328
+ • Uniform sampling: we sample the elements of the batch randomly from $\mathcal { D }$ , without replacement;
329
+ • Paired sampling: we generate a batch by pairing a random element from $\mathcal { D }$ and its data-augmentation, removing these two elements from $\mathcal { D }$ .
330
+
331
+ Figure D.3 shows the evaluation of the accuracy with the iterations in both of these cases, averaged across 100 runs. It is clear that pairing the data-augmented pairs in one batch accelerates the convergence of this model.
332
+
333
+ This idealized experiment demonstrates that there are cases in which the repeated augmentation scheme provides an optimization and generalization boost, and reinforces the effect of data augmentation.
334
+
335
+ # E Margin loss hyper-parameters
336
+
337
+ Table E.1 gives the value of the hyper-parameters for the margin loss used during the training of our models.
338
+
339
+ Table E.2 gives the transformations in the full data augmentation used in our experiments (section 4.1), along with their parameters.
340
+
341
+ Table E.2: full data-augmentation transforms and parameters
342
+
343
+ <table><tr><td>transformation</td><td>parameter range</td></tr><tr><td>horizontal flip</td><td></td></tr><tr><td>random resized crop</td><td>scale ∈ [0.08,1.0] ratio ∈ [3/4,4/3]</td></tr><tr><td>color jitter</td><td>brightness 0.3 contrast 0.3 saturation 0.3</td></tr><tr><td>lighting transform</td><td>intensity 0.1</td></tr></table>
344
+
345
+ Table D.1: Full results including Copydays $^ +$ 10k distractors (CD10k, $\%$ mAP), and ablation study for the MultiGrain models. The Pytorch model simply extract the last activation layer as a descriptor (Babenko et al., 2014). Resnet-50 corresponds to features extracted from a classification baseline with $p = 1$ or $p = 3$ GeM pooling, trained with cross-entropy with our training schedule, data augmentation, and uniform batch sampling.
346
+
347
+ <table><tr><td></td><td></td><td></td><td colspan="3">Holidays</td><td colspan="3">UKB</td><td colspan="3">CD10k</td></tr><tr><td>Method</td><td>入</td><td>S*=</td><td>224</td><td>500</td><td>800</td><td>224</td><td>500</td><td>800</td><td>224</td><td>500</td><td>800</td></tr><tr><td>PyTorch model zoo</td><td></td><td></td><td>85.5</td><td>86.6</td><td>82.8</td><td>3.71</td><td>3.85</td><td>3.80</td><td>61.5</td><td>61.1</td><td>43.0</td></tr><tr><td>Resnet-50 trained with p = 1 pooling</td><td></td><td></td><td>83.5</td><td>88.8</td><td>87.1</td><td>3.60</td><td>3.79</td><td>3.82</td><td>59.2</td><td>69.9</td><td>66.2</td></tr><tr><td>Resnet-50 trained with p = 3 pooling</td><td></td><td></td><td>86.8</td><td>90.0</td><td>90.4</td><td>3.73</td><td>3.87</td><td>3.89</td><td>70.6</td><td>78.9</td><td>75.7</td></tr><tr><td>MultiGrain</td><td>1</td><td></td><td>88.9</td><td>91.8</td><td>91.6</td><td>3.78</td><td>3.89</td><td>3.91</td><td>75.1</td><td>81.2</td><td>82.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td></td><td>88.3</td><td>91.5</td><td>92.5</td><td>3.78</td><td>3.90</td><td>3.91</td><td>74.1</td><td>80.7</td><td>78.6</td></tr><tr><td>MultiGrain +AA</td><td>0.5</td><td></td><td>86.5</td><td>90.3</td><td>89.4</td><td>3.75</td><td>3.89</td><td>3.90</td><td>69.7</td><td>77.8</td><td>76.1</td></tr></table>
348
+
349
+ F Additional results and ablation study for Multigrain in retrieval
350
+
351
+ Table D.1 reports additional results of the MultiGrain architecture, with an ablation study analyzing the effect of each component.
352
+
353
+ As already reported in the main paper, for some datasets the choice of not using the triplet loss ( $\lambda = 1$ ) is as good or better than our generic choice ( $\lambda = 0 . 5$ ). Of course, then the embedding is not multi-purpose anymore. Overall, the different elements employed in our architecture (RA and the layers specific to Multigrain) still give a significant improvement over simply using the activations, and is competitive with the state of the art for the same resolution/complexity.
354
+
355
+ Note, the AutoAugment data augmentation does not transfer well to the retrieval tasks. This can be explained by their specificity to Imagenet classification. This shows the limitation of a particular choice of data-augmentation if a single embedding for classification and retrieval datasets is desired. Learning AutoAugment specifically for the retrieval task would certainly help, but would probably also result in less general embeddings. Hence, data-augmentation is a limiting factor for multi-purpose embeddings: improving for one task like classification hurts the performance for other tasks.
356
+
357
+ Table E.1: Additional top-1/top-5 validation classification accuracies obtained by finetuning $p ^ { * }$ for higher evaluation scales from off-the-shelf networks: NASNet (Zoph et al., 2018), SENet (Hu et al., 2018) and PNASNet (Liu et al., 2018). The first column indicates the training resolution $s$ and the accuracy we measured at this resolution, with standard evaluation (resize of the largest scale to $s \cdot 2 5 6 / 2 2 4 +$ center crop). The subsequent columns show the accuracy measured at higher resolutions $s ^ { * } = 3 5 0 , 4 0 0 , 4 5 0 , 5 0 0$ without cropping, together with the $p ^ { * }$ found by finetuning for these resolutions (appendix G).
358
+
359
+ <table><tr><td></td><td colspan="2">original evaluation</td><td colspan="2">=350 S*</td><td colspan="2">8*=400</td><td colspan="2">s*=450</td><td colspan="2">=500 5*</td></tr><tr><td>Architecture</td><td>S</td><td>acc. (%)</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td></tr><tr><td>NASNet-A-Mobile 224</td><td></td><td>74.1/91.7</td><td></td><td>1.7 75.1/92.5</td><td></td><td>2.1 74.2/92.1</td><td></td><td>2.4 71.8/90.9</td><td>2.6</td><td>68.4/89.0</td></tr><tr><td>SENet154</td><td>224</td><td>81.3/95.5</td><td>1.6</td><td>82.6/96.2</td><td></td><td>1.6 83.0/96.5 1.6 83.1/96.5</td><td></td><td></td><td>1.7</td><td>82.7/96.3</td></tr><tr><td>PNASNet-5-Large</td><td>331</td><td>82.7/96.0</td><td>1.0</td><td>81.3/85.4</td><td></td><td>1.4 82.6/96.1 1.5</td><td></td><td>83.2/96.4</td><td></td><td>1.7 83.6/96.7</td></tr></table>
360
+
361
+ # G Evaluation of off-the-shelf classifiers at higher resolutions
362
+
363
+ In this section, we present some additional classification results using off-the-shelf pretrained classification networks trained with standard average pooling ( $p = 1$ ).
364
+
365
+ As outlined in sections 3.5 and 4.2, one of our contributions is a strategy for evaluating classifier networks trained with GeM pooling at scale $s$ and exponent $p$ at a higher resolution $s ^ { * }$ and adapted exponent $p ^ { * }$ . It can be used on pretrained networks as well.
366
+
367
+ For an evaluation scale $s ^ { * }$ , we use the alternative strategy described in section 3.5 to choose $p ^ { * }$ : we finetune the parameter $p ^ { * }$ by stochastic gradient descent, backpropagating the crossentropy loss on training images from imagenet, rescaled to the desired input resolution. Compared to a full finetuning at this input resolution, this strategy has a limited memory footprint, given that the backpropagation only has to be done on the ultimate classification layer before reaching the pooling layer, allowing for an efficient computation of the gradient of $p ^ { * }$ . Experimentally we also found that this process converges on a few thousands of training samples, while a finetuning of the classification layer would require several data-augmented epochs on the full training set.
368
+
369
+ The finetuning is done using SGD with batches of $| B | = 4$ (non-cropped) images, with momentum 0.9 and initial learning rate $\mathrm { l r } ^ { ( 0 ) } = 0 . 0 0 5$ , decayed under a polynomial learning rate decay
370
+
371
+ $$
372
+ \mathrm { l r } ^ { ( i ) } = \mathrm { l r } ^ { ( 0 ) } \left( 1 - \frac { i } { i _ { \mathrm { m a x } } } \right) ^ { 0 . 9 }
373
+ $$
374
+
375
+ with $i _ { \mathrm { m a x } }$ the total number of iterations.
376
+
377
+ We select $5 0 , 0 0 0$ images from the training set (50 per category) for the fine-tuning and do one pass on this reduced dataset. We use off-the-shelf pretrained convnets from the Cadene/pretrained-model repository2. Table E.1 outlines the resulting validation accuracies. We see that for each network there is a scale and choice of $p ^ { * }$ that performs better than the standard evaluation.
378
+
379
+ These networks have not been trained using GeM pooling with $p > 1$ ; as exhibited in our classification results (table 2) we found this to be another key ingredient in ensuring a higher scale insensitivity and better performance at larger resolution. As in our main experiments with the MultiGrain architecture with a ResNet-50 backbone, it is likely that these networks would reach higher values when training from scratch with a $p > 1$ pooling, and adding repeated augmentations and margin loss. However, running training experiments on these large networks is significantly more expensive. Therefore, we leave this for future work.
parse/train/SkeGURNtDH/SkeGURNtDH_content_list.json ADDED
@@ -0,0 +1,1739 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "MultiGrain: a unified image embedding for classes and instances ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 101,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 181,
19
+ 170,
20
+ 416,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 452,
31
+ 234,
32
+ 545,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We introduce MultiGrain, a neural network architecture that generates compact image embedding vectors that solve multiple tasks of different granularity: class, instance, and copy recognition. MultiGrain is trained jointly for classification by optimizing the cross-entropy loss and for instance/copy recognition by optimizing a self-supervised ranking loss. The self-supervised loss only uses data augmentation and thus does not require additional labels. Remarkably, the unified embeddings are not only much more compact than using several specialized embeddings, but they also have the same or better accuracy. When fed to a linear classifier, MultiGrain using ResNet-50 achieves $7 9 . 4 \\%$ top-1 accuracy on ImageNet, a $+ 1 . 8 \\%$ absolute improvement over the the current state-of-the-art AutoAugment method. The same embeddings perform on par with state-of-the-art instance retrieval with images of moderate resolution. An ablation study shows that our approach benefits from the self-supervision, the pooling method and the mini-batches with repeated augmentations of the same image. ",
40
+ "bbox": [
41
+ 233,
42
+ 276,
43
+ 764,
44
+ 484
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 523,
55
+ 339,
56
+ 540
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Image recognition is central to computer vision, with dozens of new approaches being proposed every year, each optimized for particular aspects of the problem. From coarse to fine, we may distinguish the recognition of (a) classes, where one looks for a certain type of object regardless of intra-class variations, (b) instances, where one looks for a particular object despite changes in the viewing conditions, and (c) copies, where one looks for a copy of a specific image despite edits. While these problems are in many ways similar, the standard practice is to use specialized, and thus incompatible, image representations for each case. ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 823,
67
+ 646
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Consider for example image retrieval, where the goal is to match a query image to a large database of other images, whose applications include detection of copyrighted images and exemplar-based recognition of unseen objects. Often one would like to search the same collection with multiple granularities, by matching the query by class, instance, or copy. Adopting multiple image embeddings, narrowly optimized for each granularity, means multiplying the resource usage. Using a single embedding relevant to all these tasks reduces both the computing time and the storage space. However, this might come at the cost of a reduced accuracy. ",
74
+ "bbox": [
75
+ 174,
76
+ 652,
77
+ 823,
78
+ 763
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper we introduce MultiGrain, a compact embedding that, as illustrated in fig. 1, can solve recognition tasks of different granularities while maintaining or surpassing the accuracy of specialized embeddings. MultiGrain is obtained by training a Convolutional Neural Network (CNN) jointly on the different tasks. CNNs trained for image classification are known to be good universal features extractors. However, authors (Babenko & Lempitsky, 2015) have noted that the intermediate layers of such CNNs are generally better for low-level tasks such as instance and copy recognition. In contrast, our work extracts a single global embedding at the top of the network. The key is to optimize this embedding simultaneously for classification and instance retrieval. In this manner, the same representation integrates different degrees of invariance. Indeed, by definition, copies of the same image contain the same instance, and images that contain the same instance also contain the same class. ",
85
+ "bbox": [
86
+ 174,
87
+ 770,
88
+ 825,
89
+ 922
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/d1ae48e80899194c59adbfe03e907ef15317de66b11fe5116b41e56fd8e029cd.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Top: Our goal is to extract an image descriptor incorporating different levels of granularity, so that we can solve, classification and particular object recognition tasks: The descriptor is either fed to a linear classifier, or directly compared with cosine similarity. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 179,
102
+ 109,
103
+ 517,
104
+ 212
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "Right: The MultiGrain architecture. ",
111
+ "bbox": [
112
+ 181,
113
+ 327,
114
+ 439,
115
+ 340
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "image",
121
+ "img_path": "images/748b845b9b2c5141ca70cfae892e16028de41518669726df842bf1c8f01981b1.jpg",
122
+ "image_caption": [],
123
+ "image_footnote": [],
124
+ "bbox": [
125
+ 534,
126
+ 102,
127
+ 821,
128
+ 352
129
+ ],
130
+ "page_idx": 1
131
+ },
132
+ {
133
+ "type": "text",
134
+ "text": "As an additional contribution, we show that MultiGrain can be learned using only class-level labels via self-supervised learning (Caron et al., 2018). The instance recognition is learned for free, without labels specific to instance recognition: we use the identity of arbitrary images as labels, and data augmentation to generate different versions of each image. We also find that, unexpectedly, forming batches with multiple augmentations of the same image, improves the classifier performance, even for models trained only for classification. This contradicts the common knowledge that training batches should maximize diversity. Finally, we incorporate in MultiGrain a pooling layer inspired by image retrieval that boosts the classification accuracy for high-resolution images. ",
135
+ "bbox": [
136
+ 173,
137
+ 367,
138
+ 825,
139
+ 493
140
+ ],
141
+ "page_idx": 1
142
+ },
143
+ {
144
+ "type": "text",
145
+ "text": "Overall, MultiGrain offers compelling performance both for classification and image retrieval, including outperforming the SoTA classification accuracy on ImageNet for ResNet-50. ",
146
+ "bbox": [
147
+ 174,
148
+ 501,
149
+ 823,
150
+ 529
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "2 Related work ",
157
+ "text_level": 1,
158
+ "bbox": [
159
+ 176,
160
+ 545,
161
+ 349,
162
+ 560
163
+ ],
164
+ "page_idx": 1
165
+ },
166
+ {
167
+ "type": "text",
168
+ "text": "Image classification. Most CNNs designed for a wide range of tasks leverage a trunk designed for classification, such as Residual networks (He et al., 2016). An improvement on the trunk architecture translates to better accuracies in other tasks (He et al., 2017), see eg. the detection task of LSVRC’15. Architectural improvements (Hu et al., 2018; Huang et al., 2017; Xie et al., 2017) exhibit additional gains; training on weakly annotated data (Mahajan et al., 2018) or using embedding loss at the class level (Wen et al., 2016) can also improve the accuracy. To our knowledge, the state of the art on ILSVRC 2012 for a model learned from scratch on Imagenet data only is currently held by the gigantic AmoebaNet-B architecture (Huang et al., 2018) (557M parameters), which takes 480 $\\times$ 480 images as input. In our paper, we choose ResNet-50 (He et al., 2016) (25.6M parameters), as this architecture is adopted in the literature in many works both on image classification and instance retrieval. ",
169
+ "bbox": [
170
+ 174,
171
+ 569,
172
+ 825,
173
+ 723
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "Image search. The objective of Image search is to find the images most similar to the query in a large image collection. It is usually evaluated for more specific problems such as landmark recognition (Philbin et al., 2007; J´egou et al., 2008), particular object recognition (Nister $\\&$ Stewenius, 2006) or copy detection (Douze et al., 2009). In this paper image retrieval refers to instance-level retrieval, where object instances are as broad as possible, i.e., not restricted to buildings, as in the Oxford/Paris benchmark. Typically, a query image is described by an embedding vector, and the task amounts to searching the nearest neighbors of this vector in the embedding space. Refinement steps include as geometric verification (Philbin et al., 2007), query expansion (Chum et al., 2007; Tolias & J´egou, 2014), or database-side pre-processing or augmentation (Tolias et al., 2016; Turcot & Lowe, 2009), but this paper focuses on the first part. Traditionally, local image descriptors are aggregated to image embeddings, as in the bag-of-words model (Sivic & Zisserman, 2003). It has since become apparent that CNNs trained on classification datasets are competitive image feature extractors for instance retrieval (Babenko et al., 2014; Gong et al., 2014; Razavian et al., 2014). ",
180
+ "bbox": [
181
+ 174,
182
+ 729,
183
+ 825,
184
+ 924
185
+ ],
186
+ "page_idx": 1
187
+ },
188
+ {
189
+ "type": "table",
190
+ "img_path": "images/a6042070db1ba8298a7f249c8cb46e83ca5c825c7f8ab315dd7dc2f3b43fb388.jpg",
191
+ "table_caption": [
192
+ "Table 1: Differences between classification and image retrieval: Retrieval architectures incorporate a final pooling layer that is regionalized (RMAC of Tolias $\\&$ J´egou (2014)) or magnifies activations (GeM of Radenovi´c et al. (2018)). The triplet loss (Gordo et al., 2016) requires a batching strategy with pairs of matching images. "
193
+ ],
194
+ "table_footnote": [],
195
+ "table_body": "<table><tr><td></td><td>classification</td><td>retrieval</td></tr><tr><td>spatial pool.</td><td>avg. pooling</td><td>RMAC or GeM</td></tr><tr><td>loss</td><td>cross-entropy</td><td>triplet</td></tr><tr><td>batch samp.</td><td>diverse</td><td>not diverse</td></tr><tr><td>whitening</td><td>no</td><td>yes</td></tr><tr><td rowspan=\"2\">resolution</td><td>low</td><td>high</td></tr><tr><td>(224²-3002)</td><td>(800-1k×scaled)</td></tr></table>",
196
+ "bbox": [
197
+ 173,
198
+ 111,
199
+ 478,
200
+ 217
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Architectures for instance search are regular classification trunks, modified so the pooling stage gives more spatial locality, to cope with small objects and clutter. A competitive baseline for instance retrieval is the R-MAC image descriptor (Tolias et al., 2015). It aggregates regionally pooled features extracted from an activation map. This pooling combined with PCA whitening (J´egou & Chum, 2012) leads to efficient many-to-many comparisons between image regions. Gordo et al. (2016; 2017) fine-tune this representation end-to-end on an external image retrieval dataset. Unlike their approach, we do not assume in this work that we have a domain-specific training set. Radenovi´c et al. (2018) depart from regional pooling by adopting a generalized mean pooling (see section 3.2). It is a spatial pooling of the features raised to an exponent $p$ over the whole image, which offers some benefits as analyzed by Boureau et al. (2010) with respect to noise-to-signal ratio and in simple image classification tasks. ",
207
+ "bbox": [
208
+ 174,
209
+ 239,
210
+ 825,
211
+ 406
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Multi-task training stems from the observation that CNNs transfer to a wide range of vision tasks (Razavian et al., 2014) and exhibit a high level of compressibility (Han et al., 2015). Despite some successes with multi-task networks such as UberNet (Kokkinos, 2017), their design and training still involve numerous heuristics. Ongoing lines of work investigate efficient sharing of parameters (Rebuffi et al., 2018), and proper hyper-parameters settings to weight the gradients from different tasks (Guo et al., 2018). ",
218
+ "bbox": [
219
+ 174,
220
+ 414,
221
+ 825,
222
+ 497
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "Data augmentation improves generalization and reduces over-fitting (Krizhevsky et al., 2012). Traditionally, batches were made to contain random samples of the training set. The recently introduced batch augmented (BA) (Hoffer et al., 2019) sampling strategy consists in augmenting the size of the batches and filling them with data-augmented copies of the same image. This yields better generalization performance, and uses computing resources more efficiently through reduced data processing time. We show that this improvement can be obtained using the same batch size, i.e., , with a lower number of distinct images per batch. We see this repeated augmentations (RA) scheme as a way to boost the effect of data augmentation over the course of the optimization. Thus, RA is a technique of general interest, beyond large-scale distributed training. ",
229
+ "bbox": [
230
+ 173,
231
+ 505,
232
+ 825,
233
+ 643
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "3 Architecture design ",
240
+ "text_level": 1,
241
+ "bbox": [
242
+ 176,
243
+ 660,
244
+ 415,
245
+ 675
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "In the current best practices, the architectures and training procedures used for class and instance recognition differ significantly. This section describes the differences, summarized in table 1, and our solutions to bridge them, leading to the MultiGrain architecture in fig. 1. ",
252
+ "bbox": [
253
+ 174,
254
+ 684,
255
+ 825,
256
+ 726
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "3.1 Training objective ",
263
+ "text_level": 1,
264
+ "bbox": [
265
+ 174,
266
+ 739,
267
+ 375,
268
+ 753
269
+ ],
270
+ "page_idx": 2
271
+ },
272
+ {
273
+ "type": "text",
274
+ "text": "MultiGrain is jointly optimized for the classification and retrieval tasks, which is obtained by combining a classification loss and an instance retrieval loss in the optimization. ",
275
+ "bbox": [
276
+ 173,
277
+ 761,
278
+ 823,
279
+ 790
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "Classification loss. We adopt the standard cross-entropy loss. Given $e _ { i } \\in \\mathbb { R } ^ { d }$ the output of eq. (4) for image $i$ , $\\pmb { w } _ { c } \\in \\mathbb { R } ^ { d }$ the parameters of a linear classifier1 for class $c = 1 , \\ldots , C$ , and $y _ { i }$ the ground-truth class for that image, then ",
286
+ "bbox": [
287
+ 174,
288
+ 796,
289
+ 826,
290
+ 838
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "equation",
296
+ "img_path": "images/f66505aa0cadb7123b539a64a03c7f8335e253abbd6976e2f43e21cf35db2728.jpg",
297
+ "text": "$$\n\\ell ^ { \\mathrm { c l a s s } } ( e _ { i } , [ { \\pmb w } _ { 1 } , \\ldots , { \\pmb w } _ { C } ] , y _ { i } ) = - \\langle { \\pmb w } _ { y _ { i } } , { \\pmb e } _ { i } \\rangle + \\log \\sum _ { c = 1 } ^ { C } \\exp \\langle { \\pmb w } _ { c } , { \\pmb e } _ { i } \\rangle .\n$$",
298
+ "text_format": "latex",
299
+ "bbox": [
300
+ 284,
301
+ 848,
302
+ 714,
303
+ 890
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Retrieval loss. The triplet loss (Schroff et al., 2015) imposes that a query image embedding must be closer to the embedding of an image that matches it than to other embeddings. The contrastive loss (Hadsell et al., 2006) imposes a stricter condition: all embedding distances between pairs of matching images must be smaller than all embedding distances between pairs of non-matching images. Optimizing both these losses depends on hard-to-tune hyper-parameters, including how pairs and triplets are sampled. ",
310
+ "bbox": [
311
+ 174,
312
+ 102,
313
+ 825,
314
+ 188
315
+ ],
316
+ "page_idx": 3
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "Some of these issues are solved by the approach of Wu et al. (2017), which starts from a batch of images and (1) normalizes their embeddings to the unit sphere, (2) samples negative pairs using the current embedding similarity, and (3) uses the pairs in a margin loss (that combines contrastive and triplet loss). Given images $i , j \\in B$ in a batch, the margin loss is given by: ",
321
+ "bbox": [
322
+ 173,
323
+ 193,
324
+ 825,
325
+ 262
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "equation",
331
+ "img_path": "images/7d01a65026313a85d6bbec47e504e1565fe0006e5e1a2fdf26803c47956b942b.jpg",
332
+ "text": "$$\n\\ell ^ { \\mathrm { r e t r } } ( e _ { i } , e _ { j } , \\beta , y _ { i j } ) = \\operatorname* { m a x } \\{ 0 , \\ \\alpha + y _ { i j } ( D ( e _ { i } , e _ { j } ) - \\beta ) \\}\n$$",
333
+ "text_format": "latex",
334
+ "bbox": [
335
+ 312,
336
+ 262,
337
+ 684,
338
+ 280
339
+ ],
340
+ "page_idx": 3
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "where $D ( e _ { i } , e _ { j } ) = \\| e _ { i } / \\| e _ { i } \\| - e _ { j } / \\| e _ { j } \\| \\big |$ is the Euclidean distance between the normalized embeddings, the label $y _ { i j }$ is equal to $+ 1$ if the images match and to $^ { - 1 }$ otherwise, $\\alpha > 0$ i s the margin (a hyper-parameter), and $\\beta > 0$ is a learnable parameter controlling the volume of the space occupied embedding vectors. Due to the normalization, $D ( e _ { i } , e _ { j } )$ is equivalent to a cosine similarity, which, up to whitening (section 3.4), is commonly used in retrieval. ",
345
+ "bbox": [
346
+ 174,
347
+ 281,
348
+ 825,
349
+ 353
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "We use distance-weighted sampling to sample pairs of images (see appendix A for details). This sampling is suited to our joint training: it tolerates relatively small batch sizes ( $| B | \\sim 8 0$ to 120) and a small amount of positives images (3 to 5) of each instance in the batch, without the need for elaborate parameter tuning or offline sampling. ",
356
+ "bbox": [
357
+ 174,
358
+ 358,
359
+ 825,
360
+ 415
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "Joint loss. The joint loss on batch $\\boldsymbol { B }$ is a combination weighted by a factor $\\lambda \\in \\left[ 0 , 1 \\right]$ : ",
367
+ "bbox": [
368
+ 173,
369
+ 421,
370
+ 802,
371
+ 436
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "equation",
377
+ "img_path": "images/bf9e2d29ab3a7fd0c96d4677304f2082dfa99577f29c4a7cd9bf22e74e0e54af.jpg",
378
+ "text": "$$\n\\frac { \\lambda } { | \\mathcal { B } | } \\cdot \\sum _ { i \\in \\mathcal { B } } \\ell ^ { \\mathrm { c l a s s } } ( e _ { i } , w , y _ { i } ) + \\frac { 1 - \\lambda } { | \\mathcal { P } ( \\mathcal { B } ) | } \\cdot \\sum _ { ( i , j ) \\in \\mathcal { P } ( \\mathcal { B } ) } \\ell ^ { \\mathrm { r e t r } } ( e _ { i } , e _ { j } , \\beta , y _ { i j } ) .\n$$",
379
+ "text_format": "latex",
380
+ "bbox": [
381
+ 289,
382
+ 443,
383
+ 709,
384
+ 484
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "Note that the losses are normalized by the number of items in the corresponding summations. ",
391
+ "bbox": [
392
+ 174,
393
+ 489,
394
+ 825,
395
+ 506
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "3.2 Spatial pooling operators ",
402
+ "text_level": 1,
403
+ "bbox": [
404
+ 176,
405
+ 517,
406
+ 437,
407
+ 531
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "For recognition tasks, one requires to encode the whole image as a single vector. The latter is usually obtained by applying a global spatial pooling operator to the 3D activation tensor produced by the convolutional trunk of the network. This should be contrasted with local pooling operators, typically max pooling, that are found throughout the layers of CNNs to achieve local invariance to small translations. ",
414
+ "bbox": [
415
+ 173,
416
+ 537,
417
+ 823,
418
+ 608
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "The choice of global pooling operator has a significant effect on the representation. Recent architectures for classification, such as ResNet and DenseNet, use average pooling. Average pooling is permutation invariant and hence less sensitive to geometric transformations. It is also flexible as it allows the model to be applied to images of any size. ",
425
+ "bbox": [
426
+ 173,
427
+ 614,
428
+ 825,
429
+ 671
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "Image retrieval, on the other hand, requires more localized and fine-grained geometric information than the one captured by average pooling. This is because (i) the representation requires less invariance since object instances and landmarks are visually more similar and (ii) images are often more cluttered, with just a small distinctive part that warrants identification. Hence, the pooling should preserve local information. Next, we discuss the generalized mean pooling operator as a solution to this problem. ",
436
+ "bbox": [
437
+ 173,
438
+ 678,
439
+ 825,
440
+ 762
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "Let $\\pmb { x } \\in \\mathbb { R } ^ { C \\times W \\times H }$ be the feature tensor computed by a convolutional neural network for a given input image. The tensor represents a feature map with $C$ channels, height $H$ and width $W$ . Let $u \\in \\Omega = \\{ 1 , \\dots , H \\} \\times \\{ 1 , \\dots , W \\}$ be “pixel” in the map, $c$ the channel, and by $x _ { c u }$ the tensor element at location $u$ and channel $c$ , so that $\\pmb { x } = [ x _ { c u } ] _ { c = 1 , . . . , C , u \\in \\Omega }$ . The generalized mean pooling (GeM) layer computes the generalized mean of each channel: ",
447
+ "bbox": [
448
+ 173,
449
+ 767,
450
+ 825,
451
+ 839
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "equation",
457
+ "img_path": "images/93d163988675c7cc0a3b623e57e991fbfde7ccbb9220ba86ffac8e38de4a2410.jpg",
458
+ "text": "$$\ne = \\left[ \\left( \\frac { 1 } { | \\Omega | } \\sum _ { u \\in \\Omega } x _ { c u } ^ { p } \\right) ^ { \\frac { 1 } { p } } \\right] _ { c = 1 , \\dots , C }\n$$",
459
+ "text_format": "latex",
460
+ "bbox": [
461
+ 392,
462
+ 845,
463
+ 604,
464
+ 890
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "where the exponent $p > 0$ is a parameter. Average pooling and max pooling are equivalent to GeM with $p = 1$ , and $p = \\infty$ , respectively. Exponents in the range $1 < p < \\infty$ are a trade-off between the two (Bo & Sminchisescu, 2009; Boureau et al., 2010; Doll´ar et al., 2009). GeM was introduced for image retrieval as a component of R-MAC that approximates max pooling (Doll´ar et al., 2009), but (Radenovi´c et al., 2018) showed it is competitive on its own. (Boureau et al., 2010) studied this layer in the context of scene recognition/image classification. MultiGrain uses it to bridge the two worlds, as well as to dynamically adapt the network to varying image resolution. ",
471
+ "bbox": [
472
+ 173,
473
+ 895,
474
+ 823,
475
+ 924
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "",
482
+ "bbox": [
483
+ 174,
484
+ 103,
485
+ 825,
486
+ 188
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "3.3 Batching with repeated augmentation (RA) ",
493
+ "text_level": 1,
494
+ "bbox": [
495
+ 173,
496
+ 204,
497
+ 584,
498
+ 219
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "We introduce repeated augmentations, a sampling scheme for training with SGD and data augmentation. In RA we form an image batch $\\boldsymbol { B }$ by sampling $\\lceil \\lvert B \\rvert / m \\rceil$ different images, and transform them up to $m$ times by a set of data augmentations. Thus, the instance level ground-truth $y _ { i j } = + 1$ iff images $i$ and $j$ are two augmented versions of the same image. The key difference with the standard sampling scheme in SGD is that samples are not independent. ",
505
+ "bbox": [
506
+ 174,
507
+ 226,
508
+ 825,
509
+ 309
510
+ ],
511
+ "page_idx": 4
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "For a given learning rate, RA has lower performance than the standard i.i.d. scheme for small batch sizes, but outperforms it with larger batches. This is different from the observation of (Hoffer et al., 2019), who also consider repeated samples in a batch, but simultaneously increase its size. ",
516
+ "bbox": [
517
+ 174,
518
+ 315,
519
+ 825,
520
+ 372
521
+ ],
522
+ "page_idx": 4
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "With standard sampling, two versions of the same image are seen only in different epochs. We conjecture that correlated RA samples facilitate learning features that are invariant to the only difference between the repeated images — the augmentations. Appendix D shows this phenomenon in a simple artificial setting. ",
527
+ "bbox": [
528
+ 174,
529
+ 380,
530
+ 825,
531
+ 435
532
+ ],
533
+ "page_idx": 4
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "3.4 PCA whitening ",
538
+ "text_level": 1,
539
+ "bbox": [
540
+ 176,
541
+ 452,
542
+ 343,
543
+ 467
544
+ ],
545
+ "page_idx": 4
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "We apply a step of PCA whitening to the embeddings to use them for retrieval, in accordance with previous works (Gordo et al., 2017; J´egou $\\&$ Chum, 2012). The Euclidean distance between transformed features is equivalent to the Mahalanobis distance between the input descriptors. The PCA is trained at the end of the CNN training, using an external dataset of unlabelled images. The whitening operation $\\Phi$ can be written as $\\Phi ( e ) = \\mathbf { S } \\left( e / | | e | | - \\mu \\right)$ given the whitening matrix $\\mathbf { s }$ and centering vector $\\pmb { \\mu }$ . ",
550
+ "bbox": [
551
+ 174,
552
+ 473,
553
+ 825,
554
+ 558
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "The parameters of the classification layer have to be modified to take the whitened embeddings as input. For the classifier $\\langle { \\pmb w } _ { \\underline { { c } } } , { \\pmb e } \\rangle$ of eq. (1), we have $\\begin{array} { r } { \\langle \\pmb { w } _ { c } , \\pmb { e } \\rangle = \\langle \\pmb { w } _ { c } , \\pmb { \\Phi } ^ { - 1 } ( \\pmb { \\Phi } ( \\pmb { e } ) ) \\rangle = } \\end{array}$ $\\| e \\| \\left( \\langle \\pmb { w } _ { c } ^ { \\prime } , \\Phi ( e ) \\rangle + b _ { c } ^ { \\prime } \\right)$ where ${ \\pmb w } _ { c } ^ { \\prime } = S ^ { - \\top } { \\pmb w } _ { c }$ and $b _ { c } ^ { \\prime } = \\langle { \\pmb w } _ { c } , { \\mu } \\rangle$ are the modified weight and bias for class $c$ . We observed that inducing decorrelation via a loss (Cogswell et al., 2016) is insufficient to ensure that features generalize well, which concurs with prior works (Gordo et al., 2017; Radenovi´c et al., 2018). ",
561
+ "bbox": [
562
+ 174,
563
+ 564,
564
+ 825,
565
+ 648
566
+ ],
567
+ "page_idx": 4
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "3.5 Input sizes ",
572
+ "text_level": 1,
573
+ "bbox": [
574
+ 174,
575
+ 665,
576
+ 305,
577
+ 679
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "In image classification, it is standard to resize and center-crop input images to a low resolution, e.g. $2 2 4 \\times 2 2 4$ pixels (Krizhevsky et al., 2012). The benefits are a smaller memory footprint, faster inference, and the possibility of batching the inputs if they are cropped to a common size. On the other hand, image retrieval depends on finer details in the images, as an instance can small or seen under a variety of scales. Feature extractors for image retrieval therefore commonly use input sizes of 800 (Gordo et al., 2017) or 1024 (Radenovi´c et al., 2018) pixels, without cropping the image to a square. This is impractical for end-to-end training. ",
584
+ "bbox": [
585
+ 174,
586
+ 686,
587
+ 825,
588
+ 784
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "We train MultiGrain at the standard $2 2 4 \\times 2 2 4$ resolution, and use larger resolutions at test time. Indeed, a network trained with a pooling exponent $p$ and resolution $s$ can be evaluated at a larger resolution $s ^ { * } > s$ using a larger pooling exponent $p ^ { * } > p$ , see section 4.3. ",
595
+ "bbox": [
596
+ 176,
597
+ 790,
598
+ 820,
599
+ 833
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "Proxy task to cross-validate $p ^ { * }$ . To select the exponent $p ^ { * }$ , suitable for all tasks, we create a synthetic retrieval task IN-aug: we sample 2,000 images from the training set of ImageNet, 2 per class, and create 5 augmented copies of each of them. We query all images using the retrieval embeddings and evaluate the retrieval accuracy on IN-aug by measuring how many of the first 5 augmentations of the image are ranked in top 5 positions. The best-performing $p ^ { * } \\in \\{ 1 , 2 , . . . , 1 0 \\}$ on IN-aug is shown in the table. ",
606
+ "bbox": [
607
+ 174,
608
+ 840,
609
+ 612,
610
+ 924
611
+ ],
612
+ "page_idx": 4
613
+ },
614
+ {
615
+ "type": "table",
616
+ "img_path": "images/82bc48c05cd80b6cb6e289944e2e8366e8a6eaa689949ec01f3c8c93a4a32326.jpg",
617
+ "table_caption": [],
618
+ "table_footnote": [],
619
+ "table_body": "<table><tr><td>入s*=</td><td></td><td>224</td><td>500</td><td>800</td></tr><tr><td></td><td>1p 二</td><td>3</td><td>4</td><td>4</td></tr><tr><td>0.5</td><td>p* 二</td><td>3</td><td>4</td><td>5</td></tr></table>",
620
+ "bbox": [
621
+ 625,
622
+ 852,
623
+ 820,
624
+ 906
625
+ ],
626
+ "page_idx": 4
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "",
631
+ "bbox": [
632
+ 171,
633
+ 103,
634
+ 821,
635
+ 132
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "The optimal $p ^ { * }$ obtained on IN-aug is a trade-off between retrieval and classification. Experimentally, we observed that other choices are suitable for setting this parameter: fine-tuning the $p ^ { * }$ using training inputs at a given resolution and back-propagating the cross-entropy loss provides similar results and values of $p ^ { * }$ (but is more complex). ",
642
+ "bbox": [
643
+ 174,
644
+ 138,
645
+ 825,
646
+ 195
647
+ ],
648
+ "page_idx": 5
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "4 Experiments and Results ",
653
+ "text_level": 1,
654
+ "bbox": [
655
+ 178,
656
+ 215,
657
+ 460,
658
+ 232
659
+ ],
660
+ "page_idx": 5
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "4.1 Experimental settings ",
665
+ "text_level": 1,
666
+ "bbox": [
667
+ 176,
668
+ 241,
669
+ 405,
670
+ 256
671
+ ],
672
+ "page_idx": 5
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "Base architecture. We build MultiGrain using ResNet-50 as convolutional trunk (He et al., 2016). The latter is optimized using SGD, starting with a learning rate of 0.2 which is reduced tenfold at epochs $3 0 , 6 0 , 9 0$ for a total of 120 epochs (a standard setting (Paszke et al., 2017)). The batch size is $| B | = 5 1 2$ and an epoch “sees” a fixed number $T = 5 0 0 5$ batches. With uniform sampling, one epoch does two passes over the training set; with RA and $m = 3$ , one epoch sees $\\sim 2 / 3$ of the images of the training set. The baselines are trained using this longer schedule for a fair comparison. ",
677
+ "bbox": [
678
+ 174,
679
+ 262,
680
+ 825,
681
+ 361
682
+ ],
683
+ "page_idx": 5
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "Data augmentation. Use a standard set of data augmentations (Howard, 2013) detailed in the appendix (table E.1); we refer to this set of augmentations as “full”. The baseline CNN reaches $7 6 . 2 \\%$ top-1 validation error when trained with cross-entropy alone and uniform batch sampling (see table 2). This is on the high end of accuracies reported for the ResNet50 network (Goyal et al., 2017; He et al., 2016) without specially-crafted regularization terms (Zhang et al., 2018), data augmentations (Cubuk et al., 2018) or external data. ",
688
+ "bbox": [
689
+ 174,
690
+ 367,
691
+ 825,
692
+ 452
693
+ ],
694
+ "page_idx": 5
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "Pooling exponent. During the training of our network, we consider two settings for the GeM layer of section 3.2: we set either $p = 1$ or $p = 3$ . Related work (Radenovi´c et al., 2018) and our preliminary experiments suggest that the value $p = 3$ improves the retrieval performance. Appendix B illustrates the effect of this choice. ",
699
+ "bbox": [
700
+ 174,
701
+ 458,
702
+ 825,
703
+ 513
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "Input size and cropping. As described in section 3.5, we train our network on crops of $2 2 4 \\times 2 2 4$ pixels. For testing, we experiment with resolutions $s ^ { * } = 2 2 4 , 5 0 0 , 8 0 0$ . For resolution $s ^ { * } = 2 2 4$ , we follow the usual classification protocol: the smallest side of the image is resized to 256 and then a $2 2 4 \\times 2 2 4$ central crop is extracted. For resolution $s ^ { * } > 2 2 4$ , we instead follow the protocol common in image retrieval: resize the largest side of the image to $s ^ { * }$ and evaluate the network on the rectangular image without cropping. ",
710
+ "bbox": [
711
+ 174,
712
+ 521,
713
+ 825,
714
+ 604
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Margin loss and batch sampling. We use $m = 3$ RA repetitions per batch. We use the default margin loss hyperparameters of (Wu et al., 2017) (see appendix E). As in (Wu et al., 2017) distance-weighted sampling is performed independently on each of the 4 GPUs used for training. ",
721
+ "bbox": [
722
+ 176,
723
+ 611,
724
+ 825,
725
+ 667
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "Datasets. We train our networks on the ImageNet-2012 training set. Classification accuracies are reported on the validation images. For image retrieval, we report the mean average precision on the Holidays dataset (J´egou et al., 2008), with images rotated manually when necessary, as in prior evaluations (Gordo et al., 2016). We also report the accuracy on the UKB object recognition benchmark (Nister & Stewenius, 2006), which shows 2,550 objects under 4 viewpoints each; each image is used as a query to find its 4 closest neighbors in embedding space; the number of correct neighbors is averaged across all images (i.e., the score is in $\\lfloor 0 , 4 \\rfloor$ ). We report the performance of our network in a copy detection setting, indicating the mean average precision on the “strong” subset of the Inria Copydays dataset (Douze et al., 2009), combined with 10k distractor images randomly sampled from YFCC100M (Thomee et al., 2016). We call the combination C10k. The PCA whitening transformations are computed from the features of 20k images from YFCC100M, distinct from the C10k distractors. ",
732
+ "bbox": [
733
+ 174,
734
+ 674,
735
+ 825,
736
+ 854
737
+ ],
738
+ "page_idx": 5
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.2 Effect of the pooling exponent $p ^ { * }$ and the loss weighting $\\lambda$ ",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 176,
746
+ 875,
747
+ 725,
748
+ 888
749
+ ],
750
+ "page_idx": 5
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "As a starting point, we use RA sampling and pooling exponent $p = 3$ . This gives a 76.9% top-1 validation accuracy on ImageNet, 0.7% points above the baseline, see table 2. ",
755
+ "bbox": [
756
+ 174,
757
+ 895,
758
+ 821,
759
+ 924
760
+ ],
761
+ "page_idx": 5
762
+ },
763
+ {
764
+ "type": "image",
765
+ "img_path": "images/14c514fdd8f9b958d325b41c122172820d2b552903981b49eb45629c8d5c73c3.jpg",
766
+ "image_caption": [
767
+ "Figure 2: Retrieval and classification accuracies as a function of pooling exponent $p ^ { * }$ and the image resolution. At training time, the pooling was $p = 3$ . Note the clear interaction between the resolution $s ^ { * }$ and the pooling exponent $p ^ { * }$ . "
768
+ ],
769
+ "image_footnote": [],
770
+ "bbox": [
771
+ 173,
772
+ 97,
773
+ 800,
774
+ 222
775
+ ],
776
+ "page_idx": 6
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "We now use larger images at test time, i.e., , we set $s ^ { * } > 2 2 4$ and vary the exponents $p ^ { * } \\neq p = 3$ Figures 2a and 2b show the classification accuracy and the retrieval accuracy at different resolutions, for different values of the exponent $p ^ { * }$ . As expected, at $s ^ { * } = 2 2 4$ , the pooling exponent yielding best accuracy in classification is the exponent with which the network has been trained, $p ^ { * } = 3$ ; instead, testing at larger scale requires an exponent $p ^ { * } > p$ , both for classification and for retrieval. In the following, we adopt the values obtained by our cross-validation on IN-aug, see section 3.5. ",
781
+ "bbox": [
782
+ 174,
783
+ 285,
784
+ 825,
785
+ 382
786
+ ],
787
+ "page_idx": 6
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "We defer to appendix C for the study on the weighting parameter $\\lambda$ . We set $\\lambda { = } 0 . 5$ in our following experiments, as it gives the best classification accuracy at the practical resolutions $s ^ { * } = 2 2 4$ and 500 pixels. As a reference, we also report a few results with $\\lambda = 1$ (i.e., ignoring the retrieval loss). ",
792
+ "bbox": [
793
+ 174,
794
+ 390,
795
+ 825,
796
+ 445
797
+ ],
798
+ "page_idx": 6
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "4.3 Classification results ",
803
+ "text_level": 1,
804
+ "bbox": [
805
+ 176,
806
+ 460,
807
+ 401,
808
+ 474
809
+ ],
810
+ "page_idx": 6
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "From now on, our MultiGrain nets are trained at resolution $s = 2 2 4$ with exponent $p = 1$ or $p = 3$ in the GeM pooling. For each evaluation resolutions $s ^ { * } = 2 2 4 , 5 0 0 , 8 0 0$ , the same exponent $p ^ { * }$ is selected according to section 3.5, yielding a single embedding for classification and for retrieval. Table 2 presents the classification results. There is a large improvement in classification performance from our baseline ResNet-50 with $p = 1 , s = 2 2 4$ , “full” data augmentation (76.2% top-1 accuracy), to a MultiGrain model at $p { = } 3 , ~ \\lambda { = } 0 . 5 , ~ s { = } 5 0 0$ (78.6% top-1). We identify four sources for this improvement: ",
815
+ "bbox": [
816
+ 173,
817
+ 481,
818
+ 825,
819
+ 579
820
+ ],
821
+ "page_idx": 6
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "1. The RA batch sampling (section 3.3) yields an improvement of +0.6% ( $p = 1$ ). \n2. The retrieval loss helps the generalizing effect of data augmentation: +0.2% ( $p = 1$ ). \n3. $p { = } 3$ pooling: GeM at training (section 3.2) allows the margin loss to have a much stronger effect thanks to increased localization of the features: $+ 0 . 4 \\%$ . \n4. Expanding resolution: evaluating at resolution 500 adds $+ 1 . 2 \\%$ to the $p = 3$ MultiGrain network, reaching the 78.6 top-1 accuracy. The $p { = } 3$ training yields sparser features, more generalizable over different resolutions, and the $p ^ { * }$ pooling adaptation (without it the performance at this resolution is only $7 8 . 0 \\%$ ). ",
826
+ "bbox": [
827
+ 169,
828
+ 592,
829
+ 825,
830
+ 729
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "The $p ^ { * }$ selection for evaluation at higher resolutions has its limits: at 800 pixels, due to the large discrepancy between the training and testing scale for the feature extractor, the accuracy drops to $7 7 . 2 \\%$ (76.2% without the $p ^ { * }$ adaptation). ",
837
+ "bbox": [
838
+ 176,
839
+ 742,
840
+ 823,
841
+ 785
842
+ ],
843
+ "page_idx": 6
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "AutoAugment (AA) is a reinforcement learning approach to find data augmentations that improve the accuracy of CNNs (Cubuk et al., 2018). We integrate the augmentations found on their ResNet-50 model. To give more impact to AA, we do 270 passes over the dataset, with batch size 512. MultiGrain with AA reaches $7 8 . 2 \\%$ top-1 accuracy at $s ^ { * } = 2 2 4$ ( $p { = } 3$ , $\\lambda = 0 . 5$ ). To the best of our knowledge, this is the state-of-the-art for ResNet-50 when evaluating at this resolution: it outperforms AA alone (77.6%) and mixup (Zhang et al., 2018) (76.7%). Increasing the test resolution improves the accuracy to $7 9 . 4 \\%$ at $s ^ { * } = 5 0 0$ . ",
848
+ "bbox": [
849
+ 173,
850
+ 791,
851
+ 825,
852
+ 888
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We also experimented with other architecture, see appendix G. We observed that the GeM pooling substantially increase the accuracy of off-the-shelf networks, with only a tiny fine",
859
+ "bbox": [
860
+ 174,
861
+ 895,
862
+ 823,
863
+ 924
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "table",
869
+ "img_path": "images/55b84d3c357545d148658bc9ab8e2d5867a245b8fe29626ed067358e3ce56581.jpg",
870
+ "table_caption": [],
871
+ "table_footnote": [],
872
+ "table_body": "<table><tr><td>Architecture</td><td>入</td><td>data aug.</td><td>resol. S*</td><td>train-time pooling p=1</td><td>p=3</td></tr><tr><td>ResNet-50</td><td></td><td>full</td><td>224</td><td>76.2 / 92.9</td><td>76.2/ 93.1</td></tr><tr><td>MultiGrain</td><td>1</td><td>full</td><td>224</td><td>76.8 / 93.2</td><td>76.9/ 93.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>224</td><td>77.0/93.6</td><td>77.4/ 93.6</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>224</td><td>77.4/ 93.6</td><td>78.2 / 93.9</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>500</td><td>76.5 / 93.5</td><td>78.6 94.4</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>500</td><td>77.7 94.0</td><td>79.4 94.8</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>full</td><td>800</td><td>73.5 / 93.5</td><td>77.2 93.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td>AA</td><td>800</td><td>74.1 / 91.8</td><td>77.8 / 93.9</td></tr><tr><td colspan=\"2\">PyTorch model zoo</td><td></td><td>224</td><td>76.1 92.9</td><td></td></tr><tr><td colspan=\"2\">mixup</td><td></td><td>224</td><td>76.7 / 94.4</td><td></td></tr><tr><td colspan=\"2\">BA (|B|= 1024)</td><td></td><td>224</td><td>76.9 / 1</td><td></td></tr><tr><td colspan=\"2\"></td><td></td><td>224</td><td>77.6 / 93.8</td><td></td></tr><tr><td colspan=\"2\">AutoAugment</td><td></td><td></td><td></td><td></td></tr></table>",
873
+ "bbox": [
874
+ 174,
875
+ 101,
876
+ 570,
877
+ 299
878
+ ],
879
+ "page_idx": 7
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "Table 2: ImageNet 2012 validation performance at top-1 / top5 accuracies ( $\\%$ ). Resnet-50 is a classification baseline trained with cross-entropy with our training schedule, data augmentation, and uniform batch sampling. MultiGrain uses the same Resnet50 trunk. At resolutions $s ^ { * } > 2 2 4$ we evaluate with exponent $p ^ { * }$ as described in section 3.5. We compare mixup (Zhang et al., 2018), BA (Hoffer et al., 2019), and AutoAugment (Cubuk et al., 2018). ",
884
+ "bbox": [
885
+ 588,
886
+ 102,
887
+ 825,
888
+ 296
889
+ ],
890
+ "page_idx": 7
891
+ },
892
+ {
893
+ "type": "table",
894
+ "img_path": "images/172e2b561614c92ff3a9fe1d36144751a4d16328966b38a5436f0356deaa7309.jpg",
895
+ "table_caption": [],
896
+ "table_footnote": [],
897
+ "table_body": "<table><tr><td colspan=\"4\">Method resol. s* Holidays UKB CD10k</td></tr><tr><td>MultiGrain λ=1</td><td>500 800</td><td>91.8 3.89 3.91</td><td>81.1</td></tr><tr><td>MultiGrain λ=1 MultiGrain 入= 0.5</td><td>500</td><td>91.6 91.5 3.90</td><td>82.5 80.7</td></tr><tr><td>MultiGrain 入= 0.5</td><td>800 92.5</td><td>3.91</td><td>78.6</td></tr><tr><td>Fisher vectors Neural codes</td><td>800 63.4</td><td>3.35</td><td>42.7</td></tr><tr><td>ResNet-50 RMAC ResNet-50 RMAC</td><td>224 79.3 724 90.9</td><td>3.56</td><td></td></tr></table>",
898
+ "bbox": [
899
+ 174,
900
+ 320,
901
+ 534,
902
+ 478
903
+ ],
904
+ "page_idx": 7
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "Table 3: Instance search results and baselines, on Holidays ( $\\%$ mAP) and UKB (/4). We set $p = 3$ pooling at training time for our MultiGrain models, and $p ^ { * }$ set as given in section 3.5. We compare Fisher vectors (J´egou et al., 2012), neural codes (Babenko et al., 2014), RMAC (Gordo et al., 2016), and GeM (Radenovi´c et al., 2018). $\\dagger$ GeM is fine-tuned at resolution 362×362 on additional retrieval data and uses multi-scale input processing at an extra cost. ",
909
+ "bbox": [
910
+ 544,
911
+ 314,
912
+ 825,
913
+ 481
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "tuning. For example, we obtain a top-1 accuracy of 83.6 with a PNASNet-5-Large, a $+ 0 . 9 \\%$ improvement over the original (Liu et al., 2018). ",
920
+ "bbox": [
921
+ 176,
922
+ 501,
923
+ 823,
924
+ 529
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "4.4 Retrieval results ",
931
+ "text_level": 1,
932
+ "bbox": [
933
+ 176,
934
+ 546,
935
+ 366,
936
+ 560
937
+ ],
938
+ "page_idx": 7
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "Retrieval results are in table 3, an ablation study and copy detection results are in the F. Our MultiGrain nets improve accuracies on all datasets with respect to the ResNet-50 baseline for comparable resolutions. Repeated augmentations (RA) is again a key ingredient in this context. We compare with reported accuracies in (Gordo et al., 2016; 2017), without additional training data. MultiGrain compares favorably with their results at the same resolution ( $s ^ { * } = 8 0 0$ ). They reach accuracies above 93% mAP on Holidays but this requires a resolution $s \\geq 1 0 0 0$ pixels. ",
943
+ "bbox": [
944
+ 174,
945
+ 568,
946
+ 825,
947
+ 665
948
+ ],
949
+ "page_idx": 7
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "Note that MultiGrain reaches a reasonable retrieval performance at resolution $s ^ { * } = 5 0 0$ , an interesting operating point compared to the traditional inference resolutions $s = 8 0 0 \\ – 1 0 0 0$ for retrieval. Indeed, a forward pass of ResNet-50 on 16 processor cores takes 3.80s at resolution 500, against 18.9s at resolution 1024 ( $5 \\times$ slower). Because of this quadratic increase in timing, and the single embedding computed by MultiGrain, our solution is particularly apt in large-scale or low-resource vision applications. At resolutions 500 the results with margin loss ( $\\lambda = 0 . 5$ ) are slightly lower than without ( $\\lambda { = } 1$ ). This is partly due to the limited transfer from the IN-aug task to the variations observed in retrieval datasets. ",
954
+ "bbox": [
955
+ 174,
956
+ 671,
957
+ 825,
958
+ 782
959
+ ],
960
+ "page_idx": 7
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "5 Conclusion ",
965
+ "text_level": 1,
966
+ "bbox": [
967
+ 176,
968
+ 801,
969
+ 320,
970
+ 818
971
+ ],
972
+ "page_idx": 7
973
+ },
974
+ {
975
+ "type": "text",
976
+ "text": "MultiGrain is a unified embedding for image classification and instance retrieval. It relies on a classical CNN trunk, with a GeM pooling layer, topped with two heads at training time. We have discovered that this pooling layer allows us to increase the resolution of images used at inference time, while maintaining a small resolution at training time. We have shown that MultiGrain embeddings can perform well on classification and retrieval. Interestingly, MultiGrain also sets a new state of the art on pure classification compared to all results obtained with the same convolutional trunk. Our approach will be open-sourced. ",
977
+ "bbox": [
978
+ 174,
979
+ 825,
980
+ 825,
981
+ 924
982
+ ],
983
+ "page_idx": 7
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "References \nA. Babenko and V. Lempitsky. Aggregating deep convolutional features for image retrieval. In Proc. ICCV, 2015. 1 \nArtem Babenko, Anton Slesarev, Alexandr Chigorin, and Victor Lempitsky. Neural codes for image retrieval. In Proc. ECCV, pp. 584–599. Springer, 2014. 2, 8, 16 \nLiefeng Bo and Cristian Sminchisescu. Efficient match kernel between sets of features for visual recognition. In Proc. NIPS, 2009. 5 \nY-Lan Boureau, Jean Ponce, and Yann LeCun. A theoretical analysis of feature pooling in visual recognition. In Proc. ICML, 2010. 3, 5, 12 \nMathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proc. ECCV, 2018. 2 \nOndrej Chum, James Philbin, Josef Sivic, Michael Isard, and Andrew Zisserman. Total recall: Automatic query expansion with a generative feature model for object retrieval. In Proc. ICCV, 2007. 2 \nMichael Cogswell, Faruk Ahmed, Ross B. Girshick, C. Lawrence Zitnick, and Dhruv Batra. Reducing overfitting in deep networks by decorrelating representations. CoRR, abs/1511.06068, 2016. 5 \nEkin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv:1805.09501, 2018. 6, 7, 8 \nPiotr Doll´ar, Zhuowen Tu, Pietro Perona, and Serge Belongie. Integral channel features. In Proc. BMVC, 2009. 5 \nMatthijs Douze, Herv´e J´egou, Harsimrat Sandhawalia, Laurent Amsaleg, and Cordelia Schmid. Evaluation of gist descriptors for web-scale image search. In Proc. CIVR, 2009. 2, 6 \nYunchao Gong, Liwei Wang, Ruiqi Guo, and Svetlana Lazebnik. Multi-scale orderless pooling of deep convolutional activation features. In Proc. ECCV, pp. 392–407. Springer, 2014. 2 \nAlbert Gordo, Jon Almaz´an, J´erˆome Revaud, and Diane Larlus. Deep image retrieval: Learning global representations for image search. In Proc. ECCV, 2016. 3, 6, 8 \nAlbert Gordo, Jon Almaz´an, J´erˆome Revaud, and Diane Larlus. End-to-end learning of deep visual representations for image retrieval. IJCV, 124:237–254, 2017. 3, 5, 8 \nPriya Goyal, Piotr Doll´ar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: training imagenet in 1 hour. arXiv:1706.02677, 2017. 6 \nMichelle Guo, Albert Haque, De-An Huang, Serena Yeung, and Li Fei-Fei. Dynamic task prioritization for multitask learning. In Proc. ECCV, pp. 282–299. Springer, 2018. 3 \nRaia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Proc. CVPR, 2006. 4 \nSong Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv:1510.00149, 2015. 3 \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. CVPR, 2016. 2, 6 \nKaiming He, Georgia Gkioxari, Piotr Doll´ar, and Ross Girshick. Mask r-cnn. In Proc. ICCV, 2017. 2 \nElad Hoffer, Tal Ben-Nun, Itay Hubara, Niv Giladi, Torsten Hoefler, and Daniel Soudry. Augment your batch: better training with larger batches. arXiv e-prints, art. arXiv:1901.09335, January 2019. 3, 5, 8 \nAndrew G Howard. Some improvements on deep convolutional neural network based image classification. arXiv:1312.5402, 2013. 6 \nJie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proc. CVPR, 2018. 2, 16 \nGao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proc. CVPR, 2017. 2 \nYanping Huang, Yonglong Cheng, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V Le, and Zhifeng Chen. Gpipe: Efficient training of giant neural networks using pipeline parallelism. arXiv:1811.06965, 2018. 2 \nHerv´e J´egou and Ondˇrej Chum. Negative evidences and co-occurences in image retrieval: The benefit of pca and whitening. In Proc. ECCV, pp. 774–787. Springer, 2012. 3, 5 \nHerv´e J´egou, Matthijs Douze, and Cordelia Schmid. Hamming embedding and weak geometric consistency for large scale image search. In Proc. ECCV, 2008. 2, 6 \nHerv´e J´egou, Florent Perronnin, Matthijs Douze, Jorge S´anchez, Patrick Perez, and Cordelia Schmid. Aggregating local image descriptors into compact codes. PAMI, 34(9), 2012. 8 \nIasonas Kokkinos. Ubernet: Training a universal convolutional neural network for low-, mid-, and high-level vision using diverse datasets and limited memory. Proc. CVPR, pp. 5454–5463, 2017. 3 \nAlex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Proc. NIPS, pp. 1097–1105, 2012. 3, 5 \nChenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In Proc. ECCV, pp. 19–34, 2018. 8, 16 \nDhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proc. ECCV, 2018. 2 \nDavid Nister and Henrik Stewenius. Scalable recognition with a vocabulary tree. In Proc. CVPR, 2006. 2, 6 \nAdam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS Autodiff Workshop, 2017. 6 \nJ. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Object retrieval with large vocabularies and fast spatial matching. In Proc. CVPR, 2007. 2 \nFilip Radenovi´c, Giorgos Tolias, and Ondrej Chum. Fine-tuning CNN image retrieval with no human annotation. TPAMI, 2018. 3, 5, 6, 8 \nAli Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. Proc. CVPR Workshop, pp. 512–519, 2014. 2, 3 \nSylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Efficient parametrization of multi-domain deep neural networks. In Proc. CVPR, pp. 8119–8127, 2018. 3 \nFlorian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proc. CVPR, pp. 815–823, 2015. 4 \nJosef Sivic and Andrew Zisserman. Video google: A text retrieval approach to object matching in videos. In Proc. ICCV, 2003. 2 \nBart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc100m: the new data in multimedia research. Commun. ACM, 59:64–73, 2016. 6 \nGiorgos Tolias and Herv´e J´egou. Visual query expansion with or without geometry: Refining local descriptors by feature aggregation. Pattern Recognition, 47(10), 2014. 2, 3 \nGiorgos Tolias, Ronan Sicre, and Herv´e J´egou. Particular object retrieval with integral max-pooling of cnn activations. CoRR, abs/1511.05879, 2015. 3 \nGiorgos Tolias, Yannis Avrithis, and Herv´e J´egou. Image search with selective match kernels: aggregation across single and multiple images. IJCV, 116(3):247–261, 2016. 2 \nPanu Turcot and David G Lowe. Better matching with fewer features: The selection of useful features in large database recognition problems. In Proc. ICCV, 2009. 2 \nYandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Proc. ECCV, 2016. 2 \nChao-Yuan Wu, R Manmatha, Alexander J Smola, and Philipp Kr¨ahenb¨uhl. Sampling matters in deep embedding learning. In Proc. ICCV, 2017. 4, 6, 12 \nSaining Xie, Ross B. Girshick, Piotr Doll´ar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. Proc. CVPR, pp. 5987–5995, 2017. 2 \nHongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In Proc. ICLR, 2018. URL https://openreview.net/forum?id=r1Ddp1-Rb. 6, 7, 8 \nBarret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proc. CVPR, pp. 8697–8710, 2018. 16 ",
988
+ "bbox": [
989
+ 171,
990
+ 98,
991
+ 828,
992
+ 920
993
+ ],
994
+ "page_idx": 8
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "",
999
+ "bbox": [
1000
+ 171,
1001
+ 70,
1002
+ 828,
1003
+ 924
1004
+ ],
1005
+ "page_idx": 9
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "",
1010
+ "bbox": [
1011
+ 171,
1012
+ 103,
1013
+ 826,
1014
+ 320
1015
+ ],
1016
+ "page_idx": 10
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "Appendix ",
1021
+ "text_level": 1,
1022
+ "bbox": [
1023
+ 450,
1024
+ 99,
1025
+ 547,
1026
+ 119
1027
+ ],
1028
+ "page_idx": 11
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "We report a few details and additional experiments that did not fit in the main paper. Appendix A outlines the repeated augmentation sampling algorithm. Appendix B illustrates the effect of GeM pooling on activation maps. Appendix C studies the effect of the loss weighting parameter. Appendix D shows the effect of data-augmented batches when training a simple toy model. Appendix E lists the values of a few hyper-parameters used in our method. Appendix F gives a some more ablation results in the retrieval setting. Finally, Appendix G shows how to use the ingredients of MultiGrain to improve the accuracy of an off-the-shelf pre-trained ConvNet at almost no additional training cost. It obtains what appear to be the best reported classification results on imagenet-2012 for a convnet with publicly available weights. ",
1033
+ "bbox": [
1034
+ 173,
1035
+ 128,
1036
+ 825,
1037
+ 268
1038
+ ],
1039
+ "page_idx": 11
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "A Sampling pairs in image batches ",
1044
+ "text_level": 1,
1045
+ "bbox": [
1046
+ 176,
1047
+ 284,
1048
+ 532,
1049
+ 299
1050
+ ],
1051
+ "page_idx": 11
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "We formalize the algorithm used to sample batches with repeated augmentations. ",
1056
+ "bbox": [
1057
+ 173,
1058
+ 306,
1059
+ 756,
1060
+ 321
1061
+ ],
1062
+ "page_idx": 11
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "The loss of eq. (2) is computed on a subset of positive and negative pairs ${ \\mathcal { P } } ( B ) \\subset B ^ { 2 }$ obtained as $\\mathscr { P } ( B ) = \\mathscr { P } _ { + } ( B ) \\cup \\mathscr { P } _ { - } ( B )$ where (Wu et al., 2017): ",
1067
+ "bbox": [
1068
+ 173,
1069
+ 328,
1070
+ 823,
1071
+ 357
1072
+ ],
1073
+ "page_idx": 11
1074
+ },
1075
+ {
1076
+ "type": "equation",
1077
+ "img_path": "images/b0672b83bd521ed6c89455b891e8d52f6392e6a5c233eb26d2a0fd75cc33cd86.jpg",
1078
+ "text": "$$\n{ \\mathcal P } _ { + } ( B ) = \\{ ( i , j ) \\in B ^ { 2 } : y _ { i j } = 1 \\} , \\qquad { \\mathcal P } _ { - } ( B ) = \\bigcup _ { ( i , j ) \\in { \\mathcal P } _ { + } } \\{ ( i , j ^ { * } ) \\mathrm { ~ w i t h ~ } j ^ { * } \\sim p ( \\cdot | i ) \\} .\n$$",
1079
+ "text_format": "latex",
1080
+ "bbox": [
1081
+ 204,
1082
+ 361,
1083
+ 759,
1084
+ 396
1085
+ ],
1086
+ "page_idx": 11
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "This means that one retains all positive pairs in the batch and then, for each positive pair $( i , j )$ , generates a negative pair $( i , j ^ { * } )$ by sampling $j ^ { * }$ with probability ",
1091
+ "bbox": [
1092
+ 173,
1093
+ 397,
1094
+ 823,
1095
+ 426
1096
+ ],
1097
+ "page_idx": 11
1098
+ },
1099
+ {
1100
+ "type": "equation",
1101
+ "img_path": "images/8ebae1586b05884abaa25b5b6510ea42a875dc6a93272f6851fb548a02de034b.jpg",
1102
+ "text": "$$\np ( j | i ) \\propto \\operatorname* { m i n } \\{ \\tau , q ^ { - 1 } ( D ( e _ { i } , e _ { j } ) ) \\} \\cdot \\mathbf { 1 } _ { \\{ y _ { i j } = - 1 \\} } ,\n$$",
1103
+ "text_format": "latex",
1104
+ "bbox": [
1105
+ 346,
1106
+ 430,
1107
+ 650,
1108
+ 448
1109
+ ],
1110
+ "page_idx": 11
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "where $\\tau > 0$ is a parameter and $q ( z ) \\propto z ^ { d - 2 } ( 1 - z ^ { 2 } / 4 ) ^ { \\frac { d - 3 } { 2 } }$ is a PDF that depends on the embedding dimension $d$ . ",
1115
+ "bbox": [
1116
+ 176,
1117
+ 452,
1118
+ 823,
1119
+ 483
1120
+ ],
1121
+ "page_idx": 11
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "B Illustration of the effect of $p ^ { * }$ ",
1126
+ "text_level": 1,
1127
+ "bbox": [
1128
+ 174,
1129
+ 497,
1130
+ 537,
1131
+ 513
1132
+ ],
1133
+ "page_idx": 11
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "We visualize the effect of changing the GeM pooling exponent $p$ on activation maps at different resolutions. We focus on a single class (racing car) and make the simplistic assumption that there is one channel of the activation map that reacts strongly to that class. ",
1138
+ "bbox": [
1139
+ 174,
1140
+ 521,
1141
+ 825,
1142
+ 564
1143
+ ],
1144
+ "page_idx": 11
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Then we can visualize the activation map for that channel on images. Figure B.1 shows a typical result. By setting $p = 3$ , the car is detected with high confidence and without spurious detections. Boureau et al. (2010) analyse average- and max-pooling of sparse features. They find that when the number of pooled features increases, it is beneficial to make them more sparse, which is consistent with the observation we make here. ",
1149
+ "bbox": [
1150
+ 174,
1151
+ 570,
1152
+ 825,
1153
+ 640
1154
+ ],
1155
+ "page_idx": 11
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "C Analysis of the tradeoff parameter ",
1160
+ "text_level": 1,
1161
+ "bbox": [
1162
+ 174,
1163
+ 655,
1164
+ 581,
1165
+ 670
1166
+ ],
1167
+ "page_idx": 11
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "We analyze the impact of the tradeoff parameter $\\lambda$ between the two components of the loss of eq. (3). Note, this parameter does not directly reflect the relative importance of the two loss terms during training, since these are not homogeneous: $\\lambda { = } 0 . 5$ does not mean that they have equal importance. ",
1172
+ "bbox": [
1173
+ 174,
1174
+ 679,
1175
+ 825,
1176
+ 734
1177
+ ],
1178
+ "page_idx": 11
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Figure C.1 analyzes the actual relative importance of the classification and margin loss terms, by measuring the average norm of the gradient back-propagated through the network at epochs 0 and 120. One can see that $\\lambda = 0 . 5$ means that the classification has slightly more weight at the beginning of the training. The classification term becomes dominant at the end of the training, meaning that the network has already learned to cancel data augmentation. ",
1183
+ "bbox": [
1184
+ 173,
1185
+ 741,
1186
+ 825,
1187
+ 811
1188
+ ],
1189
+ "page_idx": 11
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "In terms of performance, $\\lambda { = } 0 . 1$ leads to a poor classification accuracy. Interestingly, the classification performance is higher for the intermediate $\\lambda = 0 . 5$ (77.4% at $s ^ { * } = 2 2 4$ ) than for $\\lambda = 1$ , see Table 2. Thus, the margin loss leads to a performance gain for the classification task. ",
1194
+ "bbox": [
1195
+ 174,
1196
+ 818,
1197
+ 823,
1198
+ 875
1199
+ ],
1200
+ "page_idx": 11
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "We set $\\lambda = 0 . 5$ in our following experiments, as it gives the best classification accuracy at the practical resolutions $s ^ { * } = 2 2 4$ and 500 pixels. As a reference, we also report a few results with $\\lambda = 1$ . ",
1205
+ "bbox": [
1206
+ 174,
1207
+ 882,
1208
+ 823,
1209
+ 922
1210
+ ],
1211
+ "page_idx": 11
1212
+ },
1213
+ {
1214
+ "type": "image",
1215
+ "img_path": "images/27f0ff0ca50e63031e8ce73101a047091601bb4113839959c28d71de1b51837d.jpg",
1216
+ "image_caption": [
1217
+ "Figure B.1: An off-the-shelf ResNet-50 reacts strongly on channel 909 of the last activation map for class “racing car”. The image on the left is a hard example for the class. We show channel 909 for that image, at several resolutions and with GeM parameters $p ^ { * } = 1$ and $p ^ { * } = 3$ . In the low resolution version, the cars are too small to be visible individually on the activation map. In the full resolution version, the location of the cars is more clear. In addition, $p ^ { * } = 3$ reduces the noisy detections relative to the true locations. "
1218
+ ],
1219
+ "image_footnote": [],
1220
+ "bbox": [
1221
+ 174,
1222
+ 159,
1223
+ 790,
1224
+ 424
1225
+ ],
1226
+ "page_idx": 12
1227
+ },
1228
+ {
1229
+ "type": "image",
1230
+ "img_path": "images/333f6d70dbbb36d2c755b93ed9e97808e4ded486cafa63151290047b1173f08a.jpg",
1231
+ "image_caption": [
1232
+ "Figure C.1: Classification vs retrieval loss, measured as $\\lVert g ^ { \\mathrm { c l a s s } } \\rVert / ( \\lVert g ^ { \\mathrm { c l a s s } } \\rVert + \\lVert g ^ { \\mathrm { r e t r } } \\rVert )$ , where the $g ^ { \\mathrm { c l a s s } }$ vector is the gradient from the $\\lambda \\ell ^ { \\mathrm { c l a s s } }$ component. "
1233
+ ],
1234
+ "image_footnote": [],
1235
+ "bbox": [
1236
+ 367,
1237
+ 633,
1238
+ 630,
1239
+ 829
1240
+ ],
1241
+ "page_idx": 12
1242
+ },
1243
+ {
1244
+ "type": "image",
1245
+ "img_path": "images/024e5cfed4881205f1bda40598e139c271b2f5ea6f7627a2a395c80e7a1857f5.jpg",
1246
+ "image_caption": [
1247
+ "Figure D.1: Evolution of the validation accuracy on ImageNet-val with and without dataaugmented batches. "
1248
+ ],
1249
+ "image_footnote": [],
1250
+ "bbox": [
1251
+ 312,
1252
+ 108,
1253
+ 681,
1254
+ 285
1255
+ ],
1256
+ "page_idx": 13
1257
+ },
1258
+ {
1259
+ "type": "image",
1260
+ "img_path": "images/0fedeada6961d9029d67330b38157f2cb97b68e003e9ac8715ab42cfdf260124.jpg",
1261
+ "image_caption": [
1262
+ "Figure D.2: Training set for the toy model in appendix D. "
1263
+ ],
1264
+ "image_footnote": [],
1265
+ "bbox": [
1266
+ 385,
1267
+ 339,
1268
+ 612,
1269
+ 489
1270
+ ],
1271
+ "page_idx": 13
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "D Data-augmented batches: toy model ",
1276
+ "text_level": 1,
1277
+ "bbox": [
1278
+ 173,
1279
+ 523,
1280
+ 580,
1281
+ 540
1282
+ ],
1283
+ "page_idx": 13
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "We have observed in section 3.3 and appendix C that training our architecture (ResNet-50 trunk) with data-augmented batches yields improvements with respect to the vanilla uniform sampling scheme, despite the decrease in image diversity. ",
1288
+ "bbox": [
1289
+ 174,
1290
+ 549,
1291
+ 825,
1292
+ 590
1293
+ ],
1294
+ "page_idx": 13
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "This observation holds even in the absence of ranking triplet loss, all things being equal otherwise: same number of iterations per epoch, number of epochs, learning rate schedule, and batch size. As an example, fig. D.1 shows the evolution of the validation accuracy of our network trained under cross-entropy with our training schedule and a $p = 1$ pooling, batches of size 512, with the data augmentation introduced in section 4.1, with uniform batches vs. with batch sampling. While initial epochs suffer from the reduced diversity of the batches compared to the uniformly-sampled variant, the reinforced effect on data augmentation compensates for this in the long run, and makes the batch-augmented variant reach a higher final accuracy. ",
1299
+ "bbox": [
1300
+ 173,
1301
+ 597,
1302
+ 825,
1303
+ 723
1304
+ ],
1305
+ "page_idx": 13
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Since we observe this better performance even for a pure image classification task, an interesting question is whether this benefit is specific to our architecture and training method (batch-norm, etc), or if it is more generally applicable? Hereafter we analyse a linear model and synthetic classification task that seems to align with the second hypothesis. ",
1310
+ "bbox": [
1311
+ 173,
1312
+ 729,
1313
+ 823,
1314
+ 786
1315
+ ],
1316
+ "page_idx": 13
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "We consider an idealized model of the effect of including different data-augmented instances of the same image in one batch using standard stochastic gradient descent. We create a synthetic training set $\\mathcal { D }$ of points pictured in fig. D.2 of $N = 1 0 0$ positive and $N = 1 0 0$ negative training points $\\pmb { p } ^ { i } = ( p _ { x } ^ { i } , p _ { y } ^ { i } )$ by sampling from two 2D Gaussian distributions: ",
1321
+ "bbox": [
1322
+ 173,
1323
+ 792,
1324
+ 825,
1325
+ 849
1326
+ ],
1327
+ "page_idx": 13
1328
+ },
1329
+ {
1330
+ "type": "equation",
1331
+ "img_path": "images/15ca6cbd92b17c39dccecd81b5a3d5013441b9e6b5e99ce6ef42290215ae5e7e.jpg",
1332
+ "text": "$$\n\\begin{array} { r } { p _ { x } ^ { i } \\sim \\mathcal N ( \\mu = 0 , \\sigma = 1 ) } \\\\ { p _ { y } ^ { i } \\sim \\mathcal N ( \\mu = y _ { i } ^ { * } , \\sigma = 1 ) } \\end{array}\n$$",
1333
+ "text_format": "latex",
1334
+ "bbox": [
1335
+ 419,
1336
+ 859,
1337
+ 581,
1338
+ 904
1339
+ ],
1340
+ "page_idx": 13
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "with $y _ { i } ^ { * } = \\pm 1$ being the ground truth label. We sample a test dataset in the same manner. ",
1345
+ "bbox": [
1346
+ 174,
1347
+ 909,
1348
+ 821,
1349
+ 924
1350
+ ],
1351
+ "page_idx": 13
1352
+ },
1353
+ {
1354
+ "type": "image",
1355
+ "img_path": "images/4364837678a38aa0a99e0d189796890b158d662a93dc73036a361dc2ab7c2a1e.jpg",
1356
+ "image_caption": [
1357
+ "Figure D.3: Evolution of the test accuracy of the SVM trained on the synthetic data, averaged accross 100 runs. "
1358
+ ],
1359
+ "image_footnote": [],
1360
+ "bbox": [
1361
+ 312,
1362
+ 109,
1363
+ 681,
1364
+ 285
1365
+ ],
1366
+ "page_idx": 14
1367
+ },
1368
+ {
1369
+ "type": "table",
1370
+ "img_path": "images/9cf3113b6de86bebcd5457edc310c381489a2b377ad8ae29960b00c1a70d90b2.jpg",
1371
+ "table_caption": [
1372
+ "Table E.1: Margin loss and data-augmentation parameters "
1373
+ ],
1374
+ "table_footnote": [],
1375
+ "table_body": "<table><tr><td>parameter</td><td>value</td></tr><tr><td>margin α</td><td rowspan=\"3\">0.2 1.2</td></tr><tr><td>initial βo</td></tr><tr><td>β learning rate</td></tr></table>",
1376
+ "bbox": [
1377
+ 416,
1378
+ 347,
1379
+ 580,
1380
+ 417
1381
+ ],
1382
+ "page_idx": 14
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "We consider the SGD training of an SVM ",
1387
+ "bbox": [
1388
+ 174,
1389
+ 429,
1390
+ 473,
1391
+ 444
1392
+ ],
1393
+ "page_idx": 14
1394
+ },
1395
+ {
1396
+ "type": "equation",
1397
+ "img_path": "images/fc3b1d5e4029b185625ae8886715882142f2b311274ecd6d94a003518e82f367.jpg",
1398
+ "text": "$$\nf _ { w } ( \\pmb { p } _ { i } ) = \\pmb { w } ^ { \\top } \\pmb { p } _ { i }\n$$",
1399
+ "text_format": "latex",
1400
+ "bbox": [
1401
+ 442,
1402
+ 450,
1403
+ 555,
1404
+ 468
1405
+ ],
1406
+ "page_idx": 14
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "using the Hinge loss ",
1411
+ "bbox": [
1412
+ 174,
1413
+ 478,
1414
+ 320,
1415
+ 492
1416
+ ],
1417
+ "page_idx": 14
1418
+ },
1419
+ {
1420
+ "type": "equation",
1421
+ "img_path": "images/ca10eda381f00f84df17d7967cc154d794ec8befaef5a97178bf207c6691949b.jpg",
1422
+ "text": "$$\n\\ell ^ { \\mathrm { h i n g e } } = \\operatorname* { m a x } { ( 1 - y _ { i } ^ { * } f _ { w } ( p _ { i } ) , 0 ) } .\n$$",
1423
+ "text_format": "latex",
1424
+ "bbox": [
1425
+ 390,
1426
+ 493,
1427
+ 609,
1428
+ 510
1429
+ ],
1430
+ "page_idx": 14
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "We consider the symmetry across the x-axis ",
1435
+ "bbox": [
1436
+ 173,
1437
+ 523,
1438
+ 488,
1439
+ 537
1440
+ ],
1441
+ "page_idx": 14
1442
+ },
1443
+ {
1444
+ "type": "equation",
1445
+ "img_path": "images/6a3a76f3808c95005000a24bca6ba411af019eb4723fd0f2d389ebc0517a5a58.jpg",
1446
+ "text": "$$\n\\phi ( ( p _ { x } ^ { i } , p _ { y } ^ { i } ) ) = \\phi ( ( p _ { x } ^ { i } , - p _ { y } ^ { i } ) )\n$$",
1447
+ "text_format": "latex",
1448
+ "bbox": [
1449
+ 406,
1450
+ 546,
1451
+ 591,
1452
+ 564
1453
+ ],
1454
+ "page_idx": 14
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "as a label-preserving data-augmentation suited to our synthetic dataset. We train the SVM (equation D.2) using one pass through the data-augmented dataset $\\mathcal { D }$ of size $4 N$ , using batches of size 2. ",
1459
+ "bbox": [
1460
+ 173,
1461
+ 571,
1462
+ 825,
1463
+ 613
1464
+ ],
1465
+ "page_idx": 14
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "The only difference between the two optimization schedules is the order in which the samples are batched and presented to the optimizer. We consider two batch sampling strategies: ",
1470
+ "bbox": [
1471
+ 174,
1472
+ 621,
1473
+ 821,
1474
+ 650
1475
+ ],
1476
+ "page_idx": 14
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "• Uniform sampling: we sample the elements of the batch randomly from $\\mathcal { D }$ , without replacement; \n• Paired sampling: we generate a batch by pairing a random element from $\\mathcal { D }$ and its data-augmentation, removing these two elements from $\\mathcal { D }$ . ",
1481
+ "bbox": [
1482
+ 176,
1483
+ 661,
1484
+ 825,
1485
+ 717
1486
+ ],
1487
+ "page_idx": 14
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Figure D.3 shows the evaluation of the accuracy with the iterations in both of these cases, averaged across 100 runs. It is clear that pairing the data-augmented pairs in one batch accelerates the convergence of this model. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 728,
1495
+ 821,
1496
+ 772
1497
+ ],
1498
+ "page_idx": 14
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "This idealized experiment demonstrates that there are cases in which the repeated augmentation scheme provides an optimization and generalization boost, and reinforces the effect of data augmentation. ",
1503
+ "bbox": [
1504
+ 176,
1505
+ 779,
1506
+ 823,
1507
+ 820
1508
+ ],
1509
+ "page_idx": 14
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "E Margin loss hyper-parameters ",
1514
+ "text_level": 1,
1515
+ "bbox": [
1516
+ 174,
1517
+ 835,
1518
+ 519,
1519
+ 852
1520
+ ],
1521
+ "page_idx": 14
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "Table E.1 gives the value of the hyper-parameters for the margin loss used during the training of our models. ",
1526
+ "bbox": [
1527
+ 176,
1528
+ 859,
1529
+ 823,
1530
+ 888
1531
+ ],
1532
+ "page_idx": 14
1533
+ },
1534
+ {
1535
+ "type": "text",
1536
+ "text": "Table E.2 gives the transformations in the full data augmentation used in our experiments (section 4.1), along with their parameters. ",
1537
+ "bbox": [
1538
+ 173,
1539
+ 895,
1540
+ 821,
1541
+ 924
1542
+ ],
1543
+ "page_idx": 14
1544
+ },
1545
+ {
1546
+ "type": "table",
1547
+ "img_path": "images/b238707335ad407029fb7c2d267f3683c408b7d32ba4f7793c83a53d5a1afa5e.jpg",
1548
+ "table_caption": [
1549
+ "Table E.2: full data-augmentation transforms and parameters "
1550
+ ],
1551
+ "table_footnote": [],
1552
+ "table_body": "<table><tr><td>transformation</td><td>parameter range</td></tr><tr><td>horizontal flip</td><td></td></tr><tr><td>random resized crop</td><td>scale ∈ [0.08,1.0] ratio ∈ [3/4,4/3]</td></tr><tr><td>color jitter</td><td>brightness 0.3 contrast 0.3 saturation 0.3</td></tr><tr><td>lighting transform</td><td>intensity 0.1</td></tr></table>",
1553
+ "bbox": [
1554
+ 356,
1555
+ 116,
1556
+ 635,
1557
+ 251
1558
+ ],
1559
+ "page_idx": 15
1560
+ },
1561
+ {
1562
+ "type": "table",
1563
+ "img_path": "images/b44a660cd576621a5ff15c2c16ef1a59616d65c8a8a7f523f900eaf6900e9337.jpg",
1564
+ "table_caption": [
1565
+ "Table D.1: Full results including Copydays $^ +$ 10k distractors (CD10k, $\\%$ mAP), and ablation study for the MultiGrain models. The Pytorch model simply extract the last activation layer as a descriptor (Babenko et al., 2014). Resnet-50 corresponds to features extracted from a classification baseline with $p = 1$ or $p = 3$ GeM pooling, trained with cross-entropy with our training schedule, data augmentation, and uniform batch sampling. "
1566
+ ],
1567
+ "table_footnote": [],
1568
+ "table_body": "<table><tr><td></td><td></td><td></td><td colspan=\"3\">Holidays</td><td colspan=\"3\">UKB</td><td colspan=\"3\">CD10k</td></tr><tr><td>Method</td><td>入</td><td>S*=</td><td>224</td><td>500</td><td>800</td><td>224</td><td>500</td><td>800</td><td>224</td><td>500</td><td>800</td></tr><tr><td>PyTorch model zoo</td><td></td><td></td><td>85.5</td><td>86.6</td><td>82.8</td><td>3.71</td><td>3.85</td><td>3.80</td><td>61.5</td><td>61.1</td><td>43.0</td></tr><tr><td>Resnet-50 trained with p = 1 pooling</td><td></td><td></td><td>83.5</td><td>88.8</td><td>87.1</td><td>3.60</td><td>3.79</td><td>3.82</td><td>59.2</td><td>69.9</td><td>66.2</td></tr><tr><td>Resnet-50 trained with p = 3 pooling</td><td></td><td></td><td>86.8</td><td>90.0</td><td>90.4</td><td>3.73</td><td>3.87</td><td>3.89</td><td>70.6</td><td>78.9</td><td>75.7</td></tr><tr><td>MultiGrain</td><td>1</td><td></td><td>88.9</td><td>91.8</td><td>91.6</td><td>3.78</td><td>3.89</td><td>3.91</td><td>75.1</td><td>81.2</td><td>82.5</td></tr><tr><td>MultiGrain</td><td>0.5</td><td></td><td>88.3</td><td>91.5</td><td>92.5</td><td>3.78</td><td>3.90</td><td>3.91</td><td>74.1</td><td>80.7</td><td>78.6</td></tr><tr><td>MultiGrain +AA</td><td>0.5</td><td></td><td>86.5</td><td>90.3</td><td>89.4</td><td>3.75</td><td>3.89</td><td>3.90</td><td>69.7</td><td>77.8</td><td>76.1</td></tr></table>",
1569
+ "bbox": [
1570
+ 173,
1571
+ 330,
1572
+ 825,
1573
+ 453
1574
+ ],
1575
+ "page_idx": 15
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "F Additional results and ablation study for Multigrain in retrieval ",
1580
+ "bbox": [
1581
+ 176,
1582
+ 464,
1583
+ 789,
1584
+ 496
1585
+ ],
1586
+ "page_idx": 15
1587
+ },
1588
+ {
1589
+ "type": "text",
1590
+ "text": "Table D.1 reports additional results of the MultiGrain architecture, with an ablation study analyzing the effect of each component. ",
1591
+ "bbox": [
1592
+ 176,
1593
+ 505,
1594
+ 823,
1595
+ 534
1596
+ ],
1597
+ "page_idx": 15
1598
+ },
1599
+ {
1600
+ "type": "text",
1601
+ "text": "As already reported in the main paper, for some datasets the choice of not using the triplet loss ( $\\lambda = 1$ ) is as good or better than our generic choice ( $\\lambda = 0 . 5$ ). Of course, then the embedding is not multi-purpose anymore. Overall, the different elements employed in our architecture (RA and the layers specific to Multigrain) still give a significant improvement over simply using the activations, and is competitive with the state of the art for the same resolution/complexity. ",
1602
+ "bbox": [
1603
+ 173,
1604
+ 540,
1605
+ 825,
1606
+ 625
1607
+ ],
1608
+ "page_idx": 15
1609
+ },
1610
+ {
1611
+ "type": "text",
1612
+ "text": "Note, the AutoAugment data augmentation does not transfer well to the retrieval tasks. This can be explained by their specificity to Imagenet classification. This shows the limitation of a particular choice of data-augmentation if a single embedding for classification and retrieval datasets is desired. Learning AutoAugment specifically for the retrieval task would certainly help, but would probably also result in less general embeddings. Hence, data-augmentation is a limiting factor for multi-purpose embeddings: improving for one task like classification hurts the performance for other tasks. ",
1613
+ "bbox": [
1614
+ 173,
1615
+ 631,
1616
+ 825,
1617
+ 728
1618
+ ],
1619
+ "page_idx": 15
1620
+ },
1621
+ {
1622
+ "type": "table",
1623
+ "img_path": "images/b7f522169af7fcf25132dfff95bafc3f5dacfe65e0bf2d420f0ccb5f609c14e1.jpg",
1624
+ "table_caption": [
1625
+ "Table E.1: Additional top-1/top-5 validation classification accuracies obtained by finetuning $p ^ { * }$ for higher evaluation scales from off-the-shelf networks: NASNet (Zoph et al., 2018), SENet (Hu et al., 2018) and PNASNet (Liu et al., 2018). The first column indicates the training resolution $s$ and the accuracy we measured at this resolution, with standard evaluation (resize of the largest scale to $s \\cdot 2 5 6 / 2 2 4 +$ center crop). The subsequent columns show the accuracy measured at higher resolutions $s ^ { * } = 3 5 0 , 4 0 0 , 4 5 0 , 5 0 0$ without cropping, together with the $p ^ { * }$ found by finetuning for these resolutions (appendix G). "
1626
+ ],
1627
+ "table_footnote": [],
1628
+ "table_body": "<table><tr><td></td><td colspan=\"2\">original evaluation</td><td colspan=\"2\">=350 S*</td><td colspan=\"2\">8*=400</td><td colspan=\"2\">s*=450</td><td colspan=\"2\">=500 5*</td></tr><tr><td>Architecture</td><td>S</td><td>acc. (%)</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td><td>p*</td><td>acc. (%</td></tr><tr><td>NASNet-A-Mobile 224</td><td></td><td>74.1/91.7</td><td></td><td>1.7 75.1/92.5</td><td></td><td>2.1 74.2/92.1</td><td></td><td>2.4 71.8/90.9</td><td>2.6</td><td>68.4/89.0</td></tr><tr><td>SENet154</td><td>224</td><td>81.3/95.5</td><td>1.6</td><td>82.6/96.2</td><td></td><td>1.6 83.0/96.5 1.6 83.1/96.5</td><td></td><td></td><td>1.7</td><td>82.7/96.3</td></tr><tr><td>PNASNet-5-Large</td><td>331</td><td>82.7/96.0</td><td>1.0</td><td>81.3/85.4</td><td></td><td>1.4 82.6/96.1 1.5</td><td></td><td>83.2/96.4</td><td></td><td>1.7 83.6/96.7</td></tr></table>",
1629
+ "bbox": [
1630
+ 173,
1631
+ 835,
1632
+ 825,
1633
+ 920
1634
+ ],
1635
+ "page_idx": 15
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "G Evaluation of off-the-shelf classifiers at higher resolutions ",
1640
+ "text_level": 1,
1641
+ "bbox": [
1642
+ 174,
1643
+ 103,
1644
+ 823,
1645
+ 118
1646
+ ],
1647
+ "page_idx": 16
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "In this section, we present some additional classification results using off-the-shelf pretrained classification networks trained with standard average pooling ( $p = 1$ ). ",
1652
+ "bbox": [
1653
+ 173,
1654
+ 126,
1655
+ 820,
1656
+ 155
1657
+ ],
1658
+ "page_idx": 16
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "As outlined in sections 3.5 and 4.2, one of our contributions is a strategy for evaluating classifier networks trained with GeM pooling at scale $s$ and exponent $p$ at a higher resolution $s ^ { * }$ and adapted exponent $p ^ { * }$ . It can be used on pretrained networks as well. ",
1663
+ "bbox": [
1664
+ 174,
1665
+ 161,
1666
+ 825,
1667
+ 204
1668
+ ],
1669
+ "page_idx": 16
1670
+ },
1671
+ {
1672
+ "type": "text",
1673
+ "text": "For an evaluation scale $s ^ { * }$ , we use the alternative strategy described in section 3.5 to choose $p ^ { * }$ : we finetune the parameter $p ^ { * }$ by stochastic gradient descent, backpropagating the crossentropy loss on training images from imagenet, rescaled to the desired input resolution. Compared to a full finetuning at this input resolution, this strategy has a limited memory footprint, given that the backpropagation only has to be done on the ultimate classification layer before reaching the pooling layer, allowing for an efficient computation of the gradient of $p ^ { * }$ . Experimentally we also found that this process converges on a few thousands of training samples, while a finetuning of the classification layer would require several data-augmented epochs on the full training set. ",
1674
+ "bbox": [
1675
+ 173,
1676
+ 210,
1677
+ 825,
1678
+ 337
1679
+ ],
1680
+ "page_idx": 16
1681
+ },
1682
+ {
1683
+ "type": "text",
1684
+ "text": "The finetuning is done using SGD with batches of $| B | = 4$ (non-cropped) images, with momentum 0.9 and initial learning rate $\\mathrm { l r } ^ { ( 0 ) } = 0 . 0 0 5$ , decayed under a polynomial learning rate decay ",
1685
+ "bbox": [
1686
+ 174,
1687
+ 342,
1688
+ 825,
1689
+ 387
1690
+ ],
1691
+ "page_idx": 16
1692
+ },
1693
+ {
1694
+ "type": "equation",
1695
+ "img_path": "images/67519320386e49a9d409768a84baf56b56adabd06e2840ee0832f16ce49fc7b6.jpg",
1696
+ "text": "$$\n\\mathrm { l r } ^ { ( i ) } = \\mathrm { l r } ^ { ( 0 ) } \\left( 1 - \\frac { i } { i _ { \\mathrm { m a x } } } \\right) ^ { 0 . 9 }\n$$",
1697
+ "text_format": "latex",
1698
+ "bbox": [
1699
+ 405,
1700
+ 386,
1701
+ 593,
1702
+ 422
1703
+ ],
1704
+ "page_idx": 16
1705
+ },
1706
+ {
1707
+ "type": "text",
1708
+ "text": "with $i _ { \\mathrm { m a x } }$ the total number of iterations. ",
1709
+ "bbox": [
1710
+ 174,
1711
+ 424,
1712
+ 464,
1713
+ 439
1714
+ ],
1715
+ "page_idx": 16
1716
+ },
1717
+ {
1718
+ "type": "text",
1719
+ "text": "We select $5 0 , 0 0 0$ images from the training set (50 per category) for the fine-tuning and do one pass on this reduced dataset. We use off-the-shelf pretrained convnets from the Cadene/pretrained-model repository2. Table E.1 outlines the resulting validation accuracies. We see that for each network there is a scale and choice of $p ^ { * }$ that performs better than the standard evaluation. ",
1720
+ "bbox": [
1721
+ 174,
1722
+ 445,
1723
+ 825,
1724
+ 516
1725
+ ],
1726
+ "page_idx": 16
1727
+ },
1728
+ {
1729
+ "type": "text",
1730
+ "text": "These networks have not been trained using GeM pooling with $p > 1$ ; as exhibited in our classification results (table 2) we found this to be another key ingredient in ensuring a higher scale insensitivity and better performance at larger resolution. As in our main experiments with the MultiGrain architecture with a ResNet-50 backbone, it is likely that these networks would reach higher values when training from scratch with a $p > 1$ pooling, and adding repeated augmentations and margin loss. However, running training experiments on these large networks is significantly more expensive. Therefore, we leave this for future work. ",
1731
+ "bbox": [
1732
+ 173,
1733
+ 522,
1734
+ 825,
1735
+ 621
1736
+ ],
1737
+ "page_idx": 16
1738
+ }
1739
+ ]
parse/train/SkeGURNtDH/SkeGURNtDH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkeGURNtDH/SkeGURNtDH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ePh9bvqIgKL/ePh9bvqIgKL.md ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DISCOVERING PARAMETRIC ACTIVATION FUNCTIONS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Recent studies have shown that the choice of activation function can significantly affect the performance of deep learning networks. However, the benefits of novel activation functions have been inconsistent and task dependent, and therefore the rectified linear unit (ReLU) is still the most commonly used. This paper proposes a technique for customizing activation functions automatically, resulting in reliable improvements in performance. Evolutionary search is used to discover the general form of the function, and gradient descent to optimize its parameters for different parts of the network and over the learning process. Experiments with four different neural network architectures on the CIFAR-10 and CIFAR-100 image classification datasets show that this approach is effective. It discovers both general activation functions and specialized functions for different architectures, consistently improving accuracy over ReLU and other recently proposed activation functions by significant margins. The approach can therefore be used as an automated optimization step in applying deep learning to new tasks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The rectified linear unit $\left( \mathrm { R e L U } ( x ) = \operatorname* { m a x } \{ x , 0 \} \right)$ is the most commonly used activation function in modern deep learning architectures (Nair & Hinton, 2010). When introduced, it offered substantial improvements over the previously popular tanh and sigmoid activation functions. Because ReLU is unbounded as $x \to \infty$ , it is less susceptible to vanishing gradients than tanh and sigmoid are. It is also simple to calculate, which leads to faster training times.
12
+
13
+ Activation function design continues to be an active area of research, and a number of novel activation functions have been introduced since ReLU, each with different properties (Nwankpa et al., 2018). In certain settings, these novel activation functions lead to substantial improvements in accuracy over ReLU, but the gains are often inconsistent across tasks. Because of this inconsistency, ReLU is still the most commonly used: it is reliable, even though it may be suboptimal.
14
+
15
+ The improvements and inconsistencies are due to a gradually evolving understanding of what makes an activation function effective. For example, Leaky ReLU (Maas et al., 2013) allows a small amount of gradient information to flow when the input is negative. It was introduced to prevent ReLU from creating dead neurons, i.e. those that are stuck at always outputting zero. On the other hand, the ELU activation function (Clevert et al., 2015) contains a negative saturation regime to control the forward propagated variance. These two very different activation functions have seemingly contradicting properties, yet each has proven more effective than ReLU in various tasks.
16
+
17
+ There are also often complex interactions between an activation function and other neural network design choices, adding to the difficulty of selecting an appropriate activation function for a given task. For example, Ramachandran et al. (2018) warned that the scale parameter in batch normalization (Ioffe & Szegedy, 2015) should be set when training with the Swish activation function; Hendrycks & Gimpel (2016) suggested using an optimizer with momentum when using GELU; Klambauer et al. (2017) introduced a modification of dropout (Hinton et al., 2012) called alpha dropout to be used with SELU. These results suggest that significant gains are possible by designing the activation function properly for a network and task, but that it is difficult to do so manually.
18
+
19
+ This paper presents an approach to automatic activation function design. The approach is inspired by genetic programming (Koza, 1992), which describes techniques for evolving computer programs to solve a particular task. In contrast with previous studies (Bingham et al., 2020; Ramachandran et al., 2018; Liu et al., 2020; Basirat & Roth, 2018), this paper focuses on automatically discovering activation functions that are parametric. Evolution discovers the general form of the function, while gradient descent optimizes the parameters of the function during training. The approach, called PANGAEA (Parametric ActivatioN functions Generated Automatically by an Evolutionary Algorithm), discovers general activation functions that improve performance overall over previously proposed functions. It also produces specialized functions for different architectures, such as Wide ResNet, ResNet, and Preactivation ResNet, that perform even better than the general functions, demonstrating its ability to customize activation functions to architectures.
20
+
21
+ Table 1: The operator search space consists of basic unary and binary functions as well as existing activation functions (Appendix D). $\sigma ( x ) = ( 1 + e ^ { - x } ) ^ { \bar { - } 1 } $ . The unary operators bessel_i0e and bessel_i1e are the exponentially scaled modified Bessel functions of order 0 and 1, respectively.
22
+
23
+ <table><tr><td colspan="8">Unary</td><td colspan="2">Binary</td></tr><tr><td>0</td><td>|x|</td><td>erf(x)</td><td>tanh(x)</td><td>arcsinh(x)</td><td>ReLU(x)</td><td>Softplus(x)</td><td>x1+x2</td><td>w12</td><td></td></tr><tr><td>1</td><td>3</td><td>erfc(x)</td><td>e-1</td><td>arctanh(x)</td><td>ELU(x)</td><td></td><td>Softsign(x)</td><td>x1-x2</td><td>max{x1,x2}</td></tr><tr><td>x</td><td>x²</td><td>sinh(x)</td><td>g(x)</td><td>bessel_i0e(x)</td><td>SELU(x)</td><td></td><td>HardSigmoid(x)</td><td>x1:X2</td><td>min{x1,x2}</td></tr><tr><td>1x</td><td>e</td><td>cosh(x)</td><td>log((x))</td><td>bessel_ile(x)</td><td>Swish(x)</td><td></td><td></td><td>x1/x2</td><td></td></tr></table>
24
+
25
+ # 2 RELATED WORK
26
+
27
+ Prior work in automatic activation function discovery includes that of Ramachandran et al. (2018), who used reinforcement learning to design novel activation functions. They discovered multiple functions, but analyzed just one in depth: $\mathrm { S w i s h } ( x ) = x \cdot \sigma ( x )$ . Of the top eight functions discovered, only Swish and $\operatorname* { m i a x } \{ \bar { x } , \sigma ( x ) \}$ consistently outperformed ReLU across multiple tasks, suggesting that improvements are possible but often task specific.
28
+
29
+ Bingham et al. (2020) used evolution to discover novel activation functions. Whereas their functions had a fixed graph structure, PANGAEA utilizes a flexible search space that implements activation functions as arbitrary computation graphs. PANGAEA also includes more powerful mutation operations, and a function parameterization approach that makes it possible to further refine functions through gradient descent.
30
+
31
+ Liu et al. (2020) evolved normalization-activation layers. They searched for a computation graph that replaced both batch normalization and ReLU in multiple neural networks. They argued that the inherent nonlinearity of the discovered layers precluded the need for any explicit activation function. However, experiments in this paper show that carefully designed parametric activation functions can in fact be a powerful augmentation to existing deep learning models.
32
+
33
+ Finally, Basirat & Roth (2018) used a genetic algorithm to discover task-specific piecewise activation functions. They showed that different functions are optimal for different tasks. However, the discovered activation functions did not outperform ELiSH and HardELiSH, two hand-designed activation functions proposed in the same paper (Basirat & Roth, 2018). The larger search space in PANGAEA affords evolution extra flexibility in designing activation functions, while the trainable parameters give customizability to the network itself, leading to consistent, significant improvement.
34
+
35
+ # 3 THE PANGAEA METHOD
36
+
37
+ ![](images/9c28c9e93bbd40754eba91ff6ca427dbdce9c04fcfb26b275a7cf4bb4857f0c3.jpg)
38
+ Figure 1: Random activation function initialization. The initial population consists of random samples of two kinds of computation graphs, randomly initialized with the operators in Table 1. In this manner, the search starts with simple graphs and gradually expands to more complex forms.
39
+
40
+ # 3.1 REPRESENTING AND MODIFYING ACTIVATION FUNCTIONS
41
+
42
+ Activation functions are represented as computation graphs in which each node is a unary or a binary operator (Table 1). The activation functions are implemented in TensorFlow (Abadi et al., 2016), and safe operator implementations are chosen when possible (e.g. the binary operator $x _ { 1 } / x _ { 2 }$ is implemented as tf.math.divide_no_nan, which returns 0 if $x _ { 2 } = 0$ ). The operators in Table 1 were chosen to create a large and expressive search space that contains activation functions unlikely to be discovered by hand. Operators that are periodic (e.g. $\sin ( x ) )$ and operators that contain repeated asymptotes were not included; in preliminary experiments they often caused training instability. All of the operators have domain $\mathbb { R }$ making it possible to compose them arbitrarily.
43
+
44
+ ![](images/64a1658d0c67297390e355462b4975d1327f3ed6c809115d906c3dcdae53ea57.jpg)
45
+ Figure 2: Evolutionary operations on activation functions. In an ‘Insert’ mutation, a new operator is inserted in one of the edges of the computation graph, like the Swish $( x )$ in $( b )$ . In a ‘Remove’ mutation, a node in the computation graph is deleted, like the addition in (c). In a ‘Change’ mutation, an operator at a node is replaced with another, like addition with multiplication in $( d )$ . These first three mutations are useful in refining the function locally. In contrast, in a ‘Regenerate’ mutation $( e )$ , every operator in the graph is replaced by a random operator, thus increasing exploration.
46
+
47
+ PANGAEA begins with an initial population of $P$ random activation functions. Each function is either of the form $f ( x ) = \mathrm { u n a r y 1 } { \left( \mathrm { u n a r y 2 } ( x ) \right) }$ or $f ( x ) = { \mathrm { b i n a r y } } ( { \mathrm { u n a r y 1 } } ( x )$ , unary2 $( x )$ ), as shown in Figure 1. Both forms are equally likely, and the unary and binary operators are also selected uniformly at random. Previous work has suggested that it is difficult to discover highperforming activation functions that have complicated computation graphs (Bingham et al., 2020). The computation graphs in Figure 1 thus represent the simplest non-trivial computation graphs with and without a binary operator.
48
+
49
+ During the search, all ReLU activation functions in a given neural network are replaced with a candidate activation function. No other changes to the network or training setup are made. The network is trained on the dataset, and the activation function is assigned a fitness score equal to the network’s accuracy on the validation set.
50
+
51
+ Given a parent activation function, a child activation function is created by applying one of four possible mutations (Figure 2). Other possible evolutionary operators like crossover are not used in this paper. All mutations are equally likely with two special cases. If a remove mutation is selected for an activation function with just one node, a change mutation is applied instead. Additionally, if an activation function with greater than seven nodes is selected for mutation, the mutation is a remove mutation, in order to reduce bloat.
52
+
53
+ Insert In an insert mutation, one operator in the search space is selected uniformly at random. This operator is placed on a random edge of a parent activation function graph. In Figure $2 b$ , the unary operator $\operatorname { S w i s h } ( x )$ is inserted at the edge connecting the output of $\operatorname { t a n h } ( x )$ to the input of $x _ { 1 } + x _ { 2 }$ After mutating, the parent activation function $( \operatorname { t a n h } ( x ) + | \bar { \operatorname { e r f } ( x ) } | ) ^ { 2 }$ produces the child activation function $( \mathrm { S w i s h } ( \operatorname { t a n h } ( x ) ) + \vert \mathbf { e r f } ( x ) \vert ) ^ { 2 }$ . If a binary operator is randomly chosen for the insertion, the incoming input value is assigned to the variable $x _ { 1 }$ . If the operator is addition or subtraction, the input to $x _ { 2 }$ is set to 0. If the operator is multiplication, division, or exponentiation, the input to $x _ { 2 }$ is set to 1. Finally, if the operator is the maximum or minimum operator, the input to $x _ { 2 }$ is a copy of the input to $x _ { 1 }$ . When a binary operator is inserted into a computation graph, the activation function computed remains unchanged. However, the structure of the computation graph is modified and can be further altered by future mutations.
54
+
55
+ Remove In a remove mutation, one node is selected uniformly at random and deleted. The node’s input is rewired to its output. If the removed node is binary, one of the two inputs is chosen at random and is deleted. The other input is kept. In Figure $2 c$ , the addition operator is removed from the parent activation function. The two inputs to addition, $\operatorname { t a n h } ( x )$ and $\vert \mathrm { e r f } ( x ) \vert$ , cannot both be kept. By chance, $\operatorname { t a n h } ( x )$ is discarded, resulting in the child activation function $| \mathrm { e r f } ( x ) | ^ { 2 }$ .
56
+
57
+ Change To perform a change mutation, one node in the computation graph is selected at random and replaced with another operator from the search space, also uniformly at random. Unary operators are always replaced with unary operators, and binary operators with binary operators. Figure $2 d$ shows how changing addition to multiplication produces the activation function $( \operatorname { t a n h } ( x ) \cdot | \operatorname { e r f } ( x ) | ) ^ { 2 }$ .
58
+
59
+ Regenerate In a regenerate mutation, every operator in the computation graph is replaced with another operator from the search space. As with change mutations, unary operators are replaced with unary operators, and binary operators with binary operators. Although every node in the graph is changed, the overall structure of the computation graph remains the same. Regenerate mutations are useful for increasing exploration, and are similar in principle to burst mutation and delta coding (Gomez & Miikkulainen, 2003; Whitley et al., 1991). Figure $2 e$ shows the child activation function $- \operatorname* { m a x } \{ 0 , \operatorname { t a n h } ( \mathrm { S E L U } ( x ) ) \}$ , which is quite different from the parent function in Figure $2 a$ .
60
+
61
+ ![](images/3943bc7f7c4a083dae56f967832557f6cd91a92b775ff9aa05cc7b9ea7fd799f.jpg)
62
+ Figure 3: Parameterization of activation functions. In this example, parameters are added to $k \_ \mathrm { ~ ~ { ~ 3 ~ } ~ }$ random edges, yielding the parametric activation function $\alpha \sigma ( \beta | x | -$ arctan $( \gamma x ) _ { , }$ ).
63
+
64
+ Parameterization of Activation Functions After mutation (or random initialization), activation functions are parameterized (Figure 3). A value $k \in \{ 0 , 1 , 2 , 3 \}$ is chosen uniformly at random, and $k$ edges of the activation function graph are randomly selected. Multiplicative per-channel parameters are inserted at these edges and initialized to one. Whereas evolution is well suited for discovering the general form of the activation function in a discrete, structured search space, parameterization makes it possible to fine-tune the function using gradient descent. The function parameters are updated at every epoch during backpropagation, resulting in different activation functions in different stages of training. As the parameters are per-channel, the process creates different activation functions at different locations in the neural network. Thus, parameterization gives neural networks additional flexibility to customize activation functions.
65
+
66
+ # 3.2 DISCOVERING ACTIVATION FUNCTIONS WITH EVOLUTION
67
+
68
+ Activation functions are discovered by regularized evolution (Real et al., 2019). Initially, $P$ random activation functions are created, parameterized, and assigned fitness scores. To generate a new activation function, $S$ functions are sampled with replacement from the current population. The function with the highest validation accuracy serves as the parent, and is mutated to create a child activation function. This function is parameterized and assigned a fitness score. The new activation function is then added to the population, and the oldest function in the population is removed, ensuring the population is always of size $P$ . This process continues until $C$ functions have been evaluated in total, and the top functions over the history of the search are returned as a result.
69
+
70
+ Any activation function that achieves a fitness score less than a threshold $V$ is discarded. These functions are not added to the population, but they do count towards the total number of $C$ activation functions evaluated for each architecture. This quality control mechanism allows evolution to focus only on the most promising candidates.
71
+
72
+ To save computational resources during evolution, each activation function is evaluated by training a neural network for 100 epochs using a compressed learning rate schedule (Appendix B). After evolution is complete, the top 10 activation functions from the entire search are reranked. Each function receives an adjusted fitness score equal to the average validation accuracy from two independent 200-epoch training runs using the original learning rate schedule. The top three activation functions after reranking proceed to the final testing experiments.
73
+
74
+ During evolution, it is possible that some activation functions achieve unusually high validation accuracy by chance. The 100-epoch compressed learning rate schedule may also have a minor effect on which activation functions are optimal compared to a full 200-epoch schedule. Reranking thus serves two purposes. Full training reduces bias from the compressed schedule, and averaging two such runs lessens the impact of activation functions that achieved high accuracy by chance.
75
+
76
+ # 4 DATASETS AND ARCHITECTURES
77
+
78
+ The experiments in this paper focus primarily on the CIFAR-100 image classification dataset (Krizhevsky et al., 2009). This dataset is a more difficult version of the popular CIFAR-10 dataset, with 100 object categories instead of 10. Fifty images from each class were randomly selected from the training set to create a balanced validation set, resulting in a training/validation/test split of 45K/5K/10K images.
79
+
80
+ To demonstrate that PANGAEA can discover effective activation functions in various settings, it is evaluated with three different neural networks. The models were implemented in TensorFlow (Abadi et al., 2016), mirroring the original authors’ training setup as closely as possible (Appendix B).
81
+
82
+ Wide Residual Network (WRN-10-4; Zagoruyko & Komodakis, 2016) has a depth of 10 and widening factor of four. Wide residual networks provide an interesting comparison because they are shallower and wider than many other popular architectures, while still achieving good results. WRN-10-4 was chosen because its CIFAR-100 accuracy is competitive, yet it trains relatively quickly.
83
+
84
+ Residual Network (ResNet-v1-56; He et al., 2016a), with a depth of 56, provides an important contrast to WRN-10-4. It is significantly deeper and has a slightly different training setup, which may have an effect on the performance of different activation functions.
85
+
86
+ Preactivation Residual Network (ResNet-v2-56; He et al., 2016b) has identical depth to ResNetv1-56, but is a fundamentally different architecture. Activation functions are not part of the skip connections, as is the case in ResNet-v1-56. Since information does not have to pass through an activation function, this structure makes it easier to train very deep architectures. PANGAEA should exploit this structure and discover different activation functions for ResNet-v2-56 and ResNet-v1-56.
87
+
88
+ # 5 RESULTS
89
+
90
+ Overview Separate evolution experiments were run to discover novel activation functions for each of the three architectures. Evolutionary parameters $P = 6 4$ , $S \ : = \ : 1 6$ , $C = 1 { , } 0 0 0$ , and $V = 2 0 \%$ were used since they were found to work well in preliminary experiments.
91
+
92
+ Figure 4 visualizes progress in these experiments. For all three architectures, PANGAEA quickly discovered activation functions that outperform ReLU. It continued to make further progress, gradually discovering better activation functions, and did not plateau during the time allotted for the experiment. Each run took approximately 2,000 GPU hours on GeForce GTX 1080 GPUs (Appendix C).
93
+
94
+ ![](images/66f7f6c97b75adb95b7089e7a2d2d3b9afe403d517497ad30851f4c4b2859ec8.jpg)
95
+ Figure 4: Progress of PANGAEA on three different neural networks. Evolution quickly discovered activation functions that outperform ReLU (shown at $x = 0$ ), and continued to improve throughout the experiment. The plots show the highest validation accuracy of all activation functions evaluated so far after 100 epochs of training. Notable discovered activation functions are identified with a star and annotated. The improvements over ReLU are meaningful, but the values themselves are not directly comparable to the results in Table 2, which lists test set accuracy after 200 epochs.
96
+
97
+ Table 2 shows the final test accuracy for the top specialized activation functions discovered by PANGAEA in each run. For comparison, the accuracy of the top general functions dis
98
+
99
+ covered in this process are also shown, as well as the accuracy of 28 baseline activation functions. In sum, PANGAEA discovered the best activation function for ResNet-v2-56, the top two activation functions for ResNet-v1-56, and the top three activation functions for WRN-10-4.
100
+
101
+ Specialized Activation Functions For all three architectures, there is at least one baseline activation function that outperforms ReLU by a statistically significant margin. This result already demonstrates the importance of activation function design, and suggests that the common practice of using ReLU by default is suboptimal. The best baseline activation function is different for different architectures, reinforcing the importance of developing specialized activation functions.
102
+
103
+ Table 2: CIFAR-100 test set accuracy shown as a median of ten runs, with mean $\pm$ sample standard deviation in parenthesis. The top accuracy for each architecture is in bold. Asterisks indicate a statistically significant improvement in mean accuracy over ReLU, with $^ *$ if $p \leq 0 . 0 5$ , $^ { * * }$ if $p \leq 0 . 0 1$ , and $^ { \ast \ast \ast }$ if $p ~ \leq ~ 0 . 0 0 1$ ; $p$ -values are from one-tailed Welch’s $t$ -tests. The $^ { + + }$ or ${ \mathrel { + { + } } } { \mathrel { - { } } }$ indicate a statistically significant improvement in mean accuracy over all 28 baseline activation functions (Appendix D), with $p \leq 0 . 0 1$ or $p \leq 0 . 0 0 1$ in every case, respectively.
104
+
105
+ <table><tr><td></td><td>WRN-10-4</td><td>ResNet-v1-56</td><td>ResNet-v2-56</td></tr><tr><td>Specialized for WRN-10-4</td><td></td><td></td><td></td></tr><tr><td>log(σ(αx))·arcsinh(x)</td><td>73.23 (73.16 ± 0.41) *** +++</td><td>11.15 (19.34 ± 20.14)</td><td>72.05 (64.30 ± 21.32)</td></tr><tr><td>log(g(ax))·βarcsinh(x)</td><td>73.22 (73.20 ± 0.37 *** +++</td><td>05.78 (18.63 ± 21.04)</td><td>55.40 (45.88 ± 30.70)</td></tr><tr><td>-Swish(Swish(αx))</td><td>72.38 (72.49 ± 0.55) ***</td><td>59.61 (58.86 ± 2.88)</td><td>74.70 (74.71±0.20) *</td></tr><tr><td>Specialized for ResNet-v1-56</td><td></td><td></td><td></td></tr><tr><td>αx-βlog(σ(γx))</td><td>70.35 (70.28± 0.37)</td><td>70.82 (71.01 ± 0.64) *** ++</td><td>74.41 (74.35± 0.45)</td></tr><tr><td>αx-log(σ(βx))</td><td>70.62 (70.47±0.53)</td><td>70.30 (70.30 ± 0.58) *</td><td>74.73 (74.70±0.23) *</td></tr><tr><td>max{Swish(x),0}</td><td>71.96 (72.10 ± 0.33) **</td><td>69.46 (69.43 ± 0.69)</td><td>74.97 (74.97±0.25) **</td></tr><tr><td>Specialized for ResNet-v2-56</td><td></td><td></td><td></td></tr><tr><td>Softplus(ELU(x))</td><td>71.51 (71.36 ± 0.34)</td><td>69.94 (69.96 ± 0.39)</td><td>75.60 (75.61 ± 0.42) ***</td></tr><tr><td>min{log(σ(x)),αlog(σ(βx))}</td><td>72.05 (72.04± 0.34) **</td><td>69.63 (69.56 ± 0.48)</td><td>75.20 (75.19 ± 0.39) ***</td></tr><tr><td>SELU(Swish(𝑥))</td><td>01.00 (01.00 ± 0.00)</td><td>01.00 (01.00 ±0.00)</td><td>75.06 (75.02 ± 0.35) **</td></tr><tr><td>General Activation Functions</td><td></td><td></td><td></td></tr><tr><td>max{Swish(x),αlog(g(ReLU(x)))}</td><td>72.50 (72.54± 0.26)***</td><td>69.97 (69.91 ± 0.37)</td><td>75.21 (75.20 ± 0.41) ***</td></tr><tr><td>min{Swish(x),aELU(ReLU(βx)}</td><td>72.44 (72.39 ±0.29) ***</td><td>69.90 (69.82±0.40)</td><td>75.20 (75.27± 0.38)***</td></tr><tr><td>log(σ(x))</td><td>72.38 (72.33±0.32) ***</td><td>69.49 (69.58± 0.35)</td><td>75.45 (75.53± 0.37 ***</td></tr><tr><td>Baseline Activation Functions</td><td></td><td></td><td></td></tr><tr><td>ReLU</td><td>71.44 (71.46 ± 0.50)</td><td>69.78 (69.64± 0.65)</td><td>74.43 (74.39 ± 0.44)</td></tr><tr><td>ELiSH</td><td>01.00 (01.00 ±0.00)</td><td>01.00 (01.00 ±0.00)</td><td>75.16 (75.20 ± 0.31)***</td></tr><tr><td>ELU</td><td>72.41 (72.30± 0.32) ***</td><td>69.59 (69.67 ± 0.46)</td><td>74.86 (74.95±0.30)**</td></tr><tr><td>GELU</td><td>72.00 (71.95±0.35) *</td><td>70.16(70.19 ±0.40) *</td><td>74.84 (74.86 ± 0.33) **</td></tr><tr><td>HardSigmoid</td><td>55.55 (54.99 ± 1.00)</td><td>33.31 (32.55 ± 4.06)</td><td>65.03 (64.90 ± 0.69)</td></tr><tr><td>LeakyReLU</td><td>71.76 (71.73± 0.33)</td><td>69.77 (69.78 ± 0.33)</td><td>74.75 (74.73±0.35) *</td></tr><tr><td>Mish</td><td>72.02 (71.95± 0.41) *</td><td>70.03 (69.88 ± 0.54)</td><td>75.33(75.32± 0.29)***</td></tr><tr><td>SELU</td><td>70.55 (70.53± 0.42)</td><td>68.51 (68.52 ± 0.29)</td><td>73.86 (73.79 ± 0.36)</td></tr><tr><td>sigmoid</td><td>56.45 (56.10 ± 0.98)</td><td>37.07 (36.47 ± 3.32)</td><td>66.72 (66.45 ± 0.92)</td></tr><tr><td>Softplus</td><td>72.25 (72.27± 0.26 ***</td><td>69.71 (69.71 ± 0.36)</td><td>75.47 (75.46± 0.52) ***</td></tr><tr><td>Softsign</td><td>56.72 (56.30± 2.16)</td><td>58.33 (58.38 ± 0.96)</td><td>69.31 (69.33 ± 0.39)</td></tr><tr><td>Swish</td><td>72.27 (72.26±0.28) ***</td><td>69.60 (69.68 ±0.38)</td><td>75.17 (75.08± 0.36) ***</td></tr><tr><td>tanh</td><td>56.29 (56.52 ± 1.53)</td><td>63.89 (63.88 ± 0.38)</td><td>70.53 (70.44 ± 0.40)</td></tr><tr><td>Parametric Baseline Functions</td><td></td><td></td><td></td></tr><tr><td>aReLU(βx)</td><td>72.01 (71.96 ±0.31) **</td><td>68.91 (68.93± 0.22)</td><td>73.60 (73.52 ± 0.37)</td></tr><tr><td>QELiSH(βx)</td><td>01.00 (01.00 ±0.00)</td><td>01.00 (01.00 ± 0.00)</td><td>73.95 (73.94± 0.33)</td></tr><tr><td>αELU(βx)</td><td>71.96 (71.98± 0.24) **</td><td>68.91 (69.06 ± 0.37)</td><td>74.03 (73.97 ± 0.45)</td></tr><tr><td>αGELU(βx)</td><td>71.86 (71.96 ± 0.34) **</td><td>69.35 (69.39 ±0.35)</td><td>73.77 (73.83 ± 0.24)</td></tr><tr><td>αHardSigmoid(βx)</td><td>66.74 (66.70 ± 0.64)</td><td>33.47 (34.33 ± 6.53)</td><td>65.09 (65.10±0.40)</td></tr><tr><td>aLeaky ReLU(βx)</td><td>71.70 (71.74 ± 0.39)</td><td>69.18 (69.11 ±0.47)</td><td>73.53 (73.44 ± 0.29)</td></tr><tr><td>αMish(βx)</td><td>72.02 (72.11 ± 0.31) **</td><td>69.66 (69.51 ± 0.67)</td><td>73.72 (73.72 ± 0.32)</td></tr><tr><td>αSELU(βx)</td><td>71.04 (71.07 ± 0.33)</td><td>68.06 (68.05 ± 0.39)</td><td>73.44 (73.37± 0.38)</td></tr><tr><td>αsigmoid(βx)</td><td>67.16 (66.98 ± 0.66)</td><td>43.72 (44.40 ± 2.62)</td><td>66.80 (66.98 ± 0.85)</td></tr><tr><td>aSoftplus(βx)</td><td>71.82 (71.73 ± 0.31)</td><td>68.84 (68.84± 0.30)</td><td>73.92 (73.95 ± 0.37)</td></tr><tr><td>aSoftsign(βx)</td><td>62.19 (62.12 ± 0.83)</td><td>01.00 (9.18 ± 13.75)</td><td>68.91 (68.87 ±0.38)</td></tr><tr><td>αSwish(βx)</td><td>72.36 (72.26±0.29)***</td><td>69.25 (69.25 ± 0.28)</td><td>73.97 (73.93± 0.22)</td></tr><tr><td>αtanh(βx)</td><td>63.72 (63.55 ± 0.56)</td><td>01.00 (02.92 ± 6.07)</td><td>69.61 (69.55 ± 0.62)</td></tr><tr><td>PReLU</td><td>72.25 (72.23 ± 0.37) ***</td><td>69.67 (69.77 ±0.40)</td><td>74.99 (75.10±0.53)**</td></tr><tr><td>PSwish=x·σ(βx)</td><td>72.46 (72.40± 0.31) ***</td><td>70.19 (70.16 ±0.46) *</td><td>75.37 (75.39±0.28) ***</td></tr></table>
106
+
107
+ Because PANGAEA uses validation accuracy from a single neural network to assign fitness scores to activation functions, there is selective pressure to discover functions that exploit the structure of the network. The functions thus become specialized to the architecture. They increase the performance of that architecture; however, they may not be as effective with other architectures. Specialized activation function accuracies are highlighted in gray in Table 2. To verify that the functions are customized to a specific architecture, the functions were cross-evaluated with other architectures.
108
+
109
+ PANGAEA discovered two specialized activation functions for WRN10-4 and one for ResNet-v1-56 that achieved statistically significant improvements in mean accuracy over all baseline activation functions. All three specialized activation functions evolved for ResNet-v2-56 significantly outperformed ReLU as well. These results strongly demonstrate the power of customizing activation functions to architectures.
110
+
111
+ General Activation Functions Although the best performance tends to come from specialization, it is also useful to discover activation functions that achieve high accuracy across multiple architectures. For instance, they could be used initially on a new architecture before spending compute on specialization. A powerful albeit computationally demanding approach would be to evolve general functions directly, by evaluating candidates on multiple architectures during evolution. However, it turns out that each
112
+
113
+ ![](images/b072386c64cefe845fefdfcf21d9e61a2e4098fdbff1c00200a8d54ea74e8969.jpg)
114
+ Figure 5: Adaptation of parametric activation functions over time and space. Top: The parameters change during training, resulting in different activation functions in the early and late stages. The plots were created by averaging the values of $\alpha$ , $\beta$ , and $\gamma$ across the entire network at different training epochs. Bottom: The parameters are updated separately in each channel, inducing different activation functions at different locations of a neural network. The plots were created by averaging $\alpha$ , $\beta$ , and $\gamma$ at each layer of the network after the completion of training.
115
+
116
+ specialized evolution run already generates a variety of functions, many of which are general.
117
+
118
+ To evaluate whether the PANGAEA runs discovered general functions as well, the top 10 functions from each run were combined into a pool of 30 candidate functions. Each candidate was assigned three fitness scores equal to the average validation accuracy from two independent training runs on each of the three architectures. Candidate functions that were Pareto-dominated, were functionally equivalent to one of the baseline activation functions, or had already been selected as a specialized activation function were discarded, leaving three Pareto-optimal general activation functions.
119
+
120
+ These functions indeed turned out to be effective as general activation functions: they all performed well on all architectures. One outperformed all baseline activation functions on WRN-10-4, while two functions on ResNet-v1-56 and three functions on ResNet-v2-56 outperformed 25 of the 28 baseline functions. However, specialized activation functions, i.e. those specifically evolved for each architecture, still tend to give the biggest improvements.
121
+
122
+ Shapes of Discovered Functions Many of the top discovered activation functions are compositions of multiple unary operators. These functions do not exist in the core unit search space of Ramachandran et al. (2018), which requires binary operators. They also do not exist in the $S _ { 1 }$ or $S _ { 2 }$ search spaces proposed by Bingham et al. (2020), which are too shallow. The design of the search space is therefore as important as the search algorithm itself. Previous search spaces that rely on repeated fixed building blocks only have limited representational power. In contrast, PANGAEA utilizes a flexible search space that can represent activation functions in an arbitrary computation graph.
123
+
124
+ Figure 5 shows examples of parametric activation functions discovered by PANGAEA. As training progresses, gradient descent makes small adjustments to the function parameters $\alpha$ , $\beta$ , and $\gamma$ , resulting in activation functions that change over time. This result suggests that it is advantageous to have one activation function in the early stages of training when the network learns rapidly, and a different activation function in the later stages of training when the network is focused on fine-tuning. The parameters $\alpha$ , $\beta$ , and $\gamma$ are also learned separately for the different channels, resulting in activation functions that vary with location in a neural network. Functions in deep layers (near the output) are more nonlinear than those in shallow layers (closer to the input), possibly contrasting the need to form regularized embeddings with the need to form categorizations. In this manner, PANGAEA customizes the activation functions to both time and space for each architecture.
125
+
126
+ Table 3: CIFAR-100 test set accuracy shown as a median of ten runs, with mean $\pm$ sample standard deviation in parenthesis. The parametric evolved functions tend to outperform their nonparametric counterparts, demonstrating the value of parameterization.
127
+
128
+ <table><tr><td>WRN-10-4 log(σ(ax)) ·arcsinh(x) log(σ(ax))-βarcsinh(x)</td><td>73.23 (73.16 ± 0.41) 73.22 (73.20 ± 0.37)</td></tr><tr><td>ResNet-v1-56 αx-βlog(σ(γx)) αx-log(σ(βx)) x-logσ(x)</td><td>70.82 (71.01 ± 0.64) 70.30 (70.30 ± 0.58) 69.44 (69.29 ± 0.45)</td></tr><tr><td>ResNet-v2-56 min{log(σ(𝑥),log(σ(βx))} log((x))</td><td>75.20 (75.19 ± 0.39) 75.45 (75.53 ± 0.37)</td></tr></table>
129
+
130
+ # 6 ABLATIONS AND VARIATIONS
131
+
132
+ Effect of Parameterization To understand the effect that parameterizing activation functions has on performance, the specialized functions (Table 2) were trained without them. As Table 3 shows, when parameters are removed, performance drops. The function $\log ( \sigma ( x ) )$ is the only exception to this rule, but its high performance is not surprising, since it was previously discovered as a general activation function (Table 2). These results confirm that the learnable parameters contributed to the success of PANGAEA.
133
+
134
+ Search Strategy As additional baseline comparisons, two alternative search strategies were used to discover activation functions for WRN-10-4. First, a random search baseline was established by applying random mutations without regard to fitness values. This approach corresponds to setting evolutionary parameters $P = 1$ , $S = 1$ and $V = 0 \%$ . Second, to understand the effects of function parameterization, a nonparametric evolution baseline was run. This setting is identical to PANGAEA, except functions are not parameterized (Figure 3). Otherwise, both baselines follow the same setup as PANGAEA, including evaluating $C = 1 { , } 0 0 0$ candidate functions and reranking the most promising ones (Section 3.2).
135
+
136
+ Table 4 shows the results of this experiment. Random search is able to discover good functions that outperform ReLU, but the functions are not as powerful as those discovered by PANGAEA. This result demonstrates the importance of fitness selection in evolutionary search. The functions discovered by nonparametric evolution similarly outperform ReLU but underperform PANGAEA. Interestingly, without parameterization, evolution is not as creative: two of the three functions discovered are merely Swish multiplied by a constant. Random search and nonparametric evolution both discovered good functions that improved accuracy, but PANGAEA achieves the best performance by combining the advantages of fitness selection and function parameterization.
137
+
138
+ Table 4: WRN-10-4 accuracy with different activation functions on CIFAR100, shown as a median of ten runs, with mean $\pm$ sample standard deviation in parenthesis. PANGAEA discovers better activation functions than random search and nonparametric evolution.
139
+
140
+ <table><tr><td>PANGAEA</td><td></td></tr><tr><td>log(σ(αx)):arcsinh(x)</td><td>73.23 (73.16 ± 0.41)</td></tr><tr><td>log(g(ax)):βarcsinh(x)</td><td>73.22 (73.20 ± 0.37)</td></tr><tr><td>-Swish(Swish(αx))</td><td>72.38 (72.49 ± 0.55)</td></tr><tr><td>Random Search</td><td></td></tr><tr><td>αSwish(x)</td><td>72.80 (72.85 ± 0.25)</td></tr><tr><td>Softplus(x)·arctan(αx)</td><td>72.78 (72.81 ± 0.35)</td></tr><tr><td>ReLU(αarcsinh(βσ(𝑥))) ·SELU(x)</td><td>72.63 (72.69 ± 0.21)</td></tr><tr><td>Nonparametric Evolution</td><td></td></tr><tr><td>cosh(1)·Swish(𝑥)</td><td>72.81 (72.78 ± 0.24)</td></tr><tr><td>(e1-1)·Swish(𝑥)</td><td>72.57 (72.52 ± 0.34)</td></tr><tr><td>ReLU(Swish(𝑥))</td><td>72.06 (72.04 ± 0.54)</td></tr><tr><td>ReLU</td><td>71.44 (71.46 ± 0.50)</td></tr><tr><td>Swish</td><td>72.27 (72.26 ± 0.28)</td></tr></table>
141
+
142
+ Table 5: Specialized activation functions discovered for WRN-10-4, ResNet-v1- 56, and ResNet-v2-56 are evaluated on larger versions of those architectures: WRN-16-8, ResNet-v1-110, and ResNet-v2-110, respectively. CIFAR100 test accuracy is reported as the median of three runs, with mean $\pm$ sample standard deviation in parenthesis. Specialized activation functions successfully transfer to WRN-16-8 and ResNet-v2-110, outperforming ReLU.
143
+
144
+ <table><tr><td>WRN-16-8</td><td></td></tr><tr><td>log(σ(αx)):arcsinh(𝑥) log(σ(αx))·βarcsinh(x)</td><td>78.42 (78.34 ± 0.20) 78.38 (78.36 ± 0.17)</td></tr><tr><td>-Swish(Swish(αx))</td><td>77.90 (78.00 ± 0.35)</td></tr><tr><td>ReLU</td><td>78.14 (78.15 ± 0.03)</td></tr><tr><td>ResNet-v1-110</td><td></td></tr><tr><td>αx-βlog(σ(γ𝑥))</td><td>70.88 (70.85 ± 0.50)</td></tr><tr><td>ax-log(σ(βx))</td><td>70.40 (70.34 ± 0.60)</td></tr><tr><td>max{Swish(x),0}</td><td>70.30 (70.36 ± 0.56)</td></tr><tr><td>ReLU</td><td>71.15 (71.23 ± 0.25)</td></tr><tr><td>ResNet-v2-110</td><td></td></tr><tr><td>Softplus(ELU(𝑥))</td><td>77.34 (77.14 ± 0.38)</td></tr><tr><td>min{log(σ(x)),log(σ(βx))}</td><td>76.99 (76.93 ± 0.19)</td></tr><tr><td>SELU(Swish(x))</td><td>77.04 (76.96 ± 0.14)</td></tr><tr><td>ReLU</td><td>76.35 (76.34 ± 0.11)</td></tr></table>
145
+
146
+ Scaling Up PANGAEA discovered specialized activation functions for WRN-10-4, ResNet-v1-56, and ResNetv2-56. Table 5 shows the performance of these activation
147
+
148
+ functions when paired with the larger WRN-16-8, ResNet-v1-110, and ResNet-v2-110 architectures.
149
+ Due to time constraints, ReLU is the only baseline activation function in these experiments.
150
+
151
+ Two of the three functions discovered for WRN-10-4 outperform ReLU with WRN-16-8, and all three functions discovered for ResNet-v2-56 outperform ReLU with ResNet-v2-110. Interestingly, ReLU achieves the highest accuracy for ResNet-v1-110, where activation functions are part of the skip connections, but not for ResNet-v2-110, where they are not. Thus, it is easier to achieve high performance with specialized activation functions on very deep architectures when they are not confounded by skip connections. Notably, ResNet-v2-110 with Softplus $\left( \mathrm { E L U } ( x ) \right)$ performs comparably to much larger ResNet-v2-1001 with ReLU (77.34 vs. 77.29, as reported by He et al. (2016b)).
152
+
153
+ Evolving novel activation functions can be computationally expensive. The results in Table 5 suggest that it is possible to reduce this cost by evolving activation functions for smaller architectures, and then using the discovered functions with larger architectures.
154
+
155
+ All-CNN-C Finally, to verify that PANGAEA is effective with different datasets and types of architectures, activation functions were evolved for the All-CNN-C (Springenberg et al., 2015) architecture on the CIFAR-10 dataset. All-CNN-C is quite distinct from the architectures considered above: it contains only convolutional layers, activation functions, and a global average pooling layer, but it does not have residual connections. As shown in Table 6, PANGAEA improves significantly over ReLU in this setting as well. The accuracy improvement from $8 8 . 4 7 \%$ to $9 2 . 8 0 \%$ corresponds to an impressive $3 7 . 5 5 \%$ reduction in the error rate. This experiment provides further evidence
156
+
157
+ Table 6: All-CNN-C accuracy with different activation functions on CIFAR-10, shown as a median of ten runs, with mean $\pm$ sample standard deviation in parenthesis. PANGAEA improves performance significantly also with this different architecture and task.
158
+
159
+ <table><tr><td>αReLU(β|ReLU(γx)l)</td><td>92.80 (92.77±0.13)</td></tr><tr><td>αSwish(x)·cosh(β)</td><td>92.67 (92.66±0.08) 92.63 (76.15± 34.86)</td></tr><tr><td>αSwish(βx)</td><td></td></tr><tr><td>ReLU</td><td>88.47 (88.47 ±0.14)</td></tr></table>
160
+
161
+ hat PANGAEA can improve performance for different architectures and tasks.
162
+
163
+ # 7 FUTURE WORK
164
+
165
+ It is difficult to select an appropriate activation function for a given architecture because the activation function, network topology, and training setup interact in complex ways. It is especially promising that PANGAEA discovered activation functions that significantly outperformed the baselines, since the architectures and training setups were standard and developed with ReLU. A compelling research direction is to jointly optimize the architecture, training setup, and activation function.
166
+
167
+ More specifically, there has been significant recent research in automatically discovering the architecture of neural networks through gradient-based, reinforcement learning, or neuroevolutionary methods (Elsken et al., 2019; Wistuba et al., 2019; Real et al., 2019). In related work, evolution was used discover novel loss functions automatically (Gonzalez & Miikkulainen, 2019; 2020; Liang et al., 2020), outperforming the standard cross entropy loss. In the future, it may be possible to optimize many of these aspects of neural network design jointly. Just as new activation functions improve the accuracy of existing network architectures, it is likely that different architectures will be discovered when the activation function is not ReLU. One such example is EfficientNet (Tan & Le, 2019), which achieved state-of-the-art accuracy for ImageNet (Deng et al., 2009) using the Swish activation function (Ramachandran et al., 2018; Elfwing et al., 2018). Coevolution of activation functions, topologies, loss functions, and possibly other aspects of neural network design could allow taking advantage of interactions between them, leading to further improvements in the future.
168
+
169
+ # 8 CONCLUSION
170
+
171
+ This paper introduced PANGAEA, a technique for automatically designing novel, high-performing, parametric activation functions. PANGAEA builds a synergy of two different optimization processes: evolutionary population-based search for the general form, and gradient descent-based fine-tuning of the parameters of the activation function. Compared to previous studies, the search space is extended to include deeper and more complex functional forms, including ones unlikely to be discovered by humans. The parameters are adapted during training and are different in different locations of the architecture, thus customizing the functions over both time and space. PANGAEA is able to discover general activation functions that perform well across architectures, and specialized functions taking advantage of a particular architecture, significantly outperforming previously proposed activation functions in both cases. It is thus a promising step towards automatic configuration of neural networks.
172
+
173
+ REFERENCES
174
+ M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al. Tensorflow: A system for large-scale machine learning. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), pp. 265–283, 2016.
175
+ M. Basirat and P. M. Roth. The quest for the golden activation function. arXiv:1808.00783, 2018.
176
+ G. Bingham, W. Macke, and R. Miikkulainen. Evolutionary optimization of deep learning activation functions. In Genetic and Evolutionary Computation Conference (GECCO ’20), July 8–12, 2020, Cancún, Mexico, 2020.
177
+ D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015.
178
+ J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and F.-F. Li. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
179
+ S. Elfwing, E. Uchibe, and K. Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks, 107:3–11, 2018.
180
+ T. Elsken, J. H. Metzen, and F. Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019.
181
+ F. Gomez and R. Miikkulainen. Active guidance for a finless rocket using neuroevolution. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 2084–2095, 2003.
182
+ S. Gonzalez and R. Miikkulainen. Improved training speed, accuracy, and data utilization through loss function optimization. arXiv:1905.11528, 2019.
183
+ S. Gonzalez and R. Miikkulainen. Evolving loss functions with multivariate taylor polynomial parameterizations. arXiv:2002.00059, 2020.
184
+ K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
185
+ K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
186
+ K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b.
187
+ D. Hendrycks and K. Gimpel. Gaussian error linear units (gelus). arXiv:1606.08415, 2016.
188
+ G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012.
189
+ S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015.
190
+ G. Klambauer, T. Unterthiner, A. Mayr, and S. Hochreiter. Self-normalizing neural networks. In Advances in neural information processing systems, pp. 971–980, 2017.
191
+ J. R. Koza. Genetic programming: on the programming of computers by means of natural selection, volume 1. MIT press, 1992.
192
+ A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
193
+ J. Liang, S. Gonzalez, and R. Miikkulainen. Population-based training for loss function optimization. arXiv:2002.04225, 2020.
194
+ H. Liu, A. Brock, K. Simonyan, and Q. V. Le. Evolving normalization-activation layers. arXiv:2004.02967, 2020.
195
+ A. L. Maas, A. Y. Hannun, and A. Y. Ng. Rectifier nonlinearities improve neural network acoustic models. In Proceedings of the 30th international conference on machine learning (ICML-13), pp. 3, 2013.
196
+ D. Misra. Mish: A self regularized non-monotonic neural activation function. arXiv:1908.08681, 2019.
197
+ V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814, 2010.
198
+ C. Nwankpa, W. Ijomah, A. Gachagan, and S. Marshall. Activation functions: Comparison of trends in practice and research for deep learning. arXiv:1811.03378, 2018.
199
+ P. Ramachandran, B. Zoph, and Q. V. Le. Searching for activation functions. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Workshop Track Proceedings, 2018.
200
+ E. Real, A. Aggarwal, Y. Huang, and Q. V. Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pp. 4780–4789, 2019.
201
+ J. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all convolutional net. In ICLR (workshop track), 2015.
202
+ M. Tan and Q. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pp. 6105–6114, 2019.
203
+ D. Thain, T. Tannenbaum, and M. Livny. Distributed computing in practice: the condor experience. Concurrency and computation: practice and experience, 17(2-4):323–356, 2005.
204
+ D. Whitley, K. Mathias, and P. Fitzhorn. Delta-Coding: An iterative search strategy for genetic algorithms. In Proceedings of the International Conference on Genetic Algorithms, pp. 77–84, 1991.
205
+ M. Wistuba, A. Rawat, and T. Pedapati. A survey on neural architecture search. arXiv:1905.01392, 2019.
206
+ S. Zagoruyko and N. Komodakis. Wide residual networks. arXiv:1605.07146, 2016.
207
+
208
+ ![](images/dbebd0ad85fe1536be8569030106468d347e8332a1c65277ae22e1a70a2ec4a7.jpg)
209
+ Figure 6: CIFAR-100 test accuracy for different neural networks and activation functions. Accuracy with ReLU is shown in blue, and accuracy with the specialized activation functions in red. The relative improvement of the specialized functions over ReLU is shown as a dotted green line, according to the axis values on the right of each plot. Left: The depth of Wide ResNet is fixed at 10, and the width varies from 1 to 16. Center: The depth of Wide ResNet varies from 10 to 34, while the width is fixed at four. Right: The depth of Preactivation ResNet ranges from 20 to 164. The width and depth of a network can affect how much a specialized activation function outperforms ReLU.
210
+
211
+ # A ADJUSTING ARCHITECTURE WIDTH AND DEPTH
212
+
213
+ To further investigate the effect of network size on the performance of novel activation functions, two specialized activation functions were paired with neural networks of different widths and depths. Due to time constraints, the results in this experiment are based on single training runs.
214
+
215
+ Wide Residual Networks The specialized activation function $\log ( \sigma ( \alpha x ) ) \cdot \beta { \mathrm { a r c s i n h } } ( x )$ was discovered for a Wide ResNet of depth 10 and width four (WRN-10-4). Figure 6 shows the performance of this function when paired with Wide ResNets of different depths and widths.
216
+
217
+ For all widths tested, $\log ( \sigma ( \alpha x ) ) \cdot \beta { \mathrm { a r c s i n h } } ( x )$ outperforms ReLU, albeit with diminishing returns as the width becomes large. This result implies that $\log ( \sigma ( \alpha x ) ) \cdot \beta { \mathrm { a r c s i n h } } ( x )$ gives the network more representational power than ReLU. As the width of the architecture is increased, the additional network parameters partially offset this advantage, explaining the decreasing relative improvement of $\log ( \sigma ( \alpha \bar { x } ) ) \cdot \beta \mathrm { a r c s i n h } ( x )$ over ReLU.
218
+
219
+ For a fixed architecture width of four, $\log ( \sigma ( \alpha x ) ) \cdot \beta { \mathrm { a r c s i n h } } ( x )$ outperforms ReLU only when the depth is 10 and 16. Surprisingly, as the depth is increased to 22 and beyond, the performance of $\mathrm { l o { \bar { g } } } ( \sigma ( \alpha x ) ) \cdot \beta \mathrm { a r c s i n h } ( x )$ drops. This result suggests that $\log ( \sigma ( \alpha x ) ) \cdot \beta { \mathrm { a r c s i n h } } ( x )$ is specialized to shallow architectures.
220
+
221
+ Preactivation Residual Networks The specialized activation function Softplus $\left( \operatorname { E L U } ( x ) \right)$ was discovered for a Preactivation ResNet of depth 56 (ResNet-v2-56). Figure 6 shows the performance of this function when paired with Preactivation ResNets of different depths. Unlike with the Wide ResNets, there is no clear increase or decrease in relative improvement over ReLU as depth increases. Impressively, ResNet-v2-164 with Softplus $( { \mathrm { E L U U } } ( x ) )$ ) achieved test set accuracy 78.01, outperforming the accuracy of ResNet-v2-1001 with ReLU (77.29) as reported by He et al. (2016b).
222
+
223
+ # B TRAINING DETAILS
224
+
225
+ Wide Residual Network (WRN-10-4) When measuring final performance after evolution, the standard WRN setup is used; all ReLU activations in WRN-10-4 are replaced with the evolved activation function, but no other changes to the architecture are made. The network is optimized using stochastic gradient descent with Nesterov momentum 0.9. The network is trained for 200 epochs; the initial learning rate is 0.1, and it is decreased by a factor of 0.2 after epochs 60, 120, and 160. Dropout probability is set to 0.3, and L2 regularization of 0.0005 is applied to the weights. Data augmentation includes featurewise center, featurewise standard deviation normalization, horizontal flip, and random $3 2 \times 3 2$ crops of images padded with four pixels on all sides. This setup was chosen to mirror the original WRN setup (Zagoruyko & Komodakis, 2016) as closely as possible.
226
+
227
+ During evolution of activation functions, the training is compressed to save time. The network is trained for only 100 epochs; the learning rate begins at 0.1 and is decreased by a factor of 0.2 after epochs 30, 60, and 80. Empirically, the accuracy achieved by this shorter schedule is sufficient to guide evolution; the computational cost saved by halving the time required to evaluate an activation function can then be used to search for additional activation functions.
228
+
229
+ Residual Network (ResNet-v1-56) As with WRN-10-4, when measuring final performance with ResNet-v1-56, the only change to the architecture is replacing the ReLU activations with an evolved activation function. The network is optimized with stochastic gradient descent and momentum 0.9. Dropout is not used, and L2 regularization of 0.0001 is applied to the weights. In the original ResNet experiments (He et al., 2016a), an initial learning rate of 0.01 was used for 400 iterations before increasing it to 0.1, and further decreasing it by a factor of 0.1 after 32K and 48K iterations. An iteration represents a single forward and backward pass over one training batch, while an epoch consists of training over the entire training dataset. In this paper, the learning rate schedule is implemented by beginning with a learning rate of 0.01 for one epoch, increasing it to 0.1, and then decreasing it by a factor of 0.1 after epochs 91 and 137. (For example, (48K iterations / 45K training images) \* batch size of $1 2 8 \approx 1 3 7 .$ ) The network is trained for 200 epochs in total. Data augmentation includes a random horizontal flip and random $3 2 \times 3 2$ crops of images padded with four pixels on all sides, as in the original setup (He et al., 2016a).
230
+
231
+ When evolving activation functions for ResNet-v1-56, the learning rate schedule is again compressed. The network is trained for 100 epochs; the initial warmup learning rate of 0.01 still lasts one epoch, the learning rate increases to 0.1, and then decreases by a factor of 0.1 after epochs 46 and 68. When evolving activation functions, their relative performance is more important than the absolute accuracies they achieve. The shorter training schedule is therefore a cost-efficient way of discovering high-performing activation functions.
232
+
233
+ Preactivation Residual Network (ResNet-v2-56) The full training setup, data augmentation, and compressed learning rate schedule used during evolution for ResNet-v2-56 are all identical to those for ResNet-v1-56 with one exception: with ResNet-v2-56, it is not necessary to warm up training with an initial learning rate of 0.01 (He et al., 2016b), so this step is skipped.
234
+
235
+ All-CNN-C When measuring final performance with All-CNN-C, the ReLU activation function is replaced with an evolved one, but the setup otherwise mirrors that of Springenberg et al. (2015) as closely as possible. The network is optimized with stochastic gradient descent and momentum 0.9. Dropout probability is 0.5, and L2 regularization of 0.001 is applied to the weights. The data augmentation involves featurewise centering and normalizing, random horizontal flips, and random $3 2 \times 3 2$ crops of images padded with five pixels on all sides. The initial learning rate is set to 0.01, and it is decreased by a factor of 0.1 after epochs 200, 250, and 300. The network is trained for 350 epochs in total.
236
+
237
+ During evolution of activation functions, the same training setup was used. It is not necessary to compress the learning rate schedule as was done with the residual networks because All-CNN-C trains more quickly.
238
+
239
+ CIFAR-10 As with CIFAR-100, a balanced validation set was created for CIFAR-10 by randomly selecting 500 images from each class, resulting in a training/validation/test split of 45K/5K/10K images.
240
+
241
+ # C IMPLEMENTATION AND COMPUTE REQUIREMENTS
242
+
243
+ High-performance computing in two clusters is utilized for the experiments. One cluster uses HTCondor (Thain et al., 2005) for scheduling jobs, while the other uses the Slurm workload manager. Training is executed on GeForce GTX 1080 GPUs on both clusters. When a job begins executing, a parent activation function is selected by sampling $S = 1 6$ functions from the $P = 6 4$ most recently evaluated activation functions. This is a minor difference from the original regularized evolution (Real et al., 2019), which is based on a strict sliding window of size $P$ . This approach may give extra influence to some activation functions, depending on how quickly or slowly jobs are executed in each of the clusters. In practice the method is highly effective; it allows evolution to progress quickly by taking advantage of extra compute when demand on the clusters is low.
244
+
245
+ It is difficult to know ahead of time how computationally expensive the evolutionary search will be. Some activation functions immediately result in an undefined loss, causing training to end. In that case only a few seconds have been spent and another activation function can immediately be evaluated. Other activation functions train successfully, but their complicated expressions result in longer-than-usual training times. In these experiments, evolution for WRN-10-4 took 2,314 GPU hours, evolution for ResNet-v1-56 took 1,594 GPU hours, and evolution for ResNet-v2-56 took 2,175 GPU hours. These numbers do not include costs for reranking and repeated runs in the final experiments. Although substantial, the computational cost is negligible compared to the cost in human labor in designing activation functions. Evolution of parametric activation functions requires minimal manual setup and delivers automatic improvements in accuracy.
246
+
247
+ # D BASELINE ACTIVATION FUNCTION DETAILS
248
+
249
+ Table 7: Baseline activation functions from the operator search space (Table 1) and final results (Table 2).
250
+
251
+ <table><tr><td>Name</td><td>Definition</td><td>Reference(s)</td></tr><tr><td>ReLU</td><td>max{x,0}</td><td>Nair &amp; Hinton (2010)</td></tr><tr><td>ELiSH</td><td>x if x≥0 else e-1 1+e- 1+e-</td><td>Basirat &amp; Roth (2018)</td></tr><tr><td>ELU</td><td>xif 𝑥≥0 else α(e²−1),withα=1</td><td>Clevert et al. (2015)</td></tr><tr><td>GELU</td><td>xΦ(x),withΦ(x)=P(X≤x),X~N(0,1),</td><td>Hendrycks &amp; Gimpel (2016)</td></tr><tr><td>HardSigmoid</td><td>approximated as 0.5x(1 + tanh[√2/π(x + 0.044715x³)]) max{0,min{1,0.2x +0.5}}</td><td></td></tr><tr><td>Leaky ReLU</td><td>x if x≥0 else 0.01x</td><td>Maas et al. (2013)</td></tr><tr><td>Mish SELU</td><td>x ·tanh(Softplus(x))</td><td>Misra (2019)</td></tr><tr><td></td><td>Xx if 𝑥≥0 else λα(e𝑥-1), with入= 1.05070098,α = 1.67326324</td><td>Klambauer et al. (2017)</td></tr><tr><td>sigmoid</td><td>(1+e-𝑥)-1</td><td></td></tr><tr><td>Softplus</td><td>log(e+1)</td><td></td></tr><tr><td>Softsign Swish</td><td>x/(|x|+1)</td><td></td></tr><tr><td></td><td>x·σ(x),withσ(x)=(1+e-𝑥)-1</td><td>Ramachandran et al. (2018) and Elfwing et al. (2018)</td></tr><tr><td>tanh</td><td>e-e- e+e-x</td><td></td></tr><tr><td>PReLU</td><td>xif x≥O else αx,whereα isaper-neuron learnable parameter initialized to 0.25</td><td>He et al. (2015)</td></tr><tr><td>PSwish</td><td>x·o(βx),where β is a per-channel learnable parameter</td><td>Ramachandran et al. (2018)</td></tr></table>
parse/train/ePh9bvqIgKL/ePh9bvqIgKL_content_list.json ADDED
@@ -0,0 +1,1281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DISCOVERING PARAMETRIC ACTIVATION FUNCTIONS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 99,
9
+ 818,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 400,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 193,
32
+ 544,
33
+ 208
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Recent studies have shown that the choice of activation function can significantly affect the performance of deep learning networks. However, the benefits of novel activation functions have been inconsistent and task dependent, and therefore the rectified linear unit (ReLU) is still the most commonly used. This paper proposes a technique for customizing activation functions automatically, resulting in reliable improvements in performance. Evolutionary search is used to discover the general form of the function, and gradient descent to optimize its parameters for different parts of the network and over the learning process. Experiments with four different neural network architectures on the CIFAR-10 and CIFAR-100 image classification datasets show that this approach is effective. It discovers both general activation functions and specialized functions for different architectures, consistently improving accuracy over ReLU and other recently proposed activation functions by significant margins. The approach can therefore be used as an automated optimization step in applying deep learning to new tasks. ",
40
+ "bbox": [
41
+ 233,
42
+ 219,
43
+ 766,
44
+ 414
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 438,
55
+ 336,
56
+ 454
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "The rectified linear unit $\\left( \\mathrm { R e L U } ( x ) = \\operatorname* { m a x } \\{ x , 0 \\} \\right)$ is the most commonly used activation function in modern deep learning architectures (Nair & Hinton, 2010). When introduced, it offered substantial improvements over the previously popular tanh and sigmoid activation functions. Because ReLU is unbounded as $x \\to \\infty$ , it is less susceptible to vanishing gradients than tanh and sigmoid are. It is also simple to calculate, which leads to faster training times. ",
63
+ "bbox": [
64
+ 174,
65
+ 463,
66
+ 823,
67
+ 534
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Activation function design continues to be an active area of research, and a number of novel activation functions have been introduced since ReLU, each with different properties (Nwankpa et al., 2018). In certain settings, these novel activation functions lead to substantial improvements in accuracy over ReLU, but the gains are often inconsistent across tasks. Because of this inconsistency, ReLU is still the most commonly used: it is reliable, even though it may be suboptimal. ",
74
+ "bbox": [
75
+ 174,
76
+ 541,
77
+ 825,
78
+ 611
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The improvements and inconsistencies are due to a gradually evolving understanding of what makes an activation function effective. For example, Leaky ReLU (Maas et al., 2013) allows a small amount of gradient information to flow when the input is negative. It was introduced to prevent ReLU from creating dead neurons, i.e. those that are stuck at always outputting zero. On the other hand, the ELU activation function (Clevert et al., 2015) contains a negative saturation regime to control the forward propagated variance. These two very different activation functions have seemingly contradicting properties, yet each has proven more effective than ReLU in various tasks. ",
85
+ "bbox": [
86
+ 174,
87
+ 617,
88
+ 825,
89
+ 715
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "There are also often complex interactions between an activation function and other neural network design choices, adding to the difficulty of selecting an appropriate activation function for a given task. For example, Ramachandran et al. (2018) warned that the scale parameter in batch normalization (Ioffe & Szegedy, 2015) should be set when training with the Swish activation function; Hendrycks & Gimpel (2016) suggested using an optimizer with momentum when using GELU; Klambauer et al. (2017) introduced a modification of dropout (Hinton et al., 2012) called alpha dropout to be used with SELU. These results suggest that significant gains are possible by designing the activation function properly for a network and task, but that it is difficult to do so manually. ",
96
+ "bbox": [
97
+ 174,
98
+ 722,
99
+ 825,
100
+ 833
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "This paper presents an approach to automatic activation function design. The approach is inspired by genetic programming (Koza, 1992), which describes techniques for evolving computer programs to solve a particular task. In contrast with previous studies (Bingham et al., 2020; Ramachandran et al., 2018; Liu et al., 2020; Basirat & Roth, 2018), this paper focuses on automatically discovering activation functions that are parametric. Evolution discovers the general form of the function, while gradient descent optimizes the parameters of the function during training. The approach, called PANGAEA (Parametric ActivatioN functions Generated Automatically by an Evolutionary Algorithm), discovers general activation functions that improve performance overall over previously proposed functions. It also produces specialized functions for different architectures, such as Wide ResNet, ResNet, and Preactivation ResNet, that perform even better than the general functions, demonstrating its ability to customize activation functions to architectures. ",
107
+ "bbox": [
108
+ 174,
109
+ 840,
110
+ 825,
111
+ 924
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "table",
117
+ "img_path": "images/ef4ec73dbf2c4f1f87f9b1f91a7886f6158635edacd699483d8ee6b6b50cd95e.jpg",
118
+ "table_caption": [
119
+ "Table 1: The operator search space consists of basic unary and binary functions as well as existing activation functions (Appendix D). $\\sigma ( x ) = ( 1 + e ^ { - x } ) ^ { \\bar { - } 1 } $ . The unary operators bessel_i0e and bessel_i1e are the exponentially scaled modified Bessel functions of order 0 and 1, respectively. "
120
+ ],
121
+ "table_footnote": [],
122
+ "table_body": "<table><tr><td colspan=\"8\">Unary</td><td colspan=\"2\">Binary</td></tr><tr><td>0</td><td>|x|</td><td>erf(x)</td><td>tanh(x)</td><td>arcsinh(x)</td><td>ReLU(x)</td><td>Softplus(x)</td><td>x1+x2</td><td>w12</td><td></td></tr><tr><td>1</td><td>3</td><td>erfc(x)</td><td>e-1</td><td>arctanh(x)</td><td>ELU(x)</td><td></td><td>Softsign(x)</td><td>x1-x2</td><td>max{x1,x2}</td></tr><tr><td>x</td><td>x²</td><td>sinh(x)</td><td>g(x)</td><td>bessel_i0e(x)</td><td>SELU(x)</td><td></td><td>HardSigmoid(x)</td><td>x1:X2</td><td>min{x1,x2}</td></tr><tr><td>1x</td><td>e</td><td>cosh(x)</td><td>log((x))</td><td>bessel_ile(x)</td><td>Swish(x)</td><td></td><td></td><td>x1/x2</td><td></td></tr></table>",
123
+ "bbox": [
124
+ 173,
125
+ 160,
126
+ 825,
127
+ 236
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "",
134
+ "bbox": [
135
+ 174,
136
+ 265,
137
+ 825,
138
+ 335
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "2 RELATED WORK ",
145
+ "text_level": 1,
146
+ "bbox": [
147
+ 176,
148
+ 353,
149
+ 344,
150
+ 369
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Prior work in automatic activation function discovery includes that of Ramachandran et al. (2018), who used reinforcement learning to design novel activation functions. They discovered multiple functions, but analyzed just one in depth: $\\mathrm { S w i s h } ( x ) = x \\cdot \\sigma ( x )$ . Of the top eight functions discovered, only Swish and $\\operatorname* { m i a x } \\{ \\bar { x } , \\sigma ( x ) \\}$ consistently outperformed ReLU across multiple tasks, suggesting that improvements are possible but often task specific. ",
157
+ "bbox": [
158
+ 174,
159
+ 382,
160
+ 825,
161
+ 453
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "Bingham et al. (2020) used evolution to discover novel activation functions. Whereas their functions had a fixed graph structure, PANGAEA utilizes a flexible search space that implements activation functions as arbitrary computation graphs. PANGAEA also includes more powerful mutation operations, and a function parameterization approach that makes it possible to further refine functions through gradient descent. ",
168
+ "bbox": [
169
+ 174,
170
+ 459,
171
+ 825,
172
+ 529
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Liu et al. (2020) evolved normalization-activation layers. They searched for a computation graph that replaced both batch normalization and ReLU in multiple neural networks. They argued that the inherent nonlinearity of the discovered layers precluded the need for any explicit activation function. However, experiments in this paper show that carefully designed parametric activation functions can in fact be a powerful augmentation to existing deep learning models. ",
179
+ "bbox": [
180
+ 174,
181
+ 536,
182
+ 823,
183
+ 606
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "Finally, Basirat & Roth (2018) used a genetic algorithm to discover task-specific piecewise activation functions. They showed that different functions are optimal for different tasks. However, the discovered activation functions did not outperform ELiSH and HardELiSH, two hand-designed activation functions proposed in the same paper (Basirat & Roth, 2018). The larger search space in PANGAEA affords evolution extra flexibility in designing activation functions, while the trainable parameters give customizability to the network itself, leading to consistent, significant improvement. ",
190
+ "bbox": [
191
+ 174,
192
+ 613,
193
+ 647,
194
+ 738
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "3 THE PANGAEA METHOD ",
201
+ "text_level": 1,
202
+ "bbox": [
203
+ 176,
204
+ 756,
205
+ 424,
206
+ 772
207
+ ],
208
+ "page_idx": 1
209
+ },
210
+ {
211
+ "type": "image",
212
+ "img_path": "images/9c28c9e93bbd40754eba91ff6ca427dbdce9c04fcfb26b275a7cf4bb4857f0c3.jpg",
213
+ "image_caption": [
214
+ "Figure 1: Random activation function initialization. The initial population consists of random samples of two kinds of computation graphs, randomly initialized with the operators in Table 1. In this manner, the search starts with simple graphs and gradually expands to more complex forms. "
215
+ ],
216
+ "image_footnote": [],
217
+ "bbox": [
218
+ 665,
219
+ 616,
220
+ 810,
221
+ 712
222
+ ],
223
+ "page_idx": 1
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "3.1 REPRESENTING AND MODIFYING ACTIVATION FUNCTIONS ",
228
+ "text_level": 1,
229
+ "bbox": [
230
+ 176,
231
+ 785,
232
+ 622,
233
+ 799
234
+ ],
235
+ "page_idx": 1
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "Activation functions are represented as computation graphs in which each node is a unary or a binary operator (Table 1). The activation functions are implemented in TensorFlow (Abadi et al., 2016), and safe operator implementations are chosen when possible (e.g. the binary operator $x _ { 1 } / x _ { 2 }$ is implemented as tf.math.divide_no_nan, which returns 0 if $x _ { 2 } = 0$ ). The operators in Table 1 were chosen to create a large and expressive search space that contains activation functions unlikely to be discovered by hand. Operators that are periodic (e.g. $\\sin ( x ) )$ and operators that contain repeated asymptotes were not included; in preliminary experiments they often caused training instability. All of the operators have domain $\\mathbb { R }$ making it possible to compose them arbitrarily. ",
240
+ "bbox": [
241
+ 174,
242
+ 813,
243
+ 647,
244
+ 901
245
+ ],
246
+ "page_idx": 1
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "",
251
+ "bbox": [
252
+ 171,
253
+ 896,
254
+ 826,
255
+ 924
256
+ ],
257
+ "page_idx": 1
258
+ },
259
+ {
260
+ "type": "image",
261
+ "img_path": "images/64a1658d0c67297390e355462b4975d1327f3ed6c809115d906c3dcdae53ea57.jpg",
262
+ "image_caption": [
263
+ "Figure 2: Evolutionary operations on activation functions. In an ‘Insert’ mutation, a new operator is inserted in one of the edges of the computation graph, like the Swish $( x )$ in $( b )$ . In a ‘Remove’ mutation, a node in the computation graph is deleted, like the addition in (c). In a ‘Change’ mutation, an operator at a node is replaced with another, like addition with multiplication in $( d )$ . These first three mutations are useful in refining the function locally. In contrast, in a ‘Regenerate’ mutation $( e )$ , every operator in the graph is replaced by a random operator, thus increasing exploration. "
264
+ ],
265
+ "image_footnote": [],
266
+ "bbox": [
267
+ 186,
268
+ 97,
269
+ 816,
270
+ 266
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "",
277
+ "bbox": [
278
+ 174,
279
+ 385,
280
+ 821,
281
+ 412
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "PANGAEA begins with an initial population of $P$ random activation functions. Each function is either of the form $f ( x ) = \\mathrm { u n a r y 1 } { \\left( \\mathrm { u n a r y 2 } ( x ) \\right) }$ or $f ( x ) = { \\mathrm { b i n a r y } } ( { \\mathrm { u n a r y 1 } } ( x )$ , unary2 $( x )$ ), as shown in Figure 1. Both forms are equally likely, and the unary and binary operators are also selected uniformly at random. Previous work has suggested that it is difficult to discover highperforming activation functions that have complicated computation graphs (Bingham et al., 2020). The computation graphs in Figure 1 thus represent the simplest non-trivial computation graphs with and without a binary operator. ",
288
+ "bbox": [
289
+ 174,
290
+ 419,
291
+ 826,
292
+ 517
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "During the search, all ReLU activation functions in a given neural network are replaced with a candidate activation function. No other changes to the network or training setup are made. The network is trained on the dataset, and the activation function is assigned a fitness score equal to the network’s accuracy on the validation set. ",
299
+ "bbox": [
300
+ 173,
301
+ 523,
302
+ 825,
303
+ 579
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Given a parent activation function, a child activation function is created by applying one of four possible mutations (Figure 2). Other possible evolutionary operators like crossover are not used in this paper. All mutations are equally likely with two special cases. If a remove mutation is selected for an activation function with just one node, a change mutation is applied instead. Additionally, if an activation function with greater than seven nodes is selected for mutation, the mutation is a remove mutation, in order to reduce bloat. ",
310
+ "bbox": [
311
+ 174,
312
+ 587,
313
+ 825,
314
+ 670
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "Insert In an insert mutation, one operator in the search space is selected uniformly at random. This operator is placed on a random edge of a parent activation function graph. In Figure $2 b$ , the unary operator $\\operatorname { S w i s h } ( x )$ is inserted at the edge connecting the output of $\\operatorname { t a n h } ( x )$ to the input of $x _ { 1 } + x _ { 2 }$ After mutating, the parent activation function $( \\operatorname { t a n h } ( x ) + | \\bar { \\operatorname { e r f } ( x ) } | ) ^ { 2 }$ produces the child activation function $( \\mathrm { S w i s h } ( \\operatorname { t a n h } ( x ) ) + \\vert \\mathbf { e r f } ( x ) \\vert ) ^ { 2 }$ . If a binary operator is randomly chosen for the insertion, the incoming input value is assigned to the variable $x _ { 1 }$ . If the operator is addition or subtraction, the input to $x _ { 2 }$ is set to 0. If the operator is multiplication, division, or exponentiation, the input to $x _ { 2 }$ is set to 1. Finally, if the operator is the maximum or minimum operator, the input to $x _ { 2 }$ is a copy of the input to $x _ { 1 }$ . When a binary operator is inserted into a computation graph, the activation function computed remains unchanged. However, the structure of the computation graph is modified and can be further altered by future mutations. ",
321
+ "bbox": [
322
+ 174,
323
+ 685,
324
+ 825,
325
+ 838
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "Remove In a remove mutation, one node is selected uniformly at random and deleted. The node’s input is rewired to its output. If the removed node is binary, one of the two inputs is chosen at random and is deleted. The other input is kept. In Figure $2 c$ , the addition operator is removed from the parent activation function. The two inputs to addition, $\\operatorname { t a n h } ( x )$ and $\\vert \\mathrm { e r f } ( x ) \\vert$ , cannot both be kept. By chance, $\\operatorname { t a n h } ( x )$ is discarded, resulting in the child activation function $| \\mathrm { e r f } ( x ) | ^ { 2 }$ . ",
332
+ "bbox": [
333
+ 174,
334
+ 854,
335
+ 825,
336
+ 924
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Change To perform a change mutation, one node in the computation graph is selected at random and replaced with another operator from the search space, also uniformly at random. Unary operators are always replaced with unary operators, and binary operators with binary operators. Figure $2 d$ shows how changing addition to multiplication produces the activation function $( \\operatorname { t a n h } ( x ) \\cdot | \\operatorname { e r f } ( x ) | ) ^ { 2 }$ . ",
343
+ "bbox": [
344
+ 174,
345
+ 103,
346
+ 616,
347
+ 188
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "Regenerate In a regenerate mutation, every operator in the computation graph is replaced with another operator from the search space. As with change mutations, unary operators are replaced with unary operators, and binary operators with binary operators. Although every node in the graph is changed, the overall structure of the computation graph remains the same. Regenerate mutations are useful for increasing exploration, and are similar in principle to burst mutation and delta coding (Gomez & Miikkulainen, 2003; Whitley et al., 1991). Figure $2 e$ shows the child activation function $- \\operatorname* { m a x } \\{ 0 , \\operatorname { t a n h } ( \\mathrm { S E L U } ( x ) ) \\}$ , which is quite different from the parent function in Figure $2 a$ . ",
354
+ "bbox": [
355
+ 174,
356
+ 212,
357
+ 614,
358
+ 364
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "image",
364
+ "img_path": "images/3943bc7f7c4a083dae56f967832557f6cd91a92b775ff9aa05cc7b9ea7fd799f.jpg",
365
+ "image_caption": [
366
+ "Figure 3: Parameterization of activation functions. In this example, parameters are added to $k \\_ \\mathrm { ~ ~ { ~ 3 ~ } ~ }$ random edges, yielding the parametric activation function $\\alpha \\sigma ( \\beta | x | -$ arctan $( \\gamma x ) _ { , }$ ). "
367
+ ],
368
+ "image_footnote": [],
369
+ "bbox": [
370
+ 629,
371
+ 106,
372
+ 820,
373
+ 281
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "Parameterization of Activation Functions After mutation (or random initialization), activation functions are parameterized (Figure 3). A value $k \\in \\{ 0 , 1 , 2 , 3 \\}$ is chosen uniformly at random, and $k$ edges of the activation function graph are randomly selected. Multiplicative per-channel parameters are inserted at these edges and initialized to one. Whereas evolution is well suited for discovering the general form of the activation function in a discrete, structured search space, parameterization makes it possible to fine-tune the function using gradient descent. The function parameters are updated at every epoch during backpropagation, resulting in different activation functions in different stages of training. As the parameters are per-channel, the process creates different activation functions at different locations in the neural network. Thus, parameterization gives neural networks additional flexibility to customize activation functions. ",
380
+ "bbox": [
381
+ 174,
382
+ 390,
383
+ 825,
384
+ 529
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "3.2 DISCOVERING ACTIVATION FUNCTIONS WITH EVOLUTION ",
391
+ "text_level": 1,
392
+ "bbox": [
393
+ 174,
394
+ 555,
395
+ 619,
396
+ 569
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "Activation functions are discovered by regularized evolution (Real et al., 2019). Initially, $P$ random activation functions are created, parameterized, and assigned fitness scores. To generate a new activation function, $S$ functions are sampled with replacement from the current population. The function with the highest validation accuracy serves as the parent, and is mutated to create a child activation function. This function is parameterized and assigned a fitness score. The new activation function is then added to the population, and the oldest function in the population is removed, ensuring the population is always of size $P$ . This process continues until $C$ functions have been evaluated in total, and the top functions over the history of the search are returned as a result. ",
403
+ "bbox": [
404
+ 174,
405
+ 584,
406
+ 825,
407
+ 696
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "Any activation function that achieves a fitness score less than a threshold $V$ is discarded. These functions are not added to the population, but they do count towards the total number of $C$ activation functions evaluated for each architecture. This quality control mechanism allows evolution to focus only on the most promising candidates. ",
414
+ "bbox": [
415
+ 174,
416
+ 703,
417
+ 823,
418
+ 758
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "To save computational resources during evolution, each activation function is evaluated by training a neural network for 100 epochs using a compressed learning rate schedule (Appendix B). After evolution is complete, the top 10 activation functions from the entire search are reranked. Each function receives an adjusted fitness score equal to the average validation accuracy from two independent 200-epoch training runs using the original learning rate schedule. The top three activation functions after reranking proceed to the final testing experiments. ",
425
+ "bbox": [
426
+ 174,
427
+ 766,
428
+ 825,
429
+ 849
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "During evolution, it is possible that some activation functions achieve unusually high validation accuracy by chance. The 100-epoch compressed learning rate schedule may also have a minor effect on which activation functions are optimal compared to a full 200-epoch schedule. Reranking thus serves two purposes. Full training reduces bias from the compressed schedule, and averaging two such runs lessens the impact of activation functions that achieved high accuracy by chance. ",
436
+ "bbox": [
437
+ 176,
438
+ 857,
439
+ 823,
440
+ 926
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "4 DATASETS AND ARCHITECTURES ",
447
+ "text_level": 1,
448
+ "bbox": [
449
+ 176,
450
+ 102,
451
+ 482,
452
+ 118
453
+ ],
454
+ "page_idx": 4
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "The experiments in this paper focus primarily on the CIFAR-100 image classification dataset (Krizhevsky et al., 2009). This dataset is a more difficult version of the popular CIFAR-10 dataset, with 100 object categories instead of 10. Fifty images from each class were randomly selected from the training set to create a balanced validation set, resulting in a training/validation/test split of 45K/5K/10K images. ",
459
+ "bbox": [
460
+ 173,
461
+ 127,
462
+ 825,
463
+ 198
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "To demonstrate that PANGAEA can discover effective activation functions in various settings, it is evaluated with three different neural networks. The models were implemented in TensorFlow (Abadi et al., 2016), mirroring the original authors’ training setup as closely as possible (Appendix B). ",
470
+ "bbox": [
471
+ 176,
472
+ 205,
473
+ 823,
474
+ 247
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Wide Residual Network (WRN-10-4; Zagoruyko & Komodakis, 2016) has a depth of 10 and widening factor of four. Wide residual networks provide an interesting comparison because they are shallower and wider than many other popular architectures, while still achieving good results. WRN-10-4 was chosen because its CIFAR-100 accuracy is competitive, yet it trains relatively quickly. ",
481
+ "bbox": [
482
+ 174,
483
+ 253,
484
+ 825,
485
+ 310
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Residual Network (ResNet-v1-56; He et al., 2016a), with a depth of 56, provides an important contrast to WRN-10-4. It is significantly deeper and has a slightly different training setup, which may have an effect on the performance of different activation functions. ",
492
+ "bbox": [
493
+ 174,
494
+ 316,
495
+ 823,
496
+ 359
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Preactivation Residual Network (ResNet-v2-56; He et al., 2016b) has identical depth to ResNetv1-56, but is a fundamentally different architecture. Activation functions are not part of the skip connections, as is the case in ResNet-v1-56. Since information does not have to pass through an activation function, this structure makes it easier to train very deep architectures. PANGAEA should exploit this structure and discover different activation functions for ResNet-v2-56 and ResNet-v1-56. ",
503
+ "bbox": [
504
+ 174,
505
+ 366,
506
+ 825,
507
+ 435
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "5 RESULTS ",
514
+ "text_level": 1,
515
+ "bbox": [
516
+ 174,
517
+ 450,
518
+ 281,
519
+ 467
520
+ ],
521
+ "page_idx": 4
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "Overview Separate evolution experiments were run to discover novel activation functions for each of the three architectures. Evolutionary parameters $P = 6 4$ , $S \\ : = \\ : 1 6$ , $C = 1 { , } 0 0 0$ , and $V = 2 0 \\%$ were used since they were found to work well in preliminary experiments. ",
526
+ "bbox": [
527
+ 174,
528
+ 477,
529
+ 421,
530
+ 588
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "Figure 4 visualizes progress in these experiments. For all three architectures, PANGAEA quickly discovered activation functions that outperform ReLU. It continued to make further progress, gradually discovering better activation functions, and did not plateau during the time allotted for the experiment. Each run took approximately 2,000 GPU hours on GeForce GTX 1080 GPUs (Appendix C). ",
537
+ "bbox": [
538
+ 173,
539
+ 594,
540
+ 421,
541
+ 747
542
+ ],
543
+ "page_idx": 4
544
+ },
545
+ {
546
+ "type": "image",
547
+ "img_path": "images/66f7f6c97b75adb95b7089e7a2d2d3b9afe403d517497ad30851f4c4b2859ec8.jpg",
548
+ "image_caption": [
549
+ "Figure 4: Progress of PANGAEA on three different neural networks. Evolution quickly discovered activation functions that outperform ReLU (shown at $x = 0$ ), and continued to improve throughout the experiment. The plots show the highest validation accuracy of all activation functions evaluated so far after 100 epochs of training. Notable discovered activation functions are identified with a star and annotated. The improvements over ReLU are meaningful, but the values themselves are not directly comparable to the results in Table 2, which lists test set accuracy after 200 epochs. "
550
+ ],
551
+ "image_footnote": [],
552
+ "bbox": [
553
+ 437,
554
+ 482,
555
+ 818,
556
+ 667
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "Table 2 shows the final test accuracy for the top specialized activation functions discovered by PANGAEA in each run. For comparison, the accuracy of the top general functions dis",
563
+ "bbox": [
564
+ 174,
565
+ 755,
566
+ 419,
567
+ 824
568
+ ],
569
+ "page_idx": 4
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "covered in this process are also shown, as well as the accuracy of 28 baseline activation functions. In sum, PANGAEA discovered the best activation function for ResNet-v2-56, the top two activation functions for ResNet-v1-56, and the top three activation functions for WRN-10-4. ",
574
+ "bbox": [
575
+ 176,
576
+ 824,
577
+ 825,
578
+ 866
579
+ ],
580
+ "page_idx": 4
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "Specialized Activation Functions For all three architectures, there is at least one baseline activation function that outperforms ReLU by a statistically significant margin. This result already demonstrates the importance of activation function design, and suggests that the common practice of using ReLU by default is suboptimal. The best baseline activation function is different for different architectures, reinforcing the importance of developing specialized activation functions. ",
585
+ "bbox": [
586
+ 176,
587
+ 882,
588
+ 825,
589
+ 924
590
+ ],
591
+ "page_idx": 4
592
+ },
593
+ {
594
+ "type": "table",
595
+ "img_path": "images/edfa6c2fb736b58acd33b2912c8e03317209514ad4eec5fd3b7e5028c3abca01.jpg",
596
+ "table_caption": [
597
+ "Table 2: CIFAR-100 test set accuracy shown as a median of ten runs, with mean $\\pm$ sample standard deviation in parenthesis. The top accuracy for each architecture is in bold. Asterisks indicate a statistically significant improvement in mean accuracy over ReLU, with $^ *$ if $p \\leq 0 . 0 5$ , $^ { * * }$ if $p \\leq 0 . 0 1$ , and $^ { \\ast \\ast \\ast }$ if $p ~ \\leq ~ 0 . 0 0 1$ ; $p$ -values are from one-tailed Welch’s $t$ -tests. The $^ { + + }$ or ${ \\mathrel { + { + } } } { \\mathrel { - { } } }$ indicate a statistically significant improvement in mean accuracy over all 28 baseline activation functions (Appendix D), with $p \\leq 0 . 0 1$ or $p \\leq 0 . 0 0 1$ in every case, respectively. "
598
+ ],
599
+ "table_footnote": [],
600
+ "table_body": "<table><tr><td></td><td>WRN-10-4</td><td>ResNet-v1-56</td><td>ResNet-v2-56</td></tr><tr><td>Specialized for WRN-10-4</td><td></td><td></td><td></td></tr><tr><td>log(σ(αx))·arcsinh(x)</td><td>73.23 (73.16 ± 0.41) *** +++</td><td>11.15 (19.34 ± 20.14)</td><td>72.05 (64.30 ± 21.32)</td></tr><tr><td>log(g(ax))·βarcsinh(x)</td><td>73.22 (73.20 ± 0.37 *** +++</td><td>05.78 (18.63 ± 21.04)</td><td>55.40 (45.88 ± 30.70)</td></tr><tr><td>-Swish(Swish(αx))</td><td>72.38 (72.49 ± 0.55) ***</td><td>59.61 (58.86 ± 2.88)</td><td>74.70 (74.71±0.20) *</td></tr><tr><td>Specialized for ResNet-v1-56</td><td></td><td></td><td></td></tr><tr><td>αx-βlog(σ(γx))</td><td>70.35 (70.28± 0.37)</td><td>70.82 (71.01 ± 0.64) *** ++</td><td>74.41 (74.35± 0.45)</td></tr><tr><td>αx-log(σ(βx))</td><td>70.62 (70.47±0.53)</td><td>70.30 (70.30 ± 0.58) *</td><td>74.73 (74.70±0.23) *</td></tr><tr><td>max{Swish(x),0}</td><td>71.96 (72.10 ± 0.33) **</td><td>69.46 (69.43 ± 0.69)</td><td>74.97 (74.97±0.25) **</td></tr><tr><td>Specialized for ResNet-v2-56</td><td></td><td></td><td></td></tr><tr><td>Softplus(ELU(x))</td><td>71.51 (71.36 ± 0.34)</td><td>69.94 (69.96 ± 0.39)</td><td>75.60 (75.61 ± 0.42) ***</td></tr><tr><td>min{log(σ(x)),αlog(σ(βx))}</td><td>72.05 (72.04± 0.34) **</td><td>69.63 (69.56 ± 0.48)</td><td>75.20 (75.19 ± 0.39) ***</td></tr><tr><td>SELU(Swish(𝑥))</td><td>01.00 (01.00 ± 0.00)</td><td>01.00 (01.00 ±0.00)</td><td>75.06 (75.02 ± 0.35) **</td></tr><tr><td>General Activation Functions</td><td></td><td></td><td></td></tr><tr><td>max{Swish(x),αlog(g(ReLU(x)))}</td><td>72.50 (72.54± 0.26)***</td><td>69.97 (69.91 ± 0.37)</td><td>75.21 (75.20 ± 0.41) ***</td></tr><tr><td>min{Swish(x),aELU(ReLU(βx)}</td><td>72.44 (72.39 ±0.29) ***</td><td>69.90 (69.82±0.40)</td><td>75.20 (75.27± 0.38)***</td></tr><tr><td>log(σ(x))</td><td>72.38 (72.33±0.32) ***</td><td>69.49 (69.58± 0.35)</td><td>75.45 (75.53± 0.37 ***</td></tr><tr><td>Baseline Activation Functions</td><td></td><td></td><td></td></tr><tr><td>ReLU</td><td>71.44 (71.46 ± 0.50)</td><td>69.78 (69.64± 0.65)</td><td>74.43 (74.39 ± 0.44)</td></tr><tr><td>ELiSH</td><td>01.00 (01.00 ±0.00)</td><td>01.00 (01.00 ±0.00)</td><td>75.16 (75.20 ± 0.31)***</td></tr><tr><td>ELU</td><td>72.41 (72.30± 0.32) ***</td><td>69.59 (69.67 ± 0.46)</td><td>74.86 (74.95±0.30)**</td></tr><tr><td>GELU</td><td>72.00 (71.95±0.35) *</td><td>70.16(70.19 ±0.40) *</td><td>74.84 (74.86 ± 0.33) **</td></tr><tr><td>HardSigmoid</td><td>55.55 (54.99 ± 1.00)</td><td>33.31 (32.55 ± 4.06)</td><td>65.03 (64.90 ± 0.69)</td></tr><tr><td>LeakyReLU</td><td>71.76 (71.73± 0.33)</td><td>69.77 (69.78 ± 0.33)</td><td>74.75 (74.73±0.35) *</td></tr><tr><td>Mish</td><td>72.02 (71.95± 0.41) *</td><td>70.03 (69.88 ± 0.54)</td><td>75.33(75.32± 0.29)***</td></tr><tr><td>SELU</td><td>70.55 (70.53± 0.42)</td><td>68.51 (68.52 ± 0.29)</td><td>73.86 (73.79 ± 0.36)</td></tr><tr><td>sigmoid</td><td>56.45 (56.10 ± 0.98)</td><td>37.07 (36.47 ± 3.32)</td><td>66.72 (66.45 ± 0.92)</td></tr><tr><td>Softplus</td><td>72.25 (72.27± 0.26 ***</td><td>69.71 (69.71 ± 0.36)</td><td>75.47 (75.46± 0.52) ***</td></tr><tr><td>Softsign</td><td>56.72 (56.30± 2.16)</td><td>58.33 (58.38 ± 0.96)</td><td>69.31 (69.33 ± 0.39)</td></tr><tr><td>Swish</td><td>72.27 (72.26±0.28) ***</td><td>69.60 (69.68 ±0.38)</td><td>75.17 (75.08± 0.36) ***</td></tr><tr><td>tanh</td><td>56.29 (56.52 ± 1.53)</td><td>63.89 (63.88 ± 0.38)</td><td>70.53 (70.44 ± 0.40)</td></tr><tr><td>Parametric Baseline Functions</td><td></td><td></td><td></td></tr><tr><td>aReLU(βx)</td><td>72.01 (71.96 ±0.31) **</td><td>68.91 (68.93± 0.22)</td><td>73.60 (73.52 ± 0.37)</td></tr><tr><td>QELiSH(βx)</td><td>01.00 (01.00 ±0.00)</td><td>01.00 (01.00 ± 0.00)</td><td>73.95 (73.94± 0.33)</td></tr><tr><td>αELU(βx)</td><td>71.96 (71.98± 0.24) **</td><td>68.91 (69.06 ± 0.37)</td><td>74.03 (73.97 ± 0.45)</td></tr><tr><td>αGELU(βx)</td><td>71.86 (71.96 ± 0.34) **</td><td>69.35 (69.39 ±0.35)</td><td>73.77 (73.83 ± 0.24)</td></tr><tr><td>αHardSigmoid(βx)</td><td>66.74 (66.70 ± 0.64)</td><td>33.47 (34.33 ± 6.53)</td><td>65.09 (65.10±0.40)</td></tr><tr><td>aLeaky ReLU(βx)</td><td>71.70 (71.74 ± 0.39)</td><td>69.18 (69.11 ±0.47)</td><td>73.53 (73.44 ± 0.29)</td></tr><tr><td>αMish(βx)</td><td>72.02 (72.11 ± 0.31) **</td><td>69.66 (69.51 ± 0.67)</td><td>73.72 (73.72 ± 0.32)</td></tr><tr><td>αSELU(βx)</td><td>71.04 (71.07 ± 0.33)</td><td>68.06 (68.05 ± 0.39)</td><td>73.44 (73.37± 0.38)</td></tr><tr><td>αsigmoid(βx)</td><td>67.16 (66.98 ± 0.66)</td><td>43.72 (44.40 ± 2.62)</td><td>66.80 (66.98 ± 0.85)</td></tr><tr><td>aSoftplus(βx)</td><td>71.82 (71.73 ± 0.31)</td><td>68.84 (68.84± 0.30)</td><td>73.92 (73.95 ± 0.37)</td></tr><tr><td>aSoftsign(βx)</td><td>62.19 (62.12 ± 0.83)</td><td>01.00 (9.18 ± 13.75)</td><td>68.91 (68.87 ±0.38)</td></tr><tr><td>αSwish(βx)</td><td>72.36 (72.26±0.29)***</td><td>69.25 (69.25 ± 0.28)</td><td>73.97 (73.93± 0.22)</td></tr><tr><td>αtanh(βx)</td><td>63.72 (63.55 ± 0.56)</td><td>01.00 (02.92 ± 6.07)</td><td>69.61 (69.55 ± 0.62)</td></tr><tr><td>PReLU</td><td>72.25 (72.23 ± 0.37) ***</td><td>69.67 (69.77 ±0.40)</td><td>74.99 (75.10±0.53)**</td></tr><tr><td>PSwish=x·σ(βx)</td><td>72.46 (72.40± 0.31) ***</td><td>70.19 (70.16 ±0.46) *</td><td>75.37 (75.39±0.28) ***</td></tr></table>",
601
+ "bbox": [
602
+ 176,
603
+ 200,
604
+ 825,
605
+ 770
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "",
612
+ "bbox": [
613
+ 173,
614
+ 803,
615
+ 821,
616
+ 830
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Because PANGAEA uses validation accuracy from a single neural network to assign fitness scores to activation functions, there is selective pressure to discover functions that exploit the structure of the network. The functions thus become specialized to the architecture. They increase the performance of that architecture; however, they may not be as effective with other architectures. Specialized activation function accuracies are highlighted in gray in Table 2. To verify that the functions are customized to a specific architecture, the functions were cross-evaluated with other architectures. ",
623
+ "bbox": [
624
+ 174,
625
+ 837,
626
+ 825,
627
+ 920
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "PANGAEA discovered two specialized activation functions for WRN10-4 and one for ResNet-v1-56 that achieved statistically significant improvements in mean accuracy over all baseline activation functions. All three specialized activation functions evolved for ResNet-v2-56 significantly outperformed ReLU as well. These results strongly demonstrate the power of customizing activation functions to architectures. ",
634
+ "bbox": [
635
+ 174,
636
+ 104,
637
+ 419,
638
+ 268
639
+ ],
640
+ "page_idx": 6
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "General Activation Functions Although the best performance tends to come from specialization, it is also useful to discover activation functions that achieve high accuracy across multiple architectures. For instance, they could be used initially on a new architecture before spending compute on specialization. A powerful albeit computationally demanding approach would be to evolve general functions directly, by evaluating candidates on multiple architectures during evolution. However, it turns out that each ",
645
+ "bbox": [
646
+ 174,
647
+ 281,
648
+ 419,
649
+ 474
650
+ ],
651
+ "page_idx": 6
652
+ },
653
+ {
654
+ "type": "image",
655
+ "img_path": "images/b072386c64cefe845fefdfcf21d9e61a2e4098fdbff1c00200a8d54ea74e8969.jpg",
656
+ "image_caption": [
657
+ "Figure 5: Adaptation of parametric activation functions over time and space. Top: The parameters change during training, resulting in different activation functions in the early and late stages. The plots were created by averaging the values of $\\alpha$ , $\\beta$ , and $\\gamma$ across the entire network at different training epochs. Bottom: The parameters are updated separately in each channel, inducing different activation functions at different locations of a neural network. The plots were created by averaging $\\alpha$ , $\\beta$ , and $\\gamma$ at each layer of the network after the completion of training. "
658
+ ],
659
+ "image_footnote": [],
660
+ "bbox": [
661
+ 436,
662
+ 107,
663
+ 823,
664
+ 313
665
+ ],
666
+ "page_idx": 6
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "specialized evolution run already generates a variety of functions, many of which are general. ",
671
+ "bbox": [
672
+ 171,
673
+ 474,
674
+ 782,
675
+ 489
676
+ ],
677
+ "page_idx": 6
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "To evaluate whether the PANGAEA runs discovered general functions as well, the top 10 functions from each run were combined into a pool of 30 candidate functions. Each candidate was assigned three fitness scores equal to the average validation accuracy from two independent training runs on each of the three architectures. Candidate functions that were Pareto-dominated, were functionally equivalent to one of the baseline activation functions, or had already been selected as a specialized activation function were discarded, leaving three Pareto-optimal general activation functions. ",
682
+ "bbox": [
683
+ 174,
684
+ 496,
685
+ 825,
686
+ 579
687
+ ],
688
+ "page_idx": 6
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "These functions indeed turned out to be effective as general activation functions: they all performed well on all architectures. One outperformed all baseline activation functions on WRN-10-4, while two functions on ResNet-v1-56 and three functions on ResNet-v2-56 outperformed 25 of the 28 baseline functions. However, specialized activation functions, i.e. those specifically evolved for each architecture, still tend to give the biggest improvements. ",
693
+ "bbox": [
694
+ 174,
695
+ 587,
696
+ 823,
697
+ 656
698
+ ],
699
+ "page_idx": 6
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Shapes of Discovered Functions Many of the top discovered activation functions are compositions of multiple unary operators. These functions do not exist in the core unit search space of Ramachandran et al. (2018), which requires binary operators. They also do not exist in the $S _ { 1 }$ or $S _ { 2 }$ search spaces proposed by Bingham et al. (2020), which are too shallow. The design of the search space is therefore as important as the search algorithm itself. Previous search spaces that rely on repeated fixed building blocks only have limited representational power. In contrast, PANGAEA utilizes a flexible search space that can represent activation functions in an arbitrary computation graph. ",
704
+ "bbox": [
705
+ 174,
706
+ 666,
707
+ 549,
708
+ 847
709
+ ],
710
+ "page_idx": 6
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "Figure 5 shows examples of parametric activation functions discovered by PANGAEA. As training progresses, gradient descent makes small adjustments to the function parameters $\\alpha$ , $\\beta$ , and $\\gamma$ , resulting in activation functions that change over time. This result suggests that it is advantageous to have one activation function in the early stages of training when the network learns rapidly, and a different activation function in the later stages of training when the network is focused on fine-tuning. The parameters $\\alpha$ , $\\beta$ , and $\\gamma$ are also learned separately for the different channels, resulting in activation functions that vary with location in a neural network. Functions in deep layers (near the output) are more nonlinear than those in shallow layers (closer to the input), possibly contrasting the need to form regularized embeddings with the need to form categorizations. In this manner, PANGAEA customizes the activation functions to both time and space for each architecture. ",
715
+ "bbox": [
716
+ 173,
717
+ 854,
718
+ 550,
719
+ 924
720
+ ],
721
+ "page_idx": 6
722
+ },
723
+ {
724
+ "type": "table",
725
+ "img_path": "images/9c617e2321f97bf5b80f60ac33dffe1ab984122ac9c61b38ca9475eff2d750f3.jpg",
726
+ "table_caption": [
727
+ "Table 3: CIFAR-100 test set accuracy shown as a median of ten runs, with mean $\\pm$ sample standard deviation in parenthesis. The parametric evolved functions tend to outperform their nonparametric counterparts, demonstrating the value of parameterization. "
728
+ ],
729
+ "table_footnote": [],
730
+ "table_body": "<table><tr><td>WRN-10-4 log(σ(ax)) ·arcsinh(x) log(σ(ax))-βarcsinh(x)</td><td>73.23 (73.16 ± 0.41) 73.22 (73.20 ± 0.37)</td></tr><tr><td>ResNet-v1-56 αx-βlog(σ(γx)) αx-log(σ(βx)) x-logσ(x)</td><td>70.82 (71.01 ± 0.64) 70.30 (70.30 ± 0.58) 69.44 (69.29 ± 0.45)</td></tr><tr><td>ResNet-v2-56 min{log(σ(𝑥),log(σ(βx))} log((x))</td><td>75.20 (75.19 ± 0.39) 75.45 (75.53 ± 0.37)</td></tr></table>",
731
+ "bbox": [
732
+ 563,
733
+ 768,
734
+ 825,
735
+ 911
736
+ ],
737
+ "page_idx": 6
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "",
742
+ "bbox": [
743
+ 173,
744
+ 103,
745
+ 825,
746
+ 200
747
+ ],
748
+ "page_idx": 7
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "6 ABLATIONS AND VARIATIONS ",
753
+ "text_level": 1,
754
+ "bbox": [
755
+ 178,
756
+ 215,
757
+ 454,
758
+ 231
759
+ ],
760
+ "page_idx": 7
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "Effect of Parameterization To understand the effect that parameterizing activation functions has on performance, the specialized functions (Table 2) were trained without them. As Table 3 shows, when parameters are removed, performance drops. The function $\\log ( \\sigma ( x ) )$ is the only exception to this rule, but its high performance is not surprising, since it was previously discovered as a general activation function (Table 2). These results confirm that the learnable parameters contributed to the success of PANGAEA. ",
765
+ "bbox": [
766
+ 174,
767
+ 241,
768
+ 549,
769
+ 378
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "Search Strategy As additional baseline comparisons, two alternative search strategies were used to discover activation functions for WRN-10-4. First, a random search baseline was established by applying random mutations without regard to fitness values. This approach corresponds to setting evolutionary parameters $P = 1$ , $S = 1$ and $V = 0 \\%$ . Second, to understand the effects of function parameterization, a nonparametric evolution baseline was run. This setting is identical to PANGAEA, except functions are not parameterized (Figure 3). Otherwise, both baselines follow the same setup as PANGAEA, including evaluating $C = 1 { , } 0 0 0$ candidate functions and reranking the most promising ones (Section 3.2). ",
776
+ "bbox": [
777
+ 174,
778
+ 395,
779
+ 549,
780
+ 575
781
+ ],
782
+ "page_idx": 7
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "Table 4 shows the results of this experiment. Random search is able to discover good functions that outperform ReLU, but the functions are not as powerful as those discovered by PANGAEA. This result demonstrates the importance of fitness selection in evolutionary search. The functions discovered by nonparametric evolution similarly outperform ReLU but underperform PANGAEA. Interestingly, without parameterization, evolution is not as creative: two of the three functions discovered are merely Swish multiplied by a constant. Random search and nonparametric evolution both discovered good functions that improved accuracy, but PANGAEA achieves the best performance by combining the advantages of fitness selection and function parameterization. ",
787
+ "bbox": [
788
+ 174,
789
+ 582,
790
+ 549,
791
+ 775
792
+ ],
793
+ "page_idx": 7
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "Table 4: WRN-10-4 accuracy with different activation functions on CIFAR100, shown as a median of ten runs, with mean $\\pm$ sample standard deviation in parenthesis. PANGAEA discovers better activation functions than random search and nonparametric evolution. ",
798
+ "bbox": [
799
+ 562,
800
+ 241,
801
+ 825,
802
+ 337
803
+ ],
804
+ "page_idx": 7
805
+ },
806
+ {
807
+ "type": "table",
808
+ "img_path": "images/825eca3e6f0dc16e9a48863d915f339573b4a408b611e883ff01e86fb5e93f3d.jpg",
809
+ "table_caption": [],
810
+ "table_footnote": [],
811
+ "table_body": "<table><tr><td>PANGAEA</td><td></td></tr><tr><td>log(σ(αx)):arcsinh(x)</td><td>73.23 (73.16 ± 0.41)</td></tr><tr><td>log(g(ax)):βarcsinh(x)</td><td>73.22 (73.20 ± 0.37)</td></tr><tr><td>-Swish(Swish(αx))</td><td>72.38 (72.49 ± 0.55)</td></tr><tr><td>Random Search</td><td></td></tr><tr><td>αSwish(x)</td><td>72.80 (72.85 ± 0.25)</td></tr><tr><td>Softplus(x)·arctan(αx)</td><td>72.78 (72.81 ± 0.35)</td></tr><tr><td>ReLU(αarcsinh(βσ(𝑥))) ·SELU(x)</td><td>72.63 (72.69 ± 0.21)</td></tr><tr><td>Nonparametric Evolution</td><td></td></tr><tr><td>cosh(1)·Swish(𝑥)</td><td>72.81 (72.78 ± 0.24)</td></tr><tr><td>(e1-1)·Swish(𝑥)</td><td>72.57 (72.52 ± 0.34)</td></tr><tr><td>ReLU(Swish(𝑥))</td><td>72.06 (72.04 ± 0.54)</td></tr><tr><td>ReLU</td><td>71.44 (71.46 ± 0.50)</td></tr><tr><td>Swish</td><td>72.27 (72.26 ± 0.28)</td></tr></table>",
812
+ "bbox": [
813
+ 562,
814
+ 343,
815
+ 823,
816
+ 483
817
+ ],
818
+ "page_idx": 7
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Table 5: Specialized activation functions discovered for WRN-10-4, ResNet-v1- 56, and ResNet-v2-56 are evaluated on larger versions of those architectures: WRN-16-8, ResNet-v1-110, and ResNet-v2-110, respectively. CIFAR100 test accuracy is reported as the median of three runs, with mean $\\pm$ sample standard deviation in parenthesis. Specialized activation functions successfully transfer to WRN-16-8 and ResNet-v2-110, outperforming ReLU. ",
823
+ "bbox": [
824
+ 562,
825
+ 497,
826
+ 825,
827
+ 662
828
+ ],
829
+ "page_idx": 7
830
+ },
831
+ {
832
+ "type": "table",
833
+ "img_path": "images/01e77430f69bf8f5250a4a7cb92878aab677d50c7783e3b31735cc76093c9e2f.jpg",
834
+ "table_caption": [],
835
+ "table_footnote": [],
836
+ "table_body": "<table><tr><td>WRN-16-8</td><td></td></tr><tr><td>log(σ(αx)):arcsinh(𝑥) log(σ(αx))·βarcsinh(x)</td><td>78.42 (78.34 ± 0.20) 78.38 (78.36 ± 0.17)</td></tr><tr><td>-Swish(Swish(αx))</td><td>77.90 (78.00 ± 0.35)</td></tr><tr><td>ReLU</td><td>78.14 (78.15 ± 0.03)</td></tr><tr><td>ResNet-v1-110</td><td></td></tr><tr><td>αx-βlog(σ(γ𝑥))</td><td>70.88 (70.85 ± 0.50)</td></tr><tr><td>ax-log(σ(βx))</td><td>70.40 (70.34 ± 0.60)</td></tr><tr><td>max{Swish(x),0}</td><td>70.30 (70.36 ± 0.56)</td></tr><tr><td>ReLU</td><td>71.15 (71.23 ± 0.25)</td></tr><tr><td>ResNet-v2-110</td><td></td></tr><tr><td>Softplus(ELU(𝑥))</td><td>77.34 (77.14 ± 0.38)</td></tr><tr><td>min{log(σ(x)),log(σ(βx))}</td><td>76.99 (76.93 ± 0.19)</td></tr><tr><td>SELU(Swish(x))</td><td>77.04 (76.96 ± 0.14)</td></tr><tr><td>ReLU</td><td>76.35 (76.34 ± 0.11)</td></tr></table>",
837
+ "bbox": [
838
+ 562,
839
+ 669,
840
+ 825,
841
+ 830
842
+ ],
843
+ "page_idx": 7
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "Scaling Up PANGAEA discovered specialized activation functions for WRN-10-4, ResNet-v1-56, and ResNetv2-56. Table 5 shows the performance of these activation ",
848
+ "bbox": [
849
+ 174,
850
+ 791,
851
+ 549,
852
+ 833
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "functions when paired with the larger WRN-16-8, ResNet-v1-110, and ResNet-v2-110 architectures. \nDue to time constraints, ReLU is the only baseline activation function in these experiments. ",
859
+ "bbox": [
860
+ 176,
861
+ 833,
862
+ 823,
863
+ 861
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Two of the three functions discovered for WRN-10-4 outperform ReLU with WRN-16-8, and all three functions discovered for ResNet-v2-56 outperform ReLU with ResNet-v2-110. Interestingly, ReLU achieves the highest accuracy for ResNet-v1-110, where activation functions are part of the skip connections, but not for ResNet-v2-110, where they are not. Thus, it is easier to achieve high performance with specialized activation functions on very deep architectures when they are not confounded by skip connections. Notably, ResNet-v2-110 with Softplus $\\left( \\mathrm { E L U } ( x ) \\right)$ performs comparably to much larger ResNet-v2-1001 with ReLU (77.34 vs. 77.29, as reported by He et al. (2016b)). ",
870
+ "bbox": [
871
+ 174,
872
+ 867,
873
+ 825,
874
+ 922
875
+ ],
876
+ "page_idx": 7
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "",
881
+ "bbox": [
882
+ 174,
883
+ 103,
884
+ 825,
885
+ 160
886
+ ],
887
+ "page_idx": 8
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "Evolving novel activation functions can be computationally expensive. The results in Table 5 suggest that it is possible to reduce this cost by evolving activation functions for smaller architectures, and then using the discovered functions with larger architectures. ",
892
+ "bbox": [
893
+ 176,
894
+ 166,
895
+ 823,
896
+ 208
897
+ ],
898
+ "page_idx": 8
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "All-CNN-C Finally, to verify that PANGAEA is effective with different datasets and types of architectures, activation functions were evolved for the All-CNN-C (Springenberg et al., 2015) architecture on the CIFAR-10 dataset. All-CNN-C is quite distinct from the architectures considered above: it contains only convolutional layers, activation functions, and a global average pooling layer, but it does not have residual connections. As shown in Table 6, PANGAEA improves significantly over ReLU in this setting as well. The accuracy improvement from $8 8 . 4 7 \\%$ to $9 2 . 8 0 \\%$ corresponds to an impressive $3 7 . 5 5 \\%$ reduction in the error rate. This experiment provides further evidence ",
903
+ "bbox": [
904
+ 174,
905
+ 237,
906
+ 550,
907
+ 406
908
+ ],
909
+ "page_idx": 8
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Table 6: All-CNN-C accuracy with different activation functions on CIFAR-10, shown as a median of ten runs, with mean $\\pm$ sample standard deviation in parenthesis. PANGAEA improves performance significantly also with this different architecture and task. ",
914
+ "bbox": [
915
+ 562,
916
+ 237,
917
+ 823,
918
+ 334
919
+ ],
920
+ "page_idx": 8
921
+ },
922
+ {
923
+ "type": "table",
924
+ "img_path": "images/9a429933a52a98e83d5d9b9c0cb373139bb84d022943e16b67fc80ffe0406bca.jpg",
925
+ "table_caption": [],
926
+ "table_footnote": [],
927
+ "table_body": "<table><tr><td>αReLU(β|ReLU(γx)l)</td><td>92.80 (92.77±0.13)</td></tr><tr><td>αSwish(x)·cosh(β)</td><td>92.67 (92.66±0.08) 92.63 (76.15± 34.86)</td></tr><tr><td>αSwish(βx)</td><td></td></tr><tr><td>ReLU</td><td>88.47 (88.47 ±0.14)</td></tr></table>",
928
+ "bbox": [
929
+ 563,
930
+ 339,
931
+ 823,
932
+ 392
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "hat PANGAEA can improve performance for different architectures and tasks. ",
939
+ "bbox": [
940
+ 183,
941
+ 404,
942
+ 687,
943
+ 417
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "7 FUTURE WORK ",
950
+ "text_level": 1,
951
+ "bbox": [
952
+ 176,
953
+ 445,
954
+ 333,
955
+ 460
956
+ ],
957
+ "page_idx": 8
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "It is difficult to select an appropriate activation function for a given architecture because the activation function, network topology, and training setup interact in complex ways. It is especially promising that PANGAEA discovered activation functions that significantly outperformed the baselines, since the architectures and training setups were standard and developed with ReLU. A compelling research direction is to jointly optimize the architecture, training setup, and activation function. ",
962
+ "bbox": [
963
+ 174,
964
+ 479,
965
+ 825,
966
+ 549
967
+ ],
968
+ "page_idx": 8
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "More specifically, there has been significant recent research in automatically discovering the architecture of neural networks through gradient-based, reinforcement learning, or neuroevolutionary methods (Elsken et al., 2019; Wistuba et al., 2019; Real et al., 2019). In related work, evolution was used discover novel loss functions automatically (Gonzalez & Miikkulainen, 2019; 2020; Liang et al., 2020), outperforming the standard cross entropy loss. In the future, it may be possible to optimize many of these aspects of neural network design jointly. Just as new activation functions improve the accuracy of existing network architectures, it is likely that different architectures will be discovered when the activation function is not ReLU. One such example is EfficientNet (Tan & Le, 2019), which achieved state-of-the-art accuracy for ImageNet (Deng et al., 2009) using the Swish activation function (Ramachandran et al., 2018; Elfwing et al., 2018). Coevolution of activation functions, topologies, loss functions, and possibly other aspects of neural network design could allow taking advantage of interactions between them, leading to further improvements in the future. ",
973
+ "bbox": [
974
+ 174,
975
+ 556,
976
+ 825,
977
+ 723
978
+ ],
979
+ "page_idx": 8
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "8 CONCLUSION ",
984
+ "text_level": 1,
985
+ "bbox": [
986
+ 176,
987
+ 751,
988
+ 318,
989
+ 767
990
+ ],
991
+ "page_idx": 8
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "This paper introduced PANGAEA, a technique for automatically designing novel, high-performing, parametric activation functions. PANGAEA builds a synergy of two different optimization processes: evolutionary population-based search for the general form, and gradient descent-based fine-tuning of the parameters of the activation function. Compared to previous studies, the search space is extended to include deeper and more complex functional forms, including ones unlikely to be discovered by humans. The parameters are adapted during training and are different in different locations of the architecture, thus customizing the functions over both time and space. PANGAEA is able to discover general activation functions that perform well across architectures, and specialized functions taking advantage of a particular architecture, significantly outperforming previously proposed activation functions in both cases. It is thus a promising step towards automatic configuration of neural networks. ",
996
+ "bbox": [
997
+ 174,
998
+ 785,
999
+ 825,
1000
+ 924
1001
+ ],
1002
+ "page_idx": 8
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "REFERENCES \nM. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al. Tensorflow: A system for large-scale machine learning. In 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), pp. 265–283, 2016. \nM. Basirat and P. M. Roth. The quest for the golden activation function. arXiv:1808.00783, 2018. \nG. Bingham, W. Macke, and R. Miikkulainen. Evolutionary optimization of deep learning activation functions. In Genetic and Evolutionary Computation Conference (GECCO ’20), July 8–12, 2020, Cancún, Mexico, 2020. \nD.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015. \nJ. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and F.-F. Li. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. \nS. Elfwing, E. Uchibe, and K. Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks, 107:3–11, 2018. \nT. Elsken, J. H. Metzen, and F. Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019. \nF. Gomez and R. Miikkulainen. Active guidance for a finless rocket using neuroevolution. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 2084–2095, 2003. \nS. Gonzalez and R. Miikkulainen. Improved training speed, accuracy, and data utilization through loss function optimization. arXiv:1905.11528, 2019. \nS. Gonzalez and R. Miikkulainen. Evolving loss functions with multivariate taylor polynomial parameterizations. arXiv:2002.00059, 2020. \nK. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015. \nK. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a. \nK. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b. \nD. Hendrycks and K. Gimpel. Gaussian error linear units (gelus). arXiv:1606.08415, 2016. \nG. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580, 2012. \nS. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pp. 448–456, 2015. \nG. Klambauer, T. Unterthiner, A. Mayr, and S. Hochreiter. Self-normalizing neural networks. In Advances in neural information processing systems, pp. 971–980, 2017. \nJ. R. Koza. Genetic programming: on the programming of computers by means of natural selection, volume 1. MIT press, 1992. \nA. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. \nJ. Liang, S. Gonzalez, and R. Miikkulainen. Population-based training for loss function optimization. arXiv:2002.04225, 2020. \nH. Liu, A. Brock, K. Simonyan, and Q. V. Le. Evolving normalization-activation layers. arXiv:2004.02967, 2020. \nA. L. Maas, A. Y. Hannun, and A. Y. Ng. Rectifier nonlinearities improve neural network acoustic models. In Proceedings of the 30th international conference on machine learning (ICML-13), pp. 3, 2013. \nD. Misra. Mish: A self regularized non-monotonic neural activation function. arXiv:1908.08681, 2019. \nV. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814, 2010. \nC. Nwankpa, W. Ijomah, A. Gachagan, and S. Marshall. Activation functions: Comparison of trends in practice and research for deep learning. arXiv:1811.03378, 2018. \nP. Ramachandran, B. Zoph, and Q. V. Le. Searching for activation functions. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Workshop Track Proceedings, 2018. \nE. Real, A. Aggarwal, Y. Huang, and Q. V. Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pp. 4780–4789, 2019. \nJ. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all convolutional net. In ICLR (workshop track), 2015. \nM. Tan and Q. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pp. 6105–6114, 2019. \nD. Thain, T. Tannenbaum, and M. Livny. Distributed computing in practice: the condor experience. Concurrency and computation: practice and experience, 17(2-4):323–356, 2005. \nD. Whitley, K. Mathias, and P. Fitzhorn. Delta-Coding: An iterative search strategy for genetic algorithms. In Proceedings of the International Conference on Genetic Algorithms, pp. 77–84, 1991. \nM. Wistuba, A. Rawat, and T. Pedapati. A survey on neural architecture search. arXiv:1905.01392, 2019. \nS. Zagoruyko and N. Komodakis. Wide residual networks. arXiv:1605.07146, 2016. ",
1007
+ "bbox": [
1008
+ 169,
1009
+ 87,
1010
+ 828,
1011
+ 929
1012
+ ],
1013
+ "page_idx": 9
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "",
1018
+ "bbox": [
1019
+ 171,
1020
+ 101,
1021
+ 828,
1022
+ 614
1023
+ ],
1024
+ "page_idx": 10
1025
+ },
1026
+ {
1027
+ "type": "image",
1028
+ "img_path": "images/dbebd0ad85fe1536be8569030106468d347e8332a1c65277ae22e1a70a2ec4a7.jpg",
1029
+ "image_caption": [
1030
+ "Figure 6: CIFAR-100 test accuracy for different neural networks and activation functions. Accuracy with ReLU is shown in blue, and accuracy with the specialized activation functions in red. The relative improvement of the specialized functions over ReLU is shown as a dotted green line, according to the axis values on the right of each plot. Left: The depth of Wide ResNet is fixed at 10, and the width varies from 1 to 16. Center: The depth of Wide ResNet varies from 10 to 34, while the width is fixed at four. Right: The depth of Preactivation ResNet ranges from 20 to 164. The width and depth of a network can affect how much a specialized activation function outperforms ReLU. "
1031
+ ],
1032
+ "image_footnote": [],
1033
+ "bbox": [
1034
+ 176,
1035
+ 101,
1036
+ 820,
1037
+ 238
1038
+ ],
1039
+ "page_idx": 11
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "A ADJUSTING ARCHITECTURE WIDTH AND DEPTH ",
1044
+ "text_level": 1,
1045
+ "bbox": [
1046
+ 174,
1047
+ 375,
1048
+ 617,
1049
+ 391
1050
+ ],
1051
+ "page_idx": 11
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "To further investigate the effect of network size on the performance of novel activation functions, two specialized activation functions were paired with neural networks of different widths and depths. Due to time constraints, the results in this experiment are based on single training runs. ",
1056
+ "bbox": [
1057
+ 174,
1058
+ 406,
1059
+ 825,
1060
+ 449
1061
+ ],
1062
+ "page_idx": 11
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "Wide Residual Networks The specialized activation function $\\log ( \\sigma ( \\alpha x ) ) \\cdot \\beta { \\mathrm { a r c s i n h } } ( x )$ was discovered for a Wide ResNet of depth 10 and width four (WRN-10-4). Figure 6 shows the performance of this function when paired with Wide ResNets of different depths and widths. ",
1067
+ "bbox": [
1068
+ 174,
1069
+ 464,
1070
+ 821,
1071
+ 507
1072
+ ],
1073
+ "page_idx": 11
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "For all widths tested, $\\log ( \\sigma ( \\alpha x ) ) \\cdot \\beta { \\mathrm { a r c s i n h } } ( x )$ outperforms ReLU, albeit with diminishing returns as the width becomes large. This result implies that $\\log ( \\sigma ( \\alpha x ) ) \\cdot \\beta { \\mathrm { a r c s i n h } } ( x )$ gives the network more representational power than ReLU. As the width of the architecture is increased, the additional network parameters partially offset this advantage, explaining the decreasing relative improvement of $\\log ( \\sigma ( \\alpha \\bar { x } ) ) \\cdot \\beta \\mathrm { a r c s i n h } ( x )$ over ReLU. ",
1078
+ "bbox": [
1079
+ 174,
1080
+ 512,
1081
+ 825,
1082
+ 583
1083
+ ],
1084
+ "page_idx": 11
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "For a fixed architecture width of four, $\\log ( \\sigma ( \\alpha x ) ) \\cdot \\beta { \\mathrm { a r c s i n h } } ( x )$ outperforms ReLU only when the depth is 10 and 16. Surprisingly, as the depth is increased to 22 and beyond, the performance of $\\mathrm { l o { \\bar { g } } } ( \\sigma ( \\alpha x ) ) \\cdot \\beta \\mathrm { a r c s i n h } ( x )$ drops. This result suggests that $\\log ( \\sigma ( \\alpha x ) ) \\cdot \\beta { \\mathrm { a r c s i n h } } ( x )$ is specialized to shallow architectures. ",
1089
+ "bbox": [
1090
+ 174,
1091
+ 590,
1092
+ 825,
1093
+ 646
1094
+ ],
1095
+ "page_idx": 11
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "Preactivation Residual Networks The specialized activation function Softplus $\\left( \\operatorname { E L U } ( x ) \\right)$ was discovered for a Preactivation ResNet of depth 56 (ResNet-v2-56). Figure 6 shows the performance of this function when paired with Preactivation ResNets of different depths. Unlike with the Wide ResNets, there is no clear increase or decrease in relative improvement over ReLU as depth increases. Impressively, ResNet-v2-164 with Softplus $( { \\mathrm { E L U U } } ( x ) )$ ) achieved test set accuracy 78.01, outperforming the accuracy of ResNet-v2-1001 with ReLU (77.29) as reported by He et al. (2016b). ",
1100
+ "bbox": [
1101
+ 174,
1102
+ 661,
1103
+ 825,
1104
+ 746
1105
+ ],
1106
+ "page_idx": 11
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "B TRAINING DETAILS ",
1111
+ "text_level": 1,
1112
+ "bbox": [
1113
+ 176,
1114
+ 767,
1115
+ 372,
1116
+ 782
1117
+ ],
1118
+ "page_idx": 11
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Wide Residual Network (WRN-10-4) When measuring final performance after evolution, the standard WRN setup is used; all ReLU activations in WRN-10-4 are replaced with the evolved activation function, but no other changes to the architecture are made. The network is optimized using stochastic gradient descent with Nesterov momentum 0.9. The network is trained for 200 epochs; the initial learning rate is 0.1, and it is decreased by a factor of 0.2 after epochs 60, 120, and 160. Dropout probability is set to 0.3, and L2 regularization of 0.0005 is applied to the weights. Data augmentation includes featurewise center, featurewise standard deviation normalization, horizontal flip, and random $3 2 \\times 3 2$ crops of images padded with four pixels on all sides. This setup was chosen to mirror the original WRN setup (Zagoruyko & Komodakis, 2016) as closely as possible. ",
1123
+ "bbox": [
1124
+ 173,
1125
+ 797,
1126
+ 825,
1127
+ 924
1128
+ ],
1129
+ "page_idx": 11
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "During evolution of activation functions, the training is compressed to save time. The network is trained for only 100 epochs; the learning rate begins at 0.1 and is decreased by a factor of 0.2 after epochs 30, 60, and 80. Empirically, the accuracy achieved by this shorter schedule is sufficient to guide evolution; the computational cost saved by halving the time required to evaluate an activation function can then be used to search for additional activation functions. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 103,
1137
+ 825,
1138
+ 172
1139
+ ],
1140
+ "page_idx": 12
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Residual Network (ResNet-v1-56) As with WRN-10-4, when measuring final performance with ResNet-v1-56, the only change to the architecture is replacing the ReLU activations with an evolved activation function. The network is optimized with stochastic gradient descent and momentum 0.9. Dropout is not used, and L2 regularization of 0.0001 is applied to the weights. In the original ResNet experiments (He et al., 2016a), an initial learning rate of 0.01 was used for 400 iterations before increasing it to 0.1, and further decreasing it by a factor of 0.1 after 32K and 48K iterations. An iteration represents a single forward and backward pass over one training batch, while an epoch consists of training over the entire training dataset. In this paper, the learning rate schedule is implemented by beginning with a learning rate of 0.01 for one epoch, increasing it to 0.1, and then decreasing it by a factor of 0.1 after epochs 91 and 137. (For example, (48K iterations / 45K training images) \\* batch size of $1 2 8 \\approx 1 3 7 .$ ) The network is trained for 200 epochs in total. Data augmentation includes a random horizontal flip and random $3 2 \\times 3 2$ crops of images padded with four pixels on all sides, as in the original setup (He et al., 2016a). ",
1145
+ "bbox": [
1146
+ 174,
1147
+ 190,
1148
+ 825,
1149
+ 371
1150
+ ],
1151
+ "page_idx": 12
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "When evolving activation functions for ResNet-v1-56, the learning rate schedule is again compressed. The network is trained for 100 epochs; the initial warmup learning rate of 0.01 still lasts one epoch, the learning rate increases to 0.1, and then decreases by a factor of 0.1 after epochs 46 and 68. When evolving activation functions, their relative performance is more important than the absolute accuracies they achieve. The shorter training schedule is therefore a cost-efficient way of discovering high-performing activation functions. ",
1156
+ "bbox": [
1157
+ 174,
1158
+ 378,
1159
+ 825,
1160
+ 462
1161
+ ],
1162
+ "page_idx": 12
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Preactivation Residual Network (ResNet-v2-56) The full training setup, data augmentation, and compressed learning rate schedule used during evolution for ResNet-v2-56 are all identical to those for ResNet-v1-56 with one exception: with ResNet-v2-56, it is not necessary to warm up training with an initial learning rate of 0.01 (He et al., 2016b), so this step is skipped. ",
1167
+ "bbox": [
1168
+ 174,
1169
+ 478,
1170
+ 825,
1171
+ 535
1172
+ ],
1173
+ "page_idx": 12
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "All-CNN-C When measuring final performance with All-CNN-C, the ReLU activation function is replaced with an evolved one, but the setup otherwise mirrors that of Springenberg et al. (2015) as closely as possible. The network is optimized with stochastic gradient descent and momentum 0.9. Dropout probability is 0.5, and L2 regularization of 0.001 is applied to the weights. The data augmentation involves featurewise centering and normalizing, random horizontal flips, and random $3 2 \\times 3 2$ crops of images padded with five pixels on all sides. The initial learning rate is set to 0.01, and it is decreased by a factor of 0.1 after epochs 200, 250, and 300. The network is trained for 350 epochs in total. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 551,
1181
+ 825,
1182
+ 662
1183
+ ],
1184
+ "page_idx": 12
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "During evolution of activation functions, the same training setup was used. It is not necessary to compress the learning rate schedule as was done with the residual networks because All-CNN-C trains more quickly. ",
1189
+ "bbox": [
1190
+ 174,
1191
+ 670,
1192
+ 825,
1193
+ 712
1194
+ ],
1195
+ "page_idx": 12
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "CIFAR-10 As with CIFAR-100, a balanced validation set was created for CIFAR-10 by randomly selecting 500 images from each class, resulting in a training/validation/test split of 45K/5K/10K images. ",
1200
+ "bbox": [
1201
+ 174,
1202
+ 729,
1203
+ 825,
1204
+ 772
1205
+ ],
1206
+ "page_idx": 12
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "C IMPLEMENTATION AND COMPUTE REQUIREMENTS ",
1211
+ "text_level": 1,
1212
+ "bbox": [
1213
+ 176,
1214
+ 794,
1215
+ 630,
1216
+ 810
1217
+ ],
1218
+ "page_idx": 12
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "High-performance computing in two clusters is utilized for the experiments. One cluster uses HTCondor (Thain et al., 2005) for scheduling jobs, while the other uses the Slurm workload manager. Training is executed on GeForce GTX 1080 GPUs on both clusters. When a job begins executing, a parent activation function is selected by sampling $S = 1 6$ functions from the $P = 6 4$ most recently evaluated activation functions. This is a minor difference from the original regularized evolution (Real et al., 2019), which is based on a strict sliding window of size $P$ . This approach may give extra influence to some activation functions, depending on how quickly or slowly jobs are executed in each of the clusters. In practice the method is highly effective; it allows evolution to progress quickly by taking advantage of extra compute when demand on the clusters is low. ",
1223
+ "bbox": [
1224
+ 174,
1225
+ 825,
1226
+ 825,
1227
+ 924
1228
+ ],
1229
+ "page_idx": 12
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "",
1234
+ "bbox": [
1235
+ 171,
1236
+ 103,
1237
+ 823,
1238
+ 132
1239
+ ],
1240
+ "page_idx": 13
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "It is difficult to know ahead of time how computationally expensive the evolutionary search will be. Some activation functions immediately result in an undefined loss, causing training to end. In that case only a few seconds have been spent and another activation function can immediately be evaluated. Other activation functions train successfully, but their complicated expressions result in longer-than-usual training times. In these experiments, evolution for WRN-10-4 took 2,314 GPU hours, evolution for ResNet-v1-56 took 1,594 GPU hours, and evolution for ResNet-v2-56 took 2,175 GPU hours. These numbers do not include costs for reranking and repeated runs in the final experiments. Although substantial, the computational cost is negligible compared to the cost in human labor in designing activation functions. Evolution of parametric activation functions requires minimal manual setup and delivers automatic improvements in accuracy. ",
1245
+ "bbox": [
1246
+ 173,
1247
+ 138,
1248
+ 825,
1249
+ 279
1250
+ ],
1251
+ "page_idx": 13
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "D BASELINE ACTIVATION FUNCTION DETAILS ",
1256
+ "text_level": 1,
1257
+ "bbox": [
1258
+ 173,
1259
+ 297,
1260
+ 576,
1261
+ 315
1262
+ ],
1263
+ "page_idx": 13
1264
+ },
1265
+ {
1266
+ "type": "table",
1267
+ "img_path": "images/6f91b2f92dcf4b665e0d2aa462044d239377c019d62261abf09aed891bb7e73b.jpg",
1268
+ "table_caption": [
1269
+ "Table 7: Baseline activation functions from the operator search space (Table 1) and final results (Table 2). "
1270
+ ],
1271
+ "table_footnote": [],
1272
+ "table_body": "<table><tr><td>Name</td><td>Definition</td><td>Reference(s)</td></tr><tr><td>ReLU</td><td>max{x,0}</td><td>Nair &amp; Hinton (2010)</td></tr><tr><td>ELiSH</td><td>x if x≥0 else e-1 1+e- 1+e-</td><td>Basirat &amp; Roth (2018)</td></tr><tr><td>ELU</td><td>xif 𝑥≥0 else α(e²−1),withα=1</td><td>Clevert et al. (2015)</td></tr><tr><td>GELU</td><td>xΦ(x),withΦ(x)=P(X≤x),X~N(0,1),</td><td>Hendrycks &amp; Gimpel (2016)</td></tr><tr><td>HardSigmoid</td><td>approximated as 0.5x(1 + tanh[√2/π(x + 0.044715x³)]) max{0,min{1,0.2x +0.5}}</td><td></td></tr><tr><td>Leaky ReLU</td><td>x if x≥0 else 0.01x</td><td>Maas et al. (2013)</td></tr><tr><td>Mish SELU</td><td>x ·tanh(Softplus(x))</td><td>Misra (2019)</td></tr><tr><td></td><td>Xx if 𝑥≥0 else λα(e𝑥-1), with入= 1.05070098,α = 1.67326324</td><td>Klambauer et al. (2017)</td></tr><tr><td>sigmoid</td><td>(1+e-𝑥)-1</td><td></td></tr><tr><td>Softplus</td><td>log(e+1)</td><td></td></tr><tr><td>Softsign Swish</td><td>x/(|x|+1)</td><td></td></tr><tr><td></td><td>x·σ(x),withσ(x)=(1+e-𝑥)-1</td><td>Ramachandran et al. (2018) and Elfwing et al. (2018)</td></tr><tr><td>tanh</td><td>e-e- e+e-x</td><td></td></tr><tr><td>PReLU</td><td>xif x≥O else αx,whereα isaper-neuron learnable parameter initialized to 0.25</td><td>He et al. (2015)</td></tr><tr><td>PSwish</td><td>x·o(βx),where β is a per-channel learnable parameter</td><td>Ramachandran et al. (2018)</td></tr></table>",
1273
+ "bbox": [
1274
+ 169,
1275
+ 382,
1276
+ 823,
1277
+ 662
1278
+ ],
1279
+ "page_idx": 13
1280
+ }
1281
+ ]
parse/train/ePh9bvqIgKL/ePh9bvqIgKL_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ePh9bvqIgKL/ePh9bvqIgKL_model.json ADDED
The diff for this file is too large to render. See raw diff